J.buffer.length){var Vd=new Uint8Array(ee+Vr);Vd.set(J.buffer),J.buffer=Vd}if(se=_l.input_end,x1=_l.is_uncompressed,_l.is_metadata){for(ze(Ke);Vr>0;--Vr)Ke.readMoreInput(),Ke.readBits(8);continue}if(Vr!==0){if(x1){Ke.bit_pos_=Ke.bit_pos_+7&-8,Re(J,Vr,ee,Se,Fe,Ke),ee+=Vr;continue}for(ie=0;ie<3;++ie)Ci[ie]=Y(Ke)+1,Ci[ie]>=2&&(X(Ci[ie]+2,Ko,ie*B,Ke),X(S,_n,ie*B,Ke),Wi[ie]=ae(_n,ie*B,Ke),fe[ie]=1);for(Ke.readMoreInput(),P=Ke.readBits(2),be=M+(Ke.readBits(4)<0;){var wr,Cn,Yn,Hm,tR,qn,Ti,wl,_v,Gm,wv;for(Ke.readMoreInput(),Wi[1]===0&&(ge(Ci[1],Ko,1,xa,q,fe,Ke),Wi[1]=ae(_n,B,Ke),fo=Sr[1].htrees[xa[1]]),--Wi[1],wr=j(Sr[1].codes,fo,Ke),Cn=wr>>6,Cn>=2?(Cn-=2,Ti=-1):Ti=0,Yn=h.kInsertRangeLut[Cn]+(wr>>3&7),Hm=h.kCopyRangeLut[Cn]+(wr&7),tR=h.kInsertLengthPrefixCode[Yn].offset+Ke.readBits(h.kInsertLengthPrefixCode[Yn].nbits),qn=h.kCopyLengthPrefixCode[Hm].offset+Ke.readBits(h.kCopyLengthPrefixCode[Hm].nbits),Sn=Se[ee-1&Fe],Zo=Se[ee-2&Fe],Gm=0;Gm
4?3:qn-2)&255,lr=Q[Ld+_v],Ti=j(Sr[2].codes,Sr[2].htrees[lr],Ke),Ti>=be){var rR,wF,xv;Ti-=be,wF=Ti&jt,Ti>>=P,rR=(Ti>>1)+1,xv=(2+(Ti&1)<Be)if(qn>=u.minDictionaryWordLength&&qn<=u.maxDictionaryWordLength){var xv=u.offsetsByLength[qn],xF=wl-Be-1,CF=u.sizeBitsByLength[qn],oae=(1<>CF;if(xv+=nae*qn,TF=yt){J.write(Se,Je);for(var C1=0;C10&&(Jr[bn&3]=wl,++bn),qn>Vr)throw new Error("Invalid backward reference. pos: "+ee+" distance: "+wl+" len: "+qn+" bytes left: "+Vr);for(Gm=0;Gm>=1;return(f&h-1)+h}function u(f,m,h,g,v){do g-=h,f[m+g]=new a(v.bits,v.value);while(g>0)}function d(f,m,h){for(var g=1<0;--k[_])b=new a(_&255,M[S++]&65535),u(f,m+x,T,z,b),x=c(x,_);for(F=L-1,R=-1,_=h+1,T=2;_<=l;++_,T<<=1)for(;k[_]>0;--k[_])(x&F)!==R&&(m+=z,B=d(k,_,h),z=1<>h),T,z,b),x=c(x,_);return L}},{}],8:[function(o,n,i){"use strict";i.byteLength=h,i.toByteArray=v,i.fromByteArray=_;for(var a=[],l=[],c=typeof Uint8Array<"u"?Uint8Array:Array,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=0,f=u.length;d0)throw new Error("Invalid string. Length must be a multiple of 4");var T=S.indexOf("=");T===-1&&(T=x);var R=T===x?0:4-T%4;return[T,R]}function h(S){var x=m(S),T=x[0],R=x[1];return(T+R)*3/4-R}function g(S,x,T){return(x+T)*3/4-T}function v(S){for(var x,T=m(S),R=T[0],F=T[1],B=new c(g(S,R,F)),z=0,L=F>0?R-4:R,M=0;M>16&255,B[z++]=x>>8&255,B[z++]=x&255;return F===2&&(x=l[S.charCodeAt(M)]<<2|l[S.charCodeAt(M+1)]>>4,B[z++]=x&255),F===1&&(x=l[S.charCodeAt(M)]<<10|l[S.charCodeAt(M+1)]<<4|l[S.charCodeAt(M+2)]>>2,B[z++]=x>>8&255,B[z++]=x&255),B}function y(S){return a[S>>18&63]+a[S>>12&63]+a[S>>6&63]+a[S&63]}function b(S,x,T){for(var R,F=[],B=x;BL?L:z+B));return R===1?(x=S[T-1],F.push(a[x>>2]+a[x<<4&63]+"==")):R===2&&(x=(S[T-2]<<8)+S[T-1],F.push(a[x>>10]+a[x>>4&63]+a[x<<2&63]+"=")),F.join("")}},{}],9:[function(o,n,i){function a(l,c){this.offset=l,this.nbits=c}i.kBlockLengthPrefixCode=[new a(1,2),new a(5,2),new a(9,2),new a(13,2),new a(17,3),new a(25,3),new a(33,3),new a(41,3),new a(49,4),new a(65,4),new a(81,4),new a(97,4),new a(113,5),new a(145,5),new a(177,5),new a(209,5),new a(241,6),new a(305,6),new a(369,7),new a(497,8),new a(753,9),new a(1265,10),new a(2289,11),new a(4337,12),new a(8433,13),new a(16625,24)],i.kInsertLengthPrefixCode=[new a(0,0),new a(1,0),new a(2,0),new a(3,0),new a(4,0),new a(5,0),new a(6,1),new a(8,1),new a(10,2),new a(14,2),new a(18,3),new a(26,3),new a(34,4),new a(50,4),new a(66,5),new a(98,5),new a(130,6),new a(194,7),new a(322,8),new a(578,9),new a(1090,10),new a(2114,12),new a(6210,14),new a(22594,24)],i.kCopyLengthPrefixCode=[new a(2,0),new a(3,0),new a(4,0),new a(5,0),new a(6,0),new a(7,0),new a(8,0),new a(9,0),new a(10,1),new a(12,1),new a(14,2),new a(18,2),new a(22,3),new a(30,3),new a(38,4),new a(54,4),new a(70,5),new a(102,5),new a(134,6),new a(198,7),new a(326,8),new a(582,9),new a(1094,10),new a(2118,24)],i.kInsertRangeLut=[0,0,8,8,0,16,8,16,16],i.kCopyRangeLut=[0,8,0,8,16,0,16,8,16]},{}],10:[function(o,n,i){function a(c){this.buffer=c,this.pos=0}a.prototype.read=function(c,u,d){this.pos+d>this.buffer.length&&(d=this.buffer.length-this.pos);for(var f=0;fthis.buffer.length)throw new Error("Output buffer is not large enough");return this.buffer.set(c.subarray(0,u),this.pos),this.pos+=u,u},i.BrotliOutput=l},{}],11:[function(o,n,i){var a=o("./dictionary"),l=0,c=1,u=2,d=3,f=4,m=5,h=6,g=7,v=8,y=9,b=10,_=11,S=12,x=13,T=14,R=15,F=16,B=17,z=18,L=19,M=20;function k(G,Y,Z){this.prefix=new Uint8Array(G.length),this.transform=Y,this.suffix=new Uint8Array(Z.length);for(var V=0;V'),new k("",l,`
`),new k("",d,""),new k("",l,"]"),new k("",l," for "),new k("",T,""),new k("",u,""),new k("",l," a "),new k("",l," that "),new k(" ",b,""),new k("",l,". "),new k(".",l,""),new k(" ",l,", "),new k("",R,""),new k("",l," with "),new k("",l,"'"),new k("",l," from "),new k("",l," by "),new k("",F,""),new k("",B,""),new k(" the ",l,""),new k("",f,""),new k("",l,". The "),new k("",_,""),new k("",l," on "),new k("",l," as "),new k("",l," is "),new k("",g,""),new k("",c,"ing "),new k("",l,`
`),new k("",l,":"),new k(" ",l,". "),new k("",l,"ed "),new k("",M,""),new k("",z,""),new k("",h,""),new k("",l,"("),new k("",b,", "),new k("",v,""),new k("",l," at "),new k("",l,"ly "),new k(" the ",l," of "),new k("",m,""),new k("",y,""),new k(" ",b,", "),new k("",b,'"'),new k(".",l,"("),new k("",_," "),new k("",b,'">'),new k("",l,'="'),new k(" ",l,"."),new k(".com/",l,""),new k(" the ",l," of the "),new k("",b,"'"),new k("",l,". This "),new k("",l,","),new k(".",l," "),new k("",b,"("),new k("",b,"."),new k("",l," not "),new k(" ",l,'="'),new k("",l,"er "),new k(" ",_," "),new k("",l,"al "),new k(" ",_,""),new k("",l,"='"),new k("",_,'"'),new k("",b,". "),new k(" ",l,"("),new k("",l,"ful "),new k(" ",b,". "),new k("",l,"ive "),new k("",l,"less "),new k("",_,"'"),new k("",l,"est "),new k(" ",b,"."),new k("",_,'">'),new k(" ",l,"='"),new k("",b,","),new k("",l,"ize "),new k("",_,"."),new k("\xC2\xA0",l,""),new k(" ",l,","),new k("",b,'="'),new k("",_,'="'),new k("",l,"ous "),new k("",_,", "),new k("",b,"='"),new k(" ",b,","),new k(" ",_,'="'),new k(" ",_,", "),new k("",_,","),new k("",_,"("),new k("",_,". "),new k(" ",_,"."),new k("",_,"='"),new k(" ",_,". "),new k(" ",b,'="'),new k(" ",_,"='"),new k(" ",b,"='")];i.kTransforms=I,i.kNumTransforms=I.length;function U(G,Y){return G[Y]<192?(G[Y]>=97&&G[Y]<=122&&(G[Y]^=32),1):G[Y]<224?(G[Y+1]^=32,2):(G[Y+2]^=5,3)}i.transformDictionaryWord=function(G,Y,Z,V,j){var H=I[j].prefix,X=I[j].suffix,ae=I[j].transform,ne=aeV&&(ne=V);for(var oe=0;oe0;){var ge=U(G,ye);ye+=ge,V-=ge}for(var Re=0;Retypeof Zn<"u"?Zn:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof Zn<"u"?Zn:t)[r]}):e)(function(e){if(typeof Zn<"u")return Zn.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')}),aU=(function(){var e,t,r;return(function(){function o(n,i,a){function l(d,f){if(!i[d]){if(!n[d]){var m=typeof Sx=="function"&&Sx;if(!f&&m)return m(d,!0);if(c)return c(d,!0);var h=new Error("Cannot find module '"+d+"'");throw h.code="MODULE_NOT_FOUND",h}var g=i[d]={exports:{}};n[d][0].call(g.exports,function(v){var y=n[d][1][v];return l(y||v)},g,g.exports,o,n,i,a)}return i[d].exports}for(var c=typeof Sx=="function"&&Sx,u=0;u=252?6:d>=248?5:d>=240?4:d>=224?3:d>=192?2:1;u[254]=u[254]=1,i.string2buf=function(m){var h,g,v,y,b,_=m.length,S=0;for(y=0;y<_;y++)g=m.charCodeAt(y),(g&64512)===55296&&y+1<_&&(v=m.charCodeAt(y+1),(v&64512)===56320&&(g=65536+(g-55296<<10)+(v-56320),y++)),S+=g<128?1:g<2048?2:g<65536?3:4;for(h=new a.Buf8(S),b=0,y=0;b>>6,h[b++]=128|g&63):g<65536?(h[b++]=224|g>>>12,h[b++]=128|g>>>6&63,h[b++]=128|g&63):(h[b++]=240|g>>>18,h[b++]=128|g>>>12&63,h[b++]=128|g>>>6&63,h[b++]=128|g&63);return h};function f(m,h){if(h<65534&&(m.subarray&&c||!m.subarray&&l))return String.fromCharCode.apply(null,a.shrinkBuf(m,h));for(var g="",v=0;v4){S[v++]=65533,g+=b-1;continue}for(y&=b===2?31:b===3?15:7;b>1&&g<_;)y=y<<6|m[g++]&63,b--;if(b>1){S[v++]=65533;continue}y<65536?S[v++]=y:(y-=65536,S[v++]=55296|y>>10&1023,S[v++]=56320|y&1023)}return f(S,v)},i.utf8border=function(m,h){var g;for(h=h||m.length,h>m.length&&(h=m.length),g=h-1;g>=0&&(m[g]&192)===128;)g--;return g<0||g===0?h:g+u[m[g]]>h?g:h}},{"./common":1}],3:[function(o,n,i){"use strict";function a(l,c,u,d){for(var f=l&65535|0,m=l>>>16&65535|0,h=0;u!==0;){h=u>2e3?2e3:u,u-=h;do f=f+c[d++]|0,m=m+f|0;while(--h);f%=65521,m%=65521}return f|m<<16|0}n.exports=a},{}],4:[function(o,n,i){"use strict";n.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],5:[function(o,n,i){"use strict";function a(){for(var u,d=[],f=0;f<256;f++){u=f;for(var m=0;m<8;m++)u=u&1?3988292384^u>>>1:u>>>1;d[f]=u}return d}var l=a();function c(u,d,f,m){var h=l,g=m+f;u^=-1;for(var v=m;v>>8^h[(u^d[v])&255];return u^-1}n.exports=c},{}],6:[function(o,n,i){"use strict";function a(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}n.exports=a},{}],7:[function(o,n,i){"use strict";var a=30,l=12;n.exports=function(u,d){var f,m,h,g,v,y,b,_,S,x,T,R,F,B,z,L,M,k,I,U,G,Y,Z,V,j;f=u.state,m=u.next_in,V=u.input,h=m+(u.avail_in-5),g=u.next_out,j=u.output,v=g-(d-u.avail_out),y=g+(u.avail_out-257),b=f.dmax,_=f.wsize,S=f.whave,x=f.wnext,T=f.window,R=f.hold,F=f.bits,B=f.lencode,z=f.distcode,L=(1<>>24,R>>>=I,F-=I,I=k>>>16&255,I===0)j[g++]=k&65535;else if(I&16){U=k&65535,I&=15,I&&(F>>=I,F-=I),F<15&&(R+=V[m++]<>>24,R>>>=I,F-=I,I=k>>>16&255,I&16){if(G=k&65535,I&=15,Fb){u.msg="invalid distance too far back",f.mode=a;break e}if(R>>>=I,F-=I,I=g-v,G>I){if(I=G-I,I>S&&f.sane){u.msg="invalid distance too far back",f.mode=a;break e}if(Y=0,Z=T,x===0){if(Y+=_-I,I2;)j[g++]=Z[Y++],j[g++]=Z[Y++],j[g++]=Z[Y++],U-=3;U&&(j[g++]=Z[Y++],U>1&&(j[g++]=Z[Y++]))}else{Y=g-G;do j[g++]=j[Y++],j[g++]=j[Y++],j[g++]=j[Y++],U-=3;while(U>2);U&&(j[g++]=j[Y++],U>1&&(j[g++]=j[Y++]))}}else if((I&64)===0){k=z[(k&65535)+(R&(1<>3,m-=U,F-=U<<3,R&=(1<>>24&255)+(q>>>8&65280)+((q&65280)<<8)+((q&255)<<24)}function Jr(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new a.Buf16(320),this.work=new a.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function bn(q){var fe;return!q||!q.state?x:(fe=q.state,q.total_in=q.total_out=fe.total=0,q.msg="",fe.wrap&&(q.adler=fe.wrap&1),fe.mode=z,fe.last=0,fe.havedict=0,fe.dmax=32768,fe.head=null,fe.hold=0,fe.bits=0,fe.lencode=fe.lendyn=new a.Buf32(Be),fe.distcode=fe.distdyn=new a.Buf32(Je),fe.sane=1,fe.back=-1,b)}function Sn(q){var fe;return!q||!q.state?x:(fe=q.state,fe.wsize=0,fe.whave=0,fe.wnext=0,bn(q))}function Zo(q,fe){var P,be;return!q||!q.state||(be=q.state,fe<0?(P=0,fe=-fe):(P=(fe>>4)+1,fe<48&&(fe&=15)),fe&&(fe<8||fe>15))?x:(be.window!==null&&be.wbits!==fe&&(be.window=null),be.wrap=P,be.wbits=fe,Sn(q))}function Sr(q,fe){var P,be;return q?(be=new Jr,q.state=be,be.window=null,P=Zo(q,fe),P!==b&&(q.state=null),P):x}function Ko(q){return Sr(q,Se)}var _n=!0,Ke,Sv;function Um(q){if(_n){var fe;for(Ke=new a.Buf32(512),Sv=new a.Buf32(32),fe=0;fe<144;)q.lens[fe++]=8;for(;fe<256;)q.lens[fe++]=9;for(;fe<280;)q.lens[fe++]=7;for(;fe<288;)q.lens[fe++]=8;for(d(m,q.lens,0,288,Ke,0,q.work,{bits:9}),fe=0;fe<32;)q.lens[fe++]=5;d(h,q.lens,0,32,Sv,0,q.work,{bits:5}),_n=!1}q.lencode=Ke,q.lenbits=9,q.distcode=Sv,q.distbits=5}function Vr(q,fe,P,be){var jt,me=q.state;return me.window===null&&(me.wsize=1<=me.wsize?(a.arraySet(me.window,fe,P-me.wsize,me.wsize,0),me.wnext=0,me.whave=me.wsize):(jt=me.wsize-me.wnext,jt>be&&(jt=be),a.arraySet(me.window,fe,P-be,jt,me.wnext),be-=jt,be?(a.arraySet(me.window,fe,P-be,be,0),me.wnext=be,me.whave=me.wsize):(me.wnext+=jt,me.wnext===me.wsize&&(me.wnext=0),me.whave>>8&255,P.check=c(P.check,wr,2,0),Q=0,K=0,P.mode=L;break}if(P.flags=0,P.head&&(P.head.done=!1),!(P.wrap&1)||(((Q&255)<<8)+(Q>>8))%31){q.msg="incorrect header check",P.mode=se;break}if((Q&15)!==B){q.msg="unknown compression method",P.mode=se;break}if(Q>>>=4,K-=4,cr=(Q&15)+8,P.wbits===0)P.wbits=cr;else if(cr>P.wbits){q.msg="invalid window size",P.mode=se;break}P.dmax=1<>8&1),P.flags&512&&(wr[0]=Q&255,wr[1]=Q>>>8&255,P.check=c(P.check,wr,2,0)),Q=0,K=0,P.mode=M;case M:for(;K<32;){if(ve===0)break e;ve--,Q+=be[me++]<>>8&255,wr[2]=Q>>>16&255,wr[3]=Q>>>24&255,P.check=c(P.check,wr,4,0)),Q=0,K=0,P.mode=k;case k:for(;K<16;){if(ve===0)break e;ve--,Q+=be[me++]<>8),P.flags&512&&(wr[0]=Q&255,wr[1]=Q>>>8&255,P.check=c(P.check,wr,2,0)),Q=0,K=0,P.mode=I;case I:if(P.flags&1024){for(;K<16;){if(ve===0)break e;ve--,Q+=be[me++]<>>8&255,P.check=c(P.check,wr,2,0)),Q=0,K=0}else P.head&&(P.head.extra=null);P.mode=U;case U:if(P.flags&1024&&(Pe=P.length,Pe>ve&&(Pe=ve),Pe&&(P.head&&(cr=P.head.extra_len-P.length,P.head.extra||(P.head.extra=new Array(P.head.extra_len)),a.arraySet(P.head.extra,be,me,Pe,cr)),P.flags&512&&(P.check=c(P.check,be,Pe,me)),ve-=Pe,me+=Pe,P.length-=Pe),P.length))break e;P.length=0,P.mode=G;case G:if(P.flags&2048){if(ve===0)break e;Pe=0;do cr=be[me+Pe++],P.head&&cr&&P.length<65536&&(P.head.name+=String.fromCharCode(cr));while(cr&&Pe>9&1,P.head.done=!0),q.adler=P.check=0,P.mode=H;break;case V:for(;K<32;){if(ve===0)break e;ve--,Q+=be[me++]<>>=K&7,K-=K&7,P.mode=J;break}for(;K<3;){if(ve===0)break e;ve--,Q+=be[me++]<>>=1,K-=1,Q&3){case 0:P.mode=ae;break;case 1:if(Um(P),P.mode=ge,fe===y){Q>>>=2,K-=2;break e}break;case 2:P.mode=Ye;break;case 3:q.msg="invalid block type",P.mode=se}Q>>>=2,K-=2;break;case ae:for(Q>>>=K&7,K-=K&7;K<32;){if(ve===0)break e;ve--,Q+=be[me++]<>>16^65535)){q.msg="invalid stored block lengths",P.mode=se;break}if(P.length=Q&65535,Q=0,K=0,P.mode=ne,fe===y)break e;case ne:P.mode=ue;case ue:if(Pe=P.length,Pe){if(Pe>ve&&(Pe=ve),Pe>_r&&(Pe=_r),Pe===0)break e;a.arraySet(jt,be,me,Pe,wn),ve-=Pe,me+=Pe,_r-=Pe,wn+=Pe,P.length-=Pe;break}P.mode=H;break;case Ye:for(;K<14;){if(ve===0)break e;ve--,Q+=be[me++]<>>=5,K-=5,P.ndist=(Q&31)+1,Q>>>=5,K-=5,P.ncode=(Q&15)+4,Q>>>=4,K-=4,P.nlen>286||P.ndist>30){q.msg="too many length or distance symbols",P.mode=se;break}P.have=0,P.mode=ye;case ye:for(;P.have>>=3,K-=3}for(;P.have<19;)P.lens[Hm[P.have++]]=0;if(P.lencode=P.lendyn,P.lenbits=7,Cn={bits:P.lenbits},xn=d(f,P.lens,0,19,P.lencode,0,P.work,Cn),P.lenbits=Cn.bits,xn){q.msg="invalid code lengths set",P.mode=se;break}P.have=0,P.mode=oe;case oe:for(;P.have>>24,jr=lr>>>16&255,zr=lr&65535,!(at<=K);){if(ve===0)break e;ve--,Q+=be[me++]<>>=at,K-=at,P.lens[P.have++]=zr;else{if(zr===16){for(Yn=at+2;K>>=at,K-=at,P.have===0){q.msg="invalid bit length repeat",P.mode=se;break}cr=P.lens[P.have-1],Pe=3+(Q&3),Q>>>=2,K-=2}else if(zr===17){for(Yn=at+3;K>>=at,K-=at,cr=0,Pe=3+(Q&7),Q>>>=3,K-=3}else{for(Yn=at+7;K>>=at,K-=at,cr=0,Pe=11+(Q&127),Q>>>=7,K-=7}if(P.have+Pe>P.nlen+P.ndist){q.msg="invalid bit length repeat",P.mode=se;break}for(;Pe--;)P.lens[P.have++]=cr}}if(P.mode===se)break;if(P.lens[256]===0){q.msg="invalid code -- missing end-of-block",P.mode=se;break}if(P.lenbits=9,Cn={bits:P.lenbits},xn=d(m,P.lens,0,P.nlen,P.lencode,0,P.work,Cn),P.lenbits=Cn.bits,xn){q.msg="invalid literal/lengths set",P.mode=se;break}if(P.distbits=6,P.distcode=P.distdyn,Cn={bits:P.distbits},xn=d(h,P.lens,P.nlen,P.ndist,P.distcode,0,P.work,Cn),P.distbits=Cn.bits,xn){q.msg="invalid distances set",P.mode=se;break}if(P.mode=ge,fe===y)break e;case ge:P.mode=Re;case Re:if(ve>=6&&_r>=258){q.next_out=wn,q.avail_out=_r,q.next_in=me,q.avail_in=ve,P.hold=Q,P.bits=K,u(q,It),wn=q.next_out,jt=q.output,_r=q.avail_out,me=q.next_in,be=q.input,ve=q.avail_in,Q=P.hold,K=P.bits,P.mode===H&&(P.back=-1);break}for(P.back=0;lr=P.lencode[Q&(1<>>24,jr=lr>>>16&255,zr=lr&65535,!(at<=K);){if(ve===0)break e;ve--,Q+=be[me++]<>fo)],at=lr>>>24,jr=lr>>>16&255,zr=lr&65535,!(fo+at<=K);){if(ve===0)break e;ve--,Q+=be[me++]<>>=fo,K-=fo,P.back+=fo}if(Q>>>=at,K-=at,P.back+=at,P.length=zr,jr===0){P.mode=le;break}if(jr&32){P.back=-1,P.mode=H;break}if(jr&64){q.msg="invalid literal/length code",P.mode=se;break}P.extra=jr&15,P.mode=ze;case ze:if(P.extra){for(Yn=P.extra;K>>=P.extra,K-=P.extra,P.back+=P.extra}P.was=P.length,P.mode=Ve;case Ve:for(;lr=P.distcode[Q&(1<>>24,jr=lr>>>16&255,zr=lr&65535,!(at<=K);){if(ve===0)break e;ve--,Q+=be[me++]<>fo)],at=lr>>>24,jr=lr>>>16&255,zr=lr&65535,!(fo+at<=K);){if(ve===0)break e;ve--,Q+=be[me++]<>>=fo,K-=fo,P.back+=fo}if(Q>>>=at,K-=at,P.back+=at,jr&64){q.msg="invalid distance code",P.mode=se;break}P.offset=zr,P.extra=jr&15,P.mode=tt;case tt:if(P.extra){for(Yn=P.extra;K>>=P.extra,K-=P.extra,P.back+=P.extra}if(P.offset>P.dmax){q.msg="invalid distance too far back",P.mode=se;break}P.mode=vt;case vt:if(_r===0)break e;if(Pe=It-_r,P.offset>Pe){if(Pe=P.offset-Pe,Pe>P.whave&&P.sane){q.msg="invalid distance too far back",P.mode=se;break}Pe>P.wnext?(Pe-=P.wnext,Md=P.wsize-Pe):Md=P.wnext-Pe,Pe>P.length&&(Pe=P.length),Ld=P.window}else Ld=jt,Md=wn-P.offset,Pe=P.length;Pe>_r&&(Pe=_r),_r-=Pe,P.length-=Pe;do jt[wn++]=Ld[Md++];while(--Pe);P.length===0&&(P.mode=Re);break;case le:if(_r===0)break e;jt[wn++]=P.length,_r--,P.mode=Re;break;case J:if(P.wrap){for(;K<32;){if(ve===0)break e;ve--,Q|=be[me++]<=1&&Re[U]===0;U--);if(G>U&&(G=U),U===0)return R[F++]=1<<24|64<<16|0,R[F++]=1<<24|64<<16|0,z.bits=1,0;for(I=1;I0&&(_===d||U!==1))return-1;for(ze[1]=0,M=1;Mc||_===m&&j>u)return 1;for(;;){vt=M-Z,B[k]ge?(le=Ve[tt+B[k]],J=ye[oe+B[k]]):(le=96,J=0),X=1<>Z)+ae]=vt<<24|le<<16|J|0;while(ae!==0);for(X=1<>=1;if(X!==0?(H&=X-1,H+=X):H=0,k++,--Re[M]===0){if(M===U)break;M=S[x+B[k]]}if(M>G&&(H&ue)!==ne){for(Z===0&&(Z=G),Ye+=I,Y=M-Z,V=1<c||_===m&&j>u)return 1;ne=H&ue,R[ne]=G<<24|Y<<16|Ye-F|0}}return H!==0&&(R[Ye+H]=M-Z<<24|64<<16|0),z.bits=G,0}},{"../utils/common":1}],10:[function(o,n,i){"use strict";n.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],11:[function(o,n,i){"use strict";function a(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}n.exports=a},{}],"/lib/inflate.js":[function(o,n,i){"use strict";var a=o("./zlib/inflate"),l=o("./utils/common"),c=o("./utils/strings"),u=o("./zlib/constants"),d=o("./zlib/messages"),f=o("./zlib/zstream"),m=o("./zlib/gzheader"),h=Object.prototype.toString;function g(b){if(!(this instanceof g))return new g(b);this.options=l.assign({chunkSize:16384,windowBits:0,to:""},b||{});var _=this.options;_.raw&&_.windowBits>=0&&_.windowBits<16&&(_.windowBits=-_.windowBits,_.windowBits===0&&(_.windowBits=-15)),_.windowBits>=0&&_.windowBits<16&&!(b&&b.windowBits)&&(_.windowBits+=32),_.windowBits>15&&_.windowBits<48&&(_.windowBits&15)===0&&(_.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new f,this.strm.avail_out=0;var S=a.inflateInit2(this.strm,_.windowBits);if(S!==u.Z_OK)throw new Error(d[S]);if(this.header=new m,a.inflateGetHeader(this.strm,this.header),_.dictionary&&(typeof _.dictionary=="string"?_.dictionary=c.string2buf(_.dictionary):h.call(_.dictionary)==="[object ArrayBuffer]"&&(_.dictionary=new Uint8Array(_.dictionary)),_.raw&&(S=a.inflateSetDictionary(this.strm,_.dictionary),S!==u.Z_OK)))throw new Error(d[S])}g.prototype.push=function(b,_){var S=this.strm,x=this.options.chunkSize,T=this.options.dictionary,R,F,B,z,L,M=!1;if(this.ended)return!1;F=_===~~_?_:_===!0?u.Z_FINISH:u.Z_NO_FLUSH,typeof b=="string"?S.input=c.binstring2buf(b):h.call(b)==="[object ArrayBuffer]"?S.input=new Uint8Array(b):S.input=b,S.next_in=0,S.avail_in=S.input.length;do{if(S.avail_out===0&&(S.output=new l.Buf8(x),S.next_out=0,S.avail_out=x),R=a.inflate(S,u.Z_NO_FLUSH),R===u.Z_NEED_DICT&&T&&(R=a.inflateSetDictionary(this.strm,T)),R===u.Z_BUF_ERROR&&M===!0&&(R=u.Z_OK,M=!1),R!==u.Z_STREAM_END&&R!==u.Z_OK)return this.onEnd(R),this.ended=!0,!1;S.next_out&&(S.avail_out===0||R===u.Z_STREAM_END||S.avail_in===0&&(F===u.Z_FINISH||F===u.Z_SYNC_FLUSH))&&(this.options.to==="string"?(B=c.utf8border(S.output,S.next_out),z=S.next_out-B,L=c.buf2string(S.output,B),S.next_out=z,S.avail_out=x-z,z&&l.arraySet(S.output,S.output,B,z,0),this.onData(L)):this.onData(l.shrinkBuf(S.output,S.next_out))),S.avail_in===0&&S.avail_out===0&&(M=!0)}while((S.avail_in>0||S.avail_out===0)&&R!==u.Z_STREAM_END);return R===u.Z_STREAM_END&&(F=u.Z_FINISH),F===u.Z_FINISH?(R=a.inflateEnd(this.strm),this.onEnd(R),this.ended=!0,R===u.Z_OK):(F===u.Z_SYNC_FLUSH&&(this.onEnd(u.Z_OK),S.avail_out=0),!0)},g.prototype.onData=function(b){this.chunks.push(b)},g.prototype.onEnd=function(b){b===u.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=l.flattenChunks(this.chunks)),this.chunks=[],this.err=b,this.msg=this.strm.msg};function v(b,_){var S=new g(_);if(S.push(b,!0),S.err)throw S.msg||d[S.err];return S.result}function y(b,_){return _=_||{},_.raw=!0,v(b,_)}i.Inflate=g,i.inflate=v,i.inflateRaw=y,i.ungzip=v},{"./utils/common":1,"./utils/strings":2,"./zlib/constants":4,"./zlib/gzheader":6,"./zlib/inflate":8,"./zlib/messages":10,"./zlib/zstream":11}]},{},[])("/lib/inflate.js")})();var aje=globalThis.fetch,_x=class{constructor(e,t={},r){this.type=e,this.detail=t,this.msg=r,Object.defineProperty(this,"__mayPropagate",{enumerable:!1,writable:!0}),this.__mayPropagate=!0}preventDefault(){}stopPropagation(){this.__mayPropagate=!1}valueOf(){return this}toString(){return this.msg?`[${this.type} event]: ${this.msg}`:`[${this.type} event]`}},qye=class{constructor(){this.listeners={}}addEventListener(e,t,r){let o=this.listeners[e]||[];r?o.unshift(t):o.push(t),this.listeners[e]=o}removeEventListener(e,t){let r=this.listeners[e]||[],o=r.findIndex(n=>n===t);o>-1&&(r.splice(o,1),this.listeners[e]=r)}dispatch(e){let t=this.listeners[e.type];if(t)for(let r=0,o=t.length;rString.fromCharCode(t)).join("")}var Xye=class{constructor(e,t,r){this.name=(r||e.tag||"").trim(),this.length=e.length,this.start=e.offset,this.offset=0,this.data=t,["getInt8","getUint8","getInt16","getUint16","getInt32","getUint32","getBigInt64","getBigUint64"].forEach(o=>{let n=o.replace(/get(Big)?/,"").toLowerCase(),i=parseInt(o.replace(/[^\d]/g,""))/8;Object.defineProperty(this,n,{get:()=>this.getValue(o,i)})})}get currentPosition(){return this.start+this.offset}set currentPosition(e){this.start=e,this.offset=0}skip(e=0,t=8){this.offset+=e*t/8}getValue(e,t){let r=this.start+this.offset;this.offset+=t;try{return this.data[e](r)}catch(o){throw console.error("parser",e,t,this),console.error("parser",this.start,this.offset),o}}flags(e){if(e===8||e===16||e===32||e===64)return this[`uint${e}`].toString(2).padStart(e,0).split("").map(t=>t==="1");console.error("Error parsing flags: flag types can only be 1, 2, 4, or 8 bytes long"),console.trace()}get tag(){let e=this.uint32;return Kye([e>>24&255,e>>16&255,e>>8&255,e&255])}get fixed(){let e=this.int16,t=Math.round(1e3*this.uint16/65356);return e+t/1e3}get legacyFixed(){let e=this.uint16,t=this.uint16.toString(16).padStart(4,0);return parseFloat(`${e}.${t}`)}get uint24(){return(this.uint8<<16)+(this.uint8<<8)+this.uint8}get uint128(){let e=0;for(let t=0;t<5;t++){let r=this.uint8;if(e=e*128+(r&127),r<128)break}return e}get longdatetime(){return new Date(Zye+1e3*parseInt(this.int64.toString()))}get fword(){return this.int16}get ufword(){return this.uint16}get Offset16(){return this.uint16}get Offset32(){return this.uint32}get F2DOT14(){let e=p.uint16,t=[0,1,-2,-1][e>>14],r=e&16383;return t+r/16384}verifyLength(){this.offset!=this.length&&console.error(`unexpected parsed table size (${this.offset}) for "${this.name}" (expected ${this.length})`)}readBytes(e=0,t=0,r=8,o=!1){if(e=e||this.length,e===0)return[];t&&(this.currentPosition=t);let n=`${o?"":"u"}int${r}`,i=[];for(;e--;)i.push(this[n]);return i}},pr=class{constructor(e){Object.defineProperty(this,"parser",{enumerable:!1,get:()=>e});let r=e.currentPosition;Object.defineProperty(this,"start",{enumerable:!1,get:()=>r})}load(e){Object.keys(e).forEach(t=>{let r=Object.getOwnPropertyDescriptor(e,t);r.get?this[t]=r.get.bind(this):r.value!==void 0&&(this[t]=r.value)}),this.parser.length&&this.parser.verifyLength()}},qe=class extends pr{constructor(e,t,r){let{parser:o,start:n}=super(new Xye(e,t,r));Object.defineProperty(this,"p",{enumerable:!1,get:()=>o}),Object.defineProperty(this,"tableStart",{enumerable:!1,get:()=>n})}};function we(e,t,r){let o;Object.defineProperty(e,t,{get:()=>o||(o=r(),o),enumerable:!0})}var Qye=class extends qe{constructor(e,t,r){let{p:o}=super({offset:0,length:12},t,"sfnt");this.version=o.uint32,this.numTables=o.uint16,this.searchRange=o.uint16,this.entrySelector=o.uint16,this.rangeShift=o.uint16,o.verifyLength(),this.directory=[...new Array(this.numTables)].map(n=>new Jye(o)),this.tables={},this.directory.forEach(n=>{let i=()=>r(this.tables,{tag:n.tag,offset:n.offset,length:n.length},t);we(this.tables,n.tag.trim(),i)})}},Jye=class{constructor(e){this.tag=e.tag,this.checksum=e.uint32,this.offset=e.uint32,this.length=e.uint32}},lU=aU.inflate||void 0,cU=void 0,$ye=class extends qe{constructor(e,t,r){let{p:o}=super({offset:0,length:44},t,"woff");this.signature=o.tag,this.flavor=o.uint32,this.length=o.uint32,this.numTables=o.uint16,o.uint16,this.totalSfntSize=o.uint32,this.majorVersion=o.uint16,this.minorVersion=o.uint16,this.metaOffset=o.uint32,this.metaLength=o.uint32,this.metaOrigLength=o.uint32,this.privOffset=o.uint32,this.privLength=o.uint32,o.verifyLength(),this.directory=[...new Array(this.numTables)].map(n=>new ebe(o)),tbe(this,t,r)}},ebe=class{constructor(e){this.tag=e.tag,this.offset=e.uint32,this.compLength=e.uint32,this.origLength=e.uint32,this.origChecksum=e.uint32}};function tbe(e,t,r){e.tables={},e.directory.forEach(o=>{we(e.tables,o.tag.trim(),()=>{let n=0,i=t;if(o.compLength!==o.origLength){let a=t.buffer.slice(o.offset,o.offset+o.compLength),l;if(lU)l=lU(new Uint8Array(a));else if(cU)l=cU(new Uint8Array(a));else{let c="no brotli decoder available to decode WOFF2 font";throw font.onerror&&font.onerror(c),new Error(c)}i=new DataView(l.buffer)}else n=o.offset;return r(e.tables,{tag:o.tag,offset:n,length:o.origLength},i)})})}var uU=sU,dU=void 0,rbe=class extends qe{constructor(e,t,r){let{p:o}=super({offset:0,length:48},t,"woff2");this.signature=o.tag,this.flavor=o.uint32,this.length=o.uint32,this.numTables=o.uint16,o.uint16,this.totalSfntSize=o.uint32,this.totalCompressedSize=o.uint32,this.majorVersion=o.uint16,this.minorVersion=o.uint16,this.metaOffset=o.uint32,this.metaLength=o.uint32,this.metaOrigLength=o.uint32,this.privOffset=o.uint32,this.privLength=o.uint32,o.verifyLength(),this.directory=[...new Array(this.numTables)].map(l=>new obe(o));let n=o.currentPosition;this.directory[0].offset=0,this.directory.forEach((l,c)=>{let u=this.directory[c+1];u&&(u.offset=l.offset+(l.transformLength!==void 0?l.transformLength:l.origLength))});let i,a=t.buffer.slice(n);if(uU)i=uU(new Uint8Array(a));else if(dU)i=new Uint8Array(dU(a));else{let l="no brotli decoder available to decode WOFF2 font";throw e.onerror&&e.onerror(l),new Error(l)}nbe(this,i,r)}},obe=class{constructor(e){this.flags=e.uint8;let t=this.tagNumber=this.flags&63;t===63?this.tag=e.tag:this.tag=ibe(t);let o=(this.transformVersion=(this.flags&192)>>6)!==0;(this.tag==="glyf"||this.tag==="loca")&&(o=this.transformVersion!==3),this.origLength=e.uint128,o&&(this.transformLength=e.uint128)}};function nbe(e,t,r){e.tables={},e.directory.forEach(o=>{we(e.tables,o.tag.trim(),()=>{let n=o.offset,i=n+(o.transformLength?o.transformLength:o.origLength),a=new DataView(t.slice(n,i).buffer);try{return r(e.tables,{tag:o.tag,offset:0,length:o.origLength},a)}catch(l){console.error(l)}})})}function ibe(e){return["cmap","head","hhea","hmtx","maxp","name","OS/2","post","cvt ","fpgm","glyf","loca","prep","CFF ","VORG","EBDT","EBLC","gasp","hdmx","kern","LTSH","PCLT","VDMX","vhea","vmtx","BASE","GDEF","GPOS","GSUB","EBSC","JSTF","MATH","CBDT","CBLC","COLR","CPAL","SVG ","sbix","acnt","avar","bdat","bloc","bsln","cvar","fdsc","feat","fmtx","fvar","gvar","hsty","just","lcar","mort","morx","opbd","prop","trak","Zapf","Silf","Glat","Gloc","Feat","Sill"][e&63]}var yU={},bU=!1;Promise.all([Promise.resolve().then(function(){return Nbe}),Promise.resolve().then(function(){return Dbe}),Promise.resolve().then(function(){return Mbe}),Promise.resolve().then(function(){return jbe}),Promise.resolve().then(function(){return Ube}),Promise.resolve().then(function(){return qbe}),Promise.resolve().then(function(){return Kbe}),Promise.resolve().then(function(){return Qbe}),Promise.resolve().then(function(){return a0e}),Promise.resolve().then(function(){return y0e}),Promise.resolve().then(function(){return i1e}),Promise.resolve().then(function(){return a1e}),Promise.resolve().then(function(){return d1e}),Promise.resolve().then(function(){return h1e}),Promise.resolve().then(function(){return v1e}),Promise.resolve().then(function(){return b1e}),Promise.resolve().then(function(){return w1e}),Promise.resolve().then(function(){return C1e}),Promise.resolve().then(function(){return P1e}),Promise.resolve().then(function(){return E1e}),Promise.resolve().then(function(){return A1e}),Promise.resolve().then(function(){return I1e}),Promise.resolve().then(function(){return D1e}),Promise.resolve().then(function(){return L1e}),Promise.resolve().then(function(){return V1e}),Promise.resolve().then(function(){return z1e}),Promise.resolve().then(function(){return H1e}),Promise.resolve().then(function(){return W1e}),Promise.resolve().then(function(){return q1e}),Promise.resolve().then(function(){return X1e}),Promise.resolve().then(function(){return rSe}),Promise.resolve().then(function(){return sSe}),Promise.resolve().then(function(){return cSe}),Promise.resolve().then(function(){return mSe}),Promise.resolve().then(function(){return hSe}),Promise.resolve().then(function(){return vSe}),Promise.resolve().then(function(){return SSe}),Promise.resolve().then(function(){return wSe}),Promise.resolve().then(function(){return kSe}),Promise.resolve().then(function(){return RSe}),Promise.resolve().then(function(){return ISe})]).then(e=>{e.forEach(t=>{let r=Object.keys(t)[0];yU[r]=t[r]}),bU=!0});function sbe(e,t,r){let o=t.tag.replace(/[^\w\d]/g,""),n=yU[o];return n?new n(t,r,e):(console.warn(`lib-font has no definition for ${o}. The table was skipped.`),{})}function abe(){let e=0;function t(r,o){if(!bU)return e>10?o(new Error("loading took too long")):(e++,setTimeout(()=>t(r),250));r(sbe)}return new Promise((r,o)=>t(r))}function lbe(e,t){let r=e.lastIndexOf("."),o=(e.substring(r+1)||"").toLowerCase(),n={ttf:"truetype",otf:"opentype",woff:"woff",woff2:"woff2"}[o];if(n)return n;let i={eot:"The .eot format is not supported: it died in January 12, 2016, when Microsoft retired all versions of IE that didn't already support WOFF.",svg:"The .svg format is not supported: SVG fonts (not to be confused with OpenType with embedded SVG) were so bad we took the entire fonts chapter out of the SVG specification again.",fon:"The .fon format is not supported: this is an ancient Windows bitmap font format.",ttc:"Based on the current CSS specification, font collections are not (yet?) supported."}[o];if(i||(i=`${e} is not a known webfont format.`),t)throw new Error(i);console.warn(`Could not load font: ${i}`)}async function cbe(e,t,r={}){if(!globalThis.document)return;let o=lbe(t,r.errorOnStyle);if(!o)return;let n=document.createElement("style");n.className="injected-by-Font-js";let i=[];return r.styleRules&&(i=Object.entries(r.styleRules).map(([a,l])=>`${a}: ${l};`)),n.textContent=`
@font-face {
font-family: "${e}";
${i.join(`
`)}
src: url("${t}") format("${o}");
}`,globalThis.document.head.appendChild(n),n}var ube=[0,1,0,0],dbe=[79,84,84,79],fbe=[119,79,70,70],mbe=[119,79,70,50];function wx(e,t){if(e.length===t.length){for(let r=0;r(globalThis.document&&!this.options.skipStyleSheet&&await cbe(this.name,e,this.options),this.loadFont(e)))()}async loadFont(e,t){fetch(e).then(r=>hbe(r)&&r.arrayBuffer()).then(r=>this.fromDataBuffer(r,t||e)).catch(r=>{let o=new _x("error",r,`Failed to load font at ${t||e}`);this.dispatch(o),this.onerror&&this.onerror(o)})}async fromDataBuffer(e,t){this.fontData=new DataView(e);let r=pbe(this.fontData);if(!r)throw new Error(`${t} is either an unsupported font format, or not a font at all.`);await this.parseBasicData(r);let o=new _x("load",{font:this});this.dispatch(o),this.onload&&this.onload(o)}async parseBasicData(e){return abe().then(t=>(e==="SFNT"&&(this.opentype=new Qye(this,this.fontData,t)),e==="WOFF"&&(this.opentype=new $ye(this,this.fontData,t)),e==="WOFF2"&&(this.opentype=new rbe(this,this.fontData,t)),this.opentype))}getGlyphId(e){return this.opentype.tables.cmap.getGlyphId(e)}reverse(e){return this.opentype.tables.cmap.reverse(e)}supports(e){return this.getGlyphId(e)!==0}supportsVariation(e){return this.opentype.tables.cmap.supportsVariation(e)!==!1}measureText(e,t=16){if(this.__unloaded)throw new Error("Cannot measure text: font was unloaded. Please reload before calling measureText()");let r=document.createElement("div");r.textContent=e,r.style.fontFamily=this.name,r.style.fontSize=`${t}px`,r.style.color="transparent",r.style.background="transparent",r.style.top="0",r.style.left="0",r.style.position="absolute",document.body.appendChild(r);let o=r.getBoundingClientRect();document.body.removeChild(r);let n=this.opentype.tables["OS/2"];return o.fontSize=t,o.ascender=n.sTypoAscender,o.descender=n.sTypoDescender,o}unload(){if(this.styleElement.parentNode){this.styleElement.parentNode.removeElement(this.styleElement);let e=new _x("unload",{font:this});this.dispatch(e),this.onunload&&this.onunload(e)}this._unloaded=!0}load(){if(this.__unloaded){delete this.__unloaded,document.head.appendChild(this.styleElement);let e=new _x("load",{font:this});this.dispatch(e),this.onload&&this.onload(e)}}};globalThis.Font=Cx;var $l=class extends pr{constructor(e,t,r){super(e),this.plaformID=t,this.encodingID=r}},gbe=class extends $l{constructor(e,t,r){super(e,t,r),this.format=0,this.length=e.uint16,this.language=e.uint16,this.glyphIdArray=[...new Array(256)].map(o=>e.uint8)}supports(e){return e.charCodeAt&&(e=-1,console.warn("supports(character) not implemented for cmap subtable format 0. only supports(id) is implemented.")),0<=e&&e<=255}reverse(e){return console.warn("reverse not implemented for cmap subtable format 0"),{}}getSupportedCharCodes(){return[{start:1,end:256}]}},vbe=class extends $l{constructor(e,t,r){super(e,t,r),this.format=2,this.length=e.uint16,this.language=e.uint16,this.subHeaderKeys=[...new Array(256)].map(a=>e.uint16);let o=Math.max(...this.subHeaderKeys),n=e.currentPosition;we(this,"subHeaders",()=>(e.currentPosition=n,[...new Array(o)].map(a=>new ybe(e))));let i=n+o*8;we(this,"glyphIndexArray",()=>(e.currentPosition=i,[...new Array(o)].map(a=>e.uint16)))}supports(e){e.charCodeAt&&(e=-1,console.warn("supports(character) not implemented for cmap subtable format 2. only supports(id) is implemented."));let t=e&&255,r=e&&65280,o=this.subHeaders[r],n=this.subHeaders[o],i=n.firstCode,a=i+n.entryCount;return i<=t&&t<=a}reverse(e){return console.warn("reverse not implemented for cmap subtable format 2"),{}}getSupportedCharCodes(e=!1){return e?this.subHeaders.map(t=>({firstCode:t.firstCode,lastCode:t.lastCode})):this.subHeaders.map(t=>({start:t.firstCode,end:t.lastCode}))}},ybe=class{constructor(e){this.firstCode=e.uint16,this.entryCount=e.uint16,this.lastCode=this.first+this.entryCount,this.idDelta=e.int16,this.idRangeOffset=e.uint16}},bbe=class extends $l{constructor(e,t,r){super(e,t,r),this.format=4,this.length=e.uint16,this.language=e.uint16,this.segCountX2=e.uint16,this.segCount=this.segCountX2/2,this.searchRange=e.uint16,this.entrySelector=e.uint16,this.rangeShift=e.uint16;let o=e.currentPosition;we(this,"endCode",()=>e.readBytes(this.segCount,o,16));let n=o+2+this.segCountX2;we(this,"startCode",()=>e.readBytes(this.segCount,n,16));let i=n+this.segCountX2;we(this,"idDelta",()=>e.readBytes(this.segCount,i,16,!0));let a=i+this.segCountX2;we(this,"idRangeOffset",()=>e.readBytes(this.segCount,a,16));let l=a+this.segCountX2,c=this.length-(l-this.tableStart);we(this,"glyphIdArray",()=>e.readBytes(c,l,16)),we(this,"segments",()=>this.buildSegments(a,l,e))}buildSegments(e,t,r){let o=(n,i)=>{let a=this.startCode[i],l=this.endCode[i],c=this.idDelta[i],u=this.idRangeOffset[i],d=e+2*i,f=[];if(u===0)for(let m=a+c,h=l+c;m<=h;m++)f.push(m);else for(let m=0,h=l-a;m<=h;m++)r.currentPosition=d+u+m*2,f.push(r.uint16);return{startCode:a,endCode:l,idDelta:c,idRangeOffset:u,glyphIDs:f}};return[...new Array(this.segCount)].map(o)}reverse(e){let t=this.segments.find(o=>o.glyphIDs.includes(e));if(!t)return{};let r=t.startCode+t.glyphIDs.indexOf(e);return{code:r,unicode:String.fromCodePoint(r)}}getGlyphId(e){if(e.charCodeAt&&(e=e.charCodeAt(0)),55296<=e&&e<=57343||(e&65534)===65534||(e&65535)===65535)return 0;let t=this.segments.find(r=>r.startCode<=e&&e<=r.endCode);return t?t.glyphIDs[e-t.startCode]:0}supports(e){return this.getGlyphId(e)!==0}getSupportedCharCodes(e=!1){return e?this.segments:this.segments.map(t=>({start:t.startCode,end:t.endCode}))}},Sbe=class extends $l{constructor(e,t,r){super(e,t,r),this.format=6,this.length=e.uint16,this.language=e.uint16,this.firstCode=e.uint16,this.entryCount=e.uint16,this.lastCode=this.firstCode+this.entryCount-1,we(this,"glyphIdArray",()=>[...new Array(this.entryCount)].map(n=>e.uint16))}supports(e){if(e.charCodeAt&&(e=-1,console.warn("supports(character) not implemented for cmap subtable format 6. only supports(id) is implemented.")),ethis.firstCode+this.entryCount)return{};let t=e-this.firstCode;return{code:t,unicode:String.fromCodePoint(t)}}reverse(e){let t=this.glyphIdArray.indexOf(e);if(t>-1)return this.firstCode+t}getSupportedCharCodes(e=!1){return e?[{firstCode:this.firstCode,lastCode:this.lastCode}]:[{start:this.firstCode,end:this.lastCode}]}},_be=class extends $l{constructor(e,t,r){super(e,t,r),this.format=8,e.uint16,this.length=e.uint32,this.language=e.uint32,this.is32=[...new Array(8192)].map(n=>e.uint8),this.numGroups=e.uint32,we(this,"groups",()=>[...new Array(this.numGroups)].map(n=>new wbe(e)))}supports(e){return e.charCodeAt&&(e=-1,console.warn("supports(character) not implemented for cmap subtable format 8. only supports(id) is implemented.")),this.groups.findIndex(t=>t.startcharCode<=e&&e<=t.endcharCode)!==-1}reverse(e){return console.warn("reverse not implemented for cmap subtable format 8"),{}}getSupportedCharCodes(e=!1){return e?this.groups:this.groups.map(t=>({start:t.startcharCode,end:t.endcharCode}))}},wbe=class{constructor(e){this.startcharCode=e.uint32,this.endcharCode=e.uint32,this.startGlyphID=e.uint32}},xbe=class extends $l{constructor(e,t,r){super(e,t,r),this.format=10,e.uint16,this.length=e.uint32,this.language=e.uint32,this.startCharCode=e.uint32,this.numChars=e.uint32,this.endCharCode=this.startCharCode+this.numChars,we(this,"glyphs",()=>[...new Array(this.numChars)].map(n=>e.uint16))}supports(e){return e.charCodeAt&&(e=-1,console.warn("supports(character) not implemented for cmap subtable format 10. only supports(id) is implemented.")),ethis.startCharCode+this.numChars?!1:e-this.startCharCode}reverse(e){return console.warn("reverse not implemented for cmap subtable format 10"),{}}getSupportedCharCodes(e=!1){return e?[{startCharCode:this.startCharCode,endCharCode:this.endCharCode}]:[{start:this.startCharCode,end:this.endCharCode}]}},Cbe=class extends $l{constructor(e,t,r){super(e,t,r),this.format=12,e.uint16,this.length=e.uint32,this.language=e.uint32,this.numGroups=e.uint32,we(this,"groups",()=>[...new Array(this.numGroups)].map(n=>new Tbe(e)))}supports(e){return e.charCodeAt&&(e=e.charCodeAt(0)),55296<=e&&e<=57343||(e&65534)===65534||(e&65535)===65535?0:this.groups.findIndex(t=>t.startCharCode<=e&&e<=t.endCharCode)!==-1}reverse(e){for(let t of this.groups){let r=t.startGlyphID;if(r>e)continue;if(r===e)return t.startCharCode;if(r+(t.endCharCode-t.startCharCode)({start:t.startCharCode,end:t.endCharCode}))}},Tbe=class{constructor(e){this.startCharCode=e.uint32,this.endCharCode=e.uint32,this.startGlyphID=e.uint32}},Pbe=class extends $l{constructor(e,t,r){super(e,t,r),this.format=13,e.uint16,this.length=e.uint32,this.language=e.uint32,this.numGroups=e.uint32;let o=[...new Array(this.numGroups)].map(n=>new kbe(e));we(this,"groups",o)}supports(e){return e.charCodeAt&&(e=e.charCodeAt(0)),this.groups.findIndex(t=>t.startCharCode<=e&&e<=t.endCharCode)!==-1}reverse(e){return console.warn("reverse not implemented for cmap subtable format 13"),{}}getSupportedCharCodes(e=!1){return e?this.groups:this.groups.map(t=>({start:t.startCharCode,end:t.endCharCode}))}},kbe=class{constructor(e){this.startCharCode=e.uint32,this.endCharCode=e.uint32,this.glyphID=e.uint32}},Ebe=class extends $l{constructor(e,t,r){super(e,t,r),this.subTableStart=e.currentPosition,this.format=14,this.length=e.uint32,this.numVarSelectorRecords=e.uint32,we(this,"varSelectors",()=>[...new Array(this.numVarSelectorRecords)].map(o=>new Rbe(e)))}supports(){return console.warn("supports not implemented for cmap subtable format 14"),0}getSupportedCharCodes(){return console.warn("getSupportedCharCodes not implemented for cmap subtable format 14"),[]}reverse(e){return console.warn("reverse not implemented for cmap subtable format 14"),{}}supportsVariation(e){let t=this.varSelector.find(r=>r.varSelector===e);return t||!1}getSupportedVariations(){return this.varSelectors.map(e=>e.varSelector)}},Rbe=class{constructor(e){this.varSelector=e.uint24,this.defaultUVSOffset=e.Offset32,this.nonDefaultUVSOffset=e.Offset32}};function Abe(e,t,r){let o=e.uint16;return o===0?new gbe(e,t,r):o===2?new vbe(e,t,r):o===4?new bbe(e,t,r):o===6?new Sbe(e,t,r):o===8?new _be(e,t,r):o===10?new xbe(e,t,r):o===12?new Cbe(e,t,r):o===13?new Pbe(e,t,r):o===14?new Ebe(e,t,r):{}}var Obe=class extends qe{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.numTables=r.uint16,this.encodingRecords=[...new Array(this.numTables)].map(o=>new Ibe(r,this.tableStart))}getSubTable(e){return this.encodingRecords[e].table}getSupportedEncodings(){return this.encodingRecords.map(e=>({platformID:e.platformID,encodingId:e.encodingID}))}getSupportedCharCodes(e,t){let r=this.encodingRecords.findIndex(n=>n.platformID===e&&n.encodingID===t);return r===-1?!1:this.getSubTable(r).getSupportedCharCodes()}reverse(e){for(let t=0;t{let n=this.getSubTable(o);return n.getGlyphId?(t=n.getGlyphId(e),t!==0):!1}),t}supports(e){return this.encodingRecords.some((t,r)=>{let o=this.getSubTable(r);return o.supports&&o.supports(e)!==!1})}supportsVariation(e){return this.encodingRecords.some((t,r)=>{let o=this.getSubTable(r);return o.supportsVariation&&o.supportsVariation(e)!==!1})}},Ibe=class{constructor(e,t){let r=this.platformID=e.uint16,o=this.encodingID=e.uint16,n=this.offset=e.Offset32;we(this,"table",()=>(e.currentPosition=t+n,Abe(e,r,o)))}},Nbe=Object.freeze({__proto__:null,cmap:Obe}),Fbe=class extends qe{constructor(e,t){let{p:r}=super(e,t);this.load({majorVersion:r.uint16,minorVersion:r.uint16,fontRevision:r.fixed,checkSumAdjustment:r.uint32,magicNumber:r.uint32,flags:r.flags(16),unitsPerEm:r.uint16,created:r.longdatetime,modified:r.longdatetime,xMin:r.int16,yMin:r.int16,xMax:r.int16,yMax:r.int16,macStyle:r.flags(16),lowestRecPPEM:r.uint16,fontDirectionHint:r.uint16,indexToLocFormat:r.uint16,glyphDataFormat:r.uint16})}},Dbe=Object.freeze({__proto__:null,head:Fbe}),Bbe=class extends qe{constructor(e,t){let{p:r}=super(e,t);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.ascender=r.fword,this.descender=r.fword,this.lineGap=r.fword,this.advanceWidthMax=r.ufword,this.minLeftSideBearing=r.fword,this.minRightSideBearing=r.fword,this.xMaxExtent=r.fword,this.caretSlopeRise=r.int16,this.caretSlopeRun=r.int16,this.caretOffset=r.int16,r.int16,r.int16,r.int16,r.int16,this.metricDataFormat=r.int16,this.numberOfHMetrics=r.uint16,r.verifyLength()}},Mbe=Object.freeze({__proto__:null,hhea:Bbe}),Lbe=class extends qe{constructor(e,t,r){let{p:o}=super(e,t),n=r.hhea.numberOfHMetrics,i=r.maxp.numGlyphs,a=o.currentPosition;if(we(this,"hMetrics",()=>(o.currentPosition=a,[...new Array(n)].map(l=>new Vbe(o.uint16,o.int16)))),n(o.currentPosition=l,[...new Array(i-n)].map(c=>o.int16)))}}},Vbe=class{constructor(e,t){this.advanceWidth=e,this.lsb=t}},jbe=Object.freeze({__proto__:null,hmtx:Lbe}),zbe=class extends qe{constructor(e,t){let{p:r}=super(e,t);this.version=r.legacyFixed,this.numGlyphs=r.uint16,this.version===1&&(this.maxPoints=r.uint16,this.maxContours=r.uint16,this.maxCompositePoints=r.uint16,this.maxCompositeContours=r.uint16,this.maxZones=r.uint16,this.maxTwilightPoints=r.uint16,this.maxStorage=r.uint16,this.maxFunctionDefs=r.uint16,this.maxInstructionDefs=r.uint16,this.maxStackElements=r.uint16,this.maxSizeOfInstructions=r.uint16,this.maxComponentElements=r.uint16,this.maxComponentDepth=r.uint16),r.verifyLength()}},Ube=Object.freeze({__proto__:null,maxp:zbe}),Hbe=class extends qe{constructor(e,t){let{p:r}=super(e,t);this.format=r.uint16,this.count=r.uint16,this.stringOffset=r.Offset16,this.nameRecords=[...new Array(this.count)].map(o=>new Wbe(r,this)),this.format===1&&(this.langTagCount=r.uint16,this.langTagRecords=[...new Array(this.langTagCount)].map(o=>new Gbe(r.uint16,r.Offset16))),this.stringStart=this.tableStart+this.stringOffset}get(e){let t=this.nameRecords.find(r=>r.nameID===e);if(t)return t.string}},Gbe=class{constructor(e,t){this.length=e,this.offset=t}},Wbe=class{constructor(e,t){this.platformID=e.uint16,this.encodingID=e.uint16,this.languageID=e.uint16,this.nameID=e.uint16,this.length=e.uint16,this.offset=e.Offset16,we(this,"string",()=>(e.currentPosition=t.stringStart+this.offset,Ybe(e,this)))}};function Ybe(e,t){let{platformID:r,length:o}=t;if(o===0)return"";if(r===0||r===3){let a=[];for(let l=0,c=o/2;lr.uint8),this.ulUnicodeRange1=r.flags(32),this.ulUnicodeRange2=r.flags(32),this.ulUnicodeRange3=r.flags(32),this.ulUnicodeRange4=r.flags(32),this.achVendID=r.tag,this.fsSelection=r.uint16,this.usFirstCharIndex=r.uint16,this.usLastCharIndex=r.uint16,this.sTypoAscender=r.int16,this.sTypoDescender=r.int16,this.sTypoLineGap=r.int16,this.usWinAscent=r.uint16,this.usWinDescent=r.uint16,this.version===0||(this.ulCodePageRange1=r.flags(32),this.ulCodePageRange2=r.flags(32),this.version===1)||(this.sxHeight=r.int16,this.sCapHeight=r.int16,this.usDefaultChar=r.uint16,this.usBreakChar=r.uint16,this.usMaxContext=r.uint16,this.version<=4)||(this.usLowerOpticalPointSize=r.uint16,this.usUpperOpticalPointSize=r.uint16,this.version===5))return r.verifyLength()}},Kbe=Object.freeze({__proto__:null,OS2:Zbe}),Xbe=class extends qe{constructor(e,t){let{p:r}=super(e,t);if(this.version=r.legacyFixed,this.italicAngle=r.fixed,this.underlinePosition=r.fword,this.underlineThickness=r.fword,this.isFixedPitch=r.uint32,this.minMemType42=r.uint32,this.maxMemType42=r.uint32,this.minMemType1=r.uint32,this.maxMemType1=r.uint32,this.version===1||this.version===3)return r.verifyLength();if(this.numGlyphs=r.uint16,this.version===2){this.glyphNameIndex=[...new Array(this.numGlyphs)].map(o=>r.uint16),this.namesOffset=r.currentPosition,this.glyphNameOffsets=[1];for(let o=0;or.int8))}getGlyphName(e){if(this.version!==2)return console.warn(`post table version ${this.version} does not support glyph name lookups`),"";let t=this.glyphNameIndex[e];if(t<258)return fU[t];let r=this.glyphNameOffsets[e],n=this.glyphNameOffsets[e+1]-r-1;return n===0?".notdef.":(this.parser.currentPosition=this.namesOffset+r,this.parser.readBytes(n,this.namesOffset+r,8,!0).map(a=>String.fromCharCode(a)).join(""))}},fU=[".notdef",".null","nonmarkingreturn","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quotesingle","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","grave","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","Adieresis","Aring","Ccedilla","Eacute","Ntilde","Odieresis","Udieresis","aacute","agrave","acircumflex","adieresis","atilde","aring","ccedilla","eacute","egrave","ecircumflex","edieresis","iacute","igrave","icircumflex","idieresis","ntilde","oacute","ograve","ocircumflex","odieresis","otilde","uacute","ugrave","ucircumflex","udieresis","dagger","degree","cent","sterling","section","bullet","paragraph","germandbls","registered","copyright","trademark","acute","dieresis","notequal","AE","Oslash","infinity","plusminus","lessequal","greaterequal","yen","mu","partialdiff","summation","product","pi","integral","ordfeminine","ordmasculine","Omega","ae","oslash","questiondown","exclamdown","logicalnot","radical","florin","approxequal","Delta","guillemotleft","guillemotright","ellipsis","nonbreakingspace","Agrave","Atilde","Otilde","OE","oe","endash","emdash","quotedblleft","quotedblright","quoteleft","quoteright","divide","lozenge","ydieresis","Ydieresis","fraction","currency","guilsinglleft","guilsinglright","fi","fl","daggerdbl","periodcentered","quotesinglbase","quotedblbase","perthousand","Acircumflex","Ecircumflex","Aacute","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Oacute","Ocircumflex","apple","Ograve","Uacute","Ucircumflex","Ugrave","dotlessi","circumflex","tilde","macron","breve","dotaccent","ring","cedilla","hungarumlaut","ogonek","caron","Lslash","lslash","Scaron","scaron","Zcaron","zcaron","brokenbar","Eth","eth","Yacute","yacute","Thorn","thorn","minus","multiply","onesuperior","twosuperior","threesuperior","onehalf","onequarter","threequarters","franc","Gbreve","gbreve","Idotaccent","Scedilla","scedilla","Cacute","cacute","Ccaron","ccaron","dcroat"],Qbe=Object.freeze({__proto__:null,post:Xbe}),Jbe=class extends qe{constructor(e,t){let{p:r}=super(e,t);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.horizAxisOffset=r.Offset16,this.vertAxisOffset=r.Offset16,we(this,"horizAxis",()=>new D6({offset:e.offset+this.horizAxisOffset},t)),we(this,"vertAxis",()=>new D6({offset:e.offset+this.vertAxisOffset},t)),this.majorVersion===1&&this.minorVersion===1&&(this.itemVarStoreOffset=r.Offset32,we(this,"itemVarStore",()=>new D6({offset:e.offset+this.itemVarStoreOffset},t)))}},D6=class extends qe{constructor(e,t){let{p:r}=super(e,t,"AxisTable");this.baseTagListOffset=r.Offset16,this.baseScriptListOffset=r.Offset16,we(this,"baseTagList",()=>new $be({offset:e.offset+this.baseTagListOffset},t)),we(this,"baseScriptList",()=>new e0e({offset:e.offset+this.baseScriptListOffset},t))}},$be=class extends qe{constructor(e,t){let{p:r}=super(e,t,"BaseTagListTable");this.baseTagCount=r.uint16,this.baselineTags=[...new Array(this.baseTagCount)].map(o=>r.tag)}},e0e=class extends qe{constructor(e,t){let{p:r}=super(e,t,"BaseScriptListTable");this.baseScriptCount=r.uint16;let o=r.currentPosition;we(this,"baseScriptRecords",()=>(r.currentPosition=o,[...new Array(this.baseScriptCount)].map(n=>new t0e(this.start,r))))}},t0e=class{constructor(e,t){this.baseScriptTag=t.tag,this.baseScriptOffset=t.Offset16,we(this,"baseScriptTable",()=>(t.currentPosition=e+this.baseScriptOffset,new r0e(t)))}},r0e=class{constructor(e){this.start=e.currentPosition,this.baseValuesOffset=e.Offset16,this.defaultMinMaxOffset=e.Offset16,this.baseLangSysCount=e.uint16,this.baseLangSysRecords=[...new Array(this.baseLangSysCount)].map(t=>new o0e(this.start,e)),we(this,"baseValues",()=>(e.currentPosition=this.start+this.baseValuesOffset,new n0e(e))),we(this,"defaultMinMax",()=>(e.currentPosition=this.start+this.defaultMinMaxOffset,new SU(e)))}},o0e=class{constructor(e,t){this.baseLangSysTag=t.tag,this.minMaxOffset=t.Offset16,we(this,"minMax",()=>(t.currentPosition=e+this.minMaxOffset,new SU(t)))}},n0e=class{constructor(e){this.parser=e,this.start=e.currentPosition,this.defaultBaselineIndex=e.uint16,this.baseCoordCount=e.uint16,this.baseCoords=[...new Array(this.baseCoordCount)].map(t=>e.Offset16)}getTable(e){return this.parser.currentPosition=this.start+this.baseCoords[e],new s0e(this.parser)}},SU=class{constructor(e){this.minCoord=e.Offset16,this.maxCoord=e.Offset16,this.featMinMaxCount=e.uint16;let t=e.currentPosition;we(this,"featMinMaxRecords",()=>(e.currentPosition=t,[...new Array(this.featMinMaxCount)].map(r=>new i0e(e))))}},i0e=class{constructor(e){this.featureTableTag=e.tag,this.minCoord=e.Offset16,this.maxCoord=e.Offset16}},s0e=class{constructor(e){this.baseCoordFormat=e.uint16,this.coordinate=e.int16,this.baseCoordFormat===2&&(this.referenceGlyph=e.uint16,this.baseCoordPoint=e.uint16),this.baseCoordFormat===3&&(this.deviceTable=e.Offset16)}},a0e=Object.freeze({__proto__:null,BASE:Jbe}),mU=class{constructor(e){this.classFormat=e.uint16,this.classFormat===1&&(this.startGlyphID=e.uint16,this.glyphCount=e.uint16,this.classValueArray=[...new Array(this.glyphCount)].map(t=>e.uint16)),this.classFormat===2&&(this.classRangeCount=e.uint16,this.classRangeRecords=[...new Array(this.classRangeCount)].map(t=>new l0e(e)))}},l0e=class{constructor(e){this.startGlyphID=e.uint16,this.endGlyphID=e.uint16,this.class=e.uint16}},Eb=class extends pr{constructor(e){super(e),this.coverageFormat=e.uint16,this.coverageFormat===1&&(this.glyphCount=e.uint16,this.glyphArray=[...new Array(this.glyphCount)].map(t=>e.uint16)),this.coverageFormat===2&&(this.rangeCount=e.uint16,this.rangeRecords=[...new Array(this.rangeCount)].map(t=>new c0e(e)))}},c0e=class{constructor(e){this.startGlyphID=e.uint16,this.endGlyphID=e.uint16,this.startCoverageIndex=e.uint16}},u0e=class{constructor(e,t){this.table=e,this.parser=t,this.start=t.currentPosition,this.format=t.uint16,this.variationRegionListOffset=t.Offset32,this.itemVariationDataCount=t.uint16,this.itemVariationDataOffsets=[...new Array(this.itemVariationDataCount)].map(r=>t.Offset32)}},d0e=class extends qe{constructor(e,t){let{p:r}=super(e,t);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.glyphClassDefOffset=r.Offset16,we(this,"glyphClassDefs",()=>{if(this.glyphClassDefOffset!==0)return r.currentPosition=this.tableStart+this.glyphClassDefOffset,new mU(r)}),this.attachListOffset=r.Offset16,we(this,"attachList",()=>{if(this.attachListOffset!==0)return r.currentPosition=this.tableStart+this.attachListOffset,new f0e(r)}),this.ligCaretListOffset=r.Offset16,we(this,"ligCaretList",()=>{if(this.ligCaretListOffset!==0)return r.currentPosition=this.tableStart+this.ligCaretListOffset,new p0e(r)}),this.markAttachClassDefOffset=r.Offset16,we(this,"markAttachClassDef",()=>{if(this.markAttachClassDefOffset!==0)return r.currentPosition=this.tableStart+this.markAttachClassDefOffset,new mU(r)}),this.minorVersion>=2&&(this.markGlyphSetsDefOffset=r.Offset16,we(this,"markGlyphSetsDef",()=>{if(this.markGlyphSetsDefOffset!==0)return r.currentPosition=this.tableStart+this.markGlyphSetsDefOffset,new v0e(r)})),this.minorVersion===3&&(this.itemVarStoreOffset=r.Offset32,we(this,"itemVarStore",()=>{if(this.itemVarStoreOffset!==0)return r.currentPosition=this.tableStart+this.itemVarStoreOffset,new u0e(r)}))}},f0e=class extends pr{constructor(e){super(e),this.coverageOffset=e.Offset16,this.glyphCount=e.uint16,this.attachPointOffsets=[...new Array(this.glyphCount)].map(t=>e.Offset16)}getPoint(e){return this.parser.currentPosition=this.start+this.attachPointOffsets[e],new m0e(this.parser)}},m0e=class{constructor(e){this.pointCount=e.uint16,this.pointIndices=[...new Array(this.pointCount)].map(t=>e.uint16)}},p0e=class extends pr{constructor(e){super(e),this.coverageOffset=e.Offset16,we(this,"coverage",()=>(e.currentPosition=this.start+this.coverageOffset,new Eb(e))),this.ligGlyphCount=e.uint16,this.ligGlyphOffsets=[...new Array(this.ligGlyphCount)].map(t=>e.Offset16)}getLigGlyph(e){return this.parser.currentPosition=this.start+this.ligGlyphOffsets[e],new h0e(this.parser)}},h0e=class extends pr{constructor(e){super(e),this.caretCount=e.uint16,this.caretValueOffsets=[...new Array(this.caretCount)].map(t=>e.Offset16)}getCaretValue(e){return this.parser.currentPosition=this.start+this.caretValueOffsets[e],new g0e(this.parser)}},g0e=class{constructor(e){this.caretValueFormat=e.uint16,this.caretValueFormat===1&&(this.coordinate=e.int16),this.caretValueFormat===2&&(this.caretValuePointIndex=e.uint16),this.caretValueFormat===3&&(this.coordinate=e.int16,this.deviceOffset=e.Offset16)}},v0e=class extends pr{constructor(e){super(e),this.markGlyphSetTableFormat=e.uint16,this.markGlyphSetCount=e.uint16,this.coverageOffsets=[...new Array(this.markGlyphSetCount)].map(t=>e.Offset32)}getMarkGlyphSet(e){return this.parser.currentPosition=this.start+this.coverageOffsets[e],new Eb(this.parser)}},y0e=Object.freeze({__proto__:null,GDEF:d0e}),pU=class extends pr{static EMPTY={scriptCount:0,scriptRecords:[]};constructor(e){super(e),this.scriptCount=e.uint16,this.scriptRecords=[...new Array(this.scriptCount)].map(t=>new b0e(e))}},b0e=class{constructor(e){this.scriptTag=e.tag,this.scriptOffset=e.Offset16}},S0e=class extends pr{constructor(e){super(e),this.defaultLangSys=e.Offset16,this.langSysCount=e.uint16,this.langSysRecords=[...new Array(this.langSysCount)].map(t=>new _0e(e))}},_0e=class{constructor(e){this.langSysTag=e.tag,this.langSysOffset=e.Offset16}},hU=class{constructor(e){this.lookupOrder=e.Offset16,this.requiredFeatureIndex=e.uint16,this.featureIndexCount=e.uint16,this.featureIndices=[...new Array(this.featureIndexCount)].map(t=>e.uint16)}},gU=class extends pr{static EMPTY={featureCount:0,featureRecords:[]};constructor(e){super(e),this.featureCount=e.uint16,this.featureRecords=[...new Array(this.featureCount)].map(t=>new w0e(e))}},w0e=class{constructor(e){this.featureTag=e.tag,this.featureOffset=e.Offset16}},x0e=class extends pr{constructor(e){super(e),this.featureParams=e.Offset16,this.lookupIndexCount=e.uint16,this.lookupListIndices=[...new Array(this.lookupIndexCount)].map(t=>e.uint16)}getFeatureParams(){if(this.featureParams>0){let e=this.parser;e.currentPosition=this.start+this.featureParams;let t=this.featureTag;if(t==="size")return new T0e(e);if(t.startsWith("cc"))return new C0e(e);if(t.startsWith("ss"))return new P0e(e)}}},C0e=class{constructor(e){this.format=e.uint16,this.featUiLabelNameId=e.uint16,this.featUiTooltipTextNameId=e.uint16,this.sampleTextNameId=e.uint16,this.numNamedParameters=e.uint16,this.firstParamUiLabelNameId=e.uint16,this.charCount=e.uint16,this.character=[...new Array(this.charCount)].map(t=>e.uint24)}},T0e=class{constructor(e){this.designSize=e.uint16,this.subfamilyIdentifier=e.uint16,this.subfamilyNameID=e.uint16,this.smallEnd=e.uint16,this.largeEnd=e.uint16}},P0e=class{constructor(e){this.version=e.uint16,this.UINameID=e.uint16}};function _U(e){e.parser.currentPosition-=2,delete e.coverageOffset,delete e.getCoverageTable}var Vf=class extends pr{constructor(e){super(e),this.substFormat=e.uint16,this.coverageOffset=e.Offset16}getCoverageTable(){let e=this.parser;return e.currentPosition=this.start+this.coverageOffset,new Eb(e)}},M6=class{constructor(e){this.glyphSequenceIndex=e.uint16,this.lookupListIndex=e.uint16}},k0e=class extends Vf{constructor(e){super(e),this.deltaGlyphID=e.int16}},E0e=class extends Vf{constructor(e){super(e),this.sequenceCount=e.uint16,this.sequenceOffsets=[...new Array(this.sequenceCount)].map(t=>e.Offset16)}getSequence(e){let t=this.parser;return t.currentPosition=this.start+this.sequenceOffsets[e],new R0e(t)}},R0e=class{constructor(e){this.glyphCount=e.uint16,this.substituteGlyphIDs=[...new Array(this.glyphCount)].map(t=>e.uint16)}},A0e=class extends Vf{constructor(e){super(e),this.alternateSetCount=e.uint16,this.alternateSetOffsets=[...new Array(this.alternateSetCount)].map(t=>e.Offset16)}getAlternateSet(e){let t=this.parser;return t.currentPosition=this.start+this.alternateSetOffsets[e],new O0e(t)}},O0e=class{constructor(e){this.glyphCount=e.uint16,this.alternateGlyphIDs=[...new Array(this.glyphCount)].map(t=>e.uint16)}},I0e=class extends Vf{constructor(e){super(e),this.ligatureSetCount=e.uint16,this.ligatureSetOffsets=[...new Array(this.ligatureSetCount)].map(t=>e.Offset16)}getLigatureSet(e){let t=this.parser;return t.currentPosition=this.start+this.ligatureSetOffsets[e],new N0e(t)}},N0e=class extends pr{constructor(e){super(e),this.ligatureCount=e.uint16,this.ligatureOffsets=[...new Array(this.ligatureCount)].map(t=>e.Offset16)}getLigature(e){let t=this.parser;return t.currentPosition=this.start+this.ligatureOffsets[e],new F0e(t)}},F0e=class{constructor(e){this.ligatureGlyph=e.uint16,this.componentCount=e.uint16,this.componentGlyphIDs=[...new Array(this.componentCount-1)].map(t=>e.uint16)}},D0e=class extends Vf{constructor(e){super(e),this.substFormat===1&&(this.subRuleSetCount=e.uint16,this.subRuleSetOffsets=[...new Array(this.subRuleSetCount)].map(t=>e.Offset16)),this.substFormat===2&&(this.classDefOffset=e.Offset16,this.subClassSetCount=e.uint16,this.subClassSetOffsets=[...new Array(this.subClassSetCount)].map(t=>e.Offset16)),this.substFormat===3&&(_U(this),this.glyphCount=e.uint16,this.substitutionCount=e.uint16,this.coverageOffsets=[...new Array(this.glyphCount)].map(t=>e.Offset16),this.substLookupRecords=[...new Array(this.substitutionCount)].map(t=>new M6(e)))}getSubRuleSet(e){if(this.substFormat!==1)throw new Error(`lookup type 5.${this.substFormat} has no subrule sets.`);let t=this.parser;return t.currentPosition=this.start+this.subRuleSetOffsets[e],new B0e(t)}getSubClassSet(e){if(this.substFormat!==2)throw new Error(`lookup type 5.${this.substFormat} has no subclass sets.`);let t=this.parser;return t.currentPosition=this.start+this.subClassSetOffsets[e],new M0e(t)}getCoverageTable(e){if(this.substFormat!==3&&!e)return super.getCoverageTable();if(!e)throw new Error(`lookup type 5.${this.substFormat} requires an coverage table index.`);let t=this.parser;return t.currentPosition=this.start+this.coverageOffsets[e],new Eb(t)}},B0e=class extends pr{constructor(e){super(e),this.subRuleCount=e.uint16,this.subRuleOffsets=[...new Array(this.subRuleCount)].map(t=>e.Offset16)}getSubRule(e){let t=this.parser;return t.currentPosition=this.start+this.subRuleOffsets[e],new wU(t)}},wU=class{constructor(e){this.glyphCount=e.uint16,this.substitutionCount=e.uint16,this.inputSequence=[...new Array(this.glyphCount-1)].map(t=>e.uint16),this.substLookupRecords=[...new Array(this.substitutionCount)].map(t=>new M6(e))}},M0e=class extends pr{constructor(e){super(e),this.subClassRuleCount=e.uint16,this.subClassRuleOffsets=[...new Array(this.subClassRuleCount)].map(t=>e.Offset16)}getSubClass(e){let t=this.parser;return t.currentPosition=this.start+this.subClassRuleOffsets[e],new L0e(t)}},L0e=class extends wU{constructor(e){super(e)}},V0e=class extends Vf{constructor(e){super(e),this.substFormat===1&&(this.chainSubRuleSetCount=e.uint16,this.chainSubRuleSetOffsets=[...new Array(this.chainSubRuleSetCount)].map(t=>e.Offset16)),this.substFormat===2&&(this.backtrackClassDefOffset=e.Offset16,this.inputClassDefOffset=e.Offset16,this.lookaheadClassDefOffset=e.Offset16,this.chainSubClassSetCount=e.uint16,this.chainSubClassSetOffsets=[...new Array(this.chainSubClassSetCount)].map(t=>e.Offset16)),this.substFormat===3&&(_U(this),this.backtrackGlyphCount=e.uint16,this.backtrackCoverageOffsets=[...new Array(this.backtrackGlyphCount)].map(t=>e.Offset16),this.inputGlyphCount=e.uint16,this.inputCoverageOffsets=[...new Array(this.inputGlyphCount)].map(t=>e.Offset16),this.lookaheadGlyphCount=e.uint16,this.lookaheadCoverageOffsets=[...new Array(this.lookaheadGlyphCount)].map(t=>e.Offset16),this.seqLookupCount=e.uint16,this.seqLookupRecords=[...new Array(this.substitutionCount)].map(t=>new xU(e)))}getChainSubRuleSet(e){if(this.substFormat!==1)throw new Error(`lookup type 6.${this.substFormat} has no chainsubrule sets.`);let t=this.parser;return t.currentPosition=this.start+this.chainSubRuleSetOffsets[e],new j0e(t)}getChainSubClassSet(e){if(this.substFormat!==2)throw new Error(`lookup type 6.${this.substFormat} has no chainsubclass sets.`);let t=this.parser;return t.currentPosition=this.start+this.chainSubClassSetOffsets[e],new U0e(t)}getCoverageFromOffset(e){if(this.substFormat!==3)throw new Error(`lookup type 6.${this.substFormat} does not use contextual coverage offsets.`);let t=this.parser;return t.currentPosition=this.start+e,new Eb(t)}},j0e=class extends pr{constructor(e){super(e),this.chainSubRuleCount=e.uint16,this.chainSubRuleOffsets=[...new Array(this.chainSubRuleCount)].map(t=>e.Offset16)}getSubRule(e){let t=this.parser;return t.currentPosition=this.start+this.chainSubRuleOffsets[e],new z0e(t)}},z0e=class{constructor(e){this.backtrackGlyphCount=e.uint16,this.backtrackSequence=[...new Array(this.backtrackGlyphCount)].map(t=>e.uint16),this.inputGlyphCount=e.uint16,this.inputSequence=[...new Array(this.inputGlyphCount-1)].map(t=>e.uint16),this.lookaheadGlyphCount=e.uint16,this.lookAheadSequence=[...new Array(this.lookAheadGlyphCount)].map(t=>e.uint16),this.substitutionCount=e.uint16,this.substLookupRecords=[...new Array(this.SubstCount)].map(t=>new M6(e))}},U0e=class extends pr{constructor(e){super(e),this.chainSubClassRuleCount=e.uint16,this.chainSubClassRuleOffsets=[...new Array(this.chainSubClassRuleCount)].map(t=>e.Offset16)}getSubClass(e){let t=this.parser;return t.currentPosition=this.start+this.chainSubRuleOffsets[e],new H0e(t)}},H0e=class{constructor(e){this.backtrackGlyphCount=e.uint16,this.backtrackSequence=[...new Array(this.backtrackGlyphCount)].map(t=>e.uint16),this.inputGlyphCount=e.uint16,this.inputSequence=[...new Array(this.inputGlyphCount-1)].map(t=>e.uint16),this.lookaheadGlyphCount=e.uint16,this.lookAheadSequence=[...new Array(this.lookAheadGlyphCount)].map(t=>e.uint16),this.substitutionCount=e.uint16,this.substLookupRecords=[...new Array(this.substitutionCount)].map(t=>new xU(e))}},xU=class extends pr{constructor(e){super(e),this.sequenceIndex=e.uint16,this.lookupListIndex=e.uint16}},G0e=class extends pr{constructor(e){super(e),this.substFormat=e.uint16,this.extensionLookupType=e.uint16,this.extensionOffset=e.Offset32}},W0e=class extends Vf{constructor(e){super(e),this.backtrackGlyphCount=e.uint16,this.backtrackCoverageOffsets=[...new Array(this.backtrackGlyphCount)].map(t=>e.Offset16),this.lookaheadGlyphCount=e.uint16,this.lookaheadCoverageOffsets=[new Array(this.lookaheadGlyphCount)].map(t=>e.Offset16),this.glyphCount=e.uint16,this.substituteGlyphIDs=[...new Array(this.glyphCount)].map(t=>e.uint16)}},Y0e={buildSubtable:function(e,t){let r=new[void 0,k0e,E0e,A0e,I0e,D0e,V0e,G0e,W0e][e](t);return r.type=e,r}},ec=class extends pr{constructor(e){super(e)}},q0e=class extends ec{constructor(e){super(e),console.log("lookup type 1")}},Z0e=class extends ec{constructor(e){super(e),console.log("lookup type 2")}},K0e=class extends ec{constructor(e){super(e),console.log("lookup type 3")}},X0e=class extends ec{constructor(e){super(e),console.log("lookup type 4")}},Q0e=class extends ec{constructor(e){super(e),console.log("lookup type 5")}},J0e=class extends ec{constructor(e){super(e),console.log("lookup type 6")}},$0e=class extends ec{constructor(e){super(e),console.log("lookup type 7")}},e1e=class extends ec{constructor(e){super(e),console.log("lookup type 8")}},t1e=class extends ec{constructor(e){super(e),console.log("lookup type 9")}},r1e={buildSubtable:function(e,t){let r=new[void 0,q0e,Z0e,K0e,X0e,Q0e,J0e,$0e,e1e,t1e][e](t);return r.type=e,r}},vU=class extends pr{static EMPTY={lookupCount:0,lookups:[]};constructor(e){super(e),this.lookupCount=e.uint16,this.lookups=[...new Array(this.lookupCount)].map(t=>e.Offset16)}},o1e=class extends pr{constructor(e,t){super(e),this.ctType=t,this.lookupType=e.uint16,this.lookupFlag=e.uint16,this.subTableCount=e.uint16,this.subtableOffsets=[...new Array(this.subTableCount)].map(r=>e.Offset16),this.markFilteringSet=e.uint16}get rightToLeft(){return this.lookupFlag&!0}get ignoreBaseGlyphs(){return this.lookupFlag&!0}get ignoreLigatures(){return this.lookupFlag&!0}get ignoreMarks(){return this.lookupFlag&!0}get useMarkFilteringSet(){return this.lookupFlag&!0}get markAttachmentType(){return this.lookupFlag&!0}getSubTable(e){let t=this.ctType==="GSUB"?Y0e:r1e;return this.parser.currentPosition=this.start+this.subtableOffsets[e],t.buildSubtable(this.lookupType,this.parser)}},CU=class extends qe{constructor(e,t,r){let{p:o,tableStart:n}=super(e,t,r);this.majorVersion=o.uint16,this.minorVersion=o.uint16,this.scriptListOffset=o.Offset16,this.featureListOffset=o.Offset16,this.lookupListOffset=o.Offset16,this.majorVersion===1&&this.minorVersion===1&&(this.featureVariationsOffset=o.Offset32);let i=!(this.scriptListOffset||this.featureListOffset||this.lookupListOffset);we(this,"scriptList",()=>i?pU.EMPTY:(o.currentPosition=n+this.scriptListOffset,new pU(o))),we(this,"featureList",()=>i?gU.EMPTY:(o.currentPosition=n+this.featureListOffset,new gU(o))),we(this,"lookupList",()=>i?vU.EMPTY:(o.currentPosition=n+this.lookupListOffset,new vU(o))),this.featureVariationsOffset&&we(this,"featureVariations",()=>i?FeatureVariations.EMPTY:(o.currentPosition=n+this.featureVariationsOffset,new FeatureVariations(o)))}getSupportedScripts(){return this.scriptList.scriptRecords.map(e=>e.scriptTag)}getScriptTable(e){let t=this.scriptList.scriptRecords.find(o=>o.scriptTag===e);this.parser.currentPosition=this.scriptList.start+t.scriptOffset;let r=new S0e(this.parser);return r.scriptTag=e,r}ensureScriptTable(e){return typeof e=="string"?this.getScriptTable(e):e}getSupportedLangSys(e){e=this.ensureScriptTable(e);let t=e.defaultLangSys!==0,r=e.langSysRecords.map(o=>o.langSysTag);return t&&r.unshift("dflt"),r}getDefaultLangSysTable(e){e=this.ensureScriptTable(e);let t=e.defaultLangSys;if(t!==0){this.parser.currentPosition=e.start+t;let r=new hU(this.parser);return r.langSysTag="",r.defaultForScript=e.scriptTag,r}}getLangSysTable(e,t="dflt"){if(t==="dflt")return this.getDefaultLangSysTable(e);e=this.ensureScriptTable(e);let r=e.langSysRecords.find(n=>n.langSysTag===t);this.parser.currentPosition=e.start+r.langSysOffset;let o=new hU(this.parser);return o.langSysTag=t,o}getFeatures(e){return e.featureIndices.map(t=>this.getFeature(t))}getFeature(e){let t;if(parseInt(e)==e?t=this.featureList.featureRecords[e]:t=this.featureList.featureRecords.find(o=>o.featureTag===e),!t)return;this.parser.currentPosition=this.featureList.start+t.featureOffset;let r=new x0e(this.parser);return r.featureTag=t.featureTag,r}getLookups(e){return e.lookupListIndices.map(t=>this.getLookup(t))}getLookup(e,t){let r=this.lookupList.lookups[e];return this.parser.currentPosition=this.lookupList.start+r,new o1e(this.parser,t)}},n1e=class extends CU{constructor(e,t){super(e,t,"GSUB")}getLookup(e){return super.getLookup(e,"GSUB")}},i1e=Object.freeze({__proto__:null,GSUB:n1e}),s1e=class extends CU{constructor(e,t){super(e,t,"GPOS")}getLookup(e){return super.getLookup(e,"GPOS")}},a1e=Object.freeze({__proto__:null,GPOS:s1e}),l1e=class extends qe{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.offsetToSVGDocumentList=r.Offset32,r.currentPosition=this.tableStart+this.offsetToSVGDocumentList,this.documentList=new c1e(r)}},c1e=class extends pr{constructor(e){super(e),this.numEntries=e.uint16,this.documentRecords=[...new Array(this.numEntries)].map(t=>new u1e(e))}getDocument(e){let t=this.documentRecords[e];if(!t)return"";let r=this.start+t.svgDocOffset;return this.parser.currentPosition=r,this.parser.readBytes(t.svgDocLength)}getDocumentForGlyph(e){let t=this.documentRecords.findIndex(r=>r.startGlyphID<=e&&e<=r.endGlyphID);return t===-1?"":this.getDocument(t)}},u1e=class{constructor(e){this.startGlyphID=e.uint16,this.endGlyphID=e.uint16,this.svgDocOffset=e.Offset32,this.svgDocLength=e.uint32}},d1e=Object.freeze({__proto__:null,SVG:l1e}),f1e=class extends qe{constructor(e,t){let{p:r}=super(e,t);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.axesArrayOffset=r.Offset16,r.uint16,this.axisCount=r.uint16,this.axisSize=r.uint16,this.instanceCount=r.uint16,this.instanceSize=r.uint16;let o=this.tableStart+this.axesArrayOffset;we(this,"axes",()=>(r.currentPosition=o,[...new Array(this.axisCount)].map(i=>new m1e(r))));let n=o+this.axisCount*this.axisSize;we(this,"instances",()=>{let i=[];for(let a=0;ae.tag)}getAxis(e){return this.axes.find(t=>t.tag===e)}},m1e=class{constructor(e){this.tag=e.tag,this.minValue=e.fixed,this.defaultValue=e.fixed,this.maxValue=e.fixed,this.flags=e.flags(16),this.axisNameID=e.uint16}},p1e=class{constructor(e,t,r){let o=e.currentPosition;this.subfamilyNameID=e.uint16,e.uint16,this.coordinates=[...new Array(t)].map(n=>e.fixed),e.currentPosition-o[...new Array(o)].map(n=>r.fword))}},v1e=Object.freeze({__proto__:null,cvt:g1e}),y1e=class extends qe{constructor(e,t){let{p:r}=super(e,t);we(this,"instructions",()=>[...new Array(e.length)].map(o=>r.uint8))}},b1e=Object.freeze({__proto__:null,fpgm:y1e}),S1e=class extends qe{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.numRanges=r.uint16,we(this,"gaspRanges",()=>[...new Array(this.numRanges)].map(n=>new _1e(r)))}},_1e=class{constructor(e){this.rangeMaxPPEM=e.uint16,this.rangeGaspBehavior=e.uint16}},w1e=Object.freeze({__proto__:null,gasp:S1e}),x1e=class extends qe{constructor(e,t){super(e,t)}getGlyphData(e,t){return this.parser.currentPosition=this.tableStart+e,this.parser.readBytes(t)}},C1e=Object.freeze({__proto__:null,glyf:x1e}),T1e=class extends qe{constructor(e,t,r){let{p:o}=super(e,t),n=r.maxp.numGlyphs+1;r.head.indexToLocFormat===0?(this.x2=!0,we(this,"offsets",()=>[...new Array(n)].map(i=>o.Offset16))):we(this,"offsets",()=>[...new Array(n)].map(i=>o.Offset32))}getGlyphDataOffsetAndLength(e){let t=this.offsets[e]*this.x2?2:1,r=this.offsets[e+1]*this.x2?2:1;return{offset:t,length:r-t}}},P1e=Object.freeze({__proto__:null,loca:T1e}),k1e=class extends qe{constructor(e,t){let{p:r}=super(e,t);we(this,"instructions",()=>[...new Array(e.length)].map(o=>r.uint8))}},E1e=Object.freeze({__proto__:null,prep:k1e}),R1e=class extends qe{constructor(e,t){let{p:r}=super(e,t);we(this,"data",()=>r.readBytes())}},A1e=Object.freeze({__proto__:null,CFF:R1e}),O1e=class extends qe{constructor(e,t){let{p:r}=super(e,t);we(this,"data",()=>r.readBytes())}},I1e=Object.freeze({__proto__:null,CFF2:O1e}),N1e=class extends qe{constructor(e,t){let{p:r}=super(e,t);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.defaultVertOriginY=r.int16,this.numVertOriginYMetrics=r.uint16,we(this,"vertORiginYMetrics",()=>[...new Array(this.numVertOriginYMetrics)].map(o=>new F1e(r)))}},F1e=class{constructor(e){this.glyphIndex=e.uint16,this.vertOriginY=e.int16}},D1e=Object.freeze({__proto__:null,VORG:N1e}),B1e=class{constructor(e){this.indexSubTableArrayOffset=e.Offset32,this.indexTablesSize=e.uint32,this.numberofIndexSubTables=e.uint32,this.colorRef=e.uint32,this.hori=new xx(e),this.vert=new xx(e),this.startGlyphIndex=e.uint16,this.endGlyphIndex=e.uint16,this.ppemX=e.uint8,this.ppemY=e.uint8,this.bitDepth=e.uint8,this.flags=e.int8}},M1e=class{constructor(e){this.hori=new xx(e),this.vert=new xx(e),this.ppemX=e.uint8,this.ppemY=e.uint8,this.substitutePpemX=e.uint8,this.substitutePpemY=e.uint8}},xx=class{constructor(e){this.ascender=e.int8,this.descender=e.int8,this.widthMax=e.uint8,this.caretSlopeNumerator=e.int8,this.caretSlopeDenominator=e.int8,this.caretOffset=e.int8,this.minOriginSB=e.int8,this.minAdvanceSB=e.int8,this.maxBeforeBL=e.int8,this.minAfterBL=e.int8,this.pad1=e.int8,this.pad2=e.int8}},TU=class extends qe{constructor(e,t,r){let{p:o}=super(e,t,r);this.majorVersion=o.uint16,this.minorVersion=o.uint16,this.numSizes=o.uint32,we(this,"bitMapSizes",()=>[...new Array(this.numSizes)].map(n=>new B1e(o)))}},L1e=Object.freeze({__proto__:null,EBLC:TU}),PU=class extends qe{constructor(e,t,r){let{p:o}=super(e,t,r);this.majorVersion=o.uint16,this.minorVersion=o.uint16}},V1e=Object.freeze({__proto__:null,EBDT:PU}),j1e=class extends qe{constructor(e,t){let{p:r}=super(e,t);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.numSizes=r.uint32,we(this,"bitmapScales",()=>[...new Array(this.numSizes)].map(o=>new M1e(r)))}},z1e=Object.freeze({__proto__:null,EBSC:j1e}),U1e=class extends TU{constructor(e,t){super(e,t,"CBLC")}},H1e=Object.freeze({__proto__:null,CBLC:U1e}),G1e=class extends PU{constructor(e,t){super(e,t,"CBDT")}},W1e=Object.freeze({__proto__:null,CBDT:G1e}),Y1e=class extends qe{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.flags=r.flags(16),this.numStrikes=r.uint32,we(this,"strikeOffsets",()=>[...new Array(this.numStrikes)].map(o=>r.Offset32))}},q1e=Object.freeze({__proto__:null,sbix:Y1e}),Z1e=class extends qe{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.numBaseGlyphRecords=r.uint16,this.baseGlyphRecordsOffset=r.Offset32,this.layerRecordsOffset=r.Offset32,this.numLayerRecords=r.uint16}getBaseGlyphRecord(e){let t=this.tableStart+this.baseGlyphRecordsOffset;this.parser.currentPosition=t;let r=new B6(this.parser),o=r.gID,n=this.tableStart+this.layerRecordsOffset-6;this.parser.currentPosition=n;let i=new B6(this.parser),a=i.gID;if(o===e)return r;if(a===e)return i;for(;t!==n;){let l=t+(n-t)/12;this.parser.currentPosition=l;let c=new B6(this.parser),u=c.gID;if(u===e)return c;u>e?n=l:unew K1e(p))}},B6=class{constructor(e){this.gID=e.uint16,this.firstLayerIndex=e.uint16,this.numLayers=e.uint16}},K1e=class{constructor(e){this.gID=e.uint16,this.paletteIndex=e.uint16}},X1e=Object.freeze({__proto__:null,COLR:Z1e}),Q1e=class extends qe{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.numPaletteEntries=r.uint16;let o=this.numPalettes=r.uint16;this.numColorRecords=r.uint16,this.offsetFirstColorRecord=r.Offset32,this.colorRecordIndices=[...new Array(this.numPalettes)].map(n=>r.uint16),we(this,"colorRecords",()=>(r.currentPosition=this.tableStart+this.offsetFirstColorRecord,[...new Array(this.numColorRecords)].map(n=>new J1e(r)))),this.version===1&&(this.offsetPaletteTypeArray=r.Offset32,this.offsetPaletteLabelArray=r.Offset32,this.offsetPaletteEntryLabelArray=r.Offset32,we(this,"paletteTypeArray",()=>(r.currentPosition=this.tableStart+this.offsetPaletteTypeArray,new $1e(r,o))),we(this,"paletteLabelArray",()=>(r.currentPosition=this.tableStart+this.offsetPaletteLabelArray,new eSe(r,o))),we(this,"paletteEntryLabelArray",()=>(r.currentPosition=this.tableStart+this.offsetPaletteEntryLabelArray,new tSe(r,o))))}},J1e=class{constructor(e){this.blue=e.uint8,this.green=e.uint8,this.red=e.uint8,this.alpha=e.uint8}},$1e=class{constructor(e,t){this.paletteTypes=[...new Array(t)].map(r=>e.uint32)}},eSe=class{constructor(e,t){this.paletteLabels=[...new Array(t)].map(r=>e.uint16)}},tSe=class{constructor(e,t){this.paletteEntryLabels=[...new Array(t)].map(r=>e.uint16)}},rSe=Object.freeze({__proto__:null,CPAL:Q1e}),oSe=class extends qe{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint32,this.numSignatures=r.uint16,this.flags=r.uint16,this.signatureRecords=[...new Array(this.numSignatures)].map(o=>new nSe(r))}getData(e){let t=this.signatureRecords[e];return this.parser.currentPosition=this.tableStart+t.offset,new iSe(this.parser)}},nSe=class{constructor(e){this.format=e.uint32,this.length=e.uint32,this.offset=e.Offset32}},iSe=class{constructor(e){e.uint16,e.uint16,this.signatureLength=e.uint32,this.signature=e.readBytes(this.signatureLength)}},sSe=Object.freeze({__proto__:null,DSIG:oSe}),aSe=class extends qe{constructor(e,t,r){let{p:o}=super(e,t),n=r.hmtx.numGlyphs;this.version=o.uint16,this.numRecords=o.int16,this.sizeDeviceRecord=o.int32,this.records=[...new Array(numRecords)].map(i=>new lSe(o,n))}},lSe=class{constructor(e,t){this.pixelSize=e.uint8,this.maxWidth=e.uint8,this.widths=e.readBytes(t)}},cSe=Object.freeze({__proto__:null,hdmx:aSe}),uSe=class extends qe{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.nTables=r.uint16,we(this,"tables",()=>{let o=this.tableStart+4,n=[];for(let i=0;i[...new Array(this.nPairs)].map(t=>new fSe(e)))),this.format===2&&console.warn("Kern subtable format 2 is not supported: this parser currently only parses universal table data.")}get horizontal(){return this.coverage[0]}get minimum(){return this.coverage[1]}get crossstream(){return this.coverage[2]}get override(){return this.coverage[3]}},fSe=class{constructor(e){this.left=e.uint16,this.right=e.uint16,this.value=e.fword}},mSe=Object.freeze({__proto__:null,kern:uSe}),pSe=class extends qe{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.numGlyphs=r.uint16,this.yPels=r.readBytes(this.numGlyphs)}},hSe=Object.freeze({__proto__:null,LTSH:pSe}),gSe=class extends qe{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.mergeClassCount=r.uint16,this.mergeDataOffset=r.Offset16,this.classDefCount=r.uint16,this.offsetToClassDefOffsets=r.Offset16,we(this,"mergeEntryMatrix",()=>[...new Array(this.mergeClassCount)].map(o=>r.readBytes(this.mergeClassCount))),console.warn("Full MERG parsing is currently not supported."),console.warn("If you need this table parsed, please file an issue, or better yet, a PR.")}},vSe=Object.freeze({__proto__:null,MERG:gSe}),ySe=class extends qe{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint32,this.flags=r.uint32,r.uint32,this.dataMapsCount=r.uint32,this.dataMaps=[...new Array(this.dataMapsCount)].map(o=>new bSe(this.tableStart,r))}},bSe=class{constructor(e,t){this.tableStart=e,this.parser=t,this.tag=t.tag,this.dataOffset=t.Offset32,this.dataLength=t.uint32}getData(){return this.parser.currentField=this.tableStart+this.dataOffset,this.parser.readBytes(this.dataLength)}},SSe=Object.freeze({__proto__:null,meta:ySe}),_Se=class extends qe{constructor(e,t){super(e,t),console.warn("This font uses a PCLT table, which is currently not supported by this parser."),console.warn("If you need this table parsed, please file an issue, or better yet, a PR.")}},wSe=Object.freeze({__proto__:null,PCLT:_Se}),xSe=class extends qe{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.numRecs=r.uint16,this.numRatios=r.uint16,this.ratRanges=[...new Array(this.numRatios)].map(o=>new CSe(r)),this.offsets=[...new Array(this.numRatios)].map(o=>r.Offset16),this.VDMXGroups=[...new Array(this.numRecs)].map(o=>new TSe(r))}},CSe=class{constructor(e){this.bCharSet=e.uint8,this.xRatio=e.uint8,this.yStartRatio=e.uint8,this.yEndRatio=e.uint8}},TSe=class{constructor(e){this.recs=e.uint16,this.startsz=e.uint8,this.endsz=e.uint8,this.records=[...new Array(this.recs)].map(t=>new PSe(e))}},PSe=class{constructor(e){this.yPelHeight=e.uint16,this.yMax=e.int16,this.yMin=e.int16}},kSe=Object.freeze({__proto__:null,VDMX:xSe}),ESe=class extends qe{constructor(e,t){let{p:r}=super(e,t);this.version=r.fixed,this.ascent=this.vertTypoAscender=r.int16,this.descent=this.vertTypoDescender=r.int16,this.lineGap=this.vertTypoLineGap=r.int16,this.advanceHeightMax=r.int16,this.minTopSideBearing=r.int16,this.minBottomSideBearing=r.int16,this.yMaxExtent=r.int16,this.caretSlopeRise=r.int16,this.caretSlopeRun=r.int16,this.caretOffset=r.int16,this.reserved=r.int16,this.reserved=r.int16,this.reserved=r.int16,this.reserved=r.int16,this.metricDataFormat=r.int16,this.numOfLongVerMetrics=r.uint16,r.verifyLength()}},RSe=Object.freeze({__proto__:null,vhea:ESe}),ASe=class extends qe{constructor(e,t,r){super(e,t);let o=r.vhea.numOfLongVerMetrics,n=r.maxp.numGlyphs,i=p.currentPosition;if(lazy(this,"vMetrics",()=>(p.currentPosition=i,[...new Array(o)].map(a=>new OSe(p.uint16,p.int16)))),o(p.currentPosition=a,[...new Array(n-o)].map(l=>p.int16)))}}},OSe=class{constructor(e,t){this.advanceHeight=e,this.topSideBearing=t}},ISe=Object.freeze({__proto__:null,vmtx:ASe});var kU=s(A(),1);var{kebabCase:NSe}=rt(kU.privateApis);function EU(e){let t=e.reduce((r,o)=>(r[o.fontFamily]||(r[o.fontFamily]={name:o.fontFamily,fontFamily:o.fontFamily,slug:NSe(o.fontFamily.toLowerCase()),fontFace:[]}),r[o.fontFamily].fontFace.push(o),r),{});return Object.values(t)}var ni=s(C(),1);function FSe(){let{installFonts:e}=(0,Rb.useContext)(Lo),[t,r]=(0,Rb.useState)(!1),[o,n]=(0,Rb.useState)(null),i=h=>{l(h)},a=h=>{l(h.target.files)},l=async h=>{if(!h)return;n(null),r(!0);let g=new Set,v=[...h],y=!1,b=v.map(async S=>{if(!await u(S))return y=!0,null;if(g.has(S.name))return null;let T=(((S.name??"").split(".")??[]).pop()??"").toLowerCase();return O6.includes(T)?(g.add(S.name),S):null}),_=(await Promise.all(b)).filter(S=>S!==null);if(_.length>0)c(_);else{let S=y?(0,ah.__)("Sorry, you are not allowed to upload this file type."):(0,ah.__)("No fonts found to install.");n({type:"error",message:S}),r(!1)}},c=async h=>{let g=await Promise.all(h.map(async v=>{let y=await f(v);return await Lu(y,y.file,"all"),y}));m(g)};async function u(h){let g=new Cx("Uploaded Font");try{let v=await d(h);return await g.fromDataBuffer(v,"font"),!0}catch{return!1}}async function d(h){return new Promise((g,v)=>{let y=new window.FileReader;y.readAsArrayBuffer(h),y.onload=()=>g(y.result),y.onerror=v})}let f=async h=>{let g=await d(h),v=new Cx("Uploaded Font");v.fromDataBuffer(g,h.name);let b=(await new Promise(z=>v.onload=z)).detail.font,{name:_}=b.opentype.tables,S=_.get(16)||_.get(1),x=_.get(2).toLowerCase().includes("italic"),T=b.opentype.tables["OS/2"].usWeightClass||"normal",F=!!b.opentype.tables.fvar&&b.opentype.tables.fvar.axes.find(({tag:z})=>z==="wght"),B=F?`${F.minValue} ${F.maxValue}`:null;return{file:h,fontFamily:S,fontStyle:x?"italic":"normal",fontWeight:B||T}},m=async h=>{let g=EU(h);try{await e(g),n({type:"success",message:(0,ah.__)("Fonts were installed successfully.")})}catch(v){let y=v;n({type:"error",message:y.message,errors:y?.installationErrors})}r(!1)};return(0,ni.jsxs)("div",{className:"font-library__tabpanel-layout",children:[(0,ni.jsx)(on.DropZone,{onFilesDrop:i}),(0,ni.jsxs)(on.__experimentalVStack,{className:"font-library__local-fonts",justify:"start",children:[o&&(0,ni.jsxs)(on.Notice,{status:o.type,__unstableHTML:!0,onRemove:()=>n(null),children:[o.message,o.errors&&(0,ni.jsx)("ul",{children:o.errors.map((h,g)=>(0,ni.jsx)("li",{children:h},g))})]}),t&&(0,ni.jsx)(on.FlexItem,{children:(0,ni.jsx)("div",{className:"font-library__upload-area",children:(0,ni.jsx)(on.ProgressBar,{})})}),!t&&(0,ni.jsx)(on.FormFileUpload,{accept:O6.map(h=>`.${h}`).join(","),multiple:!0,onChange:a,render:({openFileDialog:h})=>(0,ni.jsx)(on.Button,{__next40pxDefaultSize:!0,className:"font-library__upload-area",onClick:h,children:(0,ah.__)("Upload font")})}),(0,ni.jsx)(on.__experimentalText,{className:"font-library__upload-area__text",children:(0,ah.__)("Uploaded fonts appear in your library and can be used in your theme. Supported formats: .ttf, .otf, .woff, and .woff2.")})]})]})}var Tx=FSe;var Ks=s(C(),1),{Tabs:Px}=rt(kx.privateApis),DSe={id:"installed-fonts",title:(0,lh._x)("Library","Font library")},BSe={id:"upload-fonts",title:(0,lh._x)("Upload","noun")},MSe=e=>e.map(({slug:t,name:r})=>({id:t,title:e.length===1&&t==="google-fonts"?(0,lh.__)("Install Fonts"):r}));function LSe({onRequestClose:e,defaultTabId:t="installed-fonts"}){let{records:r=[]}=(0,Ex.useEntityRecords)("root","fontCollection",{_fields:"slug,name,description"}),o=(0,RU.useSelect)(i=>i(Ex.store).canUser("create",{kind:"postType",name:"wp_font_family"}),[]),n=[DSe];return o&&(n.push(BSe),n.push(...MSe(r||[]))),(0,Ks.jsx)(kx.Modal,{title:(0,lh.__)("Fonts"),onRequestClose:e,isFullScreen:!0,className:"font-library-modal",children:(0,Ks.jsxs)(Px,{defaultTabId:t,children:[(0,Ks.jsx)("div",{className:"font-library-modal__tablist-container",children:(0,Ks.jsx)(Px.TabList,{children:n.map(({id:i,title:a})=>(0,Ks.jsx)(Px.Tab,{tabId:i,children:a},i))})}),n.map(({id:i})=>{let a;switch(i){case"upload-fonts":a=(0,Ks.jsx)(Tx,{});break;case"installed-fonts":a=(0,Ks.jsx)(gx,{});break;default:a=(0,Ks.jsx)(yx,{slug:i})}return(0,Ks.jsx)(Px.TabPanel,{tabId:i,focusable:!1,className:"font-library-modal__tab-panel",children:a},i)})]})})}var AU=LSe;var Rx=s(E(),1),jf=s(A(),1),OU=s(D(),1);var ch=s(C(),1);function VSe({font:e}){let{handleSetLibraryFontSelected:t,setModalTabOpen:r}=(0,OU.useContext)(Lo),o=e?.fontFace?.length||1,n=()=>{t?.(e),r?.("installed-fonts")},i=Af(e);return(0,ch.jsx)(jf.__experimentalItem,{onClick:n,children:(0,ch.jsxs)(jf.__experimentalHStack,{justify:"space-between",children:[(0,ch.jsx)(jf.FlexItem,{style:i,children:e.name}),(0,ch.jsx)(jf.FlexItem,{className:"global-styles-ui-screen-typography__font-variants-count",children:(0,Rx.sprintf)((0,Rx._n)("%d variant","%d variants",o),o)})]})})}var IU=VSe;var qr=s(C(),1);function NU(e,t){return e?e.map(r=>Ql(r,{source:t})):[]}function jSe(){let{baseCustomFonts:e,modalTabOpen:t,setModalTabOpen:r}=(0,FU.useContext)(Lo),[o]=pe("typography.fontFamilies"),[n]=pe("typography.fontFamilies",void 0,"base"),i=NU(o?.theme,"theme"),a=NU(o?.custom,"custom"),l=[...i,...a].sort((d,f)=>d.name.localeCompare(f.name)),c=00||(e?.length??0)>0;return(0,qr.jsxs)(qr.Fragment,{children:[!!t&&(0,qr.jsx)(AU,{onRequestClose:()=>r?.(""),defaultTabId:t}),(0,qr.jsxs)(Xs.__experimentalVStack,{spacing:2,children:[(0,qr.jsxs)(Xs.__experimentalHStack,{justify:"space-between",children:[(0,qr.jsx)(Tr,{level:3,children:(0,zf.__)("Fonts")}),(0,qr.jsx)(Xs.Button,{onClick:()=>r?.("installed-fonts"),label:(0,zf.__)("Manage fonts"),icon:FA,size:"small"})]}),l.length>0&&(0,qr.jsx)(qr.Fragment,{children:(0,qr.jsx)(Xs.__experimentalItemGroup,{size:"large",isBordered:!0,isSeparated:!0,children:l.map(d=>(0,qr.jsx)(IU,{font:d},d.slug))})}),!c&&(0,qr.jsxs)(qr.Fragment,{children:[(0,qr.jsx)(Xs.__experimentalText,{as:"p",children:u?(0,zf.__)("No fonts activated."):(0,zf.__)("No fonts installed.")}),(0,qr.jsx)(Xs.Button,{className:"global-styles-ui-font-families__manage-fonts",variant:"secondary",__next40pxDefaultSize:!0,onClick:()=>{r?.(u?"installed-fonts":"upload-fonts")},children:u?(0,zf.__)("Manage fonts"):(0,zf.__)("Add fonts")})]})]})]})}function DU({...e}){return(0,qr.jsx)(dx,{children:(0,qr.jsx)(jSe,{...e})})}var Ab=s(E(),1),tc=s(A(),1);var za=s(C(),1);function zSe(){return(0,za.jsxs)(tc.__experimentalVStack,{spacing:2,children:[(0,za.jsx)(tc.__experimentalHStack,{justify:"space-between",children:(0,za.jsx)(Tr,{level:3,children:(0,Ab.__)("Font Sizes")})}),(0,za.jsx)(tc.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:(0,za.jsx)(fr,{path:"/typography/font-sizes",children:(0,za.jsxs)(tc.__experimentalHStack,{direction:"row",children:[(0,za.jsx)(tc.FlexItem,{children:(0,Ab.__)("Font size presets")}),(0,za.jsx)(No,{icon:(0,Ab.isRTL)()?Nt:Ft})]})})})]})}var BU=zSe;var fs=s(C(),1);function USe(){let{fontLibraryEnabled:e}=(0,LU.useContext)(Br);return(0,fs.jsxs)(fs.Fragment,{children:[(0,fs.jsx)(St,{title:(0,Ax.__)("Typography"),description:(0,Ax.__)("Available fonts, typographic styles, and the application of those styles.")}),(0,fs.jsx)(Bu,{children:(0,fs.jsxs)(MU.__experimentalVStack,{spacing:7,children:[(0,fs.jsx)(oh,{title:(0,Ax.__)("Typesets")}),e&&(0,fs.jsx)(DU,{}),(0,fs.jsx)(Pz,{}),(0,fs.jsx)(BU,{})]})})]})}var VU=USe;var Bt=s(E(),1),Ni=s(A(),1),YU=s(D(),1);var jU=s($(),1);var zU=s(C(),1),{useSettingsForBlockElement:HSe,TypographyPanel:GSe}=rt(jU.privateApis);function UU({element:e,headingLevel:t}){let r=[];e==="heading"?r=r.concat(["elements",t]):e&&e!=="text"&&(r=r.concat(["elements",e]));let o=r.join("."),[n]=Ee(o,"","user",!1),[i,a]=Ee(o,"","merged",!1),[l]=pe(""),u=HSe(l,void 0,e==="heading"?t:e);return(0,zU.jsx)(GSe,{inheritedValue:i,value:n,onChange:a,settings:u})}var HU=s(C(),1);function GU({name:e,element:t,headingLevel:r}){let o="";t==="heading"?o=`elements.${r}.`:t&&t!=="text"&&(o=`elements.${t}.`);let[n]=Ee(o+"typography.fontFamily",e),[i]=Ee(o+"color.gradient",e),[a]=Ee(o+"color.background",e),[l]=Ee("color.background"),[c]=Ee(o+"color.text",e),[u]=Ee(o+"typography.fontSize",e),[d]=Ee(o+"typography.fontStyle",e),[f]=Ee(o+"typography.fontWeight",e),[m]=Ee(o+"typography.letterSpacing",e);return(0,HU.jsx)("div",{className:"global-styles-ui-typography-preview",style:{fontFamily:n??"serif",background:i??a??l,color:c,fontSize:u,fontStyle:d,fontWeight:f,letterSpacing:m,...t==="link"?{textDecoration:"underline"}:{}},children:"Aa"})}var So=s(C(),1),WU={text:{description:(0,Bt.__)("Manage the fonts used on the site."),title:(0,Bt.__)("Text")},link:{description:(0,Bt.__)("Manage the fonts and typography used on the links."),title:(0,Bt.__)("Links")},heading:{description:(0,Bt.__)("Manage the fonts and typography used on headings."),title:(0,Bt.__)("Headings")},caption:{description:(0,Bt.__)("Manage the fonts and typography used on captions."),title:(0,Bt.__)("Captions")},button:{description:(0,Bt.__)("Manage the fonts and typography used on buttons."),title:(0,Bt.__)("Buttons")}};function WSe({element:e}){let[t,r]=(0,YU.useState)("heading");return(0,So.jsxs)(So.Fragment,{children:[(0,So.jsx)(St,{title:WU[e].title,description:WU[e].description}),(0,So.jsx)(Ni.__experimentalSpacer,{marginX:4,children:(0,So.jsx)(GU,{element:e,headingLevel:t})}),e==="heading"&&(0,So.jsx)(Ni.__experimentalSpacer,{marginX:4,marginBottom:"1em",children:(0,So.jsxs)(Ni.__experimentalToggleGroupControl,{label:(0,Bt.__)("Select heading level"),hideLabelFromVision:!0,value:t,onChange:o=>r(o),isBlock:!0,size:"__unstable-large",children:[(0,So.jsx)(Ni.__experimentalToggleGroupControlOption,{value:"heading",showTooltip:!0,"aria-label":(0,Bt.__)("All headings"),label:(0,Bt._x)("All","heading levels")}),(0,So.jsx)(Ni.__experimentalToggleGroupControlOption,{value:"h1",showTooltip:!0,"aria-label":(0,Bt.__)("Heading 1"),label:(0,Bt.__)("H1")}),(0,So.jsx)(Ni.__experimentalToggleGroupControlOption,{value:"h2",showTooltip:!0,"aria-label":(0,Bt.__)("Heading 2"),label:(0,Bt.__)("H2")}),(0,So.jsx)(Ni.__experimentalToggleGroupControlOption,{value:"h3",showTooltip:!0,"aria-label":(0,Bt.__)("Heading 3"),label:(0,Bt.__)("H3")}),(0,So.jsx)(Ni.__experimentalToggleGroupControlOption,{value:"h4",showTooltip:!0,"aria-label":(0,Bt.__)("Heading 4"),label:(0,Bt.__)("H4")}),(0,So.jsx)(Ni.__experimentalToggleGroupControlOption,{value:"h5",showTooltip:!0,"aria-label":(0,Bt.__)("Heading 5"),label:(0,Bt.__)("H5")}),(0,So.jsx)(Ni.__experimentalToggleGroupControlOption,{value:"h6",showTooltip:!0,"aria-label":(0,Bt.__)("Heading 6"),label:(0,Bt.__)("H6")})]})}),(0,So.jsx)(UU,{element:e,headingLevel:t})]})}var uh=WSe;var L6=s(E(),1),JU=s(A(),1),$U=s($(),1);var Fi=s(A(),1),dh=s(E(),1);var XU=s(D(),1);var qU=s(A(),1),ZU=s(C(),1);function YSe({className:e,children:t,...r}){return(0,ZU.jsx)(qU.Flex,{className:re("global-styles-ui__color-indicator-wrapper",e),...r,children:t})}var KU=YSe;var nn=s(C(),1),Ox=[];function qSe({name:e}){let[t]=pe("color.palette.custom"),[r]=pe("color.palette.theme"),[o]=pe("color.palette.default"),[n]=pe("color.defaultPalette",e),i=t||Ox,a=r||Ox,l=o||Ox,c=n??!0,u=(0,XU.useMemo)(()=>[...i,...a,...l&&c?l:Ox],[i,a,l,c]),d=e?"/blocks/"+encodeURIComponent(e)+"/colors/palette":"/colors/palette";return(0,nn.jsxs)(Fi.__experimentalVStack,{spacing:3,children:[(0,nn.jsx)(Tr,{level:3,children:(0,dh.__)("Palette")}),(0,nn.jsx)(Fi.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:(0,nn.jsx)(fr,{path:d,children:(0,nn.jsxs)(Fi.__experimentalHStack,{direction:"row",children:[u.length>0?(0,nn.jsxs)(nn.Fragment,{children:[(0,nn.jsx)(Fi.__experimentalZStack,{isLayered:!1,offset:-8,children:u.slice(0,5).map(({color:f},m)=>(0,nn.jsx)(KU,{children:(0,nn.jsx)(Fi.ColorIndicator,{colorValue:f})},`${f}-${m}`))}),(0,nn.jsx)(Fi.FlexItem,{isBlock:!0,children:(0,dh.__)("Edit palette")})]}):(0,nn.jsx)(Fi.FlexItem,{children:(0,dh.__)("Add colors")}),(0,nn.jsx)(No,{icon:(0,dh.isRTL)()?Nt:Ft})]})})})]})}var QU=qSe;var Ua=s(C(),1),{useSettingsForBlockElement:ZSe,ColorPanel:KSe}=rt($U.privateApis);function XSe(){let[e,t]=Ee("",void 0,"user",!1),[r]=Ee("",void 0,"merged",!1),[o]=pe(""),n=ZSe(o);return(0,Ua.jsxs)(Ua.Fragment,{children:[(0,Ua.jsx)(St,{title:(0,L6.__)("Colors"),description:(0,L6.__)("Palette colors and the application of those colors on site elements.")}),(0,Ua.jsx)(Bu,{children:(0,Ua.jsx)(JU.__experimentalVStack,{spacing:7,children:(0,Ua.jsx)(QU,{})})}),(0,Ua.jsx)(KSe,{inheritedValue:r,value:e,onChange:t,settings:n})]})}var eH=XSe;var Nb=s(E(),1),cH=s(A(),1);var iH=s(he(),1),oc=s(A(),1),mh=s(E(),1);var Nx=s(A(),1);var Ix=s(A(),1);var tH=s(C(),1);function rH(){let{paletteColors:e}=Qp();return e.slice(0,4).map(({slug:t,color:r},o)=>(0,tH.jsx)("div",{style:{flexGrow:1,height:"100%",background:r}},`${t}-${o}`))}var Ob=s(C(),1),QSe={start:{scale:1,opacity:1},hover:{scale:0,opacity:0}},JSe=({label:e,isFocused:t,withHoverView:r})=>(0,Ob.jsx)($p,{label:e,isFocused:t,withHoverView:r,children:({key:o})=>(0,Ob.jsx)(Ix.__unstableMotion.div,{variants:QSe,style:{height:"100%",overflow:"hidden"},children:(0,Ob.jsx)(Ix.__experimentalHStack,{spacing:0,justify:"center",style:{height:"100%",overflow:"hidden"},children:(0,Ob.jsx)(rH,{})})},o)}),oH=JSe;var Uf=s(C(),1),nH=["color"];function fh({title:e,gap:t=2}){let r=$w(nH);return r?.length<=1?null:(0,Uf.jsxs)(Nx.__experimentalVStack,{spacing:3,children:[e&&(0,Uf.jsx)(Tr,{level:3,children:e}),(0,Uf.jsx)(Nx.__experimentalGrid,{gap:t,children:r.map((o,n)=>(0,Uf.jsx)(rh,{variation:o,isPill:!0,properties:nH,showTooltip:!0,children:()=>(0,Uf.jsx)(oH,{})},n))})]})}var rc=s(C(),1),$Se={placement:"bottom-start",offset:8};function sH({name:e}){let[t,r]=pe("color.palette.theme",e),[o]=pe("color.palette.theme",e,"base"),[n,i]=pe("color.palette.default",e),[a]=pe("color.palette.default",e,"base"),[l,c]=pe("color.palette.custom",e),[u]=pe("color.defaultPalette",e),f=(0,iH.useViewportMatch)("small","<")?$Se:void 0,[m]=Hj(e);return(0,rc.jsxs)(oc.__experimentalVStack,{className:"global-styles-ui-color-palette-panel",spacing:8,children:[(0,rc.jsxs)(oc.__experimentalVStack,{spacing:4,children:[!!t&&!!t.length&&(0,rc.jsx)(oc.__experimentalPaletteEdit,{canReset:t!==o,canOnlyChangeValues:!0,colors:t,onChange:r,paletteLabel:(0,mh.__)("Theme"),paletteLabelHeadingLevel:3,popoverProps:f}),window.__experimentalEnableColorRandomizer&&t?.length>0&&m&&(0,rc.jsx)(oc.Button,{__next40pxDefaultSize:!0,variant:"secondary",icon:MA,onClick:m,children:(0,mh.__)("Randomize colors")})]}),!!n&&!!n.length&&!!u&&(0,rc.jsx)(oc.__experimentalPaletteEdit,{canReset:n!==a,canOnlyChangeValues:!0,colors:n,onChange:i,paletteLabel:(0,mh.__)("Default"),paletteLabelHeadingLevel:3,popoverProps:f}),(0,rc.jsx)(oc.__experimentalPaletteEdit,{colors:l,onChange:c,paletteLabel:(0,mh.__)("Custom"),paletteLabelHeadingLevel:3,slugPrefix:"custom-",popoverProps:f}),(0,rc.jsx)(fh,{title:(0,mh.__)("Palettes")})]})}var aH=s(he(),1),Ga=s(A(),1),Ib=s(E(),1);var Ha=s(C(),1),e_e={placement:"bottom-start",offset:8},t_e=()=>{};function lH({name:e}){let[t,r]=pe("color.gradients.theme",e),[o]=pe("color.gradients.theme",e,"base"),[n,i]=pe("color.gradients.default",e),[a]=pe("color.gradients.default",e,"base"),[l,c]=pe("color.gradients.custom",e),[u]=pe("color.defaultGradients",e),[d]=pe("color.duotone.custom")||[],[f]=pe("color.duotone.default")||[],[m]=pe("color.duotone.theme")||[],[h]=pe("color.defaultDuotone"),g=[...d||[],...m||[],...f&&h?f:[]],y=(0,aH.useViewportMatch)("small","<")?e_e:void 0;return(0,Ha.jsxs)(Ga.__experimentalVStack,{className:"global-styles-ui-gradient-palette-panel",spacing:8,children:[!!t&&!!t.length&&(0,Ha.jsx)(Ga.__experimentalPaletteEdit,{canReset:t!==o,canOnlyChangeValues:!0,gradients:t,onChange:r,paletteLabel:(0,Ib.__)("Theme"),paletteLabelHeadingLevel:3,popoverProps:y}),!!n&&!!n.length&&!!u&&(0,Ha.jsx)(Ga.__experimentalPaletteEdit,{canReset:n!==a,canOnlyChangeValues:!0,gradients:n,onChange:i,paletteLabel:(0,Ib.__)("Default"),paletteLabelHeadingLevel:3,popoverProps:y}),(0,Ha.jsx)(Ga.__experimentalPaletteEdit,{gradients:l,onChange:c,paletteLabel:(0,Ib.__)("Custom"),paletteLabelHeadingLevel:3,slugPrefix:"custom-",popoverProps:y}),!!g&&!!g.length&&(0,Ha.jsxs)("div",{children:[(0,Ha.jsx)(Tr,{level:3,children:(0,Ib.__)("Duotone")}),(0,Ha.jsx)(Ga.__experimentalSpacer,{margin:3}),(0,Ha.jsx)(Ga.DuotonePicker,{duotonePalette:g,disableCustomDuotone:!0,disableCustomColors:!0,clearable:!1,onChange:t_e,colorPalette:[]})]})]})}var ii=s(C(),1),{Tabs:ph}=rt(cH.privateApis);function r_e({name:e}){return(0,ii.jsxs)(ii.Fragment,{children:[(0,ii.jsx)(St,{title:(0,Nb.__)("Edit palette"),description:(0,Nb.__)("The combination of colors used across the site and in color pickers.")}),(0,ii.jsxs)(ph,{children:[(0,ii.jsxs)(ph.TabList,{children:[(0,ii.jsx)(ph.Tab,{tabId:"color",children:(0,Nb.__)("Color")}),(0,ii.jsx)(ph.Tab,{tabId:"gradient",children:(0,Nb.__)("Gradient")})]}),(0,ii.jsx)(ph.TabPanel,{tabId:"color",focusable:!1,children:(0,ii.jsx)(sH,{name:e})}),(0,ii.jsx)(ph.TabPanel,{tabId:"gradient",focusable:!1,children:(0,ii.jsx)(lH,{name:e})})]})]})}var uH=r_e;var V6=s(E(),1),pH=s($(),1),hH=s(A(),1);var dH=s($(),1);var fH=s(C(),1),o_e={backgroundSize:"auto"},{BackgroundPanel:n_e}=rt(dH.privateApis);function mH(){let[e]=Ee("",void 0,"user",!1),[t,r]=Ee("",void 0,"merged",!1),[o]=pe("");return(0,fH.jsx)(n_e,{inheritedValue:t,value:e,onChange:r,settings:o,defaultValues:o_e})}var zu=s(C(),1),{useHasBackgroundPanel:i_e}=rt(pH.privateApis);function s_e(){let[e]=pe(""),t=i_e(e);return(0,zu.jsxs)(zu.Fragment,{children:[(0,zu.jsx)(St,{title:(0,V6.__)("Background"),description:(0,zu.jsx)(hH.__experimentalText,{children:(0,V6.__)("Set styles for the site's background.")})}),t&&(0,zu.jsx)(mH,{})]})}var gH=s_e;var an=s(A(),1),sn=s(E(),1);var _H=s(D(),1);var vH=s(A(),1),yH=s(E(),1),bH=s(C(),1);function a_e({text:e,confirmButtonText:t,isOpen:r,toggleOpen:o,onConfirm:n}){let i=async()=>{o(),n()},a=()=>{o()};return(0,bH.jsx)(vH.__experimentalConfirmDialog,{isOpen:r,cancelButtonText:(0,yH.__)("Cancel"),confirmButtonText:t,onCancel:a,onConfirm:i,size:"medium",children:e})}var SH=a_e;var kt=s(C(),1),{Menu:Fb}=rt(an.privateApis),z6="6px 6px 9px rgba(0, 0, 0, 0.2)";function wH(){let[e]=pe("shadow.presets.default"),[t]=pe("shadow.defaultPresets"),[r]=pe("shadow.presets.theme"),[o,n]=pe("shadow.presets.custom"),i=d=>{n([...o||[],d])},a=()=>{n([])},[l,c]=(0,_H.useState)(!1),u=()=>c(!l);return(0,kt.jsxs)(kt.Fragment,{children:[l&&(0,kt.jsx)(SH,{text:(0,sn.__)("Are you sure you want to remove all custom shadows?"),confirmButtonText:(0,sn.__)("Remove"),isOpen:l,toggleOpen:u,onConfirm:a}),(0,kt.jsx)(St,{title:(0,sn.__)("Shadows"),description:(0,sn.__)("Manage and create shadow styles for use across the site.")}),(0,kt.jsx)(Bu,{children:(0,kt.jsxs)(an.__experimentalVStack,{className:"global-styles-ui__shadows-panel",spacing:7,children:[t&&(0,kt.jsx)(j6,{label:(0,sn.__)("Default"),shadows:e||[],category:"default"}),r&&r.length>0&&(0,kt.jsx)(j6,{label:(0,sn.__)("Theme"),shadows:r||[],category:"theme"}),(0,kt.jsx)(j6,{label:(0,sn.__)("Custom"),shadows:o||[],category:"custom",canCreate:!0,onCreate:i,onReset:u})]})})]})}function j6({label:e,shadows:t,category:r,canCreate:o,onCreate:n,onReset:i}){let a=()=>{let l=Jw(t,"shadow-");n?.({name:(0,sn.sprintf)((0,sn.__)("Shadow %d"),l),shadow:z6,slug:`shadow-${l}`})};return(0,kt.jsxs)(an.__experimentalVStack,{spacing:2,children:[(0,kt.jsxs)(an.__experimentalHStack,{justify:"space-between",children:[(0,kt.jsx)(Tr,{level:3,children:e}),(0,kt.jsxs)(an.FlexItem,{className:"global-styles-ui__shadows-panel__options-container",children:[o&&(0,kt.jsx)(an.Button,{size:"small",icon:Pl,label:(0,sn.__)("Add shadow"),onClick:()=>{a()}}),!!t?.length&&r==="custom"&&(0,kt.jsxs)(Fb,{children:[(0,kt.jsx)(Fb.TriggerButton,{render:(0,kt.jsx)(an.Button,{size:"small",icon:Nr,label:(0,sn.__)("Shadow options")})}),(0,kt.jsx)(Fb.Popover,{children:(0,kt.jsx)(Fb.Item,{onClick:i,children:(0,kt.jsx)(Fb.ItemLabel,{children:(0,sn.__)("Remove all custom shadows")})})})]})]})]}),t.length>0&&(0,kt.jsx)(an.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:t.map(l=>(0,kt.jsx)(l_e,{shadow:l,category:r},l.slug))})]})}function l_e({shadow:e,category:t}){return(0,kt.jsx)(fr,{path:`/shadows/edit/${t}/${e.slug}`,children:(0,kt.jsxs)(an.__experimentalHStack,{children:[(0,kt.jsx)(an.FlexItem,{children:e.name}),(0,kt.jsx)(No,{icon:(0,sn.isRTL)()?Nt:Ft})]})})}var De=s(A(),1),Ut=s(E(),1);var Di=s(D(),1);function xH(e){return(e.match(/(?:[^,(]|\([^)]*\))+/g)||[]).map(r=>r.trim())}function CH(e){let t={x:"0",y:"0",blur:"0",spread:"0",color:"#000",inset:!1};if(!e||e.includes("none"))return t;let r=/((?:^|\s+)(-?\d*\.?\d+(?:px|%|in|cm|mm|em|rem|ex|pt|pc|vh|vw|vmin|vmax|ch|lh)?)(?=\s|$)(?![^(]*\))){1,4}/g,o=e.match(r)||[];if(o.length!==1)return t;let n=o[0].split(" ").map(g=>g.trim()).filter(g=>g);if(n.length<2)return t;let i=e.match(/inset/gi)||[];if(i.length>1)return t;let a=i.length===1,l=e.replace(r,"").trim();a&&(l=l.replace("inset","").replace("INSET","").trim());let c=/^#([0-9a-f]{3}){1,2}$|^#([0-9a-f]{4}){1,2}$|^(?:rgb|hsl)a?\(?[\d*\.?\d+%?,?\/?\s]*\)$/gi,u=(l.match(c)||[]).map(g=>g?.trim()).filter(g=>g);if(u.length>1)return t;if(u.length===0&&(u=l.trim().split(" ").filter(g=>g),u.length>1))return t;let[d,f,m,h]=n;return{x:d,y:f,blur:m||t.blur,spread:h||t.spread,inset:a,color:l||t.color}}function TH(e){let t=`${e.x||"0px"} ${e.y||"0px"} ${e.blur||"0px"} ${e.spread||"0px"}`;return`${e.inset?"inset":""} ${t} ${e.color||""}`.trim()}var Te=s(C(),1),{Menu:Db}=rt(De.privateApis),c_e=[{label:(0,Ut.__)("Rename"),action:"rename"},{label:(0,Ut.__)("Delete"),action:"delete"}],u_e=[{label:(0,Ut.__)("Reset"),action:"reset"}];function PH(){let{goBack:e,params:t}=(0,De.useNavigator)(),{category:r,slug:o}=t,[n,i]=pe(`shadow.presets.${r}`);(0,Di.useEffect)(()=>{let x=n?.some(T=>T.slug===o);o&&!x&&e()},[n,o,e]);let[a]=pe(`shadow.presets.${r}`,void 0,"base"),[l,c]=(0,Di.useState)(()=>(n||[]).find(x=>x.slug===o)),u=(0,Di.useMemo)(()=>(a||[]).find(x=>x.slug===o),[a,o]),[d,f]=(0,Di.useState)(!1),[m,h]=(0,Di.useState)(!1),[g,v]=(0,Di.useState)(l?.name);if(!r||!o)return null;let y=x=>{c({...l,shadow:x});let T=n.map(R=>R.slug===o?{...l,shadow:x}:R);i(T)},b=x=>{if(x==="reset"){let T=n.map(R=>R.slug===o?u:R);c(u),i(T)}else x==="delete"?f(!0):x==="rename"&&h(!0)},_=()=>{i(n.filter(x=>x.slug!==o))},S=x=>{if(!x)return;let T=n.map(R=>R.slug===o?{...l,name:x}:R);c({...l,name:x}),i(T)};return l?(0,Te.jsxs)(Te.Fragment,{children:[(0,Te.jsxs)(De.__experimentalHStack,{justify:"space-between",children:[(0,Te.jsx)(St,{title:l.name}),(0,Te.jsx)(De.FlexItem,{children:(0,Te.jsx)(De.__experimentalSpacer,{marginTop:2,marginBottom:0,paddingX:4,children:(0,Te.jsxs)(Db,{children:[(0,Te.jsx)(Db.TriggerButton,{render:(0,Te.jsx)(De.Button,{size:"small",icon:Nr,label:(0,Ut.__)("Menu")})}),(0,Te.jsx)(Db.Popover,{children:(r==="custom"?c_e:u_e).map(x=>(0,Te.jsx)(Db.Item,{onClick:()=>b(x.action),disabled:x.action==="reset"&&l.shadow===u?.shadow,children:(0,Te.jsx)(Db.ItemLabel,{children:x.label})},x.action))})]})})})]}),(0,Te.jsxs)(Bu,{children:[(0,Te.jsx)(d_e,{shadow:l.shadow}),(0,Te.jsx)(f_e,{shadow:l.shadow,onChange:y})]}),d&&(0,Te.jsx)(De.__experimentalConfirmDialog,{isOpen:!0,onConfirm:()=>{_(),f(!1)},onCancel:()=>{f(!1)},confirmButtonText:(0,Ut.__)("Delete"),size:"medium",children:(0,Ut.sprintf)((0,Ut.__)('Are you sure you want to delete "%s" shadow preset?'),l.name)}),m&&(0,Te.jsx)(De.Modal,{title:(0,Ut.__)("Rename"),onRequestClose:()=>h(!1),size:"small",children:(0,Te.jsxs)("form",{onSubmit:x=>{x.preventDefault(),S(g),h(!1)},children:[(0,Te.jsx)(De.__experimentalInputControl,{__next40pxDefaultSize:!0,autoComplete:"off",label:(0,Ut.__)("Name"),placeholder:(0,Ut.__)("Shadow name"),value:g??"",onChange:v}),(0,Te.jsx)(De.__experimentalSpacer,{marginBottom:6}),(0,Te.jsxs)(De.Flex,{className:"block-editor-shadow-edit-modal__actions",justify:"flex-end",expanded:!1,children:[(0,Te.jsx)(De.FlexItem,{children:(0,Te.jsx)(De.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>h(!1),children:(0,Ut.__)("Cancel")})}),(0,Te.jsx)(De.FlexItem,{children:(0,Te.jsx)(De.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",children:(0,Ut.__)("Save")})})]})]})})]}):(0,Te.jsx)(St,{title:""})}function d_e({shadow:e}){return(0,Te.jsx)(De.__experimentalSpacer,{marginBottom:4,marginTop:-2,children:(0,Te.jsx)(De.__experimentalHStack,{alignment:"center",justify:"center",className:"global-styles-ui__shadow-preview-panel",children:(0,Te.jsx)("div",{className:"global-styles-ui__shadow-preview-block",style:{boxShadow:e}})})})}function f_e({shadow:e,onChange:t}){let r=(0,Di.useRef)(null),o=(0,Di.useMemo)(()=>xH(e),[e]),n=(l,c)=>{let u=[...o];u[l]=c,t(u.join(", "))},i=()=>{t([...o,z6].join(", "))},a=l=>{t(o.filter((c,u)=>u!==l).join(", ")),r.current?.focus()};return(0,Te.jsxs)(Te.Fragment,{children:[(0,Te.jsx)(De.__experimentalVStack,{spacing:2,children:(0,Te.jsxs)(De.__experimentalHStack,{justify:"space-between",children:[(0,Te.jsx)(Tr,{level:3,children:(0,Ut.__)("Shadows")}),(0,Te.jsx)(De.FlexItem,{className:"global-styles-ui__shadows-panel__options-container",children:(0,Te.jsx)(De.Button,{size:"small",icon:Pl,label:(0,Ut.__)("Add shadow"),onClick:()=>{i()},ref:r})})]})}),(0,Te.jsx)(De.__experimentalSpacer,{}),(0,Te.jsx)(De.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:o.map((l,c)=>(0,Te.jsx)(m_e,{shadow:l,onChange:u=>n(c,u),canRemove:o.length>1,onRemove:()=>a(c)},c))})]})}function m_e({shadow:e,onChange:t,canRemove:r,onRemove:o}){let n={placement:"left-start",offset:36,shift:!0},i=(0,Di.useMemo)(()=>CH(e),[e]),a=l=>{t(TH(l))};return(0,Te.jsx)(De.Dropdown,{popoverProps:n,className:"global-styles-ui__shadow-editor__dropdown",renderToggle:({onToggle:l,isOpen:c})=>{let u={onClick:l,className:re("global-styles-ui__shadow-editor__dropdown-toggle",{"is-open":c}),"aria-expanded":c},d={onClick:()=>{c&&l(),o()},className:re("global-styles-ui__shadow-editor__remove-button",{"is-open":c}),label:(0,Ut.__)("Remove shadow")};return(0,Te.jsxs)(Te.Fragment,{children:[(0,Te.jsx)(De.Button,{__next40pxDefaultSize:!0,icon:Hv,...u,children:i.inset?(0,Ut.__)("Inner shadow"):(0,Ut.__)("Drop shadow")}),r&&(0,Te.jsx)(De.Button,{size:"small",icon:kA,...d})]})},renderContent:()=>(0,Te.jsx)(De.__experimentalDropdownContentWrapper,{paddingSize:"medium",className:"global-styles-ui__shadow-editor__dropdown-content",children:(0,Te.jsx)(p_e,{shadowObj:i,onChange:a})})})}function p_e({shadowObj:e,onChange:t}){let n=(i,a)=>{let l={...e,[i]:a};t(l)};return(0,Te.jsxs)(De.__experimentalVStack,{spacing:4,className:"global-styles-ui__shadow-editor-panel",children:[(0,Te.jsx)(De.ColorPalette,{clearable:!1,enableAlpha:!0,__experimentalIsRenderedInSidebar:!0,value:e.color,onChange:i=>n("color",i)}),(0,Te.jsxs)(De.__experimentalToggleGroupControl,{label:(0,Ut.__)("Shadow Type"),value:e.inset?"inset":"outset",isBlock:!0,onChange:i=>n("inset",i==="inset"),hideLabelFromVision:!0,__next40pxDefaultSize:!0,children:[(0,Te.jsx)(De.__experimentalToggleGroupControlOption,{value:"outset",label:(0,Ut.__)("Outset")}),(0,Te.jsx)(De.__experimentalToggleGroupControlOption,{value:"inset",label:(0,Ut.__)("Inset")})]}),(0,Te.jsxs)(De.__experimentalGrid,{columns:2,gap:4,children:[(0,Te.jsx)(Fx,{label:(0,Ut.__)("X Position"),value:e.x,onChange:i=>n("x",i)}),(0,Te.jsx)(Fx,{label:(0,Ut.__)("Y Position"),value:e.y,onChange:i=>n("y",i)}),(0,Te.jsx)(Fx,{label:(0,Ut.__)("Blur"),value:e.blur,onChange:i=>n("blur",i)}),(0,Te.jsx)(Fx,{label:(0,Ut.__)("Spread"),value:e.spread,onChange:i=>n("spread",i)})]})]})}function Fx({label:e,value:t,onChange:r}){return(0,Te.jsx)(De.__experimentalUnitControl,{label:e,__next40pxDefaultSize:!0,value:t,onChange:n=>{let a=n!==void 0&&!isNaN(parseFloat(n))?n:"0px";r(a)}})}var U6=s(C(),1);function kH(){return(0,U6.jsx)(wH,{})}function EH(){return(0,U6.jsx)(PH,{})}var IH=s(E(),1),NH=s($(),1);var RH=s($(),1),H6=s(D(),1);var AH=s(C(),1),{useSettingsForBlockElement:h_e,DimensionsPanel:g_e}=rt(RH.privateApis),v_e={contentSize:!0,wideSize:!0,padding:!0,margin:!0,blockGap:!0,height:!0,minHeight:!0,width:!0,childLayout:!1};function OH(){let[e]=Ee("",void 0,"user",!1),[t,r]=Ee("",void 0,"merged",!1),[o]=pe("",void 0,"user"),[n,i]=pe(""),a=h_e(n),l=(0,H6.useMemo)(()=>({...t,layout:a.layout}),[t,a.layout]),c=(0,H6.useMemo)(()=>({...e,layout:o.layout}),[e,o.layout]);return(0,AH.jsx)(g_e,{inheritedValue:l,value:c,onChange:d=>{let f={...d};if(delete f.layout,r(f),d.layout!==o.layout){let m={...o,layout:d.layout};m.layout?.definitions&&delete m.layout.definitions,i(m)}},settings:a,includeLayoutControls:!0,defaultControls:v_e})}var Hf=s(C(),1),{useHasDimensionsPanel:y_e,useSettingsForBlockElement:b_e}=rt(NH.privateApis);function S_e(){let[e]=pe(""),t=b_e(e),r=y_e(t);return(0,Hf.jsxs)(Hf.Fragment,{children:[(0,Hf.jsx)(St,{title:(0,IH.__)("Layout")}),r&&(0,Hf.jsx)(OH,{})]})}var FH=S_e;var Lx=s(A(),1),W6=s(E(),1);var G6=s(E(),1),VH=s(A(),1);var DH=s(W(),1),BH=s(O(),1),Bx=s(D(),1),MH=s(A(),1),LH=s(E(),1);var Dx=s(C(),1);function __e({gap:e=2}){let{user:t}=(0,Bx.useContext)(Br),r=t?.styles,n=(0,BH.useSelect)(a=>{let l=a(DH.store).__experimentalGetCurrentThemeGlobalStylesVariations();return Array.isArray(l)?l:void 0},[])?.filter(a=>!yb(a,["color"])&&!yb(a,["typography","spacing"])),i=(0,Bx.useMemo)(()=>[...[{title:(0,LH.__)("Default"),settings:{},styles:{}},...n??[]].map(l=>{let c=l?.styles?.blocks?{...l.styles.blocks}:{};r?.blocks&&Object.keys(r.blocks).forEach(m=>{if(r.blocks?.[m]?.css){let h=c[m]||{},g={css:`${c[m]?.css||""} ${r.blocks?.[m]?.css?.trim()||""}`};c[m]={...h,...g}}});let u=r?.css||l.styles?.css?{css:`${l.styles?.css||""} ${r?.css||""}`}:{},d=Object.keys(c).length>0?{blocks:c}:{},f={...l.styles,...u,...d};return{...l,settings:l.settings??{},styles:f}})],[n,r?.blocks,r?.css]);return!n||n.length<1?null:(0,Dx.jsx)(MH.__experimentalGrid,{columns:2,className:"global-styles-ui-style-variations-container",gap:e,children:i.map((a,l)=>(0,Dx.jsx)(rh,{variation:a,children:c=>(0,Dx.jsx)(tx,{label:a?.title,withHoverView:!0,isFocused:c,variation:a})},l))})}var Mx=__e;var hh=s(C(),1);function jH(){return(0,hh.jsxs)(VH.__experimentalVStack,{spacing:10,className:"global-styles-ui-variation-container",children:[(0,hh.jsx)(Mx,{gap:3}),(0,hh.jsx)(fh,{title:(0,G6.__)("Color Variations"),gap:3}),(0,hh.jsx)(oh,{title:(0,G6.__)("Typography"),gap:3})]})}var nc=s(C(),1);function w_e(){return(0,nc.jsxs)(nc.Fragment,{children:[(0,nc.jsx)(St,{title:(0,W6.__)("Browse styles"),description:(0,W6.__)("Choose a variation to change the look of the site.")}),(0,nc.jsx)(Lx.Card,{size:"small",isBorderless:!0,className:"global-styles-ui-screen-style-variations",children:(0,nc.jsx)(Lx.CardBody,{children:(0,nc.jsx)(jH,{})})})]})}var zH=w_e;var Bb=s(E(),1),UH=s(A(),1),HH=s($(),1);var ms=s(C(),1),{AdvancedPanel:x_e}=rt(HH.privateApis);function C_e(){let[e]=Ee("",void 0,"user",!1),[t,r]=Ee("",void 0,"merged",!1);return(0,ms.jsxs)(ms.Fragment,{children:[(0,ms.jsx)(St,{title:(0,Bb.__)("Additional CSS"),description:(0,ms.jsxs)(ms.Fragment,{children:[(0,Bb.__)("You can add custom CSS to further customize the appearance and layout of your site."),(0,ms.jsx)("br",{}),(0,ms.jsx)(UH.ExternalLink,{href:(0,Bb.__)("https://developer.wordpress.org/advanced-administration/wordpress/css/"),className:"global-styles-ui-screen-css-help-link",children:(0,Bb.__)("Learn more about CSS")})]})}),(0,ms.jsx)("div",{className:"global-styles-ui-screen-css",children:(0,ms.jsx)(x_e,{value:e,onChange:r,inheritedValue:t})})]})}var GH=C_e;var ic=s(E(),1),gh=s(A(),1),Gf=s(D(),1);var WH=s(O(),1),YH=s(W(),1),Mb=s(D(),1);var T_e={per_page:-1,_fields:"id,name,avatar_urls",context:"view",capabilities:["edit_theme_options"]},P_e={per_page:100,page:1},Vx=[];function Lb({query:e}={}){let{user:t}=(0,Mb.useContext)(Br),r=(0,Mb.useMemo)(()=>({...P_e,...e}),[e]),{authors:o,currentUser:n,isDirty:i,revisions:a,isLoadingGlobalStylesRevisions:l,revisionsCount:c}=(0,WH.useSelect)(u=>{let{__experimentalGetDirtyEntityRecords:d,getCurrentUser:f,getUsers:m,getRevisions:h,__experimentalGetCurrentGlobalStylesId:g,getEntityRecord:v,isResolving:y}=u(YH.store),b=d()||[],_=f(),S=b.length>0,x=g(),R=(x?v("root","globalStyles",x):void 0)?._links?.["version-history"]?.[0]?.count??0,F=x&&h("root","globalStyles",x,r)||Vx,B=m(T_e)||Vx,z=x?y("getRevisions",["root","globalStyles",x,r]):!1;return{authors:B,currentUser:_,isDirty:S,revisions:F,isLoadingGlobalStylesRevisions:z,revisionsCount:R}},[r]);return(0,Mb.useMemo)(()=>{if(!o.length||l)return{revisions:Vx,hasUnsavedChanges:i,isLoading:!0,revisionsCount:c};let u=a.map(f=>({...f,author:o.find(m=>m.id===f.author)}));if(a.length){if(u[0].id!=="unsaved"&&r.page===1&&(u[0].isLatest=!0),i&&t&&Object.keys(t).length>0&&n&&r.page===1){let f={id:"unsaved",styles:t?.styles,settings:t?.settings,_links:t?._links,author:{name:n?.name||"",avatar_urls:n?.avatar_urls||{}},modified:new Date};u.unshift(f)}r.per_page&&r.page===Math.ceil(c/r.per_page)&&u.push({id:"parent",styles:{},settings:{}})}return{revisions:u,hasUnsavedChanges:i,isLoading:!1,revisionsCount:c}},[i,a,n,o,t,l,c,r.page,r.per_page])}var Vo=s(E(),1),Vb=s(A(),1),Wa=s(po(),1),qH=s(W(),1),ZH=s(O(),1);var jx=s(yo(),1),_o=s(C(),1),k_e=3600*1e3*24;function E_e({revision:e,previousRevision:t}){let r=My(e,t,{maxResults:7});return r.length?(0,_o.jsx)("ul",{"data-testid":"global-styles-revision-changes",className:"global-styles-ui-screen-revisions__changes",children:r.map(o=>(0,_o.jsx)("li",{children:o},o))}):null}function R_e(e,t,r,o){return e==="parent"?(0,Vo.__)("Reset the styles to the theme defaults"):e==="unsaved"?(0,Vo.sprintf)((0,Vo.__)("Unsaved changes by %s"),t):o?(0,Vo.sprintf)((0,Vo.__)("Changes saved by %1$s on %2$s. This revision matches current editor styles."),t,r):(0,Vo.sprintf)((0,Vo.__)("Changes saved by %1$s on %2$s"),t,r)}function A_e({userRevisions:e,selectedRevisionId:t,onChange:r,canApplyRevision:o,onApplyRevision:n}){let{currentThemeName:i,currentUser:a}=(0,ZH.useSelect)(u=>{let{getCurrentTheme:d,getCurrentUser:f}=u(qH.store),m=d();return{currentThemeName:m?.name?.rendered||m?.stylesheet,currentUser:f()}},[]),l=(0,Wa.getDate)(null).getTime(),{datetimeAbbreviated:c}=(0,Wa.getSettings)().formats;return(0,_o.jsx)(Vb.Composite,{orientation:"vertical",className:"global-styles-ui-screen-revisions__revisions-list","aria-label":(0,Vo.__)("Global styles revisions list"),role:"listbox",children:e.map((u,d)=>{let{id:f,author:m,modified:h}=u,g=f==="unsaved",v=g?a:m,y=v?.name||(0,Vo.__)("User"),b=v?.avatar_urls?.["48"],S=t?t===f:d===0,x=!o&&S,T=f==="parent",R=h instanceof Date?h.toISOString():h,F=(0,Wa.getDate)(R??null),B=R&&l-F.getTime()>k_e?(0,Wa.dateI18n)(c,F):(0,Wa.humanTimeDiff)(R??F,void 0),z=R_e(f,y,(0,Wa.dateI18n)(c,F),x);return(0,_o.jsxs)(Vb.Composite.Item,{className:"global-styles-ui-screen-revisions__revision-item","aria-current":S,role:"option",onKeyDown:L=>{let{keyCode:M}=L;(M===jx.ENTER||M===jx.SPACE)&&r(u)},onClick:L=>{L.preventDefault(),r(u)},"aria-selected":S,"aria-label":z,render:(0,_o.jsx)("div",{}),children:[(0,_o.jsx)("span",{className:"global-styles-ui-screen-revisions__revision-item-wrapper",children:T?(0,_o.jsxs)("span",{className:"global-styles-ui-screen-revisions__description",children:[(0,Vo.__)("Default styles"),(0,_o.jsx)("span",{className:"global-styles-ui-screen-revisions__meta",children:i})]}):(0,_o.jsxs)("span",{className:"global-styles-ui-screen-revisions__description",children:[g?(0,_o.jsx)("span",{className:"global-styles-ui-screen-revisions__date",children:(0,Vo.__)("(Unsaved)")}):(0,_o.jsx)("time",{className:"global-styles-ui-screen-revisions__date",dateTime:R,children:B}),(0,_o.jsxs)("span",{className:"global-styles-ui-screen-revisions__meta",children:[(0,_o.jsx)("img",{alt:y,src:b}),y]}),S&&(0,_o.jsx)(E_e,{revision:u,previousRevision:dr(1),accessibleWhenDisabled:!0,disabled:i||e===1,label:(0,wo.__)("First page"),icon:(0,wo.isRTL)()?Tl:kl,size:"compact"}),(0,Qs.jsx)(ps.Button,{variant:a,onClick:()=>r(e-1),accessibleWhenDisabled:!0,disabled:i||e===1,label:(0,wo.__)("Previous page"),icon:(0,wo.isRTL)()?Ft:Nt,size:"compact"})]}),(0,Qs.jsx)(ps.__experimentalText,{variant:"muted",children:(0,wo.sprintf)((0,wo._x)("%1$d of %2$d","paging"),e,t)}),(0,Qs.jsxs)(ps.__experimentalHStack,{expanded:!1,spacing:1,children:[(0,Qs.jsx)(ps.Button,{variant:a,onClick:()=>r(e+1),accessibleWhenDisabled:!0,disabled:i||e===t,label:(0,wo.__)("Next page"),icon:(0,wo.isRTL)()?Nt:Ft,size:"compact"}),(0,Qs.jsx)(ps.Button,{variant:a,onClick:()=>r(t),accessibleWhenDisabled:!0,disabled:i||e===t,label:(0,wo.__)("Last page"),icon:(0,wo.isRTL)()?kl:Tl,size:"compact"})]})]})}var Js=s(C(),1),QH=10;function O_e({onClose:e}={}){let{user:t,onChange:r}=(0,Gf.useContext)(Br),{params:o,goTo:n}=(0,gh.useNavigator)(),{revisionId:i}=o,[a,l]=(0,Gf.useState)(1),{revisions:c,isLoading:u,hasUnsavedChanges:d,revisionsCount:f}=Lb({query:{per_page:QH,page:a}}),m=Math.ceil(f/QH),[h,g]=(0,Gf.useState)(!1),v=(0,Gf.useMemo)(()=>i&&c.find(B=>String(B.id)===String(i))||t,[i,c,t]),y=pf(v,t),b=()=>{e&&e()},_=F=>{r(F),g(!1),b()},S=F=>{n(`/revisions/${F.id}`)},x=v?.id??c[0]?.id,T=!!x&&x!=="unsaved"&&!y,R=!!c.length;return(0,Js.jsxs)(Js.Fragment,{children:[(0,Js.jsx)(St,{title:f?(0,ic.sprintf)((0,ic.__)("Revisions (%d)"),f):(0,ic.__)("Revisions"),description:(0,ic.__)(`Click on previously saved styles to preview them. To restore a selected version to the editor, hit "Apply." When you're ready, use the Save button to save your changes.`),onBack:b}),!R&&(0,Js.jsx)(gh.Spinner,{className:"global-styles-ui-screen-revisions__loading"}),(0,Js.jsx)(KH,{onChange:S,selectedRevisionId:x,userRevisions:c,canApplyRevision:T,onApplyRevision:()=>d?g(!0):_(v)}),m>1&&(0,Js.jsx)("div",{className:"global-styles-ui-screen-revisions__footer",children:(0,Js.jsx)(XH,{className:"global-styles-ui-screen-revisions__pagination",currentPage:a,numPages:m,changePage:l,totalItems:f,disabled:u,label:(0,ic.__)("Global Styles pagination")})}),h&&(0,Js.jsx)(gh.__experimentalConfirmDialog,{isOpen:h,confirmButtonText:(0,ic.__)("Apply"),onConfirm:()=>_(v),onCancel:()=>g(!1),size:"medium",children:(0,ic.__)("Are you sure you want to apply this revision? Any unsaved changes will be lost.")})]})}var JH=O_e;var no=s(E(),1),Pr=s(A(),1);var oG=s(D(),1);var $H=s(A(),1),eG=s(E(),1),tG=s(C(),1);function I_e({text:e,confirmButtonText:t,isOpen:r,toggleOpen:o,onConfirm:n}){let i=async()=>{o(),n()},a=()=>{o()};return(0,tG.jsx)($H.__experimentalConfirmDialog,{isOpen:r,cancelButtonText:(0,eG.__)("Cancel"),confirmButtonText:t,onCancel:a,onConfirm:i,size:"medium",children:e})}var rG=I_e;var _t=s(C(),1),{Menu:jb}=rt(Pr.privateApis);function Y6({label:e,origin:t,sizes:r,handleAddFontSize:o,handleResetFontSizes:n}){let[i,a]=(0,oG.useState)(!1),l=()=>a(!i),c=t==="custom"?(0,no.__)("Are you sure you want to remove all custom font size presets?"):(0,no.__)("Are you sure you want to reset all font size presets to their default values?");return(0,_t.jsxs)(_t.Fragment,{children:[n&&i&&(0,_t.jsx)(rG,{text:c,confirmButtonText:t==="custom"?(0,no.__)("Remove"):(0,no.__)("Reset"),isOpen:i,toggleOpen:l,onConfirm:n}),(0,_t.jsxs)(Pr.__experimentalVStack,{spacing:4,children:[(0,_t.jsxs)(Pr.__experimentalHStack,{children:[(0,_t.jsx)(Tr,{level:3,children:e}),(0,_t.jsxs)(Pr.FlexItem,{className:"global-styles-ui__typography-panel__options-container",children:[t==="custom"&&(0,_t.jsx)(Pr.Button,{label:(0,no.__)("Add font size"),icon:Pl,size:"small",onClick:o}),!!n&&(0,_t.jsxs)(jb,{children:[(0,_t.jsx)(jb.TriggerButton,{render:(0,_t.jsx)(Pr.Button,{size:"small",icon:Nr,label:(0,no.__)("Font size presets options")})}),(0,_t.jsx)(jb.Popover,{children:(0,_t.jsx)(jb.Item,{onClick:l,children:(0,_t.jsx)(jb.ItemLabel,{children:t==="custom"?(0,no.__)("Remove font size presets"):(0,no.__)("Reset font size presets")})})})]})]})]}),!!r.length&&(0,_t.jsx)(Pr.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:r.map(u=>(0,_t.jsx)(fr,{path:`/typography/font-sizes/${t}/${u.slug}`,children:(0,_t.jsxs)(Pr.__experimentalHStack,{children:[(0,_t.jsx)(Pr.FlexItem,{className:"global-styles-ui-font-size__item",children:u.name}),(0,_t.jsx)(Pr.FlexItem,{display:"flex",children:(0,_t.jsx)(No,{icon:(0,no.isRTL)()?Nt:Ft})})]})},u.slug))})]})]})}function N_e(){let[e,t]=pe("typography.fontSizes.theme"),[r]=pe("typography.fontSizes.theme","base"),[o,n]=pe("typography.fontSizes.default"),[i]=pe("typography.fontSizes.default","base"),[a=[],l]=pe("typography.fontSizes.custom"),[c]=pe("typography.defaultFontSizes"),u=()=>{let f=Jw(a,"custom-"),m={name:(0,no.sprintf)((0,no.__)("New Font Size %d"),f),size:"16px",slug:`custom-${f}`};l([...a,m])},d=(f,m)=>f.map(h=>h.size).join("")===m.map(h=>h.size).join("");return(0,_t.jsxs)(Pr.__experimentalVStack,{spacing:2,children:[(0,_t.jsx)(St,{title:(0,no.__)("Font size presets"),description:(0,no.__)("Create and edit the presets used for font sizes across the site.")}),(0,_t.jsx)(Pr.__experimentalView,{children:(0,_t.jsx)(Pr.__experimentalSpacer,{paddingX:4,children:(0,_t.jsxs)(Pr.__experimentalVStack,{spacing:8,children:[!!e?.length&&(0,_t.jsx)(Y6,{label:(0,no.__)("Theme"),origin:"theme",sizes:e,handleAddFontSize:u,handleResetFontSizes:d(e,r)?void 0:()=>t(r)}),c&&!!o?.length&&(0,_t.jsx)(Y6,{label:(0,no.__)("Default"),origin:"default",sizes:o,handleAddFontSize:u,handleResetFontSizes:d(o,i)?void 0:()=>n(i)}),(0,_t.jsx)(Y6,{label:(0,no.__)("Custom"),origin:"custom",sizes:a,handleAddFontSize:u,handleResetFontSizes:a.length>0?()=>l([]):void 0})]})})})]})}var nG=N_e;var si=s(E(),1),kr=s(A(),1);var zb=s(D(),1);var iG=s($(),1),sG=s(E(),1);var aG=s(C(),1);function F_e({fontSize:e}){let[t]=Ee("typography"),r=typeof e?.fluid=="object"&&e?.fluid?.min&&e?.fluid?.max?{minimumFontSize:e.fluid.min,maximumFontSize:e.fluid.max}:{fontSize:e.size},o=(0,iG.getComputedFluidTypographyValue)(r);return(0,aG.jsx)("div",{className:"global-styles-ui-typography-preview",style:{fontSize:o,fontFamily:t?.fontFamily??"serif"},children:(0,sG.__)("Aa")})}var lG=F_e;var cG=s(A(),1),vh=s(E(),1),uG=s(C(),1);function D_e({fontSize:e,isOpen:t,toggleOpen:r,handleRemoveFontSize:o}){let n=async()=>{r(),o(e)},i=()=>{r()};return(0,uG.jsx)(cG.__experimentalConfirmDialog,{isOpen:t,cancelButtonText:(0,vh.__)("Cancel"),confirmButtonText:(0,vh.__)("Delete"),onCancel:i,onConfirm:n,size:"medium",children:e&&(0,vh.sprintf)((0,vh.__)('Are you sure you want to delete "%s" font size preset?'),e.name)})}var dG=D_e;var $s=s(A(),1),yh=s(E(),1),fG=s(D(),1),sc=s(C(),1);function B_e({fontSize:e,toggleOpen:t,handleRename:r}){let[o,n]=(0,fG.useState)(e.name),i=()=>{o&&o.trim()&&r(o),t()};return(0,sc.jsx)($s.Modal,{onRequestClose:t,focusOnMount:"firstContentElement",title:(0,yh.__)("Rename"),size:"small",children:(0,sc.jsx)("form",{onSubmit:a=>{a.preventDefault(),i(),t()},children:(0,sc.jsxs)($s.__experimentalVStack,{spacing:"3",children:[(0,sc.jsx)($s.__experimentalInputControl,{__next40pxDefaultSize:!0,autoComplete:"off",value:o,onChange:n,label:(0,yh.__)("Name"),placeholder:(0,yh.__)("Font size preset name")}),(0,sc.jsxs)($s.__experimentalHStack,{justify:"right",children:[(0,sc.jsx)($s.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,children:(0,yh.__)("Cancel")}),(0,sc.jsx)($s.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",children:(0,yh.__)("Save")})]})]})})})}var mG=B_e;var io=s(A(),1),ac=s(C(),1),M_e=["px","em","rem","vw","vh"];function zx(e){let{baseControlProps:t}=(0,io.useBaseControlProps)(e),{value:r,onChange:o,fallbackValue:n,disabled:i,label:a}=e,l=(0,io.__experimentalUseCustomUnits)({availableUnits:M_e}),[c,u="px"]=(0,io.__experimentalParseQuantityAndUnitFromRawValue)(r,l),d=!!u&&["em","rem","vw","vh"].includes(u);return(0,ac.jsx)(io.BaseControl,{...t,children:(0,ac.jsxs)(io.Flex,{children:[(0,ac.jsx)(io.FlexItem,{isBlock:!0,children:(0,ac.jsx)(io.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:a,hideLabelFromVision:!0,value:r,onChange:h=>{o?.(h)},units:l,min:0,disabled:i})}),(0,ac.jsx)(io.FlexItem,{isBlock:!0,children:(0,ac.jsx)(io.__experimentalSpacer,{marginX:2,marginBottom:0,children:(0,ac.jsx)(io.RangeControl,{__next40pxDefaultSize:!0,label:a,hideLabelFromVision:!0,value:c,initialPosition:n,withInputField:!1,onChange:h=>{o?.(h!==void 0?h+u:void 0)},min:0,max:d?10:100,step:d?.1:1,disabled:i})})})]})})}var pt=s(C(),1),{Menu:Wf}=rt(kr.privateApis);function L_e(){let[e,t]=(0,zb.useState)(!1),[r,o]=(0,zb.useState)(!1),{params:{origin:n,slug:i},goBack:a}=(0,kr.useNavigator)(),[l,c]=pe("typography.fontSizes"),[u]=pe("typography.fluid"),d=l?.[n]??[],f=d.find(B=>B.slug===i);if((0,zb.useEffect)(()=>{i&&!f&&a()},[i,f,a]),!n||!i||!f)return null;let m=f?.fluid!==void 0?!!f.fluid:!!u,h=typeof f?.fluid=="object",g=B=>{x("name",B)},v=B=>{x("size",B)},y=B=>{x("fluid",B)},b=B=>{B?x("fluid",{min:f.size,max:f.size}):x("fluid",!0)},_=B=>{let z=typeof f.fluid=="object"?f.fluid:{};x("fluid",{...z,min:B})},S=B=>{let z=typeof f.fluid=="object"?f.fluid:{};x("fluid",{...z,max:B})},x=(B,z)=>{let L=d.map(M=>M.slug===i?{...M,[B]:z}:M);c({...l,[n]:L})},T=()=>{let B=d.filter(z=>z.slug!==i);c({...l,[n]:B})},R=()=>{t(!e)},F=()=>{o(!r)};return(0,pt.jsxs)(pt.Fragment,{children:[(0,pt.jsx)(dG,{fontSize:f,isOpen:e,toggleOpen:R,handleRemoveFontSize:T}),r&&(0,pt.jsx)(mG,{fontSize:f,toggleOpen:F,handleRename:g}),(0,pt.jsxs)(kr.__experimentalVStack,{spacing:4,children:[(0,pt.jsxs)(kr.__experimentalHStack,{justify:"space-between",alignment:"flex-start",children:[(0,pt.jsx)(St,{title:f.name,description:(0,si.sprintf)((0,si.__)("Manage the font size %s."),f.name)}),n==="custom"&&(0,pt.jsx)(kr.FlexItem,{children:(0,pt.jsx)(kr.__experimentalSpacer,{marginTop:3,marginBottom:0,paddingX:4,children:(0,pt.jsxs)(Wf,{children:[(0,pt.jsx)(Wf.TriggerButton,{render:(0,pt.jsx)(kr.Button,{size:"small",icon:Nr,label:(0,si.__)("Font size options")})}),(0,pt.jsxs)(Wf.Popover,{children:[(0,pt.jsx)(Wf.Item,{onClick:F,children:(0,pt.jsx)(Wf.ItemLabel,{children:(0,si.__)("Rename")})}),(0,pt.jsx)(Wf.Item,{onClick:R,children:(0,pt.jsx)(Wf.ItemLabel,{children:(0,si.__)("Delete")})})]})]})})})]}),(0,pt.jsx)(kr.__experimentalView,{children:(0,pt.jsx)(kr.__experimentalSpacer,{paddingX:4,marginBottom:0,paddingBottom:6,children:(0,pt.jsxs)(kr.__experimentalVStack,{spacing:4,children:[(0,pt.jsx)(kr.FlexItem,{children:(0,pt.jsx)(lG,{fontSize:f})}),(0,pt.jsx)(zx,{label:(0,si.__)("Size"),value:!h&&f.size?String(f.size):"",onChange:v,disabled:h}),(0,pt.jsx)(kr.ToggleControl,{label:(0,si.__)("Fluid typography"),help:(0,si.__)("Scale the font size dynamically to fit the screen or viewport."),checked:m,onChange:y}),m&&(0,pt.jsx)(kr.ToggleControl,{label:(0,si.__)("Custom fluid values"),help:(0,si.__)("Set custom min and max values for the fluid font size."),checked:h,onChange:b}),h&&(0,pt.jsxs)(pt.Fragment,{children:[(0,pt.jsx)(zx,{label:(0,si.__)("Minimum"),value:typeof f?.fluid=="object"?f.fluid?.min:void 0,onChange:_}),(0,pt.jsx)(zx,{label:(0,si.__)("Maximum"),value:typeof f?.fluid=="object"?f.fluid?.max:void 0,onChange:S})]})]})})})]})]})}var pG=L_e;var Oe=s(C(),1);function V_e({parentMenu:e,blockStyles:t,blockName:r}){return(0,Oe.jsx)(Oe.Fragment,{children:t.map((o,n)=>(0,Oe.jsx)(bh.Navigator.Screen,{path:e+"/variations/"+o.name,children:(0,Oe.jsx)(R6,{name:r,variation:o.name})},n))})}function j_e({name:e,parentMenu:t=""}){let r=(0,hG.useSelect)(o=>{if(!e)return[];let{getBlockStyles:n}=o(Ux.store);return n(e)},[e]);return r?.length?(0,Oe.jsx)(V_e,{parentMenu:t,blockStyles:r,blockName:e||""}):null}function Z6({value:e,baseValue:t,onChange:r,path:o,onPathChange:n,fontLibraryEnabled:i=!1,serverCSS:a,serverSettings:l}){let c=(0,Ux.getBlockTypes)(),u=(0,Uu.useMemo)(()=>go(t,e),[t,e]),[d,f]=jy(u,[],{styleOptions:{variationStyles:!0}}),m=(0,Uu.useMemo)(()=>[...a??[],...d??[]],[a,d]),h=(0,Uu.useMemo)(()=>({...l,__experimentalFeatures:f,styles:m}),[f,l,m]);return(0,Oe.jsx)(gb,{value:e,baseValue:t,onChange:r,fontLibraryEnabled:i,children:(0,Oe.jsx)(gG.BlockEditorProvider,{settings:h,children:(0,Oe.jsxs)(bh.Navigator,{className:"global-styles-ui-sidebar__navigator-provider",initialPath:o||"/",children:[(o||n)&&(0,Oe.jsx)(z_e,{path:o,onPathChange:n}),(0,Oe.jsx)(Zr,{path:"/",children:(0,Oe.jsx)(sz,{})}),(0,Oe.jsx)(Zr,{path:"/colors",children:(0,Oe.jsx)(eH,{})}),(0,Oe.jsx)(Zr,{path:"/typography",children:(0,Oe.jsx)(VU,{})}),(0,Oe.jsx)(Zr,{path:"/typography/font-sizes",children:(0,Oe.jsx)(nG,{})}),(0,Oe.jsx)(Zr,{path:"/typography/font-sizes/:origin/:slug",children:(0,Oe.jsx)(pG,{})}),(0,Oe.jsx)(Zr,{path:"/layout",children:(0,Oe.jsx)(FH,{})}),(0,Oe.jsx)(Zr,{path:"/colors/palette",children:(0,Oe.jsx)(uH,{})}),(0,Oe.jsx)(Zr,{path:"/variations",children:(0,Oe.jsx)(zH,{})}),(0,Oe.jsx)(Zr,{path:"/css",children:(0,Oe.jsx)(GH,{})}),(0,Oe.jsx)(Zr,{path:"/revisions/:revisionId?",children:(0,Oe.jsx)(JH,{})}),(0,Oe.jsx)(Zr,{path:"/shadows",children:(0,Oe.jsx)(kH,{})}),(0,Oe.jsx)(Zr,{path:"/shadows/edit/:category/:slug",children:(0,Oe.jsx)(EH,{})}),(0,Oe.jsx)(Zr,{path:"/background",children:(0,Oe.jsx)(gH,{})}),(0,Oe.jsx)(Zr,{path:"/typography/text",children:(0,Oe.jsx)(uh,{element:"text"})}),(0,Oe.jsx)(Zr,{path:"/typography/link",children:(0,Oe.jsx)(uh,{element:"link"})}),(0,Oe.jsx)(Zr,{path:"/typography/heading",children:(0,Oe.jsx)(uh,{element:"heading"})}),(0,Oe.jsx)(Zr,{path:"/typography/caption",children:(0,Oe.jsx)(uh,{element:"caption"})}),(0,Oe.jsx)(Zr,{path:"/typography/button",children:(0,Oe.jsx)(uh,{element:"button"})}),(0,Oe.jsx)(Zr,{path:"/blocks",children:(0,Oe.jsx)(mz,{})}),c.map(g=>(0,Oe.jsxs)(Uu.Fragment,{children:[(0,Oe.jsx)(Zr,{path:"/blocks/"+encodeURIComponent(g.name),children:(0,Oe.jsx)(R6,{name:g.name})}),(0,Oe.jsx)(j_e,{name:g.name,parentMenu:"/blocks/"+encodeURIComponent(g.name)})]},g.name))]})})})}function Zr({path:e,children:t}){return(0,Oe.jsx)(bh.Navigator.Screen,{className:"global-styles-ui-sidebar__navigator-screen",path:e,children:t})}function z_e({path:e,onPathChange:t}){let r=(0,bh.useNavigator)(),{path:o}=r.location,n=(0,q6.usePrevious)(e),i=(0,q6.usePrevious)(o);return(0,Uu.useEffect)(()=>{e&&e!==o&&(e!==n?r.goTo(e):o!==i&&t&&t(o??"/"))},[t,e,i,n,o,r]),null}var K6=s(C(),1);function Sh(e){return function({value:r,baseValue:o,onChange:n,...i}){return(0,K6.jsx)(gb,{value:r,baseValue:o,onChange:n,children:(0,K6.jsx)(e,{...i})})}}var U_e=Sh(Mx);var H_e=Sh(fh);var G_e=Sh(oh);var W_e=s(C(),1);var TG=s(Yd(),1);var vG=s(O(),1),yG=s(D(),1),bG=s($(),1),SG=s(he(),1);function _G({path:e,onPathChange:t}){let{selectedBlockName:r,selectedBlockClientId:o}=(0,vG.useSelect)(a=>{let{getSelectedBlockClientId:l,getBlockName:c}=a(bG.store),u=l();return{selectedBlockName:c(u),selectedBlockClientId:u}},[]),n=!0,i=(0,SG.usePrevious)(o);return(0,yG.useEffect)(()=>{if(o===i||!o||!n||!e||e!=="/blocks"&&!e.startsWith("/blocks/"))return;let a="/blocks/"+encodeURIComponent(r);a!==e&&t?.(a)},[o,i,r,n,e,t]),null}var Yf=s(D(),1);var _h=s(W(),1),wh=s(O(),1),wG=s($(),1);var{cleanEmptyObject:X6}=N(wG.privateApis);function Y_e(){let{globalStylesId:e,isReady:t,settings:r,styles:o,_links:n}=(0,wh.useSelect)(u=>{let{getEntityRecord:d,getEditedEntityRecord:f,hasFinishedResolution:m,canUser:h}=u(_h.store),g=u(_h.store).__experimentalGetCurrentGlobalStylesId(),v,y=g?h("update",{kind:"root",name:"globalStyles",id:g}):null;g&&typeof y=="boolean"&&(y?v=f("root","globalStyles",g):v=d("root","globalStyles",g,{context:"view"}));let b=!1;return m("__experimentalGetCurrentGlobalStylesId")&&(g?b=y?m("getEditedEntityRecord",["root","globalStyles",g]):m("getEntityRecord",["root","globalStyles",g,{context:"view"}]):b=!0),{globalStylesId:g,isReady:b,settings:v?.settings,styles:v?.styles,_links:v?._links}},[]),{getEditedEntityRecord:i}=(0,wh.useSelect)(_h.store),{editEntityRecord:a}=(0,wh.useDispatch)(_h.store),l=(0,Yf.useMemo)(()=>({settings:r??{},styles:o??{},_links:n??{}}),[r,o,n]),c=(0,Yf.useCallback)((u,d={})=>{let f=i("root","globalStyles",e),m={styles:f?.styles??{},settings:f?.settings??{},_links:f?._links??{}},h=typeof u=="function"?u(m):u;a("root","globalStyles",e,{styles:X6(h.styles)||{},settings:X6(h.settings)||{},_links:X6(h._links)||{}},d)},[e,a,i]);return[t,l,c]}function q_e(){let e=(0,wh.useSelect)(t=>t(_h.store).__experimentalGetCurrentThemeBaseGlobalStyles(),[]);return[!!e,e]}function xo(){let[e,t,r]=Y_e(),[o,n]=q_e();return{merged:(0,Yf.useMemo)(()=>!e||!o?{}:go(n||{},t),[e,o,n,t]),base:n||{},user:t,setUser:r,isReady:e&&o}}function Hu(e,t){let{merged:r}=xo();return(0,Yf.useMemo)(()=>Fy(r,e,t),[r,e,t])}function Q6(e,t){let{merged:r}=xo();return(0,Yf.useMemo)(()=>mf(r,e,t),[r,e,t])}var qf=s(C(),1);function Z_e(){let{styles:e,__unstableResolvedAssets:t,colors:r,gradients:o,__experimentalDiscussionSettings:n,mediaUploadHandler:i,fontLibraryEnabled:a}=(0,CG.useSelect)(u=>{let{getEditorSettings:d}=u(w),{canUser:f}=u(xG.store),m=d(),h=f("create",{kind:"postType",name:"attachment"});return{styles:m?.styles,__unstableResolvedAssets:m?.__unstableResolvedAssets,colors:m?.colors,gradients:m?.gradients,__experimentalDiscussionSettings:m?.__experimentalDiscussionSettings,mediaUploadHandler:h?TG.uploadMedia:void 0,fontLibraryEnabled:m?.fontLibraryEnabled??!0}},[]),l=(0,J6.useMemo)(()=>e?e.filter(u=>!u.isGlobalStyles):[],[e]),c=(0,J6.useMemo)(()=>({__unstableResolvedAssets:t,settings:{color:{palette:{theme:r??[]},gradients:{theme:o??[]},duotone:{theme:[]}}},__experimentalDiscussionSettings:n,mediaUpload:i}),[t,r,o,n,i]);return{serverCSS:l,serverSettings:c,fontLibraryEnabled:a}}function Hx({path:e,onPathChange:t}){let{user:r,base:o,setUser:n,isReady:i}=xo(),{serverCSS:a,serverSettings:l,fontLibraryEnabled:c}=Z_e();return i?(0,qf.jsxs)(qf.Fragment,{children:[(0,qf.jsx)(Z6,{value:r,baseValue:o||{},onChange:n,path:e,onPathChange:t,fontLibraryEnabled:c,serverCSS:a,serverSettings:l}),(0,qf.jsx)(_G,{path:e,onPathChange:t})]}):null}var Gu=s(C(),1);function K_e({template:e,post:t}){let[r="white"]=Hu("color.background"),[o]=(0,Ub.useEntityBlockEditor)("postType",t.type,{id:t.id}),[n]=(0,Ub.useEntityBlockEditor)("postType",e?.type,{id:e?.id}),i=e&&n?n:o,a=!i?.length;return(0,Gu.jsxs)("div",{className:"editor-fields-content-preview",style:{backgroundColor:r},children:[a&&(0,Gu.jsx)("span",{className:"editor-fields-content-preview__empty",children:(0,PG.__)("Empty content")}),!a&&(0,Gu.jsx)($6.BlockPreview.Async,{children:(0,Gu.jsx)($6.BlockPreview,{blocks:i})})]})}function EG({item:e}){let{settings:t,template:r}=(0,kG.useSelect)(o=>{let{canUser:n,getPostType:i,getTemplateId:a,getEntityRecord:l}=N(o(Ub.store)),c=n("read",{kind:"postType",name:"wp_template"}),u=o(w).getEditorSettings(),d=u.supportsTemplateMode,f=i(e.type)?.viewable??!1,m=d&&f&&c?a(e.type,e.id):null;return{settings:u,template:m?l("postType","wp_template",m):void 0}},[e.type,e.id]);return(0,Gu.jsx)(y6,{post:e,settings:t,__unstableTemplate:r,children:(0,Gu.jsx)(K_e,{template:r,post:e})})}var X_e={type:"media",id:"content-preview",label:(0,RG.__)("Content preview"),render:EG,enableSorting:!1},AG=X_e;function Q_e(e){let t=e?.editor;return Array.isArray(t)?!!t[0]?.notes:!1}function J_e(e,t,r){return{type:"REGISTER_ENTITY_ACTION",kind:e,name:t,config:r}}function $_e(e,t,r){return{type:"UNREGISTER_ENTITY_ACTION",kind:e,name:t,actionId:r}}function ewe(e,t,r){return{type:"REGISTER_ENTITY_FIELD",kind:e,name:t,config:r}}function twe(e,t,r){return{type:"UNREGISTER_ENTITY_FIELD",kind:e,name:t,fieldId:r}}function rwe(e,t){return{type:"SET_IS_READY",kind:e,name:t}}var owe=[sI,nI,cI,fI,uI,dI,oI,c_,tI,iI,lI],nwe=e=>async({registry:t})=>{if(N(t.select(w)).isEntityReady("postType",e))return;N(t.dispatch(w)).setIsReady("postType",e);let o=await t.resolveSelect(Gx.store).getPostType(e),n=await t.resolveSelect(Gx.store).canUser("create",{kind:"postType",name:e}),i=await t.resolveSelect(Gx.store).getCurrentTheme(),a=!["wp_block","wp_template_part"].includes(o.slug)&&n&&D5;o.slug!=="wp_template"&&(a=void 0),o.slug==="wp_template"&&!window?.__experimentalTemplateActivate&&(a=void 0);let l=[o.viewable?A5:void 0,o.supports?.revisions?G5:void 0,a,o.slug==="wp_template_part"&&n&&i?.is_block_theme?eI:void 0,n&&o.slug==="wp_block"?V5:void 0,o.supports?.title?M5:void 0,o.supports?.["page-attributes"]?I5:void 0,o.slug==="wp_block"?H5:void 0,q5,L5,J5,K5,Y5].filter(Boolean),c;if(e===ur)c=owe;else if(c=[o.supports?.thumbnail&&i?.theme_supports?.["post-thumbnails"]&&p5,o.supports?.author&&E5,w5,!Jc.includes(o.slug)&&k5,bO,o.supports?.["page-attributes"]&&S5,o.supports?.comments&&x5,o.supports?.trackbacks&&T5,(o.supports?.comments||o.supports?.trackbacks)&&P5,g5,_5,o.supports?.editor&&o.viewable&&AG,Q_e(o.supports)&&R5].filter(Boolean),o.supports?.title){let u;e==="page"?u=CO:e==="wp_template"?u=ny:e==="wp_block"?u=iy:u=c_,c.push(u)}t.batch(()=>{l.forEach(u=>{N(t.dispatch(w)).registerEntityAction("postType",e,u)}),c.forEach(u=>{N(t.dispatch(w)).registerEntityField("postType",e,u)})}),(0,OG.doAction)("core.registerPostTypeSchema",e)};function iwe(e){return{type:"SET_CURRENT_TEMPLATE_ID",id:e}}var swe=e=>async({select:t,dispatch:r,registry:o})=>{let n=await o.dispatch(Co.store).saveEntityRecord("postType","wp_template",e);return o.dispatch(Co.store).editEntityRecord("postType",t.getCurrentPostType(),t.getCurrentPostId(),{template:n.slug}),o.dispatch(Dn.store).createSuccessNotice((0,st.__)("Custom template created. You're in template mode now."),{type:"snackbar",actions:[{label:(0,st.__)("Go back"),onClick:()=>r.setRenderingMode(t.getEditorSettings().defaultRenderingMode)}]}),n},awe=e=>({registry:t})=>{let o=(t.select(Zf.store).get("core","hiddenBlockTypes")??[]).filter(n=>!(Array.isArray(e)?e:[e]).includes(n));t.dispatch(Zf.store).set("core","hiddenBlockTypes",o)},lwe=e=>({registry:t})=>{let r=t.select(Zf.store).get("core","hiddenBlockTypes")??[],o=new Set([...r,...Array.isArray(e)?e:[e]]);t.dispatch(Zf.store).set("core","hiddenBlockTypes",[...o])},cwe=({onSave:e,dirtyEntityRecords:t=[],entitiesToSkip:r=[],close:o,successNoticeContent:n}={})=>({registry:i})=>{let a=[{kind:"postType",name:"wp_navigation"}],l="site-editor-save-success",c=i.select(Co.store).getEntityRecord("root","__unstableBase")?.home;i.dispatch(Dn.store).removeNotice(l);let u=t.filter(({kind:m,name:h,key:g,property:v})=>!r.some(y=>y.kind===m&&y.name===h&&y.key===g&&y.property===v));o?.(u);let d=[],f=[];u.forEach(({kind:m,name:h,key:g,property:v})=>{m==="root"&&h==="site"?d.push(v):(a.some(y=>y.kind===m&&y.name===h)&&i.dispatch(Co.store).editEntityRecord(m,h,g,{status:"publish"}),f.push(i.dispatch(Co.store).saveEditedEntityRecord(m,h,g)))}),d.length&&f.push(i.dispatch(Co.store).__experimentalSaveSpecifiedEntityEdits("root","site",void 0,d)),i.dispatch(IG.store).__unstableMarkLastChangeAsPersistent(),Promise.all(f).then(m=>e?e(m):m).then(m=>{m.some(h=>typeof h>"u")?i.dispatch(Dn.store).createErrorNotice((0,st.__)("Saving failed.")):i.dispatch(Dn.store).createSuccessNotice(n||(0,st.__)("Site updated."),{type:"snackbar",id:l,actions:[{label:(0,st.__)("View site"),url:c,openInNewTab:!0}]})}).catch(m=>i.dispatch(Dn.store).createErrorNotice(`${(0,st.__)("Saving failed.")} ${m}`))},uwe=(e,{allowUndo:t=!0}={})=>async({registry:r})=>{let o="edit-site-template-reverted";if(r.dispatch(Dn.store).removeNotice(o),!e_(e)){r.dispatch(Dn.store).createErrorNotice((0,st.__)("This template is not revertable."),{type:"snackbar"});return}try{let n=r.select(Co.store).getEntityConfig("postType",e.type);if(!n){r.dispatch(Dn.store).createErrorNotice((0,st.__)("The editor has encountered an unexpected error. Please reload."),{type:"snackbar"});return}let i=(0,NG.addQueryArgs)(`${n.baseURL}/${e.id}`,{context:"edit",source:e.origin}),a=await(0,FG.default)({path:i});if(!a){r.dispatch(Dn.store).createErrorNotice((0,st.__)("The editor has encountered an unexpected error. Please reload."),{type:"snackbar"});return}let l=({blocks:d=[]})=>(0,Wx.__unstableSerializeAndClean)(d),c=r.select(Co.store).getEditedEntityRecord("postType",e.type,e.id);r.dispatch(Co.store).editEntityRecord("postType",e.type,e.id,{content:l,blocks:c.blocks,source:"custom"},{undoIgnore:!0});let u=(0,Wx.parse)(a?.content?.raw);if(r.dispatch(Co.store).editEntityRecord("postType",e.type,a.id,{content:l,blocks:u,source:"theme"}),t){let d=()=>{r.dispatch(Co.store).editEntityRecord("postType",e.type,c.id,{content:l,blocks:c.blocks,source:"custom"})};r.dispatch(Dn.store).createSuccessNotice((0,st.__)("Template reset."),{type:"snackbar",id:o,actions:[{label:(0,st.__)("Undo"),onClick:d}]})}}catch(n){let i=n.message&&n.code!=="unknown_error"?n.message:(0,st.__)("Template revert failed. Please reload.");r.dispatch(Dn.store).createErrorNotice(i,{type:"snackbar"})}},dwe=e=>async({registry:t})=>{let r=e.every(n=>n?.has_theme_file),o=await Promise.allSettled(e.map(n=>t.dispatch(Co.store).deleteEntityRecord("postType",n.type,n.id,{force:!0},{throwOnError:!0})));if(o.every(({status:n})=>n==="fulfilled")){let n;if(e.length===1){let i;typeof e[0].title=="string"?i=e[0].title:typeof e[0].title?.rendered=="string"?i=e[0].title?.rendered:typeof e[0].title?.raw=="string"&&(i=e[0].title?.raw),n=r?(0,st.sprintf)((0,st.__)('"%s" reset.'),(0,e3.decodeEntities)(i)):(0,st.sprintf)((0,st._x)('"%s" deleted.',"template part"),(0,e3.decodeEntities)(i))}else n=r?(0,st.__)("Items reset."):(0,st.__)("Items deleted.");t.dispatch(Dn.store).createSuccessNotice(n,{type:"snackbar",id:"editor-template-deleted-success"})}else{let n;if(o.length===1)o[0].reason?.message?n=o[0].reason.message:n=r?(0,st.__)("An error occurred while reverting the item."):(0,st.__)("An error occurred while deleting the item.");else{let i=new Set,a=o.filter(({status:l})=>l==="rejected");for(let l of a)l.reason?.message&&i.add(l.reason.message);i.size===0?n=(0,st.__)("An error occurred while deleting the items."):i.size===1?n=r?(0,st.sprintf)((0,st.__)("An error occurred while reverting the items: %s"),[...i][0]):(0,st.sprintf)((0,st.__)("An error occurred while deleting the items: %s"),[...i][0]):n=r?(0,st.sprintf)((0,st.__)("Some errors occurred while reverting the items: %s"),[...i].join(",")):(0,st.sprintf)((0,st.__)("Some errors occurred while deleting the items: %s"),[...i].join(","))}t.dispatch(Dn.store).createErrorNotice(n,{type:"snackbar"})}},fwe=e=>({select:t,registry:r})=>{let o=t.getCurrentPostType(),n=r.select(Co.store).getCurrentTheme()?.stylesheet,i=r.select(Zf.store).get("core","renderingModes")?.[n]??{};if(i[o]===e)return;let a={[n]:{...i,[o]:e}};r.dispatch(Zf.store).set("core","renderingModes",a)};function mwe(e){return{type:"SET_STYLES_PATH",path:e}}function pwe(e){return{type:"SET_SHOW_STYLEBOOK",show:e}}function hwe(){return{type:"RESET_STYLES_NAVIGATION"}}function gwe(e){return{type:"SET_CANVAS_MIN_HEIGHT",minHeight:e}}function vwe(e){return{type:"SET_CURRENT_REVISION_ID",revisionId:e}}var ywe=e=>async({dispatch:t,select:r,registry:o})=>{let n=r.getCurrentPostType(),i=r.getCurrentPostId(),l=o.select(Co.store).getEntityConfig("postType",n)?.revisionKey||"id",c=await o.resolveSelect(Co.store).getRevisions("postType",n,i,qd(l,e));o.batch(()=>{t({type:"SET_REVISION_PAGE",page:e}),c?.length&&t.setCurrentRevisionId(c[0][l])})};function bwe(e){return{type:"SET_SHOW_REVISION_DIFF",showDiff:e}}var Swe=e=>async({select:t,dispatch:r,registry:o})=>{let n=t.getCurrentPostType(),i=t.getCurrentPostId(),l=o.select(Co.store).getEntityConfig("postType",n)?.revisionKey||"id",c=await o.resolveSelect(Co.store).getRevision("postType",n,i,e,{context:"edit",_fields:[...new Set(["id","date","modified","author","meta","title.raw","excerpt.raw","content.raw",l])].join()});if(!c)return;let u={blocks:void 0,content:c.content.raw};c.title?.raw!==void 0&&(u.title=c.title.raw),c.excerpt?.raw!==void 0&&(u.excerpt=c.excerpt.raw),c.meta!==void 0&&(u.meta=c.meta),r.editPost(u),r.setCurrentRevisionId(null),await r.savePost(),o.dispatch(Dn.store).createSuccessNotice((0,st.sprintf)((0,st.__)("Restored to revision from %s."),(0,Yx.dateI18n)((0,Yx.getSettings)().formats.datetime,c.date)),{type:"snackbar",id:"editor-revision-restored"})};function _we(e,t={focus:!1}){return{type:"SELECT_NOTE",noteId:e,options:t}}var Ay={reducer:LF,selectors:uO,actions:mO},w=(0,qx.createReduxStore)(WF,{...Ay});(0,qx.register)(w);N(w).registerPrivateActions(t3);N(w).registerPrivateSelectors(yO);var jG=s(C(),1),wwe=e=>(0,LG.createHigherOrderComponent)(t=>({attributes:r,setAttributes:o,...n})=>{let i=(0,DG.useSelect)(u=>u(w).getCurrentPostType(),[]),[a,l]=(0,BG.useEntityProp)("postType",i,"meta"),c=(0,MG.useMemo)(()=>({...r,...Object.fromEntries(Object.entries(e).map(([u,d])=>[u,a[d]]))}),[r,a]);return(0,jG.jsx)(t,{attributes:c,setAttributes:u=>{let d=Object.fromEntries(Object.entries(u??{}).filter(([f])=>f in e).map(([f,m])=>[e[f],m]));Object.entries(d).length&&l(d),o(u)},...n})},"withMetaAttributeSource");function xwe(e){let t=Object.fromEntries(Object.entries(e.attributes??{}).filter(([,{source:r}])=>r==="meta").map(([r,{meta:o}])=>[r,o]));return Object.entries(t).length&&(e.edit=wwe(t)(e.edit)),e}(0,VG.addFilter)("blocks.registerBlockType","core/editor/custom-sources-backwards-compatibility/shim-attribute-source",xwe);var tJ=s(mo(),1);var zG=s(D(),1),UG=s(O(),1),HG=s(W(),1),lc=s(C(),1);function Cwe(e){let t=e.avatar_urls&&e.avatar_urls[24]?(0,lc.jsx)("img",{className:"editor-autocompleters__user-avatar",alt:"",src:e.avatar_urls[24]}):(0,lc.jsx)("span",{className:"editor-autocompleters__no-avatar"});return(0,lc.jsxs)(lc.Fragment,{children:[t,(0,lc.jsx)("span",{className:"editor-autocompleters__user-name",children:e.name}),(0,lc.jsx)("span",{className:"editor-autocompleters__user-slug",children:e.slug})]})}var Zx={name:"users",className:"editor-autocompleters__user",triggerPrefix:"@",useItems(e){let t=(0,UG.useSelect)(o=>{let{getUsers:n}=o(HG.store);return n({context:"view",search:encodeURIComponent(e)})},[e]);return[(0,zG.useMemo)(()=>t?t.map(o=>({key:`user-${o.slug}`,value:o,label:Cwe(o)})):[],[t])]},getOptionCompletion(e){return`@${e.slug}`}};var GG=s(D(),1),WG=s(he(),1),Kx=s(O(),1),YG=s(W(),1);var Twe=class extends GG.Component{constructor(e){super(e),this.needsAutosave=!!(e.isDirty&&e.isAutosaveable)}componentDidMount(){this.props.disableIntervalChecks||this.setAutosaveTimer()}componentDidUpdate(e){if(this.props.disableIntervalChecks){this.props.editsReference!==e.editsReference&&this.props.autosave();return}if(this.props.interval!==e.interval&&(clearTimeout(this.timerId),this.setAutosaveTimer()),!this.props.isDirty){this.needsAutosave=!1;return}if(this.props.isAutosaving&&!e.isAutosaving){this.needsAutosave=!1;return}this.props.editsReference!==e.editsReference&&(this.needsAutosave=!0)}componentWillUnmount(){clearTimeout(this.timerId)}setAutosaveTimer(e=this.props.interval*1e3){this.timerId=setTimeout(()=>{this.autosaveTimerHandler()},e)}autosaveTimerHandler(){if(!this.props.isAutosaveable){this.setAutosaveTimer(1e3);return}this.needsAutosave&&(this.needsAutosave=!1,this.props.autosave()),this.setAutosaveTimer()}render(){return null}},Xx=(0,WG.compose)([(0,Kx.withSelect)((e,t)=>{let{getReferenceByDistinctEdits:r}=e(YG.store),{isEditedPostDirty:o,isEditedPostAutosaveable:n,isAutosavingPost:i,getEditorSettings:a}=e(w),{interval:l=a().autosaveInterval}=t;return{editsReference:r(),isDirty:o(),isAutosaveable:n(),isAutosaving:i(),interval:l}}),(0,Kx.withDispatch)((e,t)=>({autosave(){let{autosave:r=e(w).autosave}=t;r()}}))])(Twe);var Xu=s(E(),1),Wb=s(O(),1),ra=s(A(),1),Yb=s($(),1);var EW=s(yo(),1),RW=s(W(),1),AW=s(jI(),1),dC=s(D(),1),OW=s(he(),1),IW=s(ft(),1),NW=s(xh(),1);var r3=s(E(),1),ZG=s(O(),1),KG=s(W(),1);function Qx(e){let{isFrontPage:t,isPostsPage:r}=(0,ZG.useSelect)(o=>{let{canUser:n,getEditedEntityRecord:i}=o(KG.store),a=n("read",{kind:"root",name:"site"})?i("root","site"):void 0,l=parseInt(e,10);return{isFrontPage:a?.page_on_front===l,isPostsPage:a?.page_for_posts===l}});return t?(0,r3.__)("Homepage"):r?(0,r3.__)("Posts Page"):!1}var _W=s(A(),1),wW=s(yo(),1),cC=s(E(),1),Gb=s(O(),1);var uC=s(he(),1),xW=s(lt(),1);var mW=s(D(),1);var cc=s(A(),1),ea=s(E(),1),so=s($(),1),Xf=s(O(),1);var Gt=s(D(),1),iC=s(yo(),1),iW=s(Yd(),1),sW=s(W(),1);var Ht=s(E(),1),Ch=[{slug:"theme-colors",title:(0,Ht.__)("Theme Colors"),origin:"theme",type:"colors"},{slug:"theme-gradients",title:(0,Ht.__)("Theme Gradients"),origin:"theme",type:"gradients"},{slug:"custom-colors",title:(0,Ht.__)("Custom Colors"),origin:"custom",type:"colors"},{slug:"custom-gradients",title:(0,Ht.__)("Custom Gradients"),origin:"custom",type:"gradients"},{slug:"duotones",title:(0,Ht.__)("Duotones"),origin:"theme",type:"duotones"},{slug:"default-colors",title:(0,Ht.__)("Default Colors"),origin:"default",type:"colors"},{slug:"default-gradients",title:(0,Ht.__)("Default Gradients"),origin:"default",type:"gradients"}],Jx=[{slug:"site-identity",title:(0,Ht.__)("Site Identity"),blocks:["core/site-logo","core/site-title","core/site-tagline"]},{slug:"design",title:(0,Ht.__)("Design"),blocks:["core/navigation","core/avatar","core/post-time-to-read"],exclude:["core/home-link","core/navigation-link"]},{slug:"posts",title:(0,Ht.__)("Posts"),blocks:["core/post-title","core/post-excerpt","core/post-author","core/post-author-name","core/post-author-biography","core/post-date","core/post-terms","core/term-description","core/query-title","core/query-no-results","core/query-pagination","core/query-numbers"]},{slug:"comments",title:(0,Ht.__)("Comments"),blocks:["core/comments-title","core/comments-pagination","core/comments-pagination-numbers","core/comments","core/comments-author-name","core/comment-content","core/comment-date","core/comment-edit-link","core/comment-reply-link","core/comment-template","core/post-comments-count","core/post-comments-link"]}],o3=[{slug:"overview",title:(0,Ht.__)("Overview"),blocks:[]},{slug:"text",title:(0,Ht.__)("Text"),blocks:["core/post-content","core/home-link","core/navigation-link"]},{slug:"colors",title:(0,Ht.__)("Colors"),blocks:[]},{slug:"theme",title:(0,Ht.__)("Theme"),subcategories:Jx},{slug:"media",title:(0,Ht.__)("Media"),blocks:["core/post-featured-image"]},{slug:"widgets",title:(0,Ht.__)("Widgets"),blocks:[]},{slug:"embed",title:(0,Ht.__)("Embeds"),include:[]}],Pwe=[...Jx,{slug:"media",title:(0,Ht.__)("Media"),blocks:["core/post-featured-image"]},{slug:"widgets",title:(0,Ht.__)("Widgets"),blocks:[]},{slug:"embed",title:(0,Ht.__)("Embeds"),include:[]}],XG=[{slug:"overview",title:(0,Ht.__)("Overview"),blocks:[]},{slug:"text",title:(0,Ht.__)("Text"),blocks:["core/post-content","core/home-link","core/navigation-link"]},{slug:"colors",title:(0,Ht.__)("Colors"),blocks:[]},{slug:"blocks",title:(0,Ht.__)("All Blocks"),blocks:[],subcategories:Pwe}],kwe=`
.is-root-container {
display: flow-root;
}
`,QG=`
body {
position: relative;
padding: 32px !important;
}
${kwe}
.editor-style-book__examples {
max-width: 1200px;
margin: 0 auto;
}
.editor-style-book__example {
max-width: 900px;
border-radius: 2px;
cursor: pointer;
display: flex;
flex-direction: column;
gap: 40px;
padding: 16px;
width: 100%;
box-sizing: border-box;
scroll-margin-top: 32px;
scroll-margin-bottom: 32px;
margin: 0 auto 40px auto;
}
.editor-style-book__example.is-selected {
box-shadow: 0 0 0 1px var(--wp-components-color-accent, var(--wp-admin-theme-color, #007cba));
}
.editor-style-book__example.is-disabled-example {
pointer-events: none;
}
.editor-style-book__example:focus:not(:disabled) {
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-components-color-accent, var(--wp-admin-theme-color, #007cba));
outline: 3px solid transparent;
}
.editor-style-book__duotone-example > div:first-child {
display: flex;
aspect-ratio: 16 / 9;
grid-row: span 1;
grid-column: span 2;
}
.editor-style-book__duotone-example img {
width: 100%;
height: 100%;
object-fit: cover;
}
.editor-style-book__duotone-example > div:not(:first-child) {
height: 20px;
border: 1px solid color-mix( in srgb, currentColor 10%, transparent );
}
.editor-style-book__color-example {
border: 1px solid color-mix( in srgb, currentColor 10%, transparent );
}
.editor-style-book__subcategory-title,
.editor-style-book__example-title {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
font-size: 13px;
font-weight: normal;
line-height: normal;
margin: 0;
text-align: left;
padding-top: 8px;
border-top: 1px solid color-mix( in srgb, currentColor 10%, transparent );
color: color-mix( in srgb, currentColor 60%, transparent );
}
.editor-style-book__subcategory-title {
font-size: 16px;
margin-bottom: 40px;
padding-bottom: 8px;
}
.editor-style-book__example-preview {
width: 100%;
}
.editor-style-book__example-preview .block-editor-block-list__insertion-point,
.editor-style-book__example-preview .block-list-appender {
display: none;
}
:where(.is-root-container > .wp-block:first-child) {
margin-top: 0;
}
:where(.is-root-container > .wp-block:last-child) {
margin-bottom: 0;
}
`;var JG=s(Xe(),1);function Hb(e,t){if(!e?.slug||!t?.length)return;let r=e?.subcategories??[];if(r.length)return r.reduce((a,l)=>{let c=Hb(l,t);return c&&(a.subcategories||(a.subcategories=[]),a.subcategories=[...a.subcategories,c]),a},{title:e.title,slug:e.slug});let o=e?.blocks||[],n=e?.exclude||[],i=t.filter(a=>!n.includes(a.name)&&(a.category===e.slug||o.includes(a.name)));if(i.length)return{title:e.title,slug:e.slug,examples:i}}function n3(){let e=[...Jx,...o3].map(({slug:o})=>o),r=(0,JG.getCategories)().filter(({slug:o})=>!e.includes(o));return[...o3,...r]}var Ya=s(E(),1),jo=s(Xe(),1);var $G=s(A(),1),$x=s($(),1),i3=s(C(),1),Ewe=({colors:e,type:t,templateColumns:r="1fr 1fr",itemHeight:o="52px"})=>e?(0,i3.jsx)($G.__experimentalGrid,{templateColumns:r,rowGap:8,columnGap:16,children:e.map(n=>{let i=t==="gradients"?(0,$x.__experimentalGetGradientClass)(n.slug):(0,$x.getColorClassName)("background-color",n.slug),a=re("editor-style-book__color-example",i);return(0,i3.jsx)("div",{className:a,style:{height:o}},n.slug)})}):null,s3=Ewe;var a3=s(A(),1),Kf=s(C(),1),Rwe=({duotones:e})=>e?(0,Kf.jsx)(a3.__experimentalGrid,{columns:2,rowGap:16,columnGap:16,children:e.map(t=>(0,Kf.jsxs)(a3.__experimentalGrid,{className:"editor-style-book__duotone-example",columns:2,rowGap:8,columnGap:8,children:[(0,Kf.jsx)("div",{children:(0,Kf.jsx)("img",{alt:`Duotone example: ${t.slug}`,src:"https://s.w.org/images/core/5.3/MtBlanc1.jpg",style:{filter:`url(#wp-duotone-${t.slug})`}})}),t.colors.map(r=>(0,Kf.jsx)("div",{className:"editor-style-book__color-example",style:{backgroundColor:r}},r))]},t.slug))}):null,eW=Rwe;var eC=s(C(),1);function Awe(e){if(!e)return[];let t=[];return Ch.forEach(r=>{let o=e[r.type],n=Array.isArray(o)?o.find(i=>i.slug===r.origin):void 0;if(n?.[r.type]){let i={name:r.slug,title:r.title,category:"colors"};r.type==="duotones"?(i.content=(0,eC.jsx)(eW,{duotones:n[r.type]}),t.push(i)):(i.content=(0,eC.jsx)(s3,{colors:n[r.type],type:r.type}),t.push(i))}}),t}function Owe(e){let t=[],r=Array.isArray(e?.colors)?e.colors.find(i=>i.slug==="theme"):void 0;if(r){let i={name:"theme-colors",title:(0,Ya.__)("Colors"),category:"overview",content:(0,eC.jsx)(s3,{colors:r.colors,type:"colors",templateColumns:"repeat(auto-fill, minmax( 200px, 1fr ))",itemHeight:"32px"})};t.push(i)}let o=[];if((0,jo.getBlockType)("core/heading")){let i=(0,jo.createBlock)("core/heading",{content:(0,Ya.__)("AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz0123456789X{(\u2026)},.-<>?!*&:/A@HELFO\u2122\xA9"),level:1});o.push(i)}if((0,jo.getBlockType)("core/paragraph")){let i=(0,jo.createBlock)("core/paragraph",{content:(0,Ya.__)("A paragraph in a website refers to a distinct block of text that is used to present and organize information. It is a fundamental unit of content in web design and is typically composed of a group of related sentences or thoughts focused on a particular topic or idea. Paragraphs play a crucial role in improving the readability and user experience of a website. They break down the text into smaller, manageable chunks, allowing readers to scan the content more easily.")}),a=(0,jo.createBlock)("core/paragraph",{content:(0,Ya.__)("Additionally, paragraphs help structure the flow of information and provide logical breaks between different concepts or pieces of information. In terms of formatting, paragraphs in websites are commonly denoted by a vertical gap or indentation between each block of text. This visual separation helps visually distinguish one paragraph from another, creating a clear and organized layout that guides the reader through the content smoothly.")});if((0,jo.getBlockType)("core/group")){let l=(0,jo.createBlock)("core/group",{layout:{type:"grid",columnCount:2,minimumColumnWidth:"12rem"},style:{spacing:{blockGap:"1.5rem"}}},[i,a]);o.push(l)}else o.push(i)}return o.length&&t.push({name:"typography",title:(0,Ya.__)("Typography"),category:"overview",blocks:o}),["core/image","core/separator","core/buttons","core/pullquote","core/search"].forEach(i=>{let a=(0,jo.getBlockType)(i);if(a&&a.example){let l={name:i,title:a.title,category:"overview",blocks:(0,jo.getBlockFromExample)(i,{...a.example,attributes:{...a.example.attributes,style:void 0}})};t.push(l)}}),t}function l3(e){let t=(0,jo.getBlockTypes)().filter(a=>{let{name:l,example:c,supports:u}=a;return l!=="core/heading"&&!!c&&u?.inserter!==!1}).map(a=>({name:a.name,title:a.title,category:a.category,blocks:(0,jo.getBlockFromExample)(a.name,{...a.example,attributes:{...a.example.attributes,style:void 0}})}));if(!!!(0,jo.getBlockType)("core/heading"))return t;let o={name:"core/heading",title:(0,Ya.__)("Headings"),category:"text",blocks:[1,2,3,4,5,6].map(a=>(0,jo.createBlock)("core/heading",{content:(0,Ya.sprintf)((0,Ya.__)("Heading %d"),a),level:a}))},n=Awe(e),i=Owe(e);return[o,...n,...t,...i]}var nW=s(D(),1),rC=s(O(),1);var tC=s(Xe(),1),tW=s(O(),1),rW=s(D(),1);function Th(e={},t=!1){let o=Q6("spacing.blockGap")!==null,n=!o,{disableLayoutStyles:i,getBlockStyles:a}=(0,tW.useSelect)(l=>{let{getEditorSettings:c}=l(w),{getBlockStyles:u}=l(tC.store);return{disableLayoutStyles:!!c()?.disableLayoutStyles,getBlockStyles:u}},[]);return(0,rW.useMemo)(()=>{if(!e?.styles||!e?.settings)return[[],{}];let l=(0,tC.getBlockTypes)();return jy(e,l,{hasBlockGapSupport:o,hasFallbackGapSupport:n,disableLayoutStyles:i,disableRootPadding:t,getBlockStyles:a})},[o,n,e,i,t,a])}function oW(e=!1){let{merged:t}=xo();return Th(t,e)}function Iwe(e){let[t,r]=oW(e),{getEditorSettings:o}=(0,rC.useSelect)(w),{updateEditorSettings:n}=(0,rC.useDispatch)(w);(0,nW.useEffect)(()=>{if(!t||!r)return;let i=o(),a=Object.values(i.styles??[]).filter(l=>!l.isGlobalStyles);n({...i,styles:[...a,...t],__experimentalFeatures:r})},[t,r,n,o])}function oC({disableRootPadding:e}){return Iwe(e),null}var ot=s(C(),1),{ExperimentalBlockEditorProvider:Nwe}=N(so.privateApis),{Tabs:nC}=N(cc.privateApis);function Wu(e){return!e||Object.keys(e).length===0}var Fwe=(e,t)=>{if(!e||!t||!t?.contentDocument)return;let r=e==="top"?t.contentDocument.body:t.contentDocument.getElementById(e);r&&r.scrollIntoView({behavior:"smooth"})},aW=e=>e&&typeof e=="string"&&(e==="/"||e.startsWith("/typography")||e.startsWith("/colors")||e.startsWith("/blocks"))?{top:!0}:null;function lW(){let{colors:e,gradients:t}=(0,so.__experimentalUseMultipleOriginColorsAndGradients)(),[r,o,n,i]=(0,so.useSettings)("color.defaultDuotone","color.duotone.custom","color.duotone.theme","color.duotone.default");return(0,Gt.useMemo)(()=>{let l={colors:e,gradients:t,duotones:[]};return n&&n.length&&l.duotones.push({name:(0,ea._x)("Theme","Indicates these duotone filters come from the theme."),slug:"theme",duotones:n}),r&&i&&i.length&&l.duotones.push({name:(0,ea._x)("Default","Indicates these duotone filters come from WordPress."),slug:"default",duotones:i}),o&&o.length&&l.duotones.push({name:(0,ea._x)("Custom","Indicates these doutone filters are created by the user."),slug:"custom",duotones:o}),l},[e,t,o,n,i,r])}function cW(e){let t=[],r=Hb({slug:"overview"},e);t.push(...r.examples);let o=e.filter(n=>n.category!=="overview"&&!r.examples.find(i=>i.name===n.name));return t.push(...o),t}function Dwe(e,t){return t?e.map(r=>({...r,variation:t,blocks:Array.isArray(r.blocks)?r.blocks.map(o=>({...o,attributes:{...o.attributes,style:void 0,className:`is-style-${t}`}})):{...r.blocks,attributes:{...r.blocks.attributes,style:void 0,className:`is-style-${t}`}}})):e}function Bwe({isSelected:e,onClick:t,onSelect:r,showTabs:o=!0,userConfig:n={},path:i=""},a){let l=Hu("color.text"),c=Hu("color.background"),u=lW(),d=(0,Gt.useMemo)(()=>l3(u),[u]),f=(0,Gt.useMemo)(()=>n3().filter(S=>d.some(x=>x.category===S.slug)),[d]),m=cW(d),{base:h}=xo(),g=aW(i),v=(0,Gt.useMemo)(()=>!Wu(n)&&!Wu(h)?go(h,n):{},[h,n]),y=(0,Xf.useSelect)(S=>S(so.store).getSettings(),[]),[b]=Th(v),_=(0,Gt.useMemo)(()=>({...y,styles:!Wu(b)&&!Wu(n)?b:y.styles,isPreviewMode:!0}),[b,y,n]);return(0,ot.jsx)("div",{ref:a,className:re("editor-style-book",{"is-button":!!t}),style:{color:l,background:c},children:o?(0,ot.jsxs)(nC,{children:[(0,ot.jsx)("div",{className:"editor-style-book__tablist-container",children:(0,ot.jsx)(nC.TabList,{children:f.map(S=>(0,ot.jsx)(nC.Tab,{tabId:S.slug,children:S.title},S.slug))})}),f.map(S=>{let x=S.slug?n3().find(R=>R.slug===S.slug):null,T=x?Hb(x,d):{examples:d};return(0,ot.jsx)(nC.TabPanel,{tabId:S.slug,focusable:!1,className:"editor-style-book__tabpanel",children:(0,ot.jsx)(c3,{category:S.slug,examples:T,isSelected:e,onSelect:r,settings:_,title:S.title,goTo:g})},S.slug)})]}):(0,ot.jsx)(c3,{examples:{examples:m},isSelected:e,onClick:t,onSelect:r,settings:_,goTo:g})})}var uW=({userConfig:e={},isStatic:t=!1,path:r,onPathChange:o,settings:n})=>{let i=(0,Xf.useSelect)(L=>n??L(w).getEditorSettings(),[n]),a=(0,Xf.useSelect)(L=>L(sW.store).canUser("create",{kind:"postType",name:"attachment"}),[]);(0,Gt.useEffect)(()=>{(0,Xf.dispatch)(so.store).updateSettings({...i,mediaUpload:a?iW.uploadMedia:void 0})},[i,a]);let[l,c]=(0,Gt.useState)("/"),u=r??l,d=o??c,f=L=>u===`/blocks/${encodeURIComponent(L)}`||u.startsWith(`/blocks/${encodeURIComponent(L)}/`),m=(L,M=!1)=>{if(Ch.find(k=>k.slug===L)){d("/colors/palette");return}if(L==="typography"){d("/typography");return}M||d(`/blocks/${encodeURIComponent(L)}`)},h=lW(),g=l3(h),v=cW(g),y=null,b=null;if(u.includes("/colors"))y="colors";else if(u.includes("/typography"))y="text";else if(u.includes("/blocks")){y="blocks";let L=decodeURIComponent(u).split("/blocks/")[1];L?.includes("/variations")&&([L,b]=L.split("/variations/")),L&&g.find(M=>M.name===L)&&(y=L)}else t||(y="overview");let _=XG.find(L=>L.slug===y),S=(0,Gt.useMemo)(()=>_?Hb(_,g):{examples:[g.find(L=>L.name===y)]},[_,g,y]),x=(0,Gt.useMemo)(()=>y?b?{examples:Dwe(S.examples,b)}:S:{examples:v},[y,v,b,S]),{base:T}=xo(),R=aW(u),F=(0,Gt.useMemo)(()=>!Wu(e)&&!Wu(T)?go(T,e):{},[T,e]),[B]=Th(F),z=(0,Gt.useMemo)(()=>({...i,styles:!Wu(B)&&!Wu(e)?B:i.styles,isPreviewMode:!0}),[B,i,e]);return(0,ot.jsx)("div",{className:"editor-style-book",children:(0,ot.jsxs)(so.BlockEditorProvider,{settings:z,children:[(0,ot.jsx)(oC,{disableRootPadding:!0}),(0,ot.jsx)(c3,{examples:x,settings:z,goTo:R,isSelected:t?null:f,onSelect:t?null:m})]})})},c3=({examples:e,isSelected:t,onClick:r,onSelect:o,settings:n,title:i,goTo:a})=>{let[l,c]=(0,Gt.useState)(!1),[u,d]=(0,Gt.useState)(!1),f=(0,Gt.useRef)(null),m={role:"button",onFocus:()=>c(!0),onBlur:()=>c(!1),onKeyDown:g=>{if(g.defaultPrevented)return;let{keyCode:v}=g;r&&(v===iC.ENTER||v===iC.SPACE)&&(g.preventDefault(),r(g))},onClick:g=>{g.defaultPrevented||r&&(g.preventDefault(),r(g))},readonly:!0},h=()=>d(!0);return(0,Gt.useLayoutEffect)(()=>{u&&f.current&&a?.top&&Fwe("top",f.current)},[a?.top,u]),(0,ot.jsxs)(so.__unstableIframe,{onLoad:h,ref:f,className:re("editor-style-book__iframe",{"is-focused":l&&!!r,"is-button":!!r}),name:"style-book-canvas",tabIndex:0,...r?m:{},children:[(0,ot.jsx)(so.__unstableEditorStyles,{styles:n.styles}),(0,ot.jsxs)("style",{children:[QG,!!r&&"body { cursor: pointer; } body * { pointer-events: none; }"]}),(0,ot.jsx)(Mwe,{className:"editor-style-book__examples",filteredExamples:e,label:i?(0,ea.sprintf)((0,ea.__)("Examples of blocks in the %s category"),i):(0,ea.__)("Examples of blocks"),isSelected:t,onSelect:o},i)]})},Mwe=(0,Gt.memo)(({className:e,filteredExamples:t,label:r,isSelected:o,onSelect:n})=>(0,ot.jsxs)(cc.Composite,{orientation:"vertical",className:e,"aria-label":r,role:"grid",children:[!!t?.examples?.length&&t.examples.map(i=>(0,ot.jsx)(dW,{id:`example-${i.name}`,title:i.title,content:i.content,blocks:i.blocks,isSelected:o?.(i.name),onClick:n?()=>n(i.name,!!i.variation):null},i.name)),!!t?.subcategories?.length&&t.subcategories.map(i=>(0,ot.jsxs)(cc.Composite.Group,{className:"editor-style-book__subcategory",children:[(0,ot.jsx)(cc.Composite.GroupLabel,{children:(0,ot.jsx)("h2",{className:"editor-style-book__subcategory-title",children:i.title})}),(0,ot.jsx)(Lwe,{examples:i.examples,isSelected:o,onSelect:n})]},`subcategory-${i.slug}`))]})),Lwe=({examples:e,isSelected:t,onSelect:r})=>!!e?.length&&e.map(o=>(0,ot.jsx)(dW,{id:`example-${o.name}`,title:o.title,content:o.content,blocks:o.blocks,isSelected:t?.(o.name),onClick:r?()=>r(o.name):null},o.name)),Vwe=["example-duotones"],dW=({id:e,title:t,blocks:r,isSelected:o,onClick:n,content:i})=>{let a=(0,Xf.useSelect)(d=>d(so.store).getSettings(),[]),l=(0,Gt.useMemo)(()=>({...a,focusMode:!1,isPreviewMode:!0}),[a]),c=(0,Gt.useMemo)(()=>Array.isArray(r)?r:[r],[r]),u=Vwe.includes(e)||!n?{disabled:!0,accessibleWhenDisabled:!!n}:{};return(0,ot.jsx)("div",{role:"row",children:(0,ot.jsx)("div",{role:"gridcell",children:(0,ot.jsxs)(cc.Composite.Item,{className:re("editor-style-book__example",{"is-selected":o,"is-disabled-example":!!u?.disabled}),id:e,"aria-label":n?(0,ea.sprintf)((0,ea.__)("Open %s styles in Styles panel"),t):void 0,render:(0,ot.jsx)("div",{}),role:n?"button":null,onClick:n,...u,children:[(0,ot.jsx)("span",{className:"editor-style-book__example-title",children:t}),(0,ot.jsx)("div",{className:"editor-style-book__example-preview","aria-hidden":!0,children:(0,ot.jsx)(cc.Disabled,{className:"editor-style-book__example-preview__content",children:i||(0,ot.jsxs)(Nwe,{value:c,settings:l,children:[(0,ot.jsx)(so.__unstableEditorStyles,{}),(0,ot.jsx)(so.BlockList,{renderAppender:!1})]})})})]})})})},fW=(0,Gt.forwardRef)(Bwe);var pW=s(C(),1);function jwe({path:e,onPathChange:t},r){return(0,pW.jsx)(fW,{ref:r,isSelected:o=>e===`/blocks/${encodeURIComponent(o)}`||e?.startsWith(`/blocks/${encodeURIComponent(o)}/`),onSelect:o=>{if(Ch.find(n=>n.slug===o)){t?.("/colors/palette");return}if(o==="typography"){t?.("/typography");return}t?.("/blocks/"+encodeURIComponent(o))}})}var hW=(0,mW.forwardRef)(jwe);var gW=s(A(),1),ta=s($(),1),u3=s(O(),1),Yu=s(D(),1);var uc=s(C(),1),{ExperimentalBlockEditorProvider:zwe,__unstableBlockStyleVariationOverridesWithConfig:Uwe}=N(ta.privateApis);function sC(e){return!e||Object.keys(e).length===0}function Hwe({path:e},t){let r=(0,u3.useSelect)(y=>y(ta.store).getBlocks(),[]),{user:o,base:n}=xo(),{revisions:i,isLoading:a}=Lb(),l=(0,Yu.useMemo)(()=>{let y=e?.match(/^\/revisions\/(.+)$/);return y?y[1]:null},[e]),u=(0,Yu.useMemo)(()=>!l||!i.length?null:i.find(y=>String(y.id)===String(l)),[l,i])||o,d=(0,Yu.useMemo)(()=>!sC(u)&&!sC(n)?go(n,u):{},[n,u]),f=(0,Yu.useMemo)(()=>Array.isArray(r)?r:[r],[r]),m=(0,u3.useSelect)(y=>y(ta.store).getSettings(),[]),h=(0,Yu.useMemo)(()=>({...m,isPreviewMode:!0}),[m]),[g]=Th(d),v=!sC(g)&&!sC(u)?g:h.styles;return a?null:(0,uc.jsxs)(ta.__unstableIframe,{ref:t,className:"editor-revisions__iframe",name:"revisions",tabIndex:0,children:[(0,uc.jsx)("style",{children:".is-root-container { display: flow-root; }"}),(0,uc.jsx)(gW.Disabled,{className:"editor-revisions__example-preview__content",children:(0,uc.jsxs)(zwe,{value:f,settings:h,children:[(0,uc.jsx)(ta.BlockList,{renderAppender:!1}),(0,uc.jsx)(ta.__unstableEditorStyles,{styles:v}),(0,uc.jsx)(Uwe,{config:d})]})})]})}var vW=(0,Yu.forwardRef)(Hwe);var kh=s(D(),1),SW=s(A(),1);var aC=s(E(),1),qu=s(yo(),1),Ph=s(A(),1),Zu=s(C(),1),yW=20;function d3({direction:e,resizeWidthBy:t}){function r(i){let{keyCode:a}=i;a!==qu.LEFT&&a!==qu.RIGHT||(i.preventDefault(),e==="left"&&a===qu.LEFT||e==="right"&&a===qu.RIGHT?t(yW):(e==="left"&&a===qu.RIGHT||e==="right"&&a===qu.LEFT)&&t(-yW))}let o={active:{opacity:1,scaleY:1.3}},n=`resizable-editor__resize-help-${e}`;return(0,Zu.jsxs)(Zu.Fragment,{children:[(0,Zu.jsx)(Ph.Tooltip,{text:(0,aC.__)("Drag to resize"),children:(0,Zu.jsx)(Ph.__unstableMotion.button,{className:`editor-resizable-editor__resize-handle is-${e}`,"aria-label":(0,aC.__)("Drag to resize"),"aria-describedby":n,onKeyDown:r,variants:o,whileFocus:"active",whileHover:"active",whileTap:"active",role:"separator","aria-orientation":"vertical"},"handle")}),(0,Zu.jsx)(Ph.VisuallyHidden,{id:n,children:(0,aC.__)("Use left and right arrow keys to resize the canvas.")})]})}var lC=s(C(),1),bW={position:void 0,userSelect:void 0,cursor:void 0,width:void 0,height:void 0,top:void 0,right:void 0,bottom:void 0,left:void 0};function Gwe({className:e,enableResizing:t,height:r,children:o}){let[n,i]=(0,kh.useState)("100%"),a=(0,kh.useRef)(),l=(0,kh.useCallback)(c=>{a.current&&i(a.current.offsetWidth+c)},[]);return(0,lC.jsx)(SW.ResizableBox,{className:re("editor-resizable-editor",e,{"is-resizable":t}),ref:c=>{a.current=c?.resizable},size:{width:t?n:"100%",height:t&&r?r:"100%"},onResizeStop:(c,u,d)=>{i(d.style.width)},minWidth:300,maxWidth:"100%",maxHeight:"100%",enable:{left:t,right:t},showHandle:t,resizeRatio:2,handleComponent:{left:(0,lC.jsx)(d3,{direction:"left",resizeWidthBy:l}),right:(0,lC.jsx)(d3,{direction:"right",resizeWidthBy:l})},handleClasses:void 0,handleStyles:{left:bW,right:bW},children:o})}var Eh=Gwe;var Ku=s(C(),1);function f3(e,t){return t?(0,cC.__)("Style Book"):e?.startsWith("/revisions")?(0,cC.__)("Style Revisions"):""}function CW(){let{stylesPath:e,showStylebook:t,showListViewByDefault:r}=(0,Gb.useSelect)(m=>{let{getStylesPath:h,getShowStylebook:g}=N(m(w)),v=m(xW.store).get("core","showListViewByDefault");return{stylesPath:h(),showStylebook:g(),showListViewByDefault:v}},[]),{resetStylesNavigation:o,setStylesPath:n}=N((0,Gb.useDispatch)(w)),{setIsListViewOpened:i}=(0,Gb.useDispatch)(w),a=(0,uC.useFocusOnMount)("firstElement"),l=(0,uC.useFocusReturn)(),c=null;t?c=(0,Ku.jsx)(hW,{path:e,onPathChange:n,ref:l}):e?.startsWith("/revisions")&&(c=(0,Ku.jsx)(vW,{path:e,ref:l}));let u=f3(e,t),d=()=>{i(r),o()};return(0,Ku.jsx)("div",{className:"editor-styles-canvas",children:(0,Ku.jsx)(Eh,{enableResizing:!1,children:(0,Ku.jsxs)("section",{className:"editor-styles-canvas__section",ref:a,onKeyDown:m=>{m.keyCode===wW.ESCAPE&&!m.defaultPrevented&&(m.preventDefault(),d())},"aria-label":u,children:[(0,Ku.jsx)(_W.Button,{size:"compact",className:"editor-styles-canvas__close-button",icon:Kn,label:(0,cC.__)("Close"),onClick:d}),c]})})})}var TW=s(O(),1),m3=s(ft(),1),p3=s($(),1),PW=s(W(),1);function kW(){return(0,TW.useSelect)(e=>{let{getBlockAttributes:t,getBlockName:r,__experimentalGetParsedPattern:o}=e(p3.store),{getEditedEntityRecord:n,getCurrentTheme:i}=e(PW.store),{getEditedContentOnlySection:a}=N(e(p3.store)),l=a();if(!l)return null;let c=t(l),u=c?.metadata?.patternName;if(u){let f=typeof o=="function"?o(u):null;return{patternName:u,patternTitle:f?.title||c?.metadata?.name,type:"pattern"}}let d=r(l);if(d==="core/block"&&c?.ref){let f=n("postType","wp_block",c.ref);if(f?.title)return{patternName:c.ref,patternTitle:(0,m3.decodeEntities)(f.title),type:"synced-pattern"}}if(d==="core/template-part"&&c?.slug){let f=c.theme||i()?.stylesheet,m=f?`${f}//${c.slug}`:null;if(m){let h=n("postType","wp_template_part",m);if(h?.title)return{patternName:c.slug,patternTitle:(0,m3.decodeEntities)(h.title),type:"template-part"}}}return null},[])}var ln=s(C(),1),Wwe=ra.__unstableMotion.create(ra.Button);function fC(e){let{stopEditingContentOnlySection:t}=N((0,Wb.useDispatch)(Yb.store)),r=kW(),{postId:o,postType:n,postTypeLabel:i,documentTitle:a,isNotFound:l,templateTitle:c,onNavigateToPreviousEntityRecord:u,isTemplatePreview:d,stylesCanvasTitle:f}=(0,Wb.useSelect)(R=>{let{getCurrentPostType:F,getCurrentPostId:B,getEditorSettings:z,getRenderingMode:L}=R(w),{getEditedEntityRecord:M,getPostType:k,getCurrentTheme:I,isResolving:U}=R(RW.store),G=F(),Y=B(),Z=M("postType",G,Y),{default_template_types:V=[]}=I()??{},j=Zi({templateTypes:V,template:Z}),H=k(G)?.labels?.singular_name,{getStylesPath:X,getShowStylebook:ae}=N(R(w)),ne=X(),ue=ae(),Ye=f3(ne,ue);return{postId:Y,postType:G,postTypeLabel:H,documentTitle:Z.title,isNotFound:!Z&&!U("getEditedEntityRecord","postType",G,Y),templateTitle:j.title,onNavigateToPreviousEntityRecord:z().onNavigateToPreviousEntityRecord,isTemplatePreview:L()==="template-locked",stylesCanvasTitle:Ye}},[]),{open:m}=(0,Wb.useDispatch)(AW.store),h=(0,OW.useReducedMotion)(),g=sR.includes(n),v=!!u||!!r,y=g?c:a,b=r?.patternTitle||e.title||f||y,_=e.icon,S=R=>{R.stopPropagation(),r?t():u&&u()},x=Qx(o),T=(0,dC.useRef)(!1);return(0,dC.useEffect)(()=>{T.current=!0},[]),(0,ln.jsxs)("div",{className:re("editor-document-bar",{"has-back-button":v}),children:[(0,ln.jsx)(ra.__unstableAnimatePresence,{children:v&&(0,ln.jsx)(Wwe,{className:"editor-document-bar__back",icon:(0,Xu.isRTL)()?CR:_R,onClick:S,size:"compact",initial:T.current?{opacity:0,transform:"translateX(15%)"}:!1,animate:{opacity:1,transform:"translateX(0%)"},exit:{opacity:0,transform:"translateX(15%)"},transition:h?{duration:0}:void 0,children:(0,Xu.__)("Back")})}),!g&&d&&!v&&(0,ln.jsx)(Yb.BlockIcon,{icon:Bs,className:"editor-document-bar__icon-layout"}),l?(0,ln.jsx)(ra.__experimentalText,{children:(0,Xu.__)("Document not found")}):(0,ln.jsxs)(ra.Button,{className:"editor-document-bar__command",onClick:()=>m(),size:"compact",children:[(0,ln.jsxs)(ra.__unstableMotion.div,{className:"editor-document-bar__title",initial:T.current?{opacity:0,transform:v?"translateX(15%)":"translateX(-15%)"}:!1,animate:{opacity:1,transform:"translateX(0%)"},transition:h?{duration:0}:void 0,children:[_&&(0,ln.jsx)(Yb.BlockIcon,{icon:_}),(0,ln.jsxs)(ra.__experimentalText,{size:"body",as:"h1",children:[(0,ln.jsx)("span",{className:"editor-document-bar__post-title",children:b?(0,NW.__unstableStripHTML)(b):(0,Xu.__)("No title")}),r&&(0,ln.jsx)("span",{className:"editor-document-bar__post-type-label",children:r.type==="template-part"?`\xB7 ${(0,Xu.__)("Template Part")}`:`\xB7 ${(0,Xu.__)("Pattern")}`}),!r&&x&&(0,ln.jsx)("span",{className:"editor-document-bar__post-type-label",children:`\xB7 ${x}`}),!r&&i&&!e.title&&!x&&(0,ln.jsx)("span",{className:"editor-document-bar__post-type-label",children:`\xB7 ${(0,IW.decodeEntities)(i)}`})]})]},v),(0,ln.jsx)("span",{className:"editor-document-bar__shortcut",children:EW.displayShortcut.primary("k")})]})]})}var Jf=s(E(),1),Rh=s(O(),1),pC=s(D(),1),hC=s(Wy(),1),mC=s($(),1),FW=s(W(),1),To=s(A(),1);var Qf=s(C(),1),Ywe=({children:e,isValid:t,isDisabled:r,level:o,href:n,onSelect:i})=>{function a(l){if(r){l.preventDefault();return}i()}return(0,Qf.jsx)("li",{className:re("document-outline__item",`is-${o.toLowerCase()}`,{"is-invalid":!t,"is-disabled":r}),children:(0,Qf.jsxs)("a",{href:n,className:"document-outline__button","aria-disabled":r,onClick:a,children:[(0,Qf.jsx)("span",{className:"document-outline__emdash","aria-hidden":"true"}),(0,Qf.jsx)("strong",{className:"document-outline__level",children:o}),(0,Qf.jsx)("span",{className:"document-outline__item-content",children:e})]})})},h3=Ywe;var Ct=s(C(),1),qwe=(0,Ct.jsx)("em",{children:(0,Jf.__)("(Empty heading)")}),Zwe=[(0,Ct.jsx)("br",{},"incorrect-break"),(0,Ct.jsx)("em",{children:(0,Jf.__)("(Incorrect heading level)")},"incorrect-message")],Kwe=[(0,Ct.jsx)("br",{},"incorrect-break-h1"),(0,Ct.jsx)("em",{children:(0,Jf.__)("(Your theme may already use a H1 for the post title)")},"incorrect-message-h1")],Xwe=[(0,Ct.jsx)("br",{},"incorrect-break-multiple-h1"),(0,Ct.jsx)("em",{children:(0,Jf.__)("(Multiple H1 headings are not recommended)")},"incorrect-message-multiple-h1")];function Qwe(){return(0,Ct.jsxs)(To.SVG,{width:"138",height:"148",viewBox:"0 0 138 148",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Ct.jsx)(To.Rect,{width:"138",height:"148",rx:"4",fill:"#F0F6FC"}),(0,Ct.jsx)(To.Line,{x1:"44",y1:"28",x2:"24",y2:"28",stroke:"#DDDDDD"}),(0,Ct.jsx)(To.Rect,{x:"48",y:"16",width:"27",height:"23",rx:"4",fill:"#DDDDDD"}),(0,Ct.jsx)(To.Path,{d:"M54.7585 32V23.2727H56.6037V26.8736H60.3494V23.2727H62.1903V32H60.3494V28.3949H56.6037V32H54.7585ZM67.4574 23.2727V32H65.6122V25.0241H65.5611L63.5625 26.277V24.6406L65.723 23.2727H67.4574Z",fill:"black"}),(0,Ct.jsx)(To.Line,{x1:"55",y1:"59",x2:"24",y2:"59",stroke:"#DDDDDD"}),(0,Ct.jsx)(To.Rect,{x:"59",y:"47",width:"29",height:"23",rx:"4",fill:"#DDDDDD"}),(0,Ct.jsx)(To.Path,{d:"M65.7585 63V54.2727H67.6037V57.8736H71.3494V54.2727H73.1903V63H71.3494V59.3949H67.6037V63H65.7585ZM74.6605 63V61.6705L77.767 58.794C78.0313 58.5384 78.2528 58.3082 78.4318 58.1037C78.6136 57.8991 78.7514 57.6989 78.8452 57.5028C78.9389 57.304 78.9858 57.0895 78.9858 56.8594C78.9858 56.6037 78.9276 56.3835 78.8111 56.1989C78.6946 56.0114 78.5355 55.8679 78.3338 55.7685C78.1321 55.6662 77.9034 55.6151 77.6477 55.6151C77.3807 55.6151 77.1477 55.669 76.9489 55.777C76.75 55.8849 76.5966 56.0398 76.4886 56.2415C76.3807 56.4432 76.3267 56.6832 76.3267 56.9616H74.5753C74.5753 56.3906 74.7045 55.8949 74.9631 55.4744C75.2216 55.054 75.5838 54.7287 76.0497 54.4986C76.5156 54.2685 77.0526 54.1534 77.6605 54.1534C78.2855 54.1534 78.8295 54.2642 79.2926 54.4858C79.7585 54.7045 80.1207 55.0085 80.3793 55.3977C80.6378 55.7869 80.767 56.233 80.767 56.7358C80.767 57.0653 80.7017 57.3906 80.571 57.7116C80.4432 58.0327 80.2145 58.3892 79.8849 58.7812C79.5554 59.1705 79.0909 59.6378 78.4915 60.1832L77.2173 61.4318V61.4915H80.8821V63H74.6605Z",fill:"black"}),(0,Ct.jsx)(To.Line,{x1:"80",y1:"90",x2:"24",y2:"90",stroke:"#DDDDDD"}),(0,Ct.jsx)(To.Rect,{x:"84",y:"78",width:"30",height:"23",rx:"4",fill:"#F0B849"}),(0,Ct.jsx)(To.Path,{d:"M90.7585 94V85.2727H92.6037V88.8736H96.3494V85.2727H98.1903V94H96.3494V90.3949H92.6037V94H90.7585ZM99.5284 92.4659V91.0128L103.172 85.2727H104.425V87.2841H103.683L101.386 90.919V90.9872H106.564V92.4659H99.5284ZM103.717 94V92.0227L103.751 91.3793V85.2727H105.482V94H103.717Z",fill:"black"}),(0,Ct.jsx)(To.Line,{x1:"66",y1:"121",x2:"24",y2:"121",stroke:"#DDDDDD"}),(0,Ct.jsx)(To.Rect,{x:"70",y:"109",width:"29",height:"23",rx:"4",fill:"#DDDDDD"}),(0,Ct.jsx)(To.Path,{d:"M76.7585 125V116.273H78.6037V119.874H82.3494V116.273H84.1903V125H82.3494V121.395H78.6037V125H76.7585ZM88.8864 125.119C88.25 125.119 87.6832 125.01 87.1861 124.791C86.6918 124.57 86.3011 124.266 86.0142 123.879C85.7301 123.49 85.5838 123.041 85.5753 122.533H87.4332C87.4446 122.746 87.5142 122.933 87.642 123.095C87.7727 123.254 87.946 123.378 88.1619 123.466C88.3778 123.554 88.6207 123.598 88.8906 123.598C89.1719 123.598 89.4205 123.548 89.6364 123.449C89.8523 123.349 90.0213 123.212 90.1435 123.036C90.2656 122.859 90.3267 122.656 90.3267 122.426C90.3267 122.193 90.2614 121.987 90.1307 121.808C90.0028 121.626 89.8182 121.484 89.5767 121.382C89.3381 121.28 89.054 121.229 88.7244 121.229H87.9105V119.874H88.7244C89.0028 119.874 89.2486 119.825 89.4616 119.729C89.6776 119.632 89.8452 119.499 89.9645 119.328C90.0838 119.155 90.1435 118.953 90.1435 118.723C90.1435 118.504 90.0909 118.312 89.9858 118.148C89.8835 117.98 89.7386 117.849 89.5511 117.756C89.3665 117.662 89.1506 117.615 88.9034 117.615C88.6534 117.615 88.4247 117.661 88.2173 117.751C88.0099 117.839 87.8438 117.966 87.7188 118.131C87.5938 118.295 87.527 118.489 87.5185 118.71H85.75C85.7585 118.207 85.902 117.764 86.1804 117.381C86.4588 116.997 86.8338 116.697 87.3054 116.482C87.7798 116.263 88.3153 116.153 88.9119 116.153C89.5142 116.153 90.0412 116.263 90.4929 116.482C90.9446 116.7 91.2955 116.996 91.5455 117.368C91.7983 117.737 91.9233 118.152 91.9205 118.612C91.9233 119.101 91.7713 119.509 91.4645 119.835C91.1605 120.162 90.7642 120.369 90.2756 120.457V120.526C90.9176 120.608 91.4063 120.831 91.7415 121.195C92.0795 121.555 92.2472 122.007 92.2443 122.55C92.2472 123.047 92.1037 123.489 91.8139 123.875C91.527 124.261 91.1307 124.565 90.625 124.787C90.1193 125.009 89.5398 125.119 88.8864 125.119Z",fill:"black"})]})}var Jwe=(e=[])=>e.filter(t=>t.name==="core/heading").map(t=>({...t,level:t.attributes.level,isEmpty:$we(t)})),$we=e=>!e.attributes.content||e.attributes.content.trim().length===0;function Ah({onSelect:e,hasOutlineItemsDisabled:t}){let{selectBlock:r}=(0,Rh.useDispatch)(mC.store),{title:o,isTitleSupported:n}=(0,Rh.useSelect)(g=>{let{getEditedPostAttribute:v}=g(w),{getPostType:y}=g(FW.store),b=y(v("type"));return{title:v("title"),isTitleSupported:b?.supports?.title??!1}}),i=(0,Rh.useSelect)(g=>{let{getClientIdsWithDescendants:v,getBlock:y}=g(mC.store);return v().map(_=>y(_))}),a=(0,Rh.useSelect)(g=>{if(g(w).getRenderingMode()==="post-only")return;let{getBlocksByName:v,getClientIdsOfDescendants:y}=g(mC.store),[b]=v("core/post-content");if(b)return y(b)},[]),l=(0,pC.useRef)(1),c=(0,pC.useMemo)(()=>Jwe(i),[i]);if(c.length<1)return(0,Ct.jsxs)("div",{className:"editor-document-outline has-no-headings",children:[(0,Ct.jsx)(Qwe,{}),(0,Ct.jsx)("p",{children:(0,Jf.__)("Navigate the structure of your document and address issues like empty or incorrect heading levels.")})]});let u=document.querySelector(".editor-post-title__input"),d=n&&o&&u,m=c.reduce((g,v)=>({...g,[v.level]:(g[v.level]||0)+1}),{})[1]>1;function h(g){return Array.isArray(a)?a.includes(g):!0}return(0,Ct.jsx)("div",{className:"document-outline",children:(0,Ct.jsxs)("ul",{children:[d&&(0,Ct.jsx)(h3,{level:(0,Jf.__)("Title"),isValid:!0,onSelect:e,href:`#${u.id}`,isDisabled:t,children:o}),c.map(g=>{let v=g.level>l.current+1,y=!g.isEmpty&&!v&&!!g.level&&(g.level!==1||!m&&!d);return l.current=g.level,(0,Ct.jsxs)(h3,{level:`H${g.level}`,isValid:y,isDisabled:t||!h(g.clientId),href:`#block-${g.clientId}`,onSelect:()=>{r(g.clientId),e?.()},children:[g.isEmpty?qwe:(0,hC.getTextContent)((0,hC.create)({html:g.attributes.content})),v&&Zwe,g.level===1&&m&&Xwe,d&&g.level===1&&!m&&Kwe]},g.clientId)})]})})}var DW=s(O(),1),BW=s($(),1);function MW({children:e}){return(0,DW.useSelect)(r=>{let{getGlobalBlockCount:o}=r(BW.store);return o("core/heading")>0})?e:null}var LW=s(D(),1),VW=s(O(),1),hs=s(E(),1),jW=s($(),1),zW=s(Oi(),1),UW=s(yo(),1),HW=s(C(),1);function exe(){let{registerShortcut:e}=(0,VW.useDispatch)(zW.store);return(0,LW.useEffect)(()=>{e({name:"core/editor/toggle-mode",category:"global",description:(0,hs.__)("Switch between visual editor and code editor."),keyCombination:{modifier:"secondary",character:"m"}}),e({name:"core/editor/save",category:"global",description:(0,hs.__)("Save your changes."),keyCombination:{modifier:"primary",character:"s"}}),e({name:"core/editor/undo",category:"global",description:(0,hs.__)("Undo your last changes."),keyCombination:{modifier:"primary",character:"z"}}),e({name:"core/editor/redo",category:"global",description:(0,hs.__)("Redo your last undo."),keyCombination:{modifier:"primaryShift",character:"z"},aliases:(0,UW.isAppleOS)()?[]:[{modifier:"primary",character:"y"}]}),e({name:"core/editor/toggle-list-view",category:"global",description:(0,hs.__)("Show or hide the List View."),keyCombination:{modifier:"access",character:"o"}}),e({name:"core/editor/toggle-distraction-free",category:"global",description:(0,hs.__)("Enter or exit distraction free mode."),keyCombination:{modifier:"primaryShift",character:"\\"}}),e({name:"core/editor/toggle-sidebar",category:"global",description:(0,hs.__)("Show or hide the Settings panel."),keyCombination:{modifier:"primaryShift",character:","}}),e({name:"core/editor/keyboard-shortcuts",category:"main",description:(0,hs.__)("Display these keyboard shortcuts."),keyCombination:{modifier:"access",character:"h"}}),e({name:"core/editor/new-note",category:"block",description:(0,hs.__)("Add a new note."),keyCombination:{modifier:"primaryAlt",character:"m"}}),e({name:"core/editor/next-region",category:"global",description:(0,hs.__)("Navigate to the next part of the editor."),keyCombination:{modifier:"ctrl",character:"`"},aliases:[{modifier:"access",character:"n"}]}),e({name:"core/editor/previous-region",category:"global",description:(0,hs.__)("Navigate to the previous part of the editor."),keyCombination:{modifier:"ctrlShift",character:"`"},aliases:[{modifier:"access",character:"p"},{modifier:"ctrlShift",character:"~"}]})},[e]),(0,HW.jsx)(jW.BlockEditorKeyboardShortcuts.Register,{})}var GW=exe;var gC=s(E(),1),WW=s(A(),1),vC=s(O(),1),qb=s(yo(),1);var YW=s(D(),1);var qW=s(C(),1);function txe(e,t){let r=(0,qb.isAppleOS)()?qb.displayShortcut.primaryShift("z"):qb.displayShortcut.primary("y"),o=(0,vC.useSelect)(i=>i(w).hasEditorRedo(),[]),{redo:n}=(0,vC.useDispatch)(w);return(0,qW.jsx)(WW.Button,{__next40pxDefaultSize:!0,...e,ref:t,icon:(0,gC.isRTL)()?Yv:Vv,label:(0,gC.__)("Redo"),shortcut:r,"aria-disabled":!o,onClick:o?n:void 0,className:"editor-history__redo"})}var yC=(0,YW.forwardRef)(txe);var bC=s(E(),1),ZW=s(A(),1),SC=s(O(),1),KW=s(yo(),1);var XW=s(D(),1);var QW=s(C(),1);function rxe(e,t){let r=(0,SC.useSelect)(n=>n(w).hasEditorUndo(),[]),{undo:o}=(0,SC.useDispatch)(w);return(0,QW.jsx)(ZW.Button,{__next40pxDefaultSize:!0,...e,ref:t,icon:(0,bC.isRTL)()?Vv:Yv,label:(0,bC.__)("Undo"),shortcut:KW.displayShortcut.primary("z"),"aria-disabled":!r,onClick:r?o:void 0,className:"editor-history__undo"})}var _C=(0,XW.forwardRef)(rxe);var $W=s(Yi(),1),eY=s(ct(),1);var wC=s(A(),1),Oh=s(E(),1),xC=s(O(),1),JW=s(D(),1),g3=s($(),1),$f=s(C(),1);function CC(){let[e,t]=(0,JW.useState)(!1),r=(0,xC.useSelect)(i=>i(g3.store).isValidTemplate(),[]),{setTemplateValidity:o,synchronizeTemplate:n}=(0,xC.useDispatch)(g3.store);return r?null:(0,$f.jsxs)($f.Fragment,{children:[(0,$f.jsx)(wC.Notice,{className:"editor-template-validation-notice",isDismissible:!1,status:"warning",actions:[{label:(0,Oh.__)("Keep it as is"),onClick:()=>o(!0)},{label:(0,Oh.__)("Reset the template"),onClick:()=>t(!0)}],children:(0,Oh.__)("The content of your post doesn\u2019t match the template assigned to your post type.")}),(0,$f.jsx)(wC.__experimentalConfirmDialog,{isOpen:e,confirmButtonText:(0,Oh.__)("Reset"),onConfirm:()=>{t(!1),n()},onCancel:()=>t(!1),size:"medium",children:(0,Oh.__)("Resetting the template may result in loss of content, do you want to continue?")})]})}var v3=s(C(),1);function oxe(){return(0,$W.default)("wp.editor.EditorNotices",{since:"7.0",version:"7.2",alternative:"wp.notices.InlineNotices"}),(0,v3.jsx)(eY.InlineNotices,{pinnedNoticesClassName:"components-editor-notices__pinned",dismissibleNoticesClassName:"components-editor-notices__dismissible",children:(0,v3.jsx)(CC,{})})}var tY=oxe;var rY=s(Yi(),1),oY=s(ct(),1),nY=s(C(),1);function iY(){return(0,rY.default)("wp.editor.EditorSnackbars",{since:"7.0",version:"7.2",alternative:"wp.notices.SnackbarNotices"}),(0,nY.jsx)(oY.SnackbarNotices,{className:"components-editor-notices__snackbar"})}var pc=s(A(),1),mc=s(E(),1),Ih=s(D(),1),Zb=s(he(),1),fY=s(O(),1);var em=s(E(),1),S3=s(O(),1),PC=s(A(),1),_3=s(W(),1);var TC=s(A(),1),y3=s(E(),1),sY=s(O(),1),b3=s(W(),1),aY=s(ft(),1);var dc=s(C(),1);function lY({record:e,checked:t,onChange:r}){let{name:o,kind:n,title:i,key:a}=e,{entityRecordTitle:l,hasPostMetaChanges:c}=(0,sY.useSelect)(u=>{if(n!=="postType"||o!=="wp_template")return{entityRecordTitle:i,hasPostMetaChanges:N(u(w)).hasPostMetaChanges(o,a)};let d=u(b3.store).getEditedEntityRecord(n,o,a),{default_template_types:f=[]}=u(b3.store).getCurrentTheme()??{};return{entityRecordTitle:Zi({template:d,templateTypes:f}).title,hasPostMetaChanges:N(u(w)).hasPostMetaChanges(o,a)}},[o,n,i,a]);return(0,dc.jsxs)(dc.Fragment,{children:[(0,dc.jsx)(TC.PanelRow,{children:(0,dc.jsx)(TC.CheckboxControl,{label:(0,aY.decodeEntities)(l)||(0,y3.__)("Untitled"),checked:t,onChange:r,className:"entities-saved-states__change-control"})}),c&&(0,dc.jsx)("ul",{className:"entities-saved-states__changes",children:(0,dc.jsx)("li",{children:(0,y3.__)("Post Meta.")})})]})}var fc=s(C(),1);function nxe(e,t){switch(e){case"site":return t===1?(0,em.__)("This change will affect your whole site."):(0,em.__)("These changes will affect your whole site.");case"wp_template":return(0,em.__)("This change will affect other parts of your site that use this template.");case"page":case"post":return(0,em.__)("The following has been modified.")}}function ixe({record:e}){let{editedRecord:t,savedRecord:r}=(0,S3.useSelect)(n=>{let{getEditedEntityRecord:i,getEntityRecord:a}=n(_3.store);return{editedRecord:i(e.kind,e.name,e.key),savedRecord:a(e.kind,e.name,e.key)}},[e.kind,e.name,e.key]),o=My(t,r,{maxResults:10});return o.length?(0,fc.jsx)("ul",{className:"entities-saved-states__changes",children:o.map(n=>(0,fc.jsx)("li",{children:n},n))}):null}function sxe({record:e,count:t}){if(e?.name==="globalStyles")return null;let r=nxe(e?.name,t);return r?(0,fc.jsx)(PC.PanelRow,{children:r}):null}function cY({list:e,unselectedEntities:t,setUnselectedEntities:r}){let o=e.length,n=e[0],a=(0,S3.useSelect)(l=>l(_3.store).getEntityConfig(n.kind,n.name),[n.kind,n.name]).label;return n?.name==="wp_template_part"&&(a=o===1?(0,em.__)("Template Part"):(0,em.__)("Template Parts")),(0,fc.jsxs)(PC.PanelBody,{title:a,initialOpen:!0,className:"entities-saved-states__panel-body",children:[(0,fc.jsx)(sxe,{record:n,count:o}),e.map(l=>(0,fc.jsx)(lY,{record:l,checked:!t.some(c=>c.kind===l.kind&&c.name===l.name&&c.key===l.key&&c.property===l.property),onChange:c=>r(l,c)},l.key||l.property)),n?.name==="globalStyles"&&(0,fc.jsx)(ixe,{record:n})]})}var uY=s(O(),1),dY=s(W(),1),kC=s(D(),1),EC=()=>{let{editedEntities:e,siteEdits:t,siteEntityConfig:r}=(0,uY.useSelect)(c=>{let{__experimentalGetDirtyEntityRecords:u,getEntityRecordEdits:d,getEntityConfig:f}=c(dY.store);return{editedEntities:u(),siteEdits:d("root","site"),siteEntityConfig:f("root","site")}},[]),o=(0,kC.useMemo)(()=>{let c=e.filter(f=>!(f.kind==="root"&&f.name==="site")),u=r?.meta?.labels??{},d=[];for(let f in t)d.push({kind:"root",name:"site",title:u[f]||f,property:f});return[...c,...d]},[e,t,r]),[n,i]=(0,kC.useState)([]),a=({kind:c,name:u,key:d,property:f},m)=>{i(m?n.filter(h=>h.kind!==c||h.name!==u||h.key!==d||h.property!==f):[...n,{kind:c,name:u,key:d,property:f}])},l=o.length-n.length>0;return{dirtyEntityRecords:o,isDirty:l,setUnselectedEntities:a,unselectedEntities:n}};var Po=s(C(),1);function axe(e){return e}function RC({close:e,renderDialog:t,variant:r}){let o=EC();return(0,Po.jsx)(Kb,{close:e,renderDialog:t,variant:r,...o})}function Kb({additionalPrompt:e=void 0,close:t,onSave:r=axe,saveEnabled:o=void 0,saveLabel:n=(0,mc.__)("Save"),renderDialog:i,dirtyEntityRecords:a,isDirty:l,setUnselectedEntities:c,unselectedEntities:u,variant:d="default",successNoticeContent:f}){let m=(0,Ih.useRef)(),{saveDirtyEntities:h}=N((0,fY.useDispatch)(w)),g=a.reduce((I,U)=>{let{name:G}=U;return I[G]||(I[G]=[]),I[G].push(U),I},{}),{site:v,wp_template:y,wp_template_part:b,..._}=g,S=[v,y,b,...Object.values(_)].filter(Array.isArray),x=o??l,T=(0,Ih.useCallback)(()=>t(),[t]),[R,F]=(0,Zb.__experimentalUseDialog)({onClose:()=>T()}),B=(0,Zb.useInstanceId)(Kb,"entities-saved-states__panel-label"),z=(0,Zb.useInstanceId)(Kb,"entities-saved-states__panel-description"),L=a.length?(0,mc.__)("Select the items you want to save."):void 0,M=d==="inline",k=(0,Po.jsxs)(Po.Fragment,{children:[(0,Po.jsx)(pc.FlexItem,{isBlock:!M,as:pc.Button,variant:M?"tertiary":"secondary",size:M?void 0:"compact",onClick:T,children:(0,mc.__)("Cancel")}),(0,Po.jsx)(pc.FlexItem,{isBlock:!M,as:pc.Button,ref:m,variant:"primary",size:M?void 0:"compact",disabled:!x,accessibleWhenDisabled:!0,onClick:()=>h({onSave:r,dirtyEntityRecords:a,entitiesToSkip:u,close:t,successNoticeContent:f}),className:"editor-entities-saved-states__save-button",children:n})]});return(0,Po.jsxs)("div",{ref:i?R:void 0,...i&&F,className:re("entities-saved-states__panel",{"is-inline":M}),role:i?"dialog":void 0,"aria-labelledby":i?B:void 0,"aria-describedby":i?z:void 0,children:[!M&&(0,Po.jsx)(pc.Flex,{className:"entities-saved-states__panel-header",gap:2,children:k}),(0,Po.jsxs)("div",{className:"entities-saved-states__text-prompt",children:[(0,Po.jsx)("div",{className:"entities-saved-states__text-prompt--header-wrapper",children:(0,Po.jsx)("strong",{id:i?B:void 0,className:"entities-saved-states__text-prompt--header",children:(0,mc.__)("Are you ready to save?")})}),(0,Po.jsxs)("div",{id:i?z:void 0,children:[e,(0,Po.jsx)("p",{className:"entities-saved-states__text-prompt--changes-count",children:l?(0,Ih.createInterpolateElement)((0,mc.sprintf)((0,mc._n)("There is %d site change waiting to be saved.","There are %d site changes waiting to be saved.",a.length),a.length),{strong:(0,Po.jsx)("strong",{})}):L})]})]}),S.map(I=>(0,Po.jsx)(cY,{list:I,unselectedEntities:u,setUnselectedEntities:c},I[0].name)),M&&(0,Po.jsx)(pc.Flex,{direction:"row",justify:"flex-end",className:"entities-saved-states__panel-footer",children:k})]})}var pY=s(D(),1),AC=s(E(),1),tm=s(A(),1),hY=s(O(),1),gY=s(he(),1),vY=s(mo(),1);var Qu=s(C(),1);function lxe(){try{return(0,hY.select)(w).getEditedPostContent()}catch{}}function mY({text:e,children:t,variant:r="secondary"}){let o=(0,gY.useCopyToClipboard)(e);return(0,Qu.jsx)(tm.Button,{__next40pxDefaultSize:!0,variant:r,ref:o,children:t})}var cxe=class extends pY.Component{constructor(){super(...arguments),this.state={error:null}}componentDidCatch(e){(0,vY.doAction)("editor.ErrorBoundary.errorLogged",e)}static getDerivedStateFromError(e){return{error:e}}render(){let{error:e}=this.state,{canCopyContent:t=!1}=this.props;return e?(0,Qu.jsxs)(tm.__experimentalHStack,{className:"editor-error-boundary",alignment:"baseline",spacing:4,justify:"space-between",expanded:!1,wrap:!0,children:[(0,Qu.jsx)(tm.__experimentalText,{as:"p",children:(0,AC.__)("The editor has encountered an unexpected error.")}),(0,Qu.jsxs)(tm.__experimentalHStack,{expanded:!1,children:[t&&(0,Qu.jsx)(mY,{text:lxe,children:(0,AC.__)("Copy contents")}),(0,Qu.jsx)(mY,{variant:"primary",text:e?.stack,children:(0,AC.__)("Copy error")})]})]}):this.props.children}},yY=cxe;var hc=s(D(),1),Qb=s(he(),1),gc=s(O(),1),w3=s(E(),1),bY=s(Xe(),1),SY=s(ct(),1);var _Y=s(C(),1),uxe=window.requestIdleCallback?window.requestIdleCallback:window.requestAnimationFrame,Xb,dxe=()=>{if(Xb!==void 0)return Xb;try{window.sessionStorage.setItem("__wpEditorTestSessionStorage",""),window.sessionStorage.removeItem("__wpEditorTestSessionStorage"),Xb=!0}catch{Xb=!1}return Xb};function fxe(){let{postId:e,isEditedPostNew:t,hasRemoteAutosave:r}=(0,gc.useSelect)(c=>({postId:c(w).getCurrentPostId(),isEditedPostNew:c(w).isEditedPostNew(),hasRemoteAutosave:!!c(w).getEditorSettings().autosave}),[]),{getEditedPostAttribute:o}=(0,gc.useSelect)(w),{createWarningNotice:n,removeNotice:i}=(0,gc.useDispatch)(SY.store),{editPost:a,resetEditorBlocks:l}=(0,gc.useDispatch)(w);(0,hc.useEffect)(()=>{let c=pD(e,t);if(!c)return;try{c=JSON.parse(c)}catch{return}let{post_title:u,content:d,excerpt:f}=c,m={title:u,content:d,excerpt:f};if(!Object.keys(m).some(v=>m[v]!==o(v))){$S(e,t);return}if(r)return;let h="wpEditorAutosaveRestore";n((0,w3.__)("The backup of this post in your browser is different from the version below."),{id:h,actions:[{label:(0,w3.__)("Restore the backup"),onClick(){let{content:g,...v}=m;a(v),l((0,bY.parse)(m.content)),i(h)}}]})},[t,e])}function mxe(){let{postId:e,isEditedPostNew:t,isDirty:r,isAutosaving:o,didError:n}=(0,gc.useSelect)(u=>({postId:u(w).getCurrentPostId(),isEditedPostNew:u(w).isEditedPostNew(),isDirty:u(w).isEditedPostDirty(),isAutosaving:u(w).isAutosavingPost(),didError:u(w).didPostSaveRequestFail()}),[]),i=(0,hc.useRef)(r),a=(0,hc.useRef)(o);(0,hc.useEffect)(()=>{!n&&(a.current&&!o||i.current&&!r)&&$S(e,t),i.current=r,a.current=o},[r,o,n]);let l=(0,Qb.usePrevious)(t),c=(0,Qb.usePrevious)(e);(0,hc.useEffect)(()=>{c===e&&l&&!t&&$S(e,!0)},[t,e])}function pxe(){let{autosave:e}=(0,gc.useDispatch)(w),t=(0,hc.useCallback)(()=>{uxe(()=>e({local:!0}))},[]);fxe(),mxe();let r=(0,gc.useSelect)(o=>o(w).getEditorSettings().localAutosaveInterval,[]);return(0,_Y.jsx)(Xx,{interval:r,autosave:t})}var wY=(0,Qb.ifCondition)(dxe)(pxe);var xY=s(O(),1),CY=s(W(),1);function hxe({children:e}){return(0,xY.useSelect)(r=>{let{getEditedPostAttribute:o}=r(w),{getPostType:n}=r(CY.store);return!!n(o("type"))?.supports?.["page-attributes"]},[])?e:null}var Nh=hxe;var x3=s(E(),1),Dh=s(A(),1),OC=s(O(),1),kY=s(D(),1);var TY=s(O(),1),PY=s(W(),1);function gxe(e={},t){if(e[t]!==void 0)return!!e[t];let[r,o]=t.split("."),[n]=Array.isArray(e[r])?e[r]:[];return Array.isArray(n)?n.includes(o):!!n?.[o]}function vxe({children:e,supportKeys:t}){let r=(0,TY.useSelect)(n=>{let{getEditedPostAttribute:i}=n(w),{getPostType:a}=n(PY.store);return a(i("type"))},[]),o=!!r;return r&&(o=(Array.isArray(t)?t:[t]).some(n=>gxe(r.supports,n))),o?e:null}var tr=vxe;var Fh=s(C(),1);function yxe(){let e=(0,OC.useSelect)(a=>a(w).getEditedPostAttribute("menu_order")??0,[]),{editPost:t}=(0,OC.useDispatch)(w),[r,o]=(0,kY.useState)(null),n=a=>{o(a);let l=Number(a);Number.isInteger(l)&&a.trim?.()!==""&&t({menu_order:l})},i=r??e;return(0,Fh.jsx)(Dh.Flex,{children:(0,Fh.jsx)(Dh.FlexBlock,{children:(0,Fh.jsx)(Dh.__experimentalNumberControl,{__next40pxDefaultSize:!0,label:(0,x3.__)("Order"),help:(0,x3.__)("Set the page order."),value:i,onChange:n,hideLabelFromVision:!0,onBlur:()=>{o(null)}})})})}function EY(){return(0,Fh.jsx)(tr,{supportKeys:"page-attributes",children:(0,Fh.jsx)(yxe,{})})}var jY=s(O(),1),zY=s(W(),1);var T3=s(M_(),1),li=s(E(),1),Ju=s(A(),1),FY=s(he(),1),qa=s(D(),1),Mh=s(O(),1),k3=s(ft(),1),NC=s(W(),1),DY=s($(),1),BY=s(Ir(),1);var RY=s(A(),1),AY=s(D(),1),Jb=s(C(),1),bxe=(0,AY.forwardRef)(({className:e,label:t,children:r},o)=>(0,Jb.jsxs)(RY.__experimentalHStack,{className:re("editor-post-panel__row",e),ref:o,children:[t&&(0,Jb.jsx)("div",{className:"editor-post-panel__row-label",children:t}),(0,Jb.jsx)("div",{className:"editor-post-panel__row-control",children:r})]})),ht=bxe;var OY=s(ft(),1);function IC(e){let t=e.map(n=>({children:[],parent:void 0,...n}));if(t.some(({parent:n})=>n===void 0))return t;let r=t.reduce((n,i)=>{let{parent:a}=i;return n[a]||(n[a]=[]),n[a].push(i),n},{}),o=n=>n.map(i=>{let a=r[i.id];return{...i,children:a&&a.length?o(a):[]}});return o(r[0]||[])}var Bh=e=>(0,OY.decodeEntities)(e),C3=e=>({...e,name:Bh(e.name)}),IY=e=>(e??[]).map(C3);var ai=s(C(),1);function P3(e){return e?.title?.rendered?(0,k3.decodeEntities)(e.title.rendered):`#${e.id} (${(0,li.__)("no title")})`}var NY=(e,t)=>{let r=(0,T3.default)(e||"").toLowerCase(),o=(0,T3.default)(t||"").toLowerCase();return r===o?0:r.startsWith(o)?r.length:1/0};function MY(){let{editPost:e}=(0,Mh.useDispatch)(w),[t,r]=(0,qa.useState)(!1),{isHierarchical:o,parentPostId:n,parentPostTitle:i,pageItems:a,isLoading:l}=(0,Mh.useSelect)(f=>{let{getPostType:m,getEntityRecords:h,getEntityRecord:g,isResolving:v}=f(NC.store),{getCurrentPostId:y,getEditedPostAttribute:b}=f(w),_=b("type"),S=b("parent"),x=m(_),T=y(),R=x?.hierarchical??!1,F={per_page:100,exclude:T,parent_exclude:T,orderby:"menu_order",order:"asc",_fields:"id,title,parent"};t&&(F.search=t,F.orderby="relevance");let B=S?g("postType",_,S):null;return{isHierarchical:R,parentPostId:S,parentPostTitle:B?P3(B):"",pageItems:R?h("postType",_,F):null,isLoading:R?v("getEntityRecords",["postType",_,F]):!1}},[t]),c=(0,qa.useMemo)(()=>{let f=(v,y=0)=>v.map(S=>[{value:S.id,label:"\u2014 ".repeat(y)+(0,k3.decodeEntities)(S.name),rawName:S.name},...f(S.children||[],y+1)]).sort(([S],[x])=>{let T=NY(S.rawName,t),R=NY(x.rawName,t);return T>=R?1:-1}).flat();if(!a)return[];let m=a.map(v=>({id:v.id,parent:v.parent,name:P3(v)}));t||(m=IC(m));let h=f(m),g=h.find(v=>v.value===n);return i&&!g&&h.unshift({value:n,label:i}),h},[a,t,i,n]);if(!o)return null;let u=f=>{r(f)},d=f=>{e({parent:f})};return(0,ai.jsx)(Ju.ComboboxControl,{__next40pxDefaultSize:!0,className:"editor-page-attributes__parent",label:(0,li.__)("Parent"),help:(0,li.__)("Choose a parent page."),value:n,options:c,onFilterValueChange:(0,FY.debounce)(u,300),onChange:d,hideLabelFromVision:!0,isLoading:l})}function Sxe({isOpen:e,onClick:t}){let r=(0,Mh.useSelect)(n=>{let{getEditedPostAttribute:i}=n(w),a=i("parent");if(!a)return null;let{getEntityRecord:l}=n(NC.store),c=i("type");return l("postType",c,a)},[]),o=(0,qa.useMemo)(()=>r?P3(r):(0,li.__)("None"),[r]);return(0,ai.jsx)(Ju.Button,{size:"compact",className:"editor-post-parent__panel-toggle",variant:"tertiary","aria-expanded":e,"aria-label":(0,li.sprintf)((0,li.__)("Change parent: %s"),o),onClick:t,children:o})}function LY(){let e=(0,Mh.useSelect)(n=>n(NC.store).getEntityRecord("root","__unstableBase")?.home,[]),[t,r]=(0,qa.useState)(null),o=(0,qa.useMemo)(()=>({anchor:t,placement:"left-start",offset:36,shift:!0}),[t]);return(0,ai.jsx)(ht,{label:(0,li.__)("Parent"),ref:r,children:(0,ai.jsx)(Ju.Dropdown,{popoverProps:o,className:"editor-post-parent__panel-dropdown",contentClassName:"editor-post-parent__panel-dialog",focusOnMount:!0,renderToggle:({isOpen:n,onToggle:i})=>(0,ai.jsx)(Sxe,{isOpen:n,onClick:i}),renderContent:({onClose:n})=>(0,ai.jsxs)("div",{className:"editor-post-parent",children:[(0,ai.jsx)(DY.__experimentalInspectorPopoverHeader,{title:(0,li.__)("Parent"),onClose:n}),(0,ai.jsxs)("div",{children:[(0,qa.createInterpolateElement)((0,li.sprintf)((0,li.__)('Child pages inherit characteristics from their parent, such as URL structure. For instance, if "Pricing" is a child of "Services", its URL would be %s/services/pricing.'),(0,BY.filterURLForDisplay)(e).replace(/([/.])/g,"$1")),{wbr:(0,ai.jsx)("wbr",{})}),(0,ai.jsx)("p",{children:(0,qa.createInterpolateElement)((0,li.__)("They also show up as sub-items in the default navigation menu. Learn more."),{a:(0,ai.jsx)(Ju.ExternalLink,{href:(0,li.__)("https://wordpress.org/documentation/article/page-post-settings-sidebar/#page-attributes")})})})]}),(0,ai.jsx)(MY,{})]})})})}var VY=MY;var FC=s(C(),1),_xe="page-attributes";function wxe(){let{isEnabled:e,postType:t}=(0,jY.useSelect)(r=>{let{getEditedPostAttribute:o,isEditorPanelEnabled:n}=r(w),{getPostType:i}=r(zY.store);return{isEnabled:n(_xe),postType:i(o("type"))}},[]);return!e||!t?null:(0,FC.jsx)(LY,{})}function DC(){return(0,FC.jsx)(Nh,{children:(0,FC.jsx)(wxe,{})})}var gs=s(E(),1),yc=s(A(),1),Vh=s(O(),1),I3=s(W(),1),GY=s($(),1),jh=s(D(),1);var WY=s(ct(),1);var BC=s(O(),1),R3=s(D(),1),oa=s(Xe(),1),na=s(A(),1),rm=s(E(),1);var vc=s(C(),1),E3=(0,rm.__)("Custom Template");function MC({onClose:e}){let{defaultBlockTemplate:t,onNavigateToEntityRecord:r}=(0,BC.useSelect)(d=>{let{getEditorSettings:f,getCurrentTemplateId:m}=d(w);return{defaultBlockTemplate:f().defaultBlockTemplate,onNavigateToEntityRecord:f().onNavigateToEntityRecord,getTemplateId:m}}),{createTemplate:o}=N((0,BC.useDispatch)(w)),[n,i]=(0,R3.useState)(""),[a,l]=(0,R3.useState)(!1),c=()=>{i(""),e()},u=async d=>{if(d.preventDefault(),a)return;l(!0);let f=t??(0,oa.serialize)([(0,oa.createBlock)("core/group",{tagName:"header",layout:{inherit:!0}},[(0,oa.createBlock)("core/site-title"),(0,oa.createBlock)("core/site-tagline")]),(0,oa.createBlock)("core/separator"),(0,oa.createBlock)("core/group",{tagName:"main"},[(0,oa.createBlock)("core/group",{layout:{inherit:!0}},[(0,oa.createBlock)("core/post-title")]),(0,oa.createBlock)("core/post-content",{layout:{inherit:!0}})])]),m=await o({slug:af(n||E3)||"wp-custom-template",content:f,title:n||E3,status:"publish"});l(!1),r({postId:m.id,postType:"wp_template"}),c()};return(0,vc.jsx)(na.Modal,{title:(0,rm.__)("Create custom template"),onRequestClose:c,focusOnMount:"firstContentElement",size:"small",overlayClassName:"editor-post-template__create-template-modal",children:(0,vc.jsx)("form",{className:"editor-post-template__create-form",onSubmit:u,children:(0,vc.jsxs)(na.__experimentalVStack,{spacing:"3",children:[(0,vc.jsx)(na.TextControl,{__next40pxDefaultSize:!0,label:(0,rm.__)("Name"),value:n,onChange:i,placeholder:E3,disabled:a,help:(0,rm.__)('Describe the template, e.g. "Post with sidebar". A custom template can be manually applied to any post or page.')}),(0,vc.jsxs)(na.__experimentalHStack,{justify:"right",children:[(0,vc.jsx)(na.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:c,children:(0,rm.__)("Cancel")}),(0,vc.jsx)(na.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",isBusy:a,"aria-disabled":a,children:(0,rm.__)("Create")})]})]})})})}var $b=s(O(),1),UY=s(D(),1),LC=s(W(),1);function Lh(){return(0,$b.useSelect)(e=>{let{getCurrentPostId:t,getCurrentPostType:r}=e(w);return{postId:t(),postType:r()}},[])}function om(){let{postType:e,postId:t}=Lh();return(0,$b.useSelect)(r=>{let{canUser:o,getEntityRecord:n,getEntityRecords:i}=r(LC.store),a=o("read",{kind:"root",name:"site"})?n("root","site"):void 0,l=+t===a?.page_for_posts,c=e==="page"&&+t===a?.page_on_front,u=c?i("postType","wp_template",{per_page:-1}):[],d=c&&!!u?.some(({slug:f})=>f==="front-page");return!l&&!d},[t,e])}function HY(e){return(0,$b.useSelect)(t=>t(LC.store).getEntityRecords("postType","wp_template",{per_page:-1,post_type:e}),[e])}function A3(e){let t=O3(),r=om(),o=HY(e);return(0,UY.useMemo)(()=>r&&o?.filter(n=>n.is_custom&&n.slug!==t&&!!n.content.raw),[o,t,r])}function O3(){let{postType:e,postId:t}=Lh(),r=HY(e),o=(0,$b.useSelect)(n=>n(LC.store).getEditedEntityRecord("postType",e,t)?.template,[e,t]);if(o)return r?.find(n=>n.slug===o)?.slug}var ci=s(C(),1);function xxe({isOpen:e,onClick:t}){let r=(0,Vh.useSelect)(o=>{let n=o(w).getEditedPostAttribute("template"),{supportsTemplateMode:i,availableTemplates:a}=o(w).getEditorSettings();if(!i&&a[n])return a[n];let l=o(I3.store).canUser("create",{kind:"postType",name:"wp_template"})&&o(w).getCurrentTemplateId();return l?.title||l?.slug||a?.[n]},[]);return(0,ci.jsx)(yc.Button,{__next40pxDefaultSize:!0,variant:"tertiary","aria-expanded":e,"aria-label":(0,gs.__)("Template options"),onClick:t,children:r??(0,gs.__)("Default template")})}function Cxe({onClose:e}){let t=om(),{availableTemplates:r,fetchedTemplates:o,selectedTemplateSlug:n,canCreate:i,canEdit:a,currentTemplateId:l,onNavigateToEntityRecord:c,getEditorSettings:u}=(0,Vh.useSelect)(y=>{let{canUser:b,getEntityRecords:_}=y(I3.store),S=y(w).getEditorSettings(),x=b("create",{kind:"postType",name:"wp_template"}),T=y(w).getCurrentTemplateId();return{availableTemplates:S.availableTemplates,fetchedTemplates:x?_("postType","wp_template",{post_type:y(w).getCurrentPostType(),per_page:-1}):void 0,selectedTemplateSlug:y(w).getEditedPostAttribute("template"),canCreate:t&&x&&S.supportsTemplateMode,canEdit:t&&x&&S.supportsTemplateMode&&!!T,currentTemplateId:T,onNavigateToEntityRecord:S.onNavigateToEntityRecord,getEditorSettings:y(w).getEditorSettings}},[t]),d=(0,jh.useMemo)(()=>Object.entries({...r,...Object.fromEntries((o??[]).map(({slug:y,title:b})=>[y,b.rendered]))}).map(([y,b])=>({value:y,label:b})),[r,o]),f=d.find(y=>y.value===n)??d.find(y=>!y.value),{editPost:m}=(0,Vh.useDispatch)(w),{createSuccessNotice:h}=(0,Vh.useDispatch)(WY.store),[g,v]=(0,jh.useState)(!1);return(0,ci.jsxs)("div",{className:"editor-post-template__classic-theme-dropdown",children:[(0,ci.jsx)(GY.__experimentalInspectorPopoverHeader,{title:(0,gs.__)("Template"),help:(0,gs.__)("Templates define the way content is displayed when viewing your site."),actions:i?[{icon:lR,label:(0,gs.__)("Add template"),onClick:()=>v(!0)}]:[],onClose:e}),t?(0,ci.jsx)(yc.SelectControl,{__next40pxDefaultSize:!0,hideLabelFromVision:!0,label:(0,gs.__)("Template"),value:f?.value??"",options:d,onChange:y=>m({template:y||""})}):(0,ci.jsx)(yc.Notice,{status:"warning",isDismissible:!1,children:(0,gs.__)("The posts page template cannot be changed.")}),a&&c&&(0,ci.jsx)("p",{children:(0,ci.jsx)(yc.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:()=>{c({postId:l,postType:"wp_template"}),e(),h((0,gs.__)("Editing template. Changes made here affect all posts and pages that use the template."),{type:"snackbar",actions:[{label:(0,gs.__)("Go back"),onClick:()=>u().onNavigateToPreviousEntityRecord()}]})},children:(0,gs.__)("Edit template")})}),g&&(0,ci.jsx)(MC,{onClose:()=>v(!1)})]})}function Txe(){let[e,t]=(0,jh.useState)(null),r=(0,jh.useMemo)(()=>({anchor:e,className:"editor-post-template__dropdown",placement:"left-start",offset:36,shift:!0}),[e]);return(0,ci.jsx)(ht,{label:(0,gs.__)("Template"),ref:t,children:(0,ci.jsx)(yc.Dropdown,{popoverProps:r,focusOnMount:!0,renderToggle:({isOpen:o,onToggle:n})=>(0,ci.jsx)(xxe,{isOpen:o,onClick:n}),renderContent:({onClose:o})=>(0,ci.jsx)(Cxe,{onClose:o})})})}var VC=Txe;var UC=s(A(),1),JY=s(_u(),1),HC=s(O(),1),$Y=s(qY(),1);var XY=s(A(),1);var jC=s(O(),1),ZY=s(lt(),1);var KY=s(C(),1),{PreferenceBaseOption:Pxe}=N(ZY.privateApis);function $u(e){let{toggleEditorPanelEnabled:t}=(0,jC.useDispatch)(w),{isChecked:r,isRemoved:o}=(0,jC.useSelect)(n=>{let{isEditorPanelEnabled:i,isEditorPanelRemoved:a}=n(w);return{isChecked:i(e.panelName),isRemoved:a(e.panelName)}},[e.panelName]);return o?null:(0,KY.jsx)(Pxe,{isChecked:r,onChange:()=>t(e.panelName),...e})}var N3=s(C(),1),{Fill:kxe,Slot:Exe}=(0,XY.createSlotFill)("EnablePluginDocumentSettingPanelOption"),QY=({label:e,panelName:t})=>(0,N3.jsx)(kxe,{children:(0,N3.jsx)($u,{label:e,panelName:t})});QY.Slot=Exe;var zC=QY;var ed=s(C(),1),{Fill:Rxe,Slot:Axe}=(0,UC.createSlotFill)("PluginDocumentSettingPanel"),eq=({name:e,className:t,title:r,icon:o,children:n})=>{let{name:i}=(0,JY.usePluginContext)(),a=`${i}/${e}`,{opened:l,isEnabled:c}=(0,HC.useSelect)(d=>{let{isEditorPanelOpened:f,isEditorPanelEnabled:m}=d(w);return{opened:f(a),isEnabled:m(a)}},[a]),{toggleEditorPanelOpened:u}=(0,HC.useDispatch)(w);return e===void 0&&(0,$Y.default)("PluginDocumentSettingPanel requires a name property."),(0,ed.jsxs)(ed.Fragment,{children:[(0,ed.jsx)(zC,{label:r,panelName:a}),(0,ed.jsx)(Rxe,{children:c&&(0,ed.jsx)(UC.PanelBody,{className:t,title:r,icon:o,opened:l,onToggle:()=>u(a),children:n})})]})};eq.Slot=Axe;var GC=eq;var tq=s($(),1),rq=s(A(),1),oq=s(he(),1),F3=s(C(),1),Oxe=(e,t)=>e.filter(r=>!t.includes(r)).length===0,Ixe=(e,t)=>!Array.isArray(t)||Oxe(e,t),Nxe=({allowedBlocks:e,icon:t,label:r,onClick:o,small:n,role:i})=>(0,F3.jsx)(tq.BlockSettingsMenuControls,{children:({selectedBlocks:a,onClose:l})=>Ixe(a,e)?(0,F3.jsx)(rq.MenuItem,{onClick:(0,oq.compose)(o,l),icon:t,label:n?r:void 0,role:i,children:!n&&r}):null}),nq=Nxe;var iq=s(A(),1),sq=s(_u(),1);var aq=s(C(),1);function lq(e){let t=(0,sq.usePluginContext)();return(0,aq.jsx)(rs,{name:"core/plugin-more-menu",as:e.as??iq.MenuItem,icon:e.icon||t.icon,...e})}var cq=s(_u(),1),WC=s(A(),1),D3=s(C(),1),{Fill:Fxe,Slot:Dxe}=(0,WC.createSlotFill)("PluginPostPublishPanel"),uq=({children:e,className:t,title:r,initialOpen:o=!1,icon:n})=>{let{icon:i}=(0,cq.usePluginContext)();return(0,D3.jsx)(Fxe,{children:(0,D3.jsx)(WC.PanelBody,{className:t,initialOpen:o||!r,title:r,icon:n??i,children:e})})};uq.Slot=Dxe;var YC=uq;var qC=s(A(),1),B3=s(C(),1),{Fill:Bxe,Slot:Mxe}=(0,qC.createSlotFill)("PluginPostStatusInfo"),dq=({children:e,className:t})=>(0,B3.jsx)(Bxe,{children:(0,B3.jsx)(qC.PanelRow,{className:t,children:e})});dq.Slot=Mxe;var ZC=dq;var KC=s(A(),1),fq=s(_u(),1),M3=s(C(),1),{Fill:Lxe,Slot:Vxe}=(0,KC.createSlotFill)("PluginPrePublishPanel"),mq=({children:e,className:t,title:r,initialOpen:o=!1,icon:n})=>{let{icon:i}=(0,fq.usePluginContext)();return(0,M3.jsx)(Lxe,{children:(0,M3.jsx)(KC.PanelBody,{className:t,initialOpen:o||!r,title:r,icon:n??i,children:e})})};mq.Slot=Vxe;var XC=mq;var pq=s(A(),1),hq=s(_u(),1);var gq=s(C(),1);function vq(e){let t=(0,hq.usePluginContext)();return(0,gq.jsx)(rs,{name:"core/plugin-preview-menu",as:e.as??pq.MenuItem,icon:e.icon||t.icon,...e})}var yq=s(C(),1);function nm({className:e,...t}){return(0,yq.jsx)(ql,{panelClassName:e,className:"editor-sidebar",scope:"core",...t})}var bq=s(C(),1);function Sq(e){return(0,bq.jsx)(xu,{__unstableExplicitMenuItem:!0,scope:"core",...e})}var JC=s(O(),1),$C=s(W(),1);var bc=s(O(),1),Uq=s(ft(),1),td=s(A(),1),QC=s(D(),1),sm=s(E(),1),Gh=s(W(),1);var Hq=s(ct(),1),Gq=s(lt(),1);var Uh=s(D(),1),Cq=s(ft(),1),Tq=s($(),1),Hh=s(A(),1),zh=s(E(),1),Pq=s(O(),1),kq=s(W(),1),Eq=s(Xe(),1);var wq=s(M_(),1);function _q(e=""){return e=(0,wq.default)(e),e=e.trim().toLowerCase(),e}function jxe(e,t){let r=_q(t),o=_q(e.title),n=0;return r===o?n+=30:o.startsWith(r)?n+=20:r.split(" ").every(l=>o.includes(l))&&(n+=10),n}function xq(e=[],t=""){if(!t)return e;let r=e.map(o=>[o,jxe(o,t)]).filter(([,o])=>o>0);return r.sort(([,o],[,n])=>n-o),r.map(([o])=>o)}var Bi=s(C(),1);function Rq({onClick:e}){let[t,r]=(0,Uh.useState)(!1),{postType:o,postId:n}=Lh(),i=A3(o),{editEntityRecord:a}=(0,Pq.useDispatch)(kq.store),l=async c=>{a("postType",o,n,{template:c.name},{undoIgnore:!0}),r(!1),e()};return(0,Bi.jsxs)(Bi.Fragment,{children:[(0,Bi.jsx)(Hh.MenuItem,{disabled:!i?.length,accessibleWhenDisabled:!0,onClick:()=>r(!0),children:(0,zh.__)("Change template")}),t&&(0,Bi.jsx)(Hh.Modal,{title:(0,zh.__)("Choose a template"),onRequestClose:()=>r(!1),overlayClassName:"editor-post-template__swap-template-modal",isFullScreen:!0,children:(0,Bi.jsx)("div",{className:"editor-post-template__swap-template-modal-content",children:(0,Bi.jsx)(zxe,{postType:o,onSelect:l})})})]})}function zxe({postType:e,onSelect:t}){let[r,o]=(0,Uh.useState)(""),n=A3(e),i=(0,Uh.useMemo)(()=>n.map(l=>({name:l.slug,blocks:(0,Eq.parse)(l.content.raw),title:(0,Cq.decodeEntities)(l.title.rendered),id:l.id})),[n]),a=(0,Uh.useMemo)(()=>xq(i,r),[i,r]);return(0,Bi.jsxs)(Bi.Fragment,{children:[(0,Bi.jsx)(Hh.SearchControl,{onChange:o,value:r,label:(0,zh.__)("Search"),placeholder:(0,zh.__)("Search"),className:"editor-post-template__swap-template-search"}),(0,Bi.jsx)(Tq.__experimentalBlockPatternsList,{label:(0,zh.__)("Templates"),blockPatterns:a,onClickPattern:t})]})}var Aq=s(A(),1),Oq=s(E(),1),Iq=s(O(),1),Nq=s(W(),1);var Fq=s(C(),1);function Dq({onClick:e}){let t=O3(),r=om(),{postType:o,postId:n}=Lh(),{editEntityRecord:i}=(0,Iq.useDispatch)(Nq.store);return!t||!r?null:(0,Fq.jsx)(Aq.MenuItem,{onClick:()=>{i("postType",o,n,{template:""},{undoIgnore:!0}),e()},children:(0,Oq.__)("Use default template")})}var Bq=s(A(),1),Mq=s(E(),1),Lq=s(O(),1),Vq=s(W(),1),jq=s(D(),1);var im=s(C(),1);function zq(){let{canCreateTemplates:e}=(0,Lq.useSelect)(n=>{let{canUser:i}=n(Vq.store);return{canCreateTemplates:i("create",{kind:"postType",name:"wp_template"})}},[]),[t,r]=(0,jq.useState)(!1),o=om();return!e||!o?null:(0,im.jsxs)(im.Fragment,{children:[(0,im.jsx)(Bq.MenuItem,{onClick:()=>{r(!0)},children:(0,Mq.__)("Create new template")}),t&&(0,im.jsx)(MC,{onClose:()=>{r(!1)}})]})}var ui=s(C(),1);function Wq({id:e}){let{isTemplateHidden:t,onNavigateToEntityRecord:r,getEditorSettings:o,hasGoBack:n,hasSpecificTemplate:i}=(0,bc.useSelect)(x=>{let{getRenderingMode:T,getEditorSettings:R,getCurrentPost:F}=N(x(w)),B=R(),z=F();return{isTemplateHidden:T()==="post-only",onNavigateToEntityRecord:B.onNavigateToEntityRecord,getEditorSettings:R,hasGoBack:B.hasOwnProperty("onNavigateToPreviousEntityRecord"),hasSpecificTemplate:!!z.template}},[]),{get:a}=(0,bc.useSelect)(Gq.store),{editedRecord:l,hasResolved:c}=(0,Gh.useEntityRecord)("postType","wp_template",e),{getEntityRecord:u}=(0,bc.useSelect)(Gh.store),{editEntityRecord:d}=(0,bc.useDispatch)(Gh.store),{createSuccessNotice:f}=(0,bc.useDispatch)(Hq.store),{setRenderingMode:m,setDefaultRenderingMode:h}=N((0,bc.useDispatch)(w)),g=(0,bc.useSelect)(x=>!!x(Gh.store).canUser("create",{kind:"postType",name:"wp_template"}),[]),[v,y]=(0,QC.useState)(null),b=(0,QC.useMemo)(()=>({anchor:v,className:"editor-post-template__dropdown",placement:"left-start",offset:36,shift:!0}),[v]);if(!c)return null;let _=n?[{label:(0,sm.__)("Go back"),onClick:()=>o().onNavigateToPreviousEntityRecord()}]:void 0,S=()=>{a("core/edit-site","welcomeGuideTemplate")||f((0,sm.__)("Editing template. Changes made here affect all posts and pages that use the template."),{type:"snackbar",actions:_})};return(0,ui.jsx)(ht,{label:(0,sm.__)("Template"),ref:y,children:(0,ui.jsx)(td.DropdownMenu,{popoverProps:b,focusOnMount:!0,toggleProps:{size:"compact",variant:"tertiary",tooltipPosition:"middle left"},label:(0,sm.__)("Template options"),text:(0,Uq.decodeEntities)(l.title),icon:null,children:({onClose:x})=>(0,ui.jsxs)(ui.Fragment,{children:[(0,ui.jsxs)(td.MenuGroup,{children:[g&&(0,ui.jsx)(td.MenuItem,{onClick:async()=>{if(r({postId:l.id,postType:"wp_template"}),!i&&window?.__experimentalTemplateActivate){let T=await u("root","site").active_templates;T[l.slug]!==l.id&&d("root","site",void 0,{active_templates:{...T,[l.slug]:l.id}})}x(),S()},children:(0,sm.__)("Edit template")}),(0,ui.jsx)(Rq,{onClick:x}),(0,ui.jsx)(Dq,{onClick:x}),g&&(0,ui.jsx)(zq,{})]}),(0,ui.jsx)(td.MenuGroup,{children:(0,ui.jsx)(td.MenuItem,{icon:t?void 0:Pi,isSelected:!t,role:"menuitemcheckbox",onClick:()=>{let T=t?"template-locked":"post-only";m(T),h(T)},children:(0,sm.__)("Show template")})})]})})})}var L3=s(C(),1);function eT(){let{templateId:e,isBlockTheme:t}=(0,JC.useSelect)(n=>{let{getCurrentTemplateId:i,getEditorSettings:a}=n(w);return{templateId:i(),isBlockTheme:a().__unstableIsBlockBasedTheme}},[]),r=(0,JC.useSelect)(n=>{let i=n(w).getCurrentPostType();if(!n($C.store).getPostType(i)?.viewable)return!1;let l=n(w).getEditorSettings();return!!l.availableTemplates&&Object.keys(l.availableTemplates).length>0?!0:l.supportsTemplateMode?n($C.store).canUser("create",{kind:"postType",name:"wp_template"})??!1:!1},[]),o=(0,JC.useSelect)(n=>r?n($C.store).canUser("read",{kind:"postType",name:"wp_template"}):!1,[r]);return(!t||!o)&&r?(0,L3.jsx)(VC,{}):t&&e?(0,L3.jsx)(Wq,{id:e}):null}var lZ=s(O(),1),cZ=s(W(),1);var Xq=s(he(),1),Qq=s(D(),1),Jq=s(O(),1),$q=s(E(),1),eZ=s(A(),1);var Yq=s(E(),1),qq=s(D(),1),Zq=s(O(),1),V3=s(ft(),1),Kq=s(W(),1);var e0={_fields:"id,name",context:"view"},tT={who:"authors",per_page:100,...e0};function rT(e){let{authorId:t,authors:r,postAuthor:o,isLoading:n}=(0,Zq.useSelect)(a=>{let{getUser:l,getUsers:c,isResolving:u}=a(Kq.store),{getEditedPostAttribute:d}=a(w),f=d("author"),m={...tT};return e&&(m.search=e,m.search_columns=["name"]),{authorId:f,authors:c(m),postAuthor:l(f,e0),isLoading:u("getUsers",[m])}},[e]),i=(0,qq.useMemo)(()=>{let a=(r??[]).map(u=>({value:u.id,label:(0,V3.decodeEntities)(u.name)})),l=a.findIndex(({value:u})=>o?.id===u),c=[];return l<0&&o?c=[{value:o.id,label:(0,V3.decodeEntities)(o.name)}]:l<0&&!o&&(c=[{value:0,label:(0,Yq.__)("(No author)")}]),[...c,...a]},[r,o]);return{authorId:t,authorOptions:i,postAuthor:o,isLoading:n}}var tZ=s(C(),1);function rZ(){let[e,t]=(0,Qq.useState)(),{editPost:r}=(0,Jq.useDispatch)(w),{authorId:o,authorOptions:n,isLoading:i}=rT(e),a=l=>{l&&r({author:l})};return(0,tZ.jsx)(eZ.ComboboxControl,{__next40pxDefaultSize:!0,label:(0,$q.__)("Author"),options:n,value:o,onFilterValueChange:(0,Xq.debounce)(t,300),onChange:a,allowReset:!1,hideLabelFromVision:!0,isLoading:i})}var oZ=s(E(),1),nZ=s(O(),1),iZ=s(A(),1);var sZ=s(C(),1);function aZ(){let{editPost:e}=(0,nZ.useDispatch)(w),{authorId:t,authorOptions:r}=rT(),o=n=>{let i=Number(n);e({author:i})};return(0,sZ.jsx)(iZ.SelectControl,{__next40pxDefaultSize:!0,className:"post-author-selector",label:(0,oZ.__)("Author"),options:r,onChange:o,value:t,hideLabelFromVision:!0})}var j3=s(C(),1),Uxe=25;function Hxe(){return(0,lZ.useSelect)(t=>t(cZ.store).getUsers(tT)?.length>=Uxe,[])?(0,j3.jsx)(rZ,{}):(0,j3.jsx)(aZ,{})}var oT=Hxe;var uZ=s(O(),1);var dZ=s(C(),1);function nT({children:e}){let{hasAssignAuthorAction:t}=(0,uZ.useSelect)(r=>({hasAssignAuthorAction:!!r(w).getCurrentPost()?._links?.["wp:action-assign-author"]}),[]);return t?(0,dZ.jsx)(tr,{supportKeys:"author",children:e}):null}var am=s(E(),1),iT=s(A(),1),sT=s(D(),1),fZ=s(ft(),1),mZ=s($(),1),pZ=s(O(),1),hZ=s(W(),1);var Za=s(C(),1);function Gxe({isOpen:e,onClick:t}){let{postAuthor:r}=(0,pZ.useSelect)(n=>{let i=n(w).getEditedPostAttribute("author");return{postAuthor:n(hZ.store).getUser(i,e0)}},[]),o=(0,fZ.decodeEntities)(r?.name)||(0,am.__)("(No author)");return(0,Za.jsx)(iT.Button,{size:"compact",className:"editor-post-author__panel-toggle",variant:"tertiary","aria-expanded":e,"aria-label":(0,am.sprintf)((0,am.__)("Change author: %s"),o),onClick:t,children:o})}function Wxe(){let[e,t]=(0,sT.useState)(null),r=(0,sT.useMemo)(()=>({anchor:e,placement:"left-start",offset:36,shift:!0}),[e]);return(0,Za.jsx)(nT,{children:(0,Za.jsx)(ht,{label:(0,am.__)("Author"),ref:t,children:(0,Za.jsx)(iT.Dropdown,{popoverProps:r,contentClassName:"editor-post-author__panel-dialog",focusOnMount:!0,renderToggle:({isOpen:o,onToggle:n})=>(0,Za.jsx)(Gxe,{isOpen:o,onClick:n}),renderContent:({onClose:o})=>(0,Za.jsxs)("div",{className:"editor-post-author",children:[(0,Za.jsx)(mZ.__experimentalInspectorPopoverHeader,{title:(0,am.__)("Author"),onClose:o}),(0,Za.jsx)(oT,{onClose:o})]})})})})}var aT=Wxe;var rd=s(E(),1),cT=s(A(),1),uT=s(O(),1);var lT=s(C(),1),Yxe=[{label:(0,rd._x)("Open",'Adjective: e.g. "Comments are open"'),value:"open",description:(0,rd.__)("Visitors can add new comments and replies.")},{label:(0,rd.__)("Closed"),value:"closed",description:[(0,rd.__)("Visitors cannot add new comments or replies."),(0,rd.__)("Existing comments remain visible.")].join(" ")}];function qxe(){let e=(0,uT.useSelect)(o=>o(w).getEditedPostAttribute("comment_status")??"open",[]),{editPost:t}=(0,uT.useDispatch)(w),r=o=>t({comment_status:o});return(0,lT.jsx)("form",{children:(0,lT.jsx)(cT.__experimentalVStack,{spacing:4,children:(0,lT.jsx)(cT.RadioControl,{className:"editor-change-status__options",hideLabelFromVision:!0,label:(0,rd.__)("Comment status"),options:Yxe,onChange:r,selected:e})})})}var dT=qxe;var ia=s(E(),1),Wh=s(A(),1),U3=s(O(),1),gT=s(D(),1),gZ=s($(),1),vZ=s(W(),1);var fT=s(E(),1),mT=s(A(),1),pT=s(O(),1);var z3=s(C(),1);function Zxe(){let e=(0,pT.useSelect)(o=>o(w).getEditedPostAttribute("ping_status")??"open",[]),{editPost:t}=(0,pT.useDispatch)(w),r=()=>t({ping_status:e==="open"?"closed":"open"});return(0,z3.jsx)(mT.CheckboxControl,{label:(0,fT.__)("Enable pingbacks & trackbacks"),checked:e==="open",onChange:r,help:(0,z3.jsx)(mT.ExternalLink,{href:(0,fT.__)("https://wordpress.org/documentation/article/trackbacks-and-pingbacks/"),children:(0,fT.__)("Learn more about pingbacks & trackbacks")})})}var hT=Zxe;var Bn=s(C(),1),Kxe="discussion-panel";function Xxe({onClose:e}){return(0,Bn.jsxs)("div",{className:"editor-post-discussion",children:[(0,Bn.jsx)(gZ.__experimentalInspectorPopoverHeader,{title:(0,ia.__)("Discussion"),onClose:e}),(0,Bn.jsxs)(Wh.__experimentalVStack,{spacing:4,children:[(0,Bn.jsx)(tr,{supportKeys:"comments",children:(0,Bn.jsx)(dT,{})}),(0,Bn.jsx)(tr,{supportKeys:"trackbacks",children:(0,Bn.jsx)(hT,{})})]})]})}function Qxe({isOpen:e,onClick:t}){let{commentStatus:r,pingStatus:o,commentsSupported:n,trackbacksSupported:i}=(0,U3.useSelect)(l=>{let{getEditedPostAttribute:c}=l(w),{getPostType:u}=l(vZ.store),d=u(c("type"));return{commentStatus:c("comment_status")??"open",pingStatus:c("ping_status")??"open",commentsSupported:!!d.supports.comments,trackbacksSupported:!!d.supports.trackbacks}},[]),a;return r==="open"?o==="open"?a=(0,ia._x)("Open",'Adjective: e.g. "Comments are open"'):a=i?(0,ia.__)("Comments only"):(0,ia._x)("Open",'Adjective: e.g. "Comments are open"'):o==="open"?a=n?(0,ia.__)("Pings only"):(0,ia.__)("Pings enabled"):a=(0,ia.__)("Closed"),(0,Bn.jsx)(Wh.Button,{size:"compact",className:"editor-post-discussion__panel-toggle",variant:"tertiary","aria-label":(0,ia.__)("Change discussion options"),"aria-expanded":e,onClick:t,children:a})}function vT(){let{isEnabled:e}=(0,U3.useSelect)(n=>{let{isEditorPanelEnabled:i}=n(w);return{isEnabled:i(Kxe)}},[]),[t,r]=(0,gT.useState)(null),o=(0,gT.useMemo)(()=>({anchor:t,placement:"left-start",offset:36,shift:!0}),[t]);return e?(0,Bn.jsx)(tr,{supportKeys:["comments","trackbacks"],children:(0,Bn.jsx)(ht,{label:(0,ia.__)("Discussion"),ref:r,children:(0,Bn.jsx)(Wh.Dropdown,{popoverProps:o,className:"editor-post-discussion__panel-dropdown",contentClassName:"editor-post-discussion__panel-dialog",focusOnMount:!0,renderToggle:({isOpen:n,onToggle:i})=>(0,Bn.jsx)(Qxe,{isOpen:n,onClick:i}),renderContent:({onClose:n})=>(0,Bn.jsx)(Xxe,{onClose:n})})})}):null}var Yh=s(E(),1),bT=s(A(),1),ST=s(O(),1),yZ=s(D(),1),bZ=s(ft(),1);var yT=s(C(),1);function t0({hideLabelFromVision:e=!1,updateOnBlur:t=!1}){let{excerpt:r,shouldUseDescriptionLabel:o,usedAttribute:n}=(0,ST.useSelect)(d=>{let{getCurrentPostType:f,getEditedPostAttribute:m}=d(w),h=f(),g=["wp_template","wp_template_part"].includes(h)?"description":"excerpt";return{excerpt:m(g),shouldUseDescriptionLabel:["wp_template","wp_template_part","wp_block"].includes(h),usedAttribute:g}},[]),{editPost:i}=(0,ST.useDispatch)(w),[a,l]=(0,yZ.useState)((0,bZ.decodeEntities)(r)),c=d=>{i({[n]:d})},u=o?(0,Yh.__)("Write a description (optional)"):(0,Yh.__)("Write an excerpt (optional)");return(0,yT.jsx)("div",{className:"editor-post-excerpt",children:(0,yT.jsx)(bT.TextareaControl,{label:u,hideLabelFromVision:e,className:"editor-post-excerpt__textarea",onChange:t?l:c,onBlur:t?()=>c(a):void 0,value:t?a:r,help:o?(0,Yh.__)("Write a description"):(0,yT.jsx)(bT.ExternalLink,{href:(0,Yh.__)("https://wordpress.org/documentation/article/page-post-settings-sidebar/#excerpt"),children:(0,Yh.__)("Learn more about manual excerpts")})})})}var SZ=s(C(),1);function Jxe({children:e}){return(0,SZ.jsx)(tr,{supportKeys:"excerpt",children:e})}var lm=Jxe;var Sc=s(E(),1),sa=s(A(),1),o0=s(O(),1),xT=s(D(),1),wZ=s($(),1),G3=s(W(),1),xZ=s(ft(),1);var _T=s(A(),1),H3=s(C(),1),{Fill:$xe,Slot:eCe}=(0,_T.createSlotFill)("PluginPostExcerpt"),_Z=({children:e,className:t})=>(0,H3.jsx)($xe,{children:(0,H3.jsx)(_T.PanelRow,{className:t,children:e})});_Z.Slot=eCe;var r0=_Z;var rr=s(C(),1),wT="post-excerpt";function tCe(){let{isOpened:e,isEnabled:t,postType:r}=(0,o0.useSelect)(a=>{let{isEditorPanelOpened:l,isEditorPanelEnabled:c,getCurrentPostType:u}=a(w);return{isOpened:l(wT),isEnabled:c(wT),postType:u()}},[]),{toggleEditorPanelOpened:o}=(0,o0.useDispatch)(w),n=()=>o(wT);if(!t)return null;let i=["wp_template","wp_template_part","wp_block"].includes(r);return(0,rr.jsx)(sa.PanelBody,{title:i?(0,Sc.__)("Description"):(0,Sc.__)("Excerpt"),opened:e,onToggle:n,children:(0,rr.jsx)(r0.Slot,{children:a=>(0,rr.jsxs)(rr.Fragment,{children:[(0,rr.jsx)(t0,{}),a]})})})}function CZ(){return(0,rr.jsx)(lm,{children:(0,rr.jsx)(tCe,{})})}function TZ(){return(0,rr.jsx)(lm,{children:(0,rr.jsx)(rCe,{})})}function rCe(){let{shouldRender:e,excerpt:t,shouldBeUsedAsDescription:r,allowEditing:o}=(0,o0.useSelect)(f=>{let{getCurrentPostType:m,getCurrentPostId:h,getEditedPostAttribute:g,isEditorPanelEnabled:v}=f(w),y=m(),b=["wp_template","wp_template_part"].includes(y),_=y==="wp_block",S=b||_,T=g(b?"description":"excerpt"),R=b&&f(G3.store).getEntityRecord("postType",y,h()),F=!T&&b?Zi({template:R,templateTypes:f(G3.store).getCurrentTheme()?.default_template_types})?.description:void 0,B=v(wT)||S;return{excerpt:T??F,shouldRender:B,shouldBeUsedAsDescription:S,allowEditing:B&&(!S||_||R&&R.source===k1.custom&&!R.has_theme_file&&R.is_custom)}},[]),[n,i]=(0,xT.useState)(null),a=r?(0,Sc.__)("Description"):(0,Sc.__)("Excerpt"),l=(0,xT.useMemo)(()=>({anchor:n,"aria-label":a,headerTitle:a,placement:"left-start",offset:36,shift:!0}),[n,a]);if(!e)return!1;let c=!!t&&(0,rr.jsx)(sa.__experimentalText,{align:"left",numberOfLines:4,truncate:o,children:(0,xZ.decodeEntities)(t)});if(!o)return c;let u=r?(0,Sc.__)("Add a description\u2026"):(0,Sc.__)("Add an excerpt\u2026"),d=r?(0,Sc.__)("Edit description"):(0,Sc.__)("Edit excerpt");return(0,rr.jsxs)(sa.__experimentalVStack,{children:[c,(0,rr.jsx)(sa.Dropdown,{className:"editor-post-excerpt__dropdown",contentClassName:"editor-post-excerpt__dropdown__content",popoverProps:l,focusOnMount:!0,ref:i,renderToggle:({onToggle:f})=>(0,rr.jsx)(sa.Button,{__next40pxDefaultSize:!0,onClick:f,variant:"link",children:c?d:u}),renderContent:({onClose:f})=>(0,rr.jsxs)(rr.Fragment,{children:[(0,rr.jsx)(wZ.__experimentalInspectorPopoverHeader,{title:a,onClose:f}),(0,rr.jsx)(sa.__experimentalVStack,{spacing:4,children:(0,rr.jsx)(r0.Slot,{children:m=>(0,rr.jsxs)(rr.Fragment,{children:[(0,rr.jsx)(t0,{hideLabelFromVision:!0,updateOnBlur:!0}),m]})})})]})})]})}var Mi=s(E(),1),Y3=s(mo(),1),cn=s(A(),1),RZ=s(sy(),1),TT=s(D(),1),AZ=s(he(),1),qh=s(O(),1),cm=s($(),1),OZ=s(W(),1);var PZ=s(O(),1),kZ=s(W(),1);function CT({children:e,supportKeys:t}){let{postType:r,themeSupports:o}=(0,PZ.useSelect)(i=>({postType:i(w).getEditedPostAttribute("type"),themeSupports:i(kZ.store).getThemeSupports()}),[]);return(Array.isArray(t)?t:[t]).some(i=>{let a=o?.[i]??!1;return i==="post-thumbnails"&&Array.isArray(a)?a.includes(r):a})?e:null}var W3=s(C(),1);function oCe({children:e}){return(0,W3.jsx)(CT,{supportKeys:"post-thumbnails",children:(0,W3.jsx)(tr,{supportKeys:"thumbnail",children:e})})}var _c=oCe;var zo=s(C(),1),EZ=["image"],nCe=(0,Mi.__)("Featured image"),iCe=(0,Mi.__)("Add a featured image"),sCe=(0,zo.jsx)("p",{children:(0,Mi.__)("To edit the featured image, you need permission to upload media.")});function aCe(e,t){if(!e)return{};let r=(0,Y3.applyFilters)("editor.PostFeaturedImage.imageSize","large",e.id,t);if(r in(e?.media_details?.sizes??{}))return{mediaWidth:e.media_details.sizes[r].width,mediaHeight:e.media_details.sizes[r].height,mediaSourceUrl:e.media_details.sizes[r].source_url};let o=(0,Y3.applyFilters)("editor.PostFeaturedImage.imageSize","thumbnail",e.id,t);return o in(e?.media_details?.sizes??{})?{mediaWidth:e.media_details.sizes[o].width,mediaHeight:e.media_details.sizes[o].height,mediaSourceUrl:e.media_details.sizes[o].source_url}:{mediaWidth:e.media_details.width,mediaHeight:e.media_details.height,mediaSourceUrl:e.source_url}}function lCe({currentPostId:e,featuredImageId:t,onUpdateImage:r,onRemoveImage:o,media:n,postType:i,noticeUI:a,noticeOperations:l,isRequestingFeaturedImageMedia:c}){let u=(0,TT.useRef)(!1),[d,f]=(0,TT.useState)(!1),{getSettings:m}=(0,qh.useSelect)(cm.store),{mediaSourceUrl:h}=aCe(n,e);function g(_){m().mediaUpload({allowedTypes:EZ,filesList:_,onFileChange([S]){if((0,RZ.isBlobURL)(S?.url)){f(!0);return}S&&r(S),f(!1)},onError(S){l.removeAllNotices(),l.createErrorNotice(S)},multiple:!1})}function v(_){return _.alt_text?(0,Mi.sprintf)((0,Mi.__)("Current image: %s"),_.alt_text):(0,Mi.sprintf)((0,Mi.__)("The current image has no alternative text. The file name is: %s"),_.media_details.sizes?.full?.file||_.slug)}function y(_){u.current&&_&&(_.focus(),u.current=!1)}let b=!c&&!!t&&!n;return(0,zo.jsxs)(_c,{children:[a,(0,zo.jsxs)("div",{className:"editor-post-featured-image",children:[n&&(0,zo.jsx)("div",{id:`editor-post-featured-image-${t}-describedby`,className:"hidden",children:v(n)}),(0,zo.jsx)(cm.MediaUploadCheck,{fallback:sCe,children:(0,zo.jsx)(cm.MediaUpload,{title:i?.labels?.featured_image||nCe,onSelect:r,unstableFeaturedImageFlow:!0,allowedTypes:EZ,modalClass:"editor-post-featured-image__media-modal",render:({open:_})=>(0,zo.jsxs)("div",{className:"editor-post-featured-image__container",children:[b?(0,zo.jsx)(cn.Notice,{status:"warning",isDismissible:!1,children:(0,Mi.__)("Could not retrieve the featured image data.")}):(0,zo.jsxs)(cn.Button,{__next40pxDefaultSize:!0,ref:y,className:t?"editor-post-featured-image__preview":"editor-post-featured-image__toggle",onClick:_,"aria-label":t?(0,Mi.__)("Edit or replace the featured image"):null,"aria-describedby":t?`editor-post-featured-image-${t}-describedby`:null,"aria-haspopup":"dialog",disabled:d,accessibleWhenDisabled:!0,children:[!!t&&n&&(0,zo.jsx)("img",{className:"editor-post-featured-image__preview-image",src:h,alt:v(n)}),(d||c)&&(0,zo.jsx)(cn.Spinner,{}),!t&&!d&&(i?.labels?.set_featured_image||iCe)]}),!!t&&(0,zo.jsxs)(cn.__experimentalHStack,{className:re("editor-post-featured-image__actions",{"editor-post-featured-image__actions-missing-image":b,"editor-post-featured-image__actions-is-requesting-image":c}),children:[(0,zo.jsx)(cn.Button,{__next40pxDefaultSize:!0,className:"editor-post-featured-image__action",onClick:_,"aria-haspopup":"dialog",variant:b?"secondary":void 0,children:(0,Mi.__)("Replace")}),(0,zo.jsx)(cn.Button,{__next40pxDefaultSize:!0,className:"editor-post-featured-image__action",onClick:()=>{o(),u.current=!0},variant:b?"secondary":void 0,isDestructive:b,children:(0,Mi.__)("Remove")})]}),(0,zo.jsx)(cn.DropZone,{onFilesDrop:g})]}),value:t})})]})]})}var cCe=(0,qh.withSelect)(e=>{let{getEntityRecord:t,getPostType:r,hasFinishedResolution:o}=e(OZ.store),{getCurrentPostId:n,getEditedPostAttribute:i}=e(w),a=i("featured_media");return{media:a?t("postType","attachment",a,{context:"view"}):null,currentPostId:n(),postType:r(i("type")),featuredImageId:a,isRequestingFeaturedImageMedia:!!a&&!o("getEntityRecord",["postType","attachment",a,{context:"view"}])}}),uCe=(0,qh.withDispatch)((e,{noticeOperations:t},{select:r})=>{let{editPost:o}=e(w);return{onUpdateImage(n){o({featured_media:n.id})},onDropImage(n){r(cm.store).getSettings().mediaUpload({allowedTypes:["image"],filesList:n,onFileChange([i]){o({featured_media:i.id})},onError(i){t.removeAllNotices(),t.createErrorNotice(i)},multiple:!1})},onRemoveImage(){o({featured_media:0})}}}),n0=(0,AZ.compose)(cn.withNotices,cCe,uCe,(0,cn.withFilters)("editor.PostFeaturedImage"))(lCe);var IZ=s(E(),1),NZ=s(A(),1),PT=s(O(),1),FZ=s(W(),1);var Zh=s(C(),1),q3="featured-image";function kT({withPanelBody:e=!0}){let{postType:t,isEnabled:r,isOpened:o}=(0,PT.useSelect)(i=>{let{getEditedPostAttribute:a,isEditorPanelEnabled:l,isEditorPanelOpened:c}=i(w),{getPostType:u}=i(FZ.store);return{postType:u(a("type")),isEnabled:l(q3),isOpened:c(q3)}},[]),{toggleEditorPanelOpened:n}=(0,PT.useDispatch)(w);return r?e?(0,Zh.jsx)(_c,{children:(0,Zh.jsx)(NZ.PanelBody,{title:t?.labels?.featured_image??(0,IZ.__)("Featured image"),opened:o,onToggle:()=>n(q3),children:(0,Zh.jsx)(n0,{})})}):(0,Zh.jsx)(_c,{children:(0,Zh.jsx)(n0,{})}):null}var Mn=s(E(),1),ET=s(A(),1),RT=s(O(),1),MZ=s(he(),1),LZ=s(W(),1);var DZ=s(O(),1);var BZ=s(C(),1);function Kh({children:e}){return(0,DZ.useSelect)(r=>r(w).getEditorSettings().disablePostFormats,[])?null:(0,BZ.jsx)(tr,{supportKeys:"post-formats",children:e})}var um=s(C(),1),i0=[{id:"aside",caption:(0,Mn.__)("Aside")},{id:"audio",caption:(0,Mn.__)("Audio")},{id:"chat",caption:(0,Mn.__)("Chat")},{id:"gallery",caption:(0,Mn.__)("Gallery")},{id:"image",caption:(0,Mn.__)("Image")},{id:"link",caption:(0,Mn.__)("Link")},{id:"quote",caption:(0,Mn.__)("Quote")},{id:"standard",caption:(0,Mn.__)("Standard")},{id:"status",caption:(0,Mn.__)("Status")},{id:"video",caption:(0,Mn.__)("Video")}].sort((e,t)=>{let r=e.caption.toUpperCase(),o=t.caption.toUpperCase();return ro?1:0});function s0(){let t=`post-format-selector-${(0,MZ.useInstanceId)(s0)}`,{postFormat:r,suggestedFormat:o,supportedFormats:n}=(0,RT.useSelect)(u=>{let{getEditedPostAttribute:d,getSuggestedPostFormat:f}=u(w),m=d("format"),h=u(LZ.store).getThemeSupports();return{postFormat:m??"standard",suggestedFormat:f(),supportedFormats:h.formats}},[]),i=i0.filter(u=>n?.includes(u.id)||r===u.id),a=i.find(u=>u.id===o),{editPost:l}=(0,RT.useDispatch)(w),c=u=>l({format:u});return(0,um.jsx)(Kh,{children:(0,um.jsxs)("div",{className:"editor-post-format",children:[(0,um.jsx)(ET.RadioControl,{className:"editor-post-format__options",label:(0,Mn.__)("Post Format"),selected:r,onChange:u=>c(u),id:t,options:i.map(u=>({label:u.caption,value:u.id})),hideLabelFromVision:!0}),a&&a.id!==r&&(0,um.jsx)("p",{className:"editor-post-format__suggestion",children:(0,um.jsx)(ET.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:()=>c(a.id),children:(0,Mn.sprintf)((0,Mn.__)("Apply suggested format: %s"),a.caption)})})]})})}var fm=s(E(),1),Z3=s(A(),1),a0=s(O(),1);var K3=s(Ir(),1);var VZ=s(O(),1);var jZ=s(C(),1);function dCe({children:e}){let{lastRevisionId:t,revisionsCount:r}=(0,VZ.useSelect)(o=>{let{getCurrentPostLastRevisionId:n,getCurrentPostRevisionsCount:i}=o(w);return{lastRevisionId:n(),revisionsCount:i()}},[]);return!t||r<2?null:(0,jZ.jsx)(tr,{supportKeys:"revisions",children:e})}var dm=dCe;var Xh=s(C(),1);function zZ(){return(0,a0.useSelect)(e=>{let{getCurrentPostLastRevisionId:t,getCurrentPostRevisionsCount:r,getEditorSettings:o}=e(w);return{lastRevisionId:t(),revisionsCount:r(),disableVisualRevisions:!!o().disableVisualRevisions}},[])}function fCe(){let{lastRevisionId:e,revisionsCount:t,disableVisualRevisions:r}=zZ(),{setCurrentRevisionId:o}=N((0,a0.useDispatch)(w)),n=r?{href:(0,K3.addQueryArgs)("revision.php",{revision:e})}:{onClick:()=>o(e)};return(0,Xh.jsx)(dm,{children:(0,Xh.jsx)(Z3.Button,{__next40pxDefaultSize:!0,...n,className:"editor-post-last-revision__title",icon:xl,iconPosition:"right",text:(0,fm.sprintf)((0,fm.__)("Revisions (%s)"),t)})})}function UZ(){let{lastRevisionId:e,revisionsCount:t,disableVisualRevisions:r}=zZ(),{setCurrentRevisionId:o}=N((0,a0.useDispatch)(w)),n=r?{href:(0,K3.addQueryArgs)("revision.php",{revision:e})}:{onClick:()=>o(e)};return(0,Xh.jsx)(dm,{children:(0,Xh.jsx)(ht,{label:(0,fm.__)("Revisions"),children:(0,Xh.jsx)(Z3.Button,{...n,className:"editor-private-post-last-revision__button",text:t,"aria-label":(0,fm.sprintf)((0,fm.__)("Open revisions screen: %s revisions"),t),variant:"tertiary",size:"compact"})})})}var AT=fCe;var HZ=s(A(),1);var OT=s(C(),1);function mCe(){return(0,OT.jsx)(dm,{children:(0,OT.jsx)(HZ.PanelBody,{className:"editor-post-last-revision__panel",children:(0,OT.jsx)(AT,{})})})}var GZ=mCe;var ko=s(E(),1),aa=s(A(),1),c0=s(O(),1),Q3=s(Ir(),1),l0=s(D(),1),Qh=s(mo(),1),KZ=s(he(),1),J3=s(W(),1);var wc=s(E(),1),pCe="authentication-failed",hCe="connection-expired",gCe="connection-limit-exceeded",WZ="document-size-limit-exceeded",YZ="unknown-error",X3={[pCe]:{title:(0,wc.__)("Unable to connect"),description:(0,wc.__)("Real-time collaboration couldn't verify your permissions. Check that you have access to edit this post or contact your site administrator.")},[hCe]:{title:(0,wc.__)("Connection expired"),description:(0,wc.__)("Your connection to real-time collaboration has timed out. Editing is paused to prevent conflicts with other editors.")},[gCe]:{title:(0,wc.__)("Too many editors connected"),description:(0,wc.__)("Real-time collaboration has reached its connection limit. Try again later or contact your site administrator.")},[YZ]:{title:(0,wc.__)("Connection lost"),description:(0,wc.__)("The connection to real-time collaboration was interrupted. Editing is paused to prevent conflicts with other editors.")}};function qZ(e){return e?.code&&X3[e?.code]?X3[e.code]:X3[YZ]}var Kt=s(C(),1);function ZZ(){let{isCollaborationSupported:e,syncConnectionStatus:t}=(0,c0.useSelect)(r=>{let{isCollaborationSupported:o,getSyncConnectionStatus:n}=N(r(J3.store));return{isCollaborationSupported:o(),syncConnectionStatus:n()}},[]);return e?null:WZ===t?.error?.code?(0,Kt.jsx)("p",{children:(0,ko.__)("Because this post is too large for real-time collaboration, only one person can edit at a time.")}):(0,Kt.jsx)("p",{children:(0,ko.__)("Because this post uses plugins that aren\u2019t compatible with real-time collaboration, only one person can edit at a time.")})}function XZ(){let t="core/editor/post-locked-modal-"+(0,KZ.useInstanceId)(XZ),{autosave:r,updatePostLock:o}=(0,c0.useDispatch)(w),{isCollaborationEnabled:n,isLocked:i,isTakeover:a,user:l,postId:c,postLockUtils:u,activePostLock:d,postType:f,previewLink:m}=(0,c0.useSelect)(_=>{let{isPostLocked:S,isPostLockTakeover:x,getPostLockUser:T,getCurrentPostId:R,getActivePostLock:F,getEditedPostAttribute:B,getEditedPostPreviewLink:z,getEditorSettings:L,isCollaborationEnabledForCurrentPost:M}=N(_(w)),{getPostType:k}=_(J3.store);return{isCollaborationEnabled:M(),isLocked:S(),isTakeover:x(),user:T(),postId:R(),postLockUtils:L().postLockUtils,activePostLock:F(),postType:k(B("type")),previewLink:z()}},[]);if((0,l0.useEffect)(()=>{function _(T){i||(T["wp-refresh-post-lock"]={lock:d,post_id:c})}function S(T){if(!T["wp-refresh-post-lock"])return;let R=T["wp-refresh-post-lock"];R.lock_error?(r(),o({isLocked:!0,isTakeover:!0,user:{name:R.lock_error.name,avatar:R.lock_error.avatar_src_2x}})):R.new_lock&&o({isLocked:!1,activePostLock:R.new_lock})}function x(){if(i||!d)return;let T=new window.FormData;if(T.append("action","wp-remove-post-lock"),T.append("_wpnonce",u.unlockNonce),T.append("post_ID",c),T.append("active_post_lock",d),window.navigator.sendBeacon)window.navigator.sendBeacon(u.ajaxUrl,T);else{let R=new window.XMLHttpRequest;R.open("POST",u.ajaxUrl,!1),R.send(T)}}return(0,Qh.addAction)("heartbeat.send",t,_),(0,Qh.addAction)("heartbeat.tick",t,S),window.addEventListener("beforeunload",x),()=>{(0,Qh.removeAction)("heartbeat.send",t),(0,Qh.removeAction)("heartbeat.tick",t),window.removeEventListener("beforeunload",x)}},[]),!i||n)return null;let h=l.name,g=l.avatar,v=(0,Q3.addQueryArgs)("post.php",{"get-post-lock":"1",lockKey:!0,post:c,action:"edit",_wpnonce:u.nonce}),y=(0,Q3.addQueryArgs)("edit.php",{post_type:f?.slug}),b=(0,ko.__)("Exit editor");return(0,Kt.jsx)(aa.Modal,{title:a?(0,ko.__)("Someone else has taken over this post"):(0,ko.__)("This post is already being edited"),focusOnMount:!0,shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,isDismissible:!1,className:"editor-post-locked-modal",size:"medium",children:(0,Kt.jsxs)(aa.__experimentalHStack,{alignment:"top",spacing:6,children:[!!g&&(0,Kt.jsx)("img",{src:g,alt:(0,ko.__)("Avatar"),className:"editor-post-locked-modal__avatar",width:64,height:64}),(0,Kt.jsxs)("div",{children:[!!a&&(0,Kt.jsxs)(Kt.Fragment,{children:[(0,Kt.jsx)("p",{children:(0,l0.createInterpolateElement)(h?(0,ko.sprintf)((0,ko.__)("%s now has editing control of this post (). Don\u2019t worry, your changes up to this moment have been saved."),h):(0,ko.__)("Another user now has editing control of this post (). Don\u2019t worry, your changes up to this moment have been saved."),{strong:(0,Kt.jsx)("strong",{}),PreviewLink:(0,Kt.jsx)(aa.ExternalLink,{href:m,children:(0,ko.__)("preview")})})}),(0,Kt.jsx)(ZZ,{})]}),!a&&(0,Kt.jsxs)(Kt.Fragment,{children:[(0,Kt.jsx)("p",{children:(0,l0.createInterpolateElement)(h?(0,ko.sprintf)((0,ko.__)("%s is currently working on this post (), which means you cannot make changes, unless you take over."),h):(0,ko.__)("Another user is currently working on this post (), which means you cannot make changes, unless you take over."),{strong:(0,Kt.jsx)("strong",{}),PreviewLink:(0,Kt.jsx)(aa.ExternalLink,{href:m,children:(0,ko.__)("preview")})})}),(0,Kt.jsx)(ZZ,{}),(0,Kt.jsx)("p",{children:(0,ko.__)("If you take over, the other user will lose editing control to the post, but their changes will be saved.")})]}),(0,Kt.jsxs)(aa.__experimentalHStack,{className:"editor-post-locked-modal__buttons",justify:"flex-end",children:[!a&&(0,Kt.jsx)(aa.Button,{__next40pxDefaultSize:!0,variant:"tertiary",href:v,children:(0,ko.__)("Take over")}),(0,Kt.jsx)(aa.Button,{__next40pxDefaultSize:!0,variant:"primary",href:y,children:b})]})]})]})})}var QZ=XZ;var $Z=s(E(),1),eK=s(A(),1),NT=s(O(),1);var JZ=s(O(),1);function vCe({children:e}){let{hasPublishAction:t,isPublished:r}=(0,JZ.useSelect)(o=>{let{isCurrentPostPublished:n,getCurrentPost:i}=o(w);return{hasPublishAction:i()._links?.["wp:action-publish"]??!1,isPublished:n()}},[]);return r||!t?null:e}var IT=vCe;var $3=s(C(),1);function yCe(){let e=(0,NT.useSelect)(o=>o(w).getEditedPostAttribute("status"),[]),{editPost:t}=(0,NT.useDispatch)(w),r=()=>{t({status:e==="pending"?"draft":"pending"})};return(0,$3.jsx)(IT,{children:(0,$3.jsx)(eK.CheckboxControl,{label:(0,$Z.__)("Pending review"),checked:e==="pending",onChange:r})})}var tK=yCe;var rK=s(D(),1),xc=s(A(),1),Jh=s(E(),1),FT=s(O(),1),oK=s(mo(),1),nK=s(W(),1);var vs=s(C(),1);function bCe(e){let t=(0,rK.renderToString)((0,vs.jsxs)("div",{className:"editor-post-preview-button__interstitial-message",children:[(0,vs.jsxs)(xc.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 96 96",children:[(0,vs.jsx)(xc.Path,{className:"outer",d:"M48 12c19.9 0 36 16.1 36 36S67.9 84 48 84 12 67.9 12 48s16.1-36 36-36",fill:"none"}),(0,vs.jsx)(xc.Path,{className:"inner",d:"M69.5 46.4c0-3.9-1.4-6.7-2.6-8.8-1.6-2.6-3.1-4.9-3.1-7.5 0-2.9 2.2-5.7 5.4-5.7h.4C63.9 19.2 56.4 16 48 16c-11.2 0-21 5.7-26.7 14.4h2.1c3.3 0 8.5-.4 8.5-.4 1.7-.1 1.9 2.4.2 2.6 0 0-1.7.2-3.7.3L40 67.5l7-20.9L42 33c-1.7-.1-3.3-.3-3.3-.3-1.7-.1-1.5-2.7.2-2.6 0 0 5.3.4 8.4.4 3.3 0 8.5-.4 8.5-.4 1.7-.1 1.9 2.4.2 2.6 0 0-1.7.2-3.7.3l11.5 34.3 3.3-10.4c1.6-4.5 2.4-7.8 2.4-10.5zM16.1 48c0 12.6 7.3 23.5 18 28.7L18.8 35c-1.7 4-2.7 8.4-2.7 13zm32.5 2.8L39 78.6c2.9.8 5.9 1.3 9 1.3 3.7 0 7.3-.6 10.6-1.8-.1-.1-.2-.3-.2-.4l-9.8-26.9zM76.2 36c0 3.2-.6 6.9-2.4 11.4L64 75.6c9.5-5.5 15.9-15.8 15.9-27.6 0-5.5-1.4-10.8-3.9-15.3.1 1 .2 2.1.2 3.3z",fill:"none"})]}),(0,vs.jsx)("p",{children:(0,Jh.__)("Generating preview\u2026")})]}));t+=`
`,t=(0,oK.applyFilters)("editor.PostPreview.interstitialMarkup",t),e.write(t),e.title=(0,Jh.__)("Generating preview\u2026"),e.close()}function od({className:e,textContent:t,forceIsAutosaveable:r,role:o,onPreview:n}){let{postId:i,currentPostLink:a,previewLink:l,isSaveable:c,isViewable:u}=(0,FT.useSelect)(g=>{let v=g(w),_=g(nK.store).getPostType(v.getCurrentPostType("type"))?.viewable??!1;return _?{postId:v.getCurrentPostId(),currentPostLink:v.getCurrentPostAttribute("link"),previewLink:v.getEditedPostPreviewLink(),isSaveable:v.isEditedPostSaveable(),isViewable:_}:{isViewable:_}},[]),{__unstableSaveForPreview:d}=(0,FT.useDispatch)(w);if(!u)return null;let f=`wp-preview-${i}`;return(0,vs.jsx)(xc.Button,{variant:e?void 0:"tertiary",className:e||"editor-post-preview",href:l||a,target:f,accessibleWhenDisabled:!0,disabled:!c,onClick:async g=>{g.preventDefault();let v=window.open("",f);v.focus(),bCe(v.document);let y=await d({forceIsAutosaveable:r});v.location=y,n?.()},role:o,size:"compact",children:t||(0,vs.jsxs)(vs.Fragment,{children:[(0,Jh._x)("Preview","imperative verb"),(0,vs.jsx)(xc.VisuallyHidden,{as:"span",children:(0,Jh.__)("(opens in a new tab)")})]})})}var lK=s(A(),1),cK=s(D(),1),BT=s(O(),1),uK=s(he(),1);var Cc=s(E(),1),iK=s(O(),1),sK=s(he(),1);function DT(){let e=(0,sK.useViewportMatch)("medium","<"),{isPublished:t,isBeingScheduled:r,isSaving:o,isPublishing:n,hasPublishAction:i,isAutosaving:a,hasNonPostEntityChanges:l,postStatusHasChanged:c,postStatus:u,postType:d}=(0,iK.useSelect)(f=>{let{isCurrentPostPublished:m,isEditedPostBeingScheduled:h,isSavingPost:g,isPublishingPost:v,getCurrentPost:y,getCurrentPostType:b,isAutosavingPost:_,getPostEdits:S,getEditedPostAttribute:x}=f(w);return{isPublished:m(),isBeingScheduled:h(),isSaving:g(),isPublishing:v(),hasPublishAction:y()._links?.["wp:action-publish"]??!1,postType:b(),isAutosaving:_(),hasNonPostEntityChanges:f(w).hasNonPostEntityChanges(),postStatusHasChanged:!!S()?.status,postStatus:x("status")}},[]);return n?(0,Cc.__)("Publishing\u2026"):(t||r)&&o&&!a?(0,Cc.__)("Saving\u2026"):i?l||t||c&&!["future","publish"].includes(u)||!c&&u==="future"?(0,Cc.__)("Save"):r?(0,Cc.__)("Schedule"):(0,Cc.__)("Publish"):d===ur&&window?.__experimentalMediaEditor?(0,Cc.__)("Save"):e?(0,Cc.__)("Publish"):(0,Cc.__)("Submit for Review")}var $h=s(C(),1),aK=()=>{},SCe=class extends cK.Component{constructor(e){super(e),this.createOnClick=this.createOnClick.bind(this),this.closeEntitiesSavedStates=this.closeEntitiesSavedStates.bind(this),this.state={entitiesSavedStatesCallback:!1}}createOnClick(e){return(...t)=>{let{hasNonPostEntityChanges:r,setEntitiesSavedStatesCallback:o}=this.props;return r&&o?(this.setState({entitiesSavedStatesCallback:()=>e(...t)}),o(()=>this.closeEntitiesSavedStates),aK):e(...t)}}closeEntitiesSavedStates(e){let{postType:t,postId:r}=this.props,{entitiesSavedStatesCallback:o}=this.state;this.setState({entitiesSavedStatesCallback:!1},()=>{e&&e.some(n=>n.kind==="postType"&&n.name===t&&n.key===r)&&o()})}render(){let{forceIsDirty:e,hasPublishAction:t,isBeingScheduled:r,isOpen:o,isPostSavingLocked:n,isPublishable:i,isPublished:a,isSaveable:l,isSaving:c,isAutoSaving:u,isToggle:d,savePostStatus:f,onSubmit:m=aK,onToggle:h,visibility:g,hasNonPostEntityChanges:v,isSavingNonPostEntityChanges:y,postStatus:b,postStatusHasChanged:_}=this.props,S=(c||!l||n||!i&&!e)&&(!v||y),x=(a||c||!l||!i&&!e)&&(!v||y),T="publish";_?T=b:t?g==="private"?T="private":r&&(T="future"):T="pending";let R=()=>{S||(m(),f(T))},F=()=>{x||h()},B={"aria-disabled":S,className:"editor-post-publish-button",isBusy:!u&&c,variant:"primary",onClick:this.createOnClick(R),"aria-haspopup":v?"dialog":void 0},z={"aria-disabled":x,"aria-expanded":o,className:"editor-post-publish-panel__toggle",isBusy:c&&a,variant:"primary",size:"compact",onClick:this.createOnClick(F),"aria-haspopup":v?"dialog":void 0},L=d?z:B;return(0,$h.jsx)($h.Fragment,{children:(0,$h.jsx)(lK.Button,{...L,className:`${L.className} editor-post-publish-button__button`,size:"compact",children:(0,$h.jsx)(DT,{})})})}},eg=(0,uK.compose)([(0,BT.withSelect)(e=>{let{isSavingPost:t,isAutosavingPost:r,isEditedPostBeingScheduled:o,getEditedPostVisibility:n,isCurrentPostPublished:i,isEditedPostSaveable:a,isEditedPostPublishable:l,isPostSavingLocked:c,getCurrentPost:u,getCurrentPostType:d,getCurrentPostId:f,hasNonPostEntityChanges:m,isSavingNonPostEntityChanges:h,getEditedPostAttribute:g,getPostEdits:v}=e(w);return{isSaving:t(),isAutoSaving:r(),isBeingScheduled:o(),visibility:n(),isSaveable:a(),isPostSavingLocked:c(),isPublishable:l(),isPublished:i(),hasPublishAction:u()._links?.["wp:action-publish"]??!1,postType:d(),postId:f(),postStatus:g("status"),postStatusHasChanged:v()?.status,hasNonPostEntityChanges:m(),isSavingNonPostEntityChanges:h()}}),(0,BT.withDispatch)(e=>{let{editPost:t,savePost:r}=e(w);return{savePostStatus:o=>{t({status:o},{undoIgnore:!0}),r()}}})])(SCe);var eP=s(E(),1),tP=s(D(),1),ua=s(A(),1),rP=s(O(),1),fX=s(he(),1);var mX=s(W(),1);var la=s(E(),1),v0=s(A(),1),eX=s(O(),1);var tX=s(Ir(),1),rX=s(W(),1),oX=s(ft(),1);var tg=s(E(),1),dK=s(D(),1),rg=s(A(),1),fK=s(he(),1),LT=s(O(),1),mK=s($(),1);var mm=s(E(),1),MT=[{label:(0,mm.__)("Public"),value:"public",description:(0,mm.__)("Visible to everyone.")},{label:(0,mm.__)("Private"),value:"private",description:(0,mm.__)("Only visible to site admins and editors.")},{label:(0,mm.__)("Password protected"),value:"password",description:(0,mm.__)("Only visible to those who know the password.")}];var pm=s(C(),1);function u0({onClose:e}){let t=(0,fK.useInstanceId)(u0),{status:r,visibility:o,password:n}=(0,LT.useSelect)(d=>({status:d(w).getEditedPostAttribute("status"),visibility:d(w).getEditedPostVisibility(),password:d(w).getEditedPostAttribute("password")})),{editPost:i}=(0,LT.useDispatch)(w),[a,l]=(0,dK.useState)(!!n);function c(d){i({public:{status:o==="private"?"draft":r,password:""},private:{status:"private",password:""},password:{status:o==="private"?"draft":r,password:n||""}}[d]),l(d==="password")}let u=d=>{i({password:d})};return(0,pm.jsxs)("div",{className:"editor-post-visibility",children:[(0,pm.jsx)(mK.__experimentalInspectorPopoverHeader,{title:(0,tg.__)("Visibility"),help:(0,tg.__)("Control how this post is viewed."),onClose:e}),(0,pm.jsxs)(rg.__experimentalVStack,{spacing:4,children:[(0,pm.jsx)(rg.RadioControl,{label:(0,tg.__)("Visibility"),hideLabelFromVision:!0,options:MT,selected:a?"password":o,onChange:c}),a&&(0,pm.jsx)(rg.TextControl,{label:(0,tg.__)("Password"),onChange:u,value:n,placeholder:(0,tg.__)("Use a secure password"),type:"text",id:`editor-post-visibility__password-input-${t}`,__next40pxDefaultSize:!0,maxLength:255})]})]})}var pK=s(O(),1);function VT(){return e4()}function e4(){let e=(0,pK.useSelect)(t=>t(w).getEditedPostVisibility(),[]);return MT.find(t=>t.value===e)?.label}function jT(e){let t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}var _Ce=Math.pow(10,8)*24*60*60*1e3,d$e=-_Ce;var t4=6e4,r4=36e5;var wCe=3600;var hK=wCe*24,f$e=hK*7,xCe=hK*365.2425,CCe=xCe/12,m$e=CCe*3;function gK(e){let t=jT(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(23,59,59,999),t}function o4(e){let t=jT(e);return t.setDate(1),t.setHours(0,0,0,0),t}function vK(e,t){let r=t?.additionalDigits??2,o=ECe(e),n;if(o.date){let c=RCe(o.date,r);n=ACe(c.restDateString,c.year)}if(!n||isNaN(n.getTime()))return new Date(NaN);let i=n.getTime(),a=0,l;if(o.time&&(a=OCe(o.time),isNaN(a)))return new Date(NaN);if(o.timezone){if(l=ICe(o.timezone),isNaN(l))return new Date(NaN)}else{let c=new Date(i+a),u=new Date(0);return u.setFullYear(c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()),u.setHours(c.getUTCHours(),c.getUTCMinutes(),c.getUTCSeconds(),c.getUTCMilliseconds()),u}return new Date(i+a+l)}var zT={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},TCe=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,PCe=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,kCe=/^([+-])(\d{2})(?::?(\d{2}))?$/;function ECe(e){let t={},r=e.split(zT.dateTimeDelimiter),o;if(r.length>2)return t;if(/:/.test(r[0])?o=r[0]:(t.date=r[0],o=r[1],zT.timeZoneDelimiter.test(t.date)&&(t.date=e.split(zT.timeZoneDelimiter)[0],o=e.substr(t.date.length,e.length))),o){let n=zT.timezone.exec(o);n?(t.time=o.replace(n[1],""),t.timezone=n[1]):t.time=o}return t}function RCe(e,t){let r=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),o=e.match(r);if(!o)return{year:NaN,restDateString:""};let n=o[1]?parseInt(o[1]):null,i=o[2]?parseInt(o[2]):null;return{year:i===null?n:i*100,restDateString:e.slice((o[1]||o[2]).length)}}function ACe(e,t){if(t===null)return new Date(NaN);let r=e.match(TCe);if(!r)return new Date(NaN);let o=!!r[4],n=d0(r[1]),i=d0(r[2])-1,a=d0(r[3]),l=d0(r[4]),c=d0(r[5])-1;if(o)return MCe(t,l,c)?NCe(t,l,c):new Date(NaN);{let u=new Date(0);return!DCe(t,i,a)||!BCe(t,n)?new Date(NaN):(u.setUTCFullYear(t,i,Math.max(n,a)),u)}}function d0(e){return e?parseInt(e):1}function OCe(e){let t=e.match(PCe);if(!t)return NaN;let r=n4(t[1]),o=n4(t[2]),n=n4(t[3]);return LCe(r,o,n)?r*r4+o*t4+n*1e3:NaN}function n4(e){return e&&parseFloat(e.replace(",","."))||0}function ICe(e){if(e==="Z")return 0;let t=e.match(kCe);if(!t)return 0;let r=t[1]==="+"?-1:1,o=parseInt(t[2]),n=t[3]&&parseInt(t[3])||0;return VCe(o,n)?r*(o*r4+n*t4):NaN}function NCe(e,t,r){let o=new Date(0);o.setUTCFullYear(e,0,4);let n=o.getUTCDay()||7,i=(t-1)*7+r+1-n;return o.setUTCDate(o.getUTCDate()+i),o}var FCe=[31,null,31,30,31,30,31,31,30,31,30,31];function yK(e){return e%400===0||e%4===0&&e%100!==0}function DCe(e,t,r){return t>=0&&t<=11&&r>=1&&r<=(FCe[t]||(yK(e)?29:28))}function BCe(e,t){return t>=1&&t<=(yK(e)?366:365)}function MCe(e,t,r){return t>=1&&t<=53&&r>=0&&r<=6}function LCe(e,t,r){return e===24?t===0&&r===0:r>=0&&r<60&&t>=0&&t<60&&e>=0&&e<25}function VCe(e,t){return t>=0&&t<=59}var bK=s(po(),1),SK=s(E(),1),f0=s(O(),1),_K=s($(),1),UT=s(D(),1),wK=s(W(),1);var i4=s(C(),1),{PrivatePublishDateTimePicker:jCe}=N(_K.privateApis);function og(e){return(0,i4.jsx)(s4,{...e,showPopoverHeaderActions:!0,isCompact:!1})}function s4({onClose:e,showPopoverHeaderActions:t,isCompact:r}){let{postDate:o,postType:n}=(0,f0.useSelect)(h=>({postDate:h(w).getEditedPostAttribute("date"),postType:h(w).getCurrentPostType()}),[]),{editPost:i}=(0,f0.useDispatch)(w),a=h=>i({date:h}),[l,c]=(0,UT.useState)(o4(new Date(o))),u=(0,f0.useSelect)(h=>h(wK.store).getEntityRecords("postType",n,{status:"publish,future",after:o4(l).toISOString(),before:gK(l).toISOString(),exclude:[h(w).getCurrentPostId()],per_page:100,_fields:"id,date"}),[l,n]),d=(0,UT.useMemo)(()=>(u||[]).map(({date:h})=>({date:new Date(h)})),[u]),f=(0,bK.getSettings)(),m=/a(?!\\)/i.test(f.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return(0,i4.jsx)(jCe,{currentDate:o,onChange:a,is12Hour:m,dateOrder:(0,SK._x)("dmy","date order"),events:d,onMonthPreviewed:h=>c(vK(h)),onClose:e,isCompact:r,showPopoverHeaderActions:t})}var Ln=s(E(),1),ys=s(po(),1),CK=s(O(),1);function ng(e){return ig(e)}function ig({full:e=!1}={}){let{date:t,isFloating:r}=(0,CK.useSelect)(o=>({date:o(w).getEditedPostAttribute("date"),isFloating:o(w).isEditedPostDateFloating()}),[]);return e?TK(t):zCe(t,{isFloating:r})}function TK(e){let t=(0,ys.getDate)(e),r=UCe(),o=(0,ys.dateI18n)((0,Ln._x)("F j, Y g:i\xA0a","post schedule full date format"),t);return(0,Ln.isRTL)()?`${r} ${o}`:`${o} ${r}`}function zCe(e,{isFloating:t=!1,now:r=new Date}={}){if(!e||t)return(0,Ln.__)("Immediately");if(!HCe(r))return TK(e);let o=(0,ys.getDate)(e);if(xK(o,r))return(0,Ln.sprintf)((0,Ln.__)("Today at %s"),(0,ys.dateI18n)((0,Ln._x)("g:i\xA0a","post schedule time format"),o));let n=new Date(r);return n.setDate(n.getDate()+1),xK(o,n)?(0,Ln.sprintf)((0,Ln.__)("Tomorrow at %s"),(0,ys.dateI18n)((0,Ln._x)("g:i\xA0a","post schedule time format"),o)):o.getFullYear()===r.getFullYear()?(0,ys.dateI18n)((0,Ln._x)("F j g:i\xA0a","post schedule date format without year"),o):(0,ys.dateI18n)((0,Ln._x)("F j, Y g:i\xA0a","post schedule full date format"),o)}function UCe(){let{timezone:e}=(0,ys.getSettings)();return e.abbr&&isNaN(Number(e.abbr))?e.abbr:`UTC${e.offset<0?"":"+"}${e.offsetFormatted}`}function HCe(e){let{timezone:t}=(0,ys.getSettings)(),r=Number(t.offset),o=-1*(e.getTimezoneOffset()/60);return r===o}function xK(e,t){return e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}var ym=s(E(),1),DK=s(D(),1),u4=s(O(),1),BK=s(A(),1),YT=s(W(),1);var Uo=s(E(),1),vm=s(D(),1),sg=s(A(),1),gm=s(O(),1),GT=s(W(),1),AK=s(he(),1),OK=s(Xm(),1),IK=s(ct(),1);var HT=s(A(),1),PK=s(O(),1),kK=s(W(),1);var hm=s(C(),1),GCe=3,WCe={per_page:10,orderby:"count",order:"desc",hide_empty:!0,_fields:"id,name,count",context:"view"};function EK({onSelect:e,taxonomy:t}){let{_terms:r,showTerms:o}=(0,PK.useSelect)(i=>{let a=i(kK.store).getEntityRecords("taxonomy",t.slug,WCe);return{_terms:a,showTerms:a?.length>=GCe}},[t.slug]);if(!o)return null;let n=IY(r);return(0,hm.jsxs)("div",{className:"editor-post-taxonomies__flat-term-most-used",children:[(0,hm.jsx)(HT.BaseControl.VisualLabel,{as:"h3",className:"editor-post-taxonomies__flat-term-most-used-label",children:t.labels.most_used}),(0,hm.jsx)("ul",{role:"list",className:"editor-post-taxonomies__flat-term-most-used-list",children:n.map(i=>(0,hm.jsx)("li",{children:(0,hm.jsx)(HT.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:()=>e(i),children:i.name})},i.id))})]})}var m0=s(C(),1),a4=[],NK=100,RK={per_page:NK,_fields:"id,name",context:"view"},FK=(e,t)=>Bh(e).toLowerCase()===Bh(t).toLowerCase(),l4=(e,t)=>e.map(r=>t.find(o=>FK(o.name,r))?.id).filter(r=>r!==void 0);function c4({slug:e}){let[t,r]=(0,vm.useState)([]),[o,n]=(0,vm.useState)(""),i=(0,AK.useDebounce)(n,500),{terms:a,termIds:l,taxonomy:c,hasAssignAction:u,hasCreateAction:d,hasResolvedTerms:f}=(0,gm.useSelect)(L=>{let{getCurrentPost:M,getEditedPostAttribute:k}=L(w),{getEntityRecords:I,getEntityRecord:U,hasFinishedResolution:G}=L(GT.store),Y=M(),Z=U("root","taxonomy",e),V=Z?k(Z.rest_base):a4,j={...RK,include:V?.join(","),per_page:-1};return{hasCreateAction:Z?Y._links?.["wp:action-create-"+Z.rest_base]??!1:!1,hasAssignAction:Z?Y._links?.["wp:action-assign-"+Z.rest_base]??!1:!1,taxonomy:Z,termIds:V,terms:V?.length?I("taxonomy",e,j):a4,hasResolvedTerms:G("getEntityRecords",["taxonomy",e,j])}},[e]),{searchResults:m}=(0,gm.useSelect)(L=>{let{getEntityRecords:M}=L(GT.store);return{searchResults:o?M("taxonomy",e,{...RK,search:o}):a4}},[o,e]);(0,vm.useEffect)(()=>{if(f){let L=(a??[]).map(M=>Bh(M.name));r(L)}},[a,f]);let h=(0,vm.useMemo)(()=>(m??[]).map(L=>Bh(L.name)),[m]),{editPost:g}=(0,gm.useDispatch)(w),{saveEntityRecord:v}=(0,gm.useDispatch)(GT.store),{createErrorNotice:y}=(0,gm.useDispatch)(IK.store);if(!u)return null;async function b(L){try{let M=await v("taxonomy",e,L,{throwOnError:!0});return C3(M)}catch(M){if(M.code!=="term_exists")throw M;return{id:M.data.term_id,name:L.name}}}function _(L){g({[c.rest_base]:L})}function S(L){let M=[...a??[],...m??[]],k=L.reduce((U,G)=>(U.some(Y=>Y.toLowerCase()===G.toLowerCase())||U.push(G),U),[]),I=k.filter(U=>!M.find(G=>FK(G.name,U)));if(r(k),I.length===0){_(l4(k,M));return}d&&Promise.all(I.map(U=>b({name:U}))).then(U=>{let G=M.concat(U);_(l4(k,G))}).catch(U=>{y(U.message,{type:"snackbar"}),_(l4(k,M))})}function x(L){if(l.includes(L.id))return;let M=[...l,L.id],k=e==="post_tag"?(0,Uo.__)("Tag"):(0,Uo.__)("Term"),I=(0,Uo.sprintf)((0,Uo._x)("%s added","term"),c?.labels?.singular_name??k);(0,OK.speak)(I,"assertive"),_(M)}let T=c?.labels?.add_new_item??(e==="post_tag"?(0,Uo.__)("Add Tag"):(0,Uo.__)("Add Term")),R=c?.labels?.singular_name??(e==="post_tag"?(0,Uo.__)("Tag"):(0,Uo.__)("Term")),F=(0,Uo.sprintf)((0,Uo._x)("%s added","term"),R),B=(0,Uo.sprintf)((0,Uo._x)("%s removed","term"),R),z=(0,Uo.sprintf)((0,Uo._x)("Remove %s","term"),R);return(0,m0.jsxs)(sg.__experimentalVStack,{spacing:4,children:[(0,m0.jsx)(sg.FormTokenField,{__next40pxDefaultSize:!0,value:t,suggestions:h,onChange:S,onInputChange:i,maxSuggestions:NK,label:T,messages:{added:F,removed:B,remove:z}}),(0,m0.jsx)(EK,{taxonomy:c,onSelect:x})]})}var WT=(0,sg.withFilters)("editor.PostTaxonomyType")(c4);var bm=s(C(),1),YCe=()=>{let e=(0,u4.useSelect)(n=>n(YT.store).getTaxonomy("post_tag")?.labels,[]),t=e?.add_new_item??(0,ym.__)("Add tag"),r=e?.name??(0,ym.__)("Tags"),o=[(0,ym.__)("Suggestion:"),(0,bm.jsx)("span",{className:"editor-post-publish-panel__link",children:t},"label")];return(0,bm.jsxs)(BK.PanelBody,{initialOpen:!1,title:o,children:[(0,bm.jsx)("p",{children:(0,ym.sprintf)((0,ym.__)("%s help users and search engines navigate your site and find your content. Add a few keywords to describe your post."),r)}),(0,bm.jsx)(WT,{slug:"post_tag"})]})},qCe=()=>{let{postHasTags:e,siteHasTags:t,isPostTypeSupported:r}=(0,u4.useSelect)(n=>{let i=n(w).getCurrentPostType(),a=n(YT.store).getEntityRecord("root","taxonomy","post_tag"),l=a?.types?.includes(i),c=a!==void 0,u=a&&n(w).getEditedPostAttribute(a.rest_base),d=l?!!n(YT.store).getEntityRecords("taxonomy","post_tag",{per_page:1})?.length:!1;return{postHasTags:!!u?.length,siteHasTags:d,isPostTypeSupported:c&&l}},[]),[o]=(0,DK.useState)(e);return!r||!t||o?null:(0,bm.jsx)(YCe,{})},MK=qCe;var qT=s(A(),1),ZT=s(O(),1),Sm=s(E(),1),LK=s(W(),1);var nd=s(C(),1),ZCe=(e,t)=>i0.filter(o=>e?.includes(o.id)).find(o=>o.id===t),KCe=({suggestedPostFormat:e,suggestionText:t,onUpdatePostFormat:r})=>(0,nd.jsx)(qT.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:()=>r(e),children:t});function VK(){let{currentPostFormat:e,suggestion:t}=(0,ZT.useSelect)(i=>{let{getEditedPostAttribute:a,getSuggestedPostFormat:l}=i(w),c=i(LK.store).getThemeSupports().formats??[];return{currentPostFormat:a("format"),suggestion:ZCe(c,l())}},[]),{editPost:r}=(0,ZT.useDispatch)(w),o=i=>r({format:i}),n=[(0,Sm.__)("Suggestion:"),(0,nd.jsx)("span",{className:"editor-post-publish-panel__link",children:(0,Sm.__)("Use a post format")},"label")];return!t||t.id===e?null:(0,nd.jsxs)(qT.PanelBody,{initialOpen:!1,title:n,children:[(0,nd.jsx)("p",{children:(0,Sm.__)("Your theme uses post formats to highlight different kinds of content, like images or videos. Apply a post format to see this special styling.")}),(0,nd.jsx)("p",{children:(0,nd.jsx)(KCe,{onUpdatePostFormat:o,suggestedPostFormat:t.id,suggestionText:(0,Sm.sprintf)((0,Sm.__)('Apply the "%1$s" format.'),t.caption)})})]})}var XT=s(E(),1),YK=s(O(),1),qK=s(A(),1),m4=s(W(),1),QT=s(D(),1);var Ro=s(E(),1),Tc=s(D(),1),HK=s(ct(),1),or=s(A(),1),ag=s(O(),1),GK=s(he(),1),p0=s(W(),1),d4=s(Xm(),1),WK=s(ft(),1);var Eo=s(C(),1),{normalizeTextString:jK}=N(or.privateApis),{RECEIVE_INTERMEDIATE_RESULTS:XCe}=N(p0.privateApis),zK={per_page:-1,orderby:"name",order:"asc",_fields:"id,name,parent",context:"view",[XCe]:!0},QCe=8,UK=[];function JCe(e,t){let r=i=>t.indexOf(i.id)!==-1?!0:i.children===void 0?!1:i.children.map(r).filter(a=>a).length>0,o=(i,a)=>{let l=r(i),c=r(a);return l===c?0:l&&!c?-1:!l&&c?1:0},n=[...e];return n.sort(o),n}function $Ce(e,t,r){return e.find(o=>(!o.parent&&!t||parseInt(o.parent)===parseInt(t))&&o.name.toLowerCase()===r.toLowerCase())}function eTe(e){let t=r=>{if(e==="")return r;let o={...r};return o.children.length>0&&(o.children=o.children.map(t).filter(n=>n)),jK(o.name).indexOf(jK(e))!==-1||o.children.length>0?o:!1};return t}function f4({slug:e}){let[t,r]=(0,Tc.useState)(!1),[o,n]=(0,Tc.useState)(""),[i,a]=(0,Tc.useState)(""),[l,c]=(0,Tc.useState)(!1),[u,d]=(0,Tc.useState)(""),[f,m]=(0,Tc.useState)([]),h=(0,GK.useDebounce)(d4.speak,500),{hasCreateAction:g,hasAssignAction:v,terms:y,loading:b,availableTerms:_,taxonomy:S}=(0,ag.useSelect)(ye=>{let{getCurrentPost:oe,getEditedPostAttribute:ge}=ye(w),{getEntityRecord:Re,getEntityRecords:ze,isResolving:Ve}=ye(p0.store),tt=Re("root","taxonomy",e),vt=oe();return{hasCreateAction:tt?!!vt._links?.["wp:action-create-"+tt.rest_base]:!1,hasAssignAction:tt?!!vt._links?.["wp:action-assign-"+tt.rest_base]:!1,terms:tt?ge(tt.rest_base):UK,loading:Ve("getEntityRecords",["taxonomy",e,zK]),availableTerms:ze("taxonomy",e,zK)||UK,taxonomy:tt}},[e]),{editPost:x}=(0,ag.useDispatch)(w),{saveEntityRecord:T}=(0,ag.useDispatch)(p0.store),R=(0,Tc.useMemo)(()=>JCe(IC(_),y),[_]),{createErrorNotice:F}=(0,ag.useDispatch)(HK.store);if(!v)return null;let B=ye=>T("taxonomy",e,ye,{throwOnError:!0}),z=ye=>{x({[S.rest_base]:ye})},L=ye=>{let ge=y.includes(ye)?y.filter(Re=>Re!==ye):[...y,ye];z(ge)},M=ye=>{n(ye)},k=ye=>{a(ye)},I=()=>{c(!l)},U=async ye=>{if(ye.preventDefault(),o===""||t)return;let oe=$Ce(_,i,o);if(oe){y.some(Ve=>Ve===oe.id)||z([...y,oe.id]),n(""),a("");return}r(!0);let ge;try{ge=await B({name:o,parent:i||void 0})}catch(Ve){F(Ve.message,{type:"snackbar"});return}let Re=e==="category"?(0,Ro.__)("Category"):(0,Ro.__)("Term"),ze=(0,Ro.sprintf)((0,Ro._x)("%s added","term"),S?.labels?.singular_name??Re);(0,d4.speak)(ze,"assertive"),r(!1),n(""),a(""),z([...y,ge.id])},G=ye=>{let oe=R.map(eTe(ye)).filter(Ve=>Ve),ge=Ve=>{let tt=0;for(let vt=0;vtye.map(oe=>(0,Eo.jsxs)("div",{className:"editor-post-taxonomies__hierarchical-terms-choice",children:[(0,Eo.jsx)(or.CheckboxControl,{checked:y.indexOf(oe.id)!==-1,onChange:()=>{let ge=parseInt(oe.id,10);L(ge)},label:(0,WK.decodeEntities)(oe.name)}),!!oe.children.length&&(0,Eo.jsx)("div",{className:"editor-post-taxonomies__hierarchical-terms-subchoices",children:Y(oe.children)})]},oe.id)),Z=(ye,oe,ge)=>S?.labels?.[ye]??(e==="category"?oe:ge),V=Z("add_new_item",(0,Ro.__)("Add Category"),(0,Ro.__)("Add Term")),j=Z("new_item_name",(0,Ro.__)("Add Category"),(0,Ro.__)("Add Term")),H=Z("parent_item",(0,Ro.__)("Parent Category"),(0,Ro.__)("Parent Term")),X=`\u2014 ${H} \u2014`,ae=V,ne=S?.labels?.search_items??(0,Ro.__)("Search Terms"),ue=S?.name??(0,Ro.__)("Terms"),Ye=_.length>=QCe;return(0,Eo.jsxs)(or.Flex,{direction:"column",gap:"4",children:[Ye&&!b&&(0,Eo.jsx)(or.SearchControl,{__next40pxDefaultSize:!0,label:ne,placeholder:ne,value:u,onChange:G}),b&&(0,Eo.jsx)(or.Flex,{justify:"center",style:{height:"40px"},children:(0,Eo.jsx)(or.Spinner,{})}),(0,Eo.jsx)("div",{className:"editor-post-taxonomies__hierarchical-terms-list",tabIndex:"0",role:"group","aria-label":ue,children:Y(u!==""?f:R)}),!b&&g&&(0,Eo.jsx)(or.FlexItem,{children:(0,Eo.jsx)(or.Button,{__next40pxDefaultSize:!0,onClick:I,className:"editor-post-taxonomies__hierarchical-terms-add","aria-expanded":l,variant:"link",children:V})}),l&&(0,Eo.jsx)("form",{onSubmit:U,children:(0,Eo.jsxs)(or.Flex,{direction:"column",gap:"4",children:[(0,Eo.jsx)(or.TextControl,{__next40pxDefaultSize:!0,className:"editor-post-taxonomies__hierarchical-terms-input",label:j,value:o,onChange:M,required:!0}),!!_.length&&(0,Eo.jsx)(or.TreeSelect,{__next40pxDefaultSize:!0,label:H,noOptionLabel:X,onChange:k,selectedId:i,tree:R}),(0,Eo.jsx)(or.FlexItem,{children:(0,Eo.jsx)(or.Button,{__next40pxDefaultSize:!0,variant:"secondary",type:"submit",className:"editor-post-taxonomies__hierarchical-terms-submit",children:ae})})]})})]})}var KT=(0,or.withFilters)("editor.PostTaxonomyType")(f4);var lg=s(C(),1);function tTe(){let{hasNoCategory:e,hasSiteCategories:t}=(0,YK.useSelect)(i=>{let a=i(w).getCurrentPostType(),{canUser:l,getEntityRecord:c}=i(m4.store),u=c("root","taxonomy","category"),d=l("read",{kind:"root",name:"site"})?c("root","site")?.default_category:void 0,f=d?c("taxonomy","category",d):void 0,m=u&&u.types.some(y=>y===a),h=u&&i(w).getEditedPostAttribute(u.rest_base),g=m?!!i(m4.store).getEntityRecords("taxonomy","category",{exclude:[d],per_page:1})?.length:!1;return{hasNoCategory:!!u&&!!f&&m&&(h?.length===0||h?.length===1&&f?.id===h[0]),hasSiteCategories:g}},[]),[r,o]=(0,QT.useState)(!1);if((0,QT.useEffect)(()=>{e&&o(!0)},[e]),!r||!t)return null;let n=[(0,XT.__)("Suggestion:"),(0,lg.jsx)("span",{className:"editor-post-publish-panel__link",children:(0,XT.__)("Assign a category")},"label")];return(0,lg.jsxs)(qK.PanelBody,{initialOpen:!1,title:n,children:[(0,lg.jsx)("p",{children:(0,XT.__)("Categories provide a helpful way to group related posts together and to quickly tell readers what a post is about.")}),(0,lg.jsx)(KT,{slug:"category"})]})}var ZK=tTe;var Ka=s(A(),1),g0=s(O(),1),id=s(E(),1),h0=s($(),1),JT=s(D(),1),QK=s(sy(),1);var KK=s(Ir(),1);function rTe(e){let t=new Set;return Object.fromEntries(e.map(r=>{let o=(0,KK.getFilename)(r),n="";if(o){let i=o.split(".");i.length>1&&i.pop(),n=i.join(".")}return n||(n=ep()),t.has(n)&&(n=`${n}-${ep()}`),t.add(n),[r,n]}))}function XK(e){return Object.fromEntries(Object.entries(rTe(e)).map(([t,r])=>{let o=window.fetch(t.includes("?")?t:t+"?").then(n=>n.blob()).then(n=>new File([n],`${r}.png`,{type:n.type}));return[t,o]}))}var bs=s(C(),1);function JK(e){let t=[];return e.forEach(r=>{t.push(r),t.push(...JK(r.innerBlocks))}),t}function oTe(e){if(e.name==="core/image"||e.name==="core/cover")return e.attributes.url&&!e.attributes.id;if(e.name==="core/media-text")return e.attributes.mediaUrl&&!e.attributes.mediaId}function p4(e){if(e.name==="core/image"||e.name==="core/cover"){let{url:t,alt:r,id:o}=e.attributes;return{url:t,alt:r,id:o}}if(e.name==="core/media-text"){let{mediaUrl:t,mediaAlt:r,mediaId:o}=e.attributes;return{url:t,alt:r,id:o}}return{}}function nTe({clientId:e,alt:t,url:r}){let{selectBlock:o}=(0,g0.useDispatch)(h0.store);return(0,bs.jsx)(Ka.__unstableMotion.img,{tabIndex:0,role:"button","aria-label":(0,id.__)("Select image block."),onClick:()=>{o(e)},onKeyDown:n=>{(n.key==="Enter"||n.key===" ")&&(o(e),n.preventDefault())},alt:t,src:r,animate:{opacity:1},exit:{opacity:0,scale:0},style:{width:"32px",height:"32px",objectFit:"cover",borderRadius:"2px",cursor:"pointer"},whileHover:{scale:1.08}},e)}function $K(){let[e,t]=(0,JT.useState)(!1),[r,o]=(0,JT.useState)(!1),[n,i]=(0,JT.useState)(!1),{editorBlocks:a,mediaUpload:l}=(0,g0.useSelect)(h=>({editorBlocks:h(h0.store).getBlocks(),mediaUpload:h(h0.store).getSettings().mediaUpload}),[]),c=JK(a).filter(h=>oTe(h)),{updateBlockAttributes:u}=(0,g0.useDispatch)(h0.store);if(!l||!c.length)return null;let d=[(0,id.__)("Suggestion:"),(0,bs.jsx)("span",{className:"editor-post-publish-panel__link",children:(0,id.__)("External media")},"label")];function f(h,g){(h.name==="core/image"||h.name==="core/cover")&&u(h.clientId,{id:g.id,url:g.url}),h.name==="core/media-text"&&u(h.clientId,{mediaId:g.id,mediaUrl:g.url})}function m(){t(!0),i(!1);let h=new Set(c.map(v=>{let{url:y}=p4(v);return y})),g=Object.fromEntries(Object.entries(XK([...h])).map(([v,y])=>{let b=y.then(_=>new Promise((S,x)=>{l({filesList:[_],onFileChange:([T])=>{(0,QK.isBlobURL)(T.url)||S(T)},onError(){x()}})}));return[v,b]}));Promise.allSettled(c.map(v=>{let{url:y}=p4(v);return g[y].then(b=>f(v,b)).then(()=>o(!0)).catch(()=>i(!0))})).finally(()=>{t(!1)})}return(0,bs.jsxs)(Ka.PanelBody,{initialOpen:!0,title:d,children:[(0,bs.jsx)("p",{children:(0,id.__)("Upload external images to the Media Library. Images from different domains may load slowly, display incorrectly, or be removed unexpectedly.")}),(0,bs.jsxs)("div",{style:{display:"inline-flex",flexWrap:"wrap",gap:"8px"},children:[(0,bs.jsx)(Ka.__unstableAnimatePresence,{onExitComplete:()=>o(!1),children:c.map(h=>{let{url:g,alt:v}=p4(h);return(0,bs.jsx)(nTe,{clientId:h.clientId,url:g,alt:v},h.clientId)})}),e||r?(0,bs.jsx)(Ka.Spinner,{}):(0,bs.jsx)(Ka.Button,{size:"compact",variant:"primary",onClick:m,children:(0,id._x)("Upload","verb")})]}),n&&(0,bs.jsx)("p",{children:(0,id.__)("Upload failed, try again.")})]})}var Mt=s(C(),1);function iTe({children:e}){let{isBeingScheduled:t,isRequestingSiteIcon:r,hasPublishAction:o,siteIconUrl:n,siteTitle:i,siteHome:a}=(0,eX.useSelect)(d=>{let{getCurrentPost:f,isEditedPostBeingScheduled:m}=d(w),{getEntityRecord:h,isResolving:g}=d(rX.store),v=h("root","__unstableBase",void 0)||{};return{hasPublishAction:f()._links?.["wp:action-publish"]??!1,isBeingScheduled:m(),isRequestingSiteIcon:g("getEntityRecord",["root","__unstableBase",void 0]),siteIconUrl:v.site_icon_url,siteTitle:v.name,siteHome:v.home&&(0,tX.filterURLForDisplay)(v.home)}},[]),l=(0,Mt.jsx)(v0.Icon,{className:"components-site-icon",size:"36px",icon:aO});n&&(l=(0,Mt.jsx)("img",{alt:(0,la.__)("Site Icon"),className:"components-site-icon",src:n})),r&&(l=null);let c,u;return o?t?(c=(0,la.__)("Are you ready to schedule?"),u=(0,la.__)("Your work will be published at the specified date and time.")):(c=(0,la.__)("Are you ready to publish?"),u=(0,la.__)("Double-check your settings before publishing.")):(c=(0,la.__)("Are you ready to submit for review?"),u=(0,la.__)("Your work will be reviewed and then approved.")),(0,Mt.jsxs)("div",{className:"editor-post-publish-panel__prepublish",children:[(0,Mt.jsx)("div",{children:(0,Mt.jsx)("strong",{children:c})}),(0,Mt.jsx)("p",{children:u}),(0,Mt.jsxs)("div",{className:"components-site-card",children:[l,(0,Mt.jsxs)("div",{className:"components-site-info",children:[(0,Mt.jsx)("span",{className:"components-site-name",children:(0,oX.decodeEntities)(i)||(0,la.__)("(Untitled)")}),(0,Mt.jsx)("span",{className:"components-site-home",children:a})]})]}),(0,Mt.jsx)($K,{}),o&&(0,Mt.jsxs)(Mt.Fragment,{children:[(0,Mt.jsx)(v0.PanelBody,{initialOpen:!1,title:[(0,la.__)("Visibility:"),(0,Mt.jsx)("span",{className:"editor-post-publish-panel__link",children:(0,Mt.jsx)(VT,{})},"label")],children:(0,Mt.jsx)(u0,{})}),(0,Mt.jsx)(v0.PanelBody,{initialOpen:!1,title:[(0,la.__)("Publish:"),(0,Mt.jsx)("span",{className:"editor-post-publish-panel__link",children:(0,Mt.jsx)(ng,{})},"label")],children:(0,Mt.jsx)(og,{})})]}),(0,Mt.jsx)(VK,{}),(0,Mt.jsx)(MK,{}),(0,Mt.jsx)(ZK,{}),e]})}var nX=iTe;var Li=s(A(),1),ca=s(E(),1),sd=s(D(),1),aX=s(O(),1),$T=s(Ir(),1),lX=s(ft(),1),cX=s(he(),1),uX=s(W(),1);var Mr=s(C(),1),iX="%postname%",sX="%pagename%",sTe=e=>{let{slug:t}=e;return e.permalink_template.includes(iX)?e.permalink_template.replace(iX,t):e.permalink_template.includes(sX)?e.permalink_template.replace(sX,t):e.permalink_template};function aTe({text:e}){let[t,r]=(0,sd.useState)(!1),o=(0,sd.useRef)(),n=(0,cX.useCopyToClipboard)(e,()=>{r(!0),o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{r(!1)},4e3)});return(0,sd.useEffect)(()=>()=>{o.current&&clearTimeout(o.current)},[]),(0,Mr.jsx)(Li.Button,{__next40pxDefaultSize:!0,variant:"secondary",ref:n,children:t?(0,ca.__)("Copied!"):(0,ca.__)("Copy")})}function dX({focusOnMount:e,children:t}){let{post:r,postType:o,isScheduled:n}=(0,aX.useSelect)(m=>{let{getEditedPostAttribute:h,getCurrentPost:g,isCurrentPostScheduled:v}=m(w),{getPostType:y}=m(uX.store);return{post:g(),postType:y(h("type")),isScheduled:v()}},[]),i=o?.labels?.singular_name,a=o?.labels?.view_item,l=o?.labels?.add_new_item,c=r.status==="future"?sTe(r):r.link,u=(0,$T.addQueryArgs)("post-new.php",{post_type:r.type}),d=(0,sd.useCallback)(m=>{e&&m&&m.focus()},[e]),f=n?(0,Mr.jsxs)(Mr.Fragment,{children:[(0,ca.__)("is now scheduled. It will go live on")," ",(0,Mr.jsx)(ng,{}),"."]}):(0,ca.__)("is now live.");return(0,Mr.jsxs)("div",{className:"post-publish-panel__postpublish",children:[(0,Mr.jsxs)(Li.PanelBody,{className:"post-publish-panel__postpublish-header",children:[(0,Mr.jsx)(Li.ExternalLink,{ref:d,href:c,children:(0,lX.decodeEntities)(r.title)||(0,ca.__)("(no title)")})," ",f]}),(0,Mr.jsxs)(Li.PanelBody,{children:[(0,Mr.jsx)("p",{className:"post-publish-panel__postpublish-subheader",children:(0,Mr.jsx)("strong",{children:(0,ca.__)("What\u2019s next?")})}),(0,Mr.jsxs)("div",{className:"post-publish-panel__postpublish-post-address-container",children:[(0,Mr.jsx)(Li.TextControl,{__next40pxDefaultSize:!0,className:"post-publish-panel__postpublish-post-address",readOnly:!0,label:(0,ca.sprintf)((0,ca.__)("%s address"),i),value:(0,$T.safeDecodeURIComponent)(c),onFocus:m=>m.target.select()}),(0,Mr.jsx)("div",{className:"post-publish-panel__postpublish-post-address__copy-button-wrap",children:(0,Mr.jsx)(aTe,{text:c})})]}),(0,Mr.jsxs)("div",{className:"post-publish-panel__postpublish-buttons",children:[!n&&(0,Mr.jsxs)(Li.Button,{variant:"primary",href:c,__next40pxDefaultSize:!0,icon:Xn,iconPosition:"right",target:"_blank",children:[a,(0,Mr.jsx)(Li.VisuallyHidden,{as:"span",children:(0,ca.__)("(opens in a new tab)")})]}),(0,Mr.jsx)(Li.Button,{variant:n?"primary":"secondary",__next40pxDefaultSize:!0,href:u,children:l})]})]}),t]})}var Kr=s(C(),1),lTe=class extends tP.Component{constructor(){super(...arguments),this.onSubmit=this.onSubmit.bind(this),this.cancelButtonNode=(0,tP.createRef)()}componentDidMount(){this.timeoutID=setTimeout(()=>{this.cancelButtonNode.current.focus()},0)}componentWillUnmount(){clearTimeout(this.timeoutID)}componentDidUpdate(e){(e.isPublished&&!this.props.isSaving&&this.props.isDirty||this.props.currentPostId!==e.currentPostId)&&this.props.onClose()}onSubmit(){let{onClose:e,hasPublishAction:t,isPostTypeViewable:r}=this.props;(!t||!r)&&e()}render(){let{forceIsDirty:e,isBeingScheduled:t,isPublished:r,isPublishSidebarEnabled:o,isScheduled:n,isSaving:i,isSavingNonPostEntityChanges:a,onClose:l,onTogglePublishSidebar:c,PostPublishExtension:u,PrePublishExtension:d,currentPostId:f,...m}=this.props,{hasPublishAction:h,isDirty:g,isPostTypeViewable:v,...y}=m,b=r||n&&t,_=!b&&!i,S=b&&!i;return(0,Kr.jsxs)("div",{className:"editor-post-publish-panel",...y,children:[(0,Kr.jsx)("div",{className:"editor-post-publish-panel__header",children:S?(0,Kr.jsx)(ua.Button,{size:"compact",onClick:l,icon:Kn,label:(0,eP.__)("Close panel")}):(0,Kr.jsxs)(Kr.Fragment,{children:[(0,Kr.jsx)("div",{className:"editor-post-publish-panel__header-cancel-button",children:(0,Kr.jsx)(ua.Button,{ref:this.cancelButtonNode,accessibleWhenDisabled:!0,disabled:a,onClick:l,variant:"secondary",size:"compact",children:(0,eP.__)("Cancel")})}),(0,Kr.jsx)("div",{className:"editor-post-publish-panel__header-publish-button",children:(0,Kr.jsx)(eg,{onSubmit:this.onSubmit,forceIsDirty:e})})]})}),(0,Kr.jsxs)("div",{className:"editor-post-publish-panel__content",children:[_&&(0,Kr.jsx)(nX,{children:d&&(0,Kr.jsx)(d,{})}),S&&(0,Kr.jsx)(dX,{focusOnMount:!0,children:u&&(0,Kr.jsx)(u,{})}),i&&(0,Kr.jsx)(ua.Spinner,{})]}),(0,Kr.jsx)("div",{className:"editor-post-publish-panel__footer",children:(0,Kr.jsx)(ua.CheckboxControl,{label:(0,eP.__)("Always show pre-publish checks."),checked:o,onChange:c})})]})}},oP=(0,fX.compose)([(0,rP.withSelect)(e=>{let{getPostType:t}=e(mX.store),{getCurrentPost:r,getCurrentPostId:o,getEditedPostAttribute:n,isCurrentPostPublished:i,isCurrentPostScheduled:a,isEditedPostBeingScheduled:l,isEditedPostDirty:c,isAutosavingPost:u,isSavingPost:d,isSavingNonPostEntityChanges:f}=e(w),{isPublishSidebarEnabled:m}=e(w),h=t(n("type"));return{hasPublishAction:r()._links?.["wp:action-publish"]??!1,isPostTypeViewable:h?.viewable,isBeingScheduled:l(),isDirty:c(),isPublished:i(),isPublishSidebarEnabled:m(),isSaving:d()&&!u(),isSavingNonPostEntityChanges:f(),isScheduled:a(),currentPostId:o()}}),(0,rP.withDispatch)((e,{isPublishSidebarEnabled:t})=>{let{disablePublishSidebar:r,enablePublishSidebar:o}=e(w);return{onTogglePublishSidebar:()=>{t?r():o()}}}),ua.withFocusReturn,ua.withConstrainedTabbing])(lTe);var cP=s(A(),1),uP=s(he(),1),dP=s(O(),1),fP=s(D(),1),_m=s(E(),1);var bX=s(yo(),1),SX=s(lt(),1);var Vi=s(A(),1),Et=s(E(),1),lP=s(O(),1),y0=s(D(),1),gX=s(W(),1),vX=s($(),1),yX=s(he(),1);var h4=s(E(),1),hX=s(A(),1),iP=s(O(),1);var pX=s(O(),1);function nP({children:e}){let{hasStickyAction:t,postType:r}=(0,pX.useSelect)(o=>({hasStickyAction:o(w).getCurrentPost()._links?.["wp:action-sticky"]??!1,postType:o(w).getCurrentPostType()}),[]);return r!=="post"||!t?null:e}var g4=s(C(),1);function sP(){let e=(0,iP.useSelect)(r=>r(w).getEditedPostAttribute("sticky")??!1,[]),{editPost:t}=(0,iP.useDispatch)(w);return(0,g4.jsx)(nP,{children:(0,g4.jsx)(hX.CheckboxControl,{className:"editor-post-sticky__checkbox-control",label:(0,h4.__)("Sticky"),help:(0,h4.__)("Pin this post to the top of the blog."),checked:e,onChange:()=>t({sticky:!e})})})}var Xr=s(C(),1),aP={"auto-draft":{label:(0,Et.__)("Draft"),icon:Wm},draft:{label:(0,Et.__)("Draft"),icon:Wm},pending:{label:(0,Et.__)("Pending"),icon:Lv},private:{label:(0,Et.__)("Private"),icon:Fv},future:{label:(0,Et.__)("Scheduled"),icon:jv},publish:{label:(0,Et.__)("Published"),icon:Hd}},v4=[{label:(0,Et.__)("Draft"),value:"draft",description:(0,Et.__)("Not ready to publish.")},{label:(0,Et.__)("Pending"),value:"pending",description:(0,Et.__)("Waiting for review before publishing.")},{label:(0,Et.__)("Private"),value:"private",description:(0,Et.__)("Only visible to site admins and editors.")},{label:(0,Et.__)("Scheduled"),value:"future",description:(0,Et.__)("Publish automatically on a chosen date.")},{label:(0,Et.__)("Published"),value:"publish",description:(0,Et.__)("Visible to everyone.")}];function y4(){let{status:e,date:t,password:r,postId:o,postType:n,canEdit:i}=(0,lP.useSelect)(y=>{let{getEditedPostAttribute:b,getCurrentPostId:_,getCurrentPostType:S,getCurrentPost:x}=y(w);return{status:b("status"),date:b("date"),password:b("password"),postId:_(),postType:S(),canEdit:x()._links?.["wp:action-publish"]??!1}},[]),[a,l]=(0,y0.useState)(!!r),c=(0,yX.useInstanceId)(y4,"editor-change-status__password-input"),{editEntityRecord:u}=(0,lP.useDispatch)(gX.store),[d,f]=(0,y0.useState)(null),m=(0,y0.useMemo)(()=>({anchor:d,"aria-label":(0,Et.__)("Status & visibility"),headerTitle:(0,Et.__)("Status & visibility"),placement:"left-start",offset:36,shift:!0}),[d]);if(Jc.includes(n))return null;let h=({status:y=e,password:b=r,date:_=t})=>{u("postType",n,o,{status:y,date:_,password:b})},g=y=>{l(y),y||h({password:""})},v=y=>{let b=t,_=r;e==="future"&&new Date(t)>new Date&&(b=null),y==="private"&&r&&(_=""),h({status:y,date:b,password:_})};return(0,Xr.jsx)(ht,{label:(0,Et.__)("Status"),ref:f,children:i?(0,Xr.jsx)(Vi.Dropdown,{className:"editor-post-status",contentClassName:"editor-change-status__content",popoverProps:m,focusOnMount:!0,renderToggle:({onToggle:y,isOpen:b})=>(0,Xr.jsx)(Vi.Button,{className:"editor-post-status__toggle",variant:"tertiary",size:"compact",onClick:y,icon:aP[e]?.icon,"aria-label":(0,Et.sprintf)((0,Et.__)("Change status: %s"),aP[e]?.label),"aria-expanded":b,children:aP[e]?.label}),renderContent:({onClose:y})=>(0,Xr.jsxs)(Xr.Fragment,{children:[(0,Xr.jsx)(vX.__experimentalInspectorPopoverHeader,{title:(0,Et.__)("Status & visibility"),onClose:y}),(0,Xr.jsx)("form",{onSubmit:b=>{b.preventDefault(),y()},children:(0,Xr.jsxs)(Vi.__experimentalVStack,{spacing:4,children:[(0,Xr.jsx)(Vi.RadioControl,{className:"editor-change-status__options",hideLabelFromVision:!0,label:(0,Et.__)("Status"),options:v4,onChange:v,selected:e==="auto-draft"?"draft":e}),e==="future"&&(0,Xr.jsx)("div",{className:"editor-change-status__publish-date-wrapper",children:(0,Xr.jsx)(s4,{showPopoverHeaderActions:!1,isCompact:!0})}),e!=="private"&&(0,Xr.jsxs)(Vi.__experimentalVStack,{as:"fieldset",spacing:4,className:"editor-change-status__password-fieldset",children:[(0,Xr.jsx)(Vi.CheckboxControl,{label:(0,Et.__)("Password protected"),help:(0,Et.__)("Only visible to those who know the password."),checked:a,onChange:g}),a&&(0,Xr.jsx)("div",{className:"editor-change-status__password-input",children:(0,Xr.jsx)(Vi.TextControl,{label:(0,Et.__)("Password"),onChange:b=>h({password:b}),value:r,placeholder:(0,Et.__)("Use a secure password"),type:"text",id:c,__next40pxDefaultSize:!0,maxLength:255})})]}),(0,Xr.jsx)(sP,{})]})})]})}):(0,Xr.jsx)("div",{className:"editor-post-status is-read-only",children:aP[e]?.label})})}var mP=s(C(),1);function pP({forceIsDirty:e}){let[t,r]=(0,fP.useState)(!1),o=(0,uP.useViewportMatch)("small"),{isAutosaving:n,isDirty:i,isNew:a,isPublished:l,isSaveable:c,isSaving:u,isScheduled:d,hasPublishAction:f,showIconLabels:m,postStatus:h,postStatusHasChanged:g,postType:v}=(0,dP.useSelect)(L=>{let{isEditedPostNew:M,isCurrentPostPublished:k,isCurrentPostScheduled:I,isEditedPostDirty:U,isSavingPost:G,isEditedPostSaveable:Y,getCurrentPost:Z,isAutosavingPost:V,getEditedPostAttribute:j,getPostEdits:H}=L(w),{get:X}=L(SX.store);return{isAutosaving:V(),isDirty:e||U(),isNew:M(),isPublished:k(),isSaving:G(),isSaveable:Y(),isScheduled:I(),hasPublishAction:Z()?._links?.["wp:action-publish"]??!1,showIconLabels:X("core","showIconLabels"),postStatus:j("status"),postStatusHasChanged:!!H()?.status,postType:L(w).getCurrentPostType()}},[e]),y=h==="pending",{savePost:b}=(0,dP.useDispatch)(w),_=(0,uP.usePrevious)(u);if((0,fP.useEffect)(()=>{let L;return _&&!u&&(r(!0),L=setTimeout(()=>{r(!1)},1e3)),()=>clearTimeout(L)},[u]),v===ur||!f&&y)return null;let S=!["pending","draft","auto-draft"].includes(h)&&v4.map(({value:L})=>L).includes(h);if(l||d||S||g&&["pending","draft"].includes(h))return null;let x=y?(0,_m.__)("Save as pending"):(0,_m.__)("Save draft"),T=(0,_m.__)("Save"),R=t||!a&&!i,F=u||R,B=u||R||!c,z;return u?z=n?(0,_m.__)("Autosaving"):(0,_m.__)("Saving"):R?z=(0,_m.__)("Saved"):o?z=x:m&&(z=T),(0,mP.jsxs)(cP.Button,{className:c||u?re({"editor-post-save-draft":!F,"editor-post-saved-state":F,"is-saving":u,"is-autosaving":n,"is-saved":R,[(0,cP.__unstableGetAnimateClassName)({type:"loading"})]:u}):void 0,onClick:B?void 0:()=>b(),shortcut:B?void 0:bX.displayShortcut.primary("s"),variant:"tertiary",size:"compact",icon:o?void 0:OR,label:z||x,"aria-disabled":B,children:[F&&(0,mP.jsx)(No,{icon:R?Pi:NR}),z]})}var _X=s(O(),1);function hP({children:e}){return(0,_X.useSelect)(r=>r(w).getCurrentPost()._links?.["wp:action-publish"]??!1,[])?e:null}var gP=s(A(),1),ug=s(E(),1),vP=s(D(),1),wX=s(O(),1);var cg=s(C(),1);function yP(){let[e,t]=(0,vP.useState)(null),r=(0,wX.useSelect)(a=>a(w).getCurrentPostType(),[]),o=(0,vP.useMemo)(()=>({anchor:e,"aria-label":(0,ug.__)("Change publish date"),placement:"left-start",offset:36,shift:!0}),[e]),n=ig(),i=ig({full:!0});return Jc.includes(r)?null:(0,cg.jsx)(hP,{children:(0,cg.jsx)(ht,{label:(0,ug.__)("Publish"),ref:t,children:(0,cg.jsx)(gP.Dropdown,{popoverProps:o,focusOnMount:!0,className:"editor-post-schedule__panel-dropdown",contentClassName:"editor-post-schedule__dialog",renderToggle:({onToggle:a,isOpen:l})=>(0,cg.jsx)(gP.Button,{size:"compact",className:"editor-post-schedule__dialog-toggle",variant:"tertiary",tooltipPosition:"middle left",onClick:a,"aria-label":(0,ug.sprintf)((0,ug.__)("Change date: %s"),n),label:i,showTooltip:n!==i,"aria-expanded":l,children:n}),renderContent:({onClose:a})=>(0,cg.jsx)(og,{onClose:a})})})})}var bP=s(A(),1),dg=s(E(),1),SP=s(O(),1),xX=s(D(),1),CX=s(Yi(),1);var wm=s(C(),1);function TX(){(0,CX.default)("wp.editor.PostSwitchToDraftButton",{since:"6.7",version:"6.9"});let[e,t]=(0,xX.useState)(!1),{editPost:r,savePost:o}=(0,SP.useDispatch)(w),{isSaving:n,isPublished:i,isScheduled:a}=(0,SP.useSelect)(f=>{let{isSavingPost:m,isCurrentPostPublished:h,isCurrentPostScheduled:g}=f(w);return{isSaving:m(),isPublished:h(),isScheduled:g()}},[]),l=n||!i&&!a,c,u;i?(c=(0,dg.__)("Are you sure you want to unpublish this post?"),u=(0,dg.__)("Unpublish")):a&&(c=(0,dg.__)("Are you sure you want to unschedule this post?"),u=(0,dg.__)("Unschedule"));let d=()=>{t(!1),r({status:"draft"}),o()};return(0,wm.jsxs)(wm.Fragment,{children:[(0,wm.jsx)(bP.Button,{__next40pxDefaultSize:!0,className:"editor-post-switch-to-draft",onClick:()=>{l||t(!0)},"aria-disabled":l,variant:"secondary",style:{flexGrow:"1",justifyContent:"center"},children:(0,dg.__)("Switch to draft")}),(0,wm.jsx)(bP.__experimentalConfirmDialog,{isOpen:e,onConfirm:d,onCancel:()=>t(!1),confirmButtonText:u,children:c})]})}var PX=s(O(),1),b0=s(E(),1);var b4=s(C(),1);function _P(){let{syncStatus:e,postType:t}=(0,PX.useSelect)(r=>{let{getEditedPostAttribute:o}=r(w);return{syncStatus:o("meta")?.wp_pattern_sync_status==="unsynced"?"unsynced":o("wp_pattern_sync_status"),postType:o("type")}});return t!=="wp_block"?null:(0,b4.jsx)(ht,{label:(0,b0.__)("Sync status"),children:(0,b4.jsx)("div",{className:"editor-post-sync-status__value",children:e==="unsynced"?(0,b0._x)("Not synced","pattern (singular)"):(0,b0._x)("Synced","pattern (singular)")})})}var kX=s(D(),1),EX=s(O(),1),RX=s(W(),1);var S4=s(C(),1),cTe=e=>e;function uTe({taxonomyWrapper:e=cTe}){let{postType:t,taxonomies:r}=(0,EX.useSelect)(n=>({postType:n(w).getCurrentPostType(),taxonomies:n(RX.store).getEntityRecords("root","taxonomy",{per_page:-1})}),[]);return(r??[]).filter(n=>n.types.includes(t)&&n.visibility?.show_ui).map(n=>{let i=n.hierarchical?KT:WT;return(0,S4.jsx)(kX.Fragment,{children:e((0,S4.jsx)(i,{slug:n.slug}),n)},`taxonomy-${n.slug}`)})}var fg=uTe;var AX=s(O(),1),OX=s(W(),1);function wP({children:e}){return(0,AX.useSelect)(r=>{let o=r(w).getCurrentPostType();return r(OX.store).getEntityRecords("root","taxonomy",{per_page:-1})?.some(i=>i.types.includes(o))},[])?e:null}var IX=s(A(),1),xP=s(O(),1);var S0=s(C(),1);function dTe({taxonomy:e,children:t}){let r=e?.slug,o=r?`taxonomy-panel-${r}`:"",{isEnabled:n,isOpened:i}=(0,xP.useSelect)(c=>{let{isEditorPanelEnabled:u,isEditorPanelOpened:d}=c(w);return{isEnabled:r?u(o):!1,isOpened:r?d(o):!1}},[o,r]),{toggleEditorPanelOpened:a}=(0,xP.useDispatch)(w);if(!n)return null;let l=e?.labels?.menu_name;return l?(0,S0.jsx)(IX.PanelBody,{title:l,opened:i,onToggle:()=>a(o),children:t}):null}function CP(){return(0,S0.jsx)(wP,{children:(0,S0.jsx)(fg,{taxonomyWrapper:(e,t)=>(0,S0.jsx)(dTe,{taxonomy:t,children:e})})})}var XX=s(x4(),1),C4=s(E(),1),T4=s(W(),1),QX=s(D(),1),JX=s(Xe(),1),EP=s(O(),1),$X=s(he(),1),eQ=s(A(),1);var xm=s(C(),1);function w0(){let e=(0,$X.useInstanceId)(w0),{content:t,blocks:r,type:o,id:n}=(0,EP.useSelect)(l=>{let{getEditedEntityRecord:c}=l(T4.store),{getCurrentPostType:u,getCurrentPostId:d}=l(w),f=u(),m=d(),h=c("postType",f,m);return{content:h?.content,blocks:h?.blocks,type:f,id:m}},[]),{editEntityRecord:i}=(0,EP.useDispatch)(T4.store),a=(0,QX.useMemo)(()=>t instanceof Function?t({blocks:r}):r?(0,JX.__unstableSerializeAndClean)(r):t,[t,r]);return(0,xm.jsxs)(xm.Fragment,{children:[(0,xm.jsx)(eQ.VisuallyHidden,{as:"label",htmlFor:`post-content-${e}`,children:(0,C4.__)("Type text or HTML")}),(0,xm.jsx)(XX.default,{autoComplete:"off",dir:"auto",value:a,onChange:l=>{i("postType",o,n,{content:l.target.value,blocks:void 0,selection:void 0})},className:"editor-post-text-editor",id:`post-content-${e}`,placeholder:(0,C4.__)("Start writing with text or HTML")})]})}var rQ=s(E(),1),pg=s(D(),1),oQ=s(ft(),1),DP=s(O(),1),P4=s($(),1),nQ=s(yo(),1),iQ=s(Xe(),1),hg=s(Wy(),1),sQ=s(he(),1),k4=s(xh(),1);var RP="wp-block wp-block-post-title block-editor-block-list__block editor-post-title editor-post-title__input rich-text",AP=/[\r\n]+/g;var mg=s(D(),1),tQ=s(O(),1);function OP(e){let t=(0,mg.useRef)(),{isCleanNewPost:r}=(0,tQ.useSelect)(o=>{let{isCleanNewPost:n}=o(w);return{isCleanNewPost:n()}},[]);return(0,mg.useImperativeHandle)(e,()=>({focus:()=>{t?.current?.focus()}})),(0,mg.useEffect)(()=>{if(!t.current)return;let{defaultView:o}=t.current.ownerDocument,{name:n,parent:i}=o,a=n==="editor-canvas"?i.document:o.document,{activeElement:l,body:c}=a;r&&(!l||c===l)&&t.current.focus()},[r]),{ref:t}}var IP=s(O(),1);function NP(){let{editPost:e}=(0,IP.useDispatch)(w),{title:t}=(0,IP.useSelect)(o=>{let{getEditedPostAttribute:n}=o(w);return{title:n("title")}},[]);function r(o){e({title:o})}return{title:t,setTitle:r}}var FP=s(C(),1),{useRichText:wTe}=N(hg.privateApis),xTe=(0,pg.forwardRef)((e,t)=>{let{placeholder:r,isEditingContentOnlySection:o,isPreview:n}=(0,DP.useSelect)(M=>{let{getSettings:k,getEditedContentOnlySection:I}=N(M(P4.store)),{titlePlaceholder:U,isPreviewMode:G}=k();return{placeholder:U,isEditingContentOnlySection:!!I(),isPreview:G}},[]),[i,a]=(0,pg.useState)(!1),{ref:l}=OP(t),{title:c,setTitle:u}=NP(),[d,f]=(0,pg.useState)({}),{clearSelectedBlock:m,insertBlocks:h,insertDefaultBlock:g}=(0,DP.useDispatch)(P4.store),v=(0,oQ.decodeEntities)(r)||(0,rQ.__)("Add title"),{value:y,onChange:b,ref:_}=wTe({value:c,onChange(M){u(M.replace(AP," "))},placeholder:v,selectionStart:d.start,selectionEnd:d.end,onSelectionChange(M,k){f(I=>{let{start:U,end:G}=I;return U===M&&G===k?I:{start:M,end:k}})},__unstableDisableFormats:!1});function S(M){h(M,0)}function x(){a(!0),m()}function T(){a(!1),f({})}function R(){g(void 0,void 0,0)}function F(M){M.keyCode===nQ.ENTER&&(M.preventDefault(),R())}function B(M){let k=M.clipboardData,I="",U="";try{I=k.getData("text/plain"),U=k.getData("text/html")}catch{return}let G=(0,iQ.pasteHandler)({HTML:U,plainText:I});if(M.preventDefault(),!!G.length)if(typeof G!="string"){let[Y]=G;if(!c&&(Y.name==="core/heading"||Y.name==="core/paragraph")){let Z=(0,k4.__unstableStripHTML)(Y.attributes.content);u(Z),S(G.slice(1))}else S(G)}else{let Y=(0,k4.__unstableStripHTML)(G);b((0,hg.insert)(y,(0,hg.create)({html:Y})))}}let z=re(RP,{"is-selected":i}),L=o?{opacity:.2}:void 0;return(0,FP.jsx)("h1",{ref:(0,sQ.useMergeRefs)([_,l]),contentEditable:!o&&!n,className:z,"aria-label":v,role:"textbox","aria-multiline":"true",onFocus:x,onBlur:T,onKeyDown:F,onPaste:B,style:L})}),BP=(0,pg.forwardRef)((e,t)=>(0,FP.jsx)(tr,{supportKeys:"title",children:(0,FP.jsx)(xTe,{ref:t})}));var aQ=s(A(),1),lQ=s(E(),1),cQ=s(ft(),1),uQ=s(O(),1),dQ=s($(),1),MP=s(D(),1);var fQ=s(C(),1);function CTe(e,t){let{placeholder:r}=(0,uQ.useSelect)(h=>{let{getSettings:g}=h(dQ.store),{titlePlaceholder:v}=g();return{placeholder:v}},[]),[o,n]=(0,MP.useState)(!1),{title:i,setTitle:a}=NP(),{ref:l}=OP(t);function c(h){a(h.replace(AP," "))}function u(){n(!0)}function d(){n(!1)}let f=re(RP,{"is-selected":o,"is-raw-text":!0}),m=(0,cQ.decodeEntities)(r)||(0,lQ.__)("Add title");return(0,fQ.jsx)(aQ.TextareaControl,{ref:l,value:i,onChange:c,onFocus:u,onBlur:d,label:r,className:f,placeholder:m,hideLabelFromVision:!0,autoComplete:"off",dir:"auto",rows:1})}var LP=(0,MP.forwardRef)(CTe);var gg=s(E(),1),jP=s(A(),1),vg=s(O(),1),hQ=s(D(),1);var mQ=s(O(),1),pQ=s(W(),1);function VP({children:e}){let{canTrashPost:t}=(0,mQ.useSelect)(r=>{let{isEditedPostNew:o,getCurrentPostId:n,getCurrentPostType:i}=r(w),{canUser:a}=r(pQ.store),l=i(),c=n(),u=o(),d=c?a("delete",{kind:"postType",name:l,id:c}):!1;return{canTrashPost:(!u||c)&&d&&!qF.includes(l)}},[]);return t?e:null}var x0=s(C(),1);function zP({onActionPerformed:e}){let t=(0,vg.useRegistry)(),{isNew:r,isDeleting:o,postId:n,title:i}=(0,vg.useSelect)(d=>{let f=d(w);return{isNew:f.isEditedPostNew(),isDeleting:f.isDeletingPost(),postId:f.getCurrentPostId(),title:f.getCurrentPostAttribute("title")}},[]),{trashPost:a}=(0,vg.useDispatch)(w),[l,c]=(0,hQ.useState)(!1);if(r||!n)return null;let u=async()=>{c(!1),await a();let d=await t.resolveSelect(w).getCurrentPost();e?.("move-to-trash",[d])};return(0,x0.jsxs)(VP,{children:[(0,x0.jsx)(jP.Button,{__next40pxDefaultSize:!0,className:"editor-post-trash",isDestructive:!0,variant:"secondary",isBusy:o,"aria-disabled":o,onClick:o?void 0:()=>c(!0),children:(0,gg.__)("Move to trash")}),(0,x0.jsx)(jP.__experimentalConfirmDialog,{isOpen:l,onConfirm:u,onCancel:()=>c(!1),confirmButtonText:(0,gg.__)("Move to trash"),size:"small",children:(0,gg.sprintf)((0,gg.__)('Are you sure you want to move "%s" to the trash?'),i)})]})}var C0=s(O(),1),T0=s(Ir(),1),UP=s(D(),1),gQ=s($(),1),Cm=s(E(),1),di=s(A(),1),vQ=s(ct(),1);var yQ=s(W(),1),HP=s(he(),1);var hr=s(C(),1);function P0({onClose:e}){let{isEditable:t,postSlug:r,postLink:o,permalinkPrefix:n,permalinkSuffix:i,permalink:a}=(0,C0.useSelect)(h=>{let g=h(w).getCurrentPost(),v=h(w).getCurrentPostType(),y=h(yQ.store).getPostType(v),b=h(w).getPermalinkParts(),_=g?._links?.["wp:action-publish"]??!1;return{isEditable:h(w).isPermalinkEditable()&&_,postSlug:(0,T0.safeDecodeURIComponent)(h(w).getEditedPostSlug()),viewPostLabel:y?.labels.view_item,postLink:g.link,permalinkPrefix:b?.prefix,permalinkSuffix:b?.suffix,permalink:(0,T0.safeDecodeURIComponent)(h(w).getPermalink())}},[]),{editPost:l}=(0,C0.useDispatch)(w),{createNotice:c}=(0,C0.useDispatch)(vQ.store),[u,d]=(0,UP.useState)(!1),f=(0,HP.useCopyToClipboard)(a,()=>{c("info",(0,Cm.__)("Copied Permalink to clipboard."),{isDismissible:!0,type:"snackbar"})}),m="editor-post-url__slug-description-"+(0,HP.useInstanceId)(P0);return(0,hr.jsxs)("div",{className:"editor-post-url",children:[(0,hr.jsx)(gQ.__experimentalInspectorPopoverHeader,{title:(0,Cm.__)("Slug"),onClose:e}),(0,hr.jsxs)(di.__experimentalVStack,{spacing:3,children:[t&&(0,hr.jsx)("p",{className:"editor-post-url__intro",children:(0,UP.createInterpolateElement)((0,Cm.__)("Customize the last part of the Permalink. Learn more."),{span:(0,hr.jsx)("span",{id:m}),a:(0,hr.jsx)(di.ExternalLink,{href:(0,Cm.__)("https://wordpress.org/documentation/article/page-post-settings-sidebar/#permalink")})})}),(0,hr.jsxs)("div",{children:[t&&(0,hr.jsxs)(hr.Fragment,{children:[(0,hr.jsx)(di.__experimentalInputControl,{__next40pxDefaultSize:!0,prefix:(0,hr.jsx)(di.__experimentalInputControlPrefixWrapper,{children:"/"}),suffix:(0,hr.jsx)(di.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,hr.jsx)(di.Button,{icon:kv,ref:f,size:"small",label:"Copy"})}),label:(0,Cm.__)("Slug"),hideLabelFromVision:!0,value:u?"":r,autoComplete:"off",spellCheck:"false",type:"text",className:"editor-post-url__input",onChange:h=>{if(l({slug:h}),!h){u||d(!0);return}u&&d(!1)},onBlur:h=>{l({slug:(0,T0.cleanForSlug)(h.target.value)}),u&&d(!1)},"aria-describedby":m}),(0,hr.jsxs)("p",{className:"editor-post-url__permalink",children:[(0,hr.jsx)("span",{className:"editor-post-url__permalink-visual-label",children:(0,Cm.__)("Permalink:")}),(0,hr.jsxs)(di.ExternalLink,{className:"editor-post-url__link",href:o,target:"_blank",children:[(0,hr.jsx)("span",{className:"editor-post-url__link-prefix",children:n}),(0,hr.jsx)("span",{className:"editor-post-url__link-slug",children:r}),(0,hr.jsx)("span",{className:"editor-post-url__link-suffix",children:i})]})]})]}),!t&&(0,hr.jsx)(di.ExternalLink,{className:"editor-post-url__link",href:o,target:"_blank",children:o})]})]})]})}var bQ=s(O(),1),SQ=s(W(),1);function GP({children:e}){return(0,bQ.useSelect)(r=>{let o=r(w).getCurrentPostType();return!(!r(SQ.store).getPostType(o)?.viewable||!r(w).getCurrentPost().link||!r(w).getPermalinkParts())},[])?e:null}var _Q=s(O(),1),WP=s(Ir(),1);function wQ(){return E4()}function E4(){let e=(0,_Q.useSelect)(t=>t(w).getPermalink(),[]);return(0,WP.filterURLForDisplay)((0,WP.safeDecodeURIComponent)(e))}var YP=s(D(),1),qP=s(O(),1),bg=s(A(),1),yg=s(E(),1),xQ=s(Ir(),1),CQ=s(W(),1);var ji=s(C(),1);function ZP(){let{isFrontPage:e}=(0,qP.useSelect)(i=>{let{getCurrentPostId:a}=i(w),{getEditedEntityRecord:l,canUser:c}=i(CQ.store),u=c("read",{kind:"root",name:"site"})?l("root","site"):void 0,d=a();return{isFrontPage:u?.page_on_front===d}},[]),[t,r]=(0,YP.useState)(null),o=(0,YP.useMemo)(()=>({anchor:t,placement:"left-start",offset:36,shift:!0}),[t]),n=e?(0,yg.__)("Link"):(0,yg.__)("Slug");return(0,ji.jsx)(GP,{children:(0,ji.jsxs)(ht,{label:n,ref:r,children:[!e&&(0,ji.jsx)(bg.Dropdown,{popoverProps:o,className:"editor-post-url__panel-dropdown",contentClassName:"editor-post-url__panel-dialog",focusOnMount:!0,renderToggle:({isOpen:i,onToggle:a})=>(0,ji.jsx)(TTe,{isOpen:i,onClick:a}),renderContent:({onClose:i})=>(0,ji.jsx)(P0,{onClose:i})}),e&&(0,ji.jsx)(PTe,{})]})})}function TTe({isOpen:e,onClick:t}){let{slug:r}=(0,qP.useSelect)(n=>({slug:n(w).getEditedPostSlug()}),[]),o=(0,xQ.safeDecodeURIComponent)(r);return(0,ji.jsx)(bg.Button,{size:"compact",className:"editor-post-url__panel-toggle",variant:"tertiary","aria-expanded":e,"aria-label":(0,yg.sprintf)((0,yg.__)("Change link: %s"),o),onClick:t,children:(0,ji.jsx)(ji.Fragment,{children:o})})}function PTe(){let{postLink:e}=(0,qP.useSelect)(t=>{let{getCurrentPost:r}=t(w);return{postLink:r()?.link}},[]);return(0,ji.jsx)(bg.ExternalLink,{className:"editor-post-url__front-page-link",href:e,target:"_blank",children:e})}var TQ=s(O(),1);function PQ({render:e}){let t=(0,TQ.useSelect)(r=>r(w).getCurrentPost()._links?.["wp:action-publish"]??!1);return e({canEdit:t})}var VQ=s(E(),1),QP=s(A(),1),jQ=s(O(),1);var zQ=s(D(),1),UQ=s($(),1);var kc=s(E(),1),BQ=s(O(),1),MQ=s($(),1);var EQ=s(O(),1),RQ=s(E(),1),AQ=s(k0(),1);var OQ=s(C(),1);function Sg(){let e=(0,EQ.useSelect)(r=>r(w).getEditedPostAttribute("content"),[]),t=(0,RQ._x)("words","Word count type. Do not translate!");return(0,OQ.jsx)("span",{className:"word-count",children:(0,AQ.count)(e,t)})}var IQ=s(O(),1),ad=s(E(),1),NQ=s(k0(),1),R4=s(D(),1);var KP=s(C(),1),kTe=189;function _g(){let e=(0,IQ.useSelect)(n=>n(w).getEditedPostAttribute("content"),[]),t=(0,ad._x)("words","Word count type. Do not translate!"),r=Math.round((0,NQ.count)(e,t)/kTe),o=r===0?(0,R4.createInterpolateElement)((0,ad.__)("< 1 minute"),{span:(0,KP.jsx)("span",{})}):(0,R4.createInterpolateElement)((0,ad.sprintf)((0,ad._n)("%s minute","%s minutes",r),r),{span:(0,KP.jsx)("span",{})});return(0,KP.jsx)("span",{className:"time-to-read",children:o})}var FQ=s(O(),1),DQ=s(k0(),1);function wg(){let e=(0,FQ.useSelect)(t=>t(w).getEditedPostAttribute("content"),[]);return(0,DQ.count)(e,"characters_including_spaces")}var Xt=s(C(),1);function ETe({hasOutlineItemsDisabled:e,onRequestClose:t}){let{headingCount:r,paragraphCount:o,numberOfBlocks:n}=(0,BQ.useSelect)(i=>{let{getGlobalBlockCount:a}=i(MQ.store);return{headingCount:a("core/heading"),paragraphCount:a("core/paragraph"),numberOfBlocks:a()}},[]);return(0,Xt.jsxs)(Xt.Fragment,{children:[(0,Xt.jsx)("div",{className:"table-of-contents__wrapper",role:"note","aria-label":(0,kc.__)("Document Statistics"),tabIndex:"0",children:(0,Xt.jsxs)("ul",{role:"list",className:"table-of-contents__counts",children:[(0,Xt.jsxs)("li",{className:"table-of-contents__count",children:[(0,kc.__)("Words"),(0,Xt.jsx)(Sg,{})]}),(0,Xt.jsxs)("li",{className:"table-of-contents__count",children:[(0,kc.__)("Characters"),(0,Xt.jsx)("span",{className:"table-of-contents__number",children:(0,Xt.jsx)(wg,{})})]}),(0,Xt.jsxs)("li",{className:"table-of-contents__count",children:[(0,kc.__)("Time to read"),(0,Xt.jsx)(_g,{})]}),(0,Xt.jsxs)("li",{className:"table-of-contents__count",children:[(0,kc.__)("Headings"),(0,Xt.jsx)("span",{className:"table-of-contents__number",children:r})]}),(0,Xt.jsxs)("li",{className:"table-of-contents__count",children:[(0,kc.__)("Paragraphs"),(0,Xt.jsx)("span",{className:"table-of-contents__number",children:o})]}),(0,Xt.jsxs)("li",{className:"table-of-contents__count",children:[(0,kc.__)("Blocks"),(0,Xt.jsx)("span",{className:"table-of-contents__number",children:n})]})]})}),r>0&&(0,Xt.jsxs)(Xt.Fragment,{children:[(0,Xt.jsx)("hr",{}),(0,Xt.jsx)("h2",{className:"table-of-contents__title",children:(0,kc.__)("Document Outline")}),(0,Xt.jsx)(Ah,{onSelect:t,hasOutlineItemsDisabled:e})]})]})}var LQ=ETe;var XP=s(C(),1);function RTe({hasOutlineItemsDisabled:e,repositionDropdown:t,...r},o){let n=(0,jQ.useSelect)(i=>!!i(UQ.store).getBlockCount(),[]);return(0,XP.jsx)(QP.Dropdown,{popoverProps:{placement:t?"right":"bottom"},className:"table-of-contents",contentClassName:"table-of-contents__popover",renderToggle:({isOpen:i,onToggle:a})=>(0,XP.jsx)(QP.Button,{__next40pxDefaultSize:!0,...r,ref:o,onClick:n?a:void 0,icon:iA,"aria-expanded":i,"aria-haspopup":"true",label:(0,VQ.__)("Details"),tooltipPosition:"bottom","aria-disabled":!n}),renderContent:({onClose:i})=>(0,XP.jsx)(LQ,{onRequestClose:i,hasOutlineItemsDisabled:e})})}var HQ=(0,zQ.forwardRef)(RTe);var GQ=s(E(),1),WQ=s(D(),1),YQ=s(O(),1),qQ=s(W(),1);function ZQ(){let{__experimentalGetDirtyEntityRecords:e}=(0,YQ.useSelect)(qQ.store);return(0,WQ.useEffect)(()=>{let t=r=>{if(e().length>0)return r.returnValue=(0,GQ.__)("You have unsaved changes. If you proceed, they will be lost."),r.returnValue};return window.addEventListener("beforeunload",t),()=>{window.removeEventListener("beforeunload",t)}},[e]),null}var A4=s(Yi(),1),QQ=s(D(),1),te=s($(),1),JQ=s(XQ(),1),$Q=s(C(),1);function Ze(e,t,r=[]){let o=(0,QQ.forwardRef)((n,i)=>((0,A4.default)("wp.editor."+e,{since:"5.3",alternative:"wp.blockEditor."+e,version:"6.2"}),(0,$Q.jsx)(t,{ref:i,...n})));return r.forEach(n=>{o[n]=Ze(e+"."+n,t[n])}),o}function Xa(e,t){return(...r)=>((0,A4.default)("wp.editor."+e,{since:"5.3",alternative:"wp.blockEditor."+e,version:"6.2"}),t(...r))}var eJ=Ze("RichText",te.RichText,["Content"]);eJ.isEmpty=Xa("RichText.isEmpty",te.RichText.isEmpty);var ATe=Ze("Autocomplete",te.Autocomplete),OTe=Ze("AlignmentToolbar",te.AlignmentToolbar),ITe=Ze("BlockAlignmentToolbar",te.BlockAlignmentToolbar),NTe=Ze("BlockControls",te.BlockControls,["Slot"]),FTe=Ze("BlockEdit",te.BlockEdit),DTe=Ze("BlockEditorKeyboardShortcuts",te.BlockEditorKeyboardShortcuts),BTe=Ze("BlockFormatControls",te.BlockFormatControls,["Slot"]),MTe=Ze("BlockIcon",te.BlockIcon),LTe=Ze("BlockInspector",te.BlockInspector),VTe=Ze("BlockList",te.BlockList),jTe=Ze("BlockMover",te.BlockMover),zTe=Ze("BlockNavigationDropdown",te.BlockNavigationDropdown),UTe=Ze("BlockSelectionClearer",te.BlockSelectionClearer),HTe=Ze("BlockSettingsMenu",te.BlockSettingsMenu),GTe=Ze("BlockTitle",te.BlockTitle),WTe=Ze("BlockToolbar",te.BlockToolbar),YTe=Ze("ColorPalette",te.ColorPalette),qTe=Ze("ContrastChecker",te.ContrastChecker),ZTe=Ze("CopyHandler",te.CopyHandler),KTe=Ze("DefaultBlockAppender",te.DefaultBlockAppender),XTe=Ze("FontSizePicker",te.FontSizePicker),QTe=Ze("Inserter",te.Inserter),JTe=Ze("InnerBlocks",te.InnerBlocks,["ButtonBlockAppender","DefaultBlockAppender","Content"]),$Te=Ze("InspectorAdvancedControls",te.InspectorAdvancedControls,["Slot"]),ePe=Ze("InspectorControls",te.InspectorControls,["Slot"]),tPe=Ze("PanelColorSettings",te.PanelColorSettings),rPe=Ze("PlainText",te.PlainText),oPe=Ze("RichTextShortcut",te.RichTextShortcut),nPe=Ze("RichTextToolbarButton",te.RichTextToolbarButton),iPe=Ze("__unstableRichTextInputEvent",te.__unstableRichTextInputEvent),sPe=Ze("MediaPlaceholder",te.MediaPlaceholder),aPe=Ze("MediaUpload",te.MediaUpload),lPe=Ze("MediaUploadCheck",te.MediaUploadCheck),cPe=Ze("MultiSelectScrollIntoView",te.MultiSelectScrollIntoView),uPe=Ze("NavigableToolbar",te.NavigableToolbar),dPe=Ze("ObserveTyping",te.ObserveTyping),fPe=Ze("SkipToSelectedBlock",te.SkipToSelectedBlock),mPe=Ze("URLInput",te.URLInput),pPe=Ze("URLInputButton",te.URLInputButton),hPe=Ze("URLPopover",te.URLPopover),gPe=Ze("Warning",te.Warning),vPe=Ze("WritingFlow",te.WritingFlow),yPe=Xa("createCustomColorsHOC",te.createCustomColorsHOC),bPe=Xa("getColorClassName",te.getColorClassName),SPe=Xa("getColorObjectByAttributeValues",te.getColorObjectByAttributeValues),_Pe=Xa("getColorObjectByColorValue",te.getColorObjectByColorValue),wPe=Xa("getFontSize",te.getFontSize),xPe=Xa("getFontSizeClass",te.getFontSizeClass),CPe=Xa("withColorContext",te.withColorContext),TPe=Xa("withColors",te.withColors),PPe=Xa("withFontSizes",te.withFontSizes);var kPe=Tf,EPe=Tf;function RPe(e=[]){return e.push({...Zx}),e}(0,tJ.addFilter)("editor.Autocomplete.completers","editor/autocompleters/set-default-completers",RPe);var rJ=s(D(),1),O4=s(mo(),1),oJ=s(Yi(),1),JP=s(Yd(),1);var xg=s(C(),1),{MediaUploadModal:APe}=N(JP.privateApis),OPe=class extends rJ.Component{constructor(e){super(e),this.state={isOpen:!1},this.openModal=this.openModal.bind(this),this.closeModal=this.closeModal.bind(this)}openModal(){this.setState({isOpen:!0})}closeModal(){this.setState({isOpen:!1}),this.props.onClose?.()}render(){let{allowedTypes:e,multiple:t,value:r,onSelect:o,title:n,modalClass:i,render:a}=this.props,{isOpen:l}=this.state;return(0,xg.jsxs)(xg.Fragment,{children:[a({open:this.openModal}),(0,xg.jsx)(APe,{allowedTypes:e,multiple:t,value:r,onSelect:c=>{o(c),this.closeModal()},onClose:this.closeModal,title:n,isOpen:l,modalClass:i})]})}};window.__experimentalDataViewsMediaModal?(0,O4.addFilter)("editor.MediaUpload","core/editor/components/media-upload",()=>((0,oJ.default)("Extending MediaUpload as a class component",{since:"7.0",version:"7.2",hint:"MediaUpload will become a function component in WordPress 7.2 Please update any custom implementations to use function components instead."}),OPe)):(0,O4.addFilter)("editor.MediaUpload","core/editor/components/media-upload",()=>JP.MediaUpload);var iJ=s(mo(),1),sJ=s(Ls(),1),aJ=s(he(),1),$P=s($(),1),I4=s(O(),1),lJ=s(Xe(),1);var da=s(C(),1),{PatternOverridesControls:IPe,ResetOverridesControl:NPe,PATTERN_TYPES:FPe,PATTERN_SYNC_TYPES:nJ}=N(sJ.privateApis),DPe=(0,aJ.createHigherOrderComponent)(e=>t=>{let r=(0,I4.useSelect)(o=>{let{__experimentalBlockBindingsSupportedAttributes:n}=o($P.store).getSettings();return!!n?.[t.name]},[t.name]);return(0,da.jsxs)(da.Fragment,{children:[(0,da.jsx)(e,{...t},"edit"),t.isSelected&&r&&(0,da.jsx)(BPe,{...t})]})},"withPatternOverrideControls");function BPe(e){let t=(0,$P.useBlockEditingMode)(),{hasPatternOverridesSource:r,isEditingSyncedPattern:o}=(0,I4.useSelect)(c=>{let{getCurrentPostType:u,getEditedPostAttribute:d}=c(w);return{hasPatternOverridesSource:!!(0,lJ.getBlockBindingsSource)("core/pattern-overrides"),isEditingSyncedPattern:u()===FPe.user&&d("meta")?.wp_pattern_sync_status!==nJ.unsynced&&d("wp_pattern_sync_status")!==nJ.unsynced}},[]),n=e.attributes.metadata?.bindings,i=!!n&&Object.values(n).some(c=>c.source==="core/pattern-overrides"),a=o&&t==="default",l=!o&&!!e.attributes.metadata?.name&&t!=="disabled"&&i;return r?(0,da.jsxs)(da.Fragment,{children:[a&&(0,da.jsx)(IPe,{...e}),l&&(0,da.jsx)(NPe,{...e})]}):null}(0,iJ.addFilter)("editor.BlockEdit","core/editor/with-pattern-override-controls",DPe);var cJ=s(mo(),1),uJ=s(he(),1),dJ=s(D(),1),N4=s(E(),1),Cg=s($(),1),ek=s(A(),1),fJ=s(O(),1),Qa=s(C(),1),MPe=["core/navigation-link","core/navigation-submenu"];function LPe({attributes:e}){let{kind:t,id:r,type:o}=e,n=(0,Cg.useBlockEditingMode)(),i=(0,fJ.useSelect)(l=>l(Cg.store).getSettings().onNavigateToEntityRecord,[]),a=(0,dJ.useCallback)(()=>{t==="post-type"&&o==="page"&&r&&i&&i({postId:r,postType:o})},[t,r,o,i]);return t!=="post-type"||o!=="page"||!r||!i||n!=="contentOnly"?null:(0,Qa.jsx)(Cg.__unstableBlockToolbarLastItem,{children:(0,Qa.jsx)(ek.ToolbarGroup,{children:(0,Qa.jsx)(ek.ToolbarButton,{name:"view",title:(0,N4.__)("View"),onClick:a,children:(0,N4.__)("View")})})})}var VPe=(0,uJ.createHigherOrderComponent)(e=>t=>{let r=MPe.includes(t.name);return(0,Qa.jsxs)(Qa.Fragment,{children:[(0,Qa.jsx)(e,{...t},"edit"),t.isSelected&&r&&(0,Qa.jsx)(LPe,{...t})]})},"withNavigationViewButton");(0,cJ.addFilter)("editor.BlockEdit","core/editor/with-navigation-view-button",VPe);var mJ=s(mo(),1),pJ=s(he(),1),hJ=s(D(),1),F4=s(E(),1),Tg=s($(),1),tk=s(A(),1),ld=s(O(),1);var Ja=s(C(),1),jPe="core/navigation",zPe="core/template-part",UPe="edit-post/block";function HPe({clientId:e}){let t=(0,ld.useRegistry)(),{selectBlock:r,flashBlock:o}=(0,ld.useDispatch)(Tg.store),{requestInspectorTab:n}=N((0,ld.useDispatch)(Tg.store)),{enableComplementaryArea:i}=(0,ld.useDispatch)(Ce),{hasNavigationBlocks:a,firstNavigationBlockId:l,isNavigationEditable:c}=(0,ld.useSelect)(d=>{let{getClientIdsOfDescendants:f,getBlockName:m,getBlockEditingMode:h}=d(Tg.store),v=f(e).filter(_=>m(_)===jPe),y=v.length>0,b=y?v[0]:null;return{hasNavigationBlocks:y,firstNavigationBlockId:b,isNavigationEditable:h(b)!=="disabled"}},[e]),u=(0,hJ.useCallback)(()=>{l&&t.batch(()=>{r(l),o(l,500),i("core",UPe),n("list",{openPanel:l})})},[l,t,r,o,i,n]);return!a||!c?null:(0,Ja.jsx)(Tg.__unstableBlockToolbarLastItem,{children:(0,Ja.jsx)(tk.ToolbarGroup,{children:(0,Ja.jsx)(tk.ToolbarButton,{label:(0,F4.__)("Edit navigation"),onClick:u,children:(0,F4.__)("Edit navigation")})})})}var GPe=(0,pJ.createHigherOrderComponent)(e=>t=>{let r=t.name===zPe;return(0,Ja.jsxs)(Ja.Fragment,{children:[(0,Ja.jsx)(e,{...t},"edit"),t.isSelected&&r&&(0,Ja.jsx)(HPe,{clientId:t.clientId})]})},"withTemplatePartNavigationEditButton");(0,mJ.addFilter)("editor.BlockEdit","core/editor/with-template-part-navigation-edit-button",GPe);var yJ=s(mo(),1),bJ=s(he(),1),cd=s($(),1),E0=s(A(),1),Ec=s(E(),1),Rc=s(Xe(),1),ok=s(D(),1),Pg=s(O(),1),SJ=s(ct(),1),_J=s(W(),1);function D4(e,t,r){return!e||typeof e!="object"||t.reduce((o,n,i)=>(o[n]===void 0&&(Number.isInteger(t[i+1])?o[n]=[]:o[n]={}),i===t.length-1&&(o[n]=r),o[n]),e),e}var Ss=s(C(),1),{cleanEmptyObject:WPe}=N(cd.privateApis),gJ={...Rc.__EXPERIMENTAL_STYLE_PROPERTY,blockGap:{value:["spacing","blockGap"]}},YPe={"border.color":"color","color.background":"color","color.text":"color","elements.link.color.text":"color","elements.link.:hover.color.text":"color","elements.link.typography.fontFamily":"font-family","elements.link.typography.fontSize":"font-size","elements.button.color.text":"color","elements.button.color.background":"color","elements.button.typography.fontFamily":"font-family","elements.button.typography.fontSize":"font-size","elements.caption.color.text":"color","elements.heading.color":"color","elements.heading.color.background":"color","elements.heading.typography.fontFamily":"font-family","elements.heading.gradient":"gradient","elements.heading.color.gradient":"gradient","elements.h1.color":"color","elements.h1.color.background":"color","elements.h1.typography.fontFamily":"font-family","elements.h1.color.gradient":"gradient","elements.h2.color":"color","elements.h2.color.background":"color","elements.h2.typography.fontFamily":"font-family","elements.h2.color.gradient":"gradient","elements.h3.color":"color","elements.h3.color.background":"color","elements.h3.typography.fontFamily":"font-family","elements.h3.color.gradient":"gradient","elements.h4.color":"color","elements.h4.color.background":"color","elements.h4.typography.fontFamily":"font-family","elements.h4.color.gradient":"gradient","elements.h5.color":"color","elements.h5.color.background":"color","elements.h5.typography.fontFamily":"font-family","elements.h5.color.gradient":"gradient","elements.h6.color":"color","elements.h6.color.background":"color","elements.h6.typography.fontFamily":"font-family","elements.h6.color.gradient":"gradient","color.gradient":"gradient",blockGap:"spacing","typography.fontSize":"font-size","typography.fontFamily":"font-family"},qPe={"border.color":"borderColor","color.background":"backgroundColor","color.text":"textColor","color.gradient":"gradient","typography.fontSize":"fontSize","typography.fontFamily":"fontFamily"},ZPe=["border","color","spacing","typography"],vJ=(e,t)=>{let r=e;return t.forEach(o=>{r=r?.[o]}),r},KPe=["borderColor","borderWidth","borderStyle"],wJ=["top","right","bottom","left"];function XPe(e,t,r){if(!e&&!t)return[];let o=[...rk("top",e,r),...rk("right",e,r),...rk("bottom",e,r),...rk("left",e,r)],{color:n,style:i,width:a}=e||{};return(t||n||a)&&!i&&wJ.forEach(c=>{r?.[c]?.style||o.push({path:["border",c,"style"],value:"solid"})}),o}function rk(e,t,r){if(!t?.[e]||r?.[e]?.style)return[];let{color:o,style:n,width:i}=t[e];return!(o||i)||n?[]:[{path:["border",e,"style"],value:"solid"}]}function QPe(e,t,r){let o=(0,Pg.useSelect)(i=>N(i(Rc.store)).getSupportedStyles(e),[e]),n=r?.styles?.blocks?.[e];return(0,ok.useMemo)(()=>{let i=o.flatMap(a=>{if(!gJ[a])return[];let{value:l}=gJ[a],c=l.join("."),u=t[qPe[c]],d=u?`var:preset|${YPe[c]}|${u}`:vJ(t.style,l);if(a==="linkColor"){let f=d?[{path:l,value:d}]:[],m=["elements","link",":hover","color","text"],h=vJ(t.style,m);return h&&f.push({path:m,value:h}),f}if(KPe.includes(a)&&d){let f=[{path:l,value:d}];return wJ.forEach(m=>{let h=[...l];h.splice(-1,0,m),f.push({path:h,value:d})}),f}return d?[{path:l,value:d}]:[]});return XPe(t.style?.border,t.borderColor,n?.border).forEach(a=>i.push(a)),i},[o,t,n])}function JPe({name:e,attributes:t,setAttributes:r}){let{user:o,setUser:n}=xo(),i=QPe(e,t,o),{__unstableMarkNextChangeAsNotPersistent:a}=(0,Pg.useDispatch)(cd.store),{createSuccessNotice:l}=(0,Pg.useDispatch)(SJ.store),c=(0,ok.useCallback)(()=>{if(i.length!==0&&i.length>0){let{style:u}=t,d=structuredClone(u),f=structuredClone(o);for(let{path:h,value:g}of i)D4(d,h,void 0),D4(f,["styles","blocks",e,...h],g);let m={borderColor:void 0,backgroundColor:void 0,textColor:void 0,gradient:void 0,fontSize:void 0,fontFamily:void 0,style:WPe(d)};a(),r(m),n(f,{undoIgnore:!0}),l((0,Ec.sprintf)((0,Ec.__)("%s styles applied."),(0,Rc.getBlockType)(e).title),{type:"snackbar",actions:[{label:(0,Ec.__)("Undo"),onClick(){a(),r(t),n(o,{undoIgnore:!0})}}]})}},[a,t,i,l,e,r,n,o]);return(0,Ss.jsxs)(E0.BaseControl,{className:"editor-push-changes-to-global-styles-control",help:(0,Ec.sprintf)((0,Ec.__)("Apply this block\u2019s typography, spacing, dimensions, and color styles to all %s blocks."),(0,Rc.getBlockType)(e).title),children:[(0,Ss.jsx)(E0.BaseControl.VisualLabel,{children:(0,Ec.__)("Styles")}),(0,Ss.jsx)(E0.Button,{__next40pxDefaultSize:!0,variant:"secondary",accessibleWhenDisabled:!0,disabled:i.length===0,onClick:c,children:(0,Ec.__)("Apply globally")})]})}function $Pe(e){let t=(0,cd.useBlockEditingMode)(),r=(0,Pg.useSelect)(i=>i(_J.store).getCurrentTheme()?.is_block_theme,[]),o=ZPe.some(i=>(0,Rc.hasBlockSupport)(e.name,i));return t==="default"&&o&&r?(0,Ss.jsx)(cd.InspectorAdvancedControls,{children:(0,Ss.jsx)(JPe,{...e})}):null}var eke=(0,bJ.createHigherOrderComponent)(e=>t=>(0,Ss.jsxs)(Ss.Fragment,{children:[(0,Ss.jsx)(e,{...t},"edit"),t.isSelected&&(0,Ss.jsx)($Pe,{...t})]}));(0,yJ.addFilter)("editor.BlockEdit","core/editor/push-changes-to-global-styles",eke);var R0=s(A(),1),xJ=s(C(),1),B4="__experimentalMainDashboardButton",CJ=()=>{let e=(0,R0.__experimentalUseSlotFills)(B4);return!!(e&&e.length)},{Fill:tke,Slot:rke}=(0,R0.createSlotFill)(B4),TJ=tke,oke=()=>{let e=(0,R0.__experimentalUseSlotFills)(B4);return(0,xJ.jsx)(rke,{bubblesVirtually:!0,fillProps:{length:e?e.length:0}})};TJ.Slot=oke;var nk=TJ;var Ose=s(O(),1),Ise=s(W(),1),Nse=s(A(),1),Fse=s(E(),1);var fE=s(O(),1),Nd=s(E(),1),une=s(lt(),1),mE=s($(),1),dne=s(he(),1),pE=s(D(),1),fne=s(ft(),1),mne=s(ct(),1);var Q$=s($(),1),J$=s(O(),1),B0=s(he(),1),$$=s(lt(),1),eee=s(D(),1);var kg=s($(),1),PJ=s(D(),1),ik=s(A(),1),M4=s(E(),1);var kJ=s(O(),1);var Ac=s(C(),1),{useHasBlockToolbar:nke}=N(kg.privateApis);function EJ({isCollapsed:e,onToggle:t}){let{blockSelectionStart:r}=(0,kJ.useSelect)(i=>({blockSelectionStart:i(kg.store).getBlockSelectionStart()}),[]),o=nke(),n=!!r;return(0,PJ.useEffect)(()=>{r&&t(!1)},[r,t]),o?(0,Ac.jsxs)(Ac.Fragment,{children:[(0,Ac.jsx)("div",{className:re("editor-collapsible-block-toolbar",{"is-collapsed":e||!n}),children:(0,Ac.jsx)(kg.BlockToolbar,{hideDragHandle:!0})}),(0,Ac.jsx)(ik.Popover.Slot,{name:"block-toolbar"}),(0,Ac.jsx)(ik.Button,{className:"editor-collapsible-block-toolbar__toggle",icon:e?Tl:kl,onClick:()=>{t(!e)},label:e?(0,M4.__)("Show block tools"):(0,M4.__)("Hide block tools"),size:"compact"})]}):null}var RJ=s(he(),1),sk=s(O(),1),Tm=s(E(),1),AJ=s($(),1),Eg=s(A(),1);var L4=s(D(),1),OJ=s(Oi(),1),IJ=s(lt(),1);var fa=s(C(),1);function ike({className:e,disableBlockTools:t=!1}){let{setIsInserterOpened:r,setIsListViewOpened:o}=(0,sk.useDispatch)(w),{isDistractionFree:n,isInserterOpened:i,isListViewOpen:a,listViewShortcut:l,inserterSidebarToggleRef:c,listViewToggleRef:u,showIconLabels:d}=(0,sk.useSelect)(_=>{let{get:S}=_(IJ.store),{isListViewOpened:x,getEditorMode:T,getInserterSidebarToggleRef:R,getListViewToggleRef:F}=N(_(w)),{getShortcutRepresentation:B}=_(OJ.store);return{isInserterOpened:_(w).isInserterOpened(),isListViewOpen:x(),listViewShortcut:B("core/editor/toggle-list-view"),inserterSidebarToggleRef:R(),listViewToggleRef:F(),showIconLabels:S("core","showIconLabels"),isDistractionFree:S("core","distractionFree"),isVisualMode:T()==="visual"}},[]),f=_=>{i&&_.preventDefault()},m=(0,RJ.useViewportMatch)("wide"),h=(0,Tm.__)("Document tools"),g=(0,L4.useCallback)(()=>o(!a),[o,a]),v=(0,L4.useCallback)(()=>r(!i),[i,r]),y=(0,Tm._x)("Block Inserter","Generic label for block inserter button"),b=i?(0,Tm.__)("Close"):(0,Tm.__)("Add");return(0,fa.jsx)(AJ.NavigableToolbar,{className:re("editor-document-tools","edit-post-header-toolbar",e),"aria-label":h,variant:"unstyled",children:(0,fa.jsxs)("div",{className:"editor-document-tools__left",children:[!n&&(0,fa.jsx)(Eg.ToolbarButton,{ref:c,className:"editor-document-tools__inserter-toggle",variant:"primary",isPressed:i,onMouseDown:f,onClick:v,disabled:t,icon:Pl,label:d?b:y,showTooltip:!d,"aria-expanded":i}),(m||!d)&&(0,fa.jsxs)(fa.Fragment,{children:[(0,fa.jsx)(Eg.ToolbarItem,{as:_C,showTooltip:!d,variant:d?"tertiary":void 0,size:"compact"}),(0,fa.jsx)(Eg.ToolbarItem,{as:yC,showTooltip:!d,variant:d?"tertiary":void 0,size:"compact"}),!n&&(0,fa.jsx)(Eg.ToolbarButton,{className:"editor-document-tools__document-overview-toggle",icon:Iv,disabled:t,isPressed:a,label:(0,Tm.__)("Document Overview"),onClick:g,shortcut:l,showTooltip:!d,variant:d?"tertiary":void 0,"aria-expanded":a,ref:u})]})]})})}var NJ=ike;var A0=s(A(),1);var ud=s(C(),1),V4={distractionFreeDisabled:{y:"-50px"},distractionFreeHover:{y:0},distractionFreeHidden:{y:"-50px"},visible:{y:0},hidden:{y:0}},ske={distractionFreeDisabled:{x:"-100%"},distractionFreeHover:{x:0},distractionFreeHidden:{x:"-100%"},visible:{x:0},hidden:{x:0}};function ak({className:e,toolbar:t,center:r,settings:o}){let n=CJ();return(0,ud.jsxs)("div",{className:re("editor-header edit-post-header",e),children:[n&&(0,ud.jsx)(A0.__unstableMotion.div,{className:"editor-header__back-button",variants:ske,transition:{type:"tween"},children:(0,ud.jsx)(nk.Slot,{})}),(0,ud.jsx)(A0.__unstableMotion.div,{variants:V4,className:"editor-header__toolbar",transition:{type:"tween"},children:t}),r&&(0,ud.jsx)(A0.__unstableMotion.div,{variants:V4,className:"editor-header__center",transition:{type:"tween"},children:r}),(0,ud.jsx)(A0.__unstableMotion.div,{variants:V4,transition:{type:"tween"},className:"editor-header__settings",children:o})]})}var gr=s(E(),1),Rg=s(O(),1),U4=s(yo(),1);var _s=s(A(),1),Pm=s(lt(),1);var FJ=s(A(),1),O0=s(O(),1),j4=s(E(),1),DJ=s(he(),1),BJ=s(ct(),1),MJ=s(W(),1),LJ=s(Xe(),1);var VJ=s(C(),1);function jJ(){let{createNotice:e}=(0,O0.useDispatch)(BJ.store),{getCurrentPostId:t,getCurrentPostType:r}=(0,O0.useSelect)(w),{getEditedEntityRecord:o}=(0,O0.useSelect)(MJ.store);function n(){let l=o("postType",r(),t());if(!l)return"";if(typeof l.content=="function")return l.content(l);if(l.blocks)return(0,LJ.__unstableSerializeAndClean)(l.blocks);if(l.content)return l.content}function i(){e("info",(0,j4.__)("All content copied."),{isDismissible:!0,type:"snackbar"})}let a=(0,DJ.useCopyToClipboard)(n,i);return(0,VJ.jsx)(FJ.MenuItem,{ref:a,children:(0,j4.__)("Copy all blocks")})}var I0=s(E(),1),lk=s(A(),1),ck=s(O(),1),zJ=s(Oi(),1);var z4=s(C(),1),ake=[{value:"visual",label:(0,I0.__)("Visual editor")},{value:"text",label:(0,I0.__)("Code editor")}];function lke(){let{shortcut:e,isRichEditingEnabled:t,isCodeEditingEnabled:r,mode:o}=(0,ck.useSelect)(l=>({shortcut:l(zJ.store).getShortcutRepresentation("core/editor/toggle-mode"),isRichEditingEnabled:l(w).getEditorSettings().richEditingEnabled,isCodeEditingEnabled:l(w).getEditorSettings().codeEditingEnabled,mode:l(w).getEditorMode()}),[]),{switchEditorMode:n}=(0,ck.useDispatch)(w),i=o;!t&&o==="visual"&&(i="text"),!r&&o==="text"&&(i="visual");let a=ake.map(l=>(!r&&l.value==="text"&&(l={...l,disabled:!0}),!t&&l.value==="visual"&&(l={...l,disabled:!0,info:(0,I0.__)("You can enable the visual editor in your profile settings.")}),l.value!==i&&!l.disabled?{...l,shortcut:e}:l));return(0,z4.jsx)(lk.MenuGroup,{label:(0,I0.__)("Editor"),children:(0,z4.jsx)(lk.MenuItemsChoice,{choices:a,value:i,onSelect:n})})}var UJ=lke;var HJ=s(A(),1),GJ=s(C(),1),{Fill:WJ,Slot:cke}=(0,HJ.createSlotFill)("ToolsMoreMenuGroup");WJ.Slot=({fillProps:e})=>(0,GJ.jsx)(cke,{fillProps:e});var uk=WJ;var YJ=s(A(),1),qJ=s(D(),1),ZJ=s(C(),1),{Fill:KJ,Slot:uke}=(0,YJ.createSlotFill)(qJ.Platform.OS==="web"?Symbol("ViewMoreMenuGroup"):"ViewMoreMenuGroup");KJ.Slot=({fillProps:e})=>(0,ZJ.jsx)(uke,{fillProps:e});var dk=KJ;var vr=s(C(),1);function fk({disabled:e=!1}){let{openModal:t}=(0,Rg.useDispatch)(Ce),{set:r}=(0,Rg.useDispatch)(Pm.store),{toggleDistractionFree:o}=(0,Rg.useDispatch)(w),n=(0,Rg.useSelect)(a=>a(Pm.store).get("core","showIconLabels"),[]),i=()=>{r("core","distractionFree",!1)};return(0,vr.jsx)(vr.Fragment,{children:(0,vr.jsx)(_s.DropdownMenu,{icon:Nr,label:(0,gr.__)("Options"),popoverProps:{placement:"bottom-end",className:"more-menu-dropdown__content"},toggleProps:{showTooltip:!n,...n&&{variant:"tertiary"},tooltipPosition:"bottom",size:"compact",disabled:e},children:({onClose:a})=>(0,vr.jsxs)(vr.Fragment,{children:[(0,vr.jsxs)(_s.MenuGroup,{label:(0,gr._x)("View","noun"),children:[(0,vr.jsx)(Pm.PreferenceToggleMenuItem,{scope:"core",name:"fixedToolbar",onToggle:i,label:(0,gr.__)("Top toolbar"),info:(0,gr.__)("Access all block and document tools in a single place"),messageActivated:(0,gr.__)("Top toolbar activated."),messageDeactivated:(0,gr.__)("Top toolbar deactivated.")}),(0,vr.jsx)(Pm.PreferenceToggleMenuItem,{scope:"core",name:"distractionFree",label:(0,gr.__)("Distraction free"),info:(0,gr.__)("Write with calmness"),handleToggling:!1,onToggle:()=>o({createNotice:!1}),messageActivated:(0,gr.__)("Distraction free mode activated."),messageDeactivated:(0,gr.__)("Distraction free mode deactivated."),shortcut:U4.displayShortcut.primaryShift("\\")}),(0,vr.jsx)(Pm.PreferenceToggleMenuItem,{scope:"core",name:"focusMode",label:(0,gr.__)("Spotlight mode"),info:(0,gr.__)("Focus on one block at a time"),messageActivated:(0,gr.__)("Spotlight mode activated."),messageDeactivated:(0,gr.__)("Spotlight mode deactivated.")}),(0,vr.jsx)(dk.Slot,{fillProps:{onClose:a}})]}),(0,vr.jsx)(UJ,{}),(0,vr.jsx)(rs.Slot,{name:"core/plugin-more-menu",label:(0,gr.__)("Panels"),fillProps:{onClick:a}}),(0,vr.jsxs)(_s.MenuGroup,{label:(0,gr.__)("Tools"),children:[(0,vr.jsx)(_s.MenuItem,{onClick:()=>t("editor/keyboard-shortcut-help"),shortcut:U4.displayShortcut.access("h"),children:(0,gr.__)("Keyboard shortcuts")}),(0,vr.jsx)(jJ,{}),(0,vr.jsxs)(_s.MenuItem,{icon:Xn,href:(0,gr.__)("https://wordpress.org/documentation/article/wordpress-block-editor/"),target:"_blank",rel:"noopener noreferrer",children:[(0,gr.__)("Help"),(0,vr.jsx)(_s.VisuallyHidden,{as:"span",children:(0,gr.__)("(opens in a new tab)")})]}),(0,vr.jsx)(uk.Slot,{fillProps:{onClose:a}})]}),(0,vr.jsx)(_s.MenuGroup,{children:(0,vr.jsx)(_s.MenuItem,{onClick:()=>t("editor/preferences"),children:(0,gr.__)("Preferences")})})]})})})}var QJ=s(he(),1),mk=s(O(),1);var JJ=s(C(),1),XJ="toggle",H4="button";function $J({forceIsDirty:e,setEntitiesSavedStatesCallback:t}){let r,o=(0,QJ.useViewportMatch)("medium","<"),{togglePublishSidebar:n}=(0,mk.useDispatch)(w),{hasPublishAction:i,isBeingScheduled:a,isPending:l,isPublished:c,isPublishSidebarEnabled:u,isPublishSidebarOpened:d,isScheduled:f,postStatus:m,postStatusHasChanged:h,postType:g}=(0,mk.useSelect)(v=>({hasPublishAction:!!v(w).getCurrentPost()?._links?.["wp:action-publish"],isBeingScheduled:v(w).isEditedPostBeingScheduled(),isPending:v(w).isCurrentPostPending(),isPublished:v(w).isCurrentPostPublished(),isPublishSidebarEnabled:v(w).isPublishSidebarEnabled(),isPublishSidebarOpened:v(w).isPublishSidebarOpened(),isScheduled:v(w).isCurrentPostScheduled(),postStatus:v(w).getEditedPostAttribute("status"),postStatusHasChanged:v(w).getPostEdits()?.status,postType:v(w).getCurrentPostType()}),[]);return g===ur||c||h&&!["future","publish"].includes(m)||f&&a||l&&!i&&!o?r=H4:o||u?r=XJ:r=H4,(0,JJ.jsx)(eg,{forceIsDirty:e,isOpen:d,isToggle:r===XJ,onToggle:n,setEntitiesSavedStatesCallback:t})}var e$=s(E(),1),t$=s(A(),1);var r$=s(W(),1),o$=s(O(),1),n$=s(lt(),1);var i$=s(C(),1);function s$(){let{hasLoaded:e,permalink:t,isPublished:r,label:o,showIconLabels:n}=(0,o$.useSelect)(i=>{let a=i(w).getCurrentPostType(),l=i(r$.store).getPostType(a),{get:c}=i(n$.store);return{permalink:i(w).getPermalink(),isPublished:i(w).isCurrentPostPublished(),label:l?.labels.view_item,hasLoaded:!!l,showIconLabels:c("core","showIconLabels")}},[]);return!r||!t||!e?null:(0,i$.jsx)(t$.Button,{icon:Xn,label:o||(0,e$.__)("View post"),href:t,target:"_blank",showTooltip:!n,size:"compact"})}var a$=s(he(),1),un=s(A(),1),ma=s(E(),1);var N0=s(O(),1),l$=s(W(),1),c$=s(lt(),1);var u$=s($(),1);var ao=s(C(),1);function d$({forceIsAutosaveable:e,disabled:t}){let{deviceType:r,homeUrl:o,isTemplate:n,isViewable:i,showIconLabels:a,isTemplateHidden:l,templateId:c}=(0,N0.useSelect)(x=>{let{getDeviceType:T,getCurrentPostType:R,getCurrentTemplateId:F,getRenderingMode:B}=x(w),{getEntityRecord:z,getPostType:L}=x(l$.store),{get:M}=x(c$.store),k=R();return{deviceType:T(),homeUrl:z("root","__unstableBase")?.home,isTemplate:k==="wp_template",isViewable:L(k)?.viewable??!1,showIconLabels:M("core","showIconLabels"),isTemplateHidden:B()==="post-only",templateId:F()}},[]),{setDeviceType:u,setRenderingMode:d,setDefaultRenderingMode:f}=N((0,N0.useDispatch)(w)),{resetZoomLevel:m}=N((0,N0.useDispatch)(u$.store)),h=x=>{u(x),m()};if((0,a$.useViewportMatch)("medium","<"))return null;let v={placement:"bottom-end"},y={className:"editor-preview-dropdown__toggle",iconPosition:"right",size:"compact",showTooltip:!a,disabled:t,accessibleWhenDisabled:t},b={"aria-label":(0,ma.__)("View options")},_={desktop:J1,mobile:Ym,tablet:US},S=[{value:"Desktop",label:(0,ma.__)("Desktop"),icon:J1},{value:"Tablet",label:(0,ma.__)("Tablet"),icon:US},{value:"Mobile",label:(0,ma.__)("Mobile"),icon:Ym}];return(0,ao.jsx)(un.DropdownMenu,{className:re("editor-preview-dropdown",`editor-preview-dropdown--${r.toLowerCase()}`),popoverProps:v,toggleProps:y,menuProps:b,icon:_[r.toLowerCase()],label:(0,ma.__)("View"),disableOpenOnArrowDown:t,children:({onClose:x})=>(0,ao.jsxs)(ao.Fragment,{children:[(0,ao.jsx)(un.MenuGroup,{children:(0,ao.jsx)(un.MenuItemsChoice,{choices:S,value:r,onSelect:h})}),n&&(0,ao.jsx)(un.MenuGroup,{children:(0,ao.jsxs)(un.MenuItem,{href:o,target:"_blank",icon:Xn,onClick:x,children:[(0,ma.__)("View site"),(0,ao.jsx)(un.VisuallyHidden,{as:"span",children:(0,ma.__)("(opens in a new tab)")})]})}),!n&&!!c&&(0,ao.jsx)(un.MenuGroup,{children:(0,ao.jsx)(un.MenuItem,{icon:l?void 0:Pi,isSelected:!l,role:"menuitemcheckbox",onClick:()=>{let T=l?"template-locked":"post-only";d(T),f(T),m()},children:(0,ma.__)("Show template")})}),i&&(0,ao.jsx)(un.MenuGroup,{children:(0,ao.jsx)(od,{className:"editor-preview-dropdown__button-external",role:"menuitem",forceIsAutosaveable:e,"aria-label":(0,ma.__)("Preview in new tab"),textContent:(0,ao.jsxs)(ao.Fragment,{children:[(0,ma.__)("Preview in new tab"),(0,ao.jsx)(un.Icon,{icon:Xn})]}),onPreview:x})}),(0,ao.jsx)(rs.Slot,{name:"core/plugin-preview-menu",fillProps:{onClick:x}})]})})}var f$=s(A(),1),G4=s(E(),1),m$=s(D(),1),F0=s(O(),1),W4=s($(),1);var Y4=s(lt(),1),pk=s(Oi(),1),p$=s(yo(),1);var h$=s(C(),1),dke=({disabled:e})=>{let{isZoomOut:t,showIconLabels:r,isDistractionFree:o}=(0,F0.useSelect)(u=>({isZoomOut:N(u(W4.store)).isZoomOut(),showIconLabels:u(Y4.store).get("core","showIconLabels"),isDistractionFree:u(Y4.store).get("core","distractionFree")})),{resetZoomLevel:n,setZoomLevel:i}=N((0,F0.useDispatch)(W4.store)),{registerShortcut:a,unregisterShortcut:l}=(0,F0.useDispatch)(pk.store);return(0,m$.useEffect)(()=>(a({name:"core/editor/zoom",category:"global",description:(0,G4.__)("Enter or exit zoom out."),keyCombination:{modifier:(0,p$.isAppleOS)()?"primaryShift":"secondary",character:"0"}}),()=>{l("core/editor/zoom")}),[a,l]),(0,pk.useShortcut)("core/editor/zoom",()=>{t?n():i("auto-scaled")},{isDisabled:o}),(0,h$.jsx)(f$.Button,{accessibleWhenDisabled:!0,disabled:e,onClick:()=>{t?n():i("auto-scaled")},icon:jA,label:(0,G4.__)("Zoom Out"),isPressed:t,size:"compact",showTooltip:!r,className:"editor-zoom-out-toggle"})},g$=dke;var Z$=s(A(),1),Dg=s(D(),1),K$=s(W(),1),Rk=s(E(),1);var hk=s(A(),1),b$=s(D(),1);var Ag=s(D(),1);function v$(e){let[t,r]=(0,Ag.useState)(e),[o,n]=(0,Ag.useState)(e?"loading":"idle");t!==e&&(r(e),n(e?"loading":"idle"));let i=(0,Ag.useCallback)(()=>n("loaded"),[]),a=(0,Ag.useCallback)(()=>n("error"),[]);return{status:o,handleLoad:i,handleError:a}}var Oc=s(C(),1);uw([Xw]);var y$="#1e1e1e",fke="#fff";function mke({className:e,src:t,name:r,label:o,variant:n,size:i="default",borderColor:a,dimmed:l=!1,statusIndicator:c,style:u,...d}){let{status:f,handleLoad:m,handleError:h}=v$(t),g=f==="loaded",v=n==="badge"&&!!r,y=r?r.split(/\s+/).slice(0,2).map(x=>x[0]).join("").toUpperCase():void 0,b=(0,b$.useMemo)(()=>a&&xr(a).isReadable(y$,{level:"AA",size:"normal"})?y$:fke,[a]),_={...u,...a?{"--editor-avatar-outline-color":a,"--editor-avatar-name-color":b}:{}},S=(0,Oc.jsxs)("div",{className:re("editor-avatar",e,{"has-avatar-border-color":!!a,"has-src":g,"is-badge":v,"is-small":i==="small","is-dimmed":l}),style:_,role:r?"img":void 0,"aria-label":r||void 0,...d,children:[(0,Oc.jsxs)("span",{className:"editor-avatar__image",children:[t&&(0,Oc.jsx)("img",{src:t,alt:"",crossOrigin:"anonymous",className:"editor-avatar__img",onLoad:m,onError:h}),!g&&y]}),l&&!!c&&(0,Oc.jsx)("span",{className:"editor-avatar__status-indicator",children:(0,Oc.jsx)(hk.Icon,{icon:c})}),v&&(0,Oc.jsx)("span",{className:"editor-avatar__name",children:o||r})]});return r&&(!v||o)?(0,Oc.jsx)(hk.Tooltip,{text:r,children:S}):S}var Ic=mke;var S$=s(D(),1),gk=s(E(),1),vk=s(C(),1);function pke({className:e,max:t=3,children:r,...o}){let n=S$.Children.toArray(r),i=n.slice(0,t),a=n.length-t;return(0,vk.jsxs)("div",{role:"group",className:re("editor-avatar-group",e),...o,children:[i,a>0&&(0,vk.jsx)("span",{className:"editor-avatar-group__overflow","aria-label":(0,gk.sprintf)((0,gk._n)("%d more collaborator","%d more collaborators",a),a),children:`+${a}`})]})}var q4=pke;var D0=s(E(),1),yk=s(A(),1);var T$=s(Xm(),1);function Nc(e){return e?.["48"]||e?.["96"]||e?.["24"]}var w$=s(E(),1);function x$(e){return e.trim()}function Og(){}var _$=["#C36EFF","#FF51A8","#E4780A","#FF35EE","#879F11","#46A494","#00A2C3"];function ws(e){return _$[e%_$.length]}function C$(e,t=10){if(!e)return"";let r=(0,w$._x)("words","Word count type. Do not translate!"),o=e.trim(),n="";if(r==="words")n=o.split(" ",t).join(" ");else if(r==="characters_excluding_spaces"){let a=o.split("",t).join(""),l=a.length-a.replaceAll(" ","").length;n=o.split("",t+l).join("")}else r==="characters_including_spaces"&&(n=o.split("",t).join(""));return n!==o?n+"\u2026":n}function dn(e,t,r){if(!t)return;let o=e&&e!=="new"?`[role=treeitem][id="comment-thread-${e}"]`:"[role=treeitem]:not([id])",n=r?`${o} ${r}`:o;return new Promise(i=>{if(t.querySelector(n))return i(t.querySelector(n));let a=null,l=new window.MutationObserver(()=>{t.querySelector(n)&&(clearTimeout(a),l.disconnect(),i(t.querySelector(n)))});l.observe(t,{childList:!0,subtree:!0}),a=setTimeout(()=>{l.disconnect(),i(null)},3e3)}).then(i=>i?.focus())}var fi=s(C(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='9537a5e604']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","9537a5e604"),e.appendChild(document.createTextNode(".editor-collaborators-presence__list.components-popover .components-popover__content{background:#fff;border:1px solid #ddd;border-radius:8px;border-width:1px 0 0 1px;box-shadow:0 1px 2px #0000000d,0 2px 3px #0000000a,0 6px 6px #00000008,0 8px 8px #00000005}.editor-collaborators-presence__list.components-popover .editor-collaborators-presence__list-content{min-width:280px}.editor-collaborators-presence__list.components-popover .editor-collaborators-presence__list-header{align-items:center;display:flex;justify-content:space-between;padding:8px 16px}.editor-collaborators-presence__list.components-popover .editor-collaborators-presence__list-header-title{display:flex;font-size:13px;font-weight:499;gap:4px;line-height:20px}.editor-collaborators-presence__list.components-popover .editor-collaborators-presence__list-header-title span{color:#757575}.editor-collaborators-presence__list.components-popover .editor-collaborators-presence__list-header-action{padding:0}.editor-collaborators-presence__list.components-popover .editor-collaborators-presence__list-header-action button{color:#1e1e1e;height:32px;padding:0;width:32px}.editor-collaborators-presence__list.components-popover .editor-collaborators-presence__list-items{display:flex;flex-direction:column;padding-bottom:16px}.editor-collaborators-presence__list.components-popover .editor-collaborators-presence__list-item{all:unset;align-items:center;box-sizing:border-box;cursor:pointer;display:flex;gap:8px;padding:12px 16px;transition:background-color .2s ease;width:100%}.editor-collaborators-presence__list.components-popover .editor-collaborators-presence__list-item:hover:not(:disabled){background-color:rgba(var(--wp-admin-theme-color--rgb),.04)}.editor-collaborators-presence__list.components-popover .editor-collaborators-presence__list-item:active:not(:disabled){background-color:rgba(var(--wp-admin-theme-color--rgb),.08)}.editor-collaborators-presence__list.components-popover .editor-collaborators-presence__list-item:focus-visible{outline:2px solid var(--wp-admin-theme-color,#3858e9);outline-offset:-2px}.editor-collaborators-presence__list.components-popover .editor-collaborators-presence__list-item:disabled{cursor:default}.editor-collaborators-presence__list.components-popover .editor-collaborators-presence__list-item-info{display:flex;flex:1;flex-direction:column;min-width:0}.editor-collaborators-presence__list.components-popover .editor-collaborators-presence__list-item-name{color:#1e1e1e;font-size:13px;font-weight:499;line-height:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}")),document.head.appendChild(e)}function P$({activeCollaborators:e,popoverAnchor:t,setIsPopoverVisible:r,cursorRegistry:o}){let n=i=>{o.scrollToCursor(i,{behavior:"smooth",block:"center",highlightDuration:2e3})&&((0,T$.speak)((0,D0.__)("Scrolled to cursor"),"polite"),r(!1))};return(0,fi.jsx)(yk.Popover,{anchor:t,placement:"bottom",offset:8,className:"editor-collaborators-presence__list",onClose:()=>r(!1),children:(0,fi.jsxs)("div",{className:"editor-collaborators-presence__list-content",children:[(0,fi.jsxs)("div",{className:"editor-collaborators-presence__list-header",children:[(0,fi.jsxs)("div",{className:"editor-collaborators-presence__list-header-title",children:[(0,D0.__)("Collaborators"),(0,fi.jsx)("span",{children:e.length})]}),(0,fi.jsx)("div",{className:"editor-collaborators-presence__list-header-action",children:(0,fi.jsx)(yk.Button,{__next40pxDefaultSize:!0,icon:Kn,iconSize:24,label:(0,D0.__)("Close Collaborators List"),onClick:()=>r(!1)})})]}),(0,fi.jsx)("div",{className:"editor-collaborators-presence__list-items",children:e.map(i=>{let a=i.isMe;return(0,fi.jsxs)("button",{className:"editor-collaborators-presence__list-item",disabled:a,onClick:()=>n(i.clientId),children:[(0,fi.jsx)(Ic,{src:Nc(i.collaboratorInfo.avatar_urls),name:i.collaboratorInfo.name,borderColor:a?"var(--wp-admin-theme-color)":ws(i.collaboratorInfo.id),dimmed:!i.isConnected}),(0,fi.jsx)("div",{className:"editor-collaborators-presence__list-item-info",children:(0,fi.jsx)("div",{className:"editor-collaborators-presence__list-item-name",children:a?(0,D0.__)("You"):i.collaboratorInfo.name})})]},i.clientId)})})]})})}function hke(e,t){e.classList.add("collaborators-overlay-cursor-highlighted"),setTimeout(()=>{e.classList.remove("collaborators-overlay-cursor-highlighted")},t)}function k$(){let e=new Map;return{registerCursor(t,r){e.set(t,r)},unregisterCursor(t){e.delete(t)},scrollToCursor(t,r){let o=e.get(t);return o?(o.scrollIntoView({behavior:r?.behavior??"smooth",block:r?.block??"center",inline:r?.inline??"nearest"}),r?.highlightDuration&&hke(o,r.highlightDuration),!0):!1},removeAll(){e.clear()}}}var q$=s($(),1);var kk=s(he(),1),pa=s(D(),1),W$=s(E(),1);var bk="0 1px 1px rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.02), 0 3px 3px rgba(0, 0, 0, 0.02), 0 4px 4px rgba(0, 0, 0, 0.01)",Z4="9999px",K4="32px",X4="24px",Sk="4px",_k="8px",Q4="1px",E$="2px",dd="#fff",R$="11px",A$="13px",J4="499",O$="20px";var I$=`
.editor-avatar {
position: relative;
display: inline-flex;
align-items: center;
border-radius: ${Z4};
flex-shrink: 0;
box-shadow: 0 0 0 var(--wp-admin-border-width-focus, 2px) ${dd}, ${bk};
}
.editor-avatar__image {
box-sizing: border-box;
position: relative;
width: ${K4};
height: ${K4};
border-radius: ${Z4};
border: 0;
background-color: var(--wp-admin-theme-color, #3858e9);
overflow: hidden;
overflow: clip;
flex-shrink: 0;
font-size: 0;
color: ${dd};
}
.is-small > .editor-avatar__image {
width: ${X4};
height: ${X4};
}
.has-avatar-border-color > .editor-avatar__image {
border: var(--wp-admin-border-width-focus, 2px) solid var(--editor-avatar-outline-color);
background-clip: padding-box;
}
.has-avatar-border-color > .editor-avatar__image::after {
content: "";
position: absolute;
inset: 0;
border-radius: inherit;
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus, 2px) ${dd};
pointer-events: none;
z-index: 1;
}
.editor-avatar__img {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
object-fit: cover;
border-radius: inherit;
opacity: 0;
}
.has-src > .editor-avatar__image > .editor-avatar__img {
opacity: 1;
}
.editor-avatar:not(.has-src) > .editor-avatar__image {
display: flex;
align-items: center;
justify-content: center;
font-size: ${R$};
font-weight: ${J4};
border: 0;
background-clip: border-box;
}
.editor-avatar:not(.has-src) > .editor-avatar__image::after {
content: none;
}
.editor-avatar:not(.has-src).has-avatar-border-color > .editor-avatar__image {
background-color: var(--editor-avatar-outline-color);
}
.editor-avatar__name {
font-size: ${A$};
font-weight: ${J4};
line-height: ${O$};
color: var(--editor-avatar-name-color, ${dd});
min-width: 0;
padding-bottom: 2px; /* $grid-unit-05 / 2 */
overflow: hidden;
opacity: 0;
white-space: nowrap;
transition: opacity 0.15s cubic-bezier(0.15, 0, 0.15, 1);
}
.editor-avatar.is-badge {
display: inline-grid;
grid-template-columns: min-content 0fr;
column-gap: 0;
padding-inline-end: 0;
background-color: var(--wp-admin-theme-color, #3858e9);
transition:
grid-template-columns 0.3s cubic-bezier(0.15, 0, 0.15, 1),
column-gap 0.3s cubic-bezier(0.15, 0, 0.15, 1),
padding-inline-end 0.3s cubic-bezier(0.15, 0, 0.15, 1);
}
.editor-avatar.is-badge:hover {
grid-template-columns: min-content 1fr;
column-gap: ${Sk};
padding-inline-end: ${_k};
transition-timing-function: cubic-bezier(0.85, 0, 0.85, 1);
}
.editor-avatar.is-badge:hover .editor-avatar__name {
opacity: 1;
transition-timing-function: cubic-bezier(0.85, 0, 0.85, 1);
}
.editor-avatar.is-badge.has-avatar-border-color {
background-color: var(--editor-avatar-outline-color);
}
@media (prefers-reduced-motion: reduce) {
.editor-avatar.is-badge,
.editor-avatar__name {
transition: none;
}
}
`;var N$=`
.block-canvas-cover {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
pointer-events: none;
z-index: 20000;
}
.block-canvas-cover .collaborators-overlay-full {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.block-canvas-cover .collaborators-overlay-fixed {
position: fixed;
width: 100%;
height: 100%;
}
.collaborators-overlay-user {
position: absolute;
}
/* Cursor lines render below avatar labels across all users. The parent
.collaborators-overlay-user has no z-index so it does not create a
stacking context \u2014 children participate in the shared overlay context. */
.collaborators-overlay-user-cursor {
position: absolute;
z-index: 0;
width: ${E$};
border-radius: ${Q4};
outline: ${Q4} solid ${dd};
box-shadow: ${bk};
animation: collaborators-overlay-cursor-blink 1s infinite;
}
.collaborators-overlay-selection-rect {
position: absolute;
opacity: 0.15;
pointer-events: none;
border-radius: 2px;
}
/* Overlay-specific positioning applied to the Avatar cursor label. */
.collaborators-overlay-user-label.editor-avatar {
position: absolute;
z-index: 1;
transform: translate(-11px, -100%);
margin-top: -${Sk};
pointer-events: auto;
overflow: visible;
width: max-content;
}
/* Avatar positioned above a highlighted block as a label. */
.collaborators-overlay-block-label.editor-avatar {
position: absolute;
z-index: 1;
transform: translateY(calc(-100% - ${_k}));
pointer-events: auto;
overflow: visible;
width: max-content;
}
@keyframes collaborators-overlay-cursor-blink {
0%, 45% { opacity: 1; }
55%, 95% { opacity: 0; }
100% { opacity: 1; }
}
.collaborators-overlay-cursor-highlighted .collaborators-overlay-user-cursor {
animation: collaborators-overlay-cursor-highlight 0.6s ease-in-out 3;
}
.collaborators-overlay-cursor-highlighted .collaborators-overlay-user-label {
animation: collaborators-overlay-label-highlight 0.6s ease-in-out 3;
}
@keyframes collaborators-overlay-cursor-highlight {
0%, 100% {
transform: scale(1);
filter: drop-shadow(0 0 0 transparent);
}
50% {
transform: scale(1.2);
filter: drop-shadow(0 0 8px currentColor);
}
}
@keyframes collaborators-overlay-label-highlight {
0%, 100% {
transform: translate(-11px, -100%) scale(1);
filter: drop-shadow(0 0 0 transparent);
}
50% {
transform: translate(-11px, -100%) scale(1.1);
filter: drop-shadow(0 0 6px currentColor);
}
}
.block-editor-block-list__block.is-collaborator-selected:not(:focus)::after {
content: "";
position: absolute;
pointer-events: none;
top: 0;
right: 0;
bottom: 0;
left: 0;
outline-color: var(--collaborator-outline-color);
outline-style: solid;
outline-width: calc(var(--wp-admin-border-width-focus) / var(--wp-block-editor-iframe-zoom-out-scale, 1));
outline-offset: calc(-1 * var(--wp-admin-border-width-focus) / var(--wp-block-editor-iframe-zoom-out-scale, 1));
box-shadow: inset 0 0 0 calc((var(--wp-admin-border-width-focus) / var(--wp-block-editor-iframe-zoom-out-scale, 1)) + 0.5px) rgba(${dd}, 0.7);
z-index: 1;
}
@media (prefers-reduced-motion: reduce) {
.collaborators-overlay-user-label,
.collaborators-overlay-user-cursor {
animation: none;
}
}
`;function F$(e,t){let r=null,o=()=>{try{e()}catch{}r=setTimeout(o,t)};return r=setTimeout(o,t),()=>{r&&clearTimeout(r)}}var eN=s(W(),1),Ng=s(D(),1);var Ig=s(D(),1);function wk(e){let[t,r]=(0,Ig.useState)(0),o=(0,Ig.useRef)(null),n=(0,Ig.useCallback)(()=>(o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{r(i=>i+1)},e),()=>{o.current&&clearTimeout(o.current)}),[e]);return[t,n]}var{useActiveCollaborators:gke,useResolvedSelection:vke}=N(eN.privateApis),{SelectionType:yke}=N(eN.privateApis);function D$(e,t,r,o,n){let i=(0,Ng.useRef)(new Set),a=gke(r??null,o??null),l=vke(r??null,o??null),[c,u]=(0,Ng.useState)([]),[d,f]=wk(n);return(0,Ng.useEffect)(()=>{if(!t){u([]);return}let m=i.current,h=new Set,g=a.filter(_=>{let S=_.editorState?.selection?.type===yke.WholeBlock;return!_.isMe&&S}).map(_=>{let S;try{({localClientId:S}=l(_.editorState?.selection))}catch{return null}return S?{blockId:S,color:_.isMe?"var(--wp-admin-theme-color)":ws(_.collaboratorInfo.id),userName:_.collaboratorInfo.name,avatarUrl:Nc(_.collaboratorInfo.avatar_urls)}:null}).filter(_=>!_||h.has(_.blockId)?!1:(h.add(_.blockId),!0)),v=new Set(g.map(_=>_.blockId));for(let _ of m)if(!v.has(_)){let S=$4(t,_);S&&(S.classList.remove("is-collaborator-selected"),S.style.removeProperty("--collaborator-outline-color")),m.delete(_)}let y=[],b=e?.getBoundingClientRect()??null;return g.forEach(_=>{let{color:S,blockId:x,userName:T,avatarUrl:R}=_,F=$4(t,x);if(F&&(F.classList.add("is-collaborator-selected"),F.style.setProperty("--collaborator-outline-color",S),m.add(x),b)){let B=F.getBoundingClientRect();y.push({blockId:x,userName:T,avatarUrl:R,color:S,x:B.left-b.left,y:B.top-b.top})}}),u(y),()=>{for(let _ of m){let S=$4(t,_);S&&(S.classList.remove("is-collaborator-selected"),S.style.removeProperty("--collaborator-outline-color"))}m.clear()}},[a,t,e,d,l]),{highlights:c,rerenderHighlightsAfterDelay:f}}var $4=(e,t)=>e.querySelector(`[data-block="${t}"]`);var rN=s(W(),1),z$=s(O(),1),Pk=s(D(),1),U$=s(lt(),1);var V$=s(W(),1);var bke=500,xk=(e,t,r,o)=>e===null||!t?null:Ske(t,e,r,o)??null,Ske=(e,t,r,o)=>{let{node:n,offset:i}=tN(e,t,r),a=r.createRange();try{a.setStart(n,i)}catch{return null}a.collapse(!0);let l=a.getBoundingClientRect(),c=e.getBoundingClientRect(),u=0,d=0;l.x===0&&l.y===0&&l.width===0&&l.height===0?(u=c.left-o.left,d=c.top-o.top):(u=l.left-o.left,d=l.top-o.top);let f=l.height;if(f===0){let m=r.defaultView??window;f=parseInt(m.getComputedStyle(e).lineHeight,10)||c.height}return{x:u,y:d,height:f}},Ck=(e,t,r,o,n)=>{let i=t,a=r;i>a&&([i,a]=[a,i]);let l=tN(e,i,o),c=tN(e,a,o),u=o.createRange();try{u.setStart(l.node,l.offset),u.setEnd(c.node,c.offset)}catch{return null}let d=u.getClientRects(),f=[];for(let m of d){if(m.width===0&&m.height===0)continue;let h=m.left-n.left,g=m.top-n.top;f.some(y=>y.x===h&&y.y===g&&y.width===m.width&&y.height===m.height)||f.push({x:h,y:g,width:m.width,height:m.height})}return f.length>0?f:null},B$=(e,t,r)=>{let o=t.createRange();o.selectNodeContents(e);let n=o.getClientRects(),i=[];for(let a of n)a.width===0&&a.height===0||i.push({x:a.left-r.left,y:a.top-r.top,width:a.width,height:a.height});if(i.length===0){let a=e.getBoundingClientRect();a.width>0&&a.height>0&&i.push({x:a.left-r.left,y:a.top-r.top,width:a.width,height:a.height})}return i},M$=(e,t,r)=>{let o=r.querySelectorAll("[data-block]"),n=-1,i=-1;for(let l=0;li&&([n,i]=[i,n]);let a=[];for(let l=n+1;l{let o=r.createTreeWalker(e,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT),n=0,i=null,a=null,l=1;for(;a=o.nextNode();){if(l++,l>bke)return i?{node:i,offset:0}:{node:e,offset:0};let c=a.nodeValue?.length??0;if(a.nodeType===Node.ELEMENT_NODE)if(a.nodeName==="BR"){if(n+1>=t){let u=o.nextNode();return u?.nodeType===Node.TEXT_NODE?{node:u,offset:0}:i?{node:i,offset:i.nodeValue?.length??0}:{node:e,offset:0}}n+=1;continue}else continue;if(c!==0){if(n+c>=t)return{node:a,offset:t-n};n+=c,a.nodeType===Node.TEXT_NODE&&(i=a)}}return i&&i.nodeValue?.length?{node:i,offset:i.nodeValue.length}:{node:e,offset:0}},L$=(e,t)=>e.compareDocumentPosition(t)===Node.DOCUMENT_POSITION_FOLLOWING;var{SelectionDirection:_ke,SelectionType:Tk}=N(V$.privateApis);function j$(e,t,r,o){return e.type===Tk.None||e.type===Tk.WholeBlock?{}:e.type===Tk.Cursor?wke(t,o):r?xke(e,t,r,o):{}}function wke(e,t){if(!e.localClientId)return{};let r=t.editorDocument.querySelector(`[data-block="${e.localClientId}"]`);return{coords:xk(e.richTextOffset,r,t.editorDocument,t.overlayRect)}}function xke(e,t,r,o){if(!t.localClientId||!r.localClientId||t.richTextOffset===null||r.richTextOffset===null)return{};let i=e.selectionDirection===_ke.Backward?t:r,a,l=null;if(e.type===Tk.SelectionInOneBlock){let u=Cke(t,r,o);a=u.rects,l=u.blockElement}else{let u=Tke(t,r,o);a=u.rects,l=i.localClientId===u.firstBlockClientId?u.firstBlock:u.lastBlock}if(a.length>0)return{coords:xk(i.richTextOffset,l,o.editorDocument,o.overlayRect),selectionRects:a};let c=o.editorDocument.querySelector(`[data-block="${t.localClientId}"]`);return{coords:xk(t.richTextOffset,c,o.editorDocument,o.overlayRect)}}function Cke(e,t,r){let o=r.editorDocument.querySelector(`[data-block="${e.localClientId}"]`);return!o||e.richTextOffset===null||t.richTextOffset===null?{rects:[],blockElement:null}:{rects:Ck(o,e.richTextOffset,t.richTextOffset,r.editorDocument,r.overlayRect)??[],blockElement:o}}function Tke(e,t,r){let o=e,n=t,i=r.editorDocument.querySelector(`[data-block="${o.localClientId}"]`),a=r.editorDocument.querySelector(`[data-block="${n.localClientId}"]`);if(i&&a&&L$(a,i)&&(o=t,n=e,[i,a]=[a,i]),!i||!a||o.richTextOffset===null||n.richTextOffset===null||!o.localClientId||!n.localClientId)return{rects:[],firstBlock:null,lastBlock:null,firstBlockClientId:null};let l=[],c=Ck(i,o.richTextOffset,Number.MAX_SAFE_INTEGER,r.editorDocument,r.overlayRect);c&&l.push(...c);let u=M$(o.localClientId,n.localClientId,r.editorDocument);for(let f of u){let m=B$(f,r.editorDocument,r.overlayRect);l.push(...m)}let d=Ck(a,0,n.richTextOffset,r.editorDocument,r.overlayRect);return d&&l.push(...d),{rects:l,firstBlock:i,lastBlock:a,firstBlockClientId:o.localClientId}}var{useActiveCollaborators:Pke,useResolvedSelection:kke}=N(rN.privateApis),{SelectionType:Fg}=N(rN.privateApis);function H$(e,t,r,o,n){let i=Pke(r??null,o??null),a=kke(r??null,o??null),l=(0,z$.useSelect)(m=>m(U$.store).get("core","showCollaborationCursor"),[]),[c,u]=(0,Pk.useState)([]),[d,f]=wk(n);return(0,Pk.useEffect)(()=>{if(!e||!t){u([]);return}let m=e.getBoundingClientRect(),h={editorDocument:t,overlayRect:m},g=[],v=i.some(y=>!y.isMe);i.forEach(y=>{if(y.isMe&&(!l||!v))return;let b=y.editorState?.selection??{type:Fg.None},_={richTextOffset:null,localClientId:null},S;if(b.type===Fg.Cursor)try{_=a(b)}catch{return}else if(b.type===Fg.SelectionInOneBlock||b.type===Fg.SelectionInMultipleBlocks)try{_=a({type:Fg.Cursor,cursorPosition:b.cursorStartPosition}),S=a({type:Fg.Cursor,cursorPosition:b.cursorEndPosition})}catch{return}let x=y.collaboratorInfo.name,T=y.clientId,R=y.isMe?"var(--wp-admin-theme-color)":ws(y.collaboratorInfo.id),F=Nc(y.collaboratorInfo.avatar_urls),B=j$(b,_,S,h);if(B.coords){let z={userName:x,clientId:T,color:R,avatarUrl:F,isMe:y.isMe,...B.coords};B.selectionRects&&(z.selectionRects=B.selectionRects),g.push(z)}}),u(g)},[t,a,e,i,l,d]),{cursors:c,rerenderCursorsAfterDelay:f}}var $a=s(C(),1),G$=500,Eke=1e4;function Y$({blockEditorDocument:e,postId:t,postType:r,cursorRegistry:o}){let[n,i]=(0,pa.useState)(null),{cursors:a,rerenderCursorsAfterDelay:l}=H$(n,e??null,t??null,r??null,G$),{highlights:c,rerenderHighlightsAfterDelay:u}=D$(n,e??null,t??null,r??null,G$),d=(0,pa.useCallback)(()=>{l(),u()},[l,u]),f=(0,kk.useResizeObserver)(d);(0,pa.useEffect)(()=>{let v=l(),y=u();return()=>{v(),y()}},[l,u]),(0,pa.useEffect)(()=>{if(a.length!==0)return F$(l,Eke)},[a.length,l]);let m=(0,kk.useMergeRefs)([i,f]),h=(0,pa.useRef)(new Map);(0,pa.useEffect)(()=>{if(!o)return;let v=h.current,y=new Set(a.map(b=>b.clientId));for(let b of v.keys())y.has(b)||(o.unregisterCursor(b),v.delete(b));for(let[b,_]of v.entries())o.registerCursor(b,_);return()=>o.removeAll()},[a,o]);let g=(0,pa.useCallback)(v=>y=>{y?h.current.set(v,y):h.current.delete(v)},[]);return(0,$a.jsxs)("div",{className:"collaborators-overlay-full",ref:m,children:[(0,$a.jsx)("style",{children:I$+N$}),a.map(v=>(0,$a.jsxs)("div",{children:[v.selectionRects?.map((y,b)=>(0,$a.jsx)("div",{className:"collaborators-overlay-selection-rect",style:{left:`${y.x}px`,top:`${y.y}px`,width:`${y.width}px`,height:`${y.height}px`,backgroundColor:v.color}},`${v.clientId}-sel-${b}`)),(0,$a.jsxs)("div",{ref:g(v.clientId),className:"collaborators-overlay-user",style:{left:`${v.x}px`,top:`${v.y}px`},children:[!v.isMe&&(0,$a.jsx)("div",{className:"collaborators-overlay-user-cursor",style:{backgroundColor:v.color,height:`${v.height}px`}}),(0,$a.jsx)(Ic,{className:"collaborators-overlay-user-label",variant:"badge",size:"small",src:v.avatarUrl,name:v.userName,label:v.isMe?(0,W$.__)("You"):void 0,borderColor:v.color})]})]},v.clientId)),c.map(v=>(0,$a.jsx)(Ic,{className:"collaborators-overlay-block-label",variant:"badge",size:"small",src:v.avatarUrl,name:v.userName,borderColor:v.color,style:{left:`${v.x}px`,top:`${v.y}px`}},v.blockId))]})}var oN=s(C(),1),{BlockCanvasCover:Rke}=N(q$.privateApis);function Ek({postId:e,postType:t,cursorRegistry:r}){return(0,oN.jsx)(Rke.Fill,{children:({containerRef:o})=>(0,oN.jsx)(Y$,{blockEditorDocument:o.current?.ownerDocument,postId:e,postType:t,cursorRegistry:r})})}var xs=s(C(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='eee1778bc0']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","eee1778bc0"),e.appendChild(document.createTextNode(".editor-collaborators-presence{align-items:center;background:#f0f0f0;border-radius:4px;display:flex;flex-shrink:0;height:32px;margin-right:8px}.editor-collaborators-presence:has(.is-pressed),.editor-collaborators-presence:hover{background-color:#e0e0e0}.editor-collaborators-presence__button.editor-collaborators-presence__button.components-button{align-items:center;background:#0000;border-radius:4px;box-sizing:border-box;color:#2f2f2f;cursor:pointer;display:flex;height:100%;padding:4px;position:relative}.editor-collaborators-presence__button.editor-collaborators-presence__button.components-button.is-pressed,.editor-collaborators-presence__button.editor-collaborators-presence__button.components-button.is-pressed:hover,.editor-collaborators-presence__button.editor-collaborators-presence__button.components-button:hover{background:#0000;color:#2f2f2f}.editor-collaborators-presence__button.editor-collaborators-presence__button.components-button:focus:not(:active){box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus,2px) var(--wp-admin-theme-color,#007cba);outline:none}")),document.head.appendChild(e)}var{useActiveCollaborators:Ake}=N(K$.privateApis);function X$({postId:e,postType:t}){let r=Ake(e,t),o=r.filter(f=>!f.isMe),n=(0,Dg.useMemo)(()=>[...r].sort((f,m)=>f.isMe&&!m.isMe?-1:!f.isMe&&m.isMe?1:0),[r]),[i]=(0,Dg.useState)(k$),[a,l]=(0,Dg.useState)(!1),[c,u]=(0,Dg.useState)(null);if(o.length===0)return null;let d=r.find(f=>f.isMe);return(0,xs.jsxs)(xs.Fragment,{children:[(0,xs.jsxs)("div",{className:"editor-collaborators-presence",children:[(0,xs.jsx)(Z$.Button,{__next40pxDefaultSize:!0,className:"editor-collaborators-presence__button",onClick:()=>l(!a),isPressed:a,ref:u,"aria-label":(0,Rk.sprintf)((0,Rk.__)("Collaborators list, %d online"),n.length),children:(0,xs.jsxs)(q4,{max:4,children:[d&&(0,xs.jsx)(Ic,{src:Nc(d.collaboratorInfo.avatar_urls),name:d.collaboratorInfo.name,borderColor:"var(--wp-admin-theme-color)",size:"small"},d.clientId),o.map(f=>(0,xs.jsx)(Ic,{src:Nc(f.collaboratorInfo.avatar_urls),name:f.collaboratorInfo.name,borderColor:ws(f.collaboratorInfo.id),size:"small"},f.clientId))]})}),a&&(0,xs.jsx)(P$,{activeCollaborators:n,popoverAnchor:c,setIsPopoverVisible:l,cursorRegistry:i})]}),(0,xs.jsx)(Ek,{postId:e,postType:t,cursorRegistry:i})]})}var Er=s(C(),1);function Oke({customSaveButton:e,forceIsDirty:t,setEntitiesSavedStatesCallback:r}){let o=(0,B0.useViewportMatch)("large"),n=(0,B0.useViewportMatch)("medium"),i=(0,B0.useMediaQuery)("(max-width: 403px)"),{postId:a,postType:l,isTextEditor:c,isPublishSidebarOpened:u,showIconLabels:d,hasFixedToolbar:f,hasBlockSelection:m,hasSectionRootClientId:h,isStylesCanvasActive:g,isAttachment:v}=(0,J$.useSelect)(T=>{let{get:R}=T($$.store),{getEditorMode:F,getCurrentPostType:B,getCurrentPostId:z,isPublishSidebarOpened:L}=T(w),{getStylesPath:M,getShowStylebook:k}=N(T(w)),{getBlockSelectionStart:I,getSectionRootClientId:U}=N(T(Q$.store));return{postId:z(),postType:B(),isTextEditor:F()==="text",isPublishSidebarOpened:L(),showIconLabels:R("core","showIconLabels"),hasFixedToolbar:R("core","fixedToolbar"),hasBlockSelection:!!I(),hasSectionRootClientId:!!U(),isStylesCanvasActive:!!M()?.startsWith("/revisions")||k(),isAttachment:B()===ur&&window?.__experimentalMediaEditor}},[]),y=["post","page","wp_template"].includes(l)&&h,b=[ur,jd,Ur,qi].includes(l)||g,[_,S]=(0,eee.useState)(!0);return(0,Er.jsx)(ak,{toolbar:(0,Er.jsxs)(Er.Fragment,{children:[!v&&(0,Er.jsx)(NJ,{disableBlockTools:g||c}),f&&n&&(0,Er.jsx)(EJ,{isCollapsed:_,onToggle:S})]}),center:!i&&(!f||f&&(!m||_))?(0,Er.jsxs)(Er.Fragment,{children:[(0,Er.jsx)(X$,{postType:l,postId:a}),(0,Er.jsx)(fC,{})]}):void 0,settings:(0,Er.jsxs)(Er.Fragment,{children:[!e&&!u&&(0,Er.jsx)(pP,{forceIsDirty:t}),(0,Er.jsx)(s$,{}),(0,Er.jsx)(d$,{forceIsAutosaveable:t,disabled:b}),(0,Er.jsx)(od,{className:"editor-header__post-preview-button",forceIsAutosaveable:t}),o&&y&&(0,Er.jsx)(g$,{disabled:g}),(o||!d)&&(0,Er.jsx)(zp.Slot,{scope:"core"}),!e&&(0,Er.jsx)($J,{forceIsDirty:t,setEntitiesSavedStatesCallback:r}),e,!v&&(0,Er.jsx)(fk,{})]})})}var tee=Oke;var M0=s(O(),1),Ok=s($(),1),ree=s(he(),1),L0=s(D(),1),oee=s(lt(),1),nee=s(yo(),1);var Ak=s(C(),1),{PrivateInserterLibrary:Ike}=N(Ok.privateApis);function iee(){let{blockSectionRootClientId:e,inserterSidebarToggleRef:t,inserter:r,showMostUsedBlocks:o,sidebarIsOpened:n}=(0,M0.useSelect)(m=>{let{getInserterSidebarToggleRef:h,getInserter:g,isPublishSidebarOpened:v}=N(m(w)),{getBlockRootClientId:y,isZoomOut:b,getSectionRootClientId:_}=N(m(Ok.store)),{get:S}=m(oee.store),{getActiveComplementaryArea:x}=m(Ce),T=()=>{if(b()){let R=_();if(R)return R}return y()};return{inserterSidebarToggleRef:h(),inserter:g(),showMostUsedBlocks:S("core","mostUsedBlocks"),blockSectionRootClientId:T(),sidebarIsOpened:!!(x("core")||v())}},[]),{setIsInserterOpened:i}=(0,M0.useDispatch)(w),{disableComplementaryArea:a}=(0,M0.useDispatch)(Ce),l=(0,ree.useViewportMatch)("medium","<"),c=(0,L0.useRef)(),u=(0,L0.useCallback)(()=>{i(!1),t.current?.focus()},[t,i]),d=(0,L0.useCallback)(m=>{m.keyCode===nee.ESCAPE&&!m.defaultPrevented&&(m.preventDefault(),u())},[u]),f=(0,Ak.jsx)("div",{className:"editor-inserter-sidebar__content",children:(0,Ak.jsx)(Ike,{showMostUsedBlocks:o,showInserterHelpPanel:!0,shouldFocusBlock:l,rootClientId:e??r.rootClientId,__experimentalInsertionIndex:r.insertionIndex,onSelect:r.onSelect,__experimentalInitialTab:r.tab,__experimentalInitialCategory:r.category,__experimentalFilterValue:r.filterValue,onPatternCategorySelection:n?()=>a("core"):void 0,ref:c,onClose:u})});return(0,Ak.jsx)("div",{onKeyDown:d,className:"editor-inserter-sidebar",children:f})}var Nk=s($(),1),Fk=s(he(),1),Dk=s(O(),1),nN=s(xh(),1),ha=s(D(),1),j0=s(E(),1),aee=s(Oi(),1),lee=s(yo(),1);var V0=s(A(),1),Ik=s(E(),1);var Ho=s(C(),1);function see(){return(0,Ho.jsxs)(Ho.Fragment,{children:[(0,Ho.jsxs)("div",{className:"editor-list-view-sidebar__outline",children:[(0,Ho.jsxs)("div",{children:[(0,Ho.jsx)(V0.__experimentalText,{children:(0,Ik.__)("Characters:")}),(0,Ho.jsx)(V0.__experimentalText,{children:(0,Ho.jsx)(wg,{})})]}),(0,Ho.jsxs)("div",{children:[(0,Ho.jsx)(V0.__experimentalText,{children:(0,Ik.__)("Words:")}),(0,Ho.jsx)(Sg,{})]}),(0,Ho.jsxs)("div",{children:[(0,Ho.jsx)(V0.__experimentalText,{children:(0,Ik.__)("Time to read:")}),(0,Ho.jsx)(_g,{})]})]}),(0,Ho.jsx)(Ah,{})]})}var fd=s(C(),1),{TabbedSidebar:Nke}=N(Nk.privateApis);function cee(){let{setIsListViewOpened:e}=(0,Dk.useDispatch)(w),{getListViewToggleRef:t}=N((0,Dk.useSelect)(w)),r=(0,Fk.useFocusOnMount)("firstElement"),o=(0,ha.useCallback)(()=>{e(!1),t().current?.focus()},[t,e]),n=(0,ha.useCallback)(v=>{v.keyCode===lee.ESCAPE&&!v.defaultPrevented&&(v.preventDefault(),o())},[o]),[i,a]=(0,ha.useState)(null),[l,c]=(0,ha.useState)("list-view"),u=(0,ha.useRef)(),d=(0,ha.useRef)(),f=(0,ha.useRef)(),m=(0,Fk.useMergeRefs)([r,f,a]);function h(v){let y=nN.focus.tabbable.find(d.current)[0];if(v==="list-view"){let b=nN.focus.tabbable.find(f.current)[0];(u.current.contains(b)?b:y).focus()}else y.focus()}let g=(0,ha.useCallback)(()=>{u.current.contains(u.current.ownerDocument.activeElement)?o():h(l)},[o,l]);return(0,aee.useShortcut)("core/editor/toggle-list-view",g),(0,fd.jsx)("div",{className:"editor-list-view-sidebar",onKeyDown:n,ref:u,children:(0,fd.jsx)(Nke,{tabs:[{name:"list-view",title:(0,j0._x)("List View","Post overview"),panel:(0,fd.jsx)("div",{className:"editor-list-view-sidebar__list-view-container",children:(0,fd.jsx)("div",{className:"editor-list-view-sidebar__list-view-panel-content",children:(0,fd.jsx)(Nk.__experimentalListView,{dropZoneElement:i})})}),panelRef:m},{name:"outline",title:(0,j0._x)("Outline","Post overview"),panel:(0,fd.jsx)("div",{className:"editor-list-view-sidebar__list-view-container",children:(0,fd.jsx)(see,{})})}],onClose:o,onSelect:v=>c(v),defaultTabId:"list-view",ref:d,closeButtonLabel:(0,j0.__)("Close")})})}var U0=s(O(),1),z0=s(A(),1);var md=s(E(),1);var Bk=s(O(),1),el=s(A(),1),uee=s(W(),1),Fc=s(E(),1),Mk=s(po(),1),dee=s(D(),1);var ga=s(C(),1);function Fke(){let{revisions:e,perPage:t,currentRevisionId:r,revisionKey:o,revisionPage:n,totalRevisions:i}=(0,Bk.useSelect)(_=>{let{getCurrentRevisionId:S,getRevisionPage:x,getPageRevisions:T,getRevisionsPerPage:R}=N(_(w)),F=_(w).getCurrentPostType();if(!F)return{};let z=_(uee.store).getEntityConfig("postType",F)?.revisionKey||"id",L=x();return{revisions:T(L),perPage:R(),currentRevisionId:S(),revisionKey:z,revisionPage:L,totalRevisions:_(w).getCurrentPostRevisionsCount()}},[]),{setCurrentRevisionId:a,setRevisionPage:l}=N((0,Bk.useDispatch)(w)),c=!e,u=Math.ceil(i/t)||1,d=(0,dee.useMemo)(()=>e&&[...e].reverse(),[e]),f=d?.findIndex(_=>_[o]===r),m=_=>{let S=d?.[_];S&&a(S[o])},h=(0,Mk.getSettings)(),g=_=>{let S=d?.[_];return S?(0,Mk.dateI18n)(h.formats.datetime,S.date):_},v=u>1;if(c&&!v)return(0,ga.jsx)(el.Spinner,{});if(!c&&!d?.length)return(0,ga.jsx)("span",{className:"editor-revisions-header__no-revisions",children:(0,Fc.__)("No revisions found.")});if(i<=1)return(0,ga.jsx)("span",{className:"editor-revisions-header__no-revisions",children:(0,Fc.__)("Only one revision found.")});let y=_=>{let S=i-(_-1)*t,x=Math.max(1,S-t+1);return(0,Fc.sprintf)((0,Fc.__)("Revisions %1$s\u2013%2$s"),x,S)},b=c||f===-1?(0,ga.jsx)(el.Spinner,{}):(0,ga.jsx)(el.RangeControl,{__next40pxDefaultSize:!0,"aria-valuetext":g(f),className:"editor-revisions-header__slider",hideLabelFromVision:!0,label:(0,Fc.__)("Revision"),max:d?.length-1,min:0,marks:!0,onChange:m,renderTooltipContent:g,value:f,withInputField:!1});return v?(0,ga.jsxs)(el.__experimentalHStack,{spacing:2,expanded:!0,wrap:!1,children:[(0,ga.jsx)(el.Button,{icon:Nt,label:nl(n+1),disabled:c||n>=u,size:"compact",accessibleWhenDisabled:!0}),(0,ga.jsx)("div",{style:{flex:1,minWidth:0,display:"flex",justifyContent:"center"},children:b}),(0,ga.jsx)(el.Button,{icon:Ft,label:n>1?y(n-1):(0,Fc.__)("No newer revisions"),onClick:()=>l(n-1),disabled:c||n<=1,size:"compact",accessibleWhenDisabled:!0})]}):b}var fee=Fke;var mi={document:"edit-post/document",block:"edit-post/block"};var zi=s(C(),1);function Dke({showDiff:e,onToggleDiff:t}){let{currentRevisionId:r,sidebarIsOpened:o}=(0,U0.useSelect)(d=>({currentRevisionId:N(d(w)).getCurrentRevisionId(),sidebarIsOpened:!!d(Ce).getActiveComplementaryArea("core")}),[]),{setCurrentRevisionId:n,restoreRevision:i}=N((0,U0.useDispatch)(w)),{enableComplementaryArea:a,disableComplementaryArea:l}=(0,U0.useDispatch)(Ce),c=!!r,u=()=>{r&&i(r)};return(0,zi.jsx)(ak,{className:"editor-revisions-header",toolbar:(0,zi.jsx)(z0.Button,{__next40pxDefaultSize:!0,size:"compact",icon:Gd,label:(0,md._x)("Show changes","revisions"),isPressed:e,onClick:t}),center:(0,zi.jsx)(fee,{}),settings:(0,zi.jsxs)(zi.Fragment,{children:[(0,zi.jsx)(od,{className:"editor-header__post-preview-button"}),(0,zi.jsx)(z0.Button,{__next40pxDefaultSize:!0,icon:(0,md.isRTL)()?zd:Ud,label:(0,md._x)("Settings","panel button label"),isPressed:o,"aria-expanded":o,onClick:()=>{o?l("core"):a("core",mi.document)},size:"compact"}),(0,zi.jsx)(z0.Button,{__next40pxDefaultSize:!0,variant:"secondary",size:"compact",onClick:()=>n(null),children:(0,md.__)("Exit")}),(0,zi.jsx)(z0.Button,{__next40pxDefaultSize:!0,accessibleWhenDisabled:!0,variant:"primary",size:"compact",className:"editor-revisions-header__restore-button",disabled:!c,onClick:u,children:(0,md.__)("Restore")}),(0,zi.jsx)(fk,{disabled:!0})]})})}var iN=Dke;var Gee=s(A(),1),Wee=s($(),1),Yee=s(O(),1),qee=s(D(),1),Zee=s(mo(),1);var fn=s($(),1),Cs=s(D(),1),qk=s(O(),1),dN=s(Xe(),1),Fee=s(W(),1),Zk=s(he(),1);var sN=s(O(),1),mee=s(W(),1),Lk=s(D(),1),aN=s(E(),1),pee=s(A(),1);var hee=s(C(),1);function gee({contentRef:e}){let{onNavigateToEntityRecord:t,templateId:r}=(0,sN.useSelect)(a=>{let{getEditorSettings:l,getCurrentTemplateId:c}=a(w);return{onNavigateToEntityRecord:l().onNavigateToEntityRecord,templateId:c()}},[]),o=(0,sN.useSelect)(a=>!!a(mee.store).canUser("create",{kind:"postType",name:"wp_template"}),[]),[n,i]=(0,Lk.useState)(!1);return(0,Lk.useEffect)(()=>{let a=c=>{o&&(!c.target.classList.contains("is-root-container")||c.target.dataset?.type==="core/template-part"||c.defaultPrevented||(c.preventDefault(),i(!0)))},l=e.current;return l?.addEventListener("dblclick",a),()=>{l?.removeEventListener("dblclick",a)}},[e,o]),o?(0,hee.jsx)(pee.__experimentalConfirmDialog,{isOpen:n,confirmButtonText:(0,aN.__)("Edit template"),onConfirm:()=>{i(!1),t({postId:r,postType:"wp_template"})},onCancel:()=>i(!1),size:"medium",children:(0,aN.__)("You\u2019ve tried to select a block that is part of a template that may be used elsewhere on your site. Would you like to edit the template?")}):null}var yee=s(he(),1),Vk=s(O(),1),lN=s($(),1);var Bke=500;function vee(e,t,r){return Math.min(Math.max(e,t),r)}function Mke(e,t,r){let o=e-vee(e,r.left,r.right),n=t-vee(t,r.top,r.bottom);return Math.sqrt(o*o+n*n)}function bee({isEnabled:e=!0}={}){let{getEnabledClientIdsTree:t,getBlockName:r,getBlockOrder:o}=N((0,Vk.useSelect)(lN.store)),{selectBlock:n}=(0,Vk.useDispatch)(lN.store);return(0,yee.useRefEffect)(i=>{if(!e)return;let a=(c,u)=>{let d=t().flatMap(({clientId:h})=>{let g=r(h);if(g==="core/template-part")return[];if(g==="core/post-content"){let v=o(h);if(v.length)return v}return[h]}),f=1/0,m=null;for(let h of d){let g=i.querySelector(`[data-block="${h}"]`);if(!g)continue;let v=g.getBoundingClientRect(),y=Mke(c,u,v);y{(c.target===i||c.target.classList.contains("is-root-container"))&&a(c.clientX,c.clientY)};return i.addEventListener("click",l),()=>i.removeEventListener("click",l)},[e])}var jk=s(O(),1),See=s(he(),1),cN=s($(),1);function _ee(){let{getSettings:e,isZoomOut:t}=N((0,jk.useSelect)(cN.store)),{resetZoomLevel:r}=N((0,jk.useDispatch)(cN.store));return(0,See.useRefEffect)(o=>{function n(i){if(t()&&!i.defaultPrevented){i.preventDefault();let{__experimentalSetIsInserterOpened:a}=e();typeof a=="function"&&a(!1),r()}}return o.addEventListener("dblclick",n),()=>{o.removeEventListener("dblclick",n)}},[e,t,r])}var wee=s(O(),1),xee=s(he(),1),zk=s($(),1),Cee=s(Xe(),1),Lke=':root :where(.editor-styles-wrapper)::after {content: ""; display: block; height: 40vh;}';function Tee(e){let t=(0,wee.useRegistry)(),r=(0,xee.useRefEffect)(o=>{function n(a){if(a.target!==o&&a.target!==o.parentElement)return;let l=o.lastElementChild;if(!l)return;let c=l.getBoundingClientRect();if(a.clientY{i.removeEventListener("pointerdown",n)}},[t]);return e?[r,Lke]:[]}var Uk=s(O(),1),Pee=s(he(),1),uN=s($(),1);function kee(){let{getEditedContentOnlySection:e}=N((0,Uk.useSelect)(uN.store)),{stopEditingContentOnlySection:t}=N((0,Uk.useDispatch)(uN.store));return(0,Pee.useRefEffect)(r=>{function o(n){let i=e();if(!i)return;!n.target.closest(`[data-block="${i}"]`)&&!n.defaultPrevented&&(n.preventDefault(),t())}return r.addEventListener("click",o),()=>{r.removeEventListener("click",o)}},[e,t])}var Hk=s(O(),1),Ree=s(he(),1),Aee=s(Xe(),1),Gk=s(W(),1),Wk=s($(),1),tl=s(A(),1),Oee=s(mo(),1),pd=s(D(),1),ya=s(E(),1);var Bg=s(D(),1);function Eee(e){let[t,r]=(0,Bg.useState)(),o=(0,Bg.useRef)(!1);return(0,Bg.useEffect)(()=>{if(!e)return;if(e.status==="connected"){r(void 0),o.current=!1;return}if(e.status!=="disconnected"||!e.willAutoRetryInMs)return;let{willAutoRetryInMs:n}=e,i=Date.now()+n,a=o.current;o.current=!0,a&&r(0);let l=null,c=()=>{r(Math.ceil((i-Date.now())/1e3)),l=setInterval(()=>{let d=Math.ceil((i-Date.now())/1e3);r(Math.max(0,d)),d<=0&&l&&clearInterval(l)},1e3)},u=a?setTimeout(c,500):null;return u||c(),()=>{u&&clearTimeout(u),l&&clearInterval(l)}},[e]),{onManualRetry:()=>{r(0)},secondsRemaining:t}}var va=s(C(),1),{BlockCanvasCover:Vke}=N(Wk.privateApis),{retrySyncConnection:jke}=N(Gk.privateApis),zke=2e4;function Iee(){let[e,t]=(0,pd.useState)(!1),[r,o]=(0,pd.useState)(!1),[n,i]=(0,pd.useState)(!1),{connectionStatus:a,isCollaborationEnabled:l,postType:c}=(0,Hk.useSelect)(S=>{let{getSyncConnectionStatus:x,getPostType:T}=N(S(Gk.store)),{getCurrentPostType:R,isCollaborationEnabledForCurrentPost:F}=N(S(w)),B=R();return{connectionStatus:x()||null,isCollaborationEnabled:F(),postType:B?T(B):null}},[]),{onManualRetry:u,secondsRemaining:d}=Eee(a),f=(0,Ree.useCopyToClipboard)(()=>{let S=(0,Hk.select)(Wk.store).getBlocks();return(0,Aee.serialize)(S)});(0,pd.useEffect)(()=>{let S=setTimeout(()=>{t(!0)},zke);return()=>clearTimeout(S)},[]),(0,pd.useEffect)(()=>{a?.status!=="connecting"&&i(a!==null&&"canManuallyRetry"in a&&a.canManuallyRetry===!0)},[a]);let m=a&&a.status==="disconnected"&&(a.canManuallyRetry||a.willAutoRetryInMs);if((0,pd.useEffect)(()=>{if(a?.status==="connected"){o(!1);return}a?.status&&a.status!=="connecting"&&(!m||a.backgroundRetriesFailed)&&o(!0)},[a,m]),!l||!e||!r)return null;let h=a&&"error"in a?a?.error:void 0;if(!m&&(0,Oee.applyFilters)("editor.isSyncConnectionErrorHandled",!1,h?.code)!==!1)return null;let g=n?()=>{u(),jke()}:void 0,v=qZ(h),y="",b=!1;d&&d>0?y=(0,ya.sprintf)((0,ya._n)("Retrying connection in %d second\u2026","Retrying connection in %d seconds\u2026",d),d):d===0&&(b=!0,y=(0,ya.__)("Retrying\u2026"));let _="edit.php";return c?.slug&&(_=`edit.php?post_type=${c.slug}`),(0,va.jsx)(Vke.Fill,{children:(0,va.jsx)(tl.Modal,{overlayClassName:"editor-sync-connection-error-modal",isDismissible:!1,onRequestClose:()=>{},shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,size:"medium",title:v.title,children:(0,va.jsxs)(tl.__experimentalVStack,{spacing:6,children:[(0,va.jsx)("p",{children:v.description}),y&&(0,va.jsx)("p",{className:"editor-sync-connection-error-modal__retry-countdown",children:y}),(0,va.jsxs)(tl.__experimentalHStack,{justify:"right",children:[(0,va.jsx)(tl.Button,{__next40pxDefaultSize:!0,href:_,isDestructive:!0,variant:"tertiary",children:(0,ya.sprintf)((0,ya.__)("Back to %s"),c?.labels?.name??(0,ya.__)("Posts"))}),(0,va.jsx)(tl.Button,{__next40pxDefaultSize:!0,ref:f,variant:g?"secondary":"primary",children:(0,ya.__)("Copy Post Content")}),g&&(0,va.jsx)(tl.Button,{__next40pxDefaultSize:!0,accessibleWhenDisabled:!0,"aria-disabled":b,disabled:b,isBusy:b,variant:"primary",onClick:g,children:(0,ya.__)("Retry")})]})]})})})}var Ao=s(C(),1),{LayoutStyle:Yk,useLayoutClasses:Uke,useLayoutStyles:Hke,ExperimentalBlockCanvas:Gke,useFlashEditableBlocks:Wke}=N(fn.privateApis);function fN(e){for(let t=0;t{let{getCurrentPostId:Ve,getCurrentPostType:tt,getCurrentTemplateId:vt,getEditorSettings:le,getRenderingMode:J,getDeviceType:ie,getCanvasMinHeight:ee}=N(ze(w)),{getPostType:se,getEditedEntityRecord:Ue}=ze(Fee.store),ke=tt(),Be=J(),Je;ke===qi?Je="core/block":Be==="post-only"&&(Je="core/post-content");let Fe=le(),Se=Fe.supportsTemplateMode,yt=se(ke),Jr=vt(),bn=Jr?Ue("postType",xt,Jr):void 0;return{renderingMode:Be,postContentAttributes:Fe.postContentAttributes,isDesignPostType:Jc.includes(ke),editedPostTemplate:yt?.viewable&&Se?bn:void 0,wrapperBlockName:Je,wrapperUniqueId:Ve(),deviceType:ie(),isFocusedEntity:!!Fe.onNavigateToPreviousEntityRecord,postType:ke,isPreview:Fe.isPreviewMode,styles:Fe.styles,canvasMinHeight:ee()}},[]),{isCleanNewPost:_}=(0,qk.useSelect)(w),{hasRootPaddingAwareAlignments:S,themeHasDisabledLayoutStyles:x,themeSupportsLayout:T,isZoomedOut:R}=(0,qk.useSelect)(ze=>{let{getSettings:Ve,isZoomOut:tt}=N(ze(fn.store)),vt=Ve();return{themeHasDisabledLayoutStyles:vt.disableLayoutStyles,themeSupportsLayout:vt.supportsLayout,hasRootPaddingAwareAlignments:vt.__experimentalFeatures?.useRootPaddingAwareAlignments,isZoomedOut:tt()}},[]),F=(0,Cs.useRef)(),B=(0,fn.__experimentalUseResizeCanvas)(f),[z]=(0,fn.useSettings)("layout"),L=(0,Cs.useMemo)(()=>a!=="post-only"||h?{type:"default"}:T?{...z,type:"constrained"}:{type:"default"},[a,T,z,h]),M=(0,Cs.useMemo)(()=>{if(!c?.content&&!c?.blocks&&l)return l;if(c?.blocks)return fN(c?.blocks);let ze=typeof c?.content=="string"?c?.content:"";return fN((0,dN.parse)(ze))||{}},[c?.content,c?.blocks,l]),k=(0,Cs.useMemo)(()=>{if(!c?.content&&!c?.blocks)return!1;if(c?.blocks)return Nee(c?.blocks);let ze=typeof c?.content=="string"?c?.content:"";return Nee((0,dN.parse)(ze))||!1},[c?.content,c?.blocks]),{layout:I={},align:U=""}=M||{},G=Uke(M,"core/post-content"),Y=re({"is-layout-flow":!T},T&&G,U&&`align${U}`),Z=Hke(M,"core/post-content",".block-editor-block-list__layout.is-root-container"),V=(0,Cs.useMemo)(()=>I&&(I?.type==="constrained"||I?.inherit||I?.contentSize||I?.wideSize)?{...z,...I,type:"constrained"}:{...z,...I,type:"default"},[I?.type,I?.inherit,I?.contentSize,I?.wideSize,z]),j=l?V:L,H=j?.type==="default"&&!k?L:j,X=(0,fn.__unstableUseTypingObserver)(),ae=(0,Cs.useRef)();(0,Cs.useEffect)(()=>{!e||!_()||ae?.current?.focus()},[e,_]);let ne=`.is-root-container.alignwide { max-width: var(--wp--style--global--wide-size); margin-left: auto; margin-right: auto;}
.is-root-container.alignwide:where(.is-layout-flow) > :not(.alignleft):not(.alignright) { max-width: var(--wp--style--global--wide-size);}
.is-root-container.alignfull { max-width: none; margin-left: auto; margin-right: auto;}
.is-root-container.alignfull:where(.is-layout-flow) > :not(.alignleft):not(.alignright) { max-width: none;}`,ue=[jd,Ur,qi].includes(g)&&!v&&!i&&!R,Ye=(0,Cs.useMemo)(()=>{if(!F.current)return b;let{ownerDocument:ze}=F.current,Ve=ze.documentElement.scrollTop||ze.body.scrollTop;return b+Ve},[b]),[ye,oe]=Tee(!v&&a==="post-only"&&!h),ge=(0,Cs.useMemo)(()=>[...y??[],{css:`:where(.block-editor-iframe__body){display:flow-root;${Ye?`min-height:${Ye}px;`:""}}.is-root-container{display:flow-root;${ue?"min-height:0!important;":""}}
${oe||""}
${ue?".block-editor-iframe__html{background:var(--wp-editor-canvas-background);display:flex;align-items:center;justify-content:center;min-height:100vh;}.block-editor-iframe__body{width:100%;}":""}`}],[y,ue,Ye,oe]),Re=(0,fn.__unstableUseTypewriter)();return o=(0,Zk.useMergeRefs)([F,o,a==="post-only"?Re:null,Wke({isEnabled:a==="template-locked"}),bee({isEnabled:a==="template-locked"}),_ee(),ye,kee()]),(0,Ao.jsxs)("div",{className:re("editor-visual-editor","edit-post-visual-editor",n,{"has-padding":m||ue,"is-resizable":ue,"is-iframed":!t}),children:[(0,Ao.jsx)(Iee,{}),(0,Ao.jsx)(Eh,{enableResizing:ue,height:"100%",children:(0,Ao.jsxs)(Gke,{shouldIframe:!t,contentRef:o,styles:ge,height:"100%",iframeProps:{...r,style:{...r?.style,...B}},children:[T&&!x&&a==="post-only"&&!h&&(0,Ao.jsxs)(Ao.Fragment,{children:[(0,Ao.jsx)(Yk,{selector:".editor-visual-editor__post-title-wrapper",layout:L}),(0,Ao.jsx)(Yk,{selector:".block-editor-block-list__layout.is-root-container",layout:H}),U&&(0,Ao.jsx)(Yk,{css:ne}),Z&&(0,Ao.jsx)(Yk,{layout:V,css:Z})]}),a==="post-only"&&!h&&(0,Ao.jsx)("div",{className:re("editor-visual-editor__post-title-wrapper","edit-post-visual-editor__post-title-wrapper",{"has-global-padding":S}),contentEditable:!1,ref:X,style:{marginTop:"4rem"},children:(0,Ao.jsx)(BP,{ref:ae})}),(0,Ao.jsxs)(fn.RecursionProvider,{blockName:u,uniqueId:d,children:[(0,Ao.jsx)(fn.BlockList,{className:re("is-"+f.toLowerCase()+"-preview",a!=="post-only"||h?"wp-site-blocks":`${Y} wp-block-post-content`,{"has-global-padding":a==="post-only"&&!h&&S}),layout:j,dropZoneElement:t?F.current:F.current?.parentNode,__unstableDisableDropZone:a==="template-locked"}),a==="template-locked"&&(0,Ao.jsx)(gee,{contentRef:F})]})]})})]})}var Kk=Yke;var Mg=s(E(),1),Xk=s(Wy(),1),Dee=[{name:"revision/diff-removed",title:(0,Mg.__)("Removed"),tagName:"del",className:"revision-diff-removed"},{name:"revision/diff-added",title:(0,Mg.__)("Added"),tagName:"ins",className:"revision-diff-added"},{name:"revision/diff-format-added",title:(0,Mg.__)("Format added"),tagName:"span",className:"revision-diff-format-added"},{name:"revision/diff-format-removed",title:(0,Mg.__)("Format removed"),tagName:"span",className:"revision-diff-format-removed"},{name:"revision/diff-format-changed",title:(0,Mg.__)("Format changed"),tagName:"span",className:"revision-diff-format-changed"}];function Bee(){for(let e of Dee)(0,Xk.registerFormatType)(e.name,{...e,attributes:{title:"title"},edit:()=>null})}function Mee(){for(let e of Dee)(0,Xk.unregisterFormatType)(e.name)}var Ui=s(D(),1),Qk=s(he(),1),Vee=s(O(),1),Jk=s($(),1),H0=s(E(),1),jee=s(A(),1);var G0=s(C(),1),{useBlockElementRef:qke}=N(Jk.privateApis);function zee(e){let t=[];for(let r of e)r.__revisionDiffStatus?.status&&t.push({clientId:r.clientId,status:r.__revisionDiffStatus.status}),r.innerBlocks?.length&&t.push(...zee(r.innerBlocks));return t}var Lee={added:(0,H0.__)("Go to added block"),removed:(0,H0.__)("Go to removed block"),modified:(0,H0.__)("Go to modified block")};function mN(e){if(!e)return null;let t=e.ownerDocument,r=t.documentElement.scrollHeight,o=e.getBoundingClientRect(),n=t.documentElement.scrollTop;return{top:(o.top+n)/r*100,height:o.height/r*100}}function Zke({clientId:e,status:t,subscribe:r}){let o=(0,Ui.useRef)();qke(e,o);let[n,i]=(0,Ui.useState)(()=>mN(o.current));return(0,Ui.useEffect)(()=>r(()=>{i(mN(o.current))}),[r]),(0,Ui.useEffect)(()=>{i(mN(o.current))},[t]),n?(0,G0.jsx)(jee.Tooltip,{text:Lee[t],children:(0,G0.jsx)("button",{className:`revision-diff-marker is-${t}`,style:{top:`${n.top}%`,height:`${Math.max(n.height,.5)}%`},onClick:()=>o.current?.focus(),"aria-label":Lee[t]})}):null}function Uee(){let[e,t]=(0,Ui.useState)(!1),r=(0,Ui.useRef)(new Set),o=(0,Vee.useSelect)(l=>l(Jk.store).getBlocks(),[]),n=(0,Ui.useMemo)(()=>zee(o),[o]),i=(0,Ui.useCallback)(l=>(r.current.add(l),()=>r.current.delete(l)),[]),a=(0,Qk.useRefEffect)(l=>{let{ownerDocument:c}=l,{defaultView:u}=c,d=new u.ResizeObserver(()=>{r.current.forEach(f=>f())});return d.observe(c.body),()=>{d.disconnect()}},[]);return[(0,Qk.useMergeRefs)([a,t]),(0,G0.jsx)("div",{className:"revision-diff-markers",role:"navigation","aria-label":(0,H0.__)("Document changes"),children:e&&n.map(({clientId:l,status:c})=>(0,G0.jsx)(Zke,{clientId:l,status:c,subscribe:i},l))},"diff-markers")]}var pi=s(C(),1),{usePrivateStyleOverride:Hee}=N(Wee.privateApis),Kke=`
`,Xke=`
.is-revision-added {
box-shadow: inset 0 0 0 9999px color-mix(in srgb, currentColor 5%, #00a32a 15%), 0 0 0 4px color-mix(in srgb, currentColor 5%, #00a32a 15%);
}
.is-revision-removed,
.revision-diff-removed {
text-decoration: line-through;
filter: url(#revision-removed-filter);
}
.is-revision-modified {
outline: 2px solid color-mix(in srgb, currentColor 30%, #dba617 70%) !important;
outline-offset: 2px;
}
.revision-diff-added {
background-color: color-mix(in srgb, currentColor 5%, #00a32a 15%);
text-decoration: none;
}
.revision-diff-format-added {
text-decoration: underline wavy color-mix(in srgb, currentColor 30%, #00a32a 70%);
text-decoration-thickness: 2px;
}
.revision-diff-format-removed {
text-decoration: underline wavy color-mix(in srgb, currentColor 20%, #d63638 80%);
text-decoration-thickness: 2px;
}
.revision-diff-format-changed {
text-decoration: underline wavy color-mix(in srgb, currentColor 30%, #dba617 70%);
text-decoration-thickness: 2px;
}
`;function Qke(e){return t=>{let{block:r,className:o}=t,n=r?.__revisionDiffStatus?.status,i=re(o,{"is-revision-added":n==="added","is-revision-removed":n==="removed","is-revision-modified":n==="modified"});return(0,pi.jsx)(e,{...t,className:i})}}var Jke="editor/revisions-canvas/withRevisionDiffClasses";(0,Zee.addFilter)("editor.BlockListBlock",Jke,Qke);function $ke({showDiff:e}){return Hee({css:e?Xke:""}),Hee({assets:e?Kke:"",__unstableType:"svgs"}),null}function e2e({showDiff:e}){let[t,r]=Uee();return(0,pi.jsxs)(pi.Fragment,{children:[(0,pi.jsx)(Kk,{contentRef:t}),e&&r]})}function pN(){(0,qee.useEffect)(()=>(Bee(),()=>{Mee()}),[]);let{revision:e,showDiff:t}=(0,Yee.useSelect)(r=>{let{getCurrentRevision:o,isShowingRevisionDiff:n}=N(r(w));return{revision:o(),showDiff:n()}},[]);return e?(0,pi.jsxs)(pi.Fragment,{children:[(0,pi.jsx)($ke,{showDiff:t}),(0,pi.jsx)("div",{className:"editor-revisions-canvas__content",children:(0,pi.jsx)(e2e,{showDiff:t})})]}):(0,pi.jsx)("div",{className:"editor-revisions-canvas__loading",children:(0,pi.jsx)(Gee.Spinner,{})})}var e2=s(O(),1),$k=s(D(),1),Ts=s(E(),1),Kee=s(ct(),1),Xee=s(W(),1),Qee=s(lt(),1);var{useOnCollaboratorJoin:t2e,useOnCollaboratorLeave:r2e,useOnPostSave:o2e}=N(Xee.privateApis),hN={COLLAB_POST_UPDATED:"collab-post-updated",COLLAB_USER_ENTERED:"collab-user-entered",COLLAB_USER_EXITED:"collab-user-exited"},gN=["publish","private","future"];function n2e(e,t,r){return r?(0,Ts.sprintf)((0,Ts.__)("Post published by %s."),e):gN.includes(t)?(0,Ts.sprintf)((0,Ts.__)("Post updated by %s."),e):(0,Ts.sprintf)((0,Ts.__)("Draft saved by %s."),e)}function Jee(e,t){let{postStatus:r,isCollaborationEnabled:o,showNotifications:n}=(0,e2.useSelect)(u=>{let{getCurrentPostAttribute:d,isCollaborationEnabledForCurrentPost:f}=N(u(w));return{postStatus:d("status"),isCollaborationEnabled:f(),showNotifications:u(Qee.store).get("core","showCollaborationNotifications")??!0}},[]),{createNotice:i}=(0,e2.useDispatch)(Kee.store),a=o&&n,l=a?e:null,c=a?t:null;t2e(l,c,(0,$k.useCallback)((u,d)=>{d&&u.collaboratorInfo.enteredAt{i("info",(0,Ts.sprintf)((0,Ts.__)("%s has left the post."),u.collaboratorInfo.name),{id:`${hN.COLLAB_USER_EXITED}-${u.collaboratorInfo.id}`,type:"snackbar",isDismissible:!1})},[i])),o2e(l,c,(0,$k.useCallback)((u,d,f)=>{if(!r)return;let m=u.postStatus??r??"draft",h=f?.postStatus??r,g=!(h&&gN.includes(h))&&gN.includes(m),v=n2e(d.collaboratorInfo.name,m,g);i("info",v,{id:`${hN.COLLAB_POST_UPDATED}-${d.collaboratorInfo.id}`,type:"snackbar",isDismissible:!1})},[i,r]))}var t2=s(O(),1),W0=s(A(),1),vN=s(E(),1),$ee=s(D(),1);var Ps=s(C(),1),{Fill:ilt,Slot:i2e}=(0,W0.createSlotFill)("ActionsPanel");function ete({setEntitiesSavedStatesCallback:e,closeEntitiesSavedStates:t,isEntitiesSavedStatesOpen:r,forceIsDirtyPublishPanel:o}){let{closePublishSidebar:n,togglePublishSidebar:i}=(0,t2.useDispatch)(w),{publishSidebarOpened:a,isPublishable:l,isDirty:c,hasOtherEntitiesChanges:u}=(0,t2.useSelect)(m=>{let{isPublishSidebarOpened:h,isEditedPostPublishable:g,isCurrentPostPublished:v,isEditedPostDirty:y,hasNonPostEntityChanges:b}=m(w),_=b();return{publishSidebarOpened:h(),isPublishable:!v()&&g(),isDirty:_||y(),hasOtherEntitiesChanges:_}},[]),d=(0,$ee.useCallback)(()=>e(!0),[]),f;return a?f=(0,Ps.jsx)(oP,{onClose:n,forceIsDirty:o,PrePublishExtension:XC.Slot,PostPublishExtension:YC.Slot}):l&&!u?f=(0,Ps.jsx)("div",{className:"editor-layout__toggle-publish-panel",children:(0,Ps.jsx)(W0.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:i,"aria-expanded":!1,children:(0,vN.__)("Open publish panel")})}):f=(0,Ps.jsx)("div",{className:"editor-layout__toggle-entities-saved-states-panel",children:(0,Ps.jsx)(W0.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:d,"aria-expanded":!1,"aria-haspopup":"dialog",disabled:!c,accessibleWhenDisabled:!0,children:(0,vN.__)("Open save panel")})}),(0,Ps.jsxs)(Ps.Fragment,{children:[r&&(0,Ps.jsx)(RC,{close:t,renderDialog:!0}),(0,Ps.jsx)(i2e,{bubblesVirtually:!0}),!r&&f]})}var tte=s(A(),1),r2=s(O(),1),yN=s(E(),1),rte=s(Oi(),1),o2=s(D(),1);var Dc=s(C(),1);function ote({autoFocus:e=!1}){let{switchEditorMode:t}=(0,r2.useDispatch)(w),{shortcut:r,isRichEditingEnabled:o}=(0,r2.useSelect)(i=>{let{getEditorSettings:a}=i(w),{getShortcutRepresentation:l}=i(rte.store);return{shortcut:l("core/editor/toggle-mode"),isRichEditingEnabled:a().richEditingEnabled}},[]),n=(0,o2.useRef)();return(0,o2.useEffect)(()=>{e||n?.current?.focus()},[e]),(0,Dc.jsxs)("div",{className:"editor-text-editor",children:[o&&(0,Dc.jsxs)("div",{className:"editor-text-editor__toolbar",children:[(0,Dc.jsx)("h2",{children:(0,yN.__)("Editing code")}),(0,Dc.jsx)(tte.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>t("visual"),shortcut:r,children:(0,yN.__)("Exit code editor")})]}),(0,Dc.jsxs)("div",{className:"editor-text-editor__body",children:[(0,Dc.jsx)(LP,{ref:n}),(0,Dc.jsx)(w0,{})]})]})}var n2=s(D(),1),nte=s(C(),1),ite=(0,n2.createContext)(void 0);function Y0({value:e,onChange:t,settings:r={},children:o}){let n={media:e,onChange:t,fields:r.fields||[]};return(0,nte.jsx)(ite.Provider,{value:n,children:o})}function i2(){let e=(0,n2.useContext)(ite);if(!e)throw new Error("useMediaEditorContext must be used within MediaEditorProvider");return e}var ste=s(A(),1),ate=s(D(),1),s2=s(E(),1);function bN(e){return e?e.startsWith("image/")?{type:"image"}:e.startsWith("video/")?{type:"video"}:e.startsWith("audio/")?{type:"audio"}:{type:"application"}:{type:"application"}}var Oo=s(C(),1);function s2e({mediaType:e,mediaUrl:t,altText:r,displayTitle:o,mimeType:n,onLoad:i,onError:a,loadingState:l}){switch(e.type){case"image":return(0,Oo.jsx)("img",{className:l==="loaded"?"loaded":"",src:t,alt:r||"",onLoad:i,onError:a});case"video":return(0,Oo.jsx)("video",{src:t,controls:!0,onError:a,children:o});case"audio":return(0,Oo.jsx)("audio",{src:t,controls:!0,onError:a,children:o});default:return(0,Oo.jsxs)("div",{className:"media-editor-preview__file-info",children:[(0,Oo.jsx)("p",{className:"media-editor-preview__file-name",children:o}),(0,Oo.jsx)("p",{className:"media-editor-preview__mime-type",children:n}),(0,Oo.jsx)("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:"media-editor-preview__download-link",children:(0,s2.__)("View file")})]})}}function SN(e){let[t,r]=(0,ate.useState)("loading"),{media:o}=i2(),{source_url:n,mime_type:i,alt_text:a,title:l}=o||{},c=bN(i);if(!n)return(0,Oo.jsx)("div",{className:"media-editor-preview media-editor-preview--empty",children:(0,Oo.jsx)("p",{children:(0,s2.__)("No media file available.")})});if(t==="error")return(0,Oo.jsxs)("div",{className:"media-editor-preview media-editor-preview--error",children:[(0,Oo.jsx)("p",{children:(0,s2.__)("Failed to load media file.")}),(0,Oo.jsx)("p",{className:"media-editor-preview__url",children:n})]});let u=typeof l=="string"?l:l?.rendered||l?.raw;return(0,Oo.jsxs)("div",{...e,className:`media-editor-preview media-editor-preview--${c.type}`,children:[c.type==="image"&&t==="loading"&&(0,Oo.jsx)("div",{className:"media-editor-preview__spinner",children:(0,Oo.jsx)(ste.Spinner,{})}),(0,Oo.jsx)(s2e,{mediaType:c,mediaUrl:n,altText:a,displayTitle:u,mimeType:i,onLoad:()=>r("loaded"),onError:()=>r("error"),loadingState:t})]})}var _N=s(E(),1);var nr="isAny",ir="isNone",mn="isAll",pn="isNotAll",Vn="between",jn="inThePast",hi="over",yr="is",br="isNot",hd="lessThan",gd="greaterThan",vd="lessThanOrEqual",yd="greaterThanOrEqual",bd="before",Sd="after",_d="beforeInc",wd="afterInc",rl="contains",ol="notContains",nl="startsWith",xd="on",Cd="notOn";var ylt={asc:(0,_N.__)("Sort ascending"),desc:(0,_N.__)("Sort descending")};var lte=s(qv(),1),{lock:Slt,unlock:Wt}=(0,lte.__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/dataviews");var q0=s(D(),1),a2e=[];function gi({elements:e,getElements:t}){let r=Array.isArray(e)&&e.length>0?e:a2e,[o,n]=(0,q0.useState)(r),[i,a]=(0,q0.useState)(!1);return(0,q0.useEffect)(()=>{if(!t){n(r);return}let l=!1;return a(!0),t().then(c=>{if(!l){let u=Array.isArray(c)&&c.length>0?c:r;n(u)}}).catch(()=>{l||n(r)}).finally(()=>{l||a(!1)}),()=>{l=!0}},[t,r]),{elements:o,isLoading:i}}var l2e=Math.pow(10,8)*24*60*60*1e3,xlt=-l2e,a2=6048e5,cte=864e5;var c2e=3600;var ute=c2e*24,Clt=ute*7,u2e=ute*365.2425,d2e=u2e/12,Tlt=d2e*3,wN=Symbol.for("constructDateFrom");function lo(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&wN in e?e[wN](t):e instanceof Date?new e.constructor(t):new Date(t)}function At(e,t){return lo(t||e,e)}function l2(e,t,r){let o=At(e,r?.in);return isNaN(t)?lo(r?.in||e,NaN):(t&&o.setDate(o.getDate()+t),o)}function c2(e,t,r){let o=At(e,r?.in);if(isNaN(t))return lo(r?.in||e,NaN);if(!t)return o;let n=o.getDate(),i=lo(r?.in||e,o.getTime());i.setMonth(o.getMonth()+t+1,0);let a=i.getDate();return n>=a?i:(o.setFullYear(i.getFullYear(),i.getMonth(),n),o)}var f2e={};function Td(){return f2e}function Bc(e,t){let r=Td(),o=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,n=At(e,t?.in),i=n.getDay(),a=(i=i.getTime()?o+1:r.getTime()>=l.getTime()?o:o-1}function xN(e){let t=At(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function dte(e,...t){let r=lo.bind(null,e||t.find(o=>typeof o=="object"));return t.map(r)}function CN(e,t){let r=At(e,t?.in);return r.setHours(0,0,0,0),r}function fte(e,t,r){let[o,n]=dte(r?.in,e,t),i=CN(o),a=CN(n),l=+i-xN(i),c=+a-xN(a);return Math.round((l-c)/cte)}function mte(e,t){let r=u2(e,t),o=lo(t?.in||e,0);return o.setFullYear(r,0,4),o.setHours(0,0,0,0),km(o)}function pte(e,t,r){return l2(e,t*7,r)}function hte(e,t,r){return c2(e,t*12,r)}function gte(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Lg(e){return!(!gte(e)&&typeof e!="number"||isNaN(+At(e)))}function vte(e,t){let r=At(e,t?.in);return r.setDate(1),r.setHours(0,0,0,0),r}function d2(e,t){let r=At(e,t?.in);return r.setFullYear(r.getFullYear(),0,1),r.setHours(0,0,0,0),r}var m2e={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},yte=(e,t,r)=>{let o,n=m2e[e];return typeof n=="string"?o=n:t===1?o=n.one:o=n.other.replace("{{count}}",t.toString()),r?.addSuffix?r.comparison&&r.comparison>0?"in "+o:o+" ago":o};function f2(e){return(t={})=>{let r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}var p2e={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},h2e={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},g2e={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},bte={date:f2({formats:p2e,defaultWidth:"full"}),time:f2({formats:h2e,defaultWidth:"full"}),dateTime:f2({formats:g2e,defaultWidth:"full"})};var v2e={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Ste=(e,t,r,o)=>v2e[e];function Vg(e){return(t,r)=>{let o=r?.context?String(r.context):"standalone",n;if(o==="formatting"&&e.formattingValues){let a=e.defaultFormattingWidth||e.defaultWidth,l=r?.width?String(r.width):a;n=e.formattingValues[l]||e.formattingValues[a]}else{let a=e.defaultWidth,l=r?.width?String(r.width):e.defaultWidth;n=e.values[l]||e.values[a]}let i=e.argumentCallback?e.argumentCallback(t):t;return n[i]}}var y2e={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},b2e={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},S2e={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},_2e={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},w2e={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},x2e={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},C2e=(e,t)=>{let r=Number(e),o=r%100;if(o>20||o<10)switch(o%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},_te={ordinalNumber:C2e,era:Vg({values:y2e,defaultWidth:"wide"}),quarter:Vg({values:b2e,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Vg({values:S2e,defaultWidth:"wide"}),day:Vg({values:_2e,defaultWidth:"wide"}),dayPeriod:Vg({values:w2e,defaultWidth:"wide",formattingValues:x2e,defaultFormattingWidth:"wide"})};function jg(e){return(t,r={})=>{let o=r.width,n=o&&e.matchPatterns[o]||e.matchPatterns[e.defaultMatchWidth],i=t.match(n);if(!i)return null;let a=i[0],l=o&&e.parsePatterns[o]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?P2e(l,f=>f.test(a)):T2e(l,f=>f.test(a)),u;u=e.valueCallback?e.valueCallback(c):c,u=r.valueCallback?r.valueCallback(u):u;let d=t.slice(a.length);return{value:u,rest:d}}}function T2e(e,t){for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function P2e(e,t){for(let r=0;r{let o=t.match(e.matchPattern);if(!o)return null;let n=o[0],i=t.match(e.parsePattern);if(!i)return null;let a=e.valueCallback?e.valueCallback(i[0]):i[0];a=r.valueCallback?r.valueCallback(a):a;let l=t.slice(n.length);return{value:a,rest:l}}}var k2e=/^(\d+)(th|st|nd|rd)?/i,E2e=/\d+/i,R2e={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},A2e={any:[/^b/i,/^(a|c)/i]},O2e={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},I2e={any:[/1/i,/2/i,/3/i,/4/i]},N2e={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},F2e={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},D2e={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},B2e={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},M2e={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},L2e={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},xte={ordinalNumber:wte({matchPattern:k2e,parsePattern:E2e,valueCallback:e=>parseInt(e,10)}),era:jg({matchPatterns:R2e,defaultMatchWidth:"wide",parsePatterns:A2e,defaultParseWidth:"any"}),quarter:jg({matchPatterns:O2e,defaultMatchWidth:"wide",parsePatterns:I2e,defaultParseWidth:"any",valueCallback:e=>e+1}),month:jg({matchPatterns:N2e,defaultMatchWidth:"wide",parsePatterns:F2e,defaultParseWidth:"any"}),day:jg({matchPatterns:D2e,defaultMatchWidth:"wide",parsePatterns:B2e,defaultParseWidth:"any"}),dayPeriod:jg({matchPatterns:M2e,defaultMatchWidth:"any",parsePatterns:L2e,defaultParseWidth:"any"})};var TN={code:"en-US",formatDistance:yte,formatLong:bte,formatRelative:Ste,localize:_te,match:xte,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Cte(e,t){let r=At(e,t?.in);return fte(r,d2(r))+1}function Tte(e,t){let r=At(e,t?.in),o=+km(r)-+mte(r);return Math.round(o/a2)+1}function m2(e,t){let r=At(e,t?.in),o=r.getFullYear(),n=Td(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,a=lo(t?.in||e,0);a.setFullYear(o+1,0,i),a.setHours(0,0,0,0);let l=Bc(a,t),c=lo(t?.in||e,0);c.setFullYear(o,0,i),c.setHours(0,0,0,0);let u=Bc(c,t);return+r>=+l?o+1:+r>=+u?o:o-1}function Pte(e,t){let r=Td(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,n=m2(e,t),i=lo(t?.in||e,0);return i.setFullYear(n,0,o),i.setHours(0,0,0,0),Bc(i,t)}function kte(e,t){let r=At(e,t?.in),o=+Bc(r,t)-+Pte(r,t);return Math.round(o/a2)+1}function wt(e,t){let r=e<0?"-":"",o=Math.abs(e).toString().padStart(t,"0");return r+o}var Mc={y(e,t){let r=e.getFullYear(),o=r>0?r:1-r;return wt(t==="yy"?o%100:o,t.length)},M(e,t){let r=e.getMonth();return t==="M"?String(r+1):wt(r+1,2)},d(e,t){return wt(e.getDate(),t.length)},a(e,t){let r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];default:return r==="am"?"a.m.":"p.m."}},h(e,t){return wt(e.getHours()%12||12,t.length)},H(e,t){return wt(e.getHours(),t.length)},m(e,t){return wt(e.getMinutes(),t.length)},s(e,t){return wt(e.getSeconds(),t.length)},S(e,t){let r=t.length,o=e.getMilliseconds(),n=Math.trunc(o*Math.pow(10,r-3));return wt(n,t.length)}};var zg={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},PN={G:function(e,t,r){let o=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(o,{width:"abbreviated"});case"GGGGG":return r.era(o,{width:"narrow"});default:return r.era(o,{width:"wide"})}},y:function(e,t,r){if(t==="yo"){let o=e.getFullYear(),n=o>0?o:1-o;return r.ordinalNumber(n,{unit:"year"})}return Mc.y(e,t)},Y:function(e,t,r,o){let n=m2(e,o),i=n>0?n:1-n;if(t==="YY"){let a=i%100;return wt(a,2)}return t==="Yo"?r.ordinalNumber(i,{unit:"year"}):wt(i,t.length)},R:function(e,t){let r=u2(e);return wt(r,t.length)},u:function(e,t){let r=e.getFullYear();return wt(r,t.length)},Q:function(e,t,r){let o=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(o);case"QQ":return wt(o,2);case"Qo":return r.ordinalNumber(o,{unit:"quarter"});case"QQQ":return r.quarter(o,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(o,{width:"narrow",context:"formatting"});default:return r.quarter(o,{width:"wide",context:"formatting"})}},q:function(e,t,r){let o=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(o);case"qq":return wt(o,2);case"qo":return r.ordinalNumber(o,{unit:"quarter"});case"qqq":return r.quarter(o,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(o,{width:"narrow",context:"standalone"});default:return r.quarter(o,{width:"wide",context:"standalone"})}},M:function(e,t,r){let o=e.getMonth();switch(t){case"M":case"MM":return Mc.M(e,t);case"Mo":return r.ordinalNumber(o+1,{unit:"month"});case"MMM":return r.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(o,{width:"narrow",context:"formatting"});default:return r.month(o,{width:"wide",context:"formatting"})}},L:function(e,t,r){let o=e.getMonth();switch(t){case"L":return String(o+1);case"LL":return wt(o+1,2);case"Lo":return r.ordinalNumber(o+1,{unit:"month"});case"LLL":return r.month(o,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(o,{width:"narrow",context:"standalone"});default:return r.month(o,{width:"wide",context:"standalone"})}},w:function(e,t,r,o){let n=kte(e,o);return t==="wo"?r.ordinalNumber(n,{unit:"week"}):wt(n,t.length)},I:function(e,t,r){let o=Tte(e);return t==="Io"?r.ordinalNumber(o,{unit:"week"}):wt(o,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getDate(),{unit:"date"}):Mc.d(e,t)},D:function(e,t,r){let o=Cte(e);return t==="Do"?r.ordinalNumber(o,{unit:"dayOfYear"}):wt(o,t.length)},E:function(e,t,r){let o=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(o,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(o,{width:"short",context:"formatting"});default:return r.day(o,{width:"wide",context:"formatting"})}},e:function(e,t,r,o){let n=e.getDay(),i=(n-o.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return wt(i,2);case"eo":return r.ordinalNumber(i,{unit:"day"});case"eee":return r.day(n,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},c:function(e,t,r,o){let n=e.getDay(),i=(n-o.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return wt(i,t.length);case"co":return r.ordinalNumber(i,{unit:"day"});case"ccc":return r.day(n,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(n,{width:"narrow",context:"standalone"});case"cccccc":return r.day(n,{width:"short",context:"standalone"});default:return r.day(n,{width:"wide",context:"standalone"})}},i:function(e,t,r){let o=e.getDay(),n=o===0?7:o;switch(t){case"i":return String(n);case"ii":return wt(n,t.length);case"io":return r.ordinalNumber(n,{unit:"day"});case"iii":return r.day(o,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(o,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(o,{width:"short",context:"formatting"});default:return r.day(o,{width:"wide",context:"formatting"})}},a:function(e,t,r){let n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(e,t,r){let o=e.getHours(),n;switch(o===12?n=zg.noon:o===0?n=zg.midnight:n=o/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(e,t,r){let o=e.getHours(),n;switch(o>=17?n=zg.evening:o>=12?n=zg.afternoon:o>=4?n=zg.morning:n=zg.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},h:function(e,t,r){if(t==="ho"){let o=e.getHours()%12;return o===0&&(o=12),r.ordinalNumber(o,{unit:"hour"})}return Mc.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getHours(),{unit:"hour"}):Mc.H(e,t)},K:function(e,t,r){let o=e.getHours()%12;return t==="Ko"?r.ordinalNumber(o,{unit:"hour"}):wt(o,t.length)},k:function(e,t,r){let o=e.getHours();return o===0&&(o=24),t==="ko"?r.ordinalNumber(o,{unit:"hour"}):wt(o,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):Mc.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getSeconds(),{unit:"second"}):Mc.s(e,t)},S:function(e,t){return Mc.S(e,t)},X:function(e,t,r){let o=e.getTimezoneOffset();if(o===0)return"Z";switch(t){case"X":return Rte(o);case"XXXX":case"XX":return Em(o);default:return Em(o,":")}},x:function(e,t,r){let o=e.getTimezoneOffset();switch(t){case"x":return Rte(o);case"xxxx":case"xx":return Em(o);default:return Em(o,":")}},O:function(e,t,r){let o=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Ete(o,":");default:return"GMT"+Em(o,":")}},z:function(e,t,r){let o=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Ete(o,":");default:return"GMT"+Em(o,":")}},t:function(e,t,r){let o=Math.trunc(+e/1e3);return wt(o,t.length)},T:function(e,t,r){return wt(+e,t.length)}};function Ete(e,t=""){let r=e>0?"-":"+",o=Math.abs(e),n=Math.trunc(o/60),i=o%60;return i===0?r+String(n):r+String(n)+t+wt(i,2)}function Rte(e,t){return e%60===0?(e>0?"-":"+")+wt(Math.abs(e)/60,2):Em(e,t)}function Em(e,t=""){let r=e>0?"-":"+",o=Math.abs(e),n=wt(Math.trunc(o/60),2),i=wt(o%60,2);return r+n+t+i}var Ate=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},Ote=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},V2e=(e,t)=>{let r=e.match(/(P+)(p+)?/)||[],o=r[1],n=r[2];if(!n)return Ate(e,t);let i;switch(o){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",Ate(o,t)).replace("{{time}}",Ote(n,t))},Ite={p:Ote,P:V2e};var j2e=/^D+$/,z2e=/^Y+$/,U2e=["D","DD","YY","YYYY"];function Nte(e){return j2e.test(e)}function Fte(e){return z2e.test(e)}function Dte(e,t,r){let o=H2e(e,t,r);if(console.warn(o),U2e.includes(e))throw new RangeError(o)}function H2e(e,t,r){let o=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${o} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}var G2e=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,W2e=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Y2e=/^'([^]*?)'?$/,q2e=/''/g,Z2e=/[a-zA-Z]/;function kN(e,t,r){let o=Td(),n=r?.locale??o.locale??TN,i=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,a=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??o.weekStartsOn??o.locale?.options?.weekStartsOn??0,l=At(e,r?.in);if(!Lg(l))throw new RangeError("Invalid time value");let c=t.match(W2e).map(d=>{let f=d[0];if(f==="p"||f==="P"){let m=Ite[f];return m(d,n.formatLong)}return d}).join("").match(G2e).map(d=>{if(d==="''")return{isToken:!1,value:"'"};let f=d[0];if(f==="'")return{isToken:!1,value:K2e(d)};if(PN[f])return{isToken:!0,value:d};if(f.match(Z2e))throw new RangeError("Format string contains an unescaped latin alphabet character `"+f+"`");return{isToken:!1,value:d}});n.localize.preprocessor&&(c=n.localize.preprocessor(l,c));let u={firstWeekContainsDate:i,weekStartsOn:a,locale:n};return c.map(d=>{if(!d.isToken)return d.value;let f=d.value;(!r?.useAdditionalWeekYearTokens&&Fte(f)||!r?.useAdditionalDayOfYearTokens&&Nte(f))&&Dte(f,t,String(e));let m=PN[f[0]];return m(l,f,n.localize,u)}).join("")}function K2e(e){let t=e.match(Y2e);return t?t[1].replace(q2e,"'"):e}function Rm(e,t,r){return l2(e,-t,r)}function p2(e,t,r){return c2(e,-t,r)}function Bte(e,t,r){return pte(e,-t,r)}function h2(e,t,r){return hte(e,-t,r)}var _e=s(E(),1),Rr=s(D(),1),zn=s(po(),1);var EN=s(C(),1),Lr={Name:(0,EN.jsx)("span",{className:"dataviews-filters__summary-filter-text-name"}),Value:(0,EN.jsx)("span",{className:"dataviews-filters__summary-filter-text-value"})};function Mte(e,t){switch(t){case"days":return Rm(new Date,e);case"weeks":return Bte(new Date,e);case"months":return p2(new Date,e);case"years":return h2(new Date,e);default:return new Date}}var Lte={label:(0,_e.__)("Is none of"),filterText:(e,t)=>(0,Rr.createInterpolateElement)((0,_e.sprintf)((0,_e.__)("%1$s is none of: %2$s"),e.name,t.map(r=>r.label).join(", ")),Lr),filter:((e,t,r)=>{if(!r?.length)return!0;let o=t.getValue({item:e});return Array.isArray(o)?!r.some(n=>o.includes(n)):typeof o=="string"?!r.includes(o):!1}),selection:"multi"},Vte=[{name:nr,label:(0,_e.__)("Includes"),filterText:(e,t)=>(0,Rr.createInterpolateElement)((0,_e.sprintf)((0,_e.__)("%1$s includes: %2$s"),e.name,t.map(r=>r.label).join(", ")),Lr),filter(e,t,r){if(!r?.length)return!0;let o=t.getValue({item:e});return Array.isArray(o)?r.some(n=>o.includes(n)):typeof o=="string"?r.includes(o):!1},selection:"multi"},{name:ir,...Lte},{name:mn,label:(0,_e.__)("Includes all"),filterText:(e,t)=>(0,Rr.createInterpolateElement)((0,_e.sprintf)((0,_e.__)("%1$s includes all: %2$s"),e.name,t.map(r=>r.label).join(", ")),Lr),filter(e,t,r){return r?.length?r.every(o=>t.getValue({item:e})?.includes(o)):!0},selection:"multi"},{name:pn,...Lte},{name:Vn,label:(0,_e.__)("Between (inc)"),filterText:(e,t)=>(0,Rr.createInterpolateElement)((0,_e.sprintf)((0,_e.__)("%1$s between (inc): %2$s and %3$s"),e.name,t[0].label[0],t[0].label[1]),Lr),filter(e,t,r){if(!Array.isArray(r)||r.length!==2||r[0]===void 0||r[1]===void 0)return!0;let o=t.getValue({item:e});return typeof o=="number"||o instanceof Date||typeof o=="string"?o>=r[0]&&o<=r[1]:!1},selection:"custom"},{name:jn,label:(0,_e.__)("In the past"),filterText:(e,t)=>(0,Rr.createInterpolateElement)((0,_e.sprintf)((0,_e.__)("%1$s is in the past: %2$s"),e.name,`${t[0].value.value} ${t[0].value.unit}`),Lr),filter(e,t,r){if(r?.value===void 0||r?.unit===void 0)return!0;let o=Mte(r.value,r.unit),n=(0,zn.getDate)(t.getValue({item:e}));return n>=o&&n<=new Date},selection:"custom"},{name:hi,label:(0,_e.__)("Over"),filterText:(e,t)=>(0,Rr.createInterpolateElement)((0,_e.sprintf)((0,_e.__)("%1$s is over: %2$s"),e.name,`${t[0].value.value} ${t[0].value.unit}`),Lr),filter(e,t,r){if(r?.value===void 0||r?.unit===void 0)return!0;let o=Mte(r.value,r.unit);return(0,zn.getDate)(t.getValue({item:e}))(0,Rr.createInterpolateElement)((0,_e.sprintf)((0,_e.__)("%1$s is: %2$s"),e.name,t[0].label),Lr),filter(e,t,r){return r===t.getValue({item:e})||r===void 0},selection:"single"},{name:br,label:(0,_e.__)("Is not"),filterText:(e,t)=>(0,Rr.createInterpolateElement)((0,_e.sprintf)((0,_e.__)("%1$s is not: %2$s"),e.name,t[0].label),Lr),filter(e,t,r){return r!==t.getValue({item:e})},selection:"single"},{name:hd,label:(0,_e.__)("Less than"),filterText:(e,t)=>(0,Rr.createInterpolateElement)((0,_e.sprintf)((0,_e.__)("%1$s is less than: %2$s"),e.name,t[0].label),Lr),filter(e,t,r){return r===void 0?!0:t.getValue({item:e})(0,Rr.createInterpolateElement)((0,_e.sprintf)((0,_e.__)("%1$s is greater than: %2$s"),e.name,t[0].label),Lr),filter(e,t,r){return r===void 0?!0:t.getValue({item:e})>r},selection:"single"},{name:vd,label:(0,_e.__)("Less than or equal"),filterText:(e,t)=>(0,Rr.createInterpolateElement)((0,_e.sprintf)((0,_e.__)("%1$s is less than or equal to: %2$s"),e.name,t[0].label),Lr),filter(e,t,r){return r===void 0?!0:t.getValue({item:e})<=r},selection:"single"},{name:yd,label:(0,_e.__)("Greater than or equal"),filterText:(e,t)=>(0,Rr.createInterpolateElement)((0,_e.sprintf)((0,_e.__)("%1$s is greater than or equal to: %2$s"),e.name,t[0].label),Lr),filter(e,t,r){return r===void 0?!0:t.getValue({item:e})>=r},selection:"single"},{name:bd,label:(0,_e.__)("Before"),filterText:(e,t)=>(0,Rr.createInterpolateElement)((0,_e.sprintf)((0,_e.__)("%1$s is before: %2$s"),e.name,t[0].label),Lr),filter(e,t,r){if(r===void 0)return!0;let o=(0,zn.getDate)(r);return(0,zn.getDate)(t.getValue({item:e}))(0,Rr.createInterpolateElement)((0,_e.sprintf)((0,_e.__)("%1$s is after: %2$s"),e.name,t[0].label),Lr),filter(e,t,r){if(r===void 0)return!0;let o=(0,zn.getDate)(r);return(0,zn.getDate)(t.getValue({item:e}))>o},selection:"single"},{name:_d,label:(0,_e.__)("Before (inc)"),filterText:(e,t)=>(0,Rr.createInterpolateElement)((0,_e.sprintf)((0,_e.__)("%1$s is on or before: %2$s"),e.name,t[0].label),Lr),filter(e,t,r){if(r===void 0)return!0;let o=(0,zn.getDate)(r);return(0,zn.getDate)(t.getValue({item:e}))<=o},selection:"single"},{name:wd,label:(0,_e.__)("After (inc)"),filterText:(e,t)=>(0,Rr.createInterpolateElement)((0,_e.sprintf)((0,_e.__)("%1$s is on or after: %2$s"),e.name,t[0].label),Lr),filter(e,t,r){if(r===void 0)return!0;let o=(0,zn.getDate)(r);return(0,zn.getDate)(t.getValue({item:e}))>=o},selection:"single"},{name:rl,label:(0,_e.__)("Contains"),filterText:(e,t)=>(0,Rr.createInterpolateElement)((0,_e.sprintf)((0,_e.__)("%1$s contains: %2$s"),e.name,t[0].label),Lr),filter(e,t,r){if(r===void 0)return!0;let o=t.getValue({item:e});return typeof o=="string"&&r&&o.toLowerCase().includes(String(r).toLowerCase())},selection:"single"},{name:ol,label:(0,_e.__)("Doesn't contain"),filterText:(e,t)=>(0,Rr.createInterpolateElement)((0,_e.sprintf)((0,_e.__)("%1$s doesn't contain: %2$s"),e.name,t[0].label),Lr),filter(e,t,r){if(r===void 0)return!0;let o=t.getValue({item:e});return typeof o=="string"&&r&&!o.toLowerCase().includes(String(r).toLowerCase())},selection:"single"},{name:nl,label:(0,_e.__)("Starts with"),filterText:(e,t)=>(0,Rr.createInterpolateElement)((0,_e.sprintf)((0,_e.__)("%1$s starts with: %2$s"),e.name,t[0].label),Lr),filter(e,t,r){if(r===void 0)return!0;let o=t.getValue({item:e});return typeof o=="string"&&r&&o.toLowerCase().startsWith(String(r).toLowerCase())},selection:"single"},{name:xd,label:(0,_e.__)("On"),filterText:(e,t)=>(0,Rr.createInterpolateElement)((0,_e.sprintf)((0,_e.__)("%1$s is: %2$s"),e.name,t[0].label),Lr),filter(e,t,r){if(r===void 0)return!0;let o=(0,zn.getDate)(r),n=(0,zn.getDate)(t.getValue({item:e}));return o.getTime()===n.getTime()},selection:"single"},{name:Cd,label:(0,_e.__)("Not on"),filterText:(e,t)=>(0,Rr.createInterpolateElement)((0,_e.sprintf)((0,_e.__)("%1$s is not: %2$s"),e.name,t[0].label),Lr),filter(e,t,r){if(r===void 0)return!0;let o=(0,zn.getDate)(r),n=(0,zn.getDate)(t.getValue({item:e}));return o.getTime()!==n.getTime()},selection:"single"}],jte=e=>Vte.find(t=>t.name===e),zte=()=>Vte.map(e=>e.name);var Ute=s(A(),1),Hte=s(D(),1);function Lt(e,t){let r;return e?.required&&t?.required?r=t?.required?.message?t.required:void 0:e?.pattern&&t?.pattern?r=t.pattern:e?.min&&t?.min?r=t.min:e?.max&&t?.max?r=t.max:e?.minLength&&t?.minLength?r=t.minLength:e?.maxLength&&t?.maxLength?r=t.maxLength:e?.elements&&t?.elements?r=t.elements:t?.custom&&(r=t.custom),r}var Gte=s(C(),1),{ValidatedCheckboxControl:X2e}=Wt(Ute.privateApis);function Wte({field:e,onChange:t,data:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{getValue:a,setValue:l,label:c,description:u,isValid:d}=e,f=(0,Hte.useCallback)(()=>{t(l({item:r,value:!a({item:r})}))},[r,a,t,l]);return(0,Gte.jsx)(X2e,{required:!!e.isValid?.required,markWhenOptional:n,customValidity:Lt(d,i),hidden:o,label:c,help:u,checked:a({item:r}),onChange:f})}var g2=s(A(),1),Yte=s(D(),1);var RN=s(C(),1),{ValidatedComboboxControl:Q2e}=Wt(g2.privateApis);function v2({data:e,field:t,onChange:r,hideLabelFromVision:o,validity:n}){let{label:i,description:a,placeholder:l,getValue:c,setValue:u,isValid:d}=t,f=c({item:e})??"",m=(0,Yte.useCallback)(v=>r(u({item:e,value:v??""})),[e,r,u]),{elements:h,isLoading:g}=gi({elements:t.elements,getElements:t.getElements});return g?(0,RN.jsx)(g2.Spinner,{}):(0,RN.jsx)(Q2e,{required:!!t.isValid?.required,customValidity:Lt(d,n),label:i,value:f,help:a,placeholder:l,options:h,onChange:m,hideLabelFromVision:o,allowReset:!0,expandOnFocus:!0})}var _2=s(A(),1),ks=s(D(),1),S2=s(E(),1),Hi=s(po(),1);var Hg=s(A(),1),AN=s(D(),1),il=s(E(),1);var Ug=s(C(),1),J2e={[jn]:[{value:"days",label:(0,il.__)("Days")},{value:"weeks",label:(0,il.__)("Weeks")},{value:"months",label:(0,il.__)("Months")},{value:"years",label:(0,il.__)("Years")}],[hi]:[{value:"days",label:(0,il.__)("Days ago")},{value:"weeks",label:(0,il.__)("Weeks ago")},{value:"months",label:(0,il.__)("Months ago")},{value:"years",label:(0,il.__)("Years ago")}]};function y2({className:e,data:t,field:r,onChange:o,hideLabelFromVision:n,operator:i}){let a=J2e[i===jn?"inThePast":"over"],{id:l,label:c,getValue:u,setValue:d}=r,f=u({item:t}),{value:m="",unit:h=a[0].value}=f&&typeof f=="object"?f:{},g=(0,AN.useCallback)(y=>o(d({item:t,value:{value:Number(y),unit:h}})),[o,d,t,h]),v=(0,AN.useCallback)(y=>o(d({item:t,value:{value:m,unit:y}})),[o,d,t,m]);return(0,Ug.jsx)(Hg.BaseControl,{id:l,className:re(e,"dataviews-controls__relative-date"),label:c,hideLabelFromVision:n,children:(0,Ug.jsxs)(it,{direction:"row",gap:"sm",children:[(0,Ug.jsx)(Hg.__experimentalNumberControl,{__next40pxDefaultSize:!0,className:"dataviews-controls__relative-date-number",spinControls:"none",min:1,step:1,value:m,onChange:g}),(0,Ug.jsx)(Hg.SelectControl,{className:"dataviews-controls__relative-date-unit",__next40pxDefaultSize:!0,label:(0,il.__)("Unit"),value:h,options:a,onChange:v,hideLabelFromVision:!0})]})})}var qte=s(po(),1);function b2(e){if(!e)return null;let t=(0,qte.getDate)(e);return t&&Lg(t)?t:null}var Pd=s(C(),1),{DateCalendar:$2e,ValidatedInputControl:eEe}=Wt(_2.privateApis),tEe=e=>e?(0,Hi.dateI18n)("Y-m-d\\TH:i",(0,Hi.getDate)(e)):"";function rEe({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{id:a,label:l,description:c,setValue:u,getValue:d,isValid:f}=t,m=d({item:e}),h=typeof m=="string"?m:void 0,[g,v]=(0,ks.useState)(()=>b2(h)||new Date),y=(0,ks.useRef)(null),b=(0,ks.useRef)(void 0),_=(0,ks.useRef)(null),S=(0,ks.useCallback)(L=>r(u({item:e,value:L})),[e,r,u]);(0,ks.useEffect)(()=>()=>{b.current&&clearTimeout(b.current)},[]);let x=(0,ks.useCallback)(L=>{let M;if(L){let k=(0,Hi.dateI18n)("Y-m-d",L),I;h?I=(0,Hi.dateI18n)("H:i",(0,Hi.getDate)(h)):I=(0,Hi.dateI18n)("H:i",L),M=(0,Hi.getDate)(`${k}T${I}`).toISOString(),S(M),b.current&&clearTimeout(b.current)}else S(void 0);_.current=y.current&&y.current.ownerDocument.activeElement,b.current=setTimeout(()=>{y.current&&(y.current.focus(),y.current.blur(),S(M),_.current&&_.current instanceof HTMLElement&&_.current.focus())},0)},[S,h]),T=(0,ks.useCallback)(L=>{if(L){let M=(0,Hi.getDate)(L);S(M.toISOString());let k=b2(M.toISOString());k&&v(k)}else S(void 0)},[S]),{format:R}=t,F=R.weekStartsOn??(0,Hi.getSettings)().l10n.startOfWeek,{timezone:{string:B}}=(0,Hi.getSettings)(),z=l;return f?.required&&!n&&!o?z=`${l} (${(0,S2.__)("Required")})`:!f?.required&&n&&!o&&(z=`${l} (${(0,S2.__)("Optional")})`),(0,Pd.jsx)(_2.BaseControl,{id:a,label:z,help:c,hideLabelFromVision:o,children:(0,Pd.jsxs)(it,{direction:"column",gap:"lg",children:[(0,Pd.jsx)($2e,{style:{width:"100%"},selected:h&&b2(h)||void 0,onSelect:x,month:g,onMonthChange:v,timeZone:B||void 0,weekStartsOn:F}),(0,Pd.jsx)(eEe,{ref:y,__next40pxDefaultSize:!0,required:!!f?.required,customValidity:Lt(f,i),type:"datetime-local",label:(0,S2.__)("Date time"),hideLabelFromVision:!0,value:tEe(h),onChange:T})]})})}function Zte({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,operator:i,validity:a}){return i===jn||i===hi?(0,Pd.jsx)(y2,{className:"dataviews-controls__datetime",data:e,field:t,onChange:r,hideLabelFromVision:o,operator:i}):(0,Pd.jsx)(rEe,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:a})}var gn=s(A(),1),Rt=s(D(),1),co=s(E(),1),hn=s(po(),1);var Vt=s(C(),1),{DateCalendar:oEe,DateRangeCalendar:nEe}=Wt(gn.privateApis),iEe=[{id:"today",label:(0,co.__)("Today"),getValue:()=>(0,hn.getDate)(null)},{id:"yesterday",label:(0,co.__)("Yesterday"),getValue:()=>{let e=(0,hn.getDate)(null);return Rm(e,1)}},{id:"past-week",label:(0,co.__)("Past week"),getValue:()=>{let e=(0,hn.getDate)(null);return Rm(e,7)}},{id:"past-month",label:(0,co.__)("Past month"),getValue:()=>{let e=(0,hn.getDate)(null);return p2(e,1)}}],sEe=[{id:"last-7-days",label:(0,co.__)("Last 7 days"),getValue:()=>{let e=(0,hn.getDate)(null);return[Rm(e,7),e]}},{id:"last-30-days",label:(0,co.__)("Last 30 days"),getValue:()=>{let e=(0,hn.getDate)(null);return[Rm(e,30),e]}},{id:"month-to-date",label:(0,co.__)("Month to date"),getValue:()=>{let e=(0,hn.getDate)(null);return[vte(e),e]}},{id:"last-year",label:(0,co.__)("Last year"),getValue:()=>{let e=(0,hn.getDate)(null);return[h2(e,1),e]}},{id:"year-to-date",label:(0,co.__)("Year to date"),getValue:()=>{let e=(0,hn.getDate)(null);return[d2(e),e]}}],Gg=e=>{if(!e)return null;let t=(0,hn.getDate)(e);return t&&Lg(t)?t:null},ON=e=>e?typeof e=="string"?e:kN(e,"yyyy-MM-dd"):"";function Kte({field:e,validity:t,inputRefs:r,isTouched:o,setIsTouched:n,children:i}){let{isValid:a}=e,[l,c]=(0,Rt.useState)(void 0),u=(0,Rt.useCallback)(()=>{let f=Array.isArray(r)?r:[r];for(let m of f){let h=m.current;if(h&&!h.validity.valid){c({type:"invalid",message:h.validationMessage});return}}c(void 0)},[r]);return(0,Rt.useEffect)(()=>{let f=Array.isArray(r)?r:[r],m=t?Lt(a,t):void 0;for(let h of f){let g=h.current;g&&g.setCustomValidity(m?.type==="invalid"&&m.message?m.message:"")}},[r,a,t]),(0,Rt.useEffect)(()=>{let f=Array.isArray(r)?r:[r],m=h=>{h.preventDefault(),n(!0)};for(let h of f)h.current?.addEventListener("invalid",m);return()=>{for(let h of f)h.current?.removeEventListener("invalid",m)}},[r,n]),(0,Rt.useEffect)(()=>{if(!o)return;let f=t?Lt(a,t):void 0;f?c(f):u()},[o,a,t,u]),(0,Vt.jsxs)("div",{onBlur:f=>{o||(!f.relatedTarget||!f.currentTarget.contains(f.relatedTarget))&&n(!0)},children:[i,(0,Vt.jsx)("div",{"aria-live":"polite",children:l&&(0,Vt.jsxs)("p",{className:re("components-validated-control__indicator",l.type==="invalid"?"is-invalid":void 0),children:[(0,Vt.jsx)(gn.Icon,{className:"components-validated-control__indicator-icon",icon:Cl,size:16,fill:"currentColor"}),l.message]})})]})}function aEe({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{id:a,label:l,setValue:c,getValue:u,isValid:d,format:f}=t,[m,h]=(0,Rt.useState)(null),g=f.weekStartsOn??(0,hn.getSettings)().l10n.startOfWeek,v=u({item:e}),y=typeof v=="string"?v:void 0,[b,_]=(0,Rt.useState)(()=>Gg(y)||new Date),[S,x]=(0,Rt.useState)(!1),T=(0,Rt.useRef)(null),R=(0,Rt.useCallback)(k=>r(c({item:e,value:k})),[e,r,c]),F=(0,Rt.useCallback)(k=>{let I=k?kN(k,"yyyy-MM-dd"):void 0;R(I),h(null),x(!0)},[R]),B=(0,Rt.useCallback)(k=>{let I=k.getValue(),U=ON(I);_(I),R(U),h(k.id),x(!0)},[R]),z=(0,Rt.useCallback)(k=>{if(R(k),k){let I=Gg(k);I&&_(I)}h(null),x(!0)},[R]),{timezone:{string:L}}=(0,hn.getSettings)(),M=l;return d?.required&&!n?M=`${l} (${(0,co.__)("Required")})`:!d?.required&&n&&(M=`${l} (${(0,co.__)("Optional")})`),(0,Vt.jsx)(Kte,{field:t,validity:i,inputRefs:T,isTouched:S,setIsTouched:x,children:(0,Vt.jsx)(gn.BaseControl,{id:a,className:"dataviews-controls__date",label:M,hideLabelFromVision:o,children:(0,Vt.jsxs)(it,{direction:"column",gap:"lg",children:[(0,Vt.jsxs)(it,{direction:"row",gap:"sm",wrap:"wrap",justify:"flex-start",children:[iEe.map(k=>{let I=m===k.id;return(0,Vt.jsx)(gn.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:I,size:"small",onClick:()=>B(k),children:k.label},k.id)}),(0,Vt.jsx)(gn.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:!m,size:"small",disabled:!!m,accessibleWhenDisabled:!1,children:(0,co.__)("Custom")})]}),(0,Vt.jsx)(gn.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:T,type:"date",label:(0,co.__)("Date"),hideLabelFromVision:!0,value:y,onChange:z,required:!!t.isValid?.required}),(0,Vt.jsx)(oEe,{style:{width:"100%"},selected:y&&Gg(y)||void 0,onSelect:F,month:b,onMonthChange:_,timeZone:L||void 0,weekStartsOn:g})]})})})}function lEe({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{id:a,label:l,getValue:c,setValue:u,format:d}=t,f,m=c({item:e});Array.isArray(m)&&m.length===2&&m.every(U=>typeof U=="string")&&(f=m);let h=d.weekStartsOn??(0,hn.getSettings)().l10n.startOfWeek,g=(0,Rt.useCallback)(U=>{r(u({item:e,value:U}))},[e,r,u]),[v,y]=(0,Rt.useState)(null),b=(0,Rt.useMemo)(()=>{if(!f)return{from:void 0,to:void 0};let[U,G]=f;return{from:Gg(U)||void 0,to:Gg(G)||void 0}},[f]),[_,S]=(0,Rt.useState)(()=>b.from||new Date),[x,T]=(0,Rt.useState)(!1),R=(0,Rt.useRef)(null),F=(0,Rt.useRef)(null),B=(0,Rt.useCallback)((U,G)=>{U&&G?g([ON(U),ON(G)]):!U&&!G&&g(void 0)},[g]),z=(0,Rt.useCallback)(U=>{B(U?.from,U?.to),y(null),T(!0)},[B]),L=(0,Rt.useCallback)(U=>{let[G,Y]=U.getValue();S(G),B(G,Y),y(U.id),T(!0)},[B]),M=(0,Rt.useCallback)((U,G)=>{let[Y,Z]=f||[void 0,void 0];if(B(U==="from"?G:Y,U==="to"?G:Z),G){let H=Gg(G);H&&S(H)}y(null),T(!0)},[f,B]),{timezone:k}=(0,hn.getSettings)(),I=l;return t.isValid?.required&&!n?I=`${l} (${(0,co.__)("Required")})`:!t.isValid?.required&&n&&(I=`${l} (${(0,co.__)("Optional")})`),(0,Vt.jsx)(Kte,{field:t,validity:i,inputRefs:[R,F],isTouched:x,setIsTouched:T,children:(0,Vt.jsx)(gn.BaseControl,{id:a,className:"dataviews-controls__date",label:I,hideLabelFromVision:o,children:(0,Vt.jsxs)(it,{direction:"column",gap:"lg",children:[(0,Vt.jsxs)(it,{direction:"row",gap:"sm",wrap:"wrap",justify:"flex-start",children:[sEe.map(U=>{let G=v===U.id;return(0,Vt.jsx)(gn.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:G,size:"small",onClick:()=>L(U),children:U.label},U.id)}),(0,Vt.jsx)(gn.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:!v,size:"small",accessibleWhenDisabled:!1,disabled:!!v,children:(0,co.__)("Custom")})]}),(0,Vt.jsxs)(it,{direction:"row",gap:"sm",justify:"space-between",className:"dataviews-controls__date-range-inputs",children:[(0,Vt.jsx)(gn.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:R,type:"date",label:(0,co.__)("From"),hideLabelFromVision:!0,value:f?.[0],onChange:U=>M("from",U),required:!!t.isValid?.required}),(0,Vt.jsx)(gn.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:F,type:"date",label:(0,co.__)("To"),hideLabelFromVision:!0,value:f?.[1],onChange:U=>M("to",U),required:!!t.isValid?.required})]}),(0,Vt.jsx)(nEe,{style:{width:"100%"},selected:b,onSelect:z,month:_,onMonthChange:S,timeZone:k.string||void 0,weekStartsOn:h})]})})})}function Xte({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,operator:i,validity:a}){return i===jn||i===hi?(0,Vt.jsx)(y2,{className:"dataviews-controls__date",data:e,field:t,onChange:r,hideLabelFromVision:o,operator:i}):i===Vn?(0,Vt.jsx)(lEe,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:a}):(0,Vt.jsx)(aEe,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:a})}var w2=s(A(),1),Qte=s(D(),1);var IN=s(C(),1),{ValidatedSelectControl:cEe}=Wt(w2.privateApis);function x2({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{type:a,label:l,description:c,getValue:u,setValue:d,isValid:f}=t,m=a==="array",h=u({item:e})??(m?[]:""),g=(0,Qte.useCallback)(b=>r(d({item:e,value:b})),[e,r,d]),{elements:v,isLoading:y}=gi({elements:t.elements,getElements:t.getElements});return y?(0,IN.jsx)(w2.Spinner,{}):(0,IN.jsx)(cEe,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:Lt(f,i),label:l,value:h,help:c,options:v,onChange:g,__next40pxDefaultSize:!0,hideLabelFromVision:o,multiple:m})}var NN=s(C(),1),uEe=10;function Jte(e){let{field:t}=e,{elements:r}=gi({elements:t.elements,getElements:t.getElements});return r.length>=uEe?(0,NN.jsx)(v2,{...e}):(0,NN.jsx)(x2,{...e})}var T2=s(A(),1);var $te=s(A(),1),ere=s(D(),1);var tre=s(C(),1),{ValidatedInputControl:dEe}=Wt($te.privateApis);function sl({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,type:i,prefix:a,suffix:l,validity:c}){let{label:u,placeholder:d,description:f,getValue:m,setValue:h,isValid:g}=t,v=m({item:e}),y=(0,ere.useCallback)(b=>r(h({item:e,value:b})),[e,h,r]);return(0,tre.jsx)(dEe,{required:!!g.required,markWhenOptional:n,customValidity:Lt(g,c),label:u,placeholder:d,value:v??"",help:f,onChange:y,hideLabelFromVision:o,type:i,prefix:a,suffix:l,pattern:g.pattern?g.pattern.constraint:void 0,minLength:g.minLength?g.minLength.constraint:void 0,maxLength:g.maxLength?g.maxLength.constraint:void 0,__next40pxDefaultSize:!0})}var C2=s(C(),1);function rre({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){return(0,C2.jsx)(sl,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i,type:"email",prefix:(0,C2.jsx)(T2.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,C2.jsx)(T2.Icon,{icon:KR})})})}var k2=s(A(),1);var P2=s(C(),1);function ore({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){return(0,P2.jsx)(sl,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i,type:"tel",prefix:(0,P2.jsx)(k2.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,P2.jsx)(k2.Icon,{icon:Ym})})})}var R2=s(A(),1);var E2=s(C(),1);function nre({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){return(0,E2.jsx)(sl,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i,type:"url",prefix:(0,E2.jsx)(R2.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,E2.jsx)(R2.Icon,{icon:cA})})})}var Lc=s(A(),1),Z0=s(D(),1),A2=s(E(),1);var kd=s(C(),1),{ValidatedNumberControl:fEe}=Wt(Lc.privateApis);function ire(e){if(e===""||e===void 0)return"";let t=Number(e);return Number.isFinite(t)?t:""}function mEe({value:e,onChange:t,hideLabelFromVision:r,step:o}){let[n="",i=""]=e,a=(0,Z0.useCallback)(c=>t([ire(c),i]),[t,i]),l=(0,Z0.useCallback)(c=>t([n,ire(c)]),[t,n]);return(0,kd.jsx)(Lc.BaseControl,{help:(0,A2.__)("The max. value must be greater than the min. value."),children:(0,kd.jsxs)(Lc.Flex,{direction:"row",gap:4,children:[(0,kd.jsx)(Lc.__experimentalNumberControl,{label:(0,A2.__)("Min."),value:n,max:i?Number(i)-o:void 0,onChange:a,__next40pxDefaultSize:!0,hideLabelFromVision:r,step:o}),(0,kd.jsx)(Lc.__experimentalNumberControl,{label:(0,A2.__)("Max."),value:i,min:n?Number(n)+o:void 0,onChange:l,__next40pxDefaultSize:!0,hideLabelFromVision:r,step:o})]})})}function O2({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,operator:i,validity:a}){let l=t.format?.decimals??0,c=Math.pow(10,Math.abs(l)*-1),{label:u,description:d,getValue:f,setValue:m,isValid:h}=t,g=f({item:e})??"",v=(0,Z0.useCallback)(b=>{r(m({item:e,value:["",void 0].includes(b)?void 0:Number(b)}))},[e,r,m]),y=(0,Z0.useCallback)(b=>{r(m({item:e,value:b}))},[e,r,m]);if(i===Vn){let b=["",""];return Array.isArray(g)&&g.length===2&&g.every(_=>typeof _=="number"||_==="")&&(b=g),(0,kd.jsx)(mEe,{value:b,onChange:y,hideLabelFromVision:o,step:c})}return(0,kd.jsx)(fEe,{required:!!h.required,markWhenOptional:n,customValidity:Lt(h,a),label:u,help:d,value:g,onChange:v,__next40pxDefaultSize:!0,hideLabelFromVision:o,step:c,min:h.min?h.min.constraint:void 0,max:h.max?h.max.constraint:void 0})}var sre=s(C(),1);function are(e){return(0,sre.jsx)(O2,{...e})}var lre=s(C(),1);function cre(e){return(0,lre.jsx)(O2,{...e})}var I2=s(A(),1),ure=s(D(),1);var FN=s(C(),1),{ValidatedRadioControl:pEe}=Wt(I2.privateApis);function dre({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{label:a,description:l,getValue:c,setValue:u,isValid:d}=t,{elements:f,isLoading:m}=gi({elements:t.elements,getElements:t.getElements}),h=c({item:e}),g=(0,ure.useCallback)(v=>r(u({item:e,value:v})),[e,r,u]);return m?(0,FN.jsx)(I2.Spinner,{}):(0,FN.jsx)(pEe,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:Lt(d,i),label:a,help:l,onChange:g,options:f,selected:h,hideLabelFromVision:o})}var DN=s(D(),1);var fre=s(C(),1);function mre({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,config:i,validity:a}){let{prefix:l,suffix:c}=i||{};return(0,fre.jsx)(sl,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:a,prefix:l?(0,DN.createElement)(l):void 0,suffix:c?(0,DN.createElement)(c):void 0})}var pre=s(A(),1),hre=s(D(),1);var gre=s(C(),1),{ValidatedToggleControl:hEe}=Wt(pre.privateApis);function vre({field:e,onChange:t,data:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{label:a,description:l,getValue:c,setValue:u,isValid:d}=e,f=(0,hre.useCallback)(()=>{t(u({item:r,value:!c({item:r})}))},[t,u,r,c]);return(0,gre.jsx)(hEe,{required:!!d.required,markWhenOptional:n,customValidity:Lt(d,i),hidden:o,label:a,help:l,checked:c({item:r}),onChange:f})}var yre=s(A(),1),bre=s(D(),1);var Sre=s(C(),1),{ValidatedTextareaControl:gEe}=Wt(yre.privateApis);function _re({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,config:i,validity:a}){let{rows:l=4}=i||{},{label:c,placeholder:u,description:d,setValue:f,isValid:m}=t,h=t.getValue({item:e}),g=(0,bre.useCallback)(v=>r(f({item:e,value:v})),[e,r,f]);return(0,Sre.jsx)(gEe,{required:!!m.required,markWhenOptional:n,customValidity:Lt(m,a),label:c,placeholder:u,value:h??"",help:d,onChange:g,rows:l,minLength:m.minLength?m.minLength.constraint:void 0,maxLength:m.maxLength?m.maxLength.constraint:void 0,__next40pxDefaultSize:!0,hideLabelFromVision:o})}var Wg=s(A(),1),wre=s(D(),1);var N2=s(C(),1),{ValidatedToggleGroupControl:vEe}=Wt(Wg.privateApis);function xre({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{getValue:a,setValue:l,isValid:c}=t,u=a({item:e}),d=(0,wre.useCallback)(g=>r(l({item:e,value:g})),[e,r,l]),{elements:f,isLoading:m}=gi({elements:t.elements,getElements:t.getElements});if(m)return(0,N2.jsx)(Wg.Spinner,{});if(f.length===0)return null;let h=f.find(g=>g.value===u);return(0,N2.jsx)(vEe,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:Lt(c,i),__next40pxDefaultSize:!0,isBlock:!0,label:t.label,help:h?.description||t.description,onChange:d,value:u,hideLabelFromVision:o,children:f.map(g=>(0,N2.jsx)(Wg.__experimentalToggleGroupControlOption,{label:g.label,value:g.value},g.value))})}var F2=s(A(),1),D2=s(D(),1);var K0=s(C(),1),{ValidatedFormTokenField:yEe}=Wt(F2.privateApis);function Cre({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{label:a,placeholder:l,getValue:c,setValue:u,isValid:d}=t,f=c({item:e}),{elements:m,isLoading:h}=gi({elements:t.elements,getElements:t.getElements}),g=(0,D2.useMemo)(()=>Array.isArray(f)?f.map(y=>m?.find(_=>_.value===y)||{value:y,label:y}):[],[f,m]),v=(0,D2.useCallback)(y=>{let b=y.map(_=>typeof _=="object"&&"value"in _?_.value:_);r(u({item:e,value:b}))},[r,u,e]);return h?(0,K0.jsx)(F2.Spinner,{}):(0,K0.jsx)(yEe,{required:!!d?.required,markWhenOptional:n,customValidity:Lt(d,i),label:o?void 0:a,value:g,onChange:v,placeholder:l,suggestions:m?.map(y=>y.value),__experimentalValidateInput:y=>t.isValid?.elements&&m?m.some(b=>b.value===y||b.label===y):!0,__experimentalExpandOnFocus:m&&m.length>0,__experimentalShowHowTo:!t.isValid?.elements,displayTransform:y=>typeof y=="object"&&"label"in y?y.label:typeof y=="string"&&m&&m.find(_=>_.value===y)?.label||y,__experimentalRenderItem:({item:y})=>{if(typeof y=="string"&&m){let b=m.find(_=>_.value===y);return(0,K0.jsx)("span",{children:b?.label||y})}return(0,K0.jsx)("span",{children:y})}})}var vi=s(A(),1),BN=s(D(),1),Tre=s(E(),1);var Vc=s(C(),1),{ValidatedInputControl:bEe}=Wt(vi.privateApis),SEe=({color:e,onColorChange:t})=>{let r=e&&xr(e).isValid()?e:"#ffffff";return(0,Vc.jsx)(vi.Dropdown,{className:"dataviews-controls__color-picker-dropdown",popoverProps:{resize:!1},renderToggle:({onToggle:o})=>(0,Vc.jsx)(vi.Button,{onClick:o,"aria-label":(0,Tre.__)("Open color picker"),size:"small",icon:()=>(0,Vc.jsx)(vi.ColorIndicator,{colorValue:r})}),renderContent:()=>(0,Vc.jsx)(vi.__experimentalDropdownContentWrapper,{paddingSize:"none",children:(0,Vc.jsx)(vi.ColorPicker,{color:r,onChange:t,enableAlpha:!0})})})};function Pre({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{label:a,placeholder:l,description:c,setValue:u,isValid:d}=t,f=t.getValue({item:e})||"",m=(0,BN.useCallback)(g=>{r(u({item:e,value:g}))},[e,r,u]),h=(0,BN.useCallback)(g=>{r(u({item:e,value:g||""}))},[e,r,u]);return(0,Vc.jsx)(bEe,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:Lt(d,i),label:a,placeholder:l,value:f,help:c,onChange:h,hideLabelFromVision:o,type:"text",prefix:(0,Vc.jsx)(vi.__experimentalInputControlPrefixWrapper,{variant:"control",children:(0,Vc.jsx)(SEe,{color:f,onColorChange:m})})})}var M2=s(A(),1),L2=s(D(),1),MN=s(E(),1);var B2=s(C(),1);function kre({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let[a,l]=(0,L2.useState)(!1),c=(0,L2.useCallback)(()=>{l(u=>!u)},[]);return(0,B2.jsx)(sl,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i,type:a?"text":"password",suffix:(0,B2.jsx)(M2.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,B2.jsx)(M2.Button,{icon:a?tO:Gd,onClick:c,size:"small",label:a?(0,MN.__)("Hide password"):(0,MN.__)("Show password")})})})}function V2(e){return Array.isArray(e.elements)&&e.elements.length>0||typeof e.getElements=="function"}var Rre=s(C(),1),Ere={adaptiveSelect:Jte,array:Cre,checkbox:Wte,color:Pre,combobox:v2,datetime:Zte,date:Xte,email:rre,telephone:ore,url:nre,integer:are,number:cre,password:kre,radio:dre,select:x2,text:mre,toggle:vre,textarea:_re,toggleGroup:xre};function _Ee(e){return e&&typeof e=="object"&&typeof e.control=="string"}function wEe(e){let{control:t,...r}=e,o=j2(t);return o===null?null:function(i){return(0,Rre.jsx)(o,{...i,config:r})}}function Are(e,t){return typeof e.Edit=="function"?e.Edit:typeof e.Edit=="string"?j2(e.Edit):_Ee(e.Edit)?wEe(e.Edit):V2(e)&&e.type!=="array"?j2("adaptiveSelect"):t===null?null:j2(t)}function j2(e){return Object.keys(Ere).includes(e)?Ere[e]:null}function xEe(e,t,r){if(e.filterBy===!1)return!1;let o=e.filterBy?.operators?.filter(n=>r.includes(n))??t;return o.length===0?!1:{isPrimary:!!e.filterBy?.isPrimary,operators:o}}var Ore=xEe;var CEe=e=>({item:t})=>{let r=e.split("."),o=t;for(let n of r)o.hasOwnProperty(n)?o=o[n]:o=void 0;return o},Ire=CEe;var TEe=e=>({value:t})=>{let r=e.split("."),o={},n=o;for(let i of r.slice(0,-1))n[i]={},n=n[i];return n[r.at(-1)]=t,o},Nre=TEe;var Dre=s(E(),1);function z2({item:e,field:t}){let{elements:r,isLoading:o}=gi({elements:t.elements,getElements:t.getElements}),n=t.getValue({item:e});return o||r.length===0?n:r?.find(i=>i.value===n)?.label||t.getValue({item:e})}var Fre=s(C(),1);function Ar({item:e,field:t}){return t.hasElements?(0,Fre.jsx)(z2,{item:e,field:t}):t.getValueFormatted({item:e,field:t})}var al=(e,t,r)=>r==="asc"?e.localeCompare(t):t.localeCompare(e);function Or(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)}function ll(e,t){if(typeof t.isValid.minLength?.constraint!="number")return!1;let r=t.getValue({item:e});return[void 0,"",null].includes(r)?!0:String(r).length>=t.isValid.minLength.constraint}function cl(e,t){if(typeof t.isValid.maxLength?.constraint!="number")return!1;let r=t.getValue({item:e});return[void 0,"",null].includes(r)?!0:String(r).length<=t.isValid.maxLength.constraint}function ul(e,t){if(t.isValid.pattern?.constraint===void 0)return!0;try{let r=new RegExp(t.isValid.pattern.constraint),o=t.getValue({item:e});return[void 0,"",null].includes(o)?!0:r.test(String(o))}catch{return!1}}function Yt(e,t){let o=(t.elements??[]).map(i=>i.value);if(o.length===0)return!0;let n=t.getValue({item:e});return[].concat(n).every(i=>o.includes(i))}function PEe({item:e,field:t}){return t.getValue({item:e})}var Un=PEe;var kEe=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;function EEe(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)&&!kEe.test(r)?(0,Dre.__)("Value must be a valid email address."):null}var Bre={type:"email",render:Ar,Edit:"email",sort:al,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[nr,ir],validOperators:[yr,br,rl,ol,nl,nr,ir,mn,pn],format:{},getValueFormatted:Un,validate:{required:Or,pattern:ul,minLength:ll,maxLength:cl,elements:Yt,custom:EEe}};var Mre=s(E(),1);var Yg=(e,t,r)=>r==="asc"?e-t:t-e;function U2(e,t){if(typeof t.isValid.min?.constraint!="number")return!1;let r=t.getValue({item:e});return[void 0,"",null].includes(r)?!0:Number(r)>=t.isValid.min.constraint}function H2(e,t){if(typeof t.isValid.max?.constraint!="number")return!1;let r=t.getValue({item:e});return[void 0,"",null].includes(r)?!0:Number(r)<=t.isValid.max.constraint}var Lre={separatorThousand:","};function REe({item:e,field:t}){let r=t.getValue({item:e});if(r==null)return"";if(r=Number(r),!Number.isFinite(r))return String(r);let o;t.type!=="integer"?o=Lre:o=t.format;let{separatorThousand:n}=o,i=Math.trunc(r);return n?String(i).replace(/\B(?=(\d{3})+(?!\d))/g,n):String(i)}function AEe(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)&&!Number.isInteger(r)?(0,Mre.__)("Value must be an integer."):null}var Vre={type:"integer",render:Ar,Edit:"integer",sort:Yg,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[yr,br,hd,gd,vd,yd,Vn],validOperators:[yr,br,hd,gd,vd,yd,Vn,nr,ir,mn,pn],format:Lre,getValueFormatted:REe,validate:{required:Or,min:U2,max:H2,elements:Yt,custom:AEe}};var jre=s(E(),1);var zre={separatorThousand:",",separatorDecimal:".",decimals:2};function OEe({item:e,field:t}){let r=t.getValue({item:e});if(r==null)return"";if(r=Number(r),!Number.isFinite(r))return String(r);let o;t.type!=="number"?o=zre:o=t.format;let{separatorThousand:n,separatorDecimal:i,decimals:a}=o,l=r.toFixed(a),[c,u]=l.split("."),d=n?c.replace(/\B(?=(\d{3})+(?!\d))/g,n):c;return a===0?d:d+i+u}function IEe(e){return e===""||e===void 0||e===null}function NEe(e,t){let r=t.getValue({item:e});return!IEe(r)&&!Number.isFinite(r)?(0,jre.__)("Value must be a number."):null}var Ure={type:"number",render:Ar,Edit:"number",sort:Yg,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[yr,br,hd,gd,vd,yd,Vn],validOperators:[yr,br,hd,gd,vd,yd,Vn,nr,ir,mn,pn],format:zre,getValueFormatted:OEe,validate:{required:Or,min:U2,max:H2,elements:Yt,custom:NEe}};var Hre={type:"text",render:Ar,Edit:"text",sort:al,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[nr,ir],validOperators:[yr,br,rl,ol,nl,nr,ir,mn,pn],format:{},getValueFormatted:Un,validate:{required:Or,pattern:ul,minLength:ll,maxLength:cl,elements:Yt}};var Am=s(po(),1);var Gre={datetime:(0,Am.getSettings)().formats.datetime,weekStartsOn:(0,Am.getSettings)().l10n.startOfWeek};function FEe({item:e,field:t}){let r=t.getValue({item:e});if(["",void 0,null].includes(r))return"";let o;return t.type!=="datetime"?o=Gre:o=t.format,(0,Am.dateI18n)(o.datetime,(0,Am.getDate)(r))}var DEe=(e,t,r)=>{let o=new Date(e).getTime(),n=new Date(t).getTime();return r==="asc"?o-n:n-o},Wre={type:"datetime",render:Ar,Edit:"datetime",sort:DEe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[xd,Cd,bd,Sd,_d,wd,jn,hi],validOperators:[xd,Cd,bd,Sd,_d,wd,jn,hi],format:Gre,getValueFormatted:FEe,validate:{required:Or,elements:Yt}};var Om=s(po(),1);var Yre={date:(0,Om.getSettings)().formats.date,weekStartsOn:(0,Om.getSettings)().l10n.startOfWeek};function BEe({item:e,field:t}){let r=t.getValue({item:e});if(["",void 0,null].includes(r))return"";let o;return t.type!=="date"?o=Yre:o=t.format,(0,Om.dateI18n)(o.date,(0,Om.getDate)(r))}var MEe=(e,t,r)=>{let o=new Date(e).getTime(),n=new Date(t).getTime();return r==="asc"?o-n:n-o},qre={type:"date",render:Ar,Edit:"date",sort:MEe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[xd,Cd,bd,Sd,_d,wd,jn,hi,Vn],validOperators:[xd,Cd,bd,Sd,_d,wd,jn,hi,Vn],format:Yre,getValueFormatted:BEe,validate:{required:Or,elements:Yt}};var G2=s(E(),1);function Zre(e,t){return t.getValue({item:e})===!0}function LEe({item:e,field:t}){let r=t.getValue({item:e});return r===!0?(0,G2.__)("True"):r===!1?(0,G2.__)("False"):""}function VEe(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)&&![!0,!1].includes(r)?(0,G2.__)("Value must be true, false, or undefined"):null}var jEe=(e,t,r)=>{let o=!!e;return o===!!t?0:r==="asc"?o?1:-1:o?-1:1},Kre={type:"boolean",render:Ar,Edit:"checkbox",sort:jEe,validate:{required:Zre,elements:Yt,custom:VEe},enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[yr,br],validOperators:[yr,br],format:{},getValueFormatted:LEe};var Xre={type:"media",render:()=>null,Edit:null,sort:()=>0,enableSorting:!1,enableGlobalSearch:!1,defaultOperators:[],validOperators:[],format:{},getValueFormatted:Un,validate:{}};var LN=s(E(),1);function Qre(e,t){let r=t.getValue({item:e});return Array.isArray(r)&&r.length>0&&r.every(o=>![void 0,"",null].includes(o))}function Jre({item:e,field:t}){let r=t.getValue({item:e});return(Array.isArray(r)?r:[]).join(", ")}function zEe({item:e,field:t}){return Jre({item:e,field:t})}function UEe(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)&&!Array.isArray(r)?(0,LN.__)("Value must be an array."):r.every(o=>typeof o=="string")?null:(0,LN.__)("Every value must be a string.")}var HEe=(e,t,r)=>{let o=Array.isArray(e)?e:[],n=Array.isArray(t)?t:[];if(o.length!==n.length)return r==="asc"?o.length-n.length:n.length-o.length;let i=o.join(","),a=n.join(",");return r==="asc"?i.localeCompare(a):a.localeCompare(i)},$re={type:"array",render:zEe,Edit:"array",sort:HEe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[nr,ir],validOperators:[nr,ir,mn,pn],format:{},getValueFormatted:Jre,validate:{required:Qre,elements:Yt,custom:UEe}};function GEe({item:e,field:t}){return t.getValue({item:e})?"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022":""}var eoe={type:"password",render:Ar,Edit:"password",sort:()=>0,enableSorting:!1,enableGlobalSearch:!1,defaultOperators:[],validOperators:[],format:{},getValueFormatted:GEe,validate:{required:Or,pattern:ul,minLength:ll,maxLength:cl,elements:Yt}};var toe={type:"telephone",render:Ar,Edit:"telephone",sort:al,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[nr,ir],validOperators:[yr,br,rl,ol,nl,nr,ir,mn,pn],format:{},getValueFormatted:Un,validate:{required:Or,pattern:ul,minLength:ll,maxLength:cl,elements:Yt}};var roe=s(E(),1);var qg=s(C(),1);function WEe({item:e,field:t}){if(t.hasElements)return(0,qg.jsx)(z2,{item:e,field:t});let r=Un({item:e,field:t});return!r||!xr(r).isValid()?r:(0,qg.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,qg.jsx)("div",{style:{width:"16px",height:"16px",borderRadius:"50%",backgroundColor:r,border:"1px solid #ddd",flexShrink:0}}),(0,qg.jsx)("span",{children:r})]})}function YEe(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)&&!xr(r).isValid()?(0,roe.__)("Value must be a valid color."):null}var qEe=(e,t,r)=>{let o=xr(e),n=xr(t);if(!o.isValid()&&!n.isValid())return 0;if(!o.isValid())return r==="asc"?1:-1;if(!n.isValid())return r==="asc"?-1:1;let i=o.toHsl(),a=n.toHsl();return i.h!==a.h?r==="asc"?i.h-a.h:a.h-i.h:i.s!==a.s?r==="asc"?i.s-a.s:a.s-i.s:r==="asc"?i.l-a.l:a.l-i.l},ooe={type:"color",render:WEe,Edit:"color",sort:qEe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[nr,ir],validOperators:[yr,br,nr,ir],format:{},getValueFormatted:Un,validate:{required:Or,elements:Yt,custom:YEe}};var noe={type:"url",render:Ar,Edit:"url",sort:al,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[nr,ir],validOperators:[yr,br,rl,ol,nl,nr,ir,mn,pn],format:{},getValueFormatted:Un,validate:{required:Or,pattern:ul,minLength:ll,maxLength:cl,elements:Yt}};var ZEe=(e,t,r)=>typeof e=="number"&&typeof t=="number"?Yg(e,t,r):al(e,t,r),ioe={render:Ar,Edit:null,sort:ZEe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[yr,br],validOperators:zte(),format:{},getValueFormatted:Un,validate:{required:Or,elements:Yt}};function soe(e,t){let r;e.isValid?.required===!0&&t.validate.required!==void 0&&(r={constraint:!0,validate:t.validate.required});let o;(e.isValid?.elements===!0||e.isValid?.elements===void 0&&(e.elements||e.getElements))&&t.validate.elements!==void 0&&(o={constraint:!0,validate:t.validate.elements});let n;typeof e.isValid?.min=="number"&&t.validate.min!==void 0&&(n={constraint:e.isValid.min,validate:t.validate.min});let i;typeof e.isValid?.max=="number"&&t.validate.max!==void 0&&(i={constraint:e.isValid.max,validate:t.validate.max});let a;typeof e.isValid?.minLength=="number"&&t.validate.minLength!==void 0&&(a={constraint:e.isValid.minLength,validate:t.validate.minLength});let l;typeof e.isValid?.maxLength=="number"&&t.validate.maxLength!==void 0&&(l={constraint:e.isValid.maxLength,validate:t.validate.maxLength});let c;e.isValid?.pattern!==void 0&&t.validate.pattern!==void 0&&(c={constraint:e.isValid?.pattern,validate:t.validate.pattern});let u=e.isValid?.custom??t.validate.custom;return{required:r,elements:o,min:n,max:i,minLength:a,maxLength:l,pattern:c,custom:u}}function aoe(e){return e.validOperators.reduce((t,r)=>{let o=jte(r);return o?.filter&&(t[r]=o.filter),t},{})}function KEe(e,t){return{...t.format,...e.format}}var loe=KEe;function XEe(e){let t=[Bre,Vre,Ure,Hre,Wre,qre,Kre,Xre,$re,eoe,toe,ooe,noe].find(r=>r?.type===e);return t||ioe}function X0(e){return e.map(t=>{let r=XEe(t.type),o=t.getValue||Ire(t.id),n=function(i,a,l){let c=o({item:i}),u=o({item:a});return t.sort?t.sort(c,u,l):r.sort(c,u,l)};return{id:t.id,label:t.label||t.id,header:t.header||t.label||t.id,description:t.description,placeholder:t.placeholder,getValue:o,setValue:t.setValue||Nre(t.id),elements:t.elements,getElements:t.getElements,hasElements:V2(t),isVisible:t.isVisible,enableHiding:t.enableHiding??!0,readOnly:t.readOnly??!1,type:r.type,render:t.render??r.render,Edit:Are(t,r.Edit),sort:n,enableSorting:t.enableSorting??r.enableSorting,enableGlobalSearch:t.enableGlobalSearch??r.enableGlobalSearch,isValid:soe(t,r),filterBy:Ore(t,r.defaultOperators,r.validOperators),filter:aoe(r),format:loe(t,r),getValueFormatted:t.getValueFormatted??r.getValueFormatted}})}var YN=s(D(),1);var coe=s(D(),1),uoe=s(C(),1),VN=(0,coe.createContext)({fields:[]});VN.displayName="DataFormContext";function doe({fields:e,children:t}){return(0,uoe.jsx)(VN.Provider,{value:{fields:e},children:t})}var Es=VN;var eE=s(D(),1);var Y2=s(D(),1),Q0=s(A(),1);var vn={type:"regular",labelPosition:"top"},QEe=e=>typeof e=="string"?[{id:e,visibility:"when-collapsed"}]:e.map(t=>typeof t=="string"?{id:t,visibility:"when-collapsed"}:{id:t.id,visibility:t.visibility});function foe(e){let t=vn;if(e?.type==="regular")t={type:"regular",labelPosition:e?.labelPosition??"top"};else if(e?.type==="panel"){let r=e.summary??[],o=Array.isArray(r)?r:[r];t={type:"panel",labelPosition:e?.labelPosition??"side",openAs:e?.openAs??"dropdown",summary:o,editVisibility:e?.editVisibility??"on-hover"}}else if(e?.type==="card")if(e.withHeader===!1)t={type:"card",withHeader:!1,isOpened:!0,summary:[],isCollapsible:!1};else{let r=e.summary??[];t={type:"card",withHeader:!0,isOpened:typeof e.isOpened=="boolean"?e.isOpened:!0,summary:QEe(r),isCollapsible:e.isCollapsible===void 0?!0:e.isCollapsible}}else e?.type==="row"?t={type:"row",alignment:e?.alignment??"center",styles:e?.styles??{}}:e?.type==="details"&&(t={type:"details",summary:e?.summary??""});return t}function moe(e){let t=foe(e?.layout),r=(e.fields??[]).map(o=>{if(typeof o=="string")return{id:o,layout:t};let n=o.layout?foe(o.layout):t;return{id:o.id,layout:n,...!!o.label&&{label:o.label},...!!o.description&&{description:o.description},..."children"in o&&Array.isArray(o.children)&&{children:moe({fields:o.children,layout:vn}).fields}}});return{layout:t,fields:r}}var W2=moe;var sr=s(C(),1);function JEe({title:e}){return(0,sr.jsx)(it,{direction:"column",className:"dataforms-layouts-regular__header",gap:"lg",children:(0,sr.jsx)(it,{direction:"row",align:"center",children:(0,sr.jsx)(Q0.__experimentalHeading,{level:2,size:13,children:e})})})}function poe({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{fields:a}=(0,Y2.useContext)(Es),l=t.layout,c=(0,Y2.useMemo)(()=>({layout:vn,fields:t.children?t.children:[]}),[t]);if(t.children)return(0,sr.jsxs)(sr.Fragment,{children:[!o&&t.label&&(0,sr.jsx)(JEe,{title:t.label}),(0,sr.jsx)(yi,{data:e,form:c,onChange:r,validity:i?.children})]});let u=l.labelPosition,d=a.find(f=>f.id===t.id);return!d||!d.Edit?null:u==="side"?(0,sr.jsxs)(it,{direction:"row",className:"dataforms-layouts-regular__field",gap:"sm",children:[(0,sr.jsx)("div",{className:re("dataforms-layouts-regular__field-label",`dataforms-layouts-regular__field-label--label-position-${u}`),children:(0,sr.jsx)(Q0.BaseControl.VisualLabel,{children:d.label})}),(0,sr.jsx)("div",{className:"dataforms-layouts-regular__field-control",children:d.readOnly===!0?(0,sr.jsx)(d.render,{item:e,field:d}):(0,sr.jsx)(d.Edit,{data:e,field:d,onChange:r,hideLabelFromVision:!0,markWhenOptional:n,validity:i},d.id)})]}):(0,sr.jsx)("div",{className:"dataforms-layouts-regular__field",children:d.readOnly===!0?(0,sr.jsx)(sr.Fragment,{children:(0,sr.jsxs)(sr.Fragment,{children:[!o&&u!=="none"&&(0,sr.jsx)(Q0.BaseControl.VisualLabel,{children:d.label}),(0,sr.jsx)(d.render,{item:e,field:d})]})}):(0,sr.jsx)(d.Edit,{data:e,field:d,onChange:r,hideLabelFromVision:u==="none"?!0:o,markWhenOptional:n,validity:i})})}var zN=s(sw(),1),Im=s(A(),1),UN=s(E(),1),ba=s(D(),1),X2=s(he(),1);var Kg=s(A(),1),Zg=s(E(),1);var boe=s(he(),1),Soe=s(D(),1);function $Ee(e,t){return re("dataforms-layouts-panel__field-label",`dataforms-layouts-panel__field-label--label-position-${e}`,{"has-error":t})}var hoe=$Ee;var q2=s(A(),1);var J0=s(C(),1);function eRe(e,t,r){return e?(0,J0.jsx)(q2.Tooltip,{text:t,placement:"top",children:(0,J0.jsxs)("span",{className:"dataforms-layouts-panel__field-label-error-content",children:[(0,J0.jsx)(q2.Icon,{icon:Cl,size:16}),r]})}):r}var goe=eRe;function voe(e){if(!e)return;let t=Object.keys(e).filter(r=>r!=="children");for(let r of t){let o=e[r];if(o!==void 0&&o.type==="invalid")return o.message?o.message:r==="required"?"A required field is empty":"Unidentified validation error"}if(e.children)for(let r of Object.values(e.children)){let o=voe(r);if(o)return o}}var yoe=voe;var Gi=s(C(),1);function $0({data:e,field:t,fieldLabel:r,summaryFields:o,validity:n,touched:i,disabled:a,onClick:l,"aria-expanded":c}){let{labelPosition:u,editVisibility:d}=t.layout,f=yoe(n),m=i&&!!f,h=hoe(u,m),g=goe(m,f,r),v=re("dataforms-layouts-panel__field-trigger",`dataforms-layouts-panel__field-trigger--label-${u}`,{"is-disabled":a,"dataforms-layouts-panel__field-trigger--edit-always":d==="always"}),y=(0,boe.useInstanceId)($0,"dataforms-layouts-panel__field-control"),b=m?(0,Zg.sprintf)((0,Zg._x)("Edit %s (has errors)","field"),r||""):(0,Zg.sprintf)((0,Zg._x)("Edit %s","field"),r||""),_=(0,Soe.useRef)(null);return(0,Gi.jsxs)("div",{ref:_,className:v,onClick:a?void 0:()=>{let T=_.current?.ownerDocument.defaultView?.getSelection();T&&T.toString().length>0||l()},onKeyDown:a?void 0:T=>{T.target===T.currentTarget&&(T.key==="Enter"||T.key===" ")&&(T.preventDefault(),l())},children:[u!=="none"&&(0,Gi.jsx)("span",{className:h,children:g}),u==="none"&&m&&(0,Gi.jsx)(Kg.Tooltip,{text:f,placement:"top",children:(0,Gi.jsx)("span",{className:"dataforms-layouts-panel__field-label-error-content",children:(0,Gi.jsx)(Kg.Icon,{icon:Cl,size:16})})}),(0,Gi.jsx)("span",{id:`${y}`,className:"dataforms-layouts-panel__field-control",children:o.length>1?(0,Gi.jsx)("span",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",width:"100%",gap:"2px"},children:o.map(T=>(0,Gi.jsx)("span",{style:{width:"100%"},children:(0,Gi.jsx)(T.render,{item:e,field:T})},T.id))}):o.map(T=>(0,Gi.jsx)(T.render,{item:e,field:T},T.id))}),!a&&(0,Gi.jsx)(Kg.Button,{className:"dataforms-layouts-panel__field-trigger-icon",label:b,showTooltip:!1,icon:Mv,size:"small","aria-expanded":c,"aria-haspopup":"dialog","aria-describedby":`${y}`})]})}var _oe=s(sw(),1),jN=s(yI(),1),dl=s(D(),1),Hn=s(E(),1);function woe(e){return e?Object.values(e).every(t=>Object.entries(t).every(([r,o])=>r==="children"&&o&&typeof o=="object"?woe(o):o.type!=="invalid"&&o.type!=="validating")):!0}function tRe(e,t){let r=W2(e);if(r.fields.length===0)return[];let o=new Map;t.forEach(a=>{o.set(a.id,a)});function n(a){if("children"in a&&Array.isArray(a.children)){let u=a.children.map(n).filter(f=>f!==null);if(u.length===0)return null;let d=o.get(a.id);if(d){let[f]=X0([d]);return{id:a.id,children:u,field:f}}return{id:a.id,children:u}}let l=o.get(a.id);if(!l)return null;let[c]=X0([l]);return{id:a.id,children:[],field:c}}return r.fields.map(n).filter(a=>a!==null)}function Xg(e,t,r){if(e||(e={}),r.length===0)return e;let o={...e},n=o;for(let a=0;a{if(l===o.current[t.id]){if(!Array.isArray(c)){n(u=>Xg(u,{elements:{type:"invalid",message:(0,Hn.__)("Could not validate elements.")}},[...i,t.id]));return}t.field?.isValid.elements&&!t.field.isValid.elements.validate(a,{...t.field,elements:c})?n(u=>Xg(u,{elements:{type:"invalid",message:(0,Hn.__)("Value must be one of the elements.")}},[...i,t.id])):n(u=>xoe(u,[...i,t.id],"elements"))}}).catch(c=>{if(l!==o.current[t.id])return;let u;c instanceof Error?u=c.message:u=String(c)||(0,Hn.__)("Unknown error when running elements validation asynchronously."),n(d=>Xg(d,{elements:{type:"invalid",message:u}},[...i,t.id]))})}function oRe(e,t,r){let{customCounterRef:o,setFormValidity:n,path:i}=r,a=(o.current[t.id]||0)+1;o.current[t.id]=a,e.then(l=>{if(a===o.current[t.id]){if(l===null){n(c=>xoe(c,[...i,t.id],"custom"));return}if(typeof l=="string"){n(c=>Xg(c,{custom:{type:"invalid",message:l}},[...i,t.id]));return}n(c=>Xg(c,{custom:{type:"invalid",message:(0,Hn.__)("Validation could not be processed.")}},[...i,t.id]))}}).catch(l=>{if(a!==o.current[t.id])return;let c;l instanceof Error?c=l.message:c=String(l)||(0,Hn.__)("Unknown error when running custom validation asynchronously."),n(u=>Xg(u,{custom:{type:"invalid",message:c}},[...i,t.id]))})}function Coe(e,t,r){if(t.field?.isValid.required&&!t.field.isValid.required.validate(e,t.field))return{required:{type:"invalid"}};if(t.field?.isValid.pattern&&!t.field.isValid.pattern.validate(e,t.field))return{pattern:{type:"invalid",message:(0,Hn.__)("Value does not match the required pattern.")}};if(t.field?.isValid.min&&!t.field.isValid.min.validate(e,t.field))return{min:{type:"invalid",message:(0,Hn.__)("Value is below the minimum.")}};if(t.field?.isValid.max&&!t.field.isValid.max.validate(e,t.field))return{max:{type:"invalid",message:(0,Hn.__)("Value is above the maximum.")}};if(t.field?.isValid.minLength&&!t.field.isValid.minLength.validate(e,t.field))return{minLength:{type:"invalid",message:(0,Hn.__)("Value is too short.")}};if(t.field?.isValid.maxLength&&!t.field.isValid.maxLength.validate(e,t.field))return{maxLength:{type:"invalid",message:(0,Hn.__)("Value is too long.")}};if(t.field?.isValid.elements&&t.field.hasElements&&!t.field.getElements&&Array.isArray(t.field.elements)&&!t.field.isValid.elements.validate(e,t.field))return{elements:{type:"invalid",message:(0,Hn.__)("Value must be one of the elements.")}};let o;if(t.field&&t.field.isValid.custom)try{let i=t.field.getValue({item:e});o=t.field.isValid.custom((0,_oe.default)(e,t.field.setValue({item:e,value:i})),t.field)}catch(i){let a;return i instanceof Error?a=i.message:a=String(i)||(0,Hn.__)("Unknown error when running custom validation."),{custom:{type:"invalid",message:a}}}if(typeof o=="string")return{custom:{type:"invalid",message:o}};let n={};if(t.field&&t.field.isValid.elements&&t.field.hasElements&&typeof t.field.getElements=="function"&&(rRe(t.field.getElements(),t,r),n.elements={type:"validating",message:(0,Hn.__)("Validating\u2026")}),o instanceof Promise&&(oRe(o,t,r),n.custom={type:"validating",message:(0,Hn.__)("Validating\u2026")}),Object.keys(n).length>0)return n;if(t.children.length>0){let i={};t.children.forEach(l=>{i[l.id]=Coe(e,l,{...r,path:[...r.path,t.id,"children"]})});let a={};return Object.entries(i).forEach(([l,c])=>{c!==void 0&&(a[l]=c)}),Object.keys(a).length===0?void 0:{children:a}}}function Toe(e,t){let r=e?.field?.getValue({item:t});if(e.children.length===0)return r;let o=e.children.map(n=>Toe(n,t));return o?{value:r,children:o}:r}function nRe(e,t,r){let[o,n]=(0,dl.useState)(),i=(0,dl.useRef)({}),a=(0,dl.useRef)({}),l=(0,dl.useRef)({}),c=(0,dl.useCallback)(()=>{let u={customCounterRef:i,elementsCounterRef:a,setFormValidity:n,path:[],item:e},d=tRe(r,t);if(d.length===0){n(void 0);return}let f={},m=[];d.forEach(h=>{let g=Toe(h,e);if(l.current.hasOwnProperty(h.id)&&(0,jN.default)(l.current[h.id],g)){m.push(h.id);return}l.current[h.id]=g;let v=Coe(e,h,u);v!==void 0&&(f[h.id]=v)}),n(h=>{let g={...h,...f},v=[...m,...Object.keys(f)];return Object.keys(g).forEach(b=>{g&&!v.includes(b)&&delete g[b]}),Object.keys(g).length===0&&(g=void 0),(0,jN.default)(h,g)?h:g})},[e,t,r]);return(0,dl.useEffect)(()=>{c()},[c]),{validity:o,isValid:woe(o)}}var Poe=nRe;var koe=s(D(),1);function Ed(e,t){(0,koe.useEffect)(()=>{t&&e.current&&e.current.querySelectorAll("input, textarea, select").forEach(o=>{o.reportValidity()})},[t,e])}var Eoe=s(D(),1);function iRe(e){return Array.isArray(e)?e.map(t=>typeof t=="string"?t:t.id):[]}var Z2=(e,t)=>Array.isArray(e)&&e.length>0?iRe(e).map(o=>t.find(n=>n.id===o)).filter(o=>o!==void 0):[];var sRe=(e,t)=>{let r=t.find(o=>o.id===e.id);return r||t.find(o=>{if(e.children){let n=e.children.filter(i=>!i.children);return n.length===0?!1:o.id===n[0].id}return o.id===e.id})};function aRe(e){let{fields:t}=(0,Eoe.useContext)(Es),r=e.layout,o=Z2(r.summary,t),n=sRe(e,t),i=e.children?e.label:n?.label;return o.length===0?{summaryFields:n?[n]:[],fieldDefinition:n,fieldLabel:i}:{summaryFields:o,fieldDefinition:n,fieldLabel:i}}var K2=aRe;var Gn=s(C(),1);function lRe({data:e,field:t,onChange:r,fieldLabel:o,onClose:n,touched:i}){let{fields:a}=(0,ba.useContext)(Es),[l,c]=(0,ba.useState)({}),u=(0,ba.useMemo)(()=>(0,zN.default)(e,l,{arrayMerge:(_,S)=>S}),[e,l]),d=(0,ba.useMemo)(()=>({layout:vn,fields:t.children?t.children:[{id:t.id,layout:vn}]}),[t]),f=a.map(_=>({..._,Edit:_.Edit===null?void 0:_.Edit,isValid:{required:_.isValid.required?.constraint,elements:_.isValid.elements?.constraint,min:_.isValid.min?.constraint,max:_.isValid.max?.constraint,pattern:_.isValid.pattern?.constraint,minLength:_.isValid.minLength?.constraint,maxLength:_.isValid.maxLength?.constraint}})),{validity:m}=Poe(u,f,d),h=()=>{r(l),n()},g=_=>{c(S=>(0,zN.default)(S,_,{arrayMerge:(x,T)=>T}))},v=(0,X2.useFocusOnMount)("firstInputElement"),y=(0,ba.useRef)(null),b=(0,X2.useMergeRefs)([v,y]);return Ed(y,i),(0,Gn.jsxs)(Im.Modal,{className:"dataforms-layouts-panel__modal",onRequestClose:n,isFullScreen:!1,title:o,size:"medium",children:[(0,Gn.jsx)("div",{ref:b,children:(0,Gn.jsx)(yi,{data:u,form:d,onChange:g,validity:m,children:(_,S,x,T)=>(0,Gn.jsx)(_,{data:u,field:S,onChange:g,hideLabelFromVision:d.fields.length<2,markWhenOptional:T,validity:x},S.id)})}),(0,Gn.jsxs)(it,{direction:"row",className:"dataforms-layouts-panel__modal-footer",gap:"md",children:[(0,Gn.jsx)(Im.__experimentalSpacer,{style:{flex:1}}),(0,Gn.jsx)(Im.Button,{variant:"tertiary",onClick:n,__next40pxDefaultSize:!0,children:(0,UN.__)("Cancel")}),(0,Gn.jsx)(Im.Button,{variant:"primary",onClick:h,__next40pxDefaultSize:!0,children:(0,UN.__)("Apply")})]})]})}function cRe({data:e,field:t,onChange:r,validity:o}){let[n,i]=(0,ba.useState)(!1),[a,l]=(0,ba.useState)(!1),{fieldDefinition:c,fieldLabel:u,summaryFields:d}=K2(t);if(!c)return null;let f=()=>{l(!1),i(!0)};return(0,Gn.jsxs)(Gn.Fragment,{children:[(0,Gn.jsx)($0,{data:e,field:t,fieldLabel:u,summaryFields:d,validity:o,touched:n,disabled:c.readOnly===!0,onClick:()=>l(!0),"aria-expanded":a}),a&&(0,Gn.jsx)(lRe,{data:e,field:t,onChange:r,fieldLabel:u??"",onClose:f,touched:n})]})}var Roe=cRe;var Rd=s(A(),1),Aoe=s(E(),1),jc=s(D(),1);var Ooe=s(he(),1);var yn=s(C(),1);function uRe({title:e,onClose:t}){return(0,yn.jsx)(it,{direction:"column",className:"dataforms-layouts-panel__dropdown-header",gap:"lg",children:(0,yn.jsxs)(it,{direction:"row",gap:"sm",align:"center",children:[e&&(0,yn.jsx)(Rd.__experimentalHeading,{level:2,size:13,children:e}),(0,yn.jsx)(Rd.__experimentalSpacer,{style:{flex:1}}),t&&(0,yn.jsx)(Rd.Button,{label:(0,Aoe.__)("Close"),icon:Kn,onClick:t,size:"small"})]})})}function dRe({touched:e,children:t}){let r=(0,jc.useRef)(null);return Ed(r,e),(0,yn.jsx)("div",{ref:r,children:t})}function fRe({data:e,field:t,onChange:r,validity:o}){let[n,i]=(0,jc.useState)(!1),[a,l]=(0,jc.useState)(null),c=(0,jc.useMemo)(()=>({anchor:a,placement:"left-start",offset:36,shift:!0}),[a]),[u,d]=(0,Ooe.__experimentalUseDialog)({focusOnMount:"firstInputElement"}),f=(0,jc.useMemo)(()=>({layout:vn,fields:t.children?t.children:[{id:t.id,layout:vn}]}),[t]),m=(0,jc.useMemo)(()=>{if(o!==void 0)return t.children?o?.children:{[t.id]:o}},[o,t]),{fieldDefinition:h,fieldLabel:g,summaryFields:v}=K2(t);return h?(0,yn.jsx)("div",{ref:l,className:"dataforms-layouts-panel__field-dropdown-anchor",children:(0,yn.jsx)(Rd.Dropdown,{contentClassName:"dataforms-layouts-panel__field-dropdown",popoverProps:c,focusOnMount:!1,onToggle:y=>{y||i(!0)},renderToggle:({isOpen:y,onToggle:b})=>(0,yn.jsx)($0,{data:e,field:t,fieldLabel:g,summaryFields:v,validity:o,touched:n,disabled:h.readOnly===!0,onClick:b,"aria-expanded":y}),renderContent:({onClose:y})=>(0,yn.jsx)(dRe,{touched:n,children:(0,yn.jsxs)("div",{ref:u,...d,children:[(0,yn.jsx)(uRe,{title:g,onClose:y}),(0,yn.jsx)(yi,{data:e,form:f,onChange:r,validity:m,children:(b,_,S,x)=>(0,yn.jsx)(b,{data:e,field:_,onChange:r,hideLabelFromVision:(f?.fields??[]).length<2,markWhenOptional:x,validity:S},_.id)})]})})})}):null}var Ioe=fRe;var HN=s(C(),1);function Noe({data:e,field:t,onChange:r,validity:o}){return t.layout.openAs==="modal"?(0,HN.jsx)(Roe,{data:e,field:t,onChange:r,validity:o}):(0,HN.jsx)(Ioe,{data:e,field:t,onChange:r,validity:o})}var Ad=s(A(),1),Boe=s(he(),1),bi=s(D(),1),GN=s(E(),1);var Q2=s(E(),1),Foe=s(C(),1);function Doe(e){if(!e)return 0;let t=0,r=Object.keys(e).filter(o=>o!=="children");for(let o of r)e[o]?.type==="invalid"&&t++;if(e.children)for(let o of Object.values(e.children))t+=Doe(o);return t}function J2({validity:e}){let t=Doe(e);return t===0?null:(0,Foe.jsx)(n6,{intent:"high",children:(0,Q2.sprintf)((0,Q2._n)("%d field needs attention","%d fields need attention",t),t)})}var Go=s(C(),1);function mRe(e,t,r){if(!t||Array.isArray(t)&&t.length===0)return!1;let n=(Array.isArray(t)?t:[t]).find(i=>typeof i=="string"?i===e.id:typeof i=="object"&&"id"in i?i.id===e.id:!1);return n?typeof n=="string"?!0:typeof n=="object"&&"visibility"in n?n.visibility==="always"||n.visibility==="when-collapsed"&&!r:!0:!1}function WN({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{fields:a}=(0,bi.useContext)(Es),l=t.layout,c=(0,bi.useRef)(null),u=(0,Boe.useInstanceId)(WN,"dataforms-layouts-card-card-body"),d=(0,bi.useMemo)(()=>({layout:vn,fields:t.children??[]}),[t]),{isOpened:f,isCollapsible:m}=l,[h,g]=(0,bi.useState)(f),[v,y]=(0,bi.useState)(!1);(0,bi.useEffect)(()=>{g(f)},[f]);let b=(0,bi.useCallback)(()=>{g(k=>(k&&y(!0),!k))},[]),_=m?h:!0,S=(0,bi.useCallback)(()=>{y(!0)},[y]);Ed(c,_&&v);let T=Z2(l.summary,a).filter(k=>mRe(k,l.summary,_)),R=v&&l.isCollapsible?(0,Go.jsx)(J2,{validity:i}):null,F={blockStart:"medium",blockEnd:"medium",inlineStart:"medium",inlineEnd:"medium"},B=t.label,z,L;if(t.children)z=!!B&&l.withHeader,L=(0,Go.jsxs)(Go.Fragment,{children:[t.description&&(0,Go.jsx)("div",{className:"dataforms-layouts-card__field-description",children:t.description}),(0,Go.jsx)(yi,{data:e,form:d,onChange:r,validity:i?.children})]});else{let k=a.find(U=>U.id===t.id);if(!k||!k.Edit)return null;let I=Nm("regular")?.component;if(!I)return null;B=k.label,z=!!B&&l.withHeader,L=(0,Go.jsx)(I,{data:e,field:t,onChange:r,hideLabelFromVision:o||z,markWhenOptional:n,validity:i})}let M={blockStart:z?"none":"medium",blockEnd:"medium",inlineStart:"medium",inlineEnd:"medium"};return(0,Go.jsxs)(Ad.Card,{className:"dataforms-layouts-card__field",size:F,children:[z&&(0,Go.jsxs)(Ad.CardHeader,{className:"dataforms-layouts-card__field-header",onClick:m?b:void 0,style:{cursor:m?"pointer":void 0},isBorderless:!0,children:[(0,Go.jsxs)("div",{style:{height:m?void 0:"40px",width:"100%",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,Go.jsx)("span",{className:"dataforms-layouts-card__field-header-label",children:B}),R,T.length>0&&l.withHeader&&(0,Go.jsx)("div",{className:"dataforms-layouts-card__field-summary",children:T.map(k=>(0,Go.jsx)(k.render,{item:e,field:k},k.id))})]}),m&&(0,Go.jsx)(Ad.Button,{__next40pxDefaultSize:!0,variant:"tertiary",icon:_?Tv:Cv,"aria-expanded":_,"aria-controls":u,"aria-label":_?(0,GN.__)("Collapse"):(0,GN.__)("Expand")})]}),(_||!z)&&(0,Go.jsx)(Ad.CardBody,{id:u,size:M,className:"dataforms-layouts-card__field-control",ref:c,onBlur:S,children:L})]})}var Moe=s(A(),1);var Io=s(C(),1);function pRe({title:e}){return(0,Io.jsx)(it,{direction:"column",className:"dataforms-layouts-row__header",gap:"lg",children:(0,Io.jsx)(it,{direction:"row",align:"center",children:(0,Io.jsx)(Moe.__experimentalHeading,{level:2,size:13,children:e})})})}var hRe=({children:e})=>(0,Io.jsx)(Io.Fragment,{children:e});function Loe({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let a=t.layout;if(t.children){let c={layout:vn,fields:t.children};return(0,Io.jsxs)("div",{className:"dataforms-layouts-row__field",children:[!o&&t.label&&(0,Io.jsx)(pRe,{title:t.label}),(0,Io.jsx)(it,{direction:"row",align:a.alignment,gap:"lg",children:(0,Io.jsx)(yi,{data:e,form:c,onChange:r,validity:i?.children,as:hRe,children:(u,d,f)=>(0,Io.jsx)("div",{className:"dataforms-layouts-row__field-control",style:a.styles[d.id],children:(0,Io.jsx)(u,{data:e,field:d,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:f})},d.id)})})]})}let l=Nm("regular")?.component;return l?(0,Io.jsx)(Io.Fragment,{children:(0,Io.jsx)("div",{className:"dataforms-layouts-row__field-control",children:(0,Io.jsx)(l,{data:e,field:t,onChange:r,markWhenOptional:n,validity:i})})}):null}var Si=s(D(),1),Voe=s(E(),1);var zc=s(C(),1);function joe({data:e,field:t,onChange:r,validity:o}){let{fields:n}=(0,Si.useContext)(Es),i=(0,Si.useRef)(null),a=(0,Si.useRef)(null),[l,c]=(0,Si.useState)(!1),[u,d]=(0,Si.useState)(!1),f=(0,Si.useMemo)(()=>({layout:vn,fields:t.children??[]}),[t]);(0,Si.useEffect)(()=>{let y=i.current;if(!y)return;let b=()=>{let _=y.open;_||c(!0),d(_)};return y.addEventListener("toggle",b),()=>{y.removeEventListener("toggle",b)}},[]),Ed(a,u&&l);let m=(0,Si.useCallback)(()=>{c(!0)},[]);if(!t.children)return null;let h=t.layout.summary??"",g=h?n.find(y=>y.id===h):void 0,v;return g&&g.render?v=(0,zc.jsx)(g.render,{item:e,field:g}):v=t.label||(0,Voe.__)("More details"),(0,zc.jsxs)("details",{ref:i,className:"dataforms-layouts-details__details",children:[(0,zc.jsx)("summary",{className:"dataforms-layouts-details__summary",children:(0,zc.jsxs)(it,{direction:"row",align:"center",gap:"md",className:"dataforms-layouts-details__summary-content",children:[v,l&&(0,zc.jsx)(J2,{validity:o})]})}),(0,zc.jsx)("div",{ref:a,className:"dataforms-layouts-details__content",onBlur:m,children:(0,zc.jsx)(yi,{data:e,form:f,onChange:r,validity:o?.children})})]})}var Fm=s(C(),1),gRe=[{type:"regular",component:poe,wrapper:({children:e})=>(0,Fm.jsx)(it,{direction:"column",className:"dataforms-layouts__wrapper",gap:"lg",children:e})},{type:"panel",component:Noe,wrapper:({children:e})=>(0,Fm.jsx)(it,{direction:"column",className:"dataforms-layouts__wrapper",gap:"md",children:e})},{type:"card",component:WN,wrapper:({children:e})=>(0,Fm.jsx)(it,{direction:"column",className:"dataforms-layouts__wrapper",gap:"xl",children:e})},{type:"row",component:Loe,wrapper:({children:e,layout:t})=>(0,Fm.jsx)(it,{direction:"column",className:"dataforms-layouts__wrapper",gap:"lg",children:(0,Fm.jsx)("div",{className:"dataforms-layouts-row__field",children:(0,Fm.jsx)(it,{direction:"row",gap:"lg",align:t.alignment,children:e})})})},{type:"details",component:joe}];function Nm(e){return gRe.find(t=>t.type===e)}var $2=s(C(),1),vRe=({children:e})=>(0,$2.jsx)(it,{direction:"column",className:"dataforms-layouts__wrapper",gap:"lg",children:e});function yi({data:e,form:t,onChange:r,validity:o,children:n,as:i}){let{fields:a}=(0,eE.useContext)(Es),l=(0,eE.useMemo)(()=>{let d=a.filter(m=>!!m.isValid?.required).length,f=a.length-d;return d>f},[a]);function c(d){return a.find(f=>f.id===d.id)}let u=i??Nm(t.layout.type)?.wrapper??vRe;return(0,$2.jsx)(u,{layout:t.layout,children:t.fields.map(d=>{let f=Nm(d.layout.type)?.component;if(!f)return null;let m=d.children?void 0:c(d);return m&&m.isVisible&&!m.isVisible(e)?null:n?n(f,d,o?.[d.id],l):(0,$2.jsx)(f,{data:e,field:d,onChange:r,markWhenOptional:l,validity:o?.[d.id]},d.id)})})}var qN=s(C(),1);function ZN({data:e,form:t,fields:r,onChange:o,validity:n}){let i=(0,YN.useMemo)(()=>W2(t),[t]),a=(0,YN.useMemo)(()=>X0(r),[r]);return t.fields?(0,qN.jsx)(doe,{fields:a,children:(0,qN.jsx)(yi,{data:e,form:i,onChange:o,validity:n})}):null}var tE=s(A(),1);var Dm=s(C(),1);function KN({form:e,header:t}){let{media:r,fields:o,onChange:n}=i2();if(!r||!n)return(0,Dm.jsx)("div",{className:"media-editor-form media-editor-form--loading",children:(0,Dm.jsx)(tE.Spinner,{})});let i={layout:{type:"panel"},fields:o.map(l=>["title","alt_text","caption","description"].includes(l.id)?{id:l.id,layout:{type:"regular",labelPosition:"top"}}:l.id)};return(0,Dm.jsx)("div",{className:"media-editor-form",children:(0,Dm.jsxs)(tE.__experimentalVStack,{spacing:4,children:[t,(0,Dm.jsx)(ZN,{data:r,fields:o,form:e||i,onChange:n})]})})}var zoe=s(O(),1);var XN=s(C(),1);function QN(e){let{media:t}=(0,zoe.useSelect)(r=>({media:r(w).getCurrentPost()}),[]);return(0,XN.jsx)(Y0,{value:t,children:(0,XN.jsx)(SN,{...e})})}var dE=s(O(),1),sne=s(D(),1),ane=s(W(),1);var Uoe=s(D(),1),rE=s(O(),1);function yRe({postType:e}){let{registerPostTypeSchema:t}=N((0,rE.useDispatch)(w));(0,Uoe.useEffect)(()=>{t(e)},[t,e]);let{fields:r}=(0,rE.useSelect)(o=>{let{getEntityFields:n}=N(o(w));return{fields:n("postType",e)}},[e]);return r}var oE=yRe;var _i=s(A(),1);var ene=s(W(),1),tne=s(O(),1),rne=s(D(),1),Gc=s(E(),1),one=s(xh(),1);var cE=s(O(),1),t1=s(D(),1),Qoe=s(E(),1),tv=s(A(),1);var Joe=s(W(),1);var e1=s(O(),1),aE=s(D(),1),Koe=s(W(),1);var Rs=s(E(),1),Hoe=s(D(),1),Uc=s(A(),1),Jg=s(O(),1),iE=s(W(),1),Goe=s(ct(),1);var nE=s(ft(),1);function Qg(e){return typeof e.title=="string"?(0,nE.decodeEntities)(e.title):e.title&&"rendered"in e.title?(0,nE.decodeEntities)(e.title.rendered):e.title&&"raw"in e.title?(0,nE.decodeEntities)(e.title.raw):""}var Od=s(C(),1),bRe=({items:e,closeModal:t})=>{let[r]=e,o=Qg(r),{showOnFront:n,currentHomePage:i,isSaving:a}=(0,Jg.useSelect)(g=>{let{getEntityRecord:v,isSavingEntityRecord:y}=g(iE.store),b=v("root","site"),_=v("postType","page",b?.page_on_front);return{showOnFront:b?.show_on_front,currentHomePage:_,isSaving:y("root","site")}}),{saveEntityRecord:l}=(0,Jg.useDispatch)(iE.store),{createSuccessNotice:c,createErrorNotice:u}=(0,Jg.useDispatch)(Goe.store);async function d(g){g.preventDefault();try{await l("root","site",{page_on_front:r.id,show_on_front:"page"}),c((0,Rs.__)("Homepage updated."),{type:"snackbar"})}catch(v){let y=v.message&&v.code!=="unknown_error"?v.message:(0,Rs.__)("An error occurred while setting the homepage.");u(y,{type:"snackbar"})}finally{t?.()}}let f="";n==="posts"?f=(0,Rs.__)("This will replace the current homepage which is set to display latest posts."):i&&(f=(0,Rs.sprintf)((0,Rs.__)('This will replace the current homepage: "%s"'),Qg(i)));let m=(0,Rs.sprintf)((0,Rs.__)('Set "%1$s" as the site homepage? %2$s'),o,f).trim(),h=(0,Rs.__)("Set homepage");return(0,Od.jsx)("form",{onSubmit:d,children:(0,Od.jsxs)(Uc.__experimentalVStack,{spacing:"5",children:[(0,Od.jsx)(Uc.__experimentalText,{children:m}),(0,Od.jsxs)(Uc.__experimentalHStack,{justify:"right",children:[(0,Od.jsx)(Uc.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{t?.()},disabled:a,accessibleWhenDisabled:!0,children:(0,Rs.__)("Cancel")}),(0,Od.jsx)(Uc.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",disabled:a,accessibleWhenDisabled:!0,children:h})]})]})})},Woe=()=>{let{pageOnFront:e,pageForPosts:t}=(0,Jg.useSelect)(r=>{let{getEntityRecord:o,canUser:n}=r(iE.store),i=n("read",{kind:"root",name:"site"})?o("root","site"):void 0;return{pageOnFront:i?.page_on_front,pageForPosts:i?.page_for_posts}});return(0,Hoe.useMemo)(()=>({id:"set-as-homepage",label:(0,Rs.__)("Set as homepage"),isEligible(r){return!(r.status!=="publish"||r.type!=="page"||e===r.id||t===r.id)},modalFocusOnMount:"firstContentElement",RenderModal:bRe}),[t,e])};var As=s(E(),1),Yoe=s(D(),1),Hc=s(A(),1),$g=s(O(),1),sE=s(W(),1),qoe=s(ct(),1);var Id=s(C(),1),SRe=({items:e,closeModal:t})=>{let[r]=e,o=Qg(r),{currentPostsPage:n,isPageForPostsSet:i,isSaving:a}=(0,$g.useSelect)(g=>{let{getEntityRecord:v,isSavingEntityRecord:y}=g(sE.store),b=v("root","site");return{currentPostsPage:v("postType","page",b?.page_for_posts),isPageForPostsSet:b?.page_for_posts!==0,isSaving:y("root","site")}}),{saveEntityRecord:l}=(0,$g.useDispatch)(sE.store),{createSuccessNotice:c,createErrorNotice:u}=(0,$g.useDispatch)(qoe.store);async function d(g){g.preventDefault();try{await l("root","site",{page_for_posts:r.id,show_on_front:"page"}),c((0,As.__)("Posts page updated."),{type:"snackbar"})}catch(v){let y=v.message&&v.code!=="unknown_error"?v.message:(0,As.__)("An error occurred while setting the posts page.");u(y,{type:"snackbar"})}finally{t?.()}}let f=i&&n?(0,As.sprintf)((0,As.__)('This will replace the current posts page: "%s"'),Qg(n)):(0,As.__)("This page will show the latest posts."),m=(0,As.sprintf)((0,As.__)('Set "%1$s" as the posts page? %2$s'),o,f),h=(0,As.__)("Set posts page");return(0,Id.jsx)("form",{onSubmit:d,children:(0,Id.jsxs)(Hc.__experimentalVStack,{spacing:"5",children:[(0,Id.jsx)(Hc.__experimentalText,{children:m}),(0,Id.jsxs)(Hc.__experimentalHStack,{justify:"right",children:[(0,Id.jsx)(Hc.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{t?.()},disabled:a,accessibleWhenDisabled:!0,children:(0,As.__)("Cancel")}),(0,Id.jsx)(Hc.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",disabled:a,accessibleWhenDisabled:!0,children:h})]})]})})},Zoe=()=>{let{pageOnFront:e,pageForPosts:t}=(0,$g.useSelect)(r=>{let{getEntityRecord:o,canUser:n}=r(sE.store),i=n("read",{kind:"root",name:"site"})?o("root","site"):void 0;return{pageOnFront:i?.page_on_front,pageForPosts:i?.page_for_posts}});return(0,Yoe.useMemo)(()=>({id:"set-as-posts-page",label:(0,As.__)("Set as posts page"),isEligible(r){return!(r.status!=="publish"||r.type!=="page"||e===r.id||t===r.id)},modalFocusOnMount:"firstContentElement",RenderModal:SRe}),[t,e])};var Xoe=s(C(),1);function lE({postType:e,onActionPerformed:t,context:r}){let{defaultActions:o}=(0,e1.useSelect)(c=>{let{getEntityActions:u}=N(c(w));return{defaultActions:u("postType",e)}},[e]),n=(0,e1.useSelect)(c=>{if(e!=="page")return!1;let{getDefaultTemplateId:u,getEntityRecord:d,canUser:f}=c(Koe.store);if(!f("update",{kind:"root",name:"site"}))return!1;let h=u({slug:"front-page"});if(!h)return!0;let g=d("postType","wp_template",h);return g?g.slug!=="front-page":!0},[e]),i=Woe(),a=Zoe(),{registerPostTypeSchema:l}=N((0,e1.useDispatch)(w));return(0,aE.useEffect)(()=>{l(e)},[l,e]),(0,aE.useMemo)(()=>{let c=[...o];if(n&&c.push(i,a),c=c.sort((u,d)=>d.id==="move-to-trash"?-1:0),c=c.filter(u=>u.context?u.context===r:!0),t)for(let u=0;u{d(f,{...m,onActionPerformed:h=>{m?.onActionPerformed&&m.onActionPerformed(h),t(c[u].id,h)}})}}}if(c[u].RenderModal){let d=c[u].RenderModal;c[u]={...c[u],RenderModal:f=>(0,Xoe.jsx)(d,{...f,onActionPerformed:m=>{f.onActionPerformed&&f.onActionPerformed(m),t(c[u].id,m)}})}}}return c},[r,o,t,i,a,n])}var Wo=s(C(),1),{Menu:ev,kebabCase:_Re}=N(tv.privateApis);function $oe({postType:e,postId:t,onActionPerformed:r}){let[o,n]=(0,t1.useState)(null),{item:i,permissions:a}=(0,cE.useSelect)(d=>{let{getEditedEntityRecord:f,getEntityRecordPermissions:m}=N(d(Joe.store));return{item:f("postType",e,t),permissions:m("postType",e,t)}},[t,e]),l=(0,t1.useMemo)(()=>({...i,permissions:a}),[i,a]),c=lE({postType:e,onActionPerformed:r}),u=(0,t1.useMemo)(()=>c.filter(d=>!d.isEligible||d.isEligible(l)),[c,l]);return(0,Wo.jsxs)(Wo.Fragment,{children:[(0,Wo.jsxs)(ev,{placement:"bottom-end",children:[(0,Wo.jsx)(ev.TriggerButton,{render:(0,Wo.jsx)(tv.Button,{size:"small",icon:Nr,label:(0,Qoe.__)("Actions"),disabled:!u.length,accessibleWhenDisabled:!0,className:"editor-all-actions-button"})}),(0,Wo.jsx)(ev.Popover,{children:(0,Wo.jsx)(CRe,{actions:u,items:[l],setActiveModalAction:n})})]}),!!o&&(0,Wo.jsx)(xRe,{action:o,items:[l],closeModal:()=>n(null)})]})}function wRe({action:e,onClick:t,items:r}){let o=typeof e.label=="string"?e.label:e.label(r);return(0,Wo.jsx)(ev.Item,{onClick:t,children:(0,Wo.jsx)(ev.ItemLabel,{children:o})})}function xRe({action:e,items:t,closeModal:r}){let o=typeof e.label=="string"?e.label:e.label(t);return(0,Wo.jsx)(tv.Modal,{title:e.modalHeader||o,__experimentalHideHeader:!!e.hideModalHeader,onRequestClose:r??(()=>{}),focusOnMount:"firstContentElement",size:"medium",overlayClassName:`editor-action-modal editor-action-modal__${_Re(e.id)}`,children:(0,Wo.jsx)(e.RenderModal,{items:t,closeModal:r})})}function CRe({actions:e,items:t,setActiveModalAction:r}){let o=(0,cE.useRegistry)();return(0,Wo.jsx)(ev.Group,{children:e.map(n=>(0,Wo.jsx)(wRe,{action:n,onClick:()=>{if("RenderModal"in n){r(n);return}n.callback(t,{registry:o})},items:t},n.id))})}var Wn=s(C(),1),{Badge:TRe}=N(_i.privateApis);function rv({postType:e,postId:t,hideActions:r=!1,onActionPerformed:o,onClose:n}){let i=(0,rne.useMemo)(()=>Array.isArray(t)?t:[t],[t]),{postTitle:a,icon:l,labels:c,isRevision:u}=(0,tne.useSelect)(m=>{let{getEditedEntityRecord:h,getCurrentTheme:g,getPostType:v}=m(ene.store),{getPostIcon:y,getCurrentPostType:b,isRevisionsMode:_,getCurrentRevision:S}=N(m(w)),x="";if(_()){let R=b(),F=S();return x=F?.title?.rendered||F?.title?.raw||"",{postTitle:x,icon:y(R,{area:F?.area}),labels:v(R)?.labels,isRevision:!0}}let T=h("postType",e,i[0]);if(i.length===1){let{default_template_types:R=[]}=g()??{};x=([xt,Ur].includes(e)?Zi({template:T,templateTypes:R}):{})?.title||T?.title}return{postTitle:x,icon:y(e,{area:T?.area}),labels:v(e)?.labels}},[i,e]),d=Qx(t),f=(0,Gc.__)("No title");return c?.name&&i.length>1?f=(0,Gc.sprintf)((0,Gc.__)("%1$d %2$s"),i.length,c?.name):a&&(f=(0,one.__unstableStripHTML)(a)),(0,Wn.jsxs)(_i.__experimentalVStack,{spacing:1,className:"editor-post-card-panel",children:[(0,Wn.jsxs)(_i.__experimentalHStack,{spacing:2,className:"editor-post-card-panel__header",alignment:"flex-start",children:[(0,Wn.jsx)(_i.Icon,{className:"editor-post-card-panel__icon",icon:l}),(0,Wn.jsxs)(_i.__experimentalText,{numberOfLines:2,truncate:!0,className:"editor-post-card-panel__title",as:"h2",children:[(0,Wn.jsx)("span",{className:"editor-post-card-panel__title-name",children:f}),d&&i.length===1&&(0,Wn.jsx)(TRe,{children:d})]}),!r&&i.length===1&&(0,Wn.jsx)(Wn.Fragment,{children:u?(0,Wn.jsx)(_i.Button,{size:"small",icon:Nr,label:(0,Gc.__)("Actions"),disabled:!0,accessibleWhenDisabled:!0,className:"editor-all-actions-button"}):(0,Wn.jsx)($oe,{postType:e,postId:i[0],onActionPerformed:o})}),n&&(0,Wn.jsx)(_i.Button,{size:"small",icon:RR,label:(0,Gc.__)("Close"),onClick:n})]}),i.length>1&&(0,Wn.jsx)(_i.__experimentalText,{className:"editor-post-card-panel__description",children:(0,Gc.sprintf)((0,Gc.__)("Changes will be applied to all selected %s."),c?.name.toLowerCase())})]})}var nne=s(A(),1),ine=s(C(),1);function PRe({className:e,children:t}){return(0,ine.jsx)(nne.__experimentalVStack,{className:re("editor-post-panel__section",e),children:t})}var uE=PRe;var r1=s(C(),1);function JN({onActionPerformed:e}){let{media:t,postType:r,postId:o}=(0,dE.useSelect)(c=>{let u=c(w).getCurrentPostType(),d=c(w).getCurrentPostId();return{media:c(ane.store).getEditedEntityRecord("postType",u,d,{_embed:"author,wp:attached-to"}),postType:u,postId:d}},[]),{editPost:n}=(0,dE.useDispatch)(w),i=oE({postType:"attachment"}),a=(0,sne.useMemo)(()=>({fields:i}),[i]);return(0,r1.jsx)(uE,{className:"editor-media-metadata-panel",children:(0,r1.jsx)(Y0,{value:t,settings:a,onChange:c=>{n(c)},children:(0,r1.jsx)(KN,{header:(0,r1.jsx)(rv,{postType:r,postId:o,onActionPerformed:e})})})})}var Ot=s(C(),1),lne={header:(0,Nd.__)("Editor top bar"),body:(0,Nd.__)("Editor content"),sidebar:(0,Nd.__)("Editor settings"),actions:(0,Nd.__)("Editor publish"),footer:(0,Nd.__)("Editor footer")},cne=()=>(0,Ot.jsx)(mne.InlineNotices,{pinnedNoticesClassName:"editor-notices__pinned",dismissibleNoticesClassName:"editor-notices__dismissible",children:(0,Ot.jsx)(CC,{})});function pne({className:e,children:t,forceIsDirty:r,contentRef:o,disableIframe:n,autoFocus:i,customSaveButton:a,customSavePanel:l,forceDisableBlockTools:c,iframeProps:u}){let{mode:d,postId:f,postType:m,isAttachment:h,isInserterOpened:g,isListViewOpened:v,isDistractionFree:y,isPreviewMode:b,showBlockBreadcrumbs:_,postTypeLabel:S,stylesPath:x,showStylebook:T,isRevisionsMode:R,showDiff:F}=(0,fE.useSelect)(Z=>{let{get:V}=Z(une.store),{getEditorSettings:j,getPostTypeLabel:H,getCurrentPostType:X,getCurrentPostId:ae}=Z(w),{getStylesPath:ne,getShowStylebook:ue,isRevisionsMode:Ye,isShowingRevisionDiff:ye}=N(Z(w)),oe=j(),ge=Z(w).getEditorMode();return!oe.richEditingEnabled&&ge==="visual"&&(ge="text"),!oe.codeEditingEnabled&&ge==="text"&&(ge="visual"),{mode:ge,postId:ae(),postType:X(),isInserterOpened:Z(w).isInserterOpened(),isListViewOpened:Z(w).isListViewOpened(),isDistractionFree:V("core","distractionFree"),isPreviewMode:oe.isPreviewMode,showBlockBreadcrumbs:V("core","showBlockBreadcrumbs"),postTypeLabel:H(),stylesPath:ne(),showStylebook:ue(),isAttachment:X()==="attachment"&&window?.__experimentalMediaEditor,isRevisionsMode:Ye(),showDiff:ye()}},[]),{setShowRevisionDiff:B}=N((0,fE.useDispatch)(w));Jee(f,m);let z=(0,dne.useViewportMatch)("medium"),L=v?(0,Nd.__)("Document Overview"):(0,Nd.__)("Block Library"),M=!!h,k=!h&&(T||x?.startsWith("/revisions")),I=!M&&!k,[U,G]=(0,pE.useState)(!1),Y=(0,pE.useCallback)(Z=>{typeof U=="function"&&U(Z),G(!1)},[U]);return R?(0,Ot.jsx)(ib,{className:re("editor-editor-interface",e),labels:lne,header:(0,Ot.jsx)(iN,{showDiff:F,onToggleDiff:()=>B(!F)}),content:(0,Ot.jsx)(pN,{}),sidebar:(0,Ot.jsx)(ql.Slot,{scope:"core"})}):(0,Ot.jsx)(ib,{isDistractionFree:y,className:re("editor-editor-interface",e,{"is-entity-save-view-open":!!U,"is-distraction-free":y&&!b}),labels:{...lne,secondarySidebar:L},header:!b&&(0,Ot.jsx)(tee,{forceIsDirty:r,setEntitiesSavedStatesCallback:G,customSaveButton:a,forceDisableBlockTools:c}),editorNotices:(0,Ot.jsx)(cne,{}),secondarySidebar:!h&&!b&&d==="visual"&&(g&&(0,Ot.jsx)(iee,{})||v&&(0,Ot.jsx)(cee,{})),sidebar:!b&&!y&&(0,Ot.jsx)(ql.Slot,{scope:"core"}),content:(0,Ot.jsxs)(Ot.Fragment,{children:[!y&&!b&&(0,Ot.jsx)(cne,{}),M&&(0,Ot.jsx)(QN,{...u}),k&&(0,Ot.jsx)(CW,{}),I&&(0,Ot.jsxs)(Ot.Fragment,{children:[!b&&d==="text"&&(0,Ot.jsx)(ote,{autoFocus:i}),!b&&!z&&d==="visual"&&(0,Ot.jsx)(mE.BlockToolbar,{hideDragHandle:!0}),(b||d==="visual")&&(0,Ot.jsx)(Kk,{contentRef:o,disableIframe:n,autoFocus:i,iframeProps:u}),t,(0,Ot.jsx)(Ek,{postId:f,postType:m})]})]}),footer:!b&&!y&&z&&_&&d==="visual"&&(0,Ot.jsx)(mE.BlockBreadcrumb,{rootLabelText:S?(0,fne.decodeEntities)(S):void 0}),actions:b?void 0:l||(0,Ot.jsx)(ete,{closeEntitiesSavedStates:Y,isEntitiesSavedStatesOpen:U,setEntitiesSavedStatesCallback:G,forceIsDirtyPublishPanel:r})})}var AE=s($(),1),l1=s(O(),1),hl=s(D(),1),cv=s(E(),1);var jie=s(Oi(),1),zie=s(A(),1);var hne=s(O(),1),gne=s(Ls(),1);var vne=s(C(),1),{OverridesPanel:kRe}=N(gne.privateApis);function yne(){return(0,hne.useSelect)(t=>t(w).getCurrentPostType()==="wp_block",[])?(0,vne.jsx)(kRe,{}):null}var Bm=s(A(),1),Kne=s(O(),1),Xne=s(E(),1),Qne=s(Ir(),1);var bne=s(A(),1),Sne=s(O(),1),Os=s(E(),1),_ne=s(k0(),1),wne=s(D(),1),$N=s(W(),1);var eF=s(C(),1),ERe=189;function xne(){let{postContent:e}=(0,Sne.useSelect)(a=>{let{getEditedPostAttribute:l,getCurrentPostType:c,getCurrentPostId:u}=a(w),{getCurrentRevision:d,isRevisionsMode:f}=N(a(w));if(f())return{postContent:d()?.content?.raw};let{canUser:m}=a($N.store),{getEntityRecord:h}=a($N.store),g=m("read",{kind:"root",name:"site"})?h("root","site"):void 0,v=c();return{postContent:!(+u()===g?.page_for_posts)&&![xt,Ur].includes(v)&&l("content")}},[]),t=(0,Os._x)("words","Word count type. Do not translate!"),r=(0,wne.useMemo)(()=>e?(0,_ne.count)(e,t):0,[e,t]);if(!r)return null;let o=Math.round(r/ERe),n=(0,Os.sprintf)((0,Os._n)("%s word","%s words",r),r.toLocaleString()),i=o<=1?(0,Os.__)("1 minute"):(0,Os.sprintf)((0,Os._n)("%s minute","%s minutes",o),o.toLocaleString());return(0,eF.jsx)("div",{className:"editor-post-content-information",children:(0,eF.jsx)(bne.__experimentalText,{children:(0,Os.sprintf)((0,Os.__)("%1$s, %2$s read time."),n,i)})})}var hE=s(A(),1),ov=s(E(),1),Cne=s(O(),1),gE=s(D(),1),Tne=s($(),1);var Wc=s(C(),1);function RRe(){let{postFormat:e}=(0,Cne.useSelect)(i=>{let{getEditedPostAttribute:a}=i(w);return{postFormat:a("format")??"standard"}},[]),t=i0.find(i=>i.id===e),[r,o]=(0,gE.useState)(null),n=(0,gE.useMemo)(()=>({anchor:r,placement:"left-start",offset:36,shift:!0}),[r]);return(0,Wc.jsx)(Kh,{children:(0,Wc.jsx)(ht,{label:(0,ov.__)("Format"),ref:o,children:(0,Wc.jsx)(hE.Dropdown,{popoverProps:n,contentClassName:"editor-post-format__dialog",focusOnMount:!0,renderToggle:({isOpen:i,onToggle:a})=>(0,Wc.jsx)(hE.Button,{size:"compact",variant:"tertiary","aria-expanded":i,"aria-label":(0,ov.sprintf)((0,ov.__)("Change format: %s"),t?.caption),onClick:a,children:t?.caption}),renderContent:({onClose:i})=>(0,Wc.jsxs)("div",{className:"editor-post-format__dialog-content",children:[(0,Wc.jsx)(Tne.__experimentalInspectorPopoverHeader,{title:(0,ov.__)("Format"),onClose:i}),(0,Wc.jsx)(s0,{})]})})})})}var Pne=RRe;var kne=s(A(),1),Ene=s(O(),1),vE=s(E(),1),Rne=s(po(),1);var tF=s(C(),1);function Ane(){let e=(0,Ene.useSelect)(t=>t(w).getEditedPostAttribute("modified"),[]);return e?(0,tF.jsx)("div",{className:"editor-post-last-edited-panel",children:(0,tF.jsx)(kne.__experimentalText,{children:(0,vE.sprintf)((0,vE.__)("Last edited %s."),(0,Rne.humanTimeDiff)(e))})}):null}var One=s(A(),1),Ine=s(O(),1),yE=s(E(),1),Nne=s(po(),1);var rF=s(C(),1);function Fne(){let e=(0,Ine.useSelect)(t=>{let{getCurrentRevision:r}=N(t(w));return r()?.date},[]);return e?(0,rF.jsx)("div",{className:"editor-post-last-edited-panel",children:(0,rF.jsx)(One.__experimentalText,{children:(0,yE.sprintf)((0,yE.__)("Created %s."),(0,Nne.humanTimeDiff)(e))})}):null}var Yc=s(E(),1),Dne=s(he(),1),bE=s(O(),1),oF=s(W(),1),Bne=s(ft(),1),nv=s(A(),1),SE=s(D(),1),Mne=s($(),1);var fl=s(C(),1),ARe={};function Lne(){let{editEntityRecord:e}=(0,bE.useDispatch)(oF.store),{postsPageTitle:t,postsPageId:r,isTemplate:o,postSlug:n}=(0,bE.useSelect)(d=>{let{getEntityRecord:f,getEditedEntityRecord:m,canUser:h}=d(oF.store),g=h("read",{kind:"root",name:"site"})?f("root","site"):void 0,v=g?.page_for_posts?m("postType","page",g?.page_for_posts):ARe,{getEditedPostAttribute:y,getCurrentPostType:b}=d(w);return{postsPageId:v?.id,postsPageTitle:v?.title,isTemplate:b()===xt,postSlug:y("slug")}},[]),[i,a]=(0,SE.useState)(null),l=(0,SE.useMemo)(()=>({anchor:i,placement:"left-start",offset:36,shift:!0}),[i]);if(!o||!["home","index"].includes(n)||!r)return null;let c=d=>{e("postType","page",r,{title:d})},u=(0,Bne.decodeEntities)(t);return(0,fl.jsx)(ht,{label:(0,Yc.__)("Blog title"),ref:a,children:(0,fl.jsx)(nv.Dropdown,{popoverProps:l,contentClassName:"editor-blog-title-dropdown__content",focusOnMount:!0,renderToggle:({isOpen:d,onToggle:f})=>(0,fl.jsx)(nv.Button,{size:"compact",variant:"tertiary","aria-expanded":d,"aria-label":(0,Yc.sprintf)((0,Yc.__)("Change blog title: %s"),u),onClick:f,children:u}),renderContent:({onClose:d})=>(0,fl.jsxs)(fl.Fragment,{children:[(0,fl.jsx)(Mne.__experimentalInspectorPopoverHeader,{title:(0,Yc.__)("Blog title"),onClose:d}),(0,fl.jsx)(nv.__experimentalInputControl,{placeholder:(0,Yc.__)("No title"),size:"__unstable-large",value:t,onChange:(0,Dne.debounce)(c,300),label:(0,Yc.__)("Blog title"),help:(0,Yc.__)("Set the Posts Page title. Appears in search results, and when the page is shared on social media."),hideLabelFromVision:!0})]})})})}var iv=s(E(),1),_E=s(O(),1),nF=s(W(),1),sv=s(A(),1),wE=s(D(),1),Vne=s($(),1);var ml=s(C(),1);function jne(){let{editEntityRecord:e}=(0,_E.useDispatch)(nF.store),{postsPerPage:t,isTemplate:r,postSlug:o}=(0,_E.useSelect)(c=>{let{getEditedPostAttribute:u,getCurrentPostType:d}=c(w),{getEditedEntityRecord:f,canUser:m}=c(nF.store),h=m("read",{kind:"root",name:"site"})?f("root","site"):void 0;return{isTemplate:d()===xt,postSlug:u("slug"),postsPerPage:h?.posts_per_page||1}},[]),[n,i]=(0,wE.useState)(null),a=(0,wE.useMemo)(()=>({anchor:n,placement:"left-start",offset:36,shift:!0}),[n]);if(!r||!["home","index"].includes(o))return null;let l=c=>{e("root","site",void 0,{posts_per_page:c})};return(0,ml.jsx)(ht,{label:(0,iv.__)("Posts per page"),ref:i,children:(0,ml.jsx)(sv.Dropdown,{popoverProps:a,contentClassName:"editor-posts-per-page-dropdown__content",focusOnMount:!0,renderToggle:({isOpen:c,onToggle:u})=>(0,ml.jsx)(sv.Button,{size:"compact",variant:"tertiary","aria-expanded":c,"aria-label":(0,iv.__)("Change posts per page"),onClick:u,children:t}),renderContent:({onClose:c})=>(0,ml.jsxs)(ml.Fragment,{children:[(0,ml.jsx)(Vne.__experimentalInspectorPopoverHeader,{title:(0,iv.__)("Posts per page"),onClose:c}),(0,ml.jsx)(sv.__experimentalNumberControl,{placeholder:0,value:t,size:"__unstable-large",spinControls:"custom",step:"1",min:"1",onChange:l,label:(0,iv.__)("Posts per page"),help:(0,iv.__)("Set the default number of posts to display on blog pages, including categories and tags. Some templates may override this setting."),hideLabelFromVision:!0})]})})})}var wi=s(E(),1),xE=s(O(),1),iF=s(W(),1),pl=s(A(),1),CE=s(D(),1),zne=s($(),1);var Is=s(C(),1),ORe=[{label:(0,wi._x)("Open",'Adjective: e.g. "Comments are open"'),value:"open",description:(0,wi.__)("Visitors can add new comments and replies.")},{label:(0,wi.__)("Closed"),value:"",description:[(0,wi.__)("Visitors cannot add new comments or replies."),(0,wi.__)("Existing comments remain visible.")].join(" ")}];function Une(){let{editEntityRecord:e}=(0,xE.useDispatch)(iF.store),{allowCommentsOnNewPosts:t,isTemplate:r,postSlug:o}=(0,xE.useSelect)(c=>{let{getEditedPostAttribute:u,getCurrentPostType:d}=c(w),{getEditedEntityRecord:f,canUser:m}=c(iF.store),h=m("read",{kind:"root",name:"site"})?f("root","site"):void 0;return{isTemplate:d()===xt,postSlug:u("slug"),allowCommentsOnNewPosts:h?.default_comment_status||""}},[]),[n,i]=(0,CE.useState)(null),a=(0,CE.useMemo)(()=>({anchor:n,placement:"left-start",offset:36,shift:!0}),[n]);if(!r||!["home","index"].includes(o))return null;let l=c=>{e("root","site",void 0,{default_comment_status:c?"open":null})};return(0,Is.jsx)(ht,{label:(0,wi.__)("Discussion"),ref:i,children:(0,Is.jsx)(pl.Dropdown,{popoverProps:a,contentClassName:"editor-site-discussion-dropdown__content",focusOnMount:!0,renderToggle:({isOpen:c,onToggle:u})=>(0,Is.jsx)(pl.Button,{size:"compact",variant:"tertiary","aria-expanded":c,"aria-label":(0,wi.__)("Change discussion settings"),onClick:u,children:t?(0,wi.__)("Comments open"):(0,wi.__)("Comments closed")}),renderContent:({onClose:c})=>(0,Is.jsxs)(Is.Fragment,{children:[(0,Is.jsx)(zne.__experimentalInspectorPopoverHeader,{title:(0,wi.__)("Discussion"),onClose:c}),(0,Is.jsxs)(pl.__experimentalVStack,{spacing:3,children:[(0,Is.jsx)(pl.__experimentalText,{children:(0,wi.__)("Changes will apply to new posts only. Individual posts may override these settings.")}),(0,Is.jsx)(pl.RadioControl,{className:"editor-site-discussion__options",hideLabelFromVision:!0,label:(0,wi.__)("Comment status"),options:ORe,onChange:l,selected:t})]})]})})})}var Hne=s(O(),1),Gne=s(W(),1),Wne=s(ft(),1),Yne=s(E(),1);var qne=s(C(),1);function Zne(){let e=(0,Hne.useSelect)(t=>{let{getCurrentRevision:r}=N(t(w)),o=r();return o?.author?t(Gne.store).getUser(o.author)?.name:null},[]);return e?(0,qne.jsx)(ht,{label:(0,Yne.__)("Author"),children:(0,Wne.decodeEntities)(e)}):null}var nt=s(C(),1),IRe="post-status";function Jne({onActionPerformed:e}){let{isRemovedPostStatusPanel:t,postType:r,postId:o,revisionId:n}=(0,Kne.useSelect)(l=>{let{isEditorPanelRemoved:c,getCurrentPostType:u,getCurrentPostId:d,getCurrentRevisionId:f}=N(l(w));return{isRemovedPostStatusPanel:c(IRe),postType:u(),postId:d(),revisionId:f()}},[]),i=!!n,a=!t&&!i;return(0,nt.jsx)(uE,{className:"editor-post-summary",children:(0,nt.jsx)(ZC.Slot,{children:l=>(0,nt.jsx)(nt.Fragment,{children:(0,nt.jsxs)(Bm.__experimentalVStack,{spacing:4,children:[(0,nt.jsx)(rv,{postType:r,postId:o,onActionPerformed:e}),!i&&(0,nt.jsx)(kT,{withPanelBody:!1}),!i&&(0,nt.jsx)(TZ,{}),(0,nt.jsxs)(Bm.__experimentalVStack,{spacing:1,children:[(0,nt.jsx)(xne,{}),i?(0,nt.jsx)(Fne,{}):(0,nt.jsx)(Ane,{})]}),i&&n&&(0,nt.jsxs)(nt.Fragment,{children:[(0,nt.jsx)(Bm.ExternalLink,{href:(0,Qne.addQueryArgs)("revision.php",{revision:n}),children:(0,Xne.__)("Open classic revisions screen")}),(0,nt.jsx)(Zne,{})]}),a&&(0,nt.jsxs)(Bm.__experimentalVStack,{spacing:4,children:[(0,nt.jsxs)(Bm.__experimentalVStack,{spacing:1,children:[(0,nt.jsx)(y4,{}),(0,nt.jsx)(yP,{}),(0,nt.jsx)(ZP,{}),(0,nt.jsx)(aT,{}),(0,nt.jsx)(eT,{}),(0,nt.jsx)(vT,{}),(0,nt.jsx)(UZ,{}),(0,nt.jsx)(DC,{}),(0,nt.jsx)(_P,{}),(0,nt.jsx)(Lne,{}),(0,nt.jsx)(jne,{}),(0,nt.jsx)(Une,{}),(0,nt.jsx)(Pne,{}),l]}),(0,nt.jsx)(zP,{onActionPerformed:e})]})]})})})})}var tie=s(BI(),1),rie=s(O(),1),oie=s(D(),1),nie=s(E(),1);var $ne=s(A(),1);var Mm=s(C(),1);function TE({title:e,entries:t,initialOpen:r}){if(!t)return null;let o=Object.entries(t).map(([n,i])=>(0,Mm.jsx)(ht,{label:n,children:(0,Mm.jsx)("span",{className:"editor-revision-fields-diff__value",children:i.map((a,l)=>a.added?(0,Mm.jsx)("ins",{className:"editor-revision-fields-diff__added",children:a.value},l):a.removed?(0,Mm.jsx)("del",{className:"editor-revision-fields-diff__removed",children:a.value},l):(0,Mm.jsx)("span",{children:a.value},l))})},n));return(0,Mm.jsx)($ne.PanelBody,{title:e,initialOpen:r,children:o})}var iie=s(C(),1);function eie(e){return e==null?"":typeof e=="object"?JSON.stringify(e,null,2):String(e)}function sie(){let{revision:e,previousRevision:t}=(0,rie.useSelect)(o=>{let{getCurrentRevision:n,getPreviousRevision:i}=N(o(w));return{revision:n(),previousRevision:i()}},[]),r=(0,oie.useMemo)(()=>{if(!e)return null;let o=e.meta??{},n=t?.meta??{},i=new Set([...Object.keys(o),...Object.keys(n)]),a={};for(let l of i){let c=eie(o[l]),u=eie(n[l]);!c&&!u||(a[l]=(0,tie.diffWords)(u,c))}return Object.keys(a).length===0?null:a},[e,t]);return(0,iie.jsx)(TE,{title:(0,nie.__)("Meta"),entries:r,initialOpen:!1})}var n1=s(O(),1),aF=s(W(),1),mie=s(A(),1),lF=s(E(),1),pie=s($(),1),hie=s(Xe(),1);var aie=s(O(),1),lie=s(D(),1),sF=s(W(),1),cie=s(Xe(),1),uie=s(Ls(),1);var{EXCLUDED_PATTERN_SOURCES:NRe,PATTERN_TYPES:FRe}=N(uie.privateApis);function die(e,t){return e.innerBlocks=e.innerBlocks.map(r=>die(r,t)),e.name==="core/template-part"&&e.attributes.theme===void 0&&(e.attributes.theme=t),e}function DRe(e,t){let r=(i,a,l)=>a===l.findIndex(c=>i.name===c.name),o=i=>t.area==="navigation-overlay"&&i.blockTypes?.includes("core/template-part/navigation-overlay")?!0:!NRe.includes(i.source),n=i=>i.templateTypes?.includes(t.slug)||i.blockTypes?.includes("core/template-part/"+t.area);return e.filter((i,a,l)=>r(i,a,l)&&o(i)&&n(i))}function BRe(e,t){return e.map(r=>({...r,keywords:r.keywords||[],type:FRe.theme,blocks:(0,cie.parse)(r.content,{__unstableSkipMigrationLogs:!0}).map(o=>die(o,t))}))}function fie({area:e,name:t,slug:r}){let{blockPatterns:o,restBlockPatterns:n,currentThemeStylesheet:i}=(0,aie.useSelect)(a=>{let{getEditorSettings:l}=a(w),c=l();return{blockPatterns:c.__experimentalAdditionalBlockPatterns??c.__experimentalBlockPatterns,restBlockPatterns:a(sF.store).getBlockPatterns(),currentThemeStylesheet:a(sF.store).getCurrentTheme().stylesheet}},[]);return(0,lie.useMemo)(()=>{let a=[...o||[],...n||[]],l=DRe(a,{area:e,name:t,slug:r});return BRe(l,i)},[e,t,r,o,n,i])}var o1=s(C(),1);function MRe({availableTemplates:e,onSelect:t}){return!e||e?.length===0?null:(0,o1.jsx)(pie.__experimentalBlockPatternsList,{label:(0,lF.__)("Templates"),blockPatterns:e,onClickPattern:t,showTitlesAsTooltip:!0})}function LRe(){let{area:e,name:t,slug:r,postType:o,postId:n}=(0,n1.useSelect)(c=>{let{getCurrentPostType:u,getCurrentPostId:d}=c(w),{getEditedEntityRecord:f}=c(aF.store),m=u(),h=d(),g=f("postType",m,h);return{area:g?.area,name:g?.name,slug:g?.slug,postType:m,postId:h}},[]),{editEntityRecord:i}=(0,n1.useDispatch)(aF.store),a=fie({area:e,name:t,slug:r}),l=async c=>{await i("postType",o,n,{blocks:c.blocks,content:(0,hie.serialize)(c.blocks)})};return a?.length?(0,o1.jsx)(mie.PanelBody,{title:(0,lF.__)("Design"),initialOpen:o===Ur,children:(0,o1.jsx)(MRe,{availableTemplates:a,onSelect:l})}):null}function gie(){let{postType:e}=(0,n1.useSelect)(t=>{let{getCurrentPostType:r}=t(w);return{postType:r()}},[]);return[Ur,xt].includes(e)?(0,o1.jsx)(LRe,{}):null}var vie=s(A(),1),i1=s(E(),1),yie=s(O(),1),bie=s(D(),1),Sie=s(ft(),1);var s1=s(C(),1),{Tabs:cF}=N(vie.privateApis),VRe=(e,t)=>{let{postTypeLabel:r,isAttachment:o,isRevisionsMode:n}=(0,yie.useSelect)(a=>{let{getPostTypeLabel:l,getCurrentPostType:c}=a(w),{isRevisionsMode:u}=N(a(w));return{postTypeLabel:l(),isAttachment:c()===ur&&window?.__experimentalMediaEditor,isRevisionsMode:u()}},[]),i;return n?i=(0,i1.__)("Revision"):r?i=(0,Sie.decodeEntities)(r):i=(0,i1._x)("Document","noun, panel"),(0,s1.jsxs)(cF.TabList,{ref:t,children:[(0,s1.jsx)(cF.Tab,{tabId:mi.document,"data-tab-id":mi.document,children:i}),!o&&(0,s1.jsx)(cF.Tab,{tabId:mi.block,"data-tab-id":mi.block,children:(0,i1.__)("Block")})]})},_ie=(0,bie.forwardRef)(VRe);var a1=s(O(),1),wie=s($(),1),xie=s(A(),1),Cie=s(E(),1);var PE=s(C(),1),{BlockQuickNavigation:jRe}=N(wie.privateApis),zRe="core/template-part";function URe({postType:e}){let t=pw(),r=(0,a1.useSelect)(n=>{let{getPostBlocksByName:i}=N(n(w));return i(xt===e?zRe:t)},[e,t]),{enableComplementaryArea:o}=(0,a1.useDispatch)(Ce);return r.length===0?null:(0,PE.jsx)(xie.PanelBody,{title:(0,Cie.__)("Content"),children:(0,PE.jsx)(jRe,{clientIds:r,onSelect:()=>{o("core","edit-post/document")}})})}function Tie(){let{postType:e,renderingMode:t}=(0,a1.useSelect)(r=>{let{getCurrentPostType:o,getRenderingMode:n}=N(r(w));return{postType:o(),renderingMode:n()}},[]);return t==="post-only"&&e!==xt?null:(0,PE.jsx)(URe,{postType:e})}var kE=s(O(),1),Pie=s(D(),1),kie=s(Xe(),1),RE=s($(),1),Eie=s(A(),1),Rie=s(E(),1);var EE=s(C(),1),{BlockQuickNavigation:HRe}=N(RE.privateApis);function GRe(){let e=(0,kE.useSelect)(o=>{let{getBlockTypes:n}=o(kie.store);return n()},[]),t=(0,Pie.useMemo)(()=>e.filter(o=>o.category==="theme").map(({name:o})=>o),[e]),r=(0,kE.useSelect)(o=>{let{getBlocksByName:n}=o(RE.store);return n(t)},[t]);return r.length===0?null:(0,EE.jsx)(Eie.PanelBody,{title:(0,Rie.__)("Content"),children:(0,EE.jsx)(HRe,{clientIds:r})})}function Aie(){return(0,kE.useSelect)(t=>{let{getCurrentPostType:r}=t(w);return r()},[])!==Ur?null:(0,EE.jsx)(GRe,{})}var Oie=s($(),1),Iie=s(O(),1),Nie=s(E(),1);var Fie=s(C(),1);function Die(){let{block:e}=(0,Iie.useSelect)(r=>{let{getSelectedBlock:o}=r(Oie.store);return{block:o()}},[]);if(!e)return null;let t=e.attributes?.__revisionDiffStatus?.changedAttributes;return(0,Fie.jsx)(TE,{title:(0,Nie.__)("Changed attributes"),entries:t,initialOpen:!0})}var av=s(O(),1),Bie=s(D(),1),Mie=s($(),1),Lie=s(lt(),1);function WRe(){let{hasBlockSelection:e}=(0,av.useSelect)(n=>({hasBlockSelection:!!n(Mie.store).getBlockSelectionStart()}),[]),{getActiveComplementaryArea:t}=(0,av.useSelect)(Ce),{enableComplementaryArea:r}=(0,av.useDispatch)(Ce),{get:o}=(0,av.useSelect)(Lie.store);(0,Bie.useEffect)(()=>{let n=t("core"),i=["edit-post/document","edit-post/block"].includes(n),a=o("core","distractionFree");!i||a||(e?r("core","edit-post/block"):r("core","edit-post/document"))},[e,t,r,o])}var Vie=WRe;var qt=s(C(),1),{Tabs:lv}=N(zie.privateApis),YRe=hl.Platform.select({web:!0,native:!1}),qRe=({tabName:e,keyboardShortcut:t,onActionPerformed:r,extraPanels:o,postType:n})=>{let i=(0,hl.useRef)(null),a=(0,hl.useContext)(lv.Context),l=n===ur,c=(0,l1.useSelect)(u=>N(u(w)).isRevisionsMode());return(0,hl.useEffect)(()=>{let u=Array.from(i.current?.querySelectorAll('[role="tab"]')||[]),d=u.find(h=>h.getAttribute("data-tab-id")===e),f=d?.ownerDocument.activeElement;u.some(h=>f&&f.id===h.id)&&d&&d.id!==f?.id&&d?.focus()},[e]),(0,qt.jsx)(nm,{identifier:e,header:(0,qt.jsx)(lv.Context.Provider,{value:a,children:(0,qt.jsx)(_ie,{ref:i})}),closeLabel:(0,cv.__)("Close Settings"),className:"editor-sidebar__panel",headerClassName:"editor-sidebar__panel-tabs",title:(0,cv._x)("Settings","panel button label"),toggleShortcut:t,icon:(0,cv.isRTL)()?zd:Ud,isActiveByDefault:YRe,children:(0,qt.jsxs)(lv.Context.Provider,{value:a,children:[(0,qt.jsx)(lv.TabPanel,{tabId:mi.document,focusable:!1,children:l?(0,qt.jsx)(JN,{onActionPerformed:r}):(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(Jne,{onActionPerformed:r}),c&&(0,qt.jsx)(sie,{}),!c&&(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(GC.Slot,{}),(0,qt.jsx)(Tie,{}),(0,qt.jsx)(Aie,{}),(0,qt.jsx)(gie,{}),(0,qt.jsx)(CP,{}),(0,qt.jsx)(yne,{}),o]})]})}),!l&&(0,qt.jsxs)(lv.TabPanel,{tabId:mi.block,focusable:!1,children:[(0,qt.jsx)(AE.BlockInspector,{}),c&&(0,qt.jsx)(Die,{})]})]})})},ZRe=({extraPanels:e,onActionPerformed:t})=>{Vie();let{tabName:r,keyboardShortcut:o,showSummary:n,postType:i}=(0,l1.useSelect)(c=>{let u=c(jie.store).getShortcutRepresentation("core/editor/toggle-sidebar"),d=c(Ce).getActiveComplementaryArea("core"),f=[mi.block,mi.document].includes(d),m=d;f||(m=c(AE.store).getBlockSelectionStart()?mi.block:mi.document);let h=c(w).getCurrentPostType();return{tabName:m,keyboardShortcut:u,showSummary:![xt,Ur,jd].includes(h),postType:h}},[]),{enableComplementaryArea:a}=(0,l1.useDispatch)(Ce),l=(0,hl.useCallback)(c=>{c&&a("core",c)},[a]);return(0,qt.jsx)(lv,{selectedTabId:r,onSelect:l,selectOnMove:!1,children:(0,qt.jsx)(qRe,{tabName:r,keyboardShortcut:o,showSummary:n,onActionPerformed:t,extraPanels:e,postType:i})})},Uie=ZRe;var gv=s(E(),1),bl=s(O(),1),yse=s(A(),1),bse=s(D(),1),Sse=s(he(),1),_se=s(Oi(),1);var hF=s($(),1);var wse=s(lt(),1);var uv="edit-post/collab-history-sidebar",Fd="edit-post/collab-sidebar",uF=[uv,Fd];var uo=s(D(),1),ar=s(A(),1),ase=s(he(),1);var gt=s(E(),1),Zc=s(O(),1),lse=s(xh(),1),mv=s($(),1);var OE=s(A(),1),IE=s(E(),1),vl=s(po(),1),Hie=s(W(),1),Gie=s(O(),1),Wie=s($(),1);var gl=s(C(),1);function KRe({avatar:e,name:t,date:r,userId:o}){let n=!!e,i=(0,vl.getSettings)(),{currentUserAvatar:a,currentUserName:l,currentUserId:c,dateFormat:u=i.formats.date}=(0,Gie.useSelect)(v=>{let{canUser:y,getCurrentUser:b,getEntityRecord:_}=v(Hie.store),S=y("read",{kind:"root",name:"site"})?_("root","site"):void 0;if(n)return{dateFormat:S?.date_format};let{getSettings:x}=v(Wie.store),{__experimentalDiscussionSettings:T}=x(),R=T?.avatarURL,F=b();return{currentUserAvatar:F?.avatar_urls?.[48]??R,currentUserName:F?.name,currentUserId:F?.id,dateFormat:S?.date_format}},[n]),d=(0,vl.getDate)(r),f=(0,vl.dateI18n)("c",d),h=Math.floor((new Date-d)/(1e3*60*60*24))<30?(0,vl.humanTimeDiff)(d):(0,vl.dateI18n)(u,d),g=(0,vl.dateI18n)((0,IE._x)("F j, Y g:i\xA0a","Note date full date format"),r);return(0,gl.jsxs)(gl.Fragment,{children:[(0,gl.jsx)("img",{src:e||a,className:"editor-collab-sidebar-panel__user-avatar",alt:(0,IE.__)("User avatar"),width:32,height:32,style:{borderColor:ws(o??c)}}),(0,gl.jsxs)(OE.__experimentalVStack,{spacing:"0",children:[(0,gl.jsx)("span",{className:"editor-collab-sidebar-panel__user-name",children:t??l}),r&&(0,gl.jsx)(OE.Tooltip,{text:g,children:(0,gl.jsx)("time",{dateTime:f,className:"editor-collab-sidebar-panel__user-time",children:h})})]})]})}var c1=KRe;var Yie=s(x4(),1),qie=s(D(),1),Ns=s(A(),1),dF=s(E(),1),NE=s(he(),1),Zie=s(yo(),1);var yl=s(C(),1);function Kie({onSubmit:e,onCancel:t,thread:r,submitButtonText:o,labelText:n,reflowComments:i=Og}){let[a,l]=(0,qie.useState)(r?.content?.raw??""),c=(0,NE.useDebounce)(i,100),u=m=>{l(m)},d=(0,NE.useInstanceId)(Kie,"comment-input"),f=a===r?.content?.raw||!x$(a).length;return(0,yl.jsxs)(Ns.__experimentalVStack,{className:"editor-collab-sidebar-panel__comment-form",spacing:"4",as:"form",onSubmit:m=>{m.preventDefault(),e(a),l("")},children:[(0,yl.jsx)(Ns.VisuallyHidden,{as:"label",htmlFor:d,children:n??(0,dF.__)("Note")}),(0,yl.jsx)(Yie.default,{id:d,value:a??"",onChange:m=>{u(m.target.value),c()},rows:1,maxRows:20,onKeyDown:m=>{Zie.isKeyboardEvent.primary(m,"Enter")&&!f&&m.target.parentNode.requestSubmit(),m.key==="Escape"&&(m.preventDefault(),t(m))}}),(0,yl.jsxs)(Ns.__experimentalHStack,{spacing:"2",justify:"flex-end",wrap:!0,children:[(0,yl.jsx)(Ns.Button,{size:"compact",variant:"tertiary",onClick:t,children:(0,yl.jsx)(Ns.__experimentalTruncate,{children:(0,dF.__)("Cancel")})}),(0,yl.jsx)(Ns.Button,{size:"compact",accessibleWhenDisabled:!0,variant:"primary",type:"submit",disabled:f,children:(0,yl.jsx)(Ns.__experimentalTruncate,{children:o})})]})]})}var u1=Kie;var Qr=s(Jn(),1),BE=s(Jn(),1),Jie=s(s5(),1);var FE=typeof document<"u"?BE.useLayoutEffect:BE.useEffect;function DE(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,o,n;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(o=r;o--!==0;)if(!DE(e[o],t[o]))return!1;return!0}if(n=Object.keys(e),r=n.length,r!==Object.keys(t).length)return!1;for(o=r;o--!==0;)if(!{}.hasOwnProperty.call(t,n[o]))return!1;for(o=r;o--!==0;){let i=n[o];if(!(i==="_owner"&&e.$$typeof)&&!DE(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function $ie(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Xie(e,t){let r=$ie(e);return Math.round(t*r)/r}function Qie(e){let t=Qr.useRef(e);return FE(()=>{t.current=e}),t}function ese(e){e===void 0&&(e={});let{placement:t="bottom",strategy:r="absolute",middleware:o=[],platform:n,elements:{reference:i,floating:a}={},transform:l=!0,whileElementsMounted:c,open:u}=e,[d,f]=Qr.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[m,h]=Qr.useState(o);DE(m,o)||h(o);let[g,v]=Qr.useState(null),[y,b]=Qr.useState(null),_=Qr.useCallback(Z=>{Z!==R.current&&(R.current=Z,v(Z))},[]),S=Qr.useCallback(Z=>{Z!==F.current&&(F.current=Z,b(Z))},[]),x=i||g,T=a||y,R=Qr.useRef(null),F=Qr.useRef(null),B=Qr.useRef(d),z=c!=null,L=Qie(c),M=Qie(n),k=Qr.useCallback(()=>{if(!R.current||!F.current)return;let Z={placement:t,strategy:r,middleware:m};M.current&&(Z.platform=M.current),o6(R.current,F.current,Z).then(V=>{let j={...V,isPositioned:!0};I.current&&!DE(B.current,j)&&(B.current=j,Jie.flushSync(()=>{f(j)}))})},[m,t,r,M]);FE(()=>{u===!1&&B.current.isPositioned&&(B.current.isPositioned=!1,f(Z=>({...Z,isPositioned:!1})))},[u]);let I=Qr.useRef(!1);FE(()=>(I.current=!0,()=>{I.current=!1}),[]),FE(()=>{if(x&&(R.current=x),T&&(F.current=T),x&&T){if(L.current)return L.current(x,T,k);k()}},[x,T,k,L,z]);let U=Qr.useMemo(()=>({reference:R,floating:F,setReference:_,setFloating:S}),[_,S]),G=Qr.useMemo(()=>({reference:x,floating:T}),[x,T]),Y=Qr.useMemo(()=>{let Z={position:r,left:0,top:0};if(!G.floating)return Z;let V=Xie(G.floating,d.x),j=Xie(G.floating,d.y);return l?{...Z,transform:"translate("+V+"px, "+j+"px)",...$ie(G.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:V,top:j}},[r,l,G.floating,d.x,d.y]);return Qr.useMemo(()=>({...d,update:k,refs:U,elements:G,floatingStyles:Y}),[d,k,U,G,Y])}var qc=s(E(),1),Sa=s(D(),1),ME=s(W(),1),_a=s(O(),1),Lm=s($(),1),tse=s(ct(),1),rse=s(ft(),1);var{useBlockElement:XRe,cleanEmptyObject:QRe}=N(Lm.privateApis);function ose(e){let[t,r]=(0,Sa.useReducer)(()=>Date.now(),0),o={post:e,type:"note",status:"all",per_page:-1},{records:n}=(0,ME.useEntityRecords)("root","comment",o,{enabled:!!e&&typeof e=="number"}),{getBlockAttributes:i}=(0,_a.useSelect)(Lm.store),{clientIds:a}=(0,_a.useSelect)(u=>{let{getClientIdsWithDescendants:d}=u(Lm.store);return{clientIds:d()}},[]),{resultComments:l,unresolvedSortedThreads:c}=(0,Sa.useMemo)(()=>{if(!n||n.length===0)return{resultComments:[],unresolvedSortedThreads:[]};let u=a.reduce((x,T)=>{let R=i(T)?.metadata?.noteId;return R&&(x[T]=R),x},{}),d={},f=[],m=Object.keys(u).reduce((x,T)=>(x[u[T]]=T,x),{});if(n.forEach(x=>{let T=m[x.id];d[x.id]={...x,reply:[],blockClientId:x.parent===0?T:null}}),n.forEach(x=>{x.parent===0?f.push(d[x.id]):d[x.parent]&&d[x.parent].reply.push(d[x.id])}),f?.length===0)return{resultComments:[],unresolvedSortedThreads:[]};let h=f.map(x=>({...x,reply:[...x.reply].reverse()})),g=new Map(h.map(x=>[String(x.id),x])),v=new Set(Object.values(u).map(x=>String(x))),y=Object.values(u).map(x=>g.get(String(x))).filter(x=>x!==void 0&&x.status==="hold"),b=Object.values(u).map(x=>g.get(String(x))).filter(x=>x!==void 0&&x.status==="approved"),_=h.filter(x=>!v.has(String(x.id)));return{resultComments:[...y,...b,..._],unresolvedSortedThreads:y}},[a,n,i]);return{resultComments:l,unresolvedSortedThreads:c,reflowComments:r,commentLastUpdated:t}}function nse(e=Og){let{createNotice:t}=(0,_a.useDispatch)(tse.store),{saveEntityRecord:r,deleteEntityRecord:o}=(0,_a.useDispatch)(ME.store),{getCurrentPostId:n}=(0,_a.useSelect)(w),{getBlockAttributes:i,getSelectedBlockClientId:a}=(0,_a.useSelect)(Lm.store),{updateBlockAttributes:l}=(0,_a.useDispatch)(Lm.store),c=m=>{let h=m.message&&m.code!=="unknown_error"?(0,rse.decodeEntities)(m.message):(0,qc.__)("An error occurred while performing an update.");t("error",h,{type:"snackbar",isDismissible:!0})};return{onCreate:async({content:m,parent:h})=>{try{let g=await r("root","comment",{post:n(),content:m,status:"hold",type:"note",parent:h||0},{throwOnError:!0});if(!h&&g?.id){let v=a(),y=i(v)?.metadata;l(v,{metadata:{...y,noteId:g.id}})}return t("snackbar",h?(0,qc.__)("Reply added."):(0,qc.__)("Note added."),{type:"snackbar",isDismissible:!0}),setTimeout(e,300),g}catch(g){e(),c(g)}},onEdit:async({id:m,content:h,status:g})=>{let v=g||"updated",y={approved:(0,qc.__)("Note marked as resolved."),hold:(0,qc.__)("Note reopened."),updated:(0,qc.__)("Note updated.")};try{if(g==="approved"||g==="hold"){await r("root","comment",{id:m,status:g},{throwOnError:!0});let b={post:n(),content:h||"",type:"note",status:g,parent:m,meta:{_wp_note_status:g==="approved"?"resolved":"reopen"}};await r("root","comment",b,{throwOnError:!0})}else await r("root","comment",{id:m,content:h,status:g},{throwOnError:!0});t("snackbar",y[v]??(0,qc.__)("Note updated."),{type:"snackbar",isDismissible:!0}),e()}catch(b){e(),c(b)}},onDelete:async m=>{try{if(await o("root","comment",m.id,void 0,{throwOnError:!0}),!m.parent){let h=a(),g=i(h)?.metadata;l(h,{metadata:QRe({...g,noteId:void 0})})}t("snackbar",(0,qc.__)("Note deleted."),{type:"snackbar",isDismissible:!0}),e()}catch(h){e(),c(h)}}}}function ise(e=!1){let t=(0,_a.useRegistry)();(0,Sa.useEffect)(()=>{if(!e)return;let{getActiveComplementaryArea:r}=t.select(Ce),{disableComplementaryArea:o,enableComplementaryArea:n}=t.dispatch(Ce),i=t.subscribe(()=>{r("core")===null&&n("core",Fd)});return()=>{i(),r("core")===Fd&&o("core",Fd)}},[e,t])}function sse({thread:e,calculatedOffset:t,setHeights:r,selectedThread:o,setBlockRef:n,commentLastUpdated:i}){let a=XRe(e.blockClientId),l=(0,Sa.useCallback)((d,f)=>{r(m=>m[d]!==f?{...m,[d]:f}:m)},[r]),{y:c,refs:u}=ese({placement:"right-start",middleware:[r6({crossAxis:t||-16})],whileElementsMounted:t6});return(0,Sa.useEffect)(()=>{a&&u.setReference(a)},[a,u,i]),(0,Sa.useEffect)(()=>{u.floating?.current&&n(e.id,a)},[a,e.id,u.floating,n]),(0,Sa.useEffect)(()=>{if(u.floating?.current){let d=u.floating.current.scrollHeight;l(e.id,d)}},[e.id,l,u.floating,o,i]),{y:c,refs:u}}var LE=s(E(),1),fv=s(O(),1),VE=s(A(),1),d1=s($(),1);var dv=s(C(),1),{useBlockElement:JRe}=N(d1.privateApis);function jE({onSubmit:e,commentSidebarRef:t,reflowComments:r=Og,isFloating:o=!1,y:n,refs:i}){let{clientId:a}=(0,fv.useSelect)(m=>{let{getSelectedBlockClientId:h}=m(d1.store);return{clientId:h()}},[]),l=(0,fv.useSelect)(m=>N(m(w)).getSelectedNote(),[]),c=JRe(a),{toggleBlockSpotlight:u}=N((0,fv.useDispatch)(d1.store)),{selectNote:d}=N((0,fv.useDispatch)(w)),f=()=>{d(void 0),c?.focus(),u(a,!1)};return l!=="new"||!a?null:(0,dv.jsxs)(VE.__experimentalVStack,{className:re("editor-collab-sidebar-panel__thread is-selected",{"is-floating":o}),spacing:"3",tabIndex:0,"aria-label":(0,LE.__)("New note"),role:"treeitem",ref:o?i.setFloating:void 0,style:o?{top:n,opacity:n?void 0:0}:void 0,onBlur:m=>{m.currentTarget.contains(m.relatedTarget)||(u(a,!1),d(void 0))},children:[(0,dv.jsx)(VE.__experimentalHStack,{alignment:"left",spacing:"3",children:(0,dv.jsx)(c1,{})}),(0,dv.jsx)(u1,{onSubmit:async m=>{let{id:h}=await e({content:m});d(h),dn(h,t.current)},onCancel:f,reflowComments:r,submitButtonText:(0,LE.__)("Add note"),labelText:(0,LE.__)("New note")})]})}var et=s(C(),1),{useBlockElement:cse}=N(mv.privateApis),{Menu:f1}=N(ar.privateApis);function use({threads:e,onEditComment:t,onAddReply:r,onCommentDelete:o,commentSidebarRef:n,reflowComments:i,isFloating:a=!1,commentLastUpdated:l}){let[c,u]=(0,uo.useState)({}),[d,f]=(0,uo.useState)({}),[m,h]=(0,uo.useState)({}),{setCanvasMinHeight:g,selectNote:v}=N((0,Zc.useDispatch)(w)),{selectBlock:y,toggleBlockSpotlight:b}=N((0,Zc.useDispatch)(mv.store)),{blockCommentId:_,selectedBlockClientId:S,orderedBlockIds:x}=(0,Zc.useSelect)(I=>{let{getBlockAttributes:U,getSelectedBlockClientId:G,getClientIdsWithDescendants:Y}=I(mv.store),Z=G();return{blockCommentId:Z?U(Z)?.metadata?.noteId:null,selectedBlockClientId:Z,orderedBlockIds:Y()}},[]),{selectedNote:T,noteFocused:R}=(0,Zc.useSelect)(I=>{let{getSelectedNote:U,isNoteFocused:G}=N(I(w));return{selectedNote:U(),noteFocused:G()}},[]),F=cse(S),B=(0,uo.useMemo)(()=>{let I=[...e],U=[];if(a&&T==="new"){let G={id:"new",blockClientId:S,content:{rendered:""}};return x.forEach(Y=>{if(Y===S)U.push(G);else{let Z=I.find(V=>V.blockClientId===Y);Z&&U.push(Z)}}),U}return I},[e,a,T,S,x]),z=async I=>{let U=B.findIndex(Z=>Z.id===I.id),G=B[U+1],Y=B[U-1];if(await o(I),I.parent!==0){v(I.parent),dn(I.parent,n.current);return}G?(v(G.id),dn(G.id,n.current)):Y?(v(Y.id),dn(Y.id,n.current)):(v(void 0),b(I.blockClientId,!1),F?.focus())};(0,uo.useEffect)(()=>{v(_??void 0)},[_,v]),(0,uo.useEffect)(()=>{R&&T&&(dn(T,n.current,T==="new"?"textarea":void 0),v(T))},[R,T,v,n]),(0,uo.useEffect)(()=>{let I=()=>{let Y={};if(!a)return{offsets:Y,minHeight:0};let Z=B.findIndex(ge=>ge.id===T),V=Z===-1?0:Z,j=B[V];if(!j||!m[j.id])return{offsets:Y,minHeight:0};let H=m[j.id],X=H?.getBoundingClientRect(),ae=X?.top||0,ne=c[j.id]||0;Y[j.id]=-16;let ue={threadTop:ae-16,threadHeight:ne};for(let ge=V+1;ge=0;ge--){let Re=B[ge];if(!m[Re.id])continue;H=m[Re.id],X=H?.getBoundingClientRect();let ze=X?.top||0,Ve=c[Re.id]||0,tt=-16;ze+Ve>Ye.threadTop&&(tt=Ye.threadTop-ze-Ve-20),Y[Re.id]=tt,Ye={threadTop:ze+tt}}let ye=0,oe=B[B.length-1];if(m[oe.id]){let ze=m[oe.id]?.getBoundingClientRect()?.top||0,Ve=c[oe.id]||0,tt=Y[oe.id]||0;ye=ze+Ve+tt+32}return{offsets:Y,minHeight:ye}},{offsets:U,minHeight:G}=I();Object.keys(U).length>0&&f(U),g(G)},[c,m,a,B,T,g]);let L=(I,U,G)=>{if(I.defaultPrevented)return;let Y=B.findIndex(Z=>Z.id===U.id);if((I.key==="Enter"||I.key==="ArrowRight")&&I.currentTarget===I.target&&!G)v(U.id),U.blockClientId&&(y(U.blockClientId,null),b(U.blockClientId,!0));else if((I.key==="Enter"||I.key==="ArrowLeft")&&I.currentTarget===I.target&&G||I.key==="Escape")v(void 0),U.blockClientId&&b(U.blockClientId,!1),dn(U.id,n.current);else if(I.key==="ArrowDown"&&Y0&&I.currentTarget===I.target){let Z=B[Y-1];dn(Z.id,n.current)}else I.key==="Home"&&I.currentTarget===I.target?dn(B[0].id,n.current):I.key==="End"&&I.currentTarget===I.target&&dn(B[B.length-1].id,n.current)},M=(0,uo.useCallback)((I,U)=>{h(G=>({...G,[I]:U}))},[]);return!(Array.isArray(B)&&B.length>0)&&!a?(0,et.jsx)(jE,{onSubmit:r,commentSidebarRef:n}):(0,et.jsxs)(et.Fragment,{children:[!a&&T==="new"&&(0,et.jsx)(jE,{onSubmit:r,commentSidebarRef:n}),B.map(I=>(0,et.jsx)($Re,{thread:I,onAddReply:r,onCommentDelete:z,onEditComment:t,isSelected:T===I.id,commentSidebarRef:n,reflowComments:i,isFloating:a,calculatedOffset:d[I.id]??0,setHeights:u,setBlockRef:M,commentLastUpdated:l,onKeyDown:U=>L(U,I,T===I.id)},I.id))]})}function $Re({thread:e,onEditComment:t,onAddReply:r,onCommentDelete:o,isSelected:n,commentSidebarRef:i,reflowComments:a,isFloating:l,calculatedOffset:c,setHeights:u,setBlockRef:d,commentLastUpdated:f,onKeyDown:m}){let{toggleBlockHighlight:h,selectBlock:g,toggleBlockSpotlight:v}=N((0,Zc.useDispatch)(mv.store)),{selectNote:y}=N((0,Zc.useDispatch)(w)),b=(0,Zc.useSelect)(V=>N(V(w)).getSelectedNote(),[]),_=cse(e.blockClientId),S=(0,ase.useDebounce)(h,50),{y:x,refs:T}=sse({thread:e,calculatedOffset:c,setHeights:u,setBlockRef:d,selectedThread:b,commentLastUpdated:f}),R=(0,uo.useRef)(!1),F=()=>{S(e.blockClientId,!0)},B=()=>{S(e.blockClientId,!1)},z=()=>{h(e.blockClientId,!0)},L=V=>{let j=V.relatedTarget?.closest(".editor-collab-sidebar-panel__thread"),H=V.relatedTarget?.closest('[role="dialog"]'),X=R.current;j&&!X||H||X&&V.currentTarget.contains(V.relatedTarget)||(h(e.blockClientId,!1),k())},M=()=>{y(e.id),v(e.blockClientId,!0),e.blockClientId&&g(e.blockClientId,null)},k=()=>{y(void 0),v(e.blockClientId,!1)},I=e?.reply||[],U=I.length>0?I[I.length-1]:void 0,G=I.length>0?I.slice(0,-1):[],Y=C$((0,lse.__unstableStripHTML)(e.content?.rendered),10),Z=e.blockClientId?(0,gt.sprintf)((0,gt.__)("Note: %s"),Y):(0,gt.sprintf)((0,gt.__)("Original block deleted. Note: %s"),Y);return l&&e.id==="new"?(0,et.jsx)(jE,{onSubmit:r,commentSidebarRef:i,reflowComments:a,isFloating:l,y:x,refs:T}):(0,et.jsxs)(ar.__experimentalVStack,{className:re("editor-collab-sidebar-panel__thread",{"is-selected":n,"is-floating":l}),id:`comment-thread-${e.id}`,spacing:"3",onClick:M,onMouseEnter:F,onMouseLeave:B,onFocus:z,onBlur:L,onKeyUp:V=>{V.key==="Tab"&&(R.current=!1)},onKeyDown:V=>{V.key==="Tab"?R.current=!0:m(V)},tabIndex:0,role:"treeitem","aria-label":Z,"aria-expanded":n,ref:l?T.setFloating:void 0,style:l?{top:x}:void 0,children:[(0,et.jsx)(ar.Button,{className:"editor-collab-sidebar-panel__skip-to-comment",variant:"secondary",size:"compact",onClick:()=>{dn(e.id,i.current,"textarea")},children:(0,gt.__)("Add new reply")}),!e.blockClientId&&(0,et.jsx)(ar.__experimentalText,{as:"p",weight:500,variant:"muted",children:(0,gt.__)("Original block deleted.")}),(0,et.jsx)(fF,{thread:e,isExpanded:n,onEdit:(V={})=>{t(V),V.status==="approved"&&(k(),l?_?.focus():dn(e.id,i.current))},onDelete:o,reflowComments:a}),n&&I.map(V=>(0,et.jsx)(fF,{thread:V,parent:e,isExpanded:n,onEdit:t,onDelete:o,reflowComments:a},V.id)),!n&&G.length>0&&(0,et.jsx)(ar.__experimentalHStack,{className:"editor-collab-sidebar-panel__more-reply-separator",children:(0,et.jsx)(ar.Button,{size:"compact",variant:"tertiary",className:"editor-collab-sidebar-panel__more-reply-button",onClick:()=>{y(e.id),dn(e.id,i.current)},children:(0,gt.sprintf)((0,gt._n)("%s more reply","%s more replies",G.length),G.length)})}),!n&&U&&(0,et.jsx)(fF,{thread:U,parent:e,isExpanded:n,onEdit:t,onDelete:o,reflowComments:a}),n&&(0,et.jsxs)(ar.__experimentalVStack,{spacing:"2",role:"treeitem",children:[(0,et.jsx)(ar.__experimentalHStack,{alignment:"left",spacing:"3",justify:"flex-start",children:(0,et.jsx)(c1,{})}),(0,et.jsx)(ar.__experimentalVStack,{spacing:"2",children:(0,et.jsx)(u1,{onSubmit:V=>{e.status==="approved"?t({id:e.id,status:"hold",content:V}):r({content:V,parent:e.id})},onCancel:V=>{V.stopPropagation(),k(),dn(e.id,i.current)},submitButtonText:e.status==="approved"?(0,gt.__)("Reopen & Reply"):(0,gt.__)("Reply"),rows:e.status==="approved"?2:4,labelText:(0,gt.sprintf)((0,gt.__)("Reply to note %1$s by %2$s"),e.id,e.author_name),reflowComments:a})})]}),!!e.blockClientId&&(0,et.jsx)(ar.Button,{className:"editor-collab-sidebar-panel__skip-to-block",variant:"secondary",size:"compact",onClick:V=>{V.stopPropagation(),_?.focus()},children:(0,gt.__)("Back to block")})]})}var fF=({thread:e,parent:t,isExpanded:r,onEdit:o,onDelete:n,reflowComments:i})=>{let[a,l]=(0,uo.useState)(!1),[c,u]=(0,uo.useState)(!1),d=(0,uo.useRef)(null),f=()=>{n(e),l(!1),u(!1)},m=()=>{l(!1),u(!1),d.current?.focus()},h=e.type==="note"&&e.meta&&(e.meta._wp_note_status==="resolved"||e.meta._wp_note_status==="reopen"),g=[{id:"edit",title:(0,gt.__)("Edit"),isEligible:({status:_})=>_!=="approved",onClick:()=>{l("edit")}},{id:"reopen",title:(0,gt._x)("Reopen","Reopen note"),isEligible:({status:_})=>_==="approved",onClick:()=>{o({id:e.id,status:"hold"})}},{id:"delete",title:(0,gt.__)("Delete"),isEligible:()=>!0,onClick:()=>{l("delete"),u(!0)}}],v=e.parent===0,y=t?.status!=="approved"?g.filter(_=>_.isEligible(e)):[],b=e.parent===0?(0,gt.__)("Are you sure you want to delete this note? This will also delete all of this note's replies."):(0,gt.__)("Are you sure you want to delete this reply?");return(0,et.jsxs)(ar.__experimentalVStack,{spacing:"2",role:e.parent!==0?"treeitem":void 0,children:[(0,et.jsxs)(ar.__experimentalHStack,{alignment:"left",spacing:"3",justify:"flex-start",children:[(0,et.jsx)(c1,{avatar:e?.author_avatar_urls?.[48],name:e?.author_name,date:e?.date,userId:e?.author}),r&&(0,et.jsx)(ar.FlexItem,{className:"editor-collab-sidebar-panel__comment-status",onClick:_=>{_.stopPropagation()},children:(0,et.jsxs)(ar.__experimentalHStack,{spacing:"0",children:[v&&(0,et.jsx)(ar.Button,{label:(0,gt._x)("Resolve","Mark note as resolved"),size:"small",icon:Hd,disabled:e.status==="approved",accessibleWhenDisabled:e.status==="approved",onClick:()=>{o({id:e.id,status:"approved"})}}),(0,et.jsxs)(f1,{placement:"bottom-end",children:[(0,et.jsx)(f1.TriggerButton,{render:(0,et.jsx)(ar.Button,{ref:d,size:"small",icon:Nr,label:(0,gt.__)("Actions"),disabled:!y.length,accessibleWhenDisabled:!0})}),(0,et.jsx)(f1.Popover,{modal:!1,children:y.map(_=>(0,et.jsx)(f1.Item,{onClick:()=>_.onClick(),children:(0,et.jsx)(f1.ItemLabel,{children:_.title})},_.id))})]})]})})]}),a==="edit"?(0,et.jsx)(u1,{onSubmit:_=>{o({id:e.id,content:_}),l(!1),d.current?.focus()},onCancel:()=>m(),thread:e,submitButtonText:(0,gt._x)("Update","verb"),labelText:(0,gt.sprintf)((0,gt.__)("Edit note %1$s by %2$s"),e.id,e.author_name),reflowComments:i}):(0,et.jsx)(uo.RawHTML,{className:re("editor-collab-sidebar-panel__user-comment",{"editor-collab-sidebar-panel__resolution-text":h}),children:h?(()=>{let _=e.meta._wp_note_status==="resolved"?(0,gt.__)("Marked as resolved"):(0,gt.__)("Reopened"),S=e?.content?.raw;return S&&typeof S=="string"&&S.trim()!==""?(0,gt.sprintf)((0,gt.__)("%1$s: %2$s"),_,S):_})():e?.content?.rendered}),a==="delete"&&(0,et.jsx)(ar.__experimentalConfirmDialog,{isOpen:c,onConfirm:f,onCancel:m,confirmButtonText:(0,gt.__)("Delete"),children:b})]})};var dse=s(A(),1),zE=s(E(),1),HE=s($(),1),mF=s(O(),1),fse=s(Xe(),1),mse=s(Oi(),1);var UE=s(C(),1),{CommentIconSlotFill:eAe}=N(HE.privateApis),tAe=({clientId:e,onClick:t,isDistractionFree:r})=>{let o=(0,mF.useSelect)(l=>l(HE.store).getBlock(e),[e]),n=(0,mF.useSelect)(l=>l(mse.store).getShortcutRepresentation("core/editor/new-note"),[]);if(!o?.isValid||o?.name===(0,fse.getUnregisteredTypeHandlerName)())return null;let i=r||o?.name==="core/freeform",a;return r?a=(0,zE.__)("Notes are disabled in distraction free mode."):o?.name==="core/freeform"&&(a=(0,zE.__)("Convert to blocks to add notes.")),(0,UE.jsx)(dse.MenuItem,{onClick:t,"aria-haspopup":"dialog",disabled:i,info:a,shortcut:n,children:(0,zE.__)("Add note")})},rAe=({onClick:e,isDistractionFree:t})=>(0,UE.jsx)(eAe.Fill,{children:({clientId:r,onClose:o})=>(0,UE.jsx)(tAe,{clientId:r,isDistractionFree:t,onClick:()=>{e(r),o()}})}),pF=rAe;var hv=s(A(),1),pv=s(E(),1),pse=s(D(),1),hse=s($(),1);var Vm=s(C(),1),{CommentIconToolbarSlotFill:oAe}=N(hse.privateApis),nAe=({onClick:e,thread:t})=>{let r=(0,pse.useMemo)(()=>{if(!t)return[];let u=new Map,d=[t,...t.reply];return d.sort((f,m)=>new Date(f.date)-new Date(m.date)),d.forEach(f=>{f.author_name&&f.author_avatar_urls&&(u.has(f.author)||u.set(f.author,{name:f.author_name,avatar:f.author_avatar_urls?.["48"]||f.author_avatar_urls?.["96"],id:f.author,date:f.date}))}),Array.from(u.values())},[t]);if(!r.length)return null;let o=3,i=r.length>o?r.slice(0,o-1):r,a=Math.max(0,r.length-i.length),c=r.length>100&&a>0?(0,pv.__)("100+"):(0,pv.sprintf)((0,pv.__)("+%s"),a);return(0,Vm.jsx)(oAe.Fill,{children:(0,Vm.jsx)(hv.ToolbarButton,{className:"comment-avatar-indicator",label:(0,pv.__)("View notes"),onClick:()=>e(),showTooltip:!0,children:(0,Vm.jsxs)(hv.__experimentalHStack,{spacing:"1",children:[i.map(u=>(0,Vm.jsx)("img",{src:u.avatar,alt:u.name,className:"comment-avatar",style:{borderColor:ws(u.id)}},u.id)),a>0&&(0,Vm.jsx)(hv.__experimentalText,{weight:500,children:c})]})})})},gse=nAe;var Yo=s(C(),1);function vse({styles:e,comments:t,commentSidebarRef:r,reflowComments:o,commentLastUpdated:n,isFloating:i=!1}){let{onCreate:a,onEdit:l,onDelete:c}=nse(o);return(0,Yo.jsx)(yse.__experimentalVStack,{className:"editor-collab-sidebar-panel",style:e,role:"tree",spacing:"3",justify:"flex-start",ref:u=>{u&&(r.current=u)},"aria-label":i?(0,gv.__)("Unresolved notes"):(0,gv.__)("All notes"),children:(0,Yo.jsx)(use,{threads:t,onEditComment:l,onAddReply:a,onCommentDelete:c,commentSidebarRef:r,reflowComments:o,commentLastUpdated:n,isFloating:i})})}function iAe({postId:e}){let{getActiveComplementaryArea:t}=(0,bl.useSelect)(Ce),{enableComplementaryArea:r}=(0,bl.useDispatch)(Ce),{toggleBlockSpotlight:o,selectBlock:n}=N((0,bl.useDispatch)(hF.store)),{selectNote:i}=N((0,bl.useDispatch)(w)),a=(0,Sse.useViewportMatch)("medium"),l=(0,bse.useRef)(null),{clientId:c,blockCommentId:u,isClassicBlock:d}=(0,bl.useSelect)(F=>{let{getBlockAttributes:B,getSelectedBlockClientId:z,getBlockName:L}=F(hF.store),M=z();return{clientId:M,blockCommentId:M?B(M)?.metadata?.noteId:null,isClassicBlock:M?L(M)==="core/freeform":!1}},[]),{isDistractionFree:f}=(0,bl.useSelect)(F=>{let{get:B}=F(wse.store);return{isDistractionFree:B("core","distractionFree")}},[]),m=(0,bl.useSelect)(F=>N(F(w)).getSelectedNote(),[]),{resultComments:h,unresolvedSortedThreads:g,reflowComments:v,commentLastUpdated:y}=ose(e),b=a,_=h.length>0||!b;ise(b&&(g.length>0||m!==void 0)),(0,_se.useShortcut)("core/editor/new-note",F=>{F.preventDefault(),R()},{isDisabled:f||d||!c||!!u});let{merged:S}=fw(),x=S?.styles?.color?.background,T=u?h.find(F=>F.id===u):null;async function R(F){let B=await t("core"),z=uF.find(I=>I===B),L=F&&F!==c?F:c,M=h.find(I=>I.blockClientId===L);M?.status==="approved"?r("core",uv):(!z||!_)&&r("core",b?Fd:uv);let k=await t("core");uF.includes(k)&&(n(L,null),o(L,!0),i(M?M.id:"new",{focus:!0}))}return f?(0,Yo.jsx)(pF,{isDistractionFree:!0}):(0,Yo.jsxs)(Yo.Fragment,{children:[!!T&&(0,Yo.jsx)(gse,{thread:T,onClick:R}),(0,Yo.jsx)(pF,{onClick:R}),_&&(0,Yo.jsx)(nm,{identifier:uv,name:uv,title:(0,gv.__)("All notes"),header:(0,Yo.jsx)("h2",{className:"interface-complementary-area-header__title",children:(0,gv.__)("All notes")}),icon:jR,closeLabel:(0,gv.__)("Close Notes"),children:(0,Yo.jsx)(vse,{comments:h,commentSidebarRef:l})}),a&&(0,Yo.jsx)(nm,{isPinnable:!1,header:!1,identifier:Fd,className:"editor-collab-sidebar",headerClassName:"editor-collab-sidebar__header",backgroundColor:x,children:(0,Yo.jsx)(vse,{comments:g,commentSidebarRef:l,reflowComments:v,commentLastUpdated:y,styles:{backgroundColor:x},isFloating:!0})})]})}function xse(){let{postId:e,editorMode:t,revisionsMode:r}=(0,bl.useSelect)(o=>{let{getCurrentPostId:n,getEditorMode:i,isRevisionsMode:a}=N(o(w));return{postId:n(),editorMode:i(),revisionsMode:a()}},[]);return!e||typeof e!="number"||t==="text"||r?null:(0,Yo.jsx)(tr,{supportKeys:"editor.notes",children:(0,Yo.jsx)(iAe,{postId:e})})}var Sl=s(A(),1),vv=s(E(),1);var g1=s(O(),1),vF=s(D(),1),Ese=s(lt(),1),ZE=s(he(),1),Rse=s(W(),1);var Kc=s(A(),1),GE=s(O(),1),m1=s(E(),1),Cse=s(lt(),1);var Tse=s(W(),1);var wa=s(C(),1);function WE({hideWelcomeGuide:e=!1,onChangePath:t}){let{user:r,setUser:o}=xo(),n=!!r&&(Object.keys(r?.styles??{}).length>0||Object.keys(r?.settings??{}).length>0),i=()=>{o({styles:{},settings:{}})},{toggle:a}=(0,GE.useDispatch)(Cse.store),{canEditCSS:l}=(0,GE.useSelect)(u=>{let{getEntityRecord:d,__experimentalGetCurrentGlobalStylesId:f}=u(Tse.store),m=f();return{canEditCSS:!!(m?d("root","globalStyles",m):void 0)?._links?.["wp:action-edit-css"]}},[]),c=()=>{t("/css")};return(0,wa.jsx)(Kc.DropdownMenu,{icon:Nr,label:(0,m1.__)("More"),toggleProps:{size:"compact"},children:({onClose:u})=>(0,wa.jsxs)(wa.Fragment,{children:[(0,wa.jsxs)(Kc.MenuGroup,{children:[l&&(0,wa.jsx)(Kc.MenuItem,{onClick:c,children:(0,m1.__)("Additional CSS")}),!e&&(0,wa.jsx)(Kc.MenuItem,{onClick:()=>{a("core/edit-site","welcomeGuideStyles"),u()},children:(0,m1.__)("Welcome Guide")})]}),(0,wa.jsx)(Kc.MenuGroup,{children:(0,wa.jsx)(Kc.MenuItem,{onClick:()=>{i(),u()},disabled:!n,children:(0,m1.__)("Reset styles")})})]})})}var jm=s(C(),1);function Pse({className:e,identifier:t,title:r,icon:o,children:n,closeLabel:i,header:a,headerClassName:l,panelClassName:c,isActiveByDefault:u}){return(0,jm.jsxs)(jm.Fragment,{children:[(0,jm.jsx)(ql,{className:e,scope:"core",identifier:t,title:r,icon:o,closeLabel:i,header:a,headerClassName:l,panelClassName:c,isActiveByDefault:u,children:n}),(0,jm.jsx)(xu,{scope:"core",identifier:t,icon:o,children:r})]})}var YE=s(O(),1),qE=s(A(),1),Fs=s(E(),1),gF=s(lt(),1);var p1=s(C(),1);function h1({nonAnimatedSrc:e,animatedSrc:t}){return(0,p1.jsxs)("picture",{className:"editor-welcome-guide__image",children:[(0,p1.jsx)("source",{srcSet:e,media:"(prefers-reduced-motion: reduce)"}),(0,p1.jsx)("img",{src:t,width:"312",height:"240",alt:""})]})}var Qt=s(C(),1);function kse(){let{toggle:e}=(0,YE.useDispatch)(gF.store),{isActive:t,isStylesOpen:r}=(0,YE.useSelect)(n=>{let i=n(Ce).getActiveComplementaryArea("core");return{isActive:!!n(gF.store).get("core/edit-site","welcomeGuideStyles"),isStylesOpen:i==="edit-site/global-styles"}},[]);if(!t||!r)return null;let o=(0,Fs.__)("Welcome to Styles");return(0,Qt.jsx)(qE.Guide,{className:"editor-welcome-guide guide-styles",contentLabel:o,finishButtonText:(0,Fs.__)("Get started"),onFinish:()=>e("core/edit-site","welcomeGuideStyles"),pages:[{image:(0,Qt.jsx)(h1,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-to-styles.svg?1",animatedSrc:"https://s.w.org/images/block-editor/welcome-to-styles.gif?1"}),content:(0,Qt.jsxs)(Qt.Fragment,{children:[(0,Qt.jsx)("h1",{className:"editor-welcome-guide__heading",children:o}),(0,Qt.jsx)("p",{className:"editor-welcome-guide__text",children:(0,Fs.__)("Tweak your site, or give it a whole new look! Get creative \u2014 how about a new color palette for your buttons, or choosing a new font? Take a look at what you can do here.")})]})},{image:(0,Qt.jsx)(h1,{nonAnimatedSrc:"https://s.w.org/images/block-editor/set-the-design.svg?1",animatedSrc:"https://s.w.org/images/block-editor/set-the-design.gif?1"}),content:(0,Qt.jsxs)(Qt.Fragment,{children:[(0,Qt.jsx)("h1",{className:"editor-welcome-guide__heading",children:(0,Fs.__)("Set the design")}),(0,Qt.jsx)("p",{className:"editor-welcome-guide__text",children:(0,Fs.__)("You can customize your site as much as you like with different colors, typography, and layouts. Or if you prefer, just leave it up to your theme to handle!")})]})},{image:(0,Qt.jsx)(h1,{nonAnimatedSrc:"https://s.w.org/images/block-editor/personalize-blocks.svg?1",animatedSrc:"https://s.w.org/images/block-editor/personalize-blocks.gif?1"}),content:(0,Qt.jsxs)(Qt.Fragment,{children:[(0,Qt.jsx)("h1",{className:"editor-welcome-guide__heading",children:(0,Fs.__)("Personalize blocks")}),(0,Qt.jsx)("p",{className:"editor-welcome-guide__text",children:(0,Fs.__)("You can adjust your blocks to ensure a cohesive experience across your site \u2014 add your unique colors to a branded Button block, or adjust the Heading block to your preferred size.")})]})},{image:(0,Qt.jsx)(h1,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-documentation.svg",animatedSrc:"https://s.w.org/images/block-editor/welcome-documentation.gif"}),content:(0,Qt.jsxs)(Qt.Fragment,{children:[(0,Qt.jsx)("h1",{className:"editor-welcome-guide__heading",children:(0,Fs.__)("Learn more")}),(0,Qt.jsxs)("p",{className:"editor-welcome-guide__text",children:[(0,Fs.__)("New to block themes and styling your site?")," ",(0,Qt.jsx)(qE.ExternalLink,{href:(0,Fs.__)("https://wordpress.org/documentation/article/styles-overview/"),children:(0,Fs.__)("Here\u2019s a detailed guide to learn how to make the most of it.")})]})]})}]})}var qo=s(C(),1);function Ase(){let{shouldResetNavigation:e,stylesPath:t,showStylebook:r,showListViewByDefault:o,hasRevisions:n,activeComplementaryArea:i}=(0,g1.useSelect)(y=>{let{getActiveComplementaryArea:b}=y(Ce),{getStylesPath:_,getShowStylebook:S}=N(y(w)),x=y(w).getEditorMode()==="visual",T=y(Ese.store).get("core","showListViewByDefault"),{getEntityRecord:R,__experimentalGetCurrentGlobalStylesId:F}=y(Rse.store),B=F(),z=B?R("root","globalStyles",B):void 0;return{stylesPath:_(),showStylebook:S(),shouldResetNavigation:b("core")!=="edit-site/global-styles"||!x,showListViewByDefault:T,hasRevisions:!!z?._links?.["version-history"]?.[0]?.count,activeComplementaryArea:y(Ce).getActiveComplementaryArea("core")}},[]),{setStylesPath:a,setShowStylebook:l,resetStylesNavigation:c}=N((0,g1.useDispatch)(w)),u=(0,ZE.useViewportMatch)("medium","<"),d=t.startsWith("/revisions")&&!r,f=t.startsWith("/revisions")&&r,m=(0,ZE.usePrevious)(i);(0,vF.useEffect)(()=>{i==="edit-site/global-styles"&&m!=="edit-site/global-styles"&&c()},[i,m,c]),(0,vF.useEffect)(()=>{e&&c()},[e,c]);let{setIsListViewOpened:h}=(0,g1.useDispatch)(w),g=()=>{h(!1),a(d||f?"/":"/revisions")},v=()=>{h(r&&o),l(!r)};return(0,qo.jsxs)(qo.Fragment,{children:[(0,qo.jsx)(Pse,{className:"editor-global-styles-sidebar",identifier:"edit-site/global-styles",title:(0,vv.__)("Styles"),icon:YA,closeLabel:(0,vv.__)("Close Styles"),panelClassName:"editor-global-styles-sidebar__panel",header:(0,qo.jsxs)(Sl.Flex,{className:"editor-global-styles-sidebar__header",gap:1,children:[(0,qo.jsx)(Sl.FlexItem,{children:(0,qo.jsx)("h2",{className:"editor-global-styles-sidebar__header-title",children:(0,vv.__)("Styles")})}),(0,qo.jsxs)(Sl.Flex,{justify:"flex-end",gap:1,className:"editor-global-styles-sidebar__header-actions",children:[!u&&(0,qo.jsx)(Sl.FlexItem,{children:(0,qo.jsx)(Sl.Button,{icon:Gd,label:(0,vv.__)("Style Book"),isPressed:r,accessibleWhenDisabled:!0,disabled:e,onClick:v,size:"compact"})}),(0,qo.jsx)(Sl.FlexItem,{children:(0,qo.jsx)(Sl.Button,{label:(0,vv.__)("Revisions"),icon:xl,onClick:g,accessibleWhenDisabled:!0,disabled:!n,isPressed:d||f,size:"compact"})}),(0,qo.jsx)(WE,{onChangePath:a})]})]}),children:(0,qo.jsx)(Hx,{path:t,onPathChange:a})}),(0,qo.jsx)(kse,{})]})}var Ds=s(C(),1);function sAe({postType:e,postId:t,templateId:r,settings:o,children:n,initialEdits:i,onActionPerformed:a,extraContent:l,extraSidebarPanels:c,...u}){let{post:d,template:f,hasLoadedPost:m,error:h,isBlockTheme:g,showGlobalStyles:v}=(0,Ose.useSelect)(y=>{let{getEntityRecord:b,getResolutionError:_,hasFinishedResolution:S,getCurrentTheme:x,__experimentalGetCurrentGlobalStylesId:T,canUser:R}=y(Ise.store),{getRenderingMode:F,getCurrentPostType:B}=y(w),z=["postType",e,t],L=F(),M=B(),k=x()?.is_block_theme,I=T(),U=I?R("update",{kind:"root",name:"globalStyles",id:I}):!1;return{post:b(...z),template:r?b("postType",xt,r):void 0,hasLoadedPost:S("getEntityRecord",z),error:_("getEntityRecord",z)?.message,isBlockTheme:k,showGlobalStyles:k&&U&&(M==="wp_template"||L==="template-locked")}},[e,t,r]);return(0,Ds.jsxs)(Ds.Fragment,{children:[m&&!d&&(0,Ds.jsx)(Nse.Notice,{status:h?"error":"warning",isDismissible:!1,children:h||(0,Fse.__)("You attempted to edit an item that doesn't exist. Perhaps it was deleted?")}),!!d&&(0,Ds.jsxs)(v6,{post:d,__unstableTemplate:f,settings:o,initialEdits:i,useSubRegistry:!1,children:[(0,Ds.jsx)(pne,{...u,children:l}),n,(0,Ds.jsx)(Uie,{onActionPerformed:a,extraPanels:c}),(0,Ds.jsx)(xse,{}),g&&(0,Ds.jsx)(oC,{}),v&&(0,Ds.jsx)(Ase,{})]})]})}var Dse=sAe;var Ne=s(E(),1),Gse=s(he(),1),zm=s(O(),1),Wse=s(D(),1),v1=s(lt(),1);var KE=s(O(),1),Bse=s(lt(),1);var Mse=s(C(),1),{PreferenceBaseOption:aAe}=N(Bse.privateApis);function Lse(e){let t=(0,KE.useSelect)(n=>n(w).isPublishSidebarEnabled(),[]),{enablePublishSidebar:r,disablePublishSidebar:o}=(0,KE.useDispatch)(w);return(0,Mse.jsx)(aAe,{isChecked:t,onChange:n=>n?r():o(),...e})}var XE=s(O(),1),Vse=s(lt(),1),QE=s(Xe(),1),jse=s(D(),1),zse=s(A(),1),bv=s(E(),1),Use=s($(),1);var yv=s(C(),1),{BlockManager:lAe}=N(Use.privateApis),cAe=[];function Hse(){let{showBlockTypes:e,hideBlockTypes:t}=N((0,XE.useDispatch)(w)),{blockTypes:r,allowedBlockTypes:o,hiddenBlockTypes:n}=(0,XE.useSelect)(m=>({blockTypes:m(QE.store).getBlockTypes(),allowedBlockTypes:m(w).getEditorSettings().allowedBlockTypes,hiddenBlockTypes:m(Vse.store).get("core","hiddenBlockTypes")??cAe}),[]),a=(0,jse.useMemo)(()=>o===!0?r:r.filter(({name:m})=>o?.includes(m)),[o,r]).filter(m=>(0,QE.hasBlockSupport)(m,"inserter",!0)&&(!m.parent||m.parent.includes("core/post-content"))),l=n.filter(m=>a.some(h=>h.name===m)),c=a.filter(m=>!l.includes(m.name)),u=a.length-c.length;function d(){f(a)}let f=m=>{if(c.length>m.length){let h=c.filter(g=>!m.find(({name:v})=>v===g.name));t(h.map(({name:g})=>g))}else if(c.length!c.find(({name:v})=>v===g.name));e(h.map(({name:g})=>g))}};return(0,yv.jsxs)("div",{className:"editor-block-visibility",children:[!!u&&(0,yv.jsxs)("div",{className:"editor-block-visibility__disabled-blocks-count",children:[(0,bv.sprintf)((0,bv._n)("%d block is hidden.","%d blocks are hidden.",u),u),(0,yv.jsx)(zse.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:d,children:(0,bv.__)("Reset")})]}),(0,yv.jsx)(lAe,{blockTypes:a,selectedBlockTypes:c,onChange:f,showSelectAll:!1})]})}var Me=s(C(),1),{PreferencesModal:uAe,PreferencesModalTabs:dAe,PreferencesModalSection:Xc,PreferenceToggleControl:xi}=N(v1.privateApis);function Yse({extraSections:e={}}){let t=(0,zm.useSelect)(o=>o(Ce).isModalActive("editor/preferences"),[]),{closeModal:r}=(0,zm.useDispatch)(Ce);return t?(0,Me.jsx)(uAe,{closeModal:r,children:(0,Me.jsx)(fAe,{extraSections:e})}):null}function fAe({extraSections:e={}}){let t=(0,Gse.useViewportMatch)("medium"),{showBlockBreadcrumbsOption:r,showCollaborationOptions:o}=(0,zm.useSelect)(c=>{let{getEditorSettings:u,isCollaborationEnabledForCurrentPost:d}=N(c(w)),{get:f}=c(v1.store),m=u().richEditingEnabled;return{showBlockBreadcrumbsOption:!f("core","distractionFree")&&t&&m,showCollaborationOptions:d()}},[t]),{setIsListViewOpened:n,setIsInserterOpened:i}=(0,zm.useDispatch)(w),{set:a}=(0,zm.useDispatch)(v1.store),l=(0,Wse.useMemo)(()=>[{name:"general",tabLabel:(0,Ne.__)("General"),content:(0,Me.jsxs)(Me.Fragment,{children:[(0,Me.jsxs)(Xc,{title:(0,Ne.__)("Interface"),children:[(0,Me.jsx)(xi,{scope:"core",featureName:"showListViewByDefault",help:(0,Ne.__)("Opens the List View panel by default."),label:(0,Ne.__)("Always open List View")}),r&&(0,Me.jsx)(xi,{scope:"core",featureName:"showBlockBreadcrumbs",help:(0,Ne.__)("Display the block hierarchy trail at the bottom of the editor."),label:(0,Ne.__)("Show block breadcrumbs")}),(0,Me.jsx)(xi,{scope:"core",featureName:"allowRightClickOverrides",help:(0,Ne.__)("Allows contextual List View menus via right-click, overriding browser defaults."),label:(0,Ne.__)("Allow right-click contextual menus")}),(0,Me.jsx)(xi,{scope:"core",featureName:"enableChoosePatternModal",help:(0,Ne.__)("Pick from starter content when creating a new page."),label:(0,Ne.__)("Show starter patterns")}),o&&(0,Me.jsxs)(Me.Fragment,{children:[(0,Me.jsx)(xi,{scope:"core",featureName:"showCollaborationCursor",help:(0,Ne.__)("Show your own avatar inside blocks during collaborative editing sessions."),label:(0,Ne.__)("Show avatar in blocks")}),(0,Me.jsx)(xi,{scope:"core",featureName:"showCollaborationNotifications",help:(0,Ne.__)("Show notifications when collaborators join, leave, or save the post."),label:(0,Ne.__)("Show collaboration notifications")})]})]}),(0,Me.jsxs)(Xc,{title:(0,Ne.__)("Document settings"),description:(0,Ne.__)("Select what settings are shown in the document panel."),children:[(0,Me.jsx)(zC.Slot,{}),(0,Me.jsx)(fg,{taxonomyWrapper:(c,u)=>(0,Me.jsx)($u,{label:u.labels.menu_name,panelName:`taxonomy-panel-${u.slug}`})}),(0,Me.jsx)(_c,{children:(0,Me.jsx)($u,{label:(0,Ne.__)("Featured image"),panelName:"featured-image"})}),(0,Me.jsx)(lm,{children:(0,Me.jsx)($u,{label:(0,Ne.__)("Excerpt"),panelName:"post-excerpt"})}),(0,Me.jsx)(tr,{supportKeys:["comments","trackbacks"],children:(0,Me.jsx)($u,{label:(0,Ne.__)("Discussion"),panelName:"discussion-panel"})}),(0,Me.jsx)(Nh,{children:(0,Me.jsx)($u,{label:(0,Ne.__)("Page attributes"),panelName:"page-attributes"})})]}),t&&(0,Me.jsx)(Xc,{title:(0,Ne.__)("Publishing"),children:(0,Me.jsx)(Lse,{help:(0,Ne.__)("Review settings, such as visibility and tags."),label:(0,Ne.__)("Enable pre-publish checks")})}),e?.general]})},{name:"appearance",tabLabel:(0,Ne.__)("Appearance"),content:(0,Me.jsxs)(Xc,{title:(0,Ne.__)("Appearance"),description:(0,Ne.__)("Customize the editor interface to suit your needs."),children:[(0,Me.jsx)(xi,{scope:"core",featureName:"fixedToolbar",onToggle:()=>a("core","distractionFree",!1),help:(0,Ne.__)("Access all block and document tools in a single place."),label:(0,Ne.__)("Top toolbar")}),(0,Me.jsx)(xi,{scope:"core",featureName:"distractionFree",onToggle:()=>{a("core","fixedToolbar",!0),i(!1),n(!1)},help:(0,Ne.__)("Reduce visual distractions by hiding the toolbar and other elements to focus on writing."),label:(0,Ne.__)("Distraction free")}),(0,Me.jsx)(xi,{scope:"core",featureName:"focusMode",help:(0,Ne.__)("Highlights the current block and fades other content."),label:(0,Ne.__)("Spotlight mode")}),e?.appearance]})},{name:"accessibility",tabLabel:(0,Ne.__)("Accessibility"),content:(0,Me.jsxs)(Me.Fragment,{children:[(0,Me.jsx)(Xc,{title:(0,Ne.__)("Navigation"),description:(0,Ne.__)("Optimize the editing experience for enhanced control."),children:(0,Me.jsx)(xi,{scope:"core",featureName:"keepCaretInsideBlock",help:(0,Ne.__)("Keeps the text cursor within blocks while navigating with arrow keys, preventing it from moving to other blocks and enhancing accessibility for keyboard users."),label:(0,Ne.__)("Contain text cursor inside block")})}),(0,Me.jsx)(Xc,{title:(0,Ne.__)("Interface"),children:(0,Me.jsx)(xi,{scope:"core",featureName:"showIconLabels",label:(0,Ne.__)("Show button text labels"),help:(0,Ne.__)("Show text instead of icons on buttons across the interface.")})})]})},{name:"blocks",tabLabel:(0,Ne.__)("Blocks"),content:(0,Me.jsxs)(Me.Fragment,{children:[(0,Me.jsx)(Xc,{title:(0,Ne.__)("Inserter"),children:(0,Me.jsx)(xi,{scope:"core",featureName:"mostUsedBlocks",help:(0,Ne.__)("Adds a category with the most frequently used blocks in the inserter."),label:(0,Ne.__)("Show most used blocks")})}),(0,Me.jsx)(Xc,{title:(0,Ne.__)("Manage block visibility"),description:(0,Ne.__)("Disable blocks that you don't want to appear in the inserter. They can always be toggled back on later."),children:(0,Me.jsx)(Hse,{})})]})},window.__clientSideMediaProcessing&&{name:"media",tabLabel:(0,Ne.__)("Media"),content:(0,Me.jsx)(Me.Fragment,{children:(0,Me.jsxs)(Xc,{title:(0,Ne.__)("General"),description:(0,Ne.__)("Customize options related to the media upload flow."),children:[(0,Me.jsx)(xi,{scope:"core/media",featureName:"optimizeOnUpload",help:(0,Ne.__)("Compress media items before uploading to the server."),label:(0,Ne.__)("Pre-upload compression")}),(0,Me.jsx)(xi,{scope:"core/media",featureName:"requireApproval",help:(0,Ne.__)("Require approval step when optimizing existing media."),label:(0,Ne.__)("Approval step")})]})})}].filter(Boolean),[r,o,e,i,n,a,t]);return(0,Me.jsx)(dAe,{sections:l})}var _1=s(Xe(),1);var y1=s($(),1),qse="content",Zse={name:"core/pattern-overrides",getValues({select:e,clientId:t,context:r,bindings:o}){let n=r["pattern/overrides"],{getBlockAttributes:i}=e(y1.store),a=i(t),l={};for(let c of Object.keys(o)){let u=n?.[a?.metadata?.name]?.[c];if(u===void 0){l[c]=a[c];continue}else l[c]=u===""?void 0:u}return l},setValues({select:e,dispatch:t,clientId:r,bindings:o}){let{getBlockAttributes:n,getBlockParentsByBlockName:i,getBlocks:a}=e(y1.store),c=n(r)?.metadata?.name;if(!c)return;let[u]=i(r,"core/block",!0),d=Object.entries(o).reduce((m,[h,{newValue:g}])=>(m[h]=g,m),{});if(!u){let m=h=>{for(let g of h)g.attributes?.metadata?.name===c&&t(y1.store).updateBlockAttributes(g.clientId,d),m(g.innerBlocks)};m(a());return}let f=n(u)?.[qse];t(y1.store).updateBlockAttributes(u,{[qse]:{...f,[c]:{...f?.[c],...Object.entries(d).reduce((m,[h,g])=>(m[h]=g===void 0?"":g,m),{})}}})},canUserEditValue:()=>!0};var JE=s(E(),1),$E=s(W(),1),b1=s($(),1),yF=["core/navigation-link","core/navigation-submenu"],Kse=[{label:(0,JE.__)("Post Date"),args:{field:"date"},type:"string"},{label:(0,JE.__)("Post Modified Date"),args:{field:"modified"},type:"string"},{label:(0,JE.__)("Post Link"),args:{field:"link"},type:"string"}],Xse={name:"core/post-data",getValues({select:e,context:t,bindings:r,clientId:o}){let{getBlockAttributes:n,getBlockName:i}=e(b1.store),a=i(o),l=yF.includes(a),c,u;if(l){let h=n(o);c=h?.id,u=h?.type}else c=t?.postId,u=t?.postType;let{getEditedEntityRecord:d}=e($E.store),f=d("postType",u,c),m={};for(let[h,g]of Object.entries(r)){let v=Kse.find(y=>y.args.field===g.args.field);v?f?m[h]=f[g.args.field]:m[h]=v.label:m[h]=g.args.field}return m},setValues({dispatch:e,context:t,bindings:r,clientId:o,select:n}){let{getBlockName:i}=n(b1.store),a=i(o);if(yF.includes(a))return!1;let l={};Object.values(r).forEach(({args:c,newValue:u})=>{l[c.field]=u}),e($E.store).editEntityRecord("postType",t?.postType,t?.postId,l)},canUserEditValue({select:e,context:t}){let{getBlockName:r,getSelectedBlockClientId:o}=e(b1.store),n=o(),i=r(n);return!(yF.includes(i)||t?.query||t?.queryId||!t?.postType||!e($E.store).canUser("update",{kind:"postType",name:t?.postType,id:t?.postId}))},getFieldsList({context:e,select:t}){return t(b1.store).getSelectedBlock()?.name!=="core/post-date"?[]:!e||!e.postId||!e.postType?[]:Kse}};var S1=s(W(),1);function bF(e,t){let{getRegisteredPostMeta:r}=N(e(S1.store)),o=r(t?.postType),n=[];return Object.entries(o).forEach(([i,a])=>{i==="footnotes"||i.charAt(0)==="_"||n.push({label:a.title||i,args:{key:i},default:a.default,type:a.type})}),n}function mAe({select:e,context:t,args:r}){let n=bF(e,t).find(l=>l.args.key===r.key);if(!n)return r.key;if(!t?.postId)return n.default||n.label||r.key;let{getEditedEntityRecord:i}=e(S1.store);return i("postType",t?.postType,t?.postId).meta?.[r.key]??n?.label??r.key}var Qse={name:"core/post-meta",getValues({select:e,context:t,bindings:r}){let o={};for(let[n,i]of Object.entries(r))o[n]=mAe({select:e,context:t,args:i.args});return o},setValues({dispatch:e,context:t,bindings:r}){let o={};Object.values(r).forEach(({args:n,newValue:i})=>{o[n.key]=i}),e(S1.store).editEntityRecord("postType",t?.postType,t?.postId,{meta:o})},canUserEditValue({select:e,context:t,args:r}){return!(t?.query||t?.queryId||!t?.postType||!bF(e,t).some(l=>l.args.key===r.key)||e(w).getEditorSettings().enableCustomFields||!e(S1.store).canUser("update",{kind:"postType",name:t?.postType,id:t?.postId}))},getFieldsList({select:e,context:t}){return bF(e,t).map(({default:o,...n})=>({...n}))}};var Dd=s(E(),1),Jse=s(W(),1),eR=s($(),1),SF=["core/navigation-link","core/navigation-submenu"],_F=[{label:(0,Dd.__)("Term ID"),args:{field:"id"},type:"string"},{label:(0,Dd.__)("Name"),args:{field:"name"},type:"string"},{label:(0,Dd.__)("Slug"),args:{field:"slug"},type:"string"},{label:(0,Dd.__)("Link"),args:{field:"link"},type:"string"},{label:(0,Dd.__)("Description"),args:{field:"description"},type:"string"},{label:(0,Dd.__)("Parent ID"),args:{field:"parent"},type:"string"},{label:(0,Dd.__)("Count"),args:{field:"count"},type:"string"}],$se={name:"core/term-data",usesContext:["taxonomy","termId","termData"],getValues({select:e,context:t,bindings:r,clientId:o}){let{getEntityRecord:n}=e(Jse.store),{getBlockAttributes:i,getBlockName:a}=e(eR.store),l=a(o),c=SF.includes(l),u;if(c){let f=i(o),m=f?.type;u=n("taxonomy",m==="tag"?"post_tag":m,f?.id)}else t.termId&&t.taxonomy&&(u=n("taxonomy",t.taxonomy,t.termId));!u&&t?.termData&&!c&&(u=t.termData);let d={};for(let[f,m]of Object.entries(r)){let h=_F.find(g=>g.args.field===m.args.field);h?!u||u[m.args.field]===void 0?d[f]=h.label:m.args.field==="count"?d[f]="("+u[m.args.field]+")":d[f]=u[m.args.field]:d[f]=m.args.field}return d},setValues({dispatch:e,context:t,bindings:r}){return!1},canUserEditValue({select:e,context:t}){let{getBlockName:r,getSelectedBlockClientId:o}=e(eR.store),n=o(),i=r(n);return SF.includes(i)||t?.termQuery||!t?.taxonomy||!t?.termId,!1},getFieldsList({context:e,select:t}){let{getBlockAttributes:r,getBlockName:o,getSelectedBlockClientId:n}=t(eR.store),i=n(),a=o(i);if(SF.includes(a)){let l=r(i);return!l||!l.id||!l.type?[]:_F}return e?e.taxonomy&&e.termId||e.termData?_F:[]:[]}};function eae(){(0,_1.registerBlockBindingsSource)(Zse),(0,_1.registerBlockBindingsSource)(Xse),(0,_1.registerBlockBindingsSource)(Qse),(0,_1.registerBlockBindingsSource)($se)}var{store:pAe,...hAe}=i6,tae={};JF(tae,{CreateTemplatePartModal:Cp,patternTitleField:iy,templateTitleField:ny,BackButton:nk,EntitiesSavedStatesExtensible:Kb,Editor:Dse,PluginPostExcerpt:r0,PostCardPanel:rv,PreferencesModal:Yse,usePostActions:lE,usePostFields:oE,ToolsMoreMenuGroup:uk,ViewMoreMenuGroup:dk,ResizableEditor:Eh,registerCoreBlockBindingsSources:eae,getTemplateInfo:Zi,GlobalStylesUIWrapper:Hx,GlobalStylesActionMenu:WE,StyleBookPreview:uW,useGlobalStyles:xo,useStyle:Hu,interfaceStore:pAe,...hAe});var w1=s(O(),1);function gAe(e,t,r){let{registerEntityAction:o}=N((0,w1.dispatch)(w))}function vAe(e,t,r){let{unregisterEntityAction:o}=N((0,w1.dispatch)(w))}function yAe(e,t,r){let{registerEntityField:o}=N((0,w1.dispatch)(w))}function bAe(e,t,r){let{unregisterEntityField:o}=N((0,w1.dispatch)(w))}var rae=s($(),1);return uae(SAe);})();
/*! Bundled license information:
autosize/dist/autosize.js:
(*!
autosize 4.0.2
license: MIT
http://www.jacklmoore.com/autosize
*)
is-plain-object/dist/is-plain-object.mjs:
(*!
* is-plain-object
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*)
*/
deprecated.js 0000644 00000006051 15220200054 0007172 0 ustar 00 "use strict";
var wp;
(wp ||= {}).deprecated = (() => {
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __commonJS = (cb, mod) => function __require() {
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// package-external:@wordpress/hooks
var require_hooks = __commonJS({
"package-external:@wordpress/hooks"(exports, module) {
module.exports = window.wp.hooks;
}
});
// packages/deprecated/build-module/index.mjs
var index_exports = {};
__export(index_exports, {
default: () => deprecated,
logged: () => logged
});
var import_hooks = __toESM(require_hooks(), 1);
var logged = /* @__PURE__ */ Object.create(null);
function deprecated(feature, options = {}) {
const { since, version, alternative, plugin, link, hint } = options;
const pluginMessage = plugin ? ` from ${plugin}` : "";
const sinceMessage = since ? ` since version ${since}` : "";
const versionMessage = version ? ` and will be removed${pluginMessage} in version ${version}` : "";
const useInsteadMessage = alternative ? ` Please use ${alternative} instead.` : "";
const linkMessage = link ? ` See: ${link}` : "";
const hintMessage = hint ? ` Note: ${hint}` : "";
const message = `${feature} is deprecated${sinceMessage}${versionMessage}.${useInsteadMessage}${linkMessage}${hintMessage}`;
if (message in logged) {
return;
}
(0, import_hooks.doAction)("deprecated", feature, options, message);
console.warn(message);
logged[message] = true;
}
return __toCommonJS(index_exports);
})();
if (typeof wp.deprecated === 'object' && wp.deprecated.default) { wp.deprecated = wp.deprecated.default; }
block-library.js 0000644 00012212404 15220200055 0007633 0 ustar 00 "use strict";
var wp;
(wp ||= {}).blockLibrary = (() => {
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __require = /* @__PURE__ */ ((x2) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x2, {
get: (a2, b2) => (typeof require !== "undefined" ? require : a2)[b2]
}) : x2)(function(x2) {
if (typeof require !== "undefined") return require.apply(this, arguments);
throw Error('Dynamic require of "' + x2 + '" is not supported');
});
var __commonJS = (cb, mod) => function __require2() {
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
var __export = (target, all) => {
for (var name123 in all)
__defProp(target, name123, { get: all[name123], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// package-external:@wordpress/blocks
var require_blocks = __commonJS({
"package-external:@wordpress/blocks"(exports, module) {
module.exports = window.wp.blocks;
}
});
// package-external:@wordpress/compose
var require_compose = __commonJS({
"package-external:@wordpress/compose"(exports, module) {
module.exports = window.wp.compose;
}
});
// package-external:@wordpress/data
var require_data = __commonJS({
"package-external:@wordpress/data"(exports, module) {
module.exports = window.wp.data;
}
});
// package-external:@wordpress/block-editor
var require_block_editor = __commonJS({
"package-external:@wordpress/block-editor"(exports, module) {
module.exports = window.wp.blockEditor;
}
});
// package-external:@wordpress/server-side-render
var require_server_side_render = __commonJS({
"package-external:@wordpress/server-side-render"(exports, module) {
module.exports = window.wp.serverSideRender;
}
});
// package-external:@wordpress/i18n
var require_i18n = __commonJS({
"package-external:@wordpress/i18n"(exports, module) {
module.exports = window.wp.i18n;
}
});
// node_modules/html-dom-parser/node_modules/domelementtype/lib/index.js
var require_lib = __commonJS({
"node_modules/html-dom-parser/node_modules/domelementtype/lib/index.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Doctype = exports.CDATA = exports.Tag = exports.Style = exports.Script = exports.Comment = exports.Directive = exports.Text = exports.Root = exports.isTag = exports.ElementType = void 0;
var ElementType;
(function(ElementType2) {
ElementType2["Root"] = "root";
ElementType2["Text"] = "text";
ElementType2["Directive"] = "directive";
ElementType2["Comment"] = "comment";
ElementType2["Script"] = "script";
ElementType2["Style"] = "style";
ElementType2["Tag"] = "tag";
ElementType2["CDATA"] = "cdata";
ElementType2["Doctype"] = "doctype";
})(ElementType = exports.ElementType || (exports.ElementType = {}));
function isTag(elem) {
return elem.type === ElementType.Tag || elem.type === ElementType.Script || elem.type === ElementType.Style;
}
exports.isTag = isTag;
exports.Root = ElementType.Root;
exports.Text = ElementType.Text;
exports.Directive = ElementType.Directive;
exports.Comment = ElementType.Comment;
exports.Script = ElementType.Script;
exports.Style = ElementType.Style;
exports.Tag = ElementType.Tag;
exports.CDATA = ElementType.CDATA;
exports.Doctype = ElementType.Doctype;
}
});
// node_modules/html-dom-parser/node_modules/domhandler/lib/node.js
var require_node = __commonJS({
"node_modules/html-dom-parser/node_modules/domhandler/lib/node.js"(exports) {
"use strict";
var __extends = exports && exports.__extends || /* @__PURE__ */ (function() {
var extendStatics = function(d2, b2) {
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d3, b3) {
d3.__proto__ = b3;
} || function(d3, b3) {
for (var p2 in b3) if (Object.prototype.hasOwnProperty.call(b3, p2)) d3[p2] = b3[p2];
};
return extendStatics(d2, b2);
};
return function(d2, b2) {
if (typeof b2 !== "function" && b2 !== null)
throw new TypeError("Class extends value " + String(b2) + " is not a constructor or null");
extendStatics(d2, b2);
function __268() {
this.constructor = d2;
}
d2.prototype = b2 === null ? Object.create(b2) : (__268.prototype = b2.prototype, new __268());
};
})();
var __assign2 = exports && exports.__assign || function() {
__assign2 = Object.assign || function(t2) {
for (var s2, i2 = 1, n2 = arguments.length; i2 < n2; i2++) {
s2 = arguments[i2];
for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2))
t2[p2] = s2[p2];
}
return t2;
};
return __assign2.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.cloneNode = exports.hasChildren = exports.isDocument = exports.isDirective = exports.isComment = exports.isText = exports.isCDATA = exports.isTag = exports.Element = exports.Document = exports.CDATA = exports.NodeWithChildren = exports.ProcessingInstruction = exports.Comment = exports.Text = exports.DataNode = exports.Node = void 0;
var domelementtype_1 = require_lib();
var Node = (
/** @class */
(function() {
function Node2() {
this.parent = null;
this.prev = null;
this.next = null;
this.startIndex = null;
this.endIndex = null;
}
Object.defineProperty(Node2.prototype, "parentNode", {
// Read-write aliases for properties
/**
* Same as {@link parent}.
* [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
*/
get: function() {
return this.parent;
},
set: function(parent) {
this.parent = parent;
},
enumerable: false,
configurable: true
});
Object.defineProperty(Node2.prototype, "previousSibling", {
/**
* Same as {@link prev}.
* [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
*/
get: function() {
return this.prev;
},
set: function(prev) {
this.prev = prev;
},
enumerable: false,
configurable: true
});
Object.defineProperty(Node2.prototype, "nextSibling", {
/**
* Same as {@link next}.
* [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
*/
get: function() {
return this.next;
},
set: function(next) {
this.next = next;
},
enumerable: false,
configurable: true
});
Node2.prototype.cloneNode = function(recursive) {
if (recursive === void 0) {
recursive = false;
}
return cloneNode(this, recursive);
};
return Node2;
})()
);
exports.Node = Node;
var DataNode = (
/** @class */
(function(_super) {
__extends(DataNode2, _super);
function DataNode2(data) {
var _this = _super.call(this) || this;
_this.data = data;
return _this;
}
Object.defineProperty(DataNode2.prototype, "nodeValue", {
/**
* Same as {@link data}.
* [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
*/
get: function() {
return this.data;
},
set: function(data) {
this.data = data;
},
enumerable: false,
configurable: true
});
return DataNode2;
})(Node)
);
exports.DataNode = DataNode;
var Text4 = (
/** @class */
(function(_super) {
__extends(Text5, _super);
function Text5() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.type = domelementtype_1.ElementType.Text;
return _this;
}
Object.defineProperty(Text5.prototype, "nodeType", {
get: function() {
return 3;
},
enumerable: false,
configurable: true
});
return Text5;
})(DataNode)
);
exports.Text = Text4;
var Comment2 = (
/** @class */
(function(_super) {
__extends(Comment3, _super);
function Comment3() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.type = domelementtype_1.ElementType.Comment;
return _this;
}
Object.defineProperty(Comment3.prototype, "nodeType", {
get: function() {
return 8;
},
enumerable: false,
configurable: true
});
return Comment3;
})(DataNode)
);
exports.Comment = Comment2;
var ProcessingInstruction2 = (
/** @class */
(function(_super) {
__extends(ProcessingInstruction3, _super);
function ProcessingInstruction3(name123, data) {
var _this = _super.call(this, data) || this;
_this.name = name123;
_this.type = domelementtype_1.ElementType.Directive;
return _this;
}
Object.defineProperty(ProcessingInstruction3.prototype, "nodeType", {
get: function() {
return 1;
},
enumerable: false,
configurable: true
});
return ProcessingInstruction3;
})(DataNode)
);
exports.ProcessingInstruction = ProcessingInstruction2;
var NodeWithChildren = (
/** @class */
(function(_super) {
__extends(NodeWithChildren2, _super);
function NodeWithChildren2(children) {
var _this = _super.call(this) || this;
_this.children = children;
return _this;
}
Object.defineProperty(NodeWithChildren2.prototype, "firstChild", {
// Aliases
/** First child of the node. */
get: function() {
var _a;
return (_a = this.children[0]) !== null && _a !== void 0 ? _a : null;
},
enumerable: false,
configurable: true
});
Object.defineProperty(NodeWithChildren2.prototype, "lastChild", {
/** Last child of the node. */
get: function() {
return this.children.length > 0 ? this.children[this.children.length - 1] : null;
},
enumerable: false,
configurable: true
});
Object.defineProperty(NodeWithChildren2.prototype, "childNodes", {
/**
* Same as {@link children}.
* [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
*/
get: function() {
return this.children;
},
set: function(children) {
this.children = children;
},
enumerable: false,
configurable: true
});
return NodeWithChildren2;
})(Node)
);
exports.NodeWithChildren = NodeWithChildren;
var CDATA = (
/** @class */
(function(_super) {
__extends(CDATA2, _super);
function CDATA2() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.type = domelementtype_1.ElementType.CDATA;
return _this;
}
Object.defineProperty(CDATA2.prototype, "nodeType", {
get: function() {
return 4;
},
enumerable: false,
configurable: true
});
return CDATA2;
})(NodeWithChildren)
);
exports.CDATA = CDATA;
var Document = (
/** @class */
(function(_super) {
__extends(Document2, _super);
function Document2() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.type = domelementtype_1.ElementType.Root;
return _this;
}
Object.defineProperty(Document2.prototype, "nodeType", {
get: function() {
return 9;
},
enumerable: false,
configurable: true
});
return Document2;
})(NodeWithChildren)
);
exports.Document = Document;
var Element2 = (
/** @class */
(function(_super) {
__extends(Element3, _super);
function Element3(name123, attribs, children, type) {
if (children === void 0) {
children = [];
}
if (type === void 0) {
type = name123 === "script" ? domelementtype_1.ElementType.Script : name123 === "style" ? domelementtype_1.ElementType.Style : domelementtype_1.ElementType.Tag;
}
var _this = _super.call(this, children) || this;
_this.name = name123;
_this.attribs = attribs;
_this.type = type;
return _this;
}
Object.defineProperty(Element3.prototype, "nodeType", {
get: function() {
return 1;
},
enumerable: false,
configurable: true
});
Object.defineProperty(Element3.prototype, "tagName", {
// DOM Level 1 aliases
/**
* Same as {@link name}.
* [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
*/
get: function() {
return this.name;
},
set: function(name123) {
this.name = name123;
},
enumerable: false,
configurable: true
});
Object.defineProperty(Element3.prototype, "attributes", {
get: function() {
var _this = this;
return Object.keys(this.attribs).map(function(name123) {
var _a, _b;
return {
name: name123,
value: _this.attribs[name123],
namespace: (_a = _this["x-attribsNamespace"]) === null || _a === void 0 ? void 0 : _a[name123],
prefix: (_b = _this["x-attribsPrefix"]) === null || _b === void 0 ? void 0 : _b[name123]
};
});
},
enumerable: false,
configurable: true
});
return Element3;
})(NodeWithChildren)
);
exports.Element = Element2;
function isTag(node) {
return (0, domelementtype_1.isTag)(node);
}
exports.isTag = isTag;
function isCDATA(node) {
return node.type === domelementtype_1.ElementType.CDATA;
}
exports.isCDATA = isCDATA;
function isText(node) {
return node.type === domelementtype_1.ElementType.Text;
}
exports.isText = isText;
function isComment(node) {
return node.type === domelementtype_1.ElementType.Comment;
}
exports.isComment = isComment;
function isDirective(node) {
return node.type === domelementtype_1.ElementType.Directive;
}
exports.isDirective = isDirective;
function isDocument(node) {
return node.type === domelementtype_1.ElementType.Root;
}
exports.isDocument = isDocument;
function hasChildren(node) {
return Object.prototype.hasOwnProperty.call(node, "children");
}
exports.hasChildren = hasChildren;
function cloneNode(node, recursive) {
if (recursive === void 0) {
recursive = false;
}
var result;
if (isText(node)) {
result = new Text4(node.data);
} else if (isComment(node)) {
result = new Comment2(node.data);
} else if (isTag(node)) {
var children = recursive ? cloneChildren(node.children) : [];
var clone_1 = new Element2(node.name, __assign2({}, node.attribs), children);
children.forEach(function(child) {
return child.parent = clone_1;
});
if (node.namespace != null) {
clone_1.namespace = node.namespace;
}
if (node["x-attribsNamespace"]) {
clone_1["x-attribsNamespace"] = __assign2({}, node["x-attribsNamespace"]);
}
if (node["x-attribsPrefix"]) {
clone_1["x-attribsPrefix"] = __assign2({}, node["x-attribsPrefix"]);
}
result = clone_1;
} else if (isCDATA(node)) {
var children = recursive ? cloneChildren(node.children) : [];
var clone_2 = new CDATA(children);
children.forEach(function(child) {
return child.parent = clone_2;
});
result = clone_2;
} else if (isDocument(node)) {
var children = recursive ? cloneChildren(node.children) : [];
var clone_3 = new Document(children);
children.forEach(function(child) {
return child.parent = clone_3;
});
if (node["x-mode"]) {
clone_3["x-mode"] = node["x-mode"];
}
result = clone_3;
} else if (isDirective(node)) {
var instruction = new ProcessingInstruction2(node.name, node.data);
if (node["x-name"] != null) {
instruction["x-name"] = node["x-name"];
instruction["x-publicId"] = node["x-publicId"];
instruction["x-systemId"] = node["x-systemId"];
}
result = instruction;
} else {
throw new Error("Not implemented yet: ".concat(node.type));
}
result.startIndex = node.startIndex;
result.endIndex = node.endIndex;
if (node.sourceCodeLocation != null) {
result.sourceCodeLocation = node.sourceCodeLocation;
}
return result;
}
exports.cloneNode = cloneNode;
function cloneChildren(childs) {
var children = childs.map(function(child) {
return cloneNode(child, true);
});
for (var i2 = 1; i2 < children.length; i2++) {
children[i2].prev = children[i2 - 1];
children[i2 - 1].next = children[i2];
}
return children;
}
}
});
// node_modules/html-dom-parser/node_modules/domhandler/lib/index.js
var require_lib2 = __commonJS({
"node_modules/html-dom-parser/node_modules/domhandler/lib/index.js"(exports) {
"use strict";
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o2, m2, k2, k22) {
if (k22 === void 0) k22 = k2;
var desc = Object.getOwnPropertyDescriptor(m2, k2);
if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() {
return m2[k2];
} };
}
Object.defineProperty(o2, k22, desc);
}) : (function(o2, m2, k2, k22) {
if (k22 === void 0) k22 = k2;
o2[k22] = m2[k2];
}));
var __exportStar = exports && exports.__exportStar || function(m2, exports2) {
for (var p2 in m2) if (p2 !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p2)) __createBinding(exports2, m2, p2);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.DomHandler = void 0;
var domelementtype_1 = require_lib();
var node_js_1 = require_node();
__exportStar(require_node(), exports);
var defaultOpts = {
withStartIndices: false,
withEndIndices: false,
xmlMode: false
};
var DomHandler = (
/** @class */
(function() {
function DomHandler2(callback, options2, elementCB) {
this.dom = [];
this.root = new node_js_1.Document(this.dom);
this.done = false;
this.tagStack = [this.root];
this.lastNode = null;
this.parser = null;
if (typeof options2 === "function") {
elementCB = options2;
options2 = defaultOpts;
}
if (typeof callback === "object") {
options2 = callback;
callback = void 0;
}
this.callback = callback !== null && callback !== void 0 ? callback : null;
this.options = options2 !== null && options2 !== void 0 ? options2 : defaultOpts;
this.elementCB = elementCB !== null && elementCB !== void 0 ? elementCB : null;
}
DomHandler2.prototype.onparserinit = function(parser) {
this.parser = parser;
};
DomHandler2.prototype.onreset = function() {
this.dom = [];
this.root = new node_js_1.Document(this.dom);
this.done = false;
this.tagStack = [this.root];
this.lastNode = null;
this.parser = null;
};
DomHandler2.prototype.onend = function() {
if (this.done)
return;
this.done = true;
this.parser = null;
this.handleCallback(null);
};
DomHandler2.prototype.onerror = function(error) {
this.handleCallback(error);
};
DomHandler2.prototype.onclosetag = function() {
this.lastNode = null;
var elem = this.tagStack.pop();
if (this.options.withEndIndices) {
elem.endIndex = this.parser.endIndex;
}
if (this.elementCB)
this.elementCB(elem);
};
DomHandler2.prototype.onopentag = function(name123, attribs) {
var type = this.options.xmlMode ? domelementtype_1.ElementType.Tag : void 0;
var element = new node_js_1.Element(name123, attribs, void 0, type);
this.addNode(element);
this.tagStack.push(element);
};
DomHandler2.prototype.ontext = function(data) {
var lastNode = this.lastNode;
if (lastNode && lastNode.type === domelementtype_1.ElementType.Text) {
lastNode.data += data;
if (this.options.withEndIndices) {
lastNode.endIndex = this.parser.endIndex;
}
} else {
var node = new node_js_1.Text(data);
this.addNode(node);
this.lastNode = node;
}
};
DomHandler2.prototype.oncomment = function(data) {
if (this.lastNode && this.lastNode.type === domelementtype_1.ElementType.Comment) {
this.lastNode.data += data;
return;
}
var node = new node_js_1.Comment(data);
this.addNode(node);
this.lastNode = node;
};
DomHandler2.prototype.oncommentend = function() {
this.lastNode = null;
};
DomHandler2.prototype.oncdatastart = function() {
var text = new node_js_1.Text("");
var node = new node_js_1.CDATA([text]);
this.addNode(node);
text.parent = node;
this.lastNode = text;
};
DomHandler2.prototype.oncdataend = function() {
this.lastNode = null;
};
DomHandler2.prototype.onprocessinginstruction = function(name123, data) {
var node = new node_js_1.ProcessingInstruction(name123, data);
this.addNode(node);
};
DomHandler2.prototype.handleCallback = function(error) {
if (typeof this.callback === "function") {
this.callback(error, this.dom);
} else if (error) {
throw error;
}
};
DomHandler2.prototype.addNode = function(node) {
var parent = this.tagStack[this.tagStack.length - 1];
var previousSibling = parent.children[parent.children.length - 1];
if (this.options.withStartIndices) {
node.startIndex = this.parser.startIndex;
}
if (this.options.withEndIndices) {
node.endIndex = this.parser.endIndex;
}
parent.children.push(node);
if (previousSibling) {
node.prev = previousSibling;
previousSibling.next = node;
}
node.parent = parent;
this.lastNode = null;
};
return DomHandler2;
})()
);
exports.DomHandler = DomHandler;
exports.default = DomHandler;
}
});
// node_modules/html-dom-parser/lib/client/constants.js
var require_constants = __commonJS({
"node_modules/html-dom-parser/lib/client/constants.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CARRIAGE_RETURN_PLACEHOLDER_REGEX = exports.CARRIAGE_RETURN_PLACEHOLDER = exports.CARRIAGE_RETURN_REGEX = exports.CARRIAGE_RETURN = exports.CASE_SENSITIVE_TAG_NAMES_MAP = exports.CASE_SENSITIVE_TAG_NAMES = void 0;
exports.CASE_SENSITIVE_TAG_NAMES = [
"animateMotion",
"animateTransform",
"clipPath",
"feBlend",
"feColorMatrix",
"feComponentTransfer",
"feComposite",
"feConvolveMatrix",
"feDiffuseLighting",
"feDisplacementMap",
"feDropShadow",
"feFlood",
"feFuncA",
"feFuncB",
"feFuncG",
"feFuncR",
"feGaussianBlur",
"feImage",
"feMerge",
"feMergeNode",
"feMorphology",
"feOffset",
"fePointLight",
"feSpecularLighting",
"feSpotLight",
"feTile",
"feTurbulence",
"foreignObject",
"linearGradient",
"radialGradient",
"textPath"
];
exports.CASE_SENSITIVE_TAG_NAMES_MAP = exports.CASE_SENSITIVE_TAG_NAMES.reduce(function(accumulator, tagName) {
accumulator[tagName.toLowerCase()] = tagName;
return accumulator;
}, {});
exports.CARRIAGE_RETURN = "\r";
exports.CARRIAGE_RETURN_REGEX = new RegExp(exports.CARRIAGE_RETURN, "g");
exports.CARRIAGE_RETURN_PLACEHOLDER = "__HTML_DOM_PARSER_CARRIAGE_RETURN_PLACEHOLDER_".concat(Date.now(), "__");
exports.CARRIAGE_RETURN_PLACEHOLDER_REGEX = new RegExp(exports.CARRIAGE_RETURN_PLACEHOLDER, "g");
}
});
// node_modules/html-dom-parser/lib/client/utilities.js
var require_utilities = __commonJS({
"node_modules/html-dom-parser/lib/client/utilities.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.formatAttributes = formatAttributes;
exports.escapeSpecialCharacters = escapeSpecialCharacters;
exports.revertEscapedCharacters = revertEscapedCharacters;
exports.formatDOM = formatDOM;
var domhandler_1 = require_lib2();
var constants_1 = require_constants();
function getCaseSensitiveTagName(tagName) {
return constants_1.CASE_SENSITIVE_TAG_NAMES_MAP[tagName];
}
function formatAttributes(attributes2) {
var map = {};
var index = 0;
var attributesLength = attributes2.length;
for (; index < attributesLength; index++) {
var attribute = attributes2[index];
map[attribute.name] = attribute.value;
}
return map;
}
function formatTagName(tagName) {
tagName = tagName.toLowerCase();
var caseSensitiveTagName = getCaseSensitiveTagName(tagName);
if (caseSensitiveTagName) {
return caseSensitiveTagName;
}
return tagName;
}
function escapeSpecialCharacters(html) {
return html.replace(constants_1.CARRIAGE_RETURN_REGEX, constants_1.CARRIAGE_RETURN_PLACEHOLDER);
}
function revertEscapedCharacters(text) {
return text.replace(constants_1.CARRIAGE_RETURN_PLACEHOLDER_REGEX, constants_1.CARRIAGE_RETURN);
}
function formatDOM(nodes, parent, directive) {
if (parent === void 0) {
parent = null;
}
var domNodes = [];
var current;
var index = 0;
var nodesLength = nodes.length;
for (; index < nodesLength; index++) {
var node = nodes[index];
switch (node.nodeType) {
case 1: {
var tagName = formatTagName(node.nodeName);
current = new domhandler_1.Element(tagName, formatAttributes(node.attributes));
current.children = formatDOM(
// template children are on content
tagName === "template" ? node.content.childNodes : node.childNodes,
current
);
break;
}
case 3:
current = new domhandler_1.Text(revertEscapedCharacters(node.nodeValue));
break;
case 8:
current = new domhandler_1.Comment(node.nodeValue);
break;
default:
continue;
}
var prev = domNodes[index - 1] || null;
if (prev) {
prev.next = current;
}
current.parent = parent;
current.prev = prev;
current.next = null;
domNodes.push(current);
}
if (directive) {
current = new domhandler_1.ProcessingInstruction(directive.substring(0, directive.indexOf(" ")).toLowerCase(), directive);
current.next = domNodes[0] || null;
current.parent = parent;
domNodes.unshift(current);
if (domNodes[1]) {
domNodes[1].prev = domNodes[0];
}
}
return domNodes;
}
}
});
// node_modules/html-dom-parser/lib/client/domparser.js
var require_domparser = __commonJS({
"node_modules/html-dom-parser/lib/client/domparser.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = domparser;
var utilities_1 = require_utilities();
var HTML = "html";
var HEAD = "head";
var BODY = "body";
var FIRST_TAG_REGEX = /<([a-zA-Z]+[0-9]?)/;
var HEAD_TAG_REGEX = //i;
var BODY_TAG_REGEX = //i;
var parseFromDocument = function(html, tagName) {
throw new Error("This browser does not support `document.implementation.createHTMLDocument`");
};
var parseFromString = function(html, tagName) {
throw new Error("This browser does not support `DOMParser.prototype.parseFromString`");
};
var DOMParser = typeof window === "object" && window.DOMParser;
if (typeof DOMParser === "function") {
domParser_1 = new DOMParser();
mimeType_1 = "text/html";
parseFromString = function(html, tagName) {
if (tagName) {
html = "<".concat(tagName, ">").concat(html, "").concat(tagName, ">");
}
return domParser_1.parseFromString(html, mimeType_1);
};
parseFromDocument = parseFromString;
}
var domParser_1;
var mimeType_1;
if (typeof document === "object" && document.implementation) {
htmlDocument_1 = document.implementation.createHTMLDocument();
parseFromDocument = function(html, tagName) {
if (tagName) {
var element = htmlDocument_1.documentElement.querySelector(tagName);
if (element) {
element.innerHTML = html;
}
return htmlDocument_1;
}
htmlDocument_1.documentElement.innerHTML = html;
return htmlDocument_1;
};
}
var htmlDocument_1;
var template = typeof document === "object" && document.createElement("template");
var parseFromTemplate;
if (template && template.content) {
parseFromTemplate = function(html) {
template.innerHTML = html;
return template.content.childNodes;
};
}
function domparser(html) {
var _a, _b;
html = (0, utilities_1.escapeSpecialCharacters)(html);
var match = html.match(FIRST_TAG_REGEX);
var firstTagName = match && match[1] ? match[1].toLowerCase() : "";
switch (firstTagName) {
case HTML: {
var doc = parseFromString(html);
if (!HEAD_TAG_REGEX.test(html)) {
var element = doc.querySelector(HEAD);
(_a = element === null || element === void 0 ? void 0 : element.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(element);
}
if (!BODY_TAG_REGEX.test(html)) {
var element = doc.querySelector(BODY);
(_b = element === null || element === void 0 ? void 0 : element.parentNode) === null || _b === void 0 ? void 0 : _b.removeChild(element);
}
return doc.querySelectorAll(HTML);
}
case HEAD:
case BODY: {
var elements = parseFromDocument(html).querySelectorAll(firstTagName);
if (BODY_TAG_REGEX.test(html) && HEAD_TAG_REGEX.test(html)) {
return elements[0].parentNode.childNodes;
}
return elements;
}
// low-level tag or text
default: {
if (parseFromTemplate) {
return parseFromTemplate(html);
}
var element = parseFromDocument(html, BODY).querySelector(BODY);
return element.childNodes;
}
}
}
}
});
// node_modules/html-dom-parser/lib/client/html-to-dom.js
var require_html_to_dom = __commonJS({
"node_modules/html-dom-parser/lib/client/html-to-dom.js"(exports) {
"use strict";
var __importDefault = exports && exports.__importDefault || function(mod) {
return mod && mod.__esModule ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = HTMLDOMParser;
var domparser_1 = __importDefault(require_domparser());
var utilities_1 = require_utilities();
var DIRECTIVE_REGEX = /<(![a-zA-Z\s]+)>/;
function HTMLDOMParser(html) {
if (typeof html !== "string") {
throw new TypeError("First argument must be a string");
}
if (!html) {
return [];
}
var match = html.match(DIRECTIVE_REGEX);
var directive = match ? match[1] : void 0;
return (0, utilities_1.formatDOM)((0, domparser_1.default)(html), null, directive);
}
}
});
// node_modules/react-property/lib/possibleStandardNamesOptimized.js
var require_possibleStandardNamesOptimized = __commonJS({
"node_modules/react-property/lib/possibleStandardNamesOptimized.js"(exports) {
var SAME = 0;
exports.SAME = SAME;
var CAMELCASE = 1;
exports.CAMELCASE = CAMELCASE;
exports.possibleStandardNames = {
accept: 0,
acceptCharset: 1,
"accept-charset": "acceptCharset",
accessKey: 1,
action: 0,
allowFullScreen: 1,
alt: 0,
as: 0,
async: 0,
autoCapitalize: 1,
autoComplete: 1,
autoCorrect: 1,
autoFocus: 1,
autoPlay: 1,
autoSave: 1,
capture: 0,
cellPadding: 1,
cellSpacing: 1,
challenge: 0,
charSet: 1,
checked: 0,
children: 0,
cite: 0,
class: "className",
classID: 1,
className: 1,
cols: 0,
colSpan: 1,
content: 0,
contentEditable: 1,
contextMenu: 1,
controls: 0,
controlsList: 1,
coords: 0,
crossOrigin: 1,
dangerouslySetInnerHTML: 1,
data: 0,
dateTime: 1,
default: 0,
defaultChecked: 1,
defaultValue: 1,
defer: 0,
dir: 0,
disabled: 0,
disablePictureInPicture: 1,
disableRemotePlayback: 1,
download: 0,
draggable: 0,
encType: 1,
enterKeyHint: 1,
for: "htmlFor",
form: 0,
formMethod: 1,
formAction: 1,
formEncType: 1,
formNoValidate: 1,
formTarget: 1,
frameBorder: 1,
headers: 0,
height: 0,
hidden: 0,
high: 0,
href: 0,
hrefLang: 1,
htmlFor: 1,
httpEquiv: 1,
"http-equiv": "httpEquiv",
icon: 0,
id: 0,
innerHTML: 1,
inputMode: 1,
integrity: 0,
is: 0,
itemID: 1,
itemProp: 1,
itemRef: 1,
itemScope: 1,
itemType: 1,
keyParams: 1,
keyType: 1,
kind: 0,
label: 0,
lang: 0,
list: 0,
loop: 0,
low: 0,
manifest: 0,
marginWidth: 1,
marginHeight: 1,
max: 0,
maxLength: 1,
media: 0,
mediaGroup: 1,
method: 0,
min: 0,
minLength: 1,
multiple: 0,
muted: 0,
name: 0,
noModule: 1,
nonce: 0,
noValidate: 1,
open: 0,
optimum: 0,
pattern: 0,
placeholder: 0,
playsInline: 1,
poster: 0,
preload: 0,
profile: 0,
radioGroup: 1,
readOnly: 1,
referrerPolicy: 1,
rel: 0,
required: 0,
reversed: 0,
role: 0,
rows: 0,
rowSpan: 1,
sandbox: 0,
scope: 0,
scoped: 0,
scrolling: 0,
seamless: 0,
selected: 0,
shape: 0,
size: 0,
sizes: 0,
span: 0,
spellCheck: 1,
src: 0,
srcDoc: 1,
srcLang: 1,
srcSet: 1,
start: 0,
step: 0,
style: 0,
summary: 0,
tabIndex: 1,
target: 0,
title: 0,
type: 0,
useMap: 1,
value: 0,
width: 0,
wmode: 0,
wrap: 0,
about: 0,
accentHeight: 1,
"accent-height": "accentHeight",
accumulate: 0,
additive: 0,
alignmentBaseline: 1,
"alignment-baseline": "alignmentBaseline",
allowReorder: 1,
alphabetic: 0,
amplitude: 0,
arabicForm: 1,
"arabic-form": "arabicForm",
ascent: 0,
attributeName: 1,
attributeType: 1,
autoReverse: 1,
azimuth: 0,
baseFrequency: 1,
baselineShift: 1,
"baseline-shift": "baselineShift",
baseProfile: 1,
bbox: 0,
begin: 0,
bias: 0,
by: 0,
calcMode: 1,
capHeight: 1,
"cap-height": "capHeight",
clip: 0,
clipPath: 1,
"clip-path": "clipPath",
clipPathUnits: 1,
clipRule: 1,
"clip-rule": "clipRule",
color: 0,
colorInterpolation: 1,
"color-interpolation": "colorInterpolation",
colorInterpolationFilters: 1,
"color-interpolation-filters": "colorInterpolationFilters",
colorProfile: 1,
"color-profile": "colorProfile",
colorRendering: 1,
"color-rendering": "colorRendering",
contentScriptType: 1,
contentStyleType: 1,
cursor: 0,
cx: 0,
cy: 0,
d: 0,
datatype: 0,
decelerate: 0,
descent: 0,
diffuseConstant: 1,
direction: 0,
display: 0,
divisor: 0,
dominantBaseline: 1,
"dominant-baseline": "dominantBaseline",
dur: 0,
dx: 0,
dy: 0,
edgeMode: 1,
elevation: 0,
enableBackground: 1,
"enable-background": "enableBackground",
end: 0,
exponent: 0,
externalResourcesRequired: 1,
fill: 0,
fillOpacity: 1,
"fill-opacity": "fillOpacity",
fillRule: 1,
"fill-rule": "fillRule",
filter: 0,
filterRes: 1,
filterUnits: 1,
floodOpacity: 1,
"flood-opacity": "floodOpacity",
floodColor: 1,
"flood-color": "floodColor",
focusable: 0,
fontFamily: 1,
"font-family": "fontFamily",
fontSize: 1,
"font-size": "fontSize",
fontSizeAdjust: 1,
"font-size-adjust": "fontSizeAdjust",
fontStretch: 1,
"font-stretch": "fontStretch",
fontStyle: 1,
"font-style": "fontStyle",
fontVariant: 1,
"font-variant": "fontVariant",
fontWeight: 1,
"font-weight": "fontWeight",
format: 0,
from: 0,
fx: 0,
fy: 0,
g1: 0,
g2: 0,
glyphName: 1,
"glyph-name": "glyphName",
glyphOrientationHorizontal: 1,
"glyph-orientation-horizontal": "glyphOrientationHorizontal",
glyphOrientationVertical: 1,
"glyph-orientation-vertical": "glyphOrientationVertical",
glyphRef: 1,
gradientTransform: 1,
gradientUnits: 1,
hanging: 0,
horizAdvX: 1,
"horiz-adv-x": "horizAdvX",
horizOriginX: 1,
"horiz-origin-x": "horizOriginX",
ideographic: 0,
imageRendering: 1,
"image-rendering": "imageRendering",
in2: 0,
in: 0,
inlist: 0,
intercept: 0,
k1: 0,
k2: 0,
k3: 0,
k4: 0,
k: 0,
kernelMatrix: 1,
kernelUnitLength: 1,
kerning: 0,
keyPoints: 1,
keySplines: 1,
keyTimes: 1,
lengthAdjust: 1,
letterSpacing: 1,
"letter-spacing": "letterSpacing",
lightingColor: 1,
"lighting-color": "lightingColor",
limitingConeAngle: 1,
local: 0,
markerEnd: 1,
"marker-end": "markerEnd",
markerHeight: 1,
markerMid: 1,
"marker-mid": "markerMid",
markerStart: 1,
"marker-start": "markerStart",
markerUnits: 1,
markerWidth: 1,
mask: 0,
maskContentUnits: 1,
maskUnits: 1,
mathematical: 0,
mode: 0,
numOctaves: 1,
offset: 0,
opacity: 0,
operator: 0,
order: 0,
orient: 0,
orientation: 0,
origin: 0,
overflow: 0,
overlinePosition: 1,
"overline-position": "overlinePosition",
overlineThickness: 1,
"overline-thickness": "overlineThickness",
paintOrder: 1,
"paint-order": "paintOrder",
panose1: 0,
"panose-1": "panose1",
pathLength: 1,
patternContentUnits: 1,
patternTransform: 1,
patternUnits: 1,
pointerEvents: 1,
"pointer-events": "pointerEvents",
points: 0,
pointsAtX: 1,
pointsAtY: 1,
pointsAtZ: 1,
prefix: 0,
preserveAlpha: 1,
preserveAspectRatio: 1,
primitiveUnits: 1,
property: 0,
r: 0,
radius: 0,
refX: 1,
refY: 1,
renderingIntent: 1,
"rendering-intent": "renderingIntent",
repeatCount: 1,
repeatDur: 1,
requiredExtensions: 1,
requiredFeatures: 1,
resource: 0,
restart: 0,
result: 0,
results: 0,
rotate: 0,
rx: 0,
ry: 0,
scale: 0,
security: 0,
seed: 0,
shapeRendering: 1,
"shape-rendering": "shapeRendering",
slope: 0,
spacing: 0,
specularConstant: 1,
specularExponent: 1,
speed: 0,
spreadMethod: 1,
startOffset: 1,
stdDeviation: 1,
stemh: 0,
stemv: 0,
stitchTiles: 1,
stopColor: 1,
"stop-color": "stopColor",
stopOpacity: 1,
"stop-opacity": "stopOpacity",
strikethroughPosition: 1,
"strikethrough-position": "strikethroughPosition",
strikethroughThickness: 1,
"strikethrough-thickness": "strikethroughThickness",
string: 0,
stroke: 0,
strokeDasharray: 1,
"stroke-dasharray": "strokeDasharray",
strokeDashoffset: 1,
"stroke-dashoffset": "strokeDashoffset",
strokeLinecap: 1,
"stroke-linecap": "strokeLinecap",
strokeLinejoin: 1,
"stroke-linejoin": "strokeLinejoin",
strokeMiterlimit: 1,
"stroke-miterlimit": "strokeMiterlimit",
strokeWidth: 1,
"stroke-width": "strokeWidth",
strokeOpacity: 1,
"stroke-opacity": "strokeOpacity",
suppressContentEditableWarning: 1,
suppressHydrationWarning: 1,
surfaceScale: 1,
systemLanguage: 1,
tableValues: 1,
targetX: 1,
targetY: 1,
textAnchor: 1,
"text-anchor": "textAnchor",
textDecoration: 1,
"text-decoration": "textDecoration",
textLength: 1,
textRendering: 1,
"text-rendering": "textRendering",
to: 0,
transform: 0,
typeof: 0,
u1: 0,
u2: 0,
underlinePosition: 1,
"underline-position": "underlinePosition",
underlineThickness: 1,
"underline-thickness": "underlineThickness",
unicode: 0,
unicodeBidi: 1,
"unicode-bidi": "unicodeBidi",
unicodeRange: 1,
"unicode-range": "unicodeRange",
unitsPerEm: 1,
"units-per-em": "unitsPerEm",
unselectable: 0,
vAlphabetic: 1,
"v-alphabetic": "vAlphabetic",
values: 0,
vectorEffect: 1,
"vector-effect": "vectorEffect",
version: 0,
vertAdvY: 1,
"vert-adv-y": "vertAdvY",
vertOriginX: 1,
"vert-origin-x": "vertOriginX",
vertOriginY: 1,
"vert-origin-y": "vertOriginY",
vHanging: 1,
"v-hanging": "vHanging",
vIdeographic: 1,
"v-ideographic": "vIdeographic",
viewBox: 1,
viewTarget: 1,
visibility: 0,
vMathematical: 1,
"v-mathematical": "vMathematical",
vocab: 0,
widths: 0,
wordSpacing: 1,
"word-spacing": "wordSpacing",
writingMode: 1,
"writing-mode": "writingMode",
x1: 0,
x2: 0,
x: 0,
xChannelSelector: 1,
xHeight: 1,
"x-height": "xHeight",
xlinkActuate: 1,
"xlink:actuate": "xlinkActuate",
xlinkArcrole: 1,
"xlink:arcrole": "xlinkArcrole",
xlinkHref: 1,
"xlink:href": "xlinkHref",
xlinkRole: 1,
"xlink:role": "xlinkRole",
xlinkShow: 1,
"xlink:show": "xlinkShow",
xlinkTitle: 1,
"xlink:title": "xlinkTitle",
xlinkType: 1,
"xlink:type": "xlinkType",
xmlBase: 1,
"xml:base": "xmlBase",
xmlLang: 1,
"xml:lang": "xmlLang",
xmlns: 0,
"xml:space": "xmlSpace",
xmlnsXlink: 1,
"xmlns:xlink": "xmlnsXlink",
xmlSpace: 1,
y1: 0,
y2: 0,
y: 0,
yChannelSelector: 1,
z: 0,
zoomAndPan: 1
};
}
});
// node_modules/react-property/lib/index.js
var require_lib3 = __commonJS({
"node_modules/react-property/lib/index.js"(exports) {
"use strict";
var RESERVED = 0;
var STRING = 1;
var BOOLEANISH_STRING = 2;
var BOOLEAN = 3;
var OVERLOADED_BOOLEAN = 4;
var NUMERIC = 5;
var POSITIVE_NUMERIC = 6;
function getPropertyInfo(name123) {
return properties.hasOwnProperty(name123) ? properties[name123] : null;
}
function PropertyInfoRecord(name123, type, mustUseProperty, attributeName, attributeNamespace, sanitizeURL, removeEmptyString) {
this.acceptsBooleans = type === BOOLEANISH_STRING || type === BOOLEAN || type === OVERLOADED_BOOLEAN;
this.attributeName = attributeName;
this.attributeNamespace = attributeNamespace;
this.mustUseProperty = mustUseProperty;
this.propertyName = name123;
this.type = type;
this.sanitizeURL = sanitizeURL;
this.removeEmptyString = removeEmptyString;
}
var properties = {};
var reservedProps = [
"children",
"dangerouslySetInnerHTML",
// TODO: This prevents the assignment of defaultValue to regular
// elements (not just inputs). Now that ReactDOMInput assigns to the
// defaultValue property -- do we need this?
"defaultValue",
"defaultChecked",
"innerHTML",
"suppressContentEditableWarning",
"suppressHydrationWarning",
"style"
];
reservedProps.forEach((name123) => {
properties[name123] = new PropertyInfoRecord(
name123,
RESERVED,
false,
// mustUseProperty
name123,
// attributeName
null,
// attributeNamespace
false,
// sanitizeURL
false
// removeEmptyString
);
});
[
["acceptCharset", "accept-charset"],
["className", "class"],
["htmlFor", "for"],
["httpEquiv", "http-equiv"]
].forEach(([name123, attributeName]) => {
properties[name123] = new PropertyInfoRecord(
name123,
STRING,
false,
// mustUseProperty
attributeName,
// attributeName
null,
// attributeNamespace
false,
// sanitizeURL
false
// removeEmptyString
);
});
["contentEditable", "draggable", "spellCheck", "value"].forEach((name123) => {
properties[name123] = new PropertyInfoRecord(
name123,
BOOLEANISH_STRING,
false,
// mustUseProperty
name123.toLowerCase(),
// attributeName
null,
// attributeNamespace
false,
// sanitizeURL
false
// removeEmptyString
);
});
[
"autoReverse",
"externalResourcesRequired",
"focusable",
"preserveAlpha"
].forEach((name123) => {
properties[name123] = new PropertyInfoRecord(
name123,
BOOLEANISH_STRING,
false,
// mustUseProperty
name123,
// attributeName
null,
// attributeNamespace
false,
// sanitizeURL
false
// removeEmptyString
);
});
[
"allowFullScreen",
"async",
// Note: there is a special case that prevents it from being written to the DOM
// on the client side because the browsers are inconsistent. Instead we call focus().
"autoFocus",
"autoPlay",
"controls",
"default",
"defer",
"disabled",
"disablePictureInPicture",
"disableRemotePlayback",
"formNoValidate",
"hidden",
"loop",
"noModule",
"noValidate",
"open",
"playsInline",
"readOnly",
"required",
"reversed",
"scoped",
"seamless",
// Microdata
"itemScope"
].forEach((name123) => {
properties[name123] = new PropertyInfoRecord(
name123,
BOOLEAN,
false,
// mustUseProperty
name123.toLowerCase(),
// attributeName
null,
// attributeNamespace
false,
// sanitizeURL
false
// removeEmptyString
);
});
[
"checked",
// Note: `option.selected` is not updated if `select.multiple` is
// disabled with `removeAttribute`. We have special logic for handling this.
"multiple",
"muted",
"selected"
// NOTE: if you add a camelCased prop to this list,
// you'll need to set attributeName to name.toLowerCase()
// instead in the assignment below.
].forEach((name123) => {
properties[name123] = new PropertyInfoRecord(
name123,
BOOLEAN,
true,
// mustUseProperty
name123,
// attributeName
null,
// attributeNamespace
false,
// sanitizeURL
false
// removeEmptyString
);
});
[
"capture",
"download"
// NOTE: if you add a camelCased prop to this list,
// you'll need to set attributeName to name.toLowerCase()
// instead in the assignment below.
].forEach((name123) => {
properties[name123] = new PropertyInfoRecord(
name123,
OVERLOADED_BOOLEAN,
false,
// mustUseProperty
name123,
// attributeName
null,
// attributeNamespace
false,
// sanitizeURL
false
// removeEmptyString
);
});
[
"cols",
"rows",
"size",
"span"
// NOTE: if you add a camelCased prop to this list,
// you'll need to set attributeName to name.toLowerCase()
// instead in the assignment below.
].forEach((name123) => {
properties[name123] = new PropertyInfoRecord(
name123,
POSITIVE_NUMERIC,
false,
// mustUseProperty
name123,
// attributeName
null,
// attributeNamespace
false,
// sanitizeURL
false
// removeEmptyString
);
});
["rowSpan", "start"].forEach((name123) => {
properties[name123] = new PropertyInfoRecord(
name123,
NUMERIC,
false,
// mustUseProperty
name123.toLowerCase(),
// attributeName
null,
// attributeNamespace
false,
// sanitizeURL
false
// removeEmptyString
);
});
var CAMELIZE = /[\-\:]([a-z])/g;
var capitalize2 = (token) => token[1].toUpperCase();
[
"accent-height",
"alignment-baseline",
"arabic-form",
"baseline-shift",
"cap-height",
"clip-path",
"clip-rule",
"color-interpolation",
"color-interpolation-filters",
"color-profile",
"color-rendering",
"dominant-baseline",
"enable-background",
"fill-opacity",
"fill-rule",
"flood-color",
"flood-opacity",
"font-family",
"font-size",
"font-size-adjust",
"font-stretch",
"font-style",
"font-variant",
"font-weight",
"glyph-name",
"glyph-orientation-horizontal",
"glyph-orientation-vertical",
"horiz-adv-x",
"horiz-origin-x",
"image-rendering",
"letter-spacing",
"lighting-color",
"marker-end",
"marker-mid",
"marker-start",
"overline-position",
"overline-thickness",
"paint-order",
"panose-1",
"pointer-events",
"rendering-intent",
"shape-rendering",
"stop-color",
"stop-opacity",
"strikethrough-position",
"strikethrough-thickness",
"stroke-dasharray",
"stroke-dashoffset",
"stroke-linecap",
"stroke-linejoin",
"stroke-miterlimit",
"stroke-opacity",
"stroke-width",
"text-anchor",
"text-decoration",
"text-rendering",
"underline-position",
"underline-thickness",
"unicode-bidi",
"unicode-range",
"units-per-em",
"v-alphabetic",
"v-hanging",
"v-ideographic",
"v-mathematical",
"vector-effect",
"vert-adv-y",
"vert-origin-x",
"vert-origin-y",
"word-spacing",
"writing-mode",
"xmlns:xlink",
"x-height"
// NOTE: if you add a camelCased prop to this list,
// you'll need to set attributeName to name.toLowerCase()
// instead in the assignment below.
].forEach((attributeName) => {
const name123 = attributeName.replace(CAMELIZE, capitalize2);
properties[name123] = new PropertyInfoRecord(
name123,
STRING,
false,
// mustUseProperty
attributeName,
null,
// attributeNamespace
false,
// sanitizeURL
false
// removeEmptyString
);
});
[
"xlink:actuate",
"xlink:arcrole",
"xlink:role",
"xlink:show",
"xlink:title",
"xlink:type"
// NOTE: if you add a camelCased prop to this list,
// you'll need to set attributeName to name.toLowerCase()
// instead in the assignment below.
].forEach((attributeName) => {
const name123 = attributeName.replace(CAMELIZE, capitalize2);
properties[name123] = new PropertyInfoRecord(
name123,
STRING,
false,
// mustUseProperty
attributeName,
"http://www.w3.org/1999/xlink",
false,
// sanitizeURL
false
// removeEmptyString
);
});
[
"xml:base",
"xml:lang",
"xml:space"
// NOTE: if you add a camelCased prop to this list,
// you'll need to set attributeName to name.toLowerCase()
// instead in the assignment below.
].forEach((attributeName) => {
const name123 = attributeName.replace(CAMELIZE, capitalize2);
properties[name123] = new PropertyInfoRecord(
name123,
STRING,
false,
// mustUseProperty
attributeName,
"http://www.w3.org/XML/1998/namespace",
false,
// sanitizeURL
false
// removeEmptyString
);
});
["tabIndex", "crossOrigin"].forEach((attributeName) => {
properties[attributeName] = new PropertyInfoRecord(
attributeName,
STRING,
false,
// mustUseProperty
attributeName.toLowerCase(),
// attributeName
null,
// attributeNamespace
false,
// sanitizeURL
false
// removeEmptyString
);
});
var xlinkHref = "xlinkHref";
properties[xlinkHref] = new PropertyInfoRecord(
"xlinkHref",
STRING,
false,
// mustUseProperty
"xlink:href",
"http://www.w3.org/1999/xlink",
true,
// sanitizeURL
false
// removeEmptyString
);
["src", "href", "action", "formAction"].forEach((attributeName) => {
properties[attributeName] = new PropertyInfoRecord(
attributeName,
STRING,
false,
// mustUseProperty
attributeName.toLowerCase(),
// attributeName
null,
// attributeNamespace
true,
// sanitizeURL
true
// removeEmptyString
);
});
var {
CAMELCASE,
SAME,
possibleStandardNames: possibleStandardNamesOptimized
} = require_possibleStandardNamesOptimized();
var ATTRIBUTE_NAME_START_CHAR = ":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD";
var ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + "\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040";
var isCustomAttribute = RegExp.prototype.test.bind(
// eslint-disable-next-line no-misleading-character-class
new RegExp("^(data|aria)-[" + ATTRIBUTE_NAME_CHAR + "]*$")
);
var possibleStandardNames = Object.keys(
possibleStandardNamesOptimized
).reduce((accumulator, standardName) => {
const propName = possibleStandardNamesOptimized[standardName];
if (propName === SAME) {
accumulator[standardName] = standardName;
} else if (propName === CAMELCASE) {
accumulator[standardName.toLowerCase()] = standardName;
} else {
accumulator[standardName] = propName;
}
return accumulator;
}, {});
exports.BOOLEAN = BOOLEAN;
exports.BOOLEANISH_STRING = BOOLEANISH_STRING;
exports.NUMERIC = NUMERIC;
exports.OVERLOADED_BOOLEAN = OVERLOADED_BOOLEAN;
exports.POSITIVE_NUMERIC = POSITIVE_NUMERIC;
exports.RESERVED = RESERVED;
exports.STRING = STRING;
exports.getPropertyInfo = getPropertyInfo;
exports.isCustomAttribute = isCustomAttribute;
exports.possibleStandardNames = possibleStandardNames;
}
});
// vendor-external:react
var require_react = __commonJS({
"vendor-external:react"(exports, module) {
module.exports = window.React;
}
});
// node_modules/inline-style-parser/cjs/index.js
var require_cjs = __commonJS({
"node_modules/inline-style-parser/cjs/index.js"(exports, module) {
"use strict";
var COMMENT_REGEX = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;
var NEWLINE_REGEX = /\n/g;
var WHITESPACE_REGEX = /^\s*/;
var PROPERTY_REGEX = /^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/;
var COLON_REGEX = /^:\s*/;
var VALUE_REGEX = /^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/;
var SEMICOLON_REGEX = /^[;\s]*/;
var TRIM_REGEX = /^\s+|\s+$/g;
var NEWLINE = "\n";
var FORWARD_SLASH = "/";
var ASTERISK = "*";
var EMPTY_STRING = "";
var TYPE_COMMENT = "comment";
var TYPE_DECLARATION = "declaration";
function index(style2, options2) {
if (typeof style2 !== "string") {
throw new TypeError("First argument must be a string");
}
if (!style2) return [];
options2 = options2 || {};
var lineno = 1;
var column = 1;
function updatePosition(str) {
var lines = str.match(NEWLINE_REGEX);
if (lines) lineno += lines.length;
var i2 = str.lastIndexOf(NEWLINE);
column = ~i2 ? str.length - i2 : column + str.length;
}
function position() {
var start = { line: lineno, column };
return function(node) {
node.position = new Position(start);
whitespace();
return node;
};
}
function Position(start) {
this.start = start;
this.end = { line: lineno, column };
this.source = options2.source;
}
Position.prototype.content = style2;
function error(msg) {
var err = new Error(
options2.source + ":" + lineno + ":" + column + ": " + msg
);
err.reason = msg;
err.filename = options2.source;
err.line = lineno;
err.column = column;
err.source = style2;
if (options2.silent) ;
else {
throw err;
}
}
function match(re) {
var m2 = re.exec(style2);
if (!m2) return;
var str = m2[0];
updatePosition(str);
style2 = style2.slice(str.length);
return m2;
}
function whitespace() {
match(WHITESPACE_REGEX);
}
function comments(rules) {
var c2;
rules = rules || [];
while (c2 = comment()) {
if (c2 !== false) {
rules.push(c2);
}
}
return rules;
}
function comment() {
var pos = position();
if (FORWARD_SLASH != style2.charAt(0) || ASTERISK != style2.charAt(1)) return;
var i2 = 2;
while (EMPTY_STRING != style2.charAt(i2) && (ASTERISK != style2.charAt(i2) || FORWARD_SLASH != style2.charAt(i2 + 1))) {
++i2;
}
i2 += 2;
if (EMPTY_STRING === style2.charAt(i2 - 1)) {
return error("End of comment missing");
}
var str = style2.slice(2, i2 - 2);
column += 2;
updatePosition(str);
style2 = style2.slice(i2);
column += 2;
return pos({
type: TYPE_COMMENT,
comment: str
});
}
function declaration() {
var pos = position();
var prop = match(PROPERTY_REGEX);
if (!prop) return;
comment();
if (!match(COLON_REGEX)) return error("property missing ':'");
var val = match(VALUE_REGEX);
var ret = pos({
type: TYPE_DECLARATION,
property: trim(prop[0].replace(COMMENT_REGEX, EMPTY_STRING)),
value: val ? trim(val[0].replace(COMMENT_REGEX, EMPTY_STRING)) : EMPTY_STRING
});
match(SEMICOLON_REGEX);
return ret;
}
function declarations() {
var decls = [];
comments(decls);
var decl;
while (decl = declaration()) {
if (decl !== false) {
decls.push(decl);
comments(decls);
}
}
return decls;
}
whitespace();
return declarations();
}
function trim(str) {
return str ? str.replace(TRIM_REGEX, EMPTY_STRING) : EMPTY_STRING;
}
module.exports = index;
}
});
// node_modules/style-to-object/cjs/index.js
var require_cjs2 = __commonJS({
"node_modules/style-to-object/cjs/index.js"(exports) {
"use strict";
var __importDefault = exports && exports.__importDefault || function(mod) {
return mod && mod.__esModule ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = StyleToObject;
var inline_style_parser_1 = __importDefault(require_cjs());
function StyleToObject(style2, iterator) {
let styleObject = null;
if (!style2 || typeof style2 !== "string") {
return styleObject;
}
const declarations = (0, inline_style_parser_1.default)(style2);
const hasIterator = typeof iterator === "function";
declarations.forEach((declaration) => {
if (declaration.type !== "declaration") {
return;
}
const { property, value } = declaration;
if (hasIterator) {
iterator(property, value, declaration);
} else if (value) {
styleObject = styleObject || {};
styleObject[property] = value;
}
});
return styleObject;
}
}
});
// node_modules/style-to-js/cjs/utilities.js
var require_utilities2 = __commonJS({
"node_modules/style-to-js/cjs/utilities.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.camelCase = void 0;
var CUSTOM_PROPERTY_REGEX = /^--[a-zA-Z0-9_-]+$/;
var HYPHEN_REGEX = /-([a-z])/g;
var NO_HYPHEN_REGEX = /^[^-]+$/;
var VENDOR_PREFIX_REGEX = /^-(webkit|moz|ms|o|khtml)-/;
var MS_VENDOR_PREFIX_REGEX = /^-(ms)-/;
var skipCamelCase = function(property) {
return !property || NO_HYPHEN_REGEX.test(property) || CUSTOM_PROPERTY_REGEX.test(property);
};
var capitalize2 = function(match, character) {
return character.toUpperCase();
};
var trimHyphen = function(match, prefix) {
return "".concat(prefix, "-");
};
var camelCase = function(property, options2) {
if (options2 === void 0) {
options2 = {};
}
if (skipCamelCase(property)) {
return property;
}
property = property.toLowerCase();
if (options2.reactCompat) {
property = property.replace(MS_VENDOR_PREFIX_REGEX, trimHyphen);
} else {
property = property.replace(VENDOR_PREFIX_REGEX, trimHyphen);
}
return property.replace(HYPHEN_REGEX, capitalize2);
};
exports.camelCase = camelCase;
}
});
// node_modules/style-to-js/cjs/index.js
var require_cjs3 = __commonJS({
"node_modules/style-to-js/cjs/index.js"(exports, module) {
"use strict";
var __importDefault = exports && exports.__importDefault || function(mod) {
return mod && mod.__esModule ? mod : { "default": mod };
};
var style_to_object_1 = __importDefault(require_cjs2());
var utilities_1 = require_utilities2();
function StyleToJS(style2, options2) {
var output = {};
if (!style2 || typeof style2 !== "string") {
return output;
}
(0, style_to_object_1.default)(style2, function(property, value) {
if (property && value) {
output[(0, utilities_1.camelCase)(property, options2)] = value;
}
});
return output;
}
StyleToJS.default = StyleToJS;
module.exports = StyleToJS;
}
});
// node_modules/html-react-parser/lib/utilities.js
var require_utilities3 = __commonJS({
"node_modules/html-react-parser/lib/utilities.js"(exports) {
"use strict";
var __importDefault = exports && exports.__importDefault || function(mod) {
return mod && mod.__esModule ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.returnFirstArg = exports.canTextBeChildOfNode = exports.ELEMENTS_WITH_NO_TEXT_CHILDREN = exports.PRESERVE_CUSTOM_ATTRIBUTES = void 0;
exports.isCustomComponent = isCustomComponent;
exports.setStyleProp = setStyleProp;
var react_1 = require_react();
var style_to_js_1 = __importDefault(require_cjs3());
var RESERVED_SVG_MATHML_ELEMENTS = /* @__PURE__ */ new Set([
"annotation-xml",
"color-profile",
"font-face",
"font-face-src",
"font-face-uri",
"font-face-format",
"font-face-name",
"missing-glyph"
]);
function isCustomComponent(tagName, props) {
if (!tagName.includes("-")) {
return Boolean(props && typeof props.is === "string");
}
if (RESERVED_SVG_MATHML_ELEMENTS.has(tagName)) {
return false;
}
return true;
}
var styleOptions = {
reactCompat: true
};
function setStyleProp(style2, props) {
if (typeof style2 !== "string") {
return;
}
if (!style2.trim()) {
props.style = {};
return;
}
try {
props.style = (0, style_to_js_1.default)(style2, styleOptions);
} catch (error) {
props.style = {};
}
}
exports.PRESERVE_CUSTOM_ATTRIBUTES = Number(react_1.version.split(".")[0]) >= 16;
exports.ELEMENTS_WITH_NO_TEXT_CHILDREN = /* @__PURE__ */ new Set([
"tr",
"tbody",
"thead",
"tfoot",
"colgroup",
"table",
"head",
"html",
"frameset"
]);
var canTextBeChildOfNode = function(node) {
return !exports.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(node.name);
};
exports.canTextBeChildOfNode = canTextBeChildOfNode;
var returnFirstArg = function(arg) {
return arg;
};
exports.returnFirstArg = returnFirstArg;
}
});
// node_modules/html-react-parser/lib/attributes-to-props.js
var require_attributes_to_props = __commonJS({
"node_modules/html-react-parser/lib/attributes-to-props.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = attributesToProps2;
var react_property_1 = require_lib3();
var utilities_1 = require_utilities3();
var UNCONTROLLED_COMPONENT_ATTRIBUTES = ["checked", "value"];
var UNCONTROLLED_COMPONENT_NAMES = ["input", "select", "textarea"];
var valueOnlyInputs = {
reset: true,
submit: true
};
function attributesToProps2(attributes2, nodeName) {
if (attributes2 === void 0) {
attributes2 = {};
}
var props = {};
var isInputValueOnly = Boolean(attributes2.type && valueOnlyInputs[attributes2.type]);
for (var attributeName in attributes2) {
var attributeValue = attributes2[attributeName];
if ((0, react_property_1.isCustomAttribute)(attributeName)) {
props[attributeName] = attributeValue;
continue;
}
var attributeNameLowerCased = attributeName.toLowerCase();
var propName = getPropName(attributeNameLowerCased);
if (propName) {
var propertyInfo = (0, react_property_1.getPropertyInfo)(propName);
if (UNCONTROLLED_COMPONENT_ATTRIBUTES.includes(propName) && UNCONTROLLED_COMPONENT_NAMES.includes(nodeName) && !isInputValueOnly) {
propName = getPropName("default" + attributeNameLowerCased);
}
props[propName] = attributeValue;
switch (propertyInfo && propertyInfo.type) {
case react_property_1.BOOLEAN:
props[propName] = true;
break;
case react_property_1.OVERLOADED_BOOLEAN:
if (attributeValue === "") {
props[propName] = true;
}
break;
}
continue;
}
if (utilities_1.PRESERVE_CUSTOM_ATTRIBUTES) {
props[attributeName] = attributeValue;
}
}
(0, utilities_1.setStyleProp)(attributes2.style, props);
return props;
}
function getPropName(attributeName) {
return react_property_1.possibleStandardNames[attributeName];
}
}
});
// node_modules/html-react-parser/lib/dom-to-react.js
var require_dom_to_react = __commonJS({
"node_modules/html-react-parser/lib/dom-to-react.js"(exports) {
"use strict";
var __importDefault = exports && exports.__importDefault || function(mod) {
return mod && mod.__esModule ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = domToReact2;
var react_1 = require_react();
var attributes_to_props_1 = __importDefault(require_attributes_to_props());
var utilities_1 = require_utilities3();
var React = {
cloneElement: react_1.cloneElement,
createElement: react_1.createElement,
isValidElement: react_1.isValidElement
};
function domToReact2(nodes, options2) {
if (options2 === void 0) {
options2 = {};
}
var reactElements = [];
var hasReplace = typeof options2.replace === "function";
var transform = options2.transform || utilities_1.returnFirstArg;
var _a = options2.library || React, cloneElement2 = _a.cloneElement, createElement2 = _a.createElement, isValidElement = _a.isValidElement;
var nodesLength = nodes.length;
for (var index = 0; index < nodesLength; index++) {
var node = nodes[index];
if (hasReplace) {
var replaceElement = options2.replace(node, index);
if (isValidElement(replaceElement)) {
if (nodesLength > 1) {
replaceElement = cloneElement2(replaceElement, {
key: replaceElement.key || index
});
}
reactElements.push(transform(replaceElement, node, index));
continue;
}
}
if (node.type === "text") {
var isWhitespace = !node.data.trim().length;
if (isWhitespace && node.parent && !(0, utilities_1.canTextBeChildOfNode)(node.parent)) {
continue;
}
if (options2.trim && isWhitespace) {
continue;
}
reactElements.push(transform(node.data, node, index));
continue;
}
var element = node;
var props = {};
if (skipAttributesToProps(element)) {
(0, utilities_1.setStyleProp)(element.attribs.style, element.attribs);
props = element.attribs;
} else if (element.attribs) {
props = (0, attributes_to_props_1.default)(element.attribs, element.name);
}
var children = void 0;
switch (node.type) {
case "script":
case "style":
if (node.children[0]) {
props.dangerouslySetInnerHTML = {
__html: node.children[0].data
};
}
break;
case "tag":
if (node.name === "textarea" && node.children[0]) {
props.defaultValue = node.children[0].data;
} else if (node.children && node.children.length) {
children = domToReact2(node.children, options2);
}
break;
// skip all other cases (e.g., comment)
default:
continue;
}
if (nodesLength > 1) {
props.key = index;
}
reactElements.push(transform(createElement2(node.name, props, children), node, index));
}
return reactElements.length === 1 ? reactElements[0] : reactElements;
}
function skipAttributesToProps(node) {
return utilities_1.PRESERVE_CUSTOM_ATTRIBUTES && node.type === "tag" && (0, utilities_1.isCustomComponent)(node.name, node.attribs);
}
}
});
// node_modules/html-react-parser/node_modules/domelementtype/lib/index.js
var require_lib4 = __commonJS({
"node_modules/html-react-parser/node_modules/domelementtype/lib/index.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Doctype = exports.CDATA = exports.Tag = exports.Style = exports.Script = exports.Comment = exports.Directive = exports.Text = exports.Root = exports.isTag = exports.ElementType = void 0;
var ElementType;
(function(ElementType2) {
ElementType2["Root"] = "root";
ElementType2["Text"] = "text";
ElementType2["Directive"] = "directive";
ElementType2["Comment"] = "comment";
ElementType2["Script"] = "script";
ElementType2["Style"] = "style";
ElementType2["Tag"] = "tag";
ElementType2["CDATA"] = "cdata";
ElementType2["Doctype"] = "doctype";
})(ElementType = exports.ElementType || (exports.ElementType = {}));
function isTag(elem) {
return elem.type === ElementType.Tag || elem.type === ElementType.Script || elem.type === ElementType.Style;
}
exports.isTag = isTag;
exports.Root = ElementType.Root;
exports.Text = ElementType.Text;
exports.Directive = ElementType.Directive;
exports.Comment = ElementType.Comment;
exports.Script = ElementType.Script;
exports.Style = ElementType.Style;
exports.Tag = ElementType.Tag;
exports.CDATA = ElementType.CDATA;
exports.Doctype = ElementType.Doctype;
}
});
// node_modules/html-react-parser/node_modules/domhandler/lib/node.js
var require_node2 = __commonJS({
"node_modules/html-react-parser/node_modules/domhandler/lib/node.js"(exports) {
"use strict";
var __extends = exports && exports.__extends || /* @__PURE__ */ (function() {
var extendStatics = function(d2, b2) {
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d3, b3) {
d3.__proto__ = b3;
} || function(d3, b3) {
for (var p2 in b3) if (Object.prototype.hasOwnProperty.call(b3, p2)) d3[p2] = b3[p2];
};
return extendStatics(d2, b2);
};
return function(d2, b2) {
if (typeof b2 !== "function" && b2 !== null)
throw new TypeError("Class extends value " + String(b2) + " is not a constructor or null");
extendStatics(d2, b2);
function __268() {
this.constructor = d2;
}
d2.prototype = b2 === null ? Object.create(b2) : (__268.prototype = b2.prototype, new __268());
};
})();
var __assign2 = exports && exports.__assign || function() {
__assign2 = Object.assign || function(t2) {
for (var s2, i2 = 1, n2 = arguments.length; i2 < n2; i2++) {
s2 = arguments[i2];
for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2))
t2[p2] = s2[p2];
}
return t2;
};
return __assign2.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.cloneNode = exports.hasChildren = exports.isDocument = exports.isDirective = exports.isComment = exports.isText = exports.isCDATA = exports.isTag = exports.Element = exports.Document = exports.CDATA = exports.NodeWithChildren = exports.ProcessingInstruction = exports.Comment = exports.Text = exports.DataNode = exports.Node = void 0;
var domelementtype_1 = require_lib4();
var Node = (
/** @class */
(function() {
function Node2() {
this.parent = null;
this.prev = null;
this.next = null;
this.startIndex = null;
this.endIndex = null;
}
Object.defineProperty(Node2.prototype, "parentNode", {
// Read-write aliases for properties
/**
* Same as {@link parent}.
* [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
*/
get: function() {
return this.parent;
},
set: function(parent) {
this.parent = parent;
},
enumerable: false,
configurable: true
});
Object.defineProperty(Node2.prototype, "previousSibling", {
/**
* Same as {@link prev}.
* [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
*/
get: function() {
return this.prev;
},
set: function(prev) {
this.prev = prev;
},
enumerable: false,
configurable: true
});
Object.defineProperty(Node2.prototype, "nextSibling", {
/**
* Same as {@link next}.
* [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
*/
get: function() {
return this.next;
},
set: function(next) {
this.next = next;
},
enumerable: false,
configurable: true
});
Node2.prototype.cloneNode = function(recursive) {
if (recursive === void 0) {
recursive = false;
}
return cloneNode(this, recursive);
};
return Node2;
})()
);
exports.Node = Node;
var DataNode = (
/** @class */
(function(_super) {
__extends(DataNode2, _super);
function DataNode2(data) {
var _this = _super.call(this) || this;
_this.data = data;
return _this;
}
Object.defineProperty(DataNode2.prototype, "nodeValue", {
/**
* Same as {@link data}.
* [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
*/
get: function() {
return this.data;
},
set: function(data) {
this.data = data;
},
enumerable: false,
configurable: true
});
return DataNode2;
})(Node)
);
exports.DataNode = DataNode;
var Text4 = (
/** @class */
(function(_super) {
__extends(Text5, _super);
function Text5() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.type = domelementtype_1.ElementType.Text;
return _this;
}
Object.defineProperty(Text5.prototype, "nodeType", {
get: function() {
return 3;
},
enumerable: false,
configurable: true
});
return Text5;
})(DataNode)
);
exports.Text = Text4;
var Comment2 = (
/** @class */
(function(_super) {
__extends(Comment3, _super);
function Comment3() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.type = domelementtype_1.ElementType.Comment;
return _this;
}
Object.defineProperty(Comment3.prototype, "nodeType", {
get: function() {
return 8;
},
enumerable: false,
configurable: true
});
return Comment3;
})(DataNode)
);
exports.Comment = Comment2;
var ProcessingInstruction2 = (
/** @class */
(function(_super) {
__extends(ProcessingInstruction3, _super);
function ProcessingInstruction3(name123, data) {
var _this = _super.call(this, data) || this;
_this.name = name123;
_this.type = domelementtype_1.ElementType.Directive;
return _this;
}
Object.defineProperty(ProcessingInstruction3.prototype, "nodeType", {
get: function() {
return 1;
},
enumerable: false,
configurable: true
});
return ProcessingInstruction3;
})(DataNode)
);
exports.ProcessingInstruction = ProcessingInstruction2;
var NodeWithChildren = (
/** @class */
(function(_super) {
__extends(NodeWithChildren2, _super);
function NodeWithChildren2(children) {
var _this = _super.call(this) || this;
_this.children = children;
return _this;
}
Object.defineProperty(NodeWithChildren2.prototype, "firstChild", {
// Aliases
/** First child of the node. */
get: function() {
var _a;
return (_a = this.children[0]) !== null && _a !== void 0 ? _a : null;
},
enumerable: false,
configurable: true
});
Object.defineProperty(NodeWithChildren2.prototype, "lastChild", {
/** Last child of the node. */
get: function() {
return this.children.length > 0 ? this.children[this.children.length - 1] : null;
},
enumerable: false,
configurable: true
});
Object.defineProperty(NodeWithChildren2.prototype, "childNodes", {
/**
* Same as {@link children}.
* [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
*/
get: function() {
return this.children;
},
set: function(children) {
this.children = children;
},
enumerable: false,
configurable: true
});
return NodeWithChildren2;
})(Node)
);
exports.NodeWithChildren = NodeWithChildren;
var CDATA = (
/** @class */
(function(_super) {
__extends(CDATA2, _super);
function CDATA2() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.type = domelementtype_1.ElementType.CDATA;
return _this;
}
Object.defineProperty(CDATA2.prototype, "nodeType", {
get: function() {
return 4;
},
enumerable: false,
configurable: true
});
return CDATA2;
})(NodeWithChildren)
);
exports.CDATA = CDATA;
var Document = (
/** @class */
(function(_super) {
__extends(Document2, _super);
function Document2() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.type = domelementtype_1.ElementType.Root;
return _this;
}
Object.defineProperty(Document2.prototype, "nodeType", {
get: function() {
return 9;
},
enumerable: false,
configurable: true
});
return Document2;
})(NodeWithChildren)
);
exports.Document = Document;
var Element2 = (
/** @class */
(function(_super) {
__extends(Element3, _super);
function Element3(name123, attribs, children, type) {
if (children === void 0) {
children = [];
}
if (type === void 0) {
type = name123 === "script" ? domelementtype_1.ElementType.Script : name123 === "style" ? domelementtype_1.ElementType.Style : domelementtype_1.ElementType.Tag;
}
var _this = _super.call(this, children) || this;
_this.name = name123;
_this.attribs = attribs;
_this.type = type;
return _this;
}
Object.defineProperty(Element3.prototype, "nodeType", {
get: function() {
return 1;
},
enumerable: false,
configurable: true
});
Object.defineProperty(Element3.prototype, "tagName", {
// DOM Level 1 aliases
/**
* Same as {@link name}.
* [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
*/
get: function() {
return this.name;
},
set: function(name123) {
this.name = name123;
},
enumerable: false,
configurable: true
});
Object.defineProperty(Element3.prototype, "attributes", {
get: function() {
var _this = this;
return Object.keys(this.attribs).map(function(name123) {
var _a, _b;
return {
name: name123,
value: _this.attribs[name123],
namespace: (_a = _this["x-attribsNamespace"]) === null || _a === void 0 ? void 0 : _a[name123],
prefix: (_b = _this["x-attribsPrefix"]) === null || _b === void 0 ? void 0 : _b[name123]
};
});
},
enumerable: false,
configurable: true
});
return Element3;
})(NodeWithChildren)
);
exports.Element = Element2;
function isTag(node) {
return (0, domelementtype_1.isTag)(node);
}
exports.isTag = isTag;
function isCDATA(node) {
return node.type === domelementtype_1.ElementType.CDATA;
}
exports.isCDATA = isCDATA;
function isText(node) {
return node.type === domelementtype_1.ElementType.Text;
}
exports.isText = isText;
function isComment(node) {
return node.type === domelementtype_1.ElementType.Comment;
}
exports.isComment = isComment;
function isDirective(node) {
return node.type === domelementtype_1.ElementType.Directive;
}
exports.isDirective = isDirective;
function isDocument(node) {
return node.type === domelementtype_1.ElementType.Root;
}
exports.isDocument = isDocument;
function hasChildren(node) {
return Object.prototype.hasOwnProperty.call(node, "children");
}
exports.hasChildren = hasChildren;
function cloneNode(node, recursive) {
if (recursive === void 0) {
recursive = false;
}
var result;
if (isText(node)) {
result = new Text4(node.data);
} else if (isComment(node)) {
result = new Comment2(node.data);
} else if (isTag(node)) {
var children = recursive ? cloneChildren(node.children) : [];
var clone_1 = new Element2(node.name, __assign2({}, node.attribs), children);
children.forEach(function(child) {
return child.parent = clone_1;
});
if (node.namespace != null) {
clone_1.namespace = node.namespace;
}
if (node["x-attribsNamespace"]) {
clone_1["x-attribsNamespace"] = __assign2({}, node["x-attribsNamespace"]);
}
if (node["x-attribsPrefix"]) {
clone_1["x-attribsPrefix"] = __assign2({}, node["x-attribsPrefix"]);
}
result = clone_1;
} else if (isCDATA(node)) {
var children = recursive ? cloneChildren(node.children) : [];
var clone_2 = new CDATA(children);
children.forEach(function(child) {
return child.parent = clone_2;
});
result = clone_2;
} else if (isDocument(node)) {
var children = recursive ? cloneChildren(node.children) : [];
var clone_3 = new Document(children);
children.forEach(function(child) {
return child.parent = clone_3;
});
if (node["x-mode"]) {
clone_3["x-mode"] = node["x-mode"];
}
result = clone_3;
} else if (isDirective(node)) {
var instruction = new ProcessingInstruction2(node.name, node.data);
if (node["x-name"] != null) {
instruction["x-name"] = node["x-name"];
instruction["x-publicId"] = node["x-publicId"];
instruction["x-systemId"] = node["x-systemId"];
}
result = instruction;
} else {
throw new Error("Not implemented yet: ".concat(node.type));
}
result.startIndex = node.startIndex;
result.endIndex = node.endIndex;
if (node.sourceCodeLocation != null) {
result.sourceCodeLocation = node.sourceCodeLocation;
}
return result;
}
exports.cloneNode = cloneNode;
function cloneChildren(childs) {
var children = childs.map(function(child) {
return cloneNode(child, true);
});
for (var i2 = 1; i2 < children.length; i2++) {
children[i2].prev = children[i2 - 1];
children[i2 - 1].next = children[i2];
}
return children;
}
}
});
// node_modules/html-react-parser/node_modules/domhandler/lib/index.js
var require_lib5 = __commonJS({
"node_modules/html-react-parser/node_modules/domhandler/lib/index.js"(exports) {
"use strict";
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o2, m2, k2, k22) {
if (k22 === void 0) k22 = k2;
var desc = Object.getOwnPropertyDescriptor(m2, k2);
if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() {
return m2[k2];
} };
}
Object.defineProperty(o2, k22, desc);
}) : (function(o2, m2, k2, k22) {
if (k22 === void 0) k22 = k2;
o2[k22] = m2[k2];
}));
var __exportStar = exports && exports.__exportStar || function(m2, exports2) {
for (var p2 in m2) if (p2 !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p2)) __createBinding(exports2, m2, p2);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.DomHandler = void 0;
var domelementtype_1 = require_lib4();
var node_js_1 = require_node2();
__exportStar(require_node2(), exports);
var defaultOpts = {
withStartIndices: false,
withEndIndices: false,
xmlMode: false
};
var DomHandler = (
/** @class */
(function() {
function DomHandler2(callback, options2, elementCB) {
this.dom = [];
this.root = new node_js_1.Document(this.dom);
this.done = false;
this.tagStack = [this.root];
this.lastNode = null;
this.parser = null;
if (typeof options2 === "function") {
elementCB = options2;
options2 = defaultOpts;
}
if (typeof callback === "object") {
options2 = callback;
callback = void 0;
}
this.callback = callback !== null && callback !== void 0 ? callback : null;
this.options = options2 !== null && options2 !== void 0 ? options2 : defaultOpts;
this.elementCB = elementCB !== null && elementCB !== void 0 ? elementCB : null;
}
DomHandler2.prototype.onparserinit = function(parser) {
this.parser = parser;
};
DomHandler2.prototype.onreset = function() {
this.dom = [];
this.root = new node_js_1.Document(this.dom);
this.done = false;
this.tagStack = [this.root];
this.lastNode = null;
this.parser = null;
};
DomHandler2.prototype.onend = function() {
if (this.done)
return;
this.done = true;
this.parser = null;
this.handleCallback(null);
};
DomHandler2.prototype.onerror = function(error) {
this.handleCallback(error);
};
DomHandler2.prototype.onclosetag = function() {
this.lastNode = null;
var elem = this.tagStack.pop();
if (this.options.withEndIndices) {
elem.endIndex = this.parser.endIndex;
}
if (this.elementCB)
this.elementCB(elem);
};
DomHandler2.prototype.onopentag = function(name123, attribs) {
var type = this.options.xmlMode ? domelementtype_1.ElementType.Tag : void 0;
var element = new node_js_1.Element(name123, attribs, void 0, type);
this.addNode(element);
this.tagStack.push(element);
};
DomHandler2.prototype.ontext = function(data) {
var lastNode = this.lastNode;
if (lastNode && lastNode.type === domelementtype_1.ElementType.Text) {
lastNode.data += data;
if (this.options.withEndIndices) {
lastNode.endIndex = this.parser.endIndex;
}
} else {
var node = new node_js_1.Text(data);
this.addNode(node);
this.lastNode = node;
}
};
DomHandler2.prototype.oncomment = function(data) {
if (this.lastNode && this.lastNode.type === domelementtype_1.ElementType.Comment) {
this.lastNode.data += data;
return;
}
var node = new node_js_1.Comment(data);
this.addNode(node);
this.lastNode = node;
};
DomHandler2.prototype.oncommentend = function() {
this.lastNode = null;
};
DomHandler2.prototype.oncdatastart = function() {
var text = new node_js_1.Text("");
var node = new node_js_1.CDATA([text]);
this.addNode(node);
text.parent = node;
this.lastNode = text;
};
DomHandler2.prototype.oncdataend = function() {
this.lastNode = null;
};
DomHandler2.prototype.onprocessinginstruction = function(name123, data) {
var node = new node_js_1.ProcessingInstruction(name123, data);
this.addNode(node);
};
DomHandler2.prototype.handleCallback = function(error) {
if (typeof this.callback === "function") {
this.callback(error, this.dom);
} else if (error) {
throw error;
}
};
DomHandler2.prototype.addNode = function(node) {
var parent = this.tagStack[this.tagStack.length - 1];
var previousSibling = parent.children[parent.children.length - 1];
if (this.options.withStartIndices) {
node.startIndex = this.parser.startIndex;
}
if (this.options.withEndIndices) {
node.endIndex = this.parser.endIndex;
}
parent.children.push(node);
if (previousSibling) {
node.prev = previousSibling;
previousSibling.next = node;
}
node.parent = parent;
this.lastNode = null;
};
return DomHandler2;
})()
);
exports.DomHandler = DomHandler;
exports.default = DomHandler;
}
});
// node_modules/html-react-parser/lib/index.js
var require_lib6 = __commonJS({
"node_modules/html-react-parser/lib/index.js"(exports) {
"use strict";
var __importDefault = exports && exports.__importDefault || function(mod) {
return mod && mod.__esModule ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.htmlToDOM = exports.domToReact = exports.attributesToProps = exports.Text = exports.ProcessingInstruction = exports.Element = exports.Comment = void 0;
exports.default = HTMLReactParser2;
var html_dom_parser_1 = __importDefault(require_html_to_dom());
exports.htmlToDOM = html_dom_parser_1.default;
var attributes_to_props_1 = __importDefault(require_attributes_to_props());
exports.attributesToProps = attributes_to_props_1.default;
var dom_to_react_1 = __importDefault(require_dom_to_react());
exports.domToReact = dom_to_react_1.default;
var domhandler_1 = require_lib5();
Object.defineProperty(exports, "Comment", { enumerable: true, get: function() {
return domhandler_1.Comment;
} });
Object.defineProperty(exports, "Element", { enumerable: true, get: function() {
return domhandler_1.Element;
} });
Object.defineProperty(exports, "ProcessingInstruction", { enumerable: true, get: function() {
return domhandler_1.ProcessingInstruction;
} });
Object.defineProperty(exports, "Text", { enumerable: true, get: function() {
return domhandler_1.Text;
} });
var domParserOptions = { lowerCaseAttributeNames: false };
function HTMLReactParser2(html, options2) {
if (typeof html !== "string") {
throw new TypeError("First argument must be a string");
}
if (!html) {
return [];
}
return (0, dom_to_react_1.default)((0, html_dom_parser_1.default)(html, (options2 === null || options2 === void 0 ? void 0 : options2.htmlparser2) || domParserOptions), options2);
}
}
});
// package-external:@wordpress/dom
var require_dom = __commonJS({
"package-external:@wordpress/dom"(exports, module) {
module.exports = window.wp.dom;
}
});
// vendor-external:react/jsx-runtime
var require_jsx_runtime = __commonJS({
"vendor-external:react/jsx-runtime"(exports, module) {
module.exports = window.ReactJSXRuntime;
}
});
// package-external:@wordpress/element
var require_element = __commonJS({
"package-external:@wordpress/element"(exports, module) {
module.exports = window.wp.element;
}
});
// package-external:@wordpress/primitives
var require_primitives = __commonJS({
"package-external:@wordpress/primitives"(exports, module) {
module.exports = window.wp.primitives;
}
});
// package-external:@wordpress/components
var require_components = __commonJS({
"package-external:@wordpress/components"(exports, module) {
module.exports = window.wp.components;
}
});
// package-external:@wordpress/blob
var require_blob = __commonJS({
"package-external:@wordpress/blob"(exports, module) {
module.exports = window.wp.blob;
}
});
// package-external:@wordpress/core-data
var require_core_data = __commonJS({
"package-external:@wordpress/core-data"(exports, module) {
module.exports = window.wp.coreData;
}
});
// package-external:@wordpress/url
var require_url = __commonJS({
"package-external:@wordpress/url"(exports, module) {
module.exports = window.wp.url;
}
});
// package-external:@wordpress/html-entities
var require_html_entities = __commonJS({
"package-external:@wordpress/html-entities"(exports, module) {
module.exports = window.wp.htmlEntities;
}
});
// package-external:@wordpress/notices
var require_notices = __commonJS({
"package-external:@wordpress/notices"(exports, module) {
module.exports = window.wp.notices;
}
});
// package-external:@wordpress/private-apis
var require_private_apis = __commonJS({
"package-external:@wordpress/private-apis"(exports, module) {
module.exports = window.wp.privateApis;
}
});
// package-external:@wordpress/keycodes
var require_keycodes = __commonJS({
"package-external:@wordpress/keycodes"(exports, module) {
module.exports = window.wp.keycodes;
}
});
// package-external:@wordpress/deprecated
var require_deprecated = __commonJS({
"package-external:@wordpress/deprecated"(exports, module) {
module.exports = window.wp.deprecated;
}
});
// package-external:@wordpress/rich-text
var require_rich_text = __commonJS({
"package-external:@wordpress/rich-text"(exports, module) {
module.exports = window.wp.richText;
}
});
// package-external:@wordpress/date
var require_date = __commonJS({
"package-external:@wordpress/date"(exports, module) {
module.exports = window.wp.date;
}
});
// package-external:@wordpress/api-fetch
var require_api_fetch = __commonJS({
"package-external:@wordpress/api-fetch"(exports, module) {
module.exports = window.wp.apiFetch;
}
});
// package-external:@wordpress/hooks
var require_hooks = __commonJS({
"package-external:@wordpress/hooks"(exports, module) {
module.exports = window.wp.hooks;
}
});
// node_modules/remove-accents/index.js
var require_remove_accents = __commonJS({
"node_modules/remove-accents/index.js"(exports, module) {
var characterMap = {
"\xC0": "A",
"\xC1": "A",
"\xC2": "A",
"\xC3": "A",
"\xC4": "A",
"\xC5": "A",
"\u1EA4": "A",
"\u1EAE": "A",
"\u1EB2": "A",
"\u1EB4": "A",
"\u1EB6": "A",
"\xC6": "AE",
"\u1EA6": "A",
"\u1EB0": "A",
"\u0202": "A",
"\u1EA2": "A",
"\u1EA0": "A",
"\u1EA8": "A",
"\u1EAA": "A",
"\u1EAC": "A",
"\xC7": "C",
"\u1E08": "C",
"\xC8": "E",
"\xC9": "E",
"\xCA": "E",
"\xCB": "E",
"\u1EBE": "E",
"\u1E16": "E",
"\u1EC0": "E",
"\u1E14": "E",
"\u1E1C": "E",
"\u0206": "E",
"\u1EBA": "E",
"\u1EBC": "E",
"\u1EB8": "E",
"\u1EC2": "E",
"\u1EC4": "E",
"\u1EC6": "E",
"\xCC": "I",
"\xCD": "I",
"\xCE": "I",
"\xCF": "I",
"\u1E2E": "I",
"\u020A": "I",
"\u1EC8": "I",
"\u1ECA": "I",
"\xD0": "D",
"\xD1": "N",
"\xD2": "O",
"\xD3": "O",
"\xD4": "O",
"\xD5": "O",
"\xD6": "O",
"\xD8": "O",
"\u1ED0": "O",
"\u1E4C": "O",
"\u1E52": "O",
"\u020E": "O",
"\u1ECE": "O",
"\u1ECC": "O",
"\u1ED4": "O",
"\u1ED6": "O",
"\u1ED8": "O",
"\u1EDC": "O",
"\u1EDE": "O",
"\u1EE0": "O",
"\u1EDA": "O",
"\u1EE2": "O",
"\xD9": "U",
"\xDA": "U",
"\xDB": "U",
"\xDC": "U",
"\u1EE6": "U",
"\u1EE4": "U",
"\u1EEC": "U",
"\u1EEE": "U",
"\u1EF0": "U",
"\xDD": "Y",
"\xE0": "a",
"\xE1": "a",
"\xE2": "a",
"\xE3": "a",
"\xE4": "a",
"\xE5": "a",
"\u1EA5": "a",
"\u1EAF": "a",
"\u1EB3": "a",
"\u1EB5": "a",
"\u1EB7": "a",
"\xE6": "ae",
"\u1EA7": "a",
"\u1EB1": "a",
"\u0203": "a",
"\u1EA3": "a",
"\u1EA1": "a",
"\u1EA9": "a",
"\u1EAB": "a",
"\u1EAD": "a",
"\xE7": "c",
"\u1E09": "c",
"\xE8": "e",
"\xE9": "e",
"\xEA": "e",
"\xEB": "e",
"\u1EBF": "e",
"\u1E17": "e",
"\u1EC1": "e",
"\u1E15": "e",
"\u1E1D": "e",
"\u0207": "e",
"\u1EBB": "e",
"\u1EBD": "e",
"\u1EB9": "e",
"\u1EC3": "e",
"\u1EC5": "e",
"\u1EC7": "e",
"\xEC": "i",
"\xED": "i",
"\xEE": "i",
"\xEF": "i",
"\u1E2F": "i",
"\u020B": "i",
"\u1EC9": "i",
"\u1ECB": "i",
"\xF0": "d",
"\xF1": "n",
"\xF2": "o",
"\xF3": "o",
"\xF4": "o",
"\xF5": "o",
"\xF6": "o",
"\xF8": "o",
"\u1ED1": "o",
"\u1E4D": "o",
"\u1E53": "o",
"\u020F": "o",
"\u1ECF": "o",
"\u1ECD": "o",
"\u1ED5": "o",
"\u1ED7": "o",
"\u1ED9": "o",
"\u1EDD": "o",
"\u1EDF": "o",
"\u1EE1": "o",
"\u1EDB": "o",
"\u1EE3": "o",
"\xF9": "u",
"\xFA": "u",
"\xFB": "u",
"\xFC": "u",
"\u1EE7": "u",
"\u1EE5": "u",
"\u1EED": "u",
"\u1EEF": "u",
"\u1EF1": "u",
"\xFD": "y",
"\xFF": "y",
"\u0100": "A",
"\u0101": "a",
"\u0102": "A",
"\u0103": "a",
"\u0104": "A",
"\u0105": "a",
"\u0106": "C",
"\u0107": "c",
"\u0108": "C",
"\u0109": "c",
"\u010A": "C",
"\u010B": "c",
"\u010C": "C",
"\u010D": "c",
"C\u0306": "C",
"c\u0306": "c",
"\u010E": "D",
"\u010F": "d",
"\u0110": "D",
"\u0111": "d",
"\u0112": "E",
"\u0113": "e",
"\u0114": "E",
"\u0115": "e",
"\u0116": "E",
"\u0117": "e",
"\u0118": "E",
"\u0119": "e",
"\u011A": "E",
"\u011B": "e",
"\u011C": "G",
"\u01F4": "G",
"\u011D": "g",
"\u01F5": "g",
"\u011E": "G",
"\u011F": "g",
"\u0120": "G",
"\u0121": "g",
"\u0122": "G",
"\u0123": "g",
"\u0124": "H",
"\u0125": "h",
"\u0126": "H",
"\u0127": "h",
"\u1E2A": "H",
"\u1E2B": "h",
"\u0128": "I",
"\u0129": "i",
"\u012A": "I",
"\u012B": "i",
"\u012C": "I",
"\u012D": "i",
"\u012E": "I",
"\u012F": "i",
"\u0130": "I",
"\u0131": "i",
"\u0132": "IJ",
"\u0133": "ij",
"\u0134": "J",
"\u0135": "j",
"\u0136": "K",
"\u0137": "k",
"\u1E30": "K",
"\u1E31": "k",
"K\u0306": "K",
"k\u0306": "k",
"\u0139": "L",
"\u013A": "l",
"\u013B": "L",
"\u013C": "l",
"\u013D": "L",
"\u013E": "l",
"\u013F": "L",
"\u0140": "l",
"\u0141": "l",
"\u0142": "l",
"\u1E3E": "M",
"\u1E3F": "m",
"M\u0306": "M",
"m\u0306": "m",
"\u0143": "N",
"\u0144": "n",
"\u0145": "N",
"\u0146": "n",
"\u0147": "N",
"\u0148": "n",
"\u0149": "n",
"N\u0306": "N",
"n\u0306": "n",
"\u014C": "O",
"\u014D": "o",
"\u014E": "O",
"\u014F": "o",
"\u0150": "O",
"\u0151": "o",
"\u0152": "OE",
"\u0153": "oe",
"P\u0306": "P",
"p\u0306": "p",
"\u0154": "R",
"\u0155": "r",
"\u0156": "R",
"\u0157": "r",
"\u0158": "R",
"\u0159": "r",
"R\u0306": "R",
"r\u0306": "r",
"\u0212": "R",
"\u0213": "r",
"\u015A": "S",
"\u015B": "s",
"\u015C": "S",
"\u015D": "s",
"\u015E": "S",
"\u0218": "S",
"\u0219": "s",
"\u015F": "s",
"\u0160": "S",
"\u0161": "s",
"\u0162": "T",
"\u0163": "t",
"\u021B": "t",
"\u021A": "T",
"\u0164": "T",
"\u0165": "t",
"\u0166": "T",
"\u0167": "t",
"T\u0306": "T",
"t\u0306": "t",
"\u0168": "U",
"\u0169": "u",
"\u016A": "U",
"\u016B": "u",
"\u016C": "U",
"\u016D": "u",
"\u016E": "U",
"\u016F": "u",
"\u0170": "U",
"\u0171": "u",
"\u0172": "U",
"\u0173": "u",
"\u0216": "U",
"\u0217": "u",
"V\u0306": "V",
"v\u0306": "v",
"\u0174": "W",
"\u0175": "w",
"\u1E82": "W",
"\u1E83": "w",
"X\u0306": "X",
"x\u0306": "x",
"\u0176": "Y",
"\u0177": "y",
"\u0178": "Y",
"Y\u0306": "Y",
"y\u0306": "y",
"\u0179": "Z",
"\u017A": "z",
"\u017B": "Z",
"\u017C": "z",
"\u017D": "Z",
"\u017E": "z",
"\u017F": "s",
"\u0192": "f",
"\u01A0": "O",
"\u01A1": "o",
"\u01AF": "U",
"\u01B0": "u",
"\u01CD": "A",
"\u01CE": "a",
"\u01CF": "I",
"\u01D0": "i",
"\u01D1": "O",
"\u01D2": "o",
"\u01D3": "U",
"\u01D4": "u",
"\u01D5": "U",
"\u01D6": "u",
"\u01D7": "U",
"\u01D8": "u",
"\u01D9": "U",
"\u01DA": "u",
"\u01DB": "U",
"\u01DC": "u",
"\u1EE8": "U",
"\u1EE9": "u",
"\u1E78": "U",
"\u1E79": "u",
"\u01FA": "A",
"\u01FB": "a",
"\u01FC": "AE",
"\u01FD": "ae",
"\u01FE": "O",
"\u01FF": "o",
"\xDE": "TH",
"\xFE": "th",
"\u1E54": "P",
"\u1E55": "p",
"\u1E64": "S",
"\u1E65": "s",
"X\u0301": "X",
"x\u0301": "x",
"\u0403": "\u0413",
"\u0453": "\u0433",
"\u040C": "\u041A",
"\u045C": "\u043A",
"A\u030B": "A",
"a\u030B": "a",
"E\u030B": "E",
"e\u030B": "e",
"I\u030B": "I",
"i\u030B": "i",
"\u01F8": "N",
"\u01F9": "n",
"\u1ED2": "O",
"\u1ED3": "o",
"\u1E50": "O",
"\u1E51": "o",
"\u1EEA": "U",
"\u1EEB": "u",
"\u1E80": "W",
"\u1E81": "w",
"\u1EF2": "Y",
"\u1EF3": "y",
"\u0200": "A",
"\u0201": "a",
"\u0204": "E",
"\u0205": "e",
"\u0208": "I",
"\u0209": "i",
"\u020C": "O",
"\u020D": "o",
"\u0210": "R",
"\u0211": "r",
"\u0214": "U",
"\u0215": "u",
"B\u030C": "B",
"b\u030C": "b",
"\u010C\u0323": "C",
"\u010D\u0323": "c",
"\xCA\u030C": "E",
"\xEA\u030C": "e",
"F\u030C": "F",
"f\u030C": "f",
"\u01E6": "G",
"\u01E7": "g",
"\u021E": "H",
"\u021F": "h",
"J\u030C": "J",
"\u01F0": "j",
"\u01E8": "K",
"\u01E9": "k",
"M\u030C": "M",
"m\u030C": "m",
"P\u030C": "P",
"p\u030C": "p",
"Q\u030C": "Q",
"q\u030C": "q",
"\u0158\u0329": "R",
"\u0159\u0329": "r",
"\u1E66": "S",
"\u1E67": "s",
"V\u030C": "V",
"v\u030C": "v",
"W\u030C": "W",
"w\u030C": "w",
"X\u030C": "X",
"x\u030C": "x",
"Y\u030C": "Y",
"y\u030C": "y",
"A\u0327": "A",
"a\u0327": "a",
"B\u0327": "B",
"b\u0327": "b",
"\u1E10": "D",
"\u1E11": "d",
"\u0228": "E",
"\u0229": "e",
"\u0190\u0327": "E",
"\u025B\u0327": "e",
"\u1E28": "H",
"\u1E29": "h",
"I\u0327": "I",
"i\u0327": "i",
"\u0197\u0327": "I",
"\u0268\u0327": "i",
"M\u0327": "M",
"m\u0327": "m",
"O\u0327": "O",
"o\u0327": "o",
"Q\u0327": "Q",
"q\u0327": "q",
"U\u0327": "U",
"u\u0327": "u",
"X\u0327": "X",
"x\u0327": "x",
"Z\u0327": "Z",
"z\u0327": "z",
"\u0439": "\u0438",
"\u0419": "\u0418",
"\u0451": "\u0435",
"\u0401": "\u0415"
};
var chars = Object.keys(characterMap).join("|");
var allAccents = new RegExp(chars, "g");
var firstAccent = new RegExp(chars, "");
function matcher(match) {
return characterMap[match];
}
var removeAccents5 = function(string) {
return string.replace(allAccents, matcher);
};
var hasAccents = function(string) {
return !!string.match(firstAccent);
};
module.exports = removeAccents5;
module.exports.has = hasAccents;
module.exports.remove = removeAccents5;
}
});
// package-external:@wordpress/upload-media
var require_upload_media = __commonJS({
"package-external:@wordpress/upload-media"(exports, module) {
module.exports = window.wp.uploadMedia;
}
});
// package-external:@wordpress/a11y
var require_a11y = __commonJS({
"package-external:@wordpress/a11y"(exports, module) {
module.exports = window.wp.a11y;
}
});
// package-external:@wordpress/escape-html
var require_escape_html = __commonJS({
"package-external:@wordpress/escape-html"(exports, module) {
module.exports = window.wp.escapeHtml;
}
});
// package-external:@wordpress/wordcount
var require_wordcount = __commonJS({
"package-external:@wordpress/wordcount"(exports, module) {
module.exports = window.wp.wordcount;
}
});
// package-external:@wordpress/patterns
var require_patterns = __commonJS({
"package-external:@wordpress/patterns"(exports, module) {
module.exports = window.wp.patterns;
}
});
// package-external:@wordpress/autop
var require_autop = __commonJS({
"package-external:@wordpress/autop"(exports, module) {
module.exports = window.wp.autop;
}
});
// node_modules/fast-deep-equal/es6/index.js
var require_es6 = __commonJS({
"node_modules/fast-deep-equal/es6/index.js"(exports, module) {
"use strict";
module.exports = function equal(a2, b2) {
if (a2 === b2) return true;
if (a2 && b2 && typeof a2 == "object" && typeof b2 == "object") {
if (a2.constructor !== b2.constructor) return false;
var length, i2, keys;
if (Array.isArray(a2)) {
length = a2.length;
if (length != b2.length) return false;
for (i2 = length; i2-- !== 0; )
if (!equal(a2[i2], b2[i2])) return false;
return true;
}
if (a2 instanceof Map && b2 instanceof Map) {
if (a2.size !== b2.size) return false;
for (i2 of a2.entries())
if (!b2.has(i2[0])) return false;
for (i2 of a2.entries())
if (!equal(i2[1], b2.get(i2[0]))) return false;
return true;
}
if (a2 instanceof Set && b2 instanceof Set) {
if (a2.size !== b2.size) return false;
for (i2 of a2.entries())
if (!b2.has(i2[0])) return false;
return true;
}
if (ArrayBuffer.isView(a2) && ArrayBuffer.isView(b2)) {
length = a2.length;
if (length != b2.length) return false;
for (i2 = length; i2-- !== 0; )
if (a2[i2] !== b2[i2]) return false;
return true;
}
if (a2.constructor === RegExp) return a2.source === b2.source && a2.flags === b2.flags;
if (a2.valueOf !== Object.prototype.valueOf) return a2.valueOf() === b2.valueOf();
if (a2.toString !== Object.prototype.toString) return a2.toString() === b2.toString();
keys = Object.keys(a2);
length = keys.length;
if (length !== Object.keys(b2).length) return false;
for (i2 = length; i2-- !== 0; )
if (!Object.prototype.hasOwnProperty.call(b2, keys[i2])) return false;
for (i2 = length; i2-- !== 0; ) {
var key = keys[i2];
if (!equal(a2[key], b2[key])) return false;
}
return true;
}
return a2 !== a2 && b2 !== b2;
};
}
});
// package-external:@wordpress/keyboard-shortcuts
var require_keyboard_shortcuts = __commonJS({
"package-external:@wordpress/keyboard-shortcuts"(exports, module) {
module.exports = window.wp.keyboardShortcuts;
}
});
// packages/block-library/build-module/index.mjs
var index_exports = {};
__export(index_exports, {
__experimentalGetCoreBlocks: () => __experimentalGetCoreBlocks,
__experimentalRegisterExperimentalCoreBlocks: () => __experimentalRegisterExperimentalCoreBlocks,
privateApis: () => privateApis3,
registerCoreBlocks: () => registerCoreBlocks
});
var import_blocks129 = __toESM(require_blocks(), 1);
var import_compose61 = __toESM(require_compose(), 1);
var import_data170 = __toESM(require_data(), 1);
var import_block_editor296 = __toESM(require_block_editor(), 1);
var import_server_side_render7 = __toESM(require_server_side_render(), 1);
var import_i18n274 = __toESM(require_i18n(), 1);
// node_modules/clsx/dist/clsx.mjs
function r(e2) {
var t2, f2, n2 = "";
if ("string" == typeof e2 || "number" == typeof e2) n2 += e2;
else if ("object" == typeof e2) if (Array.isArray(e2)) {
var o2 = e2.length;
for (t2 = 0; t2 < o2; t2++) e2[t2] && (f2 = r(e2[t2])) && (n2 && (n2 += " "), n2 += f2);
} else for (f2 in e2) e2[f2] && (n2 && (n2 += " "), n2 += f2);
return n2;
}
function clsx() {
for (var e2, t2, f2 = 0, n2 = "", o2 = arguments.length; f2 < o2; f2++) (e2 = arguments[f2]) && (t2 = r(e2)) && (n2 && (n2 += " "), n2 += t2);
return n2;
}
var clsx_default = clsx;
// node_modules/html-react-parser/esm/index.mjs
var import_lib = __toESM(require_lib6(), 1);
var import_lib2 = __toESM(require_lib6(), 1);
var esm_default = import_lib.default.default || import_lib.default;
// packages/block-library/build-module/utils/html-renderer.mjs
var import_dom = __toESM(require_dom(), 1);
var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
var HtmlRenderer = ({ wrapperProps = {}, html = "" }) => {
const options2 = {
replace: ({ name: name123, type, attribs, parent, children }) => {
if (type === "tag" && name123) {
const parsedProps = (0, import_lib2.attributesToProps)(attribs || {});
const TagName2 = name123;
if (!parent) {
const mergedProps = {
...parsedProps,
...wrapperProps,
className: clsx_default(
parsedProps.className,
wrapperProps.className
),
style: {
...parsedProps.style || {},
...wrapperProps.style || {}
}
};
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TagName2, { ...mergedProps, children: (0, import_lib2.domToReact)(children, options2) });
}
}
}
};
const sanitizedContent = (0, import_dom.safeHTML)(html);
const parsedContent = esm_default(sanitizedContent, options2);
return parsedContent;
};
var html_renderer_default = HtmlRenderer;
// packages/block-library/build-module/accordion/index.mjs
var accordion_exports = {};
__export(accordion_exports, {
init: () => init,
metadata: () => block_default,
name: () => name,
settings: () => settings
});
var import_i18n2 = __toESM(require_i18n(), 1);
// packages/icons/build-module/icon/index.mjs
var import_element = __toESM(require_element(), 1);
var icon_default = (0, import_element.forwardRef)(
({ icon: icon4, size = 24, ...props }, ref) => {
return (0, import_element.cloneElement)(icon4, {
width: size,
height: size,
...props,
ref
});
}
);
// packages/icons/build-module/library/accordion-heading.mjs
var import_primitives = __toESM(require_primitives(), 1);
var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
var accordion_heading_default = /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_primitives.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_primitives.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M19.5 12.75L9.5 12.75L9.5 11.25L19.5 11.25L19.5 12.75Z" }),
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_primitives.Path, { d: "M4.5 9.5L8.5 12L4.5 14.5L4.5 9.5Z" })
] });
// packages/icons/build-module/library/accordion-item.mjs
var import_primitives2 = __toESM(require_primitives(), 1);
var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
var accordion_item_default = /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_primitives2.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives2.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M19.5 9.5L9.5 9.5L9.5 8L19.5 8L19.5 9.5Z" }),
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives2.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M19.5 13L9.5 13L9.5 11.5L19.5 11.5L19.5 13Z" }),
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives2.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M19.5 16.3999L9.5 16.3999L9.5 14.8999L19.5 14.8999L19.5 16.3999Z" }),
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives2.Path, { d: "M4.5 6.25L8.5 8.75L4.5 11.25L4.5 6.25Z" })
] });
// packages/icons/build-module/library/accordion.mjs
var import_primitives3 = __toESM(require_primitives(), 1);
var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
var accordion_default = /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_primitives3.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_primitives3.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M19.5 9.25L9.5 9.25L9.5 7.75L19.5 7.75L19.5 9.25Z" }),
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_primitives3.Path, { d: "M4.5 6L8.5 8.5L4.5 11L4.5 6Z" }),
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_primitives3.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M19.5 16.25L9.5 16.25L9.5 14.75L19.5 14.75L19.5 16.25Z" }),
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_primitives3.Path, { d: "M4.5 13L8.5 15.5L4.5 18L4.5 13Z" })
] });
// packages/icons/build-module/library/add-submenu.mjs
var import_primitives4 = __toESM(require_primitives(), 1);
var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
var add_submenu_default = /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_primitives4.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_primitives4.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" }) });
// packages/icons/build-module/library/align-center.mjs
var import_primitives5 = __toESM(require_primitives(), 1);
var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1);
var align_center_default = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_primitives5.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_primitives5.Path, { d: "M7.5 5.5h9V4h-9v1.5Zm-3.5 7h16V11H4v1.5Zm3.5 7h9V18h-9v1.5Z" }) });
// packages/icons/build-module/library/align-left.mjs
var import_primitives6 = __toESM(require_primitives(), 1);
var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1);
var align_left_default = /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_primitives6.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_primitives6.Path, { d: "M13 5.5H4V4h9v1.5Zm7 7H4V11h16v1.5Zm-7 7H4V18h9v1.5Z" }) });
// packages/icons/build-module/library/align-none.mjs
var import_primitives7 = __toESM(require_primitives(), 1);
var import_jsx_runtime8 = __toESM(require_jsx_runtime(), 1);
var align_none_default = /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_primitives7.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_primitives7.Path, { d: "M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM5 9h14v6H5V9Z" }) });
// packages/icons/build-module/library/align-right.mjs
var import_primitives8 = __toESM(require_primitives(), 1);
var import_jsx_runtime9 = __toESM(require_jsx_runtime(), 1);
var align_right_default = /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_primitives8.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_primitives8.Path, { d: "M11.111 5.5H20V4h-8.889v1.5ZM4 12.5h16V11H4v1.5Zm7.111 7H20V18h-8.889v1.5Z" }) });
// packages/icons/build-module/library/archive.mjs
var import_primitives9 = __toESM(require_primitives(), 1);
var import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1);
var archive_default = /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_primitives9.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_primitives9.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" }) });
// packages/icons/build-module/library/audio.mjs
var import_primitives10 = __toESM(require_primitives(), 1);
var import_jsx_runtime11 = __toESM(require_jsx_runtime(), 1);
var audio_default = /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_primitives10.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_primitives10.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" }) });
// packages/icons/build-module/library/block-default.mjs
var import_primitives11 = __toESM(require_primitives(), 1);
var import_jsx_runtime12 = __toESM(require_jsx_runtime(), 1);
var block_default_default = /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_primitives11.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_primitives11.Path, { d: "M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z" }) });
// packages/icons/build-module/library/block-table.mjs
var import_primitives12 = __toESM(require_primitives(), 1);
var import_jsx_runtime13 = __toESM(require_jsx_runtime(), 1);
var block_table_default = /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_primitives12.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_primitives12.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.5v3.5h-15V5c0-.3.2-.5.5-.5zm8 5.5h6.5v3.5H13V10zm-1.5 3.5h-7V10h7v3.5zm-7 5.5v-4h7v4.5H5c-.3 0-.5-.2-.5-.5zm14.5.5h-6V15h6.5v4c0 .3-.2.5-.5.5z" }) });
// packages/icons/build-module/library/breadcrumbs.mjs
var import_primitives13 = __toESM(require_primitives(), 1);
var import_jsx_runtime14 = __toESM(require_jsx_runtime(), 1);
var breadcrumbs_default = /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_primitives13.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_primitives13.Path, { d: "M4 13.5h3v-3H4v3Zm6-3.5 2 2-2 2 1 1 3-3-3-3-1 1Zm7 .5v3h3v-3h-3Z" }) });
// packages/icons/build-module/library/button.mjs
var import_primitives14 = __toESM(require_primitives(), 1);
var import_jsx_runtime15 = __toESM(require_jsx_runtime(), 1);
var button_default = /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_primitives14.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_primitives14.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" }) });
// packages/icons/build-module/library/buttons.mjs
var import_primitives15 = __toESM(require_primitives(), 1);
var import_jsx_runtime16 = __toESM(require_jsx_runtime(), 1);
var buttons_default = /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_primitives15.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_primitives15.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" }) });
// packages/icons/build-module/library/calendar.mjs
var import_primitives16 = __toESM(require_primitives(), 1);
var import_jsx_runtime17 = __toESM(require_jsx_runtime(), 1);
var calendar_default = /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_primitives16.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_primitives16.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" }) });
// packages/icons/build-module/library/caption.mjs
var import_primitives17 = __toESM(require_primitives(), 1);
var import_jsx_runtime18 = __toESM(require_jsx_runtime(), 1);
var caption_default = /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_primitives17.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_primitives17.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" }) });
// packages/icons/build-module/library/category.mjs
var import_primitives18 = __toESM(require_primitives(), 1);
var import_jsx_runtime19 = __toESM(require_jsx_runtime(), 1);
var category_default = /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_primitives18.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_primitives18.Path, { fillRule: "evenodd", clipRule: "evenodd", 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" }) });
// packages/icons/build-module/library/chevron-down.mjs
var import_primitives19 = __toESM(require_primitives(), 1);
var import_jsx_runtime20 = __toESM(require_jsx_runtime(), 1);
var chevron_down_default = /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_primitives19.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_primitives19.Path, { d: "M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z" }) });
// packages/icons/build-module/library/chevron-left-small.mjs
var import_primitives20 = __toESM(require_primitives(), 1);
var import_jsx_runtime21 = __toESM(require_jsx_runtime(), 1);
var chevron_left_small_default = /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_primitives20.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_primitives20.Path, { d: "m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z" }) });
// packages/icons/build-module/library/chevron-left.mjs
var import_primitives21 = __toESM(require_primitives(), 1);
var import_jsx_runtime22 = __toESM(require_jsx_runtime(), 1);
var chevron_left_default = /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_primitives21.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_primitives21.Path, { d: "M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z" }) });
// packages/icons/build-module/library/chevron-right-small.mjs
var import_primitives22 = __toESM(require_primitives(), 1);
var import_jsx_runtime23 = __toESM(require_jsx_runtime(), 1);
var chevron_right_small_default = /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_primitives22.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_primitives22.Path, { d: "M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z" }) });
// packages/icons/build-module/library/chevron-right.mjs
var import_primitives23 = __toESM(require_primitives(), 1);
var import_jsx_runtime24 = __toESM(require_jsx_runtime(), 1);
var chevron_right_default = /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_primitives23.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_primitives23.Path, { d: "M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z" }) });
// packages/icons/build-module/library/chevron-up.mjs
var import_primitives24 = __toESM(require_primitives(), 1);
var import_jsx_runtime25 = __toESM(require_jsx_runtime(), 1);
var chevron_up_default = /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_primitives24.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_primitives24.Path, { d: "M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z" }) });
// packages/icons/build-module/library/classic.mjs
var import_primitives25 = __toESM(require_primitives(), 1);
var import_jsx_runtime26 = __toESM(require_jsx_runtime(), 1);
var classic_default = /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_primitives25.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_primitives25.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" }) });
// packages/icons/build-module/library/close.mjs
var import_primitives26 = __toESM(require_primitives(), 1);
var import_jsx_runtime27 = __toESM(require_jsx_runtime(), 1);
var close_default = /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_primitives26.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_primitives26.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" }) });
// packages/icons/build-module/library/code.mjs
var import_primitives27 = __toESM(require_primitives(), 1);
var import_jsx_runtime28 = __toESM(require_jsx_runtime(), 1);
var code_default = /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_primitives27.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_primitives27.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" }) });
// packages/icons/build-module/library/column.mjs
var import_primitives28 = __toESM(require_primitives(), 1);
var import_jsx_runtime29 = __toESM(require_jsx_runtime(), 1);
var column_default = /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_primitives28.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_primitives28.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" }) });
// packages/icons/build-module/library/columns.mjs
var import_primitives29 = __toESM(require_primitives(), 1);
var import_jsx_runtime30 = __toESM(require_jsx_runtime(), 1);
var columns_default = /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_primitives29.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_primitives29.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" }) });
// packages/icons/build-module/library/comment-author-avatar.mjs
var import_primitives30 = __toESM(require_primitives(), 1);
var import_jsx_runtime31 = __toESM(require_jsx_runtime(), 1);
var comment_author_avatar_default = /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_primitives30.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_primitives30.Path, { fillRule: "evenodd", clipRule: "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" }) });
// packages/icons/build-module/library/comment-author-name.mjs
var import_primitives31 = __toESM(require_primitives(), 1);
var import_jsx_runtime32 = __toESM(require_jsx_runtime(), 1);
var comment_author_name_default = /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_primitives31.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_primitives31.Path, { fillRule: "evenodd", clipRule: "evenodd", 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" }),
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_primitives31.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M15 15V15C15 13.8954 14.1046 13 13 13L11 13C9.89543 13 9 13.8954 9 15V15" }),
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_primitives31.Circle, { cx: "12", cy: "9", r: "2", fillRule: "evenodd", clipRule: "evenodd" })
] });
// packages/icons/build-module/library/comment-content.mjs
var import_primitives32 = __toESM(require_primitives(), 1);
var import_jsx_runtime33 = __toESM(require_jsx_runtime(), 1);
var comment_content_default = /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_primitives32.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_primitives32.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" }) });
// packages/icons/build-module/library/comment-edit-link.mjs
var import_primitives33 = __toESM(require_primitives(), 1);
var import_jsx_runtime34 = __toESM(require_jsx_runtime(), 1);
var comment_edit_link_default = /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_primitives33.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_primitives33.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" }) });
// packages/icons/build-module/library/comment-reply-link.mjs
var import_primitives34 = __toESM(require_primitives(), 1);
var import_jsx_runtime35 = __toESM(require_jsx_runtime(), 1);
var comment_reply_link_default = /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_primitives34.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_primitives34.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" }) });
// packages/icons/build-module/library/comment.mjs
var import_primitives35 = __toESM(require_primitives(), 1);
var import_jsx_runtime36 = __toESM(require_jsx_runtime(), 1);
var comment_default = /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_primitives35.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_primitives35.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" }) });
// packages/icons/build-module/library/contents.mjs
var import_primitives36 = __toESM(require_primitives(), 1);
var import_jsx_runtime37 = __toESM(require_jsx_runtime(), 1);
var contents_default = /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_primitives36.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_primitives36.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M8.10417 6.00024H6.5C5.39543 6.00024 4.5 6.89567 4.5 8.00024V10.3336H6V8.00024C6 7.7241 6.22386 7.50024 6.5 7.50024H8.10417V6.00024ZM4.5 13.6669V16.0002C4.5 17.1048 5.39543 18.0002 6.5 18.0002H8.10417V16.5002H6.5C6.22386 16.5002 6 16.2764 6 16.0002V13.6669H4.5ZM10.3958 6.00024V7.50024H13.6042V6.00024H10.3958ZM15.8958 6.00024V7.50024H17.5C17.7761 7.50024 18 7.7241 18 8.00024V10.3336H19.5V8.00024C19.5 6.89567 18.6046 6.00024 17.5 6.00024H15.8958ZM19.5 13.6669H18V16.0002C18 16.2764 17.7761 16.5002 17.5 16.5002H15.8958V18.0002H17.5C18.6046 18.0002 19.5 17.1048 19.5 16.0002V13.6669ZM13.6042 18.0002V16.5002H10.3958V18.0002H13.6042Z" }) });
// packages/icons/build-module/library/cover.mjs
var import_primitives37 = __toESM(require_primitives(), 1);
var import_jsx_runtime38 = __toESM(require_jsx_runtime(), 1);
var cover_default = /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_primitives37.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_primitives37.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" }) });
// packages/icons/build-module/library/crop.mjs
var import_primitives38 = __toESM(require_primitives(), 1);
var import_jsx_runtime39 = __toESM(require_jsx_runtime(), 1);
var crop_default = /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_primitives38.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_primitives38.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" }) });
// packages/icons/build-module/library/custom-link.mjs
var import_primitives39 = __toESM(require_primitives(), 1);
var import_jsx_runtime40 = __toESM(require_jsx_runtime(), 1);
var custom_link_default = /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_primitives39.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_primitives39.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" }) });
// packages/icons/build-module/library/custom-post-type.mjs
var import_primitives40 = __toESM(require_primitives(), 1);
var import_jsx_runtime41 = __toESM(require_jsx_runtime(), 1);
var custom_post_type_default = /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_primitives40.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_primitives40.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" }) });
// packages/icons/build-module/library/details.mjs
var import_primitives41 = __toESM(require_primitives(), 1);
var import_jsx_runtime42 = __toESM(require_jsx_runtime(), 1);
var details_default = /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_primitives41.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_primitives41.Path, { d: "M4 16h10v1.5H4V16Zm0-4.5h16V13H4v-1.5ZM10 7h10v1.5H10V7Z", fillRule: "evenodd", clipRule: "evenodd" }),
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_primitives41.Path, { d: "m4 5.25 4 2.5-4 2.5v-5Z" })
] });
// packages/icons/build-module/library/external.mjs
var import_primitives42 = __toESM(require_primitives(), 1);
var import_jsx_runtime43 = __toESM(require_jsx_runtime(), 1);
var external_default = /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_primitives42.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_primitives42.Path, { d: "M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z" }) });
// packages/icons/build-module/library/file.mjs
var import_primitives43 = __toESM(require_primitives(), 1);
var import_jsx_runtime44 = __toESM(require_jsx_runtime(), 1);
var file_default = /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_primitives43.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_primitives43.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" }) });
// packages/icons/build-module/library/footer.mjs
var import_primitives44 = __toESM(require_primitives(), 1);
var import_jsx_runtime45 = __toESM(require_jsx_runtime(), 1);
var footer_default = /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_primitives44.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_primitives44.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" }) });
// packages/icons/build-module/library/format-indent-rtl.mjs
var import_primitives45 = __toESM(require_primitives(), 1);
var import_jsx_runtime46 = __toESM(require_jsx_runtime(), 1);
var format_indent_rtl_default = /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_primitives45.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_primitives45.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" }) });
// packages/icons/build-module/library/format-indent.mjs
var import_primitives46 = __toESM(require_primitives(), 1);
var import_jsx_runtime47 = __toESM(require_jsx_runtime(), 1);
var format_indent_default = /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_primitives46.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_primitives46.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" }) });
// packages/icons/build-module/library/format-list-bullets-rtl.mjs
var import_primitives47 = __toESM(require_primitives(), 1);
var import_jsx_runtime48 = __toESM(require_jsx_runtime(), 1);
var format_list_bullets_rtl_default = /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_primitives47.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_primitives47.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" }) });
// packages/icons/build-module/library/format-list-bullets.mjs
var import_primitives48 = __toESM(require_primitives(), 1);
var import_jsx_runtime49 = __toESM(require_jsx_runtime(), 1);
var format_list_bullets_default = /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_primitives48.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_primitives48.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" }) });
// packages/icons/build-module/library/format-list-numbered-rtl.mjs
var import_primitives49 = __toESM(require_primitives(), 1);
var import_jsx_runtime50 = __toESM(require_jsx_runtime(), 1);
var format_list_numbered_rtl_default = /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_primitives49.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_primitives49.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" }) });
// packages/icons/build-module/library/format-list-numbered.mjs
var import_primitives50 = __toESM(require_primitives(), 1);
var import_jsx_runtime51 = __toESM(require_jsx_runtime(), 1);
var format_list_numbered_default = /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_primitives50.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_primitives50.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" }) });
// packages/icons/build-module/library/format-ltr.mjs
var import_primitives51 = __toESM(require_primitives(), 1);
var import_jsx_runtime52 = __toESM(require_jsx_runtime(), 1);
var format_ltr_default = /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_primitives51.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_primitives51.Path, { d: "M3 9c0 2.8 2.2 5 5 5v-.2V20h1.5V5.5H12V20h1.5V5.5h3V4H8C5.2 4 3 6.2 3 9Zm15.9-1-1.1 1 2.6 3-2.6 3 1.1 1 3.4-4-3.4-4Z" }) });
// packages/icons/build-module/library/format-outdent-rtl.mjs
var import_primitives52 = __toESM(require_primitives(), 1);
var import_jsx_runtime53 = __toESM(require_jsx_runtime(), 1);
var format_outdent_rtl_default = /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_primitives52.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_primitives52.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" }) });
// packages/icons/build-module/library/format-outdent.mjs
var import_primitives53 = __toESM(require_primitives(), 1);
var import_jsx_runtime54 = __toESM(require_jsx_runtime(), 1);
var format_outdent_default = /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_primitives53.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_primitives53.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" }) });
// packages/icons/build-module/library/fullscreen.mjs
var import_primitives54 = __toESM(require_primitives(), 1);
var import_jsx_runtime55 = __toESM(require_jsx_runtime(), 1);
var fullscreen_default = /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_primitives54.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_primitives54.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" }) });
// packages/icons/build-module/library/gallery.mjs
var import_primitives55 = __toESM(require_primitives(), 1);
var import_jsx_runtime56 = __toESM(require_jsx_runtime(), 1);
var gallery_default = /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_primitives55.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_primitives55.Path, { fillRule: "evenodd", clipRule: "evenodd", 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" }) });
// packages/icons/build-module/library/grid.mjs
var import_primitives56 = __toESM(require_primitives(), 1);
var import_jsx_runtime57 = __toESM(require_jsx_runtime(), 1);
var grid_default = /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_primitives56.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_primitives56.Path, { fillRule: "evenodd", clipRule: "evenodd", 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" }) });
// packages/icons/build-module/library/group.mjs
var import_primitives57 = __toESM(require_primitives(), 1);
var import_jsx_runtime58 = __toESM(require_jsx_runtime(), 1);
var group_default = /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_primitives57.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_primitives57.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" }) });
// packages/icons/build-module/library/header.mjs
var import_primitives58 = __toESM(require_primitives(), 1);
var import_jsx_runtime59 = __toESM(require_jsx_runtime(), 1);
var header_default = /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_primitives58.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_primitives58.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" }) });
// packages/icons/build-module/library/heading-level-1.mjs
var import_primitives59 = __toESM(require_primitives(), 1);
var import_jsx_runtime60 = __toESM(require_jsx_runtime(), 1);
var heading_level_1_default = /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_primitives59.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_primitives59.Path, { d: "M17.6 7c-.6.9-1.5 1.7-2.6 2v1h2v7h2V7h-1.4zM11 11H7V7H5v10h2v-4h4v4h2V7h-2v4z" }) });
// packages/icons/build-module/library/heading-level-2.mjs
var import_primitives60 = __toESM(require_primitives(), 1);
var import_jsx_runtime61 = __toESM(require_jsx_runtime(), 1);
var heading_level_2_default = /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_primitives60.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_primitives60.Path, { d: "M9 11.1H5v-4H3v10h2v-4h4v4h2v-10H9v4zm8 4c.5-.4.6-.6 1.1-1.1.4-.4.8-.8 1.2-1.3.3-.4.6-.8.9-1.3.2-.4.3-.8.3-1.3 0-.4-.1-.9-.3-1.3-.2-.4-.4-.7-.8-1-.3-.3-.7-.5-1.2-.6-.5-.2-1-.2-1.5-.2-.4 0-.7 0-1.1.1-.3.1-.7.2-1 .3-.3.1-.6.3-.9.5-.3.2-.6.4-.8.7l1.2 1.2c.3-.3.6-.5 1-.7.4-.2.7-.3 1.2-.3s.9.1 1.3.4c.3.3.5.7.5 1.1 0 .4-.1.8-.4 1.1-.3.5-.6.9-1 1.2-.4.4-1 .9-1.6 1.4-.6.5-1.4 1.1-2.2 1.6v1.5h8v-2H17z" }) });
// packages/icons/build-module/library/heading-level-3.mjs
var import_primitives61 = __toESM(require_primitives(), 1);
var import_jsx_runtime62 = __toESM(require_jsx_runtime(), 1);
var heading_level_3_default = /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_primitives61.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_primitives61.Path, { d: "M9 11H5V7H3v10h2v-4h4v4h2V7H9v4zm11.3 1.7c-.4-.4-1-.7-1.6-.8v-.1c.6-.2 1.1-.5 1.5-.9.3-.4.5-.8.5-1.3 0-.4-.1-.8-.3-1.1-.2-.3-.5-.6-.8-.8-.4-.2-.8-.4-1.2-.5-.6-.1-1.1-.2-1.6-.2-.6 0-1.3.1-1.8.3s-1.1.5-1.6.9l1.2 1.4c.4-.2.7-.4 1.1-.6.3-.2.7-.3 1.1-.3.4 0 .8.1 1.1.3.3.2.4.5.4.8 0 .4-.2.7-.6.9-.7.3-1.5.5-2.2.4v1.6c.5 0 1 0 1.5.1.3.1.7.2 1 .3.2.1.4.2.5.4s.1.4.1.6c0 .3-.2.7-.5.8-.4.2-.9.3-1.4.3s-1-.1-1.4-.3c-.4-.2-.8-.4-1.2-.7L13 15.6c.5.4 1 .8 1.6 1 .7.3 1.5.4 2.3.4.6 0 1.1-.1 1.6-.2.4-.1.9-.2 1.3-.5.4-.2.7-.5.9-.9.2-.4.3-.8.3-1.2 0-.6-.3-1.1-.7-1.5z" }) });
// packages/icons/build-module/library/heading-level-4.mjs
var import_primitives62 = __toESM(require_primitives(), 1);
var import_jsx_runtime63 = __toESM(require_jsx_runtime(), 1);
var heading_level_4_default = /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_primitives62.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_primitives62.Path, { d: "M20 13V7h-3l-4 6v2h5v2h2v-2h1v-2h-1zm-2 0h-2.8L18 9v4zm-9-2H5V7H3v10h2v-4h4v4h2V7H9v4z" }) });
// packages/icons/build-module/library/heading-level-5.mjs
var import_primitives63 = __toESM(require_primitives(), 1);
var import_jsx_runtime64 = __toESM(require_jsx_runtime(), 1);
var heading_level_5_default = /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_primitives63.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_primitives63.Path, { d: "M9 11H5V7H3v10h2v-4h4v4h2V7H9v4zm11.7 1.2c-.2-.3-.5-.7-.8-.9-.3-.3-.7-.5-1.1-.6-.5-.1-.9-.2-1.4-.2-.2 0-.5.1-.7.1-.2.1-.5.1-.7.2l.1-1.9h4.3V7H14l-.3 5 1 .6.5-.2.4-.1c.1-.1.3-.1.4-.1h.5c.5 0 1 .1 1.4.4.4.2.6.7.6 1.1 0 .4-.2.8-.6 1.1-.4.3-.9.4-1.4.4-.4 0-.9-.1-1.3-.3-.4-.2-.7-.4-1.1-.7 0 0-1.1 1.4-1 1.5.5.4 1 .8 1.6 1 .7.3 1.5.4 2.3.4.5 0 1-.1 1.5-.3s.9-.4 1.3-.7c.4-.3.7-.7.9-1.1s.3-.9.3-1.4-.1-1-.3-1.4z" }) });
// packages/icons/build-module/library/heading-level-6.mjs
var import_primitives64 = __toESM(require_primitives(), 1);
var import_jsx_runtime65 = __toESM(require_jsx_runtime(), 1);
var heading_level_6_default = /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_primitives64.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_primitives64.Path, { d: "M20.7 12.4c-.2-.3-.4-.6-.7-.9s-.6-.5-1-.6c-.4-.2-.8-.2-1.2-.2-.5 0-.9.1-1.3.3s-.8.5-1.2.8c0-.5 0-.9.2-1.4l.6-.9c.2-.2.5-.4.8-.5.6-.2 1.3-.2 1.9 0 .3.1.6.3.8.5 0 0 1.3-1.3 1.3-1.4-.4-.3-.9-.6-1.4-.8-.6-.2-1.3-.3-2-.3-.6 0-1.1.1-1.7.4-.5.2-1 .5-1.4.9-.4.4-.8 1-1 1.6-.3.7-.4 1.5-.4 2.3s.1 1.5.3 2.1c.2.6.6 1.1 1 1.5.4.4.9.7 1.4.9 1 .3 2 .3 3 0 .4-.1.8-.3 1.2-.6.3-.3.6-.6.8-1 .2-.5.3-.9.3-1.4s-.1-.9-.3-1.3zm-2 2.1c-.1.2-.3.4-.4.5-.1.1-.3.2-.5.2-.2.1-.4.1-.6.1-.2.1-.5 0-.7-.1-.2 0-.3-.2-.5-.3-.1-.2-.3-.4-.4-.6-.2-.3-.3-.7-.3-1 .3-.3.6-.5 1-.7.3-.1.7-.2 1-.2.4 0 .8.1 1.1.3.3.3.4.7.4 1.1 0 .2 0 .5-.1.7zM9 11H5V7H3v10h2v-4h4v4h2V7H9v4z" }) });
// packages/icons/build-module/library/heading.mjs
var import_primitives65 = __toESM(require_primitives(), 1);
var import_jsx_runtime66 = __toESM(require_jsx_runtime(), 1);
var heading_default = /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_primitives65.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_primitives65.Path, { d: "M6 5V18.5911L12 13.8473L18 18.5911V5H6Z" }) });
// packages/icons/build-module/library/home.mjs
var import_primitives66 = __toESM(require_primitives(), 1);
var import_jsx_runtime67 = __toESM(require_jsx_runtime(), 1);
var home_default = /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_primitives66.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_primitives66.Path, { d: "M12 4L4 7.9V20h16V7.9L12 4zm6.5 14.5H14V13h-4v5.5H5.5V8.8L12 5.7l6.5 3.1v9.7z" }) });
// packages/icons/build-module/library/html.mjs
var import_primitives67 = __toESM(require_primitives(), 1);
var import_jsx_runtime68 = __toESM(require_jsx_runtime(), 1);
var html_default = /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_primitives67.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_primitives67.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" }) });
// packages/icons/build-module/library/image.mjs
var import_primitives68 = __toESM(require_primitives(), 1);
var import_jsx_runtime69 = __toESM(require_jsx_runtime(), 1);
var image_default = /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_primitives68.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_primitives68.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" }) });
// packages/icons/build-module/library/keyboard-return.mjs
var import_primitives69 = __toESM(require_primitives(), 1);
var import_jsx_runtime70 = __toESM(require_jsx_runtime(), 1);
var keyboard_return_default = /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_primitives69.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_primitives69.Path, { d: "m6.734 16.106 2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.158 1.093-1.028-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734Z" }) });
// packages/icons/build-module/library/layout.mjs
var import_primitives70 = __toESM(require_primitives(), 1);
var import_jsx_runtime71 = __toESM(require_jsx_runtime(), 1);
var layout_default = /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_primitives70.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_primitives70.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" }) });
// packages/icons/build-module/library/link-off.mjs
var import_primitives71 = __toESM(require_primitives(), 1);
var import_jsx_runtime72 = __toESM(require_jsx_runtime(), 1);
var link_off_default = /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_primitives71.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_primitives71.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" }) });
// packages/icons/build-module/library/link.mjs
var import_primitives72 = __toESM(require_primitives(), 1);
var import_jsx_runtime73 = __toESM(require_jsx_runtime(), 1);
var link_default = /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_primitives72.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_primitives72.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" }) });
// packages/icons/build-module/library/list-item.mjs
var import_primitives73 = __toESM(require_primitives(), 1);
var import_jsx_runtime74 = __toESM(require_jsx_runtime(), 1);
var list_item_default = /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_primitives73.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_primitives73.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" }) });
// packages/icons/build-module/library/list.mjs
var import_primitives74 = __toESM(require_primitives(), 1);
var import_jsx_runtime75 = __toESM(require_jsx_runtime(), 1);
var list_default = /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_primitives74.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_primitives74.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" }) });
// packages/icons/build-module/library/login.mjs
var import_primitives75 = __toESM(require_primitives(), 1);
var import_jsx_runtime76 = __toESM(require_jsx_runtime(), 1);
var login_default = /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_primitives75.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_primitives75.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" }) });
// packages/icons/build-module/library/loop.mjs
var import_primitives76 = __toESM(require_primitives(), 1);
var import_jsx_runtime77 = __toESM(require_jsx_runtime(), 1);
var loop_default = /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_primitives76.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_primitives76.Path, { d: "M18.1823 11.6392C18.1823 13.0804 17.0139 14.2487 15.5727 14.2487C14.3579 14.2487 13.335 13.4179 13.0453 12.2922L13.0377 12.2625L13.0278 12.2335L12.3985 10.377L12.3942 10.3785C11.8571 8.64997 10.246 7.39405 8.33961 7.39405C5.99509 7.39405 4.09448 9.29465 4.09448 11.6392C4.09448 13.9837 5.99509 15.8843 8.33961 15.8843C8.88499 15.8843 9.40822 15.781 9.88943 15.5923L9.29212 14.0697C8.99812 14.185 8.67729 14.2487 8.33961 14.2487C6.89838 14.2487 5.73003 13.0804 5.73003 11.6392C5.73003 10.1979 6.89838 9.02959 8.33961 9.02959C9.55444 9.02959 10.5773 9.86046 10.867 10.9862L10.8772 10.9836L11.4695 12.7311C11.9515 14.546 13.6048 15.8843 15.5727 15.8843C17.9172 15.8843 19.8178 13.9837 19.8178 11.6392C19.8178 9.29465 17.9172 7.39404 15.5727 7.39404C15.0287 7.39404 14.5066 7.4968 14.0264 7.6847L14.6223 9.20781C14.9158 9.093 15.2358 9.02959 15.5727 9.02959C17.0139 9.02959 18.1823 10.1979 18.1823 11.6392Z" }) });
// packages/icons/build-module/library/map-marker.mjs
var import_primitives77 = __toESM(require_primitives(), 1);
var import_jsx_runtime78 = __toESM(require_jsx_runtime(), 1);
var map_marker_default = /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_primitives77.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_primitives77.Path, { d: "M12 9c-.8 0-1.5.7-1.5 1.5S11.2 12 12 12s1.5-.7 1.5-1.5S12.8 9 12 9zm0-5c-3.6 0-6.5 2.8-6.5 6.2 0 .8.3 1.8.9 3.1.5 1.1 1.2 2.3 2 3.6.7 1 3 3.8 3.2 3.9l.4.5.4-.5c.2-.2 2.6-2.9 3.2-3.9.8-1.2 1.5-2.5 2-3.6.6-1.3.9-2.3.9-3.1C18.5 6.8 15.6 4 12 4zm4.3 8.7c-.5 1-1.1 2.2-1.9 3.4-.5.7-1.7 2.2-2.4 3-.7-.8-1.9-2.3-2.4-3-.8-1.2-1.4-2.3-1.9-3.3-.6-1.4-.7-2.2-.7-2.5 0-2.6 2.2-4.7 5-4.7s5 2.1 5 4.7c0 .2-.1 1-.7 2.4z" }) });
// packages/icons/build-module/library/math.mjs
var import_primitives78 = __toESM(require_primitives(), 1);
var import_jsx_runtime79 = __toESM(require_jsx_runtime(), 1);
var math_default = /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_primitives78.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_primitives78.Path, { d: "M11.2 6.8c-.7 0-1.4.5-1.6 1.1l-2.8 7.5-1.2-1.8c-.1-.2-.4-.3-.6-.3H3v1.5h1.6l1.2 1.8c.6.9 1.9.7 2.2-.3l2.9-7.9s.1-.2.2-.2h7.8V6.7h-7.8Zm5.3 3.4-1.9 1.9-1.9-1.9-1.1 1.1 1.9 1.9-1.9 1.9 1.1 1.1 1.9-1.9 1.9 1.9 1.1-1.1-1.9-1.9 1.9-1.9-1.1-1.1Z" }) });
// packages/icons/build-module/library/media-and-text.mjs
var import_primitives79 = __toESM(require_primitives(), 1);
var import_jsx_runtime80 = __toESM(require_jsx_runtime(), 1);
var media_and_text_default = /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_primitives79.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_primitives79.Path, { d: "M3 6v11.5h8V6H3Zm11 3h7V7.5h-7V9Zm7 3.5h-7V11h7v1.5ZM14 16h7v-1.5h-7V16Z" }) });
// packages/icons/build-module/library/media.mjs
var import_primitives80 = __toESM(require_primitives(), 1);
var import_jsx_runtime81 = __toESM(require_jsx_runtime(), 1);
var media_default = /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(import_primitives80.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_primitives80.Path, { d: "m7 6.5 4 2.5-4 2.5z" }),
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_primitives80.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" })
] });
// packages/icons/build-module/library/menu.mjs
var import_primitives81 = __toESM(require_primitives(), 1);
var import_jsx_runtime82 = __toESM(require_jsx_runtime(), 1);
var menu_default = /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_primitives81.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_primitives81.Path, { d: "M5 5v1.5h14V5H5zm0 7.8h14v-1.5H5v1.5zM5 19h14v-1.5H5V19z" }) });
// packages/icons/build-module/library/more-vertical.mjs
var import_primitives82 = __toESM(require_primitives(), 1);
var import_jsx_runtime83 = __toESM(require_jsx_runtime(), 1);
var more_vertical_default = /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_primitives82.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_primitives82.Path, { d: "M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z" }) });
// packages/icons/build-module/library/more.mjs
var import_primitives83 = __toESM(require_primitives(), 1);
var import_jsx_runtime84 = __toESM(require_jsx_runtime(), 1);
var more_default = /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_primitives83.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_primitives83.Path, { d: "M4 9v1.5h16V9H4zm12 5.5h4V13h-4v1.5zm-6 0h4V13h-4v1.5zm-6 0h4V13H4v1.5z" }) });
// packages/icons/build-module/library/navigation-overlay.mjs
var import_primitives84 = __toESM(require_primitives(), 1);
var import_jsx_runtime85 = __toESM(require_jsx_runtime(), 1);
var navigation_overlay_default = /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_primitives84.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_primitives84.Path, { d: "M18.5 10a1.5 1.5 0 0 1 1.5 1.5v7a1.5 1.5 0 0 1-1.5 1.5h-7a1.5 1.5 0 0 1-1.5-1.5v-7a1.5 1.5 0 0 1 1.5-1.5zM16 4a2 2 0 0 1 2 2v2h-1.5V6a.5.5 0 0 0-.5-.5H6a.5.5 0 0 0-.5.5v3H8v1.5H5.5V16a.5.5 0 0 0 .5.5h2V18H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2z" }) });
// packages/icons/build-module/library/navigation.mjs
var import_primitives85 = __toESM(require_primitives(), 1);
var import_jsx_runtime86 = __toESM(require_jsx_runtime(), 1);
var navigation_default = /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_primitives85.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_primitives85.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" }) });
// packages/icons/build-module/library/next.mjs
var import_primitives86 = __toESM(require_primitives(), 1);
var import_jsx_runtime87 = __toESM(require_jsx_runtime(), 1);
var next_default = /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_primitives86.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_primitives86.Path, { d: "M6.6 6L5.4 7l4.5 5-4.5 5 1.1 1 5.5-6-5.4-6zm6 0l-1.1 1 4.5 5-4.5 5 1.1 1 5.5-6-5.5-6z" }) });
// packages/icons/build-module/library/overlay-text.mjs
var import_primitives87 = __toESM(require_primitives(), 1);
var import_jsx_runtime88 = __toESM(require_jsx_runtime(), 1);
var overlay_text_default = /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(import_primitives87.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(import_primitives87.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" }) });
// packages/icons/build-module/library/page-break.mjs
var import_primitives88 = __toESM(require_primitives(), 1);
var import_jsx_runtime89 = __toESM(require_jsx_runtime(), 1);
var page_break_default = /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_primitives88.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_primitives88.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" }) });
// packages/icons/build-module/library/page.mjs
var import_primitives89 = __toESM(require_primitives(), 1);
var import_jsx_runtime90 = __toESM(require_jsx_runtime(), 1);
var page_default = /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(import_primitives89.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(import_primitives89.Path, { d: "M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z" }),
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(import_primitives89.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" })
] });
// packages/icons/build-module/library/pages.mjs
var import_primitives90 = __toESM(require_primitives(), 1);
var import_jsx_runtime91 = __toESM(require_jsx_runtime(), 1);
var pages_default = /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(import_primitives90.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_primitives90.Path, { d: "M14.5 5.5h-7V7h7V5.5ZM7.5 9h7v1.5h-7V9Zm7 3.5h-7V14h7v-1.5Z" }),
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_primitives90.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" }),
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_primitives90.Path, { d: "M20 8v11c0 .69-.31 1-.999 1H6v1.5h13.001c1.52 0 2.499-.982 2.499-2.5V8H20Z" })
] });
// packages/icons/build-module/library/paragraph.mjs
var import_primitives91 = __toESM(require_primitives(), 1);
var import_jsx_runtime92 = __toESM(require_jsx_runtime(), 1);
var paragraph_default = /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_primitives91.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_primitives91.Path, { d: "m9.99609 14v-.2251l.00391.0001v6.225h1.5v-14.5h2.5v14.5h1.5v-14.5h3v-1.5h-8.50391c-2.76142 0-5 2.23858-5 5 0 2.7614 2.23858 5 5 5z" }) });
// packages/icons/build-module/library/pencil.mjs
var import_primitives92 = __toESM(require_primitives(), 1);
var import_jsx_runtime93 = __toESM(require_jsx_runtime(), 1);
var pencil_default = /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_primitives92.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_primitives92.Path, { d: "m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z" }) });
// packages/icons/build-module/library/pin.mjs
var import_primitives93 = __toESM(require_primitives(), 1);
var import_jsx_runtime94 = __toESM(require_jsx_runtime(), 1);
var pin_default = /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_primitives93.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_primitives93.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" }) });
// packages/icons/build-module/library/plugins.mjs
var import_primitives94 = __toESM(require_primitives(), 1);
var import_jsx_runtime95 = __toESM(require_jsx_runtime(), 1);
var plugins_default = /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_primitives94.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_primitives94.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" }) });
// packages/icons/build-module/library/plus.mjs
var import_primitives95 = __toESM(require_primitives(), 1);
var import_jsx_runtime96 = __toESM(require_jsx_runtime(), 1);
var plus_default = /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_primitives95.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_primitives95.Path, { d: "M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z" }) });
// packages/icons/build-module/library/position-center.mjs
var import_primitives96 = __toESM(require_primitives(), 1);
var import_jsx_runtime97 = __toESM(require_jsx_runtime(), 1);
var position_center_default = /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_primitives96.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_primitives96.Path, { d: "M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM7 9h10v6H7V9Z" }) });
// packages/icons/build-module/library/position-left.mjs
var import_primitives97 = __toESM(require_primitives(), 1);
var import_jsx_runtime98 = __toESM(require_jsx_runtime(), 1);
var position_left_default = /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_primitives97.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_primitives97.Path, { d: "M5 5.5h8V4H5v1.5ZM5 20h8v-1.5H5V20ZM19 9H5v6h14V9Z" }) });
// packages/icons/build-module/library/position-right.mjs
var import_primitives98 = __toESM(require_primitives(), 1);
var import_jsx_runtime99 = __toESM(require_jsx_runtime(), 1);
var position_right_default = /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_primitives98.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_primitives98.Path, { d: "M19 5.5h-8V4h8v1.5ZM19 20h-8v-1.5h8V20ZM5 9h14v6H5V9Z" }) });
// packages/icons/build-module/library/post-author.mjs
var import_primitives99 = __toESM(require_primitives(), 1);
var import_jsx_runtime100 = __toESM(require_jsx_runtime(), 1);
var post_author_default = /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(import_primitives99.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(import_primitives99.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M10 4.5a1 1 0 11-2 0 1 1 0 012 0zm1.5 0a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0zm2.25 7.5v-1A2.75 2.75 0 0011 8.25H7A2.75 2.75 0 004.25 11v1h1.5v-1c0-.69.56-1.25 1.25-1.25h4c.69 0 1.25.56 1.25 1.25v1h1.5zM4 20h9v-1.5H4V20zm16-4H4v-1.5h16V16z" }) });
// packages/icons/build-module/library/post-categories.mjs
var import_primitives100 = __toESM(require_primitives(), 1);
var import_jsx_runtime101 = __toESM(require_jsx_runtime(), 1);
var post_categories_default = /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_primitives100.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_primitives100.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M20 4H4v1.5h16V4zm-2 9h-3c-1.1 0-2 .9-2 2v3c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2v-3c0-1.1-.9-2-2-2zm.5 5c0 .3-.2.5-.5.5h-3c-.3 0-.5-.2-.5-.5v-3c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v3zM4 9.5h9V8H4v1.5zM9 13H6c-1.1 0-2 .9-2 2v3c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2v-3c0-1.1-.9-2-2-2zm.5 5c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-3c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v3z" }) });
// packages/icons/build-module/library/post-comments-count.mjs
var import_primitives101 = __toESM(require_primitives(), 1);
var import_jsx_runtime102 = __toESM(require_jsx_runtime(), 1);
var post_comments_count_default = /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_primitives101.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_primitives101.Path, { d: "M13 8H4v1.5h9V8zM4 4v1.5h16V4H4zm9 8H5c-.6 0-1 .4-1 1v8.3c0 .3.2.7.6.8.1.1.2.1.3.1.2 0 .5-.1.6-.3l1.8-1.8H13c.6 0 1-.4 1-1V13c0-.6-.4-1-1-1zm-2.2 6.6H7l1.6-2.2c.3-.4.5-.7.6-.9.1-.2.2-.4.2-.5 0-.2-.1-.3-.1-.4-.1-.1-.2-.1-.4-.1s-.4 0-.6.1c-.3.1-.5.3-.7.4l-.2.2-.2-1.2.1-.1c.3-.2.5-.3.8-.4.3-.1.6-.1.9-.1.3 0 .6.1.9.2.2.1.4.3.6.5.1.2.2.5.2.7 0 .3-.1.6-.2.9-.1.3-.4.7-.7 1.1l-.5.6h1.6v1.2z" }) });
// packages/icons/build-module/library/post-comments-form.mjs
var import_primitives102 = __toESM(require_primitives(), 1);
var import_jsx_runtime103 = __toESM(require_jsx_runtime(), 1);
var post_comments_form_default = /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_primitives102.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_primitives102.Path, { d: "M13 8H4v1.5h9V8zM4 4v1.5h16V4H4zm9 8H5c-.6 0-1 .4-1 1v8.3c0 .3.2.7.6.8.1.1.2.1.3.1.2 0 .5-.1.6-.3l1.8-1.8H13c.6 0 1-.4 1-1V13c0-.6-.4-1-1-1zm-.5 6.6H6.7l-1.2 1.2v-6.3h7v5.1z" }) });
// packages/icons/build-module/library/post-comments.mjs
var import_primitives103 = __toESM(require_primitives(), 1);
var import_jsx_runtime104 = __toESM(require_jsx_runtime(), 1);
var post_comments_default = /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_primitives103.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_primitives103.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" }) });
// packages/icons/build-module/library/post-content.mjs
var import_primitives104 = __toESM(require_primitives(), 1);
var import_jsx_runtime105 = __toESM(require_jsx_runtime(), 1);
var post_content_default = /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_primitives104.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_primitives104.Path, { d: "M4 6h12V4.5H4V6Zm16 4.5H4V9h16v1.5ZM4 15h16v-1.5H4V15Zm0 4.5h16V18H4v1.5Z" }) });
// packages/icons/build-module/library/post-date.mjs
var import_primitives105 = __toESM(require_primitives(), 1);
var import_jsx_runtime106 = __toESM(require_jsx_runtime(), 1);
var post_date_default = /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(import_primitives105.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_primitives105.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" }),
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_primitives105.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" })
] });
// packages/icons/build-module/library/post-excerpt.mjs
var import_primitives106 = __toESM(require_primitives(), 1);
var import_jsx_runtime107 = __toESM(require_jsx_runtime(), 1);
var post_excerpt_default = /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_primitives106.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_primitives106.Path, { d: "M8.001 3.984V9.47c0 1.518-.98 2.5-2.499 2.5h-.5v-1.5h.5c.69 0 1-.31 1-1V6.984H4v-3h4.001ZM4 20h9v-1.5H4V20Zm16-4H4v-1.5h16V16ZM13.001 3.984V9.47c0 1.518-.98 2.5-2.499 2.5h-.5v-1.5h.5c.69 0 1-.31 1-1V6.984H9v-3h4.001Z" }) });
// packages/icons/build-module/library/post-featured-image.mjs
var import_primitives107 = __toESM(require_primitives(), 1);
var import_jsx_runtime108 = __toESM(require_jsx_runtime(), 1);
var post_featured_image_default = /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(import_primitives107.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(import_primitives107.Path, { d: "M19 3H5c-.6 0-1 .4-1 1v7c0 .5.4 1 1 1h14c.5 0 1-.4 1-1V4c0-.6-.4-1-1-1zM5.5 10.5v-.4l1.8-1.3 1.3.8c.3.2.7.2.9-.1L11 8.1l2.4 2.4H5.5zm13 0h-2.9l-4-4c-.3-.3-.8-.3-1.1 0L8.9 8l-1.2-.8c-.3-.2-.6-.2-.9 0l-1.3 1V4.5h13v6zM4 20h9v-1.5H4V20zm0-4h16v-1.5H4V16z" }) });
// packages/icons/build-module/library/post-list.mjs
var import_primitives108 = __toESM(require_primitives(), 1);
var import_jsx_runtime109 = __toESM(require_jsx_runtime(), 1);
var post_list_default = /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_primitives108.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_primitives108.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" }) });
// packages/icons/build-module/library/post-terms.mjs
var import_primitives109 = __toESM(require_primitives(), 1);
var import_jsx_runtime110 = __toESM(require_jsx_runtime(), 1);
var post_terms_default = /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(import_primitives109.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(import_primitives109.Path, { d: "M8.1 12.3c.1.1.3.3.5.3.2.1.4.1.6.1.2 0 .4 0 .6-.1.2-.1.4-.2.5-.3l3-3c.3-.3.5-.7.5-1.1 0-.4-.2-.8-.5-1.1L9.7 3.5c-.1-.2-.3-.3-.5-.3H5c-.4 0-.8.4-.8.8v4.2c0 .2.1.4.2.5l3.7 3.6zM5.8 4.8h3.1l3.4 3.4v.1l-3 3 .5.5-.7-.5-3.3-3.4V4.8zM4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4z" }) });
// packages/icons/build-module/library/preformatted.mjs
var import_primitives110 = __toESM(require_primitives(), 1);
var import_jsx_runtime111 = __toESM(require_jsx_runtime(), 1);
var preformatted_default = /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_primitives110.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_primitives110.Path, { d: "M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v12zM7 16.5h6V15H7v1.5zm4-4h6V11h-6v1.5zM9 11H7v1.5h2V11zm6 5.5h2V15h-2v1.5z" }) });
// packages/icons/build-module/library/previous.mjs
var import_primitives111 = __toESM(require_primitives(), 1);
var import_jsx_runtime112 = __toESM(require_jsx_runtime(), 1);
var previous_default = /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(import_primitives111.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(import_primitives111.Path, { d: "M11.6 7l-1.1-1L5 12l5.5 6 1.1-1L7 12l4.6-5zm6 0l-1.1-1-5.5 6 5.5 6 1.1-1-4.6-5 4.6-5z" }) });
// packages/icons/build-module/library/pull-left.mjs
var import_primitives112 = __toESM(require_primitives(), 1);
var import_jsx_runtime113 = __toESM(require_jsx_runtime(), 1);
var pull_left_default = /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(import_primitives112.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(import_primitives112.Path, { d: "M4 18h6V6H4v12zm9-9.5V10h7V8.5h-7zm0 7h7V14h-7v1.5z" }) });
// packages/icons/build-module/library/pull-right.mjs
var import_primitives113 = __toESM(require_primitives(), 1);
var import_jsx_runtime114 = __toESM(require_jsx_runtime(), 1);
var pull_right_default = /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(import_primitives113.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(import_primitives113.Path, { d: "M14 6v12h6V6h-6zM4 10h7V8.5H4V10zm0 5.5h7V14H4v1.5z" }) });
// packages/icons/build-module/library/pullquote.mjs
var import_primitives114 = __toESM(require_primitives(), 1);
var import_jsx_runtime115 = __toESM(require_jsx_runtime(), 1);
var pullquote_default = /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_primitives114.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_primitives114.Path, { d: "M18 8H6c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-4c0-1.1-.9-2-2-2zm.5 6c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-4c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v4zM4 4v1.5h16V4H4zm0 16h16v-1.5H4V20z" }) });
// packages/icons/build-module/library/query-pagination-next.mjs
var import_primitives115 = __toESM(require_primitives(), 1);
var import_jsx_runtime116 = __toESM(require_jsx_runtime(), 1);
var query_pagination_next_default = /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_primitives115.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_primitives115.Path, { d: "M5 13.5h3v-3H5v3zm5 0h3v-3h-3v3zM17 9l-1 1 2 2-2 2 1 1 3-3-3-3z" }) });
// packages/icons/build-module/library/query-pagination-numbers.mjs
var import_primitives116 = __toESM(require_primitives(), 1);
var import_jsx_runtime117 = __toESM(require_jsx_runtime(), 1);
var query_pagination_numbers_default = /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(import_primitives116.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(import_primitives116.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" }) });
// packages/icons/build-module/library/query-pagination-previous.mjs
var import_primitives117 = __toESM(require_primitives(), 1);
var import_jsx_runtime118 = __toESM(require_jsx_runtime(), 1);
var query_pagination_previous_default = /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(import_primitives117.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(import_primitives117.Path, { d: "M16 10.5v3h3v-3h-3zm-5 3h3v-3h-3v3zM7 9l-3 3 3 3 1-1-2-2 2-2-1-1z" }) });
// packages/icons/build-module/library/query-pagination.mjs
var import_primitives118 = __toESM(require_primitives(), 1);
var import_jsx_runtime119 = __toESM(require_jsx_runtime(), 1);
var query_pagination_default = /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(import_primitives118.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(import_primitives118.Path, { d: "M4 13.5h6v-3H4v3zm8 0h3v-3h-3v3zm5-3v3h3v-3h-3z" }) });
// packages/icons/build-module/library/quote.mjs
var import_primitives119 = __toESM(require_primitives(), 1);
var import_jsx_runtime120 = __toESM(require_jsx_runtime(), 1);
var quote_default = /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(import_primitives119.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(import_primitives119.Path, { d: "M13 6v6h5.2v4c0 .8-.2 1.4-.5 1.7-.6.6-1.6.6-2.5.5h-.3v1.5h.5c1 0 2.3-.1 3.3-1 .6-.6 1-1.6 1-2.8V6H13zm-9 6h5.2v4c0 .8-.2 1.4-.5 1.7-.6.6-1.6.6-2.5.5h-.3v1.5h.5c1 0 2.3-.1 3.3-1 .6-.6 1-1.6 1-2.8V6H4v6z" }) });
// packages/icons/build-module/library/remove-submenu.mjs
var import_primitives120 = __toESM(require_primitives(), 1);
var import_jsx_runtime121 = __toESM(require_jsx_runtime(), 1);
var remove_submenu_default = /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_primitives120.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_primitives120.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" }) });
// packages/icons/build-module/library/resize-corner-ne.mjs
var import_primitives121 = __toESM(require_primitives(), 1);
var import_jsx_runtime122 = __toESM(require_jsx_runtime(), 1);
var resize_corner_ne_default = /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(import_primitives121.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(import_primitives121.Path, { d: "M7 18h4.5v1.5h-7v-7H6V17L17 6h-4.5V4.5h7v7H18V7L7 18Z" }) });
// packages/icons/build-module/library/row.mjs
var import_primitives122 = __toESM(require_primitives(), 1);
var import_jsx_runtime123 = __toESM(require_jsx_runtime(), 1);
var row_default = /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(import_primitives122.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(import_primitives122.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" }) });
// packages/icons/build-module/library/rss.mjs
var import_primitives123 = __toESM(require_primitives(), 1);
var import_jsx_runtime124 = __toESM(require_jsx_runtime(), 1);
var rss_default = /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_primitives123.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_primitives123.Path, { d: "M5 10.2h-.8v1.5H5c1.9 0 3.8.8 5.1 2.1 1.4 1.4 2.1 3.2 2.1 5.1v.8h1.5V19c0-2.3-.9-4.5-2.6-6.2-1.6-1.6-3.8-2.6-6.1-2.6zm10.4-1.6C12.6 5.8 8.9 4.2 5 4.2h-.8v1.5H5c3.5 0 6.9 1.4 9.4 3.9s3.9 5.8 3.9 9.4v.8h1.5V19c0-3.9-1.6-7.6-4.4-10.4zM4 20h3v-3H4v3z" }) });
// packages/icons/build-module/library/search.mjs
var import_primitives124 = __toESM(require_primitives(), 1);
var import_jsx_runtime125 = __toESM(require_jsx_runtime(), 1);
var search_default = /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_primitives124.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_primitives124.Path, { d: "M13 5c-3.3 0-6 2.7-6 6 0 1.4.5 2.7 1.3 3.7l-3.8 3.8 1.1 1.1 3.8-3.8c1 .8 2.3 1.3 3.7 1.3 3.3 0 6-2.7 6-6S16.3 5 13 5zm0 10.5c-2.5 0-4.5-2-4.5-4.5s2-4.5 4.5-4.5 4.5 2 4.5 4.5-2 4.5-4.5 4.5z" }) });
// packages/icons/build-module/library/separator.mjs
var import_primitives125 = __toESM(require_primitives(), 1);
var import_jsx_runtime126 = __toESM(require_jsx_runtime(), 1);
var separator_default = /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_primitives125.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_primitives125.Path, { d: "M4.5 12.5v4H3V7h1.5v3.987h15V7H21v9.5h-1.5v-4h-15Z" }) });
// packages/icons/build-module/library/share.mjs
var import_primitives126 = __toESM(require_primitives(), 1);
var import_jsx_runtime127 = __toESM(require_jsx_runtime(), 1);
var share_default = /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_primitives126.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_primitives126.Path, { d: "M9 11.8l6.1-4.5c.1.4.4.7.9.7h2c.6 0 1-.4 1-1V5c0-.6-.4-1-1-1h-2c-.6 0-1 .4-1 1v.4l-6.4 4.8c-.2-.1-.4-.2-.6-.2H6c-.6 0-1 .4-1 1v2c0 .6.4 1 1 1h2c.2 0 .4-.1.6-.2l6.4 4.8v.4c0 .6.4 1 1 1h2c.6 0 1-.4 1-1v-2c0-.6-.4-1-1-1h-2c-.5 0-.8.3-.9.7L9 12.2v-.4z" }) });
// packages/icons/build-module/library/shortcode.mjs
var import_primitives127 = __toESM(require_primitives(), 1);
var import_jsx_runtime128 = __toESM(require_jsx_runtime(), 1);
var shortcode_default = /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_primitives127.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_primitives127.Path, { d: "M16 4.2v1.5h2.5v12.5H16v1.5h4V4.2h-4zM4.2 19.8h4v-1.5H5.8V5.8h2.5V4.2h-4l-.1 15.6zm5.1-3.1l1.4.6 4-10-1.4-.6-4 10z" }) });
// packages/icons/build-module/library/sidebar.mjs
var import_primitives128 = __toESM(require_primitives(), 1);
var import_jsx_runtime129 = __toESM(require_jsx_runtime(), 1);
var sidebar_default = /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_primitives128.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_primitives128.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" }) });
// packages/icons/build-module/library/site-logo.mjs
var import_primitives129 = __toESM(require_primitives(), 1);
var import_jsx_runtime130 = __toESM(require_jsx_runtime(), 1);
var site_logo_default = /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_primitives129.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_primitives129.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 1.5c3.4 0 6.2 2.7 6.5 6l-1.2-.6-.8-.4c-.1 0-.2 0-.3-.1H16c-.1-.2-.4-.2-.7 0l-2.9 2.1L9 11.3h-.7L5.5 13v-1.1c0-3.6 2.9-6.5 6.5-6.5Zm0 13c-2.7 0-5-1.7-6-4l2.8-1.7 3.5 1.2h.4s.2 0 .4-.2l2.9-2.1.4.2c.6.3 1.4.7 2.1 1.1-.5 3.1-3.2 5.4-6.4 5.4Z" }) });
// packages/icons/build-module/library/square.mjs
var import_primitives130 = __toESM(require_primitives(), 1);
var import_jsx_runtime131 = __toESM(require_jsx_runtime(), 1);
var square_default = /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(import_primitives130.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(import_primitives130.Path, { fill: "none", d: "M5.75 12.75V18.25H11.25M12.75 5.75H18.25V11.25", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "square" }) });
// packages/icons/build-module/library/stack.mjs
var import_primitives131 = __toESM(require_primitives(), 1);
var import_jsx_runtime132 = __toESM(require_jsx_runtime(), 1);
var stack_default = /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_primitives131.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_primitives131.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" }) });
// packages/icons/build-module/library/symbol-filled.mjs
var import_primitives132 = __toESM(require_primitives(), 1);
var import_jsx_runtime133 = __toESM(require_jsx_runtime(), 1);
var symbol_filled_default = /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_primitives132.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_primitives132.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" }) });
// packages/icons/build-module/library/symbol.mjs
var import_primitives133 = __toESM(require_primitives(), 1);
var import_jsx_runtime134 = __toESM(require_jsx_runtime(), 1);
var symbol_default = /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_primitives133.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_primitives133.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-1 1.4l-5.6 5.6c-.1.1-.3.1-.4 0l-5.6-5.6c-.1-.1-.1-.3 0-.4l5.6-5.6s.1-.1.2-.1.1 0 .2.1l5.6 5.6c.1.1.1.3 0 .4zm-16.6-.4L10 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" }) });
// packages/icons/build-module/library/tab.mjs
var import_primitives134 = __toESM(require_primitives(), 1);
var import_jsx_runtime135 = __toESM(require_jsx_runtime(), 1);
var tab_default = /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_primitives134.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_primitives134.Path, { d: "M4 16.5h13V15H4v1.5ZM4 12v1.5h16V12H4Zm1.5-4.2c0-.1.1-.2.2-.2h3.5c.1 0 .2.1.2.2v2.5h1.5V7.8c0-1-.8-1.8-1.8-1.8H5.6c-1 0-1.8.8-1.8 1.8v2.5h1.5V7.8Z" }) });
// packages/icons/build-module/library/table-column-after.mjs
var import_primitives135 = __toESM(require_primitives(), 1);
var import_jsx_runtime136 = __toESM(require_jsx_runtime(), 1);
var table_column_after_default = /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_primitives135.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_primitives135.Path, { d: "M19 3H5c-1.1 0-2 .9-2 2v14.2c.1.9.9 1.7 1.8 1.8H19.2c1-.1 1.8-1 1.8-2V5c0-1.1-.9-2-2-2ZM8.5 19.5H5c-.3 0-.5-.2-.5-.5v-3.5h4v4Zm0-5.5h-4v-4h4v4Zm0-5.5h-4V5c0-.3.2-.5.5-.5h3.5v4Zm11 10.5c0 .3-.2.5-.5.5h-9v-15h9c.3 0 .5.2.5.5v14Zm-4-10.8H14v3h-3v1.5h3v3h1.5v-3h3v-1.5h-3v-3Z" }) });
// packages/icons/build-module/library/table-column-before.mjs
var import_primitives136 = __toESM(require_primitives(), 1);
var import_jsx_runtime137 = __toESM(require_jsx_runtime(), 1);
var table_column_before_default = /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_primitives136.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_primitives136.Path, { d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1 .8 1.9 1.8 2H19.2c.9-.1 1.7-.9 1.8-1.8V5c0-1.1-.9-2-2-2Zm-5 16.5H5c-.3 0-.5-.2-.5-.5V5c0-.3.2-.5.5-.5h9v15Zm5.5-.5c0 .3-.2.5-.5.5h-3.5v-4h4V19Zm0-5h-4v-4h4v4Zm0-5.5h-4v-4H19c.3 0 .5.2.5.5v3.5Zm-11 7.3H10v-3h3v-1.5h-3v-3H8.5v3h-3v1.5h3v3Z" }) });
// packages/icons/build-module/library/table-column-delete.mjs
var import_primitives137 = __toESM(require_primitives(), 1);
var import_jsx_runtime138 = __toESM(require_jsx_runtime(), 1);
var table_column_delete_default = /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_primitives137.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_primitives137.Path, { d: "M19 3H5c-1.1 0-2 .9-2 2v14.2c.1.9.9 1.7 1.8 1.8H19.2c1-.1 1.8-1 1.8-2V5c0-1.1-.9-2-2-2ZM8.5 19.5H5c-.3 0-.5-.2-.5-.5V5c0-.3.2-.5.5-.5h3.5v15Zm11-.5c0 .3-.2.5-.5.5h-9v-15h9c.3 0 .5.2.5.5v14ZM16.9 8.8l-2.1 2.1-2.1-2.1-1.1 1.1 2.1 2.1-2.1 2.1 1.1 1.1 2.1-2.1 2.1 2.1 1.1-1.1-2.1-2.1L18 9.9l-1.1-1.1Z" }) });
// packages/icons/build-module/library/table-of-contents.mjs
var import_primitives138 = __toESM(require_primitives(), 1);
var import_jsx_runtime139 = __toESM(require_jsx_runtime(), 1);
var table_of_contents_default = /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(import_primitives138.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_primitives138.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M20 9.484h-8.889v-1.5H20v1.5Zm0 7h-4.889v-1.5H20v1.5Zm-14 .032a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 1a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z" }),
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_primitives138.Path, { d: "M13 15.516a2 2 0 1 1-4 0 2 2 0 0 1 4 0ZM8 8.484a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z" })
] });
// packages/icons/build-module/library/table-row-after.mjs
var import_primitives139 = __toESM(require_primitives(), 1);
var import_jsx_runtime140 = __toESM(require_jsx_runtime(), 1);
var table_row_after_default = /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_primitives139.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_primitives139.Path, { d: "M19 3H4.8c-.9.1-1.7.9-1.8 1.8V19.2c.1 1 1 1.8 2 1.8h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2Zm-9 1.5h4v4h-4v-4ZM4.5 5c0-.3.2-.5.5-.5h3.5v4h-4V5Zm15 14c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-9h15v9Zm0-10.5h-4v-4H19c.3 0 .5.2.5.5v3.5Zm-8.3 10h1.5v-3h3V14h-3v-3h-1.5v3h-3v1.5h3v3Z" }) });
// packages/icons/build-module/library/table-row-before.mjs
var import_primitives140 = __toESM(require_primitives(), 1);
var import_jsx_runtime141 = __toESM(require_jsx_runtime(), 1);
var table_row_before_default = /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_primitives140.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_primitives140.Path, { d: "M21 5c0-1.1-.9-2-2-2H5c-1 0-1.9.8-2 1.8V19.2c.1.9.9 1.7 1.8 1.8H19c1.1 0 2-.9 2-2V5ZM4.5 14V5c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v9h-15Zm4 5.5H5c-.3 0-.5-.2-.5-.5v-3.5h4v4Zm5.5 0h-4v-4h4v4Zm5.5-.5c0 .3-.2.5-.5.5h-3.5v-4h4V19ZM11.2 10h-3V8.5h3v-3h1.5v3h3V10h-3v3h-1.5v-3Z" }) });
// packages/icons/build-module/library/table-row-delete.mjs
var import_primitives141 = __toESM(require_primitives(), 1);
var import_jsx_runtime142 = __toESM(require_jsx_runtime(), 1);
var table_row_delete_default = /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_primitives141.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_primitives141.Path, { d: "M19 3H4.8c-.9.1-1.7.9-1.8 1.8V19.2c.1 1 1 1.8 2 1.8h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2Zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-9h15v9Zm0-10.5h-15V5c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v3.5Zm-9.6 9.4 2.1-2.1 2.1 2.1 1.1-1.1-2.1-2.1 2.1-2.1-1.1-1.1-2.1 2.1-2.1-2.1-1.1 1.1 2.1 2.1-2.1 2.1 1.1 1.1Z" }) });
// packages/icons/build-module/library/table.mjs
var import_primitives142 = __toESM(require_primitives(), 1);
var import_jsx_runtime143 = __toESM(require_jsx_runtime(), 1);
var table_default = /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_primitives142.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_primitives142.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 2v6.2h-6.8V4.4h6.2c.3 0 .5.2.5.5ZM5 4.5h6.2v6.8H4.4V5.1c0-.3.2-.5.5-.5ZM4.5 19v-6.2h6.8v6.8H5.1c-.3 0-.5-.2-.5-.5Zm14.5.5h-6.2v-6.8h6.8v6.2c0 .3-.2.5-.5.5Z" }) });
// packages/icons/build-module/library/tabs-menu-item.mjs
var import_primitives143 = __toESM(require_primitives(), 1);
var import_jsx_runtime144 = __toESM(require_jsx_runtime(), 1);
var tabs_menu_item_default = /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(import_primitives143.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(import_primitives143.Path, { d: "M14 11.25a.25.25 0 0 0-.25-.25h-3.5a.25.25 0 0 0-.25.25v2.5H8.5v-2.5c0-.966.784-1.75 1.75-1.75h3.5c.966 0 1.75.784 1.75 1.75v2.5H14v-2.5Z" }) });
// packages/icons/build-module/library/tabs-menu.mjs
var import_primitives144 = __toESM(require_primitives(), 1);
var import_jsx_runtime145 = __toESM(require_jsx_runtime(), 1);
var tabs_menu_default = /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_primitives144.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_primitives144.Path, { d: "M18.2 9.5h-3.5c-1 0-1.8.8-1.8 1.8v2.5h1.5v-2.5c0-.1.1-.2.2-.2h3.5c.1 0 .2.1.2.2v2.5h1.5v-2.5c0-1-.8-1.8-1.8-1.8Zm-9 0H5.7c-1 0-1.8.8-1.8 1.8v2.5h7v-2.5c0-1-.8-1.8-1.8-1.8Z" }) });
// packages/icons/build-module/library/tabs.mjs
var import_primitives145 = __toESM(require_primitives(), 1);
var import_jsx_runtime146 = __toESM(require_jsx_runtime(), 1);
var tabs_default = /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(import_primitives145.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(import_primitives145.Path, { d: "M4 16.5h13V15H4v1.5Zm0-3h16V12H4v1.5ZM18.2 6h-3.5c-1 0-1.8.8-1.8 1.8v2.5h1.5V7.8c0-.1.1-.2.2-.2h3.5c.1 0 .2.1.2.2v2.5h1.5V7.8c0-1-.8-1.8-1.8-1.8ZM11 7.8c0-1-.8-1.8-1.8-1.8H5.7c-1 0-1.8.8-1.8 1.8v2.5h7V7.8Z" }) });
// packages/icons/build-module/library/tag.mjs
var import_primitives146 = __toESM(require_primitives(), 1);
var import_jsx_runtime147 = __toESM(require_jsx_runtime(), 1);
var tag_default = /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(import_primitives146.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(import_primitives146.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" }) });
// packages/icons/build-module/library/term-count.mjs
var import_primitives147 = __toESM(require_primitives(), 1);
var import_jsx_runtime148 = __toESM(require_jsx_runtime(), 1);
var term_count_default = /* @__PURE__ */ (0, import_jsx_runtime148.jsxs)(import_primitives147.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [
/* @__PURE__ */ (0, import_jsx_runtime148.jsx)(import_primitives147.Path, { d: "M 12.841306,16.677917 12.001264,12.71529 Q 11.835801,11.930402 11.695793,11.417042 11.560029,10.89944 11.398809,10.568514 11.237588,10.237588 11,10 10.635133,9.6351329 10.219354,9.6351329 9.8078183,9.6308902 9.4387086,10 8.9932313,10.445477 8.8574668,11.022476 8.7259449,11.595233 8.7259449,12.155262 L 7.4955791,11.196425 Q 7.5719467,10.509117 7.8307477,9.9109045 8.0937915,9.3084495 8.6410921,8.7611489 9.1799075,8.2223335 9.7569066,8.086569 q 0.5812414,-0.1400071 1.1242994,0.046669 0.543058,0.1866762 0.975808,0.6194255 0.335168,0.3351686 0.581242,0.767918 0.24183,0.4285067 0.436992,1.0564174 0.195161,0.619426 0.381837,1.527351 l 0.364867,1.756453 1.883733,-1.883732 1.018234,1.018233 z" }),
/* @__PURE__ */ (0, import_jsx_runtime148.jsx)(import_primitives147.Path, { d: "M12.574 4a.75.75 0 0 1 .53.22l6.723 6.724a2.315 2.315 0 0 1 0 3.264l-.532-.528.531.53-5.61 5.611a2.31 2.31 0 0 1-3.276.001l-6.72-6.716a.75.75 0 0 1-.22-.53V4.75A.75.75 0 0 1 4.75 4h7.824ZM5.5 5.5v6.764l6.501 6.497a.817.817 0 0 0 .889.178.816.816 0 0 0 .264-.178l5.61-5.61a.816.816 0 0 0-.001-1.149l-6.5-6.502H5.5Z" })
] });
// packages/icons/build-module/library/term-description.mjs
var import_primitives148 = __toESM(require_primitives(), 1);
var import_jsx_runtime149 = __toESM(require_jsx_runtime(), 1);
var term_description_default = /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(import_primitives148.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(import_primitives148.Path, { d: "M6.08 10.103h2.914L9.657 12h1.417L8.23 4H6.846L4 12h1.417l.663-1.897Zm1.463-4.137.994 2.857h-2l1.006-2.857ZM11 16H4v-1.5h7V16Zm1 0h8v-1.5h-8V16Zm-4 4H4v-1.5h4V20Zm7-1.5V20H9v-1.5h6Z" }) });
// packages/icons/build-module/library/term-name.mjs
var import_primitives149 = __toESM(require_primitives(), 1);
var import_jsx_runtime150 = __toESM(require_jsx_runtime(), 1);
var term_name_default = /* @__PURE__ */ (0, import_jsx_runtime150.jsxs)(import_primitives149.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [
/* @__PURE__ */ (0, import_jsx_runtime150.jsx)(import_primitives149.Path, { d: "m14.95 13.889-1.061 1.061-5.552-5.553 1.06-1.06 5.552 5.552Z" }),
/* @__PURE__ */ (0, import_jsx_runtime150.jsx)(import_primitives149.Path, { d: "M12.574 4a.75.75 0 0 1 .53.22l6.723 6.724a2.315 2.315 0 0 1 0 3.264l-.532-.528.531.53-5.61 5.611a2.31 2.31 0 0 1-3.276.001l-6.72-6.716a.75.75 0 0 1-.22-.53V4.75A.75.75 0 0 1 4.75 4h7.824ZM5.5 5.5v6.764l6.501 6.497a.817.817 0 0 0 .889.178.816.816 0 0 0 .264-.178l5.61-5.61a.816.816 0 0 0-.001-1.149l-6.5-6.502H5.5Z" })
] });
// packages/icons/build-module/library/time-to-read.mjs
var import_primitives150 = __toESM(require_primitives(), 1);
var import_jsx_runtime151 = __toESM(require_jsx_runtime(), 1);
var time_to_read_default = /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(import_primitives150.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(import_primitives150.Path, { d: "M12 3c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16.5c-4.1 0-7.5-3.4-7.5-7.5S7.9 4.5 12 4.5s7.5 3.4 7.5 7.5-3.4 7.5-7.5 7.5zM12 7l-1 5c0 .3.2.6.4.8l4.2 2.8-2.7-4.1L12 7z" }) });
// packages/icons/build-module/library/title.mjs
var import_primitives151 = __toESM(require_primitives(), 1);
var import_jsx_runtime152 = __toESM(require_jsx_runtime(), 1);
var title_default = /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(import_primitives151.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(import_primitives151.Path, { d: "m4 5.5h2v6.5h1.5v-6.5h2v-1.5h-5.5zm16 10.5h-16v-1.5h16zm-7 4h-9v-1.5h9z" }) });
// packages/icons/build-module/library/upload.mjs
var import_primitives152 = __toESM(require_primitives(), 1);
var import_jsx_runtime153 = __toESM(require_jsx_runtime(), 1);
var upload_default = /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(import_primitives152.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(import_primitives152.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" }) });
// packages/icons/build-module/library/verse.mjs
var import_primitives153 = __toESM(require_primitives(), 1);
var import_jsx_runtime154 = __toESM(require_jsx_runtime(), 1);
var verse_default = /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(import_primitives153.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(import_primitives153.Path, { d: "M17.8 2l-.9.3c-.1 0-3.6 1-5.2 2.1C10 5.5 9.3 6.5 8.9 7.1c-.6.9-1.7 4.7-1.7 6.3l-.9 2.3c-.2.4 0 .8.4 1 .1 0 .2.1.3.1.3 0 .6-.2.7-.5l.6-1.5c.3 0 .7-.1 1.2-.2.7-.1 1.4-.3 2.2-.5.8-.2 1.6-.5 2.4-.8.7-.3 1.4-.7 1.9-1.2s.8-1.2 1-1.9c.2-.7.3-1.6.4-2.4.1-.8.1-1.7.2-2.5 0-.8.1-1.5.2-2.1V2zm-1.9 5.6c-.1.8-.2 1.5-.3 2.1-.2.6-.4 1-.6 1.3-.3.3-.8.6-1.4.9-.7.3-1.4.5-2.2.8-.6.2-1.3.3-1.8.4L15 7.5c.3-.3.6-.7 1-1.1 0 .4 0 .8-.1 1.2zM6 20h8v-1.5H6V20z" }) });
// packages/icons/build-module/library/video.mjs
var import_primitives154 = __toESM(require_primitives(), 1);
var import_jsx_runtime155 = __toESM(require_jsx_runtime(), 1);
var video_default = /* @__PURE__ */ (0, import_jsx_runtime155.jsx)(import_primitives154.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime155.jsx)(import_primitives154.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-.8h13.4c.4 0 .8.4.8.8v13.4zM10 15l5-3-5-3v6z" }) });
// packages/icons/build-module/library/word-count.mjs
var import_primitives155 = __toESM(require_primitives(), 1);
var import_jsx_runtime156 = __toESM(require_jsx_runtime(), 1);
var word_count_default = /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(import_primitives155.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(import_primitives155.Path, { d: "M19 5c1.1 0 2 .9 2 2v10c0 1.1-.9 2-2 2H5c-1.1 0-2-.9-2-2V7c0-1.1.9-2 2-2zM5 6.5c-.3 0-.5.2-.5.5v10c0 .3.2.5.5.5h14c.3 0 .5-.2.5-.5V7c0-.3-.2-.5-.5-.5zM14.734 9q.714 0 1.15.253.437.247.639.84.2.591.2 1.61v1.15q0 .402.036.667.04.258.172.39.138.127.437.127h.104l-.162.828h-.08q-.5 0-.776-.097a.9.9 0 0 1-.414-.283 2 2 0 0 1-.259-.448q-.316.367-.748.598-.43.23-.977.23-.524 0-.914-.213a1.56 1.56 0 0 1-.61-.58 1.65 1.65 0 0 1-.213-.84q0-.477.207-.817.213-.345.564-.568.357-.23.794-.363.437-.139.902-.196.471-.062.902-.068 0-.805-.315-1.053-.316-.247-.915-.247-.316 0-.678.098-.356.097-.805.408l-.15-.84a2.8 2.8 0 0 1 .846-.419A3.4 3.4 0 0 1 14.734 9m-5.877 1.669H9.86l.59-1.531h.689l-.585 1.53h.898l-.249.727h-.922l-.337.866h1.019l-.354.773h-.962l-.681 1.804h-.701l.69-1.804h-.999l-.693 1.804h-.69l.685-1.804H6.3l.34-.773h.915l.333-.866h-.994l.244-.726H8.16l.594-1.531h.693zm6.832 1.264q-.823.029-1.335.16-.506.133-.74.397-.236.265-.236.685 0 .454.241.66.248.202.632.202.414 0 .8-.207.39-.207.637-.552zm-7.441.328h1l.34-.866h-1z" }) });
// packages/block-library/build-module/accordion/edit.mjs
var import_block_editor2 = __toESM(require_block_editor(), 1);
var import_i18n = __toESM(require_i18n(), 1);
var import_components = __toESM(require_components(), 1);
var import_data2 = __toESM(require_data(), 1);
var import_blocks = __toESM(require_blocks(), 1);
// packages/block-library/build-module/utils/hooks.mjs
var import_data = __toESM(require_data(), 1);
var import_element2 = __toESM(require_element(), 1);
var import_blob = __toESM(require_blob(), 1);
var import_block_editor = __toESM(require_block_editor(), 1);
var import_core_data = __toESM(require_core_data(), 1);
var import_compose = __toESM(require_compose(), 1);
function useCanEditEntity(kind, name123, recordId) {
return (0, import_data.useSelect)(
(select9) => select9(import_core_data.store).canUser("update", {
kind,
name: name123,
id: recordId
}),
[kind, name123, recordId]
);
}
function useUploadMediaFromBlobURL(args = {}) {
const latestArgsRef = (0, import_element2.useRef)(args);
const hasUploadStartedRef = (0, import_element2.useRef)(false);
const { getSettings: getSettings2 } = (0, import_data.useSelect)(import_block_editor.store);
(0, import_element2.useLayoutEffect)(() => {
latestArgsRef.current = args;
});
(0, import_element2.useEffect)(() => {
if (hasUploadStartedRef.current) {
return;
}
if (!latestArgsRef.current.url || !(0, import_blob.isBlobURL)(latestArgsRef.current.url)) {
return;
}
const file = (0, import_blob.getBlobByURL)(latestArgsRef.current.url);
if (!file) {
return;
}
const { url, allowedTypes, onChange, onError } = latestArgsRef.current;
const { mediaUpload } = getSettings2();
if (!mediaUpload) {
return;
}
hasUploadStartedRef.current = true;
mediaUpload({
filesList: [file],
allowedTypes,
onFileChange: ([media]) => {
if ((0, import_blob.isBlobURL)(media?.url)) {
return;
}
(0, import_blob.revokeBlobURL)(url);
onChange(media);
hasUploadStartedRef.current = false;
},
onError: (message) => {
(0, import_blob.revokeBlobURL)(url);
onError(message);
hasUploadStartedRef.current = false;
}
});
}, [getSettings2]);
}
function useDefaultAvatar() {
const avatarURL = (0, import_data.useSelect)((select9) => {
const { getSettings: getSettings2 } = select9(import_block_editor.store);
const { __experimentalDiscussionSettings } = getSettings2();
return __experimentalDiscussionSettings?.avatarURL ?? "";
}, []);
return avatarURL;
}
function useToolsPanelDropdownMenuProps() {
const isMobile = (0, import_compose.useViewportMatch)("medium", "<");
return !isMobile ? {
popoverProps: {
placement: "left-start",
// For non-mobile, inner sidebar width (248px) - button width (24px) - border (1px) + padding (16px) + spacing (20px)
offset: 259
}
} : {};
}
// packages/block-library/build-module/accordion/edit.mjs
var import_jsx_runtime157 = __toESM(require_jsx_runtime(), 1);
var ACCORDION_BLOCK_NAME = "core/accordion-item";
var ACCORDION_HEADING_BLOCK_NAME = "core/accordion-heading";
var ACCORDION_BLOCK = {
name: ACCORDION_BLOCK_NAME
};
function Edit({
attributes: {
autoclose,
iconPosition,
showIcon,
headingLevel,
levelOptions
},
clientId,
setAttributes,
isSelected: isSingleSelected
}) {
const registry = (0, import_data2.useRegistry)();
const { getBlockOrder } = (0, import_data2.useSelect)(import_block_editor2.store);
const blockProps = (0, import_block_editor2.useBlockProps)({
role: "group"
});
const dropdownMenuProps = useToolsPanelDropdownMenuProps();
const { updateBlockAttributes, insertBlock } = (0, import_data2.useDispatch)(import_block_editor2.store);
const blockEditingMode = (0, import_block_editor2.useBlockEditingMode)();
const isContentOnlyMode = blockEditingMode === "contentOnly";
const innerBlocksProps = (0, import_block_editor2.useInnerBlocksProps)(blockProps, {
template: [[ACCORDION_BLOCK_NAME]],
defaultBlock: ACCORDION_BLOCK,
directInsert: true,
templateInsertUpdatesSelection: true
});
const addAccordionItemBlock = () => {
const newAccordionItem = (0, import_blocks.createBlock)(ACCORDION_BLOCK_NAME, {}, [
(0, import_blocks.createBlock)(ACCORDION_HEADING_BLOCK_NAME, {
level: headingLevel
}),
(0, import_blocks.createBlock)("core/accordion-panel", {})
]);
insertBlock(newAccordionItem, void 0, clientId);
};
const updateHeadingLevel = (newHeadingLevel) => {
const innerBlockClientIds = getBlockOrder(clientId);
const accordionHeaderClientIds = [];
innerBlockClientIds.forEach((contentClientId) => {
const headerClientIds = getBlockOrder(contentClientId);
accordionHeaderClientIds.push(...headerClientIds);
});
registry.batch(() => {
setAttributes({ headingLevel: newHeadingLevel });
updateBlockAttributes(accordionHeaderClientIds, {
level: newHeadingLevel
});
});
};
return /* @__PURE__ */ (0, import_jsx_runtime157.jsxs)(import_jsx_runtime157.Fragment, { children: [
isSingleSelected && !isContentOnlyMode && /* @__PURE__ */ (0, import_jsx_runtime157.jsxs)(import_jsx_runtime157.Fragment, { children: [
/* @__PURE__ */ (0, import_jsx_runtime157.jsx)(import_block_editor2.BlockControls, { children: /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(import_components.ToolbarGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(
import_block_editor2.HeadingLevelDropdown,
{
value: headingLevel,
options: levelOptions,
onChange: updateHeadingLevel
}
) }) }),
/* @__PURE__ */ (0, import_jsx_runtime157.jsx)(import_block_editor2.BlockControls, { group: "other", children: /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(import_components.ToolbarButton, { onClick: addAccordionItemBlock, children: (0, import_i18n.__)("Add item") }) })
] }),
/* @__PURE__ */ (0, import_jsx_runtime157.jsx)(import_block_editor2.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime157.jsxs)(
import_components.__experimentalToolsPanel,
{
label: (0, import_i18n.__)("Settings"),
resetAll: () => {
setAttributes({
autoclose: false,
showIcon: true,
iconPosition: "right"
});
},
dropdownMenuProps,
children: [
/* @__PURE__ */ (0, import_jsx_runtime157.jsx)(
import_components.__experimentalToolsPanelItem,
{
label: (0, import_i18n.__)("Auto-close"),
isShownByDefault: true,
hasValue: () => !!autoclose,
onDeselect: () => setAttributes({ autoclose: false }),
children: /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(
import_components.ToggleControl,
{
isBlock: true,
label: (0, import_i18n.__)("Auto-close"),
onChange: (value) => {
setAttributes({
autoclose: value
});
},
checked: autoclose,
help: (0, import_i18n.__)(
"Automatically close accordions when a new one is opened."
)
}
)
}
),
/* @__PURE__ */ (0, import_jsx_runtime157.jsx)(
import_components.__experimentalToolsPanelItem,
{
label: (0, import_i18n.__)("Show icon"),
isShownByDefault: true,
hasValue: () => !showIcon,
onDeselect: () => setAttributes({ showIcon: true }),
children: /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(
import_components.ToggleControl,
{
isBlock: true,
label: (0, import_i18n.__)("Show icon"),
onChange: (value) => {
setAttributes({
showIcon: value,
iconPosition: value ? iconPosition : "right"
});
},
checked: showIcon,
help: (0, import_i18n.__)(
"Display a plus icon next to the accordion header."
)
}
)
}
),
showIcon && /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(
import_components.__experimentalToolsPanelItem,
{
label: (0, import_i18n.__)("Icon Position"),
isShownByDefault: true,
hasValue: () => iconPosition !== "right",
onDeselect: () => setAttributes({ iconPosition: "right" }),
children: /* @__PURE__ */ (0, import_jsx_runtime157.jsxs)(
import_components.__experimentalToggleGroupControl,
{
__next40pxDefaultSize: true,
isBlock: true,
label: (0, import_i18n.__)("Icon Position"),
value: iconPosition,
onChange: (value) => {
setAttributes({ iconPosition: value });
},
children: [
/* @__PURE__ */ (0, import_jsx_runtime157.jsx)(
import_components.__experimentalToggleGroupControlOption,
{
label: (0, import_i18n.__)("Left"),
value: "left"
}
),
/* @__PURE__ */ (0, import_jsx_runtime157.jsx)(
import_components.__experimentalToggleGroupControlOption,
{
label: (0, import_i18n.__)("Right"),
value: "right"
}
)
]
}
)
}
)
]
}
) }, "setting"),
/* @__PURE__ */ (0, import_jsx_runtime157.jsx)("div", { ...innerBlocksProps })
] });
}
// packages/block-library/build-module/accordion/save.mjs
var import_block_editor3 = __toESM(require_block_editor(), 1);
var import_jsx_runtime158 = __toESM(require_jsx_runtime(), 1);
function save() {
const blockProps = import_block_editor3.useBlockProps.save({
role: "group"
});
return /* @__PURE__ */ (0, import_jsx_runtime158.jsx)("div", { ...import_block_editor3.useInnerBlocksProps.save(blockProps) });
}
// packages/block-library/build-module/accordion/block.json
var block_default = {
$schema: "https://schemas.wp.org/trunk/block.json",
apiVersion: 3,
name: "core/accordion",
title: "Accordion",
category: "design",
description: "Displays a foldable layout that groups content in collapsible sections.",
example: {},
supports: {
anchor: true,
html: false,
align: ["wide", "full"],
background: {
backgroundImage: true,
backgroundSize: true,
__experimentalDefaultControls: {
backgroundImage: true
}
},
color: {
background: true,
gradients: true
},
__experimentalBorder: {
color: true,
radius: true,
style: true,
width: true,
__experimentalDefaultControls: {
color: true,
radius: true,
style: true,
width: true
}
},
spacing: {
padding: true,
margin: ["top", "bottom"],
blockGap: true
},
shadow: true,
layout: true,
ariaLabel: true,
interactivity: true,
typography: {
fontSize: true,
lineHeight: true,
__experimentalFontFamily: true,
__experimentalFontWeight: true,
__experimentalFontStyle: true,
__experimentalTextTransform: true,
__experimentalTextDecoration: true,
__experimentalLetterSpacing: true,
__experimentalDefaultControls: {
fontSize: true
}
},
contentRole: true,
listView: true
},
attributes: {
iconPosition: {
type: "string",
default: "right"
},
showIcon: {
type: "boolean",
default: true
},
autoclose: {
type: "boolean",
default: false
},
headingLevel: {
type: "number",
default: 3
},
levelOptions: {
type: "array"
}
},
providesContext: {
"core/accordion-icon-position": "iconPosition",
"core/accordion-show-icon": "showIcon",
"core/accordion-heading-level": "headingLevel"
},
allowedBlocks: ["core/accordion-item"],
textdomain: "default",
viewScriptModule: "@wordpress/block-library/accordion/view"
};
// packages/block-library/build-module/utils/init-block.mjs
var import_blocks2 = __toESM(require_blocks(), 1);
function initBlock(block) {
if (!block) {
return;
}
const { metadata, settings: settings122, name: name123 } = block;
return (0, import_blocks2.registerBlockType)({ name: name123, ...metadata }, settings122);
}
// packages/block-library/build-module/accordion/index.mjs
var { name } = block_default;
var settings = {
icon: accordion_default,
example: {
innerBlocks: [
{
name: "core/accordion-item",
innerBlocks: [
{
name: "core/accordion-heading",
attributes: {
title: (0, import_i18n2.__)(
"Lorem ipsum dolor sit amet, consectetur."
)
}
}
]
},
{
name: "core/accordion-item",
innerBlocks: [
{
name: "core/accordion-heading",
attributes: {
title: (0, import_i18n2.__)(
"Suspendisse commodo lacus, interdum et."
)
}
}
]
}
]
},
edit: Edit,
save
};
var init = () => initBlock({ name, metadata: block_default, settings });
// packages/block-library/build-module/accordion-item/index.mjs
var accordion_item_exports = {};
__export(accordion_item_exports, {
init: () => init2,
metadata: () => block_default2,
name: () => name2,
settings: () => settings2
});
// packages/block-library/build-module/accordion-item/edit.mjs
var import_i18n3 = __toESM(require_i18n(), 1);
var import_block_editor4 = __toESM(require_block_editor(), 1);
var import_data3 = __toESM(require_data(), 1);
var import_components2 = __toESM(require_components(), 1);
var import_jsx_runtime159 = __toESM(require_jsx_runtime(), 1);
var TEMPLATE = [["core/accordion-heading"], ["core/accordion-panel"]];
function Edit2({
attributes: attributes2,
clientId,
setAttributes,
isSelected: isSingleSelected
}) {
const { openByDefault } = attributes2;
const dropdownMenuProps = useToolsPanelDropdownMenuProps();
const { isSelected } = (0, import_data3.useSelect)(
(select9) => {
if (isSingleSelected || openByDefault) {
return { isSelected: true };
}
return {
isSelected: select9(import_block_editor4.store).hasSelectedInnerBlock(
clientId,
true
)
};
},
[clientId, isSingleSelected, openByDefault]
);
const blockProps = (0, import_block_editor4.useBlockProps)({
className: clsx_default({
"is-open": openByDefault || isSelected
})
});
const innerBlocksProps = (0, import_block_editor4.useInnerBlocksProps)(blockProps, {
template: TEMPLATE,
templateLock: "all",
directInsert: true,
templateInsertUpdatesSelection: true
});
return /* @__PURE__ */ (0, import_jsx_runtime159.jsxs)(import_jsx_runtime159.Fragment, { children: [
/* @__PURE__ */ (0, import_jsx_runtime159.jsx)(import_block_editor4.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime159.jsx)(
import_components2.__experimentalToolsPanel,
{
label: (0, import_i18n3.__)("Settings"),
resetAll: () => {
setAttributes({ openByDefault: false });
},
dropdownMenuProps,
children: /* @__PURE__ */ (0, import_jsx_runtime159.jsx)(
import_components2.__experimentalToolsPanelItem,
{
label: (0, import_i18n3.__)("Open by default"),
isShownByDefault: true,
hasValue: () => !!openByDefault,
onDeselect: () => {
setAttributes({ openByDefault: false });
},
children: /* @__PURE__ */ (0, import_jsx_runtime159.jsx)(
import_components2.ToggleControl,
{
label: (0, import_i18n3.__)("Open by default"),
onChange: (value) => {
setAttributes({
openByDefault: value
});
},
checked: openByDefault,
help: (0, import_i18n3.__)(
"Accordion content will be displayed by default."
)
}
)
}
)
}
) }, "setting"),
/* @__PURE__ */ (0, import_jsx_runtime159.jsx)("div", { ...innerBlocksProps })
] });
}
// packages/block-library/build-module/accordion-item/save.mjs
var import_block_editor5 = __toESM(require_block_editor(), 1);
var import_jsx_runtime160 = __toESM(require_jsx_runtime(), 1);
function save2({ attributes: attributes2 }) {
const { openByDefault } = attributes2;
const blockProps = import_block_editor5.useBlockProps.save({
className: clsx_default({
"is-open": openByDefault
})
});
const innerBlocksProps = import_block_editor5.useInnerBlocksProps.save(blockProps);
return /* @__PURE__ */ (0, import_jsx_runtime160.jsx)("div", { ...innerBlocksProps });
}
// packages/block-library/build-module/accordion-item/block.json
var block_default2 = {
$schema: "https://schemas.wp.org/trunk/block.json",
apiVersion: 3,
name: "core/accordion-item",
title: "Accordion Item",
category: "design",
description: "Wraps the heading and panel in one unit.",
parent: ["core/accordion"],
allowedBlocks: ["core/accordion-heading", "core/accordion-panel"],
supports: {
html: false,
color: {
background: true,
gradients: true
},
interactivity: true,
spacing: {
margin: ["top", "bottom"],
blockGap: true
},
__experimentalBorder: {
color: true,
radius: true,
style: true,
width: true,
__experimentalDefaultControls: {
color: true,
radius: true,
style: true,
width: true
}
},
shadow: true,
layout: {
allowEditing: false
},
typography: {
fontSize: true,
lineHeight: true,
__experimentalFontFamily: true,
__experimentalFontWeight: true,
__experimentalFontStyle: true,
__experimentalTextTransform: true,
__experimentalTextDecoration: true,
__experimentalLetterSpacing: true,
__experimentalDefaultControls: {
fontSize: true
}
},
contentRole: true
},
attributes: {
openByDefault: {
type: "boolean",
default: false
}
},
providesContext: {
"core/accordion-open-by-default": "openByDefault"
},
textdomain: "default",
style: "wp-block-accordion-item"
};
// packages/block-library/build-module/accordion-item/index.mjs
var { name: name2 } = block_default2;
var settings2 = {
icon: accordion_item_default,
edit: Edit2,
save: save2
};
var init2 = () => initBlock({ name: name2, metadata: block_default2, settings: settings2 });
// packages/block-library/build-module/accordion-heading/index.mjs
var accordion_heading_exports = {};
__export(accordion_heading_exports, {
init: () => init3,
metadata: () => block_default3,
name: () => name3,
settings: () => settings3
});
// packages/block-library/build-module/accordion-heading/edit.mjs
var import_i18n4 = __toESM(require_i18n(), 1);
var import_element3 = __toESM(require_element(), 1);
var import_block_editor6 = __toESM(require_block_editor(), 1);
var import_data4 = __toESM(require_data(), 1);
var import_jsx_runtime161 = __toESM(require_jsx_runtime(), 1);
function Edit3({ attributes: attributes2, setAttributes, context }) {
const { title } = attributes2;
const {
"core/accordion-icon-position": iconPosition,
"core/accordion-show-icon": showIcon,
"core/accordion-heading-level": headingLevel
} = context;
const TagName2 = "h" + headingLevel;
const { __unstableMarkNextChangeAsNotPersistent } = (0, import_data4.useDispatch)(import_block_editor6.store);
(0, import_element3.useEffect)(() => {
if (iconPosition !== void 0 && showIcon !== void 0) {
__unstableMarkNextChangeAsNotPersistent();
setAttributes({
iconPosition,
showIcon
});
}
}, [
iconPosition,
showIcon,
setAttributes,
__unstableMarkNextChangeAsNotPersistent
]);
const [fluidTypographySettings, layout] = (0, import_block_editor6.useSettings)(
"typography.fluid",
"layout"
);
const typographyProps = (0, import_block_editor6.getTypographyClassesAndStyles)(attributes2, {
typography: {
fluid: fluidTypographySettings
},
layout: {
wideSize: layout?.wideSize
}
});
const blockProps = (0, import_block_editor6.useBlockProps)();
const spacingProps = (0, import_block_editor6.__experimentalGetSpacingClassesAndStyles)(attributes2);
return /* @__PURE__ */ (0, import_jsx_runtime161.jsx)(TagName2, { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime161.jsxs)(
"button",
{
className: "wp-block-accordion-heading__toggle",
style: spacingProps.style,
tabIndex: "-1",
children: [
showIcon && iconPosition === "left" && /* @__PURE__ */ (0, import_jsx_runtime161.jsx)(
"span",
{
className: "wp-block-accordion-heading__toggle-icon",
"aria-hidden": "true",
children: "+"
}
),
/* @__PURE__ */ (0, import_jsx_runtime161.jsx)(
import_block_editor6.RichText,
{
withoutInteractiveFormatting: true,
disableLineBreaks: true,
tagName: "span",
value: title,
onChange: (newTitle) => setAttributes({ title: newTitle }),
placeholder: (0, import_i18n4.__)("Accordion title"),
className: "wp-block-accordion-heading__toggle-title",
style: {
letterSpacing: typographyProps.style.letterSpacing,
textDecoration: typographyProps.style.textDecoration
}
}
),
showIcon && iconPosition === "right" && /* @__PURE__ */ (0, import_jsx_runtime161.jsx)(
"span",
{
className: "wp-block-accordion-heading__toggle-icon",
"aria-hidden": "true",
children: "+"
}
)
]
}
) });
}
// packages/block-library/build-module/accordion-heading/save.mjs
var import_block_editor7 = __toESM(require_block_editor(), 1);
var import_jsx_runtime162 = __toESM(require_jsx_runtime(), 1);
function save3({ attributes: attributes2 }) {
const { level, title, iconPosition, showIcon } = attributes2;
const TagName2 = "h" + (level || 3);
const typographyProps = (0, import_block_editor7.getTypographyClassesAndStyles)(attributes2);
const blockProps = import_block_editor7.useBlockProps.save();
const spacingProps = (0, import_block_editor7.__experimentalGetSpacingClassesAndStyles)(attributes2);
return /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(TagName2, { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime162.jsxs)(
"button",
{
type: "button",
className: "wp-block-accordion-heading__toggle",
style: spacingProps.style,
children: [
showIcon && iconPosition === "left" && /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(
"span",
{
className: "wp-block-accordion-heading__toggle-icon",
"aria-hidden": "true",
children: "+"
}
),
/* @__PURE__ */ (0, import_jsx_runtime162.jsx)(
import_block_editor7.RichText.Content,
{
className: "wp-block-accordion-heading__toggle-title",
tagName: "span",
value: title,
style: {
letterSpacing: typographyProps.style.letterSpacing,
textDecoration: typographyProps.style.textDecoration
}
}
),
showIcon && iconPosition === "right" && /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(
"span",
{
className: "wp-block-accordion-heading__toggle-icon",
"aria-hidden": "true",
children: "+"
}
)
]
}
) });
}
// packages/block-library/build-module/accordion-heading/block.json
var block_default3 = {
$schema: "https://schemas.wp.org/trunk/block.json",
apiVersion: 3,
name: "core/accordion-heading",
title: "Accordion Heading",
category: "design",
description: "Displays a heading that toggles the accordion panel.",
parent: ["core/accordion-item"],
usesContext: [
"core/accordion-icon-position",
"core/accordion-show-icon",
"core/accordion-heading-level"
],
supports: {
anchor: true,
color: {
background: true,
gradients: true
},
align: false,
interactivity: true,
spacing: {
padding: true,
__experimentalDefaultControls: {
padding: true
},
__experimentalSkipSerialization: true,
__experimentalSelector: ".wp-block-accordion-heading__toggle"
},
__experimentalBorder: {
color: true,
radius: true,
style: true,
width: true,
__experimentalDefaultControls: {
color: true,
radius: true,
style: true,
width: true
}
},
typography: {
__experimentalSkipSerialization: [
"textDecoration",
"letterSpacing"
],
fontSize: true,
__experimentalFontFamily: true,
__experimentalFontWeight: true,
__experimentalFontStyle: true,
__experimentalTextTransform: true,
__experimentalTextDecoration: true,
__experimentalLetterSpacing: true,
__experimentalDefaultControls: {
fontSize: true,
fontFamily: true
}
},
shadow: true,
visibility: false,
lock: false
},
selectors: {
typography: {
letterSpacing: ".wp-block-accordion-heading .wp-block-accordion-heading__toggle-title",
textDecoration: ".wp-block-accordion-heading .wp-block-accordion-heading__toggle-title"
}
},
attributes: {
openByDefault: {
type: "boolean",
default: false
},
title: {
type: "rich-text",
source: "rich-text",
selector: ".wp-block-accordion-heading__toggle-title",
role: "content"
},
level: {
type: "number"
},
iconPosition: {
type: "string",
enum: ["left", "right"],
default: "right"
},
showIcon: {
type: "boolean",
default: true
}
},
textdomain: "default"
};
// packages/block-library/build-module/accordion-heading/deprecated.mjs
var import_block_editor8 = __toESM(require_block_editor(), 1);
var import_jsx_runtime163 = __toESM(require_jsx_runtime(), 1);
var v1 = {
attributes: {
openByDefault: {
type: "boolean",
default: false
},
title: {
type: "rich-text",
source: "rich-text",
selector: ".wp-block-accordion-heading__toggle-title",
role: "content"
},
level: {
type: "number"
},
iconPosition: {
type: "string",
enum: ["left", "right"],
default: "right"
},
showIcon: {
type: "boolean",
default: true
}
},
supports: {
anchor: true,
color: {
background: true,
gradients: true
},
align: false,
interactivity: true,
spacing: {
padding: true,
__experimentalDefaultControls: {
padding: true
},
__experimentalSkipSerialization: true,
__experimentalSelector: ".wp-block-accordion-heading__toggle"
},
__experimentalBorder: {
color: true,
radius: true,
style: true,
width: true,
__experimentalDefaultControls: {
color: true,
radius: true,
style: true,
width: true
}
},
typography: {
fontSize: true,
__experimentalFontFamily: true,
__experimentalFontWeight: true,
__experimentalFontStyle: true,
__experimentalTextTransform: true,
__experimentalTextDecoration: true,
__experimentalLetterSpacing: true,
__experimentalDefaultControls: {
fontSize: true,
fontFamily: true
}
},
shadow: true,
visibility: false
},
save({ attributes: attributes2 }) {
const { level, title, iconPosition, showIcon } = attributes2;
const TagName2 = "h" + (level || 3);
const blockProps = import_block_editor8.useBlockProps.save();
const spacingProps = (0, import_block_editor8.__experimentalGetSpacingClassesAndStyles)(attributes2);
return /* @__PURE__ */ (0, import_jsx_runtime163.jsx)(TagName2, { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime163.jsxs)(
"button",
{
className: "wp-block-accordion-heading__toggle",
style: spacingProps.style,
children: [
showIcon && iconPosition === "left" && /* @__PURE__ */ (0, import_jsx_runtime163.jsx)(
"span",
{
className: "wp-block-accordion-heading__toggle-icon",
"aria-hidden": "true",
children: "+"
}
),
/* @__PURE__ */ (0, import_jsx_runtime163.jsx)(
import_block_editor8.RichText.Content,
{
className: "wp-block-accordion-heading__toggle-title",
tagName: "span",
value: title
}
),
showIcon && iconPosition === "right" && /* @__PURE__ */ (0, import_jsx_runtime163.jsx)(
"span",
{
className: "wp-block-accordion-heading__toggle-icon",
"aria-hidden": "true",
children: "+"
}
)
]
}
) });
}
};
var v2 = {
attributes: {
openByDefault: {
type: "boolean",
default: false
},
title: {
type: "rich-text",
source: "rich-text",
selector: ".wp-block-accordion-heading__toggle-title",
role: "content"
},
level: {
type: "number"
},
iconPosition: {
type: "string",
enum: ["left", "right"],
default: "right"
},
showIcon: {
type: "boolean",
default: true
}
},
supports: {
anchor: true,
color: {
background: true,
gradients: true
},
align: false,
interactivity: true,
spacing: {
padding: true,
__experimentalDefaultControls: {
padding: true
},
__experimentalSkipSerialization: true,
__experimentalSelector: ".wp-block-accordion-heading__toggle"
},
__experimentalBorder: {
color: true,
radius: true,
style: true,
width: true,
__experimentalDefaultControls: {
color: true,
radius: true,
style: true,
width: true
}
},
typography: {
__experimentalSkipSerialization: [
"textDecoration",
"letterSpacing"
],
fontSize: true,
__experimentalFontFamily: true,
__experimentalFontWeight: true,
__experimentalFontStyle: true,
__experimentalTextTransform: true,
__experimentalTextDecoration: true,
__experimentalLetterSpacing: true,
__experimentalDefaultControls: {
fontSize: true,
fontFamily: true
}
},
shadow: true,
visibility: false,
lock: false
},
save({ attributes: attributes2 }) {
const { level, title, iconPosition, showIcon } = attributes2;
const TagName2 = "h" + (level || 3);
const typographyProps = (0, import_block_editor8.getTypographyClassesAndStyles)(attributes2);
const blockProps = import_block_editor8.useBlockProps.save();
const spacingProps = (0, import_block_editor8.__experimentalGetSpacingClassesAndStyles)(attributes2);
return /* @__PURE__ */ (0, import_jsx_runtime163.jsx)(TagName2, { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime163.jsxs)(
"button",
{
className: "wp-block-accordion-heading__toggle",
style: spacingProps.style,
children: [
showIcon && iconPosition === "left" && /* @__PURE__ */ (0, import_jsx_runtime163.jsx)(
"span",
{
className: "wp-block-accordion-heading__toggle-icon",
"aria-hidden": "true",
children: "+"
}
),
/* @__PURE__ */ (0, import_jsx_runtime163.jsx)(
import_block_editor8.RichText.Content,
{
className: "wp-block-accordion-heading__toggle-title",
tagName: "span",
value: title,
style: {
letterSpacing: typographyProps.style.letterSpacing,
textDecoration: typographyProps.style.textDecoration
}
}
),
showIcon && iconPosition === "right" && /* @__PURE__ */ (0, import_jsx_runtime163.jsx)(
"span",
{
className: "wp-block-accordion-heading__toggle-icon",
"aria-hidden": "true",
children: "+"
}
)
]
}
) });
}
};
var deprecated_default = [v1, v2];
// packages/block-library/build-module/accordion-heading/index.mjs
var { name: name3 } = block_default3;
var settings3 = {
icon: accordion_heading_default,
edit: Edit3,
save: save3,
deprecated: deprecated_default
};
var init3 = () => initBlock({ name: name3, metadata: block_default3, settings: settings3 });
// packages/block-library/build-module/accordion-panel/index.mjs
var accordion_panel_exports = {};
__export(accordion_panel_exports, {
init: () => init4,
metadata: () => block_default4,
name: () => name4,
settings: () => settings4
});
// packages/block-library/build-module/accordion-panel/edit.mjs
var import_block_editor9 = __toESM(require_block_editor(), 1);
var import_data5 = __toESM(require_data(), 1);
var import_jsx_runtime164 = __toESM(require_jsx_runtime(), 1);
function Edit4({ attributes: attributes2, context, clientId, isSelected }) {
const { allowedBlocks, templateLock } = attributes2;
const openByDefault = context["core/accordion-open-by-default"];
const { hasSelection } = (0, import_data5.useSelect)(
(select9) => {
if (isSelected || openByDefault) {
return { hasSelection: true };
}
const {
getBlockRootClientId,
isBlockSelected,
hasSelectedInnerBlock
} = select9(import_block_editor9.store);
const rootClientId = getBlockRootClientId(clientId);
return {
hasSelection: isBlockSelected(rootClientId) || hasSelectedInnerBlock(rootClientId, true)
};
},
[clientId, isSelected, openByDefault]
);
const blockProps = (0, import_block_editor9.useBlockProps)({
"aria-hidden": !hasSelection,
role: "region"
});
const innerBlocksProps = (0, import_block_editor9.useInnerBlocksProps)(blockProps, {
allowedBlocks,
template: [["core/paragraph", {}]],
templateLock
});
return /* @__PURE__ */ (0, import_jsx_runtime164.jsx)("div", { ...innerBlocksProps });
}
// packages/block-library/build-module/accordion-panel/save.mjs
var import_block_editor10 = __toESM(require_block_editor(), 1);
var import_jsx_runtime165 = __toESM(require_jsx_runtime(), 1);
function save4() {
const blockProps = import_block_editor10.useBlockProps.save({
role: "region"
});
const innerBlocksProps = import_block_editor10.useInnerBlocksProps.save(blockProps);
return /* @__PURE__ */ (0, import_jsx_runtime165.jsx)("div", { ...innerBlocksProps });
}
// packages/block-library/build-module/accordion-panel/block.json
var block_default4 = {
$schema: "https://schemas.wp.org/trunk/block.json",
apiVersion: 3,
name: "core/accordion-panel",
title: "Accordion Panel",
category: "design",
description: "Contains the hidden or revealed content beneath the heading.",
parent: ["core/accordion-item"],
usesContext: ["core/accordion-open-by-default"],
supports: {
html: false,
color: {
background: true,
gradients: true
},
interactivity: true,
spacing: {
padding: true,
blockGap: true,
__experimentalDefaultControls: {
padding: true,
blockGap: true
}
},
__experimentalBorder: {
color: true,
radius: true,
style: true,
width: true,
__experimentalDefaultControls: {
color: true,
radius: true,
style: true,
width: true
}
},
typography: {
fontSize: true,
lineHeight: true,
__experimentalFontFamily: true,
__experimentalFontWeight: true,
__experimentalFontStyle: true,
__experimentalTextTransform: true,
__experimentalTextDecoration: true,
__experimentalLetterSpacing: true,
__experimentalDefaultControls: {
fontSize: true
}
},
shadow: true,
layout: {
allowEditing: false
},
visibility: false,
contentRole: true,
allowedBlocks: true,
lock: false
},
attributes: {
templateLock: {
type: ["string", "boolean"],
enum: ["all", "insert", "contentOnly", false],
default: false
}
},
textdomain: "default",
style: "wp-block-accordion-panel"
};
// packages/block-library/build-module/accordion-panel/index.mjs
var { name: name4 } = block_default4;
var settings4 = {
icon: contents_default,
edit: Edit4,
save: save4
};
var init4 = () => initBlock({ name: name4, metadata: block_default4, settings: settings4 });
// packages/block-library/build-module/archives/index.mjs
var archives_exports = {};
__export(archives_exports, {
init: () => init5,
metadata: () => block_default5,
name: () => name5,
settings: () => settings5
});
// packages/block-library/build-module/archives/block.json
var block_default5 = {
$schema: "https://schemas.wp.org/trunk/block.json",
apiVersion: 3,
name: "core/archives",
title: "Archives",
category: "widgets",
description: "Display a date archive of your posts.",
textdomain: "default",
attributes: {
displayAsDropdown: {
type: "boolean",
default: false
},
showLabel: {
type: "boolean",
default: true
},
showPostCounts: {
type: "boolean",
default: false
},
type: {
type: "string",
default: "monthly"
}
},
supports: {
anchor: true,
align: true,
__experimentalBorder: {
radius: true,
color: true,
width: true,
style: true
},
html: false,
spacing: {
margin: true,
padding: true,
__experimentalDefaultControls: {
margin: false,
padding: false
}
},
typography: {
fontSize: true,
lineHeight: true,
__experimentalFontFamily: true,
__experimentalFontWeight: true,
__experimentalFontStyle: true,
__experimentalTextTransform: true,
__experimentalTextDecoration: true,
__experimentalLetterSpacing: true,
__experimentalDefaultControls: {
fontSize: true
}
},
color: {
gradients: true,
link: true,
__experimentalDefaultControls: {
background: true,
text: true,
link: true
}
},
interactivity: {
clientNavigation: true
}
}
};
// packages/block-library/build-module/archives/edit.mjs
var import_components3 = __toESM(require_components(), 1);
var import_i18n5 = __toESM(require_i18n(), 1);
var import_block_editor11 = __toESM(require_block_editor(), 1);
var import_server_side_render = __toESM(require_server_side_render(), 1);
var import_compose2 = __toESM(require_compose(), 1);
var import_jsx_runtime166 = __toESM(require_jsx_runtime(), 1);
function ArchivesEdit({ attributes: attributes2, setAttributes, name: name123 }) {
const { showLabel, showPostCounts, displayAsDropdown, type } = attributes2;
const dropdownMenuProps = useToolsPanelDropdownMenuProps();
const { content, status, error } = (0, import_server_side_render.useServerSideRender)({
attributes: attributes2,
skipBlockSupportAttributes: true,
block: name123
});
const disabledRef = (0, import_compose2.useDisabled)();
const blockProps = (0, import_block_editor11.useBlockProps)({ ref: disabledRef });
return /* @__PURE__ */ (0, import_jsx_runtime166.jsxs)(import_jsx_runtime166.Fragment, { children: [
/* @__PURE__ */ (0, import_jsx_runtime166.jsx)(import_block_editor11.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime166.jsxs)(
import_components3.__experimentalToolsPanel,
{
label: (0, import_i18n5.__)("Settings"),
resetAll: () => {
setAttributes({
displayAsDropdown: false,
showLabel: true,
showPostCounts: false,
type: "monthly"
});
},
dropdownMenuProps,
children: [
/* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
import_components3.__experimentalToolsPanelItem,
{
label: (0, import_i18n5.__)("Display as dropdown"),
isShownByDefault: true,
hasValue: () => displayAsDropdown,
onDeselect: () => setAttributes({ displayAsDropdown: false }),
children: /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
import_components3.ToggleControl,
{
label: (0, import_i18n5.__)("Display as dropdown"),
checked: displayAsDropdown,
onChange: () => setAttributes({
displayAsDropdown: !displayAsDropdown
})
}
)
}
),
displayAsDropdown && /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
import_components3.__experimentalToolsPanelItem,
{
label: (0, import_i18n5.__)("Show label"),
isShownByDefault: true,
hasValue: () => !showLabel,
onDeselect: () => setAttributes({ showLabel: true }),
children: /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
import_components3.ToggleControl,
{
label: (0, import_i18n5.__)("Show label"),
checked: showLabel,
onChange: () => setAttributes({
showLabel: !showLabel
})
}
)
}
),
/* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
import_components3.__experimentalToolsPanelItem,
{
label: (0, import_i18n5.__)("Show post counts"),
isShownByDefault: true,
hasValue: () => showPostCounts,
onDeselect: () => setAttributes({ showPostCounts: false }),
children: /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
import_components3.ToggleControl,
{
label: (0, import_i18n5.__)("Show post counts"),
checked: showPostCounts,
onChange: () => setAttributes({
showPostCounts: !showPostCounts
})
}
)
}
),
/* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
import_components3.__experimentalToolsPanelItem,
{
label: (0, import_i18n5.__)("Group by"),
isShownByDefault: true,
hasValue: () => type !== "monthly",
onDeselect: () => setAttributes({ type: "monthly" }),
children: /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
import_components3.SelectControl,
{
__next40pxDefaultSize: true,
label: (0, import_i18n5.__)("Group by"),
options: [
{ label: (0, import_i18n5.__)("Year"), value: "yearly" },
{ label: (0, import_i18n5.__)("Month"), value: "monthly" },
{ label: (0, import_i18n5.__)("Week"), value: "weekly" },
{ label: (0, import_i18n5.__)("Day"), value: "daily" }
],
value: type,
onChange: (value) => setAttributes({ type: value })
}
)
}
)
]
}
) }),
status === "loading" && /* @__PURE__ */ (0, import_jsx_runtime166.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(import_components3.Spinner, {}) }),
status === "error" && /* @__PURE__ */ (0, import_jsx_runtime166.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime166.jsx)("p", { children: (0, import_i18n5.sprintf)(
/* translators: %s: error message returned when rendering the block. */
(0, import_i18n5.__)("Error: %s"),
error
) }) }),
status === "success" && /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(html_renderer_default, { wrapperProps: blockProps, html: content })
] });
}
// packages/block-library/build-module/archives/index.mjs
var { name: name5 } = block_default5;
var settings5 = {
icon: archive_default,
example: {},
edit: ArchivesEdit
};
var init5 = () => initBlock({ name: name5, metadata: block_default5, settings: settings5 });
// packages/block-library/build-module/avatar/index.mjs
var avatar_exports = {};
__export(avatar_exports, {
init: () => init6,
metadata: () => block_default6,
name: () => name6,
settings: () => settings6
});
// packages/block-library/build-module/avatar/block.json
var block_default6 = {
$schema: "https://schemas.wp.org/trunk/block.json",
apiVersion: 3,
name: "core/avatar",
title: "Avatar",
category: "theme",
description: "Add a user\u2019s avatar.",
textdomain: "default",
attributes: {
userId: {
type: "number"
},
size: {
type: "number",
default: 96
},
isLink: {
type: "boolean",
default: false
},
linkTarget: {
type: "string",
default: "_self"
}
},
usesContext: ["postType", "postId", "commentId"],
supports: {
anchor: true,
html: false,
align: true,
alignWide: false,
spacing: {
margin: true,
padding: true,
__experimentalDefaultControls: {
margin: false,
padding: false
}
},
__experimentalBorder: {
__experimentalSkipSerialization: true,
radius: true,
width: true,
color: true,
style: true,
__experimentalDefaultControls: {
radius: true
}
},
color: {
text: false,
background: false
},
filter: {
duotone: true
},
interactivity: {
clientNavigation: true
}
},
selectors: {
border: ".wp-block-avatar img",
filter: {
duotone: ".wp-block-avatar img"
}
},
editorStyle: "wp-block-avatar-editor",
style: "wp-block-avatar"
};
// packages/block-library/build-module/avatar/edit.mjs
var import_block_editor12 = __toESM(require_block_editor(), 1);
var import_components5 = __toESM(require_components(), 1);
var import_i18n8 = __toESM(require_i18n(), 1);
var import_url = __toESM(require_url(), 1);
// packages/block-library/build-module/avatar/hooks.mjs
var import_core_data2 = __toESM(require_core_data(), 1);
var import_i18n6 = __toESM(require_i18n(), 1);
var import_data6 = __toESM(require_data(), 1);
function getAvatarSizes(sizes) {
const minSize = sizes ? sizes[0] : 24;
const maxSize = sizes ? sizes[sizes.length - 1] : 96;
const maxSizeBuffer = Math.floor(maxSize * 2.5);
return {
minSize,
maxSize: maxSizeBuffer
};
}
function useCommentAvatar({ commentId }) {
const [avatars] = (0, import_core_data2.useEntityProp)(
"root",
"comment",
"author_avatar_urls",
commentId
);
const [authorName] = (0, import_core_data2.useEntityProp)(
"root",
"comment",
"author_name",
commentId
);
const avatarUrls = avatars ? Object.values(avatars) : null;
const sizes = avatars ? Object.keys(avatars) : null;
const { minSize, maxSize } = getAvatarSizes(sizes);
const defaultAvatar = useDefaultAvatar();
return {
src: avatarUrls ? avatarUrls[avatarUrls.length - 1] : defaultAvatar,
minSize,
maxSize,
alt: authorName ? (
// translators: %s: Author name.
(0, import_i18n6.sprintf)((0, import_i18n6.__)("%s Avatar"), authorName)
) : (0, import_i18n6.__)("Default Avatar")
};
}
function useUserAvatar({ userId, postId, postType }) {
const { authorDetails } = (0, import_data6.useSelect)(
(select9) => {
const { getEditedEntityRecord, getUser } = select9(import_core_data2.store);
if (userId) {
return {
authorDetails: getUser(userId)
};
}
const _authorId = getEditedEntityRecord(
"postType",
postType,
postId
)?.author;
return {
authorDetails: _authorId ? getUser(_authorId) : null
};
},
[postType, postId, userId]
);
const avatarUrls = authorDetails?.avatar_urls ? Object.values(authorDetails.avatar_urls) : null;
const sizes = authorDetails?.avatar_urls ? Object.keys(authorDetails.avatar_urls) : null;
const { minSize, maxSize } = getAvatarSizes(sizes);
const defaultAvatar = useDefaultAvatar();
return {
src: avatarUrls ? avatarUrls[avatarUrls.length - 1] : defaultAvatar,
minSize,
maxSize,
alt: authorDetails ? (
// translators: %s: Author name.
(0, import_i18n6.sprintf)((0, import_i18n6.__)("%s Avatar"), authorDetails?.name)
) : (0, import_i18n6.__)("Default Avatar")
};
}
// packages/block-library/build-module/avatar/user-control.mjs
var import_i18n7 = __toESM(require_i18n(), 1);
var import_components4 = __toESM(require_components(), 1);
var import_data7 = __toESM(require_data(), 1);
var import_core_data3 = __toESM(require_core_data(), 1);
var import_element4 = __toESM(require_element(), 1);
var import_compose3 = __toESM(require_compose(), 1);
var import_html_entities = __toESM(require_html_entities(), 1);
var import_jsx_runtime167 = __toESM(require_jsx_runtime(), 1);
var AUTHORS_QUERY = {
who: "authors",
per_page: 100,
_fields: "id,name",
context: "view"
};
function UserControl({ value, onChange }) {
const [filterValue, setFilterValue] = (0, import_element4.useState)("");
const { authors, isLoading } = (0, import_data7.useSelect)(
(select9) => {
const { getUsers, isResolving } = select9(import_core_data3.store);
const query = { ...AUTHORS_QUERY };
if (filterValue) {
query.search = filterValue;
query.search_columns = ["name"];
}
return {
authors: getUsers(query),
isLoading: isResolving("getUsers", [query])
};
},
[filterValue]
);
const options2 = (0, import_element4.useMemo)(() => {
return (authors ?? []).map((author) => {
return {
value: author.id,
label: (0, import_html_entities.decodeEntities)(author.name)
};
});
}, [authors]);
return /* @__PURE__ */ (0, import_jsx_runtime167.jsx)(
import_components4.ComboboxControl,
{
__next40pxDefaultSize: true,
label: (0, import_i18n7.__)("User"),
help: (0, import_i18n7.__)(
"Select the avatar user to display, if it is blank it will use the post/page author."
),
value,
onChange,
options: options2,
onFilterValueChange: (0, import_compose3.debounce)(setFilterValue, 300),
isLoading
}
);
}
// packages/block-library/build-module/avatar/edit.mjs
var import_jsx_runtime168 = __toESM(require_jsx_runtime(), 1);
var AvatarInspectorControls = ({
setAttributes,
avatar,
attributes: attributes2,
selectUser
}) => {
const dropdownMenuProps = useToolsPanelDropdownMenuProps();
return /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(import_block_editor12.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime168.jsxs)(
import_components5.__experimentalToolsPanel,
{
label: (0, import_i18n8.__)("Settings"),
resetAll: () => {
setAttributes({
size: 96,
isLink: false,
linkTarget: "_self",
userId: void 0
});
},
dropdownMenuProps,
children: [
/* @__PURE__ */ (0, import_jsx_runtime168.jsx)(
import_components5.__experimentalToolsPanelItem,
{
label: (0, import_i18n8.__)("Image size"),
isShownByDefault: true,
hasValue: () => attributes2?.size !== 96,
onDeselect: () => setAttributes({ size: 96 }),
children: /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(
import_components5.RangeControl,
{
__next40pxDefaultSize: true,
label: (0, import_i18n8.__)("Image size"),
onChange: (newSize) => setAttributes({
size: newSize
}),
min: avatar.minSize,
max: avatar.maxSize,
initialPosition: attributes2?.size,
value: attributes2?.size
}
)
}
),
/* @__PURE__ */ (0, import_jsx_runtime168.jsx)(
import_components5.__experimentalToolsPanelItem,
{
label: (0, import_i18n8.__)("Link to user profile"),
isShownByDefault: true,
hasValue: () => attributes2?.isLink,
onDeselect: () => setAttributes({ isLink: false }),
children: /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(
import_components5.ToggleControl,
{
label: (0, import_i18n8.__)("Link to user profile"),
onChange: () => setAttributes({ isLink: !attributes2.isLink }),
checked: attributes2.isLink
}
)
}
),
attributes2.isLink && /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(
import_components5.__experimentalToolsPanelItem,
{
label: (0, import_i18n8.__)("Open in new tab"),
isShownByDefault: true,
hasValue: () => attributes2?.linkTarget !== "_self",
onDeselect: () => setAttributes({ linkTarget: "_self" }),
children: /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(
import_components5.ToggleControl,
{
label: (0, import_i18n8.__)("Open in new tab"),
onChange: (value) => setAttributes({
linkTarget: value ? "_blank" : "_self"
}),
checked: attributes2.linkTarget === "_blank"
}
)
}
),
selectUser && /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(
import_components5.__experimentalToolsPanelItem,
{
label: (0, import_i18n8.__)("User"),
isShownByDefault: true,
hasValue: () => !!attributes2?.userId,
onDeselect: () => setAttributes({ userId: void 0 }),
children: /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(
UserControl,
{
value: attributes2?.userId,
onChange: (value) => {
setAttributes({
userId: value
});
}
}
)
}
)
]
}
) });
};
var AvatarLinkWrapper = ({ children, isLink }) => isLink ? /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(
"a",
{
href: "#avatar-pseudo-link",
className: "wp-block-avatar__link",
onClick: (event) => event.preventDefault(),
children
}
) : children;
var ResizableAvatar = ({
setAttributes,
attributes: attributes2,
avatar,
blockProps,
isSelected
}) => {
const borderProps = (0, import_block_editor12.__experimentalUseBorderProps)(attributes2);
const doubledSizedSrc = (0, import_url.addQueryArgs)(
(0, import_url.removeQueryArgs)(avatar?.src, ["s"]),
{
s: attributes2?.size * 2
}
);
return /* @__PURE__ */ (0, import_jsx_runtime168.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(AvatarLinkWrapper, { isLink: attributes2.isLink, children: /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(
import_components5.ResizableBox,
{
size: {
width: attributes2.size,
height: attributes2.size
},
showHandle: isSelected,
onResizeStop: (event, direction, elt, delta) => {
setAttributes({
size: parseInt(
attributes2.size + (delta.height || delta.width),
10
)
});
},
lockAspectRatio: true,
enable: {
top: false,
right: !(0, import_i18n8.isRTL)(),
bottom: true,
left: (0, import_i18n8.isRTL)()
},
minWidth: avatar.minSize,
maxWidth: avatar.maxSize,
children: /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(
"img",
{
src: doubledSizedSrc,
alt: avatar.alt,
className: clsx_default(
"avatar",
"avatar-" + attributes2.size,
"photo",
"wp-block-avatar__image",
borderProps.className
),
style: borderProps.style
}
)
}
) }) });
};
var CommentEdit = ({ attributes: attributes2, context, setAttributes, isSelected }) => {
const { commentId } = context;
const blockProps = (0, import_block_editor12.useBlockProps)();
const avatar = useCommentAvatar({ commentId });
return /* @__PURE__ */ (0, import_jsx_runtime168.jsxs)(import_jsx_runtime168.Fragment, { children: [
/* @__PURE__ */ (0, import_jsx_runtime168.jsx)(
AvatarInspectorControls,
{
avatar,
setAttributes,
attributes: attributes2,
selectUser: false
}
),
/* @__PURE__ */ (0, import_jsx_runtime168.jsx)(
ResizableAvatar,
{
attributes: attributes2,
avatar,
blockProps,
isSelected,
setAttributes
}
)
] });
};
var UserEdit = ({ attributes: attributes2, context, setAttributes, isSelected }) => {
const { postId, postType } = context;
const avatar = useUserAvatar({
userId: attributes2?.userId,
postId,
postType
});
const blockProps = (0, import_block_editor12.useBlockProps)();
return /* @__PURE__ */ (0, import_jsx_runtime168.jsxs)(import_jsx_runtime168.Fragment, { children: [
/* @__PURE__ */ (0, import_jsx_runtime168.jsx)(
AvatarInspectorControls,
{
selectUser: true,
attributes: attributes2,
avatar,
setAttributes
}
),
/* @__PURE__ */ (0, import_jsx_runtime168.jsx)(
ResizableAvatar,
{
attributes: attributes2,
avatar,
blockProps,
isSelected,
setAttributes
}
)
] });
};
function Edit5(props) {
if (props?.context?.commentId || props?.context?.commentId === null) {
return /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(CommentEdit, { ...props });
}
return /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(UserEdit, { ...props });
}
// packages/block-library/build-module/avatar/index.mjs
var { name: name6 } = block_default6;
var settings6 = {
icon: comment_author_avatar_default,
edit: Edit5,
example: {}
};
var init6 = () => initBlock({ name: name6, metadata: block_default6, settings: settings6 });
// packages/block-library/build-module/audio/index.mjs
var audio_exports = {};
__export(audio_exports, {
init: () => init7,
metadata: () => block_default8,
name: () => name7,
settings: () => settings7
});
var import_i18n11 = __toESM(require_i18n(), 1);
var import_blocks6 = __toESM(require_blocks(), 1);
// packages/block-library/build-module/audio/deprecated.mjs
var import_block_editor13 = __toESM(require_block_editor(), 1);
var import_jsx_runtime169 = __toESM(require_jsx_runtime(), 1);
var deprecated_default2 = [
{
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: true
},
save({ attributes: attributes2 }) {
const { autoplay, caption, loop, preload, src } = attributes2;
return /* @__PURE__ */ (0, import_jsx_runtime169.jsxs)("figure", { children: [
/* @__PURE__ */ (0, import_jsx_runtime169.jsx)(
"audio",
{
controls: "controls",
src,
autoPlay: autoplay,
loop,
preload
}
),
!import_block_editor13.RichText.isEmpty(caption) && /* @__PURE__ */ (0, import_jsx_runtime169.jsx)(
import_block_editor13.RichText.Content,
{
tagName: "figcaption",
value: caption
}
)
] });
}
}
];
// packages/block-library/build-module/audio/edit.mjs
var import_blob2 = __toESM(require_blob(), 1);
var import_components8 = __toESM(require_components(), 1);
var import_block_editor15 = __toESM(require_block_editor(), 1);
var import_i18n10 = __toESM(require_i18n(), 1);
var import_data8 = __toESM(require_data(), 1);
var import_notices = __toESM(require_notices(), 1);
var import_element7 = __toESM(require_element(), 1);
// node_modules/memize/dist/index.js
function memize(fn, options2) {
var size = 0;
var head;
var tail;
options2 = options2 || {};
function memoized() {
var node = head, len = arguments.length, args, i2;
searchCache: while (node) {
if (node.args.length !== arguments.length) {
node = node.next;
continue;
}
for (i2 = 0; i2 < len; i2++) {
if (node.args[i2] !== arguments[i2]) {
node = node.next;
continue searchCache;
}
}
if (node !== head) {
if (node === tail) {
tail = node.prev;
}
node.prev.next = node.next;
if (node.next) {
node.next.prev = node.prev;
}
node.next = head;
node.prev = null;
head.prev = node;
head = node;
}
return node.val;
}
args = new Array(len);
for (i2 = 0; i2 < len; i2++) {
args[i2] = arguments[i2];
}
node = {
args,
// Generate the result from original function
val: fn.apply(null, args)
};
if (head) {
head.prev = node;
node.next = head;
} else {
tail = node;
}
if (size === /** @type {MemizeOptions} */
options2.maxSize) {
tail = /** @type {MemizeCacheNode} */
tail.prev;
tail.next = null;
} else {
size++;
}
head = node;
return node.val;
}
memoized.clear = function() {
head = null;
tail = null;
size = 0;
};
return memoized;
}
// packages/block-library/build-module/embed/util.mjs
var import_components6 = __toESM(require_components(), 1);
var import_element5 = __toESM(require_element(), 1);
var import_blocks3 = __toESM(require_blocks(), 1);
// packages/block-library/build-module/embed/block.json
var block_default7 = {
$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: true
},
responsive: {
type: "boolean",
default: false,
role: "content"
},
previewable: {
type: "boolean",
default: true,
role: "content"
}
},
supports: {
anchor: true,
align: true,
spacing: {
margin: true
},
interactivity: {
clientNavigation: true
}
},
editorStyle: "wp-block-embed-editor",
style: "wp-block-embed"
};
// packages/block-library/build-module/embed/constants.mjs
var ASPECT_RATIOS = [
// Common video resolutions.
{ 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" },
// Vertical video and instagram square video support.
{ 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" }
];
var WP_EMBED_TYPE = "wp-embed";
// packages/block-library/build-module/lock-unlock.mjs
var import_private_apis = __toESM(require_private_apis(), 1);
var { lock, unlock } = (0, import_private_apis.__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"
);
// packages/block-library/build-module/embed/util.mjs
var import_jsx_runtime170 = __toESM(require_jsx_runtime(), 1);
var { name: DEFAULT_EMBED_BLOCK } = block_default7;
var { kebabCase } = unlock(import_components6.privateApis);
var getEmbedInfoByProvider = (provider) => (0, import_blocks3.getBlockVariations)(DEFAULT_EMBED_BLOCK)?.find(
({ name: name123 }) => name123 === provider
);
var matchesPatterns = (url, patterns = []) => patterns.some((pattern) => url.match(pattern));
var findMoreSuitableBlock = (url) => (0, import_blocks3.getBlockVariations)(DEFAULT_EMBED_BLOCK)?.find(
({ patterns }) => matchesPatterns(url, patterns)
);
var isFromWordPress = (html) => html && html.includes('class="wp-embedded-content"');
var getPhotoHtml = (photo) => {
const imageUrl = photo.url || photo.thumbnail_url;
const photoPreview = /* @__PURE__ */ (0, import_jsx_runtime170.jsx)("p", { children: /* @__PURE__ */ (0, import_jsx_runtime170.jsx)("img", { src: imageUrl, alt: photo.title, width: "100%" }) });
return (0, import_element5.renderToString)(photoPreview);
};
var createUpgradedEmbedBlock = (props, attributesFromPreview = {}) => {
const { preview, attributes: attributes2 = {} } = props;
const { url, providerNameSlug, type, ...restAttributes } = attributes2;
if (!url || !(0, import_blocks3.getBlockType)(DEFAULT_EMBED_BLOCK)) {
return;
}
const matchedBlock = findMoreSuitableBlock(url);
const isCurrentBlockWP = providerNameSlug === "wordpress" || type === WP_EMBED_TYPE;
const shouldCreateNewBlock = !isCurrentBlockWP && matchedBlock && (matchedBlock.attributes.providerNameSlug !== providerNameSlug || !providerNameSlug);
if (shouldCreateNewBlock) {
return (0, import_blocks3.createBlock)(DEFAULT_EMBED_BLOCK, {
url,
...restAttributes,
...matchedBlock.attributes
});
}
const wpVariation = (0, import_blocks3.getBlockVariations)(DEFAULT_EMBED_BLOCK)?.find(
({ name: name123 }) => name123 === "wordpress"
);
if (!wpVariation || !preview || !isFromWordPress(preview.html) || isCurrentBlockWP) {
return;
}
return (0, import_blocks3.createBlock)(DEFAULT_EMBED_BLOCK, {
url,
...wpVariation.attributes,
// By now we have the preview, but when the new block first renders, it
// won't have had all the attributes set, and so won't get the correct
// type and it won't render correctly. So, we pass through the current attributes
// here so that the initial render works when we switch to the WordPress
// block. This only affects the WordPress block because it can't be
// rendered in the usual Sandbox (it has a sandbox of its own) and it
// relies on the preview to set the correct render type.
...attributesFromPreview
});
};
var hasAspectRatioClass = (existingClassNames) => {
if (!existingClassNames) {
return false;
}
return ASPECT_RATIOS.some(
({ className }) => existingClassNames.includes(className)
);
};
var removeAspectRatioClasses = (existingClassNames) => {
if (!existingClassNames) {
return existingClassNames;
}
const aspectRatioClassNames = ASPECT_RATIOS.reduce(
(accumulator, { className }) => {
accumulator.push(className);
return accumulator;
},
["wp-has-aspect-ratio"]
);
let outputClassNames = existingClassNames;
for (const className of aspectRatioClassNames) {
outputClassNames = outputClassNames.replace(className, "");
}
return outputClassNames.trim();
};
function hasInlineResponsivePadding(html) {
const paddingPattern = /padding-(top|bottom)\s*:\s*[\d.]+%/i;
return paddingPattern.test(html);
}
function getClassNames(html, existingClassNames, allowResponsive = true) {
if (!allowResponsive) {
return removeAspectRatioClasses(existingClassNames);
}
if (hasInlineResponsivePadding(html)) {
return removeAspectRatioClasses(existingClassNames);
}
const previewDocument = document.implementation.createHTMLDocument("");
previewDocument.body.innerHTML = html;
const iframe = previewDocument.body.querySelector("iframe");
if (iframe && iframe.height && iframe.width) {
const aspectRatio = (iframe.width / iframe.height).toFixed(2);
for (let ratioIndex = 0; ratioIndex < ASPECT_RATIOS.length; ratioIndex++) {
const potentialRatio = ASPECT_RATIOS[ratioIndex];
if (aspectRatio >= potentialRatio.ratio) {
const ratioDiff = aspectRatio - potentialRatio.ratio;
if (ratioDiff > 0.1) {
return removeAspectRatioClasses(existingClassNames);
}
return clsx_default(
removeAspectRatioClasses(existingClassNames),
potentialRatio.className,
"wp-has-aspect-ratio"
);
}
}
}
return existingClassNames;
}
function fallback(url, onReplace) {
const link = /* @__PURE__ */ (0, import_jsx_runtime170.jsx)("a", { href: url, children: url });
onReplace(
(0, import_blocks3.createBlock)("core/paragraph", { content: (0, import_element5.renderToString)(link) })
);
}
var getAttributesFromPreview = memize(
(preview, title, currentClassNames, isResponsive, allowResponsive = true) => {
if (!preview) {
return {};
}
const attributes2 = {};
let { type = "rich" } = preview;
const { html, provider_name: providerName } = preview;
const providerNameSlug = kebabCase(
(providerName || title).toLowerCase()
);
if (isFromWordPress(html)) {
type = WP_EMBED_TYPE;
}
if (html || "photo" === type) {
attributes2.type = type;
attributes2.providerNameSlug = providerNameSlug;
}
if (hasAspectRatioClass(currentClassNames)) {
return attributes2;
}
attributes2.className = getClassNames(
html,
currentClassNames,
isResponsive && allowResponsive
);
return attributes2;
}
);
var getMergedAttributesWithPreview = (currentAttributes, preview, title, isResponsive) => {
const { allowResponsive, className } = currentAttributes;
return {
...currentAttributes,
...getAttributesFromPreview(
preview,
title,
className,
isResponsive,
allowResponsive
)
};
};
// packages/block-library/build-module/utils/caption.mjs
var import_element6 = __toESM(require_element(), 1);
var import_compose4 = __toESM(require_compose(), 1);
var import_i18n9 = __toESM(require_i18n(), 1);
var import_block_editor14 = __toESM(require_block_editor(), 1);
var import_components7 = __toESM(require_components(), 1);
var import_blocks4 = __toESM(require_blocks(), 1);
var import_jsx_runtime171 = __toESM(require_jsx_runtime(), 1);
function Caption({
attributeKey = "caption",
attributes: attributes2,
setAttributes,
isSelected,
insertBlocksAfter,
placeholder: placeholder2 = (0, import_i18n9.__)("Add caption"),
label = (0, import_i18n9.__)("Caption text"),
showToolbarButton = true,
excludeElementClassName,
className,
readOnly,
tagName = "figcaption",
addLabel = (0, import_i18n9.__)("Add caption"),
removeLabel = (0, import_i18n9.__)("Remove caption"),
icon: icon4 = caption_default,
...props
}) {
const caption = attributes2[attributeKey];
const prevCaption = (0, import_compose4.usePrevious)(caption);
const isCaptionEmpty = import_block_editor14.RichText.isEmpty(caption);
const isPrevCaptionEmpty = import_block_editor14.RichText.isEmpty(prevCaption);
const [showCaption, setShowCaption] = (0, import_element6.useState)(!isCaptionEmpty);
(0, import_element6.useEffect)(() => {
if (!isCaptionEmpty && isPrevCaptionEmpty) {
setShowCaption(true);
}
}, [isCaptionEmpty, isPrevCaptionEmpty]);
(0, import_element6.useEffect)(() => {
if (!isSelected && isCaptionEmpty) {
setShowCaption(false);
}
}, [isSelected, isCaptionEmpty]);
const ref = (0, import_element6.useCallback)(
(node) => {
if (node && isCaptionEmpty) {
node.focus();
}
},
[isCaptionEmpty]
);
return /* @__PURE__ */ (0, import_jsx_runtime171.jsxs)(import_jsx_runtime171.Fragment, { children: [
showToolbarButton && /* @__PURE__ */ (0, import_jsx_runtime171.jsx)(import_block_editor14.BlockControls, { group: "block", children: /* @__PURE__ */ (0, import_jsx_runtime171.jsx)(
import_components7.ToolbarButton,
{
onClick: () => {
setShowCaption(!showCaption);
if (showCaption && caption) {
setAttributes({
[attributeKey]: void 0
});
}
},
icon: icon4,
isPressed: showCaption,
label: showCaption ? removeLabel : addLabel
}
) }),
showCaption && (!import_block_editor14.RichText.isEmpty(caption) || isSelected) && /* @__PURE__ */ (0, import_jsx_runtime171.jsx)(
import_block_editor14.RichText,
{
identifier: attributeKey,
tagName,
className: clsx_default(
className,
excludeElementClassName ? "" : (0, import_block_editor14.__experimentalGetElementClassName)("caption")
),
ref,
"aria-label": label,
placeholder: placeholder2,
value: caption,
onChange: (value) => setAttributes({ [attributeKey]: value }),
inlineToolbar: true,
__unstableOnSplitAtEnd: () => insertBlocksAfter(
(0, import_blocks4.createBlock)((0, import_blocks4.getDefaultBlockName)())
),
readOnly,
...props
}
)
] });
}
// packages/block-library/build-module/audio/edit.mjs
var import_jsx_runtime172 = __toESM(require_jsx_runtime(), 1);
var ALLOWED_MEDIA_TYPES = ["audio"];
function AudioEdit({
attributes: attributes2,
className,
setAttributes,
onReplace,
isSelected: isSingleSelected,
insertBlocksAfter
}) {
const { id, autoplay, loop, preload, src } = attributes2;
const [temporaryURL, setTemporaryURL] = (0, import_element7.useState)(attributes2.blob);
const blockEditingMode = (0, import_block_editor15.useBlockEditingMode)();
const hasNonContentControls = blockEditingMode === "default";
useUploadMediaFromBlobURL({
url: temporaryURL,
allowedTypes: ALLOWED_MEDIA_TYPES,
onChange: onSelectAudio,
onError: onUploadError
});
function toggleAttribute(attribute) {
return (newValue) => {
setAttributes({ [attribute]: newValue });
};
}
function onSelectURL(newSrc) {
if (newSrc !== src) {
const embedBlock = createUpgradedEmbedBlock({
attributes: { url: newSrc }
});
if (void 0 !== embedBlock && onReplace) {
onReplace(embedBlock);
return;
}
setAttributes({ src: newSrc, id: void 0, blob: void 0 });
setTemporaryURL();
}
}
const { createErrorNotice } = (0, import_data8.useDispatch)(import_notices.store);
function onUploadError(message) {
createErrorNotice(message, { type: "snackbar" });
}
function getAutoplayHelp(checked) {
return checked ? (0, import_i18n10.__)("Autoplay may cause usability issues for some users.") : null;
}
function onSelectAudio(media) {
if (!media || !media.url) {
setAttributes({
src: void 0,
id: void 0,
caption: void 0,
blob: void 0
});
setTemporaryURL();
return;
}
if ((0, import_blob2.isBlobURL)(media.url)) {
setTemporaryURL(media.url);
return;
}
setAttributes({
blob: void 0,
src: media.url,
id: media.id,
caption: media.caption
});
setTemporaryURL();
}
const classes = clsx_default(className, {
"is-transient": !!temporaryURL
});
const blockProps = (0, import_block_editor15.useBlockProps)({
className: classes
});
const dropdownMenuProps = useToolsPanelDropdownMenuProps();
if (!src && !temporaryURL) {
return /* @__PURE__ */ (0, import_jsx_runtime172.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(
import_block_editor15.MediaPlaceholder,
{
icon: /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(import_block_editor15.BlockIcon, { icon: audio_default }),
onSelect: onSelectAudio,
onSelectURL,
accept: "audio/*",
allowedTypes: ALLOWED_MEDIA_TYPES,
value: attributes2,
onError: onUploadError
}
) });
}
return /* @__PURE__ */ (0, import_jsx_runtime172.jsxs)(import_jsx_runtime172.Fragment, { children: [
isSingleSelected && /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(import_block_editor15.BlockControls, { group: "other", children: /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(
import_block_editor15.MediaReplaceFlow,
{
mediaId: id,
mediaURL: src,
allowedTypes: ALLOWED_MEDIA_TYPES,
accept: "audio/*",
onSelect: onSelectAudio,
onSelectURL,
onError: onUploadError,
onReset: () => onSelectAudio(void 0),
variant: "toolbar"
}
) }),
/* @__PURE__ */ (0, import_jsx_runtime172.jsx)(import_block_editor15.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime172.jsxs)(
import_components8.__experimentalToolsPanel,
{
label: (0, import_i18n10.__)("Settings"),
resetAll: () => {
setAttributes({
autoplay: false,
loop: false,
preload: void 0
});
},
dropdownMenuProps,
children: [
/* @__PURE__ */ (0, import_jsx_runtime172.jsx)(
import_components8.__experimentalToolsPanelItem,
{
label: (0, import_i18n10.__)("Autoplay"),
isShownByDefault: true,
hasValue: () => !!autoplay,
onDeselect: () => setAttributes({
autoplay: false
}),
children: /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(
import_components8.ToggleControl,
{
label: (0, import_i18n10.__)("Autoplay"),
onChange: toggleAttribute("autoplay"),
checked: !!autoplay,
help: getAutoplayHelp
}
)
}
),
/* @__PURE__ */ (0, import_jsx_runtime172.jsx)(
import_components8.__experimentalToolsPanelItem,
{
label: (0, import_i18n10.__)("Loop"),
isShownByDefault: true,
hasValue: () => !!loop,
onDeselect: () => setAttributes({
loop: false
}),
children: /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(
import_components8.ToggleControl,
{
label: (0, import_i18n10.__)("Loop"),
onChange: toggleAttribute("loop"),
checked: !!loop
}
)
}
),
/* @__PURE__ */ (0, import_jsx_runtime172.jsx)(
import_components8.__experimentalToolsPanelItem,
{
label: (0, import_i18n10.__)("Preload"),
isShownByDefault: true,
hasValue: () => !!preload,
onDeselect: () => setAttributes({
preload: void 0
}),
children: /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(
import_components8.SelectControl,
{
__next40pxDefaultSize: true,
label: (0, import_i18n10._x)(
"Preload",
"noun; Audio block parameter"
),
value: preload || "",
onChange: (value) => setAttributes({
preload: value || void 0
}),
options: [
{ value: "", label: (0, import_i18n10.__)("Browser default") },
{ value: "auto", label: (0, import_i18n10.__)("Auto") },
{ value: "metadata", label: (0, import_i18n10.__)("Metadata") },
{
value: "none",
label: (0, import_i18n10._x)("None", "Preload value")
}
]
}
)
}
)
]
}
) }),
/* @__PURE__ */ (0, import_jsx_runtime172.jsxs)("figure", { ...blockProps, children: [
/* @__PURE__ */ (0, import_jsx_runtime172.jsx)(import_components8.Disabled, { isDisabled: !isSingleSelected, children: /* @__PURE__ */ (0, import_jsx_runtime172.jsx)("audio", { controls: "controls", src: src ?? temporaryURL }) }),
!!temporaryURL && /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(import_components8.Spinner, {}),
/* @__PURE__ */ (0, import_jsx_runtime172.jsx)(
Caption,
{
attributes: attributes2,
setAttributes,
isSelected: isSingleSelected,
insertBlocksAfter,
label: (0, import_i18n10.__)("Audio caption text"),
showToolbarButton: isSingleSelected && hasNonContentControls
}
)
] })
] });
}
var edit_default = AudioEdit;
// packages/block-library/build-module/audio/block.json
var block_default8 = {
$schema: "https://schemas.wp.org/trunk/block.json",
apiVersion: 3,
name: "core/audio",
title: "Audio",
category: "media",
description: "Embed a simple audio player.",
keywords: ["music", "sound", "podcast", "recording"],
textdomain: "default",
attributes: {
blob: {
type: "string",
role: "local"
},
src: {
type: "string",
source: "attribute",
selector: "audio",
attribute: "src",
role: "content"
},
caption: {
type: "rich-text",
source: "rich-text",
selector: "figcaption",
role: "content"
},
id: {
type: "number",
role: "content"
},
autoplay: {
type: "boolean",
source: "attribute",
selector: "audio",
attribute: "autoplay"
},
loop: {
type: "boolean",
source: "attribute",
selector: "audio",
attribute: "loop"
},
preload: {
type: "string",
source: "attribute",
selector: "audio",
attribute: "preload"
}
},
supports: {
anchor: true,
align: true,
spacing: {
margin: true,
padding: true,
__experimentalDefaultControls: {
margin: false,
padding: false
}
},
interactivity: {
clientNavigation: true
}
},
editorStyle: "wp-block-audio-editor",
style: "wp-block-audio"
};
// packages/block-library/build-module/audio/save.mjs
var import_block_editor16 = __toESM(require_block_editor(), 1);
var import_jsx_runtime173 = __toESM(require_jsx_runtime(), 1);
function save5({ attributes: attributes2 }) {
const { autoplay, caption, loop, preload, src } = attributes2;
return src && /* @__PURE__ */ (0, import_jsx_runtime173.jsxs)("figure", { ...import_block_editor16.useBlockProps.save(), children: [
/* @__PURE__ */ (0, import_jsx_runtime173.jsx)(
"audio",
{
controls: "controls",
src,
autoPlay: autoplay,
loop,
preload
}
),
!import_block_editor16.RichText.isEmpty(caption) && /* @__PURE__ */ (0, import_jsx_runtime173.jsx)(
import_block_editor16.RichText.Content,
{
tagName: "figcaption",
value: caption,
className: (0, import_block_editor16.__experimentalGetElementClassName)(
"caption"
)
}
)
] });
}
// packages/block-library/build-module/audio/transforms.mjs
var import_blob3 = __toESM(require_blob(), 1);
var import_blocks5 = __toESM(require_blocks(), 1);
var transforms = {
from: [
{
type: "files",
isMatch(files) {
return files.length === 1 && files[0].type.indexOf("audio/") === 0;
},
transform(files) {
const file = files[0];
const block = (0, import_blocks5.createBlock)("core/audio", {
blob: (0, import_blob3.createBlobURL)(file)
});
return block;
}
},
{
type: "shortcode",
tag: "audio",
attributes: {
src: {
type: "string",
shortcode: ({
named: { src, mp3, m4a, ogg, wav, wma }
}) => {
return src || mp3 || m4a || ogg || wav || wma;
}
},
loop: {
type: "string",
shortcode: ({ named: { loop } }) => {
return loop;
}
},
autoplay: {
type: "string",
shortcode: ({ named: { autoplay } }) => {
return autoplay;
}
},
preload: {
type: "string",
shortcode: ({ named: { preload } }) => {
return preload;
}
}
}
}
]
};
var transforms_default = transforms;
// packages/block-library/build-module/audio/index.mjs
var { fieldsKey, formKey } = unlock(import_blocks6.privateApis);
var { name: name7 } = block_default8;
var settings7 = {
icon: audio_default,
example: {
attributes: {
src: "https://upload.wikimedia.org/wikipedia/commons/d/dd/Armstrong_Small_Step.ogg"
},
viewportWidth: 350
},
transforms: transforms_default,
deprecated: deprecated_default2,
edit: edit_default,
save: save5
};
if (window.__experimentalContentOnlyInspectorFields) {
settings7[fieldsKey] = [
{
id: "audio",
label: (0, import_i18n11.__)("Audio"),
type: "media",
Edit: {
control: "media",
// TODO: replace with custom component
allowedTypes: ["audio"],
multiple: false
},
getValue: ({ item }) => ({
id: item.id,
url: item.src
}),
setValue: ({ value }) => ({
id: value.id,
src: value.url
})
},
{
id: "caption",
label: (0, import_i18n11.__)("Caption"),
type: "text",
Edit: "rich-text"
// TODO: replace with custom component
}
];
settings7[formKey] = {
fields: ["audio", "caption"]
};
}
var init7 = () => initBlock({ name: name7, metadata: block_default8, settings: settings7 });
// packages/block-library/build-module/breadcrumbs/index.mjs
var breadcrumbs_exports = {};
__export(breadcrumbs_exports, {
init: () => init8,
metadata: () => block_default9,
name: () => name8,
settings: () => settings8
});
// packages/block-library/build-module/breadcrumbs/block.json
var block_default9 = {
$schema: "https://schemas.wp.org/trunk/block.json",
apiVersion: 3,
name: "core/breadcrumbs",
title: "Breadcrumbs",
category: "theme",
description: "Display a breadcrumb trail showing the path to the current page.",
textdomain: "default",
attributes: {
prefersTaxonomy: {
type: "boolean",
default: false
},
separator: {
type: "string",
default: "/"
},
showHomeItem: {
type: "boolean",
default: true
},
showCurrentItem: {
type: "boolean",
default: true
},
showOnHomePage: {
type: "boolean",
default: false
}
},
usesContext: ["postId", "postType", "templateSlug"],
supports: {
anchor: true,
html: false,
align: ["wide", "full"],
spacing: {
margin: true,
padding: true
},
color: {
gradients: true,
link: true,
__experimentalDefaultControls: {
background: true,
text: true
}
},
__experimentalBorder: {
radius: true,
color: true,
width: true,
style: true,
__experimentalDefaultControls: {
radius: false,
color: true,
width: true,
style: true
}
},
typography: {
fontSize: true,
lineHeight: true,
__experimentalFontFamily: true,
__experimentalFontWeight: true,
__experimentalFontStyle: true,
__experimentalTextTransform: true,
__experimentalTextDecoration: true,
__experimentalLetterSpacing: true,
__experimentalDefaultControls: {
fontSize: true
}
},
interactivity: {
clientNavigation: true
}
},
style: "wp-block-breadcrumbs"
};
// packages/block-library/build-module/breadcrumbs/edit.mjs
var import_i18n12 = __toESM(require_i18n(), 1);
var import_block_editor17 = __toESM(require_block_editor(), 1);
var import_components9 = __toESM(require_components(), 1);
var import_data9 = __toESM(require_data(), 1);
var import_core_data4 = __toESM(require_core_data(), 1);
var import_element8 = __toESM(require_element(), 1);
var import_server_side_render2 = __toESM(require_server_side_render(), 1);
var import_compose5 = __toESM(require_compose(), 1);
var import_jsx_runtime174 = __toESM(require_jsx_runtime(), 1);
var separatorDefaultValue = "/";
function BreadcrumbEdit({
attributes: attributes2,
setAttributes,
name: name123,
context: { postId, postType, templateSlug }
}) {
const {
separator,
showHomeItem,
showCurrentItem,
prefersTaxonomy,
showOnHomePage
} = attributes2;
const {
post,
isPostTypeHierarchical,
postTypeHasTaxonomies,
hasTermsAssigned,
isLoading
} = (0, import_data9.useSelect)(
(select9) => {
if (!postType) {
return {};
}
const _post = select9(import_core_data4.store).getEntityRecord(
"postType",
postType,
postId
);
const postTypeObject = select9(import_core_data4.store).getPostType(postType);
const _postTypeHasTaxonomies = postTypeObject && postTypeObject.taxonomies.length;
let taxonomies;
if (_postTypeHasTaxonomies) {
taxonomies = select9(import_core_data4.store).getTaxonomies({
type: postType,
per_page: -1
});
}
return {
post: _post,
isPostTypeHierarchical: postTypeObject?.hierarchical,
postTypeHasTaxonomies: _postTypeHasTaxonomies,
hasTermsAssigned: _post && (taxonomies || []).filter(
({ visibility }) => visibility?.publicly_queryable
).some((taxonomy) => {
return !!_post[taxonomy.rest_base]?.length;
}),
isLoading: postId && !_post || !postTypeObject || _postTypeHasTaxonomies && !taxonomies
};
},
[postType, postId]
);
const [invalidationKey, setInvalidationKey] = (0, import_element8.useState)(0);
(0, import_element8.useEffect)(() => {
setInvalidationKey((c2) => c2 + 1);
}, [post]);
const dropdownMenuProps = useToolsPanelDropdownMenuProps();
const { content, status, error } = (0, import_server_side_render2.useServerSideRender)({
attributes: attributes2,
skipBlockSupportAttributes: true,
block: name123,
urlQueryArgs: { post_id: postId, invalidationKey }
});
const prevContentRef = (0, import_element8.useRef)("");
(0, import_element8.useEffect)(() => {
if (status === "success") {
prevContentRef.current = content;
}
}, [content, status]);
const [showLoader, setShowLoader] = (0, import_element8.useState)(false);
(0, import_element8.useEffect)(() => {
if (status !== "loading") {
return;
}
const timeout = setTimeout(() => {
setShowLoader(true);
}, 400);
return () => {
clearTimeout(timeout);
setShowLoader(false);
};
}, [status]);
const disabledRef = (0, import_compose5.useDisabled)();
const blockProps = (0, import_block_editor17.useBlockProps)({ ref: disabledRef });
if (isLoading) {
return /* @__PURE__ */ (0, import_jsx_runtime174.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(import_components9.Spinner, {}) });
}
let _showTerms;
if (!isPostTypeHierarchical && !post?.parent) {
_showTerms = true;
} else if (!postTypeHasTaxonomies) {
_showTerms = false;
} else {
_showTerms = prefersTaxonomy;
}
let placeholder2 = null;
const showPlaceholder = !postId || !postType || // When `templateSlug` is set only show placeholder if the post type is not.
// This is needed because when we are showing the template in post editor we
// want to show the real breadcrumbs if we have the post type.
templateSlug && !postType || !_showTerms && !isPostTypeHierarchical || _showTerms && !hasTermsAssigned;
if (showPlaceholder) {
const placeholderItems = [];
if (showHomeItem) {
placeholderItems.push((0, import_i18n12.__)("Home"));
}
if (templateSlug && !postId) {
placeholderItems.push((0, import_i18n12.__)("Page"));
} else if (_showTerms) {
placeholderItems.push((0, import_i18n12.__)("Category"));
} else {
placeholderItems.push((0, import_i18n12.__)("Ancestor"), (0, import_i18n12.__)("Parent"));
}
placeholder2 = /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
"nav",
{
...blockProps,
style: {
"--separator": `"${separator.replace(/\\/g, "\\\\").replace(/"/g, '\\"')}"`,
...blockProps.style
},
children: /* @__PURE__ */ (0, import_jsx_runtime174.jsxs)("ol", { children: [
placeholderItems.map((text, index) => /* @__PURE__ */ (0, import_jsx_runtime174.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime174.jsx)("a", { href: `#breadcrumbs-pseudo-link-${index}`, children: text }) }, index)),
showCurrentItem && /* @__PURE__ */ (0, import_jsx_runtime174.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime174.jsx)("span", { "aria-current": "page", children: (0, import_i18n12.__)("Current") }) })
] })
}
);
}
return /* @__PURE__ */ (0, import_jsx_runtime174.jsxs)(import_jsx_runtime174.Fragment, { children: [
/* @__PURE__ */ (0, import_jsx_runtime174.jsx)(import_block_editor17.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime174.jsxs)(
import_components9.__experimentalToolsPanel,
{
label: (0, import_i18n12.__)("Settings"),
resetAll: () => {
setAttributes({
separator: separatorDefaultValue,
showHomeItem: true,
showCurrentItem: true
});
},
dropdownMenuProps,
children: [
/* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
import_components9.__experimentalToolsPanelItem,
{
label: (0, import_i18n12.__)("Show home breadcrumb"),
isShownByDefault: true,
hasValue: () => !showHomeItem,
onDeselect: () => setAttributes({
showHomeItem: true
}),
children: /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
import_components9.ToggleControl,
{
label: (0, import_i18n12.__)("Show home breadcrumb"),
onChange: (value) => setAttributes({ showHomeItem: value }),
checked: showHomeItem
}
)
}
),
/* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
import_components9.__experimentalToolsPanelItem,
{
label: (0, import_i18n12.__)("Show current breadcrumb"),
isShownByDefault: true,
hasValue: () => !showCurrentItem,
onDeselect: () => setAttributes({
showCurrentItem: true
}),
children: /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
import_components9.ToggleControl,
{
label: (0, import_i18n12.__)("Show current breadcrumb"),
onChange: (value) => setAttributes({ showCurrentItem: value }),
checked: showCurrentItem
}
)
}
),
/* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
import_components9.__experimentalToolsPanelItem,
{
label: (0, import_i18n12.__)("Separator"),
isShownByDefault: true,
hasValue: () => separator !== separatorDefaultValue,
onDeselect: () => setAttributes({
separator: separatorDefaultValue
}),
children: /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
import_components9.TextControl,
{
__next40pxDefaultSize: true,
autoComplete: "off",
label: (0, import_i18n12.__)("Separator"),
value: separator,
onChange: (value) => setAttributes({ separator: value }),
onBlur: () => {
if (!separator) {
setAttributes({
separator: separatorDefaultValue
});
}
}
}
)
}
)
]
}
) }),
/* @__PURE__ */ (0, import_jsx_runtime174.jsxs)(import_block_editor17.InspectorControls, { group: "advanced", children: [
/* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
import_components9.CheckboxControl,
{
label: (0, import_i18n12.__)("Show on homepage"),
checked: showOnHomePage,
onChange: (value) => setAttributes({ showOnHomePage: value }),
help: (0, import_i18n12.__)(
"If this breadcrumbs block appears in a template or template part that\u2019s shown on the homepage, enable this option to display the breadcrumb trail. Otherwise, this setting has no effect."
)
}
),
/* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
import_components9.CheckboxControl,
{
label: (0, import_i18n12.__)("Prefer taxonomy terms"),
checked: prefersTaxonomy,
onChange: (value) => setAttributes({ prefersTaxonomy: value }),
help: (0, import_i18n12.__)(
"The exact type of breadcrumbs shown will vary automatically depending on the page in which this block is displayed. In the specific case of a hierarchical post type with taxonomies, the breadcrumbs can either reflect its post hierarchy (default) or the hierarchy of its assigned taxonomy terms."
)
}
)
] }),
status === "loading" && !showPlaceholder && (prevContentRef.current ? /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
html_renderer_default,
{
wrapperProps: {
...blockProps,
style: {
...blockProps.style,
opacity: showLoader ? 0.3 : 1
}
},
html: prevContentRef.current
}
) : /* @__PURE__ */ (0, import_jsx_runtime174.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(import_components9.Spinner, {}) })),
status === "error" && /* @__PURE__ */ (0, import_jsx_runtime174.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime174.jsx)("p", { children: (0, import_i18n12.sprintf)(
/* translators: %s: error message returned when rendering the block. */
(0, import_i18n12.__)("Error: %s"),
error
) }) }),
showPlaceholder && placeholder2,
!showPlaceholder && status === "success" && /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(html_renderer_default, { wrapperProps: blockProps, html: content })
] });
}
// packages/block-library/build-module/breadcrumbs/index.mjs
var { name: name8 } = block_default9;
var settings8 = {
icon: breadcrumbs_default,
example: {},
edit: BreadcrumbEdit
};
var init8 = () => initBlock({ name: name8, metadata: block_default9, settings: settings8 });
// packages/block-library/build-module/button/index.mjs
var button_exports = {};
__export(button_exports, {
init: () => init9,
metadata: () => block_default10,
name: () => name9,
settings: () => settings9
});
var import_i18n14 = __toESM(require_i18n(), 1);
var import_blocks8 = __toESM(require_blocks(), 1);
// packages/block-library/build-module/button/deprecated.mjs
var import_block_editor19 = __toESM(require_block_editor(), 1);
var import_compose6 = __toESM(require_compose(), 1);
// packages/block-library/build-module/utils/migrate-font-family.mjs
var import_block_editor18 = __toESM(require_block_editor(), 1);
var { cleanEmptyObject } = unlock(import_block_editor18.privateApis);
function migrate_font_family_default(attributes2) {
if (!attributes2?.style?.typography?.fontFamily) {
return attributes2;
}
const { fontFamily, ...typography } = attributes2.style.typography;
return {
...attributes2,
style: cleanEmptyObject({
...attributes2.style,
typography
}),
fontFamily: fontFamily.split("|").pop()
};
}
// packages/block-library/build-module/utils/migrate-text-align.mjs
function migrate_text_align_default(attributes2) {
const { textAlign, ...restAttributes } = attributes2;
if (!textAlign) {
return attributes2;
}
return {
...restAttributes,
style: {
...attributes2.style,
typography: {
...attributes2.style?.typography,
textAlign
}
}
};
}
// packages/block-library/build-module/button/deprecated.mjs
var import_jsx_runtime175 = __toESM(require_jsx_runtime(), 1);
var migrateBorderRadius = (attributes2) => {
const { borderRadius, ...newAttributes } = attributes2;
const oldBorderRadius = [
borderRadius,
newAttributes.style?.border?.radius
].find((possibleBorderRadius) => {
return typeof possibleBorderRadius === "number" && possibleBorderRadius !== 0;
});
if (!oldBorderRadius) {
return newAttributes;
}
return {
...newAttributes,
style: {
...newAttributes.style,
border: {
...newAttributes.style?.border,
radius: `${oldBorderRadius}px`
}
}
};
};
function migrateAlign(attributes2) {
if (!attributes2.align) {
return attributes2;
}
const { align, ...otherAttributes } = attributes2;
return {
...otherAttributes,
className: clsx_default(
otherAttributes.className,
`align${attributes2.align}`
)
};
}
var migrateCustomColorsAndGradients = (attributes2) => {
if (!attributes2.customTextColor && !attributes2.customBackgroundColor && !attributes2.customGradient) {
return attributes2;
}
const style2 = { color: {} };
if (attributes2.customTextColor) {
style2.color.text = attributes2.customTextColor;
}
if (attributes2.customBackgroundColor) {
style2.color.background = attributes2.customBackgroundColor;
}
if (attributes2.customGradient) {
style2.color.gradient = attributes2.customGradient;
}
const {
customTextColor,
customBackgroundColor,
customGradient,
...restAttributes
} = attributes2;
return {
...restAttributes,
style: style2
};
};
var oldColorsMigration = (attributes2) => {
const { color, textColor, ...restAttributes } = {
...attributes2,
customTextColor: attributes2.textColor && "#" === attributes2.textColor[0] ? attributes2.textColor : void 0,
customBackgroundColor: attributes2.color && "#" === attributes2.color[0] ? attributes2.color : void 0
};
return migrateCustomColorsAndGradients(restAttributes);
};
var blockAttributes = {
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"
}
};
var v13 = {
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: true,
align: true,
alignWide: false,
color: {
__experimentalSkipSerialization: true,
gradients: true,
__experimentalDefaultControls: {
background: true,
text: true
}
},
typography: {
__experimentalSkipSerialization: [
"fontSize",
"lineHeight",
"fontFamily",
"fontWeight",
"fontStyle",
"textTransform",
"textDecoration",
"letterSpacing"
],
fontSize: true,
lineHeight: true,
__experimentalFontFamily: true,
__experimentalFontWeight: true,
__experimentalFontStyle: true,
__experimentalTextTransform: true,
__experimentalTextDecoration: true,
__experimentalLetterSpacing: true,
__experimentalWritingMode: true,
__experimentalDefaultControls: {
fontSize: true
}
},
reusable: false,
shadow: {
__experimentalSkipSerialization: true
},
spacing: {
__experimentalSkipSerialization: true,
padding: ["horizontal", "vertical"],
__experimentalDefaultControls: {
padding: true
}
},
__experimentalBorder: {
color: true,
radius: true,
style: true,
width: true,
__experimentalSkipSerialization: true,
__experimentalDefaultControls: {
color: true,
radius: true,
style: true,
width: true
}
},
interactivity: {
clientNavigation: true
}
},
selectors: {
root: ".wp-block-button .wp-block-button__link",
typography: {
writingMode: ".wp-block-button"
}
},
save({ attributes: attributes2, className }) {
const {
tagName,
type,
textAlign,
fontSize,
linkTarget,
rel,
style: style2,
text,
title,
url,
width
} = attributes2;
const TagName2 = tagName || "a";
const isButtonTag = "button" === TagName2;
const buttonType = type || "button";
const borderProps = (0, import_block_editor19.__experimentalGetBorderClassesAndStyles)(attributes2);
const colorProps = (0, import_block_editor19.__experimentalGetColorClassesAndStyles)(attributes2);
const spacingProps = (0, import_block_editor19.__experimentalGetSpacingClassesAndStyles)(attributes2);
const shadowProps = (0, import_block_editor19.__experimentalGetShadowClassesAndStyles)(attributes2);
const typographyProps = (0, import_block_editor19.getTypographyClassesAndStyles)(attributes2);
const buttonClasses = clsx_default(
"wp-block-button__link",
colorProps.className,
borderProps.className,
typographyProps.className,
{
[`has-text-align-${textAlign}`]: textAlign,
// For backwards compatibility add style that isn't provided via
// block support.
"no-border-radius": style2?.border?.radius === 0,
[`has-custom-font-size`]: fontSize || style2?.typography?.fontSize
},
(0, import_block_editor19.__experimentalGetElementClassName)("button")
);
const buttonStyle = {
...borderProps.style,
...colorProps.style,
...spacingProps.style,
...shadowProps.style,
...typographyProps.style,
writingMode: void 0
};
const wrapperClasses = clsx_default(className, {
[`has-custom-width wp-block-button__width-${width}`]: width
});
return /* @__PURE__ */ (0, import_jsx_runtime175.jsx)("div", { ...import_block_editor19.useBlockProps.save({ className: wrapperClasses }), children: /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(
import_block_editor19.RichText.Content,
{
tagName: TagName2,
type: isButtonTag ? buttonType : null,
className: buttonClasses,
href: isButtonTag ? null : url,
title,
style: buttonStyle,
value: text,
target: isButtonTag ? null : linkTarget,
rel: isButtonTag ? null : rel
}
) });
},
isEligible(attributes2) {
return !!attributes2.textAlign;
},
migrate: migrate_text_align_default
};
var v12 = {
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: true,
align: true,
alignWide: false,
color: {
__experimentalSkipSerialization: true,
gradients: true,
__experimentalDefaultControls: {
background: true,
text: true
}
},
typography: {
fontSize: true,
lineHeight: true,
__experimentalFontFamily: true,
__experimentalFontWeight: true,
__experimentalFontStyle: true,
__experimentalTextTransform: true,
__experimentalTextDecoration: true,
__experimentalLetterSpacing: true,
__experimentalWritingMode: true,
__experimentalDefaultControls: {
fontSize: true
}
},
reusable: false,
shadow: {
__experimentalSkipSerialization: true
},
spacing: {
__experimentalSkipSerialization: true,
padding: ["horizontal", "vertical"],
__experimentalDefaultControls: {
padding: true
}
},
__experimentalBorder: {
color: true,
radius: true,
style: true,
width: true,
__experimentalSkipSerialization: true,
__experimentalDefaultControls: {
color: true,
radius: true,
style: true,
width: true
}
},
__experimentalSelector: ".wp-block-button__link",
interactivity: {
clientNavigation: true
}
},
save({ attributes: attributes2, className }) {
const {
tagName,
type,
textAlign,
fontSize,
linkTarget,
rel,
style: style2,
text,
title,
url,
width
} = attributes2;
const TagName2 = tagName || "a";
const isButtonTag = "button" === TagName2;
const buttonType = type || "button";
const borderProps = (0, import_block_editor19.__experimentalGetBorderClassesAndStyles)(attributes2);
const colorProps = (0, import_block_editor19.__experimentalGetColorClassesAndStyles)(attributes2);
const spacingProps = (0, import_block_editor19.__experimentalGetSpacingClassesAndStyles)(attributes2);
const shadowProps = (0, import_block_editor19.__experimentalGetShadowClassesAndStyles)(attributes2);
const buttonClasses = clsx_default(
"wp-block-button__link",
colorProps.className,
borderProps.className,
{
[`has-text-align-${textAlign}`]: textAlign,
// For backwards compatibility add style that isn't provided via
// block support.
"no-border-radius": style2?.border?.radius === 0
},
(0, import_block_editor19.__experimentalGetElementClassName)("button")
);
const buttonStyle = {
...borderProps.style,
...colorProps.style,
...spacingProps.style,
...shadowProps.style
};
const wrapperClasses = clsx_default(className, {
[`has-custom-width wp-block-button__width-${width}`]: width,
[`has-custom-font-size`]: fontSize || style2?.typography?.fontSize
});
return /* @__PURE__ */ (0, import_jsx_runtime175.jsx)("div", { ...import_block_editor19.useBlockProps.save({ className: wrapperClasses }), children: /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(
import_block_editor19.RichText.Content,
{
tagName: TagName2,
type: isButtonTag ? buttonType : null,
className: buttonClasses,
href: isButtonTag ? null : url,
title,
style: buttonStyle,
value: text,
target: isButtonTag ? null : linkTarget,
rel: isButtonTag ? null : rel
}
) });
}
};
var v11 = {
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: true,
align: true,
alignWide: false,
color: {
__experimentalSkipSerialization: true,
gradients: true,
__experimentalDefaultControls: {
background: true,
text: true
}
},
typography: {
fontSize: true,
__experimentalFontFamily: true,
__experimentalDefaultControls: {
fontSize: true
}
},
reusable: false,
spacing: {
__experimentalSkipSerialization: true,
padding: ["horizontal", "vertical"],
__experimentalDefaultControls: {
padding: true
}
},
__experimentalBorder: {
radius: true,
__experimentalSkipSerialization: true,
__experimentalDefaultControls: {
radius: true
}
},
__experimentalSelector: ".wp-block-button__link"
},
save({ attributes: attributes2, className }) {
const { fontSize, linkTarget, rel, style: style2, text, title, url, width } = attributes2;
if (!text) {
return null;
}
const borderProps = (0, import_block_editor19.__experimentalGetBorderClassesAndStyles)(attributes2);
const colorProps = (0, import_block_editor19.__experimentalGetColorClassesAndStyles)(attributes2);
const spacingProps = (0, import_block_editor19.__experimentalGetSpacingClassesAndStyles)(attributes2);
const buttonClasses = clsx_default(
"wp-block-button__link",
colorProps.className,
borderProps.className,
{
// For backwards compatibility add style that isn't provided via
// block support.
"no-border-radius": style2?.border?.radius === 0
}
);
const buttonStyle = {
...borderProps.style,
...colorProps.style,
...spacingProps.style
};
const wrapperClasses = clsx_default(className, {
[`has-custom-width wp-block-button__width-${width}`]: width,
[`has-custom-font-size`]: fontSize || style2?.typography?.fontSize
});
return /* @__PURE__ */ (0, import_jsx_runtime175.jsx)("div", { ...import_block_editor19.useBlockProps.save({ className: wrapperClasses }), children: /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(
import_block_editor19.RichText.Content,
{
tagName: "a",
className: buttonClasses,
href: url,
title,
style: buttonStyle,
value: text,
target: linkTarget,
rel
}
) });
}
};
var v10 = {
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: true,
align: true,
alignWide: false,
color: {
__experimentalSkipSerialization: true,
gradients: true
},
typography: {
fontSize: true,
__experimentalFontFamily: true
},
reusable: false,
spacing: {
__experimentalSkipSerialization: true,
padding: ["horizontal", "vertical"],
__experimentalDefaultControls: {
padding: true
}
},
__experimentalBorder: {
radius: true,
__experimentalSkipSerialization: true
},
__experimentalSelector: ".wp-block-button__link"
},
save({ attributes: attributes2, className }) {
const { fontSize, linkTarget, rel, style: style2, text, title, url, width } = attributes2;
if (!text) {
return null;
}
const borderProps = (0, import_block_editor19.__experimentalGetBorderClassesAndStyles)(attributes2);
const colorProps = (0, import_block_editor19.__experimentalGetColorClassesAndStyles)(attributes2);
const spacingProps = (0, import_block_editor19.__experimentalGetSpacingClassesAndStyles)(attributes2);
const buttonClasses = clsx_default(
"wp-block-button__link",
colorProps.className,
borderProps.className,
{
// For backwards compatibility add style that isn't provided via
// block support.
"no-border-radius": style2?.border?.radius === 0
}
);
const buttonStyle = {
...borderProps.style,
...colorProps.style,
...spacingProps.style
};
const wrapperClasses = clsx_default(className, {
[`has-custom-width wp-block-button__width-${width}`]: width,
[`has-custom-font-size`]: fontSize || style2?.typography?.fontSize
});
return /* @__PURE__ */ (0, import_jsx_runtime175.jsx)("div", { ...import_block_editor19.useBlockProps.save({ className: wrapperClasses }), children: /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(
import_block_editor19.RichText.Content,
{
tagName: "a",
className: buttonClasses,
href: url,
title,
style: buttonStyle,
value: text,
target: linkTarget,
rel
}
) });
},
migrate: migrate_font_family_default,
isEligible({ style: style2 }) {
return style2?.typography?.fontFamily;
}
};
var deprecated = [
v13,
v12,
v11,
v10,
{
supports: {
anchor: true,
align: true,
alignWide: false,
color: {
__experimentalSkipSerialization: true,
gradients: true
},
typography: {
fontSize: true,
__experimentalFontFamily: true
},
reusable: false,
__experimentalSelector: ".wp-block-button__link"
},
attributes: {
...blockAttributes,
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: style2 }) {
return typeof style2?.border?.radius === "number";
},
save({ attributes: attributes2, className }) {
const {
fontSize,
linkTarget,
rel,
style: style2,
text,
title,
url,
width
} = attributes2;
if (!text) {
return null;
}
const borderRadius = style2?.border?.radius;
const colorProps = (0, import_block_editor19.__experimentalGetColorClassesAndStyles)(attributes2);
const buttonClasses = clsx_default(
"wp-block-button__link",
colorProps.className,
{
"no-border-radius": style2?.border?.radius === 0
}
);
const buttonStyle = {
borderRadius: borderRadius ? borderRadius : void 0,
...colorProps.style
};
const wrapperClasses = clsx_default(className, {
[`has-custom-width wp-block-button__width-${width}`]: width,
[`has-custom-font-size`]: fontSize || style2?.typography?.fontSize
});
return /* @__PURE__ */ (0, import_jsx_runtime175.jsx)("div", { ...import_block_editor19.useBlockProps.save({ className: wrapperClasses }), children: /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(
import_block_editor19.RichText.Content,
{
tagName: "a",
className: buttonClasses,
href: url,
title,
style: buttonStyle,
value: text,
target: linkTarget,
rel
}
) });
},
migrate: (0, import_compose6.compose)(migrate_font_family_default, migrateBorderRadius)
},
{
supports: {
anchor: true,
align: true,
alignWide: false,
color: {
__experimentalSkipSerialization: true
},
reusable: false,
__experimentalSelector: ".wp-block-button__link"
},
attributes: {
...blockAttributes,
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: attributes2, className }) {
const { borderRadius, linkTarget, rel, text, title, url, width } = attributes2;
const colorProps = (0, import_block_editor19.__experimentalGetColorClassesAndStyles)(attributes2);
const buttonClasses = clsx_default(
"wp-block-button__link",
colorProps.className,
{
"no-border-radius": borderRadius === 0
}
);
const buttonStyle = {
borderRadius: borderRadius ? borderRadius + "px" : void 0,
...colorProps.style
};
const wrapperClasses = clsx_default(className, {
[`has-custom-width wp-block-button__width-${width}`]: width
});
return /* @__PURE__ */ (0, import_jsx_runtime175.jsx)("div", { ...import_block_editor19.useBlockProps.save({ className: wrapperClasses }), children: /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(
import_block_editor19.RichText.Content,
{
tagName: "a",
className: buttonClasses,
href: url,
title,
style: buttonStyle,
value: text,
target: linkTarget,
rel
}
) });
},
migrate: (0, import_compose6.compose)(migrate_font_family_default, migrateBorderRadius)
},
{
supports: {
anchor: true,
align: true,
alignWide: false,
color: {
__experimentalSkipSerialization: true
},
reusable: false,
__experimentalSelector: ".wp-block-button__link"
},
attributes: {
...blockAttributes,
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: attributes2, className }) {
const { borderRadius, linkTarget, rel, text, title, url, width } = attributes2;
const colorProps = (0, import_block_editor19.__experimentalGetColorClassesAndStyles)(attributes2);
const buttonClasses = clsx_default(
"wp-block-button__link",
colorProps.className,
{
"no-border-radius": borderRadius === 0
}
);
const buttonStyle = {
borderRadius: borderRadius ? borderRadius + "px" : void 0,
...colorProps.style
};
const wrapperClasses = clsx_default(className, {
[`has-custom-width wp-block-button__width-${width}`]: width
});
return /* @__PURE__ */ (0, import_jsx_runtime175.jsx)("div", { ...import_block_editor19.useBlockProps.save({ className: wrapperClasses }), children: /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(
import_block_editor19.RichText.Content,
{
tagName: "a",
className: buttonClasses,
href: url,
title,
style: buttonStyle,
value: text,
target: linkTarget,
rel
}
) });
},
migrate: (0, import_compose6.compose)(migrate_font_family_default, migrateBorderRadius)
},
{
supports: {
align: true,
alignWide: false,
color: { gradients: true }
},
attributes: {
...blockAttributes,
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: attributes2 }) {
const { borderRadius, linkTarget, rel, text, title, url } = attributes2;
const buttonClasses = clsx_default("wp-block-button__link", {
"no-border-radius": borderRadius === 0
});
const buttonStyle = {
borderRadius: borderRadius ? borderRadius + "px" : void 0
};
return /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(
import_block_editor19.RichText.Content,
{
tagName: "a",
className: buttonClasses,
href: url,
title,
style: buttonStyle,
value: text,
target: linkTarget,
rel
}
);
},
migrate: migrateBorderRadius
},
{
supports: {
align: true,
alignWide: false
},
attributes: {
...blockAttributes,
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: (attributes2) => !!attributes2.customTextColor || !!attributes2.customBackgroundColor || !!attributes2.customGradient || !!attributes2.align,
migrate: (0, import_compose6.compose)(
migrateBorderRadius,
migrateCustomColorsAndGradients,
migrateAlign
),
save({ attributes: attributes2 }) {
const {
backgroundColor,
borderRadius,
customBackgroundColor,
customTextColor,
customGradient,
linkTarget,
gradient,
rel,
text,
textColor,
title,
url
} = attributes2;
const textClass = (0, import_block_editor19.getColorClassName)("color", textColor);
const backgroundClass = !customGradient && (0, import_block_editor19.getColorClassName)("background-color", backgroundColor);
const gradientClass = (0, import_block_editor19.__experimentalGetGradientClass)(gradient);
const buttonClasses = clsx_default("wp-block-button__link", {
"has-text-color": textColor || customTextColor,
[textClass]: textClass,
"has-background": backgroundColor || customBackgroundColor || customGradient || gradient,
[backgroundClass]: backgroundClass,
"no-border-radius": borderRadius === 0,
[gradientClass]: gradientClass
});
const buttonStyle = {
background: customGradient ? customGradient : void 0,
backgroundColor: backgroundClass || customGradient || gradient ? void 0 : customBackgroundColor,
color: textClass ? void 0 : customTextColor,
borderRadius: borderRadius ? borderRadius + "px" : void 0
};
return /* @__PURE__ */ (0, import_jsx_runtime175.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(
import_block_editor19.RichText.Content,
{
tagName: "a",
className: buttonClasses,
href: url,
title,
style: buttonStyle,
value: text,
target: linkTarget,
rel
}
) });
}
},
{
attributes: {
...blockAttributes,
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(attribute) {
return attribute.className && attribute.className.includes("is-style-squared");
},
migrate(attributes2) {
let newClassName = attributes2.className;
if (newClassName) {
newClassName = newClassName.replace(/is-style-squared[\s]?/, "").trim();
}
return migrateBorderRadius(
migrateCustomColorsAndGradients({
...attributes2,
className: newClassName ? newClassName : void 0,
borderRadius: 0
})
);
},
save({ attributes: attributes2 }) {
const {
backgroundColor,
customBackgroundColor,
customTextColor,
linkTarget,
rel,
text,
textColor,
title,
url
} = attributes2;
const textClass = (0, import_block_editor19.getColorClassName)("color", textColor);
const backgroundClass = (0, import_block_editor19.getColorClassName)(
"background-color",
backgroundColor
);
const buttonClasses = clsx_default("wp-block-button__link", {
"has-text-color": textColor || customTextColor,
[textClass]: textClass,
"has-background": backgroundColor || customBackgroundColor,
[backgroundClass]: backgroundClass
});
const buttonStyle = {
backgroundColor: backgroundClass ? void 0 : customBackgroundColor,
color: textClass ? void 0 : customTextColor
};
return /* @__PURE__ */ (0, import_jsx_runtime175.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(
import_block_editor19.RichText.Content,
{
tagName: "a",
className: buttonClasses,
href: url,
title,
style: buttonStyle,
value: text,
target: linkTarget,
rel
}
) });
}
},
{
attributes: {
...blockAttributes,
align: {
type: "string",
default: "none"
},
backgroundColor: {
type: "string"
},
textColor: {
type: "string"
},
customBackgroundColor: {
type: "string"
},
customTextColor: {
type: "string"
}
},
migrate: oldColorsMigration,
save({ attributes: attributes2 }) {
const {
url,
text,
title,
backgroundColor,
textColor,
customBackgroundColor,
customTextColor
} = attributes2;
const textClass = (0, import_block_editor19.getColorClassName)("color", textColor);
const backgroundClass = (0, import_block_editor19.getColorClassName)(
"background-color",
backgroundColor
);
const buttonClasses = clsx_default("wp-block-button__link", {
"has-text-color": textColor || customTextColor,
[textClass]: textClass,
"has-background": backgroundColor || customBackgroundColor,
[backgroundClass]: backgroundClass
});
const buttonStyle = {
backgroundColor: backgroundClass ? void 0 : customBackgroundColor,
color: textClass ? void 0 : customTextColor
};
return /* @__PURE__ */ (0, import_jsx_runtime175.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(
import_block_editor19.RichText.Content,
{
tagName: "a",
className: buttonClasses,
href: url,
title,
style: buttonStyle,
value: text
}
) });
}
},
{
attributes: {
...blockAttributes,
color: {
type: "string"
},
textColor: {
type: "string"
},
align: {
type: "string",
default: "none"
}
},
save({ attributes: attributes2 }) {
const { url, text, title, align, color, textColor } = attributes2;
const buttonStyle = {
backgroundColor: color,
color: textColor
};
const linkClass = "wp-block-button__link";
return /* @__PURE__ */ (0, import_jsx_runtime175.jsx)("div", { className: `align${align}`, children: /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(
import_block_editor19.RichText.Content,
{
tagName: "a",
className: linkClass,
href: url,
title,
style: buttonStyle,
value: text
}
) });
},
migrate: oldColorsMigration
},
{
attributes: {
...blockAttributes,
color: {
type: "string"
},
textColor: {
type: "string"
},
align: {
type: "string",
default: "none"
}
},
save({ attributes: attributes2 }) {
const { url, text, title, align, color, textColor } = attributes2;
return /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(
"div",
{
className: `align${align}`,
style: { backgroundColor: color },
children: /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(
import_block_editor19.RichText.Content,
{
tagName: "a",
href: url,
title,
style: { color: textColor },
value: text
}
)
}
);
},
migrate: oldColorsMigration
}
];
var deprecated_default3 = deprecated;
// packages/block-library/build-module/button/edit.mjs
var import_i18n13 = __toESM(require_i18n(), 1);
var import_element10 = __toESM(require_element(), 1);
var import_components10 = __toESM(require_components(), 1);
var import_block_editor21 = __toESM(require_block_editor(), 1);
var import_keycodes = __toESM(require_keycodes(), 1);
var import_blocks7 = __toESM(require_blocks(), 1);
var import_compose8 = __toESM(require_compose(), 1);
var import_data11 = __toESM(require_data(), 1);
// packages/block-library/build-module/button/constants.mjs
var NEW_TAB_REL = "noreferrer noopener";
var NEW_TAB_TARGET = "_blank";
var NOFOLLOW_REL = "nofollow";
// packages/block-library/build-module/button/get-updated-link-attributes.mjs
var import_url2 = __toESM(require_url(), 1);
function getUpdatedLinkAttributes({
rel = "",
url = "",
opensInNewTab,
nofollow
}) {
let newLinkTarget;
let updatedRel = rel;
if (opensInNewTab) {
newLinkTarget = NEW_TAB_TARGET;
updatedRel = updatedRel?.includes(NEW_TAB_REL) ? updatedRel : updatedRel + ` ${NEW_TAB_REL}`;
} else {
const relRegex = new RegExp(`\\b${NEW_TAB_REL}\\s*`, "g");
updatedRel = updatedRel?.replace(relRegex, "").trim();
}
if (nofollow) {
updatedRel = updatedRel?.includes(NOFOLLOW_REL) ? updatedRel : (updatedRel + ` ${NOFOLLOW_REL}`).trim();
} else {
const relRegex = new RegExp(`\\b${NOFOLLOW_REL}\\s*`, "g");
updatedRel = updatedRel?.replace(relRegex, "").trim();
}
return {
url: (0, import_url2.prependHTTPS)(url),
linkTarget: newLinkTarget,
rel: updatedRel || void 0
};
}
// packages/block-library/build-module/utils/remove-anchor-tag.mjs
function removeAnchorTag(value) {
return value.toString().replace(/<\/?a[^>]*>/g, "");
}
// packages/block-library/build-module/utils/deprecated-text-align-attributes.mjs
var import_compose7 = __toESM(require_compose(), 1);
var import_element9 = __toESM(require_element(), 1);
var import_deprecated3 = __toESM(require_deprecated(), 1);
var import_data10 = __toESM(require_data(), 1);
var import_block_editor20 = __toESM(require_block_editor(), 1);
function useDeprecatedTextAlign(props) {
const { name: name123, attributes: attributes2, setAttributes } = props;
const { textAlign } = attributes2;
const { __unstableMarkNextChangeAsNotPersistent } = (0, import_data10.useDispatch)(import_block_editor20.store);
const updateStyleWithAlign = (0, import_compose7.useEvent)(() => {
(0, import_deprecated3.default)(`textAlign attribute in ${name123}`, {
alternative: "style.typography.textAlign",
since: "7.0"
});
__unstableMarkNextChangeAsNotPersistent();
setAttributes((currentAttr) => ({
style: {
...currentAttr.style,
typography: {
...currentAttr.style?.typography,
textAlign
}
}
}));
});
const lastUpdatedAlignRef = (0, import_element9.useRef)();
(0, import_element9.useEffect)(() => {
if (textAlign === lastUpdatedAlignRef.current) {
return;
}
lastUpdatedAlignRef.current = textAlign;
updateStyleWithAlign();
}, [textAlign, updateStyleWithAlign]);
}
// packages/block-library/build-module/button/edit.mjs
var import_jsx_runtime176 = __toESM(require_jsx_runtime(), 1);
var { HTMLElementControl } = unlock(import_block_editor21.privateApis);
var LINK_SETTINGS = [
...import_block_editor21.LinkControl.DEFAULT_LINK_SETTINGS,
{
id: "nofollow",
title: (0, import_i18n13.__)("Mark as nofollow")
}
];
function useEnter(props) {
const { replaceBlocks, selectionChange } = (0, import_data11.useDispatch)(import_block_editor21.store);
const { getBlock, getBlockRootClientId, getBlockIndex } = (0, import_data11.useSelect)(import_block_editor21.store);
const propsRef = (0, import_element10.useRef)(props);
propsRef.current = props;
return (0, import_compose8.useRefEffect)((element) => {
function onKeyDown(event) {
if (event.defaultPrevented || event.keyCode !== import_keycodes.ENTER) {
return;
}
const { content, clientId } = propsRef.current;
if (content.length) {
return;
}
event.preventDefault();
const topParentListBlock = getBlock(
getBlockRootClientId(clientId)
);
const blockIndex = getBlockIndex(clientId);
const head = (0, import_blocks7.cloneBlock)({
...topParentListBlock,
innerBlocks: topParentListBlock.innerBlocks.slice(
0,
blockIndex
)
});
const middle = (0, import_blocks7.createBlock)((0, import_blocks7.getDefaultBlockName)());
const after = topParentListBlock.innerBlocks.slice(
blockIndex + 1
);
const tail = after.length ? [
(0, import_blocks7.cloneBlock)({
...topParentListBlock,
innerBlocks: after
})
] : [];
replaceBlocks(
topParentListBlock.clientId,
[head, middle, ...tail],
1
);
selectionChange(middle.clientId);
}
element.addEventListener("keydown", onKeyDown);
return () => {
element.removeEventListener("keydown", onKeyDown);
};
}, []);
}
function WidthPanel({ selectedWidth, setAttributes }) {
const dropdownMenuProps = useToolsPanelDropdownMenuProps();
return /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(
import_components10.__experimentalToolsPanel,
{
label: (0, import_i18n13.__)("Settings"),
resetAll: () => setAttributes({ width: void 0 }),
dropdownMenuProps,
children: /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(
import_components10.__experimentalToolsPanelItem,
{
label: (0, import_i18n13.__)("Width"),
isShownByDefault: true,
hasValue: () => !!selectedWidth,
onDeselect: () => setAttributes({ width: void 0 }),
children: /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(
import_components10.__experimentalToggleGroupControl,
{
label: (0, import_i18n13.__)("Width"),
value: selectedWidth,
onChange: (newWidth) => setAttributes({ width: newWidth }),
isBlock: true,
__next40pxDefaultSize: true,
children: [25, 50, 75, 100].map((widthValue) => {
return /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(
import_components10.__experimentalToggleGroupControlOption,
{
value: widthValue,
label: (0, import_i18n13.sprintf)(
/* translators: %d: Percentage value. */
(0, import_i18n13.__)("%d%%"),
widthValue
)
},
widthValue
);
})
}
)
}
)
}
);
}
function ButtonEdit(props) {
const {
attributes: attributes2,
setAttributes,
className,
isSelected,
onReplace,
mergeBlocks,
clientId,
context
} = props;
const {
tagName,
linkTarget,
placeholder: placeholder2,
rel,
style: style2,
text,
url,
width,
metadata
} = attributes2;
useDeprecatedTextAlign(props);
const TagName2 = tagName || "a";
function onKeyDown(event) {
if (import_keycodes.isKeyboardEvent.primary(event, "k")) {
startEditing(event);
} else if (import_keycodes.isKeyboardEvent.primaryShift(event, "k")) {
unlink();
richTextRef.current?.focus();
}
}
const [popoverAnchor, setPopoverAnchor] = (0, import_element10.useState)(null);
const borderProps = (0, import_block_editor21.__experimentalUseBorderProps)(attributes2);
const colorProps = (0, import_block_editor21.__experimentalUseColorProps)(attributes2);
const spacingProps = (0, import_block_editor21.__experimentalGetSpacingClassesAndStyles)(attributes2);
const shadowProps = (0, import_block_editor21.__experimentalGetShadowClassesAndStyles)(attributes2);
const ref = (0, import_element10.useRef)();
const richTextRef = (0, import_element10.useRef)();
const blockProps = (0, import_block_editor21.useBlockProps)({
ref: (0, import_compose8.useMergeRefs)([setPopoverAnchor, ref]),
onKeyDown
});
const blockEditingMode = (0, import_block_editor21.useBlockEditingMode)();
const [isEditingURL, setIsEditingURL] = (0, import_element10.useState)(false);
const isURLSet = !!url;
const opensInNewTab = linkTarget === NEW_TAB_TARGET;
const nofollow = !!rel?.includes(NOFOLLOW_REL);
const isLinkTag = "a" === TagName2;
const {
createPageEntity,
userCanCreatePages,
lockUrlControls = false
} = (0, import_data11.useSelect)(
(select9) => {
if (!isSelected) {
return {};
}
const _settings = select9(import_block_editor21.store).getSettings();
const blockBindingsSource = (0, import_blocks7.getBlockBindingsSource)(
metadata?.bindings?.url?.source
);
return {
createPageEntity: _settings.__experimentalCreatePageEntity,
userCanCreatePages: _settings.__experimentalUserCanCreatePages,
lockUrlControls: !!metadata?.bindings?.url && !blockBindingsSource?.canUserEditValue?.({
select: select9,
context,
args: metadata?.bindings?.url?.args
})
};
},
[context, isSelected, metadata?.bindings?.url]
);
async function handleCreate(pageTitle) {
const page = await createPageEntity({
title: pageTitle,
status: "draft"
});
return {
id: page.id,
type: page.type,
title: page.title.rendered,
url: page.link,
kind: "post-type"
};
}
function createButtonText(searchTerm) {
return (0, import_element10.createInterpolateElement)(
(0, import_i18n13.sprintf)(
/* translators: %s: search term. */
(0, import_i18n13.__)("Create page: %s"),
searchTerm
),
{ mark: /* @__PURE__ */ (0, import_jsx_runtime176.jsx)("mark", {}) }
);
}
function startEditing(event) {
event.preventDefault();
setIsEditingURL(true);
}
function unlink() {
setAttributes({
url: void 0,
linkTarget: void 0,
rel: void 0
});
setIsEditingURL(false);
}
(0, import_element10.useEffect)(() => {
if (!isSelected) {
setIsEditingURL(false);
}
}, [isSelected]);
const linkValue = (0, import_element10.useMemo)(
() => ({ url, opensInNewTab, nofollow }),
[url, opensInNewTab, nofollow]
);
const useEnterRef = useEnter({ content: text, clientId });
const mergedRef = (0, import_compose8.useMergeRefs)([useEnterRef, richTextRef]);
const [fluidTypographySettings, layout] = (0, import_block_editor21.useSettings)(
"typography.fluid",
"layout"
);
const typographyProps = (0, import_block_editor21.getTypographyClassesAndStyles)(attributes2, {
typography: {
fluid: fluidTypographySettings
},
layout: {
wideSize: layout?.wideSize
}
});
const hasNonContentControls = blockEditingMode === "default";
const hasBlockControls = hasNonContentControls || isLinkTag && !lockUrlControls;
return /* @__PURE__ */ (0, import_jsx_runtime176.jsxs)(import_jsx_runtime176.Fragment, { children: [
/* @__PURE__ */ (0, import_jsx_runtime176.jsx)(
"div",
{
...blockProps,
className: clsx_default(blockProps.className, {
[`has-custom-width wp-block-button__width-${width}`]: width
}),
children: /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(
import_block_editor21.RichText,
{
ref: mergedRef,
"aria-label": (0, import_i18n13.__)("Button text"),
placeholder: placeholder2 || (0, import_i18n13.__)("Add text\u2026"),
value: text,
onChange: (value) => setAttributes({
text: removeAnchorTag(value)
}),
withoutInteractiveFormatting: true,
className: clsx_default(
className,
"wp-block-button__link",
colorProps.className,
borderProps.className,
typographyProps.className,
{
// For backwards compatibility add style that isn't
// provided via block support.
"no-border-radius": style2?.border?.radius === 0,
[`has-custom-font-size`]: blockProps.style.fontSize
},
(0, import_block_editor21.__experimentalGetElementClassName)("button")
),
style: {
...borderProps.style,
...colorProps.style,
...spacingProps.style,
...shadowProps.style,
...typographyProps.style,
writingMode: void 0
},
onReplace,
onMerge: mergeBlocks,
identifier: "text"
}
)
}
),
hasBlockControls && /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(import_block_editor21.BlockControls, { group: "block", children: isLinkTag && !lockUrlControls && /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(
import_components10.ToolbarButton,
{
name: "link",
icon: !isURLSet ? link_default : link_off_default,
title: !isURLSet ? (0, import_i18n13.__)("Link") : (0, import_i18n13.__)("Unlink"),
shortcut: !isURLSet ? import_keycodes.displayShortcut.primary("k") : import_keycodes.displayShortcut.primaryShift("k"),
onClick: !isURLSet ? startEditing : unlink,
isActive: isURLSet
}
) }),
isLinkTag && isSelected && (isEditingURL || isURLSet) && !lockUrlControls && /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(
import_components10.Popover,
{
placement: "bottom",
onClose: () => {
setIsEditingURL(false);
richTextRef.current?.focus();
},
anchor: popoverAnchor,
focusOnMount: isEditingURL ? "firstElement" : false,
__unstableSlotName: "__unstable-block-tools-after",
shift: true,
children: /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(
import_block_editor21.LinkControl,
{
value: linkValue,
onChange: ({
url: newURL,
opensInNewTab: newOpensInNewTab,
nofollow: newNofollow
}) => setAttributes(
getUpdatedLinkAttributes({
rel,
url: newURL,
opensInNewTab: newOpensInNewTab,
nofollow: newNofollow
})
),
onRemove: () => {
unlink();
richTextRef.current?.focus();
},
forceIsEditingLink: isEditingURL,
settings: LINK_SETTINGS,
createSuggestion: createPageEntity && handleCreate,
withCreateSuggestion: userCanCreatePages,
createSuggestionButtonText: createButtonText
}
)
}
),
/* @__PURE__ */ (0, import_jsx_runtime176.jsx)(import_block_editor21.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(
WidthPanel,
{
selectedWidth: width,
setAttributes
}
) }),
/* @__PURE__ */ (0, import_jsx_runtime176.jsxs)(import_block_editor21.InspectorControls, { group: "advanced", children: [
/* @__PURE__ */ (0, import_jsx_runtime176.jsx)(
HTMLElementControl,
{
tagName,
onChange: (value) => setAttributes({ tagName: value }),
options: [
{ label: (0, import_i18n13.__)("Default ()"), value: "a" },
{ label: "