| 1 |
"use strict";var wp;(wp||={}).blockEditor=(()=>{var Gge=Object.create;var H0=Object.defineProperty;var Wge=Object.getOwnPropertyDescriptor;var $ge=Object.getOwnPropertyNames;var Kge=Object.getPrototypeOf,Yge=Object.prototype.hasOwnProperty;var ie=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),xa=(e,t)=>{for(var o in t)H0(e,o,{get:t[o],enumerable:!0})},Uj=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of $ge(t))!Yge.call(e,n)&&n!==o&&H0(e,n,{get:()=>t[n],enumerable:!(r=Wge(t,n))||r.enumerable});return e};var l=(e,t,o)=>(o=e!=null?Gge(Kge(e)):{},Uj(t||!e||!e.__esModule?H0(o,"default",{value:e,enumerable:!0}):o,e)),qge=e=>Uj(H0({},"__esModule",{value:!0}),e);var Y=ie((qDe,Gj)=>{Gj.exports=window.wp.blocks});var O=ie((ZDe,Wj)=>{Wj.exports=window.wp.element});var z=ie((XDe,$j)=>{$j.exports=window.wp.data});var X=ie((QDe,Kj)=>{Kj.exports=window.wp.compose});var pt=ie((JDe,Yj)=>{Yj.exports=window.wp.hooks});var A=ie((nVe,i8)=>{i8.exports=window.wp.components});var EA=ie((iVe,s8)=>{s8.exports=window.wp.privateApis});var Re=ie((fVe,d8)=>{d8.exports=window.wp.deprecated});var w=ie((mVe,f8)=>{f8.exports=window.ReactJSXRuntime});var qn=ie((hVe,p8)=>{p8.exports=window.wp.url});var N=ie((BVe,_8)=>{_8.exports=window.wp.i18n});var Wf=ie((EVe,S8)=>{"use strict";S8.exports=function e(t,o){if(t===o)return!0;if(t&&o&&typeof t=="object"&&typeof o=="object"){if(t.constructor!==o.constructor)return!1;var r,n,i;if(Array.isArray(t)){if(r=t.length,r!=o.length)return!1;for(n=r;n--!==0;)if(!e(t[n],o[n]))return!1;return!0}if(t instanceof Map&&o instanceof Map){if(t.size!==o.size)return!1;for(n of t.entries())if(!o.has(n[0]))return!1;for(n of t.entries())if(!e(n[1],o.get(n[0])))return!1;return!0}if(t instanceof Set&&o instanceof Set){if(t.size!==o.size)return!1;for(n of t.entries())if(!o.has(n[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(o)){if(r=t.length,r!=o.length)return!1;for(n=r;n--!==0;)if(t[n]!==o[n])return!1;return!0}if(t.constructor===RegExp)return t.source===o.source&&t.flags===o.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===o.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===o.toString();if(i=Object.keys(t),r=i.length,r!==Object.keys(o).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(o,i[n]))return!1;for(n=r;n--!==0;){var s=i[n];if(!e(t[s],o[s]))return!1}return!0}return t!==t&&o!==o}});var Z=ie((DVe,N8)=>{N8.exports=window.wp.primitives});var yr=ie((o6e,M8)=>{M8.exports=window.wp.richText});var V8=ie((r6e,D8)=>{D8.exports=window.wp.blockSerializationDefaultParser});var ir=ie((A6e,y9)=>{y9.exports=window.wp.a11y});var Xn=ie((L6e,B9)=>{B9.exports=window.wp.notices});var wh=ie((N6e,E9)=>{E9.exports=window.wp.preferences});var u7=ie((Lje,EC)=>{var a7={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u1EA4:"A",\u1EAE:"A",\u1EB2:"A",\u1EB4:"A",\u1EB6:"A",\u00C6:"AE",\u1EA6:"A",\u1EB0:"A",\u0202:"A",\u1EA2:"A",\u1EA0:"A",\u1EA8:"A",\u1EAA:"A",\u1EAC:"A",\u00C7:"C",\u1E08:"C",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"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",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u1E2E:"I",\u020A:"I",\u1EC8:"I",\u1ECA:"I",\u00D0:"D",\u00D1:"N",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"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",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u1EE6:"U",\u1EE4:"U",\u1EEC:"U",\u1EEE:"U",\u1EF0:"U",\u00DD:"Y",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u1EA5:"a",\u1EAF:"a",\u1EB3:"a",\u1EB5:"a",\u1EB7:"a",\u00E6:"ae",\u1EA7:"a",\u1EB1:"a",\u0203:"a",\u1EA3:"a",\u1EA1:"a",\u1EA9:"a",\u1EAB:"a",\u1EAD:"a",\u00E7:"c",\u1E09:"c",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"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",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u1E2F:"i",\u020B:"i",\u1EC9:"i",\u1ECB:"i",\u00F0:"d",\u00F1:"n",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"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",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u1EE7:"u",\u1EE5:"u",\u1EED:"u",\u1EEF:"u",\u1EF1:"u",\u00FD:"y",\u00FF:"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",\u00DE:"TH",\u00FE:"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",\u00CA\u030C:"E",\u00EA\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"},l7=Object.keys(a7).join("|"),sSe=new RegExp(l7,"g"),aSe=new RegExp(l7,"");function lSe(e){return a7[e]}var c7=function(e){return e.replace(sSe,lSe)},cSe=function(e){return!!e.match(aSe)};EC.exports=c7;EC.exports.has=cSe;EC.exports.remove=c7});var fy=ie((C8e,M7)=>{M7.exports=window.wp.styleEngine});var ot=ie((C9e,iU)=>{iU.exports=window.wp.keycodes});var Ve=ie((G9e,kU)=>{kU.exports=window.wp.dom});var _U=ie(A5=>{"use strict";Object.defineProperty(A5,"__esModule",{value:!0});A5.default=yU;function yU(){}yU.prototype={diff:function(t,o){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=r.callback;typeof r=="function"&&(n=r,r={}),this.options=r;var i=this;function s(g){return n?(setTimeout(function(){n(void 0,g)},0),!0):g}t=this.castInput(t),o=this.castInput(o),t=this.removeEmpty(this.tokenize(t)),o=this.removeEmpty(this.tokenize(o));var a=o.length,c=t.length,u=1,d=a+c,f=[{newPos:-1,components:[]}],m=this.extractCommon(f[0],o,t,0);if(f[0].newPos+1>=a&&m+1>=c)return s([{value:this.join(o),count:o.length}]);function h(){for(var g=-1*u;g<=u;g+=2){var b=void 0,k=f[g-1],v=f[g+1],y=(v?v.newPos:0)-g;k&&(f[g-1]=void 0);var _=k&&k.newPos+1<a,S=v&&0<=y&&y<c;if(!_&&!S){f[g]=void 0;continue}if(!_||S&&k.newPos<v.newPos?(b=JSe(v),i.pushComponent(b.components,void 0,!0)):(b=k,b.newPos++,i.pushComponent(b.components,!0,void 0)),y=i.extractCommon(b,o,t,g),b.newPos+1>=a&&y+1>=c)return s(QSe(i,b.components,o,t,i.useLongestToken));f[g]=b}u++}if(n)(function g(){setTimeout(function(){if(u>d)return n();h()||g()},0)})();else for(;u<=d;){var p=h();if(p)return p}},pushComponent:function(t,o,r){var n=t[t.length-1];n&&n.added===o&&n.removed===r?t[t.length-1]={count:n.count+1,added:o,removed:r}:t.push({count:1,added:o,removed:r})},extractCommon:function(t,o,r,n){for(var i=o.length,s=r.length,a=t.newPos,c=a-n,u=0;a+1<i&&c+1<s&&this.equals(o[a+1],r[c+1]);)a++,c++,u++;return u&&t.components.push({count:u}),t.newPos=a,c},equals:function(t,o){return this.options.comparator?this.options.comparator(t,o):t===o||this.options.ignoreCase&&t.toLowerCase()===o.toLowerCase()},removeEmpty:function(t){for(var o=[],r=0;r<t.length;r++)t[r]&&o.push(t[r]);return o},castInput:function(t){return t},tokenize:function(t){return t.split("")},join:function(t){return t.join("")}};function QSe(e,t,o,r,n){for(var i=0,s=t.length,a=0,c=0;i<s;i++){var u=t[i];if(u.removed){if(u.value=e.join(r.slice(c,c+u.count)),c+=u.count,i&&t[i-1].added){var f=t[i-1];t[i-1]=t[i],t[i]=f}}else{if(!u.added&&n){var d=o.slice(a,a+u.count);d=d.map(function(h,p){var g=r[c+p];return g.length>h.length?g:h}),u.value=e.join(d)}else u.value=e.join(o.slice(a,a+u.count));a+=u.count,u.added||(c+=u.count)}}var m=t[s-1];return s>1&&typeof m.value=="string"&&(m.added||m.removed)&&e.equals("",m.value)&&(t[s-2].value+=m.value,t.pop()),t}function JSe(e){return{newPos:e.newPos,components:e.components.slice(0)}}});var xU=ie(yy=>{"use strict";Object.defineProperty(yy,"__esModule",{value:!0});yy.diffChars=o0e;yy.characterDiff=void 0;var e0e=t0e(_U());function t0e(e){return e&&e.__esModule?e:{default:e}}var SU=new e0e.default;yy.characterDiff=SU;function o0e(e,t,o){return SU.diff(e,t,o)}});var He=ie((i7e,DU)=>{DU.exports=window.React});var FU=ie((s7e,VU)=>{"use strict";var s0e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";VU.exports=s0e});var HU=ie((a7e,UU)=>{"use strict";var a0e=FU();function zU(){}function jU(){}jU.resetWarningCache=zU;UU.exports=function(){function e(r,n,i,s,a,c){if(c!==a0e){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var o={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:jU,resetWarningCache:zU};return o.PropTypes=o,o}});var WU=ie((u7e,GU)=>{GU.exports=HU()();var l7e,c7e});var KU=ie((o1,$U)=>{(function(e,t){if(typeof define=="function"&&define.amd)define(["module","exports"],t);else if(typeof o1<"u")t($U,o1);else{var o={exports:{}};t(o,o.exports),e.autosize=o.exports}})(o1,function(e,t){"use strict";var o=typeof Map=="function"?new Map:(function(){var c=[],u=[];return{has:function(f){return c.indexOf(f)>-1},get:function(f){return u[c.indexOf(f)]},set:function(f,m){c.indexOf(f)===-1&&(c.push(f),u.push(m))},delete:function(f){var m=c.indexOf(f);m>-1&&(c.splice(m,1),u.splice(m,1))}}})(),r=function(u){return new Event(u,{bubbles:!0})};try{new Event("test")}catch{r=function(d){var f=document.createEvent("Event");return f.initEvent(d,!0,!1),f}}function n(c){if(!c||!c.nodeName||c.nodeName!=="TEXTAREA"||o.has(c))return;var u=null,d=null,f=null;function m(){var y=window.getComputedStyle(c,null);y.resize==="vertical"?c.style.resize="none":y.resize==="both"&&(c.style.resize="horizontal"),y.boxSizing==="content-box"?u=-(parseFloat(y.paddingTop)+parseFloat(y.paddingBottom)):u=parseFloat(y.borderTopWidth)+parseFloat(y.borderBottomWidth),isNaN(u)&&(u=0),b()}function h(y){{var _=c.style.width;c.style.width="0px",c.offsetWidth,c.style.width=_}c.style.overflowY=y}function p(y){for(var _=[];y&&y.parentNode&&y.parentNode instanceof Element;)y.parentNode.scrollTop&&_.push({node:y.parentNode,scrollTop:y.parentNode.scrollTop}),y=y.parentNode;return _}function g(){if(c.scrollHeight!==0){var y=p(c),_=document.documentElement&&document.documentElement.scrollTop;c.style.height="",c.style.height=c.scrollHeight+u+"px",d=c.clientWidth,y.forEach(function(S){S.node.scrollTop=S.scrollTop}),_&&(document.documentElement.scrollTop=_)}}function b(){g();var y=Math.round(parseFloat(c.style.height)),_=window.getComputedStyle(c,null),S=_.boxSizing==="content-box"?Math.round(parseFloat(_.height)):c.offsetHeight;if(S<y?_.overflowY==="hidden"&&(h("scroll"),g(),S=_.boxSizing==="content-box"?Math.round(parseFloat(window.getComputedStyle(c,null).height)):c.offsetHeight):_.overflowY!=="hidden"&&(h("hidden"),g(),S=_.boxSizing==="content-box"?Math.round(parseFloat(window.getComputedStyle(c,null).height)):c.offsetHeight),f!==S){f=S;var C=r("autosize:resized");try{c.dispatchEvent(C)}catch{}}}var k=function(){c.clientWidth!==d&&b()},v=function(y){window.removeEventListener("resize",k,!1),c.removeEventListener("input",b,!1),c.removeEventListener("keyup",b,!1),c.removeEventListener("autosize:destroy",v,!1),c.removeEventListener("autosize:update",b,!1),Object.keys(y).forEach(function(_){c.style[_]=y[_]}),o.delete(c)}.bind(c,{height:c.style.height,resize:c.style.resize,overflowY:c.style.overflowY,overflowX:c.style.overflowX,wordWrap:c.style.wordWrap});c.addEventListener("autosize:destroy",v,!1),"onpropertychange"in c&&"oninput"in c&&c.addEventListener("keyup",b,!1),window.addEventListener("resize",k,!1),c.addEventListener("input",b,!1),c.addEventListener("autosize:update",b,!1),c.style.overflowX="hidden",c.style.wordWrap="break-word",o.set(c,{destroy:v,update:b}),m()}function i(c){var u=o.get(c);u&&u.destroy()}function s(c){var u=o.get(c);u&&u.update()}var a=null;typeof window>"u"||typeof window.getComputedStyle!="function"?(a=function(u){return u},a.destroy=function(c){return c},a.update=function(c){return c}):(a=function(u,d){return u&&Array.prototype.forEach.call(u.length?u:[u],function(f){return n(f,d)}),u},a.destroy=function(c){return c&&Array.prototype.forEach.call(c.length?c:[c],i),c},a.update=function(c){return c&&Array.prototype.forEach.call(c.length?c:[c],s),c}),t.default=a,e.exports=t.default})});var qU=ie((d7e,YU)=>{var l0e=function(e,t,o){return o=window.getComputedStyle,(o?o(e):e.currentStyle)[t.replace(/-(\w)/gi,function(r,n){return n.toUpperCase()})]};YU.exports=l0e});var XU=ie((f7e,ZU)=>{var N5=qU();function c0e(e){var t=N5(e,"line-height"),o=parseFloat(t,10);if(t===o+""){var r=e.style.lineHeight;e.style.lineHeight=t+"em",t=N5(e,"line-height"),o=parseFloat(t,10),r?e.style.lineHeight=r:delete e.style.lineHeight}if(t.indexOf("pt")!==-1?(o*=4,o/=3):t.indexOf("mm")!==-1?(o*=96,o/=25.4):t.indexOf("cm")!==-1?(o*=96,o/=2.54):t.indexOf("in")!==-1?o*=96:t.indexOf("pc")!==-1&&(o*=16),o=Math.round(o),t==="normal"){var n=e.nodeName,i=document.createElement(n);i.innerHTML=" ",n.toUpperCase()==="TEXTAREA"&&i.setAttribute("rows","1");var s=N5(e,"font-size");i.style.fontSize=s,i.style.padding="0px",i.style.border="0px";var a=document.body;a.appendChild(i);var c=i.offsetHeight;o=c,a.removeChild(i)}return o}ZU.exports=c0e});var JU=ie(jl=>{"use strict";var u0e=jl&&jl.__extends||(function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var r in o)o.hasOwnProperty(r)&&(t[r]=o[r])};return function(t,o){e(t,o);function r(){this.constructor=t}t.prototype=o===null?Object.create(o):(r.prototype=o.prototype,new r)}})(),M5=jl&&jl.__assign||Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++){t=arguments[o];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},d0e=jl&&jl.__rest||function(e,t){var o={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(o[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&(o[r[n]]=e[r[n]]);return o};jl.__esModule=!0;var n1=He(),_y=WU(),r1=KU(),f0e=XU(),m0e=f0e,QU="autosize:resized",p0e=(function(e){u0e(t,e);function t(){var o=e!==null&&e.apply(this,arguments)||this;return o.state={lineHeight:null},o.textarea=null,o.onResize=function(r){o.props.onResize&&o.props.onResize(r)},o.updateLineHeight=function(){o.textarea&&o.setState({lineHeight:m0e(o.textarea)})},o.onChange=function(r){var n=o.props.onChange;o.currentValue=r.currentTarget.value,n&&n(r)},o}return t.prototype.componentDidMount=function(){var o=this,r=this.props,n=r.maxRows,i=r.async;typeof n=="number"&&this.updateLineHeight(),typeof n=="number"||i?setTimeout(function(){return o.textarea&&r1(o.textarea)}):this.textarea&&r1(this.textarea),this.textarea&&this.textarea.addEventListener(QU,this.onResize)},t.prototype.componentWillUnmount=function(){this.textarea&&(this.textarea.removeEventListener(QU,this.onResize),r1.destroy(this.textarea))},t.prototype.render=function(){var o=this,r=this,n=r.props,i=n.onResize,s=n.maxRows,a=n.onChange,c=n.style,u=n.innerRef,d=n.children,f=d0e(n,["onResize","maxRows","onChange","style","innerRef","children"]),m=r.state.lineHeight,h=s&&m?m*s:null;return n1.createElement("textarea",M5({},f,{onChange:this.onChange,style:h?M5({},c,{maxHeight:h}):c,ref:function(p){o.textarea=p,typeof o.props.innerRef=="function"?o.props.innerRef(p):o.props.innerRef&&(o.props.innerRef.current=p)}}),d)},t.prototype.componentDidUpdate=function(){this.textarea&&r1.update(this.textarea)},t.defaultProps={rows:1,async:!1},t.propTypes={rows:_y.number,maxRows:_y.number,onResize:_y.func,innerRef:_y.any,async:_y.bool},t})(n1.Component);jl.TextareaAutosize=n1.forwardRef(function(e,t){return n1.createElement(p0e,M5({},e,{innerRef:t}))})});var D5=ie((p7e,eH)=>{"use strict";var h0e=JU();eH.exports=h0e.TextareaAutosize});var Sy=ie((b7e,nH)=>{nH.exports=window.wp.warning});var bD=ie((N7e,eG)=>{eG.exports=window.ReactDOM});var js=ie((cUe,IG)=>{IG.exports=window.wp.keyboardShortcuts});var $G=ie((gHe,WG)=>{WG.exports=window.wp.htmlEntities});var O$=ie((aKe,R$)=>{R$.exports=window.wp.uploadMedia});var AB=ie(()=>{});var LB=ie(()=>{});var IV=ie(()=>{});var GK=ie((NYe,HK)=>{var g1e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",b1e=(e,t=21)=>(o=t)=>{let r="",n=o|0;for(;n--;)r+=e[Math.random()*e.length|0];return r},v1e=(e=21)=>{let t="",o=e|0;for(;o--;)t+=g1e[Math.random()*64|0];return t};HK.exports={nanoid:v1e,customAlphabet:b1e}});var PV=ie(()=>{});var $K=ie((VYe,RV)=>{var Ce=String,WK=function(){return{isColorSupported:!1,reset:Ce,bold:Ce,dim:Ce,italic:Ce,underline:Ce,inverse:Ce,hidden:Ce,strikethrough:Ce,black:Ce,red:Ce,green:Ce,yellow:Ce,blue:Ce,magenta:Ce,cyan:Ce,white:Ce,gray:Ce,bgBlack:Ce,bgRed:Ce,bgGreen:Ce,bgYellow:Ce,bgBlue:Ce,bgMagenta:Ce,bgCyan:Ce,bgWhite:Ce,blackBright:Ce,redBright:Ce,greenBright:Ce,yellowBright:Ce,blueBright:Ce,magentaBright:Ce,cyanBright:Ce,whiteBright:Ce,bgBlackBright:Ce,bgRedBright:Ce,bgGreenBright:Ce,bgYellowBright:Ce,bgBlueBright:Ce,bgMagentaBright:Ce,bgCyanBright:Ce,bgWhiteBright:Ce}};RV.exports=WK();RV.exports.createColors=WK});var NB=ie((FYe,qK)=>{"use strict";var KK=$K(),YK=PV(),r_=class e extends Error{constructor(t,o,r,n,i,s){super(t),this.name="CssSyntaxError",this.reason=t,i&&(this.file=i),n&&(this.source=n),s&&(this.plugin=s),typeof o<"u"&&typeof r<"u"&&(typeof o=="number"?(this.line=o,this.column=r):(this.line=o.line,this.column=o.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,e)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(t){if(!this.source)return"";let o=this.source;t==null&&(t=KK.isColorSupported),YK&&t&&(o=YK(o));let r=o.split(/\r?\n/),n=Math.max(this.line-3,0),i=Math.min(this.line+2,r.length),s=String(i).length,a,c;if(t){let{bold:u,gray:d,red:f}=KK.createColors(!0);a=m=>u(f(m)),c=m=>d(m)}else a=c=u=>u;return r.slice(n,i).map((u,d)=>{let f=n+1+d,m=" "+(" "+f).slice(-s)+" | ";if(f===this.line){let h=c(m.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return a(">")+c(m)+u+` |
| 2 |
`+h+a("^")}return" "+c(m)+u}).join(` |
| 3 |
`)}toString(){let t=this.showSourceCode();return t&&(t=` |
| 4 |
|
| 5 |
`+t+` |
| 6 |
`),this.name+": "+this.message+t}};qK.exports=r_;r_.default=r_});var ZK=ie(()=>{});var eY=ie((UYe,JK)=>{"use strict";var{SourceMapConsumer:XK,SourceMapGenerator:QK}=AB(),{existsSync:k1e,readFileSync:y1e}=ZK(),{dirname:OV,join:_1e}=LB();function S1e(e){return Buffer?Buffer.from(e,"base64").toString():window.atob(e)}var n_=class{constructor(t,o){if(o.map===!1)return;this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");let r=o.map?o.map.prev:void 0,n=this.loadMap(o.from,r);!this.mapFile&&o.from&&(this.mapFile=o.from),this.mapFile&&(this.root=OV(this.mapFile)),n&&(this.text=n)}consumer(){return this.consumerCache||(this.consumerCache=new XK(this.text)),this.consumerCache}decodeInline(t){let o=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,n=/^data:application\/json;charset=utf-?8,/,i=/^data:application\/json,/;if(n.test(t)||i.test(t))return decodeURIComponent(t.substr(RegExp.lastMatch.length));if(o.test(t)||r.test(t))return S1e(t.substr(RegExp.lastMatch.length));let s=t.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+s)}getAnnotationURL(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(t){return typeof t!="object"?!1:typeof t.mappings=="string"||typeof t._mappings=="string"||Array.isArray(t.sections)}loadAnnotation(t){let o=t.match(/\/\*\s*# sourceMappingURL=/gm);if(!o)return;let r=t.lastIndexOf(o.pop()),n=t.indexOf("*/",r);r>-1&&n>-1&&(this.annotation=this.getAnnotationURL(t.substring(r,n)))}loadFile(t){if(this.root=OV(t),k1e(t))return this.mapFile=t,y1e(t,"utf-8").toString().trim()}loadMap(t,o){if(o===!1)return!1;if(o){if(typeof o=="string")return o;if(typeof o=="function"){let r=o(t);if(r){let n=this.loadFile(r);if(!n)throw new Error("Unable to load previous source map: "+r.toString());return n}}else{if(o instanceof XK)return QK.fromSourceMap(o).toString();if(o instanceof QK)return o.toString();if(this.isMap(o))return JSON.stringify(o);throw new Error("Unsupported previous source map format: "+o.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;return t&&(r=_1e(OV(t),r)),this.loadFile(r)}}}startWith(t,o){return t?t.substr(0,o.length)===o:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};JK.exports=n_;n_.default=n_});var DV=ie((HYe,nY)=>{"use strict";var{SourceMapConsumer:x1e,SourceMapGenerator:w1e}=AB(),{fileURLToPath:tY,pathToFileURL:MB}=IV(),{isAbsolute:NV,resolve:MV}=LB(),{nanoid:C1e}=GK(),AV=PV(),oY=NB(),B1e=eY(),LV=Symbol("fromOffsetCache"),E1e=!!(x1e&&w1e),rY=!!(MV&&NV),gg=class{constructor(t,o={}){if(t===null||typeof t>"u"||typeof t=="object"&&!t.toString)throw new Error(`PostCSS received ${t} instead of CSS string`);if(this.css=t.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,o.from&&(!rY||/^\w+:\/\//.test(o.from)||NV(o.from)?this.file=o.from:this.file=MV(o.from)),rY&&E1e){let r=new B1e(this.css,o);if(r.text){this.map=r;let n=r.consumer().file;!this.file&&n&&(this.file=this.mapResolve(n))}}this.file||(this.id="<input css "+C1e(6)+">"),this.map&&(this.map.file=this.from)}error(t,o,r,n={}){let i,s,a;if(o&&typeof o=="object"){let u=o,d=r;if(typeof u.offset=="number"){let f=this.fromOffset(u.offset);o=f.line,r=f.col}else o=u.line,r=u.column;if(typeof d.offset=="number"){let f=this.fromOffset(d.offset);s=f.line,a=f.col}else s=d.line,a=d.column}else if(!r){let u=this.fromOffset(o);o=u.line,r=u.col}let c=this.origin(o,r,s,a);return c?i=new oY(t,c.endLine===void 0?c.line:{column:c.column,line:c.line},c.endLine===void 0?c.column:{column:c.endColumn,line:c.endLine},c.source,c.file,n.plugin):i=new oY(t,s===void 0?o:{column:r,line:o},s===void 0?r:{column:a,line:s},this.css,this.file,n.plugin),i.input={column:r,endColumn:a,endLine:s,line:o,source:this.css},this.file&&(MB&&(i.input.url=MB(this.file).toString()),i.input.file=this.file),i}fromOffset(t){let o,r;if(this[LV])r=this[LV];else{let i=this.css.split(` |
| 7 |
`);r=new Array(i.length);let s=0;for(let a=0,c=i.length;a<c;a++)r[a]=s,s+=i[a].length+1;this[LV]=r}o=r[r.length-1];let n=0;if(t>=o)n=r.length-1;else{let i=r.length-2,s;for(;n<i;)if(s=n+(i-n>>1),t<r[s])i=s-1;else if(t>=r[s+1])n=s+1;else{n=s;break}}return{col:t-r[n]+1,line:n+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:MV(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,o,r,n){if(!this.map)return!1;let i=this.map.consumer(),s=i.originalPositionFor({column:o,line:t});if(!s.source)return!1;let a;typeof r=="number"&&(a=i.originalPositionFor({column:n,line:r}));let c;NV(s.source)?c=MB(s.source):c=new URL(s.source,this.map.consumer().sourceRoot||MB(this.map.mapFile));let u={column:s.column,endColumn:a&&a.column,endLine:a&&a.line,line:s.line,url:c.toString()};if(c.protocol==="file:")if(tY)u.file=tY(c);else throw new Error("file: protocol is not available in this PostCSS build");let d=i.sourceContentFor(s.source);return d&&(u.source=d),u}toJSON(){let t={};for(let o of["hasBOM","css","file","id"])this[o]!=null&&(t[o]=this[o]);return this.map&&(t.map={...this.map},t.map.consumerCache&&(t.map.consumerCache=void 0)),t}get from(){return this.file||this.id}};nY.exports=gg;gg.default=gg;AV&&AV.registerInput&&AV.registerInput(gg)});var FV=ie((GYe,uY)=>{"use strict";var{SourceMapConsumer:sY,SourceMapGenerator:DB}=AB(),{dirname:VB,relative:aY,resolve:lY,sep:cY}=LB(),{pathToFileURL:iY}=IV(),T1e=DV(),I1e=!!(sY&&DB),P1e=!!(VB&&lY&&aY&&cY),VV=class{constructor(t,o,r,n){this.stringify=t,this.mapOpts=r.map||{},this.root=o,this.opts=r,this.css=n,this.originalCSS=n,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let t;this.isInline()?t="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?t=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?t=this.mapOpts.annotation(this.opts.to,this.root):t=this.outputFile()+".map";let o=` |
| 8 |
`;this.css.includes(`\r |
| 9 |
`)&&(o=`\r |
| 10 |
`),this.css+=o+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(let t of this.previous()){let o=this.toUrl(this.path(t.file)),r=t.root||VB(t.file),n;this.mapOpts.sourcesContent===!1?(n=new sY(t.text),n.sourcesContent&&(n.sourcesContent=null)):n=t.consumer(),this.map.applySourceMap(n,o,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let t;for(let o=this.root.nodes.length-1;o>=0;o--)t=this.root.nodes[o],t.type==="comment"&&t.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(o)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),P1e&&I1e&&this.isMap())return this.generateMap();{let t="";return this.stringify(this.root,o=>{t+=o}),[t]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=DB.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new DB({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new DB({file:this.outputFile(),ignoreInvalidMapping:!0});let t=1,o=1,r="<no source>",n={generated:{column:0,line:0},original:{column:0,line:0},source:""},i,s;this.stringify(this.root,(a,c,u)=>{if(this.css+=a,c&&u!=="end"&&(n.generated.line=t,n.generated.column=o-1,c.source&&c.source.start?(n.source=this.sourcePath(c),n.original.line=c.source.start.line,n.original.column=c.source.start.column-1,this.map.addMapping(n)):(n.source=r,n.original.line=1,n.original.column=0,this.map.addMapping(n))),i=a.match(/\n/g),i?(t+=i.length,s=a.lastIndexOf(` |
| 11 |
`),o=a.length-s):o+=a.length,c&&u!=="start"){let d=c.parent||{raws:{}};(!(c.type==="decl"||c.type==="atrule"&&!c.nodes)||c!==d.last||d.raws.semicolon)&&(c.source&&c.source.end?(n.source=this.sourcePath(c),n.original.line=c.source.end.line,n.original.column=c.source.end.column-1,n.generated.line=t,n.generated.column=o-2,this.map.addMapping(n)):(n.source=r,n.original.line=1,n.original.column=0,n.generated.line=t,n.generated.column=o-1,this.map.addMapping(n)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(t=>t.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let t=this.mapOpts.annotation;return typeof t<"u"&&t!==!0?!1:this.previous().length?this.previous().some(o=>o.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(t=>t.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(t){if(this.mapOpts.absolute||t.charCodeAt(0)===60||/^\w+:\/\//.test(t))return t;let o=this.memoizedPaths.get(t);if(o)return o;let r=this.opts.to?VB(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=VB(lY(r,this.mapOpts.annotation)));let n=aY(r,t);return this.memoizedPaths.set(t,n),n}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(t=>{if(t.source&&t.source.input.map){let o=t.source.input.map;this.previousMaps.includes(o)||this.previousMaps.push(o)}});else{let t=new T1e(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}setSourcesContent(){let t={};if(this.root)this.root.walk(o=>{if(o.source){let r=o.source.input.from;if(r&&!t[r]){t[r]=!0;let n=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(n,o.source.input.css)}}});else if(this.css){let o=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(o,this.css)}}sourcePath(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){let o=this.memoizedFileURLs.get(t);if(o)return o;if(iY){let r=iY(t).toString();return this.memoizedFileURLs.set(t,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){let o=this.memoizedURLs.get(t);if(o)return o;cY==="\\"&&(t=t.replace(/\\/g,"/"));let r=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,r),r}};uY.exports=VV});var zV=ie((WYe,fY)=>{"use strict";var dY={after:` |
| 12 |
`,beforeClose:` |
| 13 |
`,beforeComment:` |
| 14 |
`,beforeDecl:` |
| 15 |
`,beforeOpen:" ",beforeRule:` |
| 16 |
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function R1e(e){return e[0].toUpperCase()+e.slice(1)}var i_=class{constructor(t){this.builder=t}atrule(t,o){let r="@"+t.name,n=t.params?this.rawValue(t,"params"):"";if(typeof t.raws.afterName<"u"?r+=t.raws.afterName:n&&(r+=" "),t.nodes)this.block(t,r+n);else{let i=(t.raws.between||"")+(o?";":"");this.builder(r+n+i,t)}}beforeAfter(t,o){let r;t.type==="decl"?r=this.raw(t,null,"beforeDecl"):t.type==="comment"?r=this.raw(t,null,"beforeComment"):o==="before"?r=this.raw(t,null,"beforeRule"):r=this.raw(t,null,"beforeClose");let n=t.parent,i=0;for(;n&&n.type!=="root";)i+=1,n=n.parent;if(r.includes(` |
| 17 |
`)){let s=this.raw(t,null,"indent");if(s.length)for(let a=0;a<i;a++)r+=s}return r}block(t,o){let r=this.raw(t,"between","beforeOpen");this.builder(o+r+"{",t,"start");let n;t.nodes&&t.nodes.length?(this.body(t),n=this.raw(t,"after")):n=this.raw(t,"after","emptyBody"),n&&this.builder(n),this.builder("}",t,"end")}body(t){let o=t.nodes.length-1;for(;o>0&&t.nodes[o].type==="comment";)o-=1;let r=this.raw(t,"semicolon");for(let n=0;n<t.nodes.length;n++){let i=t.nodes[n],s=this.raw(i,"before");s&&this.builder(s),this.stringify(i,o!==n||r)}}comment(t){let o=this.raw(t,"left","commentLeft"),r=this.raw(t,"right","commentRight");this.builder("/*"+o+t.text+r+"*/",t)}decl(t,o){let r=this.raw(t,"between","colon"),n=t.prop+r+this.rawValue(t,"value");t.important&&(n+=t.raws.important||" !important"),o&&(n+=";"),this.builder(n,t)}document(t){this.body(t)}raw(t,o,r){let n;if(r||(r=o),o&&(n=t.raws[o],typeof n<"u"))return n;let i=t.parent;if(r==="before"&&(!i||i.type==="root"&&i.first===t||i&&i.type==="document"))return"";if(!i)return dY[r];let s=t.root();if(s.rawCache||(s.rawCache={}),typeof s.rawCache[r]<"u")return s.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(t,r);{let a="raw"+R1e(r);this[a]?n=this[a](s,t):s.walk(c=>{if(n=c.raws[o],typeof n<"u")return!1})}return typeof n>"u"&&(n=dY[r]),s.rawCache[r]=n,n}rawBeforeClose(t){let o;return t.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after<"u")return o=r.raws.after,o.includes(` |
| 18 |
`)&&(o=o.replace(/[^\n]+$/,"")),!1}),o&&(o=o.replace(/\S/g,"")),o}rawBeforeComment(t,o){let r;return t.walkComments(n=>{if(typeof n.raws.before<"u")return r=n.raws.before,r.includes(` |
| 19 |
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(o,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(t,o){let r;return t.walkDecls(n=>{if(typeof n.raws.before<"u")return r=n.raws.before,r.includes(` |
| 20 |
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(o,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(t){let o;return t.walk(r=>{if(r.type!=="decl"&&(o=r.raws.between,typeof o<"u"))return!1}),o}rawBeforeRule(t){let o;return t.walk(r=>{if(r.nodes&&(r.parent!==t||t.first!==r)&&typeof r.raws.before<"u")return o=r.raws.before,o.includes(` |
| 21 |
`)&&(o=o.replace(/[^\n]+$/,"")),!1}),o&&(o=o.replace(/\S/g,"")),o}rawColon(t){let o;return t.walkDecls(r=>{if(typeof r.raws.between<"u")return o=r.raws.between.replace(/[^\s:]/g,""),!1}),o}rawEmptyBody(t){let o;return t.walk(r=>{if(r.nodes&&r.nodes.length===0&&(o=r.raws.after,typeof o<"u"))return!1}),o}rawIndent(t){if(t.raws.indent)return t.raws.indent;let o;return t.walk(r=>{let n=r.parent;if(n&&n!==t&&n.parent&&n.parent===t&&typeof r.raws.before<"u"){let i=r.raws.before.split(` |
| 22 |
`);return o=i[i.length-1],o=o.replace(/\S/g,""),!1}}),o}rawSemicolon(t){let o;return t.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(o=r.raws.semicolon,typeof o<"u"))return!1}),o}rawValue(t,o){let r=t[o],n=t.raws[o];return n&&n.value===r?n.raw:r}root(t){this.body(t),t.raws.after&&this.builder(t.raws.after)}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(t.raws.ownSemicolon,t,"end")}stringify(t,o){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,o)}};fY.exports=i_;i_.default=i_});var FB=ie(($Ye,mY)=>{"use strict";var O1e=zV();function jV(e,t){new O1e(t).stringify(e)}mY.exports=jV;jV.default=jV});var UV=ie((KYe,hY)=>{"use strict";var pY={};hY.exports=function(t){pY[t]||(pY[t]=!0,typeof console<"u"&&console.warn&&console.warn(t))}});var zB=ie((YYe,HV)=>{"use strict";HV.exports.isClean=Symbol("isClean");HV.exports.my=Symbol("my")});var UB=ie((qYe,gY)=>{"use strict";var{isClean:jB,my:A1e}=zB(),L1e=NB(),N1e=zV(),M1e=FB();function GV(e,t){let o=new e.constructor;for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r)||r==="proxyCache")continue;let n=e[r],i=typeof n;r==="parent"&&i==="object"?t&&(o[r]=t):r==="source"?o[r]=n:Array.isArray(n)?o[r]=n.map(s=>GV(s,o)):(i==="object"&&n!==null&&(n=GV(n)),o[r]=n)}return o}var s_=class{constructor(t={}){this.raws={},this[jB]=!1,this[A1e]=!0;for(let o in t)if(o==="nodes"){this.nodes=[];for(let r of t[o])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[o]=t[o]}addToError(t){if(t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)){let o=this.source;t.stack=t.stack.replace(/\n\s{4}at /,`$&${o.input.from}:${o.start.line}:${o.start.column}$&`)}return t}after(t){return this.parent.insertAfter(this,t),this}assign(t={}){for(let o in t)this[o]=t[o];return this}before(t){return this.parent.insertBefore(this,t),this}cleanRaws(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between}clone(t={}){let o=GV(this);for(let r in t)o[r]=t[r];return o}cloneAfter(t={}){let o=this.clone(t);return this.parent.insertAfter(this,o),o}cloneBefore(t={}){let o=this.clone(t);return this.parent.insertBefore(this,o),o}error(t,o={}){if(this.source){let{end:r,start:n}=this.rangeBy(o);return this.source.input.error(t,{column:n.column,line:n.line},{column:r.column,line:r.line},o)}return new L1e(t)}getProxyProcessor(){return{get(t,o){return o==="proxyOf"?t:o==="root"?()=>t.root().toProxy():t[o]},set(t,o,r){return t[o]===r||(t[o]=r,(o==="prop"||o==="value"||o==="name"||o==="params"||o==="important"||o==="text")&&t.markDirty()),!0}}}markDirty(){if(this[jB]){this[jB]=!1;let t=this;for(;t=t.parent;)t[jB]=!1}}next(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t+1]}positionBy(t,o){let r=this.source.start;if(t.index)r=this.positionInside(t.index,o);else if(t.word){o=this.toString();let n=o.indexOf(t.word);n!==-1&&(r=this.positionInside(n,o))}return r}positionInside(t,o){let r=o||this.toString(),n=this.source.start.column,i=this.source.start.line;for(let s=0;s<t;s++)r[s]===` |
| 23 |
`?(n=1,i+=1):n+=1;return{column:n,line:i}}prev(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t-1]}rangeBy(t){let o={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:o.column+1,line:o.line};if(t.word){let n=this.toString(),i=n.indexOf(t.word);i!==-1&&(o=this.positionInside(i,n),r=this.positionInside(i+t.word.length,n))}else t.start?o={column:t.start.column,line:t.start.line}:t.index&&(o=this.positionInside(t.index)),t.end?r={column:t.end.column,line:t.end.line}:typeof t.endIndex=="number"?r=this.positionInside(t.endIndex):t.index&&(r=this.positionInside(t.index+1));return(r.line<o.line||r.line===o.line&&r.column<=o.column)&&(r={column:o.column+1,line:o.line}),{end:r,start:o}}raw(t,o){return new N1e().raw(this,t,o)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...t){if(this.parent){let o=this,r=!1;for(let n of t)n===this?r=!0:r?(this.parent.insertAfter(o,n),o=n):this.parent.insertBefore(o,n);r||this.remove()}return this}root(){let t=this;for(;t.parent&&t.parent.type!=="document";)t=t.parent;return t}toJSON(t,o){let r={},n=o==null;o=o||new Map;let i=0;for(let s in this){if(!Object.prototype.hasOwnProperty.call(this,s)||s==="parent"||s==="proxyCache")continue;let a=this[s];if(Array.isArray(a))r[s]=a.map(c=>typeof c=="object"&&c.toJSON?c.toJSON(null,o):c);else if(typeof a=="object"&&a.toJSON)r[s]=a.toJSON(null,o);else if(s==="source"){let c=o.get(a.input);c==null&&(c=i,o.set(a.input,i),i++),r[s]={end:a.end,inputId:c,start:a.start}}else r[s]=a}return n&&(r.inputs=[...o.keys()].map(s=>s.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t=M1e){t.stringify&&(t=t.stringify);let o="";return t(this,r=>{o+=r}),o}warn(t,o,r){let n={node:this};for(let i in r)n[i]=r[i];return t.warn(o,n)}get proxyOf(){return this}};gY.exports=s_;s_.default=s_});var WV=ie((ZYe,bY)=>{"use strict";var D1e=UB(),a_=class extends D1e{constructor(t){t&&typeof t.value<"u"&&typeof t.value!="string"&&(t={...t,value:String(t.value)}),super(t),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};bY.exports=a_;a_.default=a_});var $V=ie((XYe,vY)=>{"use strict";var V1e=UB(),l_=class extends V1e{constructor(t){super(t),this.type="comment"}};vY.exports=l_;l_.default=l_});var Am=ie((QYe,EY)=>{"use strict";var{isClean:kY,my:yY}=zB(),_Y=WV(),SY=$V(),F1e=UB(),xY,KV,YV,wY;function CY(e){return e.map(t=>(t.nodes&&(t.nodes=CY(t.nodes)),delete t.source,t))}function BY(e){if(e[kY]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)BY(t)}var Ws=class e extends F1e{append(...t){for(let o of t){let r=this.normalize(o,this.last);for(let n of r)this.proxyOf.nodes.push(n)}return this.markDirty(),this}cleanRaws(t){if(super.cleanRaws(t),this.nodes)for(let o of this.nodes)o.cleanRaws(t)}each(t){if(!this.proxyOf.nodes)return;let o=this.getIterator(),r,n;for(;this.indexes[o]<this.proxyOf.nodes.length&&(r=this.indexes[o],n=t(this.proxyOf.nodes[r],r),n!==!1);)this.indexes[o]+=1;return delete this.indexes[o],n}every(t){return this.nodes.every(t)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let t=this.lastEach;return this.indexes[t]=0,t}getProxyProcessor(){return{get(t,o){return o==="proxyOf"?t:t[o]?o==="each"||typeof o=="string"&&o.startsWith("walk")?(...r)=>t[o](...r.map(n=>typeof n=="function"?(i,s)=>n(i.toProxy(),s):n)):o==="every"||o==="some"?r=>t[o]((n,...i)=>r(n.toProxy(),...i)):o==="root"?()=>t.root().toProxy():o==="nodes"?t.nodes.map(r=>r.toProxy()):o==="first"||o==="last"?t[o].toProxy():t[o]:t[o]},set(t,o,r){return t[o]===r||(t[o]=r,(o==="name"||o==="params"||o==="selector")&&t.markDirty()),!0}}}index(t){return typeof t=="number"?t:(t.proxyOf&&(t=t.proxyOf),this.proxyOf.nodes.indexOf(t))}insertAfter(t,o){let r=this.index(t),n=this.normalize(o,this.proxyOf.nodes[r]).reverse();r=this.index(t);for(let s of n)this.proxyOf.nodes.splice(r+1,0,s);let i;for(let s in this.indexes)i=this.indexes[s],r<i&&(this.indexes[s]=i+n.length);return this.markDirty(),this}insertBefore(t,o){let r=this.index(t),n=r===0?"prepend":!1,i=this.normalize(o,this.proxyOf.nodes[r],n).reverse();r=this.index(t);for(let a of i)this.proxyOf.nodes.splice(r,0,a);let s;for(let a in this.indexes)s=this.indexes[a],r<=s&&(this.indexes[a]=s+i.length);return this.markDirty(),this}normalize(t,o){if(typeof t=="string")t=CY(xY(t).nodes);else if(typeof t>"u")t=[];else if(Array.isArray(t)){t=t.slice(0);for(let n of t)n.parent&&n.parent.removeChild(n,"ignore")}else if(t.type==="root"&&this.type!=="document"){t=t.nodes.slice(0);for(let n of t)n.parent&&n.parent.removeChild(n,"ignore")}else if(t.type)t=[t];else if(t.prop){if(typeof t.value>"u")throw new Error("Value field is missed in node creation");typeof t.value!="string"&&(t.value=String(t.value)),t=[new _Y(t)]}else if(t.selector)t=[new KV(t)];else if(t.name)t=[new YV(t)];else if(t.text)t=[new SY(t)];else throw new Error("Unknown node type in node creation");return t.map(n=>(n[yY]||e.rebuild(n),n=n.proxyOf,n.parent&&n.parent.removeChild(n),n[kY]&&BY(n),typeof n.raws.before>"u"&&o&&typeof o.raws.before<"u"&&(n.raws.before=o.raws.before.replace(/\S/g,"")),n.parent=this.proxyOf,n))}prepend(...t){t=t.reverse();for(let o of t){let r=this.normalize(o,this.first,"prepend").reverse();for(let n of r)this.proxyOf.nodes.unshift(n);for(let n in this.indexes)this.indexes[n]=this.indexes[n]+r.length}return this.markDirty(),this}push(t){return t.parent=this,this.proxyOf.nodes.push(t),this}removeAll(){for(let t of this.proxyOf.nodes)t.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(t){t=this.index(t),this.proxyOf.nodes[t].parent=void 0,this.proxyOf.nodes.splice(t,1);let o;for(let r in this.indexes)o=this.indexes[r],o>=t&&(this.indexes[r]=o-1);return this.markDirty(),this}replaceValues(t,o,r){return r||(r=o,o={}),this.walkDecls(n=>{o.props&&!o.props.includes(n.prop)||o.fast&&!n.value.includes(o.fast)||(n.value=n.value.replace(t,r))}),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(t){return this.each((o,r)=>{let n;try{n=t(o,r)}catch(i){throw o.addToError(i)}return n!==!1&&o.walk&&(n=o.walk(t)),n})}walkAtRules(t,o){return o?t instanceof RegExp?this.walk((r,n)=>{if(r.type==="atrule"&&t.test(r.name))return o(r,n)}):this.walk((r,n)=>{if(r.type==="atrule"&&r.name===t)return o(r,n)}):(o=t,this.walk((r,n)=>{if(r.type==="atrule")return o(r,n)}))}walkComments(t){return this.walk((o,r)=>{if(o.type==="comment")return t(o,r)})}walkDecls(t,o){return o?t instanceof RegExp?this.walk((r,n)=>{if(r.type==="decl"&&t.test(r.prop))return o(r,n)}):this.walk((r,n)=>{if(r.type==="decl"&&r.prop===t)return o(r,n)}):(o=t,this.walk((r,n)=>{if(r.type==="decl")return o(r,n)}))}walkRules(t,o){return o?t instanceof RegExp?this.walk((r,n)=>{if(r.type==="rule"&&t.test(r.selector))return o(r,n)}):this.walk((r,n)=>{if(r.type==="rule"&&r.selector===t)return o(r,n)}):(o=t,this.walk((r,n)=>{if(r.type==="rule")return o(r,n)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};Ws.registerParse=e=>{xY=e};Ws.registerRule=e=>{KV=e};Ws.registerAtRule=e=>{YV=e};Ws.registerRoot=e=>{wY=e};EY.exports=Ws;Ws.default=Ws;Ws.rebuild=e=>{e.type==="atrule"?Object.setPrototypeOf(e,YV.prototype):e.type==="rule"?Object.setPrototypeOf(e,KV.prototype):e.type==="decl"?Object.setPrototypeOf(e,_Y.prototype):e.type==="comment"?Object.setPrototypeOf(e,SY.prototype):e.type==="root"&&Object.setPrototypeOf(e,wY.prototype),e[yY]=!0,e.nodes&&e.nodes.forEach(t=>{Ws.rebuild(t)})}});var PY=ie((JYe,IY)=>{"use strict";var HB=/[\t\n\f\r "#'()/;[\\\]{}]/g,GB=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,z1e=/.[\r\n"'(/\\]/,TY=/[\da-f]/i;IY.exports=function(t,o={}){let r=t.css.valueOf(),n=o.ignoreErrors,i,s,a,c,u,d,f,m,h,p,g=r.length,b=0,k=[],v=[];function y(){return b}function _(P){throw t.error("Unclosed "+P,b)}function S(){return v.length===0&&b>=g}function C(P){if(v.length)return v.pop();if(b>=g)return;let T=P?P.ignoreUnclosed:!1;switch(i=r.charCodeAt(b),i){case 10:case 32:case 9:case 13:case 12:{s=b;do s+=1,i=r.charCodeAt(s);while(i===32||i===10||i===9||i===13||i===12);p=["space",r.slice(b,s)],b=s-1;break}case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let E=String.fromCharCode(i);p=[E,E,b];break}case 40:{if(m=k.length?k.pop()[1]:"",h=r.charCodeAt(b+1),m==="url"&&h!==39&&h!==34&&h!==32&&h!==10&&h!==9&&h!==12&&h!==13){s=b;do{if(d=!1,s=r.indexOf(")",s+1),s===-1)if(n||T){s=b;break}else _("bracket");for(f=s;r.charCodeAt(f-1)===92;)f-=1,d=!d}while(d);p=["brackets",r.slice(b,s+1),b,s],b=s}else s=r.indexOf(")",b+1),c=r.slice(b,s+1),s===-1||z1e.test(c)?p=["(","(",b]:(p=["brackets",c,b,s],b=s);break}case 39:case 34:{a=i===39?"'":'"',s=b;do{if(d=!1,s=r.indexOf(a,s+1),s===-1)if(n||T){s=b+1;break}else _("string");for(f=s;r.charCodeAt(f-1)===92;)f-=1,d=!d}while(d);p=["string",r.slice(b,s+1),b,s],b=s;break}case 64:{HB.lastIndex=b+1,HB.test(r),HB.lastIndex===0?s=r.length-1:s=HB.lastIndex-2,p=["at-word",r.slice(b,s+1),b,s],b=s;break}case 92:{for(s=b,u=!0;r.charCodeAt(s+1)===92;)s+=1,u=!u;if(i=r.charCodeAt(s+1),u&&i!==47&&i!==32&&i!==10&&i!==9&&i!==13&&i!==12&&(s+=1,TY.test(r.charAt(s)))){for(;TY.test(r.charAt(s+1));)s+=1;r.charCodeAt(s+1)===32&&(s+=1)}p=["word",r.slice(b,s+1),b,s],b=s;break}default:{i===47&&r.charCodeAt(b+1)===42?(s=r.indexOf("*/",b+2)+1,s===0&&(n||T?s=r.length:_("comment")),p=["comment",r.slice(b,s+1),b,s],b=s):(GB.lastIndex=b+1,GB.test(r),GB.lastIndex===0?s=r.length-1:s=GB.lastIndex-2,p=["word",r.slice(b,s+1),b,s],k.push(p),b=s);break}}return b++,p}function B(P){v.push(P)}return{back:B,endOfFile:S,nextToken:C,position:y}}});var AY=ie((eqe,OY)=>{"use strict";var RY=Am(),bg=class extends RY{constructor(t){super(t),this.type="atrule"}append(...t){return this.proxyOf.nodes||(this.nodes=[]),super.append(...t)}prepend(...t){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...t)}};OY.exports=bg;bg.default=bg;RY.registerAtRule(bg)});var WB=ie((tqe,DY)=>{"use strict";var LY=Am(),NY,MY,nd=class extends LY{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,o,r){let n=super.normalize(t);if(o){if(r==="prepend")this.nodes.length>1?o.raws.before=this.nodes[1].raws.before:delete o.raws.before;else if(this.first!==o)for(let i of n)i.raws.before=o.raws.before}return n}removeChild(t,o){let r=this.index(t);return!o&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(t)}toResult(t={}){return new NY(new MY,this,t).stringify()}};nd.registerLazyResult=e=>{NY=e};nd.registerProcessor=e=>{MY=e};DY.exports=nd;nd.default=nd;LY.registerRoot(nd)});var FY=ie((oqe,VY)=>{"use strict";var c_={comma(e){return c_.split(e,[","],!0)},space(e){let t=[" ",` |
| 24 |
`," "];return c_.split(e,t)},split(e,t,o){let r=[],n="",i=!1,s=0,a=!1,c="",u=!1;for(let d of e)u?u=!1:d==="\\"?u=!0:a?d===c&&(a=!1):d==='"'||d==="'"?(a=!0,c=d):d==="("?s+=1:d===")"?s>0&&(s-=1):s===0&&t.includes(d)&&(i=!0),i?(n!==""&&r.push(n.trim()),n="",i=!1):n+=d;return(o||n!=="")&&r.push(n.trim()),r}};VY.exports=c_;c_.default=c_});var UY=ie((rqe,jY)=>{"use strict";var zY=Am(),j1e=FY(),vg=class extends zY{constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return j1e.comma(this.selector)}set selectors(t){let o=this.selector?this.selector.match(/,\s*/):null,r=o?o[0]:","+this.raw("between","beforeOpen");this.selector=t.join(r)}};jY.exports=vg;vg.default=vg;zY.registerRule(vg)});var $Y=ie((nqe,WY)=>{"use strict";var U1e=WV(),H1e=PY(),G1e=$V(),W1e=AY(),$1e=WB(),HY=UY(),GY={empty:!0,space:!0};function K1e(e){for(let t=e.length-1;t>=0;t--){let o=e[t],r=o[3]||o[2];if(r)return r}}var qV=class{constructor(t){this.input=t,this.root=new $1e,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(t){let o=new W1e;o.name=t[1].slice(1),o.name===""&&this.unnamedAtrule(o,t),this.init(o,t[2]);let r,n,i,s=!1,a=!1,c=[],u=[];for(;!this.tokenizer.endOfFile();){if(t=this.tokenizer.nextToken(),r=t[0],r==="("||r==="["?u.push(r==="("?")":"]"):r==="{"&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),u.length===0)if(r===";"){o.source.end=this.getPosition(t[2]),o.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){a=!0;break}else if(r==="}"){if(c.length>0){for(i=c.length-1,n=c[i];n&&n[0]==="space";)n=c[--i];n&&(o.source.end=this.getPosition(n[3]||n[2]),o.source.end.offset++)}this.end(t);break}else c.push(t);else c.push(t);if(this.tokenizer.endOfFile()){s=!0;break}}o.raws.between=this.spacesAndCommentsFromEnd(c),c.length?(o.raws.afterName=this.spacesAndCommentsFromStart(c),this.raw(o,"params",c),s&&(t=c[c.length-1],o.source.end=this.getPosition(t[3]||t[2]),o.source.end.offset++,this.spaces=o.raws.between,o.raws.between="")):(o.raws.afterName="",o.params=""),a&&(o.nodes=[],this.current=o)}checkMissedSemicolon(t){let o=this.colon(t);if(o===!1)return;let r=0,n;for(let i=o-1;i>=0&&(n=t[i],!(n[0]!=="space"&&(r+=1,r===2)));i--);throw this.input.error("Missed semicolon",n[0]==="word"?n[3]+1:n[2])}colon(t){let o=0,r,n,i;for(let[s,a]of t.entries()){if(r=a,n=r[0],n==="("&&(o+=1),n===")"&&(o-=1),o===0&&n===":")if(!i)this.doubleColon(r);else{if(i[0]==="word"&&i[1]==="progid")continue;return s}i=r}return!1}comment(t){let o=new G1e;this.init(o,t[2]),o.source.end=this.getPosition(t[3]||t[2]),o.source.end.offset++;let r=t[1].slice(2,-2);if(/^\s*$/.test(r))o.text="",o.raws.left=r,o.raws.right="";else{let n=r.match(/^(\s*)([^]*\S)(\s*)$/);o.text=n[2],o.raws.left=n[1],o.raws.right=n[3]}}createTokenizer(){this.tokenizer=H1e(this.input)}decl(t,o){let r=new U1e;this.init(r,t[0][2]);let n=t[t.length-1];for(n[0]===";"&&(this.semicolon=!0,t.pop()),r.source.end=this.getPosition(n[3]||n[2]||K1e(t)),r.source.end.offset++;t[0][0]!=="word";)t.length===1&&this.unknownWord(t),r.raws.before+=t.shift()[1];for(r.source.start=this.getPosition(t[0][2]),r.prop="";t.length;){let u=t[0][0];if(u===":"||u==="space"||u==="comment")break;r.prop+=t.shift()[1]}r.raws.between="";let i;for(;t.length;)if(i=t.shift(),i[0]===":"){r.raws.between+=i[1];break}else i[0]==="word"&&/\w/.test(i[1])&&this.unknownWord([i]),r.raws.between+=i[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let s=[],a;for(;t.length&&(a=t[0][0],!(a!=="space"&&a!=="comment"));)s.push(t.shift());this.precheckMissedSemicolon(t);for(let u=t.length-1;u>=0;u--){if(i=t[u],i[1].toLowerCase()==="!important"){r.important=!0;let d=this.stringFrom(t,u);d=this.spacesFromEnd(t)+d,d!==" !important"&&(r.raws.important=d);break}else if(i[1].toLowerCase()==="important"){let d=t.slice(0),f="";for(let m=u;m>0;m--){let h=d[m][0];if(f.trim().indexOf("!")===0&&h!=="space")break;f=d.pop()[1]+f}f.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=f,t=d)}if(i[0]!=="space"&&i[0]!=="comment")break}t.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(r.raws.between+=s.map(u=>u[1]).join(""),s=[]),this.raw(r,"value",s.concat(t),o),r.value.includes(":")&&!o&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){let o=new HY;this.init(o,t[2]),o.selector="",o.raws.between="",this.current=o}end(t){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(t){if(this.spaces+=t[1],this.current.nodes){let o=this.current.nodes[this.current.nodes.length-1];o&&o.type==="rule"&&!o.raws.ownSemicolon&&(o.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(t){let o=this.input.fromOffset(t);return{column:o.col,line:o.line,offset:t}}init(t,o){this.current.push(t),t.source={input:this.input,start:this.getPosition(o)},t.raws.before=this.spaces,this.spaces="",t.type!=="comment"&&(this.semicolon=!1)}other(t){let o=!1,r=null,n=!1,i=null,s=[],a=t[1].startsWith("--"),c=[],u=t;for(;u;){if(r=u[0],c.push(u),r==="("||r==="[")i||(i=u),s.push(r==="("?")":"]");else if(a&&n&&r==="{")i||(i=u),s.push("}");else if(s.length===0)if(r===";")if(n){this.decl(c,a);return}else break;else if(r==="{"){this.rule(c);return}else if(r==="}"){this.tokenizer.back(c.pop()),o=!0;break}else r===":"&&(n=!0);else r===s[s.length-1]&&(s.pop(),s.length===0&&(i=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(o=!0),s.length>0&&this.unclosedBracket(i),o&&n){if(!a)for(;c.length&&(u=c[c.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(c.pop());this.decl(c,a)}else this.unknownWord(c)}parse(){let t;for(;!this.tokenizer.endOfFile();)switch(t=this.tokenizer.nextToken(),t[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t);break}this.endFile()}precheckMissedSemicolon(){}raw(t,o,r,n){let i,s,a=r.length,c="",u=!0,d,f;for(let m=0;m<a;m+=1)i=r[m],s=i[0],s==="space"&&m===a-1&&!n?u=!1:s==="comment"?(f=r[m-1]?r[m-1][0]:"empty",d=r[m+1]?r[m+1][0]:"empty",!GY[f]&&!GY[d]?c.slice(-1)===","?u=!1:c+=i[1]:u=!1):c+=i[1];if(!u){let m=r.reduce((h,p)=>h+p[1],"");t.raws[o]={raw:m,value:c}}t[o]=c}rule(t){t.pop();let o=new HY;this.init(o,t[0][2]),o.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(o,"selector",t),this.current=o}spacesAndCommentsFromEnd(t){let o,r="";for(;t.length&&(o=t[t.length-1][0],!(o!=="space"&&o!=="comment"));)r=t.pop()[1]+r;return r}spacesAndCommentsFromStart(t){let o,r="";for(;t.length&&(o=t[0][0],!(o!=="space"&&o!=="comment"));)r+=t.shift()[1];return r}spacesFromEnd(t){let o,r="";for(;t.length&&(o=t[t.length-1][0],o==="space");)r=t.pop()[1]+r;return r}stringFrom(t,o){let r="";for(let n=o;n<t.length;n++)r+=t[n][1];return t.splice(o,t.length-o),r}unclosedBlock(){let t=this.current.source.start;throw this.input.error("Unclosed block",t.line,t.column)}unclosedBracket(t){throw this.input.error("Unclosed bracket",{offset:t[2]},{offset:t[2]+1})}unexpectedClose(t){throw this.input.error("Unexpected }",{offset:t[2]},{offset:t[2]+1})}unknownWord(t){throw this.input.error("Unknown word",{offset:t[0][2]},{offset:t[0][2]+t[0][1].length})}unnamedAtrule(t,o){throw this.input.error("At-rule without name",{offset:o[2]},{offset:o[2]+o[1].length})}};WY.exports=qV});var ZV=ie((iqe,KY)=>{"use strict";var Y1e=Am(),q1e=$Y(),Z1e=DV();function $B(e,t){let o=new Z1e(e,t),r=new q1e(o);try{r.parse()}catch(n){throw n}return r.root}KY.exports=$B;$B.default=$B;Y1e.registerParse($B)});var qY=ie((sqe,YY)=>{"use strict";var u_=class{constructor(t,o={}){if(this.type="warning",this.text=t,o.node&&o.node.source){let r=o.node.rangeBy(o);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in o)this[r]=o[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};YY.exports=u_;u_.default=u_});var XV=ie((aqe,ZY)=>{"use strict";var X1e=qY(),d_=class{constructor(t,o,r){this.processor=t,this.messages=[],this.root=o,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(t,o={}){o.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(o.plugin=this.lastPlugin.postcssPlugin);let r=new X1e(t,o);return this.messages.push(r),r}warnings(){return this.messages.filter(t=>t.type==="warning")}get content(){return this.css}};ZY.exports=d_;d_.default=d_});var QY=ie((cqe,XY)=>{"use strict";var Q1e=FV(),J1e=FB(),lqe=UV(),eBe=ZV(),tBe=XV(),f_=class{constructor(t,o,r){o=o.toString(),this.stringified=!1,this._processor=t,this._css=o,this._opts=r,this._map=void 0;let n,i=J1e;this.result=new tBe(this._processor,n,this._opts),this.result.css=o;let s=this;Object.defineProperty(this.result,"root",{get(){return s.root}});let a=new Q1e(i,n,this._opts,o);if(a.isMap()){let[c,u]=a.generate();c&&(this.result.css=c),u&&(this.result.map=u)}else a.clearAnnotation(),this.result.css=a.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,o){return this.async().then(t,o)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let t,o=eBe;try{t=o(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=t,t}get[Symbol.toStringTag](){return"NoWorkResult"}};XY.exports=f_;f_.default=f_});var QV=ie((uqe,tq)=>{"use strict";var oBe=Am(),JY,eq,Lm=class extends oBe{constructor(t){super({type:"document",...t}),this.nodes||(this.nodes=[])}toResult(t={}){return new JY(new eq,this,t).stringify()}};Lm.registerLazyResult=e=>{JY=e};Lm.registerProcessor=e=>{eq=e};tq.exports=Lm;Lm.default=Lm});var sq=ie((fqe,iq)=>{"use strict";var{isClean:Va,my:rBe}=zB(),nBe=FV(),iBe=FB(),sBe=Am(),aBe=QV(),dqe=UV(),oq=XV(),lBe=ZV(),cBe=WB(),uBe={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},dBe={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},fBe={Once:!0,postcssPlugin:!0,prepare:!0},kg=0;function m_(e){return typeof e=="object"&&typeof e.then=="function"}function nq(e){let t=!1,o=uBe[e.type];return e.type==="decl"?t=e.prop.toLowerCase():e.type==="atrule"&&(t=e.name.toLowerCase()),t&&e.append?[o,o+"-"+t,kg,o+"Exit",o+"Exit-"+t]:t?[o,o+"-"+t,o+"Exit",o+"Exit-"+t]:e.append?[o,kg,o+"Exit"]:[o,o+"Exit"]}function rq(e){let t;return e.type==="document"?t=["Document",kg,"DocumentExit"]:e.type==="root"?t=["Root",kg,"RootExit"]:t=nq(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function JV(e){return e[Va]=!1,e.nodes&&e.nodes.forEach(t=>JV(t)),e}var e3={},id=class e{constructor(t,o,r){this.stringified=!1,this.processed=!1;let n;if(typeof o=="object"&&o!==null&&(o.type==="root"||o.type==="document"))n=JV(o);else if(o instanceof e||o instanceof oq)n=JV(o.root),o.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=o.map);else{let i=lBe;r.syntax&&(i=r.syntax.parse),r.parser&&(i=r.parser),i.parse&&(i=i.parse);try{n=i(o,r)}catch(s){this.processed=!0,this.error=s}n&&!n[rBe]&&sBe.rebuild(n)}this.result=new oq(t,n,r),this.helpers={...e3,postcss:e3,result:this.result},this.plugins=this.processor.plugins.map(i=>typeof i=="object"&&i.prepare?{...i,...i.prepare(this.result)}:i)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(t,o){let r=this.result.lastPlugin;try{o&&o.addToError(t),this.error=t,t.name==="CssSyntaxError"&&!t.plugin?(t.plugin=r.postcssPlugin,t.setMessage()):r.postcssVersion}catch(n){console&&console.error&&console.error(n)}return t}prepareVisitors(){this.listeners={};let t=(o,r,n)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([o,n])};for(let o of this.plugins)if(typeof o=="object")for(let r in o){if(!dBe[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${o.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!fBe[r])if(typeof o[r]=="object")for(let n in o[r])n==="*"?t(o,r,o[r][n]):t(o,r+"-"+n.toLowerCase(),o[r][n]);else typeof o[r]=="function"&&t(o,r,o[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let t=0;t<this.plugins.length;t++){let o=this.plugins[t],r=this.runOnRoot(o);if(m_(r))try{await r}catch(n){throw this.handleError(n)}}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[Va];){t[Va]=!0;let o=[rq(t)];for(;o.length>0;){let r=this.visitTick(o);if(m_(r))try{await r}catch(n){let i=o[o.length-1].node;throw this.handleError(n,i)}}}if(this.listeners.OnceExit)for(let[o,r]of this.listeners.OnceExit){this.result.lastPlugin=o;try{if(t.type==="document"){let n=t.nodes.map(i=>r(i,this.helpers));await Promise.all(n)}else await r(t,this.helpers)}catch(n){throw this.handleError(n)}}}return this.processed=!0,this.stringify()}runOnRoot(t){this.result.lastPlugin=t;try{if(typeof t=="object"&&t.Once){if(this.result.root.type==="document"){let o=this.result.root.nodes.map(r=>t.Once(r,this.helpers));return m_(o[0])?Promise.all(o):o}return t.Once(this.result.root,this.helpers)}else if(typeof t=="function")return t(this.result.root,this.result)}catch(o){throw this.handleError(o)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let t=this.result.opts,o=iBe;t.syntax&&(o=t.syntax.stringify),t.stringifier&&(o=t.stringifier),o.stringify&&(o=o.stringify);let n=new nBe(o,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let t of this.plugins){let o=this.runOnRoot(t);if(m_(o))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[Va];)t[Va]=!0,this.walkSync(t);if(this.listeners.OnceExit)if(t.type==="document")for(let o of t.nodes)this.visitSync(this.listeners.OnceExit,o);else this.visitSync(this.listeners.OnceExit,t)}return this.result}then(t,o){return this.async().then(t,o)}toString(){return this.css}visitSync(t,o){for(let[r,n]of t){this.result.lastPlugin=r;let i;try{i=n(o,this.helpers)}catch(s){throw this.handleError(s,o.proxyOf)}if(o.type!=="root"&&o.type!=="document"&&!o.parent)return!0;if(m_(i))throw this.getAsyncError()}}visitTick(t){let o=t[t.length-1],{node:r,visitors:n}=o;if(r.type!=="root"&&r.type!=="document"&&!r.parent){t.pop();return}if(n.length>0&&o.visitorIndex<n.length){let[s,a]=n[o.visitorIndex];o.visitorIndex+=1,o.visitorIndex===n.length&&(o.visitors=[],o.visitorIndex=0),this.result.lastPlugin=s;try{return a(r.toProxy(),this.helpers)}catch(c){throw this.handleError(c,r)}}if(o.iterator!==0){let s=o.iterator,a;for(;a=r.nodes[r.indexes[s]];)if(r.indexes[s]+=1,!a[Va]){a[Va]=!0,t.push(rq(a));return}o.iterator=0,delete r.indexes[s]}let i=o.events;for(;o.eventIndex<i.length;){let s=i[o.eventIndex];if(o.eventIndex+=1,s===kg){r.nodes&&r.nodes.length&&(r[Va]=!0,o.iterator=r.getIterator());return}else if(this.listeners[s]){o.visitors=this.listeners[s];return}}t.pop()}walkSync(t){t[Va]=!0;let o=nq(t);for(let r of o)if(r===kg)t.nodes&&t.each(n=>{n[Va]||this.walkSync(n)});else{let n=this.listeners[r];if(n&&this.visitSync(n,t.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};id.registerPostcss=e=>{e3=e};iq.exports=id;id.default=id;cBe.registerLazyResult(id);aBe.registerLazyResult(id)});var lq=ie((mqe,aq)=>{"use strict";var mBe=QY(),pBe=sq(),hBe=QV(),gBe=WB(),Nm=class{constructor(t=[]){this.version="8.4.38",this.plugins=this.normalize(t)}normalize(t){let o=[];for(let r of t)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))o=o.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)o.push(r);else if(typeof r=="function")o.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return o}process(t,o={}){return!this.plugins.length&&!o.parser&&!o.stringifier&&!o.syntax?new mBe(this,t,o):new pBe(this,t,o)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}};aq.exports=Nm;Nm.default=Nm;gBe.registerProcessor(Nm);hBe.registerProcessor(Nm)});var dq=ie((pqe,uq)=>{uq.exports=function(t){let o=t.prefix,r=/\s+$/.test(o)?o:`${o} `,n=t.ignoreFiles?[].concat(t.ignoreFiles):[],i=t.includeFiles?[].concat(t.includeFiles):[];return function(s){n.length&&s.source.input.file&&cq(s.source.input.file,n)||i.length&&s.source.input.file&&!cq(s.source.input.file,i)||s.walkRules(a=>{let c=["keyframes","-webkit-keyframes","-moz-keyframes","-o-keyframes","-ms-keyframes"];a.parent&&c.includes(a.parent.name)||(a.selectors=a.selectors.map(u=>t.exclude&&bBe(u,t.exclude)?u:t.transform?t.transform(o,u,r+u,s.source.input.file,a):r+u))})}};function cq(e,t){return t.some(o=>o instanceof RegExp?o.test(e):e.includes(o))}function bBe(e,t){return t.some(o=>o instanceof RegExp?o.test(e):e===o)}});var mq=ie((hqe,fq)=>{var t3=40,o3=41,KB=39,r3=34,n3=92,yg=47,i3=44,s3=58,YB=42,vBe=117,kBe=85,yBe=43,_Be=/^[a-f0-9?-]+$/i;fq.exports=function(e){for(var t=[],o=e,r,n,i,s,a,c,u,d,f=0,m=o.charCodeAt(f),h=o.length,p=[{nodes:t}],g=0,b,k="",v="",y="";f<h;)if(m<=32){r=f;do r+=1,m=o.charCodeAt(r);while(m<=32);s=o.slice(f,r),i=t[t.length-1],m===o3&&g?y=s:i&&i.type==="div"?(i.after=s,i.sourceEndIndex+=s.length):m===i3||m===s3||m===yg&&o.charCodeAt(r+1)!==YB&&(!b||b&&b.type==="function"&&b.value!=="calc")?v=s:t.push({type:"space",sourceIndex:f,sourceEndIndex:r,value:s}),f=r}else if(m===KB||m===r3){r=f,n=m===KB?"'":'"',s={type:"string",sourceIndex:f,quote:n};do if(a=!1,r=o.indexOf(n,r+1),~r)for(c=r;o.charCodeAt(c-1)===n3;)c-=1,a=!a;else o+=n,r=o.length-1,s.unclosed=!0;while(a);s.value=o.slice(f+1,r),s.sourceEndIndex=s.unclosed?r:r+1,t.push(s),f=r+1,m=o.charCodeAt(f)}else if(m===yg&&o.charCodeAt(f+1)===YB)r=o.indexOf("*/",f),s={type:"comment",sourceIndex:f,sourceEndIndex:r+2},r===-1&&(s.unclosed=!0,r=o.length,s.sourceEndIndex=r),s.value=o.slice(f+2,r),t.push(s),f=r+2,m=o.charCodeAt(f);else if((m===yg||m===YB)&&b&&b.type==="function"&&b.value==="calc")s=o[f],t.push({type:"word",sourceIndex:f-v.length,sourceEndIndex:f+s.length,value:s}),f+=1,m=o.charCodeAt(f);else if(m===yg||m===i3||m===s3)s=o[f],t.push({type:"div",sourceIndex:f-v.length,sourceEndIndex:f+s.length,value:s,before:v,after:""}),v="",f+=1,m=o.charCodeAt(f);else if(t3===m){r=f;do r+=1,m=o.charCodeAt(r);while(m<=32);if(d=f,s={type:"function",sourceIndex:f-k.length,value:k,before:o.slice(d+1,r)},f=r,k==="url"&&m!==KB&&m!==r3){r-=1;do if(a=!1,r=o.indexOf(")",r+1),~r)for(c=r;o.charCodeAt(c-1)===n3;)c-=1,a=!a;else o+=")",r=o.length-1,s.unclosed=!0;while(a);u=r;do u-=1,m=o.charCodeAt(u);while(m<=32);d<u?(f!==u+1?s.nodes=[{type:"word",sourceIndex:f,sourceEndIndex:u+1,value:o.slice(f,u+1)}]:s.nodes=[],s.unclosed&&u+1!==r?(s.after="",s.nodes.push({type:"space",sourceIndex:u+1,sourceEndIndex:r,value:o.slice(u+1,r)})):(s.after=o.slice(u+1,r),s.sourceEndIndex=r)):(s.after="",s.nodes=[]),f=r+1,s.sourceEndIndex=s.unclosed?r:f,m=o.charCodeAt(f),t.push(s)}else g+=1,s.after="",s.sourceEndIndex=f+1,t.push(s),p.push(s),t=s.nodes=[],b=s;k=""}else if(o3===m&&g)f+=1,m=o.charCodeAt(f),b.after=y,b.sourceEndIndex+=y.length,y="",g-=1,p[p.length-1].sourceEndIndex=f,p.pop(),b=p[g],t=b.nodes;else{r=f;do m===n3&&(r+=1),r+=1,m=o.charCodeAt(r);while(r<h&&!(m<=32||m===KB||m===r3||m===i3||m===s3||m===yg||m===t3||m===YB&&b&&b.type==="function"&&b.value==="calc"||m===yg&&b.type==="function"&&b.value==="calc"||m===o3&&g));s=o.slice(f,r),t3===m?k=s:(vBe===s.charCodeAt(0)||kBe===s.charCodeAt(0))&&yBe===s.charCodeAt(1)&&_Be.test(s.slice(2))?t.push({type:"unicode-range",sourceIndex:f,sourceEndIndex:r,value:s}):t.push({type:"word",sourceIndex:f,sourceEndIndex:r,value:s}),f=r}for(f=p.length-1;f;f-=1)p[f].unclosed=!0,p[f].sourceEndIndex=o.length;return p[0].nodes}});var hq=ie((gqe,pq)=>{pq.exports=function e(t,o,r){var n,i,s,a;for(n=0,i=t.length;n<i;n+=1)s=t[n],r||(a=o(s,n,t)),a!==!1&&s.type==="function"&&Array.isArray(s.nodes)&&e(s.nodes,o,r),r&&o(s,n,t)}});var kq=ie((bqe,vq)=>{function gq(e,t){var o=e.type,r=e.value,n,i;return t&&(i=t(e))!==void 0?i:o==="word"||o==="space"?r:o==="string"?(n=e.quote||"",n+r+(e.unclosed?"":n)):o==="comment"?"/*"+r+(e.unclosed?"":"*/"):o==="div"?(e.before||"")+r+(e.after||""):Array.isArray(e.nodes)?(n=bq(e.nodes,t),o!=="function"?n:r+"("+(e.before||"")+n+(e.after||"")+(e.unclosed?"":")")):r}function bq(e,t){var o,r;if(Array.isArray(e)){for(o="",r=e.length-1;~r;r-=1)o=gq(e[r],t)+o;return o}return gq(e,t)}vq.exports=bq});var _q=ie((vqe,yq)=>{var qB=45,ZB=43,a3=46,SBe=101,xBe=69;function wBe(e){var t=e.charCodeAt(0),o;if(t===ZB||t===qB){if(o=e.charCodeAt(1),o>=48&&o<=57)return!0;var r=e.charCodeAt(2);return o===a3&&r>=48&&r<=57}return t===a3?(o=e.charCodeAt(1),o>=48&&o<=57):t>=48&&t<=57}yq.exports=function(e){var t=0,o=e.length,r,n,i;if(o===0||!wBe(e))return!1;for(r=e.charCodeAt(t),(r===ZB||r===qB)&&t++;t<o&&(r=e.charCodeAt(t),!(r<48||r>57));)t+=1;if(r=e.charCodeAt(t),n=e.charCodeAt(t+1),r===a3&&n>=48&&n<=57)for(t+=2;t<o&&(r=e.charCodeAt(t),!(r<48||r>57));)t+=1;if(r=e.charCodeAt(t),n=e.charCodeAt(t+1),i=e.charCodeAt(t+2),(r===SBe||r===xBe)&&(n>=48&&n<=57||(n===ZB||n===qB)&&i>=48&&i<=57))for(t+=n===ZB||n===qB?3:2;t<o&&(r=e.charCodeAt(t),!(r<48||r>57));)t+=1;return{number:e.slice(0,t),unit:e.slice(t)}}});var Cq=ie((kqe,wq)=>{var CBe=mq(),Sq=hq(),xq=kq();function sd(e){return this instanceof sd?(this.nodes=CBe(e),this):new sd(e)}sd.prototype.toString=function(){return Array.isArray(this.nodes)?xq(this.nodes):""};sd.prototype.walk=function(e,t){return Sq(this.nodes,e,t),this};sd.unit=_q();sd.walk=Sq;sd.stringify=xq;wq.exports=sd});var Eq=ie((yqe,l3)=>{var Bq=Cq();l3.exports=e=>{let o=Object.assign({skipHostRelativeUrls:!0},e);return{postcssPlugin:"rebaseUrl",Declaration(r){let n=Bq(r.value),i=!1;n.walk(s=>{if(s.type!=="function"||s.value!=="url")return;let a=s.nodes[0].value,c=new URL(a,e.rootUrl);return c.pathname===a&&o.skipHostRelativeUrls||(s.nodes[0].value=c.toString(),i=!0),!1}),i&&(r.value=Bq.stringify(n))}}};l3.exports.postcss=!0});var zq=ie((Lqe,Fq)=>{Fq.exports=window.wp.priorityQueue});var B3=ie((TXe,zZ)=>{zZ.exports=window.wp.blob});var P_=ie((eet,qX)=>{qX.exports=window.wp.isShallowEqual});var QT=ie((fnt,zee)=>{zee.exports=window.wp.tokenList});var x4=ie((wnt,Jee)=>{"use strict";var aPe=function(t){return lPe(t)&&!cPe(t)};function lPe(e){return!!e&&typeof e=="object"}function cPe(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||fPe(e)}var uPe=typeof Symbol=="function"&&Symbol.for,dPe=uPe?Symbol.for("react.element"):60103;function fPe(e){return e.$$typeof===dPe}function mPe(e){return Array.isArray(e)?[]:{}}function eS(e,t){return t.clone!==!1&&t.isMergeableObject(e)?cb(mPe(e),e,t):e}function pPe(e,t,o){return e.concat(t).map(function(r){return eS(r,o)})}function hPe(e,t){if(!t.customMerge)return cb;var o=t.customMerge(e);return typeof o=="function"?o:cb}function gPe(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function Xee(e){return Object.keys(e).concat(gPe(e))}function Qee(e,t){try{return t in e}catch{return!1}}function bPe(e,t){return Qee(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function vPe(e,t,o){var r={};return o.isMergeableObject(e)&&Xee(e).forEach(function(n){r[n]=eS(e[n],o)}),Xee(t).forEach(function(n){bPe(e,n)||(Qee(e,n)&&o.isMergeableObject(t[n])?r[n]=hPe(n,o)(e[n],t[n],o):r[n]=eS(t[n],o))}),r}function cb(e,t,o){o=o||{},o.arrayMerge=o.arrayMerge||pPe,o.isMergeableObject=o.isMergeableObject||aPe,o.cloneUnlessOtherwiseSpecified=eS;var r=Array.isArray(t),n=Array.isArray(e),i=r===n;return i?r?o.arrayMerge(e,t,o):vPe(e,t,o):eS(t,o)}cb.all=function(t,o){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,n){return cb(r,n,o)},{})};var kPe=cb;Jee.exports=kPe});var aoe=ie((rat,soe)=>{soe.exports=window.wp.commands});var Qa=ie((Aut,Sne)=>{Sne.exports=window.wp.date});var tie=ie((_dt,eie)=>{var qne=!1,kp,CF,BF,gP,bP,Zne,vP,EF,TF,IF,Xne,PF,RF,Qne,Jne;function Nn(){if(!qne){qne=!0;var e=navigator.userAgent,t=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e),o=/(Mac OS X)|(Windows)|(Linux)/.exec(e);if(PF=/\b(iPhone|iP[ao]d)/.exec(e),RF=/\b(iP[ao]d)/.exec(e),IF=/Android/i.exec(e),Qne=/FBAN\/\w+;/i.exec(e),Jne=/Mobile/i.exec(e),Xne=!!/Win64/.exec(e),t){kp=t[1]?parseFloat(t[1]):t[5]?parseFloat(t[5]):NaN,kp&&document&&document.documentMode&&(kp=document.documentMode);var r=/(?:Trident\/(\d+.\d+))/.exec(e);Zne=r?parseFloat(r[1])+4:kp,CF=t[2]?parseFloat(t[2]):NaN,BF=t[3]?parseFloat(t[3]):NaN,gP=t[4]?parseFloat(t[4]):NaN,gP?(t=/(?:Chrome\/(\d+\.\d+))/.exec(e),bP=t&&t[1]?parseFloat(t[1]):NaN):bP=NaN}else kp=CF=BF=bP=gP=NaN;if(o){if(o[1]){var n=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);vP=n?parseFloat(n[1].replace("_",".")):!0}else vP=!1;EF=!!o[2],TF=!!o[3]}else vP=EF=TF=!1}}var OF={ie:function(){return Nn()||kp},ieCompatibilityMode:function(){return Nn()||Zne>kp},ie64:function(){return OF.ie()&&Xne},firefox:function(){return Nn()||CF},opera:function(){return Nn()||BF},webkit:function(){return Nn()||gP},safari:function(){return OF.webkit()},chrome:function(){return Nn()||bP},windows:function(){return Nn()||EF},osx:function(){return Nn()||vP},linux:function(){return Nn()||TF},iphone:function(){return Nn()||PF},mobile:function(){return Nn()||PF||RF||IF||Jne},nativeApp:function(){return Nn()||Qne},android:function(){return Nn()||IF},ipad:function(){return Nn()||RF}};eie.exports=OF});var rie=ie((Sdt,oie)=>{"use strict";var kP=!!(typeof window<"u"&&window.document&&window.document.createElement),cRe={canUseDOM:kP,canUseWorkers:typeof Worker<"u",canUseEventListeners:kP&&!!(window.addEventListener||window.attachEvent),canUseViewport:kP&&!!window.screen,isInWorker:!kP};oie.exports=cRe});var aie=ie((xdt,sie)=>{"use strict";var nie=rie(),iie;nie.canUseDOM&&(iie=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0);function uRe(e,t){if(!nie.canUseDOM||t&&!("addEventListener"in document))return!1;var o="on"+e,r=o in document;if(!r){var n=document.createElement("div");n.setAttribute(o,"return;"),r=typeof n[o]=="function"}return!r&&iie&&e==="wheel"&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}sie.exports=uRe});var mie=ie((wdt,fie)=>{"use strict";var dRe=tie(),fRe=aie(),lie=10,cie=40,uie=800;function die(e){var t=0,o=0,r=0,n=0;return"detail"in e&&(o=e.detail),"wheelDelta"in e&&(o=-e.wheelDelta/120),"wheelDeltaY"in e&&(o=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=o,o=0),r=t*lie,n=o*lie,"deltaY"in e&&(n=e.deltaY),"deltaX"in e&&(r=e.deltaX),(r||n)&&e.deltaMode&&(e.deltaMode==1?(r*=cie,n*=cie):(r*=uie,n*=uie)),r&&!t&&(t=r<1?-1:1),n&&!o&&(o=n<1?-1:1),{spinX:t,spinY:o,pixelX:r,pixelY:n}}die.getEventType=function(){return dRe.firefox()?"DOMMouseScroll":fRe("wheel")?"wheel":"mousewheel"};fie.exports=die});var hie=ie((Cdt,pie)=>{pie.exports=mie()});var Wse=ie((bmt,Gse)=>{"use strict";Gse.exports=function e(t,o){if(t===o)return!0;if(t&&o&&typeof t=="object"&&typeof o=="object"){if(t.constructor!==o.constructor)return!1;var r,n,i;if(Array.isArray(t)){if(r=t.length,r!=o.length)return!1;for(n=r;n--!==0;)if(!e(t[n],o[n]))return!1;return!0}if(t.constructor===RegExp)return t.source===o.source&&t.flags===o.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===o.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===o.toString();if(i=Object.keys(t),r=i.length,r!==Object.keys(o).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(o,i[n]))return!1;for(n=r;n--!==0;){var s=i[n];if(!e(t[s],o[s]))return!1}return!0}return t!==t&&o!==o}});var WDe={};xa(WDe,{AlignmentControl:()=>BC,AlignmentToolbar:()=>s7,Autocomplete:()=>C7,BlockAlignmentControl:()=>HC,BlockAlignmentToolbar:()=>K7,BlockBindingsAttributeControl:()=>gy,BlockBindingsSourceFieldsList:()=>hy,BlockBreadcrumb:()=>gU,BlockCanvas:()=>foe,BlockColorsStyleSelector:()=>goe,BlockContextProvider:()=>X0,BlockControls:()=>Ut,BlockEdit:()=>kC,BlockEditorKeyboardShortcuts:()=>hB,BlockEditorProvider:()=>eK,BlockFormatControls:()=>n4,BlockIcon:()=>Ae,BlockInspector:()=>ede,BlockList:()=>xg,BlockMover:()=>kT,BlockNavigationDropdown:()=>Bre,BlockPopover:()=>RX,BlockPreview:()=>Tn,BlockSelectionClearer:()=>GX,BlockSettingsMenu:()=>WT,BlockSettingsMenuControls:()=>zT,BlockStyles:()=>Ib,BlockTitle:()=>vy,BlockToolbar:()=>Kte,BlockTools:()=>dS,BlockVerticalAlignmentControl:()=>FC,BlockVerticalAlignmentToolbar:()=>Yre,ButtonBlockAppender:()=>bd,ButtonBlockerAppender:()=>_X,ColorPalette:()=>gne,ColorPaletteControl:()=>kne,ContrastChecker:()=>QI,CopyHandler:()=>rde,DefaultBlockAppender:()=>jg,DimensionControl:()=>vp,FontSizePicker:()=>d5,HeadingLevelDropdown:()=>Nre,HeightControl:()=>Yne,InnerBlocks:()=>O_,Inserter:()=>Xi,InspectorAdvancedControls:()=>Sd,InspectorControls:()=>fe,JustifyContentControl:()=>Nh,JustifyToolbar:()=>nse,LineHeightControl:()=>UP,LinkControl:()=>Jd,MediaPlaceholder:()=>Bae,MediaReplaceFlow:()=>Zb,MediaUpload:()=>pd,MediaUploadCheck:()=>Zs,MultiSelectScrollIntoView:()=>ade,NavigableToolbar:()=>ib,ObserveTyping:()=>hQ,PanelColorSettings:()=>Tae,PlainText:()=>Ble,RecursionProvider:()=>r6,RichText:()=>tv,RichTextShortcut:()=>pz,RichTextToolbarButton:()=>gz,SETTINGS_DEFAULTS:()=>gk,SkipToSelectedBlock:()=>b2,ToolSelector:()=>yde,Typewriter:()=>dde,URLInput:()=>Xd,URLInputButton:()=>Lle,URLPopover:()=>of,Warning:()=>Pu,WritingFlow:()=>IB,__experimentalBlockAlignmentMatrixControl:()=>lU,__experimentalBlockFullHeightAligmentControl:()=>nU,__experimentalBlockPatternSetup:()=>Wre,__experimentalBlockPatternsList:()=>za,__experimentalBlockVariationPicker:()=>Mre,__experimentalBlockVariationTransforms:()=>WI,__experimentalBorderRadiusControl:()=>ZI,__experimentalColorGradientControl:()=>Wd,__experimentalColorGradientSettingsDropdown:()=>fP,__experimentalDateFormatPicker:()=>xne,__experimentalDuotoneControl:()=>eP,__experimentalFontAppearanceControl:()=>oP,__experimentalFontFamilyControl:()=>rP,__experimentalGetBorderClassesAndStyles:()=>lA,__experimentalGetColorClassesAndStyles:()=>cA,__experimentalGetDimensionsClassesAndStyles:()=>aA,__experimentalGetElementClassName:()=>UDe,__experimentalGetGapCSSValue:()=>qr,__experimentalGetGradientClass:()=>Ih,__experimentalGetGradientObjectByGradientValue:()=>Z9,__experimentalGetShadowClassesAndStyles:()=>Tj,__experimentalGetSpacingClassesAndStyles:()=>Rj,__experimentalImageEditor:()=>Xie,__experimentalImageSizeControl:()=>tse,__experimentalImageURLInputUI:()=>jle,__experimentalInspectorPopoverHeader:()=>yR,__experimentalLetterSpacingControl:()=>iP,__experimentalLibrary:()=>ide,__experimentalLinkControl:()=>jP,__experimentalLinkControlSearchInput:()=>Ise,__experimentalLinkControlSearchItem:()=>gse,__experimentalLinkControlSearchResults:()=>Sse,__experimentalListView:()=>jI,__experimentalPanelColorGradientSettings:()=>pP,__experimentalPreviewOptions:()=>rce,__experimentalPublishDateTimePicker:()=>gde,__experimentalRecursionProvider:()=>fde,__experimentalResponsiveBlockControl:()=>Ple,__experimentalSpacingSizesControl:()=>dv,__experimentalTextDecorationControl:()=>aP,__experimentalTextTransformControl:()=>cP,__experimentalUnitControl:()=>Ole,__experimentalUseBlockOverlayActive:()=>vU,__experimentalUseBlockPreview:()=>Wq,__experimentalUseBorderProps:()=>Ej,__experimentalUseColorProps:()=>Pj,__experimentalUseCustomSides:()=>sj,__experimentalUseGradient:()=>K_e,__experimentalUseHasRecursion:()=>mde,__experimentalUseMultipleOriginColorsAndGradients:()=>Kd,__experimentalUseResizeCanvas:()=>nce,__experimentalWritingModeControl:()=>dP,__unstableBlockSettingsMenuFirstItem:()=>IT,__unstableBlockToolbarLastItem:()=>wT,__unstableEditorStyles:()=>Yl,__unstableIframe:()=>hg,__unstableInserterMenuExtension:()=>_E,__unstableRichTextInputEvent:()=>bz,__unstableUseBlockSelectionClearer:()=>$m,__unstableUseClipboardHandler:()=>ode,__unstableUseMouseMoveTypingReset:()=>L_,__unstableUseTypewriter:()=>e6,__unstableUseTypingObserver:()=>N_,createCustomColorsHOC:()=>Y9,getColorClassName:()=>Pi,getColorObjectByAttributeValues:()=>wa,getColorObjectByColorValue:()=>q0,getComputedFluidTypographyValue:()=>J9,getCustomValueFromPreset:()=>T7,getDimensionsClassesAndStyles:()=>aA,getFontSize:()=>Ph,getFontSizeClass:()=>Ru,getFontSizeObjectByValue:()=>u5,getGradientSlugByValue:()=>X9,getGradientValueBySlug:()=>wC,getPxFromCssUnit:()=>xge,getSpacingPresetCssVar:()=>Ls,getTypographyClassesAndStyles:()=>Oj,isValueSpacingPreset:()=>VC,privateApis:()=>jj,store:()=>x,storeConfig:()=>Bh,transformStyles:()=>_g,useBlockBindingsUtils:()=>Vl,useBlockCommands:()=>wI,useBlockDisplayInformation:()=>Pt,useBlockEditContext:()=>Pe,useBlockEditingMode:()=>go,useBlockProps:()=>Uy,useCachedTruthy:()=>Aj,useHasRecursion:()=>n6,useInnerBlocksProps:()=>Xm,useSetting:()=>G9,useSettings:()=>pe,useStyleOverride:()=>li,withColorContext:()=>XI,withColors:()=>q9,withFontSizes:()=>n7});function Hj(e){var t,o,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(o=Hj(e[t]))&&(r&&(r+=" "),r+=o)}else for(o in e)e[o]&&(r&&(r+=" "),r+=o);return r}function Zge(){for(var e,t,o=0,r="",n=arguments.length;o<n;o++)(e=arguments[o])&&(t=Hj(e))&&(r&&(r+=" "),r+=t);return r}var D=Zge;var _de=l(Y(),1),vs=l(O(),1),xR=l(z(),1),l6=l(X(),1),i0=l(pt(),1);var G0=l(O(),1),Es=Symbol("mayDisplayControls"),nh=Symbol("mayDisplayParentControls"),lu=Symbol("mayDisplayPatternEditingControls"),W0=Symbol("blockEditingMode"),ih=Symbol("blockBindings"),$0=Symbol("isPreviewMode"),fk=Symbol("isInListViewBlockSupportTree"),vA={name:"",isSelected:!1},kA=(0,G0.createContext)(vA);kA.displayName="BlockEditContext";var{Provider:K0}=kA;function Pe(){return(0,G0.useContext)(kA)}var Xge={grad:.9,turn:360,rad:360/(2*Math.PI)},Bl=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},nr=function(e,t,o){return t===void 0&&(t=0),o===void 0&&(o=Math.pow(10,t)),Math.round(o*e)/o+0},Ii=function(e,t,o){return t===void 0&&(t=0),o===void 0&&(o=1),e>o?o:e>t?e:t},o8=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},qj=function(e){return{r:Ii(e.r,0,255),g:Ii(e.g,0,255),b:Ii(e.b,0,255),a:Ii(e.a)}},yA=function(e){return{r:nr(e.r),g:nr(e.g),b:nr(e.b),a:nr(e.a,3)}},Qge=/^#([0-9a-f]{3,8})$/i,Y0=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},r8=function(e){var t=e.r,o=e.g,r=e.b,n=e.a,i=Math.max(t,o,r),s=i-Math.min(t,o,r),a=s?i===t?(o-r)/s:i===o?2+(r-t)/s:4+(t-o)/s:0;return{h:60*(a<0?a+6:a),s:i?s/i*100:0,v:i/255*100,a:n}},n8=function(e){var t=e.h,o=e.s,r=e.v,n=e.a;t=t/360*6,o/=100,r/=100;var i=Math.floor(t),s=r*(1-o),a=r*(1-(t-i)*o),c=r*(1-(1-t+i)*o),u=i%6;return{r:255*[r,a,s,s,c,r][u],g:255*[c,r,r,a,s,s][u],b:255*[s,s,c,r,r,a][u],a:n}},Zj=function(e){return{h:o8(e.h),s:Ii(e.s,0,100),l:Ii(e.l,0,100),a:Ii(e.a)}},Xj=function(e){return{h:nr(e.h),s:nr(e.s),l:nr(e.l),a:nr(e.a,3)}},Qj=function(e){return n8((o=(t=e).s,{h:t.h,s:(o*=((r=t.l)<50?r:100-r)/100)>0?2*o/(r+o)*100:0,v:r+o,a:t.a}));var t,o,r},mk=function(e){return{h:(t=r8(e)).h,s:(n=(200-(o=t.s))*(r=t.v)/100)>0&&n<200?o*r/100/(n<=100?n:200-n)*100:0,l:n/2,a:t.a};var t,o,r,n},Jge=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ebe=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,tbe=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,obe=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,xA={string:[[function(e){var t=Qge.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?nr(parseInt(e[3]+e[3],16)/255,2):1}:e.length===6||e.length===8?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:e.length===8?nr(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=tbe.exec(e)||obe.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:qj({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=Jge.exec(e)||ebe.exec(e);if(!t)return null;var o,r,n=Zj({h:(o=t[1],r=t[2],r===void 0&&(r="deg"),Number(o)*(Xge[r]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return Qj(n)},"hsl"]],object:[[function(e){var t=e.r,o=e.g,r=e.b,n=e.a,i=n===void 0?1:n;return Bl(t)&&Bl(o)&&Bl(r)?qj({r:Number(t),g:Number(o),b:Number(r),a:Number(i)}):null},"rgb"],[function(e){var t=e.h,o=e.s,r=e.l,n=e.a,i=n===void 0?1:n;if(!Bl(t)||!Bl(o)||!Bl(r))return null;var s=Zj({h:Number(t),s:Number(o),l:Number(r),a:Number(i)});return Qj(s)},"hsl"],[function(e){var t=e.h,o=e.s,r=e.v,n=e.a,i=n===void 0?1:n;if(!Bl(t)||!Bl(o)||!Bl(r))return null;var s=(function(a){return{h:o8(a.h),s:Ii(a.s,0,100),v:Ii(a.v,0,100),a:Ii(a.a)}})({h:Number(t),s:Number(o),v:Number(r),a:Number(i)});return n8(s)},"hsv"]]},Jj=function(e,t){for(var o=0;o<t.length;o++){var r=t[o][0](e);if(r)return[r,t[o][1]]}return[null,void 0]},rbe=function(e){return typeof e=="string"?Jj(e.trim(),xA.string):typeof e=="object"&&e!==null?Jj(e,xA.object):[null,void 0]};var _A=function(e,t){var o=mk(e);return{h:o.h,s:Ii(o.s+100*t,0,100),l:o.l,a:o.a}},SA=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},e8=function(e,t){var o=mk(e);return{h:o.h,s:o.s,l:Ii(o.l+100*t,0,100),a:o.a}},wA=(function(){function e(t){this.parsed=rbe(t)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return this.parsed!==null},e.prototype.brightness=function(){return nr(SA(this.rgba),2)},e.prototype.isDark=function(){return SA(this.rgba)<.5},e.prototype.isLight=function(){return SA(this.rgba)>=.5},e.prototype.toHex=function(){return t=yA(this.rgba),o=t.r,r=t.g,n=t.b,s=(i=t.a)<1?Y0(nr(255*i)):"","#"+Y0(o)+Y0(r)+Y0(n)+s;var t,o,r,n,i,s},e.prototype.toRgb=function(){return yA(this.rgba)},e.prototype.toRgbString=function(){return t=yA(this.rgba),o=t.r,r=t.g,n=t.b,(i=t.a)<1?"rgba("+o+", "+r+", "+n+", "+i+")":"rgb("+o+", "+r+", "+n+")";var t,o,r,n,i},e.prototype.toHsl=function(){return Xj(mk(this.rgba))},e.prototype.toHslString=function(){return t=Xj(mk(this.rgba)),o=t.h,r=t.s,n=t.l,(i=t.a)<1?"hsla("+o+", "+r+"%, "+n+"%, "+i+")":"hsl("+o+", "+r+"%, "+n+"%)";var t,o,r,n,i},e.prototype.toHsv=function(){return t=r8(this.rgba),{h:nr(t.h),s:nr(t.s),v:nr(t.v),a:nr(t.a,3)};var t},e.prototype.invert=function(){return Tt({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},e.prototype.saturate=function(t){return t===void 0&&(t=.1),Tt(_A(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),Tt(_A(this.rgba,-t))},e.prototype.grayscale=function(){return Tt(_A(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),Tt(e8(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),Tt(e8(this.rgba,-t))},e.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},e.prototype.alpha=function(t){return typeof t=="number"?Tt({r:(o=this.rgba).r,g:o.g,b:o.b,a:t}):nr(this.rgba.a,3);var o},e.prototype.hue=function(t){var o=mk(this.rgba);return typeof t=="number"?Tt({h:t,s:o.s,l:o.l,a:o.a}):nr(o.h)},e.prototype.isEqual=function(t){return this.toHex()===Tt(t).toHex()},e})(),Tt=function(e){return e instanceof wA?e:new wA(e)},t8=[],cu=function(e){e.forEach(function(t){t8.indexOf(t)<0&&(t(wA,xA),t8.push(t))})};function uu(e,t){var o={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},r={};for(var n in o)r[o[n]]=n;var i={};e.prototype.toName=function(s){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var a,c,u=r[this.toHex()];if(u)return u;if(s?.closest){var d=this.toRgb(),f=1/0,m="black";if(!i.length)for(var h in o)i[h]=new e(o[h]).toRgb();for(var p in o){var g=(a=d,c=i[p],Math.pow(a.r-c.r,2)+Math.pow(a.g-c.g,2)+Math.pow(a.b-c.b,2));g<f&&(f=g,m=p)}return m}},t.string.push([function(s){var a=s.toLowerCase(),c=a==="transparent"?"#0000":o[a];return c?new e(c).toRgb():null},"name"])}var CA=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},BA=function(e){return .2126*CA(e.r)+.7152*CA(e.g)+.0722*CA(e.b)};function sh(e){e.prototype.luminance=function(){return t=BA(this.rgba),(o=2)===void 0&&(o=0),r===void 0&&(r=Math.pow(10,o)),Math.round(r*t)/r+0;var t,o,r},e.prototype.contrast=function(t){t===void 0&&(t="#FFF");var o,r,n,i,s,a,c,u=t instanceof e?t:new e(t);return i=this.rgba,s=u.toRgb(),a=BA(i),c=BA(s),o=a>c?(a+.05)/(c+.05):(c+.05)/(a+.05),(r=2)===void 0&&(r=0),n===void 0&&(n=Math.pow(10,r)),Math.floor(n*o)/n+0},e.prototype.isReadable=function(t,o){return t===void 0&&(t="#FFF"),o===void 0&&(o={}),this.contrast(t)>=(a=(s=(r=o).size)===void 0?"normal":s,(i=(n=r.level)===void 0?"AA":n)==="AAA"&&a==="normal"?7:i==="AA"&&a==="large"?3:4.5);var r,n,i,s,a}}var c8=l(A(),1);var a8=l(EA(),1),{lock:l8,unlock:M}=(0,a8.__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-editor");cu([uu,sh]);var{kebabCase:nbe}=M(c8.privateApis),wa=(e,t,o)=>{if(t){let r=e?.find(n=>n.slug===t);if(r)return r}return{color:o}},q0=(e,t)=>e?.find(o=>o.color===t);function Pi(e,t){if(!(!e||!t))return`has-${nbe(t)}-${e}`}function u8(e,t){let o=Tt(t),r=({color:i})=>o.contrast(i),n=Math.max(...e.map(r));return e.find(i=>r(i)===n).color}var yC=l(O(),1),fm=l(X(),1),$9=l(A(),1);var U9=l(z(),1),H9=l(Re(),1);var vC=l(O(),1),bC=l(Y(),1);var El=l(Y(),1),k8=l(A(),1),hk=l(z(),1),Gf=l(O(),1);var ah=l(O(),1),m8=l(w(),1),Z0=(0,ah.createContext)({});Z0.displayName="BlockContext";function X0({value:e,children:t}){let o=(0,ah.useContext)(Z0),r=(0,ah.useMemo)(()=>({...o,...e}),[o,e]);return(0,m8.jsx)(Z0.Provider,{value:r,children:t})}var Or=Z0;var lh=l(qn(),1);function jf(e){return e?.startsWith("#")&&(0,lh.isValidFragment)(e)}function Uf(e){return e?.startsWith("/")||e?.startsWith("./")||e?.startsWith("../")}function Hf(e){if(e.includes(" "))return!1;let o=(0,lh.getProtocol)(e),r=(0,lh.isValidProtocol)(o),n=ibe(e),i=e?.startsWith("www.");return r||i||jf(e)||n||Uf(e)}function ibe(e,t=6){let o=e.split(/[?#]/)[0];return new RegExp(`(?<=\\S)\\.(?:[a-zA-Z_]{2,${t}})(?:\\/|$)`).test(o)}var sbe="__default",h8="core/pattern-overrides";function pk(e){return e?.[sbe]?.source===h8}function g8(e,t){if(pk(e)){let o={};for(let r of t){let n=e[r]?e[r]:{source:h8};o[r]=n}return o}return e}var b8=l(O(),1),br=(0,b8.createContext)({});br.displayName="PrivateBlockContext";var Q0=l(w(),1),abe={},lbe=e=>{let{name:t}=e,o=(0,El.getBlockType)(t);if(!o)return null;let r=o.edit||o.save;return(0,Q0.jsx)(r,{...e})},v8=(0,k8.withFilters)("editor.BlockEdit")(lbe),cbe=e=>{let{name:t,clientId:o,attributes:r,setAttributes:n}=e,i=(0,hk.useRegistry)(),s=(0,El.getBlockType)(t),a=(0,Gf.useContext)(Or),c=(0,hk.useSelect)(k=>M(k(El.store)).getAllBlockBindingsSources(),[]),{bindableAttributes:u}=(0,Gf.useContext)(br),{blockBindings:d,context:f,hasPatternOverrides:m}=(0,Gf.useMemo)(()=>{let k=s?.usesContext?Object.fromEntries(Object.entries(a).filter(([v])=>s.usesContext.includes(v))):abe;return r?.metadata?.bindings&&Object.values(r?.metadata?.bindings||{}).forEach(v=>{c[v?.source]?.usesContext?.forEach(y=>{k[y]=a[y]})}),{blockBindings:g8(r?.metadata?.bindings,u),context:k,hasPatternOverrides:pk(r?.metadata?.bindings)}},[s?.usesContext,a,r?.metadata?.bindings,u,c]),h=(0,hk.useSelect)(k=>{if(!d)return r;let v={},y=new Map;for(let[_,S]of Object.entries(d)){let{source:C,args:B}=S,P=c[C];!P||!u?.includes(_)||y.set(P,{...y.get(P),[_]:{args:B}})}if(y.size)for(let[_,S]of y){let C={};_.getValues?C=_.getValues({select:k,context:f,clientId:o,bindings:S}):Object.keys(S).forEach(B=>{C[B]=_.label});for(let[B,P]of Object.entries(C))B==="url"&&(!P||!Hf(P))?v[B]=null:v[B]=P}return{...r,...v}},[r,u,d,o,f,c]),p=(0,Gf.useCallback)(k=>{if(!d){n(k);return}i.batch(()=>{let v={...k},y=new Map;for(let[S,C]of Object.entries(v)){if(!d[S]||!u?.includes(S))continue;let B=d[S],P=c[B?.source];P?.setValues&&(y.set(P,{...y.get(P),[S]:{args:B.args,newValue:C}}),delete v[S])}if(y.size)for(let[S,C]of y)S.setValues({select:i.select,dispatch:i.dispatch,context:f,clientId:o,bindings:C});let _=!!f["pattern/overrides"];!(m&&_)&&Object.keys(v).length&&(m&&delete v.href,n(v))})},[u,d,o,f,m,n,c,i]);if(!s)return null;if(s.apiVersion>1)return(0,Q0.jsx)(v8,{...e,attributes:h,context:f,setAttributes:p});let g=(0,El.hasBlockSupport)(s,"className",!0)?(0,El.getBlockDefaultClassName)(t):null,b=D(g,r?.className,e.className);return(0,Q0.jsx)(v8,{...e,attributes:h,className:b,context:f,setAttributes:p})},y8=cbe;var F9=l(Y(),1),c5=l(A(),1),z9=l(z(),1),gC=l(N(),1);var hC=l(z(),1);var kk=l(Wf(),1),PA=l(X(),1),yk=l(z(),1),P8=l(Re(),1),ax=l(Y(),1);var Me=l(N(),1),x8={insertUsage:{}},gk={alignWide:!1,supportsLayout:!0,colors:[{name:(0,Me.__)("Black"),slug:"black",color:"#000000"},{name:(0,Me.__)("Cyan bluish gray"),slug:"cyan-bluish-gray",color:"#abb8c3"},{name:(0,Me.__)("White"),slug:"white",color:"#ffffff"},{name:(0,Me.__)("Pale pink"),slug:"pale-pink",color:"#f78da7"},{name:(0,Me.__)("Vivid red"),slug:"vivid-red",color:"#cf2e2e"},{name:(0,Me.__)("Luminous vivid orange"),slug:"luminous-vivid-orange",color:"#ff6900"},{name:(0,Me.__)("Luminous vivid amber"),slug:"luminous-vivid-amber",color:"#fcb900"},{name:(0,Me.__)("Light green cyan"),slug:"light-green-cyan",color:"#7bdcb5"},{name:(0,Me.__)("Vivid green cyan"),slug:"vivid-green-cyan",color:"#00d084"},{name:(0,Me.__)("Pale cyan blue"),slug:"pale-cyan-blue",color:"#8ed1fc"},{name:(0,Me.__)("Vivid cyan blue"),slug:"vivid-cyan-blue",color:"#0693e3"},{name:(0,Me.__)("Vivid purple"),slug:"vivid-purple",color:"#9b51e0"}],fontSizes:[{name:(0,Me._x)("Small","font size name"),size:13,slug:"small"},{name:(0,Me._x)("Normal","font size name"),size:16,slug:"normal"},{name:(0,Me._x)("Medium","font size name"),size:20,slug:"medium"},{name:(0,Me._x)("Large","font size name"),size:36,slug:"large"},{name:(0,Me._x)("Huge","font size name"),size:42,slug:"huge"}],imageDefaultSize:"large",imageSizes:[{slug:"thumbnail",name:(0,Me.__)("Thumbnail")},{slug:"medium",name:(0,Me.__)("Medium")},{slug:"large",name:(0,Me.__)("Large")},{slug:"full",name:(0,Me.__)("Full Size")}],imageEditing:!0,maxWidth:580,allowedBlockTypes:!0,maxUploadFileSize:0,allowedMimeTypes:null,canLockBlocks:!0,canEditCSS:!1,enableOpenverseMediaCategory:!0,clearBlockSelection:!0,__experimentalCanUserUseUnfilteredHTML:!1,__experimentalBlockDirectory:!1,__mobileEnablePageTemplates:!1,__experimentalBlockPatterns:[],__experimentalBlockPatternCategories:[],isPreviewMode:!1,blockInspectorAnimation:{animationParent:"core/navigation","core/navigation":{enterDirection:"leftToRight"},"core/navigation-submenu":{enterDirection:"rightToLeft"},"core/navigation-link":{enterDirection:"rightToLeft"},"core/search":{enterDirection:"rightToLeft"},"core/social-links":{enterDirection:"rightToLeft"},"core/page-list":{enterDirection:"rightToLeft"},"core/spacer":{enterDirection:"rightToLeft"},"core/home-link":{enterDirection:"rightToLeft"},"core/site-title":{enterDirection:"rightToLeft"},"core/site-logo":{enterDirection:"rightToLeft"}},generateAnchors:!1,gradients:[{name:(0,Me.__)("Vivid cyan blue to vivid purple"),gradient:"linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)",slug:"vivid-cyan-blue-to-vivid-purple"},{name:(0,Me.__)("Light green cyan to vivid green cyan"),gradient:"linear-gradient(135deg,rgb(122,220,180) 0%,rgb(0,208,130) 100%)",slug:"light-green-cyan-to-vivid-green-cyan"},{name:(0,Me.__)("Luminous vivid amber to luminous vivid orange"),gradient:"linear-gradient(135deg,rgba(252,185,0,1) 0%,rgba(255,105,0,1) 100%)",slug:"luminous-vivid-amber-to-luminous-vivid-orange"},{name:(0,Me.__)("Luminous vivid orange to vivid red"),gradient:"linear-gradient(135deg,rgba(255,105,0,1) 0%,rgb(207,46,46) 100%)",slug:"luminous-vivid-orange-to-vivid-red"},{name:(0,Me.__)("Very light gray to cyan bluish gray"),gradient:"linear-gradient(135deg,rgb(238,238,238) 0%,rgb(169,184,195) 100%)",slug:"very-light-gray-to-cyan-bluish-gray"},{name:(0,Me.__)("Cool to warm spectrum"),gradient:"linear-gradient(135deg,rgb(74,234,220) 0%,rgb(151,120,209) 20%,rgb(207,42,186) 40%,rgb(238,44,130) 60%,rgb(251,105,98) 80%,rgb(254,248,76) 100%)",slug:"cool-to-warm-spectrum"},{name:(0,Me.__)("Blush light purple"),gradient:"linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)",slug:"blush-light-purple"},{name:(0,Me.__)("Blush bordeaux"),gradient:"linear-gradient(135deg,rgb(254,205,165) 0%,rgb(254,45,45) 50%,rgb(107,0,62) 100%)",slug:"blush-bordeaux"},{name:(0,Me.__)("Luminous dusk"),gradient:"linear-gradient(135deg,rgb(255,203,112) 0%,rgb(199,81,192) 50%,rgb(65,88,208) 100%)",slug:"luminous-dusk"},{name:(0,Me.__)("Pale ocean"),gradient:"linear-gradient(135deg,rgb(255,245,203) 0%,rgb(182,227,212) 50%,rgb(51,167,181) 100%)",slug:"pale-ocean"},{name:(0,Me.__)("Electric grass"),gradient:"linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%)",slug:"electric-grass"},{name:(0,Me.__)("Midnight"),gradient:"linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%)",slug:"midnight"}],__unstableResolvedAssets:{styles:[],scripts:[]}};function J0(e,t,o){return[...e.slice(0,o),...Array.isArray(t)?t:[t],...e.slice(o)]}function ex(e,t,o,r=1){let n=[...e];return n.splice(t,r),J0(n,e.slice(t,t+r),o)}var Ri=Symbol("globalStylesDataKey"),tx=Symbol("globalStylesLinks"),du=Symbol("selectBlockPatternsKey"),ox=Symbol("reusableBlocksSelect"),fu=Symbol("sectionRootClientIdKey"),rx=Symbol("mediaEditKey"),nx=Symbol("getMediaSelect"),mu=Symbol("isIsolatedEditor"),Oi=Symbol("deviceTypeKey"),ix=Symbol("isNavigationOverlayContext"),w8=Symbol("isNavigationPostEditor"),bk=Symbol("mediaUploadOnSuccess"),C8=Symbol("openMediaEditorModal");var{isContentBlock:ube}=M(ax.privateApis),dbe=e=>e;function sx(e,t=""){let o=new Map,r=[];return o.set(t,r),e.forEach(n=>{let{clientId:i,innerBlocks:s}=n;r.push(i),sx(s,i).forEach((a,c)=>{o.set(c,a)})}),o}function TA(e,t=""){let o=[],r=[[t,e]];for(;r.length;){let[n,i]=r.shift();i.forEach(({innerBlocks:s,...a})=>{o.push([a.clientId,n]),s?.length&&r.push([a.clientId,s])})}return o}function R8(e,t=dbe){let o=[],r=[...e];for(;r.length;){let{innerBlocks:n,...i}=r.shift();r.push(...n),o.push([i.clientId,t(i)])}return o}function O8(e){let t={},o=[...e];for(;o.length;){let{innerBlocks:r,...n}=o.shift();o.push(...r),t[n.clientId]=!0}return t}function B8(e){return R8(e,t=>{let{attributes:o,...r}=t;return r})}function E8(e){return R8(e,t=>t.attributes)}function fbe(e,t){return(0,kk.default)(Object.keys(e),Object.keys(t))}function mbe(e,t){return e.type==="UPDATE_BLOCK_ATTRIBUTES"&&t!==void 0&&t.type==="UPDATE_BLOCK_ATTRIBUTES"&&(0,kk.default)(e.clientIds,t.clientIds)&&fbe(e.attributes,t.attributes)}function T8(e,t){let o=e.tree,r=[...t],n=[...t];for(;r.length;){let i=r.shift();r.push(...i.innerBlocks),n.push(...i.innerBlocks)}for(let i of n)o.set(i.clientId,{});for(let i of n)o.set(i.clientId,Object.assign(o.get(i.clientId),{...e.byClientId.get(i.clientId),attributes:e.attributes.get(i.clientId),innerBlocks:i.innerBlocks.map(s=>o.get(s.clientId))}))}function pu(e,t,o=!1){let r=e.tree,n=new Set([]),i=new Set;for(let s of t){let a=o?s:e.parents.get(s);do if(e.controlledInnerBlocks.has(a)){i.add(a);break}else n.add(a),a=e.parents.get(a);while(a!==void 0)}for(let s of n)r.set(s,{...r.get(s)});for(let s of n)r.get(s).innerBlocks=(e.order.get(s)||[]).map(a=>r.get(a));for(let s of i)r.set("controlled||"+s,{innerBlocks:(e.order.get(s)||[]).map(a=>r.get(a))})}var pbe=e=>(t={},o)=>{let r=e(t,o);if(r===t)return t;switch(r.tree=t.tree?t.tree:new Map,o.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{r.tree=new Map(r.tree),T8(r,o.blocks),pu(r,o.rootClientId?[o.rootClientId]:[""],!0);break}case"UPDATE_BLOCK":r.tree=new Map(r.tree),r.tree.set(o.clientId,{...r.tree.get(o.clientId),...r.byClientId.get(o.clientId),attributes:r.attributes.get(o.clientId)}),pu(r,[o.clientId],!1);break;case"SYNC_DERIVED_BLOCK_ATTRIBUTES":case"UPDATE_BLOCK_ATTRIBUTES":{r.tree=new Map(r.tree),o.clientIds.forEach(i=>{r.tree.set(i,{...r.tree.get(i),attributes:r.attributes.get(i)})}),pu(r,o.clientIds,!1);break}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{let i=O8(o.blocks);r.tree=new Map(r.tree),o.replacedClientIds.forEach(a=>{r.tree.delete(a),i[a]||r.tree.delete("controlled||"+a)}),T8(r,o.blocks),pu(r,o.blocks.map(a=>a.clientId),!1);let s=[];for(let a of o.clientIds){let c=t.parents.get(a);c!==void 0&&(c===""||r.byClientId.get(c))&&s.push(c)}pu(r,s,!0);break}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":let n=[];for(let i of o.clientIds){let s=t.parents.get(i);s!==void 0&&(s===""||r.byClientId.get(s))&&n.push(s)}r.tree=new Map(r.tree),o.removedClientIds.forEach(i=>{r.tree.delete(i),r.tree.delete("controlled||"+i)}),pu(r,n,!0);break;case"MOVE_BLOCKS_TO_POSITION":{let i=[];o.fromRootClientId?i.push(o.fromRootClientId):i.push(""),o.toRootClientId&&i.push(o.toRootClientId),r.tree=new Map(r.tree),pu(r,i,!0);break}case"MOVE_BLOCKS_UP":case"MOVE_BLOCKS_DOWN":{let i=[o.rootClientId?o.rootClientId:""];r.tree=new Map(r.tree),pu(r,i,!0);break}}return r};function hbe(e){let t,o=!1,r;return(n,i)=>{let s=e(n,i),a;if(i.type==="SET_EXPLICIT_PERSISTENT"&&(r=i.isPersistentChange,a=n.isPersistentChange??!0),r!==void 0)return a=r,a===s.isPersistentChange?s:{...s,isPersistentChange:a};let c=i.type==="MARK_LAST_CHANGE_AS_PERSISTENT"||o;return n===s&&!c?(o=i.type==="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT",a=n?.isPersistentChange??!0,n.isPersistentChange===a?n:{...s,isPersistentChange:a}):(s={...s,isPersistentChange:c?!o:!mbe(i,t)},t=i,o=i.type==="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT",s)}}function gbe(e){let t=new Set(["RECEIVE_BLOCKS"]);return(o,r)=>{let n=e(o,r);return n!==o&&(n.isIgnoredChange=t.has(r.type)),n}}var bbe=e=>(t,o)=>{let r=n=>{let i=n;for(let s=0;s<i.length;s++)!t.order.get(i[s])||o.keepControlledInnerBlocks&&o.keepControlledInnerBlocks[i[s]]||(i===n&&(i=[...i]),i.push(...t.order.get(i[s])));return i};if(t)switch(o.type){case"REMOVE_BLOCKS":o={...o,type:"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN",removedClientIds:r(o.clientIds)};break;case"REPLACE_BLOCKS":o={...o,type:"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN",replacedClientIds:r(o.clientIds)};break}return e(t,o)},vbe=e=>(t,o)=>{if(o.type==="RESET_BLOCKS"){let r=e(void 0,{type:"INSERT_BLOCKS",rootClientId:"",blocks:o.blocks}),n=t?.controlledInnerBlocks??new Set;if(t?.order)for(let s of n){if(!r.byClientId.has(s))continue;r.controlledInnerBlocks.add(s);let a=t.order.get(s);if(!a?.length)continue;r.order.set(s,a);let c=(u,d)=>{let f=t.byClientId.get(u);if(!f)return;r.byClientId.set(u,f),r.attributes.set(u,t.attributes.get(u)),r.parents.set(u,d);let m=t.order.get(u)||[];r.order.set(u,m),m.forEach(h=>c(h,u))};a.forEach(u=>c(u,s))}for(let s of r.controlledInnerBlocks){let a=r.order.get(s);if(!a?.length)continue;let c=a.map(f=>t.tree.get(f)),u=r.tree.get(s);u&&(u.innerBlocks=c),r.tree.set("controlled||"+s,{innerBlocks:c});let d=f=>{let m=t.tree.get(f);if(!m)return;r.tree.set(f,m),(r.order.get(f)||[]).forEach(d)};a.forEach(d)}let i=t?.blockEditingModes??new Map;for(let[s,a]of i)r.tree.has(s)&&r.blockEditingModes.set(s,a);return r}return e(t,o)},kbe=e=>(t,o)=>{if(o.type!=="REPLACE_INNER_BLOCKS")return e(t,o);let r={};if(t.controlledInnerBlocks.size){let s=[...o.blocks];for(;s.length;){let{innerBlocks:a,...c}=s.shift();s.push(...a),t.controlledInnerBlocks.has(c.clientId)&&(r[c.clientId]=!0)}}let n=t;t.order.get(o.rootClientId)&&(n=e(n,{type:"REMOVE_BLOCKS",keepControlledInnerBlocks:r,clientIds:t.order.get(o.rootClientId)}));let i=n;if(o.blocks.length){i=e(i,{...o,type:"INSERT_BLOCKS",index:0});let s=new Map(i.order);Object.keys(r).forEach(a=>{t.order.get(a)&&s.set(a,t.order.get(a))}),i.order=s,i.tree=new Map(i.tree),Object.keys(r).forEach(a=>{let c=`controlled||${a}`;t.tree.has(c)&&i.tree.set(c,t.tree.get(c))})}return i},ybe=e=>(t,o)=>{if(o.type==="SET_HAS_CONTROLLED_INNER_BLOCKS"){if(t.order.get(o.clientId)?.length){let n=e(t,{type:"REPLACE_INNER_BLOCKS",rootClientId:o.clientId,blocks:[]});return e(n,o)}return e(t,o)}return e(t,o)},_be=(0,PA.pipe)(yk.combineReducers,pbe,bbe,kbe,vbe,hbe,gbe,ybe)({byClientId(e=new Map,t){switch(t.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{let o=new Map(e);return B8(t.blocks).forEach(([r,n])=>{o.set(r,n)}),o}case"UPDATE_BLOCK":{if(!e.has(t.clientId))return e;let{attributes:o,...r}=t.updates;if(Object.values(r).length===0)return e;let n=new Map(e);return n.set(t.clientId,{...e.get(t.clientId),...r}),n}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{if(!t.blocks)return e;let o=new Map(e);return t.replacedClientIds.forEach(r=>{o.delete(r)}),B8(t.blocks).forEach(([r,n])=>{o.set(r,n)}),o}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{let o=new Map(e);return t.removedClientIds.forEach(r=>{o.delete(r)}),o}}return e},attributes(e=new Map,t){switch(t.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{let o=new Map(e);return E8(t.blocks).forEach(([r,n])=>{o.set(r,n)}),o}case"UPDATE_BLOCK":{if(!e.get(t.clientId)||!t.updates.attributes)return e;let o=new Map(e);return o.set(t.clientId,{...e.get(t.clientId),...t.updates.attributes}),o}case"SYNC_DERIVED_BLOCK_ATTRIBUTES":case"UPDATE_BLOCK_ATTRIBUTES":{if(t.clientIds.every(n=>!e.get(n)))return e;let o=!1,r=new Map(e);for(let n of t.clientIds){let i=Object.entries(t.options?.uniqueByBlock?t.attributes[n]:t.attributes??{});if(i.length===0)continue;let s=!1,a=e.get(n),c={};i.forEach(([u,d])=>{a[u]!==d&&(s=!0,c[u]=d)}),o=o||s,s&&r.set(n,{...a,...c})}return o?r:e}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{if(!t.blocks)return e;let o=new Map(e);return t.replacedClientIds.forEach(r=>{o.delete(r)}),E8(t.blocks).forEach(([r,n])=>{o.set(r,n)}),o}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{let o=new Map(e);return t.removedClientIds.forEach(r=>{o.delete(r)}),o}}return e},order(e=new Map,t){switch(t.type){case"RECEIVE_BLOCKS":{let o=sx(t.blocks),r=new Map(e);return o.forEach((n,i)=>{i!==""&&r.set(i,n)}),r.set("",(e.get("")??[]).concat(o[""])),r}case"INSERT_BLOCKS":{let{rootClientId:o=""}=t,r=e.get(o)||[],n=sx(t.blocks,o),{index:i=r.length}=t,s=new Map(e);return n.forEach((a,c)=>{s.set(c,a)}),s.set(o,J0(r,n.get(o),i)),s}case"MOVE_BLOCKS_TO_POSITION":{let{fromRootClientId:o="",toRootClientId:r="",clientIds:n}=t,{index:i=e.get(r).length}=t;if(o===r){let c=e.get(r).indexOf(n[0]);if(c===-1)return e;let u=new Map(e);return u.set(r,ex(e.get(r),c,i,n.length)),u}let s=new Map(e);return s.set(o,e.get(o)?.filter(a=>!n.includes(a))??[]),s.set(r,J0(e.get(r),n,i)),s}case"MOVE_BLOCKS_UP":{let{clientIds:o,rootClientId:r=""}=t,n=o[0],i=e.get(r);if(!i.length||n===i[0])return e;let s=i.indexOf(n),a=new Map(e);return a.set(r,ex(i,s,s-1,o.length)),a}case"MOVE_BLOCKS_DOWN":{let{clientIds:o,rootClientId:r=""}=t,n=o[0],i=o[o.length-1],s=e.get(r);if(!s.length||i===s[s.length-1])return e;let a=s.indexOf(n),c=new Map(e);return c.set(r,ex(s,a,a+1,o.length)),c}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{let{clientIds:o}=t;if(!t.blocks)return e;let r=sx(t.blocks),n=new Map(e);return t.replacedClientIds.forEach(i=>{n.delete(i)}),r.forEach((i,s)=>{s!==""&&n.set(s,i)}),n.forEach((i,s)=>{let a=Object.values(i).reduce((c,u)=>u===o[0]?[...c,...r.get("")]:(o.indexOf(u)===-1&&c.push(u),c),[]);n.set(s,a)}),n}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{let o=new Map(e);return t.removedClientIds.forEach(r=>{o.delete(r)}),o.forEach((r,n)=>{let i=r?.filter(s=>!t.removedClientIds.includes(s))??[];i.length!==r.length&&o.set(n,i)}),o}}return e},parents(e=new Map,t){switch(t.type){case"RECEIVE_BLOCKS":{let o=new Map(e);return TA(t.blocks).forEach(([r,n])=>{o.set(r,n)}),o}case"INSERT_BLOCKS":{let o=new Map(e);return TA(t.blocks,t.rootClientId||"").forEach(([r,n])=>{o.set(r,n)}),o}case"MOVE_BLOCKS_TO_POSITION":{let o=new Map(e);return t.clientIds.forEach(r=>{o.set(r,t.toRootClientId||"")}),o}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{let o=new Map(e);return t.replacedClientIds.forEach(r=>{o.delete(r)}),TA(t.blocks,e.get(t.clientIds[0])).forEach(([r,n])=>{o.set(r,n)}),o}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{let o=new Map(e);return t.removedClientIds.forEach(r=>{o.delete(r)}),o}}return e},controlledInnerBlocks(e=new Set,{type:t,clientId:o,hasControlledInnerBlocks:r}){if(t==="SET_HAS_CONTROLLED_INNER_BLOCKS"){if(r)return e.has(o)?e:new Set(e).add(o);if(!e.has(o))return e;let n=new Set(e);return n.delete(o),n}return e},blockEditingModes(e=new Map,t){switch(t.type){case"SET_BLOCK_EDITING_MODE":return e.get(t.clientId)===t.mode?e:new Map(e).set(t.clientId,t.mode);case"UNSET_BLOCK_EDITING_MODE":{if(!e.has(t.clientId))return e;let o=new Map(e);return o.delete(t.clientId),o}}return e}});function Sbe(e=!1,t){switch(t.type){case"HIDE_BLOCK_INTERFACE":return!0;case"SHOW_BLOCK_INTERFACE":return!1}return e}function xbe(e=!1,t){switch(t.type){case"START_TYPING":return!0;case"STOP_TYPING":return!1}return e}function wbe(e=!1,t){switch(t.type){case"START_DRAGGING":return!0;case"STOP_DRAGGING":return!1}return e}function Cbe(e=[],t){switch(t.type){case"START_DRAGGING_BLOCKS":return t.clientIds;case"STOP_DRAGGING_BLOCKS":return[]}return e}function Bbe(e={},t){return t.type==="SET_BLOCK_VISIBILITY"?{...e,...t.updates}:e}function I8(e={},t){switch(t.type){case"CLEAR_SELECTED_BLOCK":return e.clientId?{}:e;case"SELECT_BLOCK":return t.clientId===e.clientId?e:{clientId:t.clientId};case"REPLACE_INNER_BLOCKS":case"INSERT_BLOCKS":return!t.updateSelection||!t.blocks.length?e:{clientId:t.blocks[0].clientId};case"REMOVE_BLOCKS":return!t.clientIds||!t.clientIds.length||t.clientIds.indexOf(e.clientId)===-1?e:{};case"REPLACE_BLOCKS":{if(t.clientIds.indexOf(e.clientId)===-1)return e;let o=t.blocks[t.indexToSelect]||t.blocks[t.blocks.length-1];return o?o.clientId===e.clientId?e:{clientId:o.clientId}:{}}}return e}function Ebe(e={},t){switch(t.type){case"SELECTION_CHANGE":return t.clientId?{selectionStart:{clientId:t.clientId,attributeKey:t.attributeKey,offset:t.startOffset},selectionEnd:{clientId:t.clientId,attributeKey:t.attributeKey,offset:t.endOffset}}:{selectionStart:t.start||e.selectionStart,selectionEnd:t.end||e.selectionEnd};case"RESET_SELECTION":let{selectionStart:n,selectionEnd:i}=t;return{selectionStart:n,selectionEnd:i};case"MULTI_SELECT":let{start:s,end:a}=t;return s===e.selectionStart?.clientId&&a===e.selectionEnd?.clientId?e:{selectionStart:{clientId:s},selectionEnd:{clientId:a}};case"RESET_BLOCKS":let c=e?.selectionStart?.clientId,u=e?.selectionEnd?.clientId;if(!c&&!u)return e;if(!t.blocks.some(d=>d.clientId===c))return{selectionStart:{},selectionEnd:{}};if(!t.blocks.some(d=>d.clientId===u))return{...e,selectionEnd:e.selectionStart}}let o=I8(e.selectionStart,t),r=I8(e.selectionEnd,t);return o===e.selectionStart&&r===e.selectionEnd?e:{selectionStart:o,selectionEnd:r}}function Tbe(e=!1,t){switch(t.type){case"START_MULTI_SELECT":return!0;case"STOP_MULTI_SELECT":return!1}return e}function Ibe(e=!0,t){return t.type==="TOGGLE_SELECTION"?t.isSelectionEnabled:e}function Pbe(e=null,t){switch(t.type){case"SHOW_VIEWPORT_MODAL":return t.clientIds;case"HIDE_VIEWPORT_MODAL":return null}return e}function Rbe(e=!1,t){switch(t.type){case"DISPLAY_BLOCK_REMOVAL_PROMPT":let{clientIds:o,selectPrevious:r,message:n}=t;return{clientIds:o,selectPrevious:r,message:n};case"CLEAR_BLOCK_REMOVAL_PROMPT":return!1}return e}function Obe(e=!1,t){return t.type==="SET_BLOCK_REMOVAL_RULES"?t.rules:e}function Abe(e=null,t){return t.type==="REPLACE_BLOCKS"&&t.initialPosition!==void 0||["MULTI_SELECT","SELECT_BLOCK","RESET_SELECTION","INSERT_BLOCKS","REPLACE_INNER_BLOCKS"].includes(t.type)?t.initialPosition:e}function Lbe(e={},t){if(t.type==="TOGGLE_BLOCK_MODE"){let{clientId:o}=t;return{...e,[o]:e[o]&&e[o]==="html"?"visual":"html"}}return e}function Nbe(e=null,t){switch(t.type){case"SHOW_INSERTION_POINT":{let{rootClientId:o,index:r,__unstableWithInserter:n,operation:i,nearestSide:s}=t,a={rootClientId:o,index:r,__unstableWithInserter:n,operation:i,nearestSide:s};return(0,kk.default)(e,a)?e:a}case"HIDE_INSERTION_POINT":return null}return e}function Mbe(e={isValid:!0},t){return t.type==="SET_TEMPLATE_VALIDITY"?{...e,isValid:t.isValid}:e}function Dbe(e=gk,t){if(t.type==="UPDATE_SETTINGS"){let o=t.reset?{...gk,...t.settings}:{...e,...t.settings};return Object.defineProperty(o,"__unstableIsPreviewMode",{get(){return(0,P8.default)("__unstableIsPreviewMode",{since:"6.8",alternative:"isPreviewMode"}),this.isPreviewMode}}),o}return e}function Vbe(e=x8,t){switch(t.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":{let o=t.blocks.reduce((r,n)=>{let{attributes:i,name:s}=n,a=s,c=(0,yk.select)(ax.store).getActiveBlockVariation(s,i);return c?.name&&(a+="/"+c.name),s==="core/block"&&(a+="/"+i.ref),{...r,[a]:{time:t.time,count:r[a]?r[a].count+1:1}}},e.insertUsage);return{...e,insertUsage:o}}}return e}var Fbe=(e=new Map,t)=>{switch(t.type){case"REPLACE_BLOCKS":{let o=new Set,r=[...t.blocks];for(;r.length;){let i=r.shift();o.add(i.clientId),r.push(...i.innerBlocks)}let n=new Map(e);for(let i of t.clientIds)o.has(i)||n.delete(i);return n}case"REMOVE_BLOCKS":{let o=new Map(e);for(let r of t.clientIds)o.delete(r);return o}case"UPDATE_BLOCK_LIST_SETTINGS":{let r=(typeof t.clientId=="string"?[[t.clientId,t.settings]]:Object.entries(t.clientId)).filter(([i,s])=>s?!(0,kk.default)(e.get(i),s):e.has(i));if(!r.length)return e;let n=new Map(e);for(let[i,s]of r)s?n.set(i,s):n.delete(i);return n}}return e};function zbe(e=null,t){switch(t.type){case"UPDATE_BLOCK":if(!t.updates.attributes)break;return{[t.clientId]:t.updates.attributes};case"UPDATE_BLOCK_ATTRIBUTES":return t.clientIds.reduce((o,r)=>({...o,[r]:t.options?.uniqueByBlock?t.attributes[r]:t.attributes}),{})}return e}function jbe(e,t){switch(t.type){case"TOGGLE_BLOCK_HIGHLIGHT":let{clientId:o,isHighlighted:r}=t;return r?o:e===o?null:e;case"SELECT_BLOCK":if(t.clientId!==e)return null}return e}function Ube(e,t){switch(t.type){case"TOGGLE_BLOCK_SPOTLIGHT":let{clientId:o,hasBlockSpotlight:r}=t;return r?o:e===o?null:e;case"SELECT_BLOCK":return t.clientId!==e?null:e;case"SELECTION_CHANGE":return t.start?.clientId!==e||t.end?.clientId!==e?null:e;case"CLEAR_SELECTED_BLOCK":return null}return e}function Hbe(e=null,t){switch(t.type){case"SET_BLOCK_EXPANDED_IN_LIST_VIEW":return t.clientId;case"SELECT_BLOCK":if(t.clientId!==e)return null}return e}function Gbe(e={},t){switch(t.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":if(!t.blocks.length)return e;let o=t.blocks.map(n=>n.clientId),r=t.meta?.source;return{clientIds:o,source:r};case"RESET_BLOCKS":return{}}return e}function Wbe(e,t){if(t.type==="EDIT_CONTENT_ONLY_SECTION")return t.clientId;if(!e)return e;switch(t.type){case"REMOVE_BLOCKS":case"REPLACE_BLOCKS":if(t.clientIds.includes(e))return;break;case"RESET_BLOCKS":if(!O8(t.blocks)[e])return;break}return e}function $be(e=new Map,t){switch(t.type){case"SET_STYLE_OVERRIDE":return new Map(e).set(t.id,t.style);case"DELETE_STYLE_OVERRIDE":{let o=new Map(e);return o.delete(t.id),o}}return e}function Kbe(e=[],t){return t.type==="REGISTER_INSERTER_MEDIA_CATEGORY"?[...e,t.category]:e}function Ybe(e=!1,t){return t.type==="LAST_FOCUS"?t.lastFocus:e}function qbe(e=100,t){switch(t.type){case"SET_ZOOM_LEVEL":return t.zoom;case"RESET_ZOOM_LEVEL":return 100}return e}function Zbe(e=null,t){switch(t.type){case"SET_INSERTION_POINT":return t.value;case"SELECT_BLOCK":return null}return e}function Xbe(e={allOpen:!1,panels:{}},t){switch(t.type){case"SET_OPEN_LIST_VIEW_PANEL":return{allOpen:!1,panels:t.clientId?{[t.clientId]:!0}:{}};case"SET_ALL_LIST_VIEW_PANELS_OPEN":return{allOpen:!0,panels:{}};case"TOGGLE_LIST_VIEW_PANEL":return{allOpen:!1,panels:{...e.panels,[t.clientId]:t.isOpen}};case"REPLACE_BLOCKS":case"REMOVE_BLOCKS":{if(!t.clientIds||t.clientIds.length===0)return e;let o={...e.panels},r=!1;return t.clientIds.forEach(n=>{n in o&&(delete o[n],r=!0)}),r?{...e,panels:o}:e}}return e}function Qbe(e=0,t){return t.type==="INCREMENT_LIST_VIEW_EXPAND_REVISION"?e+1:e}function Jbe(e=!1,t){switch(t.type){case"OPEN_LIST_VIEW_CONTENT_PANEL":return!0;case"CLOSE_LIST_VIEW_CONTENT_PANEL":return!1;case"CLEAR_SELECTED_BLOCK":return!1}return e}function eve(e=null,t){switch(t.type){case"REQUEST_INSPECTOR_TAB":return{tabName:t.tabName,options:t.options};case"CLEAR_REQUESTED_INSPECTOR_TAB":return null}return e}var tve=(0,yk.combineReducers)({blocks:_be,isDragging:wbe,isTyping:xbe,isBlockInterfaceHidden:Sbe,draggedBlocks:Cbe,selection:Ebe,isMultiSelecting:Tbe,isSelectionEnabled:Ibe,initialPosition:Abe,blocksMode:Lbe,blockListSettings:Fbe,insertionPoint:Zbe,insertionCue:Nbe,template:Mbe,settings:Dbe,preferences:Vbe,lastBlockAttributesChange:zbe,lastFocus:Ybe,expandedBlock:Hbe,highlightedBlock:jbe,lastBlockInserted:Gbe,editedContentOnlySection:Wbe,blockVisibility:Bbe,viewportModalClientIds:Pbe,styleOverrides:$be,removalPromptData:Rbe,blockRemovalRules:Obe,registeredInserterMediaCategories:Kbe,zoomLevel:qbe,hasBlockSpotlight:Ube,openedListViewPanels:Xbe,listViewExpandRevision:Qbe,listViewContentPanelOpen:Jbe,requestedInspectorTab:eve});function A8(e,t){if(t===""){let n=e.blocks.tree.get(t);return n?{clientId:"",...n}:void 0}if(!e.blocks.controlledInnerBlocks.has(t))return e.blocks.tree.get(t);let o=e.blocks.tree.get(`controlled||${t}`);return{...e.blocks.tree.get(t),innerBlocks:o?.innerBlocks}}function RA(e,t,o){let r=A8(e,t);if(r&&(o(r),!!r?.innerBlocks?.length))for(let n of r?.innerBlocks)RA(e,n.clientId,o)}function vk(e,t,o){if(!o.length)return;let r=e.blocks.parents.get(t);for(;r!==void 0;){if(o.includes(r))return r;r=e.blocks.parents.get(r)}}function ove(e){return e?.attributes?.metadata?.bindings&&Object.keys(e?.attributes?.metadata?.bindings).length}function IA(e,t=""){let o=e?.zoomLevel<100||e?.zoomLevel==="auto-scaled",r=new Map,n=e.settings?.[fu],i=e.blocks.order.get(n),s=Array.from(e.blocks.blockEditingModes).some(([,g])=>g==="disabled"),a=[],c=[];e.blocks.controlledInnerBlocks.forEach(g=>{let b=e.blocks.byClientId?.get(g);b?.name==="core/template-part"&&a.push(g),b?.name==="core/block"&&c.push(g)});let u=Array.from(e.blockListSettings).flatMap(([g,b])=>b?.templateLock==="contentOnly"?[g]:[]),d=e.settings?.[mu],f=e.settings?.disableContentOnlyForUnsyncedPatterns,m=d||f?[]:Array.from(e.blocks.attributes.keys()).filter(g=>e.blocks.attributes.get(g)?.metadata?.patternName),h=e.settings?.disableContentOnlyForTemplateParts,p=[...u,...m,...d||h?[]:a];return RA(e,t,g=>{let{clientId:b,name:k}=g,v=!!e.editedContentOnlySection,y=!1;if(v&&(y=b===e.editedContentOnlySection||!!vk(e,b,[e.editedContentOnlySection]),!y)){r.set(b,"disabled");return}if(!e.blocks.blockEditingModes.has(b)){if(s){let _,S=e.blocks.parents.get(b);for(;S!==void 0&&(e.blocks.blockEditingModes.has(S)&&(_=e.blocks.blockEditingModes.get(S)),!_);)S=e.blocks.parents.get(S);if(_==="disabled"){r.set(b,"disabled");return}}if(o){if(b===n){r.set(b,"contentOnly");return}if(!i?.length){r.set(b,"disabled");return}if(i.includes(b)){r.set(b,"contentOnly");return}r.set(b,"disabled");return}if(c.length){if(c.includes(b)){if(vk(e,b,c)){r.set(b,"disabled");return}return}let _=vk(e,b,c);if(_){if(vk(e,_,c)){r.set(b,"disabled");return}if(ove(g)){r.set(b,"contentOnly");return}r.set(b,"disabled");return}}if(v&&y){r.set(b,"default");return}p.length&&vk(e,b,p)&&(ube(k)?r.set(b,"contentOnly"):r.set(b,"disabled"))}}),r}function hu({prevState:e,nextState:t,addedBlocks:o,removedClientIds:r}){let n=e.derivedBlockEditingModes,i;return r?.forEach(s=>{RA(e,s,a=>{n.has(a.clientId)&&(i||(i=new Map(n)),i.delete(a.clientId))})}),o?.forEach(s=>{let a=IA(t,s.clientId);a.size&&(i?i=new Map([...i?.size?i:[],...a]):i=new Map([...n?.size?n:[],...a]))}),i}function rve(e){return(t,o)=>{let r=e(t,o);if(o.type!=="SET_EDITOR_MODE"&&r===t)return t;switch(o.type){case"REMOVE_BLOCKS":{let n=hu({prevState:t,nextState:r,removedClientIds:o.clientIds});if(n)return{...r,derivedBlockEditingModes:n??t.derivedBlockEditingModes};break}case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{let n=hu({prevState:t,nextState:r,addedBlocks:o.blocks});if(n)return{...r,derivedBlockEditingModes:n??t.derivedBlockEditingModes};break}case"UPDATE_BLOCK_ATTRIBUTES":{if(r.settings?.disableContentOnlyForUnsyncedPatterns)break;let i=[],s=[];for(let c of o?.clientIds){let u=o.options?.uniqueByBlock?o.attributes[c]:o.attributes;if(!u)break;u.metadata?.patternName&&!t.blocks.attributes.get(c)?.metadata?.patternName?i.push(r.blocks.tree.get(c)):u.metadata&&!u.metadata?.patternName&&t.blocks.attributes.get(c)?.metadata?.patternName&&s.push(c)}if(!i?.length&&!s?.length)break;let a=hu({prevState:t,nextState:r,addedBlocks:i,removedClientIds:s});if(a)return{...r,derivedBlockEditingModes:a??t.derivedBlockEditingModes};break}case"UPDATE_BLOCK_LIST_SETTINGS":{let n=[],i=[],s=typeof o.clientId=="string"?{[o.clientId]:o.settings}:o.clientId;for(let c in s){let u=t.blockListSettings.get(c)?.templateLock!=="contentOnly"&&r.blockListSettings.get(c)?.templateLock==="contentOnly",d=t.blockListSettings.get(c)?.templateLock==="contentOnly"&&r.blockListSettings.get(c)?.templateLock!=="contentOnly";u?n.push(r.blocks.tree.get(c)):d&&i.push(c)}if(!n.length&&!i.length)break;let a=hu({prevState:t,nextState:r,addedBlocks:n,removedClientIds:i});if(a)return{...r,derivedBlockEditingModes:a??t.derivedBlockEditingModes};break}case"SET_BLOCK_EDITING_MODE":case"UNSET_BLOCK_EDITING_MODE":case"SET_HAS_CONTROLLED_INNER_BLOCKS":{let n=A8(r,o.clientId);if(!n)break;let i=hu({prevState:t,nextState:r,removedClientIds:[o.clientId],addedBlocks:[n]});if(i)return{...r,derivedBlockEditingModes:i??t.derivedBlockEditingModes};break}case"REPLACE_BLOCKS":{let n=hu({prevState:t,nextState:r,addedBlocks:o.blocks,removedClientIds:o.clientIds});if(n)return{...r,derivedBlockEditingModes:n??t.derivedBlockEditingModes};break}case"REPLACE_INNER_BLOCKS":{let n=t.blocks.order.get(o.rootClientId),i=hu({prevState:t,nextState:r,addedBlocks:o.blocks,removedClientIds:n});if(i)return{...r,derivedBlockEditingModes:i??t.derivedBlockEditingModes};break}case"MOVE_BLOCKS_TO_POSITION":{let n=o.clientIds.map(s=>r.blocks.byClientId.get(s)),i=hu({prevState:t,nextState:r,addedBlocks:n,removedClientIds:o.clientIds});if(i)return{...r,derivedBlockEditingModes:i??t.derivedBlockEditingModes};break}case"UPDATE_SETTINGS":{if(t?.settings?.[fu]!==r?.settings?.[fu]||!!t?.settings?.disableContentOnlyForUnsyncedPatterns!=!!r?.settings?.disableContentOnlyForUnsyncedPatterns||!!t?.settings?.[mu]!=!!r?.settings?.[mu]||!!t?.settings?.disableContentOnlyForTemplateParts!=!!r?.settings?.disableContentOnlyForTemplateParts)return{...r,derivedBlockEditingModes:IA(r)};break}case"RESET_BLOCKS":case"EDIT_CONTENT_ONLY_SECTION":case"SET_EDITOR_MODE":case"RESET_ZOOM_LEVEL":case"SET_ZOOM_LEVEL":return{...r,derivedBlockEditingModes:IA(r)}}return r.derivedBlockEditingModes=t?.derivedBlockEditingModes??new Map,r}}function nve(e){return(t,o)=>{let r=e(t,o);return t?(r.automaticChangeStatus=t.automaticChangeStatus,o.type==="MARK_AUTOMATIC_CHANGE"?{...r,automaticChangeStatus:"pending"}:o.type==="MARK_AUTOMATIC_CHANGE_FINAL"&&t.automaticChangeStatus==="pending"?{...r,automaticChangeStatus:"final"}:r.blocks===t.blocks&&r.selection===t.selection||r.automaticChangeStatus!=="final"&&r.selection!==t.selection?r:{...r,automaticChangeStatus:void 0}):r}}var L8=(0,PA.pipe)(rve,nve)(tve);var o5={};xa(o5,{__experimentalGetActiveBlockIdByBlockNames:()=>rye,__experimentalGetAllowedBlocks:()=>jke,__experimentalGetAllowedPatterns:()=>Wke,__experimentalGetBlockListSettingsForBlocks:()=>Zke,__experimentalGetDirectInsertBlock:()=>Uke,__experimentalGetGlobalBlocksByName:()=>Qve,__experimentalGetLastBlockAttributeChanges:()=>Jke,__experimentalGetParsedPattern:()=>Hke,__experimentalGetPatternTransformItems:()=>Yke,__experimentalGetPatternsByBlockTypes:()=>Kke,__experimentalGetReusableBlockTitle:()=>Xke,__unstableGetBlockWithoutInnerBlocks:()=>qve,__unstableGetClientIdWithClientIdsTree:()=>r9,__unstableGetClientIdsTree:()=>n9,__unstableGetContentLockingParent:()=>dye,__unstableGetSelectedBlocksWithPartialSelection:()=>yke,__unstableGetTemporarilyEditingAsBlocks:()=>fye,__unstableGetVisibleBlocks:()=>aye,__unstableHasActiveBlockOverlayActive:()=>k9,__unstableIsFullySelected:()=>gke,__unstableIsLastBlockChangeIgnored:()=>Qke,__unstableIsSelectionCollapsed:()=>bke,__unstableIsSelectionMergeable:()=>kke,__unstableIsWithinBlockOverlay:()=>lye,__unstableSelectionHasUnmergeableBlock:()=>vke,areInnerBlocksControlled:()=>fC,canEditBlock:()=>g9,canInsertBlockType:()=>cm,canInsertBlocks:()=>Lke,canLockBlockType:()=>Mke,canMoveBlock:()=>h9,canMoveBlocks:()=>Nke,canRemoveBlock:()=>QM,canRemoveBlocks:()=>p9,didAutomaticChange:()=>tye,getAdjacentBlockClientId:()=>YM,getAllowedBlocks:()=>WM,getBlock:()=>Al,getBlockAttributes:()=>Mi,getBlockCount:()=>eke,getBlockEditingMode:()=>Di,getBlockHierarchyRootClientId:()=>ske,getBlockIndex:()=>c9,getBlockInsertionPoint:()=>Pke,getBlockListSettings:()=>dC,getBlockMode:()=>Cke,getBlockName:()=>ht,getBlockNamesByClientId:()=>Jve,getBlockOrder:()=>Ar,getBlockParents:()=>Rs,getBlockParentsByBlockName:()=>KM,getBlockRootClientId:()=>Do,getBlockSelectionEnd:()=>oke,getBlockSelectionStart:()=>tke,getBlockTransformItems:()=>Fke,getBlocks:()=>Zve,getBlocksByClientId:()=>uC,getBlocksByName:()=>s9,getClientIdsOfDescendants:()=>i9,getClientIdsWithDescendants:()=>yh,getDirectInsertBlock:()=>v9,getDraggedBlockClientIds:()=>Eke,getFirstMultiSelectedBlockClientId:()=>qM,getGlobalBlockCount:()=>Xve,getHoveredBlockClientId:()=>sye,getInserterItems:()=>Vke,getLastMultiSelectedBlockClientId:()=>a9,getLowestCommonAncestorWithSelectedBlock:()=>ake,getMultiSelectedBlockClientIds:()=>Tu,getMultiSelectedBlocks:()=>dke,getMultiSelectedBlocksEndClientId:()=>hke,getMultiSelectedBlocksStartClientId:()=>pke,getNextBlockClientId:()=>cke,getPatternsByBlockTypes:()=>$ke,getPreviousBlockClientId:()=>lke,getSelectedBlock:()=>ike,getSelectedBlockClientId:()=>Sh,getSelectedBlockClientIds:()=>xh,getSelectedBlockCount:()=>rke,getSelectedBlocksInitialCaretPosition:()=>uke,getSelectionEnd:()=>oy,getSelectionStart:()=>ty,getSettings:()=>xu,getTemplate:()=>Ake,getTemplateLock:()=>Ca,hasBlockMovingClientId:()=>eye,hasDraggedInnerBlock:()=>f9,hasInserterItems:()=>zke,hasMultiSelection:()=>Ske,hasSelectedBlock:()=>nke,hasSelectedInnerBlock:()=>d9,isAncestorBeingDragged:()=>Tke,isAncestorMultiSelected:()=>mke,isBlockBeingDragged:()=>ZM,isBlockHighlighted:()=>oye,isBlockInsertionPointVisible:()=>Rke,isBlockMultiSelected:()=>l9,isBlockSelected:()=>u9,isBlockValid:()=>Yve,isBlockVisible:()=>iye,isBlockWithinSelection:()=>_ke,isCaretWithinFormattedText:()=>Ike,isDraggingBlocks:()=>m9,isFirstMultiSelectedBlock:()=>fke,isGroupable:()=>uye,isLastBlockChangePersistent:()=>qke,isMultiSelecting:()=>xke,isSelectionEnabled:()=>wke,isTyping:()=>Bke,isUngroupable:()=>cye,isValidTemplate:()=>Oke,wasBlockJustInserted:()=>nye});var Oe=l(Y(),1),e9=l(O(),1),t9=l(pt(),1);var lx=l(O(),1),Ee=(0,lx.forwardRef)(({icon:e,size:t=24,...o},r)=>(0,lx.cloneElement)(e,{width:t,height:t,...o,ref:r}));var cx=l(Z(),1),OA=l(w(),1),$f=(0,OA.jsx)(cx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,OA.jsx)(cx.Path,{d:"M7.5 5.5h9V4h-9v1.5Zm-3.5 7h16V11H4v1.5Zm3.5 7h9V18h-9v1.5Z"})});var ux=l(Z(),1),AA=l(w(),1),LA=(0,AA.jsx)(ux.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,AA.jsx)(ux.Path,{d:"M4 12.8h16v-1.5H4v1.5zm0 7h12.4v-1.5H4v1.5zM4 4.3v1.5h16V4.3H4z"})});var dx=l(Z(),1),NA=l(w(),1),gu=(0,NA.jsx)(dx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,NA.jsx)(dx.Path,{d:"M13 5.5H4V4h9v1.5Zm7 7H4V11h16v1.5Zm-7 7H4V18h9v1.5Z"})});var fx=l(Z(),1),MA=l(w(),1),Kf=(0,MA.jsx)(fx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,MA.jsx)(fx.Path,{d:"M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM5 9h14v6H5V9Z"})});var mx=l(Z(),1),DA=l(w(),1),bu=(0,DA.jsx)(mx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,DA.jsx)(mx.Path,{d:"M11.111 5.5H20V4h-8.889v1.5ZM4 12.5h16V11H4v1.5Zm7.111 7H20V18h-8.889v1.5Z"})});var px=l(Z(),1),VA=l(w(),1),FA=(0,VA.jsx)(px.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,VA.jsx)(px.Path,{d:"m16.5 13.5-3.7 3.7V4h-1.5v13.2l-3.8-3.7-1 1 5.5 5.6 5.5-5.6z"})});var hx=l(Z(),1),zA=l(w(),1),_k=(0,zA.jsx)(hx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,zA.jsx)(hx.Path,{d:"M20 11.2H6.8l3.7-3.7-1-1L3.9 12l5.6 5.5 1-1-3.7-3.7H20z"})});var gx=l(Z(),1),jA=l(w(),1),Sk=(0,jA.jsx)(gx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,jA.jsx)(gx.Path,{d:"m14.5 6.5-1 1 3.7 3.7H4v1.6h13.2l-3.7 3.7 1 1 5.6-5.5z"})});var bx=l(Z(),1),UA=l(w(),1),HA=(0,UA.jsx)(bx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,UA.jsx)(bx.Path,{d:"M18.5 5.5h-13c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2v-9c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5h-13c-.3 0-.5-.2-.5-.5v-9c0-.3.2-.5.5-.5h13c.3 0 .5.2.5.5v9zM6.5 12H8v-2h2V8.5H6.5V12zm9.5 2h-2v1.5h3.5V12H16v2z"})});var vx=l(Z(),1),GA=l(w(),1),WA=(0,GA.jsx)(vx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,GA.jsx)(vx.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"})});var kx=l(Z(),1),$A=l(w(),1),xk=(0,$A.jsx)(kx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$A.jsx)(kx.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"})});var yx=l(Z(),1),KA=l(w(),1),YA=(0,KA.jsx)(yx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,KA.jsx)(yx.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"})});var _x=l(Z(),1),qA=l(w(),1),Ts=(0,qA.jsx)(_x.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,qA.jsx)(_x.Path,{d:"M16.5 7.5 10 13.9l-2.5-2.4-1 1 3.5 3.6 7.5-7.6z"})});var Sx=l(Z(),1),ZA=l(w(),1),vr=(0,ZA.jsx)(Sx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ZA.jsx)(Sx.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})});var xx=l(Z(),1),XA=l(w(),1),wk=(0,XA.jsx)(xx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,XA.jsx)(xx.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"})});var wx=l(Z(),1),QA=l(w(),1),Kr=(0,QA.jsx)(wx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,QA.jsx)(wx.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})});var Cx=l(Z(),1),JA=l(w(),1),vu=(0,JA.jsx)(Cx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,JA.jsx)(Cx.Path,{d:"M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z"})});var Bx=l(Z(),1),eL=l(w(),1),Go=(0,eL.jsx)(Bx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,eL.jsx)(Bx.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})});var Ex=l(Z(),1),tL=l(w(),1),Yf=(0,tL.jsx)(Ex.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,tL.jsx)(Ex.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})});var Tx=l(Z(),1),oL=l(w(),1),qf=(0,oL.jsx)(Tx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,oL.jsx)(Tx.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"})});var Ix=l(Z(),1),rL=l(w(),1),nL=(0,rL.jsx)(Ix.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,rL.jsx)(Ix.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M10.289 4.836A1 1 0 0111.275 4h1.306a1 1 0 01.987.836l.244 1.466c.787.26 1.503.679 2.108 1.218l1.393-.522a1 1 0 011.216.437l.653 1.13a1 1 0 01-.23 1.273l-1.148.944a6.025 6.025 0 010 2.435l1.149.946a1 1 0 01.23 1.272l-.653 1.13a1 1 0 01-1.216.437l-1.394-.522c-.605.54-1.32.958-2.108 1.218l-.244 1.466a1 1 0 01-.987.836h-1.306a1 1 0 01-.986-.836l-.244-1.466a5.995 5.995 0 01-2.108-1.218l-1.394.522a1 1 0 01-1.217-.436l-.653-1.131a1 1 0 01.23-1.272l1.149-.946a6.026 6.026 0 010-2.435l-1.148-.944a1 1 0 01-.23-1.272l.653-1.131a1 1 0 011.217-.437l1.393.522a5.994 5.994 0 012.108-1.218l.244-1.466zM14.929 12a3 3 0 11-6 0 3 3 0 016 0z"})});var Px=l(Z(),1),iL=l(w(),1),sL=(0,iL.jsx)(Px.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,iL.jsx)(Px.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.625 5.5h9.75c.069 0 .125.056.125.125v9.75a.125.125 0 0 1-.125.125h-9.75a.125.125 0 0 1-.125-.125v-9.75c0-.069.056-.125.125-.125ZM4 5.625C4 4.728 4.728 4 5.625 4h9.75C16.273 4 17 4.728 17 5.625v9.75c0 .898-.727 1.625-1.625 1.625h-9.75A1.625 1.625 0 0 1 4 15.375v-9.75Zm14.5 11.656v-9H20v9C20 18.8 18.77 20 17.251 20H6.25v-1.5h11.001c.69 0 1.249-.528 1.249-1.219Z"})});var Rx=l(Z(),1),aL=l(w(),1),Zf=(0,aL.jsx)(Rx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,aL.jsx)(Rx.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5 4.5h11a.5.5 0 0 1 .5.5v11a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V5a.5.5 0 0 1 .5-.5ZM3 5a2 2 0 0 1 2-2h11a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5Zm17 3v10.75c0 .69-.56 1.25-1.25 1.25H6v1.5h12.75a2.75 2.75 0 0 0 2.75-2.75V8H20Z"})});var Ox=l(Z(),1),lL=l(w(),1),cL=(0,lL.jsx)(Ox.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,lL.jsx)(Ox.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.75 6A.25.25 0 0 1 6 5.75h3v-1.5H6A1.75 1.75 0 0 0 4.25 6v3h1.5V6ZM18 18.25h-3v1.5h3A1.75 1.75 0 0 0 19.75 18v-3h-1.5v3a.25.25 0 0 1-.25.25ZM18.25 9V6a.25.25 0 0 0-.25-.25h-3v-1.5h3c.966 0 1.75.784 1.75 1.75v3h-1.5Zm-12.5 9v-3h-1.5v3c0 .966.784 1.75 1.75 1.75h3v-1.5H6a.25.25 0 0 1-.25-.25Z"})});var Xf=l(Z(),1),ch=l(w(),1),uL=(0,ch.jsxs)(Xf.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,ch.jsx)(Xf.G,{opacity:".25",children:(0,ch.jsx)(Xf.Path,{d:"M5.75 6A.25.25 0 0 1 6 5.75h3v-1.5H6A1.75 1.75 0 0 0 4.25 6v3h1.5V6ZM18 18.25h-3v1.5h3A1.75 1.75 0 0 0 19.75 18v-3h-1.5v3a.25.25 0 0 1-.25.25ZM18.25 9V6a.25.25 0 0 0-.25-.25h-3v-1.5h3c.966 0 1.75.784 1.75 1.75v3h-1.5ZM5.75 18v-3h-1.5v3c0 .966.784 1.75 1.75 1.75h3v-1.5H6a.25.25 0 0 1-.25-.25Z"})}),(0,ch.jsx)(Xf.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.75 15v3c0 .138.112.25.25.25h3v1.5H6A1.75 1.75 0 0 1 4.25 18v-3h1.5Z"})]});var Qf=l(Z(),1),uh=l(w(),1),dL=(0,uh.jsxs)(Qf.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,uh.jsx)(Qf.G,{opacity:".25",children:(0,uh.jsx)(Qf.Path,{d:"M5.75 6A.25.25 0 0 1 6 5.75h3v-1.5H6A1.75 1.75 0 0 0 4.25 6v3h1.5V6ZM18 18.25h-3v1.5h3A1.75 1.75 0 0 0 19.75 18v-3h-1.5v3a.25.25 0 0 1-.25.25ZM18.25 9V6a.25.25 0 0 0-.25-.25h-3v-1.5h3c.966 0 1.75.784 1.75 1.75v3h-1.5ZM5.75 18v-3h-1.5v3c0 .966.784 1.75 1.75 1.75h3v-1.5H6a.25.25 0 0 1-.25-.25Z"})}),(0,uh.jsx)(Qf.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M15 18.25h3a.25.25 0 0 0 .25-.25v-3h1.5v3A1.75 1.75 0 0 1 18 19.75h-3v-1.5Z"})]});var Jf=l(Z(),1),dh=l(w(),1),fL=(0,dh.jsxs)(Jf.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,dh.jsx)(Jf.G,{opacity:".25",children:(0,dh.jsx)(Jf.Path,{d:"M5.75 6A.25.25 0 0 1 6 5.75h3v-1.5H6A1.75 1.75 0 0 0 4.25 6v3h1.5V6ZM18 18.25h-3v1.5h3A1.75 1.75 0 0 0 19.75 18v-3h-1.5v3a.25.25 0 0 1-.25.25ZM18.25 9V6a.25.25 0 0 0-.25-.25h-3v-1.5h3c.966 0 1.75.784 1.75 1.75v3h-1.5ZM5.75 18v-3h-1.5v3c0 .966.784 1.75 1.75 1.75h3v-1.5H6a.25.25 0 0 1-.25-.25Z"})}),(0,dh.jsx)(Jf.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M6 5.75a.25.25 0 0 0-.25.25v3h-1.5V6c0-.966.784-1.75 1.75-1.75h3v1.5H6Z"})]});var em=l(Z(),1),fh=l(w(),1),mL=(0,fh.jsxs)(em.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,fh.jsx)(em.G,{opacity:".25",children:(0,fh.jsx)(em.Path,{d:"M5.75 6A.25.25 0 0 1 6 5.75h3v-1.5H6A1.75 1.75 0 0 0 4.25 6v3h1.5V6ZM18 18.25h-3v1.5h3A1.75 1.75 0 0 0 19.75 18v-3h-1.5v3a.25.25 0 0 1-.25.25ZM18.25 9V6a.25.25 0 0 0-.25-.25h-3v-1.5h3c.966 0 1.75.784 1.75 1.75v3h-1.5ZM5.75 18v-3h-1.5v3c0 .966.784 1.75 1.75 1.75h3v-1.5H6a.25.25 0 0 1-.25-.25Z"})}),(0,fh.jsx)(em.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M18.25 9V6a.25.25 0 0 0-.25-.25h-3v-1.5h3c.966 0 1.75.784 1.75 1.75v3h-1.5Z"})]});var Ax=l(Z(),1),pL=l(w(),1),hL=(0,pL.jsx)(Ax.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,pL.jsx)(Ax.Path,{d:"M20.5 16h-.7V8c0-1.1-.9-2-2-2H6.2c-1.1 0-2 .9-2 2v8h-.7c-.8 0-1.5.7-1.5 1.5h20c0-.8-.7-1.5-1.5-1.5zM5.7 8c0-.3.2-.5.5-.5h11.6c.3 0 .5.2.5.5v7.6H5.7V8z"})});var Lx=l(Z(),1),gL=l(w(),1),Ck=(0,gL.jsx)(Lx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,gL.jsx)(Lx.Path,{d:"M8 7h2V5H8v2zm0 6h2v-2H8v2zm0 6h2v-2H8v2zm6-14v2h2V5h-2zm0 8h2v-2h-2v2zm0 6h2v-2h-2v2z"})});var Nx=l(Z(),1),bL=l(w(),1),vL=(0,bL.jsx)(Nx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,bL.jsx)(Nx.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M3 7c0-1.1.9-2 2-2h14a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7Zm2-.5h14c.3 0 .5.2.5.5v1L12 13.5 4.5 7.9V7c0-.3.2-.5.5-.5Zm-.5 3.3V17c0 .3.2.5.5.5h14c.3 0 .5-.2.5-.5V9.8L12 15.4 4.5 9.8Z"})});var Mx=l(Z(),1),kL=l(w(),1),tm=(0,kL.jsx)(Mx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,kL.jsx)(Mx.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12.218 5.377a.25.25 0 0 0-.436 0l-7.29 12.96a.25.25 0 0 0 .218.373h14.58a.25.25 0 0 0 .218-.372l-7.29-12.96Zm-1.743-.735c.669-1.19 2.381-1.19 3.05 0l7.29 12.96a1.75 1.75 0 0 1-1.525 2.608H4.71a1.75 1.75 0 0 1-1.525-2.608l7.29-12.96ZM12.75 17.46h-1.5v-1.5h1.5v1.5Zm-1.5-3h1.5v-5h-1.5v5Z"})});var Dx=l(Z(),1),yL=l(w(),1),_L=(0,yL.jsx)(Dx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,yL.jsx)(Dx.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"})});var Vx=l(Z(),1),SL=l(w(),1),xL=(0,SL.jsx)(Vx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,SL.jsx)(Vx.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"})});var Fx=l(Z(),1),wL=l(w(),1),CL=(0,wL.jsx)(Fx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wL.jsx)(Fx.Path,{d:"M12 4 4 19h16L12 4zm0 3.2 5.5 10.3H12V7.2z"})});var zx=l(Z(),1),BL=l(w(),1),EL=(0,BL.jsx)(zx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,BL.jsx)(zx.Path,{d:"M7.1 6.8L3.1 18h1.6l1.1-3h4.3l1.1 3h1.6l-4-11.2H7.1zm-.8 6.8L8 8.9l1.7 4.7H6.3zm14.5-1.5c-.3-.6-.7-1.1-1.2-1.5-.6-.4-1.2-.6-1.9-.6-.5 0-.9.1-1.4.3-.4.2-.8.5-1.1.8V6h-1.4v12h1.3l.2-1c.2.4.6.6 1 .8.4.2.9.3 1.4.3.7 0 1.2-.2 1.8-.5.5-.4 1-.9 1.3-1.5.3-.6.5-1.3.5-2.1-.1-.6-.2-1.3-.5-1.9zm-1.7 4c-.4.5-.9.8-1.6.8s-1.2-.2-1.7-.7c-.4-.5-.7-1.2-.7-2.1 0-.9.2-1.6.7-2.1.4-.5 1-.7 1.7-.7s1.2.3 1.6.8c.4.5.6 1.2.6 2 .1.8-.2 1.4-.6 2z"})});var jx=l(Z(),1),TL=l(w(),1),IL=(0,TL.jsx)(jx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,TL.jsx)(jx.Path,{d:"M11 16.8c-.1-.1-.2-.3-.3-.5v-2.6c0-.9-.1-1.7-.3-2.2-.2-.5-.5-.9-.9-1.2-.4-.2-.9-.3-1.6-.3-.5 0-1 .1-1.5.2s-.9.3-1.2.6l.2 1.2c.4-.3.7-.4 1.1-.5.3-.1.7-.2 1-.2.6 0 1 .1 1.3.4.3.2.4.7.4 1.4-1.2 0-2.3.2-3.3.7s-1.4 1.1-1.4 2.1c0 .7.2 1.2.7 1.6.4.4 1 .6 1.8.6.9 0 1.7-.4 2.4-1.2.1.3.2.5.4.7.1.2.3.3.6.4.3.1.6.1 1.1.1h.1l.2-1.2h-.1c-.4.1-.6 0-.7-.1zM9.2 16c-.2.3-.5.6-.9.8-.3.1-.7.2-1.1.2-.4 0-.7-.1-.9-.3-.2-.2-.3-.5-.3-.9 0-.6.2-1 .7-1.3.5-.3 1.3-.4 2.5-.5v2zm10.6-3.9c-.3-.6-.7-1.1-1.2-1.5-.6-.4-1.2-.6-1.9-.6-.5 0-.9.1-1.4.3-.4.2-.8.5-1.1.8V6h-1.4v12h1.3l.2-1c.2.4.6.6 1 .8.4.2.9.3 1.4.3.7 0 1.2-.2 1.8-.5.5-.4 1-.9 1.3-1.5.3-.6.5-1.3.5-2.1-.1-.6-.2-1.3-.5-1.9zm-1.7 4c-.4.5-.9.8-1.6.8s-1.2-.2-1.7-.7c-.4-.5-.7-1.2-.7-2.1 0-.9.2-1.6.7-2.1.4-.5 1-.7 1.7-.7s1.2.3 1.6.8c.4.5.6 1.2.6 2s-.2 1.4-.6 2z"})});var Ux=l(Z(),1),PL=l(w(),1),RL=(0,PL.jsx)(Ux.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,PL.jsx)(Ux.Path,{d:"M9.1 9v-.5c0-.6.2-1.1.7-1.4.5-.3 1.2-.5 2-.5.7 0 1.4.1 2.1.3.7.2 1.4.5 2.1.9l.2-1.9c-.6-.3-1.2-.5-1.9-.7-.8-.1-1.6-.2-2.4-.2-1.5 0-2.7.3-3.6 1-.8.7-1.2 1.5-1.2 2.6V9h2zM20 12H4v1h8.3c.3.1.6.2.8.3.5.2.9.5 1.1.8.3.3.4.7.4 1.2 0 .7-.2 1.1-.8 1.5-.5.3-1.2.5-2.1.5-.8 0-1.6-.1-2.4-.3-.8-.2-1.5-.5-2.2-.8L7 18.1c.5.2 1.2.4 2 .6.8.2 1.6.3 2.4.3 1.7 0 3-.3 3.9-1 .9-.7 1.3-1.6 1.3-2.8 0-.9-.2-1.7-.7-2.2H20v-1z"})});var Hx=l(Z(),1),OL=l(w(),1),AL=(0,OL.jsx)(Hx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,OL.jsx)(Hx.Path,{d:"M7 18v1h10v-1H7zm5-2c1.5 0 2.6-.4 3.4-1.2.8-.8 1.1-2 1.1-3.5V5H15v5.8c0 1.2-.2 2.1-.6 2.8-.4.7-1.2 1-2.4 1s-2-.3-2.4-1c-.4-.7-.6-1.6-.6-2.8V5H7.5v6.2c0 1.5.4 2.7 1.1 3.5.8.9 1.9 1.3 3.4 1.3z"})});var Gx=l(Z(),1),LL=l(w(),1),NL=(0,LL.jsx)(Gx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,LL.jsx)(Gx.Path,{d:"M6.1 6.8L2.1 18h1.6l1.1-3h4.3l1.1 3h1.6l-4-11.2H6.1zm-.8 6.8L7 8.9l1.7 4.7H5.3zm15.1-.7c-.4-.5-.9-.8-1.6-1 .4-.2.7-.5.8-.9.2-.4.3-.9.3-1.4 0-.9-.3-1.6-.8-2-.6-.5-1.3-.7-2.4-.7h-3.5V18h4.2c1.1 0 2-.3 2.6-.8.6-.6 1-1.4 1-2.4-.1-.8-.3-1.4-.6-1.9zm-5.7-4.7h1.8c.6 0 1.1.1 1.4.4.3.2.5.7.5 1.3 0 .6-.2 1.1-.5 1.3-.3.2-.8.4-1.4.4h-1.8V8.2zm4 8c-.4.3-.9.5-1.5.5h-2.6v-3.8h2.6c1.4 0 2 .6 2 1.9.1.6-.1 1-.5 1.4z"})});var Wx=l(Z(),1),ML=l(w(),1),DL=(0,ML.jsx)(Wx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ML.jsx)(Wx.Path,{d:"M12.75 19.45 15 17.5l1 1.1-4 3.4-4-3.4 1-1.1 2.25 1.95V14.5h1.5v4.95ZM19 12.75H5v-1.5h14v1.5ZM16 5.4l-1 1.1-2.25-1.95V9.5h-1.5V4.55L9 6.5 8 5.4 12 2l4 3.4Z"})});var $x=l(Z(),1),VL=l(w(),1),Kx=(0,VL.jsx)($x.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,VL.jsx)($x.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"})});var Yx=l(Z(),1),FL=l(w(),1),Bk=(0,FL.jsx)(Yx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,FL.jsx)(Yx.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-8Zm6.5 8c0 .6 0 1.2-.2 1.8h-2.7c0-.6.2-1.1.2-1.8s0-1.2-.2-1.8h2.7c.2.6.2 1.1.2 1.8Zm-.9-3.2h-2.4c-.3-.9-.7-1.8-1.1-2.4-.1-.2-.2-.4-.3-.5 1.6.5 3 1.6 3.8 3ZM12.8 17c-.3.5-.6 1-.8 1.3-.2-.3-.5-.8-.8-1.3-.3-.5-.6-1.1-.8-1.7h3.3c-.2.6-.5 1.2-.8 1.7Zm-2.9-3.2c-.1-.6-.2-1.1-.2-1.8s0-1.2.2-1.8H14c.1.6.2 1.1.2 1.8s0 1.2-.2 1.8H9.9ZM11.2 7c.3-.5.6-1 .8-1.3.2.3.5.8.8 1.3.3.5.6 1.1.8 1.7h-3.3c.2-.6.5-1.2.8-1.7Zm-1-1.2c-.1.2-.2.3-.3.5-.4.7-.8 1.5-1.1 2.4H6.4c.8-1.4 2.2-2.5 3.8-3Zm-1.8 8H5.7c-.2-.6-.2-1.1-.2-1.8s0-1.2.2-1.8h2.7c0 .6-.2 1.1-.2 1.8s0 1.2.2 1.8Zm-2 1.4h2.4c.3.9.7 1.8 1.1 2.4.1.2.2.4.3.5-1.6-.5-3-1.6-3.8-3Zm7.4 3c.1-.2.2-.3.3-.5.4-.7.8-1.5 1.1-2.4h2.4c-.8 1.4-2.2 2.5-3.8 3Z"})});var qx=l(Z(),1),zL=l(w(),1),Ek=(0,zL.jsx)(qx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,zL.jsx)(qx.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"})});var Zx=l(Z(),1),jL=l(w(),1),Tk=(0,jL.jsx)(Zx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,jL.jsx)(Zx.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"})});var Xx=l(Z(),1),UL=l(w(),1),HL=(0,UL.jsx)(Xx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,UL.jsx)(Xx.Path,{d:"M17.6 7c-.6.9-1.5 1.7-2.6 2v1h2v7h2V7h-1.4zM11 11H7V7H5v10h2v-4h4v4h2V7h-2v4z"})});var Qx=l(Z(),1),GL=l(w(),1),WL=(0,GL.jsx)(Qx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,GL.jsx)(Qx.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"})});var Jx=l(Z(),1),$L=l(w(),1),KL=(0,$L.jsx)(Jx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$L.jsx)(Jx.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"})});var ew=l(Z(),1),YL=l(w(),1),qL=(0,YL.jsx)(ew.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,YL.jsx)(ew.Path,{d:"M20 13V7h-3l-4 6v2h5v2h2v-2h1v-2h-1zm-2 0h-2.8L18 9v4zm-9-2H5V7H3v10h2v-4h4v4h2V7H9v4z"})});var tw=l(Z(),1),ZL=l(w(),1),XL=(0,ZL.jsx)(tw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ZL.jsx)(tw.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"})});var ow=l(Z(),1),QL=l(w(),1),JL=(0,QL.jsx)(ow.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,QL.jsx)(ow.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"})});var rw=l(Z(),1),eN=l(w(),1),tN=(0,eN.jsx)(rw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,eN.jsx)(rw.Path,{d:"M12 4L4 7.9V20h16V7.9L12 4zm6.5 14.5H14V13h-4v5.5H5.5V8.8L12 5.7l6.5 3.1v9.7z"})});var nw=l(Z(),1),oN=l(w(),1),Ik=(0,oN.jsx)(nw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,oN.jsx)(nw.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"})});var iw=l(Z(),1),rN=l(w(),1),nN=(0,rN.jsx)(iw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,rN.jsx)(iw.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.5 12a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0ZM12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm.75 4v1.5h-1.5V8h1.5Zm0 8v-5h-1.5v5h1.5Z"})});var sw=l(Z(),1),iN=l(w(),1),sN=(0,iN.jsx)(sw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,iN.jsx)(sw.Path,{d:"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"})});var aw=l(Z(),1),aN=l(w(),1),lN=(0,aN.jsx)(aw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,aN.jsx)(aw.Path,{d:"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"})});var lw=l(Z(),1),cN=l(w(),1),ku=(0,cN.jsx)(lw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,cN.jsx)(lw.Path,{d:"M12.5 15v5H11v-5H4V9h7V4h1.5v5h7v6h-7Z"})});var cw=l(Z(),1),uN=l(w(),1),yu=(0,uN.jsx)(cw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,uN.jsx)(cw.Path,{d:"M9 9v6h11V9H9zM4 20h1.5V4H4v16z"})});var uw=l(Z(),1),dN=l(w(),1),_u=(0,dN.jsx)(uw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,dN.jsx)(uw.Path,{d:"M4 15h11V9H4v6zM18.5 4v16H20V4h-1.5z"})});var dw=l(Z(),1),fN=l(w(),1),mN=(0,fN.jsx)(dw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,fN.jsx)(dw.Path,{d:"M7 4H17V8L7 8V4ZM7 16L17 16V20L7 20V16ZM20 11.25H4V12.75H20V11.25Z"})});var fw=l(Z(),1),pN=l(w(),1),mh=(0,pN.jsx)(fw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,pN.jsx)(fw.Path,{d:"M9 15h6V9H9v6zm-5 5h1.5V4H4v16zM18.5 4v16H20V4h-1.5z"})});var mw=l(Z(),1),hN=l(w(),1),gN=(0,hN.jsx)(mw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,hN.jsx)(mw.Path,{d:"M4 4L20 4L20 5.5L4 5.5L4 4ZM10 7L14 7L14 17L10 17L10 7ZM20 18.5L4 18.5L4 20L20 20L20 18.5Z"})});var pw=l(Z(),1),bN=l(w(),1),ph=(0,bN.jsx)(pw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,bN.jsx)(pw.Path,{d:"M4 4H5.5V20H4V4ZM7 10L17 10V14L7 14V10ZM20 4H18.5V20H20V4Z"})});var hw=l(Z(),1),vN=l(w(),1),kN=(0,vN.jsx)(hw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,vN.jsx)(hw.Path,{d:"M9 20h6V9H9v11zM4 4v1.5h16V4H4z"})});var gw=l(Z(),1),yN=l(w(),1),Tl=(0,yN.jsx)(gw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,yN.jsx)(gw.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"})});var bw=l(Z(),1),_N=l(w(),1),SN=(0,_N.jsx)(bw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,_N.jsx)(bw.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"})});var vw=l(Z(),1),xN=l(w(),1),Ai=(0,xN.jsx)(vw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,xN.jsx)(vw.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"})});var kw=l(Z(),1),wN=l(w(),1),yn=(0,wN.jsx)(kw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wN.jsx)(kw.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"})});var yw=l(Z(),1),CN=l(w(),1),Pk=(0,CN.jsx)(yw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,CN.jsx)(yw.Path,{d:"M3 6h11v1.5H3V6Zm3.5 5.5h11V13h-11v-1.5ZM21 17H10v1.5h11V17Z"})});var _w=l(Z(),1),BN=l(w(),1),EN=(0,BN.jsx)(_w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,BN.jsx)(_w.Path,{d:"M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1zM9.8 7c0-1.2 1-2.2 2.2-2.2 1.2 0 2.2 1 2.2 2.2v3H9.8V7zm6.7 11.5h-9v-7h9v7z"})});var Sw=l(Z(),1),TN=l(w(),1),IN=(0,TN.jsx)(Sw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,TN.jsx)(Sw.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M15 11h-.2V9c0-1.5-1.2-2.8-2.8-2.8S9.2 7.5 9.2 9v2H9c-.6 0-1 .4-1 1v4c0 .6.4 1 1 1h6c.6 0 1-.4 1-1v-4c0-.6-.4-1-1-1zm-1.8 0h-2.5V9c0-.7.6-1.2 1.2-1.2s1.2.6 1.2 1.2v2z"})});var xw=l(Z(),1),PN=l(w(),1),om=(0,PN.jsx)(xw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,PN.jsx)(xw.Path,{d:"M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1zm-2.8 0H9.8V7c0-1.2 1-2.2 2.2-2.2s2.2 1 2.2 2.2v3z"})});var Rk=l(Z(),1),Ok=l(w(),1),hh=(0,Ok.jsxs)(Rk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Ok.jsx)(Rk.Path,{d:"m7 6.5 4 2.5-4 2.5z"}),(0,Ok.jsx)(Rk.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"})]});var ww=l(Z(),1),RN=l(w(),1),Ak=(0,RN.jsx)(ww.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,RN.jsx)(ww.Path,{d:"M15 4H9c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h6c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H9c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h6c.3 0 .5.2.5.5v12zm-4.5-.5h2V16h-2v1.5z"})});var Cw=l(Z(),1),ON=l(w(),1),Is=(0,ON.jsx)(Cw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ON.jsx)(Cw.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})});var Lk=l(Z(),1),Nk=l(w(),1),rm=(0,Nk.jsxs)(Lk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Nk.jsx)(Lk.Path,{d:"M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z"}),(0,Nk.jsx)(Lk.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"})]});var Bw=l(Z(),1),AN=l(w(),1),LN=(0,AN.jsx)(Bw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,AN.jsx)(Bw.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"})});var Ew=l(Z(),1),NN=l(w(),1),nm=(0,NN.jsx)(Ew.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,NN.jsx)(Ew.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})});var Tw=l(Z(),1),MN=l(w(),1),DN=(0,MN.jsx)(Tw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,MN.jsx)(Tw.Path,{d:"M10.97 10.159a3.382 3.382 0 0 0-2.857.955l1.724 1.723-2.836 2.913L7 17h1.25l2.913-2.837 1.723 1.723a3.38 3.38 0 0 0 .606-.825c.33-.63.446-1.343.35-2.032L17 10.695 13.305 7l-2.334 3.159Z"})});var Iw=l(Z(),1),VN=l(w(),1),Li=(0,VN.jsx)(Iw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,VN.jsx)(Iw.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})});var Pw=l(Z(),1),FN=l(w(),1),zN=(0,FN.jsx)(Pw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,FN.jsx)(Pw.Path,{d:"M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM7 9h10v6H7V9Z"})});var Rw=l(Z(),1),jN=l(w(),1),UN=(0,jN.jsx)(Rw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,jN.jsx)(Rw.Path,{d:"M5 5.5h8V4H5v1.5ZM5 20h8v-1.5H5V20ZM19 9H5v6h14V9Z"})});var Ow=l(Z(),1),HN=l(w(),1),GN=(0,HN.jsx)(Ow.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,HN.jsx)(Ow.Path,{d:"M19 5.5h-8V4h8v1.5ZM19 20h-8v-1.5h8V20ZM5 9h14v6H5V9Z"})});var Aw=l(Z(),1),WN=l(w(),1),$N=(0,WN.jsx)(Aw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,WN.jsx)(Aw.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"})});var Lw=l(Z(),1),KN=l(w(),1),YN=(0,KN.jsx)(Lw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,KN.jsx)(Lw.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"})});var Nw=l(Z(),1),qN=l(w(),1),kr=(0,qN.jsx)(Nw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,qN.jsx)(Nw.Path,{d:"M7 11.5h10V13H7z"})});var Mw=l(Z(),1),ZN=l(w(),1),XN=(0,ZN.jsx)(Mw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ZN.jsx)(Mw.Path,{d:"M15.1 4.8l-3-2.5V4c-4.4 0-8 3.6-8 8 0 3.7 2.5 6.9 6 7.7.3.1.6.1 1 .2l.2-1.5c-.4 0-.7-.1-1.1-.2l-.1.2v-.2c-2.6-.8-4.5-3.3-4.5-6.2 0-3.6 2.9-6.5 6.5-6.5v1.8l3-2.5zM20 11c-.2-1.4-.7-2.7-1.6-3.8l-1.2.8c.7.9 1.1 2 1.3 3.1L20 11zm-1.5 1.8c-.1.5-.2 1.1-.4 1.6s-.5 1-.8 1.5l1.2.9c.4-.5.8-1.1 1-1.8s.5-1.3.5-2l-1.5-.2zm-5.6 5.6l.2 1.5c1.4-.2 2.7-.7 3.8-1.6l-.9-1.1c-.9.7-2 1.1-3.1 1.2z"})});var Dw=l(Z(),1),QN=l(w(),1),JN=(0,QN.jsx)(Dw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,QN.jsx)(Dw.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"})});var Vw=l(Z(),1),eM=l(w(),1),tM=(0,eM.jsx)(Vw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,eM.jsx)(Vw.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"})});var Fw=l(Z(),1),oM=l(w(),1),im=(0,oM.jsx)(Fw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,oM.jsx)(Fw.Path,{d:"M3.99961 13C4.67043 13.3354 4.6703 13.3357 4.67017 13.3359L4.67298 13.3305C4.67621 13.3242 4.68184 13.3135 4.68988 13.2985C4.70595 13.2686 4.7316 13.2218 4.76695 13.1608C4.8377 13.0385 4.94692 12.8592 5.09541 12.6419C5.39312 12.2062 5.84436 11.624 6.45435 11.0431C7.67308 9.88241 9.49719 8.75 11.9996 8.75C14.502 8.75 16.3261 9.88241 17.5449 11.0431C18.1549 11.624 18.6061 12.2062 18.9038 12.6419C19.0523 12.8592 19.1615 13.0385 19.2323 13.1608C19.2676 13.2218 19.2933 13.2686 19.3093 13.2985C19.3174 13.3135 19.323 13.3242 19.3262 13.3305L19.3291 13.3359C19.3289 13.3357 19.3288 13.3354 19.9996 13C20.6704 12.6646 20.6703 12.6643 20.6701 12.664L20.6697 12.6632L20.6688 12.6614L20.6662 12.6563L20.6583 12.6408C20.6517 12.6282 20.6427 12.6108 20.631 12.5892C20.6078 12.5459 20.5744 12.4852 20.5306 12.4096C20.4432 12.2584 20.3141 12.0471 20.1423 11.7956C19.7994 11.2938 19.2819 10.626 18.5794 9.9569C17.1731 8.61759 14.9972 7.25 11.9996 7.25C9.00203 7.25 6.82614 8.61759 5.41987 9.9569C4.71736 10.626 4.19984 11.2938 3.85694 11.7956C3.68511 12.0471 3.55605 12.2584 3.4686 12.4096C3.42484 12.4852 3.39142 12.5459 3.36818 12.5892C3.35656 12.6108 3.34748 12.6282 3.34092 12.6408L3.33297 12.6563L3.33041 12.6614L3.32948 12.6632L3.32911 12.664C3.32894 12.6643 3.32879 12.6646 3.99961 13ZM11.9996 16C13.9326 16 15.4996 14.433 15.4996 12.5C15.4996 10.567 13.9326 9 11.9996 9C10.0666 9 8.49961 10.567 8.49961 12.5C8.49961 14.433 10.0666 16 11.9996 16Z"})});var Mk=l(Z(),1),Dk=l(w(),1),rM=(0,Dk.jsxs)(Mk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Dk.jsx)(Mk.Path,{d:"m19 7.5h-7.628c-.3089-.87389-1.1423-1.5-2.122-1.5-.97966 0-1.81309.62611-2.12197 1.5h-2.12803v1.5h2.12803c.30888.87389 1.14231 1.5 2.12197 1.5.9797 0 1.8131-.62611 2.122-1.5h7.628z"}),(0,Dk.jsx)(Mk.Path,{d:"m19 15h-2.128c-.3089-.8739-1.1423-1.5-2.122-1.5s-1.8131.6261-2.122 1.5h-7.628v1.5h7.628c.3089.8739 1.1423 1.5 2.122 1.5s1.8131-.6261 2.122-1.5h2.128z"})]});var zw=l(Z(),1),nM=l(w(),1),iM=(0,nM.jsx)(zw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,nM.jsx)(zw.Path,{d:"M12 8c-2.2 0-4 1.8-4 4s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4zm0 6.5c-1.4 0-2.5-1.1-2.5-2.5s1.1-2.5 2.5-2.5 2.5 1.1 2.5 2.5-1.1 2.5-2.5 2.5zM12.8 3h-1.5v3h1.5V3zm-1.6 18h1.5v-3h-1.5v3zm6.8-9.8v1.5h3v-1.5h-3zm-12 0H3v1.5h3v-1.5zm9.7 5.6 2.1 2.1 1.1-1.1-2.1-2.1-1.1 1.1zM8.3 7.2 6.2 5.1 5.1 6.2l2.1 2.1 1.1-1.1zM5.1 17.8l1.1 1.1 2.1-2.1-1.1-1.1-2.1 2.1zM18.9 6.2l-1.1-1.1-2.1 2.1 1.1 1.1 2.1-2.1z"})});var jw=l(Z(),1),sM=l(w(),1),Uw=(0,sM.jsx)(jw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,sM.jsx)(jw.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z"})});var Vk=l(Z(),1),Fk=l(w(),1),aM=(0,Fk.jsxs)(Vk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Fk.jsx)(Vk.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,Fk.jsx)(Vk.Path,{d:"m16.5 19.5h-9v-1.5h9z"})]});var gh=l(Z(),1),bh=l(w(),1),lM=(0,bh.jsxs)(gh.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,bh.jsx)(gh.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,bh.jsx)(gh.Path,{d:"m4.5 7.5v9h1.5v-9z"}),(0,bh.jsx)(gh.Path,{d:"m18 7.5v9h1.5v-9z"})]});var zk=l(Z(),1),jk=l(w(),1),cM=(0,jk.jsxs)(zk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,jk.jsx)(zk.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,jk.jsx)(zk.Path,{d:"m4.5 16.5v-9h1.5v9z"})]});var Uk=l(Z(),1),Hk=l(w(),1),uM=(0,Hk.jsxs)(Uk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Hk.jsx)(Uk.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,Hk.jsx)(Uk.Path,{d:"m18 16.5v-9h1.5v9z"})]});var Gk=l(Z(),1),Wk=l(w(),1),dM=(0,Wk.jsxs)(Gk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Wk.jsx)(Gk.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,Wk.jsx)(Gk.Path,{d:"m16.5 6h-9v-1.5h9z"})]});var vh=l(Z(),1),kh=l(w(),1),fM=(0,kh.jsxs)(vh.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,kh.jsx)(vh.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,kh.jsx)(vh.Path,{d:"m7.5 6h9v-1.5h-9z"}),(0,kh.jsx)(vh.Path,{d:"m7.5 19.5h9v-1.5h-9z"})]});var Hw=l(Z(),1),mM=l(w(),1),pM=(0,mM.jsx)(Hw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,mM.jsx)(Hw.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"})});var Gw=l(Z(),1),hM=l(w(),1),$k=(0,hM.jsx)(Gw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,hM.jsx)(Gw.Path,{d:"M5 4h14v11H5V4Zm11 16H8v-1.5h8V20Z"})});var Ww=l(Z(),1),gM=l(w(),1),sm=(0,gM.jsx)(Ww.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,gM.jsx)(Ww.Path,{d:"M16 5.5H8V4h8v1.5ZM16 20H8v-1.5h8V20ZM5 9h14v6H5V9Z"})});var $w=l(Z(),1),bM=l(w(),1),vM=(0,bM.jsx)($w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,bM.jsx)($w.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M20 12a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-1.5 0a6.5 6.5 0 0 1-6.5 6.5v-13a6.5 6.5 0 0 1 6.5 6.5Z"})});var Kw=l(Z(),1),kM=l(w(),1),Ni=(0,kM.jsx)(Kw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,kM.jsx)(Kw.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"})});var Yw=l(Z(),1),yM=l(w(),1),_M=(0,yM.jsx)(Yw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,yM.jsx)(Yw.Path,{d:"M17 4H7c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H7c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h10c.3 0 .5.2.5.5v12zm-7.5-.5h4V16h-4v1.5z"})});var qw=l(Z(),1),SM=l(w(),1),xM=(0,SM.jsx)(qw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,SM.jsx)(qw.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"})});var Zw=l(Z(),1),wM=l(w(),1),CM=(0,wM.jsx)(Zw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wM.jsx)(Zw.Path,{d:"M8.2 14.4h3.9L13 17h1.7L11 6.5H9.3L5.6 17h1.7l.9-2.6zm2-5.5 1.4 4H8.8l1.4-4zm7.4 7.5-1.3.8.8 1.4H5.5V20h14.3l-2.2-3.6z"})});var Xw=l(Z(),1),BM=l(w(),1),EM=(0,BM.jsx)(Xw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,BM.jsx)(Xw.Path,{d:"M7 5.6v1.7l2.6.9v3.9L7 13v1.7L17.5 11V9.3L7 5.6zm4.2 6V8.8l4 1.4-4 1.4zm-5.7 5.6V5.5H4v14.3l3.6-2.2-.8-1.3-1.3.9z"})});var Qw=l(Z(),1),TM=l(w(),1),IM=(0,TM.jsx)(Qw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,TM.jsx)(Qw.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 5.5A2.25 2.25 0 0 0 9.878 7h4.244A2.251 2.251 0 0 0 12 5.5ZM12 4a3.751 3.751 0 0 0-3.675 3H5v1.5h1.27l.818 8.997a2.75 2.75 0 0 0 2.739 2.501h4.347a2.75 2.75 0 0 0 2.738-2.5L17.73 8.5H19V7h-3.325A3.751 3.751 0 0 0 12 4Zm4.224 4.5H7.776l.806 8.861a1.25 1.25 0 0 0 1.245 1.137h4.347a1.25 1.25 0 0 0 1.245-1.137l.805-8.861Z"})});var Jw=l(Z(),1),PM=l(w(),1),RM=(0,PM.jsx)(Jw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,PM.jsx)(Jw.Path,{d:"M18 4h-7c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 9c0 .3-.2.5-.5.5h-7c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v7zm-5 5c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h1V9H6c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2v-1h-1.5v1z"})});var eC=l(Z(),1),OM=l(w(),1),Il=(0,OM.jsx)(eC.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,OM.jsx)(eC.Path,{d:"M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8h1.5c0-1.2 1-2.2 2.2-2.2s2.2 1 2.2 2.2v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1z"})});var tC=l(Z(),1),AM=l(w(),1),Ps=(0,AM.jsx)(tC.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,AM.jsx)(tC.Path,{d:"M20.7 12.7s0-.1-.1-.2c0-.2-.2-.4-.4-.6-.3-.5-.9-1.2-1.6-1.8-.7-.6-1.5-1.3-2.6-1.8l-.6 1.4c.9.4 1.6 1 2.1 1.5.6.6 1.1 1.2 1.4 1.6.1.2.3.4.3.5v.1l.7-.3.7-.3Zm-5.2-9.3-1.8 4c-.5-.1-1.1-.2-1.7-.2-3 0-5.2 1.4-6.6 2.7-.7.7-1.2 1.3-1.6 1.8-.2.3-.3.5-.4.6 0 0 0 .1-.1.2s0 0 .7.3l.7.3V13c0-.1.2-.3.3-.5.3-.4.7-1 1.4-1.6 1.2-1.2 3-2.3 5.5-2.3H13v.3c-.4 0-.8-.1-1.1-.1-1.9 0-3.5 1.6-3.5 3.5s.6 2.3 1.6 2.9l-2 4.4.9.4 7.6-16.2-.9-.4Zm-3 12.6c1.7-.2 3-1.7 3-3.5s-.2-1.4-.6-1.9L12.4 16Z"})});var oC=l(Z(),1),LM=l(w(),1),NM=(0,LM.jsx)(oC.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,LM.jsx)(oC.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"})});var rC=l(Z(),1),MM=l(w(),1),DM=(0,MM.jsx)(rC.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,MM.jsx)(rC.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"})});var nC=l(Z(),1),VM=l(w(),1),FM=(0,VM.jsx)(nC.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,VM.jsx)(nC.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"})});var Ol=l(yr(),1),Zn=l(Re(),1),Te=l(z(),1);var X8=l(Y(),1),Q8=l(V8(),1);var Xt="core/block-editor";var aC={};xa(aC,{getAllPatterns:()=>Sve,getBlockRemovalRules:()=>gve,getBlockSettings:()=>z8,getBlockStyles:()=>Tve,getBlockWithoutAttributes:()=>dve,getClosestAllowedInsertionPoint:()=>G8,getClosestAllowedInsertionPointForPattern:()=>Pve,getContentLockingParent:()=>zM,getEditedContentOnlySection:()=>jM,getEnabledBlockParents:()=>pve,getEnabledClientIdsTree:()=>mve,getExpandedBlock:()=>Eve,getInserterMediaCategories:()=>kve,getInsertionPoint:()=>Rve,getLastFocus:()=>Cve,getLastInsertedBlocksClientIds:()=>uve,getListViewExpandRevision:()=>Fve,getParentSectionBlock:()=>wu,getPatternBySlug:()=>_ve,getRegisteredInserterMediaCategories:()=>vve,getRemovalPromptData:()=>hve,getRequestedInspectorTab:()=>jve,getReusableBlocks:()=>wve,getSectionRootClientId:()=>lm,getStyleOverrides:()=>bve,getViewportModalClientIds:()=>zve,getZoomLevel:()=>Ive,hasAllowedPatterns:()=>yve,hasBlockSpotlight:()=>Nve,isBlockHiddenAnywhere:()=>Ove,isBlockHiddenAtViewport:()=>W8,isBlockHiddenEverywhere:()=>GM,isBlockInterfaceHidden:()=>cve,isBlockParentHiddenAtViewport:()=>Lve,isBlockParentHiddenEverywhere:()=>Ave,isBlockSubtreeDisabled:()=>fve,isContainerInsertableToInContentOnlyMode:()=>Yk,isDragging:()=>Bve,isEditLockedBlock:()=>$8,isListViewContentPanelOpen:()=>Dve,isListViewPanelOpened:()=>Vve,isLockedBlock:()=>Mve,isMoveLockedBlock:()=>K8,isRemoveLockedBlock:()=>Y8,isSectionBlock:()=>Cu,isWithinEditedContentOnlySection:()=>UM,isZoomOut:()=>HM});var Yr=l(z(),1),Kk=l(Y(),1);var iC=l(N(),1);var It={desktop:{label:(0,iC.__)("Desktop"),icon:hL,key:"desktop"},tablet:{label:(0,iC.__)("Tablet"),icon:_M,key:"tablet"},mobile:{label:(0,iC.__)("Mobile"),icon:Ak,key:"mobile"}},Su=Object.entries(It);var sC=l(Y(),1),F8=l(pt(),1);function de(e,t,o){t=Array.isArray(t)?[...t]:[t],e=Array.isArray(e)?[...e]:{...e};let r=t.pop(),n=e;for(let i of t){let s=n[i];n=n[i]=Array.isArray(s)?[...s]:{...s}}return n[r]=o,e}var Pl=(e,t,o)=>{let r=Array.isArray(t)?t:t.split("."),n=e;return r.forEach(i=>{n=n?.[i]}),n??o};var ive=["color","border","dimensions","typography","spacing"],sve={"color.palette":e=>e.colors,"color.gradients":e=>e.gradients,"color.custom":e=>e.disableCustomColors===void 0?void 0:!e.disableCustomColors,"color.customGradient":e=>e.disableCustomGradients===void 0?void 0:!e.disableCustomGradients,"typography.fontSizes":e=>e.fontSizes,"typography.customFontSize":e=>e.disableCustomFontSizes===void 0?void 0:!e.disableCustomFontSizes,"typography.lineHeight":e=>e.enableCustomLineHeight,"spacing.units":e=>{if(e.enableCustomUnits!==void 0)return e.enableCustomUnits===!0?["px","em","rem","vh","vw","%"]:e.enableCustomUnits},"spacing.padding":e=>e.enableCustomSpacing},ave={"border.customColor":"border.color","border.customStyle":"border.style","border.customWidth":"border.width","typography.customFontStyle":"typography.fontStyle","typography.customFontWeight":"typography.fontWeight","typography.customLetterSpacing":"typography.letterSpacing","typography.customTextDecorations":"typography.textDecoration","typography.customTextTransforms":"typography.textTransform","border.customRadius":"border.radius","spacing.customMargin":"spacing.margin","spacing.customPadding":"spacing.padding","typography.customLineHeight":"typography.lineHeight"},lve=e=>ave[e]||e;function z8(e,t,...o){let r=ht(e,t),n=[];if(t){let i=t;do{let s=ht(e,i);(0,sC.hasBlockSupport)(s,"__experimentalSettings",!1)&&n.push(i)}while(i=e.blocks.parents.get(i))}return o.map(i=>{if(ive.includes(i)){console.warn("Top level useSetting paths are disabled. Please use a subpath to query the information needed.");return}let s=(0,F8.applyFilters)("blockEditor.useSetting.before",void 0,i,t,r);if(s!==void 0)return s;let a=lve(i);for(let d of n){let f=Mi(e,d);if(s=Pl(f.settings?.blocks?.[r],a)??Pl(f.settings,a),s!==void 0)break}let c=xu(e);if(s===void 0&&r&&(s=Pl(c.__experimentalFeatures?.blocks?.[r],a)),s===void 0&&(s=Pl(c.__experimentalFeatures,a)),s!==void 0)return sC.__EXPERIMENTAL_PATHS_WITH_OVERRIDE[a]?s.custom??s.theme??s.default:s;let u=sve[a]?.(c);return u!==void 0?u:a==="typography.dropCap"?!0:void 0})}var{isContentBlock:j8}=M(Kk.privateApis);function cve(e){return e.isBlockInterfaceHidden}function uve(e){return e?.lastBlockInserted?.clientIds}function dve(e,t){return e.blocks.byClientId.get(t)}var fve=(e,t)=>{let o=r=>Di(e,r)==="disabled"&&Ar(e,r).every(o);return Ar(e,t).every(o)};function Yk(e,t,o){let r=j8(t),n=ht(e,o),i=j8(n);return lm(e)===o||i&&r}function U8(e,t){let o=Ar(e,t),r=[];for(let n of o){let i=U8(e,n);Di(e,n)!=="disabled"?r.push({clientId:n,innerBlocks:i}):r.push(...i)}return r}var mve=(0,Yr.createRegistrySelector)(()=>(0,Yr.createSelector)(U8,e=>[e.blocks.order,e.derivedBlockEditingModes,e.blocks.blockEditingModes])),pve=(0,Yr.createSelector)((e,t,o=!1)=>Rs(e,t,o).filter(r=>Di(e,r)!=="disabled"),e=>[e.blocks.parents,e.blocks.blockEditingModes,e.settings.templateLock,e.blockListSettings]);function hve(e){return e.removalPromptData}function gve(e){return e.blockRemovalRules}var bve=(0,Yr.createSelector)(e=>{let o=yh(e).reduce((r,n,i)=>(r[n]=i,r),{});return[...e.styleOverrides].sort((r,n)=>{let[,{clientId:i}]=r,[,{clientId:s}]=n,a=o[i]??-1,c=o[s]??-1;return a-c})},e=>[e.blocks.order,e.styleOverrides]);function vve(e){return e.registeredInserterMediaCategories}var kve=(0,Yr.createSelector)(e=>{let{settings:{inserterMediaCategories:t,allowedMimeTypes:o,enableOpenverseMediaCategory:r},registeredInserterMediaCategories:n}=e;if(!t&&!n.length||!o)return;let i=t?.map(({name:a})=>a)||[];return[...t||[],...(n||[]).filter(({name:a})=>!i.includes(a))].filter(a=>!r&&a.name==="openverse"?!1:Object.values(o).some(c=>c.startsWith(`${a.mediaType}/`)))},e=>[e.settings.inserterMediaCategories,e.settings.allowedMimeTypes,e.settings.enableOpenverseMediaCategory,e.registeredInserterMediaCategories]),yve=(0,Yr.createRegistrySelector)(e=>(0,Yr.createSelector)((t,o=null)=>{let{getAllPatterns:r}=M(e(Xt)),n=r(),{allowedBlockTypes:i}=xu(t);return n.some(s=>{let{inserter:a=!0}=s;if(!a)return!1;let c=am(s);return Zk(c,i)&&c.every(({name:u})=>cm(t,u,o))})},(t,o)=>[...Xk(e)(t),...Bu(e)(t,o)])),_ve=(0,Yr.createRegistrySelector)(e=>(0,Yr.createSelector)((t,o)=>{if(o?.startsWith("core/block/")){let r=parseInt(o.slice(11),10),n=M(e(Xt)).getReusableBlocks().find(({id:i})=>i===r);return n?qk(n,t.settings.__experimentalUserPatternCategories):null}return[...t.settings.__experimentalBlockPatterns??[],...t.settings[du]?.(e)??[]].find(({name:r})=>r===o)},(t,o)=>o?.startsWith("core/block/")?[M(e(Xt)).getReusableBlocks(),t.settings.__experimentalReusableBlocks]:[t.settings.__experimentalBlockPatterns,t.settings[du]?.(e)])),Sve=(0,Yr.createRegistrySelector)(e=>(0,Yr.createSelector)(t=>[...M(e(Xt)).getReusableBlocks().map(o=>qk(o,t.settings.__experimentalUserPatternCategories)),...t.settings.__experimentalBlockPatterns??[],...t.settings[du]?.(e)??[]].filter((o,r,n)=>r===n.findIndex(i=>o.name===i.name)),Xk(e))),xve=[],wve=(0,Yr.createRegistrySelector)(e=>t=>{let o=t.settings[ox];return(o?o(e):t.settings.__experimentalReusableBlocks)??xve});function Cve(e){return e.lastFocus}function Bve(e){return e.isDragging}function Eve(e){return e.expandedBlock}var zM=(e,t)=>{let o=t,r;for(;!r&&(o=e.blocks.parents.get(o));)Ca(e,o)==="contentOnly"&&(r=o);return r};function H8(e,t){let o=ht(e,t);if(o==="core/block")return!0;let r=Mi(e,t),n=o==="core/template-part",i=e.settings?.[mu],s=e.settings?.disableContentOnlyForUnsyncedPatterns,a=e.settings?.disableContentOnlyForTemplateParts;if((!s&&r?.metadata?.patternName||n&&!a)&&!i)return!0;let c=Ca(e,t)==="contentOnly",u=Do(e,t),d=Ca(e,u)==="contentOnly";return!!(c&&!d)}var wu=(e,t)=>{if(UM(e,t))return;let o=t,r;for(;o=e.blocks.parents.get(o);)H8(e,o)&&(r=o);return r};function Cu(e,t){return UM(e,t)||wu(e,t)?!1:H8(e,t)}function jM(e){return e.editedContentOnlySection}function UM(e,t){if(!e.editedContentOnlySection)return!1;if(e.editedContentOnlySection===t)return!0;let o=t;for(;o=e.blocks.parents.get(o);)if(e.editedContentOnlySection===o)return!0;return!1}var Tve=(0,Yr.createSelector)((e,t)=>t.reduce((o,r)=>(o[r]=e.blocks.attributes.get(r)?.style,o),{}),(e,t)=>[...t.map(o=>e.blocks.attributes.get(o)?.style)]);function lm(e){return e.settings?.[fu]}function HM(e){return e.zoomLevel==="auto-scaled"||e.zoomLevel<100}function Ive(e){return e.zoomLevel}function G8(e,t,o=""){let r=Array.isArray(t)?t:[t],n=s=>r.every(a=>cm(e,a,s));if(!o){if(n(o))return o;let s=lm(e);return s&&n(s)?s:null}let i=o;for(;i!==null&&!n(i);)i=Do(e,i);return i}function Pve(e,t,o){let{allowedBlockTypes:r}=xu(e);if(!Zk(am(t),r))return null;let i=am(t).map(({blockName:s})=>s);return G8(e,i,o)}function Rve(e){return e.insertionPoint}var Ove=(e,t)=>{let o=ht(e,t);if(!(0,Kk.hasBlockSupport)(o,"visibility",!0))return!1;let n=e.blocks.attributes.get(t)?.metadata?.blockVisibility;return n===!1?!0:typeof n?.viewport=="object"&&n?.viewport!==null?Object.values(It).some(i=>n?.viewport?.[i.key]===!1):!1},GM=(e,t)=>{let o=ht(e,t);return(0,Kk.hasBlockSupport)(o,"visibility",!0)?e.blocks.attributes.get(t)?.metadata?.blockVisibility===!1:!1},Ave=(e,t)=>Rs(e,t).some(r=>GM(e,r)),W8=(e,t,o)=>{if(GM(e,t))return!0;let n=e.blocks.attributes.get(t)?.metadata?.blockVisibility?.viewport;return typeof n=="object"&&n!==null&&typeof o=="string"?n?.[o.toLowerCase()]===!1:!1},Lve=(e,t,o)=>Rs(e,t).some(n=>W8(e,n,o));function Nve(e){return!!e.hasBlockSpotlight||!!e.editedContentOnlySection}function $8(e,t){return!!Mi(e,t)?.lock?.edit}function K8(e,t){let o=Mi(e,t);if(o?.lock?.move!==void 0)return!!o?.lock?.move;let r=Do(e,t);return Ca(e,r)==="all"}function Y8(e,t){let o=Mi(e,t);if(o?.lock?.remove!==void 0)return!!o?.lock?.remove;let r=Do(e,t),n=Ca(e,r);return n==="all"||n==="insert"}function Mve(e,t){return $8(e,t)||K8(e,t)||Y8(e,t)}function Dve(e){return e.listViewContentPanelOpen}function Vve(e,t){return e.openedListViewPanels?.allOpen?!0:e.openedListViewPanels?.panels?.[t]===!0}function Fve(e){return e.listViewExpandRevision||0}function zve(e){return e.viewportModalClientIds}function jve(e){return e.requestedInspectorTab}var Jk=l(N(),1),jt={user:"user",theme:"theme",directory:"directory"},Qk={full:"fully",unsynced:"unsynced"},um={name:"allPatterns",label:(0,Jk._x)("All","patterns")},Rl={name:"myPatterns",label:(0,Jk.__)("My patterns")},_h={name:"core/starter-content",label:(0,Jk.__)("Starter content")};function lC(e,t,o){let r=e.name.startsWith("core/block"),n=e.source==="core"||e.source?.startsWith("pattern-directory");return!!(t===jt.theme&&(r||n)||t===jt.directory&&(r||!n)||t===jt.user&&e.type!==jt.user||o===Qk.full&&e.syncStatus!==""||o===Qk.unsynced&&e.syncStatus!=="unsynced"&&r)}var Eu=Symbol("isFiltered"),q8=new WeakMap,Z8=new WeakMap;function qk(e,t=[]){return{name:`core/block/${e.id}`,id:e.id,type:jt.user,title:e.title?.raw,categories:e.wp_pattern_category?.map(o=>{let r=t.find(({id:n})=>n===o);return r?r.slug:o}),content:e.content?.raw,syncStatus:e.wp_pattern_sync_status}}function Uve(e){let t=(0,X8.parse)(e.content,{__unstableSkipMigrationLogs:!0});return t.length===1&&(t[0].attributes={...t[0].attributes,metadata:{...t[0].attributes.metadata||{},categories:e.categories,patternName:e.name,name:t[0].attributes.metadata?.name||e.title}}),{...e,blocks:t}}function cC(e){let t=q8.get(e);return t||(t=Uve(e),q8.set(e,t)),t}function am(e){let t=Z8.get(e);return t||(t=(0,Q8.parse)(e.content),t=t.filter(o=>o.blockName!==null),Z8.set(e,t)),t}var dm=(e,t,o=null)=>typeof e=="boolean"?e:Array.isArray(e)?e.includes("core/post-content")&&t===null?!0:e.includes(t):o,Zk=(e,t)=>{if(typeof t=="boolean")return t;let o=[...e];for(;o.length>0;){let r=o.shift();if(!dm(t,r.name||r.blockName,!0))return!1;r.innerBlocks?.forEach(i=>{o.push(i)})}return!0},Xk=e=>t=>[t.settings.__experimentalBlockPatterns,t.settings.__experimentalUserPatternCategories,t.settings.__experimentalReusableBlocks,t.settings[du]?.(e),t.blockPatterns,M(e(Xt)).getReusableBlocks()],Bu=()=>(e,t)=>[e.blockListSettings.get(t),e.blocks.byClientId.get(t),e.blocks.order.get(t||""),e.settings.allowedBlockTypes,e.settings.templateLock,Di(e,t),lm(e),Cu(e,t),wu(e,t)];var Hve=(e,t,o)=>(r,n)=>{let i,s;if(typeof e=="function"?(i=e(r),s=e(n)):(i=r[e],s=n[e]),i>s)return o==="asc"?1:-1;if(s>i)return o==="asc"?-1:1;let a=t.findIndex(u=>u===r),c=t.findIndex(u=>u===n);return a>c?1:c>a?-1:0};function Ba(e,t,o="asc"){return e.concat().sort(Hve(t,e,o))}var{isContentBlock:$M}=M(Oe.privateApis),Gve=3600*1e3,Wve=24*3600*1e3,$ve=168*3600*1e3,_r=[],Kve=new Set,o9={[Eu]:!0};function ht(e,t){let o=e.blocks.byClientId.get(t),r="core/social-link";if(e9.Platform.OS!=="web"&&o?.name===r){let n=e.blocks.attributes.get(t),{service:i}=n??{};return i?`${r}-${i}`:r}return o?o.name:null}function Yve(e,t){let o=e.blocks.byClientId.get(t);return!!o&&o.isValid}function Mi(e,t){return e.blocks.byClientId.get(t)?e.blocks.attributes.get(t):null}function Al(e,t){return e.blocks.byClientId.has(t)?e.blocks.tree.get(t):null}var qve=(0,Te.createSelector)((e,t)=>{let o=e.blocks.byClientId.get(t);return o?{...o,attributes:Mi(e,t)}:null},(e,t)=>[e.blocks.byClientId.get(t),e.blocks.attributes.get(t)]);function Zve(e,t){let o=!t||!fC(e,t)?t||"":"controlled||"+t;return e.blocks.tree.get(o)?.innerBlocks||_r}var r9=(0,Te.createSelector)((e,t)=>((0,Zn.default)("wp.data.select( 'core/block-editor' ).__unstableGetClientIdWithClientIdsTree",{since:"6.3",version:"6.5"}),{clientId:t,innerBlocks:n9(e,t)}),e=>[e.blocks.order]),n9=(0,Te.createSelector)((e,t="")=>((0,Zn.default)("wp.data.select( 'core/block-editor' ).__unstableGetClientIdsTree",{since:"6.3",version:"6.5"}),Ar(e,t).map(o=>r9(e,o))),e=>[e.blocks.order]),i9=(0,Te.createSelector)((e,t)=>{t=Array.isArray(t)?[...t]:[t];let o=[];for(let n of t){let i=e.blocks.order.get(n);i&&o.push(...i)}let r=0;for(;r<o.length;){let n=o[r],i=e.blocks.order.get(n);i&&o.splice(r+1,0,...i),r++}return o},e=>[e.blocks.order]),yh=e=>i9(e,""),Xve=(0,Te.createSelector)((e,t)=>{let o=yh(e);if(!t)return o.length;let r=0;for(let n of o)e.blocks.byClientId.get(n).name===t&&r++;return r},e=>[e.blocks.order,e.blocks.byClientId]),s9=(0,Te.createSelector)((e,t)=>{if(!t)return _r;let o=Array.isArray(t)?t:[t],n=yh(e).filter(i=>{let s=e.blocks.byClientId.get(i);return o.includes(s.name)});return n.length>0?n:_r},e=>[e.blocks.order,e.blocks.byClientId]);function Qve(e,t){return(0,Zn.default)("wp.data.select( 'core/block-editor' ).__experimentalGetGlobalBlocksByName",{since:"6.5",alternative:"wp.data.select( 'core/block-editor' ).getBlocksByName"}),s9(e,t)}var uC=(0,Te.createSelector)((e,t)=>(Array.isArray(t)?t:[t]).map(o=>Al(e,o)),(e,t)=>(Array.isArray(t)?t:[t]).map(o=>e.blocks.tree.get(o))),Jve=(0,Te.createSelector)((e,t)=>uC(e,t).filter(Boolean).map(o=>o.name),(e,t)=>uC(e,t));function eke(e,t){return Ar(e,t).length}function ty(e){return e.selection.selectionStart}function oy(e){return e.selection.selectionEnd}function tke(e){return e.selection.selectionStart.clientId}function oke(e){return e.selection.selectionEnd.clientId}function rke(e){let t=Tu(e).length;return t||(e.selection.selectionStart.clientId?1:0)}function nke(e){let{selectionStart:t,selectionEnd:o}=e.selection;return!!t.clientId&&t.clientId===o.clientId}function Sh(e){let{selectionStart:t,selectionEnd:o}=e.selection,{clientId:r}=t;return!r||r!==o.clientId?null:r}function ike(e){let t=Sh(e);return t?Al(e,t):null}function Do(e,t){return e.blocks.parents.get(t)??null}var Rs=(0,Te.createSelector)((e,t,o=!1)=>{let r=[],n=t;for(;n=e.blocks.parents.get(n);)r.push(n);return r.length?o?r:r.reverse():_r},e=>[e.blocks.parents]),KM=(0,Te.createSelector)((e,t,o,r=!1)=>{let n=Rs(e,t,r),i=Array.isArray(o)?s=>o.includes(s):s=>o===s;return n.filter(s=>i(ht(e,s)))},e=>[e.blocks.parents]);function ske(e,t){let o=t,r;do r=o,o=e.blocks.parents.get(o);while(o);return r}function ake(e,t){let o=Sh(e),r=[...Rs(e,t),t],n=[...Rs(e,o),o],i,s=Math.min(r.length,n.length);for(let a=0;a<s&&r[a]===n[a];a++)i=r[a];return i}function YM(e,t,o=1){if(t===void 0&&(t=Sh(e)),t===void 0&&(o<0?t=qM(e):t=a9(e)),!t)return null;let r=Do(e,t);if(r===null)return null;let{order:n}=e.blocks,i=n.get(r),a=i.indexOf(t)+1*o;return a<0||a===i.length?null:i[a]}function lke(e,t){return YM(e,t,-1)}function cke(e,t){return YM(e,t,1)}function uke(e){return e.initialPosition}var xh=(0,Te.createSelector)(e=>{let{selectionStart:t,selectionEnd:o}=e.selection;if(!t.clientId||!o.clientId)return _r;if(t.clientId===o.clientId)return[t.clientId];let r=Do(e,t.clientId);if(r===null)return _r;let n=Ar(e,r),i=n.indexOf(t.clientId),s=n.indexOf(o.clientId);return i>s?n.slice(s,i+1):n.slice(i,s+1)},e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]);function Tu(e){let{selectionStart:t,selectionEnd:o}=e.selection;return t.clientId===o.clientId?_r:xh(e)}var dke=(0,Te.createSelector)(e=>{let t=Tu(e);return t.length?t.map(o=>Al(e,o)):_r},e=>[...xh.getDependants(e),e.blocks.byClientId,e.blocks.order,e.blocks.attributes]);function qM(e){return Tu(e)[0]||null}function a9(e){let t=Tu(e);return t[t.length-1]||null}function fke(e,t){return qM(e)===t}function l9(e,t){return Tu(e).indexOf(t)!==-1}var mke=(0,Te.createSelector)((e,t)=>{let o=t,r=!1;for(;o&&!r;)o=Do(e,o),r=l9(e,o);return r},e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]);function pke(e){let{selectionStart:t,selectionEnd:o}=e.selection;return t.clientId===o.clientId?null:t.clientId||null}function hke(e){let{selectionStart:t,selectionEnd:o}=e.selection;return t.clientId===o.clientId?null:o.clientId||null}function gke(e){let t=ty(e),o=oy(e);return!t.attributeKey&&!o.attributeKey&&typeof t.offset>"u"&&typeof o.offset>"u"}function bke(e){let t=ty(e),o=oy(e);return!!t&&!!o&&t.clientId===o.clientId&&t.attributeKey===o.attributeKey&&t.offset===o.offset}function vke(e){return xh(e).some(t=>{let o=ht(e,t);return!(0,Oe.getBlockType)(o).merge})}function kke(e,t){let o=ty(e),r=oy(e);if(o.clientId===r.clientId||!o.attributeKey||!r.attributeKey||typeof o.offset>"u"||typeof r.offset>"u")return!1;let n=Do(e,o.clientId),i=Do(e,r.clientId);if(n!==i)return!1;let s=Ar(e,n),a=s.indexOf(o.clientId),c=s.indexOf(r.clientId),u,d;a>c?(u=r,d=o):(u=o,d=r);let f=t?d.clientId:u.clientId,m=t?u.clientId:d.clientId,h=ht(e,f);if(!(0,Oe.getBlockType)(h).merge)return!1;let g=Al(e,m);if(g.name===h)return!0;let b=(0,Oe.switchToBlockType)(g,h);return b&&b.length}var yke=e=>{let t=ty(e),o=oy(e);if(t.clientId===o.clientId||!t.attributeKey||!o.attributeKey||typeof t.offset>"u"||typeof o.offset>"u")return _r;let r=Do(e,t.clientId),n=Do(e,o.clientId);if(r!==n)return _r;let i=Ar(e,r),s=i.indexOf(t.clientId),a=i.indexOf(o.clientId),[c,u]=s>a?[o,t]:[t,o],d=Al(e,c.clientId),f=Al(e,u.clientId),m=d.attributes[c.attributeKey],h=f.attributes[u.attributeKey],p=(0,Ol.create)({html:m}),g=(0,Ol.create)({html:h});return p=(0,Ol.remove)(p,0,c.offset),g=(0,Ol.remove)(g,u.offset,g.text.length),[{...d,attributes:{...d.attributes,[c.attributeKey]:(0,Ol.toHTMLString)({value:p})}},{...f,attributes:{...f.attributes,[u.attributeKey]:(0,Ol.toHTMLString)({value:g})}}]};function Ar(e,t){return e.blocks.order.get(t||"")||_r}function c9(e,t){let o=Do(e,t);return Ar(e,o).indexOf(t)}function u9(e,t){let{selectionStart:o,selectionEnd:r}=e.selection;return o.clientId!==r.clientId?!1:o.clientId===t}function d9(e,t,o=!1){let r=xh(e);return r.length?o?r.some(n=>Rs(e,n,!0).includes(t)):r.some(n=>Do(e,n)===t):!1}function f9(e,t,o=!1){return Ar(e,t).some(r=>ZM(e,r)||o&&f9(e,r,o))}function _ke(e,t){if(!t)return!1;let o=Tu(e),r=o.indexOf(t);return r>-1&&r<o.length-1}function Ske(e){let{selectionStart:t,selectionEnd:o}=e.selection;return t.clientId!==o.clientId}function xke(e){return e.isMultiSelecting}function wke(e){return e.isSelectionEnabled}function Cke(e,t){return e.blocksMode[t]||"visual"}function Bke(e){return e.isTyping}function m9(e){return!!e.draggedBlocks.length}function Eke(e){return e.draggedBlocks}function ZM(e,t){return e.draggedBlocks.includes(t)}function Tke(e,t){return m9(e)?Rs(e,t).some(r=>ZM(e,r)):!1}function Ike(){return(0,Zn.default)('wp.data.select( "core/block-editor" ).isCaretWithinFormattedText',{since:"6.1",version:"6.3"}),!1}var Pke=(0,Te.createSelector)(e=>{let t,o,{insertionCue:r,selection:{selectionEnd:n}}=e;if(r!==null)return r;let{clientId:i}=n;return i?(t=Do(e,i)||void 0,o=c9(e,n.clientId)+1):o=Ar(e).length,{rootClientId:t,index:o}},e=>[e.insertionCue,e.selection.selectionEnd.clientId,e.blocks.parents,e.blocks.order]);function Rke(e){return e.insertionCue!==null}function Oke(e){return e.template.isValid}function Ake(e){return e.settings.template}function Ca(e,t){if(!t)return e.settings.templateLock??!1;let o=dC(e,t)?.templateLock;return o==="contentOnly"&&e.editedContentOnlySection===t?!1:o??!1}var XM=(e,t,o=null)=>{let r,n;if(t&&typeof t=="object"?(r=t,n=t.name):(r=(0,Oe.getBlockType)(t),n=t),!r)return!1;let{allowedBlockTypes:i}=xu(e);if(!dm(i,n,!0))return!1;let a=(Array.isArray(r.parent)?r.parent:[]).concat(Array.isArray(r.ancestor)?r.ancestor:[]);if(a.length>0){if(a.includes("core/post-content"))return!0;let c=o,u=!1;do{if(a.includes(ht(e,c))){u=!0;break}c=e.blocks.parents.get(c)}while(c);return u}return!0},ry=(e,t,o=null)=>{if(e.settings.isPreviewMode||!XM(e,t,o))return!1;let r;t&&typeof t=="object"?(r=t,t=r.name):r=(0,Oe.getBlockType)(t);let n=Ca(e,o);if(n&&n!=="contentOnly")return!1;let i=Di(e,o??""),s=!!Cu(e,o),a=s?o:wu(e,o),c=!!a;if(i==="disabled"&&(!c||t!==(0,Oe.getDefaultBlockName)()))return!1;let u=dC(e,o);if(o&&u===void 0)return!1;let d=$M(t);if(c&&!d||c&&ht(e,a)==="core/block")return!1;if(c&&(s||i==="contentOnly"||i==="disabled")&&!Yk(e,t,o)){let _=(0,Oe.getDefaultBlockName)();if(t===_){if(!Ar(e,o).some(B=>ht(e,B)===_))return!1}else return!1}let f=ht(e,o),h=(0,Oe.getBlockType)(f)?.allowedBlocks,p=dm(h,t);if(p!==!1){let _=u?.allowedBlocks,S=dm(_,t);S!==null&&(p=S)}let g=r.parent,b=dm(g,f),k=!0,v=r.ancestor;v&&(k=[o,...Rs(e,o)].some(S=>dm(v,ht(e,S))));let y=k&&(p===null&&b===null||p===!0||b===!0);return y&&(0,t9.applyFilters)("blockEditor.__unstableCanInsertBlockType",y,r,o,{getBlock:Al.bind(null,e),getBlockParentsByBlockName:KM.bind(null,e)})},cm=(0,Te.createRegistrySelector)(e=>(0,Te.createSelector)(ry,(t,o,r)=>Bu(e)(t,r)));function Lke(e,t,o=null){return t.every(r=>cm(e,ht(e,r),o))}function QM(e,t){if(e.settings.isPreviewMode)return!1;let o=Mi(e,t);if(o===null)return!0;if(o.lock?.remove!==void 0)return!o.lock.remove;let r=Do(e,t),n=Ca(e,r);if(n&&n!=="contentOnly")return!1;let i=!!Cu(e,r),s=i?r:wu(e,r),a=!!s,c=$M(ht(e,t));if(a&&!c||a&&ht(e,s)==="core/block")return!1;let u=Di(e,r),d=ht(e,t),f=(0,Oe.getDefaultBlockName)();return a&&(i||d===f||u==="contentOnly")&&!Yk(e,ht(e,t),r)?d===f?Ar(e,r).filter(p=>ht(e,p)===f).length>1:!1:u!=="disabled"}function p9(e,t){return t.every(o=>QM(e,o))}function h9(e,t){if(e.settings.isPreviewMode)return!1;let o=Mi(e,t);if(o===null)return!0;if(o.lock?.move!==void 0)return!o.lock.move;let r=Do(e,t);if(Ca(e,r)==="all")return!1;let i=!!wu(e,t),s=$M(ht(e,t));if(i&&!s)return!1;let a=!!Cu(e,r),c=Di(e,r);return i&&(a||c==="contentOnly")&&!Yk(e,ht(e,t),r)?!1:Di(e,r)!=="disabled"}function Nke(e,t){return t.every(o=>h9(e,o))}function g9(e,t){if(e.settings.isPreviewMode)return!1;let o=Mi(e,t);if(o===null)return!0;let{lock:r}=o;return!r?.edit}function Mke(e,t){return e.settings.isPreviewMode||!(0,Oe.hasBlockSupport)(t,"lock",!0)?!1:!!e.settings?.canLockBlocks}function JM(e,t){return e.preferences.insertUsage?.[t]??null}var ey=(e,t,o)=>(0,Oe.hasBlockSupport)(t,"inserter",!0)?ry(e,t.name,o):!1,Dke=(e,t)=>o=>{let r=`${t.id}/${o.name}`,{time:n,count:i=0}=JM(e,r)||{};return{...t,id:r,icon:o.icon||t.icon,title:o.title||t.title,description:o.description||t.description,category:o.category||t.category,example:o.hasOwnProperty("example")?o.example:t.example,initialAttributes:{...t.initialAttributes,...o.attributes},innerBlocks:o.innerBlocks,keywords:o.keywords||t.keywords,frecency:e5(n,i),isSearchOnly:o.isSearchOnly}},e5=(e,t)=>{if(!e)return t;let o=Date.now()-e;switch(!0){case o<Gve:return t*4;case o<Wve:return t*2;case o<$ve:return t/2;default:return t/4}},b9=(e,{buildScope:t="inserter"})=>o=>{let r=o.name,n=!1;(0,Oe.hasBlockSupport)(o.name,"multiple",!0)||(n=uC(e,yh(e)).some(({name:f})=>f===o.name));let{time:i,count:s=0}=JM(e,r)||{},a={id:r,name:o.name,title:o.title,icon:o.icon,isDisabled:n,frecency:e5(i,s)};if(t==="transform")return a;let c=(0,Oe.getBlockVariations)(o.name,"inserter"),u=(0,Oe.getBlockVariations)(o.name,"block"),d=[...c,...u.filter(f=>o.name==="core/heading"&&["h1","h2","h3","h4","h5","h6"].includes(f.name)).map(f=>({...f,isSearchOnly:!0}))];return{...a,initialAttributes:{},description:o.description,category:o.category,keywords:o.keywords,parent:o.parent,ancestor:o.ancestor,variations:d,example:o.example,utility:1}},Vke=(0,Te.createRegistrySelector)(e=>(0,Te.createSelector)((t,o=null,r=o9)=>{let n=h=>{let p=h.wp_pattern_sync_status?Ni:{src:Ni,foreground:"var(--wp-block-synced-color)"},g=qk(h),{time:b,count:k=0}=JM(t,g.name)||{},v=e5(b,k);return{id:g.name,name:"core/block",initialAttributes:{ref:h.id},title:g.title,icon:p,category:"reusable",keywords:["reusable"],isDisabled:!1,utility:1,frecency:v,content:g.content,get blocks(){return cC(g).blocks},syncStatus:g.syncStatus}},i=ry(t,"core/block",o)?M(e(Xt)).getReusableBlocks().map(n):[],s=b9(t,{buildScope:"inserter"}),a=(0,Oe.getBlockTypes)().filter(h=>(0,Oe.hasBlockSupport)(h,"inserter",!0)).map(s);if(r[Eu]!==!1)a=a.filter(h=>ey(t,h,o));else{let{getClosestAllowedInsertionPoint:h}=M(e(Xt));a=a.filter(p=>XM(t,p,o)&&h(p.name,o)!==null).map(p=>({...p,isAllowedInCurrentRoot:ey(t,p,o)}))}let c=a.reduce((h,p)=>{let{variations:g=[]}=p;if(g.some(({isDefault:b})=>b)||h.push(p),g.length){let b=Dke(t,p);h.push(...g.map(b))}return h},[]),u=(h,p)=>{let{core:g,noncore:b}=h;return(p.name.startsWith("core/")?g:b).push(p),h},{core:d,noncore:f}=c.reduce(u,{core:[],noncore:[]});return[...[...d,...f],...i]},(t,o)=>[(0,Oe.getBlockTypes)(),M(e(Xt)).getReusableBlocks(),t.blocks.order,t.preferences.insertUsage,...Bu(e)(t,o)])),Fke=(0,Te.createRegistrySelector)(e=>(0,Te.createSelector)((t,o,r=null)=>{let n=Array.isArray(o)?o:[o],i=b9(t,{buildScope:"transform"}),s=(0,Oe.getBlockTypes)().filter(u=>ey(t,u,r)).map(i),a=Object.fromEntries(Object.entries(s).map(([,u])=>[u.name,u])),c=(0,Oe.getPossibleBlockTransformations)(n).reduce((u,d)=>(a[d?.name]&&u.push(a[d.name]),u),[]);return Ba(c,u=>a[u.name].frecency,"desc")},(t,o,r)=>[(0,Oe.getBlockTypes)(),t.preferences.insertUsage,...Bu(e)(t,r)])),zke=(e,t=null)=>(0,Oe.getBlockTypes)().some(n=>ey(e,n,t))?!0:ry(e,"core/block",t),WM=(0,Te.createRegistrySelector)(e=>(0,Te.createSelector)((t,o=null)=>{if(!o)return;let r=(0,Oe.getBlockTypes)().filter(i=>ey(t,i,o));return ry(t,"core/block",o)&&r.push("core/block"),r},(t,o)=>[(0,Oe.getBlockTypes)(),...Bu(e)(t,o)])),jke=(0,Te.createSelector)((e,t=null)=>((0,Zn.default)('wp.data.select( "core/block-editor" ).__experimentalGetAllowedBlocks',{alternative:'wp.data.select( "core/block-editor" ).getAllowedBlocks',since:"6.2",version:"6.4"}),WM(e,t)),(e,t)=>WM.getDependants(e,t));function v9(e,t=null){if(!t)return;let{defaultBlock:o,directInsert:r}=e.blockListSettings.get(t)??{};if(!(!o||!r))return o}function Uke(e,t=null){return(0,Zn.default)('wp.data.select( "core/block-editor" ).__experimentalGetDirectInsertBlock',{alternative:'wp.data.select( "core/block-editor" ).getDirectInsertBlock',since:"6.3",version:"6.4"}),v9(e,t)}var Hke=(0,Te.createRegistrySelector)(e=>(t,o)=>{let r=M(e(Xt)).getPatternBySlug(o);return r?cC(r):null}),t5=e=>(t,o)=>[...Xk(e)(t),...Bu(e)(t,o)],J8=new WeakMap;function Gke(e){let t=J8.get(e);return t||(t={...e,get blocks(){return cC(e).blocks}},J8.set(e,t)),t}var Wke=(0,Te.createRegistrySelector)(e=>(0,Te.createSelector)((t,o=null,r=o9)=>{let{getAllPatterns:n}=M(e(Xt)),i=n(),{allowedBlockTypes:s}=xu(t);return i.filter(({inserter:d=!0})=>!!d).map(Gke).filter(d=>Zk(am(d),s)).filter(d=>am(d).every(({blockName:f})=>r[Eu]!==!1?cm(t,f,o):XM(t,f,o)))},t5(e))),$ke=(0,Te.createRegistrySelector)(e=>(0,Te.createSelector)((t,o,r=null)=>{if(!o)return _r;let n=e(Xt).__experimentalGetAllowedPatterns(r),i=Array.isArray(o)?o:[o],s=n.filter(a=>a?.blockTypes?.some?.(c=>i.includes(c)));return s.length===0?_r:s},(t,o,r)=>t5(e)(t,r))),Kke=(0,Te.createRegistrySelector)(e=>((0,Zn.default)('wp.data.select( "core/block-editor" ).__experimentalGetPatternsByBlockTypes',{alternative:'wp.data.select( "core/block-editor" ).getPatternsByBlockTypes',since:"6.2",version:"6.4"}),e(Xt).getPatternsByBlockTypes)),Yke=(0,Te.createRegistrySelector)(e=>(0,Te.createSelector)((t,o,r=null)=>{if(!o||o.some(({clientId:i,innerBlocks:s})=>s.length||fC(t,i)))return _r;let n=Array.from(new Set(o.map(({name:i})=>i)));return e(Xt).getPatternsByBlockTypes(n,r)},(t,o,r)=>t5(e)(t,r)));function dC(e,t){return e.blockListSettings.get(t)}function xu(e){return e.settings}function qke(e){return e.blocks.isPersistentChange}var Zke=(0,Te.createSelector)((e,t=[])=>{let o={};for(let r of t){let n=dC(e,r);n&&(o[r]=n)}return o},e=>[e.blockListSettings]),Xke=(0,Te.createRegistrySelector)(e=>(0,Te.createSelector)((t,o)=>{(0,Zn.default)("wp.data.select( 'core/block-editor' ).__experimentalGetReusableBlockTitle",{since:"6.6",version:"6.8"});let r=M(e(Xt)).getReusableBlocks().find(n=>n.id===o);return r?r.title?.raw:null},()=>[M(e(Xt)).getReusableBlocks()]));function Qke(e){return e.blocks.isIgnoredChange}function Jke(e){return e.lastBlockAttributesChange}function eye(){return(0,Zn.default)('wp.data.select( "core/block-editor" ).hasBlockMovingClientId',{since:"6.7",hint:"Block moving mode feature has been removed"}),!1}function tye(e){return!!e.automaticChangeStatus}function oye(e,t){return e.highlightedBlock===t}function fC(e,t){return e.blocks.controlledInnerBlocks.has(t)}var rye=(0,Te.createSelector)((e,t)=>{if(!t.length)return null;let o=Sh(e);if(t.includes(ht(e,o)))return o;let r=Tu(e),n=KM(e,o||r[0],t);return n?n[n.length-1]:null},(e,t)=>[e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId,t]);function nye(e,t,o){let{lastBlockInserted:r}=e;return r.clientIds?.includes(t)&&r.source===o}function iye(e,t){return e.blockVisibility?.[t]??!0}function sye(){(0,Zn.default)("wp.data.select( 'core/block-editor' ).getHoveredBlockClientId",{since:"6.9",version:"7.1"})}var aye=(0,Te.createSelector)(e=>{let t=new Set(Object.keys(e.blockVisibility).filter(o=>e.blockVisibility[o]));return t.size===0?Kve:t},e=>[e.blockVisibility]);function k9(e,t){if(Di(e,t)!=="default")return!1;if(!g9(e,t))return!0;if(HM(e)){let n=lm(e);if(n){if(Ar(e,n)?.includes(t))return!0}else if(t&&!Do(e,t))return!0}return((0,Oe.hasBlockSupport)(ht(e,t),"__experimentalDisableBlockOverlay",!1)?!1:fC(e,t))&&!u9(e,t)&&!d9(e,t,!0)}function lye(e,t){let o=e.blocks.parents.get(t);for(;o;){if(k9(e,o))return!0;o=e.blocks.parents.get(o)}return!1}function Di(e,t=""){return t===null&&(t=""),e.derivedBlockEditingModes?.has(t)?e.derivedBlockEditingModes.get(t):e.blocks.blockEditingModes.has(t)?e.blocks.blockEditingModes.get(t):"default"}var cye=(0,Te.createRegistrySelector)(e=>(t,o="")=>{let r=o||Sh(t);if(!r||Cu(t,r))return!1;let{getGroupingBlockName:n}=e(Oe.store),i=Al(t,r),s=n();return i&&(i.name===s||(0,Oe.getBlockType)(i.name)?.transforms?.ungroup)&&!!i.innerBlocks.length&&QM(t,r)}),uye=(0,Te.createRegistrySelector)(e=>(t,o=_r)=>{let{getGroupingBlockName:r}=e(Oe.store),n=r(),i=o?.length?o:xh(t),s=i?.length?Do(t,i[0]):void 0;return cm(t,n,s)&&i.length&&p9(t,i)}),dye=(e,t)=>((0,Zn.default)("wp.data.select( 'core/block-editor' ).__unstableGetContentLockingParent",{since:"6.1",version:"6.7"}),zM(e,t));function fye(e){return(0,Zn.default)("wp.data.select( 'core/block-editor' ).__unstableGetTemporarilyEditingAsBlocks",{since:"6.1",version:"6.7"}),jM(e)}var mC={};xa(mC,{__experimentalUpdateSettings:()=>r5,clearBlockRemovalPrompt:()=>vye,clearRequestedInspectorTab:()=>Mye,closeListViewContentPanel:()=>Oye,deleteStyleOverride:()=>_ye,editContentOnlySection:()=>i5,ensureDefaultBlock:()=>C9,expandBlock:()=>Cye,hideBlockInterface:()=>hye,hideViewportModal:()=>Lye,openListViewContentPanel:()=>Rye,privateRemoveBlocks:()=>n5,requestInspectorTab:()=>Nye,resetZoomLevel:()=>Iye,setBlockRemovalRules:()=>kye,setInsertionPoint:()=>Bye,setLastFocus:()=>Sye,setStyleOverride:()=>yye,setZoomLevel:()=>Tye,showBlockInterface:()=>gye,showViewportModal:()=>Aye,startDragging:()=>xye,stopDragging:()=>wye,stopEditingContentOnlySection:()=>Eye,toggleBlockSpotlight:()=>Pye});var _9=l(O(),1),S9=l(Re(),1),x9=l(ir(),1),w9=l(N(),1),mye=e=>Array.isArray(e)?e:[e],pye=["inserterMediaCategories","blockInspectorAnimation","mediaSideload"];function r5(e,{stripExperimentalSettings:t=!1,reset:o=!1}={}){let r=e;Object.hasOwn(r,"__unstableIsPreviewMode")&&((0,S9.default)("__unstableIsPreviewMode argument in wp.data.dispatch('core/block-editor').updateSettings",{since:"6.8",alternative:"isPreviewMode"}),r={...r},r.isPreviewMode=r.__unstableIsPreviewMode,delete r.__unstableIsPreviewMode);let n=r;if(t&&_9.Platform.OS==="web"){n={};for(let i in r)pye.includes(i)||(n[i]=r[i])}return{type:"UPDATE_SETTINGS",settings:n,reset:o}}function hye(){return{type:"HIDE_BLOCK_INTERFACE"}}function gye(){return{type:"SHOW_BLOCK_INTERFACE"}}var n5=(e,t=!0,o=!1)=>({select:r,dispatch:n,registry:i})=>{if(!e||!e.length||(e=mye(e),!r.canRemoveBlocks(e)))return;let a=!o&&r.getBlockRemovalRules();if(a){let u=function(h){let p=[],g=[...h];for(;g.length;){let{innerBlocks:b,...k}=g.shift();g.push(...b),p.push(k)}return p};var c=u;let d=e.map(r.getBlock),f=u(d),m;for(let h of a)if(m=h.callback(f),m){n(bye(e,t,m));return}}t&&n.selectPreviousBlock(e[0],t),i.batch(()=>{n({type:"REMOVE_BLOCKS",clientIds:e}),n(C9())})},C9=()=>({select:e,dispatch:t})=>{if(e.getBlockCount()>0)return;let{__unstableHasCustomAppender:r}=e.getSettings();r||t.insertDefaultBlock()};function bye(e,t,o){return{type:"DISPLAY_BLOCK_REMOVAL_PROMPT",clientIds:e,selectPrevious:t,message:o}}function vye(){return{type:"CLEAR_BLOCK_REMOVAL_PROMPT"}}function kye(e=!1){return{type:"SET_BLOCK_REMOVAL_RULES",rules:e}}function yye(e,t){return{type:"SET_STYLE_OVERRIDE",id:e,style:t}}function _ye(e){return{type:"DELETE_STYLE_OVERRIDE",id:e}}function Sye(e=null){return{type:"LAST_FOCUS",lastFocus:e}}function xye(){return{type:"START_DRAGGING"}}function wye(){return{type:"STOP_DRAGGING"}}function Cye(e){return{type:"SET_BLOCK_EXPANDED_IN_LIST_VIEW",clientId:e}}function Bye(e){return{type:"SET_INSERTION_POINT",value:e}}function i5(e){return{type:"EDIT_CONTENT_ONLY_SECTION",clientId:e}}function Eye(){return{type:"EDIT_CONTENT_ONLY_SECTION"}}var Tye=(e=100)=>({select:t,dispatch:o})=>{if(e!==100){let r=t.getBlockSelectionStart(),n=t.getSectionRootClientId();if(r){let i;if(n){let s=t.getBlockOrder(n);s?.includes(r)?i=r:i=t.getBlockParents(r).find(a=>s.includes(a))}else i=t.getBlockHierarchyRootClientId(r);i?o.selectBlock(i):o.clearSelectedBlock(),(0,x9.speak)((0,w9.__)("You are currently in zoom-out mode."))}}o({type:"SET_ZOOM_LEVEL",zoom:e})};function Iye(){return{type:"RESET_ZOOM_LEVEL"}}function Pye(e,t){return{type:"TOGGLE_BLOCK_SPOTLIGHT",clientId:e,hasBlockSpotlight:t}}function Rye(){return{type:"OPEN_LIST_VIEW_CONTENT_PANEL"}}function Oye(){return{type:"CLOSE_LIST_VIEW_CONTENT_PANEL"}}function Aye(e){return{type:"SHOW_VIEWPORT_MODAL",clientIds:e}}function Lye(){return{type:"HIDE_VIEWPORT_MODAL"}}function Nye(e,t={}){return{type:"REQUEST_INSPECTOR_TAB",tabName:e,options:t}}function Mye(){return{type:"CLEAR_REQUESTED_INSPECTOR_TAB"}}var l5={};xa(l5,{__unstableDeleteSelection:()=>s_e,__unstableExpandSelection:()=>l_e,__unstableIncrementListViewExpandRevision:()=>U_e,__unstableMarkAutomaticChange:()=>B_e,__unstableMarkLastChangeAsPersistent:()=>w_e,__unstableMarkNextChangeAsNotPersistent:()=>C_e,__unstableSaveReusableBlock:()=>x_e,__unstableSetAllListViewPanelsOpen:()=>z_e,__unstableSetEditorMode:()=>E_e,__unstableSetOpenListViewPanel:()=>F_e,__unstableSetTemporarilyEditingAsBlocks:()=>N_e,__unstableSplitSelection:()=>a_e,__unstableToggleListViewPanel:()=>j_e,clearSelectedBlock:()=>qye,duplicateBlocks:()=>I_e,enterFormattedText:()=>b_e,exitFormattedText:()=>v_e,flashBlock:()=>O_e,hideInsertionPoint:()=>r_e,hoverBlock:()=>Hye,insertAfterBlock:()=>R_e,insertBeforeBlock:()=>P_e,insertBlock:()=>t_e,insertBlocks:()=>N9,insertDefaultBlock:()=>y_e,mergeBlocks:()=>c_e,moveBlockToPosition:()=>e_e,moveBlocksDown:()=>Qye,moveBlocksToPosition:()=>L9,moveBlocksUp:()=>Jye,multiSelect:()=>Yye,receiveBlocks:()=>Fye,registerInserterMediaCategory:()=>M_e,removeBlock:()=>u_e,removeBlocks:()=>M9,replaceBlock:()=>Xye,replaceBlocks:()=>O9,replaceInnerBlocks:()=>d_e,resetBlocks:()=>Dye,resetSelection:()=>Vye,selectBlock:()=>Uye,selectNextBlock:()=>Wye,selectPreviousBlock:()=>Gye,selectionChange:()=>k_e,setBlockEditingMode:()=>D_e,setBlockMovingClientId:()=>T_e,setBlockVisibility:()=>L_e,setHasControlledInnerBlocks:()=>A_e,setTemplateValidity:()=>n_e,showInsertionPoint:()=>o_e,startDraggingBlocks:()=>h_e,startMultiSelect:()=>$ye,startTyping:()=>m_e,stopDraggingBlocks:()=>g_e,stopMultiSelect:()=>Kye,stopTyping:()=>p_e,synchronizeTemplate:()=>i_e,toggleBlockHighlight:()=>a5,toggleBlockMode:()=>f_e,toggleSelection:()=>Zye,unsetBlockEditingMode:()=>V_e,updateBlock:()=>jye,updateBlockAttributes:()=>zye,updateBlockListSettings:()=>__e,updateSettings:()=>S_e,validateBlocksToTemplate:()=>R9});var ke=l(Y(),1),pC=l(ir(),1),Iu=l(N(),1),I9=l(Xn(),1),gt=l(yr(),1),Nl=l(Re(),1),P9=l(wh(),1);var T9=l(yr(),1),Ll="\x86";function ny(e){if(e)return Object.keys(e).find(t=>{let o=e[t];return(typeof o=="string"||o instanceof T9.RichTextData)&&o.toString().indexOf(Ll)!==-1})}function s5(e){for(let[t,o]of Object.entries(e.attributes))if(o.source==="rich-text"||o.source==="html")return t}var Ch=e=>Array.isArray(e)?e:[e],Dye=e=>({dispatch:t})=>{t({type:"RESET_BLOCKS",blocks:e}),t(R9(e))},R9=e=>({select:t,dispatch:o})=>{let r=t.getTemplate(),n=t.getTemplateLock(),i=!r||n!=="all"||(0,ke.doBlocksMatchTemplate)(e,r),s=t.isValidTemplate();if(i!==s)return o.setTemplateValidity(i),i};function Vye(e,t,o){return{type:"RESET_SELECTION",selectionStart:e,selectionEnd:t,initialPosition:o}}function Fye(e){return(0,Nl.default)('wp.data.dispatch( "core/block-editor" ).receiveBlocks',{since:"5.9",alternative:"resetBlocks or insertBlocks"}),{type:"RECEIVE_BLOCKS",blocks:e}}function zye(e,t,o={uniqueByBlock:!1}){return typeof o=="boolean"&&(o={uniqueByBlock:o}),{type:"UPDATE_BLOCK_ATTRIBUTES",clientIds:Ch(e),attributes:t,options:o}}function jye(e,t){return{type:"UPDATE_BLOCK",clientId:e,updates:t}}function Uye(e,t=0){return{type:"SELECT_BLOCK",initialPosition:t,clientId:e}}function Hye(){return(0,Nl.default)('wp.data.dispatch( "core/block-editor" ).hoverBlock',{since:"6.9",version:"7.1"}),{type:"DO_NOTHING"}}var Gye=(e,t=!1)=>({select:o,dispatch:r})=>{let n=o.getPreviousBlockClientId(e);if(n)r.selectBlock(n,-1);else if(t){let i=o.getBlockRootClientId(e);if(i)r.selectBlock(i,-1);else{let s=o.getNextBlockClientId(e);s&&r.selectBlock(s,0)}}},Wye=e=>({select:t,dispatch:o})=>{let r=t.getNextBlockClientId(e);r&&o.selectBlock(r)};function $ye(){return{type:"START_MULTI_SELECT"}}function Kye(){return{type:"STOP_MULTI_SELECT"}}var Yye=(e,t,o=0)=>({select:r,dispatch:n})=>{let i=r.getBlockRootClientId(e),s=r.getBlockRootClientId(t);if(i!==s)return;n({type:"MULTI_SELECT",start:e,end:t,initialPosition:o});let a=r.getSelectedBlockCount();(0,pC.speak)((0,Iu.sprintf)((0,Iu._n)("%s block selected.","%s blocks selected.",a),a),"assertive")};function qye(){return{type:"CLEAR_SELECTED_BLOCK"}}function Zye(e=!0){return{type:"TOGGLE_SELECTION",isSelectionEnabled:e}}var O9=(e,t,o,r=0,n)=>({select:i,dispatch:s,registry:a})=>{e=Ch(e),t=Ch(t);let c=i.getBlockRootClientId(e[0]);for(let u=0;u<t.length;u++){let d=t[u];if(!i.canInsertBlockType(d.name,c))return}a.batch(()=>{s({type:"REPLACE_BLOCKS",clientIds:e,blocks:t,time:Date.now(),indexToSelect:o,initialPosition:r,meta:n}),s.ensureDefaultBlock()})};function Xye(e,t){return O9(e,t)}var A9=e=>(t,o)=>({select:r,dispatch:n})=>{r.canMoveBlocks(t)&&n({type:e,clientIds:Ch(t),rootClientId:o})},Qye=A9("MOVE_BLOCKS_DOWN"),Jye=A9("MOVE_BLOCKS_UP"),L9=(e,t="",o="",r)=>({select:n,dispatch:i})=>{n.canMoveBlocks(e)&&(t!==o&&(!n.canRemoveBlocks(e)||!n.canInsertBlocks(e,o))||i({type:"MOVE_BLOCKS_TO_POSITION",fromRootClientId:t,toRootClientId:o,clientIds:e,index:r}))};function e_e(e,t="",o="",r){return L9([e],t,o,r)}function t_e(e,t,o,r,n,i){return N9([e],t,o,r,n,i)}var N9=(e,t,o,r=!0,n=0,i)=>({select:s,dispatch:a})=>{n!==null&&typeof n=="object"&&(i=n,n=0,(0,Nl.default)("meta argument in wp.data.dispatch('core/block-editor')",{since:"5.8",hint:"The meta argument is now the 6th argument of the function"})),e=Ch(e);let c=[];for(let u of e)s.canInsertBlockType(u.name,o)&&c.push(u);c.length&&a({type:"INSERT_BLOCKS",blocks:c,index:t,rootClientId:o,time:Date.now(),updateSelection:r,initialPosition:r?n:null,meta:i})};function o_e(e,t,o={}){let{__unstableWithInserter:r,operation:n,nearestSide:i}=o;return{type:"SHOW_INSERTION_POINT",rootClientId:e,index:t,__unstableWithInserter:r,operation:n,nearestSide:i}}var r_e=()=>({select:e,dispatch:t})=>{e.isBlockInsertionPointVisible()&&t({type:"HIDE_INSERTION_POINT"})};function n_e(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}var i_e=()=>({select:e,dispatch:t})=>{t({type:"SYNCHRONIZE_TEMPLATE"});let o=e.getBlocks(),r=e.getTemplate(),n=(0,ke.synchronizeBlocksWithTemplate)(o,r);t.resetBlocks(n)},s_e=e=>({registry:t,select:o,dispatch:r})=>{let n=o.getSelectionStart(),i=o.getSelectionEnd();if(n.clientId===i.clientId)return;if(!n.attributeKey||!i.attributeKey||typeof n.offset>"u"||typeof i.offset>"u")return!1;let s=o.getBlockRootClientId(n.clientId),a=o.getBlockRootClientId(i.clientId);if(s!==a)return;let c=o.getBlockOrder(s),u=c.indexOf(n.clientId),d=c.indexOf(i.clientId),f,m;u>d?(f=i,m=n):(f=n,m=i);let h=e?m:f,p=o.getBlock(h.clientId),g=(0,ke.getBlockType)(p.name);if(!g.merge)return;let b=f,k=m,v=o.getBlock(b.clientId),y=o.getBlock(k.clientId),_=v.attributes[b.attributeKey],S=y.attributes[k.attributeKey],C=(0,gt.create)({html:_}),B=(0,gt.create)({html:S});C=(0,gt.remove)(C,b.offset,C.text.length),B=(0,gt.insert)(B,Ll,0,k.offset);let P=(0,ke.cloneBlock)(v,{[b.attributeKey]:(0,gt.toHTMLString)({value:C})}),T=(0,ke.cloneBlock)(y,{[k.attributeKey]:(0,gt.toHTMLString)({value:B})}),E=e?P:T,L=v.name===y.name?[E]:(0,ke.switchToBlockType)(E,g.name);if(!L||!L.length)return;let I;if(e){let J=L.pop();I=g.merge(J.attributes,T.attributes)}else{let J=L.shift();I=g.merge(P.attributes,J.attributes)}let R=ny(I),V=I[R],j=(0,gt.create)({html:V}),H=j.text.indexOf(Ll),F=(0,gt.remove)(j,H,H+1),U=(0,gt.toHTMLString)({value:F});I[R]=U;let G=o.getSelectedBlockClientIds(),W=[...e?L:[],{...p,attributes:{...p.attributes,...I}},...e?[]:L];t.batch(()=>{r.selectionChange(p.clientId,R,H,H),r.replaceBlocks(G,W,0,o.getSelectedBlocksInitialCaretPosition())})},a_e=(e=[])=>({registry:t,select:o,dispatch:r})=>{let n=o.getSelectionStart(),i=o.getSelectionEnd(),s=o.getBlockRootClientId(n.clientId),a=o.getBlockRootClientId(i.clientId);if(s!==a)return;let c=o.getBlockOrder(s),u=c.indexOf(n.clientId),d=c.indexOf(i.clientId),f,m;u>d?(f=i,m=n):(f=n,m=i);let h=f,p=m,g=o.getBlock(h.clientId),b=o.getBlock(p.clientId),k=(0,ke.getBlockType)(g.name),v=(0,ke.getBlockType)(b.name),y=typeof h.attributeKey=="string"?h.attributeKey:s5(k),_=typeof p.attributeKey=="string"?p.attributeKey:s5(v),S=o.getBlockAttributes(h.clientId);if(S?.metadata?.bindings?.[y]){if(e.length){let{createWarningNotice:oe}=t.dispatch(I9.store);oe((0,Iu.__)("Blocks can't be inserted into other blocks with bindings"),{type:"snackbar"});return}r.insertAfterBlock(h.clientId);return}if(!y||!_||typeof n.offset>"u"||typeof i.offset>"u")return;if(h.clientId===p.clientId&&y===_&&h.offset===p.offset){if(e.length){if((0,ke.isUnmodifiedDefaultBlock)(g,"content")){r.replaceBlocks([h.clientId],e,e.length-1,-1);return}}else if(!o.getBlockOrder(h.clientId).length){let oe=function(){let Q=(0,ke.getDefaultBlockName)();return o.canInsertBlockType(Q,s)?(0,ke.createBlock)(Q):(0,ke.createBlock)(o.getBlockName(h.clientId))};var B=oe;let re=S[y].length;if(h.offset===0&&re){r.insertBlocks([oe()],o.getBlockIndex(h.clientId),s,!1);return}if(h.offset===re){r.insertBlocks([oe()],o.getBlockIndex(h.clientId)+1,s);return}}}let P=g.attributes[y],T=b.attributes[_],E=(0,gt.create)({html:P}),L=(0,gt.create)({html:T});E=(0,gt.remove)(E,h.offset,E.text.length),L=(0,gt.remove)(L,0,p.offset);let I={...g,innerBlocks:g.clientId===b.clientId?[]:g.innerBlocks,attributes:{...g.attributes,[y]:(0,gt.toHTMLString)({value:E})}},R={...b,clientId:g.clientId===b.clientId?(0,ke.createBlock)(b.name).clientId:b.clientId,attributes:{...b.attributes,[_]:(0,gt.toHTMLString)({value:L})}},V=(0,ke.getDefaultBlockName)();if(g.clientId===b.clientId&&V&&R.name!==V&&o.canInsertBlockType(V,s)){let oe=(0,ke.switchToBlockType)(R,V);oe?.length===1&&(R=oe[0])}if(!e.length){r.replaceBlocks(o.getSelectedBlockClientIds(),[I,R]);return}let j,H=[],F=[...e],U=F.shift(),G=(0,ke.getBlockType)(I.name),W=G.merge&&U.name===G.name?[U]:(0,ke.switchToBlockType)(U,G.name);if(W?.length){let oe=W.shift();I={...I,attributes:{...I.attributes,...G.merge(I.attributes,oe.attributes)}},H.push(I),j={clientId:I.clientId,attributeKey:y,offset:(0,gt.create)({html:I.attributes[y]}).text.length},F.unshift(...W)}else(0,ke.isUnmodifiedBlock)(I)||H.push(I),H.push(U);let J=F.pop(),le=(0,ke.getBlockType)(R.name);if(F.length&&H.push(...F),J){let oe=le.merge&&le.name===J.name?[J]:(0,ke.switchToBlockType)(J,le.name);if(oe?.length){let re=oe.pop();H.push({...R,attributes:{...R.attributes,...le.merge(re.attributes,R.attributes)}}),H.push(...oe),j={clientId:R.clientId,attributeKey:_,offset:(0,gt.create)({html:re.attributes[_]}).text.length}}else H.push(J),(0,ke.isUnmodifiedBlock)(R)||H.push(R)}else(0,ke.isUnmodifiedBlock)(R)||H.push(R);t.batch(()=>{r.replaceBlocks(o.getSelectedBlockClientIds(),H,H.length-1,0),j&&r.selectionChange(j.clientId,j.attributeKey,j.offset,j.offset)})},l_e=()=>({select:e,dispatch:t})=>{let o=e.getSelectionStart(),r=e.getSelectionEnd();t.selectionChange({start:{clientId:o.clientId},end:{clientId:r.clientId}})},c_e=(e,t)=>({registry:o,select:r,dispatch:n})=>{let i=e,s=t,a=r.getBlock(i),c=(0,ke.getBlockType)(a.name);if(!c||r.getBlockEditingMode(i)==="disabled"||r.getBlockEditingMode(s)==="disabled")return;let u=r.getBlock(s);if(!c.merge&&(0,ke.getBlockSupport)(a.name,"__experimentalOnMerge")){let S=(0,ke.switchToBlockType)(u,c.name);if(S?.length!==1){n.selectBlock(a.clientId);return}let[C]=S;if(C.innerBlocks.length<1){n.selectBlock(a.clientId);return}o.batch(()=>{n.insertBlocks(C.innerBlocks,void 0,i),n.removeBlock(s),n.selectBlock(C.innerBlocks[0].clientId);let B=r.getNextBlockClientId(i);if(B&&r.getBlockName(i)===r.getBlockName(B)){let P=r.getBlockAttributes(i),T=r.getBlockAttributes(B);Object.keys(P).every(E=>P[E]===T[E])&&(n.moveBlocksToPosition(r.getBlockOrder(B),B,i),n.removeBlock(B,!1))}});return}if((0,ke.isUnmodifiedDefaultBlock)(a)){n.removeBlock(i,r.isBlockSelected(i));return}if((0,ke.isUnmodifiedDefaultBlock)(u)){n.removeBlock(s,r.isBlockSelected(s));return}if(!c.merge){(0,ke.isUnmodifiedBlock)(u,"content")?n.removeBlock(s,r.isBlockSelected(s)):n.selectBlock(a.clientId);return}let d=(0,ke.getBlockType)(u.name),{clientId:f,attributeKey:m,offset:h}=r.getSelectionStart(),g=(f===i?c:d).attributes[m],b=(f===i||f===s)&&m!==void 0&&h!==void 0&&!!g;g||(typeof m=="number"?window.console.error(`RichText needs an identifier prop that is the block attribute key of the attribute it controls. Its type is expected to be a string, but was ${typeof m}`):window.console.error("The RichText identifier prop does not match any attributes defined by the block."));let k=(0,ke.cloneBlock)(a),v=(0,ke.cloneBlock)(u);if(b){let S=f===i?k:v,C=S.attributes[m],B=(0,gt.insert)((0,gt.create)({html:C}),Ll,h,h);S.attributes[m]=(0,gt.toHTMLString)({value:B})}let y=a.name===u.name?[v]:(0,ke.switchToBlockType)(v,a.name);if(!y||!y.length)return;let _=c.merge(k.attributes,y[0].attributes);if(b){let S=ny(_),C=_[S],B=(0,gt.create)({html:C}),P=B.text.indexOf(Ll),T=(0,gt.remove)(B,P,P+1),E=(0,gt.toHTMLString)({value:T});_[S]=E,n.selectionChange(a.clientId,S,P,P)}n.replaceBlocks([a.clientId,u.clientId],[{...a,attributes:{...a.attributes,..._}},...y.slice(1)],0)},M9=(e,t=!0)=>n5(e,t);function u_e(e,t){return M9([e],t)}function d_e(e,t,o=!1,r=0){return{type:"REPLACE_INNER_BLOCKS",rootClientId:e,blocks:t,updateSelection:o,initialPosition:o?r:null,time:Date.now()}}function f_e(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function m_e(){return{type:"START_TYPING"}}function p_e(){return{type:"STOP_TYPING"}}function h_e(e=[]){return{type:"START_DRAGGING_BLOCKS",clientIds:e}}function g_e(){return{type:"STOP_DRAGGING_BLOCKS"}}function b_e(){return(0,Nl.default)('wp.data.dispatch( "core/block-editor" ).enterFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function v_e(){return(0,Nl.default)('wp.data.dispatch( "core/block-editor" ).exitFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function k_e(e,t,o,r){return typeof e=="string"?{type:"SELECTION_CHANGE",clientId:e,attributeKey:t,startOffset:o,endOffset:r}:{type:"SELECTION_CHANGE",...e}}var y_e=(e,t,o)=>({dispatch:r})=>{let n=(0,ke.getDefaultBlockName)();if(!n)return;let i=(0,ke.createBlock)(n,e);return r.insertBlock(i,o,t)};function __e(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function S_e(e){return r5(e,{stripExperimentalSettings:!0})}function x_e(){return(0,Nl.default)('wp.data.dispatch( "core/block-editor" ).__unstableSaveReusableBlock',{since:"7.1"}),{type:"DO_NOTHING"}}function w_e(){return{type:"MARK_LAST_CHANGE_AS_PERSISTENT"}}function C_e(){return{type:"MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"}}var B_e=()=>({dispatch:e})=>{e({type:"MARK_AUTOMATIC_CHANGE"});let{requestIdleCallback:t=o=>setTimeout(o,100)}=window;t(()=>{e({type:"MARK_AUTOMATIC_CHANGE_FINAL"})})},E_e=e=>({registry:t})=>{t.dispatch(P9.store).set("core","editorTool",e),e==="navigation"?(0,pC.speak)((0,Iu.__)("You are currently in Write mode.")):e==="edit"&&(0,pC.speak)((0,Iu.__)("You are currently in Design mode."))};function T_e(){return(0,Nl.default)('wp.data.dispatch( "core/block-editor" ).setBlockMovingClientId',{since:"6.7",hint:"Block moving mode feature has been removed"}),{type:"DO_NOTHING"}}var I_e=(e,t=!0)=>({select:o,dispatch:r})=>{if(!e||!e.length)return;let n=o.getBlocksByClientId(e);if(n.some(d=>!d)||n.map(d=>d.name).some(d=>!(0,ke.hasBlockSupport)(d,"multiple",!0)))return;let s=o.getBlockRootClientId(e[0]),a=Ch(e),c=o.getBlockIndex(a[a.length-1]),u=n.map(d=>(0,ke.__experimentalCloneSanitizedBlock)(d));return r.insertBlocks(u,c+1,s,t),u.length>1&&t&&r.multiSelect(u[0].clientId,u[u.length-1].clientId),u.map(d=>d.clientId)},P_e=e=>({select:t,dispatch:o})=>{if(!e)return;let r=t.getBlockRootClientId(e),n=t.getBlockIndex(e),i=r?t.getDirectInsertBlock(r):null;if(!i)return o.insertDefaultBlock({},r,n);let s={};if(i.attributesToCopy){let c=t.getBlockAttributes(e);i.attributesToCopy.forEach(u=>{c[u]&&(s[u]=c[u])})}let a=(0,ke.createBlock)(i.name,{...i.attributes,...s});return o.insertBlock(a,n,r)},R_e=e=>({select:t,dispatch:o})=>{if(!e)return;let r=t.getBlockRootClientId(e),n=t.getBlockIndex(e),i=r?t.getDirectInsertBlock(r):null;if(!i)return o.insertDefaultBlock({},r,n+1);let s={};if(i.attributesToCopy){let c=t.getBlockAttributes(e);i.attributesToCopy.forEach(u=>{c[u]&&(s[u]=c[u])})}let a=(0,ke.createBlock)(i.name,{...i.attributes,...s});return o.insertBlock(a,n+1,r)};function a5(e,t){return{type:"TOGGLE_BLOCK_HIGHLIGHT",clientId:e,isHighlighted:t}}var O_e=(e,t=150)=>async({dispatch:o})=>{o(a5(e,!0)),await new Promise(r=>setTimeout(r,t)),o(a5(e,!1))};function A_e(e,t){return{type:"SET_HAS_CONTROLLED_INNER_BLOCKS",hasControlledInnerBlocks:t,clientId:e}}function L_e(e){return{type:"SET_BLOCK_VISIBILITY",updates:e}}function N_e(e){return(0,Nl.default)("wp.data.dispatch( 'core/block-editor' ).__unstableSetTemporarilyEditingAsBlocks",{since:"7.0"}),i5(e)}var M_e=e=>({select:t,dispatch:o})=>{if(!e||typeof e!="object"){console.error("Category should be an `InserterMediaCategory` object.");return}if(!e.name){console.error("Category should have a `name` that should be unique among all media categories.");return}if(!e.labels?.name){console.error("Category should have a `labels.name`.");return}if(!["image","audio","video"].includes(e.mediaType)){console.error("Category should have `mediaType` property that is one of `image|audio|video`.");return}if(!e.fetch||typeof e.fetch!="function"){console.error("Category should have a `fetch` function defined with the following signature `(InserterMediaRequest) => Promise<InserterMediaItem[]>`.");return}let r=t.getRegisteredInserterMediaCategories();if(r.some(({name:n})=>n===e.name)){console.error(`A category is already registered with the same name: "${e.name}".`);return}if(r.some(({labels:{name:n}={}})=>n===e.labels?.name)){console.error(`A category is already registered with the same labels.name: "${e.labels.name}".`);return}o({type:"REGISTER_INSERTER_MEDIA_CATEGORY",category:{...e,isExternalResource:!0}})};function D_e(e="",t){return{type:"SET_BLOCK_EDITING_MODE",clientId:e,mode:t}}function V_e(e=""){return{type:"UNSET_BLOCK_EDITING_MODE",clientId:e}}function F_e(e){return{type:"SET_OPEN_LIST_VIEW_PANEL",clientId:e}}function z_e(){return{type:"SET_ALL_LIST_VIEW_PANELS_OPEN"}}function j_e(e,t){return{type:"TOGGLE_LIST_VIEW_PANEL",clientId:e,isOpen:t}}function U_e(){return{type:"INCREMENT_LIST_VIEW_EXPAND_REVISION"}}var Bh={reducer:L8,selectors:o5,actions:l5},x=(0,hC.createReduxStore)(Xt,{...Bh,persist:["preferences"]}),D9=(0,hC.registerStore)(Xt,{...Bh,persist:["preferences"]});M(D9).registerPrivateActions(mC);M(D9).registerPrivateSelectors(aC);M(x).registerPrivateActions(mC);M(x).registerPrivateSelectors(aC);var Eh=l(A(),1),V9=l(N(),1);var Os=l(w(),1);function H_e({className:e,actions:t,children:o,secondaryActions:r}){return(0,Os.jsx)("div",{style:{display:"contents",all:"initial"},children:(0,Os.jsx)("div",{className:D(e,"block-editor-warning"),children:(0,Os.jsxs)("div",{className:"block-editor-warning__contents",children:[(0,Os.jsx)("p",{className:"block-editor-warning__message",children:o}),(t?.length>0||r)&&(0,Os.jsxs)("div",{className:"block-editor-warning__actions",children:[t?.length>0&&t.map((n,i)=>(0,Os.jsx)("span",{className:"block-editor-warning__action",children:n},i)),r&&(0,Os.jsx)(Eh.DropdownMenu,{className:"block-editor-warning__secondary",icon:Is,label:(0,V9.__)("More options"),popoverProps:{placement:"bottom-end",className:"block-editor-warning__dropdown"},noIcons:!0,children:()=>(0,Os.jsx)(Eh.MenuGroup,{children:r.map((n,i)=>(0,Os.jsx)(Eh.MenuItem,{onClick:n.onClick,children:n.title},i))})})]})]})})})}var Pu=H_e;var Th=l(w(),1);function j9({originalBlockClientId:e,name:t,onReplace:o}){let{selectBlock:r}=(0,z9.useDispatch)(x),n=(0,F9.getBlockType)(t);return(0,Th.jsxs)(Pu,{actions:[(0,Th.jsx)(c5.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>r(e),children:(0,gC.__)("Find original")},"find-original"),(0,Th.jsx)(c5.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>o([]),children:(0,gC.__)("Remove")},"remove")],children:[(0,Th.jsxs)("strong",{children:[n?.title,": "]}),(0,gC.__)("This block can only be used once.")]})}var iy=l(w(),1);function kC({mayDisplayControls:e,mayDisplayParentControls:t,mayDisplayPatternEditingControls:o,blockEditingMode:r,isPreviewMode:n,...i}){let{name:s,isSelected:a,clientId:c,attributes:u={},__unstableLayoutClassNames:d}=i,{layout:f=null,metadata:m={}}=u,{bindings:h}=m,p=(0,bC.hasBlockSupport)(s,"layout",!1)||(0,bC.hasBlockSupport)(s,"__experimentalLayout",!1),b=!!Pe()[fk]||(0,bC.hasBlockSupport)(s,"listView")||s==="core/navigation",{originalBlockClientId:k}=(0,vC.useContext)(br);return(0,iy.jsxs)(K0,{value:(0,vC.useMemo)(()=>({name:s,isSelected:a,clientId:c,layout:p?f:null,__unstableLayoutClassNames:d,[Es]:e,[nh]:t,[lu]:o&&r!=="disabled",[W0]:r,[ih]:h,[$0]:n,[fk]:b}),[s,a,c,p,f,d,e,t,o,r,h,n,b]),children:[(0,iy.jsx)(y8,{...i}),k&&(0,iy.jsx)(j9,{originalBlockClientId:k,name:s,onReplace:i.onReplace})]})}function pe(...e){let{clientId:t=null}=Pe();return(0,U9.useSelect)(o=>M(o(x)).getBlockSettings(t,...e),[t,...e])}function G9(e){(0,H9.default)("wp.blockEditor.useSetting",{since:"6.5",alternative:"wp.blockEditor.useSettings",note:"The new useSettings function can retrieve multiple settings at once, with better performance."});let[t]=pe(e);return t}var _C=l(w(),1),{kebabCase:G_e}=M($9.privateApis),W9=([e,...t])=>e.toUpperCase()+t.join(""),W_e=e=>(0,fm.createHigherOrderComponent)(t=>function(r){return(0,_C.jsx)(t,{...r,colors:e})},"withCustomColorPalette"),$_e=()=>(0,fm.createHigherOrderComponent)(e=>function(o){let[r,n,i]=pe("color.palette.custom","color.palette.theme","color.palette.default"),s=(0,yC.useMemo)(()=>[...r||[],...n||[],...i||[]],[r,n,i]);return(0,_C.jsx)(e,{...o,colors:s})},"withEditorColorPalette");function K9(e,t){let o=e.reduce((r,n)=>({...r,...typeof n=="string"?{[n]:G_e(n)}:n}),{});return(0,fm.compose)([t,r=>class extends yC.Component{constructor(i){super(i),this.setters=this.createSetters(),this.colorUtils={getMostReadableColor:this.getMostReadableColor.bind(this)},this.state={}}getMostReadableColor(i){let{colors:s}=this.props;return u8(s,i)}createSetters(){return Object.keys(o).reduce((i,s)=>{let a=W9(s),c=`custom${a}`;return i[`set${a}`]=this.createSetColor(s,c),i},{})}createSetColor(i,s){return a=>{let c=q0(this.props.colors,a);this.props.setAttributes({[i]:c&&c.slug?c.slug:void 0,[s]:c&&c.slug?void 0:a})}}static getDerivedStateFromProps({attributes:i,colors:s},a){return Object.entries(o).reduce((c,[u,d])=>{let f=wa(s,i[u],i[`custom${W9(u)}`]),m=a[u];return m?.color===f.color&&m?c[u]=m:c[u]={...f,class:Pi(d,f.slug)},c},{})}render(){return(0,_C.jsx)(r,{...this.props,colors:void 0,...this.state,...this.setters,colorUtils:this.colorUtils})}}])}function Y9(e){return(...t)=>{let o=W_e(e);return(0,fm.createHigherOrderComponent)(K9(t,o),"withCustomColors")}}function q9(...e){let t=$_e();return(0,fm.createHigherOrderComponent)(K9(e,t),"withColors")}var SC=l(O(),1),xC=l(z(),1);function Ih(e){if(e)return`has-${e}-gradient-background`}function wC(e,t){let o=e?.find(r=>r.slug===t);return o&&o.gradient}function Z9(e,t){return e?.find(r=>r.gradient===t)}function X9(e,t){let o=Z9(e,t);return o&&o.slug}function K_e({gradientAttribute:e="gradient",customGradientAttribute:t="customGradient"}={}){let{clientId:o}=Pe(),[r,n,i]=pe("color.gradients.custom","color.gradients.theme","color.gradients.default"),s=(0,SC.useMemo)(()=>[...r||[],...n||[],...i||[]],[r,n,i]),{gradient:a,customGradient:c}=(0,xC.useSelect)(h=>{let{getBlockAttributes:p}=h(x),g=p(o)||{};return{customGradient:g[t],gradient:g[e]}},[o,e,t]),{updateBlockAttributes:u}=(0,xC.useDispatch)(x),d=(0,SC.useCallback)(h=>{let p=X9(s,h);if(p){u(o,{[e]:p,[t]:void 0});return}u(o,{[e]:void 0,[t]:h})},[s,o,u]),f=Ih(a),m;return a?m=wC(s,a):m=c,{gradientClass:f,gradientValue:m,setGradient:d}}var Q9=l(A(),1);var{kebabCase:Y_e}=M(Q9.privateApis),Ph=(e,t,o)=>{if(t){let r=e?.find(({slug:n})=>n===t);if(r)return r}return{size:o}};function u5(e,t){let o=e?.find(({size:r})=>r===t);return o||{size:t}}function Ru(e){if(e)return`has-${Y_e(e)}-font-size`}var q_e="1600px",Z_e="320px",X_e=1,Q_e=.25,J_e=.75,eSe="14px";function J9({minimumFontSize:e,maximumFontSize:t,fontSize:o,minimumViewportWidth:r=Z_e,maximumViewportWidth:n=q_e,scaleFactor:i=X_e,minimumFontSizeLimit:s}){if(s=Ou(s)?s:eSe,o){let y=Ou(o);if(!y?.unit)return null;let _=Ou(s,{coerceTo:y.unit});if(_?.value&&!e&&!t&&y?.value<=_?.value)return null;if(t||(t=`${y.value}${y.unit}`),!e){let S=y.unit==="px"?y.value:y.value*16,C=Math.min(Math.max(1-.075*Math.log2(S),Q_e),J_e),B=sy(y.value*C,3);_?.value&&B<_?.value?e=`${_.value}${_.unit}`:e=`${B}${y.unit}`}}let a=Ou(e),c=a?.unit||"rem",u=Ou(t,{coerceTo:c});if(!a||!u)return null;let d=Ou(e,{coerceTo:"rem"}),f=Ou(n,{coerceTo:c}),m=Ou(r,{coerceTo:c});if(!f||!m||!d)return null;let h=f.value-m.value;if(!h)return null;let p=sy(m.value/100,3),g=sy(p,3)+c,b=100*((u.value-a.value)/h),k=sy((b||1)*i,3),v=`${d.value}${d.unit} + ((1vw - ${g}) * ${k})`;return`clamp(${e}, ${v}, ${t})`}function Ou(e,t={}){if(typeof e!="string"&&typeof e!="number")return null;isFinite(e)&&(e=`${e}px`);let{coerceTo:o,rootSizeValue:r,acceptableUnits:n}={coerceTo:"",rootSizeValue:16,acceptableUnits:["rem","px","em"],...t},i=n?.join("|"),s=new RegExp(`^(\\d*\\.?\\d+)(${i}){1,1}$`),a=e.match(s);if(!a||a.length<3)return null;let[,c,u]=a,d=parseFloat(c);return o==="px"&&(u==="em"||u==="rem")&&(d=d*r,u=o),u==="px"&&(o==="em"||o==="rem")&&(d=d/r,u=o),(o==="em"||o==="rem")&&(u==="em"||u==="rem")&&(u=o),{value:sy(d,3),unit:u}}function sy(e,t=3){let o=Math.pow(10,t);return Number.isFinite(e)?parseFloat(Math.round(e*o)/o):void 0}var e7=l(A(),1);var t7=l(w(),1);function tSe(e){let[t,o]=pe("typography.fontSizes","typography.customFontSize");return(0,t7.jsx)(e7.FontSizePicker,{...e,fontSizes:t,disableCustomFontSizes:!o,__next40pxDefaultSize:!0})}var d5=tSe;var ay=l(X(),1),r7=l(O(),1);var f5=l(w(),1),oSe=[],o7=([e,...t])=>e.toUpperCase()+t.join(""),n7=(...e)=>{let t=e.reduce((o,r)=>(o[r]=`custom${o7(r)}`,o),{});return(0,ay.createHigherOrderComponent)((0,ay.compose)([(0,ay.createHigherOrderComponent)(o=>function(n){let[i]=pe("typography.fontSizes");return(0,f5.jsx)(o,{...n,fontSizes:i||oSe})},"withFontSizes"),o=>class extends r7.Component{constructor(n){super(n),this.setters=this.createSetters(),this.state={}}createSetters(){return Object.entries(t).reduce((n,[i,s])=>{let a=o7(i);return n[`set${a}`]=this.createSetFontSize(i,s),n},{})}createSetFontSize(n,i){return s=>{let a=this.props.fontSizes?.find(({size:c})=>c===Number(s));this.props.setAttributes({[n]:a&&a.slug?a.slug:void 0,[i]:a&&a.slug?void 0:s})}}static getDerivedStateFromProps({attributes:n,fontSizes:i},s){let a=(u,d)=>s[d]?n[d]?n[d]!==s[d].slug:s[d].size!==n[u]:!0;if(!Object.values(t).some(a))return null;let c=Object.entries(t).filter(([u,d])=>a(d,u)).reduce((u,[d,f])=>{let m=n[d],h=Ph(i,m,n[f]);return u[d]={...h,class:Ru(m)},u},{});return{...s,...c}}render(){return(0,f5.jsx)(o,{...this.props,fontSizes:void 0,...this.state,...this.setters})}}]),"withFontSizes")};var Au=l(N(),1),CC=l(A(),1);var i7=l(w(),1),rSe=[{icon:gu,title:(0,Au.__)("Align text left"),align:"left"},{icon:$f,title:(0,Au.__)("Align text center"),align:"center"},{icon:bu,title:(0,Au.__)("Align text right"),align:"right"}],nSe={placement:"bottom-start"};function iSe({value:e,onChange:t,alignmentControls:o=rSe,label:r=(0,Au.__)("Align text"),description:n=(0,Au.__)("Change text alignment"),isCollapsed:i=!0,isToolbar:s}){function a(m){return()=>t(e===m?void 0:m)}let c=o.find(m=>m.align===e);function u(){return c?c.icon:(0,Au.isRTL)()?bu:gu}let d=s?CC.ToolbarGroup:CC.ToolbarDropdownMenu,f=s?{isCollapsed:i}:{toggleProps:{description:n},popoverProps:nSe};return(0,i7.jsx)(d,{icon:u(),label:r,controls:o.map(m=>{let{align:h}=m;return{...m,isActive:e===h,role:i?"menuitemradio":void 0,onClick:a(h)}}),...f})}var m5=iSe;var p5=l(w(),1),BC=e=>(0,p5.jsx)(m5,{...e,isToolbar:!1}),s7=e=>(0,p5.jsx)(m5,{...e,isToolbar:!0});var AC=l(pt(),1),LC=l(A(),1),_7=l(O(),1),NC=l(Y(),1);var k7=l(z(),1),Nu=l(Y(),1),k5=l(O(),1);var h7=l(u7(),1);var h5=function(e,t){return h5=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,r){o.__proto__=r}||function(o,r){for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(o[n]=r[n])},h5(e,t)};function d7(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");h5(e,t);function o(){this.constructor=e}e.prototype=t===null?Object.create(t):(o.prototype=t.prototype,new o)}var Wo=function(){return Wo=Object.assign||function(t){for(var o,r=1,n=arguments.length;r<n;r++){o=arguments[r];for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(t[i]=o[i])}return t},Wo.apply(this,arguments)};function f7(e){return e.toLowerCase()}var uSe=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],dSe=/[^A-Z0-9]+/gi;function p7(e,t){t===void 0&&(t={});for(var o=t.splitRegexp,r=o===void 0?uSe:o,n=t.stripRegexp,i=n===void 0?dSe:n,s=t.transform,a=s===void 0?f7:s,c=t.delimiter,u=c===void 0?" ":c,d=m7(m7(e,r,"$1\0$2"),i,"\0"),f=0,m=d.length;d.charAt(f)==="\0";)f++;for(;d.charAt(m-1)==="\0";)m--;return d.slice(f,m).split("\0").map(a).join(u)}function m7(e,t,o){return t instanceof RegExp?e.replace(t,o):t.reduce(function(r,n){return r.replace(n,o)},e)}var fSe=e=>e.name||"",mSe=e=>e.title,pSe=e=>e.description||"",hSe=e=>e.keywords||[],gSe=e=>e.category,bSe=()=>null,vSe=[/([\p{Ll}\p{Lo}\p{N}])([\p{Lu}\p{Lt}])/gu,/([\p{Lu}\p{Lt}])([\p{Lu}\p{Lt}][\p{Ll}\p{Lo}])/gu],kSe=new RegExp("(\\p{C}|\\p{P}|\\p{S})+","giu"),g5=new Map,b5=new Map;function TC(e=""){if(g5.has(e))return g5.get(e);let t=p7(e,{splitRegexp:vSe,stripRegexp:kSe}).split(" ").filter(Boolean);return g5.set(e,t),t}function ly(e=""){if(b5.has(e))return b5.get(e);let t=(0,h7.default)(e);return t=t.replace(/^\//,""),t=t.toLowerCase(),b5.set(e,t),t}var cy=(e="")=>TC(ly(e)),ySe=(e,t)=>e.filter(o=>!cy(t).some(r=>r.includes(o))),IC=(e,t,o,r)=>cy(r).length===0?e:uy(e,r,{getCategory:s=>t.find(({slug:a})=>a===s.category)?.title,getCollection:s=>o[s.name.split("/")[0]]?.title}),uy=(e=[],t="",o={})=>{if(cy(t).length===0)return e;let n=e.map(i=>[i,_Se(i,t,o)]).filter(([,i])=>i>0);return n.sort(([,i],[,s])=>s-i),n.map(([i])=>i)};function _Se(e,t,o={}){let{getName:r=fSe,getTitle:n=mSe,getDescription:i=pSe,getKeywords:s=hSe,getCategory:a=gSe,getCollection:c=bSe}=o,u=r(e),d=n(e),f=i(e),m=s(e),h=a(e),p=c(e),g=ly(t),b=ly(d),k=0;if(g===b)k+=30;else if(b.startsWith(g))k+=20;else{let v=[u,d,f,...m,h,p].join(" "),y=TC(g);ySe(y,v).length===0&&(k+=10)}if(k!==0&&u.startsWith("core/")){let v=u!==e.id;k+=v?1:2}return k}var Ea=l(Y(),1),Rh=l(z(),1),PC=l(O(),1),g7=l(Xn(),1),RC=l(N(),1);var SSe=(e,t,o)=>{let r=(0,PC.useMemo)(()=>({[Eu]:!!o}),[o]),[n]=(0,Rh.useSelect)(d=>[d(x).getInserterItems(e,r)],[e,r]),{getClosestAllowedInsertionPoint:i}=M((0,Rh.useSelect)(x)),{createErrorNotice:s}=(0,Rh.useDispatch)(g7.store),[a,c]=(0,Rh.useSelect)(d=>{let{getCategories:f,getCollections:m}=d(Ea.store);return[f(),m()]},[]),u=(0,PC.useCallback)(({name:d,initialAttributes:f,innerBlocks:m,syncStatus:h,content:p},g)=>{let b=i(d,e);if(b===null){let v=(0,Ea.getBlockType)(d)?.title??d;s((0,RC.sprintf)((0,RC.__)(`Block "%s" can't be inserted.`),v),{type:"snackbar",id:"inserter-notice"});return}let k=h==="unsynced"?(0,Ea.parse)(p,{__unstableSkipMigrationLogs:!0}):(0,Ea.createBlock)(d,f,(0,Ea.createBlocksFromInnerBlocksTemplate)(m));t(k,void 0,g,b)},[i,e,t,s]);return[n,a,c,u]},Lu=SSe;var b7=l(A(),1);var v7=l(O(),1),v5=l(w(),1);function xSe({icon:e,showColors:t=!1,className:o,context:r}){e?.src==="block-default"&&(e={src:xk});let n=(0,v5.jsx)(b7.Icon,{icon:e&&e.src?e.src:e,context:r}),i=t?{backgroundColor:e&&e.background,color:e&&e.foreground}:{};return(0,v5.jsx)("span",{style:i,className:D("block-editor-block-icon",o,{"has-colors":t}),children:n})}var Ae=(0,v7.memo)(xSe);var OC=(e,t)=>(t&&e.sort(({id:o},{id:r})=>{let n=t.indexOf(o),i=t.indexOf(r);return n<0&&(n=t.length),i<0&&(i=t.length),n-i}),e);var Oh=l(w(),1),wSe=()=>{},CSe=9;function BSe(){return{name:"blocks",className:"block-editor-autocompleters__block",triggerPrefix:"/",useItems(e){let{rootClientId:t,selectedBlockId:o,prioritizedBlocks:r}=(0,k7.useSelect)(u=>{let{getSelectedBlockClientId:d,getBlock:f,getBlockListSettings:m,getBlockRootClientId:h}=u(x),{getActiveBlockVariation:p}=u(Nu.store),g=d(),{name:b,attributes:k}=f(g),v=p(b,k),y=h(g);return{selectedBlockId:v?`${b}/${v.name}`:b,rootClientId:y,prioritizedBlocks:m(y)?.prioritizedInserterBlocks}},[]),[n,i,s]=Lu(t,wSe,!0),a=(0,k5.useMemo)(()=>(e.trim()?IC(n,i,s,e):OC(Ba(n,"frecency","desc"),r)).filter(d=>d.id!==o).slice(0,CSe),[e,o,n,i,s,r]);return[(0,k5.useMemo)(()=>a.map(u=>{let{title:d,icon:f,isDisabled:m}=u;return{key:`block-${u.id}`,value:u,label:(0,Oh.jsxs)(Oh.Fragment,{children:[(0,Oh.jsx)(Ae,{icon:f,showColors:!0},"icon"),d]}),isDisabled:m}}),[a])]},allowContext(e,t){return!(/\S/.test(e)||/\S/.test(t))},getOptionCompletion(e){let{name:t,initialAttributes:o,innerBlocks:r,syncStatus:n,blocks:i}=e;return{action:"replace",value:n==="unsynced"?(i??[]).map(s=>(0,Nu.cloneBlock)(s)):(0,Nu.createBlock)(t,o,(0,Nu.createBlocksFromInnerBlocksTemplate)(r))}}}}var y7=BSe();var S7=l(w(),1),ESe=[];function x7({completers:e=ESe}){let{name:t}=Pe();return(0,_7.useMemo)(()=>{let o=[...e];return(t===(0,NC.getDefaultBlockName)()||(0,NC.getBlockSupport)(t,"__experimentalSlashInserter",!1))&&(o=[...o,y7]),(0,AC.hasFilter)("editor.Autocomplete.completers")&&(o===e&&(o=o.map(r=>({...r}))),o=(0,AC.applyFilters)("editor.Autocomplete.completers",o,t)),o},[e,t])}function w7(e){return(0,LC.__unstableUseAutocompleteProps)({...e,completers:x7(e)})}function TSe(e){return(0,S7.jsx)(LC.Autocomplete,{...e,completers:x7(e)})}var C7=TSe;var w5=l(N(),1),Fu=l(A(),1);var W7=l(z(),1);var jC=l(O(),1);var Vi=l(N(),1);var _n=l(A(),1);var Ah=l(N(),1);var Qn={default:{name:"default",slug:"flow",className:"is-layout-flow",baseStyles:[{selector:" > .alignleft",rules:{float:"left","margin-inline-start":"0","margin-inline-end":"2em"}},{selector:" > .alignright",rules:{float:"right","margin-inline-start":"2em","margin-inline-end":"0"}},{selector:" > .aligncenter",rules:{"margin-left":"auto !important","margin-right":"auto !important"}}],spacingStyles:[{selector:" > :first-child",rules:{"margin-block-start":"0"}},{selector:" > :last-child",rules:{"margin-block-end":"0"}},{selector:" > *",rules:{"margin-block-start":null,"margin-block-end":"0"}}]},constrained:{name:"constrained",slug:"constrained",className:"is-layout-constrained",baseStyles:[{selector:" > .alignleft",rules:{float:"left","margin-inline-start":"0","margin-inline-end":"2em"}},{selector:" > .alignright",rules:{float:"right","margin-inline-start":"2em","margin-inline-end":"0"}},{selector:" > .aligncenter",rules:{"margin-left":"auto !important","margin-right":"auto !important"}},{selector:" > :where(:not(.alignleft):not(.alignright):not(.alignfull))",rules:{"max-width":"var(--wp--style--global--content-size)","margin-left":"auto !important","margin-right":"auto !important"}},{selector:" > .alignwide",rules:{"max-width":"var(--wp--style--global--wide-size)"}}],spacingStyles:[{selector:" > :first-child",rules:{"margin-block-start":"0"}},{selector:" > :last-child",rules:{"margin-block-end":"0"}},{selector:" > *",rules:{"margin-block-start":null,"margin-block-end":"0"}}]},flex:{name:"flex",slug:"flex",className:"is-layout-flex",displayMode:"flex",baseStyles:[{selector:"",rules:{"flex-wrap":"wrap","align-items":"center"}},{selector:" > :is(*, div)",rules:{margin:"0"}}],spacingStyles:[{selector:"",rules:{gap:null}}]},grid:{name:"grid",slug:"grid",className:"is-layout-grid",displayMode:"grid",baseStyles:[{selector:" > :is(*, div)",rules:{margin:"0"}}],spacingStyles:[{selector:"",rules:{gap:null}}]}};function Jn(e,t=""){return e.split(",").map(o=>`${o}${t?` ${t}`:""}`).join(",")}function Mu(e,t=Qn,o,r){let n="";return t?.[o]?.spacingStyles?.length&&r&&t[o].spacingStyles.forEach(i=>{n+=`${Jn(e,i.selector.trim())} { `,n+=Object.entries(i.rules).map(([s,a])=>`${s}: ${a||r}`).join("; "),n+="; }"}),n}function MC(e){let{contentSize:t,wideSize:o,type:r="default"}=e,n={},i=/^(?!0)\d+(px|em|rem|vw|vh|%|svw|lvw|dvw|svh|lvh|dvh|vi|svi|lvi|dvi|vb|svb|lvb|dvb|vmin|svmin|lvmin|dvmin|vmax|svmax|lvmax|dvmax)?$/i;return i.test(t)&&r==="constrained"&&(n.none=(0,Ah.sprintf)((0,Ah.__)("Max %s wide"),t)),i.test(o)&&(n.wide=(0,Ah.sprintf)((0,Ah.__)("Max %s wide"),o)),n}var As=l(N(),1);var B7=8,Du=["top","bottom","left","right"],E7={top:void 0,right:void 0,bottom:void 0,left:void 0},DC={custom:Uw,axial:Uw,horizontal:lM,vertical:fM,top:dM,right:uM,bottom:aM,left:cM},Ta={default:(0,As.__)("Spacing control"),top:(0,As.__)("Top"),bottom:(0,As.__)("Bottom"),left:(0,As.__)("Left"),right:(0,As.__)("Right"),mixed:(0,As.__)("Mixed"),vertical:(0,As.__)("Vertical"),horizontal:(0,As.__)("Horizontal"),axial:(0,As.__)("Horizontal & vertical"),custom:(0,As.__)("Custom")},Ml={axial:"axial",top:"top",right:"right",bottom:"bottom",left:"left",custom:"custom"};function VC(e){return e?.includes?e==="0"||e.includes("var:preset|spacing|"):!1}function T7(e,t){if(!VC(e))return e;let o=ISe(e);return t.find(n=>String(n.slug)===o)?.size}function Lh(e,t){if(!e||VC(e)||e==="0")return e;let o=t.find(r=>String(r.size)===String(e));return o?.slug?`var:preset|spacing|${o.slug}`:e}function Ls(e){if(!e)return;let t=e.match(/var:preset\|spacing\|(.+)/);return t?`var(--wp--preset--spacing--${t[1]})`:e}function ISe(e){if(!e)return;if(e==="0"||e==="default")return e;let t=e.match(/var:preset\|spacing\|(.+)/);return t?t[1]:void 0}function y5(e,t){if(!e||!e.length)return!1;let o=e.includes("horizontal")||e.includes("left")&&e.includes("right"),r=e.includes("vertical")||e.includes("top")&&e.includes("bottom");return t==="horizontal"?o:t==="vertical"?r:o||r}function PSe(e=[]){let t={top:0,right:0,bottom:0,left:0};return e.forEach(o=>t[o]+=1),(t.top+t.bottom)%2===0&&(t.left+t.right)%2===0}function I7(e={},t){let{top:o,right:r,bottom:n,left:i}=e,s=[o,r,n,i].filter(Boolean),a=o===n&&i===r&&(!!o||!!i),c=!s.length&&PSe(t),u=t?.includes("horizontal")&&t?.includes("vertical")&&t?.length===2;if(y5(t)&&(a||c))return Ml.axial;if(u&&s.length===1){let d;return Object.entries(e).some(([f,m])=>(d=f,m!==void 0)),d}return t?.length===1&&!s.length?t[0]:Ml.custom}function dy(e){if(!e)return null;let t=typeof e=="string";return{top:t?e:e?.top,left:t?e:e?.left}}function qr(e,t="0"){let o=dy(e);if(!o)return null;let r=Ls(o?.top)||t,n=Ls(o?.left)||t;return r===n?r:`${r} ${n}`}var uo=l(w(),1),RSe={left:"flex-start",right:"flex-end",center:"center","space-between":"space-between"},P7={left:"flex-start",right:"flex-end",center:"center",stretch:"stretch"},OSe={top:"flex-start",center:"center",bottom:"flex-end",stretch:"stretch","space-between":"space-between"},R7={horizontal:"center",vertical:"top"},ASe=["wrap","nowrap"],A7={name:"flex",label:(0,Vi.__)("Flex"),inspectorControls:function({layout:t={},onChange:o,layoutBlockSupport:r={}}){let{allowOrientation:n=!0,allowJustification:i=!0,allowWrap:s=!0}=r;return(0,uo.jsxs)(uo.Fragment,{children:[(0,uo.jsxs)(_n.Flex,{children:[i&&(0,uo.jsx)(_n.FlexItem,{children:(0,uo.jsx)(O7,{layout:t,onChange:o})}),n&&(0,uo.jsx)(_n.FlexItem,{children:(0,uo.jsx)(DSe,{layout:t,onChange:o})})]}),s&&(0,uo.jsx)(MSe,{layout:t,onChange:o})]})},toolBarControls:function({layout:t={},onChange:o,layoutBlockSupport:r}){let{allowVerticalAlignment:n=!0,allowJustification:i=!0}=r;return!i&&!n?null:(0,uo.jsxs)(Ut,{group:"block",__experimentalShareWithChildBlocks:!0,children:[i&&(0,uo.jsx)(O7,{layout:t,onChange:o,isToolbar:!0}),n&&(0,uo.jsx)(LSe,{layout:t,onChange:o})]})},getLayoutStyle:function({selector:t,layout:o,style:r,blockName:n,hasBlockGapSupport:i,globalBlockGapValue:s,layoutDefinitions:a=Qn}){let{orientation:c="horizontal"}=o,u="0.5em";if(s){let k=dy(s);u=Ls(k?.left)||Ls(k?.top)||"0.5em"}let d=r?.spacing?.blockGap&&!We(n,"spacing","blockGap")?qr(r?.spacing?.blockGap,u):void 0,f=RSe[o.justifyContent],m=ASe.includes(o.flexWrap)?o.flexWrap:"wrap",h=OSe[o.verticalAlignment],p=P7[o.justifyContent]||P7.left,g="",b=[];return m&&m!=="wrap"&&b.push(`flex-wrap: ${m}`),c==="horizontal"?(h&&b.push(`align-items: ${h}`),f&&b.push(`justify-content: ${f}`)):(h&&b.push(`justify-content: ${h}`),b.push("flex-direction: column"),b.push(`align-items: ${p}`)),b.length&&(g=`${Jn(t)} { |
| 25 |
${b.join("; ")}; |
| 26 |
}`),i&&d&&(g+=Mu(t,a,"flex",d)),g},getOrientation(e){let{orientation:t="horizontal"}=e;return t},getAlignments(){return[]}};function LSe({layout:e,onChange:t}){let{orientation:o="horizontal"}=e,r=o==="horizontal"?R7.horizontal:R7.vertical,{verticalAlignment:n=r}=e;return(0,uo.jsx)(FC,{onChange:s=>{t({...e,verticalAlignment:s})},value:n,controls:o==="horizontal"?["top","center","bottom","stretch"]:["top","center","bottom","space-between"]})}var NSe={placement:"bottom-start"};function O7({layout:e,onChange:t,isToolbar:o=!1}){let{justifyContent:r="left",orientation:n="horizontal"}=e,i=c=>{t({...e,justifyContent:c})},s=["left","center","right"];if(n==="horizontal"?s.push("space-between"):s.push("stretch"),o)return(0,uo.jsx)(Nh,{allowedControls:s,value:r,onChange:i,popoverProps:NSe});let a=[{value:"left",icon:yu,label:(0,Vi.__)("Justify items left")},{value:"center",icon:ku,label:(0,Vi.__)("Justify items center")},{value:"right",icon:_u,label:(0,Vi.__)("Justify items right")}];return n==="horizontal"?a.push({value:"space-between",icon:mh,label:(0,Vi.__)("Space between items")}):a.push({value:"stretch",icon:ph,label:(0,Vi.__)("Stretch items")}),(0,uo.jsx)(_n.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,label:(0,Vi.__)("Justification"),value:r,onChange:i,className:"block-editor-hooks__flex-layout-justification-controls",children:a.map(({value:c,icon:u,label:d})=>(0,uo.jsx)(_n.__experimentalToggleGroupControlOptionIcon,{value:c,icon:u,label:d},c))})}function MSe({layout:e,onChange:t}){let{flexWrap:o="wrap"}=e;return(0,uo.jsx)(_n.ToggleControl,{label:(0,Vi.__)("Allow to wrap to multiple lines"),onChange:r=>{t({...e,flexWrap:r?"wrap":"nowrap"})},checked:o==="wrap"})}function DSe({layout:e,onChange:t}){let{orientation:o="horizontal",verticalAlignment:r,justifyContent:n}=e;return(0,uo.jsxs)(_n.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,className:"block-editor-hooks__flex-layout-orientation-controls",label:(0,Vi.__)("Orientation"),value:o,onChange:i=>{let s=r,a=n;return i==="horizontal"?(r==="space-between"&&(s="center"),n==="stretch"&&(a="left")):(r==="stretch"&&(s="top"),n==="space-between"&&(a="left")),t({...e,orientation:i,verticalAlignment:s,justifyContent:a})},children:[(0,uo.jsx)(_n.__experimentalToggleGroupControlOptionIcon,{icon:Sk,value:"horizontal",label:(0,Vi.__)("Horizontal")}),(0,uo.jsx)(_n.__experimentalToggleGroupControlOptionIcon,{icon:FA,value:"vertical",label:(0,Vi.__)("Vertical")})]})}var L7=l(N(),1);var N7={name:"default",label:(0,L7.__)("Flow"),inspectorControls:function(){return null},toolBarControls:function(){return null},getLayoutStyle:function({selector:t,style:o,blockName:r,hasBlockGapSupport:n,layoutDefinitions:i=Qn}){let s=qr(o?.spacing?.blockGap),a="";We(r,"spacing","blockGap")||(s?.top?a=qr(s?.top):typeof s=="string"&&(a=qr(s)));let c="";return n&&a&&(c+=Mu(t,i,"default",a)),c},getOrientation(){return"vertical"},getAlignments(e,t){let o=MC(e);if(e.alignments!==void 0)return e.alignments.includes("none")||e.alignments.unshift("none"),e.alignments.map(n=>({name:n,info:o[n]}));let r=[{name:"left"},{name:"center"},{name:"right"}];if(!t){let{contentSize:n,wideSize:i}=e;n&&r.unshift({name:"full"}),i&&r.unshift({name:"wide",info:o.wide})}return r.unshift({name:"none",info:o.none}),r}};var Sn=l(A(),1),Dl=l(N(),1);var D7=l(fy(),1);var sr=l(w(),1),V7={name:"constrained",label:(0,Dl.__)("Constrained"),inspectorControls:function({layout:t,onChange:o,layoutBlockSupport:r={}}){let{wideSize:n,contentSize:i,justifyContent:s="center"}=t,{allowJustification:a=!0,allowCustomContentAndWideSize:c=!0}=r,u=h=>{o({...t,justifyContent:h})},d=[{value:"left",icon:yu,label:(0,Dl.__)("Justify items left")},{value:"center",icon:ku,label:(0,Dl.__)("Justify items center")},{value:"right",icon:_u,label:(0,Dl.__)("Justify items right")}],[f]=pe("spacing.units"),m=(0,Sn.__experimentalUseCustomUnits)({availableUnits:f||["%","px","em","rem","vw"]});return(0,sr.jsxs)(Sn.__experimentalVStack,{spacing:4,className:"block-editor-hooks__layout-constrained",children:[c&&(0,sr.jsxs)(sr.Fragment,{children:[(0,sr.jsx)(Sn.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,Dl.__)("Content width"),labelPosition:"top",value:i||n||"",onChange:h=>{h=0>parseFloat(h)?"0":h,o({...t,contentSize:h!==""?h:void 0})},units:m,prefix:(0,sr.jsx)(Sn.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,sr.jsx)(Ee,{icon:Kf})})}),(0,sr.jsx)(Sn.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,Dl.__)("Wide width"),labelPosition:"top",value:n||i||"",onChange:h=>{h=0>parseFloat(h)?"0":h,o({...t,wideSize:h!==""?h:void 0})},units:m,prefix:(0,sr.jsx)(Sn.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,sr.jsx)(Ee,{icon:sm})})}),(0,sr.jsx)("p",{className:"block-editor-hooks__layout-constrained-helptext",children:(0,Dl.__)("Customize the width for all elements that are assigned to the center or wide columns.")})]}),a&&(0,sr.jsx)(Sn.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,label:(0,Dl.__)("Justification"),value:s,onChange:u,children:d.map(({value:h,icon:p,label:g})=>(0,sr.jsx)(Sn.__experimentalToggleGroupControlOptionIcon,{value:h,icon:p,label:g},h))})]})},toolBarControls:function({layout:t={},onChange:o,layoutBlockSupport:r}){let{allowJustification:n=!0}=r;return n?(0,sr.jsx)(Ut,{group:"block",__experimentalShareWithChildBlocks:!0,children:(0,sr.jsx)(FSe,{layout:t,onChange:o})}):null},getLayoutStyle:function({selector:t,layout:o={},style:r,blockName:n,hasBlockGapSupport:i,layoutDefinitions:s=Qn}){let{contentSize:a,wideSize:c,justifyContent:u}=o,d=qr(r?.spacing?.blockGap),f="";We(n,"spacing","blockGap")||(d?.top?f=qr(d?.top):typeof d=="string"&&(f=qr(d)));let m=u==="left"?"0 !important":"auto !important",h=u==="right"?"0 !important":"auto !important",p=a||c?` |
| 27 |
${Jn(t,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")} { |
| 28 |
max-width: ${a??c}; |
| 29 |
margin-left: ${m}; |
| 30 |
margin-right: ${h}; |
| 31 |
} |
| 32 |
${Jn(t,"> .alignwide")} { |
| 33 |
max-width: ${c??a}; |
| 34 |
} |
| 35 |
${Jn(t,"> .alignfull")} { |
| 36 |
max-width: none; |
| 37 |
} |
| 38 |
`:"";return u==="left"?p+=`${Jn(t,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")} |
| 39 |
{ margin-left: ${m}; }`:u==="right"&&(p+=`${Jn(t,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")} |
| 40 |
{ margin-right: ${h}; }`),r?.spacing?.padding&&(0,D7.getCSSRules)(r).forEach(b=>{if(b.key==="paddingRight"){let k=b.value==="0"?"0px":b.value;p+=` |
| 41 |
${Jn(t,"> .alignfull")} { |
| 42 |
margin-right: calc(${k} * -1); |
| 43 |
} |
| 44 |
`}else if(b.key==="paddingLeft"){let k=b.value==="0"?"0px":b.value;p+=` |
| 45 |
${Jn(t,"> .alignfull")} { |
| 46 |
margin-left: calc(${k} * -1); |
| 47 |
} |
| 48 |
`}}),i&&f&&(p+=Mu(t,s,"constrained",f)),p},getOrientation(){return"vertical"},getAlignments(e){let t=MC(e);if(e.alignments!==void 0)return e.alignments.includes("none")||e.alignments.unshift("none"),e.alignments.map(i=>({name:i,info:t[i]}));let{contentSize:o,wideSize:r}=e,n=[{name:"left"},{name:"center"},{name:"right"}];return o&&n.unshift({name:"full"}),r&&n.unshift({name:"wide",info:t.wide}),n.unshift({name:"none",info:t.none}),n}},VSe={placement:"bottom-start"};function FSe({layout:e,onChange:t}){let{justifyContent:o="center"}=e;return(0,sr.jsx)(Nh,{allowedControls:["left","center","right"],value:o,onChange:i=>{t({...e,justifyContent:i})},popoverProps:VSe})}var Zr=l(N(),1),ct=l(A(),1),zC=l(O(),1);var Xe=l(w(),1),zSe={px:600,"%":100,vw:100,vh:100,em:38,rem:38,svw:100,lvw:100,dvw:100,svh:100,lvh:100,dvh:100,vi:100,svi:100,lvi:100,dvi:100,vb:100,svb:100,lvb:100,dvb:100,vmin:100,svmin:100,lvmin:100,dvmin:100,vmax:100,svmax:100,lvmax:100,dvmax:100},jSe=[{value:"px",label:"px",default:0},{value:"rem",label:"rem",default:0},{value:"em",label:"em",default:0}],F7={name:"grid",label:(0,Zr.__)("Grid"),inspectorControls:function({layout:t={},onChange:o,layoutBlockSupport:r={}}){let{allowSizingOnChildren:n=!1}=r,i=!0,s=!t?.isManualPlacement||window.__experimentalEnableGridInteractivity;return(0,Xe.jsxs)(Xe.Fragment,{children:[window.__experimentalEnableGridInteractivity&&(0,Xe.jsx)(GSe,{layout:t,onChange:o}),(0,Xe.jsxs)(ct.__experimentalVStack,{spacing:4,children:[i&&(0,Xe.jsx)(HSe,{layout:t,onChange:o,allowSizingOnChildren:n}),s&&(0,Xe.jsx)(USe,{layout:t,onChange:o})]})]})},toolBarControls:function(){return null},getLayoutStyle:function({selector:t,layout:o,style:r,blockName:n,hasBlockGapSupport:i,globalBlockGapValue:s,layoutDefinitions:a=Qn}){let{minimumColumnWidth:c=null,columnCount:u=null,rowCount:d=null}=o,f="1.2rem";if(s){let g=dy(s);f=Ls(g?.left)||Ls(g?.top)||"1.2rem"}let m=r?.spacing?.blockGap&&!We(n,"spacing","blockGap")?qr(r?.spacing?.blockGap,f):void 0,h="",p=[];if(c&&u>0){let g=m||f;(g==="0"||g===0)&&(g="0px");let b=`max(min( ${c}, 100%), ( 100% - (${g}*${u-1}) ) / ${u})`;p.push(`grid-template-columns: repeat(auto-fill, minmax(${b}, 1fr))`,"container-type: inline-size"),d&&p.push(`grid-template-rows: repeat(${d}, minmax(1rem, auto))`)}else u?(p.push(`grid-template-columns: repeat(${u}, minmax(0, 1fr))`),d&&p.push(`grid-template-rows: repeat(${d}, minmax(1rem, auto))`)):p.push(`grid-template-columns: repeat(auto-fill, minmax(min(${c||"12rem"}, 100%), 1fr))`,"container-type: inline-size");return p.length&&(h=`${Jn(t)} { ${p.join("; ")}; }`),i&&m&&(h+=Mu(t,a,"grid",m)),h},getOrientation(){return"horizontal"},getAlignments(){return[]}};function USe({layout:e,onChange:t}){let{minimumColumnWidth:o,columnCount:r,isManualPlacement:n}=e,s=o||(n||r?null:"12rem"),[a,c="rem"]=(0,ct.__experimentalParseQuantityAndUnitFromRawValue)(s),u=f=>{t({...e,minimumColumnWidth:[f,c].join("")})},d=f=>{let m;["em","rem"].includes(f)&&c==="px"?m=(a/16).toFixed(2)+f:["em","rem"].includes(c)&&f==="px"&&(m=Math.round(a*16)+f),t({...e,minimumColumnWidth:m})};return(0,Xe.jsxs)("fieldset",{className:"block-editor-hooks__grid-layout-minimum-width-control",children:[(0,Xe.jsx)(ct.BaseControl.VisualLabel,{as:"legend",children:(0,Zr.__)("Min. column width")}),(0,Xe.jsxs)(ct.Flex,{gap:4,children:[(0,Xe.jsx)(ct.FlexItem,{isBlock:!0,children:(0,Xe.jsx)(ct.__experimentalUnitControl,{size:"__unstable-large",onChange:f=>{t({...e,minimumColumnWidth:f===""?void 0:f})},onUnitChange:d,value:s,units:jSe,min:0,label:(0,Zr.__)("Minimum column width"),hideLabelFromVision:!0})}),(0,Xe.jsx)(ct.FlexItem,{isBlock:!0,children:(0,Xe.jsx)(ct.RangeControl,{__next40pxDefaultSize:!0,onChange:u,value:a||0,min:0,max:zSe[c]||600,withInputField:!1,label:(0,Zr.__)("Minimum column width"),hideLabelFromVision:!0})})]}),(0,Xe.jsx)("p",{className:"components-base-control__help",children:(0,Zr.__)("Columns will wrap to fewer per row when they can no longer maintain the minimum width.")})]})}function HSe({layout:e,onChange:t,allowSizingOnChildren:o}){let{columnCount:n=void 0,rowCount:i,isManualPlacement:s}=e;return(0,Xe.jsx)(Xe.Fragment,{children:(0,Xe.jsxs)("fieldset",{className:"block-editor-hooks__grid-layout-columns-and-rows-controls",children:[!s&&(0,Xe.jsx)(ct.BaseControl.VisualLabel,{as:"legend",children:(0,Zr.__)("Max. columns")}),(0,Xe.jsxs)(ct.Flex,{gap:4,children:[(0,Xe.jsx)(ct.FlexItem,{isBlock:!0,children:(0,Xe.jsx)(ct.__experimentalNumberControl,{size:"__unstable-large",onChange:a=>{let u=a===""||a==="0"?s?1:void 0:parseInt(a,10);t({...e,columnCount:u})},value:n,min:1,label:(0,Zr.__)("Columns"),hideLabelFromVision:!s})}),(0,Xe.jsx)(ct.FlexItem,{isBlock:!0,children:o&&s?(0,Xe.jsx)(ct.__experimentalNumberControl,{size:"__unstable-large",onChange:a=>{let c=a===""||a==="0"?1:parseInt(a,10);t({...e,rowCount:c})},value:i,min:1,label:(0,Zr.__)("Rows")}):(0,Xe.jsx)(ct.RangeControl,{__next40pxDefaultSize:!0,value:n??1,onChange:a=>t({...e,columnCount:a===""||a==="0"?1:a}),min:1,max:16,withInputField:!1,label:(0,Zr.__)("Columns"),hideLabelFromVision:!0})})]})]})})}function GSe({layout:e,onChange:t}){let{columnCount:o,rowCount:r,minimumColumnWidth:n,isManualPlacement:i}=e,[s,a]=(0,zC.useState)(o||3),[c,u]=(0,zC.useState)(r),[d,f]=(0,zC.useState)(n||"12rem"),m=i?"manual":"auto",h=g=>{g==="manual"?f(n||"12rem"):(a(o||3),u(r)),t({...e,columnCount:s,rowCount:g==="manual"?c:void 0,isManualPlacement:g==="manual"?!0:void 0,minimumColumnWidth:g==="auto"?d:null})},p=m==="manual"?(0,Zr.__)("Grid items can be manually placed in any position on the grid."):(0,Zr.__)("Grid items are placed automatically depending on their order.");return(0,Xe.jsxs)(ct.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,label:(0,Zr.__)("Grid item position"),value:m,onChange:h,isBlock:!0,help:p,children:[(0,Xe.jsx)(ct.__experimentalToggleGroupControlOption,{value:"auto",label:(0,Zr.__)("Auto")},"auto"),(0,Xe.jsx)(ct.__experimentalToggleGroupControlOption,{value:"manual",label:(0,Zr.__)("Manual")},"manual")]})}var z7=[N7,A7,V7,F7];function Ns(e="default"){return z7.find(t=>t.name===e)}function j7(){return z7}var _5=l(w(),1),S5={type:"default"},x5=(0,jC.createContext)(S5);x5.displayName="BlockLayoutContext";var U7=x5.Provider;function mm(){return(0,jC.useContext)(x5)}function H7({layout:e={},css:t,...o}){let r=Ns(e.type),[n]=pe("spacing.blockGap"),i=n!==null;if(r){if(t)return(0,_5.jsx)("style",{children:t});let s=r.getLayoutStyle?.({hasBlockGapSupport:i,layout:e,...o});if(s)return(0,_5.jsx)("style",{children:s})}return null}var UC=[],G7=["none","left","center","right","wide","full"],WSe=["wide","full"];function my(e=G7){e.includes("none")||(e=["none",...e]);let t=e.length===1&&e[0]==="none",[o,r,n]=(0,W7.useSelect)(c=>{if(t)return[!1,!1,!1];let u=c(x).getSettings();return[u.alignWide??!1,u.supportsLayout,u.__unstableIsBlockBasedTheme]},[t]),i=mm();if(t)return UC;let s=Ns(i?.type);if(r){let u=s.getAlignments(i,n).filter(d=>e.includes(d.name));return u.length===1&&u[0].name==="none"?UC:u}if(s.name!=="default"&&s.name!=="constrained")return UC;let a=e.filter(c=>i.alignments?i.alignments.includes(c):!o&&WSe.includes(c)?!1:G7.includes(c)).map(c=>({name:c}));return a.length===1&&a[0].name==="none"?UC:a}var Vu=l(N(),1);var py={none:{icon:Kf,title:(0,Vu._x)("None","Alignment option")},left:{icon:UN,title:(0,Vu.__)("Align left")},center:{icon:zN,title:(0,Vu.__)("Align center")},right:{icon:GN,title:(0,Vu.__)("Align right")},wide:{icon:sm,title:(0,Vu.__)("Wide width")},full:{icon:$k,title:(0,Vu.__)("Full width")}},$7="none";var pm=l(w(),1);function $Se({value:e,onChange:t,controls:o,isToolbar:r,isCollapsed:n=!0}){let i=my(o);if(!!!i.length)return null;function a(h){t([e,"none"].includes(h)?void 0:h)}let c=py[e],u=py[$7],d=r?Fu.ToolbarGroup:Fu.ToolbarDropdownMenu,f={icon:c?c.icon:u.icon,label:(0,w5.__)("Align")},m=r?{isCollapsed:n,controls:i.map(({name:h})=>({...py[h],isActive:e===h||!e&&h==="none",role:n?"menuitemradio":void 0,onClick:()=>a(h)}))}:{toggleProps:{description:(0,w5.__)("Change alignment")},children:({onClose:h})=>(0,pm.jsx)(pm.Fragment,{children:(0,pm.jsx)(Fu.MenuGroup,{className:"block-editor-block-alignment-control__menu-group",children:i.map(({name:p,info:g})=>{let{icon:b,title:k}=py[p],v=p===e||!e&&p==="none";return(0,pm.jsx)(Fu.MenuItem,{icon:b,iconPosition:"left",className:D("components-dropdown-menu__menu-item",{"is-active":v}),isSelected:v,onClick:()=>{a(p),h()},role:"menuitemradio",info:g,children:k},p)})})})};return(0,pm.jsx)(d,{...f,...m})}var C5=$Se;var B5=l(w(),1),HC=e=>(0,B5.jsx)(C5,{...e,isToolbar:!1}),K7=e=>(0,B5.jsx)(C5,{...e,isToolbar:!0});var Q7=l(Wf(),1),KC=l(N(),1),YC=l(Y(),1),Ds=l(A(),1),I5=l(z(),1),J7=l(O(),1),eU=l(X(),1);var T5=l(Wf(),1),Y7=l(Y(),1),q7=l(A(),1),Z7=l(z(),1),WC=l(O(),1),X7=l(X(),1);var GC=l(z(),1);function E5(e){return!e||Object.keys(e).length===0}function Vl(e){let{clientId:t}=Pe(),o=e||t,{updateBlockAttributes:r}=(0,GC.useDispatch)(x),{getBlockAttributes:n}=(0,GC.useRegistry)().select(x);return{updateBlockBindings:a=>{let{metadata:{bindings:c,...u}={}}=n(o),d={...c};Object.entries(a).forEach(([m,h])=>{if(!h&&d[m]){delete d[m];return}d[m]=h});let f={...u,bindings:d};E5(f.bindings)&&delete f.bindings,r(o,{metadata:E5(f)?void 0:f})},removeAllBlockBindings:()=>{let{metadata:{bindings:a,...c}={}}=n(o);r(o,{metadata:E5(c)?void 0:c})}}}var Ms=l(w(),1),{Menu:zu}=M(q7.privateApis);function KSe({args:e,attribute:t,field:o,source:r,sourceKey:n}){let i=(0,WC.useMemo)(()=>({source:n,args:o.args||{key:o.key}}),[o.args,o.key,n]),s=(0,WC.useContext)(Or),a=(0,Z7.useSelect)(u=>r.getValues({select:u,context:s,bindings:{[t]:i}}),[t,s,i,r]),{updateBlockBindings:c}=Vl();return(0,Ms.jsxs)(zu.CheckboxItem,{onChange:()=>{let u=(0,T5.default)(e,o.args)??o.key===e?.key;c(u?{[t]:void 0}:{[t]:i})},name:t+"-binding",value:a[t],checked:(0,T5.default)(e,o.args)??o.key===e?.key,children:[(0,Ms.jsx)(zu.ItemLabel,{children:o.label}),(0,Ms.jsx)(zu.ItemHelpText,{children:a[t]})]})}function hy({args:e,attribute:t,sourceKey:o,fields:r}){let n=(0,X7.useViewportMatch)("medium","<");if(!r||r.length===0)return null;let i=(0,Y7.getBlockBindingsSource)(o);return(0,Ms.jsxs)(zu,{placement:n?"bottom-start":"left-start",children:[(0,Ms.jsx)(zu.SubmenuTriggerItem,{children:(0,Ms.jsx)(zu.ItemLabel,{children:i.label})}),(0,Ms.jsx)(zu.Popover,{gutter:8,children:(0,Ms.jsx)(zu.Group,{children:r.map(s=>(0,Ms.jsx)(KSe,{args:e,attribute:t,field:s,source:i,sourceKey:o},o+JSON.stringify(s.args)||s.key))})})]},o)}var Fi=l(w(),1),{Menu:$C}=M(Ds.privateApis);function gy({attribute:e,binding:t,blockName:o}){let{updateBlockBindings:r}=Vl(),n=(0,eU.useViewportMatch)("medium","<"),i=(0,J7.useContext)(Or),s=(0,I5.useSelect)(g=>{let{getAllBlockBindingsSources:b,getBlockBindingsSourceFieldsList:k,getBlockType:v}=M(g(YC.store)),y=v(o).attributes?.[e];if(y?.enum)return{};let _=y?.type==="rich-text"?"string":y?.type,S={};return Object.entries(b()).forEach(([C,B])=>{let P=k(B,i);if(!P?.length)return;let T=P.filter(E=>E.type===_);T.length&&(S[C]=T)}),S},[e,o,i]),{canUpdateBlockBindings:a}=(0,I5.useSelect)(g=>({canUpdateBlockBindings:g(x).getSettings().canUpdateBlockBindings})),c=Object.keys(s).length>0,u=!a||!c,{source:d,args:f}=t||{},m=(0,YC.getBlockBindingsSource)(d),h,p=!0;return t===void 0?(c?h=(0,KC.__)("Not connected"):h=(0,KC.__)("No sources available"),p=!0):m?h=s?.[d]?.find(g=>(0,Q7.default)(g.args,f))?.label||m?.label||d:(p=!1,h=(0,KC.__)("Source not registered")),(0,Fi.jsx)(Ds.__experimentalToolsPanelItem,{hasValue:()=>!!t,label:e,onDeselect:!!c&&(()=>{r({[e]:void 0})}),children:(0,Fi.jsxs)($C,{placement:n?"bottom-start":"left-start",children:[(0,Fi.jsx)($C.TriggerButton,{render:(0,Fi.jsx)(Ds.__experimentalItem,{}),disabled:!c,children:(0,Fi.jsxs)(Ds.__experimentalVStack,{className:"block-editor-bindings__item",spacing:0,children:[(0,Fi.jsx)(Ds.__experimentalText,{truncate:!0,children:e}),(0,Fi.jsx)(Ds.__experimentalText,{truncate:!0,variant:p?"muted":void 0,isDestructive:!p,children:h})]})}),!u&&(0,Fi.jsx)($C.Popover,{gutter:n?8:36,children:(0,Fi.jsx)($C,{placement:n?"bottom-start":"left-start",children:Object.entries(s).map(([g,b])=>(0,Fi.jsx)(hy,{args:t?.args,attribute:e,sourceKey:g,fields:b},g))})})]})})}var tU=l(N(),1),oU=l(A(),1);var rU=l(w(),1);function YSe({isActive:e,label:t=(0,tU.__)("Full height"),onToggle:o,isDisabled:r}){return(0,rU.jsx)(oU.ToolbarButton,{isActive:e,icon:DL,label:t,onClick:()=>o(!e),disabled:r})}var nU=YSe;var sU=l(N(),1),aU=l(ot(),1),hm=l(A(),1),by=l(w(),1),qSe=()=>{};function ZSe(e){let{label:t=(0,sU.__)("Change matrix alignment"),onChange:o=qSe,value:r="center",isDisabled:n}=e,i=(0,by.jsx)(hm.AlignmentMatrixControl.Icon,{value:r});return(0,by.jsx)(hm.Dropdown,{popoverProps:{placement:"bottom-start"},renderToggle:({onToggle:s,isOpen:a})=>(0,by.jsx)(hm.ToolbarButton,{onClick:s,"aria-haspopup":"true","aria-expanded":a,onKeyDown:u=>{!a&&u.keyCode===aU.DOWN&&(u.preventDefault(),s())},label:t,icon:i,showTooltip:!0,disabled:n}),renderContent:()=>(0,by.jsx)(hm.AlignmentMatrixControl,{onChange:o,value:r})})}var lU=ZSe;var O5=l(A(),1),XC=l(z(),1),QC=l(N(),1);var hU=l(O(),1);var cU=l(z(),1),qC=l(Y(),1);function Sr({clientId:e,maximumLength:t,context:o}){let r=(0,cU.useSelect)(n=>{if(!e)return null;let{getBlockName:i,getBlockAttributes:s}=n(x),{getBlockType:a,getActiveBlockVariation:c}=n(qC.store),u=i(e),d=a(u);if(!d)return null;let f=s(e),m=(0,qC.__experimentalGetBlockLabel)(d,f,o);return m!==d.title?m:c(u,f)?.title||d.title},[e,o]);return r?t&&t>0&&r.length>t?r.slice(0,t-3)+"...":r:null}function vy({clientId:e,maximumLength:t,context:o}){return Sr({clientId:e,maximumLength:t,context:o})}var gm=l(O(),1),fU=l(X(),1);var ZC=l(O(),1),P5=l(X(),1),uU=l(w(),1),ky=(0,ZC.createContext)({refsMap:(0,P5.observableMap)()});ky.displayName="BlockRefsContext";function dU({children:e}){let t=(0,ZC.useMemo)(()=>({refsMap:(0,P5.observableMap)()}),[]);return(0,uU.jsx)(ky.Provider,{value:t,children:e})}function mU(e){let{refsMap:t}=(0,gm.useContext)(ky);return(0,fU.useRefEffect)(o=>(t.set(e,o),()=>t.delete(e)),[e])}function R5(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function bm(e,t){let{refsMap:o}=(0,gm.useContext)(ky);(0,gm.useLayoutEffect)(()=>{R5(t,o.get(e));let r=o.subscribe(e,()=>R5(t,o.get(e)));return()=>{r(),R5(t,null)}},[o,e,t])}function rt(e){let[t,o]=(0,gm.useState)(null);return bm(e,o),t}function pU(e){if(!e)return null;let t=Array.from(document.querySelectorAll('iframe[name="editor-canvas"]').values()).find(o=>(o.contentDocument||o.contentWindow.document)===e.ownerDocument)??e;return t?.closest('[role="region"]')??t}var ei=l(w(),1);function XSe({rootLabelText:e}){let{selectBlock:t,clearSelectedBlock:o}=(0,XC.useDispatch)(x),{clientId:r,parents:n,hasSelection:i}=(0,XC.useSelect)(c=>{let{getSelectionStart:u,getSelectedBlockClientId:d,getEnabledBlockParents:f}=M(c(x)),m=d();return{parents:f(m),clientId:m,hasSelection:!!u().clientId}},[]),s=e||(0,QC._x)("Document","noun, breadcrumb"),a=(0,hU.useRef)();return bm(r,a),(0,ei.jsxs)("ul",{className:"block-editor-block-breadcrumb",role:"list","aria-label":(0,QC.__)("Block breadcrumb"),children:[(0,ei.jsxs)("li",{className:i?void 0:"block-editor-block-breadcrumb__current","aria-current":i?void 0:"true",children:[i&&(0,ei.jsx)(O5.Button,{size:"small",className:"block-editor-block-breadcrumb__button",onClick:()=>{let c=a.current?.closest(".editor-styles-wrapper");o(),pU(c)?.focus()},children:s}),!i&&(0,ei.jsx)("span",{children:s}),!!r&&(0,ei.jsx)(Ee,{icon:vu,className:"block-editor-block-breadcrumb__separator"})]}),n.map(c=>(0,ei.jsxs)("li",{children:[(0,ei.jsx)(O5.Button,{size:"small",className:"block-editor-block-breadcrumb__button",onClick:()=>t(c),children:(0,ei.jsx)(vy,{clientId:c,maximumLength:35,context:"breadcrumb"})}),(0,ei.jsx)(Ee,{icon:vu,className:"block-editor-block-breadcrumb__separator"})]},c)),!!r&&(0,ei.jsx)("li",{className:"block-editor-block-breadcrumb__current","aria-current":"true",children:(0,ei.jsx)(vy,{clientId:r,maximumLength:35,context:"breadcrumb"})})]})}var gU=XSe;var bU=l(z(),1);function vU(e){return(0,bU.useSelect)(t=>{let{__unstableHasActiveBlockOverlayActive:o}=t(x);return o(e)},[e])}var BI=l(X(),1),coe=l(O(),1),uoe=l(z(),1),doe=l(A(),1);var Ji=l(z(),1),JE=l(X(),1),yd=l(O(),1),yQ=l(Y(),1);var Xu=l(O(),1),$e=l(Y(),1),UG=l(A(),1),H1=l(z(),1),G1=l(X(),1),HG=l(Ve(),1);var Fl=l(N(),1),e1=l(A(),1),vm=l(O(),1),Dh=l(Y(),1),t1=l(z(),1);var EU=l(xU(),1),JC=l(N(),1),TU=l(Y(),1);var wU=l(A(),1),CU=l(O(),1),BU=l(Ve(),1),Ia=l(w(),1);function L5({title:e,rawContent:t,renderedContent:o,action:r,actionText:n,className:i}){return(0,Ia.jsxs)("div",{className:i,children:[(0,Ia.jsxs)("div",{className:"block-editor-block-compare__content",children:[(0,Ia.jsx)("h2",{className:"block-editor-block-compare__heading",children:e}),(0,Ia.jsx)("div",{className:"block-editor-block-compare__html",children:t}),(0,Ia.jsx)("div",{className:"block-editor-block-compare__preview edit-post-visual-editor",children:(0,Ia.jsx)(CU.RawHTML,{children:(0,BU.safeHTML)(o)})})]}),(0,Ia.jsx)("div",{className:"block-editor-block-compare__action",children:(0,Ia.jsx)(wU.Button,{__next40pxDefaultSize:!0,variant:"secondary",tabIndex:"0",onClick:r,children:n})})]})}var Mh=l(w(),1);function r0e({block:e,onKeep:t,onConvert:o,convertor:r,convertButtonText:n}){function i(u,d){return(0,EU.diffChars)(u,d).map((m,h)=>{let p=D({"block-editor-block-compare__added":m.added,"block-editor-block-compare__removed":m.removed});return(0,Mh.jsx)("span",{className:p,children:m.value},h)})}function s(u){return(Array.isArray(u)?u:[u]).map(m=>(0,TU.getSaveContent)(m.name,m.attributes,m.innerBlocks)).join("")}let a=s(r(e)),c=i(e.originalContent,a);return(0,Mh.jsxs)("div",{className:"block-editor-block-compare__wrapper",children:[(0,Mh.jsx)(L5,{title:(0,JC.__)("Current"),className:"block-editor-block-compare__current",action:t,actionText:(0,JC.__)("Convert to HTML"),rawContent:e.originalContent,renderedContent:e.originalContent}),(0,Mh.jsx)(L5,{title:(0,JC.__)("After Conversion"),className:"block-editor-block-compare__converted",action:o,actionText:n,rawContent:c,renderedContent:a})]})}var IU=r0e;var zl=l(w(),1),PU=e=>(0,Dh.rawHandler)({HTML:e.originalContent});function RU({clientId:e}){let{block:t,canInsertHTMLBlock:o,canInsertClassicBlock:r}=(0,t1.useSelect)(d=>{let{canInsertBlockType:f,getBlock:m,getBlockRootClientId:h}=d(x),p=h(e);return{block:m(e),canInsertHTMLBlock:f("core/html",p),canInsertClassicBlock:f("core/freeform",p)}},[e]),{replaceBlock:n}=(0,t1.useDispatch)(x),[i,s]=(0,vm.useState)(!1),a=(0,vm.useCallback)(()=>s(!1),[]),c=(0,vm.useMemo)(()=>({toClassic(){let d=(0,Dh.createBlock)("core/freeform",{content:t.originalContent});return n(t.clientId,d)},toHTML(){let d=(0,Dh.createBlock)("core/html",{content:t.originalContent});return n(t.clientId,d)},toBlocks(){let d=PU(t);return n(t.clientId,d)},toRecoveredBlock(){let d=(0,Dh.createBlock)(t.name,t.attributes,t.innerBlocks);return n(t.clientId,d)}}),[t,n]),u=(0,vm.useMemo)(()=>[{title:(0,Fl._x)("Resolve","imperative verb"),onClick:()=>s(!0)},o&&{title:(0,Fl.__)("Convert to HTML"),onClick:c.toHTML},r&&{title:(0,Fl.__)("Convert to Classic Block"),onClick:c.toClassic}].filter(Boolean),[o,r,c]);return(0,zl.jsxs)(zl.Fragment,{children:[(0,zl.jsx)(Pu,{actions:[(0,zl.jsx)(e1.Button,{__next40pxDefaultSize:!0,onClick:c.toRecoveredBlock,variant:"primary",children:(0,Fl.__)("Attempt recovery")},"recover")],secondaryActions:u,children:(0,Fl.__)("Block contains unexpected or invalid content.")}),i&&(0,zl.jsx)(e1.Modal,{title:(0,Fl.__)("Resolve Block"),onRequestClose:a,className:"block-editor-block-compare",children:(0,zl.jsx)(IU,{block:t,onKeep:c.toHTML,onConvert:c.toBlocks,convertor:PU,convertButtonText:(0,Fl.__)("Convert to Blocks")})})]})}var OU=l(N(),1);var AU=l(w(),1),n0e=(0,AU.jsx)(Pu,{className:"block-editor-block-list__block-crash-warning",children:(0,OU.__)("This block has encountered an error and cannot be previewed.")});function LU(){return n0e}var NU=l(O(),1),i0e=class extends NU.Component{constructor(){super(...arguments),this.state={hasError:!1}}componentDidCatch(){this.setState({hasError:!0})}render(){return this.state.hasError?this.props.fallback:this.props.children}},MU=i0e;var tH=l(D5(),1),Vh=l(O(),1),i1=l(z(),1),Pa=l(Y(),1);var oH=l(w(),1);function g0e({clientId:e}){let[t,o]=(0,Vh.useState)(""),r=(0,i1.useSelect)(a=>a(x).getBlock(e),[e]),{updateBlock:n}=(0,i1.useDispatch)(x),i=(0,Vh.useMemo)(()=>r?(0,Pa.getBlockContent)(r):"",[r]),s=()=>{let a=(0,Pa.getBlockType)(r.name);if(!a)return;let c=(0,Pa.getBlockAttributes)(a,t,r.attributes),u=t||(0,Pa.getSaveContent)(a,c),[d]=t?(0,Pa.validateBlock)({...r,attributes:c,originalContent:u}):[!0];n(e,{attributes:c,originalContent:u,isValid:d}),t||o(u)};return(0,Vh.useEffect)(()=>{o(i)},[i]),(0,oH.jsx)(tH.default,{className:"block-editor-block-list__block-html-textarea",value:t,onBlur:s,onChange:a=>o(a.target.value)})}var rH=g0e;var FG=l(O(),1),j1=l(N(),1),zG=l(Y(),1),Jh=l(X(),1),jG=l(Sy(),1);var F5=wy(),Se=e=>xy(e,F5),z5=wy();Se.write=e=>xy(e,z5);var s1=wy();Se.onStart=e=>xy(e,s1);var j5=wy();Se.onFrame=e=>xy(e,j5);var U5=wy();Se.onFinish=e=>xy(e,U5);var Fh=[];Se.setTimeout=(e,t)=>{let o=Se.now()+t,r=()=>{let i=Fh.findIndex(s=>s.cancel==r);~i&&Fh.splice(i,1),Uu-=~i?1:0},n={time:o,handler:e,cancel:r};return Fh.splice(iH(o),0,n),Uu+=1,sH(),n};var iH=e=>~(~Fh.findIndex(t=>t.time>e)||~Fh.length);Se.cancel=e=>{s1.delete(e),j5.delete(e),U5.delete(e),F5.delete(e),z5.delete(e)};Se.sync=e=>{V5=!0,Se.batchedUpdates(e),V5=!1};Se.throttle=e=>{let t;function o(){try{e(...t)}finally{t=null}}function r(...n){t=n,Se.onStart(o)}return r.handler=e,r.cancel=()=>{s1.delete(o),t=null},r};var H5=typeof window<"u"?window.requestAnimationFrame:()=>{};Se.use=e=>H5=e;Se.now=typeof performance<"u"?()=>performance.now():Date.now;Se.batchedUpdates=e=>e();Se.catch=console.error;Se.frameLoop="always";Se.advance=()=>{Se.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):lH()};var ju=-1,Uu=0,V5=!1;function xy(e,t){V5?(t.delete(e),e(0)):(t.add(e),sH())}function sH(){ju<0&&(ju=0,Se.frameLoop!=="demand"&&H5(aH))}function b0e(){ju=-1}function aH(){~ju&&(H5(aH),Se.batchedUpdates(lH))}function lH(){let e=ju;ju=Se.now();let t=iH(ju);if(t&&(cH(Fh.splice(0,t),o=>o.handler()),Uu-=t),!Uu){b0e();return}s1.flush(),F5.flush(e?Math.min(64,ju-e):16.667),j5.flush(),z5.flush(),U5.flush()}function wy(){let e=new Set,t=e;return{add(o){Uu+=t==e&&!e.has(o)?1:0,e.add(o)},delete(o){return Uu-=t==e&&e.has(o)?1:0,e.delete(o)},flush(o){t.size&&(e=new Set,Uu-=t.size,cH(t,r=>r(o)&&e.add(r)),Uu+=e.size,t=e)}}}function cH(e,t){e.forEach(o=>{try{t(o)}catch(r){Se.catch(r)}})}var ji=l(He());function d1(){}var hH=(e,t,o)=>Object.defineProperty(e,t,{value:o,writable:!0,configurable:!0}),ae={arr:Array.isArray,obj:e=>!!e&&e.constructor.name==="Object",fun:e=>typeof e=="function",str:e=>typeof e=="string",num:e=>typeof e=="number",und:e=>e===void 0};function Ra(e,t){if(ae.arr(e)){if(!ae.arr(t)||e.length!==t.length)return!1;for(let o=0;o<e.length;o++)if(e[o]!==t[o])return!1;return!0}return e===t}var St=(e,t)=>e.forEach(t);function Ui(e,t,o){if(ae.arr(e)){for(let r=0;r<e.length;r++)t.call(o,e[r],`${r}`);return}for(let r in e)e.hasOwnProperty(r)&&t.call(o,e[r],r)}var xn=e=>ae.und(e)?[]:ae.arr(e)?e:[e];function Hh(e,t){if(e.size){let o=Array.from(e);e.clear(),St(o,t)}}var Gh=(e,...t)=>Hh(e,o=>o(...t)),q5=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),Z5,gH,Hu=null,bH=!1,X5=d1,v0e=e=>{e.to&&(gH=e.to),e.now&&(Se.now=e.now),e.colors!==void 0&&(Hu=e.colors),e.skipAnimation!=null&&(bH=e.skipAnimation),e.createStringInterpolator&&(Z5=e.createStringInterpolator),e.requestAnimationFrame&&Se.use(e.requestAnimationFrame),e.batchedUpdates&&(Se.batchedUpdates=e.batchedUpdates),e.willAdvance&&(X5=e.willAdvance),e.frameLoop&&(Se.frameLoop=e.frameLoop)},ti=Object.freeze({__proto__:null,get createStringInterpolator(){return Z5},get to(){return gH},get colors(){return Hu},get skipAnimation(){return bH},get willAdvance(){return X5},assign:v0e}),Cy=new Set,zi=[],G5=[],c1=0,Wh={get idle(){return!Cy.size&&!zi.length},start(e){c1>e.priority?(Cy.add(e),Se.onStart(k0e)):(vH(e),Se(K5))},advance:K5,sort(e){if(c1)Se.onFrame(()=>Wh.sort(e));else{let t=zi.indexOf(e);~t&&(zi.splice(t,1),kH(e))}},clear(){zi=[],Cy.clear()}};function k0e(){Cy.forEach(vH),Cy.clear(),Se(K5)}function vH(e){zi.includes(e)||kH(e)}function kH(e){zi.splice(y0e(zi,t=>t.priority>e.priority),0,e)}function K5(e){let t=G5;for(let o=0;o<zi.length;o++){let r=zi[o];c1=r.priority,r.idle||(X5(r),r.advance(e),r.idle||t.push(r))}return c1=0,G5=zi,G5.length=0,zi=t,zi.length>0}function y0e(e,t){let o=e.findIndex(t);return o<0?e.length:o}var yH={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},Vs="[-+]?\\d*\\.?\\d+",u1=Vs+"%";function f1(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var _0e=new RegExp("rgb"+f1(Vs,Vs,Vs)),S0e=new RegExp("rgba"+f1(Vs,Vs,Vs,Vs)),x0e=new RegExp("hsl"+f1(Vs,u1,u1)),w0e=new RegExp("hsla"+f1(Vs,u1,u1,Vs)),C0e=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,B0e=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,E0e=/^#([0-9a-fA-F]{6})$/,T0e=/^#([0-9a-fA-F]{8})$/;function I0e(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=E0e.exec(e))?parseInt(t[1]+"ff",16)>>>0:Hu&&Hu[e]!==void 0?Hu[e]:(t=_0e.exec(e))?(zh(t[1])<<24|zh(t[2])<<16|zh(t[3])<<8|255)>>>0:(t=S0e.exec(e))?(zh(t[1])<<24|zh(t[2])<<16|zh(t[3])<<8|fH(t[4]))>>>0:(t=C0e.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=T0e.exec(e))?parseInt(t[1],16)>>>0:(t=B0e.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=x0e.exec(e))?(uH(dH(t[1]),a1(t[2]),a1(t[3]))|255)>>>0:(t=w0e.exec(e))?(uH(dH(t[1]),a1(t[2]),a1(t[3]))|fH(t[4]))>>>0:null}function W5(e,t,o){return o<0&&(o+=1),o>1&&(o-=1),o<1/6?e+(t-e)*6*o:o<1/2?t:o<2/3?e+(t-e)*(2/3-o)*6:e}function uH(e,t,o){let r=o<.5?o*(1+t):o+t-o*t,n=2*o-r,i=W5(n,r,e+1/3),s=W5(n,r,e),a=W5(n,r,e-1/3);return Math.round(i*255)<<24|Math.round(s*255)<<16|Math.round(a*255)<<8}function zh(e){let t=parseInt(e,10);return t<0?0:t>255?255:t}function dH(e){return(parseFloat(e)%360+360)%360/360}function fH(e){let t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function a1(e){let t=parseFloat(e);return t<0?0:t>100?1:t/100}function mH(e){let t=I0e(e);if(t===null)return e;t=t||0;let o=(t&4278190080)>>>24,r=(t&16711680)>>>16,n=(t&65280)>>>8,i=(t&255)/255;return`rgba(${o}, ${r}, ${n}, ${i})`}var Gu=(e,t,o)=>{if(ae.fun(e))return e;if(ae.arr(e))return Gu({range:e,output:t,extrapolate:o});if(ae.str(e.output[0]))return Z5(e);let r=e,n=r.output,i=r.range||[0,1],s=r.extrapolateLeft||r.extrapolate||"extend",a=r.extrapolateRight||r.extrapolate||"extend",c=r.easing||(u=>u);return u=>{let d=R0e(u,i);return P0e(u,i[d],i[d+1],n[d],n[d+1],c,s,a,r.map)}};function P0e(e,t,o,r,n,i,s,a,c){let u=c?c(e):e;if(u<t){if(s==="identity")return u;s==="clamp"&&(u=t)}if(u>o){if(a==="identity")return u;a==="clamp"&&(u=o)}return r===n?r:t===o?e<=t?r:n:(t===-1/0?u=-u:o===1/0?u=u-t:u=(u-t)/(o-t),u=i(u),r===-1/0?u=-u:n===1/0?u=u+r:u=u*(n-r)+r,u)}function R0e(e,t){for(var o=1;o<t.length-1&&!(t[o]>=e);++o);return o-1}function Y5(){return Y5=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r])}return e},Y5.apply(this,arguments)}var jh=Symbol.for("FluidValue.get"),km=Symbol.for("FluidValue.observers"),Xr=e=>!!(e&&e[jh]),xr=e=>e&&e[jh]?e[jh]():e,Q5=e=>e[km]||null;function O0e(e,t){e.eventObserved?e.eventObserved(t):e(t)}function ym(e,t){let o=e[km];o&&o.forEach(r=>{O0e(r,t)})}var Uh=class{constructor(t){if(this[jh]=void 0,this[km]=void 0,!t&&!(t=this.get))throw Error("Unknown getter");A0e(this,t)}},A0e=(e,t)=>_H(e,jh,t);function Wu(e,t){if(e[jh]){let o=e[km];o||_H(e,km,o=new Set),o.has(t)||(o.add(t),e.observerAdded&&e.observerAdded(o.size,t))}return t}function $u(e,t){let o=e[km];if(o&&o.has(t)){let r=o.size-1;r?o.delete(t):e[km]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var _H=(e,t,o)=>Object.defineProperty(e,t,{value:o,writable:!0,configurable:!0}),l1=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,L0e=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,pH=new RegExp(`(${l1.source})(%|[a-z]+)`,"i"),N0e=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,m1=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,SH=e=>{let[t,o]=M0e(e);if(!t||q5())return e;let r=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(r)return r.trim();if(o&&o.startsWith("--")){let n=window.getComputedStyle(document.documentElement).getPropertyValue(o);return n||e}else{if(o&&m1.test(o))return SH(o);if(o)return o}return e},M0e=e=>{let t=m1.exec(e);if(!t)return[,];let[,o,r]=t;return[o,r]},$5,D0e=(e,t,o,r,n)=>`rgba(${Math.round(t)}, ${Math.round(o)}, ${Math.round(r)}, ${n})`,p1=e=>{$5||($5=Hu?new RegExp(`(${Object.keys(Hu).join("|")})(?!\\w)`,"g"):/^\b$/);let t=e.output.map(i=>xr(i).replace(m1,SH).replace(L0e,mH).replace($5,mH)),o=t.map(i=>i.match(l1).map(Number)),n=o[0].map((i,s)=>o.map(a=>{if(!(s in a))throw Error('The arity of each "output" value must be equal');return a[s]})).map(i=>Gu(Y5({},e,{output:i})));return i=>{var s;let a=!pH.test(t[0])&&((s=t.find(u=>pH.test(u)))==null?void 0:s.replace(l1,"")),c=0;return t[0].replace(l1,()=>`${n[c++](i)}${a||""}`).replace(N0e,D0e)}},xH="react-spring: ",wH=e=>{let t=e,o=!1;if(typeof t!="function")throw new TypeError(`${xH}once requires a function parameter`);return(...r)=>{o||(t(...r),o=!0)}},V0e=wH(console.warn);function CH(){V0e(`${xH}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var y7e=wH(console.warn);function $h(e){return ae.str(e)&&(e[0]=="#"||/\d/.test(e)||!q5()&&m1.test(e)||e in(Hu||{}))}var By=q5()?ji.useEffect:ji.useLayoutEffect,F0e=()=>{let e=(0,ji.useRef)(!1);return By(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function J5(){let e=(0,ji.useState)()[1],t=F0e();return()=>{t.current&&e(Math.random())}}function BH(e,t){let[o]=(0,ji.useState)(()=>({inputs:t,result:e()})),r=(0,ji.useRef)(),n=r.current,i=n;return i?t&&i.inputs&&z0e(t,i.inputs)||(i={inputs:t,result:e()}):i=o,(0,ji.useEffect)(()=>{r.current=i,n==o&&(o.inputs=o.result=void 0)},[i]),i.result}function z0e(e,t){if(e.length!==t.length)return!1;for(let o=0;o<e.length;o++)if(e[o]!==t[o])return!1;return!0}var eD=e=>(0,ji.useEffect)(e,j0e),j0e=[];var My=l(He()),Dy=l(He());var PH=l(He()),Ul=l(He()),Ey=Symbol.for("Animated:node"),U0e=e=>!!e&&e[Ey]===e,Fs=e=>e&&e[Ey],v1=(e,t)=>hH(e,Ey,t),Ty=e=>e&&e[Ey]&&e[Ey].getPayload(),h1=class{constructor(){this.payload=void 0,v1(this,this)}getPayload(){return this.payload||[]}},_m=class e extends h1{constructor(t){super(),this.done=!0,this.elapsedTime=void 0,this.lastPosition=void 0,this.lastVelocity=void 0,this.v0=void 0,this.durationProgress=0,this._value=t,ae.num(this._value)&&(this.lastPosition=this._value)}static create(t){return new e(t)}getPayload(){return[this]}getValue(){return this._value}setValue(t,o){return ae.num(t)&&(this.lastPosition=t,o&&(t=Math.round(t/o)*o,this.done&&(this.lastPosition=t))),this._value===t?!1:(this._value=t,!0)}reset(){let{done:t}=this;this.done=!1,ae.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,t&&(this.lastVelocity=null),this.v0=null)}},Sm=class e extends _m{constructor(t){super(0),this._string=null,this._toString=void 0,this._toString=Gu({output:[t,t]})}static create(t){return new e(t)}getValue(){let t=this._string;return t??(this._string=this._toString(this._value))}setValue(t){if(ae.str(t)){if(t==this._string)return!1;this._string=t,this._value=1}else if(super.setValue(t))this._string=null;else return!1;return!0}reset(t){t&&(this._toString=Gu({output:[this.getValue(),t]})),this._value=0,super.reset()}},g1={dependencies:null},xm=class extends h1{constructor(t){super(),this.source=t,this.setValue(t)}getValue(t){let o={};return Ui(this.source,(r,n)=>{U0e(r)?o[n]=r.getValue(t):Xr(r)?o[n]=xr(r):t||(o[n]=r)}),o}setValue(t){this.source=t,this.payload=this._makePayload(t)}reset(){this.payload&&St(this.payload,t=>t.reset())}_makePayload(t){if(t){let o=new Set;return Ui(t,this._addToPayload,o),Array.from(o)}}_addToPayload(t){g1.dependencies&&Xr(t)&&g1.dependencies.add(t);let o=Ty(t);o&&St(o,r=>this.add(r))}},tD=class e extends xm{constructor(t){super(t)}static create(t){return new e(t)}getValue(){return this.source.map(t=>t.getValue())}setValue(t){let o=this.getPayload();return t.length==o.length?o.map((r,n)=>r.setValue(t[n])).some(Boolean):(super.setValue(t.map(H0e)),!0)}};function H0e(e){return($h(e)?Sm:_m).create(e)}function k1(e){let t=Fs(e);return t?t.constructor:ae.arr(e)?tD:$h(e)?Sm:_m}function b1(){return b1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r])}return e},b1.apply(this,arguments)}var EH=(e,t)=>{let o=!ae.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,Ul.forwardRef)((r,n)=>{let i=(0,Ul.useRef)(null),s=o&&(0,Ul.useCallback)(p=>{i.current=W0e(n,p)},[n]),[a,c]=G0e(r,t),u=J5(),d=()=>{let p=i.current;if(o&&!p)return;(p?t.applyAnimatedValues(p,a.getValue(!0)):!1)===!1&&u()},f=new oD(d,c),m=(0,Ul.useRef)();By(()=>(m.current=f,St(c,p=>Wu(p,f)),()=>{m.current&&(St(m.current.deps,p=>$u(p,m.current)),Se.cancel(m.current.update))})),(0,Ul.useEffect)(d,[]),eD(()=>()=>{let p=m.current;St(p.deps,g=>$u(g,p))});let h=t.getComponentProps(a.getValue());return PH.createElement(e,b1({},h,{ref:s}))})},oD=class{constructor(t,o){this.update=t,this.deps=o}eventObserved(t){t.type=="change"&&Se.write(this.update)}};function G0e(e,t){let o=new Set;return g1.dependencies=o,e.style&&(e=b1({},e,{style:t.createAnimatedStyle(e.style)})),e=new xm(e),g1.dependencies=null,[e,o]}function W0e(e,t){return e&&(ae.fun(e)?e(t):e.current=t),t}var TH=Symbol.for("AnimatedComponent"),RH=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:o=n=>new xm(n),getComponentProps:r=n=>n}={})=>{let n={applyAnimatedValues:t,createAnimatedStyle:o,getComponentProps:r},i=s=>{let a=IH(s)||"Anonymous";return ae.str(s)?s=i[s]||(i[s]=EH(s,n)):s=s[TH]||(s[TH]=EH(s,n)),s.displayName=`Animated(${a})`,s};return Ui(e,(s,a)=>{ae.arr(e)&&(a=IH(s)),i[a]=i(s)}),{animated:i}},IH=e=>ae.str(e)?e:e&&ae.str(e.displayName)?e.displayName:ae.fun(e)&&e.name||null;function Qr(){return Qr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r])}return e},Qr.apply(this,arguments)}function wm(e,...t){return ae.fun(e)?e(...t):e}var Oy=(e,t)=>e===!0||!!(t&&e&&(ae.fun(e)?e(t):xn(e).includes(t))),HH=(e,t)=>ae.obj(e)?t&&e[t]:e,GH=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,$0e=e=>e,WH=(e,t=$0e)=>{let o=K0e;e.default&&e.default!==!0&&(e=e.default,o=Object.keys(e));let r={};for(let n of o){let i=t(e[n],n);ae.und(i)||(r[n]=i)}return r},K0e=["config","onProps","onStart","onChange","onPause","onResume","onRest"],Y0e={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function q0e(e){let t={},o=0;if(Ui(e,(r,n)=>{Y0e[n]||(t[n]=r,o++)}),o)return t}function $H(e){let t=q0e(e);if(t){let o={to:t};return Ui(e,(r,n)=>n in t||(o[n]=r)),o}return Qr({},e)}function Ay(e){return e=xr(e),ae.arr(e)?e.map(Ay):$h(e)?ti.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function iD(e){return ae.fun(e)||ae.arr(e)&&ae.obj(e[0])}var Z0e={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},S1=1.70158,y1=S1*1.525,OH=S1+1,AH=2*Math.PI/3,LH=2*Math.PI/4.5,_1=e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,X0e={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>e===0?0:Math.pow(2,10*e-10),easeOutExpo:e=>e===1?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>e===0?0:e===1?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>OH*e*e*e-S1*e*e,easeOutBack:e=>1+OH*Math.pow(e-1,3)+S1*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((y1+1)*2*e-y1)/2:(Math.pow(2*e-2,2)*((y1+1)*(e*2-2)+y1)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*AH),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*AH)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*LH))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*LH)/2+1,easeInBounce:e=>1-_1(1-e),easeOutBounce:_1,easeInOutBounce:e=>e<.5?(1-_1(1-2*e))/2:(1+_1(2*e-1))/2},sD=Qr({},Z0e.default,{mass:1,damping:1,easing:X0e.linear,clamp:!1}),aD=class{constructor(){this.tension=void 0,this.friction=void 0,this.frequency=void 0,this.damping=void 0,this.mass=void 0,this.velocity=0,this.restVelocity=void 0,this.precision=void 0,this.progress=void 0,this.duration=void 0,this.easing=void 0,this.clamp=void 0,this.bounce=void 0,this.decay=void 0,this.round=void 0,Object.assign(this,sD)}};function Q0e(e,t,o){o&&(o=Qr({},o),NH(o,t),t=Qr({},o,t)),NH(e,t),Object.assign(e,t);for(let s in sD)e[s]==null&&(e[s]=sD[s]);let{mass:r,frequency:n,damping:i}=e;return ae.und(n)||(n<.01&&(n=.01),i<0&&(i=0),e.tension=Math.pow(2*Math.PI/n,2)*r,e.friction=4*Math.PI*i*r/n),e}function NH(e,t){if(!ae.und(t.decay))e.duration=void 0;else{let o=!ae.und(t.tension)||!ae.und(t.friction);(o||!ae.und(t.frequency)||!ae.und(t.damping)||!ae.und(t.mass))&&(e.duration=void 0,e.decay=void 0),o&&(e.frequency=void 0)}}var MH=[],lD=class{constructor(){this.changed=!1,this.values=MH,this.toValues=null,this.fromValues=MH,this.to=void 0,this.from=void 0,this.config=new aD,this.immediate=!1}};function KH(e,{key:t,props:o,defaultProps:r,state:n,actions:i}){return new Promise((s,a)=>{var c;let u,d,f=Oy((c=o.cancel)!=null?c:r?.cancel,t);if(f)p();else{ae.und(o.pause)||(n.paused=Oy(o.pause,t));let g=r?.pause;g!==!0&&(g=n.paused||Oy(g,t)),u=wm(o.delay||0,t),g?(n.resumeQueue.add(h),i.pause()):(i.resume(),h())}function m(){n.resumeQueue.add(h),n.timeouts.delete(d),d.cancel(),u=d.time-Se.now()}function h(){u>0&&!ti.skipAnimation?(n.delayed=!0,d=Se.setTimeout(p,u),n.pauseQueue.add(m),n.timeouts.add(d)):p()}function p(){n.delayed&&(n.delayed=!1),n.pauseQueue.delete(m),n.timeouts.delete(d),e<=(n.cancelId||0)&&(f=!0);try{i.start(Qr({},o,{callId:e,cancel:f}),s)}catch(g){a(g)}}})}var hD=(e,t)=>t.length==1?t[0]:t.some(o=>o.cancelled)?Kh(e.get()):t.every(o=>o.noop)?YH(e.get()):zs(e.get(),t.every(o=>o.finished)),YH=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),zs=(e,t,o=!1)=>({value:e,finished:t,cancelled:o}),Kh=e=>({value:e,cancelled:!0,finished:!1});function qH(e,t,o,r){let{callId:n,parentId:i,onRest:s}=t,{asyncTo:a,promise:c}=o;return!i&&e===a&&!t.reset?c:o.promise=(async()=>{o.asyncId=n,o.asyncTo=e;let u=WH(t,(b,k)=>k==="onRest"?void 0:b),d,f,m=new Promise((b,k)=>(d=b,f=k)),h=b=>{let k=n<=(o.cancelId||0)&&Kh(r)||n!==o.asyncId&&zs(r,!1);if(k)throw b.result=k,f(b),b},p=(b,k)=>{let v=new x1,y=new w1;return(async()=>{if(ti.skipAnimation)throw Ly(o),y.result=zs(r,!1),f(y),y;h(v);let _=ae.obj(b)?Qr({},b):Qr({},k,{to:b});_.parentId=n,Ui(u,(C,B)=>{ae.und(_[B])&&(_[B]=C)});let S=await r.start(_);return h(v),o.paused&&await new Promise(C=>{o.resumeQueue.add(C)}),S})()},g;if(ti.skipAnimation)return Ly(o),zs(r,!1);try{let b;ae.arr(e)?b=(async k=>{for(let v of k)await p(v)})(e):b=Promise.resolve(e(p,r.stop.bind(r))),await Promise.all([b.then(d),m]),g=zs(r.get(),!0,!1)}catch(b){if(b instanceof x1)g=b.result;else if(b instanceof w1)g=b.result;else throw b}finally{n==o.asyncId&&(o.asyncId=i,o.asyncTo=i?a:void 0,o.promise=i?c:void 0)}return ae.fun(s)&&Se.batchedUpdates(()=>{s(g,r,r.item)}),g})()}function Ly(e,t){Hh(e.timeouts,o=>o.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var x1=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise."),this.result=void 0}},w1=class extends Error{constructor(){super("SkipAnimationSignal"),this.result=void 0}},cD=e=>e instanceof Ny,J0e=1,Ny=class extends Uh{constructor(...t){super(...t),this.id=J0e++,this.key=void 0,this._priority=0}get priority(){return this._priority}set priority(t){this._priority!=t&&(this._priority=t,this._onPriorityChange(t))}get(){let t=Fs(this);return t&&t.getValue()}to(...t){return ti.to(this,t)}interpolate(...t){return CH(),ti.to(this,t)}toJSON(){return this.get()}observerAdded(t){t==1&&this._attach()}observerRemoved(t){t==0&&this._detach()}_attach(){}_detach(){}_onChange(t,o=!1){ym(this,{type:"change",parent:this,value:t,idle:o})}_onPriorityChange(t){this.idle||Wh.sort(this),ym(this,{type:"priority",parent:this,priority:t})}},Cm=Symbol.for("SpringPhase"),ZH=1,uD=2,dD=4,rD=e=>(e[Cm]&ZH)>0,Ku=e=>(e[Cm]&uD)>0,Iy=e=>(e[Cm]&dD)>0,DH=(e,t)=>t?e[Cm]|=uD|ZH:e[Cm]&=~uD,VH=(e,t)=>t?e[Cm]|=dD:e[Cm]&=~dD,fD=class extends Ny{constructor(t,o){if(super(),this.key=void 0,this.animation=new lD,this.queue=void 0,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!ae.und(t)||!ae.und(o)){let r=ae.obj(t)?Qr({},t):Qr({},o,{from:t});ae.und(r.default)&&(r.default=!0),this.start(r)}}get idle(){return!(Ku(this)||this._state.asyncTo)||Iy(this)}get goal(){return xr(this.animation.to)}get velocity(){let t=Fs(this);return t instanceof _m?t.lastVelocity||0:t.getPayload().map(o=>o.lastVelocity||0)}get hasAnimated(){return rD(this)}get isAnimating(){return Ku(this)}get isPaused(){return Iy(this)}get isDelayed(){return this._state.delayed}advance(t){let o=!0,r=!1,n=this.animation,{config:i,toValues:s}=n,a=Ty(n.to);!a&&Xr(n.to)&&(s=xn(xr(n.to))),n.values.forEach((d,f)=>{if(d.done)return;let m=d.constructor==Sm?1:a?a[f].lastPosition:s[f],h=n.immediate,p=m;if(!h){if(p=d.lastPosition,i.tension<=0){d.done=!0;return}let g=d.elapsedTime+=t,b=n.fromValues[f],k=d.v0!=null?d.v0:d.v0=ae.arr(i.velocity)?i.velocity[f]:i.velocity,v,y=i.precision||(b==m?.005:Math.min(1,Math.abs(m-b)*.001));if(ae.und(i.duration))if(i.decay){let _=i.decay===!0?.998:i.decay,S=Math.exp(-(1-_)*g);p=b+k/(1-_)*(1-S),h=Math.abs(d.lastPosition-p)<=y,v=k*S}else{v=d.lastVelocity==null?k:d.lastVelocity;let _=i.restVelocity||y/10,S=i.clamp?0:i.bounce,C=!ae.und(S),B=b==m?d.v0>0:b<m,P,T=!1,E=1,L=Math.ceil(t/E);for(let I=0;I<L&&(P=Math.abs(v)>_,!(!P&&(h=Math.abs(m-p)<=y,h)));++I){C&&(T=p==m||p>m==B,T&&(v=-v*S,p=m));let R=-i.tension*1e-6*(p-m),V=-i.friction*.001*v,j=(R+V)/i.mass;v=v+j*E,p=p+v*E}}else{let _=1;i.duration>0&&(this._memoizedDuration!==i.duration&&(this._memoizedDuration=i.duration,d.durationProgress>0&&(d.elapsedTime=i.duration*d.durationProgress,g=d.elapsedTime+=t)),_=(i.progress||0)+g/this._memoizedDuration,_=_>1?1:_<0?0:_,d.durationProgress=_),p=b+i.easing(_)*(m-b),v=(p-d.lastPosition)/t,h=_==1}d.lastVelocity=v,Number.isNaN(p)&&(console.warn("Got NaN while animating:",this),h=!0)}a&&!a[f].done&&(h=!1),h?d.done=!0:o=!1,d.setValue(p,i.round)&&(r=!0)});let c=Fs(this),u=c.getValue();if(o){let d=xr(n.to);(u!==d||r)&&!i.decay?(c.setValue(d),this._onChange(d)):r&&i.decay&&this._onChange(u),this._stop()}else r&&this._onChange(u)}set(t){return Se.batchedUpdates(()=>{this._stop(),this._focus(t),this._set(t)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(Ku(this)){let{to:t,config:o}=this.animation;Se.batchedUpdates(()=>{this._onStart(),o.decay||this._set(t,!1),this._stop()})}return this}update(t){return(this.queue||(this.queue=[])).push(t),this}start(t,o){let r;return ae.und(t)?(r=this.queue||[],this.queue=[]):r=[ae.obj(t)?t:Qr({},o,{to:t})],Promise.all(r.map(n=>this._update(n))).then(n=>hD(this,n))}stop(t){let{to:o}=this.animation;return this._focus(this.get()),Ly(this._state,t&&this._lastCallId),Se.batchedUpdates(()=>this._stop(o,t)),this}reset(){this._update({reset:!0})}eventObserved(t){t.type=="change"?this._start():t.type=="priority"&&(this.priority=t.priority+1)}_prepareNode(t){let o=this.key||"",{to:r,from:n}=t;r=ae.obj(r)?r[o]:r,(r==null||iD(r))&&(r=void 0),n=ae.obj(n)?n[o]:n,n==null&&(n=void 0);let i={to:r,from:n};return rD(this)||(t.reverse&&([r,n]=[n,r]),n=xr(n),ae.und(n)?Fs(this)||this._set(r):this._set(n)),i}_update(t,o){let r=Qr({},t),{key:n,defaultProps:i}=this;r.default&&Object.assign(i,WH(r,(c,u)=>/^on/.test(u)?HH(c,n):c)),zH(this,r,"onProps"),Ry(this,"onProps",r,this);let s=this._prepareNode(r);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");let a=this._state;return KH(++this._lastCallId,{key:n,props:r,defaultProps:i,state:a,actions:{pause:()=>{Iy(this)||(VH(this,!0),Gh(a.pauseQueue),Ry(this,"onPause",zs(this,Py(this,this.animation.to)),this))},resume:()=>{Iy(this)&&(VH(this,!1),Ku(this)&&this._resume(),Gh(a.resumeQueue),Ry(this,"onResume",zs(this,Py(this,this.animation.to)),this))},start:this._merge.bind(this,s)}}).then(c=>{if(r.loop&&c.finished&&!(o&&c.noop)){let u=XH(r);if(u)return this._update(u,!0)}return c})}_merge(t,o,r){if(o.cancel)return this.stop(!0),r(Kh(this));let n=!ae.und(t.to),i=!ae.und(t.from);if(n||i)if(o.callId>this._lastToId)this._lastToId=o.callId;else return r(Kh(this));let{key:s,defaultProps:a,animation:c}=this,{to:u,from:d}=c,{to:f=u,from:m=d}=t;i&&!n&&(!o.default||ae.und(f))&&(f=m),o.reverse&&([f,m]=[m,f]);let h=!Ra(m,d);h&&(c.from=m),m=xr(m);let p=!Ra(f,u);p&&this._focus(f);let g=iD(o.to),{config:b}=c,{decay:k,velocity:v}=b;(n||i)&&(b.velocity=0),o.config&&!g&&Q0e(b,wm(o.config,s),o.config!==a.config?wm(a.config,s):void 0);let y=Fs(this);if(!y||ae.und(f))return r(zs(this,!0));let _=ae.und(o.reset)?i&&!o.default:!ae.und(m)&&Oy(o.reset,s),S=_?m:this.get(),C=Ay(f),B=ae.num(C)||ae.arr(C)||$h(C),P=!g&&(!B||Oy(a.immediate||o.immediate,s));if(p){let I=k1(f);if(I!==y.constructor)if(P)y=this._set(C);else throw Error(`Cannot animate between ${y.constructor.name} and ${I.name}, as the "to" prop suggests`)}let T=y.constructor,E=Xr(f),L=!1;if(!E){let I=_||!rD(this)&&h;(p||I)&&(L=Ra(Ay(S),C),E=!L),(!Ra(c.immediate,P)&&!P||!Ra(b.decay,k)||!Ra(b.velocity,v))&&(E=!0)}if(L&&Ku(this)&&(c.changed&&!_?E=!0:E||this._stop(u)),!g&&((E||Xr(u))&&(c.values=y.getPayload(),c.toValues=Xr(f)?null:T==Sm?[1]:xn(C)),c.immediate!=P&&(c.immediate=P,!P&&!_&&this._set(u)),E)){let{onRest:I}=c;St(exe,V=>zH(this,o,V));let R=zs(this,Py(this,u));Gh(this._pendingCalls,R),this._pendingCalls.add(r),c.changed&&Se.batchedUpdates(()=>{c.changed=!_,I?.(R,this),_?wm(a.onRest,R):c.onStart==null||c.onStart(R,this)})}_&&this._set(S),g?r(qH(o.to,o,this._state,this)):E?this._start():Ku(this)&&!p?this._pendingCalls.add(r):r(YH(S))}_focus(t){let o=this.animation;t!==o.to&&(Q5(this)&&this._detach(),o.to=t,Q5(this)&&this._attach())}_attach(){let t=0,{to:o}=this.animation;Xr(o)&&(Wu(o,this),cD(o)&&(t=o.priority+1)),this.priority=t}_detach(){let{to:t}=this.animation;Xr(t)&&$u(t,this)}_set(t,o=!0){let r=xr(t);if(!ae.und(r)){let n=Fs(this);if(!n||!Ra(r,n.getValue())){let i=k1(r);!n||n.constructor!=i?v1(this,i.create(r)):n.setValue(r),n&&Se.batchedUpdates(()=>{this._onChange(r,o)})}}return Fs(this)}_onStart(){let t=this.animation;t.changed||(t.changed=!0,Ry(this,"onStart",zs(this,Py(this,t.to)),this))}_onChange(t,o){o||(this._onStart(),wm(this.animation.onChange,t,this)),wm(this.defaultProps.onChange,t,this),super._onChange(t,o)}_start(){let t=this.animation;Fs(this).reset(xr(t.to)),t.immediate||(t.fromValues=t.values.map(o=>o.lastPosition)),Ku(this)||(DH(this,!0),Iy(this)||this._resume())}_resume(){ti.skipAnimation?this.finish():Wh.start(this)}_stop(t,o){if(Ku(this)){DH(this,!1);let r=this.animation;St(r.values,i=>{i.done=!0}),r.toValues&&(r.onChange=r.onPause=r.onResume=void 0),ym(this,{type:"idle",parent:this});let n=o?Kh(this.get()):zs(this.get(),Py(this,t??r.to));Gh(this._pendingCalls,n),r.changed&&(r.changed=!1,Ry(this,"onRest",n,this))}}};function Py(e,t){let o=Ay(t),r=Ay(e.get());return Ra(r,o)}function XH(e,t=e.loop,o=e.to){let r=wm(t);if(r){let n=r!==!0&&$H(r),i=(n||e).reverse,s=!n||n.reset;return mD(Qr({},e,{loop:t,default:!1,pause:void 0,to:!i||iD(o)?o:void 0,from:s?e.from:void 0,reset:s},n))}}function mD(e){let{to:t,from:o}=e=$H(e),r=new Set;return ae.obj(t)&&FH(t,r),ae.obj(o)&&FH(o,r),e.keys=r.size?Array.from(r):null,e}function FH(e,t){Ui(e,(o,r)=>o!=null&&t.add(r))}var exe=["onStart","onRest","onChange","onPause","onResume"];function zH(e,t,o){e.animation[o]=t[o]!==GH(t,o)?HH(t[o],e.key):void 0}function Ry(e,t,...o){var r,n,i,s;(r=(n=e.animation)[t])==null||r.call(n,...o),(i=(s=e.defaultProps)[t])==null||i.call(s,...o)}var txe=["onStart","onChange","onRest"],oxe=1,C1=class{constructor(t,o){this.id=oxe++,this.springs={},this.queue=[],this.ref=void 0,this._flush=void 0,this._initialProps=void 0,this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._item=void 0,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),o&&(this._flush=o),t&&this.start(Qr({default:!0},t))}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(t=>t.idle&&!t.isDelayed&&!t.isPaused)}get item(){return this._item}set item(t){this._item=t}get(){let t={};return this.each((o,r)=>t[r]=o.get()),t}set(t){for(let o in t){let r=t[o];ae.und(r)||this.springs[o].set(r)}}update(t){return t&&this.queue.push(mD(t)),this}start(t){let{queue:o}=this;return t?o=xn(t).map(mD):this.queue=[],this._flush?this._flush(this,o):(JH(this,o),rxe(this,o))}stop(t,o){if(t!==!!t&&(o=t),o){let r=this.springs;St(xn(o),n=>r[n].stop(!!t))}else Ly(this._state,this._lastAsyncId),this.each(r=>r.stop(!!t));return this}pause(t){if(ae.und(t))this.start({pause:!0});else{let o=this.springs;St(xn(t),r=>o[r].pause())}return this}resume(t){if(ae.und(t))this.start({pause:!1});else{let o=this.springs;St(xn(t),r=>o[r].resume())}return this}each(t){Ui(this.springs,t)}_onFrame(){let{onStart:t,onChange:o,onRest:r}=this._events,n=this._active.size>0,i=this._changed.size>0;(n&&!this._started||i&&!this._started)&&(this._started=!0,Hh(t,([c,u])=>{u.value=this.get(),c(u,this,this._item)}));let s=!n&&this._started,a=i||s&&r.size?this.get():null;i&&o.size&&Hh(o,([c,u])=>{u.value=a,c(u,this,this._item)}),s&&(this._started=!1,Hh(r,([c,u])=>{u.value=a,c(u,this,this._item)}))}eventObserved(t){if(t.type=="change")this._changed.add(t.parent),t.idle||this._active.add(t.parent);else if(t.type=="idle")this._active.delete(t.parent);else return;Se.onFrame(this._onFrame)}};function rxe(e,t){return Promise.all(t.map(o=>QH(e,o))).then(o=>hD(e,o))}async function QH(e,t,o){let{keys:r,to:n,from:i,loop:s,onRest:a,onResolve:c}=t,u=ae.obj(t.default)&&t.default;s&&(t.loop=!1),n===!1&&(t.to=null),i===!1&&(t.from=null);let d=ae.arr(n)||ae.fun(n)?n:void 0;d?(t.to=void 0,t.onRest=void 0,u&&(u.onRest=void 0)):St(txe,g=>{let b=t[g];if(ae.fun(b)){let k=e._events[g];t[g]=({finished:v,cancelled:y})=>{let _=k.get(b);_?(v||(_.finished=!1),y&&(_.cancelled=!0)):k.set(b,{value:null,finished:v||!1,cancelled:y||!1})},u&&(u[g]=t[g])}});let f=e._state;t.pause===!f.paused?(f.paused=t.pause,Gh(t.pause?f.pauseQueue:f.resumeQueue)):f.paused&&(t.pause=!0);let m=(r||Object.keys(e.springs)).map(g=>e.springs[g].start(t)),h=t.cancel===!0||GH(t,"cancel")===!0;(d||h&&f.asyncId)&&m.push(KH(++e._lastAsyncId,{props:t,state:f,actions:{pause:d1,resume:d1,start(g,b){h?(Ly(f,e._lastAsyncId),b(Kh(e))):(g.onRest=a,b(qH(d,g,f,e)))}}})),f.paused&&await new Promise(g=>{f.resumeQueue.add(g)});let p=hD(e,await Promise.all(m));if(s&&p.finished&&!(o&&p.noop)){let g=XH(t,s,n);if(g)return JH(e,[g]),QH(e,g,!0)}return c&&Se.batchedUpdates(()=>c(p,e,e.item)),p}function nxe(e,t){let o=new fD;return o.key=e,t&&Wu(o,t),o}function ixe(e,t,o){t.keys&&St(t.keys,r=>{(e[r]||(e[r]=o(r)))._prepareNode(t)})}function JH(e,t){St(t,o=>{ixe(e.springs,o,r=>nxe(r,e))})}function sxe(e,t){if(e==null)return{};var o={},r=Object.keys(e),n,i;for(i=0;i<r.length;i++)n=r[i],!(t.indexOf(n)>=0)&&(o[n]=e[n]);return o}var axe=["children"],gD=e=>{let{children:t}=e,o=sxe(e,axe),r=(0,Dy.useContext)(B1),n=o.pause||!!r.pause,i=o.immediate||!!r.immediate;o=BH(()=>({pause:n,immediate:i}),[n,i]);let{Provider:s}=B1;return My.createElement(s,{value:o},t)},B1=lxe(gD,{});gD.Provider=B1.Provider;gD.Consumer=B1.Consumer;function lxe(e,t){return Object.assign(e,My.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var jH;(function(e){e.MOUNT="mount",e.ENTER="enter",e.UPDATE="update",e.LEAVE="leave"})(jH||(jH={}));var pD=class extends Ny{constructor(t,o){super(),this.key=void 0,this.idle=!0,this.calc=void 0,this._active=new Set,this.source=t,this.calc=Gu(...o);let r=this._get(),n=k1(r);v1(this,n.create(r))}advance(t){let o=this._get(),r=this.get();Ra(o,r)||(Fs(this).setValue(o),this._onChange(o,this.idle)),!this.idle&&UH(this._active)&&nD(this)}_get(){let t=ae.arr(this.source)?this.source.map(xr):xn(xr(this.source));return this.calc(...t)}_start(){this.idle&&!UH(this._active)&&(this.idle=!1,St(Ty(this),t=>{t.done=!1}),ti.skipAnimation?(Se.batchedUpdates(()=>this.advance()),nD(this)):Wh.start(this))}_attach(){let t=1;St(xn(this.source),o=>{Xr(o)&&Wu(o,this),cD(o)&&(o.idle||this._active.add(o),t=Math.max(t,o.priority+1))}),this.priority=t,this._start()}_detach(){St(xn(this.source),t=>{Xr(t)&&$u(t,this)}),this._active.clear(),nD(this)}eventObserved(t){t.type=="change"?t.idle?this.advance():(this._active.add(t.parent),this._start()):t.type=="idle"?this._active.delete(t.parent):t.type=="priority"&&(this.priority=xn(this.source).reduce((o,r)=>Math.max(o,(cD(r)?r.priority:0)+1),0))}};function cxe(e){return e.idle!==!1}function UH(e){return!e.size||Array.from(e).every(cxe)}function nD(e){e.idle||(e.idle=!0,St(Ty(e),t=>{t.done=!0}),ym(e,{type:"idle",parent:e}))}ti.assign({createStringInterpolator:p1,to:(e,t)=>new pD(e,t)});var P7e=Wh.advance;var oG=l(bD());function _D(e,t){if(e==null)return{};var o={},r=Object.keys(e),n,i;for(i=0;i<r.length;i++)n=r[i],!(t.indexOf(n)>=0)&&(o[n]=e[n]);return o}var uxe=["style","children","scrollTop","scrollLeft"],rG=/^--/;function dxe(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!rG.test(e)&&!(Vy.hasOwnProperty(e)&&Vy[e])?t+"px":(""+t).trim()}var tG={};function fxe(e,t){if(!e.nodeType||!e.setAttribute)return!1;let o=e.nodeName==="filter"||e.parentNode&&e.parentNode.nodeName==="filter",r=t,{style:n,children:i,scrollTop:s,scrollLeft:a}=r,c=_D(r,uxe),u=Object.values(c),d=Object.keys(c).map(f=>o||e.hasAttribute(f)?f:tG[f]||(tG[f]=f.replace(/([A-Z])/g,m=>"-"+m.toLowerCase())));i!==void 0&&(e.textContent=i);for(let f in n)if(n.hasOwnProperty(f)){let m=dxe(f,n[f]);rG.test(f)?e.style.setProperty(f,m):e.style[f]=m}d.forEach((f,m)=>{e.setAttribute(f,u[m])}),s!==void 0&&(e.scrollTop=s),a!==void 0&&(e.scrollLeft=a)}var Vy={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},mxe=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),pxe=["Webkit","Ms","Moz","O"];Vy=Object.keys(Vy).reduce((e,t)=>(pxe.forEach(o=>e[mxe(o,t)]=e[t]),e),Vy);var hxe=["x","y","z"],gxe=/^(matrix|translate|scale|rotate|skew)/,bxe=/^(translate)/,vxe=/^(rotate|skew)/,vD=(e,t)=>ae.num(e)&&e!==0?e+t:e,E1=(e,t)=>ae.arr(e)?e.every(o=>E1(o,t)):ae.num(e)?e===t:parseFloat(e)===t,kD=class extends xm{constructor(t){let{x:o,y:r,z:n}=t,i=_D(t,hxe),s=[],a=[];(o||r||n)&&(s.push([o||0,r||0,n||0]),a.push(c=>[`translate3d(${c.map(u=>vD(u,"px")).join(",")})`,E1(c,0)])),Ui(i,(c,u)=>{if(u==="transform")s.push([c||""]),a.push(d=>[d,d===""]);else if(gxe.test(u)){if(delete i[u],ae.und(c))return;let d=bxe.test(u)?"px":vxe.test(u)?"deg":"";s.push(xn(c)),a.push(u==="rotate3d"?([f,m,h,p])=>[`rotate3d(${f},${m},${h},${vD(p,d)})`,E1(p,0)]:f=>[`${u}(${f.map(m=>vD(m,d)).join(",")})`,E1(f,u.startsWith("scale")?1:0)])}}),s.length&&(i.transform=new yD(s,a)),super(i)}},yD=class extends Uh{constructor(t,o){super(),this._value=null,this.inputs=t,this.transforms=o}get(){return this._value||(this._value=this._get())}_get(){let t="",o=!0;return St(this.inputs,(r,n)=>{let i=xr(r[0]),[s,a]=this.transforms[n](ae.arr(i)?i:r.map(xr));t+=" "+s,o=o&&a}),o?"none":t}observerAdded(t){t==1&&St(this.inputs,o=>St(o,r=>Xr(r)&&Wu(r,this)))}observerRemoved(t){t==0&&St(this.inputs,o=>St(o,r=>Xr(r)&&$u(r,this)))}eventObserved(t){t.type=="change"&&(this._value=null),ym(this,t)}},kxe=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],yxe=["scrollTop","scrollLeft"];ti.assign({batchedUpdates:oG.unstable_batchedUpdates,createStringInterpolator:p1,colors:yH});var _xe=RH(kxe,{applyAnimatedValues:fxe,createAnimatedStyle:e=>new kD(e),getComponentProps:e=>_D(e,yxe)}),nG=_xe.animated;var Yh=l(O(),1),sG=l(Ve(),1),aG=l(z(),1);var Sxe=200;function iG(e){return{top:e.offsetTop,left:e.offsetLeft}}function xxe({triggerAnimationOnChange:e,clientId:t}){let o=(0,Yh.useRef)(),{isTyping:r,getGlobalBlockCount:n,isBlockSelected:i,isFirstMultiSelectedBlock:s,isBlockMultiSelected:a,isAncestorMultiSelected:c,isDraggingBlocks:u}=(0,aG.useSelect)(x),{previous:d,prevRect:f}=(0,Yh.useMemo)(()=>({previous:o.current&&iG(o.current),prevRect:o.current&&o.current.getBoundingClientRect()}),[e]);return(0,Yh.useLayoutEffect)(()=>{if(!d||!o.current)return;let m=(0,sG.getScrollContainer)(o.current),h=i(t),p=h||s(t),g=u();function b(){if(!g&&p&&f){let T=o.current.getBoundingClientRect().top-f.top;T&&(m.scrollTop+=T)}}if(window.matchMedia("(prefers-reduced-motion: reduce)").matches||r()||n()>Sxe){b();return}let v=h||a(t)||c(t);if(v&&g)return;let y=v?"1":"",_=new C1({x:0,y:0,config:{mass:5,tension:2e3,friction:200},onChange({value:P}){if(!o.current)return;let{x:T,y:E}=P;T=Math.round(T),E=Math.round(E);let L=T===0&&E===0;o.current.style.transformOrigin="center center",o.current.style.transform=L?null:`translate3d(${T}px,${E}px,0)`,o.current.style.zIndex=y,b()}});o.current.style.transform=void 0;let S=iG(o.current),C=Math.round(d.left-S.left),B=Math.round(d.top-S.top);return _.start({x:0,y:0,from:{x:C,y:B}}),()=>{_.stop(),_.set({x:0,y:0})}},[d,f,t,r,n,i,s,a,c,u]),o}var T1=xxe;var P1=l(O(),1),Hl=l(Ve(),1),cG=l(z(),1);var I1=".block-editor-block-list__block",wxe=".block-list-appender",Cxe=".block-editor-button-block-appender";function lG(e,t){return e.closest(I1)===t.closest(I1)}function Oa(e,t){return t.closest([I1,wxe,Cxe].join(","))===e}function Hi(e){for(;e&&e.nodeType!==e.ELEMENT_NODE;)e=e.parentNode;if(!e)return;let o=e.closest(I1);if(o)return o.id.slice(6)}function SD(e,t){let o=Math.min(e.left,t.left),r=Math.max(e.right,t.right),n=Math.max(e.bottom,t.bottom),i=Math.min(e.top,t.top);return new window.DOMRectReadOnly(o,i,r-o,n-i)}function Bxe(e){let t=e.ownerDocument.defaultView;if(!t||e.hasAttribute("data-visually-hidden"))return!1;let o=e.getBoundingClientRect();if(o.width===0||o.height===0)return!1;if(e.checkVisibility)return e.checkVisibility?.({opacityProperty:!0,contentVisibilityAuto:!0,visibilityProperty:!0});let r=t.getComputedStyle(e);return!(r.display==="none"||r.visibility==="hidden"||r.opacity==="0")}function Exe(e){let t=window.getComputedStyle(e);return t.overflowX==="auto"||t.overflowX==="scroll"||t.overflowY==="auto"||t.overflowY==="scroll"}var Txe=["core/navigation"];function qh(e){let t=e.ownerDocument.defaultView;if(!t)return new window.DOMRectReadOnly;let o=e.getBoundingClientRect(),r=e.getAttribute("data-type");if(r&&Txe.includes(r)){let s=[e],a;for(;a=s.pop();)if(!Exe(a)){for(let c of a.children)if(Bxe(c)){let u=c.getBoundingClientRect();o=SD(o,u),s.push(c)}}}let n=Math.max(o.left,0),i=Math.min(o.right,t.innerWidth);return o=new window.DOMRectReadOnly(n,o.top,i-n,o.height),o}function uG({clientId:e,initialPosition:t}){let o=(0,P1.useRef)(),{isBlockSelected:r,isMultiSelecting:n,isZoomOut:i}=M((0,cG.useSelect)(x));return(0,P1.useEffect)(()=>{if(!r(e)||n()||i()||t==null||!o.current)return;let{ownerDocument:s}=o.current;if(Oa(o.current,s.activeElement))return;let a=Hl.focus.tabbable.find(o.current).filter(d=>(0,Hl.isTextField)(d)),c=t===-1,u=a[c?a.length-1:0]||o.current;if(!Oa(o.current,u)){o.current.focus();return}if(!o.current.getAttribute("contenteditable")){let d=Hl.focus.tabbable.findNext(o.current);if(d&&Oa(o.current,d)&&(0,Hl.isFormElement)(d)){d.focus();return}}(0,Hl.placeCaretAtHorizontalEdge)(u,c)},[t,e]),o}var dG=l(X(),1);function R1(e){e.defaultPrevented||(e.preventDefault(),e.currentTarget.classList.toggle("is-hovered",e.type==="mouseover"))}function fG({isEnabled:e=!0}={}){return(0,dG.useRefEffect)(t=>{if(e)return t.addEventListener("mouseout",R1),t.addEventListener("mouseover",R1),()=>{t.removeEventListener("mouseout",R1),t.removeEventListener("mouseover",R1),t.classList.remove("is-hovered")}},[e])}var O1=l(z(),1),mG=l(X(),1);function pG(e){let{isBlockSelected:t}=(0,O1.useSelect)(x),{selectBlock:o,selectionChange:r}=(0,O1.useDispatch)(x);return(0,mG.useRefEffect)(n=>{function i(s){if(!n.parentElement.closest('[contenteditable="true"]')){if(t(e)){s.target.isContentEditable||r(e);return}Oa(n,s.target)&&o(e)}}return n.addEventListener("focusin",i),()=>{n.removeEventListener("focusin",i)}},[t,o])}var Zh=l(Y(),1),gG=l(Ve(),1),Yu=l(ot(),1),A1=l(z(),1),bG=l(X(),1);function hG(e){return!e||e==="transparent"||e==="rgba(0, 0, 0, 0)"}function vG({clientId:e,isSelected:t}){let{getBlockRootClientId:o,isZoomOut:r,hasMultiSelection:n,isSectionBlock:i,editedContentOnlySection:s,getBlock:a}=M((0,A1.useSelect)(x)),{insertAfterBlock:c,removeBlock:u,resetZoomLevel:d,startDraggingBlocks:f,stopDraggingBlocks:m,editContentOnlySection:h}=M((0,A1.useDispatch)(x));return(0,bG.useRefEffect)(p=>{if(!t)return;function g(v){let{keyCode:y,target:_}=v;y!==Yu.ENTER&&y!==Yu.BACKSPACE&&y!==Yu.DELETE||_!==p||(0,gG.isTextField)(_)||(v.preventDefault(),y===Yu.ENTER&&r()?d():y===Yu.ENTER?c(e):u(e))}function b(v){if(p!==v.target||p.isContentEditable||p.ownerDocument.activeElement!==p||n()){v.preventDefault();return}let y=JSON.stringify({type:"block",srcClientIds:[e],srcRootClientId:o(e)});v.dataTransfer.effectAllowed="move",v.dataTransfer.clearData(),v.dataTransfer.setData("wp-blocks",y);let{ownerDocument:_}=p,{defaultView:S}=_;S.getSelection().removeAllRanges();let B=_.createElement("div");B.style.width="1px",B.style.height="1px",B.style.position="fixed",B.style.visibility="hidden",_.body.appendChild(B),v.dataTransfer.setDragImage(B,0,0);let P=p.getBoundingClientRect(),T=p.id,E=p.cloneNode();E.style.display="none",p.id=null,p.after(E);let L=1;{let ee=p;for(;ee=ee.parentElement;){let{scale:K}=S.getComputedStyle(ee);if(K&&K!=="none"){L=parseFloat(K);break}}}let I=1/L,R={};for(let ee of["transform","transformOrigin","transition","zIndex","position","top","left","pointerEvents","opacity","backgroundColor"])R[ee]=p.style[ee];let V=S.scrollY,j=S.scrollX,H=v.clientX,F=v.clientY;p.style.position="relative",p.style.top="0px",p.style.left="0px";let U=v.clientX-P.left,G=v.clientY-P.top,W=P.height>200?200/P.height:1;if(p.style.zIndex="1000",p.style.transformOrigin=`${U*I}px ${G*I}px`,p.style.transition="transform 0.2s ease-out",p.style.transform=`scale(${W})`,p.style.opacity="0.9",hG(S.getComputedStyle(p).backgroundColor)){let ee="transparent",K=p;for(;K=K.parentElement;){let{backgroundColor:te}=S.getComputedStyle(K);if(!hG(te)){ee=te;break}}p.style.backgroundColor=ee}let J=!1,le=H,oe=F;function re(ee){ee.clientX===le&&ee.clientY===oe||(le=ee.clientX,oe=ee.clientY,Q())}function Q(){J||(J=!0,p.style.pointerEvents="none");let ee=oe-F,K=le-H,te=S.scrollY,ne=S.scrollX,q=te-V,se=ne-j,he=ee+q,me=K+se;p.style.top=`${he*I}px`,p.style.left=`${me*I}px`}function $(){_.removeEventListener("dragover",re),_.removeEventListener("dragend",$),_.removeEventListener("drop",$),_.removeEventListener("scroll",Q);for(let[ee,K]of Object.entries(R))p.style[ee]=K;E.remove(),p.id=T,B.remove(),m(),document.body.classList.remove("is-dragging-components-draggable"),_.documentElement.classList.remove("is-dragging")}_.addEventListener("dragover",re),_.addEventListener("dragend",$),_.addEventListener("drop",$),_.addEventListener("scroll",Q),f([e]),document.body.classList.add("is-dragging-components-draggable"),_.documentElement.classList.add("is-dragging")}p.addEventListener("keydown",g),p.addEventListener("dragstart",b);function k(v){let y=i(e),_=a(e),S=(0,Zh.isReusableBlock)(_),C=(0,Zh.isTemplatePart)(_);!y||s===e||S||C||(v.preventDefault(),h(e))}return p.addEventListener("dblclick",k),()=>{p.removeEventListener("keydown",g),p.removeEventListener("dragstart",b),p.removeEventListener("dblclick",k)}},[e,t,o,a,Zh.isReusableBlock,Zh.isTemplatePart,c,u,r,d,n,f,m,i,s,h])}var kG=l(X(),1),yG=l(O(),1);function _G(){let e=(0,yG.useContext)(L1);return(0,kG.useRefEffect)(t=>{if(e)return e.observe(t),()=>{e.unobserve(t)}},[e])}var N1=l(X(),1);function SG({isSelected:e}){let t=(0,N1.useReducedMotion)();return(0,N1.useRefEffect)(o=>{if(e){let{ownerDocument:r}=o,{defaultView:n}=r;if(!n.IntersectionObserver)return;let i=new n.IntersectionObserver(s=>{s[0].isIntersecting||o.scrollIntoView({behavior:t?"instant":"smooth"}),i.disconnect()});return i.observe(o),()=>{i.disconnect()}}},[e])}var xG=l(X(),1),wG=l(z(),1);function M1({clientId:e="",isEnabled:t=!0}={}){let{getEnabledClientIdsTree:o}=M((0,wG.useSelect)(x));return(0,xG.useRefEffect)(r=>{if(!t)return;let n=()=>{o(e).forEach(({clientId:s})=>{let a=r.querySelector(`[data-block="${s}"]`);a&&(a.classList.remove("has-editable-outline"),a.offsetWidth,a.classList.add("has-editable-outline"))})},i=s=>{(s.target===r||s.target.classList.contains("is-root-container"))&&(s.defaultPrevented||(s.preventDefault(),n()))};return r.addEventListener("click",i),()=>r.removeEventListener("click",i)},[t])}var CG=l(X(),1),Fy=new Map;function Ixe(e,t){let o=Fy.get(e);o||(o=new Set,Fy.set(e,o),e.addEventListener("pointerdown",EG)),o.add(t)}function Pxe(e,t){let o=Fy.get(e);o&&(o.delete(t),BG(t),o.size===0&&(Fy.delete(e),e.removeEventListener("pointerdown",EG)))}function BG(e){let t=e.getAttribute("data-draggable");t&&(e.removeAttribute("data-draggable"),t==="true"&&!e.getAttribute("draggable")&&e.setAttribute("draggable","true"))}function EG(e){let{target:t}=e,{ownerDocument:o,isContentEditable:r,tagName:n}=t,i=["INPUT","TEXTAREA"].includes(n),s=Fy.get(o);if(r||i)for(let a of s)a.getAttribute("draggable")==="true"&&a.contains(t)&&(a.removeAttribute("draggable"),a.setAttribute("data-draggable","true"));else for(let a of s)BG(a)}function TG(){return(0,CG.useRefEffect)(e=>(Ixe(e.ownerDocument,e),()=>{Pxe(e.ownerDocument,e)}),[])}var So=l(N(),1),wn=l(O(),1),Jr=l(A(),1),Xh=l(z(),1),OG=l(js(),1),AG=l(Xn(),1);var zy=l(N(),1);function Rxe(e,t){if(!e)return!1;let o=e.attributes?.metadata?.blockVisibility;if(o===!0||typeof o!="object")return!1;let r=o.viewport;return!r||typeof r!="object"||!Su.some(([,{key:n}])=>n===t)?!1:r[t]===!1}function PG(e,t){if(!e?.length)return!1;let o=e.filter(r=>Rxe(r,t)).length;return o===0?!1:o===e.length?!0:null}function RG(e){if(!e?.length)return!1;let t=e.filter(o=>o&&o.attributes?.metadata?.blockVisibility===!1).length;return t===0?!1:t===e.length?!0:null}function jy(e){if(!e&&e!==!1)return null;if(e===!1)return(0,zy.__)("Block is hidden");if(e?.viewport){let t=Su.filter(([o])=>e.viewport?.[o]===!1).map(([,o])=>o.label);if(t.length>0)return(0,zy.sprintf)((0,zy.__)("Block is hidden on %s"),t.join(", "))}return null}var fo=l(w(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='e252bf6889']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","e252bf6889"),e.appendChild(document.createTextNode(".block-editor-block-visibility-modal{z-index:1000001}.block-editor-block-visibility-modal__options{border:0;list-style:none;margin:24px 0;padding:0}.block-editor-block-visibility-modal__options-item{align-items:center;display:flex;gap:24px;justify-content:space-between;margin:0 0 16px}.block-editor-block-visibility-modal__options-item:last-child{margin:0}.block-editor-block-visibility-modal__options-item--everywhere{align-items:start;flex-direction:column}.block-editor-block-visibility-modal__options-checkbox--everywhere{font-weight:600}.block-editor-block-visibility-modal__options-icon--checked{fill:#ddd}.block-editor-block-visibility-modal__sub-options{padding-inline-start:12px;width:100%}.block-editor-block-visibility-modal__description{color:#757575;font-size:12px}.block-editor-block-visibility-info{align-items:center;display:flex;justify-content:start;margin:0 16px 16px;padding-bottom:4px;padding-top:4px}")),document.head.appendChild(e)}var Oxe={[It.mobile.key]:!1,[It.tablet.key]:!1,[It.desktop.key]:!1},Axe=[];function xD({clientIds:e,onClose:t}){let{createSuccessNotice:o}=(0,Xh.useDispatch)(AG.store),{updateBlockAttributes:r}=(0,Xh.useDispatch)(x),n=(0,Xh.useSelect)(v=>v(x).getBlocksByClientId(e)??Axe,[e]),i=(0,Xh.useSelect)(v=>v(OG.store).getShortcutRepresentation("core/editor/toggle-list-view"),[]),s=(0,wn.useMemo)(()=>{if(n?.length===0)return{hideEverywhere:!1,viewportChecked:{}};let v={};return Su.forEach(([,{key:y}])=>{v[y]=PG(n,y)}),{hideEverywhere:RG(n),viewportChecked:v}},[n]),[a,c]=(0,wn.useState)(s?.viewportChecked??{}),[u,d]=(0,wn.useState)(s?.hideEverywhere??!1),f=(0,wn.useCallback)((v,y)=>{c({...a,[v]:y})},[a]),m=(0,wn.useMemo)(()=>{if(!u)return(0,So.sprintf)((0,So.__)("Block visibility settings updated. You can access them via the List View (%s)."),i);let v=n?.length>1?(0,So.__)("Blocks hidden. You can access them via the List View (%s)."):(0,So.__)("Block hidden. You can access it via the List View (%s).");return(0,So.sprintf)(v,i)},[u,n?.length,i]),h=(0,wn.useMemo)(()=>Object.values(a).some(v=>v===!0||v===null),[a]),p=(0,wn.useMemo)(()=>u!==s.hideEverywhere?!0:Su.some(([,{key:v}])=>a[v]!==s.viewportChecked[v]),[u,a,s]),g=(0,wn.useMemo)(()=>u===null?!0:Object.values(a).some(v=>v===null),[u,a]),b=(0,wn.useCallback)(v=>{v.preventDefault();let y=u?!1:{viewport:Su.reduce((S,[,{key:C}])=>(a[C]&&(S[C]=!1),S),{})},_=Object.fromEntries(n.map(({clientId:S,attributes:C})=>[S,{metadata:Le({...C?.metadata,blockVisibility:y})}]));r(e,_,{uniqueByBlock:!0}),o(m,{id:u?"block-visibility-hidden":"block-visibility-viewports-updated",type:"snackbar"}),t()},[n,e,o,u,m,t,r,a]),k=n?.length>1;return(0,fo.jsx)(Jr.Modal,{title:e?.length>1?(0,So.__)("Hide blocks"):(0,So.__)("Hide block"),onRequestClose:t,overlayClassName:"block-editor-block-visibility-modal",size:"small",children:(0,fo.jsxs)("form",{onSubmit:b,children:[(0,fo.jsxs)("fieldset",{children:[(0,fo.jsx)("legend",{children:k?(0,So.__)("Select the viewport sizes for which you want to hide the blocks. Changes will apply to all selected blocks."):(0,So.__)("Select the viewport size for which you want to hide the block.")}),(0,fo.jsx)("ul",{className:"block-editor-block-visibility-modal__options",children:(0,fo.jsxs)("li",{className:"block-editor-block-visibility-modal__options-item block-editor-block-visibility-modal__options-item--everywhere",children:[(0,fo.jsx)(Jr.CheckboxControl,{className:"block-editor-block-visibility-modal__options-checkbox--everywhere",label:(0,So.__)("Omit from published content"),checked:u===!0,indeterminate:u===null,onChange:v=>{d(v),c(Oxe)}}),u!==!0&&(0,fo.jsx)("ul",{className:"block-editor-block-visibility-modal__sub-options",children:Su.map(([,{label:v,icon:y,key:_}])=>(0,fo.jsxs)("li",{className:"block-editor-block-visibility-modal__options-item",children:[(0,fo.jsx)(Jr.CheckboxControl,{label:(0,So.sprintf)((0,So.__)("Hide on %s"),v),checked:a[_]??!1,indeterminate:a[_]===null,onChange:S=>f(_,S)}),(0,fo.jsx)(Jr.Icon,{icon:y,className:D({"block-editor-block-visibility-modal__options-icon--checked":a[_]})})]},_))})]})}),k&&g&&(0,fo.jsx)("p",{className:"block-editor-block-visibility-modal__description",children:(0,So.__)("Selected blocks have different visibility settings. The checkboxes show an indeterminate state when settings differ.")}),!k&&u===!0&&(0,fo.jsx)("p",{className:"block-editor-block-visibility-modal__description",children:(0,So.sprintf)((0,So.__)("Block will be hidden in the editor, and omitted from the published markup on the frontend. You can configure it again by selecting it in the List View (%s)."),i)}),!k&&!u&&h&&(0,fo.jsx)("p",{className:"block-editor-block-visibility-modal__description",children:(0,wn.createInterpolateElement)((0,So.sprintf)((0,So.__)("Block will be hidden according to the selected viewports. It will be <strong>included in the published markup on the frontend</strong>. You can configure it again by selecting it in the List View (%s)."),i),{strong:(0,fo.jsx)("strong",{})})})]}),(0,fo.jsxs)(Jr.Flex,{className:"block-editor-block-visibility-modal__actions",justify:"flex-end",expanded:!1,children:[(0,fo.jsx)(Jr.FlexItem,{children:(0,fo.jsx)(Jr.Button,{variant:"tertiary",onClick:t,__next40pxDefaultSize:!0,children:(0,So.__)("Cancel")})}),(0,fo.jsx)(Jr.FlexItem,{children:(0,fo.jsx)(Jr.Button,{variant:"primary",type:"submit",disabled:!p,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,So.__)("Apply")})})]})]})})}var wD=l(X(),1);function Gi(e={}){let{blockVisibility:t=void 0,deviceType:o=It.desktop.key,view:r=window}=e,n=(0,wD.useViewportMatch)("mobile",">=",r),i=(0,wD.useViewportMatch)("medium",">=",r),s;return o===It.mobile.key?s=It.mobile.key:o===It.tablet.key?s=It.tablet.key:n?n&&!i?s=It.tablet.key:s=It.desktop.key:s=It.mobile.key,{isBlockCurrentlyHidden:t===!1||t?.viewport?.[s]===!1,currentViewport:s}}var CD=l(N(),1),D1=l(A(),1),V1=l(O(),1);var LG=l(Y(),1),F1=l(z(),1);var BD=l(w(),1);function ED({clientIds:e}){let t=(0,V1.useRef)(!1),{canToggleBlockVisibility:o,areBlocksHiddenAnywhere:r}=(0,F1.useSelect)(s=>{let{getBlocksByClientId:a,getBlockName:c,isBlockHiddenAnywhere:u}=M(s(x));return{canToggleBlockVisibility:a(e).every(({clientId:f})=>(0,LG.hasBlockSupport)(c(f),"visibility",!0)),areBlocksHiddenAnywhere:e?.every(f=>u(f))}},[e]),n=(0,F1.useDispatch)(x);if((0,V1.useEffect)(()=>{r&&(t.current=!0)},[r]),!r&&!t.current)return null;let{showViewportModal:i}=M(n);return(0,BD.jsx)(D1.ToolbarGroup,{className:"block-editor-block-visibility-toolbar",children:(0,BD.jsx)(D1.ToolbarButton,{disabled:!o,icon:r?Ps:im,label:r?(0,CD.__)("Hidden"):(0,CD.__)("Visible"),onClick:()=>i(e),"aria-haspopup":"dialog"})})}var TD=l(N(),1),NG=l(A(),1),z1=l(z(),1),MG=l(js(),1);var DG=l(w(),1);function ID({clientIds:e}){let{areBlocksHiddenAnywhere:t,shortcut:o}=(0,z1.useSelect)(n=>{let{isBlockHiddenAnywhere:i}=M(n(x));return{areBlocksHiddenAnywhere:e?.every(s=>i(s)),shortcut:n(MG.store).getShortcutRepresentation("core/block-editor/toggle-block-visibility")}},[e]),{showViewportModal:r}=M((0,z1.useDispatch)(x));return(0,DG.jsx)(NG.MenuItem,{onClick:()=>r(e),shortcut:o,children:t?(0,TD.__)("Show"):(0,TD.__)("Hide")})}var Zu=l(A(),1),PD=l(z(),1),qu=l(N(),1);var Qh=l(w(),1),{Badge:Lxe}=M(Zu.privateApis),Nxe={currentBlockVisibility:void 0,hasParentHiddenEverywhere:!1,selectedDeviceType:It.desktop.key};function VG({clientId:e}){let{currentBlockVisibility:t,selectedDeviceType:o,hasParentHiddenEverywhere:r}=(0,PD.useSelect)(f=>{if(!e)return Nxe;let{getBlockAttributes:m,isBlockParentHiddenEverywhere:h,getSettings:p}=M(f(x));return{currentBlockVisibility:m(e)?.metadata?.blockVisibility,selectedDeviceType:p()?.[Oi]?.toLowerCase()||It.desktop.key,hasParentHiddenEverywhere:h(e)}},[e]),i=rt(e)?.ownerDocument?.defaultView,s=i===null?void 0:i,{isBlockCurrentlyHidden:a,currentViewport:c}=Gi({blockVisibility:t,deviceType:o,view:s}),u=(0,PD.useSelect)(f=>!e||!c?!1:M(f(x)).isBlockParentHiddenAtViewport(e,c),[e,c]);if(!(a||r||u))return null;let d;if(a)if(t===!1)d=(0,qu.__)("Block is hidden");else{let f=It[c]?.label||c;d=(0,qu.sprintf)((0,qu.__)("Block is hidden on %s"),f)}if(r)d=(0,qu.__)("Parent block is hidden");else if(u){let f=It[c]?.label||c;d=(0,qu.sprintf)((0,qu.__)("Parent block is hidden on %s"),f)}return(0,Qh.jsx)(Lxe,{className:"block-editor-block-visibility-info",children:(0,Qh.jsxs)(Zu.__experimentalHStack,{spacing:2,justify:"start",children:[(0,Qh.jsx)(Zu.Icon,{icon:Ps}),(0,Qh.jsx)(Zu.__experimentalText,{children:d})]})})}function Uy(e={},{__unstableIsHtml:t}={}){let{clientId:o,className:r,wrapperProps:n={},isAligned:i,index:s,mode:a,name:c,blockApiVersion:u,blockTitle:d,isSelected:f,isSubtreeDisabled:m,hasOverlay:h,initialPosition:p,blockEditingMode:g,isHighlighted:b,isMultiSelected:k,isPartiallySelected:v,isReusable:y,isDragging:_,hasChildSelected:S,isEditingDisabled:C,hasEditableOutline:B,isEditingContentOnlySection:P,defaultClassName:T,isSectionBlock:E,isWithinSectionBlock:L,canMove:I,blockVisibility:R,deviceType:V}=(0,FG.useContext)(br),j=(0,Jh.useRefEffect)($=>{if($){let{ownerDocument:ee}=$,{defaultView:K}=ee;j.current=K}},[]),H=(0,j1.sprintf)((0,j1.__)("Block: %s"),d),F=a==="html"&&!t?"-visual":"",U=TG(),G=!L,W=(0,Jh.useMergeRefs)([e.ref,j,uG({clientId:o,initialPosition:p}),mU(o),pG(o),vG({clientId:o,isSelected:f}),fG({isEnabled:G}),_G(),T1({triggerAnimationOnChange:s,clientId:o}),(0,Jh.useDisabled)({isDisabled:!h}),M1({clientId:o,isEnabled:E}),SG({isSelected:f}),I?U:void 0]),J=Pe(),oe=!!J[ih]?{"--wp-admin-theme-color":"var(--wp-block-synced-color)","--wp-admin-theme-color--rgb":"var(--wp-block-synced-color--rgb)"}:{},{isBlockCurrentlyHidden:re}=Gi({blockVisibility:R,deviceType:V,view:j.current});u<2&&o===J.clientId&&(0,jG.default)(`Block type "${c}" must support API version 2 or higher to work correctly with "useBlockProps" method.`);let Q=!1;return(n?.style?.marginTop?.charAt(0)==="-"||n?.style?.marginBottom?.charAt(0)==="-"||n?.style?.marginLeft?.charAt(0)==="-"||n?.style?.marginRight?.charAt(0)==="-")&&(Q=!0),{tabIndex:g==="disabled"?-1:0,draggable:I&&!S?!0:void 0,...n,...e,ref:W,id:`block-${o}${F}`,role:"document","aria-label":H,"data-block":o,"data-type":c,"data-title":d,inert:m?"true":void 0,className:D("block-editor-block-list__block",{"wp-block":!i,"has-block-overlay":h,"is-selected":f,"is-highlighted":b,"is-multi-selected":k,"is-partially-selected":v,"is-reusable":y,"is-dragging":_,"has-child-selected":S,"is-editing-disabled":C,"has-editable-outline":B,"has-negative-margin":Q,"is-editing-content-only-section":P,"is-block-hidden":re},r,e.className,n.className,T),style:{...n.style,...e.style,...oe}}}Uy.save=zG.__unstableGetBlockProps;var xo=l(w(),1);function Mxe(e,t){let o={...e,...t};return e?.hasOwnProperty("className")&&t?.hasOwnProperty("className")&&(o.className=D(e.className,t.className)),e?.hasOwnProperty("style")&&t?.hasOwnProperty("style")&&(o.style={...e.style,...t.style}),o}function U1({children:e,isHtml:t,...o}){return(0,xo.jsx)("div",{...Uy(o,{__unstableIsHtml:t}),children:e})}function RD({block:{__unstableBlockSource:e},mode:t,isLocked:o,canRemove:r,clientId:n,isSelected:i,isSelectionEnabled:s,className:a,__unstableLayoutClassNames:c,name:u,isValid:d,attributes:f,wrapperProps:m,setAttributes:h,onReplace:p,onRemove:g,onInsertBlocksAfter:b,onMerge:k,toggleSelection:v}){let{mayDisplayControls:y,mayDisplayParentControls:_,isSelectionWithinCurrentSection:S,themeSupportsLayout:C,...B}=(0,Xu.useContext)(br),P=mm()||{},T=(0,xo.jsx)(kC,{name:u,isSelected:i,attributes:f,setAttributes:h,insertBlocksAfter:o?void 0:b,onReplace:r?p:void 0,onRemove:r?g:void 0,mergeBlocks:r?k:void 0,clientId:n,isSelectionEnabled:s,toggleSelection:v,__unstableLayoutClassNames:c,__unstableParentLayout:Object.keys(P).length?P:void 0,mayDisplayControls:y,mayDisplayParentControls:_,mayDisplayPatternEditingControls:S,blockEditingMode:B.blockEditingMode,isPreviewMode:B.isPreviewMode}),E=(0,$e.getBlockType)(u);E?.getEditWrapperProps&&(m=Mxe(m,E.getEditWrapperProps(f)));let L=m&&!!m["data-align"]&&!C,I=a?.includes("is-position-sticky");L&&(T=(0,xo.jsx)("div",{className:D("wp-block",I&&a),"data-align":m["data-align"],children:T}));let R;if(d)t==="html"?R=(0,xo.jsxs)(xo.Fragment,{children:[(0,xo.jsx)("div",{style:{display:"none"},children:T}),(0,xo.jsx)(U1,{isHtml:!0,children:(0,xo.jsx)(rH,{clientId:n})})]}):E?.apiVersion>1?R=T:R=(0,xo.jsx)(U1,{children:T});else{let F=e?(0,$e.serializeRawBlock)(e):(0,$e.getSaveContent)(E,f);R=(0,xo.jsxs)(U1,{className:"has-warning",children:[(0,xo.jsx)(RU,{clientId:n}),(0,xo.jsx)(Xu.RawHTML,{children:(0,HG.safeHTML)(F)})]})}let{"data-align":V,...j}=m??{},H={...j,className:D(j.className,V&&C&&`align${V}`,!(V&&I)&&a)};return(0,xo.jsx)(br.Provider,{value:{wrapperProps:H,isAligned:L,isSelectionWithinCurrentSection:S,...B},children:(0,xo.jsx)(MU,{fallback:(0,xo.jsx)(U1,{className:"has-warning",children:(0,xo.jsx)(LU,{})}),children:R})})}var Dxe=(0,H1.withDispatch)((e,t,o)=>{let{updateBlockAttributes:r,insertBlocks:n,mergeBlocks:i,replaceBlocks:s,toggleSelection:a,__unstableMarkLastChangeAsPersistent:c,moveBlocksToPosition:u,removeBlock:d,selectBlock:f}=e(x);return{setAttributes(m){let{getMultiSelectedBlockClientIds:h}=o.select(x),p=h(),{clientId:g,attributes:b}=t,k=p.length?p:[g],v=typeof m=="function"?m(b):m;r(k,v)},onInsertBlocks(m,h){let{rootClientId:p}=t;n(m,h,p)},onInsertBlocksAfter(m){let{clientId:h,rootClientId:p}=t,{getBlockIndex:g}=o.select(x),b=g(h);n(m,b+1,p)},onMerge(m){let{clientId:h,rootClientId:p}=t,{getPreviousBlockClientId:g,getNextBlockClientId:b,getBlock:k,getBlockAttributes:v,getBlockName:y,getBlockOrder:_,getBlockIndex:S,getBlockRootClientId:C,canInsertBlockType:B}=o.select(x);function P(){let E=k(h),L=(0,$e.getDefaultBlockName)(),I=(0,$e.getBlockType)(L);if(y(h)!==L){let R=(0,$e.switchToBlockType)(E,L);R&&R.length&&s(h,R)}else if((0,$e.isUnmodifiedDefaultBlock)(E)){let R=b(h);R&&o.batch(()=>{d(h),f(R)})}else if(I.merge){let R=I.merge({},E.attributes);s([h],[(0,$e.createBlock)(L,R)])}}function T(E,L=!0){let I=y(E),V=(0,$e.getBlockType)(I).category==="text",j=C(E),H=_(E),[F]=H;H.length===1&&(0,$e.isUnmodifiedBlock)(k(F))?d(E):V?o.batch(()=>{if(B(y(F),j))u([F],E,j,S(E));else{let U=(0,$e.switchToBlockType)(k(F),(0,$e.getDefaultBlockName)());U&&U.length&&U.every(G=>B(G.name,j))?(n(U,S(E),j,L),d(F,!1)):P()}!_(E).length&&(0,$e.isUnmodifiedBlock)(k(E))&&d(E,!1)}):P()}if(m){if(p){let L=b(p);if(L)if(y(p)===y(L)){let I=v(p),R=v(L);if(Object.keys(I).every(V=>I[V]===R[V])){o.batch(()=>{u(_(L),L,p),d(L,!1)});return}}else{i(p,L);return}}let E=b(h);if(!E)return;_(E).length?T(E,!1):i(h,E)}else{let E=g(h);if(E)i(E,h);else if(p){let L=g(p);if(L&&y(p)===y(L)){let I=v(p),R=v(L);if(Object.keys(I).every(V=>I[V]===R[V])){o.batch(()=>{u(_(p),p,L),d(p,!1)});return}}T(p)}else P()}},onReplace(m,h,p){m.length&&!(0,$e.isUnmodifiedDefaultBlock)(m[m.length-1])&&c();let g=m?.length===1&&Array.isArray(m[0])?m[0]:m;s([t.clientId],g,h,p)},onRemove(){d(t.clientId)},toggleSelection(m){a(m)}}});RD=(0,G1.compose)(Dxe,(0,UG.withFilters)("editor.BlockListBlock"))(RD);function Vxe(e){let{clientId:t,rootClientId:o}=e,r=(0,H1.useSelect)(q=>{let{isBlockSelected:se,getBlockMode:he,isSelectionEnabled:me,getTemplateLock:xe,isSectionBlock:De,getParentSectionBlock:lt,getBlockWithoutAttributes:Dt,getBlockAttributes:so,canRemoveBlock:or,canMoveBlock:Je,getSettings:hr,getEditedContentOnlySection:Zt,getBlockEditingMode:ao,getBlockName:Ze,isFirstMultiSelectedBlock:Vt,getMultiSelectedBlockClientIds:et,hasSelectedInnerBlock:Ue,getBlocksByName:Ho,getBlockIndex:Yn,isBlockMultiSelected:Fe,isBlockSubtreeDisabled:lo,isBlockHighlighted:tt,__unstableIsFullySelected:ze,__unstableSelectionHasUnmergeableBlock:yt,isBlockBeingDragged:_o,isDragging:gr,__unstableHasActiveBlockOverlayActive:ve,getSelectedBlocksInitialCaretPosition:Et}=M(q(x)),Mo=Dt(t);if(!Mo)return;let{hasBlockSupport:mt,getActiveBlockVariation:be}=q($e.store),Ft=so(t),{name:_t,isValid:_a}=Mo,$r=(0,$e.getBlockType)(_t),ge=hr(),{supportsLayout:rr,isPreviewMode:Sa,__experimentalBlockBindingsSupportedAttributes:vn}=ge,oh=vn?.[_t],rh=Ft?.metadata?.blockVisibility,j0=ge?.[Oi]?.toLowerCase()||"desktop",U0=$r?.apiVersion>1,dk=Fe(t),ce=ao(t),co={isPreviewMode:Sa,blockWithoutAttributes:Mo,name:_t,attributes:Ft,isValid:_a,themeSupportsLayout:rr,index:Yn(t),isReusable:(0,$e.isReusableBlock)($r),className:U0?Ft.className:void 0,defaultClassName:U0?(0,$e.getBlockDefaultClassName)(_t):void 0,blockTitle:$r?.title,bindableAttributes:oh,blockVisibility:rh,deviceType:j0,isMultiSelected:dk,blockEditingMode:ce,isEditingDisabled:ce==="disabled"};if(Sa)return co;let _e=se(t),zt=or(t),kn=Je(t),Rr=be(_t,Ft),au=!0,hA=Ue(t,au),gA=De(t)?t:lt(t),bA=(0,$e.hasBlockSupport)(_t,"multiple",!0)?[]:Ho(_t),Uge=bA.length&&bA[0]!==t;return{...co,mode:he(t),isSelectionEnabled:me(),isLocked:!!xe(o),isSectionBlock:De(t),isWithinSectionBlock:!!gA,isSelectionWithinCurrentSection:se(gA)||Ue(gA,au),blockType:$r,canRemove:zt,canMove:kn,isSelected:_e,isEditingContentOnlySection:Zt()===t,blockEditingMode:ce,mayDisplayControls:_e||Vt(t)&&et().every(Hge=>Ze(Hge)===_t),mayDisplayParentControls:mt(Ze(t),"__experimentalExposeControlsToChildren",!1)&&Ue(t),blockApiVersion:$r?.apiVersion||1,blockTitle:Rr?.title||$r?.title,isSubtreeDisabled:ce==="disabled"&&lo(t),hasOverlay:ve(t)&&!gr(),initialPosition:_e?Et():void 0,isHighlighted:tt(t),isMultiSelected:dk,isPartiallySelected:dk&&!ze()&&!yt(),isDragging:_o(t),hasChildSelected:hA,isEditingDisabled:ce==="disabled",hasEditableOutline:ce!=="disabled"&&ao(o)==="disabled",originalBlockClientId:Uge?bA[0]:!1,blockVisibility:rh,deviceType:j0}},[t,o]),n=(0,G1.useRefEffect)(q=>{if(q){let{ownerDocument:se}=q,{defaultView:he}=se;n.current=he}},[]),{isBlockCurrentlyHidden:i}=Gi({blockVisibility:r?.blockVisibility,deviceType:r?.deviceType,view:n.current}),s=(0,Xu.useMemo)(()=>({...r?.blockWithoutAttributes,attributes:r?.attributes}),[r?.blockWithoutAttributes,r?.attributes]);if(!r)return null;let{isPreviewMode:a,mode:c="visual",isSelectionEnabled:u=!1,isLocked:d=!1,canRemove:f=!1,canMove:m=!1,name:h,attributes:p,isValid:g,isSelected:b=!1,themeSupportsLayout:k,isEditingContentOnlySection:v,blockEditingMode:y,mayDisplayControls:_,mayDisplayParentControls:S,index:C,blockApiVersion:B,blockType:P,blockTitle:T,isSubtreeDisabled:E,hasOverlay:L,initialPosition:I,isHighlighted:R,isMultiSelected:V,isPartiallySelected:j,isReusable:H,isDragging:F,hasChildSelected:U,isSectionBlock:G,isWithinSectionBlock:W,isSelectionWithinCurrentSection:J,isEditingDisabled:le,hasEditableOutline:oe,className:re,defaultClassName:Q,originalBlockClientId:$,bindableAttributes:ee,blockVisibility:K,deviceType:te}=r,ne={isPreviewMode:a,clientId:t,className:re,index:C,mode:c,name:h,blockApiVersion:B,blockType:P,blockTitle:T,isSelected:b,isSubtreeDisabled:E,hasOverlay:L,initialPosition:I,blockEditingMode:y,isHighlighted:R,isMultiSelected:V,isPartiallySelected:j,isReusable:H,isDragging:F,hasChildSelected:U,isSectionBlock:G,isWithinSectionBlock:W,isSelectionWithinCurrentSection:J,isEditingDisabled:le,hasEditableOutline:oe,isEditingContentOnlySection:v,defaultClassName:Q,mayDisplayControls:_,mayDisplayParentControls:S,originalBlockClientId:$,themeSupportsLayout:k,canMove:m,isBlockCurrentlyHidden:i,bindableAttributes:ee,blockVisibility:K,deviceType:te};return i&&!b&&!V&&!U?null:(0,xo.jsx)(br.Provider,{value:ne,children:(0,xo.jsx)(RD,{...e,mode:c,isSelectionEnabled:u,isLocked:d,canRemove:f,canMove:m,block:s,name:h,attributes:p,isValid:g,isSelected:b})})}var GG=(0,Xu.memo)(Vxe);var L3=l(z(),1),SX=l(Y(),1);var O3=l(N(),1),bX=l($G(),1),NE=l(z(),1),ME=l(ot(),1);var hX=l(ir(),1),oc=l(N(),1),OE=l(A(),1),gX=l(O(),1),AE=l(z(),1),LE=l(X(),1),C_=l(Y(),1);var Wt=l(O(),1),TE=l(A(),1);var HW=l(O(),1);var Bm=l(He(),1);function KG({controlled:e,default:t,name:o,state:r="value"}){let{current:n}=Bm.useRef(e!==void 0),[i,s]=Bm.useState(t),a=n?e:i,c=Bm.useCallback(u=>{n||s(u)},[]);return[a,c]}var AD=l(He(),1);var qG=l(He(),1),YG={};function Em(e,t){let o=qG.useRef(YG);return o.current===YG&&(o.current=e(t)),o}var OD=AD[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],Fxe=OD&&OD!==AD.useLayoutEffect?OD:e=>e();function Wi(e){let t=Em(zxe).current;return t.next=e,Fxe(t.effect),t.trampoline}function zxe(){let e={next:void 0,callback:jxe,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function jxe(){}var ZG=l(He(),1),Uxe=()=>{},wr=typeof document<"u"?ZG.useLayoutEffect:Uxe;function Hxe(e,t){return function(r,...n){let i=new URL(e);return i.searchParams.set("code",r.toString()),n.forEach(s=>i.searchParams.append("args[]",s)),`${t} error #${r}; visit ${i} for the full message.`}}var Gxe=Hxe("https://base-ui.com/production-error","Base UI"),eg=Gxe;var Tm=l(He(),1);function Hy(e,t,o,r){let n=Em(QG).current;return Wxe(n,e,t,o,r)&&JG(n,[e,t,o,r]),n.callback}function XG(e){let t=Em(QG).current;return $xe(t,e)&&JG(t,e),t.callback}function QG(){return{callback:null,cleanup:null,refs:[]}}function Wxe(e,t,o,r,n){return e.refs[0]!==t||e.refs[1]!==o||e.refs[2]!==r||e.refs[3]!==n}function $xe(e,t){return e.refs.length!==t.length||e.refs.some((o,r)=>o!==t[r])}function JG(e,t){if(e.refs=t,t.every(o=>o==null)){e.callback=null;return}e.callback=o=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),o!=null){let r=Array(t.length).fill(null);for(let n=0;n<t.length;n+=1){let i=t[n];if(i!=null)switch(typeof i){case"function":{let s=i(o);typeof s=="function"&&(r[n]=s);break}case"object":{i.current=o;break}default:}}e.cleanup=()=>{for(let n=0;n<t.length;n+=1){let i=t[n];if(i!=null)switch(typeof i){case"function":{let s=r[n];typeof s=="function"?s():i(null);break}case"object":{i.current=null;break}default:}}}}}}var oW=l(He(),1);var eW=l(He(),1),Kxe=parseInt(eW.version,10);function tW(e){return Kxe>=e}function LD(e){if(!oW.isValidElement(e))return null;let t=e,o=t.props;return(tW(19)?o?.ref:t.ref)??null}function Gy(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}var IHe=Object.freeze([]),Qu=Object.freeze({});function rW(e,t){let o={};for(let r in e){let n=e[r];if(t?.hasOwnProperty(r)){let i=t[r](n);i!=null&&Object.assign(o,i);continue}n===!0?o[`data-${r.toLowerCase()}`]="":n&&(o[`data-${r.toLowerCase()}`]=n.toString())}return o}function nW(e,t){return typeof e=="function"?e(t):e}function iW(e,t){return typeof e=="function"?e(t):e}var ND={};function $o(e,t,o,r,n){if(!o&&!r&&!n&&!e)return W1(t);let i=W1(e);return t&&(i=Wy(i,t)),o&&(i=Wy(i,o)),r&&(i=Wy(i,r)),n&&(i=Wy(i,n)),i}function sW(e){if(e.length===0)return ND;if(e.length===1)return W1(e[0]);let t=W1(e[0]);for(let o=1;o<e.length;o+=1)t=Wy(t,e[o]);return t}function W1(e){return MD(e)?{...lW(e,ND)}:Yxe(e)}function Wy(e,t){return MD(t)?lW(t,e):qxe(e,t)}function Yxe(e){let t={...e};for(let o in t){let r=t[o];aW(o,r)&&(t[o]=cW(r))}return t}function qxe(e,t){if(!t)return e;for(let o in t){let r=t[o];switch(o){case"style":{e[o]=Gy(e.style,r);break}case"className":{e[o]=DD(e.className,r);break}default:aW(o,r)?e[o]=Zxe(e[o],r):e[o]=r}}return e}function aW(e,t){let o=e.charCodeAt(0),r=e.charCodeAt(1),n=e.charCodeAt(2);return o===111&&r===110&&n>=65&&n<=90&&(typeof t=="function"||typeof t>"u")}function MD(e){return typeof e=="function"}function lW(e,t){return MD(e)?e(t):e??ND}function Zxe(e,t){return t?e?(...o)=>{let r=o[0];if(uW(r)){let i=r;$y(i);let s=t(...o);return i.baseUIHandlerPrevented||e?.(...o),s}let n=t(...o);return e?.(...o),n}:cW(t):e}function cW(e){return e&&((...t)=>{let o=t[0];return uW(o)&&$y(o),e(...t)})}function $y(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function DD(e,t){return t?e?t+" "+e:t:e}function uW(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}var VD=l(He(),1);function Ju(e,t,o={}){let r=t.render,n=Xxe(t,o);if(o.enabled===!1)return null;let i=o.state??Qu;return ewe(e,r,n,i)}function Xxe(e,t={}){let{className:o,style:r,render:n}=e,{state:i=Qu,ref:s,props:a,stateAttributesMapping:c,enabled:u=!0}=t,d=u?nW(o,i):void 0,f=u?iW(r,i):void 0,m=u?rW(i,c):Qu,h=u&&a?Qxe(a):void 0,p=u?Gy(m,h)??{}:Qu;return typeof document<"u"&&(u?Array.isArray(s)?p.ref=XG([p.ref,LD(n),...s]):p.ref=Hy(p.ref,LD(n),s):Hy(null,null)),u?(d!==void 0&&(p.className=DD(p.className,d)),f!==void 0&&(p.style=Gy(p.style,f)),p):Qu}function Qxe(e){return Array.isArray(e)?sW(e):$o(void 0,e)}var Jxe=Symbol.for("react.lazy");function ewe(e,t,o,r){if(t){if(typeof t=="function")return t(o,r);let n=$o(o,t.props);n.ref=o.ref;let i=t;return i?.$$typeof===Jxe&&(i=Tm.Children.toArray(t)[0]),Tm.cloneElement(i,n)}if(e&&typeof e=="string")return twe(e,o);throw new Error(eg(8))}function twe(e,t){return e==="button"?(0,VD.createElement)("button",{type:"button",...t,key:t.key}):e==="img"?(0,VD.createElement)("img",{alt:"",...t,key:t.key}):Tm.createElement(e,t)}var tg={};xa(tg,{cancelOpen:()=>Iwe,chipRemovePress:()=>dwe,clearPress:()=>uwe,closePress:()=>lwe,closeWatcher:()=>Swe,decrementPress:()=>pwe,disabled:()=>Rwe,drag:()=>Bwe,escapeKey:()=>_we,focusOut:()=>ywe,imperativeAction:()=>Owe,incrementPress:()=>mwe,inputBlur:()=>bwe,inputChange:()=>hwe,inputClear:()=>gwe,inputPaste:()=>vwe,inputPress:()=>kwe,itemPress:()=>awe,keyboard:()=>wwe,linkPress:()=>cwe,listNavigation:()=>xwe,none:()=>owe,outsidePress:()=>swe,pointer:()=>Cwe,scrub:()=>Twe,siblingOpen:()=>Pwe,swipe:()=>Awe,trackPress:()=>fwe,triggerFocus:()=>iwe,triggerHover:()=>nwe,triggerPress:()=>rwe,wheel:()=>Ewe,windowResize:()=>Lwe});var owe="none",rwe="trigger-press",nwe="trigger-hover",iwe="trigger-focus",swe="outside-press",awe="item-press",lwe="close-press",cwe="link-press",uwe="clear-press",dwe="chip-remove-press",fwe="track-press",mwe="increment-press",pwe="decrement-press",hwe="input-change",gwe="input-clear",bwe="input-blur",vwe="input-paste",kwe="input-press",ywe="focus-out",_we="escape-key",Swe="close-watcher",xwe="list-navigation",wwe="keyboard",Cwe="pointer",Bwe="drag",Ewe="wheel",Twe="scrub",Iwe="cancel-open",Pwe="sibling-open",Rwe="disabled",Owe="imperative-action",Awe="swipe",Lwe="window-resize";function $1(e,t,o,r){let n=!1,i=!1,s=r??Qu;return{reason:e,event:t??new Event("base-ui"),cancel(){n=!0},allowPropagation(){i=!0},get isCanceled(){return n},get isPropagationAllowed(){return i},trigger:o,...s}}var K1=l(He(),1);var Nwe=l(He(),1),dW={...Nwe};var fW=0;function Mwe(e,t="mui"){let[o,r]=K1.useState(e),n=e||o;return K1.useEffect(()=>{o==null&&(fW+=1,r(`${t}-${fW}`))},[o,t]),n}var mW=dW.useId;function pW(e,t){if(mW!==void 0){let o=mW();return e??(t?`${t}-${o}`:o)}return Mwe(e,t)}function hW(e){return pW(e,"base-ui")}var oi=l(He(),1);var vW=l(bD(),1);var gW=l(He(),1),Dwe=[];function Y1(e){gW.useEffect(e,Dwe)}var q1=null,rGe=globalThis.requestAnimationFrame,FD=class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=t=>{this.isScheduled=!1;let o=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let n=0;n<o.length;n+=1)o[n]?.(t)};request(t){let o=this.nextId;return this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1,!this.isScheduled&&(requestAnimationFrame(this.tick),this.isScheduled=!0),o}cancel(t){let o=t-this.startId;o<0||o>=this.callbacks.length||(this.callbacks[o]=null,this.callbacksCount-=1)}},Z1=new FD,Qt=class e{static create(){return new e}static request(t){return Z1.request(t)}static cancel(t){return Z1.cancel(t)}currentId=q1;request(t){this.cancel(),this.currentId=Z1.request(()=>{this.currentId=q1,t()})}cancel=()=>{this.currentId!==q1&&(Z1.cancel(this.currentId),this.currentId=q1)};disposeEffect=()=>this.cancel};function X1(){let e=Em(Qt.create).current;return Y1(e.disposeEffect),e}function bW(e){return e==null?e:"current"in e?e.current:e}var Im=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({}),Vwe={[Im.startingStyle]:""},Fwe={[Im.endingStyle]:""},Q1={transitionStatus(e){return e==="starting"?Vwe:e==="ending"?Fwe:null}};function J1(e,t=!1,o=!0){let r=X1();return Wi((n,i=null)=>{r.cancel();let s=bW(e);if(s==null)return;let a=s,c=()=>{vW.flushSync(n)};if(typeof a.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED){n();return}function u(){Promise.all(a.getAnimations().map(d=>d.finished)).then(()=>{i?.aborted||c()}).catch(()=>{if(o){i?.aborted||c();return}let d=a.getAnimations();!i?.aborted&&d.length>0&&d.some(f=>f.pending||f.playState!=="finished")&&u()})}if(t){let d=Im.startingStyle;if(!a.hasAttribute(d)){r.request(u);return}let f=new MutationObserver(()=>{a.hasAttribute(d)||(f.disconnect(),u())});f.observe(a,{attributes:!0,attributeFilter:[d]}),i?.addEventListener("abort",()=>f.disconnect(),{once:!0});return}r.request(u)})}var zD=l(He(),1);function kW(e,t=!1,o=!1){let[r,n]=zD.useState(e&&t?"idle":void 0),[i,s]=zD.useState(e);return e&&!i&&(s(!0),n("starting")),!e&&i&&r!=="ending"&&!o&&n("ending"),!e&&!i&&r==="ending"&&n(void 0),wr(()=>{if(!e&&i&&r!=="ending"&&o){let a=Qt.request(()=>{n("ending")});return()=>{Qt.cancel(a)}}},[e,i,r,o]),wr(()=>{if(!e||t)return;let a=Qt.request(()=>{n(void 0)});return()=>{Qt.cancel(a)}},[t,e]),wr(()=>{if(!e||!t)return;e&&i&&r!=="idle"&&n("starting");let a=Qt.request(()=>{n("idle")});return()=>{Qt.cancel(a)}},[t,e,i,r]),{mounted:i,setMounted:s,transitionStatus:r}}function yW(e){let{open:t,defaultOpen:o,onOpenChange:r,disabled:n}=e,i=t!==void 0,[s,a]=KG({controlled:t,default:o,name:"Collapsible",state:"open"}),{mounted:c,setMounted:u,transitionStatus:d}=kW(s,!0,!0),[f,m]=oi.useState(s),[{height:h,width:p},g]=oi.useState({height:void 0,width:void 0}),b=hW(),[k,v]=oi.useState(),y=k??b,[_,S]=oi.useState(!1),[C,B]=oi.useState(!1),P=oi.useRef(null),T=oi.useRef(null),E=oi.useRef(null),L=oi.useRef(null),I=J1(L,!1),R=Wi(V=>{let j=!s,H=$1(tg.triggerPress,V.nativeEvent);if(r(j,H),H.isCanceled)return;let F=L.current;T.current==="css-animation"&&F!=null&&F.style.removeProperty("animation-name"),!_&&!C&&(T.current!=null&&T.current!=="css-animation"&&!c&&j&&u(!0),T.current==="css-animation"&&(!f&&j&&m(!0),!c&&j&&u(!0))),a(j),T.current==="none"&&c&&!j&&u(!1)});return wr(()=>{i&&T.current==="none"&&!s&&u(!1)},[i,s,t,u]),oi.useMemo(()=>({abortControllerRef:P,animationTypeRef:T,disabled:n,handleTrigger:R,height:h,mounted:c,open:s,panelId:y,panelRef:L,runOnceAnimationsFinish:I,setDimensions:g,setHiddenUntilFound:S,setKeepMounted:B,setMounted:u,setOpen:a,setPanelIdState:v,setVisible:m,transitionDimensionRef:E,transitionStatus:d,visible:f,width:p}),[P,T,n,R,h,c,s,y,L,I,g,S,B,u,a,m,E,d,f,p])}var eB=l(He(),1),jD=eB.createContext(void 0);function tB(){let e=eB.useContext(jD);if(e===void 0)throw new Error(eg(15));return e}var Pm=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Im.startingStyle]="startingStyle",e[e.endingStyle=Im.endingStyle]="endingStyle",e})({});var _W=(function(e){return e.panelOpen="data-panel-open",e})({});var zwe={[Pm.open]:""},jwe={[Pm.closed]:""},SW={open(e){return e?{[_W.panelOpen]:""}:null}},xW={open(e){return e?zwe:jwe}};var og=l(He(),1);function Uwe(){return typeof window<"u"}function Hwe(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function wW(e){return Uwe()?e instanceof HTMLElement||e instanceof Hwe(e).HTMLElement:!1}var oB=l(He(),1),Gwe=oB.createContext(void 0);function CW(e=!1){let t=oB.useContext(Gwe);if(t===void 0&&!e)throw new Error(eg(16));return t}var BW=l(He(),1);function EW(e){let{focusableWhenDisabled:t,disabled:o,composite:r=!1,tabIndex:n=0,isNativeButton:i}=e,s=r&&t!==!1,a=r&&t===!1;return{props:BW.useMemo(()=>{let u={onKeyDown(d){o&&t&&d.key!=="Tab"&&d.preventDefault()}};return r||(u.tabIndex=n,!i&&o&&(u.tabIndex=t?n:-1)),(i&&(t||s)||!i&&o)&&(u["aria-disabled"]=o),i&&(!t||a)&&(u.disabled=o),u},[r,o,t,s,a,i,n])}}function HD(e={}){let{disabled:t=!1,focusableWhenDisabled:o,tabIndex:r=0,native:n=!0,composite:i}=e,s=og.useRef(null),a=CW(!0),c=i??a!==void 0,{props:u}=EW({focusableWhenDisabled:o,disabled:t,composite:c,tabIndex:r,isNativeButton:n}),d=og.useCallback(()=>{let h=s.current;UD(h)&&c&&t&&u.disabled===void 0&&h.disabled&&(h.disabled=!1)},[t,u.disabled,c]);wr(d,[d]);let f=og.useCallback((h={})=>{let{onClick:p,onMouseDown:g,onKeyUp:b,onKeyDown:k,onPointerDown:v,...y}=h;return $o({type:n?"button":void 0,onClick(S){if(t){S.preventDefault();return}p?.(S)},onMouseDown(S){t||g?.(S)},onKeyDown(S){if(t||($y(S),k?.(S),S.baseUIHandlerPrevented))return;let C=S.target===S.currentTarget,B=S.currentTarget,P=UD(B),T=!n&&Wwe(B),E=C&&(n?P:!T),L=S.key==="Enter",I=S.key===" ",R=B.getAttribute("role"),V=R?.startsWith("menuitem")||R==="option"||R==="gridcell";if(C&&c&&I){if(S.defaultPrevented&&V)return;S.preventDefault(),T||n&&P?(B.click(),S.preventBaseUIHandler()):E&&(p?.(S),S.preventBaseUIHandler());return}E&&(!n&&(I||L)&&S.preventDefault(),!n&&L&&p?.(S))},onKeyUp(S){if(!t){if($y(S),b?.(S),S.target===S.currentTarget&&n&&c&&UD(S.currentTarget)&&S.key===" "){S.preventDefault();return}S.baseUIHandlerPrevented||S.target===S.currentTarget&&!n&&!c&&S.key===" "&&p?.(S)}},onPointerDown(S){if(t){S.preventDefault();return}v?.(S)}},n?void 0:{role:"button"},u,y)},[t,u,c,n]),m=Wi(h=>{s.current=h,d()});return{getButtonProps:f,buttonRef:m}}function UD(e){return wW(e)&&e.tagName==="BUTTON"}function Wwe(e){return!!(e?.tagName==="A"&&e?.href)}var Aa=l(He(),1);function TW(e,t,o,r){return e.addEventListener(t,o,r),()=>{e.removeEventListener(t,o,r)}}var IW=(function(e){return e.disabled="data-disabled",e.orientation="data-orientation",e})({});function PW(e){let{abortControllerRef:t,animationTypeRef:o,externalRef:r,height:n,hiddenUntilFound:i,keepMounted:s,id:a,mounted:c,onOpenChange:u,open:d,panelRef:f,runOnceAnimationsFinish:m,setDimensions:h,setMounted:p,setOpen:g,setVisible:b,transitionDimensionRef:k,visible:v,width:y}=e,_=Aa.useRef(!1),S=Aa.useRef(null),C=Aa.useRef(d),B=Aa.useRef(d),P=X1(),T=Aa.useMemo(()=>o.current==="css-animation"?!v:!d&&!c,[d,c,v,o]),E=Wi(I=>{if(!I)return;if(o.current==null||k.current==null){let j=getComputedStyle(I),H=j.animationName!=="none"&&j.animationName!=="",F=j.transitionDuration!=="0s"&&j.transitionDuration!=="";H&&F||(j.animationName==="none"&&j.transitionDuration!=="0s"?o.current="css-transition":j.animationName!=="none"&&j.transitionDuration==="0s"?o.current="css-animation":o.current="none"),I.getAttribute(IW.orientation)==="horizontal"||j.transitionProperty.indexOf("width")>-1?k.current="width":k.current="height"}if(o.current!=="css-transition")return;(n===void 0||y===void 0)&&(h({height:I.scrollHeight,width:I.scrollWidth}),B.current&&I.style.setProperty("transition-duration","0s"));let R=-1,V=-1;return R=Qt.request(()=>{B.current=!1,V=Qt.request(()=>{setTimeout(()=>{I.style.removeProperty("transition-duration")})})}),()=>{Qt.cancel(R),Qt.cancel(V)}}),L=Hy(r,f,E);return wr(()=>{if(o.current!=="css-transition")return;let I=f.current;if(!I)return;let R=-1;if(t.current!=null&&(t.current.abort(),t.current=null),d){let V={"justify-content":I.style.justifyContent,"align-items":I.style.alignItems,"align-content":I.style.alignContent,"justify-items":I.style.justifyItems};Object.keys(V).forEach(j=>{I.style.setProperty(j,"initial","important")}),!B.current&&!s&&I.setAttribute(Pm.startingStyle,""),h({height:I.scrollHeight,width:I.scrollWidth}),R=Qt.request(()=>{Object.entries(V).forEach(([j,H])=>{H===""?I.style.removeProperty(j):I.style.setProperty(j,H)})})}else{if(I.scrollHeight===0&&I.scrollWidth===0)return;h({height:I.scrollHeight,width:I.scrollWidth});let V=new AbortController;t.current=V;let j=V.signal,H=null,F=Pm.endingStyle;return H=new MutationObserver(U=>{U.some(W=>W.type==="attributes"&&W.attributeName===F)&&(H?.disconnect(),H=null,m(()=>{h({height:0,width:0}),I.style.removeProperty("content-visibility"),p(!1),t.current===V&&(t.current=null)},j))}),H.observe(I,{attributes:!0,attributeFilter:[F]}),()=>{H?.disconnect(),P.cancel(),t.current===V&&(V.abort(),t.current=null)}}return()=>{Qt.cancel(R)}},[t,o,P,i,s,c,d,f,m,h,p]),wr(()=>{if(o.current!=="css-animation")return;let I=f.current;I&&(S.current=I.style.animationName||S.current,I.style.setProperty("animation-name","none"),h({height:I.scrollHeight,width:I.scrollWidth}),!C.current&&!_.current&&I.style.removeProperty("animation-name"),d?(t.current!=null&&(t.current.abort(),t.current=null),p(!0),b(!0)):(t.current=new AbortController,m(()=>{p(!1),b(!1),t.current=null},t.current.signal)))},[t,o,d,f,m,h,p,b,v]),Y1(()=>{let I=Qt.request(()=>{C.current=!1});return()=>Qt.cancel(I)}),wr(()=>{if(!i)return;let I=f.current;if(!I)return;let R=-1,V=-1;return d&&_.current&&(I.style.transitionDuration="0s",h({height:I.scrollHeight,width:I.scrollWidth}),R=Qt.request(()=>{_.current=!1,V=Qt.request(()=>{setTimeout(()=>{I.style.removeProperty("transition-duration")})})})),()=>{Qt.cancel(R),Qt.cancel(V)}},[i,d,f,h]),wr(()=>{let I=f.current;I&&i&&T&&(I.setAttribute("hidden","until-found"),o.current==="css-transition"&&I.setAttribute(Pm.startingStyle,""))},[i,T,o,f]),Aa.useEffect(function(){let R=f.current;if(!R)return;function V(j){_.current=!0,g(!0),u(!0,$1(tg.none,j))}return TW(R,"beforematch",V)},[u,f,g]),Aa.useMemo(()=>({props:{hidden:T,id:a,ref:L}}),[T,a,L])}var RW=l(He(),1);function OW(e){let{enabled:t=!0,open:o,ref:r,onComplete:n}=e,i=Wi(n),s=J1(r,o,!1);RW.useEffect(()=>{if(!t)return;let a=new AbortController;return s(i,a.signal),()=>{a.abort()}},[t,o,i,s])}var ed={};xa(ed,{Panel:()=>MW,Root:()=>LW,Trigger:()=>NW});var Ky=l(He(),1);var rB={...xW,...Q1};var AW=l(w(),1),LW=Ky.forwardRef(function(t,o){let{render:r,className:n,defaultOpen:i=!1,disabled:s=!1,onOpenChange:a,open:c,style:u,...d}=t,f=Wi(a),m=yW({open:c,defaultOpen:i,onOpenChange:f,disabled:s}),h=Ky.useMemo(()=>({open:m.open,disabled:m.disabled,transitionStatus:m.transitionStatus}),[m.open,m.disabled,m.transitionStatus]),p=Ky.useMemo(()=>({...m,onOpenChange:f,state:h}),[m,f,h]),g=Ju("div",t,{state:h,ref:o,props:d,stateAttributesMapping:rB});return(0,AW.jsx)(jD.Provider,{value:p,children:g})});var nB=l(He(),1);var $we={...SW,...Q1},NW=nB.forwardRef(function(t,o){let{panelId:r,open:n,handleTrigger:i,state:s,disabled:a}=tB(),{className:c,disabled:u=a,id:d,render:f,nativeButton:m=!0,style:h,...p}=t,{getButtonProps:g,buttonRef:b}=HD({disabled:u,focusableWhenDisabled:!0,native:m}),k=nB.useMemo(()=>({"aria-controls":n?r:void 0,"aria-expanded":n,onClick:i}),[r,n,i]);return Ju("button",t,{state:s,ref:[o,b],props:[k,p,g],stateAttributesMapping:$we})});var iB=l(He(),1);var GD=(function(e){return e.collapsiblePanelHeight="--collapsible-panel-height",e.collapsiblePanelWidth="--collapsible-panel-width",e})({});var MW=iB.forwardRef(function(t,o){let{className:r,hiddenUntilFound:n,keepMounted:i,render:s,id:a,style:c,...u}=t,{abortControllerRef:d,animationTypeRef:f,height:m,mounted:h,onOpenChange:p,open:g,panelId:b,panelRef:k,runOnceAnimationsFinish:v,setDimensions:y,setHiddenUntilFound:_,setKeepMounted:S,setMounted:C,setPanelIdState:B,setOpen:P,setVisible:T,state:E,transitionDimensionRef:L,visible:I,width:R,transitionStatus:V}=tB(),j=n??!1,H=i??!1;wr(()=>{if(a)return B(a),()=>{B(void 0)}},[a,B]),wr(()=>{_(j)},[_,j]),wr(()=>{S(H)},[S,H]);let{props:F}=PW({abortControllerRef:d,animationTypeRef:f,externalRef:o,height:m,hiddenUntilFound:j,id:b,keepMounted:H,mounted:h,onOpenChange:p,open:g,panelRef:k,runOnceAnimationsFinish:v,setDimensions:y,setMounted:C,setOpen:P,setVisible:T,transitionDimensionRef:L,visible:I,width:R});OW({open:g&&V==="idle",ref:k,onComplete(){g&&y({height:void 0,width:void 0})}});let U=iB.useMemo(()=>({...E,transitionStatus:V}),[E,V]),G=Ju("div",t,{state:U,ref:[o,k],props:[F,{style:{[GD.collapsiblePanelHeight]:m===void 0?"auto":`${m}px`,[GD.collapsiblePanelWidth]:R===void 0?"auto":`${R}px`}},u],stateAttributesMapping:rB});return H||j||h?G:null});function Cn(e){return Ju(e.defaultTagName??"div",e,e)}var FW=l(O(),1),WD="data-wp-hash";function $D(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&Ywe(document)),e.__wpStyleRuntime}function Kwe(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${WD}]`))if(o.getAttribute(WD)===t)return!0;return!1}function zW(e,t,o){if(!e.head)return;let r=$D(),n=r.injectedStyles.get(e);if(n||(n=new Set,r.injectedStyles.set(e,n)),n.has(t))return;if(Kwe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(WD,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),n.add(t)}function Ywe(e){let t=$D();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,r]of t.styles)zW(e,o,r);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function jW(e,t){let o=$D();o.styles.set(e,t);for(let r of o.documents.keys())zW(r,e,t)}typeof process>"u",jW("4130d64bea",'@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._83ed8a8da5dd50ea__text{margin:0}._14437cfb77831647__heading-2xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-2xl,32px);font-size:var(--wpds-typography-font-size-2xl,32px);line-height:var(--wpds-typography-line-height-2xl,40px)}._14437cfb77831647__heading-2xl,._3c78b7fa9b4072dd__heading-xl{font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-medium,499)}._3c78b7fa9b4072dd__heading-xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-xl,20px);font-size:var(--wpds-typography-font-size-xl,20px);line-height:var(--wpds-typography-line-height-md,24px)}.aa58f227716bcde2__heading-lg{--_gcd-heading-font-size:var(--wpds-typography-font-size-lg,15px);font-size:var(--wpds-typography-font-size-lg,15px)}.aa58f227716bcde2__heading-lg,.fc4da56d8dfe52c4__heading-md{font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-medium,499);line-height:var(--wpds-typography-line-height-sm,20px)}.fc4da56d8dfe52c4__heading-md{--_gcd-heading-font-size:var(--wpds-typography-font-size-md,13px);font-size:var(--wpds-typography-font-size-md,13px)}.a9b78c7c82e8dff7__heading-sm{--_gcd-heading-font-size:var(--wpds-typography-font-size-xs,11px);font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-xs,11px);font-weight:var(--wpds-typography-font-weight-medium,499);line-height:var(--wpds-typography-line-height-xs,16px);text-transform:uppercase}._305ff559e52180d5__body-xl{--_gcd-p-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-p-line-height:var(--wpds-typography-line-height-xl,32px);font-size:var(--wpds-typography-font-size-xl,20px);line-height:var(--wpds-typography-line-height-xl,32px)}._305ff559e52180d5__body-xl,.ca1aa3fc2029e958__body-lg{font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-regular,400)}.ca1aa3fc2029e958__body-lg{--_gcd-p-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-p-line-height:var(--wpds-typography-line-height-md,24px);font-size:var(--wpds-typography-font-size-lg,15px);line-height:var(--wpds-typography-line-height-md,24px)}._131101940be12424__body-md{--_gcd-p-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-md,13px);line-height:var(--wpds-typography-line-height-sm,20px)}._0e8d87a42c1f75fa__body-sm,._131101940be12424__body-md{font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-regular,400)}._0e8d87a42c1f75fa__body-sm{--_gcd-p-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);font-size:var(--wpds-typography-font-size-sm,12px);line-height:var(--wpds-typography-line-height-xs,16px)}}');var DW={text:"_83ed8a8da5dd50ea__text","heading-2xl":"_14437cfb77831647__heading-2xl","heading-xl":"_3c78b7fa9b4072dd__heading-xl","heading-lg":"aa58f227716bcde2__heading-lg","heading-md":"fc4da56d8dfe52c4__heading-md","heading-sm":"a9b78c7c82e8dff7__heading-sm","body-xl":"_305ff559e52180d5__body-xl","body-lg":"ca1aa3fc2029e958__body-lg","body-md":"_131101940be12424__body-md","body-sm":"_0e8d87a42c1f75fa__body-sm"};typeof process>"u",jW("1fb29d3a3c","._6defc79820e382c6__button{box-sizing:var(--_gcd-button-box-sizing,border-box);font-family:var(--_gcd-button-font-family,inherit);font-size:var(--_gcd-button-font-size,inherit);font-weight:var(--_gcd-button-font-weight,inherit)}.d2cff2e5dea83bd1__input{box-sizing:var(--_gcd-input-box-sizing,border-box);font-family:var(--_gcd-input-font-family,inherit);font-size:var(--_gcd-input-font-size,inherit);font-weight:var(--_gcd-input-font-weight,inherit);margin:var(--_gcd-input-margin,0);&:is(textarea,[type=text],[type=password],[type=color],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){background-color:var(--_gcd-input-background-color,#0000);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 #0000);color:var(--_gcd-input-color,var(--wpds-color-fg-interactive-neutral,#1e1e1e));&:focus{border-color:var(--_gcd-input-border-color-focus,var(--wp-admin-theme-color));box-shadow:var(--_gcd-input-box-shadow-focus,none);outline:var(--_gcd-input-outline-focus,none)}&:disabled{background:var(--_gcd-input-background-disabled,#0000);border-color:var(--_gcd-input-border-color-disabled,#0000);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-fg-interactive-neutral-disabled,#8d8d8d))}&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-fg-interactive-neutral-disabled,#8d8d8d))}}&:is(textarea,[type=text],[type=password],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){line-height:var(--_gcd-input-line-height,inherit);min-height:var(--_gcd-input-min-height,auto);padding:var(--_gcd-input-padding,0)}}._547d86373d02e108__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._8c15fd0ed9f28ba4__div{outline:var(--_gcd-div-outline,0 solid #0000)}p._43cec3e1eec1066d__p{font-size:var(--_gcd-p-font-size,13px);line-height:var(--_gcd-p-line-height,1.5);margin:var(--_gcd-p-margin,0)}:is(h1,h2,h3,h4,h5,h6).e97669c6d9a38497__heading{color:var(--_gcd-heading-color,var(--wpds-color-fg-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-medium,499));margin:var(--_gcd-heading-margin,0)}._2c0831b0499dbd6e__a,._2c0831b0499dbd6e__a:is(:hover,:focus,:active){border-radius:var(--_gcd-a-border-radius,0);box-shadow:var(--_gcd-a-box-shadow,none);color:var(--_gcd-a-color,inherit);outline:var(--_gcd-a-outline,0 solid #0000);transition:var(--_gcd-a-transition,none)}");var VW={button:"_6defc79820e382c6__button",input:"d2cff2e5dea83bd1__input",textarea:"_547d86373d02e108__textarea",div:"_8c15fd0ed9f28ba4__div",p:"_43cec3e1eec1066d__p",heading:"e97669c6d9a38497__heading",a:"_2c0831b0499dbd6e__a"},Yy=(0,FW.forwardRef)(function({variant:t="body-md",render:o,className:r,...n},i){return Cn({render:o,defaultTagName:"span",ref:i,props:$o(n,{className:D(DW.text,VW.heading,VW.p,DW[t],r)})})});var WW=l(w(),1),KD="data-wp-hash";function YD(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&Zwe(document)),e.__wpStyleRuntime}function qwe(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${KD}]`))if(o.getAttribute(KD)===t)return!0;return!1}function GW(e,t,o){if(!e.head)return;let r=YD(),n=r.injectedStyles.get(e);if(n||(n=new Set,r.injectedStyles.set(e,n)),n.has(t))return;if(qwe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(KD,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),n.add(t)}function Zwe(e){let t=YD();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,r]of t.styles)GW(e,o,r);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function Xwe(e,t){let o=YD();o.styles.set(e,t);for(let r of o.documents.keys())GW(r,e,t)}typeof process>"u",Xwe("d6a685e1aa","@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._96e6251aad1a6136__badge{border-radius:var(--wpds-border-radius-lg,8px);padding-block:var(--wpds-dimension-padding-xs,4px);padding-inline:var(--wpds-dimension-padding-sm,8px)}._99f7158cb520f750__is-high-intent{background-color:var(--wpds-color-bg-surface-error,#f6e6e3);color:var(--wpds-color-fg-content-error,#470000)}.c20ebef2365bc8b7__is-medium-intent{background-color:var(--wpds-color-bg-surface-warning,#fde6be);color:var(--wpds-color-fg-content-warning,#2e1900)}._365e1626c6202e52__is-low-intent{background-color:var(--wpds-color-bg-surface-caution,#fee995);color:var(--wpds-color-fg-content-caution,#281d00)}._33f8198127ddf4ef__is-stable-intent{background-color:var(--wpds-color-bg-surface-success,#c6f7cd);color:var(--wpds-color-fg-content-success,#002900)}._04c1aca8fc449412__is-informational-intent{background-color:var(--wpds-color-bg-surface-info,#deebfa);color:var(--wpds-color-fg-content-info,#001b4f)}._90726e69d495ec19__is-draft-intent{background-color:var(--wpds-color-bg-surface-neutral-weak,#f4f4f4);color:var(--wpds-color-fg-content-neutral,#1e1e1e)}._898f4a544993bd39__is-none-intent{background-color:var(--wpds-color-bg-surface-neutral-strong,#fff);border:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral,#dbdbdb);color:var(--wpds-color-fg-content-neutral,#1e1e1e);padding-block:calc(var(--wpds-dimension-padding-xs, 4px) - var(--wpds-border-width-xs, 1px));padding-inline:calc(var(--wpds-dimension-padding-sm, 8px) - var(--wpds-border-width-xs, 1px))}}");var UW={badge:"_96e6251aad1a6136__badge","is-high-intent":"_99f7158cb520f750__is-high-intent","is-medium-intent":"c20ebef2365bc8b7__is-medium-intent","is-low-intent":"_365e1626c6202e52__is-low-intent","is-stable-intent":"_33f8198127ddf4ef__is-stable-intent","is-informational-intent":"_04c1aca8fc449412__is-informational-intent","is-draft-intent":"_90726e69d495ec19__is-draft-intent","is-none-intent":"_898f4a544993bd39__is-none-intent"},qD=(0,HW.forwardRef)(function({intent:t="none",className:o,...r},n){return(0,WW.jsx)(Yy,{ref:n,className:D(UW.badge,UW[`is-${t}-intent`],o),...r,variant:"body-sm"})});var $W=l(O(),1),KW=l(Z(),1),YW=l(w(),1),ZD=(0,$W.forwardRef)(function({icon:t,size:o=24,...r},n){return(0,YW.jsx)(KW.SVG,{ref:n,fill:"currentColor",...t.props,...r,width:o,height:o})});var La={};xa(La,{Content:()=>lB,FullBleed:()=>n$,Header:()=>aB,Root:()=>sB,Title:()=>s$});var qW=l(O(),1),XD="data-wp-hash";function QD(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&Jwe(document)),e.__wpStyleRuntime}function Qwe(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${XD}]`))if(o.getAttribute(XD)===t)return!0;return!1}function ZW(e,t,o){if(!e.head)return;let r=QD(),n=r.injectedStyles.get(e);if(n||(n=new Set,r.injectedStyles.set(e,n)),n.has(t))return;if(Qwe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(XD,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),n.add(t)}function Jwe(e){let t=QD();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,r]of t.styles)ZW(e,o,r);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function XW(e,t){let o=QD();o.styles.set(e,t);for(let r of o.documents.keys())ZW(r,e,t)}typeof process>"u",XW("e3ae230cea","@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}");var eCe={"box-sizing":"_336cd3e4e743482f__box-sizing"};typeof process>"u",XW("14f5e9ddeb","@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._02872bf298eadc43__root{--wp-ui-card-padding:var(--wpds-dimension-padding-2xl,24px);--wp-ui-card-header-content-gap:var(--wpds-dimension-gap-xl,24px);--wp-ui-card-header-content-margin:calc(var(--wp-ui-card-header-content-gap) - var(--wp-ui-card-padding));background-color:var(--wpds-color-bg-surface-neutral-strong,#fff);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#e4e4e4);border-radius:var(--wpds-border-radius-lg,8px);color:var(--wpds-color-fg-content-neutral,#1e1e1e);display:flex;flex-direction:column;overflow:clip}._5dffdaf2a6e669ac__content,.bbccc92e6ba5662d__header{padding:var(--wp-ui-card-padding);&:not(:first-child):not(:last-child){padding-block-end:0}}.bbccc92e6ba5662d__header+._5dffdaf2a6e669ac__content{margin-block-start:var(--wp-ui-card-header-content-margin);padding-block-start:0}.c1fa192587e1b4a6__fullbleed{margin-inline:calc(var(--wp-ui-card-padding)*-1);width:calc(100% + var(--wp-ui-card-padding)*2)}}");var tCe={root:"_02872bf298eadc43__root",header:"bbccc92e6ba5662d__header",content:"_5dffdaf2a6e669ac__content",fullbleed:"c1fa192587e1b4a6__fullbleed"},sB=(0,qW.forwardRef)(function({render:t,...o},r){let n=D(tCe.root,eCe["box-sizing"]);return Cn({defaultTagName:"div",render:t,ref:r,props:$o({className:n},o)})});var QW=l(O(),1),JD="data-wp-hash";function eV(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&rCe(document)),e.__wpStyleRuntime}function oCe(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${JD}]`))if(o.getAttribute(JD)===t)return!0;return!1}function JW(e,t,o){if(!e.head)return;let r=eV(),n=r.injectedStyles.get(e);if(n||(n=new Set,r.injectedStyles.set(e,n)),n.has(t))return;if(oCe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(JD,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),n.add(t)}function rCe(e){let t=eV();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,r]of t.styles)JW(e,o,r);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function nCe(e,t){let o=eV();o.styles.set(e,t);for(let r of o.documents.keys())JW(r,e,t)}typeof process>"u",nCe("14f5e9ddeb","@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._02872bf298eadc43__root{--wp-ui-card-padding:var(--wpds-dimension-padding-2xl,24px);--wp-ui-card-header-content-gap:var(--wpds-dimension-gap-xl,24px);--wp-ui-card-header-content-margin:calc(var(--wp-ui-card-header-content-gap) - var(--wp-ui-card-padding));background-color:var(--wpds-color-bg-surface-neutral-strong,#fff);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#e4e4e4);border-radius:var(--wpds-border-radius-lg,8px);color:var(--wpds-color-fg-content-neutral,#1e1e1e);display:flex;flex-direction:column;overflow:clip}._5dffdaf2a6e669ac__content,.bbccc92e6ba5662d__header{padding:var(--wp-ui-card-padding);&:not(:first-child):not(:last-child){padding-block-end:0}}.bbccc92e6ba5662d__header+._5dffdaf2a6e669ac__content{margin-block-start:var(--wp-ui-card-header-content-margin);padding-block-start:0}.c1fa192587e1b4a6__fullbleed{margin-inline:calc(var(--wp-ui-card-padding)*-1);width:calc(100% + var(--wp-ui-card-padding)*2)}}");var iCe={root:"_02872bf298eadc43__root",header:"bbccc92e6ba5662d__header",content:"_5dffdaf2a6e669ac__content",fullbleed:"c1fa192587e1b4a6__fullbleed"},aB=(0,QW.forwardRef)(function({render:t,...o},r){return Cn({defaultTagName:"div",render:t,ref:r,props:$o({className:iCe.header},o)})});var e$=l(O(),1),tV="data-wp-hash";function oV(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&aCe(document)),e.__wpStyleRuntime}function sCe(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${tV}]`))if(o.getAttribute(tV)===t)return!0;return!1}function t$(e,t,o){if(!e.head)return;let r=oV(),n=r.injectedStyles.get(e);if(n||(n=new Set,r.injectedStyles.set(e,n)),n.has(t))return;if(sCe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(tV,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),n.add(t)}function aCe(e){let t=oV();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,r]of t.styles)t$(e,o,r);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function lCe(e,t){let o=oV();o.styles.set(e,t);for(let r of o.documents.keys())t$(r,e,t)}typeof process>"u",lCe("14f5e9ddeb","@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._02872bf298eadc43__root{--wp-ui-card-padding:var(--wpds-dimension-padding-2xl,24px);--wp-ui-card-header-content-gap:var(--wpds-dimension-gap-xl,24px);--wp-ui-card-header-content-margin:calc(var(--wp-ui-card-header-content-gap) - var(--wp-ui-card-padding));background-color:var(--wpds-color-bg-surface-neutral-strong,#fff);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#e4e4e4);border-radius:var(--wpds-border-radius-lg,8px);color:var(--wpds-color-fg-content-neutral,#1e1e1e);display:flex;flex-direction:column;overflow:clip}._5dffdaf2a6e669ac__content,.bbccc92e6ba5662d__header{padding:var(--wp-ui-card-padding);&:not(:first-child):not(:last-child){padding-block-end:0}}.bbccc92e6ba5662d__header+._5dffdaf2a6e669ac__content{margin-block-start:var(--wp-ui-card-header-content-margin);padding-block-start:0}.c1fa192587e1b4a6__fullbleed{margin-inline:calc(var(--wp-ui-card-padding)*-1);width:calc(100% + var(--wp-ui-card-padding)*2)}}");var cCe={root:"_02872bf298eadc43__root",header:"bbccc92e6ba5662d__header",content:"_5dffdaf2a6e669ac__content",fullbleed:"c1fa192587e1b4a6__fullbleed"},lB=(0,e$.forwardRef)(function({render:t,...o},r){return Cn({defaultTagName:"div",render:t,ref:r,props:$o({className:cCe.content},o)})});var o$=l(O(),1),rV="data-wp-hash";function nV(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&dCe(document)),e.__wpStyleRuntime}function uCe(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${rV}]`))if(o.getAttribute(rV)===t)return!0;return!1}function r$(e,t,o){if(!e.head)return;let r=nV(),n=r.injectedStyles.get(e);if(n||(n=new Set,r.injectedStyles.set(e,n)),n.has(t))return;if(uCe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(rV,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),n.add(t)}function dCe(e){let t=nV();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,r]of t.styles)r$(e,o,r);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function fCe(e,t){let o=nV();o.styles.set(e,t);for(let r of o.documents.keys())r$(r,e,t)}typeof process>"u",fCe("14f5e9ddeb","@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._02872bf298eadc43__root{--wp-ui-card-padding:var(--wpds-dimension-padding-2xl,24px);--wp-ui-card-header-content-gap:var(--wpds-dimension-gap-xl,24px);--wp-ui-card-header-content-margin:calc(var(--wp-ui-card-header-content-gap) - var(--wp-ui-card-padding));background-color:var(--wpds-color-bg-surface-neutral-strong,#fff);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#e4e4e4);border-radius:var(--wpds-border-radius-lg,8px);color:var(--wpds-color-fg-content-neutral,#1e1e1e);display:flex;flex-direction:column;overflow:clip}._5dffdaf2a6e669ac__content,.bbccc92e6ba5662d__header{padding:var(--wp-ui-card-padding);&:not(:first-child):not(:last-child){padding-block-end:0}}.bbccc92e6ba5662d__header+._5dffdaf2a6e669ac__content{margin-block-start:var(--wp-ui-card-header-content-margin);padding-block-start:0}.c1fa192587e1b4a6__fullbleed{margin-inline:calc(var(--wp-ui-card-padding)*-1);width:calc(100% + var(--wp-ui-card-padding)*2)}}");var mCe={root:"_02872bf298eadc43__root",header:"bbccc92e6ba5662d__header",content:"_5dffdaf2a6e669ac__content",fullbleed:"c1fa192587e1b4a6__fullbleed"},n$=(0,o$.forwardRef)(function({render:t,...o},r){return Cn({defaultTagName:"div",render:t,ref:r,props:$o({className:mCe.fullbleed},o)})});var i$=l(O(),1);var iV=l(w(),1),pCe=(0,iV.jsx)("div",{}),s$=(0,i$.forwardRef)(function({render:t=pCe,children:o,...r},n){return(0,iV.jsx)(Yy,{ref:n,variant:"heading-lg",render:t,...r,children:o})});var a$=l(O(),1),l$=l(w(),1),sV=(0,a$.forwardRef)(function(t,o){return(0,l$.jsx)(ed.Panel,{ref:o,...t})});var c$=l(O(),1),u$=l(w(),1),aV=(0,c$.forwardRef)(function(t,o){return(0,u$.jsx)(ed.Root,{ref:o,...t})});var d$=l(O(),1),f$=l(w(),1),lV=(0,d$.forwardRef)(function(t,o){return(0,f$.jsx)(ed.Trigger,{ref:o,...t})});var Rm={};xa(Rm,{Content:()=>S$,Header:()=>b$,HeaderDescription:()=>k$,Root:()=>p$});var m$=l(O(),1);var uV=l(w(),1),p$=(0,m$.forwardRef)(function({render:t,...o},r){return(0,uV.jsx)(aV,{ref:r,render:(0,uV.jsx)(sB,{render:t}),...o})});var rg=l(O(),1);var h$=l(O(),1),cB=(0,h$.createContext)({setDescriptionId:()=>{}});var Gl=l(w(),1),dV="data-wp-hash";function fV(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&gCe(document)),e.__wpStyleRuntime}function hCe(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${dV}]`))if(o.getAttribute(dV)===t)return!0;return!1}function g$(e,t,o){if(!e.head)return;let r=fV(),n=r.injectedStyles.get(e);if(n||(n=new Set,r.injectedStyles.set(e,n)),n.has(t))return;if(hCe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(dV,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),n.add(t)}function gCe(e){let t=fV();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,r]of t.styles)g$(e,o,r);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function mV(e,t){let o=fV();o.styles.set(e,t);for(let r of o.documents.keys())g$(r,e,t)}typeof process>"u",mV("b49ef575a8","@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{.cab17c7a373cb60d__header-content{flex:1;min-width:0}.dd89d27c4f15912d__header-trigger-positioner{align-self:center;flex-shrink:0;max-height:0;overflow:visible}.bcfab5f2448bafef__header-trigger-wrapper{border-radius:var(--wpds-border-radius-sm,2px);display:flex;translate:0 -50%}._3106f8d2b0330faa__header-trigger{@media not (prefers-reduced-motion){transition:rotate .15s ease-out}}._5d2dfcb4085c6d0f__header[data-panel-open] ._3106f8d2b0330faa__header-trigger{rotate:180deg}._5d2dfcb4085c6d0f__header[data-disabled] ._3106f8d2b0330faa__header-trigger{color:var(--wpds-color-fg-interactive-neutral-disabled,#8d8d8d)}.e34cf37ccd0d81e0__content{height:var(--collapsible-panel-height);margin-block-start:var(--wp-ui-card-header-content-margin);overflow:hidden;&._165c4572592944b2__overflowVisible{overflow:visible}&[hidden]:not([hidden=until-found]){display:none}&[data-ending-style],&[data-starting-style]{height:0}@media not (prefers-reduced-motion){transition:all .15s ease-out}}}@layer wp-ui-compositions{._41bfdbf7b6c087c2__content-inner{padding-block-start:0}._5d2dfcb4085c6d0f__header{align-items:stretch;display:flex;flex-direction:row;gap:var(--wpds-dimension-gap-sm,8px);outline:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}}}");var qy={"header-content":"cab17c7a373cb60d__header-content","header-trigger-positioner":"dd89d27c4f15912d__header-trigger-positioner","header-trigger-wrapper":"bcfab5f2448bafef__header-trigger-wrapper","header-trigger":"_3106f8d2b0330faa__header-trigger",header:"_5d2dfcb4085c6d0f__header",content:"e34cf37ccd0d81e0__content",overflowVisible:"_165c4572592944b2__overflowVisible","content-inner":"_41bfdbf7b6c087c2__content-inner"};typeof process>"u",mV("1fb29d3a3c","._6defc79820e382c6__button{box-sizing:var(--_gcd-button-box-sizing,border-box);font-family:var(--_gcd-button-font-family,inherit);font-size:var(--_gcd-button-font-size,inherit);font-weight:var(--_gcd-button-font-weight,inherit)}.d2cff2e5dea83bd1__input{box-sizing:var(--_gcd-input-box-sizing,border-box);font-family:var(--_gcd-input-font-family,inherit);font-size:var(--_gcd-input-font-size,inherit);font-weight:var(--_gcd-input-font-weight,inherit);margin:var(--_gcd-input-margin,0);&:is(textarea,[type=text],[type=password],[type=color],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){background-color:var(--_gcd-input-background-color,#0000);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 #0000);color:var(--_gcd-input-color,var(--wpds-color-fg-interactive-neutral,#1e1e1e));&:focus{border-color:var(--_gcd-input-border-color-focus,var(--wp-admin-theme-color));box-shadow:var(--_gcd-input-box-shadow-focus,none);outline:var(--_gcd-input-outline-focus,none)}&:disabled{background:var(--_gcd-input-background-disabled,#0000);border-color:var(--_gcd-input-border-color-disabled,#0000);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-fg-interactive-neutral-disabled,#8d8d8d))}&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-fg-interactive-neutral-disabled,#8d8d8d))}}&:is(textarea,[type=text],[type=password],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){line-height:var(--_gcd-input-line-height,inherit);min-height:var(--_gcd-input-min-height,auto);padding:var(--_gcd-input-padding,0)}}._547d86373d02e108__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._8c15fd0ed9f28ba4__div{outline:var(--_gcd-div-outline,0 solid #0000)}p._43cec3e1eec1066d__p{font-size:var(--_gcd-p-font-size,13px);line-height:var(--_gcd-p-line-height,1.5);margin:var(--_gcd-p-margin,0)}:is(h1,h2,h3,h4,h5,h6).e97669c6d9a38497__heading{color:var(--_gcd-heading-color,var(--wpds-color-fg-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-medium,499));margin:var(--_gcd-heading-margin,0)}._2c0831b0499dbd6e__a,._2c0831b0499dbd6e__a:is(:hover,:focus,:active){border-radius:var(--_gcd-a-border-radius,0);box-shadow:var(--_gcd-a-box-shadow,none);color:var(--_gcd-a-color,inherit);outline:var(--_gcd-a-outline,0 solid #0000);transition:var(--_gcd-a-transition,none)}");var bCe={button:"_6defc79820e382c6__button",input:"d2cff2e5dea83bd1__input",textarea:"_547d86373d02e108__textarea",div:"_8c15fd0ed9f28ba4__div",p:"_43cec3e1eec1066d__p",heading:"e97669c6d9a38497__heading",a:"_2c0831b0499dbd6e__a"};typeof process>"u",mV("2a5ab8f3a7","@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-utilities{._08e8a2e44959f892__outset-ring--focus,._970d04df7376df67__outset-ring--focus-within-except-active,.c5cb3ee4bddaa8e4__outset-ring--focus-within-visible,.cd83dfc2126a0846__outset-ring--focus-within,.d0541bc9dd9dc7b6__outset-ring--focus-visible,.e25b2bdd7aa21721__outset-ring--focus-except-active,.ecadb9e080e2dfa5__outset-ring--focus-parent-visible{@media not (prefers-reduced-motion){--_gcd-a-transition:outline 0.1s ease-out;transition:outline .1s ease-out}outline:0 solid #0000;outline-offset:1px}._08e8a2e44959f892__outset-ring--focus:focus,._970d04df7376df67__outset-ring--focus-within-except-active:focus-within:not(:has(:active)),.c5cb3ee4bddaa8e4__outset-ring--focus-within-visible:focus-within:has(:focus-visible),.cd83dfc2126a0846__outset-ring--focus-within:focus-within,.d0541bc9dd9dc7b6__outset-ring--focus-visible:focus-visible,.e25b2bdd7aa21721__outset-ring--focus-except-active:focus:not(:active),:focus-visible .ecadb9e080e2dfa5__outset-ring--focus-parent-visible{--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus-brand,var(--wp-admin-theme-color,#3858e9));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus-brand,var(--wp-admin-theme-color,#3858e9));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus-brand,var(--wp-admin-theme-color,#3858e9))}}");var vCe={"outset-ring--focus":"_08e8a2e44959f892__outset-ring--focus","outset-ring--focus-except-active":"e25b2bdd7aa21721__outset-ring--focus-except-active","outset-ring--focus-visible":"d0541bc9dd9dc7b6__outset-ring--focus-visible","outset-ring--focus-within":"cd83dfc2126a0846__outset-ring--focus-within","outset-ring--focus-within-except-active":"_970d04df7376df67__outset-ring--focus-within-except-active","outset-ring--focus-within-visible":"c5cb3ee4bddaa8e4__outset-ring--focus-within-visible","outset-ring--focus-parent-visible":"ecadb9e080e2dfa5__outset-ring--focus-parent-visible"},b$=(0,rg.forwardRef)(function({children:t,className:o,render:r,...n},i){let[s,a]=(0,rg.useState)(),c=(0,rg.useMemo)(()=>({setDescriptionId:a}),[a]);return(0,Gl.jsx)(cB.Provider,{value:c,children:(0,Gl.jsxs)(lV,{className:D(qy.header,o),render:(0,Gl.jsx)(aB,{ref:i,render:r,...n}),nativeButton:!1,"aria-describedby":s,children:[(0,Gl.jsx)("div",{className:qy["header-content"],children:t}),(0,Gl.jsx)("div",{className:D(qy["header-trigger-positioner"]),children:(0,Gl.jsx)("div",{className:D(qy["header-trigger-wrapper"],bCe.div,vCe["outset-ring--focus-parent-visible"]),children:(0,Gl.jsx)(ZD,{icon:vr,className:qy["header-trigger"]})})})]})})});var td=l(O(),1);var v$=l(w(),1),k$=(0,td.forwardRef)(function({children:t,className:o,...r},n){let i=(0,td.useId)(),{setDescriptionId:s}=(0,td.useContext)(cB);return(0,td.useEffect)(()=>(s(i),()=>s(void 0)),[i,s]),(0,v$.jsx)("div",{ref:n,id:i,"aria-hidden":"true",className:o,...r,children:t})});var y$=l(O(),1);var gV=l(w(),1),hV="data-wp-hash";function bV(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&yCe(document)),e.__wpStyleRuntime}function kCe(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${hV}]`))if(o.getAttribute(hV)===t)return!0;return!1}function _$(e,t,o){if(!e.head)return;let r=bV(),n=r.injectedStyles.get(e);if(n||(n=new Set,r.injectedStyles.set(e,n)),n.has(t))return;if(kCe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(hV,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),n.add(t)}function yCe(e){let t=bV();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,r]of t.styles)_$(e,o,r);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function _Ce(e,t){let o=bV();o.styles.set(e,t);for(let r of o.documents.keys())_$(r,e,t)}typeof process>"u",_Ce("b49ef575a8","@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{.cab17c7a373cb60d__header-content{flex:1;min-width:0}.dd89d27c4f15912d__header-trigger-positioner{align-self:center;flex-shrink:0;max-height:0;overflow:visible}.bcfab5f2448bafef__header-trigger-wrapper{border-radius:var(--wpds-border-radius-sm,2px);display:flex;translate:0 -50%}._3106f8d2b0330faa__header-trigger{@media not (prefers-reduced-motion){transition:rotate .15s ease-out}}._5d2dfcb4085c6d0f__header[data-panel-open] ._3106f8d2b0330faa__header-trigger{rotate:180deg}._5d2dfcb4085c6d0f__header[data-disabled] ._3106f8d2b0330faa__header-trigger{color:var(--wpds-color-fg-interactive-neutral-disabled,#8d8d8d)}.e34cf37ccd0d81e0__content{height:var(--collapsible-panel-height);margin-block-start:var(--wp-ui-card-header-content-margin);overflow:hidden;&._165c4572592944b2__overflowVisible{overflow:visible}&[hidden]:not([hidden=until-found]){display:none}&[data-ending-style],&[data-starting-style]{height:0}@media not (prefers-reduced-motion){transition:all .15s ease-out}}}@layer wp-ui-compositions{._41bfdbf7b6c087c2__content-inner{padding-block-start:0}._5d2dfcb4085c6d0f__header{align-items:stretch;display:flex;flex-direction:row;gap:var(--wpds-dimension-gap-sm,8px);outline:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}}}");var pV={"header-content":"cab17c7a373cb60d__header-content","header-trigger-positioner":"dd89d27c4f15912d__header-trigger-positioner","header-trigger-wrapper":"bcfab5f2448bafef__header-trigger-wrapper","header-trigger":"_3106f8d2b0330faa__header-trigger",header:"_5d2dfcb4085c6d0f__header",content:"e34cf37ccd0d81e0__content",overflowVisible:"_165c4572592944b2__overflowVisible","content-inner":"_41bfdbf7b6c087c2__content-inner"},S$=(0,y$.forwardRef)(function({className:t,render:o,children:r,hiddenUntilFound:n=!0,...i},s){return(0,gV.jsx)(sV,{ref:s,className:a=>D(pV.content,a.open&&a.transitionStatus==="idle"&&pV.overflowVisible,t),hiddenUntilFound:n,...i,children:(0,gV.jsx)(lB,{className:pV["content-inner"],render:o,children:r})})});var x$=l(O(),1),vV="data-wp-hash";function kV(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&xCe(document)),e.__wpStyleRuntime}function SCe(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${vV}]`))if(o.getAttribute(vV)===t)return!0;return!1}function w$(e,t,o){if(!e.head)return;let r=kV(),n=r.injectedStyles.get(e);if(n||(n=new Set,r.injectedStyles.set(e,n)),n.has(t))return;if(SCe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(vV,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),n.add(t)}function xCe(e){let t=kV();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,r]of t.styles)w$(e,o,r);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function wCe(e,t){let o=kV();o.styles.set(e,t);for(let r of o.documents.keys())w$(r,e,t)}typeof process>"u",wCe("b51ff41489","@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._19ce0419607e1896__stack{display:flex}}");var CCe={stack:"_19ce0419607e1896__stack"},BCe={xs:"var(--wpds-dimension-gap-xs, 4px)",sm:"var(--wpds-dimension-gap-sm, 8px)",md:"var(--wpds-dimension-gap-md, 12px)",lg:"var(--wpds-dimension-gap-lg, 16px)",xl:"var(--wpds-dimension-gap-xl, 24px)","2xl":"var(--wpds-dimension-gap-2xl, 32px)","3xl":"var(--wpds-dimension-gap-3xl, 40px)"},Ne=(0,x$.forwardRef)(function({direction:t,gap:o,align:r,justify:n,wrap:i,render:s,...a},c){let u={gap:o&&BCe[o],alignItems:r,justifyContent:n,flexDirection:t,flexWrap:i};return Cn({render:s,ref:c,props:$o(a,{style:u,className:CCe.stack})})});var C$=l(O(),1),yV="data-wp-hash";function _V(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&TCe(document)),e.__wpStyleRuntime}function ECe(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${yV}]`))if(o.getAttribute(yV)===t)return!0;return!1}function B$(e,t,o){if(!e.head)return;let r=_V(),n=r.injectedStyles.get(e);if(n||(n=new Set,r.injectedStyles.set(e,n)),n.has(t))return;if(ECe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(yV,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),n.add(t)}function TCe(e){let t=_V();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,r]of t.styles)B$(e,o,r);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function ICe(e,t){let o=_V();o.styles.set(e,t);for(let r of o.documents.keys())B$(r,e,t)}typeof process>"u",ICe("c46e8cb841","@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{.f37b9e2e191ebd66__visually-hidden{word-wrap:normal;border:0;clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-break:normal}}");var PCe={"visually-hidden":"f37b9e2e191ebd66__visually-hidden"},Ge=(0,C$.forwardRef)(function({render:t,...o},r){return Cn({render:t,ref:r,props:$o({className:PCe["visually-hidden"]},o,{"data-visually-hidden":""})})});var gd=l(N(),1),S_=l(X(),1),uX=l(z(),1);var ng=l(N(),1),ig=l(O(),1),T$=l(A(),1),Zy=l(w(),1),E$=[(0,ig.createInterpolateElement)((0,ng.__)("While writing, you can press <kbd>/</kbd> to quickly insert new blocks."),{kbd:(0,Zy.jsx)("kbd",{})}),(0,ig.createInterpolateElement)((0,ng.__)("Indent a list by pressing <kbd>space</kbd> at the beginning of a line."),{kbd:(0,Zy.jsx)("kbd",{})}),(0,ig.createInterpolateElement)((0,ng.__)("Outdent a list by pressing <kbd>backspace</kbd> at the beginning of a line."),{kbd:(0,Zy.jsx)("kbd",{})}),(0,ng.__)("Drag files into the editor to automatically insert media blocks."),(0,ng.__)("Change a block's type by pressing the block icon on the toolbar.")];function RCe(){let[e]=(0,ig.useState)(Math.floor(Math.random()*E$.length));return(0,Zy.jsx)(T$.Tip,{children:E$[e]})}var I$=RCe;var Cg=l(Y(),1),$q=l(O(),1),Kq=l(N(),1);var Bn=l(A(),1),uB=l(z(),1),P$=l(Re(),1),od=l(N(),1);var dB=l(Y(),1);var Lr=l(w(),1),{Badge:OCe}=M(Bn.privateApis);function ACe({children:e,onClick:t}){return t?(0,Lr.jsx)(Bn.Button,{__next40pxDefaultSize:!0,className:"block-editor-block-card__parent-select-button",onClick:t,children:e}):e}function LCe({title:e,icon:t,description:o,blockType:r,className:n,name:i,allowParentNavigation:s,parentClientId:a,isChild:c,children:u,clientId:d}){r&&((0,P$.default)("`blockType` property in `BlockCard component`",{since:"5.7",alternative:"`title, icon and description` properties"}),{title:e,icon:t,description:o}=r);let{parentBlockClientId:f,parentBlockName:m}=(0,uB.useSelect)(g=>{if(a||c||!s)return{};let{getBlockParents:b,getBlockName:k}=g(x),y=b(d,!1).find(_=>{let S=k(_);return S==="core/navigation"||(0,dB.hasBlockSupport)(S,"listView")});return{parentBlockClientId:y,parentBlockName:y?k(y):null}},[d,s,c,a]),{selectBlock:h}=(0,uB.useDispatch)(x),p=a?"div":"h2";return(0,Lr.jsx)("div",{className:D("block-editor-block-card",{"is-parent":a,"is-child":c},n),children:(0,Lr.jsxs)(Bn.__experimentalVStack,{children:[(0,Lr.jsxs)(Bn.__experimentalHStack,{justify:"flex-start",spacing:0,children:[f&&(0,Lr.jsx)(Bn.Button,{onClick:()=>h(f),label:m?(0,od.sprintf)((0,od.__)('Go to "%s" block'),(0,dB.getBlockType)(m)?.title):(0,od.__)("Go to parent block"),style:{minWidth:24,padding:0},icon:(0,od.isRTL)()?Go:Kr,size:"small"}),c&&(0,Lr.jsx)("span",{className:"block-editor-block-card__child-indicator-icon",children:(0,Lr.jsx)(Bn.Icon,{icon:(0,od.isRTL)()?_k:Sk})}),(0,Lr.jsxs)(ACe,{onClick:a?()=>{h(a)}:void 0,children:[(0,Lr.jsx)(Ae,{icon:t,showColors:!0}),(0,Lr.jsxs)(Bn.__experimentalVStack,{spacing:1,children:[(0,Lr.jsxs)(p,{className:"block-editor-block-card__title",children:[(0,Lr.jsx)("span",{className:"block-editor-block-card__name",children:i?.length?i:e}),!a&&!c&&!!i?.length&&(0,Lr.jsx)(OCe,{children:e})]}),u]})]})]}),!a&&!c&&o&&(0,Lr.jsx)(Bn.__experimentalText,{className:"block-editor-block-card__description",children:o})]})})}var Xy=LCe;var QB=l(X(),1),d3=l(z(),1),Mm=l(O(),1),u3=l(Re(),1);var X$=l(z(),1),rd=l(O(),1),Q$=l(A(),1),Us=l(O$(),1);var A$=l(O(),1),sg=l(z(),1),L$=l(X(),1);var fB=l(w(),1);function NCe(e,t,o){if(!o)return t;let r=e.get(t);return r||(r=(0,sg.createRegistry)({},t),r.registerStore(Xt,Bh),e.set(t,r)),r}var MCe=(0,L$.createHigherOrderComponent)(e=>function({useSubRegistry:o=!0,...r}){let n=(0,sg.useRegistry)(),[i]=(0,A$.useState)(()=>new WeakMap),s=NCe(i,n,o);return s===n?(0,fB.jsx)(e,{registry:n,...r}):(0,fB.jsx)(sg.RegistryProvider,{value:s,children:(0,fB.jsx)(e,{registry:s,...r})})},"withRegistryProvider"),N$=MCe;var en=l(O(),1),F$=l(z(),1),z$=l(Y(),1);var M$=l(O(),1),DCe=()=>{},mB=(0,M$.createContext)({getSelection:()=>{},onChangeSelection:DCe});var D$=()=>{};function j$(e,t){let o=(0,z$.cloneBlock)(e);return t.externalToInternal.set(e.clientId,o.clientId),t.internalToExternal.set(o.clientId,e.clientId),e.innerBlocks?.length&&(o.innerBlocks=e.innerBlocks.map(r=>j$(r,t))),o}function U$(e,t){return e.map(o=>{let r=t.internalToExternal.get(o.clientId);return{...o,clientId:r??o.clientId,innerBlocks:U$(o.innerBlocks,t)}})}function V$(e,t){let{selectionStart:o,selectionEnd:r,initialPosition:n}=e,i=s=>{if(!s?.clientId)return s;let a=t.internalToExternal.get(s.clientId);return{...s,clientId:a??s.clientId}};return{selectionStart:i(o),selectionEnd:i(r),initialPosition:n}}function pB({clientId:e=null,value:t,onChange:o=D$,onInput:r=D$}){let n=(0,F$.useRegistry)(),{getSelection:i,onChangeSelection:s}=(0,en.useContext)(mB),{resetBlocks:a,resetSelection:c,replaceInnerBlocks:u,setHasControlledInnerBlocks:d,__unstableMarkNextChangeAsNotPersistent:f}=n.dispatch(x),{getBlockName:m,getBlocks:h,getSelectionStart:p,getSelectionEnd:g}=n.select(x),b=(0,en.useRef)({incoming:null,outgoing:[]}),k=(0,en.useRef)(!1),v=(0,en.useRef)({externalToInternal:new Map,internalToExternal:new Map}),y=(0,en.useRef)(null),_=(0,en.useRef)(!1),S=()=>{let E=i();if(!E?.selectionStart?.clientId||E===y.current)return;let L=E.selectionStart.clientId;if(e?v.current.externalToInternal.has(L):!!m(L)){y.current=E;let R=V=>!V?.clientId||!e?V:{...V,clientId:v.current.externalToInternal.get(V.clientId)??V.clientId};_.current=!0,c(R(E.selectionStart),R(E.selectionEnd),E.initialPosition),_.current=!1}},C=()=>{t&&(e?n.batch(()=>{v.current.externalToInternal.clear(),v.current.internalToExternal.clear();let E=t.map(L=>j$(L,v.current));d(e,!0),k.current&&(b.current.incoming=E),f(),u(e,E),y.current=null}):(k.current&&(b.current.incoming=t),f(),a(t)))},B=()=>{f(),e?(d(e,!1),f(),u(e,[])):a([])},P=(0,en.useRef)(r),T=(0,en.useRef)(o);(0,en.useEffect)(()=>{P.current=r,T.current=o},[r,o]),(0,en.useEffect)(()=>{let E=b.current.outgoing.includes(t),L=h(e)===t;E?b.current.outgoing[b.current.outgoing.length-1]===t&&(b.current.outgoing=[]):L||(b.current.outgoing=[],C(),S())},[t,e]),(0,en.useEffect)(()=>{let{getSelectedBlocksInitialCaretPosition:E,isLastBlockChangePersistent:L,__unstableIsLastBlockChangeIgnored:I,areInnerBlocksControlled:R,getBlockParents:V}=n.select(x),j=h(e),H=L(),F=!1,U=p(),G=g();k.current=!0;let W=n.subscribe(()=>{if(e!==null&&m(e)===null)return;let J=L(),le=h(e),oe=le!==j;if(j=le,oe&&(b.current.incoming||I())){b.current.incoming=null,H=J;return}let Q=oe||F&&!oe&&J&&!H,$=p(),ee=g(),K=$!==U||ee!==G;K&&(U=$,G=ee),(Q||K)&&n.batch(()=>{if(Q){H=J;let te=e?U$(j,v.current):j,ne={selectionStart:$,selectionEnd:ee,initialPosition:E()},q=e?V$(ne,v.current):ne;b.current.outgoing.push(te),(H?T.current:P.current)(te,{selection:q})}if(K&&!Q&&$?.clientId&&!_.current&&(e?v.current.internalToExternal.has($.clientId):!V($.clientId).some(ne=>R(ne)))){let ne={selectionStart:$,selectionEnd:ee,initialPosition:E()};s(e?V$(ne,v.current):ne)}}),F=oe},x);return()=>{k.current=!1,W()}},[n,e]),(0,en.useEffect)(()=>()=>{B()},[])}var H$=l(O(),1),G$=l(z(),1),W$=l(js(),1),wo=l(N(),1);function $$(){return null}function VCe(){let{registerShortcut:e}=(0,G$.useDispatch)(W$.store);return(0,H$.useEffect)(()=>{e({name:"core/block-editor/copy",category:"block",description:(0,wo.__)("Copy the selected block(s)."),keyCombination:{modifier:"primary",character:"c"}}),e({name:"core/block-editor/cut",category:"block",description:(0,wo.__)("Cut the selected block(s)."),keyCombination:{modifier:"primary",character:"x"}}),e({name:"core/block-editor/paste",category:"block",description:(0,wo.__)("Paste the selected block(s)."),keyCombination:{modifier:"primary",character:"v"}}),e({name:"core/block-editor/duplicate",category:"block",description:(0,wo.__)("Duplicate the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"d"}}),e({name:"core/block-editor/remove",category:"block",description:(0,wo.__)("Remove the selected block(s)."),keyCombination:{modifier:"access",character:"z"}}),e({name:"core/block-editor/paste-styles",category:"block",description:(0,wo.__)("Paste the copied style to the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"v"}}),e({name:"core/block-editor/insert-before",category:"block",description:(0,wo.__)("Insert a new block before the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"t"}}),e({name:"core/block-editor/insert-after",category:"block",description:(0,wo.__)("Insert a new block after the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"y"}}),e({name:"core/block-editor/delete-multi-selection",category:"block",description:(0,wo.__)("Delete selection."),keyCombination:{character:"del"},aliases:[{character:"backspace"}]}),e({name:"core/block-editor/stop-editing-as-blocks",category:"block",description:(0,wo.__)("Finish editing a design."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/select-all",category:"selection",description:(0,wo.__)("Select all text when typing. Press again to select all blocks."),keyCombination:{modifier:"primary",character:"a"}}),e({name:"core/block-editor/unselect",category:"selection",description:(0,wo.__)("Clear selection."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/multi-text-selection",category:"selection",description:(0,wo.__)("Select text across multiple blocks."),keyCombination:{modifier:"shift",character:"arrow"}}),e({name:"core/block-editor/focus-toolbar",category:"global",description:(0,wo.__)("Navigate to the nearest toolbar."),keyCombination:{modifier:"alt",character:"F10"}}),e({name:"core/block-editor/move-up",category:"block",description:(0,wo.__)("Move the selected block(s) up."),keyCombination:{modifier:"secondary",character:"t"}}),e({name:"core/block-editor/move-down",category:"block",description:(0,wo.__)("Move the selected block(s) down."),keyCombination:{modifier:"secondary",character:"y"}}),e({name:"core/block-editor/collapse-list-view",category:"list-view",description:(0,wo.__)("Collapse all other items."),keyCombination:{modifier:"alt",character:"l"}}),e({name:"core/block-editor/group",category:"block",description:(0,wo.__)("Create a group block from the selected multiple blocks."),keyCombination:{modifier:"primary",character:"g"}}),e({name:"core/block-editor/toggle-block-visibility",category:"block",description:(0,wo.__)("Show or hide the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"h"}}),e({name:"core/block-editor/rename",category:"block",description:(0,wo.__)("Rename the selected block."),keyCombination:{modifier:"primaryAlt",character:"r"}})},[e]),null}$$.Register=VCe;var hB=$$;var K$=l(O(),1);function FCe(e={}){return(0,K$.useMemo)(()=>({mediaUpload:e.mediaUpload,mediaSideload:e.mediaSideload,mediaFinalize:e.mediaFinalize,maxUploadFileSize:e.maxUploadFileSize,allowedMimeTypes:e.allowedMimeTypes,allImageSizes:e.allImageSizes,bigImageSizeThreshold:e.bigImageSizeThreshold}),[e])}var Y$=FCe;var Wl=l(w(),1),gB=()=>{},q$=!1,ag=null,lg=null,Z$=["image/heic","image/heif"];function J$(){if(ag!==null)return ag;if(!window.__clientSideMediaProcessing||typeof Us.detectClientSideMediaSupport!="function")return ag=!1,!1;let e=(0,Us.detectClientSideMediaSupport)();return!e||!e.supported?(q$||(console.info(`Client-side media processing unavailable: ${e.reason}. Using server-side processing.`),q$=!0),ag=!1,!1):(ag=!0,!0)}function zCe(){return lg!==null?lg:J$()||!window.__heicUploadSupport||typeof Us.isHeicCanvasSupported!="function"||!(0,Us.isHeicCanvasSupported)()?(lg=!1,!1):(lg=!0,!0)}function jCe(e,t,{allowedTypes:o,additionalData:r={},filesList:n,onError:i=gB,onFileChange:s,onSuccess:a,onBatchSuccess:c}){e.dispatch(Us.store).addItems({files:Array.from(n),onChange:s,onSuccess:u=>{t?.[bk]?.(u),a?.(u)},onBatchSuccess:c,onError:u=>i(typeof u=="string"?u:u?.message??""),additionalData:r,allowedTypes:o})}function UCe(e,t,{allowedTypes:o,additionalData:r={},filesList:n,onError:i=gB,onFileChange:s,onSuccess:a,onBatchSuccess:c}){let u=Array.from(n),d=u.filter(g=>Z$.includes(g.type)),f=u.filter(g=>!Z$.includes(g.type)),m=d.length>0&&f.length>0&&t?.mediaUpload,h=m?2:1,p=m?()=>{h--,h<=0&&c?.()}:c;d.length>0&&e.dispatch(Us.store).addItems({files:d,onChange:s,onSuccess:g=>{t?.[bk]?.(g),a?.(g)},onBatchSuccess:p,onError:g=>i(typeof g=="string"?g:g?.message??""),additionalData:r,allowedTypes:o}),f.length>0&&t?.mediaUpload&&t.mediaUpload({allowedTypes:o,additionalData:r,filesList:f,onError:i,onFileChange:s,onSuccess:a,onBatchSuccess:p})}function HCe(e){return pB(e),null}var cg=N$(e=>{let{settings:t,registry:o,stripExperimentalSettings:r=!1}=e,n=Y$(t),i=J$(),s=zCe(),a=i||s,c=!!t?.mediaUpload?.__isMediaUploadInterceptor,u=(0,rd.useMemo)(()=>{if(a&&t?.mediaUpload&&!c){let k=(i?jCe:UCe).bind(null,o,t);return k.__isMediaUploadInterceptor=!0,{...t,mediaUpload:k}}return t},[t,o,a,i,c]),{__experimentalUpdateSettings:d}=M((0,X$.useDispatch)(x));(0,rd.useEffect)(()=>{d({...u,__internalIsInitialized:!0},{stripExperimentalSettings:r,reset:!0})},[u,r,d]);let f=(0,rd.useRef)(e.selection);f.current=e.selection;let m=(0,rd.useRef)(e.onChangeSelection??gB);m.current=e.onChangeSelection??gB;let h=(0,rd.useMemo)(()=>({getSelection:()=>f.current,onChangeSelection:(...b)=>m.current(...b)}),[]),p=(0,Wl.jsxs)(Q$.SlotFillProvider,{passthrough:!0,children:[!u?.isPreviewMode&&(0,Wl.jsx)(hB.Register,{}),(0,Wl.jsx)(dU,{children:e.children})]}),g=(0,Wl.jsxs)(mB.Provider,{value:h,children:[(0,Wl.jsx)(HCe,{clientId:e.clientId,value:e.value,onChange:e.onChange,onInput:e.onInput}),p]});return a&&!c?(0,Wl.jsx)(Us.MediaUploadProvider,{settings:n,useSubRegistry:!1,children:g}):g}),GCe=e=>(0,Wl.jsx)(cg,{...e,stripExperimentalSettings:!0,children:e.children}),eK=GCe;var p_=l(X(),1),Mq=l(z(),1),XB=l(O(),1),Dq=l(A(),1);var Om=l(O(),1),FK=l(N(),1),Kl=l(X(),1),zK=l(A(),1),EV=l(z(),1);var OK=l(z(),1),AK=l(N(),1),t_=l(X(),1),LK=l(O(),1);var tK=l(X(),1),oK=l(z(),1);function WCe(e){let{isMultiSelecting:t,getMultiSelectedBlockClientIds:o,hasMultiSelection:r,getSelectedBlockClientId:n,getSelectedBlocksInitialCaretPosition:i,__unstableIsFullySelected:s}=e(x);return{isMultiSelecting:t(),multiSelectedBlockClientIds:o(),hasMultiSelection:r(),selectedBlockClientId:n(),initialPosition:i(),isFullSelection:s()}}function rK(){let{initialPosition:e,isMultiSelecting:t,multiSelectedBlockClientIds:o,hasMultiSelection:r,selectedBlockClientId:n,isFullSelection:i}=(0,oK.useSelect)(WCe,[]);return(0,tK.useRefEffect)(s=>{let{ownerDocument:a}=s,{defaultView:c}=a;if(e==null||!r||t)return;let{length:u}=o;u<2||i&&(s.contentEditable=!0,s.focus(),c.getSelection().removeAllRanges())},[r,t,o,n,e,i])}var ug=l(Ve(),1),SV=l(ot(),1),bB=l(z(),1),vB=l(X(),1),Qy=l(O(),1);var xV=l(w(),1);function nK(){let e=(0,Qy.useRef)(),t=(0,Qy.useRef)(),o=(0,Qy.useRef)(),{hasMultiSelection:r,getSelectedBlockClientId:n,getBlockCount:i,getBlockOrder:s,getLastFocus:a,getSectionRootClientId:c,isZoomOut:u}=M((0,bB.useSelect)(x)),{setLastFocus:d}=M((0,bB.useDispatch)(x)),f=(0,Qy.useRef)();function m(k){let v=e.current.ownerDocument===k.target.ownerDocument?e.current:e.current.ownerDocument.defaultView.frameElement;if(f.current)f.current=null;else if(r())e.current.focus();else if(n())a()?.current?a().current.focus():e.current.querySelector(`[data-block="${n()}"]`).focus();else if(u()){let y=c(),_=s(y);_.length?e.current.querySelector(`[data-block="${_[0]}"]`).focus():y?e.current.querySelector(`[data-block="${y}"]`).focus():v.focus()}else{let y=k.target.compareDocumentPosition(v)&k.target.DOCUMENT_POSITION_FOLLOWING,_=ug.focus.tabbable.find(e.current);_.length&&(y?_[0]:_[_.length-1]).focus()}}let h=(0,xV.jsx)("div",{ref:t,tabIndex:"0",onFocus:m}),p=(0,xV.jsx)("div",{ref:o,tabIndex:"0",onFocus:m}),g=(0,vB.useRefEffect)(k=>{function v(B){if(B.defaultPrevented||B.keyCode!==SV.TAB||!o.current||!t.current)return;let{target:P,shiftKey:T}=B,E=T?"findPrevious":"findNext",L=ug.focus.tabbable[E](P),I=P.closest("[data-block]"),R=I&&L&&(lG(I,L)||Oa(I,L));if((0,ug.isFormElement)(L)&&R)return;let V=T?t:o;f.current=!0,V.current.focus({preventScroll:!0})}function y(B){d({...a(),current:B.target});let{ownerDocument:P}=k;!B.relatedTarget&&B.target.hasAttribute("data-block")&&P.activeElement===P.body&&i()===0&&k.focus()}function _(B){if(B.keyCode!==SV.TAB||B.target?.getAttribute("role")==="region"||e.current===B.target)return;let T=B.shiftKey?"findPrevious":"findNext",E=ug.focus.tabbable[T](B.target);(E===t.current||E===o.current)&&(B.preventDefault(),E.focus({preventScroll:!0}))}let{ownerDocument:S}=k,{defaultView:C}=S;return C.addEventListener("keydown",_),k.addEventListener("keydown",v),k.addEventListener("focusout",y),()=>{C.removeEventListener("keydown",_),k.removeEventListener("keydown",v),k.removeEventListener("focusout",y)}},[]),b=(0,vB.useMergeRefs)([e,g]);return[h,b,p]}var Co=l(Ve(),1),Na=l(ot(),1),kB=l(z(),1),iK=l(X(),1);function $Ce(e,t,o){let r=t===Na.UP||t===Na.DOWN,{tagName:n}=e,i=e.getAttribute("type");return r&&!o?n==="INPUT"?!["date","datetime-local","month","number","range","time","week"].includes(i):!0:n==="INPUT"?["button","checkbox","number","color","file","image","radio","reset","submit"].includes(i):n!=="TEXTAREA"}function wV(e,t,o,r){let n=Co.focus.focusable.find(o);t&&n.reverse(),n=n.slice(n.indexOf(e)+1);let i;r&&(i=e.getBoundingClientRect());function s(a){if(a.contentEditable!=="true"&&Hi(a)&&Co.focus.focusable.find(a).filter(c=>!(0,Co.isFormElement)(c)).length!==0||!Co.focus.tabbable.isTabbableIndex(a)||a.isContentEditable&&a.contentEditable!=="true")return!1;if(r){let c=a.getBoundingClientRect();if(c.left>=i.right||c.right<=i.left)return!1}return!0}return n.find(s)}function sK(){let{getMultiSelectedBlocksStartClientId:e,getMultiSelectedBlocksEndClientId:t,getSettings:o,hasMultiSelection:r,__unstableIsFullySelected:n}=(0,kB.useSelect)(x),{selectBlock:i}=(0,kB.useDispatch)(x);return(0,iK.useRefEffect)(s=>{let a;function c(){a=null}function u(f,m){let h=wV(f,m,s);return h&&Hi(h)}function d(f){if(f.defaultPrevented)return;let{keyCode:m,target:h,shiftKey:p,ctrlKey:g,altKey:b,metaKey:k}=f,v=m===Na.UP,y=m===Na.DOWN,_=m===Na.LEFT,S=m===Na.RIGHT,C=v||_,B=_||S,P=v||y,T=B||P,E=p||g||b||k,L=P?Co.isVerticalEdge:Co.isHorizontalEdge,{ownerDocument:I}=s,{defaultView:R}=I;if(!T||o().isPreviewMode)return;if(r()){if(p||!n())return;f.preventDefault(),C?i(e()):i(t(),-1);return}if(!$Ce(h,m,E))return;P?a||(a=(0,Co.computeCaretRect)(R)):a=null;let V=(0,Co.isRTL)(h)?!C:C,{keepCaretInsideBlock:j}=o();if(p)u(h,C)&&L(h,C)&&(s.contentEditable=!0,s.focus());else if(P&&(0,Co.isVerticalEdge)(h,C)&&(!b||(0,Co.isHorizontalEdge)(h,V))&&!j){let H=wV(h,C,s,!0);H&&((0,Co.placeCaretAtVerticalEdge)(H,b?!C:C,b?void 0:a),f.preventDefault())}else if(B&&R.getSelection().isCollapsed&&(0,Co.isHorizontalEdge)(h,V)&&!j){let H=wV(h,V,s);(0,Co.placeCaretAtHorizontalEdge)(H,C),f.preventDefault()}}return s.addEventListener("mousedown",c),s.addEventListener("keydown",d),()=>{s.removeEventListener("mousedown",c),s.removeEventListener("keydown",d)}},[])}var aK=l(X(),1),lK=l(z(),1),Ma=l(ot(),1);function cK(){let e=(0,lK.useSelect)(t=>t(x).getSettings().isPreviewMode,[]);return(0,aK.useRefEffect)(t=>{if(!e)return;function o(r){let{keyCode:n,shiftKey:i,target:s}=r,a=n===Ma.TAB,c=n===Ma.UP,u=n===Ma.DOWN,d=n===Ma.LEFT;if(!a&&!(c||u||d||n===Ma.RIGHT))return;let h=a?i:c||d,p=Array.from(t.querySelectorAll("[data-block]"));if(!p.length)return;let g=s.closest("[data-block]"),b=g?p.indexOf(g):-1;if(b===-1||a&&(h&&b===0||!h&&b===p.length-1))return;let k;h?k=b<=0?p.length-1:b-1:k=b===-1||b>=p.length-1?0:b+1,r.preventDefault(),p[k].focus()}return t.addEventListener("keydown",o),()=>{t.removeEventListener("keydown",o)}},[e])}var uK=l(Ve(),1),yB=l(z(),1),dK=l(js(),1),fK=l(X(),1);function mK(){let{getBlockOrder:e,getSelectedBlockClientIds:t,getBlockRootClientId:o}=(0,yB.useSelect)(x),{multiSelect:r,selectBlock:n}=(0,yB.useDispatch)(x),i=(0,dK.__unstableUseShortcutEventMatch)();return(0,fK.useRefEffect)(s=>{function a(c){if(!i("core/block-editor/select-all",c))return;let u=t();if(u.length<2&&!(0,uK.isEntirelySelected)(c.target))return;c.preventDefault();let{ownerDocument:d}=c.target,[f]=u,m=Hi(d.activeElement);if(m&&m!==f&&!Oa(d.getElementById("block-"+f),d.activeElement)){n(m);return}let h=o(f),p=e(h);if(u.length===p.length){h&&(s.ownerDocument.defaultView.getSelection().removeAllRanges(),n(h));return}r(p[0],p[p.length-1])}return s.addEventListener("keydown",a),()=>{s.removeEventListener("keydown",a)}},[])}var _B=l(z(),1),hK=l(X(),1);function pK(e,t){e.contentEditable=t,t&&e.focus()}function gK(){let{startMultiSelect:e,stopMultiSelect:t}=(0,_B.useDispatch)(x),{getSettings:o,isSelectionEnabled:r,hasSelectedBlock:n,isDraggingBlocks:i,isMultiSelecting:s}=(0,_B.useSelect)(x);return(0,hK.useRefEffect)(a=>{let{ownerDocument:c}=a,{defaultView:u}=c,d,f;function m(){t(),u.removeEventListener("mouseup",m),f=u.requestAnimationFrame(()=>{if(!n())return;pK(a,!1);let b=u.getSelection();if(b.rangeCount){let k=b.getRangeAt(0),{commonAncestorContainer:v}=k,y=k.cloneRange();d.contains(v)&&(d.focus(),b.removeAllRanges(),b.addRange(y))}})}let h;function p({target:b}){h=b}function g({buttons:b,target:k,relatedTarget:v}){k.contains(h)&&(k.contains(v)||i()||b===1&&(s()||a!==k&&(k.getAttribute("contenteditable")!=="true"&&!o().isPreviewMode||r()&&(d=k,e(),u.addEventListener("mouseup",m),pK(a,!0)))))}return a.addEventListener("mouseout",g),a.addEventListener("mousedown",p),()=>{a.removeEventListener("mouseout",g),u.removeEventListener("mouseup",m),u.cancelAnimationFrame(f)}},[e,t,r,n])}var wB=l(z(),1),vK=l(X(),1),xB=l(yr(),1),kK=l(Ve(),1);function KCe(e){let{anchorNode:t,anchorOffset:o}=e;return t.nodeType===t.TEXT_NODE||o===0?t:t.childNodes[o-1]}function YCe(e){let{focusNode:t,focusOffset:o}=e;return t.nodeType===t.TEXT_NODE||o===t.childNodes.length?t:o===0&&(0,kK.isSelectionForward)(e)?t.previousSibling??t.parentElement:t.childNodes[o]}function qCe(e,t){let o=0;for(;e[o]===t[o];)o++;return o}function bK(e,t){e.contentEditable!==String(t)&&(e.contentEditable=t,t&&e.focus())}function SB(e){return(e.nodeType===e.ELEMENT_NODE?e:e.parentElement)?.closest("[data-wp-block-attribute-key]")}function yK(){let{multiSelect:e,selectBlock:t,selectionChange:o}=(0,wB.useDispatch)(x),{getBlockParents:r,getBlockSelectionStart:n,isMultiSelecting:i}=(0,wB.useSelect)(x);return(0,vK.useRefEffect)(s=>{let{ownerDocument:a}=s,{defaultView:c}=a;function u(d){let f=c.getSelection();if(!f.rangeCount)return;let m=KCe(f),h=YCe(f);if(!s.contains(m)||!s.contains(h))return;let p=d.shiftKey&&d.type==="mouseup";if(f.isCollapsed&&!p){if(s.contentEditable==="true"&&!i()){bK(s,!1);let v=m.nodeType===m.ELEMENT_NODE?m:m.parentElement;v=v?.closest("[contenteditable]"),v?.focus()}return}let g=Hi(m),b=Hi(h);if(p){let v=n(),y=Hi(d.target),_=y!==b;(g===b&&f.isCollapsed||!b||_)&&(b=y),g!==v&&(g=v)}if(g===void 0&&b===void 0){bK(s,!1);return}if(d.type==="mouseup"&&!d.shiftKey&&!i()&&g===b){let v=Hi(d.target);if(v&&v!==g){f.removeAllRanges();return}}if(g===b)if(i())e(g,g);else{let v=!f.isCollapsed&&(SB(m)||SB(h));if(v&&a.activeElement!==v){let y=f.getRangeAt(0),_=(0,xB.create)({element:v,range:y,__unstableIsEditableTree:!0});o({start:{clientId:g,attributeKey:v.dataset.wpBlockAttributeKey,offset:_.start??0},end:{clientId:g,attributeKey:v.dataset.wpBlockAttributeKey,offset:_.end}})}else t(g)}else{let v=[...r(g),g],y=[...r(b),b],_=qCe(v,y);if(v[_]!==g||y[_]!==b){e(v[_],y[_]);return}let S=SB(m),C=SB(h);if(S&&C){let B=f.getRangeAt(0),P=(0,xB.create)({element:S,range:B,__unstableIsEditableTree:!0}),T=(0,xB.create)({element:C,range:B,__unstableIsEditableTree:!0}),E=P.start??P.end,L=T.start??T.end;o({start:{clientId:g,attributeKey:S.dataset.wpBlockAttributeKey,offset:E},end:{clientId:b,attributeKey:C.dataset.wpBlockAttributeKey,offset:L}})}else e(g,b)}}return a.addEventListener("selectionchange",u),c.addEventListener("mouseup",u),()=>{a.removeEventListener("selectionchange",u),c.removeEventListener("mouseup",u)}},[e,t,o,r])}var CB=l(z(),1),_K=l(X(),1);function SK(){let{selectBlock:e}=(0,CB.useDispatch)(x),{isSelectionEnabled:t,getBlockSelectionStart:o,hasMultiSelection:r}=(0,CB.useSelect)(x);return(0,_K.useRefEffect)(n=>{function i(s){if(!t()||s.button!==0)return;let a=o(),c=Hi(s.target);s.shiftKey?a&&a!==c&&(n.contentEditable=!0,n.focus()):r()&&e(c)}return n.addEventListener("mousedown",i),()=>{n.removeEventListener("mousedown",i)}},[e,t,o,r])}var BB=l(z(),1),xK=l(X(),1),$l=l(ot(),1),Hs=l(Y(),1);function wK(){let{__unstableIsFullySelected:e,getSelectedBlockClientIds:t,getSelectedBlockClientId:o,__unstableIsSelectionMergeable:r,hasMultiSelection:n,getBlockName:i,canInsertBlockType:s,getBlockRootClientId:a,getSelectionStart:c,getSelectionEnd:u,getBlockAttributes:d}=(0,BB.useSelect)(x),{replaceBlocks:f,__unstableSplitSelection:m,removeBlocks:h,__unstableDeleteSelection:p,__unstableExpandSelection:g,__unstableMarkAutomaticChange:b}=(0,BB.useDispatch)(x);return(0,xK.useRefEffect)(k=>{function v(S){k.contentEditable==="true"&&S.preventDefault()}function y(S){if(!S.defaultPrevented){if(!n()){if(S.keyCode===$l.ENTER){if(S.shiftKey||e())return;let C=o(),B=i(C),P=c(),T=u();if(P.attributeKey===T.attributeKey){let E=d(C)[P.attributeKey],L=(0,Hs.getBlockTransforms)("from").filter(({type:R})=>R==="enter"),I=(0,Hs.findTransform)(L,R=>R.regExp.test(E));if(I){f(C,I.transform({content:E})),b();return}}if(!(0,Hs.hasBlockSupport)(B,"splitting",!1)&&!S.__deprecatedOnSplit)return;(s((0,Hs.getDefaultBlockName)(),a(C))||s(B,a(C)))&&(m(),S.preventDefault())}return}S.keyCode===$l.ENTER?(k.contentEditable=!1,S.preventDefault(),e()?f(t(),(0,Hs.createBlock)((0,Hs.getDefaultBlockName)())):m()):S.keyCode===$l.BACKSPACE||S.keyCode===$l.DELETE?(k.contentEditable=!1,S.preventDefault(),e()?h(t()):r()?p(S.keyCode===$l.DELETE):g()):S.key.length===1&&!(S.metaKey||S.ctrlKey)&&(k.contentEditable=!1,r()?p(S.keyCode===$l.DELETE):(S.preventDefault(),k.ownerDocument.defaultView.getSelection().removeAllRanges()))}}function _(S){n()&&(k.contentEditable=!1,r()?p():(S.preventDefault(),k.ownerDocument.defaultView.getSelection().removeAllRanges()))}return k.addEventListener("beforeinput",v),k.addEventListener("keydown",y),k.addEventListener("compositionstart",_),()=>{k.removeEventListener("beforeinput",v),k.removeEventListener("keydown",y),k.removeEventListener("compositionstart",_)}},[])}var Da=l(Y(),1),TB=l(Ve(),1),mg=l(z(),1),RK=l(X(),1);var CK=l(O(),1),BK=l(Y(),1),Jy=l(z(),1),$i=l(N(),1),EK=l(Xn(),1);function dg(){let{getBlockName:e}=(0,Jy.useSelect)(x),{getBlockType:t}=(0,Jy.useSelect)(BK.store),{createSuccessNotice:o}=(0,Jy.useDispatch)(EK.store);return(0,CK.useCallback)((r,n)=>{let i="";if(r==="copyStyles")i=(0,$i.__)("Styles copied to clipboard.");else if(n.length===1){let s=n[0],a=t(e(s))?.title;r==="copy"?i=(0,$i.sprintf)((0,$i.__)('Copied "%s" to clipboard.'),a):i=(0,$i.sprintf)((0,$i.__)('Moved "%s" to clipboard.'),a)}else r==="copy"?i=(0,$i.sprintf)((0,$i._n)("Copied %d block to clipboard.","Copied %d blocks to clipboard.",n.length),n.length):i=(0,$i.sprintf)((0,$i._n)("Moved %d block to clipboard.","Moved %d blocks to clipboard.",n.length),n.length);o(i,{type:"snackbar"})},[o,e,t])}var IK=l(Ve(),1),Ki=l(Y(),1);var TK=l(Ve(),1);function ZCe(e){let t="<!--StartFragment-->",o=e.indexOf(t);if(o>-1)e=e.substring(o+t.length);else return e;let n=e.indexOf("<!--EndFragment-->");return n>-1&&(e=e.substring(0,n)),e}function XCe(e){let t="<meta charset='utf-8'>";return e.startsWith(t)?e.slice(t.length):e}function fg({clipboardData:e}){let t="",o="";try{t=e.getData("text/plain"),o=e.getData("text/html")}catch{return}o=ZCe(o),o=XCe(o);let r=(0,TK.getFilesFromDataTransfer)(e);return r.length&&!QCe(r,o)?{files:r}:{html:o,plainText:t,files:[]}}function QCe(e,t){if(t&&e?.length===1&&e[0].type.indexOf("image/")===0){let o=/<\s*img\b/gi;if(t.match(o)?.length!==1)return!0;let r=/<\s*img\b[^>]*\bsrc="file:\/\//i;if(t.match(r))return!0}return!1}var CV=Symbol("requiresWrapperOnCopy");function EB(e,t,o){let r=t,[n]=t;if(n&&o.select(Ki.store).getBlockType(n.name)[CV]){let{getBlockRootClientId:a,getBlockName:c,getBlockAttributes:u}=o.select(x),d=a(n.clientId),f=c(d);f&&(r=(0,Ki.createBlock)(f,u(d),r))}let i=(0,Ki.serialize)(r);e.clipboardData.setData("text/plain",JCe(i)),e.clipboardData.setData("text/html",i)}function PK(e,t){let{plainText:o,html:r,files:n}=fg(e),i=[];if(n.length){let s=(0,Ki.getBlockTransforms)("from");i=n.reduce((a,c)=>{let u=(0,Ki.findTransform)(s,d=>d.type==="files"&&d.isMatch([c]));return u&&a.push(u.transform([c])),a},[]).flat()}else i=(0,Ki.pasteHandler)({HTML:r,plainText:o,mode:"BLOCKS",canUserUseUnfilteredHTML:t});return i}function JCe(e){return e=e.replace(/<br>/g,` |
| 49 |
`),(0,IK.__unstableStripHTML)(e).trim().replace(/\n\n+/g,` |
| 50 |
|
| 51 |
`)}function e_(){let e=(0,mg.useRegistry)(),{getBlocksByClientId:t,getSelectedBlockClientIds:o,hasMultiSelection:r,getSettings:n,getBlockName:i,__unstableIsFullySelected:s,__unstableIsSelectionCollapsed:a,__unstableIsSelectionMergeable:c,__unstableGetSelectedBlocksWithPartialSelection:u,canInsertBlockType:d,getBlockRootClientId:f}=(0,mg.useSelect)(x),{flashBlock:m,removeBlocks:h,replaceBlocks:p,__unstableDeleteSelection:g,__unstableExpandSelection:b,__unstableSplitSelection:k}=(0,mg.useDispatch)(x),v=dg();return(0,RK.useRefEffect)(y=>{function _(S){if(S.defaultPrevented)return;let C=o();if(C.length===0)return;if(!r()){let{target:L}=S,{ownerDocument:I}=L;if(S.type==="copy"||S.type==="cut"?(0,TB.documentHasUncollapsedSelection)(I):(0,TB.documentHasSelection)(I)&&!I.activeElement.isContentEditable)return}let{activeElement:B}=S.target.ownerDocument;if(!y.contains(B))return;let P=c(),T=a()||s(),E=!T&&!P;if(S.type==="copy"||S.type==="cut")if(S.preventDefault(),C.length===1&&m(C[0]),E)b();else{v(S.type,C);let L;if(T)L=t(C);else{let[I,R]=u(),V=t(C.slice(1,C.length-1));L=[I,...V,R]}EB(S,L,e)}if(S.type==="cut")T&&!E?h(C):(S.target.ownerDocument.activeElement.contentEditable=!1,g());else if(S.type==="paste"){let{__experimentalCanUserUseUnfilteredHTML:L,mediaUpload:I}=n();if(S.clipboardData.getData("rich-text")==="true")return;let{plainText:V,html:j,files:H}=fg(S),F=s(),U=[];if(H.length){if(!I){S.preventDefault();return}let le=(0,Da.getBlockTransforms)("from");U=H.reduce((oe,re)=>{let Q=(0,Da.findTransform)(le,$=>$.type==="files"&&$.isMatch([re]));return Q&&oe.push(Q.transform([re])),oe},[]).flat()}else U=(0,Da.pasteHandler)({HTML:j,plainText:V,mode:F?"BLOCKS":"AUTO",canUserUseUnfilteredHTML:L});if(typeof U=="string")return;if(F){p(C,U,U.length-1,-1),S.preventDefault();return}if(!r()&&!(0,Da.hasBlockSupport)(i(C[0]),"splitting",!1)&&!S.__deprecatedOnSplit)return;let[G]=C,W=f(G),J=[];for(let le of U)if(d(le.name,W))J.push(le);else{let oe=i(W),re=le.name!==oe?(0,Da.switchToBlockType)(le,oe):[le];if(!re)return;for(let Q of re)for(let $ of Q.innerBlocks)J.push($)}k(J),S.preventDefault()}}return y.ownerDocument.addEventListener("copy",_),y.ownerDocument.addEventListener("cut",_),y.ownerDocument.addEventListener("paste",_),()=>{y.ownerDocument.removeEventListener("copy",_),y.ownerDocument.removeEventListener("cut",_),y.ownerDocument.removeEventListener("paste",_)}},[])}var pg=l(w(),1);function BV(){let[e,t,o]=nK(),r=(0,OK.useSelect)(n=>n(x).hasMultiSelection(),[]);return[e,(0,t_.useMergeRefs)([t,e_(),wK(),gK(),yK(),SK(),rK(),mK(),sK(),cK(),(0,t_.useRefEffect)(n=>(n.tabIndex=0,n.dataset.hasMultiSelection=r,r?(n.setAttribute("aria-label",(0,AK.__)("Multiple selected blocks")),()=>{delete n.dataset.hasMultiSelection,n.removeAttribute("aria-label")}):()=>{delete n.dataset.hasMultiSelection}),[r])]),o]}function e1e({children:e,...t},o){let[r,n,i]=BV();return(0,pg.jsxs)(pg.Fragment,{children:[r,(0,pg.jsx)("div",{...t,ref:(0,t_.useMergeRefs)([n,o]),className:D(t.className,"block-editor-writing-flow"),children:e}),i]})}var IB=(0,LK.forwardRef)(e1e);var PB=null;function NK(){return PB||(PB=Array.from(document.styleSheets).reduce((e,t)=>{try{t.cssRules}catch{return e}let{ownerNode:o,cssRules:r}=t;if(o===null||!r||o.id.startsWith("wp-")||!o.id)return e;function n(i){return Array.from(i).find(({selectorText:s,conditionText:a,cssRules:c})=>a?n(c):s&&(s.includes(".editor-styles-wrapper")||s.includes(".wp-block")))}if(n(r)){let i=o.tagName==="STYLE";if(i){let s=o.id.replace("-inline-css","-css"),a=document.getElementById(s);a&&e.push(a.cloneNode(!0))}if(e.push(o.cloneNode(!0)),!i){let s=o.id.replace("-css","-inline-css"),a=document.getElementById(s);a&&e.push(a.cloneNode(!0))}}return e},[]),PB)}var En=l(O(),1),o_=l(X(),1);function MK({frameSize:e,containerWidth:t,maxContainerWidth:o,scaleContainerWidth:r}){return(Math.min(t,o)-e*2)/r}function t1e(e,t){let{scaleValue:o,scrollHeight:r}=e,{frameSize:n,scaleValue:i}=t;return r*(i/o)+n*2}function o1e(e,t){let{containerHeight:o,frameSize:r,scaleValue:n,scrollTop:i}=e,{containerHeight:s,frameSize:a,scaleValue:c,scrollHeight:u}=t,d=i;d=(d+o/2-r)/n-o/2,d=(d+s/2)*c+a-s/2,d=i<=r?0:d;let f=u-s;return Math.round(Math.min(Math.max(0,d),Math.max(0,f)))}function r1e(e,t){let{scaleValue:o,frameSize:r,scrollTop:n}=e,{scaleValue:i,frameSize:s,scrollTop:a}=t;return[{translate:"0 0",scale:o,paddingTop:`${r/o}px`,paddingBottom:`${r/o}px`},{translate:`0 ${n-a}px`,scale:i,paddingTop:`${s/i}px`,paddingBottom:`${s/i}px`}]}function DK({frameSize:e,iframeDocument:t,maxContainerWidth:o=750,scale:r}){let[n,{height:i}]=(0,o_.useResizeObserver)(),[s,{width:a,height:c}]=(0,o_.useResizeObserver)(),u=(0,En.useRef)(0),d=r!==1,f=(0,o_.useReducedMotion)(),m=r==="auto-scaled",h=(0,En.useRef)(!1),p=(0,En.useRef)(null);(0,En.useEffect)(()=>{d||(u.current=a)},[a,d]);let g=Math.max(u.current,a),b=m?MK({frameSize:e,containerWidth:a,maxContainerWidth:o,scaleContainerWidth:g}):r,k=(0,En.useRef)({scaleValue:b,frameSize:e,containerHeight:0,scrollTop:0,scrollHeight:0}),v=(0,En.useRef)({scaleValue:b,frameSize:e,containerHeight:0,scrollTop:0,scrollHeight:0}),y=(0,En.useCallback)(()=>{let{scrollTop:C}=k.current,{scrollTop:B}=v.current;return t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scroll-top",`${C}px`),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scroll-top-next",`${B}px`),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-overflow-behavior",k.current.scrollHeight===k.current.containerHeight?"auto":"scroll"),t.documentElement.classList.add("zoom-out-animation"),t.documentElement.animate(r1e(k.current,v.current),{easing:"cubic-bezier(0.46, 0.03, 0.52, 0.96)",duration:400})},[t]),_=(0,En.useCallback)(()=>{h.current=!1,p.current=null,t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scale",v.current.scaleValue),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-frame-size",`${v.current.frameSize}px`),t.documentElement.classList.remove("zoom-out-animation"),t.documentElement.scrollTop=v.current.scrollTop,t.documentElement.style.removeProperty("--wp-block-editor-iframe-zoom-out-scroll-top"),t.documentElement.style.removeProperty("--wp-block-editor-iframe-zoom-out-scroll-top-next"),t.documentElement.style.removeProperty("--wp-block-editor-iframe-zoom-out-overflow-behavior"),k.current=v.current},[t]),S=(0,En.useRef)(!1);return(0,En.useEffect)(()=>{let C=t&&S.current!==d;if(S.current=d,!!C&&(h.current=!0,!!d))return t.documentElement.classList.add("is-zoomed-out"),()=>{t.documentElement.classList.remove("is-zoomed-out")}},[t,d]),(0,En.useEffect)(()=>{if(t&&(m&&k.current.scaleValue!==1&&(k.current.scaleValue=MK({frameSize:k.current.frameSize,containerWidth:a,maxContainerWidth:o,scaleContainerWidth:a})),b<1&&(h.current||(t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scale",b),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-frame-size",`${e}px`)),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-content-height",`${i}px`),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-inner-height",`${c}px`),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-container-width",`${a}px`),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scale-container-width",`${g}px`)),h.current))if(h.current=!1,p.current){p.current.reverse();let C=k.current,B=v.current;k.current=B,v.current=C}else k.current.scrollTop=t.documentElement.scrollTop,k.current.scrollHeight=t.documentElement.scrollHeight,k.current.containerHeight=c,v.current={scaleValue:b,frameSize:e,containerHeight:t.documentElement.clientHeight},v.current.scrollHeight=t1e(k.current,v.current),v.current.scrollTop=o1e(k.current,v.current),p.current=y(),f?_():p.current.onfinish=_},[y,_,f,m,b,e,t,i,a,c,o,g]),{isZoomedOut:d,scaleContainerWidth:g,contentResizeListener:n,containerResizeListener:s}}var Gs=l(w(),1);function jK(e,t,o){let r={};for(let s in e)r[s]=e[s];if(e instanceof o.contentDocument.defaultView.MouseEvent){let s=o.getBoundingClientRect();r.clientX+=s.left,r.clientY+=s.top}let n=new t(e.type,r);r.defaultPrevented&&n.preventDefault(),!o.dispatchEvent(n)&&e.preventDefault()}function n1e(e){return(0,Kl.useRefEffect)(()=>{let{defaultView:t}=e;if(!t)return;let{frameElement:o}=t,r=e.documentElement,n=["dragover","mousemove"],i={};for(let s of n)i[s]=a=>{let u=Object.getPrototypeOf(a).constructor.name,d=window[u];jK(a,d,o)},r.addEventListener(s,i[s]);return()=>{for(let s of n)r.removeEventListener(s,i[s])}})}var VK=new WeakMap,i1e=globalThis.FinalizationRegistry?new globalThis.FinalizationRegistry(e=>URL.revokeObjectURL(e)):void 0;function s1e(e){let t=VK.get(e);if(t)return t;let o=`<!doctype html> |
| 52 |
<html> |
| 53 |
<head> |
| 54 |
<meta charset="utf-8"> |
| 55 |
<base href="${window.location.href}"> |
| 56 |
<style> |
| 57 |
html{ |
| 58 |
height: auto !important; |
| 59 |
min-height: 100%; |
| 60 |
} |
| 61 |
/* Lowest specificity to not override global styles */ |
| 62 |
:where(body) { |
| 63 |
margin: 0; |
| 64 |
/* Default background color in case zoom out mode background |
| 65 |
colors the html element */ |
| 66 |
background-color: white; |
| 67 |
} |
| 68 |
</style> |
| 69 |
${e.styles??""} |
| 70 |
${e.scripts??""} |
| 71 |
</head> |
| 72 |
<body> |
| 73 |
<script>document.currentScript.parentElement.remove()<\/script> |
| 74 |
</body> |
| 75 |
</html>`;return t=URL.createObjectURL(new Blob([o],{type:"text/html"})),VK.set(e,t),i1e?.register(e,t),t}function a1e({contentRef:e,children:t,tabIndex:o=0,scale:r=1,frameSize:n=0,readonly:i,forwardedRef:s,title:a=(0,FK.__)("Editor canvas"),...c}){let{resolvedAssets:u,isPreviewMode:d}=(0,EV.useSelect)(R=>{let V=R(x).getSettings();return{resolvedAssets:V.__unstableResolvedAssets,isPreviewMode:V.isPreviewMode}},[]),[f,m]=(0,Om.useState)(),[h,p]=(0,Om.useState)([]),[g,b,k]=BV(),v=(0,Kl.useRefEffect)(R=>{let V;function j(G){G.preventDefault()}function H(G){G.target.tagName==="A"&&G.target.getAttribute("href")?.startsWith("#")&&(G.preventDefault(),V.defaultView.location.hash=G.target.getAttribute("href").slice(1))}let{ownerDocument:F}=R;p(Array.from(F.body.classList).filter(G=>G.startsWith("admin-color-")||G.startsWith("post-type-")||G==="wp-embed-responsive"));function U(){let{contentDocument:G}=R,{documentElement:W}=G;V=G,m(G),W.classList.add("block-editor-iframe__html"),G.dir=F.dir;for(let J of NK())G.getElementById(J.id)||(G.head.appendChild(J.cloneNode(!0)),d||console.warn(`${J.id} was added to the iframe incorrectly. Please use block.json or enqueue_block_assets to add styles to the iframe.`,J));V.addEventListener("dragover",j,!1),V.addEventListener("drop",j,!1),V.addEventListener("click",H)}return R.addEventListener("load",U),()=>{m(void 0),R.removeEventListener("load",U),V?.removeEventListener("dragover",j),V?.removeEventListener("drop",j),V?.removeEventListener("click",H)}},[]),{contentResizeListener:y,containerResizeListener:_,isZoomedOut:S,scaleContainerWidth:C}=DK({scale:r,frameSize:parseInt(n),iframeDocument:f}),B=(0,Kl.useDisabled)({isDisabled:!i}),P=(0,Kl.useMergeRefs)([n1e(f),e,b,B]),T=(0,Kl.useRefEffect)(R=>R.ownerDocument.defaultView?(P(R),()=>P(null)):()=>{},[P]),E=s1e(u),L=o>=0&&!d,I=(0,Gs.jsxs)(Gs.Fragment,{children:[L&&g,(0,Gs.jsx)("iframe",{...c,style:{...c.style,height:c.style?.height,border:0},ref:(0,Kl.useMergeRefs)([s,v]),tabIndex:o,src:E,title:a,onKeyDown:R=>{if(c.onKeyDown&&c.onKeyDown(R),R.currentTarget.ownerDocument!==R.target.ownerDocument){let{stopPropagation:V}=R.nativeEvent;R.nativeEvent.stopPropagation=()=>{},R.stopPropagation(),R.nativeEvent.stopPropagation=V,jK(R,window.KeyboardEvent,R.currentTarget)}},children:f&&(0,Om.createPortal)((0,Gs.jsxs)("body",{ref:T,className:D("block-editor-iframe__body","editor-styles-wrapper",...h),children:[y,(0,Gs.jsx)(zK.__experimentalStyleProvider,{document:f,children:t})]}),f.documentElement)}),L&&k]});return(0,Gs.jsxs)("div",{className:"block-editor-iframe__container",children:[_,(0,Gs.jsx)("div",{className:D("block-editor-iframe__scale-container",S&&"is-zoomed-out"),style:{"--wp-block-editor-iframe-zoom-out-scale-container-width":S&&`${C}px`},children:I})]})}function l1e(e,t){return(0,EV.useSelect)(r=>r(x).getSettings().__internalIsInitialized,[])?(0,Gs.jsx)(a1e,{...e,forwardedRef:t}):null}var hg=(0,Om.forwardRef)(l1e);var Lq=l(A(),1),Sg=l(O(),1),Nq=l(z(),1);var OB={attribute:/\[\s*(?:(?<namespace>\*|[-\w\P{ASCII}]*)\|)?(?<name>[-\w\P{ASCII}]+)\s*(?:(?<operator>\W?=)\s*(?<value>.+?)\s*(\s(?<caseSensitive>[iIsS]))?\s*)?\]/gu,id:/#(?<name>[-\w\P{ASCII}]+)/gu,class:/\.(?<name>[-\w\P{ASCII}]+)/gu,comma:/\s*,\s*/g,combinator:/\s*[\s>+~]\s*/g,"pseudo-element":/::(?<name>[-\w\P{ASCII}]+)(?:\((?<argument>¶*)\))?/gu,"pseudo-class":/:(?<name>[-\w\P{ASCII}]+)(?:\((?<argument>¶*)\))?/gu,universal:/(?:(?<namespace>\*|[-\w\P{ASCII}]*)\|)?\*/gu,type:/(?:(?<namespace>\*|[-\w\P{ASCII}]*)\|)?(?<name>[-\w\P{ASCII}]+)/gu},c1e=new Set(["combinator","comma"]);var u1e=e=>{switch(e){case"pseudo-element":case"pseudo-class":return new RegExp(OB[e].source.replace("(?<argument>\xB6*)","(?<argument>.*)"),"gu");default:return OB[e]}};function d1e(e,t){let o=0,r="";for(;t<e.length;t++){let n=e[t];switch(n){case"(":++o;break;case")":--o;break}if(r+=n,o===0)return r}return r}function f1e(e,t=OB){if(!e)return[];let o=[e];for(let[n,i]of Object.entries(t))for(let s=0;s<o.length;s++){let a=o[s];if(typeof a!="string")continue;i.lastIndex=0;let c=i.exec(a);if(!c)continue;let u=c.index-1,d=[],f=c[0],m=a.slice(0,u+1);m&&d.push(m),d.push({...c.groups,type:n,content:f});let h=a.slice(u+f.length+1);h&&d.push(h),o.splice(s,1,...d)}let r=0;for(let n of o)switch(typeof n){case"string":throw new Error(`Unexpected sequence ${n} found at index ${r}`);case"object":r+=n.content.length,n.pos=[r-n.content.length,r],c1e.has(n.type)&&(n.content=n.content.trim()||" ");break}return o}var m1e=/(['"])([^\\\n]+?)\1/g,p1e=/\\./g;function TV(e,t=OB){if(e=e.trim(),e==="")return[];let o=[];e=e.replace(p1e,(i,s)=>(o.push({value:i,offset:s}),"\uE000".repeat(i.length))),e=e.replace(m1e,(i,s,a,c)=>(o.push({value:i,offset:c}),`${s}${"\uE001".repeat(a.length)}${s}`));{let i=0,s;for(;(s=e.indexOf("(",i))>-1;){let a=d1e(e,s);o.push({value:a,offset:s}),e=`${e.substring(0,s)}(${"\xB6".repeat(a.length-2)})${e.substring(s+a.length)}`,i=s+a.length}}let r=f1e(e,t),n=new Set;for(let i of o.reverse())for(let s of r){let{offset:a,value:c}=i;if(!(s.pos[0]<=a&&a+c.length<=s.pos[1]))continue;let{content:u}=s,d=a-s.pos[0];s.content=u.slice(0,d)+c+u.slice(d+c.length),s.content!==u&&n.add(s)}for(let i of n){let s=u1e(i.type);if(!s)throw new Error(`Unknown token type: ${i.type}`);s.lastIndex=0;let a=s.exec(i.content);if(!a)throw new Error(`Unable to parse content for ${i.type}: ${i.content}`);Object.assign(i,a.groups)}return r}function*RB(e,t){switch(e.type){case"list":for(let o of e.list)yield*RB(o,e);break;case"complex":yield*RB(e.left,e),yield*RB(e.right,e);break;case"compound":yield*e.list.map(o=>[o,e]);break;default:yield[e,t]}}function UK(e){let t;return Array.isArray(e)?t=e:t=[...RB(e)].map(([o])=>o),t.map(o=>o.content).join("")}var Iq=l(lq(),1),Pq=l(NB(),1),Rq=l(dq(),1),Oq=l(Eq(),1),Tq=new Map,Aq=[{type:"type",content:"body"},{type:"type",content:"html"},{type:"pseudo-class",content:":root"},{type:"pseudo-class",content:":where(body)"},{type:"pseudo-class",content:":where(:root)"},{type:"pseudo-class",content:":where(html)"}];function BBe(e,t){let o=TV(t),r=o.findLastIndex(({content:s,type:a})=>Aq.some(c=>s===c.content&&a===c.type)),n=-1;for(let s=r+1;s<o.length;s++)if(o[s].type==="combinator"){n=s;break}let i=TV(e);return o.splice(n===-1?o.length:n,0,{type:"combinator",content:" "},...i),UK(o)}function EBe({css:e,ignoredSelectors:t=[],baseURL:o},r="",n){if(!r&&!o)return e;try{let i=[...t,...n?.ignoredSelectors??[],r];return new Iq.default([r&&(0,Rq.default)({prefix:r,transform(s,a,c){return i.some(d=>d instanceof RegExp?a.match(d):a.includes(d))?a:Aq.some(d=>a.startsWith(d.content))?BBe(s,a):c}}),o&&(0,Oq.default)({rootUrl:o})].filter(Boolean)).process(e,{}).css}catch(i){return i instanceof Pq.default?console.warn("wp.blockEditor.transformStyles Failed to transform CSS.",i.message+` |
| 76 |
`+i.showSourceCode(!1)):console.warn("wp.blockEditor.transformStyles Failed to transform CSS.",i),null}}var TBe=(e,t="",o)=>{let r=Tq.get(t);return r||(r=new WeakMap,Tq.set(t,r)),e.map(n=>{let i=r.get(n);return i||(i=EBe(n,t,o),r.set(n,i)),i})},_g=TBe;var ad=l(w(),1);cu([uu,sh]);function IBe(e,t){return(0,Sg.useCallback)(o=>{if(!o)return;let{ownerDocument:r}=o,{defaultView:n,body:i}=r,s=t?r.querySelector(t):i,a;if(s)a=n?.getComputedStyle(s,null).getPropertyValue("background-color");else{let u=r.createElement("div");u.classList.add("editor-styles-wrapper"),i.appendChild(u),a=n?.getComputedStyle(u,null).getPropertyValue("background-color"),i.removeChild(u)}let c=Tt(a);c.luminance()>.5||c.alpha()===0?i.classList.remove("is-dark-theme"):i.classList.add("is-dark-theme")},[e,t])}function PBe({styles:e,scope:t,transformOptions:o}){let r=(0,Nq.useSelect)(s=>M(s(x)).getStyleOverrides(),[]),[n,i]=(0,Sg.useMemo)(()=>{let s=Object.values(e??[]);for(let[a,c]of r){let u=s.findIndex(({id:f})=>a===f),d={...c,id:a};u===-1?s.push(d):s[u]=d}return[_g(s.filter(a=>a?.css),t,o),s.filter(a=>a.__unstableType==="svgs").map(a=>a.assets).join("")]},[e,r,t,o]);return(0,ad.jsxs)(ad.Fragment,{children:[(0,ad.jsx)("style",{ref:IBe(n,t)}),n.map((s,a)=>(0,ad.jsx)("style",{children:s},a)),(0,ad.jsx)(Lq.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 0 0",width:"0",height:"0",role:"none",style:{visibility:"hidden",position:"absolute",left:"-9999px",overflow:"hidden"},dangerouslySetInnerHTML:{__html:i}})]})}var Yl=(0,Sg.memo)(PBe);var Yi=l(w(),1),RBe=(0,XB.memo)(xg),c3=2e3,OBe=[];function ABe({viewportWidth:e,containerWidth:t,minHeight:o,additionalStyles:r=OBe}){e||(e=t);let[n,{height:i}]=(0,p_.useResizeObserver)(),{styles:s}=(0,Mq.useSelect)(d=>({styles:d(x).getSettings().styles}),[]),a=(0,XB.useMemo)(()=>s&&[...s,{css:"body{height:auto;overflow:hidden;border:none;padding:0;}",__unstableType:"presets"},...r],[s,r]),c=t/e,u=i?t/(i*c):0;return(0,Yi.jsx)(Dq.Disabled,{className:"block-editor-block-preview__content",style:{transform:`scale(${c})`,aspectRatio:u,maxHeight:i>c3?c3*c:void 0,minHeight:o},children:(0,Yi.jsxs)(hg,{contentRef:(0,p_.useRefEffect)(d=>{let{ownerDocument:{documentElement:f}}=d;f.classList.add("block-editor-block-preview__content-iframe"),f.style.position="absolute",f.style.width="100%",d.style.boxSizing="border-box",d.style.position="absolute",d.style.width="100%"},[]),"aria-hidden":!0,tabIndex:-1,style:{position:"absolute",width:e,height:i,pointerEvents:"none",maxHeight:c3,minHeight:c!==0&&c<1&&o?o/c:o},children:[(0,Yi.jsx)(Yl,{styles:a}),n,(0,Yi.jsx)(RBe,{renderAppender:!1})]})})}function Vq(e){let[t,{width:o}]=(0,p_.useResizeObserver)();return(0,Yi.jsxs)(Yi.Fragment,{children:[(0,Yi.jsx)("div",{style:{position:"relative",width:"100%",height:0},children:t}),(0,Yi.jsx)("div",{className:"block-editor-block-preview__container",children:!!o&&(0,Yi.jsx)(ABe,{...e,containerWidth:o})})]})}var wg=l(O(),1),Uq=l(zq(),1),jq=(0,Uq.createQueue)();function Hq({children:e,placeholder:t}){let[o,r]=(0,wg.useState)(!1);return(0,wg.useEffect)(()=>{let n={};return jq.add(n,()=>{(0,wg.flushSync)(()=>{r(!0)})}),()=>{jq.cancel(n)}},[]),o?e:t}var Dm=l(w(),1),LBe=[];function NBe({blocks:e,viewportWidth:t=1200,minHeight:o,additionalStyles:r=LBe,__experimentalMinHeight:n,__experimentalPadding:i}){n&&(o=n,(0,u3.default)("The __experimentalMinHeight prop",{since:"6.2",version:"6.4",alternative:"minHeight"})),i&&(r=[...r,{css:`body { padding: ${i}px; }`}],(0,u3.default)("The __experimentalPadding prop of BlockPreview",{since:"6.2",version:"6.4",alternative:"additionalStyles"}));let s=(0,d3.useSelect)(u=>u(x).getSettings(),[]),a=(0,Mm.useMemo)(()=>({...s,focusMode:!1,isPreviewMode:!0}),[s]),c=(0,Mm.useMemo)(()=>Array.isArray(e)?e:[e],[e]);return!e||e.length===0?null:(0,Dm.jsx)(cg,{value:c,settings:a,children:(0,Dm.jsx)(Vq,{viewportWidth:t,minHeight:o,additionalStyles:r})})}var Gq=(0,Mm.memo)(NBe);Gq.Async=Hq;var Tn=Gq;function Wq({blocks:e,props:t={},layout:o}){let r=(0,d3.useSelect)(u=>u(x).getSettings(),[]),n=(0,Mm.useMemo)(()=>({...r,styles:void 0,focusMode:!1,isPreviewMode:!0}),[r]),i=(0,QB.useDisabled)(),s=(0,QB.useMergeRefs)([t.ref,i]),a=(0,Mm.useMemo)(()=>Array.isArray(e)?e:[e],[e]),c=(0,Dm.jsxs)(cg,{value:a,settings:n,children:[(0,Dm.jsx)(Yl,{}),(0,Dm.jsx)(h_,{renderAppender:!1,layout:o})]});return{...t,ref:s,className:D(t.className,"block-editor-block-preview__live-content","components-disabled"),children:e?.length?c:null}}var ld=l(w(),1);function MBe({item:e}){let{name:t,title:o,icon:r,description:n,initialAttributes:i,example:s}=e,a=(0,Cg.isReusableBlock)(e),c=(0,$q.useMemo)(()=>s?(0,Cg.getBlockFromExample)(t,{attributes:{...s.attributes,...i},innerBlocks:s.innerBlocks}):(0,Cg.createBlock)(t,i),[t,s,i]),u=144,d=280,f=s?.viewportWidth??500,m=d/f,h=m!==0&&m<1&&u?u/m:u;return(0,ld.jsxs)("div",{className:"block-editor-inserter__preview-container",children:[(0,ld.jsx)("div",{className:"block-editor-inserter__preview",children:a||s?(0,ld.jsx)("div",{className:"block-editor-inserter__preview-content",children:(0,ld.jsx)(Tn,{blocks:c,viewportWidth:f,minHeight:u,additionalStyles:[{css:` |
| 77 |
body { |
| 78 |
padding: 24px; |
| 79 |
min-height:${Math.round(h)}px; |
| 80 |
display:flex; |
| 81 |
align-items:center; |
| 82 |
} |
| 83 |
.is-root-container { width: 100%; } |
| 84 |
`}]})}):(0,ld.jsx)("div",{className:"block-editor-inserter__preview-content-missing",children:(0,Kq.__)("No preview available.")})}),!a&&(0,ld.jsx)(Xy,{title:o,icon:r,description:n})]})}var Yq=MBe;var Og=l(N(),1),Xl=l(O(),1),v3=l(X(),1);var lZ=l(Y(),1),cZ=l(X(),1);var Rg=l(O(),1),cd=l(Y(),1),sZ=l(A(),1),g_=l(ot(),1);var oZ=l(A(),1),rZ=l(O(),1);var Bg=l(O(),1),qq=l(N(),1),Zq=l(ir(),1),Xq=l(w(),1);function DBe(e,t){let[o,r]=(0,Bg.useState)(!1);return(0,Bg.useEffect)(()=>{o&&(0,Zq.speak)((0,qq.__)("Use left and right arrow keys to move through blocks"))},[o]),(0,Xq.jsx)("div",{ref:t,role:"listbox","aria-orientation":"horizontal",onFocus:()=>{r(!0)},onBlur:n=>{!n.currentTarget.contains(n.relatedTarget)&&r(!1)},...e})}var f3=(0,Bg.forwardRef)(DBe);var Qq=l(O(),1),Jq=l(A(),1),eZ=l(w(),1);function VBe(e,t){return(0,eZ.jsx)(Jq.Composite.Group,{role:"presentation",ref:t,...e})}var m3=(0,Qq.forwardRef)(VBe);var eE=l(A(),1),tZ=l(O(),1),JB=l(w(),1);function FBe({isFirst:e,as:t,children:o,...r},n){return(0,JB.jsx)(eE.Composite.Item,{ref:n,role:"option",accessibleWhenDisabled:!0,...r,render:i=>{let s={...i,tabIndex:e?0:i.tabIndex};return t?(0,JB.jsx)(t,{...s,children:o}):typeof o=="function"?o(s):(0,JB.jsx)(eE.Button,{__next40pxDefaultSize:!0,...s,children:o})}})}var p3=(0,tZ.forwardRef)(FBe);var h3=l(w(),1);function zBe({key:e,children:t}){return(0,h3.jsx)(rZ.Fragment,{children:t},e)}function jBe({children:e}){return(0,h3.jsx)(oZ.Composite,{focusShift:!0,focusWrap:"horizontal",render:zBe,children:e})}var Eg=jBe;var nZ=l(A(),1),oE=l(Y(),1),rE=l(z(),1),iZ=l(O(),1);var Ig=l(N(),1),Tg=l(A(),1);var $s=l(w(),1);function tE({count:e,icon:t,isPattern:o,fadeWhenDisabled:r}){let n=o&&(0,Ig.__)("Pattern");return(0,$s.jsx)("div",{className:"block-editor-block-draggable-chip-wrapper",children:(0,$s.jsx)("div",{className:"block-editor-block-draggable-chip","data-testid":"block-draggable-chip",children:(0,$s.jsxs)(Tg.Flex,{justify:"center",className:"block-editor-block-draggable-chip__content",children:[(0,$s.jsx)(Tg.FlexItem,{children:t?(0,$s.jsx)(Ae,{icon:t}):n||(0,Ig.sprintf)((0,Ig._n)("%d block","%d blocks",e),e)}),(0,$s.jsx)(Tg.FlexItem,{children:(0,$s.jsx)(Ae,{icon:Ck})}),r&&(0,$s.jsx)(Tg.FlexItem,{className:"block-editor-block-draggable-chip__disabled",children:(0,$s.jsx)("span",{className:"block-editor-block-draggable-chip__disabled-icon"})})]})})})}var g3=l(w(),1),UBe=({isEnabled:e,blocks:t,icon:o,children:r,pattern:n})=>{let i=t.length===1?t[0].name:void 0,s=(0,rE.useSelect)(f=>i&&f(oE.store).getBlockType(i)?.icon,[i]),{startDragging:a,stopDragging:c}=M((0,rE.useDispatch)(x)),u=(0,iZ.useMemo)(()=>n?.type===jt.user&&n?.syncStatus!=="unsynced"?[(0,oE.createBlock)("core/block",{ref:n.id})]:void 0,[n?.type,n?.syncStatus,n?.id]);if(!e)return r({draggable:!1,onDragStart:void 0,onDragEnd:void 0});let d=u??t;return(0,g3.jsx)(nZ.Draggable,{__experimentalTransferDataType:"wp-blocks",transferData:{type:"inserter",blocks:d},onDragStart:f=>{a();let m=new Set;for(let h of d){let p=`wp-block:${h.name}`;m.has(p)||(f.dataTransfer.items.add("",p),m.add(p))}},onDragEnd:()=>{c()},__experimentalDragComponent:(0,g3.jsx)(tE,{count:t.length,icon:o||!n&&s,isPattern:!!n}),children:({onDraggableStart:f,onDraggableEnd:m})=>r({draggable:!0,onDragStart:f,onDragEnd:m})})},Pg=UBe;var ql=l(w(),1);function HBe({className:e,isFirst:t,item:o,onSelect:r,onHover:n,isDraggable:i,...s}){let a=(0,Rg.useRef)(!1),c=o.icon?{backgroundColor:o.icon.background,color:o.icon.foreground}:{},u=(0,Rg.useMemo)(()=>[(0,cd.createBlock)(o.name,o.initialAttributes,(0,cd.createBlocksFromInnerBlocksTemplate)(o.innerBlocks))],[o.name,o.initialAttributes,o.innerBlocks]),d=(0,cd.isReusableBlock)(o)&&o.syncStatus!=="unsynced"||(0,cd.isTemplatePart)(o);return(0,ql.jsx)(Pg,{isEnabled:i&&!o.isDisabled,blocks:u,icon:o.icon,children:({draggable:f,onDragStart:m,onDragEnd:h})=>(0,ql.jsx)("div",{className:D("block-editor-block-types-list__list-item",{"is-synced":d}),draggable:f,onDragStart:p=>{a.current=!0,m&&(n(null),m(p))},onDragEnd:p=>{a.current=!1,h&&h(p)},children:(0,ql.jsxs)(p3,{isFirst:t,className:D("block-editor-block-types-list__item",e),disabled:o.isDisabled,onClick:p=>{p.preventDefault(),r(o,(0,g_.isAppleOS)()?p.metaKey:p.ctrlKey),n(null)},onKeyDown:p=>{let{keyCode:g}=p;g===g_.ENTER&&(p.preventDefault(),r(o,(0,g_.isAppleOS)()?p.metaKey:p.ctrlKey),n(null))},onMouseEnter:()=>{a.current||n(o)},onMouseLeave:()=>n(null),...s,children:[(0,ql.jsx)("span",{className:"block-editor-block-types-list__item-icon",style:c,children:(0,ql.jsx)(Ae,{icon:o.icon,showColors:!0})}),(0,ql.jsx)("span",{className:"block-editor-block-types-list__item-title",children:(0,ql.jsx)(sZ.__experimentalTruncate,{numberOfLines:3,children:o.title})})]})})})}var aZ=(0,Rg.memo)(HBe);var b_=l(w(),1);function GBe(e,t){let o=[];for(let r=0,n=e.length;r<n;r+=t)o.push(e.slice(r,r+t));return o}function uZ({items:e=[],onSelect:t,onHover:o=()=>{},children:r,label:n,isDraggable:i=!0}){let s="block-editor-block-types-list",a=(0,cZ.useInstanceId)(uZ,s);return(0,b_.jsxs)(f3,{className:s,"aria-label":n,children:[GBe(e,3).map((c,u)=>(0,b_.jsx)(m3,{children:c.map((d,f)=>(0,b_.jsx)(aZ,{item:d,className:(0,lZ.getBlockMenuDefaultClassName)(d.id),onSelect:t,onHover:o,isDraggable:i&&!d.isDisabled,isFirst:u===0&&f===0,rowId:`${a}-${u}`},d.id))},u)),r]})}var Vm=uZ;var dZ=l(A(),1),Zl=l(w(),1);function WBe({title:e,icon:t,children:o}){return(0,Zl.jsxs)(Zl.Fragment,{children:[(0,Zl.jsxs)("div",{className:"block-editor-inserter__panel-header",children:[(0,Zl.jsx)("h2",{className:"block-editor-inserter__panel-title",children:e}),(0,Zl.jsx)(dZ.Icon,{icon:t})]}),(0,Zl.jsx)("div",{className:"block-editor-inserter__panel-content",children:o})]})}var ud=WBe;var fZ=l(N(),1),b3=l(w(),1);function $Be(){return(0,b3.jsx)("div",{className:"block-editor-inserter__no-results",children:(0,b3.jsx)("p",{children:(0,fZ.__)("No results found.")})})}var Ks=$Be;var Ko=l(w(),1),KBe=e=>e.name.split("/")[0],YBe=6,qBe=[];function mZ({items:e,collections:t,categories:o,onSelectItem:r,onHover:n,showMostUsedBlocks:i,className:s}){let a=(0,Xl.useMemo)(()=>Ba(e,"frecency","desc").slice(0,YBe),[e]),c=(0,Xl.useMemo)(()=>e.filter(p=>!p.category),[e]),u=(0,Xl.useMemo)(()=>{let p={...t};return Object.keys(t).forEach(g=>{p[g]=e.filter(b=>KBe(b)===g),p[g].length===0&&delete p[g]}),p},[e,t]);(0,Xl.useEffect)(()=>()=>n(null),[]);let d=(0,v3.useAsyncList)(o),f=o.length===d.length,m=(0,Xl.useMemo)(()=>Object.entries(t),[t]),h=(0,v3.useAsyncList)(f?m:qBe);return(0,Ko.jsxs)("div",{className:s,children:[i&&e.length>3&&!!a.length&&(0,Ko.jsx)(ud,{title:(0,Og._x)("Most used","blocks"),children:(0,Ko.jsx)(Vm,{items:a,onSelect:r,onHover:n,label:(0,Og._x)("Most used","blocks")})}),d.map(p=>{let g=e.filter(b=>b.category===p.slug);return!g||!g.length?null:(0,Ko.jsx)(ud,{title:p.title,icon:p.icon,children:(0,Ko.jsx)(Vm,{items:g,onSelect:r,onHover:n,label:p.title})},p.slug)}),f&&c.length>0&&(0,Ko.jsx)(ud,{className:"block-editor-inserter__uncategorized-blocks-panel",title:(0,Og.__)("Uncategorized"),children:(0,Ko.jsx)(Vm,{items:c,onSelect:r,onHover:n,label:(0,Og.__)("Uncategorized")})}),h.map(([p,g])=>{let b=u[p];return!b||!b.length?null:(0,Ko.jsx)(ud,{title:g.title,icon:g.icon,children:(0,Ko.jsx)(Vm,{items:b,onSelect:r,onHover:n,label:g.title})},p)})]})}function ZBe({rootClientId:e,onInsert:t,onHover:o,showMostUsedBlocks:r},n){let[i,s,a,c]=Lu(e,t);if(!i.length)return(0,Ko.jsx)(Ks,{});let u=[],d=[];for(let f of i)f.category!=="reusable"&&(f.isSearchOnly||(f.isAllowedInCurrentRoot?u.push(f):d.push(f)));return(0,Ko.jsx)(Eg,{children:(0,Ko.jsxs)("div",{ref:n,children:[!!u.length&&(0,Ko.jsx)(Ko.Fragment,{children:(0,Ko.jsx)(mZ,{items:u,categories:s,collections:a,onSelectItem:c,onHover:o,showMostUsedBlocks:r,className:"block-editor-inserter__insertable-blocks-at-selection"})}),(0,Ko.jsx)(mZ,{items:d,categories:s,collections:a,onSelectItem:c,onHover:o,showMostUsedBlocks:r,className:"block-editor-inserter__all-blocks"})]})})}var pZ=(0,Xl.forwardRef)(ZBe);var NZ=l(O(),1),MZ=l(X(),1),DZ=l(A(),1),VZ=l(N(),1);var IZ=l(A(),1),w3=l(O(),1),PZ=l(N(),1);var nE=l(A(),1),k3=l(N(),1),Ql=l(w(),1);function XBe({selectedCategory:e,patternCategories:t,onClickCategory:o}){let r="block-editor-block-patterns-explorer__sidebar";return(0,Ql.jsx)("div",{className:`${r}__categories-list`,children:t.map(({name:n,label:i})=>(0,Ql.jsx)(nE.Button,{__next40pxDefaultSize:!0,label:i,className:`${r}__categories-list__item`,isPressed:e===n,onClick:()=>{o(n)},children:i},n))})}function QBe({searchValue:e,setSearchValue:t}){return(0,Ql.jsx)("div",{className:"block-editor-block-patterns-explorer__search",children:(0,Ql.jsx)(nE.SearchControl,{onChange:t,value:e,label:(0,k3.__)("Search"),placeholder:(0,k3.__)("Search")})})}function JBe({selectedCategory:e,patternCategories:t,onClickCategory:o,searchValue:r,setSearchValue:n}){return(0,Ql.jsxs)("div",{className:"block-editor-block-patterns-explorer__sidebar",children:[(0,Ql.jsx)(QBe,{searchValue:r,setSearchValue:n}),!r&&(0,Ql.jsx)(XBe,{selectedCategory:e,patternCategories:t,onClickCategory:o})]})}var hZ=JBe;var Jl=l(O(),1),Mg=l(N(),1),wZ=l(X(),1),CZ=l(A(),1),BZ=l(ir(),1);var gZ=l(Y(),1),Fa=l(O(),1),Fm=l(A(),1);var bZ=l(X(),1),vZ=l(N(),1);var In=l(A(),1),qi=l(N(),1),Nr=l(w(),1);function iE({currentPage:e,numPages:t,changePage:o,totalItems:r}){return(0,Nr.jsxs)(In.__experimentalVStack,{className:"block-editor-patterns__grid-pagination-wrapper",children:[(0,Nr.jsx)(In.__experimentalText,{variant:"muted",children:(0,qi.sprintf)((0,qi._n)("%s item","%s items",r),r)}),t>1&&(0,Nr.jsxs)(In.__experimentalHStack,{expanded:!1,spacing:3,justify:"flex-start",className:"block-editor-patterns__grid-pagination",children:[(0,Nr.jsxs)(In.__experimentalHStack,{expanded:!1,spacing:1,className:"block-editor-patterns__grid-pagination-previous",children:[(0,Nr.jsx)(In.Button,{variant:"tertiary",onClick:()=>o(1),disabled:e===1,"aria-label":(0,qi.__)("First page"),size:"compact",accessibleWhenDisabled:!0,className:"block-editor-patterns__grid-pagination-button",children:(0,Nr.jsx)("span",{children:"\xAB"})}),(0,Nr.jsx)(In.Button,{variant:"tertiary",onClick:()=>o(e-1),disabled:e===1,"aria-label":(0,qi.__)("Previous page"),size:"compact",accessibleWhenDisabled:!0,className:"block-editor-patterns__grid-pagination-button",children:(0,Nr.jsx)("span",{children:"\u2039"})})]}),(0,Nr.jsx)(In.__experimentalText,{variant:"muted",children:(0,qi.sprintf)((0,qi._x)("%1$s of %2$s","paging"),e,t)}),(0,Nr.jsxs)(In.__experimentalHStack,{expanded:!1,spacing:1,className:"block-editor-patterns__grid-pagination-next",children:[(0,Nr.jsx)(In.Button,{variant:"tertiary",onClick:()=>o(e+1),disabled:e===t,"aria-label":(0,qi.__)("Next page"),size:"compact",accessibleWhenDisabled:!0,className:"block-editor-patterns__grid-pagination-button",children:(0,Nr.jsx)("span",{children:"\u203A"})}),(0,Nr.jsx)(In.Button,{variant:"tertiary",onClick:()=>o(t),disabled:e===t,"aria-label":(0,qi.__)("Last page"),size:"compact",accessibleWhenDisabled:!0,className:"block-editor-patterns__grid-pagination-button",children:(0,Nr.jsx)("span",{children:"\xBB"})})]})]})]})}var Jt=l(w(),1),eEe=({showTooltip:e,title:t,children:o})=>e?(0,Jt.jsx)(Fm.Tooltip,{text:t,children:o}):(0,Jt.jsx)(Jt.Fragment,{children:o});function kZ({id:e,isDraggable:t,pattern:o,onClick:r,onHover:n,showTitlesAsTooltip:i,category:s,isSelected:a}){let[c,u]=(0,Fa.useState)(!1),{blocks:d,viewportWidth:f}=o,h=`block-editor-block-patterns-list__item-description-${(0,bZ.useInstanceId)(kZ)}`,p=o.type===jt.user,g=(0,Fa.useMemo)(()=>!s||!t?d:(d??[]).map(b=>{let k=(0,gZ.cloneBlock)(b);return k.attributes.metadata?.categories?.includes(s)&&(k.attributes.metadata.categories=[s]),k}),[d,t,s]);return(0,Jt.jsx)(Pg,{isEnabled:t,blocks:g,pattern:o,children:({draggable:b,onDragStart:k,onDragEnd:v})=>(0,Jt.jsx)("div",{className:"block-editor-block-patterns-list__list-item",draggable:b,onDragStart:y=>{u(!0),k&&(n?.(null),k(y))},onDragEnd:y=>{u(!1),v&&v(y)},children:(0,Jt.jsx)(eEe,{showTooltip:i&&!p,title:o.title,children:(0,Jt.jsxs)(Fm.Composite.Item,{render:(0,Jt.jsx)("div",{role:"option","aria-label":o.title,"aria-describedby":o.description?h:void 0,className:D("block-editor-block-patterns-list__item",{"block-editor-block-patterns-list__list-item-synced":o.type===jt.user&&!o.syncStatus,"is-selected":a})}),id:e,onClick:()=>{r(o,d),n?.(null)},onMouseEnter:()=>{c||n?.(o)},onMouseLeave:()=>n?.(null),children:[(0,Jt.jsx)(Tn.Async,{placeholder:(0,Jt.jsx)(tEe,{}),children:(0,Jt.jsx)(Tn,{blocks:d,viewportWidth:f})}),(!i||p)&&(0,Jt.jsxs)(Fm.__experimentalHStack,{className:"block-editor-patterns__pattern-details",spacing:2,children:[p&&!o.syncStatus&&(0,Jt.jsx)("div",{className:"block-editor-patterns__pattern-icon-wrapper",children:(0,Jt.jsx)(Ee,{className:"block-editor-patterns__pattern-icon",icon:Ni})}),(0,Jt.jsx)("div",{className:"block-editor-block-patterns-list__item-title",children:o.title})]}),!!o.description&&(0,Jt.jsx)(Ge,{id:h,children:o.description})]})})})})}function tEe(){return(0,Jt.jsx)("div",{className:"block-editor-block-patterns-list__item is-placeholder"})}function oEe({isDraggable:e,blockPatterns:t,onHover:o,onClickPattern:r,orientation:n,label:i=(0,vZ.__)("Block patterns"),category:s,showTitlesAsTooltip:a,pagingProps:c},u){let[d,f]=(0,Fa.useState)(void 0),[m,h]=(0,Fa.useState)(null);(0,Fa.useEffect)(()=>{let g=t[0]?.name;f(g)},[t]);let p=(g,b)=>{h(g.name),r(g,b)};return(0,Jt.jsxs)(Fm.Composite,{orientation:n,activeId:d,setActiveId:f,role:"listbox",className:"block-editor-block-patterns-list","aria-label":i,ref:u,children:[t.map(g=>(0,Jt.jsx)(kZ,{id:g.name,pattern:g,onClick:p,onHover:o,isDraggable:e,showTitlesAsTooltip:a,category:s,isSelected:!!m&&m===g.name},g.name)),c&&(0,Jt.jsx)(iE,{...c})]})}var za=(0,Fa.forwardRef)(oEe);var zm=l(z(),1),_Z=l(Y(),1),sE=l(N(),1),SZ=l(ir(),1),y3=l(O(),1);function yZ({destinationRootClientId:e,destinationIndex:t,rootClientId:o,registry:r}){if(o===e)return t;let n=["",...r.select(x).getBlockParents(e),e],i=n.indexOf(o);return i!==-1?r.select(x).getBlockIndex(n[i+1])+1:r.select(x).getBlockOrder(o).length}function rEe({rootClientId:e="",insertionIndex:t,clientId:o,isAppender:r,onSelect:n,shouldFocusBlock:i=!0,selectBlockOnInsert:s=!0}){let a=(0,zm.useRegistry)(),{getSelectedBlock:c,getClosestAllowedInsertionPoint:u,isBlockInsertionPointVisible:d}=M((0,zm.useSelect)(x)),{destinationRootClientId:f,destinationIndex:m}=(0,zm.useSelect)(_=>{let{getSelectedBlockClientId:S,getBlockRootClientId:C,getBlockIndex:B,getBlockOrder:P,getInsertionPoint:T}=M(_(x)),E=S(),L=e,I,R=T();return t!==void 0?I=t:R&&R.hasOwnProperty("index")?(L=R?.rootClientId?R.rootClientId:e,I=R.index):o?I=B(o):!r&&E?(L=C(E),I=B(E)+1):I=P(L).length,{destinationRootClientId:L,destinationIndex:I}},[e,t,o,r]),{replaceBlocks:h,insertBlocks:p,showInsertionPoint:g,hideInsertionPoint:b,setLastFocus:k}=M((0,zm.useDispatch)(x)),v=(0,y3.useCallback)((_,S,C=!1,B)=>{(C||i||s)&&k(null);let P=c();!r&&P&&(0,_Z.isUnmodifiedDefaultBlock)(P,"content")?h(P.clientId,_,null,i||C?0:null,S):p(_,r||B===void 0?m:yZ({destinationRootClientId:f,destinationIndex:m,rootClientId:B,registry:a}),r||B===void 0?f:B,s,i||C?0:null,S);let T=Array.isArray(_)?_.length:1,E=(0,sE.sprintf)((0,sE._n)("%d block added.","%d blocks added.",T),T);(0,SZ.speak)(E),n&&n(_)},[r,c,h,p,f,m,n,i,s,k,a]),y=(0,y3.useCallback)(_=>{if(_&&!d()){let S=u(_.name,f);S!==null&&g(S,yZ({destinationRootClientId:f,destinationIndex:m,rootClientId:S,registry:a}))}else b()},[u,d,g,b,f,m,a]);return[f,v,y]}var dd=rEe;var Ag=l(O(),1),aE=l(Y(),1),Lg=l(z(),1),lE=l(N(),1),xZ=l(Xn(),1);var nEe=(e,t,o,r)=>{let n=(0,Ag.useMemo)(()=>({[Eu]:!!r}),[r]),i=(0,Lg.useSelect)(p=>{let{getSettings:g}=M(p(x));return g()[ix]??!1},[]),{patternCategories:s,patterns:a,userPatternCategories:c}=(0,Lg.useSelect)(p=>{let{getSettings:g,__experimentalGetAllowedPatterns:b}=M(p(x)),{__experimentalUserPatternCategories:k,__experimentalBlockPatternCategories:v}=g();return{patterns:b(t,n),userPatternCategories:k,patternCategories:v}},[t,n]),u=(0,Ag.useMemo)(()=>a.filter(p=>!(p.categories?.includes("navigation")&&!i)),[a,i]),{getClosestAllowedInsertionPointForPattern:d}=M((0,Lg.useSelect)(x)),f=(0,Ag.useMemo)(()=>{let p=[...s];return c?.forEach(g=>{p.find(b=>b.name===g.name)||p.push(g)}),p},[s,c]),{createSuccessNotice:m}=(0,Lg.useDispatch)(xZ.store),h=(0,Ag.useCallback)((p,g)=>{let b=r?t:d(p,t);if(b===null)return;let k=p.type===jt.user&&p.syncStatus!=="unsynced"?[(0,aE.createBlock)("core/block",{ref:p.id})]:g;e((k??[]).map(v=>{let y=(0,aE.cloneBlock)(v);return y.attributes.metadata?.categories?.includes(o)&&(y.attributes.metadata.categories=[o]),y}),p.name,!1,b),m((0,lE.sprintf)((0,lE.__)('Block pattern "%s" inserted.'),p.title),{type:"snackbar",id:"inserter-notice"})},[m,e,o,t,d,r]);return[u,f,h]},fd=nEe;var Ng=l(O(),1),_3=l(X(),1),S3=l(Ve(),1),cE=20;function uE(e,t,o,r=""){let[n,i]=(0,Ng.useState)(1),s=(0,_3.usePrevious)(t),a=(0,_3.usePrevious)(r);(s!==t||a!==r)&&n!==1&&i(1);let c=e.length,u=n-1,d=(0,Ng.useMemo)(()=>e.slice(u*cE,u*cE+cE),[u,e]),f=Math.ceil(e.length/cE),m=h=>{(0,S3.getScrollContainer)(o?.current)?.scrollTo(0,0),i(h)};return(0,Ng.useEffect)(function(){(0,S3.getScrollContainer)(o?.current)?.scrollTo(0,0)},[t,o]),{totalItems:c,categoryPatterns:d,numPages:f,changePage:m,currentPage:n}}var Ys=l(w(),1);function iEe({filterValue:e,filteredBlockPatternsLength:t}){return e?(0,Ys.jsx)(CZ.__experimentalHeading,{level:2,lineHeight:"48px",className:"block-editor-block-patterns-explorer__search-results-count",children:(0,Mg.sprintf)((0,Mg._n)("%d pattern found","%d patterns found",t),t)}):null}function sEe({searchValue:e,selectedCategory:t,patternCategories:o,rootClientId:r,onModalClose:n}){let i=(0,Jl.useRef)(),s=(0,wZ.useDebounce)(BZ.speak,500),[a,c]=dd({rootClientId:r,shouldFocusBlock:!0}),[u,,d]=fd(c,a,t),f=(0,Jl.useMemo)(()=>o.map(k=>k.name),[o]),m=(0,Jl.useMemo)(()=>{let k=u.filter(v=>{if(t===um.name||t===Rl.name&&v.type===jt.user||t===_h.name&&v.blockTypes?.includes("core/post-content"))return!0;if(t==="uncategorized"){let y=v.categories?.some(_=>f.includes(_))??!1;return!v.categories?.length||!y}return v.categories?.includes(t)});return e?uy(k,e):k},[e,u,t,f]);(0,Jl.useEffect)(()=>{if(!e)return;let k=m.length,v=(0,Mg.sprintf)((0,Mg._n)("%d result found.","%d results found.",k),k);s(v)},[e,s,m.length]);let h=uE(m,t,i),[p,g]=(0,Jl.useState)(e);e!==p&&(g(e),h.changePage(1));let b=!!m?.length;return(0,Ys.jsxs)("div",{className:"block-editor-block-patterns-explorer__list",ref:i,children:[(0,Ys.jsx)(iEe,{filterValue:e,filteredBlockPatternsLength:m.length}),(0,Ys.jsx)(Eg,{children:b&&(0,Ys.jsxs)(Ys.Fragment,{children:[(0,Ys.jsx)(za,{blockPatterns:h.categoryPatterns,onClickPattern:(k,v)=>{d(k,v),n()},isDraggable:!1}),(0,Ys.jsx)(iE,{...h})]})})]})}var EZ=sEe;var x3=l(O(),1),Dg=l(N(),1),TZ=l(ir(),1);function aEe(e,t){return!e.categories||!e.categories.length?!1:e.categories.some(o=>t.some(r=>r.name===o))}function Vg(e,t="all"){let[o,r]=fd(void 0,e),n=(0,x3.useMemo)(()=>t==="all"?o:o.filter(s=>!lC(s,t)),[t,o]);return(0,x3.useMemo)(()=>{let s=r.filter(a=>n.some(c=>c.categories?.includes(a.name))).sort((a,c)=>a.label.localeCompare(c.label));return n.some(a=>!aEe(a,r))&&!s.find(a=>a.name==="uncategorized")&&s.push({name:"uncategorized",label:(0,Dg._x)("Uncategorized")}),n.some(a=>a.blockTypes?.includes("core/post-content"))&&s.unshift(_h),n.some(a=>a.type===jt.user)&&s.unshift(Rl),n.length>0&&s.unshift({name:um.name,label:um.label}),(0,TZ.speak)((0,Dg.sprintf)((0,Dg._n)("%d category button displayed.","%d category buttons displayed.",s.length),s.length)),s},[r,n])}var jm=l(w(),1);function lEe({initialCategory:e,rootClientId:t,onModalClose:o}){let[r,n]=(0,w3.useState)(""),[i,s]=(0,w3.useState)(e?.name),a=Vg(t);return(0,jm.jsxs)("div",{className:"block-editor-block-patterns-explorer",children:[(0,jm.jsx)(hZ,{selectedCategory:i,patternCategories:a,onClickCategory:s,searchValue:r,setSearchValue:n}),(0,jm.jsx)(EZ,{searchValue:r,selectedCategory:i,patternCategories:a,rootClientId:t,onModalClose:o})]})}function cEe({onModalClose:e,...t}){return(0,jm.jsx)(IZ.Modal,{title:(0,PZ.__)("Patterns"),onRequestClose:e,isFullScreen:!0,children:(0,jm.jsx)(lEe,{onModalClose:e,...t})})}var RZ=cEe;var Fg=l(N(),1),Ht=l(A(),1);var ar=l(w(),1);function uEe({title:e}){return(0,ar.jsx)(Ht.__experimentalVStack,{spacing:0,children:(0,ar.jsx)(Ht.__experimentalView,{children:(0,ar.jsx)(Ht.__experimentalSpacer,{marginBottom:0,paddingX:4,paddingY:3,children:(0,ar.jsxs)(Ht.__experimentalHStack,{spacing:2,children:[(0,ar.jsx)(Ht.Navigator.BackButton,{style:{minWidth:24,padding:0},icon:(0,Fg.isRTL)()?Go:Kr,size:"small",label:(0,Fg.__)("Back")}),(0,ar.jsx)(Ht.__experimentalSpacer,{children:(0,ar.jsx)(Ht.__experimentalHeading,{level:5,children:e})})]})})})})}function dE({categories:e,children:t}){return(0,ar.jsxs)(Ht.Navigator,{initialPath:"/",className:"block-editor-inserter__mobile-tab-navigation",children:[(0,ar.jsx)(Ht.Navigator.Screen,{path:"/",children:(0,ar.jsx)(Ht.__experimentalItemGroup,{children:e.map(o=>(0,ar.jsx)(Ht.Navigator.Button,{path:`/category/${o.name}`,as:Ht.__experimentalItem,isAction:!0,children:(0,ar.jsxs)(Ht.__experimentalHStack,{children:[(0,ar.jsx)(Ht.FlexBlock,{children:o.label}),(0,ar.jsx)(Ee,{icon:(0,Fg.isRTL)()?Kr:Go})]})},o.name))})}),e.map(o=>(0,ar.jsxs)(Ht.Navigator.Screen,{path:`/category/${o.name}`,children:[(0,ar.jsx)(uEe,{title:(0,Fg.__)("Back")}),t(o)]},o.name))]})}var Zi=l(O(),1),C3=l(N(),1),qs=l(A(),1);var Rn=l(A(),1),Pn=l(N(),1);var fE=l(O(),1);var Cr=l(w(),1),OZ=e=>e!=="all"&&e!=="user",dEe=e=>e.name===Rl.name,fEe=[{value:"all",label:(0,Pn._x)("All","patterns")},{value:jt.directory,label:(0,Pn.__)("Pattern Directory")},{value:jt.theme,label:(0,Pn.__)("Theme & Plugins")},{value:jt.user,label:(0,Pn.__)("User")}];function AZ({setPatternSyncFilter:e,setPatternSourceFilter:t,patternSyncFilter:o,patternSourceFilter:r,scrollContainerRef:n,category:i}){let s=i.name===Rl.name?jt.user:r,a=OZ(s),c=dEe(i),u=(0,fE.useMemo)(()=>[{value:"all",label:(0,Pn._x)("All","patterns")},{value:Qk.full,label:(0,Pn._x)("Synced","patterns"),disabled:a},{value:Qk.unsynced,label:(0,Pn._x)("Not synced","patterns"),disabled:a}],[a]);function d(f){t(f),OZ(f)&&e("all")}return(0,Cr.jsx)(Cr.Fragment,{children:(0,Cr.jsx)(Rn.DropdownMenu,{popoverProps:{placement:"right-end"},label:(0,Pn.__)("Filter patterns"),toggleProps:{size:"compact"},icon:(0,Cr.jsx)(Ee,{icon:(0,Cr.jsx)(Rn.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,Cr.jsx)(Rn.Path,{d:"M10 17.5H14V16H10V17.5ZM6 6V7.5H18V6H6ZM8 12.5H16V11H8V12.5Z",fill:"currentColor"})})}),children:()=>(0,Cr.jsxs)(Cr.Fragment,{children:[!c&&(0,Cr.jsx)(Rn.MenuGroup,{label:(0,Pn.__)("Source"),children:(0,Cr.jsx)(Rn.MenuItemsChoice,{choices:fEe,onSelect:f=>{d(f),n.current?.scrollTo(0,0)},value:s})}),(0,Cr.jsx)(Rn.MenuGroup,{label:(0,Pn.__)("Type"),children:(0,Cr.jsx)(Rn.MenuItemsChoice,{choices:u,onSelect:f=>{e(f),n.current?.scrollTo(0,0)},value:o})}),(0,Cr.jsx)("div",{className:"block-editor-inserter__patterns-filter-help",children:(0,fE.createInterpolateElement)((0,Pn.__)("Patterns are available from the <Link>WordPress.org Pattern Directory</Link>, bundled in the active theme, or created by users on this site. Only patterns created on this site can be synced."),{Link:(0,Cr.jsx)(Rn.ExternalLink,{href:(0,Pn.__)("https://wordpress.org/patterns/")})})})]})})})}var tn=l(w(),1),mEe=()=>{};function mE({rootClientId:e,onInsert:t,onHover:o=mEe,category:r,showTitlesAsTooltip:n}){let[i,,s]=fd(t,e,r?.name),[a,c]=(0,Zi.useState)("all"),[u,d]=(0,Zi.useState)("all"),f=Vg(e,u),m=(0,Zi.useRef)(),h=(0,Zi.useMemo)(()=>i.filter(v=>lC(v,u,a)?!1:r.name===um.name||r.name===Rl.name&&v.type===jt.user||r.name===_h.name&&v.blockTypes?.includes("core/post-content")?!0:r.name==="uncategorized"?v.categories?!v.categories.some(y=>f.some(_=>_.name===y)):!0:v.categories?.includes(r.name)),[i,f,r.name,u,a]),p=uE(h,r,m),{changePage:g}=p;(0,Zi.useEffect)(()=>()=>o(null),[]);let b=(0,Zi.useCallback)(v=>{c(v),g(1)},[c,g]),k=(0,Zi.useCallback)(v=>{d(v),g(1)},[d,g]);return(0,tn.jsxs)(tn.Fragment,{children:[(0,tn.jsxs)(qs.__experimentalVStack,{spacing:2,className:"block-editor-inserter__patterns-category-panel-header",children:[(0,tn.jsxs)(qs.__experimentalHStack,{children:[(0,tn.jsx)(qs.FlexBlock,{children:(0,tn.jsx)(qs.__experimentalHeading,{className:"block-editor-inserter__patterns-category-panel-title",size:13,level:4,as:"div",children:r.label})}),(0,tn.jsx)(AZ,{patternSyncFilter:a,patternSourceFilter:u,setPatternSyncFilter:b,setPatternSourceFilter:k,scrollContainerRef:m,category:r})]}),!h.length&&(0,tn.jsx)(qs.__experimentalText,{variant:"muted",className:"block-editor-inserter__patterns-category-no-results",children:(0,C3.__)("No results found")})]}),h.length>0&&(0,tn.jsxs)(tn.Fragment,{children:[(0,tn.jsx)(qs.__experimentalText,{size:"12",as:"p",className:"block-editor-inserter__help-text",children:(0,C3.__)("Drag and drop patterns into the canvas.")}),(0,tn.jsx)(za,{ref:m,blockPatterns:p.categoryPatterns,onClickPattern:s,onHover:o,label:r.label,orientation:"vertical",category:r.name,isDraggable:!0,showTitlesAsTooltip:n,patternFilter:u,pagingProps:p})]})]})}var hE=l(X(),1),gE=l(A(),1),LZ=l(O(),1);var Um=l(w(),1),{Tabs:pE}=M(gE.privateApis);function pEe({categories:e,selectedCategory:t,onSelectCategory:o,children:r}){let s={type:"tween",duration:(0,hE.useReducedMotion)()?0:.25,ease:[.6,0,.4,1]},a=(0,hE.usePrevious)(t),c=t?t.name:null,[u,d]=(0,LZ.useState)(),f=e?.[0]?.name;return c===null&&!u&&f&&d(f),(0,Um.jsxs)(pE,{selectOnMove:!1,selectedTabId:c,orientation:"vertical",onSelect:m=>{o(e.find(h=>h.name===m))},activeTabId:u,onActiveTabIdChange:d,children:[(0,Um.jsx)(pE.TabList,{className:"block-editor-inserter__category-tablist",children:e.map(m=>(0,Um.jsx)(pE.Tab,{tabId:m.name,"aria-current":m===t?"true":void 0,children:m.label},m.name))}),e.map(m=>(0,Um.jsx)(pE.TabPanel,{tabId:m.name,focusable:!1,children:(0,Um.jsx)(gE.__unstableMotion.div,{className:"block-editor-inserter__category-panel",initial:a?"open":"closed",animate:"open",variants:{open:{transform:"translateX( 0 )",transitionEnd:{zIndex:"1"}},closed:{transform:"translateX( -100% )",zIndex:"-1"}},transition:s,children:r})},m.name))]})}var bE=pEe;var ri=l(w(),1);function hEe({onSelectCategory:e,selectedCategory:t,onInsert:o,rootClientId:r,children:n}){let[i,s]=(0,NZ.useState)(!1),a=Vg(r),c=(0,MZ.useViewportMatch)("medium","<");return a.length?(0,ri.jsxs)(ri.Fragment,{children:[!c&&(0,ri.jsxs)("div",{className:"block-editor-inserter__block-patterns-tabs-container",children:[(0,ri.jsx)(bE,{categories:a,selectedCategory:t,onSelectCategory:e,children:n}),(0,ri.jsx)(DZ.Button,{__next40pxDefaultSize:!0,className:"block-editor-inserter__patterns-explore-button",onClick:()=>s(!0),variant:"secondary",children:(0,VZ.__)("Explore all patterns")})]}),c&&(0,ri.jsx)(dE,{categories:a,children:u=>(0,ri.jsx)("div",{className:"block-editor-inserter__category-panel",children:(0,ri.jsx)(mE,{onInsert:o,rootClientId:r,category:u},u.name)})}),i&&(0,ri.jsx)(RZ,{initialCategory:t||a[0],patternCategories:a,onModalClose:()=>s(!1),rootClientId:r})]}):(0,ri.jsx)(Ks,{})}var FZ=hEe;var oX=l(N(),1),rX=l(X(),1),nX=l(A(),1),yE=l(O(),1);var kE=l(A(),1),QZ=l(N(),1),JZ=l(X(),1);var KZ=l(A(),1),YZ=l(N(),1);var Gt=l(A(),1),ni=l(N(),1),ja=l(O(),1),E3=l(Y(),1);var v_=l(z(),1),HZ=l(Xn(),1),GZ=l(B3(),1),WZ=l(qn(),1);var jZ=l(Y(),1),UZ=l(w(),1),gEe={image:"img",video:"video",audio:"audio"};function vE(e,t){let o={id:e.id||void 0,caption:e.caption||void 0},r=e.url,n=e.alt||void 0;t==="image"?(o.url=r,o.alt=n):["video","audio"].includes(t)&&(o.src=r);let i=gEe[t],s=(0,UZ.jsx)(i,{src:e.previewUrl||r,alt:n,controls:t==="audio"?!0:void 0,inert:"true",onError:({currentTarget:a})=>{a.src===e.previewUrl&&(a.src=r)}});return[(0,jZ.createBlock)(`core/${t}`,o),s]}var ut=l(w(),1),bEe=["image"],vEe={placement:"bottom-end",className:"block-editor-inserter__media-list__item-preview-options__popover"};function kEe({category:e,media:t}){if(!e.getReportUrl)return null;let o=e.getReportUrl(t);return(0,ut.jsx)(Gt.DropdownMenu,{className:"block-editor-inserter__media-list__item-preview-options",label:(0,ni.__)("Options"),popoverProps:vEe,icon:Is,children:()=>(0,ut.jsx)(Gt.MenuGroup,{children:(0,ut.jsx)(Gt.MenuItem,{onClick:()=>window.open(o,"_blank").focus(),icon:_L,children:(0,ni.sprintf)((0,ni.__)("Report %s"),e.mediaType)})})})}function yEe({onClose:e,onSubmit:t}){return(0,ut.jsxs)(Gt.Modal,{title:(0,ni.__)("Insert external image"),onRequestClose:e,className:"block-editor-inserter-media-tab-media-preview-inserter-external-image-modal",children:[(0,ut.jsxs)(Gt.__experimentalVStack,{spacing:3,children:[(0,ut.jsx)("p",{children:(0,ni.__)("This image cannot be uploaded to your Media Library, but it can still be inserted as an external image.")}),(0,ut.jsx)("p",{children:(0,ni.__)("External images can be removed by the external provider without warning and could even have legal compliance issues related to privacy legislation.")})]}),(0,ut.jsxs)(Gt.Flex,{className:"block-editor-block-lock-modal__actions",justify:"flex-end",expanded:!1,children:[(0,ut.jsx)(Gt.FlexItem,{children:(0,ut.jsx)(Gt.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:e,children:(0,ni.__)("Cancel")})}),(0,ut.jsx)(Gt.FlexItem,{children:(0,ut.jsx)(Gt.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:t,children:(0,ni.__)("Insert")})})]})]})}function $Z({media:e,onClick:t,category:o}){let[r,n]=(0,ja.useState)(!1),[i,s]=(0,ja.useState)(!1),[a,c]=(0,ja.useState)(!1),[u,d]=(0,ja.useMemo)(()=>vE(e,o.mediaType),[e,o.mediaType]),{createErrorNotice:f,createSuccessNotice:m}=(0,v_.useDispatch)(HZ.store),{getSettings:h,getBlock:p}=(0,v_.useSelect)(x),{updateBlockAttributes:g}=(0,v_.useDispatch)(x),b=(0,ja.useCallback)(_=>{if(a)return;let S=h(),C=(0,E3.cloneBlock)(_),{id:B,url:P,caption:T}=C.attributes;if(!B&&!S.mediaUpload){n(!0);return}if(B){t(C);return}c(!0),window.fetch(P).then(E=>E.blob()).then(E=>{let L=(0,WZ.getFilename)(P)||"image.jpg",I=new File([E],L,{type:E.type});S.mediaUpload({filesList:[I],additionalData:{caption:T},onFileChange([R]){(0,GZ.isBlobURL)(R.url)||(p(C.clientId)?g(C.clientId,{...C.attributes,id:R.id,url:R.url}):(t({...C,attributes:{...C.attributes,id:R.id,url:R.url}}),m((0,ni.__)("Image uploaded and inserted."),{type:"snackbar",id:"inserter-notice"})),c(!1))},allowedTypes:bEe,onError(R){f(R,{type:"snackbar",id:"inserter-notice"}),c(!1)}})}).catch(()=>{n(!0),c(!1)})},[a,h,t,m,g,f,p]),k=typeof e.title=="string"?e.title:e.title?.rendered||(0,ni.__)("no title"),v=(0,ja.useCallback)(()=>s(!0),[]),y=(0,ja.useCallback)(()=>s(!1),[]);return(0,ut.jsxs)(ut.Fragment,{children:[(0,ut.jsx)(Pg,{isEnabled:!0,blocks:[u],children:({draggable:_,onDragStart:S,onDragEnd:C})=>(0,ut.jsx)("div",{className:D("block-editor-inserter__media-list__list-item",{"is-hovered":i}),draggable:_,onDragStart:S,onDragEnd:C,children:(0,ut.jsxs)("div",{onMouseEnter:v,onMouseLeave:y,children:[(0,ut.jsx)(Gt.Tooltip,{text:k,children:(0,ut.jsx)(Gt.Composite.Item,{render:(0,ut.jsx)("div",{"aria-label":k,role:"option",className:"block-editor-inserter__media-list__item"}),onClick:()=>b(u),children:(0,ut.jsxs)("div",{className:"block-editor-inserter__media-list__item-preview",children:[d,a&&(0,ut.jsx)("div",{className:"block-editor-inserter__media-list__item-preview-spinner",children:(0,ut.jsx)(Gt.Spinner,{})})]})})}),!a&&(0,ut.jsx)(kEe,{category:o,media:e})]})})}),r&&(0,ut.jsx)(yEe,{onClose:()=>n(!1),onSubmit:()=>{t((0,E3.cloneBlock)(u)),m((0,ni.__)("Image inserted."),{type:"snackbar",id:"inserter-notice"}),n(!1)}})]})}var T3=l(w(),1);function _Ee({mediaList:e,category:t,onClick:o,label:r=(0,YZ.__)("Media List")}){return(0,T3.jsx)(KZ.Composite,{role:"listbox",className:"block-editor-inserter__media-list","aria-label":r,children:e.map((n,i)=>(0,T3.jsx)($Z,{media:n,category:t,onClick:o},n.id||n.sourceId||i))})}var qZ=_Ee;var ec=l(O(),1),I3=l(z(),1);function ZZ(e,t={}){let[o,r]=(0,ec.useState)(),[n,i]=(0,ec.useState)(!1),s=(0,ec.useRef)();return(0,ec.useEffect)(()=>{(async()=>{let a=JSON.stringify({category:e.name,...t});s.current=a,i(!0),r([]);let c=await e.fetch?.(t);a===s.current&&(r(c),i(!1))})()},[e.name,...Object.values(t)]),{mediaList:o,isLoading:n}}function XZ(e){let[t,o]=(0,ec.useState)([]),r=(0,I3.useSelect)(a=>M(a(x)).getInserterMediaCategories(),[]),{canInsertImage:n,canInsertVideo:i,canInsertAudio:s}=(0,I3.useSelect)(a=>{let{canInsertBlockType:c}=a(x);return{canInsertImage:c("core/image",e),canInsertVideo:c("core/video",e),canInsertAudio:c("core/audio",e)}},[e]);return(0,ec.useEffect)(()=>{(async()=>{let a=[];if(!r)return;let c=new Map(await Promise.all(r.map(async d=>{if(d.isExternalResource)return[d.name,!0];let f=[];try{f=await d.fetch({per_page:1})}catch{}return[d.name,!!f.length]}))),u={image:n,video:i,audio:s};r.forEach(d=>{u[d.mediaType]&&c.get(d.name)&&a.push(d)}),a.length&&o(a)})()},[n,i,s,r]),t}var md=l(w(),1),SEe=10;function k_({rootClientId:e,onInsert:t,category:o}){let[r,n,i]=(0,JZ.useDebouncedInput)(),{mediaList:s,isLoading:a}=ZZ(o,{per_page:i?20:SEe,search:i}),c="block-editor-inserter__media-panel",u=o.labels.search_items||(0,QZ.__)("Search");return(0,md.jsxs)("div",{className:c,children:[(0,md.jsx)(kE.SearchControl,{className:`${c}-search`,onChange:n,value:r,label:u,placeholder:u}),a&&(0,md.jsx)("div",{className:`${c}-spinner`,children:(0,md.jsx)(kE.Spinner,{})}),!a&&!s?.length&&(0,md.jsx)(Ks,{}),!a&&!!s?.length&&(0,md.jsx)(qZ,{rootClientId:e,onClick:t,mediaList:s,category:o})]})}var eX=l(z(),1);function xEe({fallback:e=null,children:t}){return(0,eX.useSelect)(r=>{let{getSettings:n}=r(x);return!!n().mediaUpload},[])?t:e}var Zs=xEe;var tX=l(A(),1),wEe=()=>null,pd=(0,tX.withFilters)("editor.MediaUpload")(wEe);var ii=l(w(),1),CEe=["image","video","audio"];function BEe({rootClientId:e,selectedCategory:t,onSelectCategory:o,onInsert:r,children:n}){let i=XZ(e),s=(0,rX.useViewportMatch)("medium","<"),a="block-editor-inserter__media-tabs",c=(0,yE.useCallback)(d=>{if(!d?.url)return;let f=window.__experimentalDataViewsMediaModal&&d.mime_type?d.mime_type.split("/")[0]:d.type,[m]=vE(d,f);r(m)},[r]),u=(0,yE.useMemo)(()=>i.map(d=>({...d,label:d.labels.name})),[i]);return u.length?(0,ii.jsxs)(ii.Fragment,{children:[!s&&(0,ii.jsxs)("div",{className:`${a}-container`,children:[(0,ii.jsx)(bE,{categories:u,selectedCategory:t,onSelectCategory:o,children:n}),(0,ii.jsx)(Zs,{children:(0,ii.jsx)(pd,{multiple:!1,onSelect:c,allowedTypes:CEe,render:({open:d})=>(0,ii.jsx)(nX.Button,{__next40pxDefaultSize:!0,onClick:f=>{f.target.focus(),d()},className:"block-editor-inserter__media-library-button",variant:"secondary","data-unstable-ignore-focus-outside-for-relatedtarget":".media-modal",children:(0,oX.__)("Open Media Library")})})})]}),s&&(0,ii.jsx)(dE,{categories:u,children:d=>(0,ii.jsx)(k_,{onInsert:r,rootClientId:e,category:d})})]}):(0,ii.jsx)(Ks,{})}var P3=BEe;var y_=l(O(),1),hd=l(N(),1);var SE=l(X(),1),aX=l(ir(),1),lX=l(z(),1);var iX=l(A(),1),{Fill:sX,Slot:EEe}=(0,iX.createSlotFill)("__unstableInserterMenuExtension");sX.Slot=EEe;var _E=sX;var On=l(w(),1),TEe=9,IEe=[];function PEe({filterValue:e,onSelect:t,onHover:o,onHoverPattern:r,rootClientId:n,clientId:i,isAppender:s,__experimentalInsertionIndex:a,maxBlockPatterns:c,maxBlockTypes:u,showBlockDirectory:d=!1,isDraggable:f=!0,shouldFocusBlock:m=!0,prioritizePatterns:h,selectBlockOnInsert:p,isQuick:g}){let b=(0,SE.useDebounce)(aX.speak,500),{prioritizedBlocks:k}=(0,lX.useSelect)(F=>({prioritizedBlocks:F(x).getBlockListSettings(n)?.prioritizedInserterBlocks||IEe}),[n]),[v,y]=dd({onSelect:t,rootClientId:n,clientId:i,isAppender:s,insertionIndex:a,shouldFocusBlock:m,selectBlockOnInsert:p}),[_,S,C,B]=Lu(v,y,g),[P,,T]=fd(y,v,void 0,g),E=(0,y_.useMemo)(()=>{if(c===0)return[];let F=uy(P,e);return c!==void 0?F.slice(0,c):F},[e,P,c]),L=u;h&&E.length>2&&(L=0);let I=(0,y_.useMemo)(()=>{if(L===0)return[];let F=_.filter(W=>W.name!=="core/block"),U=Ba(F,"frecency","desc");!e&&k.length&&(U=OC(U,k));let G=IC(U,S,C,e);return L!==void 0?G.slice(0,L):G},[e,_,S,C,L,k]);(0,y_.useEffect)(()=>{if(!e)return;let F=I.length+E.length,U=(0,hd.sprintf)((0,hd._n)("%d result found.","%d results found.",F),F);b(U)},[e,b,I,E]);let R=(0,SE.useAsyncList)(I,{step:TEe}),V=I.length>0||E.length>0,j=!!I.length&&(0,On.jsx)(ud,{title:(0,On.jsx)(Ge,{children:(0,hd.__)("Blocks")}),children:(0,On.jsx)(Vm,{items:R,onSelect:B,onHover:o,label:(0,hd.__)("Blocks"),isDraggable:f})}),H=!!E.length&&(0,On.jsx)(ud,{title:(0,On.jsx)(Ge,{children:(0,hd.__)("Block patterns")}),children:(0,On.jsx)("div",{className:"block-editor-inserter__quick-inserter-patterns",children:(0,On.jsx)(za,{blockPatterns:E,onClickPattern:T,onHover:r,isDraggable:f})})});return(0,On.jsxs)(Eg,{children:[!d&&!V&&(0,On.jsx)(Ks,{}),h?H:j,!!I.length&&!!E.length&&(0,On.jsx)("div",{className:"block-editor-inserter__quick-inserter-separator"}),h?j:H,d&&(0,On.jsx)(_E.Slot,{fillProps:{onSelect:B,onHover:o,filterValue:e,hasItems:V,rootClientId:v},children:F=>F.length?F:V?null:(0,On.jsx)(Ks,{})})]})}var xE=PEe;var CE=l(A(),1),cX=l(O(),1);var tc=l(w(),1),{Tabs:wE}=M(CE.privateApis);function REe({defaultTabId:e,onClose:t,onSelect:o,selectedTab:r,tabs:n,closeButtonLabel:i},s){return(0,tc.jsx)("div",{className:"block-editor-tabbed-sidebar",children:(0,tc.jsxs)(wE,{selectOnMove:!1,defaultTabId:e,onSelect:o,selectedTabId:r,children:[(0,tc.jsxs)("div",{className:"block-editor-tabbed-sidebar__tablist-and-close-button",children:[(0,tc.jsx)(CE.Button,{className:"block-editor-tabbed-sidebar__close-button",icon:qf,label:i,onClick:()=>t(),size:"compact"}),(0,tc.jsx)(wE.TabList,{className:"block-editor-tabbed-sidebar__tablist",ref:s,children:n.map(a=>(0,tc.jsx)(wE.Tab,{tabId:a.name,className:"block-editor-tabbed-sidebar__tab",children:a.title},a.name))})]}),n.map(a=>(0,tc.jsx)(wE.TabPanel,{tabId:a.name,focusable:!1,className:"block-editor-tabbed-sidebar__tabpanel",ref:a.panelRef,children:a.panel},a.name))]})})}var BE=(0,cX.forwardRef)(REe);var EE=l(z(),1),zg=l(O(),1);function __(e=!0){let{setZoomLevel:t,resetZoomLevel:o}=M((0,EE.useDispatch)(x)),{isZoomedOut:r,isZoomOut:n}=(0,EE.useSelect)(a=>{let{isZoomOut:c}=M(a(x));return{isZoomedOut:c(),isZoomOut:c}},[]),i=(0,zg.useRef)(!1),s=(0,zg.useRef)(e);(0,zg.useEffect)(()=>{r!==s.current&&(i.current=!1)},[r]),(0,zg.useEffect)(()=>(s.current=e,e!==n()&&(i.current=!0,e?t("auto-scaled"):o()),()=>{i.current&&n()&&o()}),[e,n,o,t])}var Ke=l(w(),1),dX=()=>{};function OEe({rootClientId:e,clientId:t,isAppender:o,__experimentalInsertionIndex:r,onSelect:n,showInserterHelpPanel:i,showMostUsedBlocks:s,__experimentalFilterValue:a="",shouldFocusBlock:c=!0,onPatternCategorySelection:u,onClose:d,__experimentalInitialTab:f,__experimentalInitialCategory:m},h){let{isZoomOutMode:p,hasSectionRootClientId:g}=(0,uX.useSelect)(me=>{let{isZoomOut:xe,getSectionRootClientId:De}=M(me(x));return{isZoomOutMode:xe(),hasSectionRootClientId:!!De()}},[]),[b,k,v]=(0,S_.useDebouncedInput)(a),[y,_]=(0,Wt.useState)(null),[S,C]=(0,Wt.useState)(m),[B,P]=(0,Wt.useState)("all"),[T,E]=(0,Wt.useState)(null),L=(0,S_.useViewportMatch)("large"),R=(0,S_.useViewportMatch)("medium","<")?d:dX;function V(){return f||(p?"patterns":"blocks")}let[j,H]=(0,Wt.useState)(V());__(g&&(j==="patterns"||j==="media")&&L);let[U,G,W]=dd({rootClientId:e,clientId:t,isAppender:o,insertionIndex:r,shouldFocusBlock:c}),J=(0,Wt.useRef)(),le=(0,Wt.useCallback)((me,xe,De,lt)=>{G(me,xe,De,lt),n(me),R(),window.requestAnimationFrame(()=>{!c&&!J.current?.contains(h.current.ownerDocument.activeElement)&&J.current?.querySelector("button").focus()})},[G,R,n,h,c]),oe=(0,Wt.useCallback)((me,xe,...De)=>{W(!1),G(me,{patternName:xe},...De),n(),R()},[G,R,n,W]),re=(0,Wt.useCallback)(me=>{W(me),_(me)},[W,_]),Q=(0,Wt.useCallback)((me,xe)=>{C(me),P(xe),u?.()},[C,u]),$=j==="patterns"&&!v&&!!S,ee=j==="media"&&!!T,K=(0,Wt.useMemo)(()=>j==="media"?null:(0,Ke.jsxs)(Ke.Fragment,{children:[(0,Ke.jsx)(TE.SearchControl,{className:"block-editor-inserter__search",onChange:me=>{y&&_(null),k(me)},value:b,label:(0,gd.__)("Search"),placeholder:(0,gd.__)("Search")}),!!v&&(0,Ke.jsx)(xE,{filterValue:v,onSelect:n,onHover:re,rootClientId:e,clientId:t,isAppender:o,__experimentalInsertionIndex:r,showBlockDirectory:!0,shouldFocusBlock:c,prioritizePatterns:j==="patterns"})]}),[j,y,_,k,b,v,n,re,c,t,e,r,o]),te=(0,Wt.useMemo)(()=>(0,Ke.jsxs)(Ke.Fragment,{children:[(0,Ke.jsx)("div",{className:"block-editor-inserter__block-list",children:(0,Ke.jsx)(pZ,{ref:J,rootClientId:U,onInsert:le,onHover:re,showMostUsedBlocks:s})}),i&&(0,Ke.jsxs)("div",{className:"block-editor-inserter__tips",children:[(0,Ke.jsx)(Ge,{render:(0,Ke.jsx)("h2",{}),children:(0,gd.__)("A tip for using the block editor")}),(0,Ke.jsx)(I$,{})]})]}),[U,le,re,s,i]),ne=(0,Wt.useMemo)(()=>(0,Ke.jsx)(FZ,{rootClientId:U,onInsert:oe,onSelectCategory:Q,selectedCategory:S,children:$&&(0,Ke.jsx)(mE,{rootClientId:U,onInsert:oe,category:S,patternFilter:B,showTitlesAsTooltip:!0})}),[U,oe,Q,B,S,$]),q=(0,Wt.useMemo)(()=>(0,Ke.jsx)(P3,{rootClientId:U,selectedCategory:T,onSelectCategory:E,onInsert:le,children:ee&&(0,Ke.jsx)(k_,{rootClientId:U,onInsert:le,category:T})}),[U,le,T,E,ee]),se=me=>{me!=="patterns"&&C(null),H(me)},he=(0,Wt.useRef)();return(0,Wt.useLayoutEffect)(()=>{he.current&&window.requestAnimationFrame(()=>{he.current.querySelector('[role="tab"][aria-selected="true"]')?.focus()})},[]),(0,Ke.jsxs)("div",{className:D("block-editor-inserter__menu",{"show-panel":$||ee,"is-zoom-out":p}),ref:h,children:[(0,Ke.jsx)("div",{className:"block-editor-inserter__main-area",children:(0,Ke.jsx)(BE,{ref:he,onSelect:se,onClose:d,selectedTab:j,closeButtonLabel:(0,gd.__)("Close Block Inserter"),tabs:[{name:"blocks",title:(0,gd.__)("Blocks"),panel:(0,Ke.jsxs)(Ke.Fragment,{children:[K,j==="blocks"&&!v&&te]})},{name:"patterns",title:(0,gd.__)("Patterns"),panel:(0,Ke.jsxs)(Ke.Fragment,{children:[K,j==="patterns"&&!v&&ne]})},{name:"media",title:(0,gd.__)("Media"),panel:(0,Ke.jsxs)(Ke.Fragment,{children:[K,q]})}]})}),i&&y&&(0,Ke.jsx)(TE.Popover,{className:"block-editor-inserter__preview-container__popover",placement:"right-start",offset:16,focusOnMount:!1,animate:!1,children:(0,Ke.jsx)(Yq,{item:y})})]})}var R3=(0,Wt.forwardRef)(OEe);function AEe(e,t){return(0,Ke.jsx)(R3,{...e,onPatternCategorySelection:dX,ref:t})}var fX=(0,Wt.forwardRef)(AEe);var IE=l(O(),1),x_=l(N(),1),PE=l(A(),1),mX=l(z(),1);var Hm=l(w(),1),LEe=6,NEe=6,MEe=2;function RE({onSelect:e,rootClientId:t,clientId:o,isAppender:r,selectBlockOnInsert:n,hasSearch:i=!0}){let[s,a]=(0,IE.useState)(""),[c,u]=dd({onSelect:e,rootClientId:t,clientId:o,isAppender:r,selectBlockOnInsert:n}),[d]=Lu(c,u,!0),{setInserterIsOpened:f,insertionIndex:m}=(0,mX.useSelect)(g=>{let{getSettings:b,getBlockIndex:k,getBlockCount:v}=g(x),y=b(),_=k(o),S=v();return{setInserterIsOpened:y.__experimentalSetIsInserterOpened,insertionIndex:_===-1?S:_}},[o]),h=i&&d.length>LEe;(0,IE.useEffect)(()=>{f&&f(!1)},[f]);let p=()=>{f({filterValue:s,onSelect:e,rootClientId:t,insertionIndex:m})};return(0,Hm.jsxs)("div",{className:D("block-editor-inserter__quick-inserter",{"has-search":h,"has-expand":f}),children:[h&&(0,Hm.jsx)(PE.SearchControl,{className:"block-editor-inserter__search",value:s,onChange:g=>{a(g)},label:(0,x_.__)("Search"),placeholder:(0,x_.__)("Search")}),(0,Hm.jsx)("div",{className:"block-editor-inserter__quick-inserter-results",children:(0,Hm.jsx)(xE,{filterValue:s,onSelect:e,rootClientId:t,clientId:o,isAppender:r,maxBlockPatterns:s?MEe:0,maxBlockTypes:NEe,isDraggable:!1,selectBlockOnInsert:n,isQuick:!0})}),f&&(0,Hm.jsx)(PE.Button,{__next40pxDefaultSize:!0,className:"block-editor-inserter__quick-inserter-expand",onClick:p,"aria-label":(0,x_.__)("Browse all. This will open the main inserter panel in the editor toolbar."),children:(0,x_.__)("Browse all")})]})}var DEe=50;function pX(e,t){if(!e||!e.attributes||!t?.__experimentalLabel)return null;let o=t.__experimentalLabel(e.attributes,{context:"appender"});return typeof o=="string"&&o.length<DEe&&o.length>0?o:null}var w_=l(w(),1),VEe=({onToggle:e,disabled:t,isOpen:o,blockTitle:r,hasSingleBlockType:n,appenderLabel:i,toggleProps:s={}})=>{let{as:a=OE.Button,label:c,onClick:u,...d}=s,f=c;!f&&i?f=i:!f&&n?f=(0,oc.sprintf)((0,oc._x)("Add %s","directly add the only allowed block"),r.toLowerCase()):f||(f=(0,oc._x)("Add block","Generic label for block inserter button"));function m(h){e&&e(h),u&&u(h)}return(0,w_.jsx)(a,{__next40pxDefaultSize:s.as?void 0:!0,icon:Li,label:f,tooltipPosition:"bottom",onClick:m,className:"block-editor-inserter__toggle","aria-haspopup":n?!1:"true","aria-expanded":n?!1:o,disabled:t,...d})},FEe=class extends gX.Component{constructor(){super(...arguments),this.onToggle=this.onToggle.bind(this),this.renderToggle=this.renderToggle.bind(this),this.renderContent=this.renderContent.bind(this)}onToggle(e){let{onToggle:t}=this.props;t&&t(e)}renderToggle({onToggle:e,isOpen:t}){let{disabled:o,blockTitle:r,hasSingleBlockType:n,appenderLabel:i,toggleProps:s,hasItems:a,renderToggle:c=VEe}=this.props;return c({onToggle:e,isOpen:t,disabled:o||!a,blockTitle:r,hasSingleBlockType:n,appenderLabel:i,toggleProps:s})}renderContent({onClose:e}){let{rootClientId:t,clientId:o,isAppender:r,showInserterHelpPanel:n,__experimentalIsQuick:i,onSelectOrClose:s,selectBlockOnInsert:a}=this.props;return i?(0,w_.jsx)(RE,{onSelect:c=>{let u=Array.isArray(c)&&c?.length?c[0]:c;s&&typeof s=="function"&&s(u),e()},rootClientId:t,clientId:o,isAppender:r,selectBlockOnInsert:a}):(0,w_.jsx)(fX,{onSelect:()=>{e()},onClose:e,rootClientId:t,clientId:o,isAppender:r,showInserterHelpPanel:n})}render(){let{position:e,hasSingleBlockType:t,directInsertBlock:o,insertOnlyAllowedBlock:r,__experimentalIsQuick:n,onSelectOrClose:i}=this.props;return t||o?this.renderToggle({onToggle:r}):(0,w_.jsx)(OE.Dropdown,{className:"block-editor-inserter",contentClassName:D("block-editor-inserter__popover",{"is-quick":n}),popoverProps:{position:e,shift:!0},onToggle:this.onToggle,expandOnMobile:!0,headerTitle:(0,oc.__)("Add a block"),renderToggle:this.renderToggle,renderContent:this.renderContent,onClose:i})}},Xi=(0,LE.compose)([(0,AE.withSelect)((e,{clientId:t,rootClientId:o,shouldDirectInsert:r=!0})=>{let{getBlockRootClientId:n,hasInserterItems:i,getAllowedBlocks:s,getDirectInsertBlock:a}=e(x),{getBlockVariations:c,getBlockType:u}=e(C_.store);o=o||n(t)||void 0;let d=s(o),f=r&&a(o),m=d?.length===1&&c(d[0].name,"inserter")?.length===0,h=!1;m&&(h=d[0]);let p=f?u(f.name):null,g=pX(f,p);return{hasItems:i(o),hasSingleBlockType:m,blockTitle:h?h.title:"",allowedBlockType:h,directInsertBlock:f,appenderLabel:g,rootClientId:o}}),(0,AE.withDispatch)((e,t,{select:o})=>({insertOnlyAllowedBlock(){let{rootClientId:r,clientId:n,isAppender:i,hasSingleBlockType:s,allowedBlockType:a,directInsertBlock:c,onSelectOrClose:u,selectBlockOnInsert:d}=t;if(!s&&!c)return;function f(b){let{getBlock:k,getPreviousBlockClientId:v}=o(x);if(!b||!n&&!r)return{};let y={},_={};if(n){let S=k(n),C=k(v(n));S?.name===C?.name&&(_=C?.attributes||{})}else{let S=k(r);if(S?.innerBlocks?.length){let C=S.innerBlocks[S.innerBlocks.length-1];c&&c?.name===C.name&&(_=C.attributes)}}return b.forEach(S=>{_.hasOwnProperty(S)&&(y[S]=_[S])}),y}function m(){let{getBlockIndex:b,getBlockSelectionEnd:k,getBlockOrder:v,getBlockRootClientId:y}=o(x);if(n)return b(n);let _=k();return!i&&_&&y(_)===r?b(_)+1:v(r).length}let{insertBlock:h}=e(x),p;if(c){let b=f(c.attributesToCopy);p=(0,C_.createBlock)(c.name,{...c.attributes||{},...b})}else p=(0,C_.createBlock)(a.name);h(p,m(),r,d),u&&u(p);let g=(0,oc.sprintf)((0,oc.__)("%s block added"),a.title);(0,hX.speak)(g)}})),(0,LE.ifCondition)(({hasItems:e,isAppender:t,rootClientId:o,clientId:r})=>e||!t&&!o&&!r)])(FEe);var B_=l(w(),1),zEe="\uFEFF";function jg({rootClientId:e}){let{showPrompt:t,isLocked:o,placeholder:r,isManualGrid:n}=(0,NE.useSelect)(u=>{let{getBlockCount:d,getSettings:f,getTemplateLock:m,getBlockAttributes:h}=u(x),p=!d(e),{bodyPlaceholder:g}=f();return{showPrompt:p,isLocked:!!m(e),placeholder:g,isManualGrid:h(e)?.layout?.isManualPlacement}},[e]),{insertDefaultBlock:i,startTyping:s}=(0,NE.useDispatch)(x);if(o||n)return null;let a=(0,bX.decodeEntities)(r)||(0,O3.__)("Type / to choose a block"),c=()=>{i(void 0,e),s()};return(0,B_.jsxs)("div",{"data-root-client-id":e||"",className:D("block-editor-default-block-appender",{"has-visible-prompt":t}),children:[(0,B_.jsx)("p",{tabIndex:"0",role:"button","aria-label":(0,O3.__)("Add default block"),className:"block-editor-default-block-appender__content",onKeyDown:u=>{(ME.ENTER===u.keyCode||ME.SPACE===u.keyCode)&&c()},onClick:()=>c(),onFocus:()=>{t&&c()},children:t?a:zEe}),(0,B_.jsx)(Xi,{rootClientId:e,position:"bottom right",isAppender:!0,__experimentalIsQuick:!0})]})}var vX=l(A(),1),A3=l(O(),1),E_=l(N(),1);var kX=l(Re(),1);var DE=l(w(),1);function yX({rootClientId:e,className:t,onFocus:o,tabIndex:r,onSelect:n},i){return(0,DE.jsx)(Xi,{position:"bottom center",rootClientId:e,__experimentalIsQuick:!0,onSelectOrClose:(...s)=>{n&&typeof n=="function"&&n(...s)},renderToggle:({onToggle:s,disabled:a,isOpen:c,blockTitle:u,hasSingleBlockType:d,appenderLabel:f})=>{let m=!d,h;return f?h=f:d?h=(0,E_.sprintf)((0,E_._x)("Add %s","directly add the only allowed block"),u.toLowerCase()):h=(0,E_._x)("Add block","Generic label for block inserter button"),(0,DE.jsx)(vX.Button,{__next40pxDefaultSize:!0,ref:i,onFocus:o,tabIndex:r,className:D(t,"block-editor-button-block-appender"),onClick:s,"aria-haspopup":m?"true":void 0,"aria-expanded":m?c:void 0,disabled:a,label:h,showTooltip:!0,children:(0,DE.jsx)(Ee,{icon:Li})})},isAppender:!0})}var _X=(0,A3.forwardRef)((e,t)=>((0,kX.default)("wp.blockEditor.ButtonBlockerAppender",{alternative:"wp.blockEditor.ButtonBlockAppender",since:"5.9"}),yX(e,t))),bd=(0,A3.forwardRef)(yX);var Ug=l(w(),1);function jEe({rootClientId:e}){return(0,L3.useSelect)(o=>o(x).canInsertBlockType((0,SX.getDefaultBlockName)(),e))?(0,Ug.jsx)(jg,{rootClientId:e}):(0,Ug.jsx)(bd,{rootClientId:e,className:"block-list-appender__toggle"})}function xX({rootClientId:e,CustomAppender:t,className:o,tagName:r="div"}){let n=(0,L3.useSelect)(i=>{let{getBlockInsertionPoint:s,isBlockInsertionPointVisible:a,getBlockCount:c}=i(x),u=s();return a()&&e===u?.rootClientId&&c(e)===0},[e]);return(0,Ug.jsx)(r,{tabIndex:-1,className:D("block-list-appender wp-block",o,{"is-drag-over":n}),contentEditable:!1,"data-block":!0,children:t?(0,Ug.jsx)(t,{}):(0,Ug.jsx)(jEe,{rootClientId:e})})}var VX=l(X(),1),I_=l(z(),1),FX=l(O(),1),zX=l(N(),1);var Hg=l(z(),1),kd=l(O(),1),zE=l(A(),1),MX=l(X(),1);var BX=l(z(),1),vd=l(O(),1),EX=l(A(),1),TX=l(N(),1);var CX=l(X(),1),N3=l(Ve(),1),wX=new WeakMap;function UEe(e){let t=(0,CX.useRefEffect)(o=>{function r(i){let{deltaX:s,deltaY:a,target:c}=i,u=e.current,d=wX.get(u);d||(d=(0,N3.getScrollContainer)(u),wX.set(u,d));let f=(0,N3.getScrollContainer)(c);o.contains(f)||d.scrollBy(s,a)}let n={passive:!0};return o.addEventListener("wheel",r,n),()=>{o.removeEventListener("wheel",r,n)}},[e]);return e?t:null}var Gm=UEe;var M3=l(w(),1),HEe=Number.MAX_SAFE_INTEGER;function GEe({previousClientId:e,nextClientId:t,children:o,__unstablePopoverSlot:r,__unstableContentRef:n,operation:i="insert",nearestSide:s="right",...a}){let[c,u]=(0,vd.useReducer)(v=>(v+1)%HEe,0),{orientation:d,rootClientId:f,isVisible:m}=(0,BX.useSelect)(v=>{let{getBlockListSettings:y,getBlockRootClientId:_,isBlockVisible:S}=v(x),C=_(e??t);return{orientation:y(C)?.orientation||"vertical",rootClientId:C,isVisible:S(e)&&S(t)}},[e,t]),h=rt(e),p=rt(t),g=d==="vertical",b=(0,vd.useMemo)(()=>c<0||!h&&!p||!m?void 0:{contextElement:i==="group"?p||h:h||p,getBoundingClientRect(){let y=h?h.getBoundingClientRect():null,_=p?p.getBoundingClientRect():null,S=0,C=0,B=0,P=0;if(i==="group"){let T=_||y;C=T.top,B=0,P=T.bottom-T.top,S=s==="left"?T.left-2:T.right-2}else g?(C=y?y.bottom:_.top,B=y?y.width:_.width,P=_&&y?_.top-y.bottom:0,S=y?y.left:_.left):(C=y?y.top:_.top,P=y?y.height:_.height,(0,TX.isRTL)()?(S=_?_.right:y.left,B=y&&_?y.left-_.right:0):(S=y?y.right:_.left,B=y&&_?_.left-y.right:0),B=Math.max(B,0));return new window.DOMRect(S,C,B,P)}},[h,p,c,g,m,i,s]),k=Gm(n);return(0,vd.useLayoutEffect)(()=>{if(!h)return;let v=new window.MutationObserver(u);return v.observe(h,{attributes:!0}),()=>{v.disconnect()}},[h]),(0,vd.useLayoutEffect)(()=>{if(!p)return;let v=new window.MutationObserver(u);return v.observe(p,{attributes:!0}),()=>{v.disconnect()}},[p]),(0,vd.useLayoutEffect)(()=>{if(h)return h.ownerDocument.defaultView.addEventListener("resize",u),()=>{h.ownerDocument.defaultView?.removeEventListener("resize",u)}},[h]),!h&&!p||!m?null:(0,M3.jsx)(EX.Popover,{ref:k,animate:!1,anchor:b,focusOnMount:!1,__unstableSlotName:r,inline:!r,...a,className:D("block-editor-block-popover","block-editor-block-popover__inbetween",a.className),resize:!1,flip:!1,placement:"overlay",variant:"unstyled",children:(0,M3.jsx)("div",{className:"block-editor-block-popover__inbetween-container",children:o})},t+"--"+f)}var VE=GEe;var OX=l(z(),1),AX=l(X(),1),LX=l(A(),1);var nc=l(O(),1);var IX=l(X(),1),PX=l(A(),1),rc=l(O(),1);var D3=l(w(),1),WEe=Number.MAX_SAFE_INTEGER;function $Ee({clientId:e,bottomClientId:t,children:o,__unstablePopoverSlot:r,__unstableContentRef:n,shift:i=!0,...s},a){let c=rt(e),u=rt(t??e),d=(0,IX.useMergeRefs)([a,Gm(n)]),[f,m]=(0,rc.useReducer)(p=>(p+1)%WEe,0);(0,rc.useLayoutEffect)(()=>{if(!c)return;let p=new window.MutationObserver(m);return p.observe(c,{attributes:!0}),()=>{p.disconnect()}},[c]);let h=(0,rc.useMemo)(()=>{if(!(f<0||!c||t&&!u))return{getBoundingClientRect(){return u?SD(qh(c),qh(u)):qh(c)},contextElement:c}},[f,c,t,u]);return!c||t&&!u?null:(0,D3.jsx)(PX.Popover,{ref:d,animate:!1,focusOnMount:!1,anchor:h,__unstableSlotName:r,inline:!r,placement:"top-start",resize:!1,flip:!1,shift:i,...s,className:D("block-editor-block-popover",s.className),variant:"unstyled",children:o})}var Wm=(0,rc.forwardRef)($Ee),KEe=({clientId:e,bottomClientId:t,children:o,...r},n)=>(0,D3.jsx)(Wm,{...r,bottomClientId:t,clientId:e,__unstableContentRef:void 0,__unstablePopoverSlot:void 0,ref:n,children:o}),RX=(0,rc.forwardRef)(KEe);var FE=l(w(),1);function YEe({clientId:e,bottomClientId:t,children:o,shift:r=!1,additionalStyles:n,...i},s){t??=e;let a=rt(e);return(0,FE.jsx)(Wm,{ref:s,clientId:e,bottomClientId:t,shift:r,...i,children:a&&e===t?(0,FE.jsx)(qEe,{selectedElement:a,additionalStyles:n,children:o}):o})}function qEe({selectedElement:e,additionalStyles:t={},children:o}){let[r,n]=(0,nc.useState)(e.offsetWidth),[i,s]=(0,nc.useState)(e.offsetHeight);(0,nc.useEffect)(()=>{let c=new window.ResizeObserver(()=>{n(e.offsetWidth),s(e.offsetHeight)});return c.observe(e,{box:"border-box"}),()=>c.disconnect()},[e]);let a=(0,nc.useMemo)(()=>({position:"absolute",width:r,height:i,...t}),[r,i,t]);return(0,FE.jsx)("div",{style:a,children:o})}var Qi=(0,nc.forwardRef)(YEe);var V3=l(w(),1),T_={hide:{opacity:0,scaleY:.75},show:{opacity:1,scaleY:1},exit:{opacity:0,scaleY:.9}};function ZEe({__unstablePopoverSlot:e,__unstableContentRef:t}){let{clientId:o}=(0,OX.useSelect)(n=>{let{getBlockOrder:i,getBlockInsertionPoint:s}=n(x),a=s(),c=i(a.rootClientId);return c.length?{clientId:c[a.index]}:{}},[]),r=(0,AX.useReducedMotion)();return(0,V3.jsx)(Qi,{clientId:o,__unstablePopoverSlot:e,__unstableContentRef:t,className:"block-editor-block-popover__drop-zone",children:(0,V3.jsx)(LX.__unstableMotion.div,{"data-testid":"block-popover-drop-zone",initial:r?T_.show:T_.hide,animate:T_.show,exit:r?T_.show:T_.exit,className:"block-editor-block-popover__drop-zone-foreground"})})}var NX=ZEe;var ic=l(w(),1),Gg=(0,kd.createContext)();Gg.displayName="InsertionPointOpenRefContext";function XEe({__unstablePopoverSlot:e,__unstableContentRef:t,operation:o="insert",nearestSide:r="right"}){let{selectBlock:n,hideInsertionPoint:i}=(0,Hg.useDispatch)(x),s=(0,kd.useContext)(Gg),a=(0,kd.useRef)(),{orientation:c,previousClientId:u,nextClientId:d,rootClientId:f,isInserterShown:m,isDistractionFree:h,isZoomOutMode:p}=(0,Hg.useSelect)(T=>{let{getBlockOrder:E,getBlockListSettings:L,getBlockInsertionPoint:I,isBlockBeingDragged:R,getPreviousBlockClientId:V,getNextBlockClientId:j,getSettings:H,isZoomOut:F}=M(T(x)),U=I(),G=E(U.rootClientId);if(!G.length)return{};let W=G[U.index-1],J=G[U.index];for(;R(W);)W=V(W);for(;R(J);)J=j(J);let le=H();return{previousClientId:W,nextClientId:J,orientation:L(U.rootClientId)?.orientation||"vertical",rootClientId:U.rootClientId,isDistractionFree:le.isDistractionFree,isInserterShown:U?.__unstableWithInserter,isZoomOutMode:F()}},[]),{getBlockEditingMode:g}=(0,Hg.useSelect)(x),b=(0,MX.useReducedMotion)();function k(T){T.target===a.current&&d&&g(d)!=="disabled"&&n(d,-1)}function v(T){T.target===a.current&&!s.current&&i()}function y(T){T.target!==a.current&&(s.current=!0)}let _=(0,kd.useCallback)(T=>{!T&&s.current&&(s.current=!1)},[s]),S={start:{opacity:0,scale:0},rest:{opacity:1,scale:1,transition:{delay:m?.5:0,type:"tween"}},hover:{opacity:1,scale:1,transition:{delay:.5,type:"tween"}}},C={start:{scale:b?1:0},rest:{scale:1,transition:{delay:.4,type:"tween"}}};if(h||p&&o!=="insert")return null;let P=D("block-editor-block-list__insertion-point",c==="horizontal"||o==="group"?"is-horizontal":"is-vertical");return(0,ic.jsx)(VE,{previousClientId:u,nextClientId:d,__unstablePopoverSlot:e,__unstableContentRef:t,operation:o,nearestSide:r,children:(0,ic.jsxs)(zE.__unstableMotion.div,{layout:!b,initial:b?"rest":"start",animate:"rest",whileHover:"hover",whileTap:"pressed",exit:"start",ref:a,tabIndex:-1,onClick:k,onFocus:y,className:D(P,{"is-with-inserter":m}),onHoverEnd:v,children:[(0,ic.jsx)(zE.__unstableMotion.div,{variants:S,className:"block-editor-block-list__insertion-point-indicator","data-testid":"block-list-insertion-point-indicator"}),m&&(0,ic.jsx)(zE.__unstableMotion.div,{variants:C,className:D("block-editor-block-list__insertion-point-inserter"),children:(0,ic.jsx)(Xi,{ref:_,position:"bottom center",clientId:d,rootClientId:f,__experimentalIsQuick:!0,onToggle:T=>{s.current=T},onSelectOrClose:()=>{s.current=!1}})})]})})}function DX(e){let{insertionPoint:t,isVisible:o,isBlockListEmpty:r}=(0,Hg.useSelect)(n=>{let{getBlockInsertionPoint:i,isBlockInsertionPointVisible:s,getBlockCount:a}=n(x),c=i();return{insertionPoint:c,isVisible:s(),isBlockListEmpty:a(c?.rootClientId)===0}},[]);return!o||r?null:t.operation==="replace"?(0,ic.jsx)(NX,{...e},`${t.rootClientId}-${t.index}`):(0,ic.jsx)(XEe,{operation:t.operation,nearestSide:t.nearestSide,...e})}function jX(){let e=(0,FX.useContext)(Gg),t=(0,I_.useSelect)(g=>{let b=g(x).getSettings();return b.isDistractionFree||b.isPreviewMode||M(g(x)).isZoomOut()},[]),{getBlockListSettings:o,getBlockIndex:r,isMultiSelecting:n,getSelectedBlockClientIds:i,getSettings:s,getTemplateLock:a,__unstableIsWithinBlockOverlay:c,getBlockEditingMode:u,getBlockName:d,getBlockAttributes:f,getParentSectionBlock:m}=M((0,I_.useSelect)(x)),{showInsertionPoint:h,hideInsertionPoint:p}=(0,I_.useDispatch)(x);return(0,VX.useRefEffect)(g=>{if(t)return;function b(k){if(e===void 0||e.current||k.target.nodeType===k.target.TEXT_NODE||n())return;if(!k.target.classList.contains("block-editor-block-list__layout")){p();return}let v;if(k.target.classList.contains("is-root-container")||(v=(k.target.getAttribute("data-block")?k.target:k.target.closest("[data-block]")).getAttribute("data-block")),a(v)||u(v)==="disabled"||d(v)==="core/block"||v&&f(v).layout?.isManualPlacement)return;let y=o(v),_=y?.orientation||"vertical",S=!!y?.__experimentalCaptureToolbars,C=k.clientY,B=k.clientX,T=Array.from(k.target.children).find(R=>{let V=R.getBoundingClientRect();return R.classList.contains("wp-block")&&_==="vertical"&&V.top>C||R.classList.contains("wp-block")&&_==="horizontal"&&((0,zX.isRTL)()?V.right<B:V.left>B)});if(!T){p();return}if(!T.id&&(T=T.firstElementChild,!T)){p();return}let E=T.id.slice(6);if(!E||c(E)||m(E)||i().includes(E)&&_==="vertical"&&!S&&!s().hasFixedToolbar)return;let L=T.getBoundingClientRect();if(_==="horizontal"&&(k.clientY>L.bottom||k.clientY<L.top)||_==="vertical"&&(k.clientX>L.right||k.clientX<L.left)){p();return}let I=r(E);if(I===0){p();return}h(v,I,{__unstableWithInserter:!0})}return g.addEventListener("mousemove",b),()=>{g.removeEventListener("mousemove",b)}},[e,o,r,n,h,p,i,t])}var jE=l(z(),1),UX=l(X(),1);var HX=l(w(),1);function $m(){let{getSettings:e,hasSelectedBlock:t,hasMultiSelection:o}=(0,jE.useSelect)(x),{clearSelectedBlock:r}=(0,jE.useDispatch)(x),{clearBlockSelection:n}=e();return(0,UX.useRefEffect)(i=>{if(!n)return;function s(a){!t()&&!o()||a.target===i&&r()}return i.addEventListener("mousedown",s),()=>{i.removeEventListener("mousedown",s)}},[t,o,r,n])}function GX(e){return(0,HX.jsx)("div",{ref:$m(),...e})}var dQ=l(X(),1),$g=l(O(),1),fQ=l(z(),1),Zm=l(Y(),1);var WX=l(w(),1);function $X({showSeparator:e,isFloating:t,onAddBlock:o,isToggle:r}){let{clientId:n}=Pe();return(0,WX.jsx)(bd,{className:D({"block-list-appender__toggle":r}),rootClientId:n,showSeparator:e,isFloating:t,onAddBlock:o})}var KX=l(w(),1);function YX(){let{clientId:e}=Pe();return(0,KX.jsx)(jg,{rootClientId:e})}var HE=l(O(),1),XX=l(z(),1),UE=l(Re(),1),QX=l(P_(),1);var R_=new WeakMap;function QEe(){let e;return t=>((e===void 0||!(0,QX.isShallowEqual)(e,t))&&(e=t),e)}function ZX(e){let[t]=(0,HE.useState)(QEe);return t(e)}function JX(e,t,o,r,n,i,s,a,c,u,d,f){let m=(0,XX.useRegistry)(),h=ZX(o),p=ZX(r),g=c===void 0||t==="contentOnly"?t:c;(0,HE.useLayoutEffect)(()=>{let b={allowedBlocks:h,prioritizedInserterBlocks:p,templateLock:g};if(u!==void 0&&(b.__experimentalCaptureToolbars=u),d!==void 0)b.orientation=d;else{let k=Ns(f?.type);b.orientation=k.getOrientation(f)}s!==void 0&&((0,UE.default)("__experimentalDefaultBlock",{alternative:"defaultBlock",since:"6.3",version:"6.4"}),b.defaultBlock=s),n!==void 0&&(b.defaultBlock=n),a!==void 0&&((0,UE.default)("__experimentalDirectInsert",{alternative:"directInsert",since:"6.3",version:"6.4"}),b.directInsert=a),i!==void 0&&(b.directInsert=i),b.directInsert!==void 0&&typeof b.directInsert!="boolean"&&(0,UE.default)("Using `Function` as a `directInsert` argument",{alternative:"`boolean` values",since:"6.5"}),R_.get(m)||R_.set(m,{}),R_.get(m)[e]=b,window.queueMicrotask(()=>{let k=R_.get(m);if(Object.keys(k).length){let{updateBlockListSettings:v}=m.dispatch(x);v(k),R_.set(m,{})}})},[e,h,p,g,n,i,s,a,u,d,f,m])}var F3=l(Wf(),1),GE=l(O(),1),eQ=l(z(),1),tQ=l(Y(),1);function oQ(e,t,o,r){let n=(0,eQ.useRegistry)(),i=(0,GE.useRef)(null);(0,GE.useLayoutEffect)(()=>{let s=!1,{getBlocks:a,getSelectedBlocksInitialCaretPosition:c,isBlockSelected:u}=n.select(x),{replaceInnerBlocks:d,__unstableMarkNextChangeAsNotPersistent:f}=n.dispatch(x);return window.queueMicrotask(()=>{if(s)return;let m=a(e),h=m.length===0||o==="all"||o==="contentOnly",p=!(0,F3.default)(t,i.current);if(!h||!p)return;i.current=t;let g=(0,tQ.synchronizeBlocksWithTemplate)(m,t);(0,F3.default)(g,m)||(f(),d(e,g,m.length===0&&r&&g.length!==0&&u(e),c()))}),()=>{s=!0}},[t,o,e,n,r])}var rQ=l(Y(),1),nQ=l(z(),1);function iQ(e){return(0,nQ.useSelect)(t=>{let o=t(x).getBlock(e);if(!o)return;let r=t(rQ.store).getBlockType(o.name);if(r&&Object.keys(r.providesContext).length!==0)return Object.fromEntries(Object.entries(r.providesContext).map(([n,i])=>[n,o.attributes[i]]))},[e])}var qm=l(z(),1),KE=l(O(),1),YE=l(X(),1),cQ=l(N(),1),Wg=l(Y(),1);var z3=l(O(),1),si=l(Y(),1),Km=l(z(),1),sQ=l(Ve(),1);function j3(e){let t={srcRootClientId:null,srcClientIds:null,srcIndex:null,type:null,blocks:null};if(!e.dataTransfer)return t;try{t=Object.assign(t,JSON.parse(e.dataTransfer.getData("wp-blocks")))}catch{return t}return t}function JEe(e,t,o,r,n,i,s,a,c){return u=>{let{srcRootClientId:d,srcClientIds:f,type:m,blocks:h}=j3(u);if(m==="inserter"){s();let p=h.map(g=>(0,si.cloneBlock)(g));i(p,!0,null)}if(m==="block"){let p=o(f[0]);if(d===e&&p===t||f.includes(e)||r(f).some(v=>v===e))return;if(a==="group"){let v=f.map(y=>c(y));i(v,!0,null,f);return}let g=d===e,b=f.length,k=g&&p<t?t-b:t;n(f,d,k)}}}function eTe(e,t,o,r,n){return i=>{if(!t().mediaUpload)return;let s=(0,si.findTransform)((0,si.getBlockTransforms)("from"),a=>a.type==="files"&&r(a.blockName,e)&&a.isMatch(i));if(s){let a=s.transform(i,o);n(a)}}}function tTe(e){return t=>{let o=(0,si.pasteHandler)({HTML:t,mode:"BLOCKS"});o.length&&e(o)}}function WE(e,t,o={}){let{operation:r="insert",nearestSide:n="right"}=o,{canInsertBlockType:i,getBlockIndex:s,getClientIdsOfDescendants:a,getBlockOrder:c,getBlocksByClientId:u,getSettings:d,getBlock:f}=(0,Km.useSelect)(x),{getGroupingBlockName:m}=(0,Km.useSelect)(si.store),{insertBlocks:h,moveBlocksToPosition:p,updateBlockAttributes:g,clearSelectedBlock:b,replaceBlocks:k,removeBlocks:v}=(0,Km.useDispatch)(x),y=(0,Km.useRegistry)(),_=(0,z3.useCallback)((T,E=!0,L=0,I=[])=>{Array.isArray(T)||(T=[T]);let V=c(e)[t];if(r==="replace")k(V,T,void 0,L);else if(r==="group"){let j=f(V);n==="left"?T.push(j):T.unshift(j);let H=T.map(W=>(0,si.createBlock)(W.name,W.attributes,W.innerBlocks)),F=T.every(W=>W.name==="core/image"),U=i("core/gallery",e),G=(0,si.createBlock)(F&&U?"core/gallery":m(),{layout:{type:"flex",flexWrap:F&&U?null:"nowrap"}},H);k([V,...I],G,void 0,L)}else h(T,t,e,E,L)},[c,e,t,r,k,f,n,i,m,h]),S=(0,z3.useCallback)((T,E,L)=>{if(r==="replace"){let I=u(T),V=c(e)[t];y.batch(()=>{v(T,!1),k(V,I,void 0,0)})}else p(T,E,e,L)},[r,c,u,p,y,v,k,t,e]),C=JEe(e,t,s,a,S,_,b,r,f),B=eTe(e,d,g,i,_),P=tTe(_);return T=>{let E=(0,sQ.getFilesFromDataTransfer)(T.dataTransfer),L=T.dataTransfer.getData("text/html");L?P(L):E.length?B(E):C(T)}}function oTe(e,t,o){let r=o==="top"||o==="bottom",{x:n,y:i}=e,s=r?n:i,a=r?i:n,c=r?t.left:t.top,u=r?t.right:t.bottom,d=t[o],f;return s>=c&&s<=u?f=s:s<u?f=c:f=u,Math.sqrt((s-f)**2+(a-d)**2)}function Ym(e,t,o=["top","bottom","left","right"]){let r,n;return o.forEach(i=>{let s=oTe(e,t,i);(r===void 0||s<r)&&(r=s,n=i)}),[r,n]}function $E(e,t){return t.left<=e.x&&t.right>=e.x&&t.top<=e.y&&t.bottom>=e.y}function aQ(e,t){return t.top<=e.y&&t.bottom>=e.y}var U3=30,rTe=120,nTe=120;function iTe(e,t,o="vertical",r={}){let n=o==="horizontal"?["left","right"]:["top","bottom"],i=0,s="before",a=1/0,c=null,u="right",{dropZoneElement:d,parentBlockOrientation:f,rootBlockIndex:m=0}=r;if(d&&f!=="horizontal"){let k=d.getBoundingClientRect(),[v,y]=Ym(t,k,["top","bottom"]);if(k.height>rTe&&v<U3){if(y==="top")return[m,"before"];if(y==="bottom")return[m+1,"after"]}}let h=(0,cQ.isRTL)();if(d&&f==="horizontal"){let k=d.getBoundingClientRect(),[v,y]=Ym(t,k,["left","right"]);if(k.width>nTe&&v<U3){if(h&&y==="right"||!h&&y==="left")return[m,"before"];if(h&&y==="left"||!h&&y==="right")return[m+1,"after"]}}e.forEach(({isUnmodifiedDefaultBlock:k,getBoundingClientRect:v,blockIndex:y,blockOrientation:_})=>{let S=v();if(!S)return;let[C,B]=Ym(t,S,n),[P,T]=Ym(t,S,["left","right"]),E=$E(t,S);k&&E?C=0:o==="vertical"&&_!=="horizontal"&&(E&&P<U3||!E&&aQ(t,S))&&(c=y,u=T),C<a&&(s=B==="bottom"||!h&&B==="right"||h&&B==="left"?"after":"before",a=C,i=y)});let p=i+(s==="after"?1:-1),g=!!e[i]?.isUnmodifiedDefaultBlock,b=!!e[p]?.isUnmodifiedDefaultBlock;return c!==null?[c,"group",u]:!g&&!b?[s==="after"?i+1:i,"insert"]:[g?i:p,"replace"]}function qE(e,t,o,r){let n=!0;if(t){let a=t?.map(({name:c})=>c);n=o.every(c=>a?.includes(c))}let s=o.map(a=>e(a)).every(a=>{let[c]=a?.parent||[];return c?c===r:!0});return n&&s}function lQ(e,t){let{defaultView:o}=t;return!!(o&&e instanceof o.HTMLElement&&e.closest("[data-is-insertion-point]"))}function uQ({dropZoneElement:e,rootClientId:t="",parentClientId:o="",isDisabled:r=!1}={}){let n=(0,qm.useRegistry)(),[i,s]=(0,KE.useState)({index:null,operation:"insert"}),{getBlockType:a,getBlockVariations:c,getGroupingBlockName:u}=(0,qm.useSelect)(Wg.store),{canInsertBlockType:d,getBlockListSettings:f,getBlocks:m,getBlockIndex:h,getDraggedBlockClientIds:p,getBlockNamesByClientId:g,getAllowedBlocks:b,isDragging:k,isGroupable:v,isZoomOut:y,getSectionRootClientId:_,getBlockParents:S}=M((0,qm.useSelect)(x)),{showInsertionPoint:C,hideInsertionPoint:B,startDragging:P,stopDragging:T}=M((0,qm.useDispatch)(x)),E=WE(i.operation==="before"||i.operation==="after"?o:t,i.index,{operation:i.operation,nearestSide:i.nearestSide}),L=(0,YE.useThrottle)((0,KE.useCallback)((I,R)=>{k()||P();let V=p(),j=[t,...S(t,!0)];if(V.some(te=>j.includes(te)))return;let F=b(t),U=g([t])[0],G=g(V);if(!qE(a,F,G,U))return;let J=_();if(y()&&J!==t)return;let le=m(t).filter(te=>!((0,Wg.hasBlockSupport)(te.name,"visibility",!0)&&te.attributes?.metadata?.blockVisibility===!1));if(le.length===0){n.batch(()=>{s({index:0,operation:"insert"}),C(t,0,{operation:"insert"})});return}let oe=le.map(te=>{let ne=te.clientId;return{isUnmodifiedDefaultBlock:(0,Wg.isUnmodifiedDefaultBlock)(te),getBoundingClientRect:()=>{let q=R.getElementById(`block-${ne}`);return q?q.getBoundingClientRect():null},blockIndex:h(ne),blockOrientation:f(ne)?.orientation}}),re=iTe(oe,{x:I.clientX,y:I.clientY},f(t)?.orientation,{dropZoneElement:e,parentBlockClientId:o,parentBlockOrientation:o?f(o)?.orientation:void 0,rootBlockIndex:h(t)}),[Q,$,ee]=re,K=oe[Q]?.isUnmodifiedDefaultBlock;if(!(y()&&!K&&$!=="insert")){if($==="group"){let te=le[Q],ne=[te.name,...G].every(xe=>xe==="core/image"),q=d("core/gallery",t),se=v([te.clientId,p()]),he=c(u(),"block"),me=he&&he.find(({name:xe})=>xe==="group-row");if(ne&&!q&&(!se||!me)||!ne&&(!se||!me))return}n.batch(()=>{s({index:Q,operation:$,nearestSide:ee});let te=["before","after"].includes($)?o:t;C(te,Q,{operation:$,nearestSide:ee})})}},[k,b,t,g,p,a,_,y,m,f,e,o,h,n,P,C,d,v,c,u]),200);return(0,YE.__experimentalUseDropZone)({dropZoneElement:e,isDisabled:r,onDrop:E,onDragOver(I){L(I,I.currentTarget.ownerDocument)},onDragLeave(I){let{ownerDocument:R}=I.currentTarget;lQ(I.relatedTarget,R)||lQ(I.target,R)||(L.cancel(),B())},onDragEnd(){L.cancel(),T(),B()}})}var sc=l(w(),1),sTe={};function aTe({children:e,clientId:t}){let o=iQ(t);return(0,sc.jsx)(X0,{value:o,children:e})}var lTe=(0,$g.memo)(h_);function mQ(e){let{clientId:t,allowedBlocks:o,prioritizedInserterBlocks:r,defaultBlock:n,directInsert:i,__experimentalDefaultBlock:s,__experimentalDirectInsert:a,template:c,templateLock:u,wrapperRef:d,templateInsertUpdatesSelection:f,__experimentalCaptureToolbars:m,__experimentalAppenderTagName:h,renderAppender:p,orientation:g,placeholder:b,layout:k,name:v,blockType:y,parentLock:_,defaultLayout:S}=e;JX(t,_,o,r,n,i,s,a,u,m,g,k),oQ(t,c,u,f);let C=(0,Zm.getBlockSupport)(v,"layout")||(0,Zm.getBlockSupport)(v,"__experimentalLayout")||sTe,{allowSizingOnChildren:B=!1}=C,P=k||C,T=(0,$g.useMemo)(()=>({...S,...P,...B&&{allowSizingOnChildren:!0}}),[S,P,B]),E=(0,sc.jsx)(lTe,{rootClientId:t,renderAppender:p,__experimentalAppenderTagName:h,layout:T,wrapperRef:d,placeholder:b});return!y?.providesContext||Object.keys(y.providesContext).length===0?E:(0,sc.jsx)(aTe,{clientId:t,children:E})}function cTe(e){return pB(e),(0,sc.jsx)(mQ,{...e})}var ZE=(0,$g.forwardRef)((e,t)=>{let o=Xm({ref:t},e);return(0,sc.jsx)("div",{className:"block-editor-inner-blocks",children:(0,sc.jsx)("div",{...o})})});function Xm(e={},t={}){let{__unstableDisableLayoutClassNames:o,__unstableDisableDropZone:r,dropZoneElement:n}=t,{clientId:i,layout:s=null,__unstableLayoutClassNames:a=""}=Pe(),c=(0,fQ.useSelect)(_=>{let{getBlockName:S,isZoomOut:C,getTemplateLock:B,getBlockRootClientId:P,getBlockEditingMode:T,getBlockSettings:E,getSectionRootClientId:L}=M(_(x));if(!i){let G=L();return{isDropZoneDisabled:C()&&G!==""}}let{hasBlockSupport:I,getBlockType:R}=_(Zm.store),V=S(i),j=T(i),H=P(i),[F]=E(i,"layout"),U=j==="disabled";if(C()){let G=L();U=i!==G}return{__experimentalCaptureToolbars:I(V,"__experimentalExposeControlsToChildren",!1),name:V,blockType:R(V),parentLock:B(H),parentClientId:H,isDropZoneDisabled:U,defaultLayout:F}},[i]),{__experimentalCaptureToolbars:u,name:d,blockType:f,parentLock:m,parentClientId:h,isDropZoneDisabled:p,defaultLayout:g}=c,b=uQ({dropZoneElement:n,rootClientId:i,parentClientId:h}),k=(0,dQ.useMergeRefs)([e.ref,r||p||s?.isManualPlacement&&window.__experimentalEnableGridInteractivity?null:b]),v={__experimentalCaptureToolbars:u,layout:s,name:d,blockType:f,parentLock:m,defaultLayout:g,...t},y=v.value&&v.onChange?cTe:mQ;return{...e,ref:k,className:D(e.className,"block-editor-block-list__layout",o?"":a),children:i?(0,sc.jsx)(y,{...v,clientId:i}):(0,sc.jsx)(h_,{...t})}}Xm.save=Zm.__unstableGetInnerBlocksProps;ZE.DefaultBlockAppender=YX;ZE.ButtonBlockAppender=$X;ZE.Content=()=>Xm.save().children;var O_=ZE;var A_=l(X(),1),Kg=l(z(),1),H3=l(Ve(),1),Mr=l(ot(),1);var pQ=l(w(),1),uTe=new Set([Mr.UP,Mr.RIGHT,Mr.DOWN,Mr.LEFT,Mr.ENTER,Mr.BACKSPACE]);function dTe(e){let{keyCode:t,shiftKey:o}=e;return!o&&uTe.has(t)}function L_(){let e=(0,Kg.useSelect)(o=>o(x).isTyping(),[]),{stopTyping:t}=(0,Kg.useDispatch)(x);return(0,A_.useRefEffect)(o=>{if(!e)return;let{ownerDocument:r}=o,n,i;function s(a){let{clientX:c,clientY:u}=a;n&&i&&(n!==c||i!==u)&&t(),n=c,i=u}return r.addEventListener("mousemove",s),()=>{r.removeEventListener("mousemove",s)}},[e,t])}function N_(){let e=(0,Kg.useSelect)(i=>i(x).isTyping(),[]),{startTyping:t,stopTyping:o}=(0,Kg.useDispatch)(x),r=L_(),n=(0,A_.useRefEffect)(i=>{if(e){let d=function(p){let{target:g}=p;h=i.ownerDocument.defaultView.setTimeout(()=>{(0,H3.isTextField)(g)||o()})},f=function(p){let{keyCode:g}=p;(g===Mr.ESCAPE||g===Mr.TAB)&&o()},m=function(){i.ownerDocument.defaultView.getSelection().isCollapsed||o()};var s=d,a=f,c=m;let h;return i.addEventListener("focus",d),i.addEventListener("keydown",f),i.ownerDocument.addEventListener("selectionchange",m),()=>{i.ownerDocument.defaultView.clearTimeout(h),i.removeEventListener("focus",d),i.removeEventListener("keydown",f),i.ownerDocument.removeEventListener("selectionchange",m)}}function u(d){let{type:f,target:m}=d;!(0,H3.isTextField)(m)||!i.contains(m)||f==="keydown"&&!dTe(d)||t()}return i.addEventListener("keypress",u),i.addEventListener("keydown",u),()=>{i.removeEventListener("keypress",u),i.removeEventListener("keydown",u)}},[e,t,o]);return(0,A_.useMergeRefs)([r,n])}function fTe({children:e}){return(0,pQ.jsx)("div",{ref:N_(),children:e})}var hQ=fTe;var M_=l(A(),1),gQ=l(X(),1),bQ=l(z(),1),vQ=l(O(),1),kQ=l(N(),1);var XE=l(w(),1);function G3({clientId:e,rootClientId:t="",position:o="top"}){let[r,n]=(0,vQ.useState)(!1),{sectionRootClientId:i,sectionClientIds:s,insertionPoint:a,blockInsertionPointVisible:c,blockInsertionPoint:u,blocksBeingDragged:d}=(0,bQ.useSelect)(S=>{let{getInsertionPoint:C,getBlockOrder:B,getSectionRootClientId:P,isBlockInsertionPointVisible:T,getBlockInsertionPoint:E,getDraggedBlockClientIds:L}=M(S(x)),I=P(),R=B(I);return{sectionRootClientId:I,sectionClientIds:R,insertionPoint:C(),blockInsertionPoint:E(),blockInsertionPointVisible:T(),blocksBeingDragged:L()}},[]),f=(0,gQ.useReducedMotion)();if(!e)return;let m=!1;if(!(t===i&&s&&s.includes(e)))return null;let p=a?.index===0&&e===s[a.index],g=a&&a.hasOwnProperty("index")&&e===s[a.index-1];o==="top"&&(m=p||c&&u.index===0&&e===s[u.index]),o==="bottom"&&(m=g||c&&e===s[u.index-1]);let b=d[0],k=d.includes(e),v=s.indexOf(b),_=(v>0?s[v-1]:null)===e;return(k||_)&&(m=!1),(0,XE.jsx)(M_.__unstableAnimatePresence,{children:m&&(0,XE.jsx)(M_.__unstableMotion.div,{initial:{height:0},animate:{height:"calc(1 * var(--wp-block-editor-iframe-zoom-out-frame-size) / var(--wp-block-editor-iframe-zoom-out-scale)"},exit:{height:0},transition:{type:"tween",duration:f?0:.2,ease:[.6,0,.4,1]},className:D("block-editor-block-list__zoom-out-separator",{"is-dragged-over":r}),"data-is-insertion-point":"true",onDragOver:()=>n(!0),onDragLeave:()=>n(!1),children:(0,XE.jsx)(M_.__unstableMotion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0,transition:{delay:-.125}},transition:{ease:"linear",duration:.1,delay:.125},children:(0,kQ.__)("Drop pattern.")})})})}var on=l(w(),1),L1=(0,yd.createContext)();L1.displayName="IntersectionObserverContext";var QE=new WeakMap,mTe={trailing:!0};function pTe({className:e,...t}){let{isOutlineMode:o,isFocusMode:r,isPreviewMode:n,editedContentOnlySection:i}=(0,Ji.useSelect)(f=>{let{getSettings:m,isTyping:h,hasBlockSpotlight:p,getEditedContentOnlySection:g}=M(f(x)),{outlineMode:b,focusMode:k,isPreviewMode:v}=m();return{isOutlineMode:b&&!h(),isFocusMode:k||p(),isPreviewMode:v,editedContentOnlySection:g()}},[]),s=(0,Ji.useRegistry)(),{setBlockVisibility:a}=(0,Ji.useDispatch)(x),c=(0,JE.useDebounce)((0,yd.useCallback)(()=>{let f={};QE.get(s).forEach(([m,h])=>{f[m]=h}),a(f)},[s]),300,mTe),u=(0,yd.useMemo)(()=>{let{IntersectionObserver:f}=window;if(f)return new f(m=>{QE.get(s)||QE.set(s,[]);for(let h of m){let p=h.target.getAttribute("data-block");QE.get(s).push([p,h.isIntersecting])}c()})},[]),d=Xm({ref:(0,JE.useMergeRefs)([$m(),jX(),N_()]),className:D("is-root-container",e,{"is-outline-mode":o,"is-focus-mode":r,"is-preview-mode":n})},t);return(0,on.jsxs)(L1.Provider,{value:u,children:[(0,on.jsx)("div",{...d}),!!i&&(0,on.jsx)(hTe,{clientId:i})]})}function hTe({clientId:e}){let{stopEditingContentOnlySection:t}=M((0,Ji.useDispatch)(x)),o=(0,Ji.useSelect)(r=>{let{isBlockSelected:n,hasSelectedInnerBlock:i,getBlockSelectionStart:s}=r(x);return!s()||n(e)||i(e,!0)},[e]);return(0,yd.useEffect)(()=>{o||t()},[o,t]),null}function xg(e){return(0,on.jsx)(K0,{value:vA,children:(0,on.jsx)(pTe,{...e})})}var gTe=[],bTe=new Set;function vTe({placeholder:e,rootClientId:t,renderAppender:o,__experimentalAppenderTagName:r,layout:n=S5}){let i=o!==!1,s=!!o,{order:a,isZoomOut:c,selectedBlocks:u,visibleBlocks:d,shouldRenderAppender:f}=(0,Ji.useSelect)(m=>{let{getSettings:h,getBlockOrder:p,getSelectedBlockClientIds:g,__unstableGetVisibleBlocks:b,getTemplateLock:k,getBlockEditingMode:v,isSectionBlock:y,isContainerInsertableToInContentOnlyMode:_,getBlockName:S,isZoomOut:C,canInsertBlockType:B}=M(m(x)),P=p(t);if(h().isPreviewMode)return{order:P,selectedBlocks:gTe,visibleBlocks:bTe};let T=g(),E=T[0],L=!t&&!E&&(!P.length||!B((0,yQ.getDefaultBlockName)(),t)),I=!!(t&&E&&t===E),R=k(t);return{order:P,selectedBlocks:T,visibleBlocks:b(),isZoomOut:C(),shouldRenderAppender:(!y(t)||_(S(E),t))&&v(t)!=="disabled"&&(!R||R==="contentOnly")&&i&&!C()&&(s||I||L)}},[t,i,s]);return(0,on.jsxs)(U7,{value:n,children:[a.map(m=>(0,on.jsxs)(Ji.AsyncModeProvider,{value:!d.has(m)&&!u.includes(m),children:[c&&(0,on.jsx)(G3,{clientId:m,rootClientId:t,position:"top"}),(0,on.jsx)(GG,{rootClientId:t,clientId:m}),c&&(0,on.jsx)(G3,{clientId:m,rootClientId:t,position:"bottom"})]},m)),a.length<1&&e,f&&(0,on.jsx)(xX,{tagName:r,rootClientId:t,CustomAppender:o})]})}function h_(e){return(0,on.jsx)(Ji.AsyncModeProvider,{value:!1,children:(0,on.jsx)(vTe,{...e})})}var kb=l(z(),1),U4=l(Ve(),1),H4=l(A(),1),ioe=l(js(),1),xI=l(O(),1),yb=l(Y(),1),G4=l(ir(),1),_b=l(N(),1);var YQ=l(X(),1),qQ=l(z(),1),ZQ=l(Ve(),1),Ua=l(O(),1);var ai=l(N(),1),Jm=l(Y(),1),lT=l(A(),1),UQ=l(X(),1),HQ=l(z(),1),cT=l(O(),1);var V_=l(A(),1),CQ=l(Sy(),1),BQ=l(Re(),1),nT=l(O(),1);var Dr=l(A(),1),_Q=(0,Dr.createSlotFill)("InspectorControls"),kTe=(0,Dr.createSlotFill)("InspectorAdvancedControls"),yTe=(0,Dr.createSlotFill)("InspectorControlsBindings"),_Te=(0,Dr.createSlotFill)("InspectorControlsBackground"),STe=(0,Dr.createSlotFill)("InspectorControlsBorder"),xTe=(0,Dr.createSlotFill)("InspectorControlsColor"),wTe=(0,Dr.createSlotFill)("InspectorControlsFilter"),CTe=(0,Dr.createSlotFill)("InspectorControlsDimensions"),BTe=(0,Dr.createSlotFill)("InspectorControlsPosition"),ETe=(0,Dr.createSlotFill)("InspectorControlsTypography"),TTe=(0,Dr.createSlotFill)("InspectorControlsListView"),ITe=(0,Dr.createSlotFill)("InspectorControlsStyles"),PTe=(0,Dr.createSlotFill)("InspectorControlsEffects"),RTe=(0,Dr.createSlotFill)("InspectorControlsContent"),OTe={default:_Q,advanced:kTe,background:_Te,bindings:yTe,border:STe,color:xTe,content:RTe,dimensions:CTe,effects:PTe,filter:wTe,list:TTe,position:BTe,settings:_Q,styles:ITe,typography:ETe},es=OTe,D_=(0,Dr.createSlotFill)(Symbol("PrivateInspectorControlsAllowedBlocks"));var Yg=l(A(),1),tT=l(O(),1),SQ=l(X(),1),oT=l(z(),1);var eT=l(w(),1),xQ=Symbol("ListViewContentPopover"),{Fill:wQ,Slot:ATe}=(0,Yg.createSlotFill)(xQ);function LTe(){return(0,SQ.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:35,resize:!1}}}function rT({listViewRef:e}){let{popoverProps:t}=LTe(),o=(0,Yg.__experimentalUseSlotFills)(xQ),r=!!(o&&o.length),{selectedClientId:n,isOpen:i}=(0,oT.useSelect)(u=>{let{getSelectedBlockClientId:d}=u(x),f=M(u(x));return{selectedClientId:d(),isOpen:f.isListViewContentPanelOpen()}},[]),[s,a]=(0,tT.useState)(null);(0,tT.useLayoutEffect)(()=>{if(!n||!e?.current){a(null);return}let u=e.current.querySelector(`[data-block="${n}"]`);a(u)},[n,e]);let{closeListViewContentPanel:c}=M((0,oT.useDispatch)(x));return!i||!r||!s?null:(0,eT.jsx)(Yg.Popover,{...t??{},className:"block-editor-inspector-list-view-content-popover",anchor:s,onClose:c,children:(0,eT.jsx)("div",{style:{width:"280px"},children:(0,eT.jsx)(ATe,{})})})}var _d=l(w(),1),NTe=["content","list"],MTe=["default","settings","advanced"];function Qm({children:e,group:t="default",__experimentalGroup:o,resetAllFilter:r}){o&&((0,BQ.default)("`__experimentalGroup` property in `InspectorControlsFill`",{since:"6.2",version:"6.4",alternative:"`group`"}),t=o);let n=Pe(),i=es[t]?.Fill;if(!i)return(0,CQ.default)(`Unknown InspectorControls group "${t}" provided.`),null;if(n[lu]){let s=n.name==="core/template-part",a=MTe.includes(t),c=NTe.includes(t);if(!(s&&a||c))return null}return!n[lu]&&!n[Es]?null:t==="content"&&n[fk]&&n[lu]?n[Es]?(0,_d.jsx)(V_.__experimentalStyleProvider,{document,children:(0,_d.jsx)(wQ,{children:e})}):null:(0,_d.jsx)(V_.__experimentalStyleProvider,{document,children:(0,_d.jsx)(i,{children:s=>(0,_d.jsx)(VTe,{fillProps:s,children:e,resetAllFilter:r})})})}function DTe({resetAllFilter:e,children:t}){let{registerResetAllFilter:o,deregisterResetAllFilter:r}=(0,nT.useContext)(V_.__experimentalToolsPanelContext);return(0,nT.useEffect)(()=>{if(e&&o&&r)return o(e),()=>{r(e)}},[e,o,r]),t}function VTe({children:e,resetAllFilter:t,fillProps:o}){let{forwardedContext:r=[]}=o,n=(0,_d.jsx)(DTe,{resetAllFilter:t,children:e});return r.reduce((i,[s,a])=>(0,_d.jsx)(s,{...a,children:i}),n)}var LQ=l(A(),1),NQ=l(O(),1),MQ=l(Sy(),1),DQ=l(Re(),1);var TQ=l(A(),1),iT=l(z(),1),IQ=l(O(),1);var EQ=l(X(),1);function Vo(){return(0,EQ.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}}}function qg(e,t){if(!e||!t)return t;let o=e.split(","),r=t.split(","),n=[];return o.forEach(i=>{r.forEach(s=>{n.push(`${i.trim()} ${s.trim()}`)})}),n.join(", ")}var PQ=l(w(),1);function RQ({children:e,group:t,label:o}){let{updateBlockAttributes:r}=(0,iT.useDispatch)(x),{getBlockAttributes:n,getMultiSelectedBlockClientIds:i,getSelectedBlockClientId:s,hasMultiSelection:a}=(0,iT.useSelect)(x),c=Vo(),u=s(),d=(0,IQ.useCallback)((f=[])=>{let m={},h=a()?i():[u];h.forEach(p=>{let{style:g}=n(p),b={style:g};f.forEach(k=>{b={...b,...k(b)}}),b={...b,style:Le(b.style)},m[p]=b}),r(h,m,!0)},[n,i,a,u,r]);return(0,PQ.jsx)(TQ.__experimentalToolsPanel,{className:`${t}-block-support-panel`,label:o,resetAll:d,panelId:u,hasInnerWrapper:!0,shouldRenderPlaceholderItems:!0,__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last",dropdownMenuProps:c,children:e},u)}var W3=l(A(),1),sT=l(O(),1),OQ=l(w(),1);function AQ({Slot:e,fillProps:t,...o}){let r=(0,sT.useContext)(W3.__experimentalToolsPanelContext),n=(0,sT.useMemo)(()=>({...t??{},forwardedContext:[...t?.forwardedContext??[],[W3.__experimentalToolsPanelContext.Provider,{value:r}]]}),[r,t]);return(0,OQ.jsx)(e,{...o,fillProps:n,bubblesVirtually:!0})}var aT=l(w(),1);function FTe({__experimentalGroup:e,group:t="default",label:o,fillProps:r,...n},i){e&&((0,DQ.default)("`__experimentalGroup` property in `InspectorControlsSlot`",{since:"6.2",version:"6.4",alternative:"`group`"}),t=e);let s=es[t],a=(0,LQ.__experimentalUseSlotFills)(s?.name);if(!s)return(0,MQ.default)(`Unknown InspectorControls group "${t}" provided.`),null;if(!a?.length)return null;let{Slot:c}=s;return o?(0,aT.jsx)(RQ,{group:t,label:o,children:(0,aT.jsx)(AQ,{...n,fillProps:r,Slot:c})}):(0,aT.jsx)(c,{...n,ref:i,fillProps:r,bubblesVirtually:!0})}var $3=(0,NQ.forwardRef)(FTe);var K3=l(w(),1),VQ=Qm;VQ.Slot=$3;var Sd=e=>(0,K3.jsx)(Qm,{...e,group:"advanced"});Sd.Slot=function(t){return(0,K3.jsx)($3,{...t,group:"advanced"})};Sd.slotName="InspectorAdvancedControls";var fe=VQ;var zQ=l(z(),1),xd=l(Y(),1),F_=l(N(),1);function FQ(e){let t=e?.style?.position?.type;return t==="sticky"?(0,F_.__)("Sticky"):t==="fixed"?(0,F_.__)("Fixed"):null}function Pt(e){return(0,zQ.useSelect)(t=>{if(!e)return null;let{getBlockName:o,getBlockAttributes:r,__experimentalGetParsedPattern:n}=t(x),{getBlockType:i,getActiveBlockVariation:s}=t(xd.store),a=o(e),c=i(a);if(!c)return null;let u=r(e),d=u?.metadata?.patternName;if(d){let k=n(d),v=FQ(u);return{isSynced:!1,title:(0,F_.__)("Pattern"),icon:Ni,description:k?.description||(0,F_.__)("A block pattern."),anchor:u?.anchor,positionLabel:v,positionType:u?.style?.position?.type,name:k?.title||u?.metadata?.name}}let f=s(a,u),m=(0,xd.isReusableBlock)(c)||(0,xd.isTemplatePart)(c),p=(m?(0,xd.__experimentalGetBlockLabel)(c,u):void 0)||c.title,g=FQ(u),b={isSynced:m,title:p,icon:c.icon,description:c.description,anchor:u?.anchor,positionLabel:g,positionType:u?.style?.position?.type,name:u?.metadata?.name};return f?{isSynced:m,title:f.title||c.title,icon:f.icon||c.icon,description:f.description||c.description,anchor:u?.anchor,positionLabel:g,positionType:u?.style?.position?.type,name:u?.metadata?.name}:b},[e])}var z_=l(w(),1),j_="position",Y3={key:"default",value:"",name:(0,ai.__)("Default")},q3={key:"sticky",value:"sticky",name:(0,ai._x)("Sticky","Name for the value of the CSS position property"),hint:(0,ai.__)("The block will stick to the top of the window instead of scrolling.")},jQ={key:"fixed",value:"fixed",name:(0,ai._x)("Fixed","Name for the value of the CSS position property"),hint:(0,ai.__)("The block will not move when the page is scrolled.")},zTe=["top","right","bottom","left"],jTe=["sticky","fixed"];function UTe({selector:e,style:t}){let o="",{type:r}=t?.position||{};return jTe.includes(r)&&(o+=`${e} {`,o+=`position: ${r};`,zTe.forEach(n=>{t?.position?.[n]!==void 0&&(o+=`${n}: ${t.position[n]};`)}),(r==="sticky"||r==="fixed")&&(o+="z-index: 10"),o+="}"),o}function HTe(e){let t=(0,Jm.getBlockSupport)(e,j_);return!!(t===!0||t?.sticky)}function GTe(e){let t=(0,Jm.getBlockSupport)(e,j_);return!!(t===!0||t?.fixed)}function WTe(e){return!!(0,Jm.getBlockSupport)(e,j_)}function GQ(e){let t=e?.style?.position?.type;return t==="sticky"||t==="fixed"}function WQ({name:e}={}){let[t,o]=pe("position.fixed","position.sticky"),r=!t&&!o;return!WTe(e)||r}function $Te({style:e={},clientId:t,name:o,setAttributes:r}){let n=GTe(o),i=HTe(o),s=e?.position?.type,{firstParentClientId:a}=(0,HQ.useSelect)(h=>{let{getBlockParents:p}=h(x),g=p(t);return{firstParentClientId:g[g.length-1]}},[t]),c=Pt(a),u=i&&s===q3.value&&c?(0,ai.sprintf)((0,ai.__)("The block will stick to the scrollable area of the parent %s block."),c.title):null,d=(0,cT.useMemo)(()=>{let h=[Y3];return(i||s===q3.value)&&h.push(q3),(n||s===jQ.value)&&h.push(jQ),h},[n,i,s]),f=h=>{let g={...e,position:{...e?.position,type:h,top:h==="sticky"||h==="fixed"?"0px":void 0}};r({style:Le(g)})},m=s&&d.find(h=>h.value===s)||Y3;return cT.Platform.select({web:d.length>1?(0,z_.jsx)(fe,{group:"position",children:(0,z_.jsx)(lT.BaseControl,{help:u,children:(0,z_.jsx)(lT.CustomSelectControl,{__next40pxDefaultSize:!0,label:(0,ai.__)("Position"),hideLabelFromVision:!0,describedBy:(0,ai.sprintf)((0,ai.__)("Currently selected position: %s"),m.name),options:d,value:m,onChange:({selectedItem:h})=>{f(h.value)},size:"__unstable-large"})})}):null,native:null})}var Z3={edit:function(t){return WQ(t)?null:(0,z_.jsx)($Te,{...t})},useBlockProps:YTe,attributeKeys:["style"],hasSupport(e){return(0,Jm.hasBlockSupport)(e,j_)}},KTe={};function YTe({name:e,style:t}){let o=(0,Jm.hasBlockSupport)(e,j_),r=WQ({name:e}),n=o&&!r,i=(0,UQ.useInstanceId)(KTe),s=`.wp-container-${i}.wp-container-${i}`,a;n&&(a=UTe({selector:s,style:t})||"");let c=D({[`wp-container-${i}`]:n&&!!a,[`is-position-${t?.position?.type}`]:n&&!!a&&!!t?.position?.type});return li({css:a}),{className:c}}var XQ={placement:"top-start"},$Q={...XQ,flip:!1,shift:!0},qTe={...XQ,flip:!0,shift:!1};function KQ(e,t,o,r,n){if(!e||!t)return $Q;let i=o?.scrollTop||0,s=qh(t),a=e.getBoundingClientRect(),c=i+a.top,u=e.ownerDocument.documentElement.clientHeight,d=c+r,f=s.top>d,m=s.height>u-r;return!n&&(f||m)?$Q:qTe}function uT({contentElement:e,clientId:t}){let o=rt(t),[r,n]=(0,Ua.useState)(0),{blockIndex:i,isSticky:s}=(0,qQ.useSelect)(m=>{let{getBlockIndex:h,getBlockAttributes:p}=m(x);return{blockIndex:h(t),isSticky:GQ(p(t))}},[t]),a=(0,Ua.useMemo)(()=>{if(e)return(0,ZQ.getScrollContainer)(e)},[e]),[c,u]=(0,Ua.useState)(()=>KQ(e,o,a,r,s)),d=(0,YQ.useRefEffect)(m=>{n(m.offsetHeight)},[]),f=(0,Ua.useCallback)(()=>u(KQ(e,o,a,r,s)),[e,o,a,r]);return(0,Ua.useLayoutEffect)(f,[i,f]),(0,Ua.useLayoutEffect)(()=>{if(!e||!o)return;let m=e?.ownerDocument?.defaultView;m?.addEventHandler?.("resize",f);let h,p=o?.ownerDocument?.defaultView;return p.ResizeObserver&&(h=new p.ResizeObserver(f),h.observe(o)),()=>{m?.removeEventHandler?.("resize",f),h&&h.disconnect()}},[f,e,o]),{...c,ref:d}}var QQ=l(z(),1);function dT(e){return(0,QQ.useSelect)(o=>{let{getBlockRootClientId:r,getBlockParents:n,__experimentalGetBlockListSettingsForBlocks:i,isBlockInsertionPointVisible:s,getBlockInsertionPoint:a,getBlockOrder:c,hasMultiSelection:u,getLastMultiSelectedBlockClientId:d}=o(x),f=n(e),m=i(f),h=f.find(g=>m[g]?.__experimentalCaptureToolbars),p=!1;if(s()){let g=a();p=c(g.rootClientId)[g.index]===e}return{capturingClientId:h,isInsertionPointVisible:p,lastClientId:u()?d():null,rootClientId:r(e)}},[e])}var fT=l(w(),1);function JQ({clientId:e,__unstableContentRef:t}){let{capturingClientId:o,isInsertionPointVisible:r,lastClientId:n,rootClientId:i}=dT(e),s=uT({contentElement:t?.current,clientId:e});return(0,fT.jsx)(Qi,{clientId:o||e,bottomClientId:n,className:D("block-editor-block-list__block-side-inserter-popover",{"is-insertion-point-visible":r}),__unstableContentRef:t,...s,children:(0,fT.jsx)("div",{className:"block-editor-block-list__empty-block-inserter",children:(0,fT.jsx)(Xi,{position:"bottom right",rootClientId:i,clientId:e,__experimentalIsQuick:!0})})})}var Yte=l(z(),1),vb=l(O(),1),qte=l(js(),1);var Hte=l(N(),1),Gte=l(z(),1),V4=l(O(),1),Wte=l(X(),1),vc=l(Y(),1),$te=l(A(),1);var ep=l(A(),1),uJ=l(z(),1),dJ=l(N(),1);var nJ=l(Y(),1),iJ=l(A(),1),U_=l(z(),1),H_=l(O(),1),sJ=l(X(),1);var tJ=l(Ve(),1),Ha=l(O(),1),mT=50,oJ=25,ZTe=1e3,eJ=ZTe*(oJ/1e3);function rJ(){let e=(0,Ha.useRef)(null),t=(0,Ha.useRef)(null),o=(0,Ha.useRef)(null),r=(0,Ha.useRef)(null);(0,Ha.useEffect)(()=>()=>{r.current&&(clearInterval(r.current),r.current=null)},[]);let n=(0,Ha.useCallback)(a=>{e.current=a.clientY,o.current=(0,tJ.getScrollContainer)(a.target),r.current=setInterval(()=>{if(o.current&&t.current){let c=o.current.scrollTop+t.current;o.current.scroll({top:c})}},oJ)},[]),i=(0,Ha.useCallback)(a=>{if(!o.current)return;let c=o.current.offsetHeight,u=e.current-o.current.offsetTop,d=a.clientY-o.current.offsetTop;if(a.clientY>u){let f=Math.max(c-u-mT,0),m=Math.max(d-u-mT,0),h=f===0||m===0?0:m/f;t.current=eJ*h}else if(a.clientY<u){let f=Math.max(u-mT,0),m=Math.max(u-d-mT,0),h=f===0||m===0?0:m/f;t.current=-eJ*h}else t.current=0},[]);return[n,i,()=>{e.current=null,o.current=null,r.current&&(clearInterval(r.current),r.current=null)}]}var X3=l(w(),1),XTe=({appendToOwnerDocument:e,children:t,clientIds:o,cloneClassname:r,elementId:n,onDragStart:i,onDragEnd:s,fadeWhenDisabled:a=!1,dragComponent:c})=>{let{srcRootClientId:u,isDraggable:d,icon:f,visibleInserter:m,getBlockType:h}=(0,U_.useSelect)(E=>{let{canMoveBlocks:L,getBlockRootClientId:I,getBlockName:R,getBlockAttributes:V,isBlockInsertionPointVisible:j}=E(x),{getBlockType:H,getActiveBlockVariation:F}=E(nJ.store),U=I(o[0]),G=R(o[0]),W=F(G,V(o[0]));return{srcRootClientId:U,isDraggable:L(o),icon:W?.icon||H(G)?.icon,visibleInserter:j(),getBlockType:H}},[o]),p=(0,H_.useRef)(!1),[g,b,k]=rJ(),{getAllowedBlocks:v,getBlockNamesByClientId:y,getBlockRootClientId:_}=(0,U_.useSelect)(x),{startDraggingBlocks:S,stopDraggingBlocks:C}=(0,U_.useDispatch)(x);(0,H_.useEffect)(()=>()=>{p.current&&C()},[]);let P=rt(o[0])?.closest("body");return(0,H_.useEffect)(()=>{if(!P||!a)return;let L=(0,sJ.throttle)(I=>{if(!I.target.closest("[data-block]"))return;let R=y(o),V=I.target.closest("[data-block]").getAttribute("data-block"),j=v(V),H=y([V])[0],F;if(j?.length===0){let U=_(V),G=y([U])[0],W=v(U);F=qE(h,W,R,G)}else F=qE(h,j,R,H);!F&&!m?window?.document?.body?.classList?.add("block-draggable-invalid-drag-token"):window?.document?.body?.classList?.remove("block-draggable-invalid-drag-token")},200);return P.addEventListener("dragover",L),()=>{P.removeEventListener("dragover",L)}},[o,P,a,v,y,_,h,m]),d?(0,X3.jsx)(iJ.Draggable,{appendToOwnerDocument:e,cloneClassname:r,__experimentalTransferDataType:"wp-blocks",transferData:{type:"block",srcClientIds:o,srcRootClientId:u},onDragStart:E=>{window.requestAnimationFrame(()=>{S(o),p.current=!0,g(E),i&&i()})},onDragOver:b,onDragEnd:()=>{C(),p.current=!1,k(),s&&s()},__experimentalDragComponent:c!==void 0?c:(0,X3.jsx)(tE,{count:o.length,icon:f,fadeWhenDisabled:!0}),elementId:n,children:({onDraggableStart:E,onDraggableEnd:L})=>t({draggable:!0,onDragStart:E,onDragEnd:L})}):t({draggable:!1})},pT=XTe;var lJ=l(Y(),1),cJ=l(A(),1);var hT=l(X(),1),gT=l(z(),1),Zg=l(O(),1),ts=l(N(),1),Q3=l(ot(),1);var ye=l(N(),1),wd=(e,t)=>e==="up"?t==="horizontal"?(0,ye.isRTL)()?"right":"left":"up":e==="down"?t==="horizontal"?(0,ye.isRTL)()?"left":"right":"down":null;function aJ(e,t,o,r,n,i,s){let a=o+1;if(e>1)return QTe(e,o,r,n,i,s);if(r&&n)return(0,ye.sprintf)((0,ye.__)("Block %s is the only block, and cannot be moved"),t);if(i>0&&!n){let c=wd("down",s);if(c==="down")return(0,ye.sprintf)((0,ye.__)("Move %1$s block from position %2$d down to position %3$d"),t,a,a+1);if(c==="left")return(0,ye.sprintf)((0,ye.__)("Move %1$s block from position %2$d left to position %3$d"),t,a,a+1);if(c==="right")return(0,ye.sprintf)((0,ye.__)("Move %1$s block from position %2$d right to position %3$d"),t,a,a+1)}if(i>0&&n){let c=wd("down",s);if(c==="down")return(0,ye.sprintf)((0,ye.__)("Block %1$s is at the end of the content and can\u2019t be moved down"),t);if(c==="left")return(0,ye.sprintf)((0,ye.__)("Block %1$s is at the end of the content and can\u2019t be moved left"),t);if(c==="right")return(0,ye.sprintf)((0,ye.__)("Block %1$s is at the end of the content and can\u2019t be moved right"),t)}if(i<0&&!r){let c=wd("up",s);if(c==="up")return(0,ye.sprintf)((0,ye.__)("Move %1$s block from position %2$d up to position %3$d"),t,a,a-1);if(c==="left")return(0,ye.sprintf)((0,ye.__)("Move %1$s block from position %2$d left to position %3$d"),t,a,a-1);if(c==="right")return(0,ye.sprintf)((0,ye.__)("Move %1$s block from position %2$d right to position %3$d"),t,a,a-1)}if(i<0&&r){let c=wd("up",s);if(c==="up")return(0,ye.sprintf)((0,ye.__)("Block %1$s is at the beginning of the content and can\u2019t be moved up"),t);if(c==="left")return(0,ye.sprintf)((0,ye.__)("Block %1$s is at the beginning of the content and can\u2019t be moved left"),t);if(c==="right")return(0,ye.sprintf)((0,ye.__)("Block %1$s is at the beginning of the content and can\u2019t be moved right"),t)}}function QTe(e,t,o,r,n,i){let s=t+1;if(o&&r)return(0,ye.__)("All blocks are selected, and cannot be moved");if(n>0&&!r){let a=wd("down",i);if(a==="down")return(0,ye.sprintf)((0,ye.__)("Move %1$d blocks from position %2$d down by one place"),e,s);if(a==="left")return(0,ye.sprintf)((0,ye.__)("Move %1$d blocks from position %2$d left by one place"),e,s);if(a==="right")return(0,ye.sprintf)((0,ye.__)("Move %1$d blocks from position %2$d right by one place"),e,s)}if(n>0&&r){let a=wd("down",i);if(a==="down")return(0,ye.__)("Blocks cannot be moved down as they are already at the bottom");if(a==="left")return(0,ye.__)("Blocks cannot be moved left as they are already are at the leftmost position");if(a==="right")return(0,ye.__)("Blocks cannot be moved right as they are already are at the rightmost position")}if(n<0&&!o){let a=wd("up",i);if(a==="up")return(0,ye.sprintf)((0,ye.__)("Move %1$d blocks from position %2$d up by one place"),e,s);if(a==="left")return(0,ye.sprintf)((0,ye.__)("Move %1$d blocks from position %2$d left by one place"),e,s);if(a==="right")return(0,ye.sprintf)((0,ye.__)("Move %1$d blocks from position %2$d right by one place"),e,s)}if(n<0&&o){let a=wd("up",i);if(a==="up")return(0,ye.__)("Blocks cannot be moved up as they are already at the top");if(a==="left")return(0,ye.__)("Blocks cannot be moved left as they are already are at the leftmost position");if(a==="right")return(0,ye.__)("Blocks cannot be moved right as they are already are at the rightmost position")}}var ac=l(w(),1),JTe=(e,t)=>e==="up"?t==="horizontal"?(0,ts.isRTL)()?Go:Kr:Yf:e==="down"?t==="horizontal"?(0,ts.isRTL)()?Kr:Go:vr:null,eIe=(e,t)=>e==="up"?t==="horizontal"?(0,ts.isRTL)()?(0,ts.__)("Move right"):(0,ts.__)("Move left"):(0,ts.__)("Move up"):e==="down"?t==="horizontal"?(0,ts.isRTL)()?(0,ts.__)("Move left"):(0,ts.__)("Move right"):(0,ts.__)("Move down"):null,J3=(0,Zg.forwardRef)(({clientIds:e,direction:t,orientation:o,...r},n)=>{let i=(0,hT.useInstanceId)(J3),s=(0,Zg.useMemo)(()=>Array.isArray(e)?e:[e],[e]),a=s.length,c=(0,hT.useViewportMatch)("small","<"),{blockType:u,isDisabled:d,rootClientId:f,isFirst:m,isLast:h,firstIndex:p,orientation:g="vertical"}=(0,gT.useSelect)(S=>{let{getBlockIndex:C,getBlockRootClientId:B,getBlockOrder:P,getBlock:T,getBlockListSettings:E}=S(x),L=s[0],I=B(L),R=C(L),V=C(s[s.length-1]),j=P(I),H=T(L),F=R===0,U=V===j.length-1,{orientation:G}=E(I)||{};return{blockType:H?(0,lJ.getBlockType)(H.name):null,isDisabled:t==="up"?F:U,rootClientId:I,firstIndex:R,isFirst:F,isLast:U,orientation:o||G}},[t,o,s]),{moveBlocksDown:b,moveBlocksUp:k}=(0,gT.useDispatch)(x),v=t==="up"?k:b,y=S=>{v(e,f),r.onClick&&r.onClick(S)},_=`block-editor-block-mover-button__description-${i}`;return(0,ac.jsxs)(ac.Fragment,{children:[(0,ac.jsx)(cJ.Button,{__next40pxDefaultSize:!0,ref:n,className:D("block-editor-block-mover-button",`is-${t}-button`),icon:JTe(t,g),label:eIe(t,g),tooltipPosition:!c&&t==="down"&&g==="vertical"?"bottom":"top","aria-describedby":_,...r,onClick:d?null:y,disabled:d,accessibleWhenDisabled:!0,shortcut:t==="up"?Q3.displayShortcut.secondary("t"):Q3.displayShortcut.secondary("y")}),(0,ac.jsx)(Ge,{id:_,children:aJ(a,u&&u.title,p,m,h,t==="up"?-1:1,g)})]})}),bT=(0,Zg.forwardRef)((e,t)=>(0,ac.jsx)(J3,{direction:"up",ref:t,...e})),vT=(0,Zg.forwardRef)((e,t)=>(0,ac.jsx)(J3,{direction:"down",ref:t,...e}));var Ga=l(w(),1);function tIe({clientIds:e,hideDragHandle:t}){let{canMove:o,rootClientId:r,isFirst:n,isLast:i,orientation:s,isManualGrid:a}=(0,uJ.useSelect)(c=>{let{getBlockIndex:u,getBlockListSettings:d,canMoveBlocks:f,getBlockOrder:m,getBlockRootClientId:h,getBlockAttributes:p}=c(x),g=Array.isArray(e)?e:[e],b=g[0],k=h(b),v=u(b),y=u(g[g.length-1]),_=m(k),{layout:S={}}=p(k)??{};return{canMove:f(e),rootClientId:k,isFirst:v===0,isLast:y===_.length-1,orientation:d(k)?.orientation,isManualGrid:S.type==="grid"&&S.isManualPlacement&&window.__experimentalEnableGridInteractivity}},[e]);return!o||n&&i&&!r||t&&a?null:(0,Ga.jsxs)(ep.ToolbarGroup,{className:D("block-editor-block-mover",{"is-horizontal":s==="horizontal"}),children:[!t&&(0,Ga.jsx)(pT,{clientIds:e,fadeWhenDisabled:!0,children:c=>(0,Ga.jsx)(ep.Button,{__next40pxDefaultSize:!0,icon:Ck,className:"block-editor-block-mover__drag-handle",label:(0,dJ.__)("Drag"),tabIndex:"-1",...c})}),!a&&(0,Ga.jsxs)("div",{className:"block-editor-block-mover__move-button-container",children:[(0,Ga.jsx)(ep.ToolbarItem,{children:c=>(0,Ga.jsx)(bT,{clientIds:e,...c})}),(0,Ga.jsx)(ep.ToolbarItem,{children:c=>(0,Ga.jsx)(vT,{clientIds:e,...c})})]})]})}var kT=tIe;var pJ=l(A(),1),_T=l(z(),1),ST=l(N(),1),hJ=l(O(),1);var G_=l(z(),1),Cd=l(O(),1);var{clearTimeout:fJ,setTimeout:oIe}=window,mJ=200;function rIe({ref:e,isFocused:t,highlightParent:o,debounceTimeout:r=mJ}){let{getSelectedBlockClientId:n,getBlockRootClientId:i}=(0,G_.useSelect)(x),{toggleBlockHighlight:s}=(0,G_.useDispatch)(x),a=(0,Cd.useRef)(),c=(0,G_.useSelect)(g=>g(x).getSettings().isDistractionFree,[]),u=g=>{if(g&&c)return;let b=n(),k=o?i(b):b;s(k,g)},d=()=>e?.current&&e.current.matches(":hover"),f=()=>{let g=d();return!t&&!g},m=()=>{let g=a.current;g&&fJ&&fJ(g)},h=g=>{g&&g.stopPropagation(),m(),u(!0)},p=g=>{g&&g.stopPropagation(),m(),a.current=oIe(()=>{f()&&u(!1)},r)};return(0,Cd.useEffect)(()=>()=>{u(!1),m()},[]),{debouncedShowGestures:h,debouncedHideGestures:p}}function Xg({ref:e,highlightParent:t=!1,debounceTimeout:o=mJ}){let[r,n]=(0,Cd.useState)(!1),{debouncedShowGestures:i,debouncedHideGestures:s}=rIe({ref:e,debounceTimeout:o,isFocused:r,highlightParent:t}),a=(0,Cd.useRef)(!1),c=()=>e?.current&&e.current.contains(e.current.ownerDocument.activeElement);return(0,Cd.useEffect)(()=>{let u=e.current,d=()=>{c()&&(n(!0),i())},f=()=>{c()||(n(!1),s())};return u&&!a.current&&(u.addEventListener("focus",d,!0),u.addEventListener("blur",f,!0),a.current=!0),()=>{u&&(u.removeEventListener("focus",d),u.removeEventListener("blur",f))}},[e,a,n,i,s]),{onMouseMove:i,onMouseLeave:s}}var yT=l(w(),1);function gJ(){let{selectBlock:e}=(0,_T.useDispatch)(x),{parentClientId:t}=(0,_T.useSelect)(i=>{let{getBlockParents:s,getSelectedBlockClientId:a,getParentSectionBlock:c}=M(i(x)),u=a(),d=c(u),f=s(u);return{parentClientId:d??f[f.length-1]}},[]),o=Pt(t),r=(0,hJ.useRef)(),n=Xg({ref:r,highlightParent:!0});return(0,yT.jsx)("div",{className:"block-editor-block-parent-selector",ref:r,...n,children:(0,yT.jsx)(pJ.ToolbarButton,{className:"block-editor-block-parent-selector__button",onClick:()=>e(t),label:(0,ST.sprintf)((0,ST.__)("Select parent block: %s"),o?.title),showTooltip:!0,icon:(0,yT.jsx)(Ae,{icon:o?.icon})})},t)}var xT=l(A(),1);var Qg=l(A(),1),nIe=(0,Qg.createSlotFill)("BlockControls"),iIe=(0,Qg.createSlotFill)("BlockControlsBlock"),sIe=(0,Qg.createSlotFill)("BlockFormatControls"),aIe=(0,Qg.createSlotFill)("BlockControlsOther"),lIe=(0,Qg.createSlotFill)("BlockControlsParent"),cIe={default:nIe,block:iIe,inline:sIe,other:aIe,parent:lIe},W_=cIe;function bJ(e,t){let o=Pe();return o[Es]?W_[e]?.Fill:o[nh]&&t?W_.parent.Fill:null}var lc=l(w(),1);function e4({group:e="default",controls:t,children:o,__experimentalShareWithChildBlocks:r=!1}){let n=bJ(e,r);if(!n)return null;let i=(0,lc.jsxs)(lc.Fragment,{children:[e==="default"&&(0,lc.jsx)(xT.ToolbarGroup,{controls:t}),o]});return(0,lc.jsx)(xT.__experimentalStyleProvider,{document,children:(0,lc.jsx)(n,{children:s=>{let{forwardedContext:a=[]}=s;return a.reduce((c,[u,d])=>(0,lc.jsx)(u,{...d,children:c}),i)}})})}var $_=l(O(),1),cc=l(A(),1),kJ=l(Sy(),1);var t4=l(w(),1),{ComponentsContext:vJ}=M(cc.privateApis);function o4({group:e="default",...t}){let o=(0,$_.useContext)(cc.__experimentalToolbarContext),r=(0,$_.useContext)(vJ),n=(0,$_.useMemo)(()=>({forwardedContext:[[cc.__experimentalToolbarContext.Provider,{value:o}],[vJ.Provider,{value:r}]]}),[o,r]),i=W_[e],s=(0,cc.__experimentalUseSlotFills)(i.name);if(!i)return(0,kJ.default)(`Unknown BlockControls group "${e}" provided.`),null;if(!s?.length)return null;let{Slot:a}=i,c=(0,t4.jsx)(a,{...t,bubblesVirtually:!0,fillProps:n});return e==="default"?c:(0,t4.jsx)(cc.ToolbarGroup,{children:c})}var r4=l(w(),1),yJ=e4;yJ.Slot=o4;var n4=e=>(0,r4.jsx)(e4,{group:"inline",...e});n4.Slot=function(t){return(0,r4.jsx)(o4,{group:"inline",...t})};var Ut=yJ;var _J=l(A(),1),{Fill:SJ,Slot:uIe}=(0,_J.createSlotFill)("__unstableBlockToolbarLastItem");SJ.Slot=uIe;var wT=SJ;var GT=l(A(),1);var rb=l(Y(),1),rn=l(A(),1),Td=l(z(),1);var UT=l(O(),1),rs=l(N(),1),wee=l(js(),1),fc=l(X(),1);var eb=l(z(),1),Bd=l(Y(),1);var FJ=l(O(),1),Y_=l(Y(),1),K_=l(z(),1),zJ=l(Xn(),1),uc=l(N(),1);var ci=l(Y(),1),xJ=l(O(),1),dIe="align";var wJ="__experimentalBorder",CT="color",fIe="customClassName",CJ="typography.__experimentalFontFamily",BJ="typography.fontSize",mIe="typography.lineHeight",pIe="typography.__experimentalFontStyle",hIe="typography.__experimentalFontWeight",EJ="typography.textAlign",gIe="typography.textColumns",bIe="typography.__experimentalTextDecoration",vIe="typography.__experimentalWritingMode",kIe="typography.__experimentalTextTransform",yIe="typography.__experimentalLetterSpacing",_Ie="layout",SIe=[mIe,BJ,pIe,hIe,CJ,EJ,gIe,bIe,kIe,vIe,yIe],xIe=["shadow"],wIe="spacing",CIe=[...xIe,...SIe,wJ,CT,wIe],TJ=e=>(0,ci.hasBlockSupport)(e,dIe);function IJ(e,t="any"){if(xJ.Platform.OS!=="web")return!1;let o=(0,ci.getBlockSupport)(e,wJ);return o===!0?!0:t==="any"?!!(o?.color||o?.radius||o?.width||o?.style):!!o?.[t]}var PJ=e=>{let t=(0,ci.getBlockSupport)(e,CT);return t!==null&&typeof t=="object"&&!!t.gradients},RJ=e=>{let t=(0,ci.getBlockSupport)(e,CT);return t&&t.background!==!1},OJ=e=>(0,ci.hasBlockSupport)(e,EJ);var AJ=e=>{let t=(0,ci.getBlockSupport)(e,CT);return t&&t.text!==!1};var LJ=e=>(0,ci.hasBlockSupport)(e,fIe,!0);var NJ=e=>(0,ci.hasBlockSupport)(e,CJ);var MJ=e=>(0,ci.hasBlockSupport)(e,BJ);var DJ=e=>(0,ci.hasBlockSupport)(e,_Ie);var VJ=e=>CIe.some(t=>(0,ci.hasBlockSupport)(e,t));function BIe(e){try{let t=(0,Y_.parse)(e,{__unstableSkipMigrationLogs:!0,__unstableSkipAutop:!0});return!(t.length===1&&t[0].name==="core/freeform")}catch{return!1}}var EIe={align:TJ,borderColor:e=>IJ(e,"color"),backgroundColor:RJ,textAlign:OJ,textColor:AJ,gradient:PJ,className:LJ,fontFamily:NJ,fontSize:MJ,layout:DJ,style:VJ};function TIe(e,t){return Object.entries(EIe).reduce((o,[r,n])=>(n(e.name)&&n(t.name)&&(o[r]=e.attributes[r]),o),{})}function i4(e,t,o){for(let r=0;r<Math.min(t.length,e.length);r+=1)o(e[r].clientId,TIe(t[r],e[r])),i4(e[r].innerBlocks,t[r].innerBlocks,o)}function Jg(){let e=(0,K_.useRegistry)(),{updateBlockAttributes:t}=(0,K_.useDispatch)(x),{createSuccessNotice:o,createWarningNotice:r,createErrorNotice:n}=(0,K_.useDispatch)(zJ.store);return(0,FJ.useCallback)(async i=>{let s="";try{if(!window.navigator.clipboard){n((0,uc.__)("Unable to paste styles. This feature is only available on secure (https) sites in supporting browsers."),{type:"snackbar"});return}s=await window.navigator.clipboard.readText()}catch{n((0,uc.__)("Unable to paste styles. Please allow browser clipboard permissions before continuing."),{type:"snackbar"});return}if(!s||!BIe(s)){r((0,uc.__)("Unable to paste styles. Block styles couldn't be found within the copied content."),{type:"snackbar"});return}let a=(0,Y_.parse)(s);if(a.length===1?e.batch(()=>{i4(i,i.map(()=>a[0]),t)}):e.batch(()=>{i4(i,a,t)}),i.length===1){let c=(0,Y_.getBlockType)(i[0].name)?.title;o((0,uc.sprintf)((0,uc.__)("Pasted styles to %s."),c),{type:"snackbar"})}else o((0,uc.sprintf)((0,uc.__)("Pasted styles to %d blocks."),i.length),{type:"snackbar"})},[e.batch,t,o,r,n])}function jJ({clientIds:e,children:t,__experimentalUpdateSelection:o}){let{getDefaultBlockName:r,getGroupingBlockName:n}=(0,eb.useSelect)(Bd.store),i=(0,eb.useSelect)(y=>{let{canInsertBlockType:_,getBlockRootClientId:S,getBlocksByClientId:C,getDirectInsertBlock:B,canRemoveBlocks:P}=y(x),T=C(e),E=S(e[0]),L=_(r(),E),I=E?B(E):null;return{canRemove:P(e),canInsertBlock:T.every(R=>(L||!!I)&&_(R.name,E)),canCopyStyles:T.every(R=>!!R&&((0,Bd.hasBlockSupport)(R.name,"color")||(0,Bd.hasBlockSupport)(R.name,"typography"))),canDuplicate:T.every(R=>!!R&&(0,Bd.hasBlockSupport)(R.name,"multiple",!0)&&_(R.name,E))}},[e,r]),{getBlocksByClientId:s,getBlocks:a}=(0,eb.useSelect)(x),{canRemove:c,canInsertBlock:u,canCopyStyles:d,canDuplicate:f}=i,{removeBlocks:m,replaceBlocks:h,duplicateBlocks:p,insertAfterBlock:g,insertBeforeBlock:b,flashBlock:k}=(0,eb.useDispatch)(x),v=Jg();return t({canCopyStyles:d,canDuplicate:f,canInsertBlock:u,canRemove:c,onDuplicate(){return p(e,o)},onRemove(){return m(e,o)},onInsertBefore(){b(e[0])},onInsertAfter(){g(e[e.length-1])},onGroup(){if(!e.length)return;let y=n(),_=(0,Bd.switchToBlockType)(s(e),y);_&&h(e,_)},onUngroup(){if(!e.length)return;let y=a(e[0]);y.length&&h(e,y)},onCopy(){e.length===1&&k(e[0])},async onPasteStyles(){await v(s(e))}})}var UJ=l(A(),1),IIe=(0,UJ.createSlotFill)(Symbol("NoteIconSlotFill")),BT=IIe;var HJ=l(N(),1),GJ=l(A(),1),ET=l(Y(),1),TT=l(z(),1);var WJ=l(w(),1);function PIe({clientId:e}){let t=(0,TT.useSelect)(r=>r(x).getBlock(e),[e]),{replaceBlocks:o}=(0,TT.useDispatch)(x);return!t||t.name!=="core/html"?null:(0,WJ.jsx)(GJ.MenuItem,{onClick:()=>o(e,(0,ET.rawHandler)({HTML:(0,ET.getBlockContent)(t)})),children:(0,HJ.__)("Convert to Blocks")})}var $J=PIe;var KJ=l(A(),1),{Fill:YJ,Slot:RIe}=(0,KJ.createSlotFill)("__unstableBlockSettingsMenuFirstItem");YJ.Slot=RIe;var IT=YJ;var ob=l(A(),1),gee=l(Y(),1),bee=l(z(),1);var a4=l(A(),1),l4=l(N(),1),XJ=l(Y(),1),OT=l(z(),1),QJ=l(ot(),1);var qJ=l(Y(),1),ZJ=l(z(),1);function q_(e){return(0,ZJ.useSelect)(t=>{let{getBlocksByClientId:o,getSelectedBlockClientIds:r,isUngroupable:n,isGroupable:i}=t(x),{getGroupingBlockName:s,getBlockType:a}=t(qJ.store),c=e?.length?e:r(),u=o(c),[d]=u,f=c.length===1&&n(c[0]);return{clientIds:c,isGroupable:i(c),isUngroupable:f,blocksSelection:u,groupingBlockName:s(),onUngroup:f&&a(d.name)?.transforms?.ungroup}},[e])}var PT=l(z(),1),RT=l(Y(),1),tp=l(A(),1);var Z_=l(N(),1);var op=l(w(),1),OIe={group:{type:"constrained"},row:{type:"flex",flexWrap:"nowrap"},stack:{type:"flex",orientation:"vertical"},grid:{type:"grid"}};function AIe(){let{blocksSelection:e,clientIds:t,groupingBlockName:o,isGroupable:r}=q_(),{replaceBlocks:n}=(0,PT.useDispatch)(x),{canRemove:i,variations:s}=(0,PT.useSelect)(p=>{let{canRemoveBlocks:g}=p(x),{getBlockVariations:b}=p(RT.store);return{canRemove:g(t),variations:b(o,"transform")}},[t,o]),a=p=>{let g=(0,RT.switchToBlockType)(e,o);typeof p!="string"&&(p="group"),g&&g.length>0&&(g[0].attributes.layout=OIe[p],n(t,g))},c=()=>a("row"),u=()=>a("stack"),d=()=>a("grid");if(!r||!i)return null;let f=!!s.find(({name:p})=>p==="group-row"),m=!!s.find(({name:p})=>p==="group-stack"),h=!!s.find(({name:p})=>p==="group-grid");return(0,op.jsxs)(tp.ToolbarGroup,{children:[(0,op.jsx)(tp.ToolbarButton,{icon:Tk,label:(0,Z_._x)("Group","action: convert blocks to group"),onClick:a}),f&&(0,op.jsx)(tp.ToolbarButton,{icon:JN,label:(0,Z_._x)("Row","action: convert blocks to row"),onClick:c}),m&&(0,op.jsx)(tp.ToolbarButton,{icon:pM,label:(0,Z_._x)("Stack","action: convert blocks to stack"),onClick:u}),h&&(0,op.jsx)(tp.ToolbarButton,{icon:Ek,label:(0,Z_._x)("Grid","action: convert blocks to grid"),onClick:d})]})}var s4=AIe;var rp=l(w(),1);function JJ({clientIds:e,isGroupable:t,isUngroupable:o,onUngroup:r,blocksSelection:n,groupingBlockName:i,onClose:s=()=>{}}){let{getSelectedBlockClientIds:a}=(0,OT.useSelect)(x),{replaceBlocks:c}=(0,OT.useDispatch)(x),u=()=>{let m=(0,XJ.switchToBlockType)(n,i);m&&c(e,m)},d=()=>{let m=n[0].innerBlocks;m.length&&(r&&(m=r(n[0].attributes,n[0].innerBlocks)),c(e,m))};if(!t&&!o)return null;let f=a();return(0,rp.jsxs)(rp.Fragment,{children:[t&&(0,rp.jsx)(a4.MenuItem,{shortcut:f.length>1?QJ.displayShortcut.primary("g"):void 0,onClick:()=>{u(),s()},children:(0,l4._x)("Group","verb")}),o&&(0,rp.jsx)(a4.MenuItem,{onClick:()=>{d(),s()},children:(0,l4._x)("Ungroup","Ungrouping blocks from within a grouping block back into individual blocks within the Editor")})]})}var c4=l(N(),1),oee=l(O(),1),ree=l(A(),1);var eee=l(z(),1);function ui(e){return(0,eee.useSelect)(t=>{let{canLockBlockType:o,getBlockName:r,isEditLockedBlock:n,isMoveLockedBlock:i,isRemoveLockedBlock:s,isLockedBlock:a}=M(t(x));return{isEditLocked:n(e),isMoveLocked:i(e),isRemoveLocked:s(e),canLock:o(r(e)),isLocked:a(e)}},[e])}var os=l(N(),1),X_=l(O(),1),Bo=l(A(),1);var AT=l(z(),1),tee=l(Y(),1);var Rt=l(w(),1),LIe=["core/navigation"];function NIe(e){return e.remove&&e.move?"all":e.remove&&!e.move?"insert":!1}function LT({clientId:e,onClose:t}){let[o,r]=(0,X_.useState)({move:!1,remove:!1}),{isEditLocked:n,isMoveLocked:i,isRemoveLocked:s}=ui(e),{allowsEditLocking:a,templateLock:c,hasTemplateLock:u}=(0,AT.useSelect)(k=>{let{getBlockName:v,getBlockAttributes:y}=k(x),_=v(e),S=(0,tee.getBlockType)(_);return{allowsEditLocking:LIe.includes(_),templateLock:y(e)?.templateLock,hasTemplateLock:!!S?.attributes?.templateLock}},[e]),[d,f]=(0,X_.useState)(!!c),{updateBlockAttributes:m}=(0,AT.useDispatch)(x),h=Pt(e);(0,X_.useEffect)(()=>{r({move:i,remove:s,...a?{edit:n}:{}})},[n,i,s,a]);let p=Object.values(o).every(Boolean),g=Object.values(o).some(Boolean)&&!p,b=o.move!==i||o.remove!==s||a&&o.edit!==n||u&&d!==!!c;return(0,Rt.jsx)(Bo.Modal,{title:(0,os.sprintf)((0,os.__)("Lock %s"),h.title),overlayClassName:"block-editor-block-lock-modal",onRequestClose:t,size:"small",children:(0,Rt.jsxs)("form",{onSubmit:k=>{k.preventDefault(),b&&(m([e],{lock:o,templateLock:d?NIe(o):void 0}),t())},children:[(0,Rt.jsxs)("fieldset",{className:"block-editor-block-lock-modal__options",children:[(0,Rt.jsx)("legend",{children:(0,os.__)("Select the features you want to lock")}),(0,Rt.jsx)("ul",{role:"list",className:"block-editor-block-lock-modal__checklist",children:(0,Rt.jsxs)("li",{children:[(0,Rt.jsx)(Bo.CheckboxControl,{className:"block-editor-block-lock-modal__options-all",label:(0,os.__)("Lock all"),checked:p,indeterminate:g,onChange:k=>r({move:k,remove:k,...a?{edit:k}:{}})}),(0,Rt.jsxs)("ul",{role:"list",className:"block-editor-block-lock-modal__checklist",children:[a&&(0,Rt.jsxs)("li",{className:"block-editor-block-lock-modal__checklist-item",children:[(0,Rt.jsx)(Bo.CheckboxControl,{label:(0,os.__)("Lock editing"),checked:!!o.edit,onChange:k=>r(v=>({...v,edit:k}))}),(0,Rt.jsx)(Bo.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:o.edit?om:Il})]}),(0,Rt.jsxs)("li",{className:"block-editor-block-lock-modal__checklist-item",children:[(0,Rt.jsx)(Bo.CheckboxControl,{label:(0,os.__)("Lock movement"),checked:o.move,onChange:k=>r(v=>({...v,move:k}))}),(0,Rt.jsx)(Bo.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:o.move?om:Il})]}),(0,Rt.jsxs)("li",{className:"block-editor-block-lock-modal__checklist-item",children:[(0,Rt.jsx)(Bo.CheckboxControl,{label:(0,os.__)("Lock removal"),checked:o.remove,onChange:k=>r(v=>({...v,remove:k}))}),(0,Rt.jsx)(Bo.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:o.remove?om:Il})]})]})]})}),u&&(0,Rt.jsx)(Bo.ToggleControl,{className:"block-editor-block-lock-modal__template-lock",label:(0,os.__)("Apply to all blocks inside"),checked:d,disabled:o.move&&!o.remove,onChange:()=>f(!d)})]}),(0,Rt.jsxs)(Bo.Flex,{className:"block-editor-block-lock-modal__actions",justify:"flex-end",expanded:!1,children:[(0,Rt.jsx)(Bo.FlexItem,{children:(0,Rt.jsx)(Bo.Button,{variant:"tertiary",onClick:t,__next40pxDefaultSize:!0,children:(0,os.__)("Cancel")})}),(0,Rt.jsx)(Bo.FlexItem,{children:(0,Rt.jsx)(Bo.Button,{variant:"primary",type:"submit",disabled:!b,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,os.__)("Apply")})})]})]})})}var np=l(w(),1);function u4({clientId:e}){let{canLock:t,isLocked:o}=ui(e),[r,n]=(0,oee.useReducer)(s=>!s,!1);if(!t)return null;let i=o?(0,c4.__)("Unlock"):(0,c4.__)("Lock");return(0,np.jsxs)(np.Fragment,{children:[(0,np.jsx)(ree.MenuItem,{icon:o?Il:EN,onClick:n,"aria-expanded":r,"aria-haspopup":"dialog",children:i}),r&&(0,np.jsx)(LT,{clientId:e,onClose:n})]})}var NT=l(N(),1),MT=l(A(),1),tb=l(O(),1);var Ed=l(w(),1);function d4({clientId:e}){let{canLock:t,isLocked:o}=ui(e),[r,n]=(0,tb.useReducer)(a=>!a,!1),i=(0,tb.useRef)(!1);if((0,tb.useEffect)(()=>{o&&(i.current=!0)},[o]),!o&&!i.current)return null;let s=o?(0,NT.__)("Unlock"):(0,NT.__)("Lock");return!t&&o&&(s=(0,NT.__)("Locked")),(0,Ed.jsxs)(Ed.Fragment,{children:[(0,Ed.jsx)(MT.ToolbarGroup,{className:"block-editor-block-lock-toolbar",children:(0,Ed.jsx)(MT.ToolbarButton,{disabled:!t,icon:o?om:Il,label:s,onClick:n,"aria-expanded":r,"aria-haspopup":"dialog"})}),r&&(0,Ed.jsx)(LT,{clientId:e,onClose:n})]})}var f4=l(N(),1),nee=l(A(),1),DT=l(Y(),1),VT=l(z(),1);var iee=l(w(),1),MIe=()=>{};function see({clientId:e,onToggle:t=MIe}){let{blockType:o,mode:r,enabled:n}=(0,VT.useSelect)(a=>{let{getBlock:c,getBlockMode:u,getSettings:d}=a(x),f=c(e);return{mode:u(e),blockType:f?(0,DT.getBlockType)(f.name):null,enabled:d().codeEditingEnabled&&!!f?.isValid}},[e]),{toggleBlockMode:i}=(0,VT.useDispatch)(x);if(!o||!(0,DT.hasBlockSupport)(o,"html",!0)||!n)return null;let s=r==="visual"?(0,f4.__)("Edit as HTML"):(0,f4.__)("Edit visually");return(0,iee.jsx)(nee.MenuItem,{onClick:()=>{i(e),t()},children:s})}var uee=l(A(),1),dee=l(N(),1),fee=l(O(),1),mee=l(z(),1),pee=l(js(),1);var Qs=l(A(),1),Xs=l(N(),1),lee=l(O(),1),cee=l(ir(),1),FT=l(z(),1);function aee(e){return e?.trim()?.length===0}var dc=l(w(),1);function ip({clientId:e,onClose:t}){let[o,r]=(0,lee.useState)(),n=Pt(e),{metadata:i}=(0,FT.useSelect)(b=>{let{getBlockAttributes:k}=b(x);return{metadata:k(e)?.metadata}},[e]),{updateBlockAttributes:s}=(0,FT.useDispatch)(x),a=i?.name||"",c=n?.title,u=!!a&&!!i?.bindings&&Object.values(i.bindings).some(b=>b.source==="core/pattern-overrides"),d=o!==void 0&&o!==a,f=o===c,m=aee(o),h=d||f,p=b=>b.target.select(),g=()=>{let b=f||m?void 0:o,k=f||m?(0,Xs.sprintf)((0,Xs.__)('Block name reset to: "%s".'),o):(0,Xs.sprintf)((0,Xs.__)('Block name changed to: "%s".'),o);(0,cee.speak)(k,"assertive"),s([e],{metadata:Le({...i,name:b})}),t()};return(0,dc.jsx)(Qs.Modal,{title:(0,Xs.__)("Rename"),onRequestClose:t,overlayClassName:"block-editor-block-rename-modal",focusOnMount:"firstContentElement",size:"small",children:(0,dc.jsx)("form",{onSubmit:b=>{b.preventDefault(),h&&g()},children:(0,dc.jsxs)(Qs.__experimentalVStack,{spacing:"3",children:[(0,dc.jsx)(Qs.TextControl,{__next40pxDefaultSize:!0,value:o??a,label:(0,Xs.__)("Name"),help:u?(0,Xs.__)("This block allows overrides. Changing the name can cause problems with content entered into instances of this pattern."):void 0,placeholder:c,onChange:r,onFocus:p}),(0,dc.jsxs)(Qs.__experimentalHStack,{justify:"right",children:[(0,dc.jsx)(Qs.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,children:(0,Xs.__)("Cancel")}),(0,dc.jsx)(Qs.Button,{__next40pxDefaultSize:!0,accessibleWhenDisabled:!0,disabled:!h,variant:"primary",type:"submit",children:(0,Xs.__)("Save")})]})]})})})}var sp=l(w(),1);function m4({clientId:e}){let[t,o]=(0,fee.useState)(!1),r=(0,mee.useSelect)(n=>n(pee.store).getShortcutRepresentation("core/block-editor/rename"),[]);return(0,sp.jsxs)(sp.Fragment,{children:[(0,sp.jsx)(uee.MenuItem,{onClick:()=>{o(!0)},"aria-expanded":t,"aria-haspopup":"dialog",shortcut:r,children:(0,dee.__)("Rename")}),t&&(0,sp.jsx)(ip,{clientId:e,onClose:()=>o(!1)})]})}var hee=l(Y(),1);function ap(e){return{canRename:!!e&&(0,hee.getBlockSupport)(e,"renaming",!0)}}var Js=l(w(),1),{Fill:DIe,Slot:VIe}=(0,ob.createSlotFill)("BlockSettingsMenuControls"),FIe=({fillProps:e,clientIds:t=null})=>{let{selectedBlocks:o,selectedClientIds:r,isContentOnly:n,canToggleSelectedBlocksVisibility:i,canEdit:s}=(0,bee.useSelect)(b=>{let{getBlocksByClientId:k,getBlockNamesByClientId:v,getSelectedBlockClientIds:y,getBlockEditingMode:_,canEditBlock:S}=b(x),C=t!==null?t:y();return{selectedBlocks:v(C),selectedClientIds:C,isContentOnly:_(C[0])==="contentOnly",canToggleSelectedBlocksVisibility:k(C).every(B=>(0,gee.hasBlockSupport)(B.name,"visibility",!0)),canEdit:S(C[0])}},[t]),{canLock:a}=ui(r[0]),{canRename:c}=ap(o[0]),u=r.length===1&&a&&!n,d=r.length===1&&c&&!n,f=i&&!n,m=q_(r),{isGroupable:h,isUngroupable:p}=m,g=(h||p)&&!n;return(0,Js.jsx)(VIe,{fillProps:{...e,canEdit:s,selectedBlocks:o,selectedClientIds:r},children:b=>!b?.length>0&&!g&&!u?null:(0,Js.jsxs)(ob.MenuGroup,{children:[g&&(0,Js.jsx)(JJ,{...m,onClose:e?.onClose}),s&&u&&(0,Js.jsx)(u4,{clientId:r[0]}),s&&d&&(0,Js.jsx)(m4,{clientId:r[0]}),s&&f&&(0,Js.jsx)(ID,{clientIds:r}),b,s&&e?.count===1&&!n&&(0,Js.jsx)(see,{clientId:e?.firstBlockClientId,onToggle:e?.onClose})]})})};function vee({...e}){return(0,Js.jsx)(ob.__experimentalStyleProvider,{document,children:(0,Js.jsx)(DIe,{...e})})}vee.Slot=FIe;var zT=vee;var kee=l(O(),1),yee=l(A(),1),_ee=l(X(),1),See=l(z(),1),jT=l(N(),1);var p4=l(w(),1);function xee({parentClientId:e,parentBlockType:t}){let o=(0,_ee.useViewportMatch)("medium","<"),{selectBlock:r}=(0,See.useDispatch)(x),n=(0,kee.useRef)(),i=Xg({ref:n,highlightParent:!0});return o?(0,p4.jsx)(yee.MenuItem,{...i,ref:n,icon:(0,p4.jsx)(Ae,{icon:t.icon}),onClick:()=>r(e),children:(0,jT.sprintf)((0,jT.__)("Select parent block (%s)"),t.title)}):null}var Qe=l(w(),1),zIe={className:"block-editor-block-settings-menu__popover",placement:"bottom-start"};function h4({clientIds:e,onCopy:t,label:o,shortcut:r,eventType:n="copy",__experimentalUpdateSelection:i=!1}){let{getBlocksByClientId:s}=(0,Td.useSelect)(x),{removeBlocks:a}=(0,Td.useDispatch)(x),c=dg(),u=(0,fc.useCopyToClipboard)(()=>(0,rb.serialize)(s(e)),()=>{switch(n){case"copy":case"copyStyles":t(),c(n,e);break;case"cut":c(n,e),a(e,i);break;default:break}}),d=o||(0,rs.__)("Copy");return(0,Qe.jsx)(rn.MenuItem,{ref:u,shortcut:r,children:d})}function g4({block:e,clientIds:t,children:o,__experimentalSelectBlock:r,isContentOnlyListView:n,...i}){let s=t.length,a=t[0],{firstParentClientId:c,parentBlockType:u,previousBlockClientId:d,selectedBlockClientIds:f,isContentOnly:m,isZoomOut:h,canEdit:p,canMove:g,isFirst:b,isLast:k}=(0,Td.useSelect)(I=>{let{getBlockName:R,getBlockRootClientId:V,getPreviousBlockClientId:j,getSelectedBlockClientIds:H,getBlockAttributes:F,getBlockEditingMode:U,isZoomOut:G,canEditBlock:W,canMoveBlocks:J,getBlockIndex:le,getBlockCount:oe}=M(I(x)),{getActiveBlockVariation:re}=I(rb.store),Q=V(a),$=Q&&R(Q);return{firstParentClientId:Q,parentBlockType:Q&&(re($,F(Q))||(0,rb.getBlockType)($)),previousBlockClientId:j(a),selectedBlockClientIds:H(),isContentOnly:U(a)==="contentOnly",isZoomOut:G(),canEdit:W(a),canMove:J(t),isFirst:le(a)===0,isLast:le(a)===oe(Q)-1}},[a,t]),{getBlockOrder:v,getSelectedBlockClientIds:y}=(0,Td.useSelect)(x),{moveBlocksDown:_,moveBlocksUp:S}=(0,Td.useDispatch)(x),C=(0,Td.useSelect)(I=>{let{getShortcutRepresentation:R}=I(wee.store);return{copy:R("core/block-editor/copy"),cut:R("core/block-editor/cut"),duplicate:R("core/block-editor/duplicate"),remove:R("core/block-editor/remove"),insertAfter:R("core/block-editor/insert-after"),insertBefore:R("core/block-editor/insert-before")}},[]),B=f.length>0;async function P(I){if(!r)return;let R=await I;R&&R[0]&&r(R[0],!1)}function T(){if(!r)return;let I=d||c;I||(I=v()[0]);let R=B&&y().length===0;r(I,R)}let L=!f?.includes(c)&&!!c;return(0,Qe.jsx)(jJ,{clientIds:t,__experimentalUpdateSelection:!r,children:({canCopyStyles:I,canDuplicate:R,canInsertBlock:V,canRemove:j,onDuplicate:H,onInsertAfter:F,onInsertBefore:U,onRemove:G,onCopy:W,onPasteStyles:J})=>!j&&!R&&!V&&m?null:(0,Qe.jsx)(rn.DropdownMenu,{icon:Is,label:(0,rs.__)("Options"),className:"block-editor-block-settings-menu",popoverProps:zIe,noIcons:!0,...i,children:({onClose:oe})=>(0,Qe.jsxs)(Qe.Fragment,{children:[(0,Qe.jsxs)(rn.MenuGroup,{children:[(0,Qe.jsx)(IT.Slot,{fillProps:{onClose:oe}}),L&&(0,Qe.jsx)(xee,{parentClientId:c,parentBlockType:u}),g&&n&&(0,Qe.jsxs)(Qe.Fragment,{children:[(0,Qe.jsx)(rn.MenuItem,{icon:Yf,disabled:b,accessibleWhenDisabled:!0,onClick:(0,fc.pipe)(oe,()=>{S(t,c)}),children:(0,rs.__)("Move up")}),(0,Qe.jsx)(rn.MenuItem,{icon:vr,disabled:k,accessibleWhenDisabled:!0,onClick:(0,fc.pipe)(oe,()=>{_(t,c)}),children:(0,rs.__)("Move down")})]}),p&&s===1&&(0,Qe.jsx)($J,{clientId:a}),!m&&(0,Qe.jsx)(h4,{clientIds:t,onCopy:W,shortcut:C.copy}),j&&!m&&(0,Qe.jsx)(h4,{clientIds:t,label:(0,rs.__)("Cut"),eventType:"cut",shortcut:C.cut,__experimentalUpdateSelection:!r}),R&&(0,Qe.jsx)(rn.MenuItem,{onClick:(0,fc.pipe)(oe,H,P),shortcut:C.duplicate,children:(0,rs.__)("Duplicate")}),V&&!h&&(0,Qe.jsxs)(Qe.Fragment,{children:[(0,Qe.jsx)(rn.MenuItem,{onClick:(0,fc.pipe)(oe,U),shortcut:C.insertBefore,children:(0,rs.__)("Add before")}),(0,Qe.jsx)(rn.MenuItem,{onClick:(0,fc.pipe)(oe,F),shortcut:C.insertAfter,children:(0,rs.__)("Add after")})]}),p&&s===1&&(0,Qe.jsx)(BT.Slot,{fillProps:{clientId:a,onClose:oe}})]}),I&&!m&&(0,Qe.jsxs)(rn.MenuGroup,{children:[(0,Qe.jsx)(h4,{clientIds:t,onCopy:W,label:(0,rs.__)("Copy styles"),eventType:"copyStyles"}),p&&(0,Qe.jsx)(rn.MenuItem,{onClick:J,children:(0,rs.__)("Paste styles")})]}),!m&&(0,Qe.jsx)(zT.Slot,{fillProps:{onClose:oe,count:s,firstBlockClientId:a},clientIds:t}),typeof o=="function"?o({onClose:oe}):UT.Children.map(re=>(0,UT.cloneElement)(re,{onClose:oe})),j&&(0,Qe.jsx)(rn.MenuGroup,{children:(0,Qe.jsx)(rn.MenuItem,{onClick:(0,fc.pipe)(oe,G,T),shortcut:C.remove,children:(0,rs.__)("Delete")})})]})})})}var Cee=g4;var Bee=l(A(),1),jIe=(0,Bee.createSlotFill)(Symbol("NoteIconToolbarSlotFill")),HT=jIe;var nb=l(w(),1);function UIe({clientIds:e,...t}){return(0,nb.jsxs)(GT.ToolbarGroup,{children:[(0,nb.jsx)(HT.Slot,{}),(0,nb.jsx)(GT.ToolbarItem,{children:o=>(0,nb.jsx)(Cee,{clientIds:e,toggleProps:o,...t})})]})}var WT=UIe;var $T=l(A(),1),Eee=l(N(),1),KT=l(z(),1);var b4=l(w(),1);function Tee({clientIds:e}){let t=e.length===1?e[0]:void 0,o=(0,KT.useSelect)(n=>!!t&&n(x).getBlockMode(t)==="html",[t]),{toggleBlockMode:r}=(0,KT.useDispatch)(x);return o?(0,b4.jsx)($T.ToolbarGroup,{children:(0,b4.jsx)($T.ToolbarButton,{onClick:()=>{r(t)},children:(0,Eee.__)("Edit visually")})}):null}var YT=l(A(),1),nn=l(O(),1),Ree=l(z(),1),Oee=l(Re(),1),k4=l(Ve(),1),Aee=l(js(),1),Lee=l(ot(),1);var v4=l(w(),1);function HIe(e){let t="toolbarItem";return!e.some(o=>!(t in o.dataset))}function Iee(e){return Array.from(e.querySelectorAll("[data-toolbar-item]:not([disabled])"))}function Pee(e){return e.contains(e.ownerDocument.activeElement)}function GIe(e){let[t]=k4.focus.tabbable.find(e);t&&t.focus({preventScroll:!0})}function WIe(e){let[o,r]=(0,nn.useState)(!0),n=(0,nn.useCallback)(()=>{let i=k4.focus.tabbable.find(e.current),s=HIe(i);s||(0,Oee.default)("Using custom components as toolbar controls",{since:"5.6",alternative:"ToolbarItem, ToolbarButton or ToolbarDropdownMenu components",link:"https://developer.wordpress.org/block-editor/components/toolbar-button/#inside-blockcontrols"}),r(s)},[e]);return(0,nn.useLayoutEffect)(()=>{let i=new window.MutationObserver(n);return i.observe(e.current,{childList:!0,subtree:!0}),()=>i.disconnect()},[n,o,e]),o}function $Ie({toolbarRef:e,focusOnMount:t,isAccessibleToolbar:o,defaultIndex:r,onIndexChange:n,shouldUseKeyboardFocusShortcut:i,focusEditorOnEscape:s}){let[a]=(0,nn.useState)(t),[c]=(0,nn.useState)(r),u=(0,nn.useCallback)(()=>{GIe(e.current)},[e]);(0,Aee.useShortcut)("core/block-editor/focus-toolbar",()=>{i&&u()}),(0,nn.useEffect)(()=>{a&&u()},[o,a,u]),(0,nn.useEffect)(()=>{let m=e.current,h=0;return!a&&!Pee(m)&&(h=window.requestAnimationFrame(()=>{let p=Iee(m),g=c||0;p[g]&&Pee(m)&&p[g].focus({preventScroll:!0})})),()=>{if(window.cancelAnimationFrame(h),!n||!m)return;let g=Iee(m).findIndex(b=>b.tabIndex===0);n(g)}},[c,a,n,e]);let{getLastFocus:f}=M((0,Ree.useSelect)(x));(0,nn.useEffect)(()=>{let m=e.current;if(s){let h=p=>{let g=f();p.keyCode===Lee.ESCAPE&&g?.current&&(p.preventDefault(),g.current.focus())};return m.addEventListener("keydown",h),()=>{m.removeEventListener("keydown",h)}}},[s,f,e])}function ib({children:e,focusOnMount:t,focusEditorOnEscape:o=!1,shouldUseKeyboardFocusShortcut:r=!0,__experimentalInitialIndex:n,__experimentalOnIndexChange:i,orientation:s="horizontal",...a}){let c=(0,nn.useRef)(),u=WIe(c);return $Ie({toolbarRef:c,focusOnMount:t,defaultIndex:n,onIndexChange:i,isAccessibleToolbar:u,shouldUseKeyboardFocusShortcut:r,focusEditorOnEscape:o}),u?(0,v4.jsx)(YT.Toolbar,{label:a["aria-label"],ref:c,orientation:s,...a,children:e}):(0,v4.jsx)(YT.NavigableMenu,{orientation:s,role:"toolbar",ref:c,...a,children:e})}var Nee=l(z(),1),qT=l(Y(),1);function ZT(){return(0,Nee.useSelect)(t=>{let{getBlockEditingMode:o,getBlockName:r,getBlockSelectionStart:n}=t(x),i=n(),s=i&&(0,qT.getBlockType)(r(i));return s&&(0,qT.hasBlockSupport)(s,"__experimentalToolbar",!0)&&o(i)!=="disabled"},[])}var Id=l(A(),1),Mee=l(N(),1),Dee=l(Y(),1),Vee=l(O(),1),XT=l(z(),1);var sb=l(w(),1),y4=[],KIe=6,YIe={placement:"bottom-start"};function Fee({clientId:e}){let{categories:t,currentPatternName:o,patterns:r}=(0,XT.useSelect)(a=>{let{getBlockAttributes:c,getBlockRootClientId:u,__experimentalGetAllowedPatterns:d}=a(x),f=c(e),m=f?.metadata?.categories||y4,h=u(e),p=m.length>0?d(h):y4;return{categories:m,currentPatternName:f?.metadata?.patternName,patterns:p}},[e]),{replaceBlocks:n}=(0,XT.useDispatch)(x),i=(0,Vee.useMemo)(()=>t.length===0||!r||r.length===0?y4:r.filter(a=>{let c=a.source==="core"||a.source?.startsWith("pattern-directory")&&a.source!=="pattern-directory/theme";return a.blocks.length===1&&!c&&o!==a.name&&a.categories?.some(u=>t.includes(u))&&(a.syncStatus==="unsynced"||!a.id)}).slice(0,KIe),[t,o,r]);if(i.length<2)return null;let s=a=>{let c=(a.blocks??[]).map(u=>(0,Dee.cloneBlock)(u));c[0].attributes.metadata={...c[0].attributes.metadata,categories:t},n(e,c)};return(0,sb.jsx)(Id.Dropdown,{popoverProps:YIe,renderToggle:({onToggle:a,isOpen:c})=>(0,sb.jsx)(Id.ToolbarGroup,{children:(0,sb.jsx)(Id.ToolbarButton,{onClick:()=>a(!c),"aria-expanded":c,children:(0,Mee.__)("Change design")})}),renderContent:()=>(0,sb.jsx)(Id.__experimentalDropdownContentWrapper,{className:"block-editor-block-toolbar-change-design-content-wrapper",paddingSize:"none",children:(0,sb.jsx)(za,{blockPatterns:i,onClickPattern:s,showTitlesAsTooltip:!0})})})}var ta=l(A(),1),lte=l(N(),1),aI=l(z(),1);var eI=l(z(),1),Rd=l(Y(),1),Gee=l(O(),1);var _4=l(QT(),1),jee=l(N(),1);function Uee(e,t){for(let o of new _4.default(t).values()){if(o.indexOf("is-style-")===-1)continue;let r=o.substring(9),n=e?.find(({name:i})=>i===r);if(n)return n}return JT(e)}function Pd(e,t,o){let r=new _4.default(e);return t&&r.remove("is-style-"+t.name),r.add("is-style-"+o.name),r.value}function Hee(e){return!e||e.length===0?[]:JT(e)?e:[{name:"default",label:(0,jee._x)("Default","block style"),isDefault:!0},...e]}function JT(e){return e?.find(t=>t.isDefault)}function qIe(e,t){return(0,Gee.useMemo)(()=>{let o=t?.example,r=t?.name;if(o&&r)return(0,Rd.getBlockFromExample)(r,{attributes:o.attributes,innerBlocks:o.innerBlocks});if(e)return(0,Rd.cloneBlock)(e)},[e,t?.example,t?.name])}function ab({clientId:e,onSwitch:t}){let o=m=>{let{getBlock:h}=m(x),p=h(e);if(!p)return{};let g=(0,Rd.getBlockType)(p.name),{getBlockStyles:b}=m(Rd.store);return{block:g?.example?null:p,blockType:g,styles:b(p.name),className:p.attributes.className||""}},{styles:r,block:n,blockType:i,className:s}=(0,eI.useSelect)(o,[e]),{updateBlockAttributes:a}=(0,eI.useDispatch)(x),c=Hee(r),u=Uee(c,s),d=qIe(n,i);return{onSelect:m=>{let h=Pd(s,u,m);a(e,{className:h}),t()},stylesToRender:c,activeStyle:u,genericPreviewBlock:d,className:s}}var iS=l(Y(),1),rS=l(z(),1),sI=l(O(),1);function Wee(e,t,o){t=Array.isArray(t)?[...t]:[t],e=Array.isArray(e)?[...e]:{...e};let r=t.pop(),n=e;for(let i of t){let s=n[i];n=n[i]=Array.isArray(s)?[...s]:{...s}}return n[r]=o,e}var Fo=(e,t,o)=>{let r=Array.isArray(t)?t:t.split("."),n=e;return r.forEach(i=>{n=n?.[i]}),n??o};var Kee=l(fy(),1);var ZIe="1600px",XIe="320px",QIe=1,JIe=.25,ePe=.75,tPe="14px";function $ee({minimumFontSize:e,maximumFontSize:t,fontSize:o,minimumViewportWidth:r=XIe,maximumViewportWidth:n=ZIe,scaleFactor:i=QIe,minimumFontSizeLimit:s}){if(s=Wa(s)?s:tPe,o){let y=Wa(o);if(!y?.unit||!y?.value)return null;let _=Wa(s,{coerceTo:y.unit});if(_?.value&&!e&&!t&&y?.value<=_?.value)return null;if(t||(t=`${y.value}${y.unit}`),!e){let S=y.unit==="px"?y.value:y.value*16,C=Math.min(Math.max(1-.075*Math.log2(S),JIe),ePe),B=Q_(y.value*C,3);_?.value&&B<_?.value?e=`${_.value}${_.unit}`:e=`${B}${y.unit}`}}let a=Wa(e),c=a?.unit||"rem",u=Wa(t,{coerceTo:c});if(!a||!u)return null;let d=Wa(e,{coerceTo:"rem"}),f=Wa(n,{coerceTo:c}),m=Wa(r,{coerceTo:c});if(!f||!m||!d)return null;let h=f.value-m.value;if(!h)return null;let p=Q_(m.value/100,3),g=Q_(p,3)+c,b=100*((u.value-a.value)/h),k=Q_((b||1)*i,3),v=`${d.value}${d.unit} + ((1vw - ${g}) * ${k})`;return`clamp(${e}, ${v}, ${t})`}function Wa(e,t={}){if(typeof e!="string"&&typeof e!="number")return null;isFinite(e)&&(e=`${e}px`);let{coerceTo:o,rootSizeValue:r,acceptableUnits:n}={coerceTo:"",rootSizeValue:16,acceptableUnits:["rem","px","em"],...t},i=n?.join("|"),s=new RegExp(`^(\\d*\\.?\\d+)(${i}){1,1}$`),a=e.toString().match(s);if(!a||a.length<3)return null;let[,c,u]=a,d=parseFloat(c);return o==="px"&&(u==="em"||u==="rem")&&(d=d*r,u=o),u==="px"&&(o==="em"||o==="rem")&&(d=d/r,u=o),(o==="em"||o==="rem")&&(u==="em"||u==="rem")&&(u=o),u?{value:Q_(d,3),unit:u}:null}function Q_(e,t=3){let o=Math.pow(10,t);return Math.round(e*o)/o}function S4(e){let t=e?.fluid;return t===!0||t&&typeof t=="object"&&Object.keys(t).length>0}function oPe(e){let t=e?.typography??{},o=e?.layout,r=Wa(o?.wideSize)?o?.wideSize:null;return S4(t)&&r?{fluid:{maxViewportWidth:r,...typeof t.fluid=="object"?t.fluid:{}}}:{fluid:t?.fluid}}function mc(e,t){let{size:o}=e;if(!o||o==="0"||e?.fluid===!1||!S4(t?.typography)&&!S4(e))return o;let r=oPe(t)?.fluid??{},n=$ee({minimumFontSize:typeof e?.fluid=="boolean"?void 0:e?.fluid?.min,maximumFontSize:typeof e?.fluid=="boolean"?void 0:e?.fluid?.max,fontSize:o,minimumFontSizeLimit:typeof r=="object"?r?.minFontSize:void 0,maximumViewportWidth:typeof r=="object"?r?.maxViewportWidth:void 0,minimumViewportWidth:typeof r=="object"?r?.minViewportWidth:void 0});return n||o}var $a="body",J_=":root",tI=[{path:["color","palette"],valueKey:"color",cssVarInfix:"color",classes:[{classSuffix:"color",propertyName:"color"},{classSuffix:"background-color",propertyName:"background-color"},{classSuffix:"border-color",propertyName:"border-color"}]},{path:["color","gradients"],valueKey:"gradient",cssVarInfix:"gradient",classes:[{classSuffix:"gradient-background",propertyName:"background"}]},{path:["color","duotone"],valueKey:"colors",cssVarInfix:"duotone",valueFunc:({slug:e})=>`url( '#wp-duotone-${e}' )`,classes:[]},{path:["shadow","presets"],valueKey:"shadow",cssVarInfix:"shadow",classes:[]},{path:["typography","fontSizes"],valueFunc:(e,t)=>mc(e,t),valueKey:"size",cssVarInfix:"font-size",classes:[{classSuffix:"font-size",propertyName:"font-size"}]},{path:["typography","fontFamilies"],valueKey:"fontFamily",cssVarInfix:"font-family",classes:[{classSuffix:"font-family",propertyName:"font-family"}]},{path:["spacing","spacingSizes"],valueKey:"size",cssVarInfix:"spacing",valueFunc:({size:e})=>e,classes:[]},{path:["border","radiusSizes"],valueKey:"size",cssVarInfix:"border-radius",classes:[]},{path:["dimensions","dimensionSizes"],valueKey:"size",cssVarInfix:"dimension",classes:[]}];function ea(e,t){if(!e||!t)return t;let o=e.split(","),r=t.split(","),n=[];return o.forEach(i=>{r.forEach(s=>{n.push(`${i.trim()} ${s.trim()}`)})}),n.join(", ")}function Yee(e,t){if(!e||!t)return;let o={};return Object.entries(t).forEach(([r,n])=>{typeof n=="string"&&(o[r]=ea(e,n)),typeof n=="object"&&(o[r]={},Object.entries(n).forEach(([i,s])=>{o[r][i]=ea(e,s)}))}),o}function oI(e,t){return e.includes(",")?e.split(",").map(n=>n+t).join(","):e+t}function qee(e,t){let o=`.is-style-${e}`;if(!t)return o;let r=/((?::\([^)]+\))?\s*)([^\s:]+)/,n=(s,a,c)=>a+c+o;return t.split(",").map(s=>s.replace(r,n)).join(",")}function rPe(e,t){if(!e||!t)return e;if(typeof e=="object"&&"ref"in e&&e?.ref){let o=(0,Kee.getCSSValueFromRawStyle)(Fo(t,e.ref));return typeof o=="object"&&o!==null&&"ref"in o&&o?.ref?void 0:o===void 0?e:o}return e}function nPe(e,t){if(!e||!t||!Array.isArray(t))return e;let o=t.find(r=>r?.name===e);return o?.href?o?.href:e}function lb(e,t){if(!e||!t)return e;let o=rPe(e,t);return typeof o=="object"&&o!==null&&"url"in o&&o?.url&&(o.url=nPe(o.url,t?._links?.["wp:theme-file"])),o}function Zee(e,t,o=[],r="slug",n){let i=[t?Fo(e,["blocks",t,...o]):void 0,Fo(e,o)].filter(Boolean);for(let s of i)if(s){let a=["custom","theme","default"];for(let c of a){let u=s[c];if(u){let d=u.find(f=>f[r]===n);if(d)return r==="slug"||Zee(e,t,o,"slug",d.slug)[r]===d[r]?d:void 0}}}}function iPe(e,t,o,[r,n]=[]){let i=tI.find(a=>a.cssVarInfix===r);if(!i||!e.settings)return o;let s=Zee(e.settings,t,i.path,"slug",n);if(s){let{valueKey:a}=i,c=s[a];return Vr(e,t,c)}return o}function sPe(e,t,o,r=[]){let n=(t?Fo(e?.settings??{},["blocks",t,"custom",...r]):void 0)??Fo(e?.settings??{},["custom",...r]);return n?Vr(e,t,n):o}function Vr(e,t,o){if(!o||typeof o!="string")if(typeof o=="object"&&o!==null&&"ref"in o&&typeof o.ref=="string"){let u=Fo(e,o.ref);if(!u||typeof u=="object"&&"ref"in u)return u;o=u}else return o;let r="var:",n="var(--wp--",i=")",s;if(o.startsWith(r))s=o.slice(r.length).split("|");else if(o.startsWith(n)&&o.endsWith(i))s=o.slice(n.length,-i.length).split("--");else return o;let[a,...c]=s;return a==="preset"?iPe(e,t,o,c):a==="custom"?sPe(e,t,o,c):o}var sn=l(Y(),1),tS=l(fy(),1),nte=l(z(),1);function di(e,t="root",o={}){if(!t)return null;let{fallback:r=!1}=o,{name:n,selectors:i,supports:s}=e,a=i&&Object.keys(i).length>0,c=Array.isArray(t)?t.join("."):t,u=null;if(a&&i.root?u=i?.root:s?.__experimentalSelector?u=s.__experimentalSelector:u=".wp-block-"+n.replace("core/","").replace("/","-"),c==="root")return u;let d=Array.isArray(t)?t:t.split(".");if(d.length===1){let m=r?u:null;if(a)return Fo(i,`${c}.root`,null)||Fo(i,c,null)||m;let h=s?Fo(s,`${c}.__experimentalSelector`,null):void 0;return h?ea(u,h):m}let f;return a&&(f=Fo(i,c,null)),f||(r?di(e,d[0],o):null)}function ub(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/([0-9])([a-zA-Z])/g,"$1-$2").replace(/([a-zA-Z])([0-9])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}function w4(e){if(!e)return;let t=e.match(/var:preset\|spacing\|(.+)/);return t?`var(--wp--preset--spacing--${t[1]})`:e}function yPe(e){if(!e)return null;let t=typeof e=="string";return{top:t?e:e?.top,left:t?e:e?.left}}function C4(e,t="0"){let o=yPe(e);if(!o)return null;let r=w4(o?.top)||t,n=w4(o?.left)||t;return r===n?r:`${r} ${n}`}var ete={backgroundSize:"cover",backgroundPosition:"50% 50%"};function tte(e){if(!e||!e?.backgroundImage?.url)return;let t;return e?.backgroundSize||(t={backgroundSize:ete.backgroundSize}),e?.backgroundSize==="contain"&&!e?.backgroundPosition&&(t={backgroundPosition:ete.backgroundPosition}),t}var ote={default:{name:"default",slug:"flow",className:"is-layout-flow",baseStyles:[{selector:" > .alignleft",rules:{float:"left","margin-inline-start":"0","margin-inline-end":"2em"}},{selector:" > .alignright",rules:{float:"right","margin-inline-start":"2em","margin-inline-end":"0"}},{selector:" > .aligncenter",rules:{"margin-left":"auto !important","margin-right":"auto !important"}}],spacingStyles:[{selector:" > :first-child",rules:{"margin-block-start":"0"}},{selector:" > :last-child",rules:{"margin-block-end":"0"}},{selector:" > *",rules:{"margin-block-start":null,"margin-block-end":"0"}}]},constrained:{name:"constrained",slug:"constrained",className:"is-layout-constrained",baseStyles:[{selector:" > .alignleft",rules:{float:"left","margin-inline-start":"0","margin-inline-end":"2em"}},{selector:" > .alignright",rules:{float:"right","margin-inline-start":"2em","margin-inline-end":"0"}},{selector:" > .aligncenter",rules:{"margin-left":"auto !important","margin-right":"auto !important"}},{selector:" > :where(:not(.alignleft):not(.alignright):not(.alignfull))",rules:{"max-width":"var(--wp--style--global--content-size)","margin-left":"auto !important","margin-right":"auto !important"}},{selector:" > .alignwide",rules:{"max-width":"var(--wp--style--global--wide-size)"}}],spacingStyles:[{selector:" > :first-child",rules:{"margin-block-start":"0"}},{selector:" > :last-child",rules:{"margin-block-end":"0"}},{selector:" > *",rules:{"margin-block-start":null,"margin-block-end":"0"}}]},flex:{name:"flex",slug:"flex",className:"is-layout-flex",displayMode:"flex",baseStyles:[{selector:"",rules:{"flex-wrap":"wrap","align-items":"center"}},{selector:" > :is(*, div)",rules:{margin:"0"}}],spacingStyles:[{selector:"",rules:{gap:null}}]},grid:{name:"grid",slug:"grid",className:"is-layout-grid",displayMode:"grid",baseStyles:[{selector:" > :is(*, div)",rules:{margin:"0"}}],spacingStyles:[{selector:"",rules:{gap:null}}]}};var _Pe={button:"wp-element-button",caption:"wp-element-caption"},SPe={__experimentalBorder:"border",color:"color",dimensions:"dimensions",spacing:"spacing",typography:"typography"},xPe={"core/button":[":hover",":focus",":focus-visible",":active"],"core/navigation-link":[":hover",":focus",":focus-visible",":active"]};function wPe(e="*",t={}){return tI.reduce((o,{path:r,cssVarInfix:n,classes:i})=>{if(!i)return o;let s=Fo(t,r,[]);return["default","theme","custom"].forEach(a=>{s[a]&&s[a].forEach(({slug:c})=>{i.forEach(({classSuffix:u,propertyName:d})=>{let f=`.has-${ub(c)}-${u}`,m=e.split(",").map(p=>`${p}${f}`).join(","),h=`var(--wp--preset--${n}--${ub(c)})`;o+=`${m}{${d}: ${h} !important;}`})})}),o},"")}function ite(e,t){let o=e.split(","),r=[];return o.forEach(n=>{r.push(`${t.trim()}${n.trim()}`)}),r.join(", ")}var B4=(e,t,o)=>{if(o!=="core/paragraph"||(t?.blocks?.["core/paragraph"]?.typography?.textIndent??t?.typography?.textIndent??"subsequent")!=="all")return e;let i=".wp-block-paragraph + .wp-block-paragraph",s=".wp-block-paragraph";if(i in e){let a=e[i],c={...e};return delete c[i],c[s]=a,c}return e},E4=(e,t)=>{let o=".wp-block-button";if(!(o in e))return e;let r={...e};return r[o]=r[o].map(n=>{let i=n.match(/^width:\s*(.+)$/);if(!i)return n;let s=i[1],a=null;s.endsWith("%")&&(a=parseFloat(s));let c="var(--wp--preset--dimension--";if(a===null&&s.startsWith(c)&&s.endsWith(")")){let u=s.slice(c.length,-1),d={...t?.dimensions?.dimensionSizes??{},...t?.blocks?.["core/button"]?.dimensions?.dimensionSizes??{}};for(let f of Object.values(d))if(Array.isArray(f)){for(let m of f)if(m.slug===u&&typeof m.size=="string"&&m.size.endsWith("%")){a=parseFloat(m.size);break}if(a!==null)break}}return a===null||isNaN(a)?n:`width: calc(${a} * 1% - (var(--wp--style--block-gap, 0.5em) * (1 - ${a} / 100)))`}),r},T4=(e,t)=>{let o={};return Object.entries(e).forEach(([r,n])=>{if(r==="root"||!t?.[r])return;let i=typeof n=="string";if(!i&&typeof n=="object"&&n!==null&&Object.entries(n).forEach(([s,a])=>{if(s==="root"||!t?.[r][s])return;let c={[r]:{[s]:t[r][s]}},u=db(c);o[a]=[...o[a]||[],...u],delete t[r][s]}),i||typeof n=="object"&&n!==null&&"root"in n){let s=i?n:n.root,a={[r]:t[r]},c=db(a);o[s]=[...o[s]||[],...c],delete t[r]}}),o};function db(e={},t="",o,r={},n=!1){let i=$a===t,s=Object.entries(sn.__EXPERIMENTAL_STYLE_PROPERTY).reduce((c,[u,{value:d,properties:f,useEngine:m,rootOnly:h}])=>{if(h&&!i)return c;let p=d;if(p[0]==="elements"||m)return c;let g=Fo(e,p);if(u==="--wp--style--root--padding"&&(typeof g=="string"||!o))return c;if(f&&typeof g!="string")Object.entries(f).forEach(b=>{let[k,v]=b;if(!Fo(g,[v],!1))return;let y=k.startsWith("--")?k:ub(k);c.push(`${y}: ${(0,tS.getCSSValueFromRawStyle)(Fo(g,[v]))}`)});else if(Fo(e,p,!1)){let b=u.startsWith("--")?u:ub(u);c.push(`${b}: ${(0,tS.getCSSValueFromRawStyle)(Fo(e,p))}`)}return c},[]);return e.background&&(e.background?.backgroundImage&&(e.background.backgroundImage=lb(e.background.backgroundImage,r)),!i&&e.background?.backgroundImage?.id&&(e={...e,background:{...e.background,...tte(e.background)}})),(0,tS.getCSSRules)(e).forEach(c=>{if(i&&(o||n)&&c.key.startsWith("padding"))return;let u=c.key.startsWith("--")?c.key:ub(c.key),d=lb(c.value,r);u==="font-size"&&(d=mc({name:"",slug:"",size:d},r?.settings)),u==="aspect-ratio"&&s.push("min-height: unset"),s.push(`${u}: ${d}`)}),s}function I4({layoutDefinitions:e=ote,style:t,selector:o,hasBlockGapSupport:r,hasFallbackGapSupport:n,fallbackGapValue:i}){let s="",a=r?C4(t?.spacing?.blockGap):"";if(n&&(o===$a?a=a||"0.5em":!r&&i&&(a=i)),a&&e&&(Object.values(e).forEach(({className:c,name:u,spacingStyles:d})=>{!r&&u!=="flex"&&u!=="grid"||d?.length&&d.forEach(f=>{let m=[];if(f.rules&&Object.entries(f.rules).forEach(([h,p])=>{m.push(`${h}: ${p||a}`)}),m.length){let h="";r?h=o===$a?`:root :where(.${c})${f?.selector||""}`:`:root :where(${o}-${c})${f?.selector||""}`:h=o===$a?`:where(.${c}${f?.selector||""})`:`:where(${o}.${c}${f?.selector||""})`,s+=`${h} { ${m.join("; ")}; }`}})}),o===$a&&r&&(s+=`${J_} { --wp--style--block-gap: ${a}; }`)),o===$a&&e){let c=["block","flex","grid"];Object.values(e).forEach(({className:u,displayMode:d,baseStyles:f})=>{d&&c.includes(d)&&(s+=`${o} .${u} { display:${d}; }`),f?.length&&f.forEach(m=>{let h=[];if(m.rules&&Object.entries(m.rules).forEach(([p,g])=>{h.push(`${p}: ${g}`)}),h.length){let p=`.${u}${m?.selector||""}`;s+=`${p} { ${h.join("; ")}; }`}})})}return s}var CPe=["border","color","dimensions","spacing","typography","filter","outline","shadow","background"];function BPe(e){return rI(e)}function rI(e,t){if(!e)return{};let o=Object.entries(e),r=t?xPe[t]??[]:[],i=o.filter(([s])=>CPe.includes(s)||r.includes(s)).map(([s,a])=>[s,JSON.parse(JSON.stringify(a))]);return Object.fromEntries(i)}function rte(e,t,o,r,n,i,s){let a=Object.entries(e).filter(([c])=>c.startsWith(":"));return a.length&&a.forEach(([c,u])=>{if(!u||typeof u!="object")return;let d=JSON.parse(JSON.stringify(u));if(r&&typeof r!="string"){let p=T4(r,d);p=B4(p,n,i),p=E4(p,n),Object.entries(p).forEach(([g,b])=>{if(!b.length)return;let k=oI(g,c),v=s?ite(k,s):k,y=b.join(";");o+=`:root :where(${v}){${y};}`})}let f=db(d);if(!f.length)return;let h=`:root :where(${oI(t,c)}){${f.join(";")};}`;o+=h}),o}var EPe=(e,t)=>{let o=[];if(!e?.styles)return o;let r=BPe(e.styles);return r&&o.push({styles:r,selector:$a,skipSelectorWrapper:!0}),Object.entries(sn.__EXPERIMENTAL_ELEMENTS).forEach(([n,i])=>{e.styles?.elements?.[n]&&o.push({styles:e.styles?.elements?.[n]??{},selector:i,skipSelectorWrapper:!_Pe[n]})}),Object.entries(e.styles?.blocks??{}).forEach(([n,i])=>{let s=rI(i,n),a=i,c=[];if(a?.variations){let u={};Object.entries(a.variations).forEach(([d,f])=>{let m=f;u[d]=rI(m,n),m?.css&&(u[d].css=m.css);let h=typeof t!="string"?t[n]?.styleVariationSelectors?.[d]:void 0;Object.entries(m?.elements??{}).forEach(([p,g])=>{g&&sn.__EXPERIMENTAL_ELEMENTS[p]&&c.push({styles:g,selector:ea(h,sn.__EXPERIMENTAL_ELEMENTS[p])})}),Object.entries(m?.blocks??{}).forEach(([p,g])=>{let b=typeof t!="string"?ea(h,t[p]?.selector):void 0,k=typeof t!="string"?ea(h,t[p]?.duotoneSelector):void 0,v=typeof t!="string"?Yee(h,t[p]?.featureSelectors??{}):void 0,y=rI(g,p);g?.css&&(y.css=g.css),!(!b||typeof t=="string")&&(c.push({selector:b,duotoneSelector:k,featureSelectors:v,fallbackGapValue:t[p]?.fallbackGapValue,hasLayoutSupport:t[p]?.hasLayoutSupport,styles:y}),Object.entries(g.elements??{}).forEach(([_,S])=>{S&&sn.__EXPERIMENTAL_ELEMENTS[_]&&c.push({styles:S,selector:ea(b,sn.__EXPERIMENTAL_ELEMENTS[_])})}))})}),s.variations=u}typeof t!="string"&&t?.[n]?.selector&&o.push({duotoneSelector:t[n].duotoneSelector,fallbackGapValue:t[n].fallbackGapValue,hasLayoutSupport:t[n].hasLayoutSupport,selector:t[n].selector,styles:s,featureSelectors:t[n].featureSelectors,styleVariationSelectors:t[n].styleVariationSelectors,name:n}),Object.entries(a?.elements??{}).forEach(([u,d])=>{typeof t!="string"&&d&&t?.[n]&&sn.__EXPERIMENTAL_ELEMENTS[u]&&o.push({styles:d,selector:t[n]?.selector.split(",").map(f=>sn.__EXPERIMENTAL_ELEMENTS[u].split(",").map(h=>f+" "+h)).join(",")})}),o.push(...c)}),o},TPe=(e,t)=>{let o=[];if(!e?.settings)return o;let r=s=>{let a={};return tI.forEach(({path:c})=>{let u=Fo(s,c,!1);u!==!1&&(a=Wee(a,c,u))}),a},n=r(e.settings),i=e.settings?.custom;return(Object.keys(n).length>0||i)&&o.push({presets:n,custom:i,selector:J_}),Object.entries(e.settings?.blocks??{}).forEach(([s,a])=>{let c=a.custom;if(typeof t=="string"||!t[s])return;let u=r(a);(Object.keys(u).length>0||c)&&o.push({presets:u,custom:c,selector:t[s]?.selector,featureSelectors:t[s]?.featureSelectors})}),o};var nI=(e,t,o,r,n=!1,i=!1,s={})=>{let a={blockGap:!0,blockStyles:!0,layoutStyles:!0,marginReset:!0,presets:!0,rootPadding:!0,variationStyles:!1,...s},c=EPe(e,t),u=TPe(e,t),d=e?.settings?.useRootPaddingAwareAlignments,{contentSize:f,wideSize:m}=e?.settings?.layout||{},h=a.marginReset||a.rootPadding||a.layoutStyles,p="";if(a.presets&&(f||m)&&(p+=`${J_} {`,p=f?p+` --wp--style--global--content-size: ${f};`:p,p=m?p+` --wp--style--global--wide-size: ${m};`:p,p+="}"),h&&(p+=":where(body) {margin: 0;",a.rootPadding&&d&&(p+=`padding-right: 0; padding-left: 0; padding-top: var(--wp--style--root--padding-top); padding-bottom: var(--wp--style--root--padding-bottom) } |
| 85 |
.has-global-padding { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); } |
| 86 |
.has-global-padding > .alignfull { margin-right: calc(var(--wp--style--root--padding-right) * -1); margin-left: calc(var(--wp--style--root--padding-left) * -1); } |
| 87 |
.has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) { padding-right: 0; padding-left: 0; } |
| 88 |
.has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) > .alignfull { margin-left: 0; margin-right: 0; |
| 89 |
`),p+="}"),a.blockStyles&&c.forEach(({selector:g,duotoneSelector:b,styles:k,fallbackGapValue:v,hasLayoutSupport:y,featureSelectors:_,styleVariationSelectors:S,skipSelectorWrapper:C,name:B})=>{if(_){let T=T4(_,k);T=B4(T,e.settings,B),T=E4(T,e.settings),Object.entries(T).forEach(([E,L])=>{if(L.length){let I=L.join(";");p+=`:root :where(${E}){${I};}`}})}if(b){let T={};k?.filter&&(T.filter=k.filter,delete k.filter);let E=db(T);E.length&&(p+=`${b}{${E.join(";")};}`)}!n&&($a===g||y)&&(p+=I4({style:k,selector:g,hasBlockGapSupport:o,hasFallbackGapSupport:r,fallbackGapValue:v}));let P=db(k,g,d,e,i);if(P?.length){let T=C?g:`:root :where(${g})`;p+=`${T}{${P.join(";")};}`}k?.css&&(p+=oS(k.css,`:root :where(${g})`)),a.variationStyles&&S&&Object.entries(S).forEach(([T,E])=>{let L=k?.variations?.[T];if(L){if(_){let R=T4(_,L);R=B4(R,e.settings,B),R=E4(R,e.settings),Object.entries(R).forEach(([V,j])=>{if(j.length){let H=ite(V,E),F=j.join(";");p+=`:root :where(${H}){${F};}`}})}let I=db(L,E,d,e);if(I.length&&(p+=`:root :where(${E}){${I.join(";")};}`),L?.css&&(p+=oS(L.css,`:root :where(${E})`)),p=rte(L,E,p,_,e.settings,B,E),y&&L?.spacing?.blockGap){let R=E+g;p+=I4({style:L,selector:R,hasBlockGapSupport:!0,hasFallbackGapSupport:r,fallbackGapValue:v})}}}),p=rte(k,g,p,_,e.settings,B)}),a.layoutStyles&&(p=p+".wp-site-blocks > .alignleft { float: left; margin-right: 2em; }",p=p+".wp-site-blocks > .alignright { float: right; margin-left: 2em; }",p=p+".wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }"),a.blockGap&&o){let g=C4(e?.styles?.spacing?.blockGap)||"0.5em";p=p+`:root :where(.wp-site-blocks) > * { margin-block-start: ${g}; margin-block-end: 0; }`,p=p+":root :where(.wp-site-blocks) > :first-child { margin-block-start: 0; }",p=p+":root :where(.wp-site-blocks) > :last-child { margin-block-end: 0; }"}return a.presets&&u.forEach(({selector:g,presets:b})=>{($a===g||J_===g)&&(g="");let k=wPe(g,b);k.length>0&&(p+=k)}),p};var IPe=(e,t)=>{if(e?.selectors&&Object.keys(e.selectors).length>0)return e.selectors;let o={root:t};return Object.entries(SPe).forEach(([r,n])=>{let i=di(e,r);i&&(o[n]=i)}),o},iI=(e,t)=>{let{getBlockStyles:o}=(0,nte.select)(sn.store),r={};return e.forEach(n=>{let i=n.name,s=di(n);if(!s)return;let a=di(n,"filter.duotone");if(!a){let h=di(n),p=(0,sn.getBlockSupport)(n,"color.__experimentalDuotone",!1);typeof p=="string"&&h&&(a=ea(h,p))}let c=!!n?.supports?.layout||!!n?.supports?.__experimentalLayout,u=n?.supports?.spacing?.blockGap?.__experimentalDefault,d=o(i),f={};d?.forEach(h=>{let p=t?`-${t}`:"",g=`${h.name}${p}`,b=qee(g,s);f[g]=b});let m=IPe(n,s);r[i]={duotoneSelector:a??void 0,fallbackGapValue:u,featureSelectors:Object.keys(m).length?m:void 0,hasLayoutSupport:c,name:i,selector:s,styleVariationSelectors:d?.length?f:void 0}}),r};function oS(e,t){let o="";return!e||e.trim()===""||e.split("&").forEach(n=>{if(!n||n.trim()==="")return;if(!n.includes("{"))o+=`:root :where(${t}){${n.trim()}}`;else{let s=n.replace("}","").split("{");if(s.length!==2)return;let[a,c]=s,u=a.match(/([>+~\s]*::[a-zA-Z-]+)/),d=u?u[1]:"",f=u?a.replace(d,"").trim():a.trim(),m;f===""?m=t:m=a.startsWith(" ")?ea(t,f):oI(t,f),o+=`:root :where(${m})${d}{${c.trim()}}`}}),o}var nS=l(w(),1),P4="is-style-";function ste(e){return e?e.split(/\s+/).reduce((t,o)=>{if(o.startsWith(P4)){let r=o.slice(P4.length);r!=="default"&&t.push(r)}return t},[]):[]}function R4(e,t=[]){let o=ste(e);if(!o)return null;for(let r of o)if(t.some(n=>n.name===r))return r;return null}function PPe({override:e}){pc(e)}function O4({config:e}){let{overrides:t}=(0,rS.useSelect)(n=>({overrides:M(n(x)).getStyleOverrides()}),[]),{getBlockName:o}=(0,rS.useSelect)(x),r=(0,sI.useMemo)(()=>{if(!t?.length)return;let n=[],i=[];for(let[,s]of t)if(s?.variation&&s?.clientId&&!i.includes(s.clientId)){let a=o(s.clientId),c=e?.styles?.blocks?.[a]?.variations?.[s.variation];if(c){let u={settings:e?.settings,styles:{blocks:{[a]:{variations:{[`${s.variation}-${s.clientId}`]:c}}}}},d=iI((0,iS.getBlockTypes)(),s.clientId),g=nI(u,d,!1,!0,!0,!0,{blockGap:!1,blockStyles:!0,layoutStyles:!1,marginReset:!1,presets:!1,rootPadding:!1,variationStyles:!0});n.push({id:`${s.variation}-${s.clientId}`,css:g,__unstableType:"variation",variation:s.variation,clientId:s.clientId}),i.push(s.clientId)}}return n},[e,t,o]);return!r||!r.length?null:(0,nS.jsx)(nS.Fragment,{children:r.map(n=>(0,nS.jsx)(PPe,{override:n},n.id))})}function A4(e,t,o){if(!e?.styles?.blocks?.[t]?.variations?.[o])return;let r=i=>{Object.keys(i).forEach(s=>{let a=i[s];if(typeof a=="object"&&a!==null)if(a.ref!==void 0)if(typeof a.ref!="string"||a.ref.trim()==="")delete i[s];else{let c=Pl(e,a.ref);c?i[s]=c:delete i[s]}else r(a),Object.keys(a).length===0&&delete i[s]})},n=JSON.parse(JSON.stringify(e.styles.blocks[t].variations[o]));return r(n),n}function RPe(e,t,o){let{globalSettings:r,globalStyles:n}=(0,rS.useSelect)(i=>{let s=i(x).getSettings();return{globalSettings:s.__experimentalFeatures,globalStyles:s[Ri]}},[]);return(0,sI.useMemo)(()=>{let i=A4({settings:r,styles:n},e,t);return{settings:r,styles:{blocks:{[e]:{variations:{[`${t}-${o}`]:i}}}}}},[r,n,t,o,e])}function OPe({name:e,className:t,clientId:o}){let{getBlockStyles:r}=(0,rS.useSelect)(iS.store),n=r(e),i=R4(t,n),s=`${P4}${i}-${o}`,{settings:a,styles:c}=RPe(e,i,o),u=(0,sI.useMemo)(()=>{if(!i)return;let d={settings:a,styles:c},f=iI((0,iS.getBlockTypes)(),o);return nI(d,f,!1,!0,!0,!0,{blockGap:!1,blockStyles:!0,layoutStyles:!1,marginReset:!1,presets:!1,rootPadding:!1,variationStyles:!0})},[i,a,c,o]);return pc({id:`variation-${o}`,css:u,__unstableType:"variation",variation:i,clientId:o}),i?{className:s}:{}}var ate={hasSupport:()=>!0,attributeKeys:["className"],isMatch:({className:e})=>ste(e).length>0,useBlockProps:OPe};var Od=l(w(),1),APe=(0,Od.jsxs)(ta.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24","aria-hidden":"true",focusable:"false",children:[(0,Od.jsx)(ta.Path,{d:"M17.2 10.9c-.5-1-1.2-2.1-2.1-3.2-.6-.9-1.3-1.7-2.1-2.6L12 4l-1 1.1c-.6.9-1.3 1.7-2 2.6-.8 1.2-1.5 2.3-2 3.2-.6 1.2-1 2.2-1 3 0 3.4 2.7 6.1 6.1 6.1s6.1-2.7 6.1-6.1c0-.8-.3-1.8-1-3z"}),(0,Od.jsx)(ta.Path,{stroke:"currentColor",strokeWidth:"1.5",d:"M17.2 10.9c-.5-1-1.2-2.1-2.1-3.2-.6-.9-1.3-1.7-2.1-2.6L12 4l-1 1.1c-.6.9-1.3 1.7-2 2.6-.8 1.2-1.5 2.3-2 3.2-.6 1.2-1 2.2-1 3 0 3.4 2.7 6.1 6.1 6.1s6.1-2.7 6.1-6.1c0-.8-.3-1.8-1-3z"})]});function LPe({clientId:e}){let{stylesToRender:t,activeStyle:o,className:r}=ab({clientId:e}),{updateBlockAttributes:n}=(0,aI.useDispatch)(x),{globalSettings:i,globalStyles:s,blockName:a}=(0,aI.useSelect)(d=>{let f=d(x).getSettings();return{globalSettings:f.__experimentalFeatures,globalStyles:f[Ri],blockName:d(x).getBlockName(e)}},[e]),c=o?.name?A4({settings:i,styles:s},a,o.name)?.color?.background:void 0;return!t||t.length===0?null:(0,Od.jsx)(ta.ToolbarGroup,{children:(0,Od.jsx)(ta.ToolbarButton,{onClick:()=>{let f=(t.findIndex(p=>p.name===o.name)+1)%t.length,m=t[f],h=Pd(r,o,m);n(e,{className:h})},label:(0,lte.__)("Shuffle styles"),children:(0,Od.jsx)(ta.Icon,{icon:APe,style:{fill:c||"transparent"}})})})}var cte=LPe;var uI=l(A(),1),L4=l(N(),1),ute=l(z(),1),dI=l(Y(),1);var lI=l(z(),1);function cI(e){let{isSectionBlock:t,isWithinSection:o,isWithinEditedSection:r,isEditingContentOnlySection:n,editedContentOnlySection:i}=(0,lI.useSelect)(u=>{let{isSectionBlock:d,getParentSectionBlock:f,getEditedContentOnlySection:m,isWithinEditedContentOnlySection:h}=M(u(x)),p=m();return{isSectionBlock:d(e),isWithinSection:d(e)||!!f(e),isWithinEditedSection:h(e),isEditingContentOnlySection:p===e,editedContentOnlySection:p}},[e]),s=(0,lI.useDispatch)(x),{editContentOnlySection:a,stopEditingContentOnlySection:c}=M(s);return{isSectionBlock:t,isWithinSection:o,isWithinEditedSection:r,isEditingContentOnlySection:n,editedContentOnlySection:i,editContentOnlySection:a,stopEditingContentOnlySection:c}}var N4=l(w(),1);function dte({clientId:e}){let{isSectionBlock:t,isEditingContentOnlySection:o,editContentOnlySection:r,stopEditingContentOnlySection:n}=cI(e),i=(0,ute.useSelect)(c=>{if(!e)return null;let{getBlockName:u}=c(x),d=u(e);return d?{name:d}:null},[e]);if(!e||!t&&!o||(0,dI.isReusableBlock)(i)||(0,dI.isTemplatePart)(i))return null;let s=o;return(0,N4.jsx)(uI.ToolbarGroup,{children:(0,N4.jsx)(uI.ToolbarButton,{onClick:()=>{s?n():r(e)},children:s?(0,L4.__)("Exit pattern"):(0,L4.__)("Edit pattern")})})}var Vte=l(A(),1),Fte=l(N(),1),zte=l(z(),1);var uS=l(Y(),1),jte=l(wh(),1);var Ka=l(N(),1),Ya=l(A(),1),Ld=l(Y(),1),kI=l(z(),1);var vte=l(N(),1),aS=l(A(),1),mI=l(Y(),1),pI=l(O(),1);var fte=l(A(),1),mte=l(X(),1);var sS=l(w(),1);function Ad({blocks:e,placement:t="right-start",offset:o=16,anchor:r}){return(0,mte.useViewportMatch)("medium","<")?null:(0,sS.jsx)("div",{className:"block-editor-block-switcher__popover-preview-container",children:(0,sS.jsx)(fte.Popover,{className:"block-editor-block-switcher__popover-preview",placement:t,focusOnMount:!1,offset:o,anchor:r,children:(0,sS.jsx)("div",{className:"block-editor-block-switcher__preview",children:(0,sS.jsx)(Tn,{viewportWidth:601,blocks:e})})})})}var pte=l(A(),1),fb=l(Y(),1),hte=l(z(),1),fI=l(O(),1);var hc=l(w(),1),NPe={};function gte({clientIds:e,blocks:t}){let{activeBlockVariation:o,blockVariationTransformations:r}=(0,hte.useSelect)(i=>{let{getBlockAttributes:s,canRemoveBlocks:a}=i(x),{getActiveBlockVariation:c,getBlockVariations:u}=i(fb.store),d=a(e);if(t.length!==1||!d)return NPe;let[f]=t;return{blockVariationTransformations:u(f.name,"transform"),activeBlockVariation:c(f.name,s(f.clientId))}},[e,t]);return(0,fI.useMemo)(()=>r?.filter(({name:i})=>i!==o?.name),[r,o])}var MPe=({transformations:e,onSelect:t,blocks:o})=>{let[r,n]=(0,fI.useState)();return(0,hc.jsxs)(hc.Fragment,{children:[r&&(0,hc.jsx)(Ad,{blocks:(0,fb.cloneBlock)(o[0],e.find(({name:i})=>i===r).attributes)}),e?.map(i=>(0,hc.jsx)(DPe,{item:i,onSelect:t,setHoveredTransformItemName:n},i.name))]})};function DPe({item:e,onSelect:t,setHoveredTransformItemName:o}){let{name:r,icon:n,title:i}=e;return(0,hc.jsxs)(pte.MenuItem,{className:(0,fb.getBlockMenuDefaultClassName)(r),onClick:s=>{s.preventDefault(),t(r)},onMouseLeave:()=>o(null),onMouseEnter:()=>o(r),onFocus:()=>o(r),onBlur:()=>o(null),children:[(0,hc.jsx)(Ae,{icon:n,showColors:!0}),i]})}var bte=MPe;var An=l(w(),1);function VPe(e){let t={"core/paragraph":1,"core/heading":2,"core/list":3,"core/quote":4},o=(0,pI.useMemo)(()=>{let r=Object.keys(t),n=e.reduce((i,s)=>{let{name:a}=s;return r.includes(a)?i.priorityTextTransformations.push(s):i.restTransformations.push(s),i},{priorityTextTransformations:[],restTransformations:[]});if(n.priorityTextTransformations.length===1&&n.priorityTextTransformations[0].name==="core/quote"){let i=n.priorityTextTransformations.pop();n.restTransformations.push(i)}return n},[e]);return o.priorityTextTransformations.sort(({name:r},{name:n})=>t[r]<t[n]?-1:1),o}var FPe=({className:e,possibleBlockTransformations:t,possibleBlockVariationTransformations:o,onSelect:r,onSelectVariation:n,blocks:i})=>{let[s,a]=(0,pI.useState)(),{priorityTextTransformations:c,restTransformations:u}=VPe(t),d=c.length&&u.length,f=!!u.length&&(0,An.jsx)(zPe,{restTransformations:u,onSelect:r,setHoveredTransformItemName:a});return(0,An.jsxs)(An.Fragment,{children:[(0,An.jsxs)(aS.MenuGroup,{label:(0,vte.__)("Transform to"),className:e,children:[s&&(0,An.jsx)(Ad,{blocks:(0,mI.switchToBlockType)(i,s)}),!!o?.length&&(0,An.jsx)(bte,{transformations:o,blocks:i,onSelect:n}),c.map(m=>(0,An.jsx)(kte,{item:m,onSelect:r,setHoveredTransformItemName:a},m.name)),!d&&f]}),!!d&&(0,An.jsx)(aS.MenuGroup,{className:e,children:f})]})};function zPe({restTransformations:e,onSelect:t,setHoveredTransformItemName:o}){return e.map(r=>(0,An.jsx)(kte,{item:r,onSelect:t,setHoveredTransformItemName:o},r.name))}function kte({item:e,onSelect:t,setHoveredTransformItemName:o}){let{name:r,icon:n,title:i,isDisabled:s}=e;return(0,An.jsxs)(aS.MenuItem,{className:(0,mI.getBlockMenuDefaultClassName)(r),onClick:a=>{a.preventDefault(),t(r)},disabled:s,onMouseLeave:()=>o(null),onMouseEnter:()=>o(r),onFocus:()=>o(r),onBlur:()=>o(null),children:[(0,An.jsx)(Ae,{icon:n,showColors:!0}),i]})}var yte=FPe;var xte=l(N(),1),wte=l(A(),1),gI=l(O(),1);var hI=l(A(),1);var mb=l(w(),1),_te=()=>{};function Ste({stylesToRender:e,activeStyle:t,onSelect:o=_te,onHoverStyle:r=_te}){return!e||e.length===0?null:(0,mb.jsx)(mb.Fragment,{children:e.map(n=>{let i=n.label||n.name;return(0,mb.jsx)(hI.MenuItem,{icon:t.name===n.name?Ts:null,onClick:()=>o(n),onFocus:()=>r(n),onBlur:()=>r(null),onMouseEnter:()=>r(n),onMouseLeave:()=>r(null),children:(0,mb.jsx)(hI.__experimentalText,{as:"span",limit:18,ellipsizeMode:"tail",truncate:!0,children:i})},n.name)})})}var lS=l(w(),1);function bI({hoveredBlock:e,onSwitch:t}){let{clientId:o}=e,[r,n]=(0,gI.useState)(null),{onSelect:i,stylesToRender:s,activeStyle:a,genericPreviewBlock:c,className:u}=ab({clientId:o,onSwitch:t}),d=(0,gI.useMemo)(()=>{if(!r||!c)return null;let f=Pd(u,a,r);return[{...c,attributes:{...c.attributes||{},className:f}}]},[r,c,u,a]);return!s||s.length===0?null:(0,lS.jsxs)(wte.MenuGroup,{label:(0,xte.__)("Styles"),className:"block-editor-block-switcher__styles__menugroup",children:[d&&(0,lS.jsx)(Ad,{blocks:d}),(0,lS.jsx)(Ste,{stylesToRender:s,activeStyle:a,onSelect:i,onHoverStyle:n})]})}var D4=l(N(),1),Pte=l(O(),1),vI=l(X(),1);var gc=l(A(),1);var Ete=l(O(),1),Tte=l(Y(),1);var Cte=l(Y(),1),M4=(e,t,o=new Set)=>{let{clientId:r,name:n,innerBlocks:i=[]}=e;if(!o.has(r)){if(n===t)return e;for(let s of i){let a=M4(s,t,o);if(a)return a}}},Bte=(e,t)=>{let o=(0,Cte.getBlockAttributesNamesByRole)(e,"content");return o?.length?o.reduce((r,n)=>(t[n]&&(r[n]=t[n]),r),{}):t};var jPe=(e,t)=>{let o=Bte(t.name,t.attributes);e.attributes={...e.attributes,...o}},UPe=(e,t)=>{let o=t.map(n=>(0,Tte.cloneBlock)(n)),r=new Set;for(let n of e){let i=!1;for(let s of o){let a=M4(s,n.name,r);if(a){i=!0,r.add(a.clientId),jPe(a,n);break}}if(!i)return}return o},HPe=(e,t)=>(0,Ete.useMemo)(()=>e.reduce((o,r)=>{let n=UPe(t,r.blocks);return n&&o.push({...r,transformedBlocks:n}),o},[]),[e,t]),Ite=HPe;var Br=l(w(),1);function GPe({blocks:e,patterns:t,onSelect:o}){let[r,n]=(0,Pte.useState)(!1),i=Ite(t,e);return i.length?(0,Br.jsxs)(gc.MenuGroup,{className:"block-editor-block-switcher__pattern__transforms__menugroup",children:[r&&(0,Br.jsx)(WPe,{patterns:i,onSelect:o}),(0,Br.jsx)(gc.MenuItem,{onClick:s=>{s.preventDefault(),n(!r)},icon:Go,children:(0,D4.__)("Patterns")})]}):null}function WPe({patterns:e,onSelect:t}){let o=(0,vI.useViewportMatch)("medium","<");return(0,Br.jsx)("div",{className:"block-editor-block-switcher__popover-preview-container",children:(0,Br.jsx)(gc.Popover,{className:"block-editor-block-switcher__popover-preview",placement:o?"bottom":"right-start",offset:16,children:(0,Br.jsx)("div",{className:"block-editor-block-switcher__preview is-pattern-list-preview",children:(0,Br.jsx)($Pe,{patterns:e,onSelect:t})})})})}function $Pe({patterns:e,onSelect:t}){return(0,Br.jsx)(gc.Composite,{role:"listbox",className:"block-editor-block-switcher__preview-patterns-container","aria-label":(0,D4.__)("Patterns list"),children:e.map(o=>(0,Br.jsx)(Rte,{pattern:o,onSelect:t},o.name))})}function Rte({pattern:e,onSelect:t}){let o="block-editor-block-switcher__preview-patterns-container",r=(0,vI.useInstanceId)(Rte,`${o}-list__item-description`);return(0,Br.jsxs)("div",{className:`${o}-list__list-item`,children:[(0,Br.jsxs)(gc.Composite.Item,{render:(0,Br.jsx)("div",{role:"option","aria-label":e.title,"aria-describedby":e.description?r:void 0,className:`${o}-list__item`}),onClick:()=>t(e.transformedBlocks),children:[(0,Br.jsx)(Tn,{blocks:e.transformedBlocks,viewportWidth:e.viewportWidth||500}),(0,Br.jsx)("div",{className:`${o}-list__item-title`,children:e.title})]}),!!e.description&&(0,Br.jsx)(Ge,{id:r,children:e.description})]})}var Ote=GPe;var fi=l(w(),1);function KPe({onClose:e,clientIds:t}){let{replaceBlocks:o,multiSelect:r,updateBlockAttributes:n}=(0,kI.useDispatch)(x),{possibleBlockTransformations:i,patterns:s,blocks:a,isUsingBindings:c,canRemove:u,hasBlockStyles:d}=(0,kI.useSelect)(P=>{let{getBlockAttributes:T,getBlocksByClientId:E,getBlockRootClientId:L,getBlockTransformItems:I,__experimentalGetPatternTransformItems:R,canRemoveBlocks:V,getBlockName:j}=P(x),{getBlockStyles:H}=P(Ld.store),F=L(t[0]),U=E(t),G=t.length===1,W=G&&j(t[0]),J=G&&!!H(W)?.length;return{blocks:U,possibleBlockTransformations:I(U,F),patterns:R(U,F),isUsingBindings:t.every(le=>!!T(le)?.metadata?.bindings),canRemove:V(t),hasBlockStyles:J}},[t]),f=gte({clientIds:t,blocks:a});function m(P){P.length>1&&r(P[0].clientId,P[P.length-1].clientId)}function h(P){let T=(0,Ld.switchToBlockType)(a,P);o(t,T),m(T)}function p(P){n(a[0].clientId,{...f.find(({name:T})=>T===P).attributes})}function g(P){o(t,P),m(P)}let b=a.length===1,k=b&&((0,Ld.isTemplatePart)(a[0])||(0,Ld.isReusableBlock)(a[0])),v=!!i?.length&&u&&!k,y=!!f?.length,_=!!s?.length&&u,S=v||y;if(!(d||S||_))return(0,fi.jsx)("p",{className:"block-editor-block-switcher__no-transforms",children:(0,Ka.__)("No transforms.")});let B=b?(0,Ka._x)("This block is connected.","block toolbar button label and description"):(0,Ka._x)("These blocks are connected.","block toolbar button label and description");return(0,fi.jsxs)("div",{className:"block-editor-block-switcher__container",children:[_&&(0,fi.jsx)(Ote,{blocks:a,patterns:s,onSelect:P=>{g(P),e()}}),S&&(0,fi.jsx)(yte,{className:"block-editor-block-switcher__transforms__menugroup",possibleBlockTransformations:i,possibleBlockVariationTransformations:f,blocks:a,onSelect:P=>{h(P),e()},onSelectVariation:P=>{p(P),e()}}),d&&(0,fi.jsx)(bI,{hoveredBlock:a[0],onSwitch:e}),c&&(0,fi.jsx)(Ya.MenuGroup,{children:(0,fi.jsx)(Ya.__experimentalText,{className:"block-editor-block-switcher__binding-indicator",children:B})})]})}var YPe=({children:e,clientIds:t,label:o,text:r})=>{let i=t.length===1?(0,Ka.__)("Change block type or style"):(0,Ka.sprintf)((0,Ka._n)("Change type of %d block","Change type of %d blocks",t.length),t.length);return(0,fi.jsx)(Ya.ToolbarGroup,{children:(0,fi.jsx)(Ya.ToolbarItem,{children:s=>(0,fi.jsx)(Ya.DropdownMenu,{className:"block-editor-block-switcher",label:o,popoverProps:{placement:"bottom-start",className:"block-editor-block-switcher__popover"},icon:e,text:r,toggleProps:{description:i,...s},menuProps:{orientation:"both"},children:({onClose:a})=>(0,fi.jsx)(KPe,{onClose:a,clientIds:t})})})})},Ate=YPe;var Lte=l(N(),1),hb=l(A(),1);var pb=l(w(),1);function Nte({clientIds:e,children:t,label:o,text:r}){return(0,pb.jsx)(hb.ToolbarGroup,{children:(0,pb.jsx)(hb.ToolbarItem,{children:n=>(0,pb.jsx)(hb.DropdownMenu,{className:"block-editor-block-switcher",label:o,popoverProps:{placement:"bottom-start",className:"block-editor-block-switcher__popover"},icon:t,text:r,toggleProps:{description:(0,Lte.__)("Change block style"),...n},menuProps:{orientation:"both"},children:({onClose:i})=>(0,pb.jsx)("div",{className:"block-editor-block-switcher__container",children:(0,pb.jsx)(bI,{hoveredBlock:{clientId:e[0]},onSwitch:i})})})})})}var gb=l(A(),1),cS=l(N(),1),yI=l(O(),1),Mte=l(z(),1);var bc=l(w(),1);function qPe({clientIds:e,blockTitle:t}){let o=(0,Mte.useSelect)(i=>{let{getBlockAttributes:s}=i(x);return s(e?.[0])?.metadata?.name},[e]),r=e.length===1,n;return r&&o?n=(0,cS.sprintf)((0,cS.__)('This %1$s is editable using the "%2$s" override.'),t.toLowerCase(),o):n=(0,cS.__)("These blocks are editable using overrides."),(0,bc.jsx)(gb.__experimentalText,{children:n})}function Dte({icon:e,clientIds:t,blockTitle:o,label:r}){let[n,i]=(0,yI.useState)(!1),s=(0,yI.useRef)();return(0,bc.jsxs)(bc.Fragment,{children:[(0,bc.jsx)(gb.ToolbarButton,{ref:s,className:"block-editor-block-toolbar__pattern-overrides-indicator",icon:e,label:r,onClick:()=>i(!n),"aria-expanded":n}),n&&(0,bc.jsx)(gb.Popover,{anchor:s.current,onClose:()=>i(!1),placement:"bottom-start",offset:16,className:"block-editor-block-toolbar__pattern-overrides-popover",children:(0,bc.jsx)(qPe,{clientIds:t,blockTitle:o})})]})}var bb=l(w(),1);function ZPe({select:e,clientIds:t}){let{getBlockName:o,getBlockAttributes:r,getBlockParentsByBlockName:n,canRemoveBlocks:i,getTemplateLock:s,getBlockEditingMode:a,canEditBlock:c}=M(e(x)),{getBlockStyles:u}=e(uS.store),d=t.some(T=>s(T)==="contentOnly"),f=t.length===1,m=f&&o(t[0]),h=f&&!!u(m)?.length,p=t.some(T=>!!r(T)?.metadata?.patternName),g=t.every(T=>pk(r(T)?.metadata?.bindings)),b=t.every(T=>n(T,"core/block",!0).length>0),k=i(t),v=t.every(T=>c(T)),y=a(t[0]),_=y==="default",S=y==="contentOnly",B=!p&&_&&(h||k)&&!d&&v,P=g&&b;return B?"switcher":S&&h&&!g&&v?"styles-only":P?"pattern-overrides":"default"}function XPe({select:e,clientIds:t}){let{getBlockName:o,getBlockAttributes:r}=M(e(x)),n=t.length===1,i=t[0],s=r(i);if(n&&s?.metadata?.patternName)return Ni;let a=o(i),c=(0,uS.getBlockType)(a);if(n){let{getActiveBlockVariation:f}=e(uS.store);return f(a,s)?.icon||c?.icon}let u=t.map(f=>o(f));return new Set(u).size===1?c?.icon:Zf}function Ute({clientIds:e,isSynced:t}){let{icon:o,showIconLabels:r,variant:n}=(0,zte.useSelect)(f=>({icon:XPe({select:f,clientIds:e}),showIconLabels:f(jte.store).get("core","showIconLabels"),variant:ZPe({select:f,clientIds:e})}),[e]),i=Sr({clientId:e?.[0],maximumLength:35}),s=e.length===1,a=s&&t&&!r,c=s?i:(0,Fte.__)("Multiple blocks selected"),u=a&&i?i:void 0,d=(0,bb.jsx)(Ae,{className:"block-editor-block-toolbar__block-icon",icon:o});return n==="switcher"?(0,bb.jsx)(Ate,{clientIds:e,label:c,text:u,children:d}):n==="styles-only"?(0,bb.jsx)(Nte,{clientIds:e,label:c,text:u,children:d}):n==="pattern-overrides"?(0,bb.jsx)(Dte,{icon:d,clientIds:e,blockTitle:i,label:c}):(0,bb.jsx)(Vte.ToolbarButton,{disabled:!0,className:"block-editor-block-toolbar__block-icon-button",title:c,icon:d,text:u})}var nt=l(w(),1);function F4({hideDragHandle:e,focusOnMount:t,__experimentalInitialIndex:o,__experimentalOnIndexChange:r,variant:n="unstyled"}){let{blockClientId:i,blockClientIds:s,isDefaultEditingMode:a,blockType:c,toolbarKey:u,shouldShowVisualToolbar:d,showParentSelector:f,isUsingBindings:m,isSectionContainer:h,hasContentOnlyLocking:p,showShuffleButton:g,showSlots:b,showGroupButtons:k,showLockButtons:v,showBlockVisibilityButton:y,showSwitchSectionStyleButton:_,areSelectedBlocksHiddenOnViewport:S,canEdit:C}=(0,Gte.useSelect)(H=>{let{canEditBlock:F}=H(x),{getBlockName:U,getBlockMode:G,getBlockParents:W,getSelectedBlockClientIds:J,isBlockValid:le,getBlockEditingMode:oe,getBlockAttributes:re,getSettings:Q,getTemplateLock:$,getParentSectionBlock:ee,isZoomOut:K,isSectionBlock:te,isBlockHiddenAtViewport:ne}=M(H(x)),q=J(),se=q[0],he=W(se),xe=ee(se)??he[he.length-1],De=U(xe),lt=(0,vc.getBlockType)(De),Dt=oe(se),so=Dt==="default",or=U(se),Je=q.every(Fe=>le(Fe)),hr=q.every(Fe=>G(Fe)==="visual"),Zt=q.every(Fe=>!!re(Fe)?.metadata?.bindings),ao=q.some(Fe=>$(Fe)==="contentOnly"),Ze=K(),Vt=te(se),et=F(se),Ue=et&&(Ze||Vt),Ho=Q()?.[Oi]?.toLowerCase()||"desktop",Yn=q.length>0&&q.every(Fe=>ne(Fe,Ho));return{blockClientId:se,blockClientIds:q,isDefaultEditingMode:so,blockType:se&&(0,vc.getBlockType)(or),shouldShowVisualToolbar:Je&&hr,toolbarKey:`${se}${xe}`,showParentSelector:!Ze&<&&Dt!=="contentOnly"&&oe(xe)!=="disabled"&&(0,vc.hasBlockSupport)(lt,"__experimentalParentSelector",!0)&&q.length===1,isUsingBindings:Zt,isSectionContainer:Vt,hasContentOnlyLocking:ao,showShuffleButton:Ze,showSlots:!Ze,showGroupButtons:!Ze,showLockButtons:!Ze,showBlockVisibilityButton:!Ze,showSwitchSectionStyleButton:Ue,areSelectedBlocksHiddenOnViewport:Yn,canEdit:et}},[]),B=(0,V4.useRef)(null),P=(0,V4.useRef)(),T=Xg({ref:P}),E=!(0,Wte.useViewportMatch)("medium","<");if(!ZT())return null;let I=s.length>1,R=(0,vc.isReusableBlock)(c)||(0,vc.isTemplatePart)(c),V=D("block-editor-block-contextual-toolbar",{"has-parent":f}),j=D("block-editor-block-toolbar",{"is-synced":R,"is-connected":m});return(0,nt.jsx)(ib,{focusEditorOnEscape:!0,className:V,"aria-label":(0,Hte.__)("Block tools"),variant:n==="toolbar"?void 0:n,focusOnMount:t,__experimentalInitialIndex:o,__experimentalOnIndexChange:r,children:(0,nt.jsxs)("div",{ref:B,className:j,children:[f&&!I&&E&&(0,nt.jsx)(gJ,{}),(d||I)&&(0,nt.jsx)("div",{ref:P,...T,children:(0,nt.jsxs)($te.ToolbarGroup,{className:"block-editor-block-toolbar__block-controls",children:[(0,nt.jsx)(Ute,{clientIds:s,isSynced:R}),a&&y&&(0,nt.jsx)(ED,{clientIds:s}),!I&&a&&v&&(0,nt.jsx)(d4,{clientId:i}),(0,nt.jsx)(kT,{clientIds:s,hideDragHandle:e})]})}),!S&&!p&&d&&I&&k&&(0,nt.jsx)(s4,{}),!I&&C&&(0,nt.jsx)(dte,{clientId:s[0]}),!S&&g&&(0,nt.jsx)(Fee,{clientId:s[0]}),!S&&_&&(0,nt.jsx)(cte,{clientId:s[0]}),!S&&d&&b&&(0,nt.jsxs)(nt.Fragment,{children:[!h&&(0,nt.jsxs)(nt.Fragment,{children:[(0,nt.jsx)(Ut.Slot,{group:"parent",className:"block-editor-block-toolbar__slot"}),(0,nt.jsx)(Ut.Slot,{group:"block",className:"block-editor-block-toolbar__slot"}),(0,nt.jsx)(Ut.Slot,{className:"block-editor-block-toolbar__slot"}),(0,nt.jsx)(Ut.Slot,{group:"inline",className:"block-editor-block-toolbar__slot"})]}),(0,nt.jsx)(Ut.Slot,{group:"other",className:"block-editor-block-toolbar__slot"}),(0,nt.jsx)(wT.Slot,{})]}),(0,nt.jsx)(Tee,{clientIds:s}),(0,nt.jsx)(WT,{clientIds:s})]})},u)}function Kte({hideDragHandle:e,variant:t}){return(0,nt.jsx)(F4,{hideDragHandle:e,variant:t,focusOnMount:void 0,__experimentalInitialIndex:void 0,__experimentalOnIndexChange:void 0})}var z4=l(w(),1);function Zte({clientId:e,isTyping:t,__unstableContentRef:o}){let{capturingClientId:r,isInsertionPointVisible:n,lastClientId:i}=dT(e),s=(0,vb.useRef)();(0,vb.useEffect)(()=>{s.current=void 0},[e]);let{stopTyping:a}=(0,Yte.useDispatch)(x),c=(0,vb.useRef)(!1);(0,qte.useShortcut)("core/block-editor/focus-toolbar",()=>{c.current=!0,a(!0)}),(0,vb.useEffect)(()=>{c.current=!1});let u=r||e,d=uT({contentElement:o?.current,clientId:u});return!t&&(0,z4.jsx)(Wm,{clientId:u,bottomClientId:i,className:D("block-editor-block-list__block-popover",{"is-insertion-point-visible":n}),resize:!1,...d,__unstableContentRef:o,children:(0,z4.jsx)(F4,{focusOnMount:c.current,__experimentalInitialIndex:s.current,__experimentalOnIndexChange:f=>{s.current=f},variant:"toolbar"})})}var _I=l(z(),1),SI=l(O(),1);var Xte=l(A(),1);var Qte=l(N(),1),Jte=l(w(),1);function QPe({onClick:e}){return(0,Jte.jsx)(Xte.Button,{variant:"primary",icon:Li,size:"compact",className:D("block-editor-button-pattern-inserter__button","block-editor-block-tools__zoom-out-mode-inserter-button"),onClick:e,label:(0,Qte._x)("Add pattern","Generic label for pattern inserter button")})}var eoe=QPe;var j4=l(w(),1);function JPe(){let[e,t]=(0,SI.useState)(!1),{hasSelection:o,blockOrder:r,setInserterIsOpened:n,sectionRootClientId:i,selectedBlockClientId:s,blockInsertionPoint:a,insertionPointVisible:c}=(0,_I.useSelect)(p=>{let{getSettings:g,getBlockOrder:b,getSelectionStart:k,getSelectedBlockClientId:v,getSectionRootClientId:y,getBlockInsertionPoint:_,isBlockInsertionPointVisible:S}=M(p(x)),C=y();return{hasSelection:!!k().clientId,blockOrder:b(C),sectionRootClientId:C,setInserterIsOpened:g().__experimentalSetIsInserterOpened,selectedBlockClientId:v(),blockInsertionPoint:_(),insertionPointVisible:S()}},[]),{showInsertionPoint:u}=M((0,_I.useDispatch)(x));if((0,SI.useEffect)(()=>{let p=setTimeout(()=>{t(!0)},500);return()=>{clearTimeout(p)}},[]),!e||!o)return null;let d=s,m=r.findIndex(p=>s===p)+1,h=r[m];return c&&a?.index===m?null:(0,j4.jsx)(VE,{previousClientId:d,nextClientId:h,children:(0,j4.jsx)(eoe,{onClick:()=>{n({rootClientId:i,insertionIndex:m,tab:"patterns",category:"all"}),u(i,m,{operation:"insert"})}})})}var toe=JPe;var ooe=l(z(),1),roe=l(Y(),1);function noe(){return(0,ooe.useSelect)(e=>{let{getSelectedBlockClientId:t,getFirstMultiSelectedBlockClientId:o,getBlock:r,getBlockMode:n,getSettings:i,isTyping:s,isBlockInterfaceHidden:a}=M(e(x)),c=t()||o(),u=r(c),d=!!c&&!!u,f=d&&(0,roe.isUnmodifiedDefaultBlock)(u,"content")&&n(c)!=="html",m=c&&!s()&&f,h=!a()&&!i().hasFixedToolbar&&!m&&d&&!f;return{showEmptyBlockSideInserter:m,showBlockToolbarPopover:h}},[])}var ns=l(w(),1);function e2e(e){let{getSelectedBlockClientId:t,getFirstMultiSelectedBlockClientId:o,getSettings:r,isTyping:n,isDragging:i,isZoomOut:s,getViewportModalClientIds:a}=M(e(x));return{clientId:t()||o(),hasFixedToolbar:r().hasFixedToolbar,isTyping:n(),isZoomOutMode:s(),isDragging:i(),viewportModalClientIds:a()}}function dS({children:e,__unstableContentRef:t,...o}){let{clientId:r,hasFixedToolbar:n,isTyping:i,isZoomOutMode:s,isDragging:a,viewportModalClientIds:c}=(0,kb.useSelect)(e2e,[]),u=(0,ioe.__unstableUseShortcutEventMatch)(),{getBlocksByClientId:d,getSelectedBlockClientIds:f,getBlockRootClientId:m,getBlockEditingMode:h,getBlockName:p,isGroupable:g,getEditedContentOnlySection:b,canEditBlock:k}=M((0,kb.useSelect)(x)),{getGroupingBlockName:v}=(0,kb.useSelect)(yb.store),{showEmptyBlockSideInserter:y,showBlockToolbarPopover:_}=noe(),S=Jg(),[C,B]=(0,xI.useState)(null),{canRename:P}=ap(p(f()[0])),{duplicateBlocks:T,removeBlocks:E,replaceBlocks:L,insertAfterBlock:I,insertBeforeBlock:R,selectBlock:V,moveBlocksUp:j,moveBlocksDown:H,expandBlock:F,stopEditingContentOnlySection:U,showViewportModal:G,hideViewportModal:W}=M((0,kb.useDispatch)(x));function J(re){if(!re.defaultPrevented){if(u("core/block-editor/move-up",re)||u("core/block-editor/move-down",re)){let Q=f();if(Q.length){re.preventDefault();let $=m(Q[0]);(u("core/block-editor/move-up",re)?"up":"down")==="up"?j(Q,$):H(Q,$);let K=Array.isArray(Q)?Q.length:1,te=(0,_b.sprintf)((0,_b._n)("%d block moved.","%d blocks moved.",Q.length),K);(0,G4.speak)(te)}}else if(u("core/block-editor/duplicate",re)){let Q=f();Q.length&&(re.preventDefault(),T(Q))}else if(u("core/block-editor/remove",re)){let Q=f();Q.length&&(re.preventDefault(),E(Q))}else if(u("core/block-editor/paste-styles",re)){let Q=f();if(Q.length){re.preventDefault();let $=d(Q);S($)}}else if(u("core/block-editor/insert-after",re)){let Q=f();Q.length&&(re.preventDefault(),I(Q[Q.length-1]))}else if(u("core/block-editor/insert-before",re)){let Q=f();Q.length&&(re.preventDefault(),R(Q[0]))}else if(u("core/block-editor/unselect",re)){if(re.target.closest("[role=toolbar]"))return;let Q=f();Q.length>1&&(re.preventDefault(),V(Q[0]))}else if(u("core/block-editor/collapse-list-view",re)){if((0,U4.isTextField)(re.target)||(0,U4.isTextField)(re.target?.contentWindow?.document?.activeElement))return;re.preventDefault(),F(r)}else if(u("core/block-editor/group",re)){let Q=f();if(Q.length>1&&g(Q)){re.preventDefault();let $=d(Q),ee=v(),K=(0,yb.switchToBlockType)($,ee);L(Q,K),(0,G4.speak)((0,_b.__)("Selected blocks are grouped."))}}else if(u("core/block-editor/rename",re)){let Q=f();if(Q.length===1){let $=h(Q[0])==="contentOnly";P&&!$&&k(Q[0])&&(re.preventDefault(),B(Q[0]))}}else if(u("core/block-editor/toggle-block-visibility",re)){let Q=f();if(Q.length){if(re.preventDefault(),!d(Q).every(K=>(0,yb.hasBlockSupport)(K.name,"visibility",!0))||Q.some(K=>h(K)!=="default"||!k(K)))return;G(Q)}}u("core/block-editor/stop-editing-as-blocks",re)&&b()&&U()}}let le=Gm(t),oe=Gm(t);return(0,ns.jsxs)("div",{...o,onKeyDown:J,className:D(o.className,{"block-editor-block-tools--is-dragging":a}),children:[(0,ns.jsxs)(Gg.Provider,{value:(0,xI.useRef)(!1),children:[!i&&!s&&(0,ns.jsx)(DX,{__unstableContentRef:t}),y&&(0,ns.jsx)(JQ,{__unstableContentRef:t,clientId:r}),_&&(0,ns.jsx)(Zte,{__unstableContentRef:t,clientId:r,isTyping:i}),!s&&!n&&(0,ns.jsx)(H4.Popover.Slot,{name:"block-toolbar",ref:le}),e,(0,ns.jsx)(H4.Popover.Slot,{name:"__unstable-block-tools-after",ref:oe}),s&&!a&&(0,ns.jsx)(toe,{__unstableContentRef:t})]}),C&&(0,ns.jsx)(ip,{clientId:C,onClose:()=>B(null)}),c&&(0,ns.jsx)(xD,{clientIds:c,onClose:W})]})}var is=l(N(),1),qa=l(Y(),1),kc=l(z(),1),W4=l(aoe(),1);var t2e=()=>function(){let{replaceBlocks:t,multiSelect:o}=(0,kc.useDispatch)(x),{blocks:r,clientIds:n,canRemove:i,possibleBlockTransformations:s,invalidSelection:a}=(0,kc.useSelect)(h=>{let{getBlockRootClientId:p,getBlockTransformItems:g,getSelectedBlockClientIds:b,getBlocksByClientId:k,canRemoveBlocks:v}=h(x),y=b(),_=k(y);if(_.filter(C=>!C).length>0)return{invalidSelection:!0};let S=p(y[0]);return{blocks:_,clientIds:y,possibleBlockTransformations:g(_,S),canRemove:v(y),invalidSelection:!1}},[]);if(a)return{isLoading:!1,commands:[]};let c=r.length===1&&(0,qa.isTemplatePart)(r[0]);function u(h){h.length>1&&o(h[0].clientId,h[h.length-1].clientId)}function d(h){let p=(0,qa.switchToBlockType)(r,h);t(n,p),u(p)}let f=!!s.length&&i&&!c;return!n||n.length<1||!f?{isLoading:!1,commands:[]}:{isLoading:!1,commands:s.map(h=>{let{name:p,title:g,icon:b}=h,k=!b?.src||b?.src==="block-default"?{src:xk}:b;return{name:"core/block-editor/transform-to-"+p.replace("/","-"),label:(0,is.sprintf)((0,is.__)("Transform to %s"),g),icon:k?.src,category:"command",callback:({close:v})=>{d(p),v()}}})}},o2e=()=>function(){let{clientIds:t,isUngroupable:o,isGroupable:r}=(0,kc.useSelect)(R=>{let{getSelectedBlockClientIds:V,isUngroupable:j,isGroupable:H}=R(x);return{clientIds:V(),isUngroupable:j(),isGroupable:H()}},[]),{canInsertBlockType:n,getBlockRootClientId:i,getBlocksByClientId:s,canRemoveBlocks:a,isBlockHiddenAnywhere:c}=M((0,kc.useSelect)(x)),{getBlockEditingMode:u}=(0,kc.useSelect)(x),{getDefaultBlockName:d,getGroupingBlockName:f}=(0,kc.useSelect)(qa.store),m=s(t),h=(0,kc.useDispatch)(x),{removeBlocks:p,replaceBlocks:g,duplicateBlocks:b,insertAfterBlock:k,insertBeforeBlock:v}=h,y=()=>{if(!m.length)return;let R=f(),V=(0,qa.switchToBlockType)(m,R);V&&g(t,V)},_=()=>{if(!m.length)return;let R=m[0].innerBlocks;R.length&&g(t,R)};if(!t||t.length<1)return{isLoading:!1,commands:[]};let{showViewportModal:S}=M(h),C=i(t[0]),B=n(d(),C),P=m.every(R=>!!R&&(0,qa.hasBlockSupport)(R.name,"multiple",!0)&&n(R.name,C)),T=a(t),E=[];P&&E.push({name:"duplicate",label:(0,is.__)("Duplicate"),callback:()=>b(t,!0),icon:Zf}),B&&E.push({name:"add-before",label:(0,is.__)("Add before"),callback:()=>{let R=Array.isArray(t)?t[0]:R;v(R)},icon:Li},{name:"add-after",label:(0,is.__)("Add after"),callback:()=>{let R=Array.isArray(t)?t[t.length-1]:R;k(R)},icon:Li}),r&&E.push({name:"Group",label:(0,is.__)("Group"),callback:y,icon:Tk}),o&&E.push({name:"ungroup",label:(0,is.__)("Ungroup"),callback:_,icon:RM}),T&&E.push({name:"remove",label:(0,is.__)("Delete"),callback:()=>p(t,!0),icon:IM});let L=m.every(R=>!!R&&(0,qa.hasBlockSupport)(R.name,"visibility",!0)),I=t.every(R=>u(R)==="default");if(L&&I){let R=t.some(V=>c(V));E.push({name:"toggle-visibility",label:R?(0,is.__)("Show"):(0,is.__)("Hide"),callback:()=>S(t),icon:R?im:Ps})}return{isLoading:!1,commands:E.map(R=>({...R,name:"core/block-editor/action-"+R.name,category:"command",callback:({close:V})=>{R.callback(),V()}}))}},wI=()=>{(0,W4.useCommandLoader)({name:"core/block-editor/blockTransforms",hook:t2e()}),(0,W4.useCommandLoader)({name:"core/block-editor/blockQuickActions",hook:o2e(),context:"block-selection-edit"})};var an=l(w(),1),CI=(0,doe.createSlotFill)(Symbol("BlockCanvasCover"));function loe({children:e}){return(0,an.jsx)("div",{className:"block-canvas-cover",style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",pointerEvents:"none"},children:e})}var r2e={ignoredSelectors:[/\.editor-styles-wrapper/gi]};function $4({shouldIframe:e=!0,height:t="300px",children:o=(0,an.jsx)(xg,{}),styles:r,contentRef:n,iframeProps:i}){wI();let s=(0,BI.useViewportMatch)("medium","<"),a=L_(),c=$m(),u=(0,coe.useRef)(),d=(0,BI.useMergeRefs)([n,c,u]),f=(0,uoe.useSelect)(h=>M(h(x)).getZoomLevel(),[]),m=f!==100&&!s?{scale:f,frameSize:"40px"}:{};return e?(0,an.jsx)(dS,{__unstableContentRef:u,style:{height:t,display:"flex"},children:(0,an.jsxs)(hg,{...i,...m,ref:a,contentRef:d,style:{...i?.style},name:"editor-canvas",children:[(0,an.jsx)(CI.Slot,{fillProps:{containerRef:u},children:h=>h.map((p,g)=>(0,an.jsx)(loe,{children:p},g))}),(0,an.jsx)(Yl,{styles:r}),o]})}):(0,an.jsxs)(dS,{__unstableContentRef:u,style:{height:t,display:"flex"},children:[(0,an.jsx)(CI.Slot,{fillProps:{containerRef:u},children:h=>h.map((p,g)=>(0,an.jsx)(loe,{children:p},g))}),(0,an.jsx)(Yl,{styles:r,scope:":where(.editor-styles-wrapper)",transformOptions:r2e}),(0,an.jsx)(IB,{ref:d,className:"editor-styles-wrapper",tabIndex:-1,style:{height:"100%",width:"100%",overflow:"auto"},children:o})]})}function n2e({children:e,height:t,styles:o}){return(0,an.jsx)($4,{height:t,styles:o,children:e})}var foe=n2e;var Za=l(A(),1),moe=l(N(),1),poe=l(ot(),1),hoe=l(Re(),1),ss=l(w(),1),i2e=()=>(0,ss.jsx)(Za.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:(0,ss.jsx)(Za.Path,{d:"M7.434 5l3.18 9.16H8.538l-.692-2.184H4.628l-.705 2.184H2L5.18 5h2.254zm-1.13 1.904h-.115l-1.148 3.593H7.44L6.304 6.904zM14.348 7.006c1.853 0 2.9.876 2.9 2.374v4.78h-1.79v-.914h-.114c-.362.64-1.123 1.022-2.031 1.022-1.346 0-2.292-.826-2.292-2.108 0-1.27.972-2.006 2.71-2.107l1.696-.102V9.38c0-.584-.42-.914-1.18-.914-.667 0-1.112.228-1.264.647h-1.701c.12-1.295 1.307-2.107 3.066-2.107zm1.079 4.1l-1.416.09c-.793.056-1.18.342-1.18.844 0 .52.45.837 1.091.837.857 0 1.505-.545 1.505-1.256v-.515z"})}),s2e=({style:e,className:t})=>(0,ss.jsx)("div",{className:"block-library-colors-selector__icon-container",children:(0,ss.jsx)("div",{className:`${t} block-library-colors-selector__state-selection`,style:e,children:(0,ss.jsx)(i2e,{})})}),a2e=({TextColor:e,BackgroundColor:t})=>function({onToggle:r,isOpen:n}){let i=s=>{!n&&s.keyCode===poe.DOWN&&(s.preventDefault(),r())};return(0,ss.jsx)(Za.ToolbarGroup,{children:(0,ss.jsx)(Za.ToolbarButton,{className:"components-toolbar__control block-library-colors-selector__toggle",label:(0,moe.__)("Open Colors Selector"),onClick:r,onKeyDown:i,icon:(0,ss.jsx)(t,{children:(0,ss.jsx)(e,{children:(0,ss.jsx)(s2e,{})})})})})},l2e=({children:e,...t})=>((0,hoe.default)("wp.blockEditor.BlockColorsStyleSelector",{alternative:"block supports API",since:"6.1",version:"6.3"}),(0,ss.jsx)(Za.Dropdown,{popoverProps:{placement:"bottom-start"},className:"block-library-colors-selector",contentClassName:"block-library-colors-selector__popover",renderToggle:a2e(t),renderContent:()=>e})),goe=l2e;var xre=l(Re(),1),UI=l(A(),1),Q4=l(N(),1),wre=l(z(),1),Cre=l(O(),1);var Tb=l(X(),1),yre=l(A(),1);var pS=l(z(),1),_re=l(Re(),1),To=l(O(),1),X4=l(N(),1);var MI=l(A(),1),DI=l(O(),1),VI=l(z(),1);var voe=l(X(),1),koe=l(ir(),1),yoe=l(z(),1),RI=l(O(),1),Sb=l(N(),1);var EI=l(O(),1),TI=(0,EI.createContext)({});TI.displayName="ListViewContext";var Nd=()=>(0,EI.useContext)(TI);var II=l(O(),1),boe=l(w(),1);function PI({children:e,...t}){let o=(0,II.useRef)();return(0,II.useEffect)(()=>{o.current&&(o.current.textContent=o.current.textContent)},[e]),(0,boe.jsx)("div",{hidden:!0,...t,ref:o,children:e})}var fS=l(w(),1),K4=(0,RI.forwardRef)(({nestingLevel:e,blockCount:t,clientId:o,...r},n)=>{let{insertedBlock:i,setInsertedBlock:s}=Nd(),a=(0,voe.useInstanceId)(K4),{directInsert:c,hideInserter:u}=(0,yoe.useSelect)(p=>{let{getBlockListSettings:g,getTemplateLock:b,isZoomOut:k}=M(p(x)),y=g(o)?.directInsert||!1,_=!!b(o)||k();return{directInsert:y,hideInserter:_}},[o]),d=Sr({clientId:o,context:"list-view"}),f=Sr({clientId:i?.clientId,context:"list-view"});if((0,RI.useEffect)(()=>{f?.length&&(0,koe.speak)((0,Sb.sprintf)((0,Sb.__)("%s block inserted"),f),"assertive")},[f]),u)return null;let m=`list-view-appender__${a}`,h=(0,Sb.sprintf)((0,Sb.__)("Append to %1$s block at position %2$d, Level %3$d"),d,t+1,e);return(0,fS.jsxs)("div",{className:"list-view-appender",children:[(0,fS.jsx)(Xi,{ref:n,rootClientId:o,position:"bottom right",isAppender:!0,selectBlockOnInsert:!1,shouldDirectInsert:c,__experimentalIsQuick:!0,...r,toggleProps:{"aria-describedby":m},onSelectOrClose:p=>{p?.clientId&&s(p)}}),(0,fS.jsx)(PI,{id:m,children:h})]})});var Vd=l(Y(),1),cp=l(A(),1),LI=l(X(),1);var Eo=l(O(),1),wb=l(z(),1),q4=l(N(),1),NI=l(ot(),1),Woe=l(P_(),1),$oe=l(js(),1),Koe=l(ir(),1);var _oe=l(A(),1),Soe=l(X(),1),xoe=l(O(),1);var woe=l(w(),1),c2e=nG(_oe.__experimentalTreeGridRow),u2e=(0,xoe.forwardRef)(({isDragged:e,isSelected:t,position:o,level:r,rowCount:n,children:i,className:s,path:a,...c},u)=>{let d=T1({clientId:c["data-block"],enableAnimation:!0,triggerAnimationOnChange:a}),f=(0,Soe.useMergeRefs)([u,d]);return(0,woe.jsx)(c2e,{ref:f,className:D("block-editor-list-view-leaf",s),level:r,positionInSet:o,setSize:n,isExpanded:void 0,...c,children:i})}),Coe=u2e;var Boe=l(Ve(),1),Eoe=l(O(),1);function Toe({isSelected:e,selectedClientIds:t,rowItemRef:o}){let r=t.length===1;(0,Eoe.useLayoutEffect)(()=>{if(!e||!r||!o.current)return;let n=(0,Boe.getScrollContainer)(o.current),{ownerDocument:i}=o.current;if(n===i.body||n===i.documentElement||!n)return;let a=o.current.getBoundingClientRect(),c=n.getBoundingClientRect();(a.top<c.top||a.bottom>c.bottom)&&o.current.scrollIntoView()},[e,r,o])}var Doe=l(O(),1);var Md=l(A(),1),Loe=l(O(),1);var AI=l(ot(),1),Noe=l(z(),1);var Ioe=l(N(),1),Y4=l(w(),1);function OI({onClick:e}){return(0,Y4.jsx)("span",{className:"block-editor-list-view__expander",onClick:t=>e(t,{forceToggle:!0}),"aria-hidden":"true","data-testid":"list-view-expander",children:(0,Y4.jsx)(Ee,{icon:(0,Ioe.isRTL)()?wk:vu})})}var Poe=l(O(),1),Roe=l(z(),1);var d2e=3,Ooe={"core/image":({clientId:e,attributes:t})=>{if(t.url)return{url:t.url,alt:t.alt||"",clientId:e}},"core/cover":({clientId:e,attributes:t})=>{if(t.backgroundType==="image"&&t.url)return{url:t.url,alt:t.alt||"",clientId:e}},"core/media-text":({clientId:e,attributes:t})=>{if(t.mediaType==="image"&&t.mediaUrl)return{url:t.mediaUrl,alt:t.mediaAlt||"",clientId:e}},"core/gallery":({innerBlocks:e})=>{let t=[],o=e?.length?Ooe[e[0].name]:void 0;if(!o)return t;for(let r of e){let n=o(r);if(n&&t.push(n),t.length>=d2e)return t}return t}};function f2e(e,t){let o=Ooe[e.name],r=o?o(e):void 0;return r?Array.isArray(r)?t?[]:r:[r]:[]}function Aoe({clientId:e,isExpanded:t}){let{block:o}=(0,Roe.useSelect)(n=>({block:n(x).getBlock(e)}),[e]);return(0,Poe.useMemo)(()=>f2e(o,t),[o,t])}var Yo=l(w(),1),{Badge:m2e}=M(Md.privateApis);function p2e({className:e,block:{clientId:t},onClick:o,onContextMenu:r,onMouseDown:n,onToggleExpanded:i,tabIndex:s,onFocus:a,onDragStart:c,onDragEnd:u,draggable:d,isExpanded:f,ariaDescribedBy:m},h){let p=Pt(t),g=Sr({clientId:t,context:"list-view"}),{isLocked:b}=ui(t),{hasPatternName:k,blockVisibility:v}=(0,Noe.useSelect)(T=>{let{getBlockAttributes:E}=M(T(x)),L=E(t);return{hasPatternName:!!L?.metadata?.patternName,blockVisibility:L?.metadata?.blockVisibility}},[t]),y=b,_=p?.positionType==="sticky",S=Aoe({clientId:t,isExpanded:f}),C=jy(v),B=T=>{T.dataTransfer.clearData(),c?.(T)};function P(T){(T.keyCode===AI.ENTER||T.keyCode===AI.SPACE)&&o(T)}return(0,Yo.jsxs)("a",{className:D("block-editor-list-view-block-select-button",e),onClick:o,onContextMenu:r,onKeyDown:P,onMouseDown:n,ref:h,tabIndex:s,onFocus:a,onDragStart:B,onDragEnd:u,draggable:d,href:`#block-${t}`,"aria-describedby":m,"aria-expanded":f,children:[(0,Yo.jsx)(OI,{onClick:i}),(0,Yo.jsx)(Ae,{icon:k?Ni:p?.icon,showColors:!0,context:"list-view"}),(0,Yo.jsxs)(Md.__experimentalHStack,{alignment:"center",className:"block-editor-list-view-block-select-button__label-wrapper",justify:"flex-start",spacing:1,children:[(0,Yo.jsx)("span",{className:"block-editor-list-view-block-select-button__title",children:(0,Yo.jsx)(Md.__experimentalTruncate,{ellipsizeMode:"auto",children:g})}),p?.anchor&&(0,Yo.jsx)("span",{className:"block-editor-list-view-block-select-button__anchor-wrapper",children:(0,Yo.jsx)(m2e,{className:"block-editor-list-view-block-select-button__anchor",children:p.anchor})}),_&&(0,Yo.jsx)("span",{className:"block-editor-list-view-block-select-button__sticky",children:(0,Yo.jsx)(Ee,{icon:DN})}),S.length?(0,Yo.jsx)("span",{className:"block-editor-list-view-block-select-button__images","aria-hidden":!0,children:S.map((T,E)=>(0,Yo.jsx)("span",{className:"block-editor-list-view-block-select-button__image",style:{backgroundImage:`url(${T.url})`,zIndex:S.length-E}},T.clientId))}):null,!!C&&(0,Yo.jsx)(Md.Tooltip,{text:C,children:(0,Yo.jsx)("span",{className:"block-editor-list-view-block-select-button__block-visibility","aria-hidden":"true",children:(0,Yo.jsx)(Ee,{icon:Ps})})}),y&&(0,Yo.jsx)("span",{className:"block-editor-list-view-block-select-button__lock",children:(0,Yo.jsx)(Ee,{icon:IN})})]})]})}var Moe=(0,Loe.forwardRef)(p2e);var Dd=l(w(),1),h2e=(0,Doe.forwardRef)(({onClick:e,onToggleExpanded:t,block:o,isSelected:r,position:n,siblingBlockCount:i,level:s,isExpanded:a,selectedClientIds:c,...u},d)=>{let{clientId:f}=o,{AdditionalBlockContent:m,insertedBlock:h,setInsertedBlock:p}=Nd(),g=c.includes(f)?c:[f];return(0,Dd.jsxs)(Dd.Fragment,{children:[m&&(0,Dd.jsx)(m,{block:o,insertedBlock:h,setInsertedBlock:p}),(0,Dd.jsx)(pT,{appendToOwnerDocument:!0,clientIds:g,cloneClassname:"block-editor-list-view-draggable-chip",children:({draggable:b,onDragStart:k,onDragEnd:v})=>(0,Dd.jsx)(Moe,{ref:d,className:"block-editor-list-view-block-contents",block:o,onClick:e,onToggleExpanded:t,isSelected:r,position:n,siblingBlockCount:i,level:s,draggable:b,onDragStart:k,onDragEnd:v,isExpanded:a,...u})})]})}),Voe=h2e;var lp=l(N(),1),Foe=l(Ve(),1),zoe=(e,t,o)=>(0,lp.sprintf)((0,lp.__)("Block %1$d of %2$d, Level %3$d."),e,t,o),joe=(e,t)=>[e?.positionLabel?`${(0,lp.sprintf)((0,lp.__)("Position: %s"),e.positionLabel)}.`:void 0,t?(0,lp.__)("This block is locked."):void 0].filter(Boolean).join(" "),Uoe=(e,t)=>Array.isArray(t)&&t.length?t.indexOf(e)!==-1:t===e;function Hoe(e,t,o,r){let n=[...o,e],i=[...r,t],s=Math.min(n.length,i.length)-1,a=n[s],c=i[s];return{start:a,end:c}}function xb(e,t){if(!t)return;let o=`[role=row][data-block="${e}"]`;return new Promise(r=>{if(t.querySelector(o))return r(t.querySelector(o));let n=null,i=new window.MutationObserver(()=>{t.querySelector(o)&&(clearTimeout(n),i.disconnect(),r(t.querySelector(o)))});i.observe(t,{childList:!0,subtree:!0}),n=setTimeout(()=>{i.disconnect(),r(null)},3e3)}).then(r=>{r&&r.isConnected&&Foe.focus.focusable.find(r)?.[0]?.focus()})}function Goe({blockIndexes:e,blockDropTargetIndex:t,blockDropPosition:o,clientId:r,firstDraggedBlockIndex:n,isDragged:i}){let s,a,c;if(!i){a=!1;let u=e[r];c=u>n,t!=null&&n!==void 0?u!==void 0&&(u>=n&&u<t?s="up":u<n&&u>=t?s="down":s="normal",a=typeof t=="number"&&t-1===u&&o==="inside"):t===null&&n!==void 0?u!==void 0&&u>=n?s="up":s="normal":t!=null&&n===void 0?u!==void 0&&(u<t?s="normal":s="down"):t===null&&(s="normal")}return{displacement:s,isNesting:a,isAfterDraggedBlocks:c}}var lr=l(w(),1);function Yoe({block:{clientId:e},displacement:t,isAfterDraggedBlocks:o,isDragged:r,isNesting:n,isSelected:i,isBranchSelected:s,selectBlock:a,position:c,level:u,rowCount:d,siblingBlockCount:f,showBlockMovers:m,path:h,isExpanded:p,selectedClientIds:g,isSyncedBranch:b}){let k=(0,Eo.useRef)(null),v=(0,Eo.useRef)(null),y=(0,Eo.useRef)(null),[_,S]=(0,Eo.useState)(!1),[C,B]=(0,Eo.useState)(),[P,T]=(0,Eo.useState)(!1),{isLocked:E}=ui(e),L=i&&g[0]===e,I=i&&g[g.length-1]===e,{toggleBlockHighlight:R,duplicateBlocks:V,multiSelect:j,replaceBlocks:H,removeBlocks:F,insertAfterBlock:U,insertBeforeBlock:G,showViewportModal:W}=M((0,wb.useDispatch)(x)),J=(0,LI.useDebounce)(R,50),{canInsertBlockType:le,getSelectedBlockClientIds:oe,getPreviousBlockClientId:re,getBlockRootClientId:Q,getBlockOrder:$,getBlockParents:ee,getBlockEditingMode:K,getBlocksByClientId:te,canEditBlock:ne,canMoveBlock:q,canRemoveBlocks:se,isGroupable:he}=(0,wb.useSelect)(x),{getGroupingBlockName:me}=(0,wb.useSelect)(Vd.store),xe=Pt(e),De=Jg(),{block:lt,blockName:Dt,allowRightClickOverrides:so}=(0,wb.useSelect)(ce=>{let{getBlock:co,getBlockName:_e,getSettings:zt}=M(ce(x));return{block:co(e),blockName:_e(e),allowRightClickOverrides:zt().allowRightClickOverrides}},[e]),{canRename:or}=ap(Dt),Je=(0,Vd.hasBlockSupport)(Dt,"__experimentalToolbar",!0),Zt=`list-view-block-select-button__description-${(0,LI.useInstanceId)(Yoe)}`,{expand:ao,collapse:Ze,collapseAll:Vt,BlockSettingsMenu:et,listViewInstanceId:Ue,expandedState:Ho,setInsertedBlock:Yn,treeGridElementRef:Fe,rootClientId:lo}=Nd(),tt=(0,$oe.__unstableUseShortcutEventMatch)();function ze(){let ce=oe(),co=ce.includes(e),_e=co?ce[0]:e,zt=Q(_e);return{blocksToUpdate:co?ce:[e],firstBlockClientId:_e,firstBlockRootClientId:zt,selectedBlockClientIds:ce}}async function yt(ce){if(ce.defaultPrevented||ce.target.closest("[role=dialog]"))return;let co=[NI.BACKSPACE,NI.DELETE].includes(ce.keyCode);if(tt("core/block-editor/unselect",ce)&&g.length>0)ce.stopPropagation(),ce.preventDefault(),a(ce,void 0);else if(co||tt("core/block-editor/remove",ce)){let{blocksToUpdate:_e,firstBlockClientId:zt,firstBlockRootClientId:kn,selectedBlockClientIds:Rr}=ze();if(!se(_e))return;let au=re(zt)??kn;F(_e,!1);let hA=Rr.length>0&&oe().length===0;au||(au=$()[0]),Et(au,hA)}else if(tt("core/block-editor/paste-styles",ce)){ce.preventDefault();let{blocksToUpdate:_e}=ze(),zt=te(_e);De(zt)}else if(tt("core/block-editor/duplicate",ce)){ce.preventDefault();let{blocksToUpdate:_e,firstBlockRootClientId:zt}=ze();if(te(_e).every(Rr=>!!Rr&&(0,Vd.hasBlockSupport)(Rr.name,"multiple",!0)&&le(Rr.name,zt))){let Rr=await V(_e,!1);Rr?.length&&Et(Rr[0],!1)}}else if(tt("core/block-editor/insert-before",ce)){ce.preventDefault();let{blocksToUpdate:_e}=ze();await G(_e[0]);let zt=oe();Et(zt[0],!1)}else if(tt("core/block-editor/insert-after",ce)){ce.preventDefault();let{blocksToUpdate:_e}=ze();await U(_e.at(-1));let zt=oe();Et(zt[0],!1)}else if(tt("core/block-editor/select-all",ce)){ce.preventDefault();let{firstBlockRootClientId:_e,selectedBlockClientIds:zt}=ze(),kn=$(_e);if(!kn.length)return;if((0,Woe.isShallowEqual)(zt,kn)&&_e&&_e!==lo){Et(_e,!0);return}j(kn[0],kn[kn.length-1],null)}else if(tt("core/block-editor/collapse-list-view",ce)){ce.preventDefault();let{firstBlockClientId:_e}=ze(),zt=ee(_e,!1);Vt(),ao(zt)}else if(tt("core/block-editor/group",ce)){let{blocksToUpdate:_e}=ze();if(_e.length>1&&he(_e)){ce.preventDefault();let zt=te(_e),kn=me(),Rr=(0,Vd.switchToBlockType)(zt,kn);H(_e,Rr),(0,Koe.speak)((0,q4.__)("Selected blocks are grouped."));let au=oe();Et(au[0],!1)}}else if(tt("core/block-editor/toggle-block-visibility",ce)){ce.preventDefault();let{blocksToUpdate:_e}=ze();if(!te(_e).every(Rr=>(0,Vd.hasBlockSupport)(Rr.name,"visibility",!0))||_e.some(Rr=>K(Rr)!=="default"))return;W(_e)}else if(tt("core/block-editor/rename",ce)){let{blocksToUpdate:_e}=ze(),zt=K(_e[0])==="contentOnly";_e.length===1&&or&&!zt&&(ce.preventDefault(),T(!0))}}let _o=(0,Eo.useCallback)(()=>{S(!0),J(e,!0)},[e,S,J]),gr=(0,Eo.useCallback)(()=>{S(!1),J(e,!1)},[e,S,J]),ve=(0,Eo.useCallback)(ce=>{a(ce,e),ce.preventDefault()},[e,a]),Et=(0,Eo.useCallback)((ce,co)=>{co&&a(void 0,ce,null,null),xb(ce,Fe?.current)},[a,Fe]),Mo=(0,Eo.useCallback)(ce=>{ce.preventDefault(),ce.stopPropagation(),p===!0?Ze(e):p===!1&&ao(e)},[e,ao,Ze,p]),mt=(0,Eo.useCallback)(ce=>{let{ownerDocument:co}=y?.current||{};!co||!co.hasFocus()||Je&&so&&(y.current?.click(),B(new window.DOMRect(ce.clientX,ce.clientY,0,0)),ce.preventDefault())},[so,y,Je]),be=(0,Eo.useCallback)(ce=>{so&&ce.button===2&&ce.preventDefault()},[so]),Ft=(0,Eo.useMemo)(()=>{let{ownerDocument:ce}=v?.current||{};if(!(!C||!ce))return{ownerDocument:ce,getBoundingClientRect(){return C}}},[C]),_t=(0,Eo.useCallback)(()=>{B(void 0)},[B]);if(Toe({isSelected:i,rowItemRef:v,selectedClientIds:g}),!lt)return null;let _a=zoe(c,f,u),$r=joe(xe,E),ge=jy(lt?.attributes?.metadata?.blockVisibility),rr=f>0,Sa=m&&rr,vn=D("block-editor-list-view-block__mover-cell",{"is-visible":_||i}),oh=D("block-editor-list-view-block__menu-cell",{"is-visible":_||L}),rh;Sa?rh=2:Je||(rh=3);let j0=D({"is-selected":i,"is-first-selected":L,"is-last-selected":I,"is-branch-selected":s,"is-synced-branch":b,"is-dragging":r,"has-single-cell":!Je,"is-synced":xe?.isSynced,"is-draggable":q,"is-displacement-normal":t==="normal","is-displacement-up":t==="up","is-displacement-down":t==="down","is-after-dragged-blocks":o,"is-nesting":n}),U0=g.includes(e)?g:[e],dk=i&&g.length===1;return(0,lr.jsxs)(Coe,{className:j0,isDragged:r,onKeyDown:yt,onMouseEnter:_o,onMouseLeave:gr,onFocus:_o,onBlur:gr,level:u,position:c,rowCount:d,path:h,id:`list-view-${Ue}-block-${e}`,"data-block":e,"data-expanded":ne?p:void 0,ref:v,children:[(0,lr.jsx)(cp.__experimentalTreeGridCell,{className:"block-editor-list-view-block__contents-cell",colSpan:rh,ref:k,"aria-selected":!!i,children:({ref:ce,tabIndex:co,onFocus:_e})=>(0,lr.jsxs)("div",{className:"block-editor-list-view-block__contents-container",children:[(0,lr.jsx)(Voe,{block:lt,onClick:ve,onContextMenu:mt,onMouseDown:be,onToggleExpanded:Mo,isSelected:i,position:c,siblingBlockCount:f,level:u,ref:ce,tabIndex:dk?0:co,onFocus:_e,isExpanded:ne?p:void 0,selectedClientIds:g,ariaDescribedBy:Zt}),(0,lr.jsx)(PI,{id:Zt,children:[_a,$r,ge].filter(Boolean).join(" ")})]})}),Sa&&(0,lr.jsx)(lr.Fragment,{children:(0,lr.jsxs)(cp.__experimentalTreeGridCell,{className:vn,withoutGridItem:!0,children:[(0,lr.jsx)(cp.__experimentalTreeGridItem,{children:({ref:ce,tabIndex:co,onFocus:_e})=>(0,lr.jsx)(bT,{orientation:"vertical",clientIds:[e],ref:ce,tabIndex:co,onFocus:_e})}),(0,lr.jsx)(cp.__experimentalTreeGridItem,{children:({ref:ce,tabIndex:co,onFocus:_e})=>(0,lr.jsx)(vT,{orientation:"vertical",clientIds:[e],ref:ce,tabIndex:co,onFocus:_e})})]})}),Je&&et&&(0,lr.jsx)(cp.__experimentalTreeGridCell,{className:oh,"aria-selected":!!i,ref:y,children:({ref:ce,tabIndex:co,onFocus:_e})=>(0,lr.jsx)(et,{clientIds:U0,block:lt,icon:Is,label:(0,q4.__)("Options"),popoverProps:{anchor:Ft},toggleProps:{ref:ce,className:"block-editor-list-view-block__menu",tabIndex:co,onClick:_t,onFocus:_e,size:"small"},disableOpenOnArrowDown:!0,expand:ao,expandedState:Ho,setInsertedBlock:Yn,__experimentalSelectBlock:Et,isContentOnlyListView:!!lo&&K(lo)==="contentOnly"})}),P&&(0,lr.jsx)(ip,{clientId:e,onClose:()=>T(!1)})]})}var qoe=(0,Eo.memo)(Yoe);var mi=l(w(),1);function Zoe(e,t,o,r){return o?.includes(e.clientId)?0:t[e.clientId]??r?1+e.innerBlocks.reduce(g2e(t,o,r),0):1}var g2e=(e,t,o)=>(r,n)=>t?.includes(n.clientId)?r:(e[n.clientId]??o)&&n.innerBlocks.length>0?r+Zoe(n,e,t,o):r+1,b2e=()=>{};function Xoe(e){let{blocks:t,selectBlock:o=b2e,showBlockMovers:r,selectedClientIds:n,level:i=1,path:s="",isBranchSelected:a=!1,listPosition:c=0,fixedListWindow:u,isExpanded:d,parentId:f,shouldShowInnerBlocks:m=!0,isSyncedBranch:h=!1,showAppender:p=!0}=e,g=Pt(f),b=h||!!g?.isSynced,k=(0,VI.useSelect)(R=>f?R(x).canEditBlock(f):!0,[f]),{blockDropPosition:v,blockDropTargetIndex:y,firstDraggedBlockIndex:_,blockIndexes:S,expandedState:C,draggedClientIds:B}=Nd(),P=(0,DI.useRef)();if(!k)return null;let T=p&&i===1,E=t.filter(Boolean),L=E.length,I=T?L+1:L;return P.current=c,(0,mi.jsxs)(mi.Fragment,{children:[E.map((R,V)=>{let{clientId:j,innerBlocks:H}=R;V>0&&(P.current+=Zoe(E[V-1],C,B,d));let F=!!B?.includes(j),{displacement:U,isAfterDraggedBlocks:G,isNesting:W}=Goe({blockIndexes:S,blockDropTargetIndex:y,blockDropPosition:v,clientId:j,firstDraggedBlockIndex:_,isDragged:F}),{itemInView:J}=u,le=J(P.current),oe=V+1,re=s.length>0?`${s}_${oe}`:`${oe}`,Q=!!H?.length,$=Q&&m?C[j]??d:void 0,ee=Uoe(j,n),K=a||ee&&Q,te=F||le||ee&&j===n[0]||V===0||V===L-1;return(0,mi.jsxs)(VI.AsyncModeProvider,{value:!ee,children:[te&&(0,mi.jsx)(qoe,{block:R,selectBlock:o,isSelected:ee,isBranchSelected:K,isDragged:F,level:i,position:oe,rowCount:I,siblingBlockCount:L,showBlockMovers:r,path:re,isExpanded:F?!1:$,listPosition:P.current,selectedClientIds:n,isSyncedBranch:b,displacement:U,isAfterDraggedBlocks:G,isNesting:W}),!te&&(0,mi.jsx)("tr",{children:(0,mi.jsx)("td",{className:"block-editor-list-view-placeholder"})}),Q&&$&&!F&&(0,mi.jsx)(Xoe,{parentId:j,blocks:H,selectBlock:o,showBlockMovers:r,level:i+1,path:re,listPosition:P.current+1,fixedListWindow:u,isBranchSelected:K,selectedClientIds:n,isExpanded:d,isSyncedBranch:b})]},j)}),T&&(0,mi.jsx)(MI.__experimentalTreeGridRow,{level:i,setSize:I,positionInSet:I,isExpanded:!0,children:(0,mi.jsx)(MI.__experimentalTreeGridCell,{children:R=>(0,mi.jsx)(K4,{clientId:f,nestingLevel:i,blockCount:L,...R})})})]})}var Qoe=(0,DI.memo)(Xoe);var Cb=l(A(),1),FI=l(Ve(),1),yc=l(O(),1),Z4=l(N(),1);var as=l(w(),1);function Joe({draggedBlockClientId:e,listViewRef:t,blockDropTarget:o}){let r=Pt(e),n=Sr({clientId:e,context:"list-view"}),{rootClientId:i,clientId:s,dropPosition:a}=o||{},[c,u]=(0,yc.useMemo)(()=>{if(!t.current)return[];let v=i?t.current.querySelector(`[data-block="${i}"]`):void 0,y=s?t.current.querySelector(`[data-block="${s}"]`):void 0;return[v,y]},[t,i,s]),d=u||c,f=(0,Z4.isRTL)(),m=(0,yc.useCallback)((v,y)=>{if(!d)return 0;let _=d.offsetWidth,S=(0,FI.getScrollContainer)(d,"horizontal"),C=d.ownerDocument,B=S===C.body||S===C.documentElement;if(S&&!B){let P=S.getBoundingClientRect(),T=(0,Z4.isRTL)()?P.right-v.right:v.left-P.left,E=S.clientWidth;if(E<_+T&&(_=E-T),!f&&v.left+y<P.left)return _-=P.left-v.left,_;if(f&&v.right-y>P.right)return _-=v.right-P.right,_}return _-y},[f,d]),h=(0,yc.useMemo)(()=>{if(!d)return{};let v=d.getBoundingClientRect();return{width:m(v,0)}},[m,d]),p=(0,yc.useMemo)(()=>{if(!d)return{};let v=(0,FI.getScrollContainer)(d),y=d.ownerDocument,_=v===y.body||v===y.documentElement;if(v&&!_){let S=v.getBoundingClientRect(),C=d.getBoundingClientRect(),B=f?S.right-C.right:C.left-S.left;if(!f&&S.left>C.left)return{transform:`translateX( ${B}px )`};if(f&&S.right<C.right)return{transform:`translateX( ${B*-1}px )`}}return{}},[f,d]),g=(0,yc.useMemo)(()=>{if(!c)return 1;let v=parseInt(c.getAttribute("aria-level"),10);return v?v+1:1},[c]),b=(0,yc.useMemo)(()=>d?d.classList.contains("is-branch-selected"):!1,[d]),k=(0,yc.useMemo)(()=>{if(!(!d||!(a==="top"||a==="bottom"||a==="inside")))return{contextElement:d,getBoundingClientRect(){let y=d.getBoundingClientRect(),_=y.left,S=0,C=(0,FI.getScrollContainer)(d,"horizontal"),B=d.ownerDocument,P=C===B.body||C===B.documentElement;if(C&&!P){let L=C.getBoundingClientRect(),I=f?C.offsetWidth-C.clientWidth:0;_<L.left+I&&(_=L.left+I)}a==="top"?S=y.top-y.height*2:S=y.top;let T=m(y,0),E=y.height;return new window.DOMRect(_,S,T,E)}}},[d,a,m,f]);return d?(0,as.jsx)(Cb.Popover,{animate:!1,anchor:k,focusOnMount:!1,className:"block-editor-list-view-drop-indicator--preview",variant:"unstyled",flip:!1,resize:!0,children:(0,as.jsx)("div",{style:h,className:D("block-editor-list-view-drop-indicator__line",{"block-editor-list-view-drop-indicator__line--darker":b}),children:(0,as.jsxs)("div",{className:"block-editor-list-view-leaf","aria-level":g,children:[(0,as.jsxs)("div",{className:D("block-editor-list-view-block-select-button","block-editor-list-view-block-contents"),style:p,children:[(0,as.jsx)(OI,{onClick:()=>{}}),(0,as.jsx)(Ae,{icon:r?.icon,showColors:!0,context:"list-view"}),(0,as.jsx)(Cb.__experimentalHStack,{alignment:"center",className:"block-editor-list-view-block-select-button__label-wrapper",justify:"flex-start",spacing:1,children:(0,as.jsx)("span",{className:"block-editor-list-view-block-select-button__title",children:(0,as.jsx)(Cb.__experimentalTruncate,{ellipsizeMode:"auto",children:n})})})]}),(0,as.jsx)("div",{className:"block-editor-list-view-block__menu-cell"})]})})}):null}var ere=l(ir(),1),Bb=l(N(),1),mS=l(z(),1),tre=l(O(),1),pi=l(ot(),1),ore=l(Y(),1);function rre(){let{clearSelectedBlock:e,multiSelect:t,selectBlock:o}=(0,mS.useDispatch)(x),{getBlockName:r,getBlockParents:n,getBlockSelectionStart:i,getSelectedBlockClientIds:s,hasMultiSelection:a,hasSelectedBlock:c}=(0,mS.useSelect)(x),{getBlockType:u}=(0,mS.useSelect)(ore.store);return{updateBlockSelection:(0,tre.useCallback)(async(f,m,h,p)=>{if(!f?.shiftKey&&f?.keyCode!==pi.ESCAPE){o(m,p);return}f.preventDefault();let g=f.type==="keydown"&&f.keyCode===pi.ESCAPE,b=f.type==="keydown"&&(f.keyCode===pi.UP||f.keyCode===pi.DOWN||f.keyCode===pi.HOME||f.keyCode===pi.END);if(!b&&!c()&&!a()){o(m,null);return}let k=s(),v=[...n(m),m];if((g||b&&!k.some(C=>v.includes(C)))&&await e(),!g){let C=i(),B=m;b&&(!c()&&!a()&&(C=m),h&&(B=h));let P=n(C),T=n(B),{start:E,end:L}=Hoe(C,B,P,T);await t(E,L,null)}let y=s();if((f.keyCode===pi.HOME||f.keyCode===pi.END)&&y.length>1)return;let _=k.filter(C=>!y.includes(C)),S;if(_.length===1){let C=u(r(_[0]))?.title;C&&(S=(0,Bb.sprintf)((0,Bb.__)("%s deselected."),C))}else _.length>1&&(S=(0,Bb.sprintf)((0,Bb.__)("%s blocks deselected."),_.length));S&&(0,ere.speak)(S,"assertive")},[e,r,u,n,i,s,a,c,t,o])}}var nre=l(O(),1);function ire(e){return(0,nre.useMemo)(()=>{let o={},r=0,n=i=>{i.forEach(s=>{o[s.clientId]=r,r++,s.innerBlocks.length>0&&n(s.innerBlocks)})};return n(e),o},[e])}var sre=l(z(),1);function are({blocks:e,rootClientId:t}){return(0,sre.useSelect)(o=>{let{getDraggedBlockClientIds:r,getSelectedBlockClientIds:n,getEnabledClientIdsTree:i}=M(o(x));return{selectedClientIds:n(),draggedClientIds:r(),clientIdsTree:e??i(t)}},[e,t])}var lre=l(O(),1),cre=l(z(),1);function ure({collapseAll:e,expand:t}){let{expandedBlock:o,getBlockParents:r}=(0,cre.useSelect)(n=>{let{getBlockParents:i,getExpandedBlock:s}=M(n(x));return{expandedBlock:s(),getBlockParents:i}},[]);(0,lre.useEffect)(()=>{if(o){let n=r(o,!1);e(),t(n)}},[e,t,o,r])}var dre=l(z(),1),up=l(O(),1),dp=l(X(),1),fre=l(N(),1);var _c=24;function v2e(e,t,o=1,r=!1){let n=r?t.right-o*_c:t.left+o*_c;return r?e.x>n:e.x<n}function k2e(e,t,o=1,r=!1){let n=r?t.right-o*_c:t.left+o*_c,i=r?n-e.x:e.x-n,s=Math.round(i/_c);return Math.abs(s)}function y2e(e,t){let o=[],r=e;for(;r;)o.push({...r}),r=t.find(n=>n.clientId===r.rootClientId);return o}function mre(e,t){let o=e[t+1];return o&&o.isDraggedBlock?mre(e,t+1):o}function _2e(e,t,o=1,r=!1){let n=r?t.right-o*_c:t.left+o*_c;return(r?e.x<n-_c:e.x>n+_c)&&e.y<t.bottom}var S2e=["top","bottom"];function x2e(e,t,o=!1){let r,n,i,s,a;for(let f=0;f<e.length;f++){let m=e[f];if(m.isDraggedBlock)continue;let h=m.element.getBoundingClientRect(),[p,g]=Ym(t,h,S2e),b=$E(t,h);if(i===void 0||p<i||b){i=p;let k=e.indexOf(m),v=e[k-1];if(g==="top"&&v&&v.rootClientId===m.rootClientId&&!v.isDraggedBlock?(n=v,r="bottom",s=v.element.getBoundingClientRect(),a=k-1):(n=m,r=g,s=h,a=k),b)break}}if(!n)return;let c=y2e(n,e),u=r==="bottom";if(u&&n.canInsertDraggedBlocksAsChild&&(n.innerBlockCount>0&&n.isExpanded||_2e(t,s,c.length,o))){let f=n.isExpanded?0:n.innerBlockCount||0;return{rootClientId:n.clientId,clientId:n.clientId,blockIndex:f,dropPosition:"inside"}}if(u&&n.rootClientId&&v2e(t,s,c.length,o)){let f=mre(e,a),m=n.nestingLevel,h=f?f.nestingLevel:1;if(m&&h){let p=k2e(t,s,c.length,o),g=Math.max(Math.min(p,m-h),0);if(c[g]){let b=n.blockIndex;if(c[g].nestingLevel===f?.nestingLevel)b=f?.blockIndex;else for(let k=a;k>=0;k--){let v=e[k];if(v.rootClientId===c[g].rootClientId){b=v.blockIndex+1;break}}return{rootClientId:c[g].rootClientId,clientId:n.clientId,blockIndex:b,dropPosition:r}}}}if(!n.canInsertDraggedBlocksAsSibling)return;let d=u?1:0;return{rootClientId:n.rootClientId,clientId:n.clientId,blockIndex:n.blockIndex+d,dropPosition:r}}var w2e={leading:!1,trailing:!0};function pre({dropZoneElement:e,expandedState:t,setExpandedState:o}){let{getBlockRootClientId:r,getBlockIndex:n,getBlockCount:i,getDraggedBlockClientIds:s,canInsertBlocks:a}=(0,dre.useSelect)(x),[c,u]=(0,up.useState)(),{rootClientId:d,blockIndex:f}=c||{},m=WE(d,f),h=(0,fre.isRTL)(),p=(0,dp.usePrevious)(d),g=(0,up.useCallback)((_,S)=>{let{rootClientId:C}=S||{};C&&S?.dropPosition==="inside"&&!_[C]&&o({type:"expand",clientIds:[C]})},[o]),b=(0,dp.useThrottle)(g,500,w2e);(0,up.useEffect)(()=>{if(c?.dropPosition!=="inside"||p!==c?.rootClientId){b.cancel();return}b(t,c)},[t,p,c,b]);let k=s(),v=(0,dp.useThrottle)((0,up.useCallback)((_,S)=>{let C={x:_.clientX,y:_.clientY},B=!!k?.length,T=Array.from(S.querySelectorAll("[data-block]")).map(L=>{let I=L.dataset.block,R=L.dataset.expanded==="true",V=L.classList.contains("is-dragging"),j=parseInt(L.getAttribute("aria-level"),10),H=r(I);return{clientId:I,isExpanded:R,rootClientId:H,blockIndex:n(I),element:L,nestingLevel:j||void 0,isDraggedBlock:B?V:!1,innerBlockCount:i(I),canInsertDraggedBlocksAsSibling:B?a(k,H):!0,canInsertDraggedBlocksAsChild:B?a(k,I):!0}}),E=x2e(T,C,h);E&&u(E)},[a,k,i,n,r,h]),50);return{ref:(0,dp.__experimentalUseDropZone)({dropZoneElement:e,onDrop(_){v.cancel(),c&&m(_),u(void 0)},onDragLeave(){v.cancel(),u(null)},onDragOver(_){v(_,_.currentTarget)},onDragEnd(){v.cancel(),u(void 0)}}),target:c}}var zI=l(O(),1),hre=l(z(),1);function gre({firstSelectedBlockClientId:e,setExpandedState:t}){let[o,r]=(0,zI.useState)(null),{selectedBlockParentClientIds:n}=(0,hre.useSelect)(i=>{let{getBlockParents:s}=i(x);return{selectedBlockParentClientIds:s(e,!1)}},[e]);return(0,zI.useEffect)(()=>{o!==e&&n?.length&&t({type:"expand",clientIds:n})},[e,n,o,t]),{setSelectedTreeId:r}}var Eb=l(z(),1),bre=l(X(),1);function vre({selectBlock:e}){let t=(0,Eb.useRegistry)(),{getBlockOrder:o,getBlockRootClientId:r,getBlocksByClientId:n,getPreviousBlockClientId:i,getSelectedBlockClientIds:s,getSettings:a,canInsertBlockType:c,canRemoveBlocks:u}=(0,Eb.useSelect)(x),{flashBlock:d,removeBlocks:f,replaceBlocks:m,insertBlocks:h}=(0,Eb.useDispatch)(x),p=dg();return(0,bre.useRefEffect)(g=>{function b(y,_){_&&e(void 0,y,null,null),xb(y,g)}function k(y){let _=s(),S=_.includes(y),C=S?_[0]:y,B=r(C);return{blocksToUpdate:S?_:[y],firstBlockClientId:C,firstBlockRootClientId:B,originallySelectedBlockClientIds:_}}function v(y){if(y.defaultPrevented||!g.contains(y.target.ownerDocument.activeElement))return;let S=y.target.ownerDocument.activeElement?.closest("[role=row]")?.dataset?.block;if(!S)return;let{blocksToUpdate:C,firstBlockClientId:B,firstBlockRootClientId:P,originallySelectedBlockClientIds:T}=k(S);if(C.length!==0){if(y.preventDefault(),y.type==="copy"||y.type==="cut"){C.length===1&&d(C[0]),p(y.type,C);let E=n(C);EB(y,E,t)}if(y.type==="cut"){if(!u(C))return;let E=i(B)??P;f(C,!1);let L=T.length>0&&s().length===0;E||(E=o()[0]),b(E,L)}else if(y.type==="paste"){let{__experimentalCanUserUseUnfilteredHTML:E}=a(),L=PK(y,E);if(C.length===1){let[I]=C;if(L.every(R=>c(R.name,I))){h(L,void 0,I),b(L[0]?.clientId,!1);return}}m(C,L,L.length-1,-1),b(L[0]?.clientId,!1)}}}return g.ownerDocument.addEventListener("copy",v),g.ownerDocument.addEventListener("cut",v),g.ownerDocument.addEventListener("paste",v),()=>{g.ownerDocument.removeEventListener("copy",v),g.ownerDocument.removeEventListener("cut",v),g.ownerDocument.removeEventListener("paste",v)}},[])}var Sc=l(w(),1),C2e=(e,t)=>t.type==="clear"?{}:Array.isArray(t.clientIds)?{...e,...t.clientIds.reduce((o,r)=>({...o,[r]:t.type==="expand"}),{})}:e,kre=32;function Sre({id:e,blocks:t,dropZoneElement:o,showBlockMovers:r=!1,isExpanded:n=!1,showAppender:i=!1,blockSettingsMenu:s=g4,rootClientId:a,description:c,onSelect:u,additionalBlockContent:d},f){t&&(0,_re.default)("`blocks` property in `wp.blockEditor.__experimentalListView`",{since:"6.3",alternative:"`rootClientId` property"});let m=(0,Tb.useInstanceId)(Sre),{clientIdsTree:h,draggedClientIds:p,selectedClientIds:g}=are({blocks:t,rootClientId:a}),b=ire(h),{getBlock:k,getSelectedBlockClientIds:v}=(0,pS.useSelect)(x),{visibleBlockCount:y}=(0,pS.useSelect)(ne=>{let{getGlobalBlockCount:q,getClientIdsOfDescendants:se}=ne(x),he=p?.length>0?se(p).length+1:0;return{visibleBlockCount:q()-he}},[p]),{updateBlockSelection:_}=rre(),[S,C]=(0,To.useReducer)(C2e,{}),[B,P]=(0,To.useState)(null),{setSelectedTreeId:T}=gre({firstSelectedBlockClientId:g[0],setExpandedState:C}),E=(0,To.useCallback)((ne,q,se)=>{_(ne,q,null,se),T(q),u&&u(k(q))},[T,_,u,k]),{ref:L,target:I}=pre({dropZoneElement:o,expandedState:S,setExpandedState:C}),R=(0,To.useRef)(),V=vre({selectBlock:E}),j=(0,To.useCallback)(ne=>{let[q]=v();q&&ne&&xb(q,ne)},[v]),H=(0,Tb.useMergeRefs)([V,j,R,L,f]),F=(0,To.useCallback)(ne=>{if(!ne)return;let q=Array.isArray(ne)?ne:[ne];C({type:"expand",clientIds:q})},[C]),U=(0,To.useCallback)(ne=>{ne&&C({type:"collapse",clientIds:[ne]})},[C]),G=(0,To.useCallback)(()=>{C({type:"clear"})},[C]),W=(0,To.useCallback)(ne=>{F(ne?.dataset?.block)},[F]),J=(0,To.useCallback)(ne=>{U(ne?.dataset?.block)},[U]),le=(0,To.useCallback)((ne,q,se)=>{ne.shiftKey&&_(ne,q?.dataset?.block,se?.dataset?.block)},[_]);ure({collapseAll:G,expand:F});let oe=p?.[0],{blockDropTargetIndex:re,blockDropPosition:Q,firstDraggedBlockIndex:$}=(0,To.useMemo)(()=>{let ne,q;if(I?.clientId){let se=b[I.clientId];ne=se===void 0||I?.dropPosition==="top"?se:se+1}else I===null&&(ne=null);if(oe){let se=b[oe];q=se===void 0||I?.dropPosition==="top"?se:se+1}return{blockDropTargetIndex:ne,blockDropPosition:I?.dropPosition,firstDraggedBlockIndex:q}},[I,b,oe]),ee=(0,To.useMemo)(()=>({blockDropPosition:Q,blockDropTargetIndex:re,blockIndexes:b,draggedClientIds:p,expandedState:S,expand:F,firstDraggedBlockIndex:$,collapse:U,collapseAll:G,BlockSettingsMenu:s,listViewInstanceId:m,AdditionalBlockContent:d,insertedBlock:B,setInsertedBlock:P,treeGridElementRef:R,rootClientId:a}),[Q,re,b,p,S,F,$,U,G,s,m,d,B,P,a]),[K]=(0,Tb.__experimentalUseFixedWindowList)(R,kre,y,{expandedState:S,useWindowing:!0,windowOverscan:40});if(!h.length&&!i)return null;let te=c&&`block-editor-list-view-description-${m}`;return(0,Sc.jsxs)(pS.AsyncModeProvider,{value:!0,children:[(0,Sc.jsx)(Joe,{draggedBlockClientId:oe,listViewRef:R,blockDropTarget:I}),c&&(0,Sc.jsx)(Ge,{id:te,children:c}),(0,Sc.jsx)(yre.__experimentalTreeGrid,{id:e,className:D("block-editor-list-view-tree",{"is-dragging":p?.length>0&&re!==void 0}),"aria-label":(0,X4.__)("Block navigation structure"),ref:H,onCollapseRow:J,onExpandRow:W,onFocusRow:le,applicationAriaLabel:(0,X4.__)("Block navigation structure"),"aria-describedby":te,style:{"--wp-admin--list-view-dragged-items-height":p?.length?`${kre*(p.length-1)}px`:null},children:(0,Sc.jsx)(TI.Provider,{value:ee,children:(0,Sc.jsx)(Qoe,{blocks:h,parentId:a,selectBlock:E,showBlockMovers:r,fixedListWindow:K,selectedClientIds:g,isExpanded:n,showAppender:i})})})]})}var hS=(0,To.forwardRef)(Sre),jI=(0,To.forwardRef)((e,t)=>(0,Sc.jsx)(hS,{ref:t,...e,showAppender:!1,rootClientId:null,onSelect:null,additionalBlockContent:null,blockSettingsMenu:void 0}));var Fd=l(w(),1);function B2e({isEnabled:e,onToggle:t,isOpen:o,innerRef:r,...n}){return(0,Fd.jsx)(UI.Button,{__next40pxDefaultSize:!0,...n,ref:r,icon:Pk,"aria-expanded":o,"aria-haspopup":"true",onClick:e?t:void 0,label:(0,Q4.__)("List view"),className:"block-editor-block-navigation","aria-disabled":!e})}function E2e({isDisabled:e,...t},o){(0,xre.default)("wp.blockEditor.BlockNavigationDropdown",{since:"6.1",alternative:"wp.components.Dropdown and wp.blockEditor.ListView"});let n=(0,wre.useSelect)(i=>!!i(x).getBlockCount(),[])&&!e;return(0,Fd.jsx)(UI.Dropdown,{contentClassName:"block-editor-block-navigation__popover",popoverProps:{placement:"bottom-start"},renderToggle:({isOpen:i,onToggle:s})=>(0,Fd.jsx)(B2e,{...t,innerRef:o,isOpen:i,onToggle:s,isEnabled:n}),renderContent:()=>(0,Fd.jsxs)("div",{className:"block-editor-block-navigation__container",children:[(0,Fd.jsx)("p",{className:"block-editor-block-navigation__label",children:(0,Q4.__)("List view")}),(0,Fd.jsx)(jI,{})]})})}var Bre=(0,Cre.forwardRef)(E2e);var gS=l(O(),1),Tre=l(z(),1),Ire=l(X(),1),zd=l(A(),1),J4=l(N(),1);var xc=l(w(),1),Ere=()=>{};function T2e({clientId:e,onSwitch:t=Ere,onHoverClassName:o=Ere}){let r=(0,Tre.useSelect)(S=>S(x).canEditBlock(e),[e]),{onSelect:n,stylesToRender:i,activeStyle:s,genericPreviewBlock:a,className:c}=ab({clientId:e,onSwitch:t}),[u,d]=(0,gS.useState)(null),[f,m]=(0,gS.useState)(null),h=Vo(),p=(0,gS.useMemo)(()=>{if(!u||!a)return null;let S=Pd(c,s,u);return[{...a,attributes:{...a.attributes||{},className:S}}]},[u,a,c,s]);if(!r||!i||i.length===0)return null;let g=(0,Ire.debounce)(d,250),b=S=>{n(S),o(null),d(null),g.cancel()},k=S=>{if(u===S){g.cancel();return}g(S),o(S?.name??null)},v=JT(i),y=()=>s?.name!==v?.name,_=()=>{b(v)};return(0,xc.jsx)(zd.__experimentalToolsPanel,{label:(0,J4.__)("Styles"),resetAll:_,panelId:e,hasInnerWrapper:!0,dropdownMenuProps:h,children:(0,xc.jsx)(zd.__experimentalToolsPanelItem,{hasValue:y,label:(0,J4.__)("Variation"),onDeselect:_,isShownByDefault:!0,panelId:e,children:(0,xc.jsxs)("div",{ref:m,className:"block-editor-block-styles",children:[(0,xc.jsx)("div",{className:"block-editor-block-styles__variants",children:i.map(S=>{let C=S.label||S.name;return(0,xc.jsx)(zd.Button,{__next40pxDefaultSize:!0,className:D("block-editor-block-styles__item",{"is-active":s.name===S.name}),variant:"secondary",label:C,onMouseEnter:()=>k(S),onFocus:()=>k(S),onMouseLeave:()=>k(null),onBlur:()=>k(null),onClick:()=>b(S),"aria-current":s.name===S.name,children:(0,xc.jsx)(zd.__experimentalTruncate,{numberOfLines:1,className:"block-editor-block-styles__item-text",children:C})},S.name)})}),p&&(0,xc.jsx)(Ad,{blocks:p,placement:"left-start",offset:34,anchor:f})]})})})}var Ib=T2e;var Lre=l(A(),1),Pb=l(N(),1);var Rre=l(A(),1),Ore=l(w(),1),Pre={0:LN,1:HL,2:WL,3:KL,4:qL,5:XL,6:JL};function eF({level:e}){return Pre[e]?(0,Ore.jsx)(Rre.Icon,{icon:Pre[e]}):null}var HI=l(w(),1),Are=[1,2,3,4,5,6],I2e={className:"block-library-heading-level-dropdown"};function Nre({options:e=Are,value:t,onChange:o}){let r=e.filter(n=>n===0||Are.includes(n)).sort((n,i)=>n-i);return(0,HI.jsx)(Lre.ToolbarDropdownMenu,{popoverProps:I2e,icon:(0,HI.jsx)(eF,{level:t}),label:(0,Pb.__)("Change level"),controls:r.map(n=>{let i=n===t;return{icon:(0,HI.jsx)(eF,{level:n}),title:n===0?(0,Pb.__)("Paragraph"):(0,Pb.sprintf)((0,Pb.__)("Heading %d"),n),isActive:i,onClick(){o(n)},role:"menuitemradio"}})})}var bS=l(N(),1),vS=l(A(),1);var wc=l(w(),1);function P2e({icon:e=SN,label:t=(0,bS.__)("Choose variation"),instructions:o=(0,bS.__)("Select a variation to start with:"),variations:r,onSelect:n,allowSkip:i}){let s=D("block-editor-block-variation-picker",{"has-many-variations":r.length>4});return(0,wc.jsxs)(vS.Placeholder,{icon:e,label:t,instructions:o,className:s,children:[(0,wc.jsx)("ul",{className:"block-editor-block-variation-picker__variations",role:"list","aria-label":(0,bS.__)("Block variations"),children:r.map(a=>(0,wc.jsxs)("li",{children:[(0,wc.jsx)(vS.Button,{__next40pxDefaultSize:!0,variant:"tertiary",icon:a.icon&&a.icon.src?a.icon.src:a.icon,iconSize:48,onClick:()=>n(a),className:"block-editor-block-variation-picker__variation",label:a.description||a.title}),(0,wc.jsx)("span",{className:"block-editor-block-variation-picker__variation-label",children:a.title})]},a.name))}),i&&(0,wc.jsx)("div",{className:"block-editor-block-variation-picker__skip",children:(0,wc.jsx)(vS.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:()=>n(),children:(0,bS.__)("Skip")})})]})}var Mre=P2e;var zre=l(z(),1),jre=l(Y(),1),oF=l(A(),1);var tF=l(O(),1),rF=l(X(),1),Ure=l(N(),1);var Cc=l(N(),1),Rb=l(A(),1);var jd={carousel:"carousel",grid:"grid"};var hi=l(w(),1),R2e=({onBlockPatternSelect:e})=>(0,hi.jsx)("div",{className:"block-editor-block-pattern-setup__actions",children:(0,hi.jsx)(Rb.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:e,children:(0,Cc.__)("Choose")})}),O2e=({handlePrevious:e,handleNext:t,activeSlide:o,totalSlides:r})=>(0,hi.jsxs)("div",{className:"block-editor-block-pattern-setup__navigation",children:[(0,hi.jsx)(Rb.Button,{size:"compact",icon:(0,Cc.isRTL)()?Go:Kr,label:(0,Cc.__)("Previous pattern"),onClick:e,disabled:o===0,accessibleWhenDisabled:!0}),(0,hi.jsx)(Rb.Button,{size:"compact",icon:(0,Cc.isRTL)()?Kr:Go,label:(0,Cc.__)("Next pattern"),onClick:t,disabled:o===r-1,accessibleWhenDisabled:!0})]}),A2e=({viewMode:e,setViewMode:t,handlePrevious:o,handleNext:r,activeSlide:n,totalSlides:i,onBlockPatternSelect:s})=>{let a=e===jd.carousel,c=(0,hi.jsxs)("div",{className:"block-editor-block-pattern-setup__display-controls",children:[(0,hi.jsx)(Rb.Button,{size:"compact",icon:$k,label:(0,Cc.__)("Carousel view"),onClick:()=>t(jd.carousel),isPressed:a}),(0,hi.jsx)(Rb.Button,{size:"compact",icon:Ek,label:(0,Cc.__)("Grid view"),onClick:()=>t(jd.grid),isPressed:e===jd.grid})]});return(0,hi.jsxs)("div",{className:"block-editor-block-pattern-setup__toolbar",children:[a&&(0,hi.jsx)(O2e,{handlePrevious:o,handleNext:r,activeSlide:n,totalSlides:i}),c,a&&(0,hi.jsx)(R2e,{onBlockPatternSelect:s})]})},Dre=A2e;var Vre=l(z(),1);function L2e(e,t,o){return(0,Vre.useSelect)(r=>{let{getBlockRootClientId:n,getPatternsByBlockTypes:i,__experimentalGetAllowedPatterns:s}=r(x),a=n(e);return o?s(a).filter(o):i(t,a)},[e,t,o])}var Fre=L2e;var $t=l(w(),1),N2e=({viewMode:e,activeSlide:t,patterns:o,onBlockPatternSelect:r,showTitles:n})=>{let i="block-editor-block-pattern-setup__container";if(e===jd.carousel){let s=new Map([[t,"active-slide"],[t-1,"previous-slide"],[t+1,"next-slide"]]);return(0,$t.jsx)("div",{className:"block-editor-block-pattern-setup__carousel",children:(0,$t.jsx)("div",{className:i,children:(0,$t.jsx)("div",{className:"carousel-container",children:o.map((a,c)=>(0,$t.jsx)(Gre,{active:c===t,className:s.get(c)||"",pattern:a},a.name))})})})}return(0,$t.jsx)("div",{className:"block-editor-block-pattern-setup__grid",children:(0,$t.jsx)(oF.Composite,{role:"listbox",className:i,"aria-label":(0,Ure.__)("Patterns list"),children:o.map(s=>(0,$t.jsx)(Hre,{pattern:s,onSelect:r,showTitles:n},s.name))})})};function Hre({pattern:e,onSelect:t,showTitles:o}){let r="block-editor-block-pattern-setup-list",{blocks:n,description:i,viewportWidth:s=700}=e,a=(0,rF.useInstanceId)(Hre,`${r}__item-description`);return(0,$t.jsx)("div",{className:`${r}__list-item`,children:(0,$t.jsxs)(oF.Composite.Item,{render:(0,$t.jsx)("div",{"aria-describedby":i?a:void 0,"aria-label":e.title,className:`${r}__item`}),id:`${r}__pattern__${e.name}`,role:"option",onClick:()=>t(n),children:[(0,$t.jsx)(Tn,{blocks:n,viewportWidth:s}),o&&(0,$t.jsx)("div",{className:`${r}__item-title`,children:e.title}),!!i&&(0,$t.jsx)(Ge,{id:a,children:i})]})})}function Gre({active:e,className:t,pattern:o,minHeight:r}){let{blocks:n,title:i,description:s}=o,a=(0,rF.useInstanceId)(Gre,"block-editor-block-pattern-setup-list__item-description");return(0,$t.jsxs)("div",{"aria-hidden":!e,role:"img",className:`pattern-slide ${t}`,"aria-label":i,"aria-describedby":s?a:void 0,children:[(0,$t.jsx)(Tn,{blocks:n,minHeight:r}),!!s&&(0,$t.jsx)(Ge,{id:a,children:s})]})}var M2e=({clientId:e,blockName:t,filterPatternsFn:o,onBlockPatternSelect:r,initialViewMode:n=jd.carousel,showTitles:i=!1})=>{let[s,a]=(0,tF.useState)(n),[c,u]=(0,tF.useState)(0),{replaceBlock:d}=(0,zre.useDispatch)(x),f=Fre(e,t,o);if(!f?.length)return null;let h=r||(p=>{let g=p.map(b=>(0,jre.cloneBlock)(b));d(e,g)});return(0,$t.jsx)($t.Fragment,{children:(0,$t.jsxs)("div",{className:`block-editor-block-pattern-setup view-mode-${s}`,children:[(0,$t.jsx)(N2e,{viewMode:s,activeSlide:c,patterns:f,onBlockPatternSelect:h,showTitles:i}),(0,$t.jsx)(Dre,{viewMode:s,setViewMode:a,activeSlide:c,totalSlides:f.length,handleNext:()=>{u(p=>Math.min(p+1,f.length-1))},handlePrevious:()=>{u(p=>Math.max(p-1,0))},onBlockPatternSelect:()=>{h(f[c].blocks)}})]})})},Wre=M2e;var nF=l(Y(),1),Bc=l(N(),1),Ec=l(A(),1);var GI=l(z(),1),$re=l(O(),1);var Io=l(w(),1),{Menu:fp}=M(Ec.privateApis);function D2e({className:e,onSelectVariation:t,selectedValue:o,variations:r}){return(0,Io.jsxs)("fieldset",{className:e,children:[(0,Io.jsx)(Ge,{render:(0,Io.jsx)("legend",{}),children:(0,Bc.__)("Transform to variation")}),r.map(n=>(0,Io.jsx)(Ec.Button,{__next40pxDefaultSize:!0,size:"compact",icon:(0,Io.jsx)(Ae,{icon:n.icon,showColors:!0}),isPressed:o===n.name,label:o===n.name?n.title:(0,Bc.sprintf)((0,Bc.__)("Transform to %s"),n.title),onClick:()=>t(n.name),"aria-label":n.title,showTooltip:!0},n.name))]})}function V2e({className:e,onSelectVariation:t,selectedValue:o,variations:r}){return(0,Io.jsx)("div",{className:e,children:(0,Io.jsxs)(fp,{children:[(0,Io.jsx)(fp.TriggerButton,{render:(0,Io.jsx)(Ec.Button,{className:"block-editor-block-variation-transforms__button",__next40pxDefaultSize:!0,variant:"secondary",children:(0,Bc.__)("Transform to variation")})}),(0,Io.jsx)(fp.Popover,{position:"bottom",children:(0,Io.jsx)(fp.Group,{children:r.map(n=>(0,Io.jsxs)(fp.RadioItem,{value:n.name,checked:o===n.name,onChange:()=>t(n.name),children:[(0,Io.jsx)(fp.ItemLabel,{children:n.title}),n.description&&(0,Io.jsx)(fp.ItemHelpText,{children:n.description})]},n.name))})})]})})}function F2e({className:e,onSelectVariation:t,selectedValue:o,variations:r}){return(0,Io.jsx)("div",{className:e,children:(0,Io.jsx)(Ec.__experimentalToggleGroupControl,{label:(0,Bc.__)("Transform to variation"),value:o,hideLabelFromVision:!0,onChange:t,__next40pxDefaultSize:!0,children:r.map(n=>(0,Io.jsx)(Ec.__experimentalToggleGroupControlOptionIcon,{icon:(0,Io.jsx)(Ae,{icon:n.icon,showColors:!0}),value:n.name,label:o===n.name?n.title:(0,Bc.sprintf)((0,Bc.__)("Transform to %s"),n.title)},n.name))})})}function z2e({blockClientId:e}){let{updateBlockAttributes:t}=(0,GI.useDispatch)(x),{activeBlockVariation:o,variations:r,canEdit:n,isContentOnly:i,isSection:s}=(0,GI.useSelect)(p=>{let{getActiveBlockVariation:g,getBlockVariations:b}=p(nF.store),{getBlockName:k,getBlockAttributes:v,getBlockEditingMode:y,isSectionBlock:_}=M(p(x)),{canEditBlock:S}=p(x),C=e&&k(e),{hasContentRoleAttribute:B}=M(p(nF.store)),P=B(C);return{activeBlockVariation:g(C,v(e),"transform"),variations:C&&b(C,"transform"),canEdit:S(e),isContentOnly:y(e)==="contentOnly"&&!P,isSection:_(e)}},[e]),a=o?.name,c=(0,$re.useMemo)(()=>{let p=new Set;return r?(r.forEach(g=>{g.icon&&p.add(g.icon?.src||g.icon)}),p.size===r.length):!1},[r]),u=p=>{t(e,{...r.find(({name:g})=>g===p).attributes})};if(!r?.length||!n||i||s)return null;let d="block-editor-block-variation-transforms",m=r.length>6?D2e:F2e;return(0,Io.jsx)(c?m:V2e,{className:d,onSelectVariation:u,selectedValue:a,variations:r})}var WI=z2e;var mp=l(N(),1),$I=l(A(),1);var Kre=l(w(),1),iF={top:{icon:kN,title:(0,mp._x)("Align top","Block vertical alignment setting")},center:{icon:lN,title:(0,mp._x)("Align middle","Block vertical alignment setting")},bottom:{icon:sN,title:(0,mp._x)("Align bottom","Block vertical alignment setting")},stretch:{icon:gN,title:(0,mp._x)("Stretch to fill","Block vertical alignment setting")},"space-between":{icon:mN,title:(0,mp._x)("Space between","Block vertical alignment setting")}},j2e=["top","center","bottom"],U2e="top";function H2e({value:e,onChange:t,controls:o=j2e,isCollapsed:r=!0,isToolbar:n}){function i(d){return()=>t(e===d?void 0:d)}let s=iF[e],a=iF[U2e],c=n?$I.ToolbarGroup:$I.ToolbarDropdownMenu,u=n?{isCollapsed:r}:{};return(0,Kre.jsx)(c,{icon:s?s.icon:a.icon,label:(0,mp._x)("Change vertical alignment","Block vertical alignment setting label"),controls:o.map(d=>({...iF[d],isActive:e===d,role:r?"menuitemradio":void 0,onClick:i(d)})),...u})}var sF=H2e;var aF=l(w(),1),FC=e=>(0,aF.jsx)(sF,{...e,isToolbar:!1}),Yre=e=>(0,aF.jsx)(sF,{...e,isToolbar:!0});var Ln=l(A(),1),kS=l(O(),1),qI=l(N(),1);var qre=l(A(),1);var lF=l(N(),1),Zre=l(w(),1);function Xre({isLinked:e,...t}){let o=e?(0,lF.__)("Unlink radii"):(0,lF.__)("Link radii");return(0,Zre.jsx)(qre.Button,{...t,className:"components-border-radius-control__linked-button",size:"small",icon:e?yn:Ai,iconSize:24,label:o})}var Qre=l(A(),1);function G2e(e){return[...e].sort((o,r)=>e.filter(n=>n===r).length-e.filter(n=>n===o).length).shift()}function Jre(e={}){if(typeof e=="string")return e;let t=Object.values(e).map(a=>{let c=(0,Qre.__experimentalParseQuantityAndUnitFromRawValue)(a);return typeof a=="string"&&c[0]===void 0?[a,""]:c}),o=t.map(a=>a[0]??""),r=t.map(a=>a[1]),n=o.every(a=>a===o[0])?o[0]:"",i=G2e(r);return n===0||n?`${n}${i||""}`:void 0}function ene(e={}){if(typeof e=="string"||!e||typeof e!="object")return!1;let t=Object.values(e);if(t.length===0)return!1;let o=t[0];return!t.every(n=>n===o)}function tne(e){return e?typeof e=="string"?!0:!!Object.values(e).filter(o=>!!o||o===0).length:!1}var ls=l(A(),1),ane=l(X(),1),Hd=l(N(),1);var pp=l(O(),1);var cF=24,one=8,KI={px:{max:300,steps:1},"%":{max:100,steps:1},vw:{max:100,steps:1},vh:{max:100,steps:1},em:{max:10,steps:.1},rem:{max:10,steps:.1},svw:{max:100,steps:1},lvw:{max:100,steps:1},dvw:{max:100,steps:1},svh:{max:100,steps:1},lvh:{max:100,steps:1},dvh:{max:100,steps:1},vi:{max:100,steps:1},svi:{max:100,steps:1},lvi:{max:100,steps:1},dvi:{max:100,steps:1},vb:{max:100,steps:1},svb:{max:100,steps:1},lvb:{max:100,steps:1},dvb:{max:100,steps:1},vmin:{max:100,steps:1},svmin:{max:100,steps:1},lvmin:{max:100,steps:1},dvmin:{max:100,steps:1},vmax:{max:100,steps:1},svmax:{max:100,steps:1},lvmax:{max:100,steps:1},dvmax:{max:100,steps:1}};var Ud=(e,t)=>e?.includes?e==="0"||e.includes(`var:preset|${t}|`):!1;function rne(e,t){if(!e)return;if(e==="0"||e==="default")return e;let o=e.match(new RegExp(`var:preset\\|${t}\\|(.+)`));return o?o[1]:void 0}function nne(e,t,o){if(e===void 0)return 0;let r=parseFloat(e,10)===0?"0":rne(e,o),n=t.findIndex(i=>String(i.slug)===r);return n!==-1?n:NaN}function uF(e,t,o){if(!Ud(e,o))return e;let r=parseFloat(e,10)===0?"0":rne(e,o);return t.find(i=>String(i.slug)===r)?.size}function ine(e,t,o){if(!e||Ud(e,o)||e==="0")return e;let r=t.find(n=>String(n.size)===String(e));return r?.slug?`var:preset|${o}|${r.slug}`:e}var Ob=l(A(),1),Tc=l(w(),1);function sne({allowNegativeOnDrag:e,ariaLabel:t,allPlaceholder:o,minValue:r,parsedQuantity:n,computedUnit:i,units:s,isMixed:a,step:c,max:u,showTooltip:d,value:f,minimumCustomValue:m,onCustomValueChange:h,onCustomValueSliderChange:p,onUnitChange:g,onMouseOut:b,onMouseOver:k,setMinValue:v}){let y=(0,Tc.jsx)(Ob.__experimentalUnitControl,{className:"preset-input-control__unit-control",disableUnits:a,hideLabelFromVision:!0,label:t,min:r,onChange:h,onUnitChange:g,onBlur:b,onFocus:k,onMouseOut:b,onMouseOver:k,size:"__unstable-large",units:s,value:[n,i].join(""),placeholder:o,onDragStart:()=>{e&&f?.charAt(0)==="-"&&v(0)},onDrag:()=>{e&&f?.charAt(0)==="-"&&v(0)},onDragEnd:()=>{e&&v(m)}});return(0,Tc.jsxs)(Tc.Fragment,{children:[d?(0,Tc.jsx)(Ob.Tooltip,{text:t,placement:"top",children:(0,Tc.jsx)("div",{className:"preset-input-control__tooltip-wrapper",children:y})}):y,(0,Tc.jsx)(Ob.RangeControl,{className:"preset-input-control__custom-value-range",hideLabelFromVision:!0,initialPosition:0,label:t,max:u,min:0,onBlur:b,onChange:p,onFocus:k,onMouseOut:b,onMouseOver:k,step:c,value:n,withInputField:!1,__next40pxDefaultSize:!0})]})}var Gd=l(w(),1);function hp({allowNegativeOnDrag:e=!1,ariaLabel:t,className:o,customValueSettings:r=KI,disableCustomValues:n,icon:i,isMixed:s,value:a,minimumCustomValue:c,onChange:u,onMouseOut:d,onMouseOver:f,onUnitChange:m,presets:h=[],presetType:p,selectedUnit:g,showTooltip:b,units:k}){let v=(0,pp.useMemo)(()=>ine(a,h,p),[a,h,p]),y=o??"preset-input-control",_=h.slice(1,h.length-1).map((K,te)=>({value:te+1,label:void 0})),S=_.length>0,C=h.length<=one,B=s?(0,Hd.__)("Mixed"):null,[P,T]=(0,pp.useState)(c),[E,L]=(0,pp.useState)(!n&&v!==void 0&&!Ud(v,p)),I=null,R=(0,ane.usePrevious)(v);(0,pp.useEffect)(()=>{v&&R!==v&&!Ud(v,p)&&E!==!0&&L(!0)},[v,R,p,E]);let V=!C&&!E&&v!==void 0&&(!Ud(v,p)||Ud(v,p)&&s),j=h;V?(j=[...h,{name:s?(0,Hd.__)("Mixed"):(0,Hd.sprintf)((0,Hd.__)("Custom (%s)"),v),slug:"custom",size:v}],I=j.length-1):s||(I=E?uF(v,h,p):nne(v,h,p));let H=j.map((K,te)=>({key:te,name:K.name})),F=Ud(v,p)?uF(v,h,p):v,[U,G]=(0,ls.__experimentalParseQuantityAndUnitFromRawValue)(F),W=G||g||"px",J=k?.find(K=>K.value===W),le=J?.step??r[W]?.steps??.1,oe=J?.max??r[W]?.max??10,re=K=>{if(K===void 0||K===""){u(void 0);return}isNaN(parseFloat(K))||u(K)},Q=K=>{u([K,W].join(""))},$=K=>v===void 0?void 0:h[K]?.name,ee=(K,te)=>{let ne=parseInt(K,10);if(te==="selectList"){if(ne===0&&h[0]?.slug==="0")return"0";if(ne===0)return}else if(ne===0)return"0";return`var:preset|${p}|${h[K]?.slug}`};return(0,Gd.jsxs)(ls.__experimentalHStack,{className:`preset-input-control__wrapper ${y}__wrapper`,children:[i&&(0,Gd.jsx)(ls.Icon,{className:"preset-input-control__icon",icon:i,size:cF}),(!S||E)&&(0,Gd.jsx)(sne,{allowNegativeOnDrag:e,ariaLabel:t,allPlaceholder:B,minValue:P,parsedQuantity:U,computedUnit:W,units:k,isMixed:s,step:le,max:oe,showTooltip:b,value:v,minimumCustomValue:c,onCustomValueChange:re,onCustomValueSliderChange:Q,onUnitChange:m,onMouseOut:d,onMouseOver:f,setMinValue:T}),S&&C&&!E&&(0,Gd.jsx)(ls.RangeControl,{"aria-valuenow":I,"aria-valuetext":h[I]?.name,className:"preset-input-control__preset-range",hideLabelFromVision:!0,initialPosition:0,label:t,max:h.length-1,marks:_,min:0,onBlur:d,onChange:K=>u(ee(K)),onFocus:f,onMouseDown:K=>{K?.nativeEvent?.offsetX<35&&v===void 0&&u("0")},onMouseOut:d,onMouseOver:f,renderTooltipContent:$,step:1,value:I,withInputField:!1,__next40pxDefaultSize:!0}),S&&!C&&!E&&(0,Gd.jsx)(ls.CustomSelectControl,{className:"preset-input-control__custom-select-control",hideLabelFromVision:!0,label:t,onBlur:d,onChange:K=>{V&&K.selectedItem.key===H.length-1?L(!0):u(ee(K.selectedItem.key,"selectList"))},onFocus:f,onMouseOut:d,onMouseOver:f,options:H,size:"__unstable-large",value:H.find(K=>K.key===I)||""}),S&&!n&&(0,Gd.jsx)(ls.Button,{className:"preset-input-control__custom-toggle",icon:rM,iconSize:cF,isPressed:E,label:E?(0,Hd.__)("Use preset"):(0,Hd.__)("Set custom value"),onClick:()=>{L(!E)},size:"small"})]})}var Ab=l(N(),1);var lne=8,YI=[],dF={all:(0,Ab.__)("Border radius"),topLeft:(0,Ab.__)("Top left"),topRight:(0,Ab.__)("Top right"),bottomLeft:(0,Ab.__)("Bottom left"),bottomRight:(0,Ab.__)("Bottom right")},fF={all:cL,topLeft:fL,topRight:mL,bottomLeft:uL,bottomRight:dL},mF=0;var Ic=l(w(),1);function W2e(e){let t=e?.default??YI,o=e?.custom??YI,r=e?.theme??YI;return(0,kS.useMemo)(()=>{let n=[{name:(0,qI.__)("None"),slug:"0",size:0},...o,...r,...t];return n.length>lne?[{name:(0,qI.__)("Default"),slug:"default",size:void 0},...n]:n},[o,r,t])}function cne(e,t){return t==="all"?Jre(e):typeof e=="string"?e:e?.[t]}function une(e,t){return t==="all"?e.flat:e[t]}function dne(e,t,o){return r=>{o(e==="all"?{topLeft:r,topRight:r,bottomLeft:r,bottomRight:r}:{...typeof t!="string"?t||{}:{topLeft:t,topRight:t,bottomLeft:t,bottomRight:t},[e]:r})}}function fne(e,t,o){return r=>{let n={...t};e==="all"?(n.flat=r,n.topLeft=r,n.topRight=r,n.bottomLeft=r,n.bottomRight=r):n[e]=r,o(n)}}function ZI({onChange:e,values:t,presets:o}){let[r,n]=(0,kS.useState)(!tne(t)||!ene(t)),i=W2e(o),[s,a]=(0,kS.useState)({flat:typeof t=="string"?(0,Ln.__experimentalParseQuantityAndUnitFromRawValue)(t)[1]:void 0,topLeft:(0,Ln.__experimentalParseQuantityAndUnitFromRawValue)(t?.topLeft)[1],topRight:(0,Ln.__experimentalParseQuantityAndUnitFromRawValue)(t?.topRight)[1],bottomLeft:(0,Ln.__experimentalParseQuantityAndUnitFromRawValue)(t?.bottomLeft)[1],bottomRight:(0,Ln.__experimentalParseQuantityAndUnitFromRawValue)(t?.bottomRight)[1]}),[c]=pe("spacing.units"),u=(0,Ln.__experimentalUseCustomUnits)({availableUnits:c||["px","em","rem"]}),d=()=>n(!r);return(0,Ic.jsxs)("fieldset",{className:"components-border-radius-control",children:[(0,Ic.jsxs)(Ln.__experimentalHStack,{className:"components-border-radius-control__header",children:[(0,Ic.jsx)(Ln.BaseControl.VisualLabel,{as:"legend",children:(0,qI.__)("Radius")}),(0,Ic.jsx)(Xre,{onClick:d,isLinked:r})]}),r?(0,Ic.jsx)(hp,{ariaLabel:dF.all,className:"components-border-radius-control",icon:fF.all,minimumCustomValue:mF,onChange:dne("all",t,e),onUnitChange:fne("all",s,a),presets:i,presetType:"border-radius",selectedUnit:une(s,"all"),showTooltip:!0,units:u,value:cne(t,"all")}):(0,Ic.jsx)(Ln.__experimentalVStack,{children:["topLeft","topRight","bottomLeft","bottomRight"].map(f=>(0,Ic.jsx)(hp,{ariaLabel:dF[f],className:"components-border-radius-control",icon:fF[f],minimumCustomValue:mF,onChange:dne(f,t,e),onUnitChange:fne(f,s,a),presets:i,presetType:"border-radius",selectedUnit:une(s,f),showTooltip:!0,units:u,value:cne(t,f)},f))})]})}var hne=l(A(),1);var mne=l(X(),1);var pne=l(w(),1),XI=(0,mne.createHigherOrderComponent)(e=>function(o){let[r,n,i,s,a]=pe("color.palette.default","color.palette.theme","color.palette.custom","color.custom","color.defaultPalette"),c=a?[...n||[],...r||[],...i||[]]:[...n||[],...i||[]],{colors:u=c,disableCustomColors:d=!s}=o,f=u&&u.length>0||!d;return(0,pne.jsx)(e,{...o,colors:u,disableCustomColors:d,hasColorsToChoose:f})},"withColorContext");var gne=XI(hne.ColorPalette);var pF=l(N(),1),oa=l(A(),1);var Po=l(w(),1),{Tabs:Lb}=M(oa.privateApis),$2e=["colors","disableCustomColors","gradients","disableCustomGradients"],Xa={color:"color",gradient:"gradient"};function bne({colors:e,gradients:t,disableCustomColors:o,disableCustomGradients:r,__experimentalIsRenderedInSidebar:n,className:i,label:s,onColorChange:a,onGradientChange:c,colorValue:u,gradientValue:d,clearable:f,showTitle:m=!0,enableAlpha:h,headingLevel:p}){let g=a&&(e&&e.length>0||!o),b=c&&(t&&t.length>0||!r);if(!g&&!b)return null;let k={[Xa.color]:(0,Po.jsx)(oa.ColorPalette,{value:u,onChange:b?y=>{a(y),c()}:a,colors:e,disableCustomColors:o,__experimentalIsRenderedInSidebar:n,clearable:f,enableAlpha:h,headingLevel:p}),[Xa.gradient]:(0,Po.jsx)(oa.GradientPicker,{value:d,onChange:g?y=>{c(y),a()}:c,gradients:t,disableCustomGradients:r,__experimentalIsRenderedInSidebar:n,clearable:f,headingLevel:p})},v=y=>(0,Po.jsx)("div",{className:"block-editor-color-gradient-control__panel",children:k[y]});return(0,Po.jsx)(oa.BaseControl,{className:D("block-editor-color-gradient-control",i),children:(0,Po.jsx)("fieldset",{className:"block-editor-color-gradient-control__fieldset",children:(0,Po.jsxs)(oa.__experimentalVStack,{spacing:1,children:[m&&(0,Po.jsx)("legend",{children:(0,Po.jsx)("div",{className:"block-editor-color-gradient-control__color-indicator",children:(0,Po.jsx)(oa.BaseControl.VisualLabel,{children:s})})}),g&&b&&(0,Po.jsx)("div",{children:(0,Po.jsxs)(Lb,{defaultTabId:d?Xa.gradient:!!g&&Xa.color,children:[(0,Po.jsxs)(Lb.TabList,{children:[(0,Po.jsx)(Lb.Tab,{tabId:Xa.color,children:(0,pF.__)("Color")}),(0,Po.jsx)(Lb.Tab,{tabId:Xa.gradient,children:(0,pF.__)("Gradient")})]}),(0,Po.jsx)(Lb.TabPanel,{tabId:Xa.color,className:"block-editor-color-gradient-control__panel",focusable:!1,children:k.color}),(0,Po.jsx)(Lb.TabPanel,{tabId:Xa.gradient,className:"block-editor-color-gradient-control__panel",focusable:!1,children:k.gradient})]})}),!b&&v(Xa.color),!g&&v(Xa.gradient)]})})})}function K2e(e){let[t,o,r,n]=pe("color.palette","color.gradients","color.custom","color.customGradient");return(0,Po.jsx)(bne,{colors:t,gradients:o,disableCustomColors:!r,disableCustomGradients:!n,...e})}function Y2e(e){return $2e.every(t=>e.hasOwnProperty(t))?(0,Po.jsx)(bne,{...e}):(0,Po.jsx)(K2e,{...e})}var Wd=Y2e;var vne=l(w(),1);function kne({onChange:e,value:t,...o}){return(0,vne.jsx)(Wd,{...o,onColorChange:e,colorValue:t,gradients:[],disableCustomGradients:!0})}var ra=l(N(),1),yne=l(A(),1),_ne=l(ir(),1),hF=l(w(),1);cu([uu,sh]);function q2e({backgroundColor:e,fallbackBackgroundColor:t,fallbackTextColor:o,fallbackLinkColor:r,fontSize:n,isLargeText:i,textColor:s,linkColor:a,enableAlphaChecker:c=!1}){let u=e||t;if(!u)return null;let d=s||o,f=a||r;if(!d&&!f)return null;let m=[{color:d,description:(0,ra.__)("text color")},{color:f,description:(0,ra.__)("link color")}],h=Tt(u),p=h.alpha()<1,g=h.brightness(),b={level:"AA",size:i||i!==!1&&n>=24?"large":"small"},k="",v="";for(let y of m){if(!y.color)continue;let _=Tt(y.color),S=_.isReadable(h,b),C=_.alpha()<1;if(!S){if(p||C)continue;k=g<_.brightness()?(0,ra.sprintf)((0,ra.__)("This color combination may be hard for people to read. Try using a darker background color and/or a brighter %s."),y.description):(0,ra.sprintf)((0,ra.__)("This color combination may be hard for people to read. Try using a brighter background color and/or a darker %s."),y.description),v=(0,ra.__)("This color combination may be hard for people to read.");break}C&&c&&(k=(0,ra.__)("Transparent text may be hard for people to read."),v=(0,ra.__)("Transparent text may be hard for people to read."))}return k?((0,_ne.speak)(v),(0,hF.jsx)("div",{className:"block-editor-contrast-checker",children:(0,hF.jsx)(yne.Notice,{spokenMessage:null,status:"warning",isDismissible:!1,children:k})})):null}var QI=q2e;var Er=l(N(),1),yS=l(Qa(),1),JI=l(O(),1),ia=l(A(),1);var na=l(w(),1),$d=new Date;$d.setDate(20);$d.setMonth($d.getMonth()-3);$d.getMonth()===4&&$d.setMonth(3);function xne({format:e,defaultFormat:t,onChange:o}){return(0,na.jsxs)(ia.__experimentalVStack,{as:"fieldset",spacing:4,className:"block-editor-date-format-picker",children:[(0,na.jsx)(Ge,{render:(0,na.jsx)("legend",{}),children:(0,Er.__)("Date format")}),(0,na.jsx)(ia.ToggleControl,{label:(0,Er.__)("Default format"),help:`${(0,Er.__)("Example:")} ${(0,yS.dateI18n)(t,$d)}`,checked:!e,onChange:r=>o(r?null:t)}),e&&(0,na.jsx)(Z2e,{format:e,onChange:o})]})}function Z2e({format:e,onChange:t}){let r=[...[...new Set(["Y-m-d",(0,Er._x)("n/j/Y","short date format"),(0,Er._x)("n/j/Y g:i A","short date format with time"),(0,Er._x)("M j, Y","medium date format"),(0,Er._x)("M j, Y g:i A","medium date format with time"),(0,Er._x)("F j, Y","long date format"),(0,Er._x)("M j","short date format without the year")])].map((a,c)=>({key:`suggested-${c}`,name:(0,yS.dateI18n)(a,$d),format:a})),{key:"human-diff",name:(0,yS.humanTimeDiff)($d),format:"human-diff"}],n={key:"custom",name:(0,Er.__)("Custom"),className:"block-editor-date-format-picker__custom-format-select-control__custom-option",hint:(0,Er.__)("Enter your own date format")},[i,s]=(0,JI.useState)(()=>!!e&&!r.some(a=>a.format===e));return(0,na.jsxs)(ia.__experimentalVStack,{children:[(0,na.jsx)(ia.CustomSelectControl,{__next40pxDefaultSize:!0,label:(0,Er.__)("Choose a format"),options:[...r,n],value:i?n:r.find(a=>a.format===e)??n,onChange:({selectedItem:a})=>{a===n?s(!0):(s(!1),t(a.format))}}),i&&(0,na.jsx)(ia.TextControl,{__next40pxDefaultSize:!0,label:(0,Er.__)("Custom format"),hideLabelFromVision:!0,help:(0,JI.createInterpolateElement)((0,Er.__)("Enter a date or time <Link>format string</Link>."),{Link:(0,na.jsx)(ia.ExternalLink,{href:(0,Er.__)("https://wordpress.org/documentation/article/customize-date-and-time-format/")})}),value:e,onChange:a=>t(a)})]})}var cs=l(A(),1),_S=l(N(),1),wne=l(ot(),1);var Cne=l(X(),1),Ja=l(w(),1);function Bne({id:e,colorPalette:t,duotonePalette:o,disableCustomColors:r,disableCustomDuotone:n,value:i,onChange:s}){let a;i==="unset"?a=(0,Ja.jsx)(cs.ColorIndicator,{className:"block-editor-duotone-control__unset-indicator"}):i?a=(0,Ja.jsx)(cs.DuotoneSwatch,{values:i}):a=(0,Ja.jsx)(Ee,{icon:CL});let c=(0,_S.__)("Apply duotone filter"),d=`${(0,Cne.useInstanceId)(Bne,"duotone-control",e)}__description`;return(0,Ja.jsx)(cs.Dropdown,{popoverProps:{className:"block-editor-duotone-control__popover",headerTitle:(0,_S.__)("Duotone")},renderToggle:({isOpen:f,onToggle:m})=>(0,Ja.jsx)(cs.ToolbarButton,{showTooltip:!0,onClick:m,"aria-haspopup":"true","aria-expanded":f,onKeyDown:p=>{!f&&p.keyCode===wne.DOWN&&(p.preventDefault(),m())},label:c,icon:a}),renderContent:()=>(0,Ja.jsxs)(cs.MenuGroup,{label:(0,_S.__)("Duotone"),children:[(0,Ja.jsx)("p",{children:(0,_S.__)("Create a two-tone color effect without losing your original image.")}),(0,Ja.jsx)(cs.DuotonePicker,{"aria-label":c,"aria-describedby":d,colorPalette:t,duotonePalette:o,disableCustomColors:r,disableCustomDuotone:n,value:i,onChange:s})]})})}var eP=Bne;var Pne=l(A(),1),Rne=l(Re(),1),One=l(O(),1),gi=l(N(),1);var cr=l(N(),1);var tP=l(N(),1);function Ene(e){if(!e)return{};if(typeof e=="object")return e;let t;switch(e){case"normal":t=(0,tP._x)("Regular","font style");break;case"italic":t=(0,tP._x)("Italic","font style");break;case"oblique":t=(0,tP._x)("Oblique","font style");break;default:t=e;break}return{name:t,value:e}}var sa=l(N(),1);function gF(e){if(!e)return{};if(typeof e=="object")return e;let t;switch(e){case"normal":case"400":t=(0,sa._x)("Regular","font weight");break;case"bold":case"700":t=(0,sa._x)("Bold","font weight");break;case"100":t=(0,sa._x)("Thin","font weight");break;case"200":t=(0,sa._x)("Extra Light","font weight");break;case"300":t=(0,sa._x)("Light","font weight");break;case"500":t=(0,sa._x)("Medium","font weight");break;case"600":t=(0,sa._x)("Semi Bold","font weight");break;case"800":t=(0,sa._x)("Extra Bold","font weight");break;case"900":t=(0,sa._x)("Black","font weight");break;case"1000":t=(0,sa._x)("Extra Black","font weight");break;default:t=e;break}return{name:t,value:e}}var Tne=[{name:(0,cr._x)("Regular","font style"),value:"normal"},{name:(0,cr._x)("Italic","font style"),value:"italic"}],Ine=[{name:(0,cr._x)("Thin","font weight"),value:"100"},{name:(0,cr._x)("Extra Light","font weight"),value:"200"},{name:(0,cr._x)("Light","font weight"),value:"300"},{name:(0,cr._x)("Regular","font weight"),value:"400"},{name:(0,cr._x)("Medium","font weight"),value:"500"},{name:(0,cr._x)("Semi Bold","font weight"),value:"600"},{name:(0,cr._x)("Bold","font weight"),value:"700"},{name:(0,cr._x)("Extra Bold","font weight"),value:"800"},{name:(0,cr._x)("Black","font weight"),value:"900"},{name:(0,cr._x)("Extra Black","font weight"),value:"1000"}];function Nb(e){let t=[],o=[],r=[],n=!e||e?.length===0,i=!1;return e?.forEach(s=>{if(typeof s.fontWeight=="string"&&/\s/.test(s.fontWeight.trim())){i=!0;let[u,d]=s.fontWeight.split(" ");u=parseInt(u.slice(0,1)),d==="1000"?d=10:d=parseInt(d.slice(0,1));for(let f=u;f<=d;f++){let m=`${f.toString()}00`;o.some(h=>h.value===m)||o.push(gF(m))}}let a=gF(typeof s.fontWeight=="number"?s.fontWeight.toString():s.fontWeight),c=Ene(s.fontStyle);c&&Object.keys(c).length&&(t.some(u=>u.value===c.value)||t.push(c)),a&&Object.keys(a).length&&(o.some(u=>u.value===a.value)||i||o.push(a))}),o.some(s=>s.value>="600")||o.push({name:(0,cr._x)("Bold","font weight"),value:"700"}),t.some(s=>s.value==="italic")||t.push({name:(0,cr._x)("Italic","font style"),value:"italic"}),n&&(t=Tne,o=Ine),t=t.length===0?Tne:t,o=o.length===0?Ine:o,t.forEach(({name:s,value:a})=>{o.forEach(({name:c,value:u})=>{let d=a==="normal"?c:(0,cr.sprintf)((0,cr._x)("%1$s %2$s","font"),c,s);r.push({key:`${a}-${u}`,name:d,style:{fontStyle:a,fontWeight:u}})})}),{fontStyles:t,fontWeights:o,combinedStyleAndWeightOptions:r,isSystemFont:n,isVariableFont:i}}var Ane=l(w(),1),X2e=(e,t)=>e?t?(0,gi.__)("Appearance"):(0,gi.__)("Font style"):(0,gi.__)("Font weight");function oP(e){let{__next40pxDefaultSize:t=!1,onChange:o,hasFontStyles:r=!0,hasFontWeights:n=!0,fontFamilyFaces:i,value:{fontStyle:s,fontWeight:a},...c}=e,u=r||n,d=X2e(r,n),f={key:"default",name:(0,gi.__)("Default"),style:{fontStyle:void 0,fontWeight:void 0}},{fontStyles:m,fontWeights:h,combinedStyleAndWeightOptions:p}=Nb(i),g=()=>{let S=[f];return p&&S.push(...p),S},b=()=>{let S=[f];return m.forEach(({name:C,value:B})=>{S.push({key:B,name:C,style:{fontStyle:B,fontWeight:void 0}})}),S},k=()=>{let S=[f];return h.forEach(({name:C,value:B})=>{S.push({key:B,name:C,style:{fontStyle:void 0,fontWeight:B}})}),S},v=(0,One.useMemo)(()=>r&&n?g():r?b():k(),[e.options,m,h,p]),y=v.find(S=>S.style.fontStyle===s&&S.style.fontWeight===a)||v[0],_=()=>y?r?n?(0,gi.sprintf)((0,gi.__)("Currently selected font appearance: %s"),y.name):(0,gi.sprintf)((0,gi.__)("Currently selected font style: %s"),y.name):(0,gi.sprintf)((0,gi.__)("Currently selected font weight: %s"),y.name):(0,gi.__)("No selected font appearance");return!t&&(c.size===void 0||c.size==="default")&&(0,Rne.default)("36px default size for wp.blockEditor.__experimentalFontAppearanceControl",{since:"6.8",version:"7.1",hint:"Set the `__next40pxDefaultSize` prop to true to start opting into the new default size, which will become the default in a future version."}),u&&(0,Ane.jsx)(Pne.CustomSelectControl,{...c,className:"components-font-appearance-control",__next40pxDefaultSize:t,__shouldNotWarnDeprecated36pxSize:!0,label:d,describedBy:_(),options:v,value:y,onChange:({selectedItem:S})=>o(S.style)})}var Lne=l(A(),1),Nne=l(Re(),1),bF=l(N(),1);var Mne=l(w(),1);function rP({__next40pxDefaultSize:e=!1,value:t="",onChange:o,fontFamilies:r,className:n,...i}){let[s]=pe("typography.fontFamilies");if(r||(r=s),!r||r.length===0)return null;let a=[{key:"",name:(0,bF.__)("Default")},...r.map(({fontFamily:u,name:d})=>({key:u,name:d||u,style:{fontFamily:u}}))];!e&&(i.size===void 0||i.size==="default")&&(0,Nne.default)("36px default size for wp.blockEditor.__experimentalFontFamilyControl",{since:"6.8",version:"7.1",hint:"Set the `__next40pxDefaultSize` prop to true to start opting into the new default size, which will become the default in a future version."});let c=a.find(u=>u.key===t)??"";return(0,Mne.jsx)(Lne.CustomSelectControl,{__next40pxDefaultSize:e,__shouldNotWarnDeprecated36pxSize:!0,label:(0,bF.__)("Font"),value:c,onChange:({selectedItem:u})=>o(u.key),options:a,className:D("block-editor-font-family-control",n),...i})}var nP=l(A(),1),Dne=l(Re(),1),Vne=l(N(),1);var Fne=l(w(),1);function iP({__next40pxDefaultSize:e=!1,value:t,onChange:o,__unstableInputWidth:r="60px",...n}){let[i]=pe("spacing.units"),s=(0,nP.__experimentalUseCustomUnits)({availableUnits:i||["px","em","rem"],defaultValues:{px:2,em:.2,rem:.2}});return!e&&(n.size===void 0||n.size==="default")&&(0,Dne.default)("36px default size for wp.blockEditor.__experimentalLetterSpacingControl",{since:"6.8",version:"7.1",hint:"Set the `__next40pxDefaultSize` prop to true to start opting into the new default size, which will become the default in a future version."}),(0,Fne.jsx)(nP.__experimentalUnitControl,{__next40pxDefaultSize:e,__shouldNotWarnDeprecated36pxSize:!0,...n,label:(0,Vne.__)("Letter spacing"),value:t,__unstableInputWidth:r,units:s,onChange:o})}var SS=l(N(),1),sP=l(A(),1),vF=l(w(),1),Q2e=[{label:(0,SS.__)("None"),value:"none",icon:kr},{label:(0,SS.__)("Underline"),value:"underline",icon:AL},{label:(0,SS.__)("Strikethrough"),value:"line-through",icon:RL}];function aP({value:e,onChange:t,className:o}){return(0,vF.jsx)(sP.__experimentalToggleGroupControl,{isDeselectable:!0,__next40pxDefaultSize:!0,label:(0,SS.__)("Decoration"),className:D("block-editor-text-decoration-control",o),value:e,onChange:r=>{t(r===e?void 0:r)},children:Q2e.map(r=>(0,vF.jsx)(sP.__experimentalToggleGroupControlOptionIcon,{value:r.value,icon:r.icon,label:r.label},r.value))})}var Mb=l(N(),1);var lP=l(A(),1),kF=l(w(),1),J2e=[{label:(0,Mb.__)("None"),value:"none",icon:kr},{label:(0,Mb.__)("Uppercase"),value:"uppercase",icon:NL},{label:(0,Mb.__)("Lowercase"),value:"lowercase",icon:IL},{label:(0,Mb.__)("Capitalize"),value:"capitalize",icon:EL}];function cP({className:e,value:t,onChange:o}){return(0,kF.jsx)(lP.__experimentalToggleGroupControl,{isDeselectable:!0,__next40pxDefaultSize:!0,label:(0,Mb.__)("Letter case"),className:D("block-editor-text-transform-control",e),value:t,onChange:r=>{o(r===t?void 0:r)},children:J2e.map(r=>(0,kF.jsx)(lP.__experimentalToggleGroupControlOptionIcon,{value:r.value,icon:r.icon,label:r.label},r.value))})}var Db=l(N(),1);var uP=l(A(),1),yF=l(w(),1),eRe=[{label:(0,Db.__)("Horizontal"),value:"horizontal-tb",icon:CM},{label:(0,Db.__)("Vertical"),value:(0,Db.isRTL)()?"vertical-lr":"vertical-rl",icon:EM}];function dP({className:e,value:t,onChange:o}){return(0,yF.jsx)(uP.__experimentalToggleGroupControl,{isDeselectable:!0,__next40pxDefaultSize:!0,label:(0,Db.__)("Orientation"),className:D("block-editor-writing-mode-control",e),value:t,onChange:r=>{o(r===t?void 0:r)},children:eRe.map(r=>(0,yF.jsx)(uP.__experimentalToggleGroupControlOptionIcon,{value:r.value,icon:r.icon,label:r.label},r.value))})}var ln=l(A(),1),zne=l(O(),1),jne=l(N(),1);var qo=l(w(),1),tRe=({setting:e,children:t,panelId:o,...r})=>{let n=()=>{e.colorValue?e.onColorChange():e.gradientValue&&e.onGradientChange()};return(0,qo.jsx)(ln.__experimentalToolsPanelItem,{hasValue:()=>!!e.colorValue||!!e.gradientValue,label:e.label,onDeselect:n,isShownByDefault:e.isShownByDefault!==void 0?e.isShownByDefault:!0,...r,className:"block-editor-tools-panel-color-gradient-settings__item",panelId:o,resetAllFilter:e.resetAllFilter,children:t})},oRe=({colorValue:e,label:t})=>(0,qo.jsxs)(ln.__experimentalHStack,{justify:"flex-start",children:[(0,qo.jsx)(ln.ColorIndicator,{className:"block-editor-panel-color-gradient-settings__color-indicator",colorValue:e}),(0,qo.jsx)(ln.FlexItem,{className:"block-editor-panel-color-gradient-settings__color-name",title:t,children:t})]}),rRe=e=>function({onToggle:o,isOpen:r}){let{clearable:n,colorValue:i,gradientValue:s,onColorChange:a,onGradientChange:c,label:u}=e,d=(0,zne.useRef)(void 0),f={onClick:o,className:D("block-editor-panel-color-gradient-settings__dropdown",{"is-open":r}),"aria-expanded":r,ref:d},m=()=>{i?a():s&&c()},h=i??s;return(0,qo.jsxs)(qo.Fragment,{children:[(0,qo.jsx)(ln.Button,{__next40pxDefaultSize:!0,...f,children:(0,qo.jsx)(oRe,{colorValue:h,label:u})}),n&&h&&(0,qo.jsx)(ln.Button,{__next40pxDefaultSize:!0,label:(0,jne.__)("Reset"),className:"block-editor-panel-color-gradient-settings__reset",size:"small",icon:kr,onClick:()=>{m(),r&&o(),d.current?.focus()}})]})};function fP({colors:e,disableCustomColors:t,disableCustomGradients:o,enableAlpha:r,gradients:n,settings:i,__experimentalIsRenderedInSidebar:s,...a}){let c;return s&&(c={placement:"left-start",offset:36,shift:!0}),(0,qo.jsx)(qo.Fragment,{children:i.map((u,d)=>{let f={clearable:!1,colorValue:u.colorValue,colors:e,disableCustomColors:t,disableCustomGradients:o,enableAlpha:r,gradientValue:u.gradientValue,gradients:n,label:u.label,onColorChange:u.onColorChange,onGradientChange:u.onGradientChange,showTitle:!1,__experimentalIsRenderedInSidebar:s,...u},m={clearable:u.clearable,label:u.label,colorValue:u.colorValue,gradientValue:u.gradientValue,onColorChange:u.onColorChange,onGradientChange:u.onGradientChange};return u&&(0,qo.jsx)(tRe,{setting:u,...a,children:(0,qo.jsx)(ln.Dropdown,{popoverProps:c,className:"block-editor-tools-panel-color-gradient-settings__dropdown",renderToggle:rRe(m),renderContent:()=>(0,qo.jsx)(ln.__experimentalDropdownContentWrapper,{paddingSize:"none",children:(0,qo.jsx)("div",{className:"block-editor-panel-color-gradient-settings__dropdown-content",children:(0,qo.jsx)(Wd,{...f})})})})},d)})})}var mP=l(A(),1),Une=l(z(),1),Hne=l(X(),1);var _F=l(O(),1),gp=l(N(),1);function Kd(){let[e,t,o,r,n,i,s,a,c,u]=pe("color.custom","color.palette.custom","color.palette.theme","color.palette.default","color.defaultPalette","color.customGradient","color.gradients.custom","color.gradients.theme","color.gradients.default","color.defaultGradients"),d={disableCustomColors:!e,disableCustomGradients:!i};return d.colors=(0,_F.useMemo)(()=>{let f=[];return o&&o.length&&f.push({name:(0,gp._x)("Theme","Indicates this palette comes from the theme."),slug:"theme",colors:o}),n&&r&&r.length&&f.push({name:(0,gp._x)("Default","Indicates this palette comes from WordPress."),slug:"default",colors:r}),t&&t.length&&f.push({name:(0,gp._x)("Custom","Indicates this palette is created by the user."),slug:"custom",colors:t}),f},[t,o,r,n]),d.gradients=(0,_F.useMemo)(()=>{let f=[];return a&&a.length&&f.push({name:(0,gp._x)("Theme","Indicates this palette comes from the theme."),slug:"theme",gradients:a}),u&&c&&c.length&&f.push({name:(0,gp._x)("Default","Indicates this palette comes from WordPress."),slug:"default",gradients:c}),s&&s.length&&f.push({name:(0,gp._x)("Custom","Indicates this palette is created by the user."),slug:"custom",gradients:s}),f},[s,a,c,u]),d.hasColorsOrGradients=!!d.colors.length||!!d.gradients.length,d}var aa=l(w(),1),nRe=["colors","disableCustomColors","gradients","disableCustomGradients"],SF=({className:e,colors:t,gradients:o,disableCustomColors:r,disableCustomGradients:n,children:i,settings:s,title:a,showTitle:c=!0,__experimentalIsRenderedInSidebar:u,enableAlpha:d})=>{let f=(0,Hne.useInstanceId)(SF),{batch:m}=(0,Une.useRegistry)();return(!t||t.length===0)&&(!o||o.length===0)&&r&&n&&s?.every(h=>(!h.colors||h.colors.length===0)&&(!h.gradients||h.gradients.length===0)&&(h.disableCustomColors===void 0||h.disableCustomColors)&&(h.disableCustomGradients===void 0||h.disableCustomGradients))?null:(0,aa.jsxs)(mP.__experimentalToolsPanel,{className:D("block-editor-panel-color-gradient-settings",e),label:c?a:void 0,resetAll:()=>{m(()=>{s.forEach(({colorValue:h,gradientValue:p,onColorChange:g,onGradientChange:b})=>{h?g():p&&b()})})},panelId:f,__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last",children:[(0,aa.jsx)(fP,{settings:s,panelId:f,colors:t,gradients:o,disableCustomColors:r,disableCustomGradients:n,__experimentalIsRenderedInSidebar:u,enableAlpha:d}),!!i&&(0,aa.jsxs)(aa.Fragment,{children:[(0,aa.jsx)(mP.__experimentalSpacer,{marginY:4})," ",i]})]})},iRe=e=>{let t=Kd();return(0,aa.jsx)(SF,{...t,...e})},sRe=e=>nRe.every(t=>e.hasOwnProperty(t))?(0,aa.jsx)(SF,{...e}):(0,aa.jsx)(iRe,{...e}),pP=sRe;var hP=l(O(),1),bp=l(A(),1),wF=l(N(),1);var xS=l(w(),1),xF=[],aRe={...KI,px:{max:1e3,steps:1},em:{max:50,steps:.1},rem:{max:50,steps:.1}};function lRe(e){let t=e?.default??xF,o=e?.custom??xF,r=e?.theme??xF;return(0,hP.useMemo)(()=>[{name:(0,wF.__)("None"),slug:"0",size:0},...o,...r,...t],[o,r,t])}function vp({label:e=(0,wF.__)("Dimension"),onChange:t,value:o,dimensionSizes:r}){let[n,i]=pe("dimensions.dimensionSizes","spacing.units"),s=r??n,a=(0,bp.__experimentalUseCustomUnits)({availableUnits:i||["%","px","em","rem","vh","vw"]}),c=lRe(s),[u,d]=(0,hP.useState)(()=>{let[,m]=(0,bp.__experimentalParseQuantityAndUnitFromRawValue)(o);return m||a[0]?.value||"px"}),f=m=>{let[h,p]=(0,bp.__experimentalParseQuantityAndUnitFromRawValue)(o);["em","rem"].includes(m)&&p==="px"?t((h/16).toFixed(2)+m):["em","rem"].includes(p)&&m==="px"?t(Math.round(h*16)+m):["%","vw","svw","lvw","dvw","vh","svh","lvh","dvh","vi","svi","lvi","dvi","vb","svb","lvb","dvb","vmin","svmin","lvmin","dvmin","vmax","svmax","lvmax","dvmax"].includes(m)&&h>100&&t(100+m),d(m)};return(0,xS.jsxs)("fieldset",{className:"block-editor-dimension-control",children:[(0,xS.jsx)(bp.BaseControl.VisualLabel,{as:"legend",children:e}),(0,xS.jsx)(hp,{ariaLabel:e,className:"block-editor-dimension-control",customValueSettings:aRe,minimumCustomValue:0,onChange:t,onUnitChange:f,presets:c,presetType:"dimension",selectedUnit:u,showTooltip:!0,units:a,value:o})]})}var Wne=l(O(),1),ur=l(A(),1),$ne=l(N(),1),Kne=l(Re(),1);var el=l(w(),1),Gne={px:{max:1e3,step:1},"%":{max:100,step:1},vw:{max:100,step:1},vh:{max:100,step:1},em:{max:50,step:.1},rem:{max:50,step:.1},svw:{max:100,step:1},lvw:{max:100,step:1},dvw:{max:100,step:1},svh:{max:100,step:1},lvh:{max:100,step:1},dvh:{max:100,step:1},vi:{max:100,step:1},svi:{max:100,step:1},lvi:{max:100,step:1},dvi:{max:100,step:1},vb:{max:100,step:1},svb:{max:100,step:1},lvb:{max:100,step:1},dvb:{max:100,step:1},vmin:{max:100,step:1},svmin:{max:100,step:1},lvmin:{max:100,step:1},dvmin:{max:100,step:1},vmax:{max:100,step:1},svmax:{max:100,step:1},lvmax:{max:100,step:1},dvmax:{max:100,step:1}};function Yne({label:e=(0,$ne.__)("Height"),onChange:t,value:o}){(0,Kne.default)("wp.blockEditor.HeightControl",{since:"7.0",version:"7.2",alternative:"wp.blockEditor.DimensionControl"});let r=parseFloat(o),[n]=pe("spacing.units"),i=(0,ur.__experimentalUseCustomUnits)({availableUnits:n||["%","px","em","rem","vh","vw"]}),s=(0,Wne.useMemo)(()=>(0,ur.__experimentalParseQuantityAndUnitFromRawValue)(o),[o])[1]||i[0]?.value||"px",a=u=>{t([u,s].join(""))},c=u=>{let[d,f]=(0,ur.__experimentalParseQuantityAndUnitFromRawValue)(o);["em","rem"].includes(u)&&f==="px"?t((d/16).toFixed(2)+u):["em","rem"].includes(f)&&u==="px"?t(Math.round(d*16)+u):["%","vw","svw","lvw","dvw","vh","svh","lvh","dvh","vi","svi","lvi","dvi","vb","svb","lvb","dvb","vmin","svmin","lvmin","dvmin","vmax","svmax","lvmax","dvmax"].includes(u)&&d>100&&t(100+u)};return(0,el.jsxs)("fieldset",{className:"block-editor-height-control",children:[(0,el.jsx)(ur.BaseControl.VisualLabel,{as:"legend",children:e}),(0,el.jsxs)(ur.Flex,{children:[(0,el.jsx)(ur.FlexItem,{isBlock:!0,children:(0,el.jsx)(ur.__experimentalUnitControl,{value:o,units:i,onChange:t,onUnitChange:c,min:0,size:"__unstable-large",label:e,hideLabelFromVision:!0})}),(0,el.jsx)(ur.FlexItem,{isBlock:!0,children:(0,el.jsx)(ur.__experimentalSpacer,{marginX:2,marginBottom:0,children:(0,el.jsx)(ur.RangeControl,{__next40pxDefaultSize:!0,value:r,min:0,max:Gne[s]?.max??100,step:Gne[s]?.step??.1,withInputField:!1,onChange:a,label:e,hideLabelFromVision:!0})})})]})]})}var ES=l(A(),1);var us=l(He()),yie=l(hie());function mRe(e,t,o,r,n,i){i===void 0&&(i=0);var s=Vb(e,t,i),a=s.width,c=s.height,u=Math.min(a,o),d=Math.min(c,r);return u>d*n?{width:d*n,height:d}:{width:u,height:u/n}}function pRe(e){return e.width>e.height?e.width/e.naturalWidth:e.height/e.naturalHeight}function wS(e,t,o,r,n){n===void 0&&(n=0);var i=Vb(t.width,t.height,n),s=i.width,a=i.height;return{x:gie(e.x,s,o.width,r),y:gie(e.y,a,o.height,r)}}function gie(e,t,o,r){var n=t*r/2-o/2;return _P(e,-n,n)}function bie(e,t){return Math.sqrt(Math.pow(e.y-t.y,2)+Math.pow(e.x-t.x,2))}function vie(e,t){return Math.atan2(t.y-e.y,t.x-e.x)*180/Math.PI}function hRe(e,t,o,r,n,i,s){i===void 0&&(i=0),s===void 0&&(s=!0);var a=s?gRe:bRe,c=Vb(t.width,t.height,i),u=Vb(t.naturalWidth,t.naturalHeight,i),d={x:a(100,((c.width-o.width/n)/2-e.x/n)/c.width*100),y:a(100,((c.height-o.height/n)/2-e.y/n)/c.height*100),width:a(100,o.width/c.width*100/n),height:a(100,o.height/c.height*100/n)},f=Math.round(a(u.width,d.width*u.width/100)),m=Math.round(a(u.height,d.height*u.height/100)),h=u.width>=u.height*r,p=h?{width:Math.round(m*r),height:m}:{width:f,height:Math.round(f/r)},g=Wo(Wo({},p),{x:Math.round(a(u.width-p.width,d.x*u.width/100)),y:Math.round(a(u.height-p.height,d.y*u.height/100))});return{croppedAreaPercentages:d,croppedAreaPixels:g}}function gRe(e,t){return Math.min(e,Math.max(0,t))}function bRe(e,t){return t}function vRe(e,t,o,r,n,i){var s=Vb(t.width,t.height,o),a=_P(r.width/s.width*(100/e.width),n,i),c={x:a*s.width/2-r.width/2-s.width*a*(e.x/100),y:a*s.height/2-r.height/2-s.height*a*(e.y/100)};return{crop:c,zoom:a}}function kRe(e,t,o){var r=pRe(t);return o.height>o.width?o.height/(e.height*r):o.width/(e.width*r)}function yRe(e,t,o,r,n,i){o===void 0&&(o=0);var s=Vb(t.naturalWidth,t.naturalHeight,o),a=_P(kRe(e,t,r),n,i),c=r.height>r.width?r.height/e.height:r.width/e.width,u={x:((s.width-e.width)/2-e.x)*c,y:((s.height-e.height)/2-e.y)*c};return{crop:u,zoom:a}}function kie(e,t){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function _Re(e){return e*Math.PI/180}function Vb(e,t,o){var r=_Re(o);return{width:Math.abs(Math.cos(r)*e)+Math.abs(Math.sin(r)*t),height:Math.abs(Math.sin(r)*e)+Math.abs(Math.cos(r)*t)}}function _P(e,t,o){return Math.min(Math.max(e,t),o)}function yP(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter(function(o){return typeof o=="string"&&o.length>0}).join(" ").trim()}var SRe=`.reactEasyCrop_Container { |
| 90 |
position: absolute; |
| 91 |
top: 0; |
| 92 |
left: 0; |
| 93 |
right: 0; |
| 94 |
bottom: 0; |
| 95 |
overflow: hidden; |
| 96 |
user-select: none; |
| 97 |
touch-action: none; |
| 98 |
cursor: move; |
| 99 |
display: flex; |
| 100 |
justify-content: center; |
| 101 |
align-items: center; |
| 102 |
} |
| 103 |
|
| 104 |
.reactEasyCrop_Image, |
| 105 |
.reactEasyCrop_Video { |
| 106 |
will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */ |
| 107 |
} |
| 108 |
|
| 109 |
.reactEasyCrop_Contain { |
| 110 |
max-width: 100%; |
| 111 |
max-height: 100%; |
| 112 |
margin: auto; |
| 113 |
position: absolute; |
| 114 |
top: 0; |
| 115 |
bottom: 0; |
| 116 |
left: 0; |
| 117 |
right: 0; |
| 118 |
} |
| 119 |
.reactEasyCrop_Cover_Horizontal { |
| 120 |
width: 100%; |
| 121 |
height: auto; |
| 122 |
} |
| 123 |
.reactEasyCrop_Cover_Vertical { |
| 124 |
width: auto; |
| 125 |
height: 100%; |
| 126 |
} |
| 127 |
|
| 128 |
.reactEasyCrop_CropArea { |
| 129 |
position: absolute; |
| 130 |
left: 50%; |
| 131 |
top: 50%; |
| 132 |
transform: translate(-50%, -50%); |
| 133 |
border: 1px solid rgba(255, 255, 255, 0.5); |
| 134 |
box-sizing: border-box; |
| 135 |
box-shadow: 0 0 0 9999em; |
| 136 |
color: rgba(0, 0, 0, 0.5); |
| 137 |
overflow: hidden; |
| 138 |
} |
| 139 |
|
| 140 |
.reactEasyCrop_CropAreaRound { |
| 141 |
border-radius: 50%; |
| 142 |
} |
| 143 |
|
| 144 |
.reactEasyCrop_CropAreaGrid::before { |
| 145 |
content: ' '; |
| 146 |
box-sizing: border-box; |
| 147 |
position: absolute; |
| 148 |
border: 1px solid rgba(255, 255, 255, 0.5); |
| 149 |
top: 0; |
| 150 |
bottom: 0; |
| 151 |
left: 33.33%; |
| 152 |
right: 33.33%; |
| 153 |
border-top: 0; |
| 154 |
border-bottom: 0; |
| 155 |
} |
| 156 |
|
| 157 |
.reactEasyCrop_CropAreaGrid::after { |
| 158 |
content: ' '; |
| 159 |
box-sizing: border-box; |
| 160 |
position: absolute; |
| 161 |
border: 1px solid rgba(255, 255, 255, 0.5); |
| 162 |
top: 33.33%; |
| 163 |
bottom: 33.33%; |
| 164 |
left: 0; |
| 165 |
right: 0; |
| 166 |
border-left: 0; |
| 167 |
border-right: 0; |
| 168 |
} |
| 169 |
`,xRe=1,wRe=3,CRe=1,_ie=(function(e){d7(t,e);function t(){var o=e!==null&&e.apply(this,arguments)||this;return o.cropperRef=us.createRef(),o.imageRef=us.createRef(),o.videoRef=us.createRef(),o.containerPosition={x:0,y:0},o.containerRef=null,o.styleRef=null,o.containerRect=null,o.mediaSize={width:0,height:0,naturalWidth:0,naturalHeight:0},o.dragStartPosition={x:0,y:0},o.dragStartCrop={x:0,y:0},o.gestureZoomStart=0,o.gestureRotationStart=0,o.isTouching=!1,o.lastPinchDistance=0,o.lastPinchRotation=0,o.rafDragTimeout=null,o.rafPinchTimeout=null,o.wheelTimer=null,o.currentDoc=typeof document<"u"?document:null,o.currentWindow=typeof window<"u"?window:null,o.resizeObserver=null,o.previousCropSize=null,o.isInitialized=!1,o.state={cropSize:null,hasWheelJustStarted:!1,mediaObjectFit:void 0},o.initResizeObserver=function(){if(!(typeof window.ResizeObserver>"u"||!o.containerRef)){var r=!0;o.resizeObserver=new window.ResizeObserver(function(n){if(r){r=!1;return}o.computeSizes()}),o.resizeObserver.observe(o.containerRef)}},o.preventZoomSafari=function(r){return r.preventDefault()},o.cleanEvents=function(){o.currentDoc&&(o.currentDoc.removeEventListener("mousemove",o.onMouseMove),o.currentDoc.removeEventListener("mouseup",o.onDragStopped),o.currentDoc.removeEventListener("touchmove",o.onTouchMove),o.currentDoc.removeEventListener("touchend",o.onDragStopped),o.currentDoc.removeEventListener("gesturechange",o.onGestureChange),o.currentDoc.removeEventListener("gestureend",o.onGestureEnd),o.currentDoc.removeEventListener("scroll",o.onScroll))},o.clearScrollEvent=function(){o.containerRef&&o.containerRef.removeEventListener("wheel",o.onWheel),o.wheelTimer&&clearTimeout(o.wheelTimer)},o.onMediaLoad=function(){var r=o.computeSizes();r&&(o.previousCropSize=r,o.emitCropData(),o.setInitialCrop(r),o.isInitialized=!0),o.props.onMediaLoaded&&o.props.onMediaLoaded(o.mediaSize)},o.setInitialCrop=function(r){if(o.props.initialCroppedAreaPercentages){var n=vRe(o.props.initialCroppedAreaPercentages,o.mediaSize,o.props.rotation,r,o.props.minZoom,o.props.maxZoom),i=n.crop,s=n.zoom;o.props.onCropChange(i),o.props.onZoomChange&&o.props.onZoomChange(s)}else if(o.props.initialCroppedAreaPixels){var a=yRe(o.props.initialCroppedAreaPixels,o.mediaSize,o.props.rotation,r,o.props.minZoom,o.props.maxZoom),i=a.crop,s=a.zoom;o.props.onCropChange(i),o.props.onZoomChange&&o.props.onZoomChange(s)}},o.computeSizes=function(){var r,n,i,s,a,c,u=o.imageRef.current||o.videoRef.current;if(u&&o.containerRef){o.containerRect=o.containerRef.getBoundingClientRect(),o.saveContainerPosition();var d=o.containerRect.width/o.containerRect.height,f=((r=o.imageRef.current)===null||r===void 0?void 0:r.naturalWidth)||((n=o.videoRef.current)===null||n===void 0?void 0:n.videoWidth)||0,m=((i=o.imageRef.current)===null||i===void 0?void 0:i.naturalHeight)||((s=o.videoRef.current)===null||s===void 0?void 0:s.videoHeight)||0,h=u.offsetWidth<f||u.offsetHeight<m,p=f/m,g=void 0;if(h)switch(o.state.mediaObjectFit){default:case"contain":g=d>p?{width:o.containerRect.height*p,height:o.containerRect.height}:{width:o.containerRect.width,height:o.containerRect.width/p};break;case"horizontal-cover":g={width:o.containerRect.width,height:o.containerRect.width/p};break;case"vertical-cover":g={width:o.containerRect.height*p,height:o.containerRect.height};break}else g={width:u.offsetWidth,height:u.offsetHeight};o.mediaSize=Wo(Wo({},g),{naturalWidth:f,naturalHeight:m}),o.props.setMediaSize&&o.props.setMediaSize(o.mediaSize);var b=o.props.cropSize?o.props.cropSize:mRe(o.mediaSize.width,o.mediaSize.height,o.containerRect.width,o.containerRect.height,o.props.aspect,o.props.rotation);return(((a=o.state.cropSize)===null||a===void 0?void 0:a.height)!==b.height||((c=o.state.cropSize)===null||c===void 0?void 0:c.width)!==b.width)&&o.props.onCropSizeChange&&o.props.onCropSizeChange(b),o.setState({cropSize:b},o.recomputeCropPosition),o.props.setCropSize&&o.props.setCropSize(b),b}},o.saveContainerPosition=function(){if(o.containerRef){var r=o.containerRef.getBoundingClientRect();o.containerPosition={x:r.left,y:r.top}}},o.onMouseDown=function(r){o.currentDoc&&(r.preventDefault(),o.currentDoc.addEventListener("mousemove",o.onMouseMove),o.currentDoc.addEventListener("mouseup",o.onDragStopped),o.saveContainerPosition(),o.onDragStart(t.getMousePoint(r)))},o.onMouseMove=function(r){return o.onDrag(t.getMousePoint(r))},o.onScroll=function(r){o.currentDoc&&(r.preventDefault(),o.saveContainerPosition())},o.onTouchStart=function(r){o.currentDoc&&(o.isTouching=!0,!(o.props.onTouchRequest&&!o.props.onTouchRequest(r))&&(o.currentDoc.addEventListener("touchmove",o.onTouchMove,{passive:!1}),o.currentDoc.addEventListener("touchend",o.onDragStopped),o.saveContainerPosition(),r.touches.length===2?o.onPinchStart(r):r.touches.length===1&&o.onDragStart(t.getTouchPoint(r.touches[0]))))},o.onTouchMove=function(r){r.preventDefault(),r.touches.length===2?o.onPinchMove(r):r.touches.length===1&&o.onDrag(t.getTouchPoint(r.touches[0]))},o.onGestureStart=function(r){o.currentDoc&&(r.preventDefault(),o.currentDoc.addEventListener("gesturechange",o.onGestureChange),o.currentDoc.addEventListener("gestureend",o.onGestureEnd),o.gestureZoomStart=o.props.zoom,o.gestureRotationStart=o.props.rotation)},o.onGestureChange=function(r){if(r.preventDefault(),!o.isTouching){var n=t.getMousePoint(r),i=o.gestureZoomStart-1+r.scale;if(o.setNewZoom(i,n,{shouldUpdatePosition:!0}),o.props.onRotationChange){var s=o.gestureRotationStart+r.rotation;o.props.onRotationChange(s)}}},o.onGestureEnd=function(r){o.cleanEvents()},o.onDragStart=function(r){var n,i,s=r.x,a=r.y;o.dragStartPosition={x:s,y:a},o.dragStartCrop=Wo({},o.props.crop),(i=(n=o.props).onInteractionStart)===null||i===void 0||i.call(n)},o.onDrag=function(r){var n=r.x,i=r.y;o.currentWindow&&(o.rafDragTimeout&&o.currentWindow.cancelAnimationFrame(o.rafDragTimeout),o.rafDragTimeout=o.currentWindow.requestAnimationFrame(function(){if(o.state.cropSize&&!(n===void 0||i===void 0)){var s=n-o.dragStartPosition.x,a=i-o.dragStartPosition.y,c={x:o.dragStartCrop.x+s,y:o.dragStartCrop.y+a},u=o.props.restrictPosition?wS(c,o.mediaSize,o.state.cropSize,o.props.zoom,o.props.rotation):c;o.props.onCropChange(u)}}))},o.onDragStopped=function(){var r,n;o.isTouching=!1,o.cleanEvents(),o.emitCropData(),(n=(r=o.props).onInteractionEnd)===null||n===void 0||n.call(r)},o.onWheel=function(r){if(o.currentWindow&&!(o.props.onWheelRequest&&!o.props.onWheelRequest(r))){r.preventDefault();var n=t.getMousePoint(r),i=(0,yie.default)(r).pixelY,s=o.props.zoom-i*o.props.zoomSpeed/200;o.setNewZoom(s,n,{shouldUpdatePosition:!0}),o.state.hasWheelJustStarted||o.setState({hasWheelJustStarted:!0},function(){var a,c;return(c=(a=o.props).onInteractionStart)===null||c===void 0?void 0:c.call(a)}),o.wheelTimer&&clearTimeout(o.wheelTimer),o.wheelTimer=o.currentWindow.setTimeout(function(){return o.setState({hasWheelJustStarted:!1},function(){var a,c;return(c=(a=o.props).onInteractionEnd)===null||c===void 0?void 0:c.call(a)})},250)}},o.getPointOnContainer=function(r,n){var i=r.x,s=r.y;if(!o.containerRect)throw new Error("The Cropper is not mounted");return{x:o.containerRect.width/2-(i-n.x),y:o.containerRect.height/2-(s-n.y)}},o.getPointOnMedia=function(r){var n=r.x,i=r.y,s=o.props,a=s.crop,c=s.zoom;return{x:(n+a.x)/c,y:(i+a.y)/c}},o.setNewZoom=function(r,n,i){var s=i===void 0?{}:i,a=s.shouldUpdatePosition,c=a===void 0?!0:a;if(!(!o.state.cropSize||!o.props.onZoomChange)){var u=_P(r,o.props.minZoom,o.props.maxZoom);if(c){var d=o.getPointOnContainer(n,o.containerPosition),f=o.getPointOnMedia(d),m={x:f.x*u-d.x,y:f.y*u-d.y},h=o.props.restrictPosition?wS(m,o.mediaSize,o.state.cropSize,u,o.props.rotation):m;o.props.onCropChange(h)}o.props.onZoomChange(u)}},o.getCropData=function(){if(!o.state.cropSize)return null;var r=o.props.restrictPosition?wS(o.props.crop,o.mediaSize,o.state.cropSize,o.props.zoom,o.props.rotation):o.props.crop;return hRe(r,o.mediaSize,o.state.cropSize,o.getAspect(),o.props.zoom,o.props.rotation,o.props.restrictPosition)},o.emitCropData=function(){var r=o.getCropData();if(r){var n=r.croppedAreaPercentages,i=r.croppedAreaPixels;o.props.onCropComplete&&o.props.onCropComplete(n,i),o.props.onCropAreaChange&&o.props.onCropAreaChange(n,i)}},o.emitCropAreaChange=function(){var r=o.getCropData();if(r){var n=r.croppedAreaPercentages,i=r.croppedAreaPixels;o.props.onCropAreaChange&&o.props.onCropAreaChange(n,i)}},o.recomputeCropPosition=function(){if(o.state.cropSize){var r=o.props.crop;if(o.isInitialized&&o.previousCropSize){var n=Math.abs(o.previousCropSize.width-o.state.cropSize.width)>1e-6||Math.abs(o.previousCropSize.height-o.state.cropSize.height)>1e-6;if(n){var i=o.state.cropSize.width/o.previousCropSize.width,s=o.state.cropSize.height/o.previousCropSize.height;r={x:o.props.crop.x*i,y:o.props.crop.y*s}}}var a=o.props.restrictPosition?wS(r,o.mediaSize,o.state.cropSize,o.props.zoom,o.props.rotation):r;o.previousCropSize=o.state.cropSize,o.props.onCropChange(a),o.emitCropData()}},o.onKeyDown=function(r){var n,i,s=o.props,a=s.crop,c=s.onCropChange,u=s.keyboardStep,d=s.zoom,f=s.rotation,m=u;if(o.state.cropSize){r.shiftKey&&(m*=.2);var h=Wo({},a);switch(r.key){case"ArrowUp":h.y-=m,r.preventDefault();break;case"ArrowDown":h.y+=m,r.preventDefault();break;case"ArrowLeft":h.x-=m,r.preventDefault();break;case"ArrowRight":h.x+=m,r.preventDefault();break;default:return}o.props.restrictPosition&&(h=wS(h,o.mediaSize,o.state.cropSize,d,f)),r.repeat||(i=(n=o.props).onInteractionStart)===null||i===void 0||i.call(n),c(h)}},o.onKeyUp=function(r){var n,i;switch(r.key){case"ArrowUp":case"ArrowDown":case"ArrowLeft":case"ArrowRight":r.preventDefault();break;default:return}o.emitCropData(),(i=(n=o.props).onInteractionEnd)===null||i===void 0||i.call(n)},o}return t.prototype.componentDidMount=function(){!this.currentDoc||!this.currentWindow||(this.containerRef&&(this.containerRef.ownerDocument&&(this.currentDoc=this.containerRef.ownerDocument),this.currentDoc.defaultView&&(this.currentWindow=this.currentDoc.defaultView),this.initResizeObserver(),typeof window.ResizeObserver>"u"&&this.currentWindow.addEventListener("resize",this.computeSizes),this.props.zoomWithScroll&&this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}),this.containerRef.addEventListener("gesturestart",this.onGestureStart)),this.currentDoc.addEventListener("scroll",this.onScroll),this.props.disableAutomaticStylesInjection||(this.styleRef=this.currentDoc.createElement("style"),this.styleRef.setAttribute("type","text/css"),this.props.nonce&&this.styleRef.setAttribute("nonce",this.props.nonce),this.styleRef.innerHTML=SRe,this.currentDoc.head.appendChild(this.styleRef)),this.imageRef.current&&this.imageRef.current.complete&&this.onMediaLoad(),this.props.setImageRef&&this.props.setImageRef(this.imageRef),this.props.setVideoRef&&this.props.setVideoRef(this.videoRef),this.props.setCropperRef&&this.props.setCropperRef(this.cropperRef))},t.prototype.componentWillUnmount=function(){var o,r;!this.currentDoc||!this.currentWindow||(typeof window.ResizeObserver>"u"&&this.currentWindow.removeEventListener("resize",this.computeSizes),(o=this.resizeObserver)===null||o===void 0||o.disconnect(),this.containerRef&&this.containerRef.removeEventListener("gesturestart",this.preventZoomSafari),this.styleRef&&((r=this.styleRef.parentNode)===null||r===void 0||r.removeChild(this.styleRef)),this.cleanEvents(),this.props.zoomWithScroll&&this.clearScrollEvent())},t.prototype.componentDidUpdate=function(o){var r,n,i,s,a,c,u,d,f;o.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):o.aspect!==this.props.aspect?this.computeSizes():o.objectFit!==this.props.objectFit?this.computeSizes():o.zoom!==this.props.zoom?this.recomputeCropPosition():((r=o.cropSize)===null||r===void 0?void 0:r.height)!==((n=this.props.cropSize)===null||n===void 0?void 0:n.height)||((i=o.cropSize)===null||i===void 0?void 0:i.width)!==((s=this.props.cropSize)===null||s===void 0?void 0:s.width)?this.computeSizes():(((a=o.crop)===null||a===void 0?void 0:a.x)!==((c=this.props.crop)===null||c===void 0?void 0:c.x)||((u=o.crop)===null||u===void 0?void 0:u.y)!==((d=this.props.crop)===null||d===void 0?void 0:d.y))&&this.emitCropAreaChange(),o.zoomWithScroll!==this.props.zoomWithScroll&&this.containerRef&&(this.props.zoomWithScroll?this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}):this.clearScrollEvent()),o.video!==this.props.video&&((f=this.videoRef.current)===null||f===void 0||f.load());var m=this.getObjectFit();m!==this.state.mediaObjectFit&&this.setState({mediaObjectFit:m},this.computeSizes)},t.prototype.getAspect=function(){var o=this.props,r=o.cropSize,n=o.aspect;return r?r.width/r.height:n},t.prototype.getObjectFit=function(){var o,r,n,i;if(this.props.objectFit==="cover"){var s=this.imageRef.current||this.videoRef.current;if(s&&this.containerRef){this.containerRect=this.containerRef.getBoundingClientRect();var a=this.containerRect.width/this.containerRect.height,c=((o=this.imageRef.current)===null||o===void 0?void 0:o.naturalWidth)||((r=this.videoRef.current)===null||r===void 0?void 0:r.videoWidth)||0,u=((n=this.imageRef.current)===null||n===void 0?void 0:n.naturalHeight)||((i=this.videoRef.current)===null||i===void 0?void 0:i.videoHeight)||0,d=c/u;return d<a?"horizontal-cover":"vertical-cover"}return"horizontal-cover"}return this.props.objectFit},t.prototype.onPinchStart=function(o){var r=t.getTouchPoint(o.touches[0]),n=t.getTouchPoint(o.touches[1]);this.lastPinchDistance=bie(r,n),this.lastPinchRotation=vie(r,n),this.onDragStart(kie(r,n))},t.prototype.onPinchMove=function(o){var r=this;if(!(!this.currentDoc||!this.currentWindow)){var n=t.getTouchPoint(o.touches[0]),i=t.getTouchPoint(o.touches[1]),s=kie(n,i);this.onDrag(s),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame(function(){var a=bie(n,i),c=r.props.zoom*(a/r.lastPinchDistance);r.setNewZoom(c,s,{shouldUpdatePosition:!1}),r.lastPinchDistance=a;var u=vie(n,i),d=r.props.rotation+(u-r.lastPinchRotation);r.props.onRotationChange&&r.props.onRotationChange(d),r.lastPinchRotation=u})}},t.prototype.render=function(){var o=this,r,n=this.props,i=n.image,s=n.video,a=n.mediaProps,c=n.cropperProps,u=n.transform,d=n.crop,f=d.x,m=d.y,h=n.rotation,p=n.zoom,g=n.cropShape,b=n.showGrid,k=n.roundCropAreaPixels,v=n.style,y=v.containerStyle,_=v.cropAreaStyle,S=v.mediaStyle,C=n.classes,B=C.containerClassName,P=C.cropAreaClassName,T=C.mediaClassName,E=(r=this.state.mediaObjectFit)!==null&&r!==void 0?r:this.getObjectFit();return us.createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(I){return o.containerRef=I},"data-testid":"container",style:y,className:yP("reactEasyCrop_Container",B)},i?us.createElement("img",Wo({alt:"",className:yP("reactEasyCrop_Image",E==="contain"&&"reactEasyCrop_Contain",E==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",E==="vertical-cover"&&"reactEasyCrop_Cover_Vertical",T)},a,{src:i,ref:this.imageRef,style:Wo(Wo({},S),{transform:u||"translate(".concat(f,"px, ").concat(m,"px) rotate(").concat(h,"deg) scale(").concat(p,")")}),onLoad:this.onMediaLoad})):s&&us.createElement("video",Wo({autoPlay:!0,playsInline:!0,loop:!0,muted:!0,className:yP("reactEasyCrop_Video",E==="contain"&&"reactEasyCrop_Contain",E==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",E==="vertical-cover"&&"reactEasyCrop_Cover_Vertical",T)},a,{ref:this.videoRef,onLoadedMetadata:this.onMediaLoad,style:Wo(Wo({},S),{transform:u||"translate(".concat(f,"px, ").concat(m,"px) rotate(").concat(h,"deg) scale(").concat(p,")")}),controls:!1}),(Array.isArray(s)?s:[{src:s}]).map(function(L){return us.createElement("source",Wo({key:L.src},L))})),this.state.cropSize&&us.createElement("div",Wo({ref:this.cropperRef,style:Wo(Wo({},_),{width:k?Math.round(this.state.cropSize.width):this.state.cropSize.width,height:k?Math.round(this.state.cropSize.height):this.state.cropSize.height}),tabIndex:0,onKeyDown:this.onKeyDown,onKeyUp:this.onKeyUp,"data-testid":"cropper",className:yP("reactEasyCrop_CropArea",g==="round"&&"reactEasyCrop_CropAreaRound",b&&"reactEasyCrop_CropAreaGrid",P)},c)))},t.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:wRe,minZoom:xRe,cropShape:"rect",objectFit:"contain",showGrid:!0,style:{},classes:{},mediaProps:{},cropperProps:{},zoomSpeed:1,restrictPosition:!0,zoomWithScroll:!0,keyboardStep:CRe},t.getMousePoint=function(o){return{x:Number(o.clientX),y:Number(o.clientY)}},t.getTouchPoint=function(o){return{x:Number(o.clientX),y:Number(o.clientY)}},t})(us.Component);var Pie=l(O(),1);var zb=l(O(),1);var Sie=Object.prototype.hasOwnProperty;function xie(e,t,o){for(o of e.keys())if(yp(o,t))return o}function yp(e,t){var o,r,n;if(e===t)return!0;if(e&&t&&(o=e.constructor)===t.constructor){if(o===Date)return e.getTime()===t.getTime();if(o===RegExp)return e.toString()===t.toString();if(o===Array){if((r=e.length)===t.length)for(;r--&&yp(e[r],t[r]););return r===-1}if(o===Set){if(e.size!==t.size)return!1;for(r of e)if(n=r,n&&typeof n=="object"&&(n=xie(t,n),!n)||!t.has(n))return!1;return!0}if(o===Map){if(e.size!==t.size)return!1;for(r of e)if(n=r[0],n&&typeof n=="object"&&(n=xie(t,n),!n)||!yp(r[1],t.get(n)))return!1;return!0}if(o===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(o===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return r===-1}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return r===-1}if(!o||typeof e=="object"){r=0;for(o in e)if(Sie.call(e,o)&&++r&&!Sie.call(t,o)||!(o in t)||!yp(e[o],t[o]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}var la=l(O(),1);var Fb=1,wie=5;var SP=e=>e>=0?e%360:(360+e%360)%360,BRe=e=>new Promise((t,o)=>{let r=new Image;r.addEventListener("load",()=>t(r)),r.addEventListener("error",n=>o(n)),r.setAttribute("crossOrigin","anonymous"),r.src=e});function Cie(e){return e*Math.PI/180}function ERe(e,t,o){let r=Cie(o);return{width:Math.abs(Math.cos(r)*e)+Math.abs(Math.sin(r)*t),height:Math.abs(Math.sin(r)*e)+Math.abs(Math.cos(r)*t)}}async function Bie(e,t,o=0,r={horizontal:!1,vertical:!1}){try{let n=await BRe(e),i=document.createElement("canvas"),s=i.getContext("2d");if(!s)return null;let a=Cie(o),{width:c,height:u}=ERe(n.width,n.height,o);i.width=c,i.height=u,s.translate(c/2,u/2),s.rotate(a),s.scale(r.horizontal?-1:1,r.vertical?-1:1),s.translate(-n.width/2,-n.height/2),s.drawImage(n,0,0);let d=document.createElement("canvas"),f=d.getContext("2d");return f?(d.width=t.width,d.height=t.height,f.drawImage(i,t.x,t.y,t.width,t.height,0,0,t.width,t.height),new Promise(m=>{d.toBlob(h=>{h&&m(URL.createObjectURL(h))},"image/jpeg")})):null}catch{return null}}var _p={crop:{x:0,y:0,width:100,height:100},zoom:Fb,rotation:0,aspectRatio:1,flip:{horizontal:!1,vertical:!1}},TRe={x:0,y:0},AF={crop:TRe,croppedArea:_p.crop,croppedAreaPixels:null,zoom:_p.zoom,rotation:_p.rotation,flip:_p.flip,aspectRatio:_p.aspectRatio,mediaSize:null};function Eie(){let[e,t]=(0,la.useState)(AF),[o,r]=(0,la.useState)(null),n=(0,la.useCallback)(u=>{t(d=>{let m={...typeof u=="function"?u(d):u};return"rotation"in m&&m.rotation!==void 0&&(m.rotation=SP(m.rotation)),{...d,...m}})},[]),i=(0,la.useCallback)((u=null)=>{if(!u){r(null),n(AF);return}if(typeof u=="object"){let d={..._p,...u};r(d),n(d)}},[n,r]),s=(0,la.useCallback)(()=>{if(o){let u={crop:{x:0,y:0},croppedAreaPixels:null};o.crop&&(u.croppedArea=o.crop),o.zoom!==void 0&&(u.zoom=o.zoom),o.rotation!==void 0&&(u.rotation=o.rotation),o.aspectRatio!==void 0&&(u.aspectRatio=o.aspectRatio),o.flip!==void 0&&(u.flip=o.flip),n(u)}else n({...AF})},[o,n]),a=(0,la.useMemo)(()=>{if(o){let d={crop:e.croppedAreaPixels||e.croppedArea,zoom:e.zoom,rotation:SP(e.rotation),aspectRatio:e.aspectRatio,flip:e.flip};return yp(d,o)===!1}let u={crop:e.croppedArea,zoom:e.zoom,rotation:SP(e.rotation),aspectRatio:e.aspectRatio,flip:e.flip};return yp(u,_p)===!1},[e,o]),c=(0,la.useCallback)(async u=>e.croppedAreaPixels?Bie(u,e.croppedAreaPixels,e.rotation,e.flip):null,[e.croppedAreaPixels,e.rotation,e.flip]);return(0,la.useMemo)(()=>({cropperState:e,setCropperState:n,resetState:o,setResetState:i,isDirty:a,reset:s,getCroppedImage:c}),[e,n,o,i,a,s,c])}var Tie=l(w(),1),Iie=(0,zb.createContext)({cropperState:{crop:{x:0,y:0},croppedArea:{x:0,y:0,width:100,height:100},croppedAreaPixels:null,zoom:Fb,rotation:0,aspectRatio:1,flip:{horizontal:!1,vertical:!1},mediaSize:null},setCropperState:()=>{},resetState:null,setResetState:()=>{},isDirty:!1,reset:()=>{},getCroppedImage:()=>Promise.resolve(null)});function LF({children:e}){let t=Eie(),o=(0,zb.useMemo)(()=>({...t}),[t]);return(0,Tie.jsx)(Iie.Provider,{value:o,children:e})}var CS=()=>{let e=(0,zb.useContext)(Iie);if(!e)throw new Error("Missing ImageCropperContext");return e};var Rie=l(w(),1);function NF({src:e,onLoad:t,minZoom:o=Fb,maxZoom:r=wie,...n}){let{cropperState:i,setCropperState:s}=CS(),{crop:a,zoom:c,rotation:u,aspectRatio:d,flip:f}=i,m=k=>s({crop:k}),h=k=>s({zoom:k}),p=k=>s({rotation:k}),g=k=>s({mediaSize:k}),b=(0,Pie.useCallback)((k,v)=>{s({croppedArea:k,croppedAreaPixels:v})},[s]);return(0,Rie.jsx)(_ie,{classes:{containerClassName:"image-cropper__container",cropAreaClassName:"image-cropper__crop-area",mediaClassName:"image-cropper__image"},minZoom:o,maxZoom:r,rotation:u,image:e,setMediaSize:g,crop:a,zoom:c,aspect:d,onCropChange:m,onZoomChange:h,onCropComplete:b,onMediaLoaded:k=>{t?.(k)},onRotationChange:p,transform:[`translate(${a.x}px, ${a.y}px)`,`rotateZ(${u}deg)`,`rotateY(${f.horizontal?180:0}deg)`,`rotateX(${f.vertical?180:0}deg)`,`scale(${c})`].join(" "),...n})}var Hb=l(A(),1),Ub=l(N(),1);var Oie=100,Aie=300,xP={placement:"bottom-start"};var jb=l(O(),1);var wP=l(z(),1),Sp=l(O(),1),Pc=l(N(),1),Lie=l(Xn(),1),Nie=l(Ve(),1);var IRe={crop:(0,Pc.__)("Image cropped."),rotate:(0,Pc.__)("Image rotated."),cropAndRotate:(0,Pc.__)("Image cropped and rotated.")};function Mie({crop:e,rotation:t,url:o,id:r,onSaveImage:n,onFinishEditing:i}){let{createErrorNotice:s,createSuccessNotice:a}=(0,wP.useDispatch)(Lie.store),[c,u]=(0,Sp.useState)(!1),{editMediaEntity:d}=(0,wP.useSelect)(h=>({editMediaEntity:h(x).getSettings()?.[rx]}),[]),f=(0,Sp.useCallback)(()=>{u(!1),i()},[i]),m=(0,Sp.useCallback)(async()=>{if(!d){i(),s((0,Pc.__)("Sorry, you are not allowed to edit images on this site."),{id:"image-editing-error",type:"snackbar"});return}u(!0);let h=[];if(t>0&&h.push({type:"rotate",args:{angle:t}}),(e.width<99.9||e.height<99.9)&&h.push({type:"crop",args:{left:e.x,top:e.y,width:e.width,height:e.height}}),h.length===0){u(!1),i();return}let p=h.length===1?h[0].type:"cropAndRotate";try{let g=await d(r,{src:o,modifiers:h},{throwOnError:!0});g&&(n({id:g.id,url:g.source_url}),a(IRe[p],{type:"snackbar",actions:[{label:(0,Pc.__)("Undo"),onClick:()=>{n({id:r,url:o})}}]}))}catch(g){s((0,Pc.sprintf)((0,Pc.__)("Could not edit image. %s"),(0,Nie.__unstableStripHTML)(g.message)),{id:"image-editing-error",type:"snackbar"})}finally{u(!1),i()}},[e,t,r,o,n,s,a,i,d]);return(0,Sp.useMemo)(()=>({isInProgress:c,apply:m,cancel:f}),[c,m,f])}var ca=l(O(),1),Die=l(pt(),1);function Vie({url:e,naturalWidth:t,naturalHeight:o}){let[r,n]=(0,ca.useState)(),{cropperState:i,setCropperState:s}=CS(),{zoom:a,aspectRatio:c,crop:u,croppedArea:d}=i,f=(0,ca.useCallback)(v=>{s({zoom:v})},[s]),m=(0,ca.useCallback)(v=>{s({aspectRatio:v})},[s]),h=t/o,p=o/t;(0,ca.useEffect)(()=>{m(h)},[]);let[g,b]=(0,ca.useState)(0),k=(0,ca.useCallback)(()=>{let v=(g+90)%360,y=h,S=a!==1||!(h===c||p===c);if(g%180===90&&(y=1/h),v===0){n(),b(v),s({aspectRatio:S?c:h,crop:{x:-(u.y*y),y:u.x*y}});return}function C(T){let E=document.createElement("canvas"),L=0,I=0;v%180?(E.width=T.target.height,E.height=T.target.width):(E.width=T.target.width,E.height=T.target.height),(v===90||v===180)&&(L=E.width),(v===270||v===180)&&(I=E.height);let R=E.getContext("2d");R.translate(L,I),R.rotate(v*Math.PI/180),R.drawImage(T.target,0,0),E.toBlob(V=>{n(URL.createObjectURL(V)),b(v);let j=S?c:E.width/E.height;s({aspectRatio:j,crop:{x:-(u.y*y),y:u.x*y}})})}let B=new window.Image;B.src=e,B.onload=C;let P=(0,Die.applyFilters)("media.crossOrigin",void 0,e);typeof P=="string"&&(B.crossOrigin=P)},[g,h,e,s,u,a,c,p,b]);return(0,ca.useMemo)(()=>({editedUrl:r,setEditedUrl:n,crop:d,zoom:a,setZoom:f,rotation:g,rotateClockwise:k,aspect:c,setAspect:m,defaultAspect:h}),[r,d,a,f,g,k,c,m,h])}var Fie=l(w(),1),MF=(0,jb.createContext)({});MF.displayName="ImageEditingContext";var tl=()=>(0,jb.useContext)(MF);function zie({id:e,url:t,naturalWidth:o,naturalHeight:r,onFinishEditing:n,onSaveImage:i,children:s}){let a=Vie({url:t,naturalWidth:o,naturalHeight:r}),c=Mie({id:e,url:t,onSaveImage:i,onFinishEditing:n,...a}),u=(0,jb.useMemo)(()=>({...a,...c}),[a,c]);return(0,Fie.jsx)(MF.Provider,{value:u,children:s})}var ds=l(w(),1);function CP({aspectRatios:e,isDisabled:t,label:o,onClick:r,value:n}){return(0,ds.jsx)(Hb.MenuGroup,{label:o,children:e.map(({name:i,slug:s,ratio:a})=>(0,ds.jsx)(Hb.MenuItem,{disabled:t,onClick:()=>{r(a)},role:"menuitemradio",isSelected:a===n,icon:a===n?Ts:void 0,children:i},s))})}function PRe(e){let[t,o,...r]=e.split("/").map(Number);return t<=0||o<=0||Number.isNaN(t)||Number.isNaN(o)||r.length?NaN:o?t/o:t}function DF({ratio:e,...t}){return{ratio:PRe(e),...t}}function jie({toggleProps:e}){let{isInProgress:t,aspect:o,setAspect:r,defaultAspect:n}=tl(),[i,s,a]=pe("dimensions.aspectRatios.default","dimensions.aspectRatios.theme","dimensions.defaultAspectRatios");return(0,ds.jsx)(Hb.DropdownMenu,{icon:HA,label:(0,Ub.__)("Aspect Ratio"),popoverProps:xP,toggleProps:e,children:({onClose:c})=>(0,ds.jsxs)(ds.Fragment,{children:[(0,ds.jsx)(CP,{isDisabled:t,onClick:u=>{r(u),c()},value:o,aspectRatios:[{slug:"original",name:(0,Ub.__)("Original"),ratio:n},...a?i.map(DF).filter(({ratio:u})=>u===1):[]]}),s?.length>0&&(0,ds.jsx)(CP,{label:(0,Ub.__)("Theme"),isDisabled:t,onClick:u=>{r(u),c()},value:o,aspectRatios:s}),a&&(0,ds.jsx)(CP,{label:(0,Ub.__)("Landscape"),isDisabled:t,onClick:u=>{r(u),c()},value:o,aspectRatios:i.map(DF).filter(({ratio:u})=>u>1)}),a&&(0,ds.jsx)(CP,{label:(0,Ub.__)("Portrait"),isDisabled:t,onClick:u=>{r(u),c()},value:o,aspectRatios:i.map(DF).filter(({ratio:u})=>u<1)})]})})}var Uie=l(A(),1),Hie=l(X(),1);var Yd=l(w(),1);function Gie({url:e,width:t,height:o,naturalHeight:r,naturalWidth:n,borderProps:i}){let{isInProgress:s,editedUrl:a,rotation:c}=tl(),[u,{width:d}]=(0,Hie.useResizeObserver)(),f=o||d*r/n;c%180===90&&(f=d*n/r);let m=(0,Yd.jsxs)("div",{className:D("wp-block-image__crop-area",i?.className,{"is-applying":s}),style:{...i?.style,width:t||d,height:f},children:[(0,Yd.jsx)(NF,{src:a||e}),s&&(0,Yd.jsx)(Uie.Spinner,{})]});return(0,Yd.jsxs)(Yd.Fragment,{children:[u,m]})}var qd=l(A(),1),VF=l(N(),1);var BS=l(w(),1);function Wie(){let{isInProgress:e,zoom:t,setZoom:o}=tl();return(0,BS.jsx)(qd.Dropdown,{contentClassName:"wp-block-image__zoom",popoverProps:xP,renderToggle:({isOpen:r,onToggle:n})=>(0,BS.jsx)(qd.ToolbarButton,{icon:tM,label:(0,VF.__)("Zoom"),onClick:n,"aria-expanded":r,disabled:e}),renderContent:()=>(0,BS.jsx)(qd.__experimentalDropdownContentWrapper,{paddingSize:"medium",children:(0,BS.jsx)(qd.RangeControl,{__next40pxDefaultSize:!0,label:(0,VF.__)("Zoom"),min:Oie,max:Aie,value:Math.round(t*100),onChange:r=>o(r/100)})})})}var $ie=l(A(),1),Kie=l(N(),1);var Yie=l(w(),1);function qie(){let{isInProgress:e,rotateClockwise:t}=tl();return(0,Yie.jsx)($ie.ToolbarButton,{icon:XN,label:(0,Kie.__)("Rotate"),onClick:t,disabled:e})}var FF=l(A(),1),zF=l(N(),1);var xp=l(w(),1);function Zie(){let{isInProgress:e,apply:t,cancel:o}=tl();return(0,xp.jsxs)(xp.Fragment,{children:[(0,xp.jsx)(FF.ToolbarButton,{onClick:t,disabled:e,children:(0,zF.__)("Apply")}),(0,xp.jsx)(FF.ToolbarButton,{onClick:o,children:(0,zF.__)("Cancel")})]})}var bi=l(w(),1);function Xie({id:e,url:t,width:o,height:r,naturalHeight:n,naturalWidth:i,onSaveImage:s,onFinishEditing:a,borderProps:c}){return(0,bi.jsx)(LF,{children:(0,bi.jsxs)(zie,{id:e,url:t,naturalWidth:i,naturalHeight:n,onSaveImage:s,onFinishEditing:a,children:[(0,bi.jsx)(Gie,{borderProps:c,url:t,width:o,height:r,naturalHeight:n,naturalWidth:i}),(0,bi.jsxs)(Ut,{children:[(0,bi.jsxs)(ES.ToolbarGroup,{children:[(0,bi.jsx)(Wie,{}),(0,bi.jsx)(ES.ToolbarItem,{children:u=>(0,bi.jsx)(jie,{toggleProps:u})}),(0,bi.jsx)(qie,{})]}),(0,bi.jsx)(ES.ToolbarGroup,{children:(0,bi.jsx)(Zie,{})})]})]})})}var vi=l(A(),1),Zd=l(N(),1);var Gb=l(O(),1);function Qie(e,t,o,r,n){let[i,s]=(0,Gb.useState)(t??r??""),[a,c]=(0,Gb.useState)(e??o??"");return(0,Gb.useEffect)(()=>{t===void 0&&r!==void 0&&s(r),e===void 0&&o!==void 0&&c(o)},[r,o]),(0,Gb.useEffect)(()=>{t!==void 0&&Number.parseInt(t)!==Number.parseInt(i)&&s(t),e!==void 0&&Number.parseInt(e)!==Number.parseInt(a)&&c(e)},[t,e]),{currentHeight:a,currentWidth:i,updateDimension:(f,m)=>{let h=m===""?void 0:parseInt(m,10);f==="width"?s(h):c(h),n({[f]:h})},updateDimensions:(f,m)=>{c(f??o),s(m??r),n({height:f,width:m})}}}var fs=l(w(),1),Jie=[25,50,75,100],RRe=()=>{};function ese(e,t,o){let r=Math.round(t*(e/100)),n=Math.round(o*(e/100));return{scaledWidth:r,scaledHeight:n}}function tse({imageSizeHelp:e,imageWidth:t,imageHeight:o,imageSizeOptions:r=[],isResizable:n=!0,slug:i,width:s,height:a,onChange:c,onChangeImage:u=RRe}){let{currentHeight:d,currentWidth:f,updateDimension:m,updateDimensions:h}=Qie(a,s,o,t,c),p=b=>{if(b===void 0){h();return}let{scaledWidth:k,scaledHeight:v}=ese(b,t,o);h(v,k)},g=Jie.find(b=>{let{scaledWidth:k,scaledHeight:v}=ese(b,t,o);return f===k&&d===v});return(0,fs.jsxs)(vi.__experimentalVStack,{className:"block-editor-image-size-control",spacing:"4",children:[r&&r.length>0&&(0,fs.jsx)(vi.SelectControl,{label:(0,Zd.__)("Resolution"),value:i,options:r,onChange:u,help:e,size:"__unstable-large"}),n&&(0,fs.jsxs)(fs.Fragment,{children:[(0,fs.jsxs)(vi.__experimentalHStack,{align:"baseline",spacing:"4",children:[(0,fs.jsx)(vi.__experimentalNumberControl,{label:(0,Zd.__)("Width"),value:f,min:1,onChange:b=>m("width",b),size:"__unstable-large"}),(0,fs.jsx)(vi.__experimentalNumberControl,{label:(0,Zd.__)("Height"),value:d,min:1,onChange:b=>m("height",b),size:"__unstable-large"})]}),(0,fs.jsx)(vi.__experimentalToggleGroupControl,{label:(0,Zd.__)("Image size presets"),hideLabelFromVision:!0,onChange:p,value:g,isBlock:!0,__next40pxDefaultSize:!0,children:Jie.map(b=>(0,fs.jsx)(vi.__experimentalToggleGroupControlOption,{value:b,label:(0,Zd.sprintf)((0,Zd.__)("%d%%"),b)},b))})]})]})}var BP=l(A(),1);var wp=l(N(),1),rse=l(w(),1),ose={left:yu,center:ku,right:_u,"space-between":mh,stretch:ph};function ORe({allowedControls:e=["left","center","right","space-between"],isCollapsed:t=!0,onChange:o,value:r,popoverProps:n,isToolbar:i}){let s=f=>{o(f===r?void 0:f)},a=r?ose[r]:ose.left,c=[{name:"left",icon:yu,title:(0,wp.__)("Justify items left"),isActive:r==="left",onClick:()=>s("left")},{name:"center",icon:ku,title:(0,wp.__)("Justify items center"),isActive:r==="center",onClick:()=>s("center")},{name:"right",icon:_u,title:(0,wp.__)("Justify items right"),isActive:r==="right",onClick:()=>s("right")},{name:"space-between",icon:mh,title:(0,wp.__)("Space between items"),isActive:r==="space-between",onClick:()=>s("space-between")},{name:"stretch",icon:ph,title:(0,wp.__)("Stretch items"),isActive:r==="stretch",onClick:()=>s("stretch")}],u=i?BP.ToolbarGroup:BP.ToolbarDropdownMenu,d=i?{isCollapsed:t}:{};return(0,rse.jsx)(u,{icon:a,popoverProps:n,label:(0,wp.__)("Change items justification"),controls:c.filter(f=>e.includes(f.name)),...d})}var jF=ORe;var UF=l(w(),1),Nh=e=>(0,UF.jsx)(jF,{...e,isToolbar:!1}),nse=e=>(0,UF.jsx)(jF,{...e,isToolbar:!0});var cn=l(A(),1),ua=l(N(),1),mo=l(O(),1),Zse=l(X(),1),Xse=l(Ve(),1),Qse=l(ot(),1),Jse=l(P_(),1),FP=l(z(),1),XF=l(wh(),1);var eae=l(Re(),1),zP=l(qn(),1);var Wb=l(A(),1);var EP=l(X(),1),TP=l(N(),1),ise=l(O(),1),Rc=l(w(),1);function sse({children:e,settingsOpen:t,setSettingsOpen:o}){let r=(0,EP.useReducedMotion)(),n=r?ise.Fragment:Wb.__unstableAnimatePresence,i=r?"div":Wb.__unstableMotion.div,a=`link-control-settings-drawer-${(0,EP.useInstanceId)(sse)}`;return(0,Rc.jsxs)(Rc.Fragment,{children:[(0,Rc.jsx)(Wb.Button,{__next40pxDefaultSize:!0,className:"block-editor-link-control__drawer-toggle","aria-expanded":t,onClick:()=>o(!t),icon:(0,TP.isRTL)()?wk:vu,"aria-controls":a,children:(0,TP._x)("Advanced","Additional link settings")}),(0,Rc.jsx)(n,{children:t&&(0,Rc.jsx)(i,{className:"block-editor-link-control__drawer",hidden:!t,id:a,initial:"collapsed",animate:"open",exit:"collapsed",variants:{open:{opacity:1,height:"auto"},collapsed:{opacity:0,height:0}},transition:{duration:.1},children:(0,Rc.jsx)("div",{className:"block-editor-link-control__drawer-inner",children:e})})})]})}var ase=sse;var LP=l(O(),1),qF=l(N(),1),Bse=l(Re(),1);var TS=l(N(),1),vse=l(A(),1);var IP=l(N(),1),lse=l(A(),1),cse=l(O(),1);var HF=l(w(),1),ARe=({searchTerm:e,onClick:t,itemProps:o,buttonText:r})=>{if(!e)return null;let n;return r?n=typeof r=="function"?r(e):r:n=(0,cse.createInterpolateElement)((0,IP.sprintf)((0,IP.__)("Create: <mark>%s</mark>"),e),{mark:(0,HF.jsx)("mark",{})}),(0,HF.jsx)(lse.MenuItem,{...o,iconPosition:"left",icon:Li,className:"block-editor-link-control__search-item",onClick:t,children:n})},use=ARe;var Oc=l(N(),1),RP=l(A(),1);var dse=l(Ve(),1),Kb=l(qn(),1),fse=l(X(),1),mse=l(Re(),1),$b=l(w(),1),PP={post:{icon:YN,label:(0,Oc.__)("Post")},page:{icon:rm,label:(0,Oc.__)("Page")},post_tag:{icon:xM,label:(0,Oc.__)("Tag")},category:{icon:YA,label:(0,Oc.__)("Category")},attachment:{icon:xL,label:(0,Oc.__)("Attachment")}};function LRe({isURL:e,suggestion:t}){let o=null;return e?o=Bk:t.type in PP&&(o=PP[t.type].icon,t.type==="page"&&(t.isFrontPage&&(o=tN),t.isBlogHome&&(o=DM))),o?(0,$b.jsx)(Ee,{className:"block-editor-link-control__search-item-icon",icon:o}):null}function NRe(e){return e?.trim()?.length?e?.replace(/^\/?/,"/"):e}function MRe(e){return e?.trim()?.length?e?.replace(/\/$/,""):e}var DRe=(e,...t)=>(...o)=>e(...o,...t),VRe=e=>t=>t==null||t!==t?e:t;function FRe(e){return e&&(0,fse.pipe)(Kb.safeDecodeURI,Kb.getPath,VRe(""),DRe(Kb.filterURLForDisplay,24),MRe,NRe)(e)}var pse=({itemProps:e,suggestion:t,searchTerm:o,onClick:r,isURL:n=!1,shouldShowType:i=!1})=>{let s=n?(0,Oc.__)("Press ENTER to add this link"):FRe(t.url);return(0,$b.jsx)(RP.MenuItem,{...e,info:s,iconPosition:"left",icon:(0,$b.jsx)(LRe,{suggestion:t,isURL:n}),onClick:r,shortcut:i&&zRe(t),className:"block-editor-link-control__search-item",children:(0,$b.jsx)(RP.TextHighlight,{text:(0,dse.__unstableStripHTML)(t.title),highlight:o})})};function zRe(e){return e.isFrontPage?(0,Oc.__)("Front page"):e.isBlogHome?(0,Oc.__)("Blog home"):e.type in PP?PP[e.type].label:e.type}var hse=pse,gse=e=>((0,mse.default)("wp.blockEditor.__experimentalLinkControlSearchItem",{since:"6.8"}),(0,$b.jsx)(pse,{...e}));var bse=l(N(),1),Cp="__CREATE__",GF="tel",OP="link",WF="mailto",$F="internal",Yb=[OP,WF,GF,$F],KF=[{id:"opensInNewTab",title:(0,bse.__)("Open in new tab")}];var kse=l(Re(),1),Bp=l(w(),1);function yse({withCreateSuggestion:e,currentInputValue:t,handleSuggestionClick:o,suggestionsListProps:r,buildSuggestionItemProps:n,suggestions:i,selectedSuggestion:s,isLoading:a,isInitialSuggestions:c,createSuggestionButtonText:u,suggestionsQuery:d}){let f=D("block-editor-link-control__search-results",{"is-loading":a}),m=i.length===1&&Yb.includes(i[0].type),h=e&&!m&&!c,p=!d?.type,g=c?(0,TS.__)("Suggestions"):(0,TS.sprintf)((0,TS.__)('Search results for "%s"'),t);return(0,Bp.jsx)("div",{className:"block-editor-link-control__search-results-wrapper",children:(0,Bp.jsx)("div",{...r,className:f,"aria-label":g,children:(0,Bp.jsx)(vse.MenuGroup,{children:i.map((b,k)=>h&&Cp===b.type?(0,Bp.jsx)(use,{searchTerm:t,buttonText:u,onClick:()=>o(b),itemProps:n(b,k),isSelected:k===s},b.type):Cp===b.type?null:(0,Bp.jsx)(hse,{itemProps:n(b,k),suggestion:b,index:k,onClick:()=>{o(b)},isSelected:k===s,isURL:Yb.includes(b.type),searchTerm:t,shouldShowType:p,isFrontPage:b?.isFrontPage,isBlogHome:b?.isBlogHome},`${b.id}-${b.type}`))})})})}var _se=yse,Sse=e=>((0,kse.default)("wp.blockEditor.__experimentalLinkControlSearchResults",{since:"6.8"}),(0,Bp.jsx)(yse,{...e}));var xse=l(O(),1),wse=l(z(),1);var AP=l(qn(),1);function IS(e){let t=e?.trim();if(!t)return{url:t,type:OP};let o=OP,r=(0,AP.getProtocol)(t)||"";return r.includes("mailto")?o=WF:r.includes("tel")?o=GF:t?.startsWith("#")&&(o=$F),jf(t)||Uf(t)||t.startsWith("?")||r?{url:t,type:o}:{url:(0,AP.prependHTTPS)(t),type:o}}var jRe=()=>Promise.resolve([]),URe=e=>{let{url:t,type:o}=IS(e);return Promise.resolve([{id:e,title:e,url:t,type:o}])},HRe=async(e,t,o,r,n,i)=>{let{isInitialSuggestions:s}=t,a=await o(e,t);return a.map(c=>Number(c.id)===n?(c.isFrontPage=!0,c):(Number(c.id)===i&&(c.isBlogHome=!0),c)),s||Hf(e)||!r?a:a.concat({title:e,url:e,type:Cp})};function Cse(e,t,o){let{fetchSearchSuggestions:r,pageOnFront:n,pageForPosts:i}=(0,wse.useSelect)(a=>{let{getSettings:c}=a(x);return{pageOnFront:c().pageOnFront,pageForPosts:c().pageForPosts,fetchSearchSuggestions:c().__experimentalFetchLinkSuggestions}},[]),s=t?URe:jRe;return(0,xse.useCallback)((a,{isInitialSuggestions:c})=>Hf(a)?s(a,{isInitialSuggestions:c}):HRe(a,{...e,isInitialSuggestions:c},r,o,n,i),[s,r,n,i,e,o])}var qb=l(w(),1),GRe=()=>Promise.resolve([]),YF=()=>{},Ese=(0,LP.forwardRef)(({value:e,children:t,currentLink:o={},className:r=null,placeholder:n=null,withCreateSuggestion:i=!1,onCreateSuggestion:s=YF,onChange:a=YF,onSelect:c=YF,showSuggestions:u=!0,renderSuggestions:d=C=>(0,qb.jsx)(_se,{...C}),fetchSuggestions:f=null,allowDirectEntry:m=!0,showInitialSuggestions:h=!1,suggestionsQuery:p={},withURLSuggestion:g=!0,createSuggestionButtonText:b,hideLabelFromVision:k=!1,suffix:v,isEntity:y=!1,customValidity:_},S)=>{let C=Cse(p,m,i,g),B=u?f||C:GRe,[P,T]=(0,LP.useState)(),E=(j,H)=>{a(j),T(H)},L=j=>d({...j,withCreateSuggestion:i,createSuggestionButtonText:b,suggestionsQuery:p,handleSuggestionClick:H=>{j.handleSuggestionClick&&j.handleSuggestionClick(H),I(H)}}),I=async j=>{let H=j;if(Cp===j.type){try{H=await s(j.title),H?.url&&c(H)}catch{}return}if(m||H&&Object.keys(H).length>=1){let{id:F,url:U,kind:G,type:W,...J}=o??{};c({...J,...H},H)}},R=n??(0,qF.__)("Search or type URL"),V=k&&n!==""?R:(0,qF.__)("Link");return(0,qb.jsxs)("div",{className:"block-editor-link-control__search-input-container",children:[(0,qb.jsx)(Xd,{disableSuggestions:o?.url===e,label:V,hideLabelFromVision:k,className:r,value:e,onChange:E,placeholder:R,__experimentalRenderSuggestions:u?L:null,__experimentalFetchLinkSuggestions:B,__experimentalHandleURLSuggestions:!0,__experimentalShowInitialSuggestions:h,customValidity:_,required:!1,onSubmit:(j,H)=>{let F=j||P;!F&&!e?.trim()?.length?H.preventDefault():I(F||{url:e})},inputRef:S,suffix:v,disabled:y}),t]})}),Tse=Ese,Ise=e=>((0,Bse.default)("wp.blockEditor.__experimentalLinkControlSearchInput",{since:"6.8"}),(0,qb.jsx)(Ese,{...e}));var Qd=l(N(),1),zo=l(A(),1),Lse=l(X(),1),DP=l(qn(),1);var Nse=l(Ve(),1),VP=l(z(),1),Mse=l(Xn(),1),Dse=l(wh(),1);var Pse=l(A(),1),{Slot:Rse,Fill:Ose}=(0,Pse.createSlotFill)("BlockEditorLinkControlViewer");var Ase=l(z(),1),NP=l(O(),1);function WRe(e,t){switch(t.type){case"RESOLVED":return{...e,isFetching:!1,richData:t.richData};case"ERROR":return{...e,isFetching:!1,richData:null};case"LOADING":return{...e,isFetching:!0};default:throw new Error(`Unexpected action type ${t.type}`)}}function $Re(e){let[t,o]=(0,NP.useReducer)(WRe,{richData:null,isFetching:!1}),{fetchRichUrlData:r}=(0,Ase.useSelect)(n=>{let{getSettings:i}=n(x);return{fetchRichUrlData:i().__experimentalFetchRichUrlData}},[]);return(0,NP.useEffect)(()=>{if(e?.length&&r&&typeof AbortController<"u"){o({type:"LOADING"});let n=new window.AbortController,i=n.signal;return r(e,{signal:i}).then(s=>{o({type:"RESOLVED",richData:s})}).catch(()=>{i.aborted||o({type:"ERROR"})}),()=>{n.abort()}}},[e]),t}var MP=$Re;var xt=l(w(),1),{Badge:KRe}=M(zo.privateApis);function Vse({value:e,onEditClick:t,hasRichPreviews:o=!1,hasUnlinkControl:r=!1,onRemove:n}){let i=(0,VP.useSelect)(b=>b(Dse.store).get("core","showIconLabels"),[]),s=o?e?.url:null,{richData:a,isFetching:c}=MP(s),u=a&&Object.keys(a).length,d=e&&(0,DP.filterURLForDisplay)((0,DP.safeDecodeURI)(e.url),24)||"",f=!e?.url?.length,m=!f&&(0,Nse.__unstableStripHTML)(e?.entityTitle||a?.title||e?.title||d),h;a?.icon?h=(0,xt.jsx)("img",{src:a?.icon,alt:""}):f?h=(0,xt.jsx)(Ee,{icon:nN,size:32}):h=(0,xt.jsx)(Ee,{icon:Bk});let{createNotice:p}=(0,VP.useDispatch)(Mse.store),g=(0,Lse.useCopyToClipboard)(e.url,()=>{p("info",(0,Qd.__)("Link copied to clipboard."),{isDismissible:!0,type:"snackbar"})});return(0,xt.jsx)(zo.Flex,{role:"group","aria-label":(0,Qd.__)("Manage link"),className:D("block-editor-link-control__preview",{"is-current":!0,"is-rich":u,"is-fetching":!!c,"is-preview":!0,"is-error":f,"is-url-title":m===d}),children:(0,xt.jsxs)(zo.Flex,{gap:0,align:"flex-start",children:[(0,xt.jsxs)(zo.Flex,{className:"block-editor-link-control__link-information",role:"figure","aria-label":(0,Qd.__)("Link information"),justify:"start",align:"flex-start",children:[e?.image?(0,xt.jsx)(zo.Flex,{className:"block-editor-link-control__preview-image",justify:"center",children:(0,xt.jsx)("img",{src:e?.image,alt:""})}):(0,xt.jsx)(zo.Flex,{className:D("block-editor-link-control__preview-icon",{"is-image":a?.icon}),justify:"center",children:h}),(0,xt.jsx)(zo.Flex,{className:"block-editor-link-control__preview-details",direction:"column",gap:2,children:f?(0,xt.jsx)("span",{className:"block-editor-link-control__preview-error-notice",children:(0,Qd.__)("Link is empty")}):(0,xt.jsxs)(xt.Fragment,{children:[(0,xt.jsx)(zo.ExternalLink,{className:"block-editor-link-control__preview-title",href:e.url,children:(0,xt.jsx)(zo.__experimentalTruncate,{numberOfLines:1,children:m})}),(0,xt.jsx)("span",{className:"block-editor-link-control__preview-info",children:(0,xt.jsx)(zo.__experimentalTruncate,{numberOfLines:1,children:d})}),e?.badges?.length>0&&(0,xt.jsx)(zo.__experimentalHStack,{className:"block-editor-link-control__preview-badges",alignment:"left",gap:1,children:e.badges.map((b,k)=>(0,xt.jsx)(KRe,{intent:b.intent,children:b.label},`${b.label}|${b.intent}|${k}`))})]})})]}),(0,xt.jsx)(zo.Button,{icon:nm,label:(0,Qd.__)("Edit link"),onClick:t,size:"compact",showTooltip:!i}),r&&(0,xt.jsx)(zo.Button,{icon:Ai,label:(0,Qd.__)("Remove link"),onClick:n,size:"compact",showTooltip:!i}),(0,xt.jsx)(zo.Button,{icon:sL,label:(0,Qd.__)("Copy link"),ref:g,accessibleWhenDisabled:!0,disabled:f,size:"compact",showTooltip:!i}),(0,xt.jsx)(Rse,{fillProps:e})]})})}var Fse=l(N(),1),zse=l(A(),1);var Ep=l(w(),1),YRe=()=>{},qRe=({value:e,onChange:t=YRe,settings:o})=>{if(!o||!o.length)return null;let r=i=>s=>{t({...e,[i.id]:s})},n=o.map(i=>{if("render"in i){if(typeof i.render=="function"){let s=i.render(i,e,t);return(0,Ep.jsx)("div",{className:"block-editor-link-control__setting",children:s},i.id)}return null}return(0,Ep.jsx)(zse.CheckboxControl,{className:"block-editor-link-control__setting",label:i.title,onChange:r(i),checked:e?!!e[i.id]:!1,help:i?.help},i.id)}).filter(Boolean);return(0,Ep.jsxs)("fieldset",{className:"block-editor-link-control__settings",children:[(0,Ep.jsx)(Ge,{render:(0,Ep.jsx)("legend",{}),children:(0,Fse.__)("Currently selected link settings")}),n]})},jse=qRe;var Use=l(N(),1),Tp=l(O(),1);function Hse(e){let t=(0,Tp.useRef)(),[o,r]=(0,Tp.useState)(!1),[n,i]=(0,Tp.useState)(null),s=async function(a){r(!0),i(null);try{return t.current=ZRe(Promise.resolve(e(a))),await t.current.promise}catch(c){if(c&&c.isCanceled)return;throw i(c.message||(0,Use.__)("An unknown error occurred during creation. Please try again.")),c}finally{r(!1)}};return(0,Tp.useEffect)(()=>()=>{t.current&&t.current.cancel()},[]),{createPage:s,isCreatingPage:o,errorMessage:n}}var ZRe=e=>{let t=!1;return{promise:new Promise((r,n)=>{e.then(i=>t?n({isCanceled:!0}):r(i),i=>n(t?{isCanceled:!0}:i))}),cancel(){t=!0}}};var ZF=l(O(),1),$se=l(Wse(),1);function Kse(e){let[t,o]=(0,ZF.useState)(e||{}),[r,n]=(0,ZF.useState)(e);return(0,$se.default)(e,r)||(n(e),o(e)),[t,o,c=>{o({...t,url:c})},c=>{o({...t,title:c})},c=>u=>{let d=Object.keys(u).reduce((f,m)=>(c.includes(m)&&(f[m]=u[m]),f),{});o({...t,...d})}]}var Ot=l(w(),1),QF=()=>{},Yse="core/block-editor",qse="linkControlSettingsDrawer";function Ip({searchInputPlaceholder:e,value:t,settings:o=KF,onChange:r=QF,onInputChange:n,onRemove:i,onCancel:s,noDirectEntry:a=!1,showSuggestions:c=!0,showInitialSuggestions:u,forceIsEditingLink:d,createSuggestion:f,withCreateSuggestion:m,inputValue:h="",suggestionsQuery:p={},noURLSuggestion:g=!1,createSuggestionButtonText:b,hasRichPreviews:k=!1,hasTextControl:v=!1,renderControlBottom:y=null,handleEntities:_=!1}){m===void 0&&f&&(m=!0);let[S,C]=(0,mo.useState)(!1),[B,P]=(0,mo.useState)(void 0),{advancedSettingsPreference:T}=(0,FP.useSelect)(ve=>({advancedSettingsPreference:ve(XF.store).get(Yse,qse)??!1}),[]),{set:E}=(0,FP.useDispatch)(XF.store),L=ve=>{E&&E(Yse,qse,ve),C(ve)},I=T||S,R=(0,mo.useRef)(!0),V=(0,mo.useRef)(),j=(0,mo.useRef)(),H=(0,mo.useRef)(),F=(0,mo.useRef)(),U=o.map(({id:ve})=>ve),[G,W,J,le,oe]=Kse(t),re=ve=>{J(ve),n?.(ve)},Q=_&&!!G?.id,$=(0,Zse.useInstanceId)(Ip,"link-control"),ee=Q?`${$}__help`:null,K=t&&!(0,Jse.isShallowEqualObjects)(G,t),[te,ne]=(0,mo.useState)(d!==void 0?d:!t||!t.url),{createPage:q,isCreatingPage:se,errorMessage:he}=Hse(f);(0,mo.useEffect)(()=>{d!==void 0&&ne(d)},[d]),(0,mo.useEffect)(()=>{if(R.current)return;(Xse.focus.focusable.find(V.current)[0]||V.current).focus()},[te,se]),(0,mo.useEffect)(()=>(R.current=!1,()=>{R.current=!0}),[]);let me=(0,mo.useRef)();(0,mo.useEffect)(()=>{if(me.current===void 0){me.current=h;return}me.current!==h&&(console.warn("LinkControl: The inputValue prop is uncontrolled and only sets the initial value. onInputChange is an observer for the input value. Changes to inputValue from the parent will not update the search input."),me.current=h)},[h]),(0,mo.useEffect)(()=>{if(B?.type==="invalid"){let ve=H.current;ve&&typeof ve.reportValidity=="function"&&ve.reportValidity()}},[B]);let xe=t?.url?.trim()?.length>0,De=()=>{ne(!1)},lt=ve=>{let Et={type:"invalid",message:(0,ua.__)("Please enter a valid URL.")},Mo={type:"valid"},mt=ve?.trim();if(!mt?.length||!Hf(mt))return Et;if(jf(mt)||Uf(mt))return Mo;let be=(0,zP.prependHTTPS)(mt);return(0,zP.isURL)(be)?Mo:Et},Dt=ve=>{if(!(ve&&ve.id&&ve.type&&!Yb.includes(ve.type))){let mt=ve?.url||Ue,be=lt(mt);if(be.type==="invalid"){P(be);return}let{url:Ft}=IS(mt);ve={...ve,url:Ft}}ve?.kind==="taxonomy"&&ve?.url&&(F.current=ve.url);let Mo=Object.keys(ve).reduce((mt,be)=>(U.includes(be)||(mt[be]=ve[be]),mt),{});r({...G,...Mo,title:G?.title||ve?.title}),P(void 0),De()},so=()=>{if(Ho)return!1;let ve=Ue.trim(),Et=G&&G.id&&G.type&&!Yb.includes(G.type),Mo=t?.url===ve;if(Et&&Mo)return P(void 0),!0;let mt=lt(Ue);return mt.type==="invalid"?(P(mt),!1):(P(void 0),!0)},or=()=>{K&&r({...t,...G,url:IS(Ue).url}),De(),P(void 0)},Je=()=>{so()&&or()},hr=ve=>{let{keyCode:Et}=ve;Et===Qse.ENTER&&!Ho&&(ve.preventDefault(),Je())},Zt=()=>{W(t)},ao=ve=>{ve.preventDefault(),ve.stopPropagation(),Zt(),P(void 0),xe?De():i?.(),s?.()},[Ze,Vt]=(0,mo.useState)(!1),et=()=>{let{id:ve,kind:Et,type:Mo,...mt}=G;W({...mt,id:void 0,kind:void 0,type:void 0,url:void 0}),Vt(!0)};(0,mo.useEffect)(()=>{Ze&&(H.current?.focus(),Vt(!1))},[Ze]);let Ue=G?.url!==void 0?G.url:h||"",Ho=!Ue?.trim()?.length;(0,mo.useEffect)(()=>{P(void 0)},[Ue]);let Yn=!B,Fe=i&&t&&!te&&!se,lo=te&&xe,tt=xe&&v,ze=(te||!t)&&!se,yt=Ho||!Yn||t&&!K,_o=!!o?.length&&te&&xe,gr=(0,mo.useMemo)(()=>t?.kind==="taxonomy"&&!t?.url&&F.current?{...t,url:F.current}:t,[t]);return(0,Ot.jsxs)("div",{tabIndex:-1,ref:V,className:"block-editor-link-control",children:[se&&(0,Ot.jsxs)("div",{className:"block-editor-link-control__loading",children:[(0,Ot.jsx)(cn.Spinner,{})," ",(0,ua.__)("Creating"),"\u2026"]}),ze&&(0,Ot.jsxs)(Ot.Fragment,{children:[(0,Ot.jsxs)("div",{className:D({"block-editor-link-control__search-input-wrapper":!0,"has-text-control":tt,"has-actions":lo}),children:[tt&&(0,Ot.jsx)(cn.TextControl,{ref:j,className:"block-editor-link-control__field block-editor-link-control__text-content",label:(0,ua.__)("Text"),value:G?.title,onChange:le,onKeyDown:hr,__next40pxDefaultSize:!0}),(0,Ot.jsx)(Tse,{ref:H,currentLink:t,className:"block-editor-link-control__field block-editor-link-control__search-input",placeholder:e,value:Ue,withCreateSuggestion:m,onCreateSuggestion:q,onChange:re,onSelect:Dt,showInitialSuggestions:u,allowDirectEntry:!a,showSuggestions:c,suggestionsQuery:p,withURLSuggestion:!g,createSuggestionButtonText:b,hideLabelFromVision:!tt,isEntity:Q,customValidity:B,suffix:(0,Ot.jsx)(XRe,{isEntity:Q,showActions:lo,isDisabled:yt,onUnlink:et,onSubmit:Je,helpTextId:ee})}),Q&&ee&&(0,Ot.jsx)("p",{id:ee,className:"block-editor-link-control__help",children:(0,ua.sprintf)((0,ua.__)("Synced with the selected %s."),G?.type||"item")})]}),he&&(0,Ot.jsx)(cn.Notice,{className:"block-editor-link-control__search-error",status:"error",isDismissible:!1,children:he})]}),t&&!te&&!se&&(0,Ot.jsx)(Vse,{value:gr,onEditClick:()=>ne(!0),hasRichPreviews:k,hasUnlinkControl:Fe,onRemove:()=>{i(),ne(!0)}},gr?.url),_o&&(0,Ot.jsx)("div",{className:"block-editor-link-control__tools",children:!Ho&&(0,Ot.jsx)(ase,{settingsOpen:I,setSettingsOpen:L,children:(0,Ot.jsx)(jse,{value:G,settings:o,onChange:oe(U)})})}),lo&&(0,Ot.jsxs)(cn.__experimentalHStack,{justify:"right",className:"block-editor-link-control__search-actions",children:[(0,Ot.jsx)(cn.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:ao,children:(0,ua.__)("Cancel")}),(0,Ot.jsx)(cn.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:yt?QF:Je,className:"block-editor-link-control__search-submit","aria-disabled":yt,children:(0,ua.__)("Apply")})]}),!se&&y&&y()]})}function XRe({isEntity:e,showActions:t,isDisabled:o,onUnlink:r,onSubmit:n,helpTextId:i}){if(e)return(0,Ot.jsx)(cn.Button,{icon:Ai,onClick:r,"aria-describedby":i,showTooltip:!0,label:(0,ua.__)("Unsync and edit"),__next40pxDefaultSize:!0});if(!t)return(0,Ot.jsx)(cn.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,Ot.jsx)(cn.Button,{onClick:o?QF:n,label:(0,ua.__)("Submit"),icon:Tl,className:"block-editor-link-control__search-submit","aria-disabled":o,size:"small"})})}Ip.ViewerFill=Ose;Ip.DEFAULT_LINK_SETTINGS=KF;var jP=e=>((0,eae.default)("wp.blockEditor.__experimentalLinkControl",{since:"6.8",alternative:"wp.blockEditor.LinkControl"}),(0,Ot.jsx)(Ip,{...e}));jP.ViewerFill=Ip.ViewerFill;jP.DEFAULT_LINK_SETTINGS=Ip.DEFAULT_LINK_SETTINGS;var Jd=Ip;var oae=l(N(),1),rae=l(A(),1),nae=l(Re(),1);var PS=1.5,JF=.01,ez=10,tz="";function tae(e){return e!==void 0&&e!==tz}var oz=l(w(),1),QRe=({__next40pxDefaultSize:e=!1,value:t,onChange:o,__unstableInputWidth:r="60px",...n})=>{let i=tae(t),s=(d,f)=>{if(i)return d;let m=JF*ez;switch(`${d}`){case`${m}`:return PS+m;case"0":return f?d:PS-m;case"":return PS;default:return d}},a=(d,f)=>{let m=["insertText","insertFromPaste"].includes(f.payload.event.nativeEvent?.inputType),h=s(d.value,m);return{...d,value:h}},c=i?t:tz,u=(d,{event:f})=>{if(d===""){o();return}if(f.type==="click"){o(s(`${d}`,!1));return}o(`${d}`)};return!e&&(n.size===void 0||n.size==="default")&&(0,nae.default)("36px default size for wp.blockEditor.LineHeightControl",{since:"6.8",version:"7.1",hint:"Set the `__next40pxDefaultSize` prop to true to start opting into the new default size, which will become the default in a future version."}),(0,oz.jsx)("div",{className:"block-editor-line-height-control",children:(0,oz.jsx)(rae.__experimentalNumberControl,{...n,__shouldNotWarnDeprecated36pxSize:!0,__next40pxDefaultSize:e,__unstableInputWidth:r,__unstableStateReducer:a,onChange:u,label:(0,oae.__)("Line height"),placeholder:PS,step:JF,spinFactor:ez,value:c,min:0,spinControls:"custom"})})},UP=QRe;var ol=l(N(),1),iae=l(ir(),1),un=l(A(),1),GP=l(z(),1),sae=l(ot(),1);var aae=l(X(),1),lae=l(Ve(),1),cae=l(Xn(),1),uae=l(O(),1);function HP(e,t,o){if(o)return o;if(!t||typeof t!="object"||Object.keys(t).length===0)return e&&e.length>0?e.map(n=>`${n}/*`).join(","):void 0;if(!e||e.length===0)return;let r=[];for(let[,n]of Object.entries(t))e.some(s=>s.includes("/")?n===s:n.startsWith(`${s}/`))&&r.push(n);return r.length>0?r.join(","):e.map(n=>`${n}/*`).join(",")}var dr=l(w(),1),JRe=()=>{},eOe=0,tOe=({mediaURL:e,mediaId:t,mediaIds:o,allowedTypes:r,accept:n,onError:i,onSelect:s,onSelectURL:a,onReset:c,onToggleFeaturedImage:u,useFeaturedImage:d,onFilesUpload:f=JRe,name:m=(0,ol.__)("Replace"),createNotice:h,removeNotice:p,children:g,multiple:b=!1,addToGallery:k,handleUpload:v=!0,variant:y,popoverProps:_,renderToggle:S,className:C})=>{let{mediaUpload:B,allowedMimeTypes:P}=(0,GP.useSelect)(U=>{let{getSettings:G}=U(x),W=G();return{mediaUpload:W.mediaUpload,allowedMimeTypes:W.allowedMimeTypes}},[]),T=`block-editor/media-replace-flow/error-notice/${++eOe}`,E=(0,uae.useMemo)(()=>HP(r,P,n),[r,P,n]),L=U=>{let G=(0,lae.__unstableStripHTML)(U);if(i){i(G);return}setTimeout(()=>{h("error",G,{speak:!0,id:T,isDismissible:!0})},1e3)},I=(U,G)=>{d&&u&&u(),G(),s(U),(0,iae.speak)((0,ol.__)("The media file has been replaced")),p(T)},R=(U,G)=>{let W=U.target.files;if(!v)return G(),s(W);f(W),B({allowedTypes:r,filesList:W,onFileChange:([J])=>{I(J,G)},onError:L})},V=U=>{U.keyCode===sae.DOWN&&(U.preventDefault(),U.target.click())},H=b&&(!r||r.length===0?!1:r.every(U=>U==="image"||U.startsWith("image/"))),F={..._,variant:y};return(0,dr.jsx)(un.Dropdown,{popoverProps:F,className:C,contentClassName:D("block-editor-media-replace-flow__options",y&&`is-variant-${y}`),renderToggle:({isOpen:U,onToggle:G})=>S?S({"aria-expanded":U,"aria-haspopup":"true",onClick:G,onKeyDown:V,children:m}):(0,dr.jsx)(un.ToolbarButton,{"aria-expanded":U,"aria-haspopup":"true",onClick:G,onKeyDown:V,children:m}),renderContent:({onClose:U})=>(0,dr.jsxs)(dr.Fragment,{children:[(0,dr.jsxs)(un.NavigableMenu,{className:"block-editor-media-replace-flow__media-upload-menu",children:[(0,dr.jsxs)(Zs,{children:[(0,dr.jsx)(pd,{gallery:H,addToGallery:k,multiple:b,value:b?o:t,onSelect:G=>I(G,U),allowedTypes:r,render:({open:G})=>(0,dr.jsx)(un.MenuItem,{icon:hh,onClick:G,children:(0,ol.__)("Open Media Library")})}),(0,dr.jsx)(un.FormFileUpload,{onChange:G=>{R(G,U)},accept:E,multiple:!!b,render:({openFileDialog:G})=>(0,dr.jsx)(un.MenuItem,{icon:NM,onClick:()=>{G()},children:(0,ol._x)("Upload","verb")})})]}),u&&(0,dr.jsx)(un.MenuItem,{icon:$N,onClick:u,isPressed:d,children:(0,ol.__)("Use featured image")}),typeof g=="function"?g({onClose:U}):g,e&&c&&(0,dr.jsx)(un.MenuItem,{onClick:()=>{c(),U()},children:(0,ol.__)("Reset")})]}),a&&(0,dr.jsxs)("form",{className:"block-editor-media-flow__url-input",children:[(0,dr.jsx)("span",{className:"block-editor-media-replace-flow__image-url-label",children:(0,ol.__)("Current media URL:")}),(0,dr.jsx)(Jd,{value:{url:e},settings:[],showSuggestions:!1,onChange:({url:G})=>{a(G)},searchInputPlaceholder:(0,ol.__)("Paste or type URL")})]})]})})},Zb=(0,aae.compose)([(0,GP.withDispatch)(e=>{let{createNotice:t,removeNotice:o}=e(cae.store);return{createNotice:t,removeNotice:o}}),(0,un.withFilters)("editor.MediaReplaceFlow")])(tOe);var Oo=l(A(),1),Ro=l(N(),1),rf=l(O(),1),wae=l(z(),1);var Cae=l(Re(),1);var nz=l(N(),1),$P=l(O(),1),Xb=l(A(),1);var xae=l(Re(),1);var mae=l(N(),1),pae=l(A(),1);var dae=l(A(),1),WP=l(qn(),1),rz=l(w(),1);function fae({url:e,urlLabel:t,className:o}){let r=D(o,"block-editor-url-popover__link-viewer-url");return e?(0,rz.jsx)(dae.ExternalLink,{className:r,href:e,children:t||(0,WP.filterURLForDisplay)((0,WP.safeDecodeURI)(e))}):(0,rz.jsx)("span",{className:r})}var RS=l(w(),1);function hae({className:e,linkClassName:t,onEditLinkClick:o,url:r,urlLabel:n,...i}){return(0,RS.jsxs)("div",{className:D("block-editor-url-popover__link-viewer",e),...i,children:[(0,RS.jsx)(fae,{url:r,urlLabel:n,className:t}),o&&(0,RS.jsx)(pae.Button,{icon:nm,label:(0,mae.__)("Edit"),onClick:o,size:"compact"})]})}var yae=l(N(),1),_ae=l(A(),1);var Ac=l(N(),1),OS=l(O(),1),da=l(ot(),1),Mn=l(A(),1),ef=l(X(),1),gae=l(z(),1),bae=l(qn(),1);var rl=l(w(),1),vae=l(He(),1),{ValidatedInputControl:oOe}=M(Mn.privateApis);function kae(e){return typeof e=="function"}var rOe=class extends OS.Component{constructor(e){super(e),this.onChange=this.onChange.bind(this),this.onFocus=this.onFocus.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.selectLink=this.selectLink.bind(this),this.handleOnClick=this.handleOnClick.bind(this),this.bindSuggestionNode=this.bindSuggestionNode.bind(this),this.autocompleteRef=e.autocompleteRef||(0,OS.createRef)(),this.inputRef=e.inputRef||(0,OS.createRef)(),this.hasRenderedValidation={current:!1},this.updateSuggestions=(0,ef.debounce)(this.updateSuggestions.bind(this),200),this.suggestionNodes=[],this.suggestionsRequest=null,this.state={suggestions:[],showSuggestions:!1,suggestionsValue:null,selectedSuggestion:null,suggestionsListboxId:"",suggestionOptionIdPrefix:""}}componentDidUpdate(e){let{showSuggestions:t,selectedSuggestion:o}=this.state,{value:r,__experimentalShowInitialSuggestions:n=!1}=this.props;t&&o!==null&&this.suggestionNodes[o]&&this.suggestionNodes[o].scrollIntoView({behavior:"instant",block:"nearest",inline:"nearest"}),e.value!==r&&!this.props.disableSuggestions&&(r?.length?this.updateSuggestions(r):n&&this.updateSuggestions())}componentDidMount(){this.shouldShowInitialSuggestions()&&this.updateSuggestions()}componentWillUnmount(){this.suggestionsRequest?.cancel?.(),this.suggestionsRequest=null}bindSuggestionNode(e){return t=>{this.suggestionNodes[e]=t}}shouldShowInitialSuggestions(){let{__experimentalShowInitialSuggestions:e=!1,value:t}=this.props;return e&&!(t&&t.length)}updateSuggestions(e=""){let{__experimentalFetchLinkSuggestions:t,__experimentalHandleURLSuggestions:o}=this.props;if(!t)return;let r=!e?.length;if(e=e.trim(),!r&&(e.length<2||!o&&(0,bae.isURL)(e))){this.suggestionsRequest?.cancel?.(),this.suggestionsRequest=null,this.setState({suggestions:[],showSuggestions:!1,suggestionsValue:e,selectedSuggestion:null,loading:!1});return}this.setState({selectedSuggestion:null,loading:!0});let n=t(e,{isInitialSuggestions:r});n.then(i=>{this.suggestionsRequest===n&&(this.setState({suggestions:i,suggestionsValue:e,loading:!1,showSuggestions:!!i.length}),i.length?this.props.debouncedSpeak((0,Ac.sprintf)((0,Ac._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",i.length),i.length),"assertive"):this.props.debouncedSpeak((0,Ac.__)("No results."),"assertive"))}).catch(()=>{this.suggestionsRequest===n&&this.setState({loading:!1})}).finally(()=>{this.suggestionsRequest===n&&(this.suggestionsRequest=null)}),this.suggestionsRequest=n}onChange(e){this.props.onChange(e)}onFocus(){let{suggestions:e}=this.state,{disableSuggestions:t,value:o}=this.props;o&&!t&&!(e&&e.length)&&this.suggestionsRequest===null&&this.updateSuggestions(o)}onKeyDown(e){this.props.onKeyDown?.(e);let{showSuggestions:t,selectedSuggestion:o,suggestions:r,loading:n}=this.state;if(!t||!r.length||n){switch(e.keyCode){case da.UP:{e.target.selectionStart!==0&&(e.preventDefault(),e.target.setSelectionRange(0,0));break}case da.DOWN:{this.props.value.length!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(this.props.value.length,this.props.value.length));break}case da.ENTER:{this.props.onSubmit&&(e.preventDefault(),this.props.onSubmit(null,e));break}}return}let i=this.state.suggestions[this.state.selectedSuggestion];switch(e.keyCode){case da.UP:{e.preventDefault();let s=o?o-1:r.length-1;this.setState({selectedSuggestion:s});break}case da.DOWN:{e.preventDefault();let s=o===null||o===r.length-1?0:o+1;this.setState({selectedSuggestion:s});break}case da.TAB:{this.state.selectedSuggestion!==null&&(this.selectLink(i),this.props.speak((0,Ac.__)("Link selected.")));break}case da.ENTER:{e.preventDefault(),this.state.selectedSuggestion!==null?(this.selectLink(i),this.props.onSubmit&&this.props.onSubmit(i,e)):this.props.onSubmit&&this.props.onSubmit(null,e);break}}}selectLink(e){this.props.onChange(e.url,e),this.setState({selectedSuggestion:null,showSuggestions:!1})}handleOnClick(e){this.selectLink(e),this.inputRef.current.focus()}static getDerivedStateFromProps({value:e,instanceId:t,disableSuggestions:o,__experimentalShowInitialSuggestions:r=!1},{showSuggestions:n}){let i=n,s=e&&e.length;return!r&&!s&&(i=!1),o===!0&&(i=!1),{showSuggestions:i,suggestionsListboxId:`block-editor-url-input-suggestions-${t}`,suggestionOptionIdPrefix:`block-editor-url-input-suggestion-${t}`}}render(){return(0,rl.jsxs)(rl.Fragment,{children:[this.renderControl(),this.renderSuggestions()]})}renderControl(){let{label:e=null,className:t,isFullWidth:o,instanceId:r,placeholder:n=(0,Ac.__)("Paste URL or type to search"),__experimentalRenderControl:i,value:s="",hideLabelFromVision:a=!1,help:c=null,disabled:u=!1,customValidity:d,markWhenOptional:f}=this.props,{loading:m,showSuggestions:h,selectedSuggestion:p,suggestionsListboxId:g,suggestionOptionIdPrefix:b}=this.state,k=`url-input-control-${r}`,v={id:k,label:e,className:D("block-editor-url-input",t,{"is-full-width":o}),hideLabelFromVision:a},y={id:k,value:s,required:this.props.required??!0,type:"text",name:k,autoComplete:"off",onChange:u?()=>{}:this.onChange,onFocus:u?()=>{}:this.onFocus,placeholder:n,onKeyDown:u?()=>{}:this.onKeyDown,role:"combobox","aria-label":e?void 0:(0,Ac.__)("URL"),"aria-expanded":h,"aria-autocomplete":"list","aria-owns":g,"aria-activedescendant":p!==null?`${b}-${p}`:void 0,ref:this.inputRef,disabled:u,suffix:this.props.suffix,help:c},_={customValidity:d,...f!==void 0&&{markWhenOptional:f}};if(i)return i(v,y,m);d!==void 0&&(this.hasRenderedValidation.current=!0);let S=this.hasRenderedValidation.current?oOe:Mn.__experimentalInputControl;return(0,rl.jsxs)(Mn.BaseControl,{...v,children:[(0,rl.jsx)(S,{...y,...this.hasRenderedValidation.current?_:{},__next40pxDefaultSize:!0}),m&&(0,rl.jsx)(Mn.Spinner,{})]})}renderSuggestions(){let{className:e,__experimentalRenderSuggestions:t}=this.props,{showSuggestions:o,suggestions:r,suggestionsValue:n,selectedSuggestion:i,suggestionsListboxId:s,suggestionOptionIdPrefix:a,loading:c}=this.state;if(!o||r.length===0)return null;let u={id:s,ref:this.autocompleteRef,role:"listbox"},d=(f,m)=>({role:"option",tabIndex:"-1",id:`${a}-${m}`,ref:this.bindSuggestionNode(m),"aria-selected":m===i?!0:void 0});return kae(t)?t({suggestions:r,selectedSuggestion:i,suggestionsListProps:u,buildSuggestionItemProps:d,isLoading:c,handleSuggestionClick:this.handleOnClick,isInitialSuggestions:!n?.length,currentInputValue:n}):(0,rl.jsx)(Mn.Popover,{placement:"bottom",focusOnMount:!1,children:(0,rl.jsx)("div",{...u,className:D("block-editor-url-input__suggestions",{[`${e}__suggestions`]:e}),children:r.map((f,m)=>(0,vae.createElement)(Mn.Button,{__next40pxDefaultSize:!0,...d(f,m),key:f.id,className:D("block-editor-url-input__suggestion",{"is-selected":m===i}),onClick:()=>this.handleOnClick(f)},f.title))})})}},Xd=(0,ef.compose)(ef.withSafeTimeout,Mn.withSpokenMessages,ef.withInstanceId,(0,gae.withSelect)((e,t)=>{if(kae(t.__experimentalFetchLinkSuggestions))return;let{getSettings:o}=e(x);return{__experimentalFetchLinkSuggestions:o().__experimentalFetchLinkSuggestions}}))(rOe);var AS=l(w(),1);function Sae({autocompleteRef:e,className:t,onChangeInputValue:o,value:r,...n}){return(0,AS.jsxs)("form",{className:D("block-editor-url-popover__link-editor",t),...n,children:[(0,AS.jsx)(Xd,{value:r,onChange:o,autocompleteRef:e}),(0,AS.jsx)(_ae.Button,{icon:Tl,label:(0,yae.__)("Apply"),type:"submit",size:"compact"})]})}var tf=l(w(),1),{__experimentalPopoverLegacyPositionToPlacement:nOe}=M(Xb.privateApis),iOe="bottom",iz=(0,$P.forwardRef)(({additionalControls:e,children:t,renderSettings:o,placement:r,focusOnMount:n="firstElement",position:i,...s},a)=>{i!==void 0&&(0,xae.default)("`position` prop in wp.blockEditor.URLPopover",{since:"6.2",alternative:"`placement` prop"});let c;r!==void 0?c=r:i!==void 0&&(c=nOe(i)),c=c||iOe;let[u,d]=(0,$P.useState)(!1),f=!!o&&u,m=()=>{d(!u)};return(0,tf.jsxs)(Xb.Popover,{ref:a,role:"dialog","aria-modal":"true","aria-label":(0,nz.__)("Edit URL"),className:"block-editor-url-popover",focusOnMount:n,placement:c,shift:!0,variant:"toolbar",...s,children:[(0,tf.jsx)("div",{className:"block-editor-url-popover__input-container",children:(0,tf.jsxs)("div",{className:"block-editor-url-popover__row",children:[t,!!o&&(0,tf.jsx)(Xb.Button,{className:"block-editor-url-popover__settings-toggle",icon:vr,label:(0,nz.__)("Link settings"),onClick:m,"aria-expanded":u,size:"compact"})]})}),f&&(0,tf.jsx)("div",{className:"block-editor-url-popover__settings",children:o()}),e&&!f&&(0,tf.jsx)("div",{className:"block-editor-url-popover__additional-controls",children:e})]})});iz.LinkEditor=Sae;iz.LinkViewer=hae;var of=iz;var Ye=l(w(),1),sOe=()=>{},aOe=({src:e,onChange:t,onSubmit:o,onClose:r,popoverAnchor:n})=>(0,Ye.jsx)(of,{anchor:n,onClose:r,children:(0,Ye.jsx)("form",{className:"block-editor-media-placeholder__url-input-form",onSubmit:o,children:(0,Ye.jsx)(Oo.__experimentalInputControl,{__next40pxDefaultSize:!0,label:(0,Ro.__)("URL"),type:"text",hideLabelFromVision:!0,placeholder:(0,Ro.__)("Paste or type URL"),onChange:t,value:e,suffix:(0,Ye.jsx)(Oo.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,Ye.jsx)(Oo.Button,{size:"small",icon:Tl,label:(0,Ro.__)("Apply"),type:"submit"})})})})}),lOe=({src:e,onChangeSrc:t,onSelectURL:o})=>{let[r,n]=(0,rf.useState)(null),[i,s]=(0,rf.useState)(!1),a=()=>{s(!0)},c=()=>{s(!1),r?.focus()},u=d=>{d.preventDefault(),e&&o&&(o(e),c())};return(0,Ye.jsxs)("div",{className:"block-editor-media-placeholder__url-input-container",children:[(0,Ye.jsx)(Oo.Button,{__next40pxDefaultSize:!0,className:"block-editor-media-placeholder__button",onClick:a,isPressed:i,variant:"secondary","aria-haspopup":"dialog",ref:n,children:(0,Ro.__)("Insert from URL")}),i&&(0,Ye.jsx)(aOe,{src:e,onChange:t,onSubmit:u,onClose:c,popoverAnchor:r})]})};function cOe({value:e={},allowedTypes:t,className:o,icon:r,labels:n={},mediaPreview:i,notices:s,isAppender:a,accept:c,addToGallery:u,multiple:d=!1,handleUpload:f=!0,disableDropZone:m,disableMediaButtons:h,onError:p,onSelect:g,onCancel:b,onSelectURL:k,onToggleFeaturedImage:v,onDoubleClick:y,onFilesPreUpload:_=sOe,onHTMLDrop:S,children:C,mediaLibraryButton:B,placeholder:P,style:T}){S&&(0,Cae.default)("wp.blockEditor.MediaPlaceholder onHTMLDrop prop",{since:"6.2",version:"6.4"});let{mediaUpload:E,allowedMimeTypes:L}=(0,wae.useSelect)($=>{let{getSettings:ee}=$(x),K=ee();return{mediaUpload:K.mediaUpload,allowedMimeTypes:K.allowedMimeTypes}},[]),[I,R]=(0,rf.useState)("");(0,rf.useEffect)(()=>{R(e?.src??"")},[e?.src]);let V=(0,rf.useMemo)(()=>HP(t,L,c),[t,L,c]),j=()=>!t||t.length===0?!1:t.every($=>$==="image"||$.startsWith("image/")),H=$=>{if(!f||typeof f=="function"&&!f($))return g($);_($);let ee;if(d)if(u){let K=[];ee=te=>{let ne=(e??[]).filter(q=>q.id?!K.some(({id:se})=>Number(se)===Number(q.id)):!K.some(({urlSlug:se})=>q.url.includes(se)));g(ne.concat(te)),K=te.map(q=>{let se=q.url.lastIndexOf("."),he=q.url.slice(0,se);return{id:q.id,urlSlug:he}})}}else ee=g;else ee=([K])=>g(K);E({allowedTypes:t,filesList:$,onFileChange:ee,onError:p,multiple:d})};async function F($){let{blocks:ee}=j3($);if(!ee?.length)return;let K=await Promise.all(ee.map(te=>{let ne=te.name.split("/")[1];return te.attributes.id?(te.attributes.type=ne,te.attributes):new Promise((q,se)=>{window.fetch(te.attributes.url).then(he=>he.blob()).then(he=>E({filesList:[he],additionalData:{title:te.attributes.title,alt_text:te.attributes.alt,caption:te.attributes.caption,type:ne},onFileChange:([me])=>{me.id&&q(me)},allowedTypes:t,onError:se})).catch(()=>q(te.attributes.url))})})).catch(te=>p(te));K?.length&&g(d?K:K[0])}let U=$=>{H($.target.files)},W=P??($=>{let{instructions:ee,title:K}=n;if(!E&&!k&&(ee=(0,Ro.__)("To edit this block, you need permission to upload media.")),ee===void 0||K===void 0){let ne=t??[],[q]=ne,se=ne.length===1,he=se&&q==="audio",me=se&&q==="image",xe=se&&q==="video";ee===void 0&&E&&(ee=(0,Ro.__)("Drag and drop an image or video, upload, or choose from your library."),he?ee=(0,Ro.__)("Drag and drop an audio file, upload, or choose from your library."):me?ee=(0,Ro.__)("Drag and drop an image, upload, or choose from your library."):xe&&(ee=(0,Ro.__)("Drag and drop a video, upload, or choose from your library."))),K===void 0&&(K=(0,Ro.__)("Media"),he?K=(0,Ro.__)("Audio"):me?K=(0,Ro.__)("Image"):xe&&(K=(0,Ro.__)("Video")))}let te=D("block-editor-media-placeholder",o,{"is-appender":a});return(0,Ye.jsxs)(Oo.Placeholder,{icon:r,label:K,instructions:ee,className:te,notices:s,onDoubleClick:y,preview:i,style:T,children:[$,C]})}),J=()=>m?null:(0,Ye.jsx)(Oo.DropZone,{onFilesDrop:H,onDrop:F,isEligible:$=>{let ee="wp-block:core/",K=[];for(let te of $.types)te.startsWith(ee)&&K.push(te.slice(ee.length));return K.every(te=>t.includes(te))&&(d?!0:K.length===1)}}),le=()=>b&&(0,Ye.jsx)(Oo.Button,{__next40pxDefaultSize:!0,className:"block-editor-media-placeholder__cancel-button",title:(0,Ro.__)("Cancel"),variant:"link",onClick:b,children:(0,Ro.__)("Cancel")}),oe=()=>k&&(0,Ye.jsx)(lOe,{src:I,onChangeSrc:R,onSelectURL:k}),re=()=>v&&(0,Ye.jsx)("div",{className:"block-editor-media-placeholder__url-input-container",children:(0,Ye.jsx)(Oo.Button,{__next40pxDefaultSize:!0,className:"block-editor-media-placeholder__button",onClick:v,variant:"secondary",children:(0,Ro.__)("Use featured image")})}),Q=()=>{let ee=B??(({open:te})=>(0,Ye.jsx)(Oo.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>{te()},children:(0,Ro.__)("Media Library")})),K=(0,Ye.jsx)(pd,{addToGallery:u,gallery:d&&j(),multiple:d,onSelect:g,allowedTypes:t,mode:"browse",value:Array.isArray(e)?e.map(({id:te})=>te):e.id,render:ee});if(E&&a)return(0,Ye.jsxs)(Ye.Fragment,{children:[J(),(0,Ye.jsx)(Oo.FormFileUpload,{onChange:U,accept:V,multiple:!!d,render:({openFileDialog:te})=>{let ne=(0,Ye.jsxs)(Ye.Fragment,{children:[(0,Ye.jsx)(Oo.Button,{__next40pxDefaultSize:!0,variant:"primary",className:D("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onClick:te,children:(0,Ro._x)("Upload","verb")}),K,oe(),re(),le()]});return W(ne)}})]});if(E){let te=(0,Ye.jsxs)(Ye.Fragment,{children:[J(),(0,Ye.jsx)(Oo.FormFileUpload,{render:({openFileDialog:ne})=>(0,Ye.jsx)(Oo.Button,{__next40pxDefaultSize:!0,onClick:ne,variant:"primary",className:D("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),children:(0,Ro._x)("Upload","verb")}),onChange:U,accept:V,multiple:!!d}),K,oe(),re(),le()]});return W(te)}return W(K)};return h?(0,Ye.jsx)(Zs,{children:J()}):(0,Ye.jsx)(Zs,{fallback:W(oe()),children:Q()})}var Bae=(0,Oo.withFilters)("editor.MediaPlaceholder")(cOe);var Eae=l(w(),1),uOe=({colorSettings:e,...t})=>{let o=e.map(r=>{if(!r)return r;let{value:n,onChange:i,...s}=r;return{...s,colorValue:n,onColorChange:i}});return(0,Eae.jsx)(pP,{settings:o,gradients:[],disableCustomGradients:!0,...t})},Tae=uOe;var wle=l(D5(),1);var Cle=l(O(),1);var _le=l(O(),1);var hle=l(Wf(),1),fr=l(O(),1),sf=l(z(),1),a2=l(X(),1),gle=l(yr(),1),ble=l(A(),1),vle=l(Y(),1),kle=l(Re(),1),av=l(N(),1);var Iae=l(N(),1),KP=l(A(),1);var sz=l(N(),1),Pp=l(A(),1);var Lc=l(w(),1),dOe={placement:"bottom-start"},fOe=()=>(0,Lc.jsxs)(Lc.Fragment,{children:[["bold","italic","link","unknown"].map(e=>(0,Lc.jsx)(Pp.Slot,{name:`RichText.ToolbarControls.${e}`},e)),(0,Lc.jsx)(Pp.Slot,{name:"RichText.ToolbarControls",children:e=>{if(!e.length)return null;let o=e.map(([{props:r}])=>r).some(({isActive:r})=>r);return(0,Lc.jsx)(Pp.ToolbarItem,{children:r=>(0,Lc.jsx)(Pp.DropdownMenu,{icon:vr,label:(0,sz.__)("More"),toggleProps:{...r,className:D(r.className,{"is-pressed":o}),description:(0,sz.__)("Displays more block tools")},controls:Ba(e.map(([{props:n}])=>n),"title"),popoverProps:dOe})})}})]}),az=fOe;var nf=l(w(),1);function mOe({popoverAnchor:e}){return(0,nf.jsx)(KP.Popover,{placement:"top",focusOnMount:!1,anchor:e,className:"block-editor-rich-text__inline-format-toolbar",__unstableSlotName:"block-toolbar",children:(0,nf.jsx)(ib,{className:"block-editor-rich-text__inline-format-toolbar-group","aria-label":(0,Iae.__)("Format tools"),children:(0,nf.jsx)(KP.ToolbarGroup,{children:(0,nf.jsx)(az,{})})})})}var pOe=({inline:e,editableContentElement:t})=>e?(0,nf.jsx)(mOe,{popoverAnchor:t}):(0,nf.jsx)(Ut,{group:"inline",children:(0,nf.jsx)(az,{})}),Pae=pOe;var YP=l(O(),1),Rae=l(z(),1);function Oae({html:e,value:t}){let o=(0,YP.useRef)(),r=!!t.activeFormats?.length,{__unstableMarkLastChangeAsPersistent:n}=(0,Rae.useDispatch)(x);(0,YP.useLayoutEffect)(()=>{if(!o.current){o.current=t.text;return}if(o.current!==t.text){let i=window.setTimeout(()=>{n()},1e3);return o.current=t.text,()=>{window.clearTimeout(i)}}n()},[e,r])}var ev=l(O(),1),Xae=l(X(),1);var LS=l(yr(),1),Aae=l(pt(),1);var hOe=["`",'"',"'","\u201C\u201D","\u2018\u2019"],Lae=e=>t=>{function o(r){let{inputType:n,data:i}=r,{value:s,onChange:a,registry:c}=e.current;if(n!=="insertText"||(0,LS.isCollapsed)(s))return;let u=(0,Aae.applyFilters)("blockEditor.wrapSelectionSettings",hOe).find(([S,C])=>S===i||C===i);if(!u)return;let[d,f=d]=u,m=s.start,h=s.end+d.length,p=(0,LS.insert)(s,d,m,m);p=(0,LS.insert)(p,f,h,h);let{__unstableMarkLastChangeAsPersistent:g,__unstableMarkAutomaticChange:b}=c.dispatch(x);g(),a(p),b();let k={};for(let S in r)k[S]=r[S];k.data=f;let{ownerDocument:v}=t,{defaultView:y}=v,_=new y.InputEvent("input",k);window.queueMicrotask(()=>{r.target.dispatchEvent(_)}),r.preventDefault()}return t.addEventListener("beforeinput",o),()=>{t.removeEventListener("beforeinput",o)}};var qP=l(yr(),1),Qb=l(Y(),1);var Nae=l(yr(),1);function Mae(e){let t="tales of gutenberg",o=" \u{1F421}\u{1F422}\u{1F980}\u{1F424}\u{1F98B}\u{1F418}\u{1F427}\u{1F439}\u{1F981}\u{1F984}\u{1F98D}\u{1F43C}\u{1F43F}\u{1F383}\u{1F434}\u{1F41D}\u{1F406}\u{1F995}\u{1F994}\u{1F331}\u{1F347}\u03C0\u{1F34C}\u{1F409}\u{1F4A7}\u{1F968}\u{1F30C}\u{1F342}\u{1F360}\u{1F966}\u{1F95A}\u{1F95D}\u{1F39F}\u{1F965}\u{1F952}\u{1F6F5}\u{1F956}\u{1F352}\u{1F36F}\u{1F3BE}\u{1F3B2}\u{1F43A}\u{1F41A}\u{1F42E}\u231B\uFE0F",{start:r,text:n}=e;return r<t.length||n.slice(r-t.length,r).toLowerCase()!==t?e:(0,Nae.insert)(e,o)}function Dae(e){let t=e.length;for(;t--;){let o=ny(e[t].attributes);if(o)return e[t].attributes[o]=e[t].attributes[o].toString().replace(Ll,""),[e[t].clientId,o,0,0];let r=Dae(e[t].innerBlocks);if(r)return r}return[]}var Vae=e=>t=>{function o(){let{getValue:n,onReplace:i,selectionChange:s,registry:a}=e.current;if(!i)return;let c=n(),{start:u,text:d}=c;if(d.slice(u-1,u)!==" ")return;let m=d.slice(0,u).trim(),h=(0,Qb.getBlockTransforms)("from").filter(({type:k})=>k==="prefix"),p=(0,Qb.findTransform)(h,({prefix:k})=>m===k);if(!p)return;let g=(0,qP.toHTMLString)({value:(0,qP.insert)(c,Ll,0,u)}),b=p.transform(g);return s(...Dae([b])),i([b]),a.dispatch(x).__unstableMarkAutomaticChange(),!0}function r(n){let{inputType:i,type:s}=n,{getValue:a,onChange:c,__unstableAllowPrefixTransformations:u,formatTypes:d,registry:f,onReplace:m}=e.current;if(i!=="insertText"&&s!=="compositionend"||u&&o())return;let h=a(),p=(0,Qb.getBlockTransforms)("from").filter(y=>y.type==="input"),g=(0,Qb.findTransform)(p,y=>y.regExp.test(h.text));if(g){m(g.transform()),f.dispatch(x).__unstableMarkAutomaticChange();return}let b=d.reduce((y,{__unstableInputRule:_})=>(_&&(y=_(y)),y),Mae(h)),{__unstableMarkLastChangeAsPersistent:k,__unstableMarkAutomaticChange:v}=f.dispatch(x);b!==h&&(k(),c({...b,activeFormats:h.activeFormats}),v())}return t.addEventListener("input",r),t.addEventListener("compositionend",r),()=>{t.removeEventListener("input",r),t.removeEventListener("compositionend",r)}};var Fae=e=>t=>{function o(r){if(r.inputType!=="insertReplacementText")return;let{registry:n}=e.current;n.dispatch(x).__unstableMarkLastChangeAsPersistent()}return t.addEventListener("beforeinput",o),()=>{t.removeEventListener("beforeinput",o)}};var ZP=l(ot(),1),zae=()=>e=>{function t(o){(ZP.isKeyboardEvent.primary(o,"z")||ZP.isKeyboardEvent.primary(o,"y")||ZP.isKeyboardEvent.primaryShift(o,"z"))&&o.preventDefault()}return e.addEventListener("keydown",t),()=>{e.removeEventListener("keydown",t)}};var jae=e=>t=>{let{keyboardShortcuts:o}=e.current;function r(n){for(let i of o.current)i(n)}return t.addEventListener("keydown",r),()=>{t.removeEventListener("keydown",r)}};var Uae=e=>t=>{let{inputEvents:o}=e.current;function r(n){for(let i of o.current)i(n)}return t.addEventListener("input",r),()=>{t.removeEventListener("input",r)}};var XP=l(ot(),1);var Hae=e=>t=>{function o(r){let{keyCode:n}=r;if(r.defaultPrevented||n!==XP.BACKSPACE&&n!==XP.ESCAPE)return;let{registry:i}=e.current,{didAutomaticChange:s,getSettings:a}=i.select(x),{__experimentalUndo:c}=a();c&&s()&&(r.preventDefault(),c())}return t.addEventListener("keydown",o),()=>{t.removeEventListener("keydown",o)}};var Wae=l(Y(),1),nl=l(yr(),1),$ae=l(qn(),1);var gOe=l(O(),1),bOe=l(Y(),1),vOe=l(w(),1);function Gae(e,t){if(t?.length){let o=e.formats.length;for(;o--;)e.formats[o]=[...t,...e.formats[o]||[]]}}function QP(e){if(!(e!==!0&&e!=="p"&&e!=="li"))return e===!0?"p":e}function Jb({allowedFormats:e,disableFormats:t}){return t?Jb.EMPTY_ARRAY:e}Jb.EMPTY_ARRAY=[];var Kae=e=>t=>{function o(n){let{disableFormats:i,onChange:s,value:a,formatTypes:c,tagName:u,onReplace:d,__unstableEmbedURLOnPaste:f,preserveWhiteSpace:m,pastePlainText:h,registry:p}=e.current;if(!t.contains(n.target)||n.defaultPrevented)return;let{plainText:g,html:b}=fg(n);if(n.preventDefault(),window.console.log(`Received HTML (RichText): |
| 170 |
|
| 171 |
`,b),window.console.log(`Received plain text (RichText): |
| 172 |
|
| 173 |
`,g),i){s((0,nl.insert)(a,g));return}let k=n.clipboardData.getData("rich-text")==="true";function v(C){let B=c.reduce((P,{__unstablePasteRule:T})=>(T&&P===a&&(P=T(a,{html:b,plainText:g})),P),a);if(B!==a)s(B);else{let P=(0,nl.create)({html:C});Gae(P,a.activeFormats),s((0,nl.insert)(a,P))}}if(k){v(b);return}if(h){s((0,nl.insert)(a,(0,nl.create)({text:g})));return}let y="INLINE",_=g.trim();f&&(0,nl.isEmpty)(a)&&(0,$ae.isURL)(_)&&/^https?:/.test(_)&&(y="BLOCKS");let S=(0,Wae.pasteHandler)({HTML:b,plainText:g,mode:y,tagName:u,preserveWhiteSpace:m});if(typeof S=="string"){v(S);return}!S.length||!d||!(0,nl.isEmpty)(a)||(y==="BLOCKS"&&(v(b),p.dispatch(x).__unstableMarkLastChangeAsPersistent()),d(S,S.length-1,-1))}let{defaultView:r}=t.ownerDocument;return r.addEventListener("paste",o),()=>{r.removeEventListener("paste",o)}};var NS=l(ot(),1),JP=l(yr(),1),Yae=e=>t=>{function o(r){let{keyCode:n}=r;if(r.defaultPrevented)return;let{value:i,onMerge:s,onRemove:a}=e.current;if(n===NS.DELETE||n===NS.BACKSPACE){let{start:c,end:u,text:d}=i,f=n===NS.BACKSPACE,m=i.activeFormats&&!!i.activeFormats.length;if(!(0,JP.isCollapsed)(i)||m||f&&c!==0||!f&&u!==d.length)return;s?s(!f):a&&(0,JP.isEmpty)(i)&&f&&a(!f),r.preventDefault()}}return t.addEventListener("keydown",o),()=>{t.removeEventListener("keydown",o)}};var lz=l(ot(),1),MS=l(yr(),1),qae=e=>t=>{function o(i){if(i.keyCode!==lz.ENTER)return;let{onReplace:s,onSplit:a}=e.current;s&&a&&(i.__deprecatedOnSplit=!0)}function r(i){if(i.defaultPrevented||i.target!==t||i.keyCode!==lz.ENTER)return;let{value:s,onChange:a,disableLineBreaks:c,onSplitAtEnd:u,onSplitAtDoubleLineEnd:d,registry:f}=e.current;i.preventDefault();let{text:m,start:h,end:p}=s;i.shiftKey?c||a((0,MS.insert)(s,` |
| 174 |
`)):u&&h===p&&p===m.length?u():d&&h===p&&p===m.length&&m.slice(-2)===` |
| 175 |
|
| 176 |
`?f.batch(()=>{let g={...s};g.start=g.end-2,a((0,MS.remove)(g)),d()}):c||a((0,MS.insert)(s,` |
| 177 |
`))}let{defaultView:n}=t.ownerDocument;return n.addEventListener("keydown",r),t.addEventListener("keydown",o),()=>{n.removeEventListener("keydown",r),t.removeEventListener("keydown",o)}};var Zae=e=>t=>{function o(){let{registry:r}=e.current;if(!r.select(x).isMultiSelecting())return;let n=t.parentElement.closest('[contenteditable="true"]');n&&n.focus()}return t.addEventListener("focus",o),()=>{t.removeEventListener("focus",o)}};var kOe=[Lae,Vae,Fae,zae,jae,Uae,Hae,Kae,Yae,qae,Zae];function e2(e){let t=(0,ev.useRef)(e);(0,ev.useInsertionEffect)(()=>{t.current=e});let o=(0,ev.useMemo)(()=>kOe.map(r=>r(t)),[t]);return(0,Xae.useRefEffect)(r=>{if(!e.isSelected)return;let n=o.map(i=>i(r));return()=>{n.forEach(i=>i())}},[o,e.isSelected])}var t2=l(yr(),1),o2=l(O(),1);var Qae=l(w(),1),Jae=l(He(),1),yOe={},cz=Symbol("usesContext");function _Oe({onChange:e,onFocus:t,value:o,forwardedRef:r,settings:n,isVisible:i}){let{name:s,edit:a,[cz]:c}=n,u=(0,o2.useContext)(Or),d=(0,o2.useMemo)(()=>c?Object.fromEntries(Object.entries(u).filter(([g])=>c.includes(g))):yOe,[c,u]);if(!a)return null;let f=(0,t2.getActiveFormat)(o,s),m=f!==void 0,h=(0,t2.getActiveObject)(o),p=h!==void 0&&h.type===s;return(0,Qae.jsx)(a,{isActive:m,isVisible:i,activeAttributes:m?f.attributes||{}:{},isObjectActive:p,activeObjectAttributes:p?h.attributes||{}:{},value:o,onChange:e,onFocus:t,contentRef:r,context:d},s)}function r2({formatTypes:e,...t}){return e.map(o=>(0,Jae.createElement)(_Oe,{settings:o,...t,key:o.name}))}var ele=l(O(),1),tle=l(Y(),1),ole=l(Re(),1);var uz=l(w(),1);function dz(e,t){if(tv.isEmpty(e)){let o=QP(t);return o?`<${o}></${o}>`:""}return Array.isArray(e)?((0,ole.default)("wp.blockEditor.RichText value prop as children type",{since:"6.1",version:"6.3",alternative:"value prop as string",link:"https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"}),tle.children.toHTML(e)):typeof e=="string"?e:e.toHTMLString()}function DS({value:e,tagName:t,multiline:o,format:r,...n}){return e=(0,uz.jsx)(ele.RawHTML,{children:dz(e,o)}),t?(0,uz.jsx)(t,{...n,children:e}):e}var ale=l(O(),1),mz=l(Y(),1),lle=l(yr(),1),cle=l(Re(),1);var rle=l(O(),1),nle=l(Re(),1),n2=l(z(),1),ile=l(ot(),1),ov=l(yr(),1);var fz=l(w(),1);function SOe({children:e,identifier:t,tagName:o="div",value:r="",onChange:n,multiline:i,...s},a){(0,nle.default)("wp.blockEditor.RichText multiline prop",{since:"6.1",version:"6.3",alternative:"nested blocks (InnerBlocks)",link:"https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/nested-blocks-inner-blocks/"});let{clientId:c}=Pe(),{getSelectionStart:u,getSelectionEnd:d}=(0,n2.useSelect)(x),{selectionChange:f}=(0,n2.useDispatch)(x),m=QP(i);r=r||`<${m}></${m}>`;let p=`</${m}>${r}<${m}>`.split(`</${m}><${m}>`);p.shift(),p.pop();function g(b){n(`<${m}>${b.join(`</${m}><${m}>`)}</${m}>`)}return(0,fz.jsx)(o,{ref:a,children:p.map((b,k)=>(0,fz.jsx)(i2,{identifier:`${t}-${k}`,tagName:m,value:b,onChange:v=>{let y=p.slice();y[k]=v,g(y)},isSelected:void 0,onKeyDown:v=>{if(v.keyCode!==ile.ENTER)return;v.preventDefault();let{offset:y}=u(),{offset:_}=d();if(typeof y!="number"||typeof _!="number")return;let S=(0,ov.create)({html:b});S.start=y,S.end=_;let C=(0,ov.split)(S).map(P=>(0,ov.toHTMLString)({value:P})),B=p.slice();B.splice(k,1,...C),g(B),f(c,`${t}-${k+1}`,0,0)},onMerge:v=>{let y=p.slice(),_=0;if(v){if(!y[k+1])return;y.splice(k,2,y[k]+y[k+1]),_=y[k].length-1}else{if(!y[k-1])return;y.splice(k-1,2,y[k-1]+y[k]),_=y[k-1].length-1}g(y),f(c,`${t}-${k-(v?0:1)}`,_,_)},...s},k))})}var sle=(0,rle.forwardRef)(SOe);var ule=l(w(),1);function dle(e){return(0,ale.forwardRef)((t,o)=>{let r=t.value,n=t.onChange;Array.isArray(r)&&((0,cle.default)("wp.blockEditor.RichText value prop as children type",{since:"6.1",version:"6.3",alternative:"value prop as string",link:"https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"}),r=mz.children.toHTML(t.value),n=s=>t.onChange(mz.children.fromDOM((0,lle.__unstableCreateElement)(document,s).childNodes)));let i=t.multiline?sle:e;return(0,ule.jsx)(i,{...t,value:r,onChange:n,ref:o})})}var fle=l(ot(),1),rv=l(O(),1);function pz({character:e,type:t,onUse:o}){let r=(0,rv.useContext)(nv),n=(0,rv.useRef)();return n.current=o,(0,rv.useEffect)(()=>{function i(s){fle.isKeyboardEvent[t](s,e)&&(n.current(),s.preventDefault())}return r.current.add(i),()=>{r.current.delete(i)}},[e,t]),null}var s2=l(A(),1),mle=l(ot(),1),hz=l(w(),1);function gz({name:e,shortcutType:t,shortcutCharacter:o,...r}){let n,i="RichText.ToolbarControls";return e&&(i+=`.${e}`),t&&o&&(n=mle.displayShortcut[t](o)),(0,hz.jsx)(s2.Fill,{name:i,children:(0,hz.jsx)(s2.ToolbarButton,{...r,shortcut:n})})}var iv=l(O(),1);function bz({inputType:e,onInput:t}){let o=(0,iv.useContext)(sv),r=(0,iv.useRef)();return r.current=t,(0,iv.useEffect)(()=>{function n(i){i.inputType===e&&(r.current(),i.preventDefault())}return o.current.add(n),()=>{o.current.delete(n)}},[e]),null}var ki=l(w(),1),{useRichText:xOe}=M(gle.privateApis),nv=(0,fr.createContext)();nv.displayName="keyboardShortcutContext";var sv=(0,fr.createContext)();sv.displayName="inputEventContext";var ple=Symbol("instanceId");function yle(e){let{__unstableMobileNoFocusOnMount:t,deleteEnter:o,placeholderTextColor:r,textAlign:n,selectionColor:i,tagsToEliminate:s,disableEditingMenu:a,fontSize:c,fontFamily:u,fontWeight:d,fontStyle:f,minWidth:m,maxWidth:h,disableSuggestions:p,disableAutocorrection:g,...b}=e;return b}function i2({children:e,tagName:t="div",value:o="",onChange:r,isSelected:n,multiline:i,inlineToolbar:s,wrapperClassName:a,autocompleters:c,onReplace:u,placeholder:d,allowedFormats:f,withoutInteractiveFormatting:m,onRemove:h,onMerge:p,onSplit:g,__unstableOnSplitAtEnd:b,__unstableOnSplitAtDoubleLineEnd:k,identifier:v,preserveWhiteSpace:y,__unstablePastePlainText:_,__unstableEmbedURLOnPaste:S,__unstableDisableFormats:C,disableLineBreaks:B,__unstableAllowPrefixTransformations:P,readOnly:T,...E},L){E=yle(E),g&&(0,kle.default)("wp.blockEditor.RichText onSplit prop",{since:"6.4",alternative:'block.json support key: "splitting"'});let I=(0,a2.useInstanceId)(i2),R=(0,fr.useRef)(),[V,j]=(0,fr.useState)(null),H=Pe(),{clientId:F,isSelected:U,name:G}=H,W=H[ih],J=(0,fr.useContext)(Or),le=(0,sf.useRegistry)(),oe=Fe=>{if(!U)return{isSelected:!1};let{getSelectionStart:lo,getSelectionEnd:tt}=Fe(x),ze=lo(),yt=tt(),_o;return n===void 0?_o=ze.clientId===F&&yt.clientId===F&&(v?ze.attributeKey===v:ze[ple]===I):n&&(_o=ze.clientId===F),{selectionStart:_o?ze.offset:void 0,selectionEnd:_o?yt.offset:void 0,isSelected:_o}},{selectionStart:re,selectionEnd:Q,isSelected:$}=(0,sf.useSelect)(oe,[F,v,I,n,U]),{disableBoundBlock:ee,bindingsPlaceholder:K,bindingsLabel:te}=(0,sf.useSelect)(Fe=>{if(!W?.[v])return{};let{__experimentalBlockBindingsSupportedAttributes:lo}=Fe(x).getSettings();if(!lo?.[G])return{};let ze=W[v],yt=(0,vle.getBlockBindingsSource)(ze.source),_o={};if(yt?.usesContext?.length)for(let _t of yt.usesContext)_o[_t]=J[_t];let gr=!yt?.canUserEditValue?.({select:Fe,context:_o,args:ze.args});if(o.length>0)return{disableBoundBlock:gr,bindingsPlaceholder:null,bindingsLabel:null};let{getBlockAttributes:ve}=Fe(x),Et=ve(F),Mo=null;yt?.getFieldsList&&(Mo=yt.getFieldsList({select:Fe,context:_o})?.find(_a=>(0,hle.default)(_a.args,ze?.args))?.label);let mt=Mo??yt?.label,be=gr?mt:(0,av.sprintf)((0,av.__)("Add %s"),mt),Ft=gr?ze?.args?.key||yt?.label:(0,av.sprintf)((0,av.__)("Empty %s; start writing to edit its value"),ze?.args?.key||yt?.label);return{disableBoundBlock:gr,bindingsPlaceholder:Et?.placeholder||be,bindingsLabel:Ft}},[W,v,G,o,F,J]),ne=!!J?.["pattern/overrides"],q=W?.__default?.source==="core/pattern-overrides",he=T||ee||ne&&!q,{getSelectionStart:me,getSelectionEnd:xe,getBlockRootClientId:De}=(0,sf.useSelect)(x),{selectionChange:lt}=(0,sf.useDispatch)(x),Dt=Jb({allowedFormats:f,disableFormats:C}),so=!Dt||Dt.length>0,or=(0,fr.useCallback)((Fe,lo)=>{let tt={},ze=Fe===void 0&&lo===void 0,yt={clientId:F,[v?"attributeKey":ple]:v||I};if(typeof Fe=="number"||ze){if(lo===void 0&&De(F)!==De(xe().clientId))return;tt.start={...yt,offset:Fe}}if(typeof lo=="number"||ze){if(Fe===void 0&&De(F)!==De(me().clientId))return;tt.end={...yt,offset:lo}}lt(tt)},[F,De,xe,me,v,I,lt]),{value:Je,getValue:hr,onChange:Zt,ref:ao,formatTypes:Ze}=xOe({value:o,onChange:r,selectionStart:re,selectionEnd:Q,onSelectionChange:or,placeholder:K||d,__unstableIsSelected:$,__unstableDisableFormats:C,preserveWhiteSpace:y,__unstableDependencies:[t],allowedFormats:Dt,withoutInteractiveFormatting:m,__unstableFormatTypeHandlerContext:(0,fr.useMemo)(()=>({richTextIdentifier:v,blockClientId:F}),[v,F])}),Vt=w7({onReplace:u,completers:c,record:Je,onChange:Zt});Oae({html:o,value:Je});let et=(0,fr.useRef)(new Set),Ue=(0,fr.useRef)(new Set);function Ho(){R.current?.focus()}let Yn=t;return(0,ki.jsxs)(ki.Fragment,{children:[$&&(0,ki.jsx)(nv.Provider,{value:et,children:(0,ki.jsx)(sv.Provider,{value:Ue,children:(0,ki.jsxs)(ble.Popover.__unstableSlotNameProvider,{value:"__unstable-block-tools-after",children:[e&&e({value:Je,onChange:Zt,onFocus:Ho}),(0,ki.jsx)(r2,{value:Je,onChange:Zt,onFocus:Ho,formatTypes:Ze,forwardedRef:R})]})})}),$&&so&&(0,ki.jsx)(Pae,{inline:s,editableContentElement:V}),(0,ki.jsx)(Yn,{role:"textbox","aria-multiline":!B,"aria-readonly":he,...E,draggable:void 0,"aria-label":te||E["aria-label"]||d,...Vt,ref:(0,a2.useMergeRefs)([ao,L,Vt.ref,E.ref,e2({registry:le,getValue:hr,onChange:Zt,__unstableAllowPrefixTransformations:P,formatTypes:Ze,onReplace:u,selectionChange:lt,isSelected:$,disableFormats:C,value:Je,tagName:t,onSplit:g,__unstableEmbedURLOnPaste:S,pastePlainText:_,onMerge:p,onRemove:h,disableLineBreaks:B,onSplitAtEnd:b,onSplitAtDoubleLineEnd:k,keyboardShortcuts:et,inputEvents:Ue}),R,j]),contentEditable:!he,suppressContentEditableWarning:!0,className:D("block-editor-rich-text__editable",E.className,"rich-text"),tabIndex:E.tabIndex===0&&!he?null:E.tabIndex,"data-wp-block-attribute-key":v})]})}var VS=dle((0,fr.forwardRef)(i2));VS.Content=DS;VS.isEmpty=e=>!e||e.length===0;var vz=(0,fr.forwardRef)((e,t)=>{if(Pe()[$0]){let{children:n,tagName:i="div",value:s,onChange:a,isSelected:c,multiline:u,inlineToolbar:d,wrapperClassName:f,autocompleters:m,onReplace:h,placeholder:p,allowedFormats:g,withoutInteractiveFormatting:b,onRemove:k,onMerge:v,onSplit:y,__unstableOnSplitAtEnd:_,__unstableOnSplitAtDoubleLineEnd:S,identifier:C,preserveWhiteSpace:B,__unstablePastePlainText:P,__unstableEmbedURLOnPaste:T,__unstableDisableFormats:E,disableLineBreaks:L,__unstableAllowPrefixTransformations:I,readOnly:R,...V}=yle(e);return(0,ki.jsx)(i,{ref:t,...V,dangerouslySetInnerHTML:{__html:dz(s,u)||"<br>"}})}return(0,ki.jsx)(VS,{ref:t,...e,readOnly:!1})});vz.Content=DS;vz.isEmpty=e=>!e||e.length===0;var tv=vz;var kz=l(w(),1),Sle=(0,_le.forwardRef)((e,t)=>(0,kz.jsx)(tv,{ref:t,...e,__unstableDisableFormats:!0}));Sle.Content=function({value:t="",tagName:o="div",...r}){return(0,kz.jsx)(o,{...r,children:t})};var xle=Sle;var yz=l(w(),1),wOe=(0,Cle.forwardRef)(({__experimentalVersion:e,...t},o)=>{if(e===2)return(0,yz.jsx)(xle,{ref:o,...t});let{className:r,onChange:n,...i}=t;return(0,yz.jsx)(wle.default,{ref:o,className:D("block-editor-plain-text",r),onChange:s=>n(s.target.value),...i})}),Ble=wOe;var il=l(N(),1),Tle=l(O(),1),Ile=l(A(),1);var Ele=l(X(),1);var l2=l(N(),1),af=l(w(),1);function c2({property:e,viewport:t,desc:o}){let r=(0,Ele.useInstanceId)(c2),n=o||(0,l2.sprintf)((0,l2._x)("Controls the %1$s property for %2$s viewports.","Text labelling a interface as controlling a given layout property (eg: margin) for a given screen size."),e,t.label);return(0,af.jsxs)(af.Fragment,{children:[(0,af.jsx)("span",{"aria-describedby":`rbc-desc-${r}`,children:t.label}),(0,af.jsx)(Ge,{id:`rbc-desc-${r}`,render:(0,af.jsx)("span",{}),children:n})]})}var sl=l(w(),1);function COe(e){let{title:t,property:o,toggleLabel:r,onIsResponsiveChange:n,renderDefaultControl:i,renderResponsiveControls:s,isResponsive:a=!1,defaultLabel:c={id:"all",label:(0,il._x)("All","screen sizes")},viewports:u=[{id:"small",label:(0,il.__)("Small screens")},{id:"medium",label:(0,il.__)("Medium screens")},{id:"large",label:(0,il.__)("Large screens")}]}=e;if(!t||!o||!i)return null;let d=r||(0,il.sprintf)((0,il.__)("Use the same %s on all screen sizes."),o),f=(0,il.__)("Choose whether to use the same value for all screen sizes or a unique value for each screen size."),m=i((0,sl.jsx)(c2,{property:o,viewport:c}),c),h=()=>u.map(p=>(0,sl.jsx)(Tle.Fragment,{children:i((0,sl.jsx)(c2,{property:o,viewport:p}),p)},p.id));return(0,sl.jsxs)("fieldset",{className:"block-editor-responsive-block-control",children:[(0,sl.jsx)("legend",{className:"block-editor-responsive-block-control__title",children:t}),(0,sl.jsxs)("div",{className:"block-editor-responsive-block-control__inner",children:[(0,sl.jsx)(Ile.ToggleControl,{className:"block-editor-responsive-block-control__toggle",label:d,checked:!a,onChange:n,help:f}),(0,sl.jsxs)("div",{className:D("block-editor-responsive-block-control__group",{"is-responsive":a}),children:[!a&&m,a&&(s?s(u):h())]})]})]})}var Ple=COe;var u2=l(A(),1);var Rle=l(w(),1);function Ole({units:e,...t}){let[o]=pe("spacing.units"),r=(0,u2.__experimentalUseCustomUnits)({availableUnits:o||["%","px","em","rem","vw"],units:e});return(0,Rle.jsx)(u2.__experimentalUnitControl,{units:r,...t})}var FS=l(N(),1),Ale=l(O(),1),lv=l(A(),1);var al=l(w(),1);function BOe({url:e,onChange:t}){let[o,r]=(0,Ale.useReducer)(i=>!i,!1),n=i=>{i.preventDefault(),r()};return(0,al.jsxs)("div",{className:"block-editor-url-input__button",children:[(0,al.jsx)(lv.Button,{size:"compact",icon:yn,label:e?(0,FS.__)("Edit link"):(0,FS.__)("Insert link"),onClick:r,className:"components-toolbar__control",isPressed:!!e}),o&&(0,al.jsx)("form",{className:"block-editor-url-input__button-modal",onSubmit:n,children:(0,al.jsxs)("div",{className:"block-editor-url-input__button-modal-line",children:[(0,al.jsx)(lv.Button,{__next40pxDefaultSize:!0,className:"block-editor-url-input__back",icon:_k,label:(0,FS.__)("Close"),onClick:r}),(0,al.jsx)(Xd,{value:e||"",onChange:t,suffix:(0,al.jsx)(lv.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,al.jsx)(lv.Button,{size:"small",icon:Tl,label:(0,FS.__)("Submit"),type:"submit"})})})]})})]})}var Lle=BOe;var Dn=l(N(),1),ms=l(O(),1),Fle=l(Ve(),1),Zo=l(A(),1);var zle=l(qn(),1);var wt=l(w(),1),_z="none",Nle="custom",Mle="media",Dle="attachment",Vle=["noopener"],jle=({linkDestination:e,onChangeUrl:t,url:o,mediaType:r="image",mediaUrl:n,mediaLink:i,linkTarget:s,linkClass:a,rel:c,showLightboxSetting:u,lightboxEnabled:d,onSetLightbox:f,resetLightbox:m})=>{let[h,p]=(0,ms.useState)(!1),[g,b]=(0,ms.useState)(null),k=()=>{p(!0)},[v,y]=(0,ms.useState)(!1),[_,S]=(0,ms.useState)(null),C=(0,ms.useRef)(null),B=(0,ms.useRef)();(0,ms.useEffect)(()=>{if(!B.current)return;(Fle.focus.focusable.find(B.current)[0]||B.current).focus()},[v,o,d]);let P=()=>{(e===Mle||e===Dle)&&S(""),y(!0)},T=()=>{y(!1)},E=()=>{S(null),T(),p(!1)},L=$=>{let ee=$?"_blank":void 0,K;if(ee){let te=(c??"").split(" ");Vle.forEach(ne=>{te.includes(ne)||te.push(ne)}),K=te.join(" ")}else{let te=(c??"").split(" ").filter(ne=>Vle.includes(ne)===!1);K=te.length?te.join(" "):void 0}return{linkTarget:ee,rel:K}},I=()=>$=>{let ee=C.current;ee&&ee.contains($.target)||(p(!1),S(null),T())},R=()=>$=>{if(_){let ee=j().find(K=>K.url===_)?.linkDestination||Nle;t({href:(0,zle.prependHTTPS)(_),linkDestination:ee,lightbox:{enabled:!1}})}T(),S(null),$.preventDefault()},V=()=>{t({linkDestination:_z,href:""})},j=()=>{let $=[{linkDestination:Mle,title:(0,Dn.__)("Link to image file"),url:r==="image"?n:void 0,icon:Ik}];return r==="image"&&i&&$.push({linkDestination:Dle,title:(0,Dn.__)("Link to attachment page"),url:r==="image"?i:void 0,icon:rm}),$},H=$=>{let ee=j(),K;$?K=(ee.find(te=>te.url===$)||{linkDestination:Nle}).linkDestination:K=_z,t({linkDestination:K,href:$})},F=$=>{let ee=L($);t(ee)},U=$=>{t({rel:$})},G=$=>{t({linkClass:$})},W=(0,wt.jsxs)(Zo.__experimentalVStack,{spacing:"3",children:[(0,wt.jsx)(Zo.ToggleControl,{label:(0,Dn.__)("Open in new tab"),onChange:F,checked:s==="_blank"}),(0,wt.jsx)(Zo.TextControl,{__next40pxDefaultSize:!0,label:(0,Dn.__)("Link relation"),value:c??"",onChange:U,help:(0,ms.createInterpolateElement)((0,Dn.__)("The <a>Link Relation</a> attribute defines the relationship between a linked resource and the current document."),{a:(0,wt.jsx)(Zo.ExternalLink,{href:"https://developer.mozilla.org/docs/Web/HTML/Attributes/rel"})})}),(0,wt.jsx)(Zo.TextControl,{__next40pxDefaultSize:!0,label:(0,Dn.__)("Link CSS class"),value:a||"",onChange:G})]}),J=_!==null?_:o,le=!d||d&&!u,oe=!J&&le,re=(j().find($=>$.linkDestination===e)||{}).title,Q=()=>{if(d&&u&&!o&&!v)return(0,wt.jsxs)("div",{className:"block-editor-url-popover__expand-on-click",children:[(0,wt.jsx)(Ee,{icon:Kx}),(0,wt.jsxs)("div",{className:"text",children:[(0,wt.jsx)("p",{children:(0,Dn.__)("Enlarge on click")}),(0,wt.jsx)("p",{className:"description",children:(0,Dn.__)("Scales the image with a lightbox effect")})]}),(0,wt.jsx)(Zo.Button,{icon:Ai,label:(0,Dn.__)("Disable enlarge on click"),onClick:()=>{f?.(!1)},size:"compact"})]});if(!o||v)return(0,wt.jsx)(of.LinkEditor,{className:"block-editor-format-toolbar__link-container-content",value:J,onChangeInputValue:S,onSubmit:R(),autocompleteRef:C});if(o&&!v)return(0,wt.jsxs)(wt.Fragment,{children:[(0,wt.jsx)(of.LinkViewer,{className:"block-editor-format-toolbar__link-container-content",url:o,onEditLinkClick:P,urlLabel:re}),(0,wt.jsx)(Zo.Button,{icon:Ai,label:(0,Dn.__)("Remove link"),onClick:()=>{V(),m?.()},size:"compact"})]})};return(0,wt.jsxs)(wt.Fragment,{children:[(0,wt.jsx)(Zo.ToolbarButton,{icon:yn,className:"components-toolbar__control",label:(0,Dn.__)("Link"),"aria-expanded":h,onClick:k,ref:b,isActive:!!o||d&&u}),h&&(0,wt.jsx)(of,{ref:B,anchor:g,onFocusOutside:I(),onClose:E,renderSettings:le?()=>W:null,additionalControls:oe&&(0,wt.jsxs)(Zo.NavigableMenu,{children:[j().map($=>(0,wt.jsx)(Zo.MenuItem,{icon:$.icon,iconPosition:"left",onClick:()=>{S(null),H($.url),T()},children:$.title},$.linkDestination)),u&&(0,wt.jsx)(Zo.MenuItem,{className:"block-editor-url-popover__expand-on-click",icon:Kx,info:(0,Dn.__)("Scale the image with a lightbox effect."),iconPosition:"left",onClick:()=>{S(null),t({linkDestination:_z,href:""}),f?.(!0),T()},children:(0,Dn.__)("Enlarge on click")},"expand-on-click")]}),offset:13,children:Q()})]})};var uv=l(A(),1),tce=l(O(),1),m2=l(N(),1);var Ule=l(O(),1),xz=l(N(),1);var Sz=[],EOe=new Intl.Collator("und",{numeric:!0}).compare;function d2(){let[e,t,o,r]=pe("spacing.spacingSizes.custom","spacing.spacingSizes.theme","spacing.spacingSizes.default","spacing.defaultSpacingSizes"),n=e??Sz,i=t??Sz,s=o&&r!==!1?o:Sz;return(0,Ule.useMemo)(()=>{let a=[{name:(0,xz.__)("None"),slug:"0",size:0},...n,...i,...s];return a.every(({slug:c})=>/^[0-9]/.test(c))&&a.sort((c,u)=>EOe(c.slug,u.slug)),a.length>B7?[{name:(0,xz.__)("Default"),slug:"default",size:void 0},...a]:a},[n,i,s])}var Hle=l(O(),1),Gle=l(z(),1),f2=l(N(),1),Wle=l(A(),1);var $le=l(w(),1),TOe={px:{max:300,steps:1},"%":{max:100,steps:1},vw:{max:100,steps:1},vh:{max:100,steps:1},em:{max:10,steps:.1},rm:{max:10,steps:.1},svw:{max:100,steps:1},lvw:{max:100,steps:1},dvw:{max:100,steps:1},svh:{max:100,steps:1},lvh:{max:100,steps:1},dvh:{max:100,steps:1},vi:{max:100,steps:1},svi:{max:100,steps:1},lvi:{max:100,steps:1},dvi:{max:100,steps:1},vb:{max:100,steps:1},svb:{max:100,steps:1},lvb:{max:100,steps:1},dvb:{max:100,steps:1},vmin:{max:100,steps:1},svmin:{max:100,steps:1},lvmin:{max:100,steps:1},dvmin:{max:100,steps:1},vmax:{max:100,steps:1},svmax:{max:100,steps:1},lvmax:{max:100,steps:1},dvmax:{max:100,steps:1}};function cv({icon:e,isMixed:t=!1,minimumCustomValue:o,onChange:r,onMouseOut:n,onMouseOver:i,showSideInLabel:s=!0,side:a,spacingSizes:c,type:u,value:d,...f}){let m=(0,Gle.useSelect)(_=>_(x).getSettings()?.disableCustomSpacingSizes),[h]=pe("spacing.units"),p=(0,Wle.__experimentalUseCustomUnits)({availableUnits:h||["px","em","rem"]}),g=(0,Hle.useMemo)(()=>c?.map(_=>({name:_.name,slug:_.slug,size:_.size}))||[],[c]),b=(Du.includes(a)||["vertical","horizontal"].includes(a))&&s?Ta[a]:"",k=s?u?.toLowerCase():u,v=(0,f2.sprintf)((0,f2._x)("%1$s %2$s","spacing"),b,k).trim(),y=p[0]?.value||"px";return(0,$le.jsx)(hp,{allowNegativeOnDrag:o<0,ariaLabel:v,className:"spacing-sizes-control",customValueSettings:TOe,disableCustomValues:m,icon:e,isMixed:t,minimumCustomValue:o,onChange:r,onMouseOut:n,onMouseOver:i,presets:g,presetType:"spacing",selectedUnit:y,units:p,value:d,...f})}var zS=l(w(),1),Kle=["vertical","horizontal"];function Yle({minimumCustomValue:e,onChange:t,onMouseOut:o,onMouseOver:r,sides:n,spacingSizes:i,type:s,values:a}){let c=d=>f=>{if(!t)return;let m={...Object.keys(a).reduce((h,p)=>(h[p]=Lh(a[p],i),h),{})};d==="vertical"&&(m.top=f,m.bottom=f),d==="horizontal"&&(m.left=f,m.right=f),t(m)},u=n?.length?Kle.filter(d=>y5(n,d)):Kle;return(0,zS.jsx)(zS.Fragment,{children:u.map(d=>{let f=d==="vertical"?a.top:a.left;return(0,zS.jsx)(cv,{icon:DC[d],label:Ta[d],minimumCustomValue:e,onChange:c(d),onMouseOut:o,onMouseOver:r,side:d,spacingSizes:i,type:s,value:f,withInputField:!1},`spacing-sizes-control-${d}`)})})}var jS=l(w(),1);function qle({minimumCustomValue:e,onChange:t,onMouseOut:o,onMouseOver:r,sides:n,spacingSizes:i,type:s,values:a}){let c=n?.length?Du.filter(d=>n.includes(d)):Du,u=d=>f=>{let m={...Object.keys(a).reduce((h,p)=>(h[p]=Lh(a[p],i),h),{})};m[d]=f,t(m)};return(0,jS.jsx)(jS.Fragment,{children:c.map(d=>(0,jS.jsx)(cv,{icon:DC[d],label:Ta[d],minimumCustomValue:e,onChange:u(d),onMouseOut:o,onMouseOver:r,side:d,spacingSizes:i,type:s,value:a[d],withInputField:!1},`spacing-sizes-control-${d}`))})}var Zle=l(w(),1);function Xle({minimumCustomValue:e,onChange:t,onMouseOut:o,onMouseOver:r,showSideInLabel:n,side:i,spacingSizes:s,type:a,values:c}){let u=d=>f=>{let m={...Object.keys(c).reduce((h,p)=>(h[p]=Lh(c[p],s),h),{})};m[d]=f,t(m)};return(0,Zle.jsx)(cv,{label:Ta[i],minimumCustomValue:e,onChange:u(i),onMouseOut:o,onMouseOver:r,showSideInLabel:n,side:i,spacingSizes:s,type:a,value:c[i],withInputField:!1})}var Qle=l(A(),1);var wz=l(N(),1),Jle=l(w(),1);function ece({isLinked:e,...t}){let o=e?(0,wz.__)("Unlink sides"):(0,wz.__)("Link sides");return(0,Jle.jsx)(Qle.Button,{...t,size:"small",icon:e?yn:Ai,iconSize:24,label:o})}var ll=l(w(),1);function dv({inputProps:e,label:t,minimumCustomValue:o=0,onChange:r,onMouseOut:n,onMouseOver:i,showSideInLabel:s=!0,sides:a=Du,useSelect:c,values:u}){let d=d2(),f=u||E7,m=a?.length===1,h=a?.includes("horizontal")&&a?.includes("vertical")&&a?.length===2,[p,g]=(0,tce.useState)(I7(f,a)),b=()=>{g(p===Ml.axial?Ml.custom:Ml.axial)},v={...e,minimumCustomValue:o,onChange:C=>{let B={...u,...C};r(B)},onMouseOut:n,onMouseOver:i,sides:a,spacingSizes:d,type:t,useSelect:c,values:f},y=()=>p===Ml.axial?(0,ll.jsx)(Yle,{...v}):p===Ml.custom?(0,ll.jsx)(qle,{...v}):(0,ll.jsx)(Xle,{side:p,...v,showSideInLabel:s}),_=Du.includes(p)&&s?Ta[p]:"",S=(0,m2.sprintf)((0,m2._x)("%1$s %2$s","spacing"),t,_).trim();return(0,ll.jsxs)("fieldset",{className:"spacing-sizes-control",children:[(0,ll.jsxs)(uv.__experimentalHStack,{className:"spacing-sizes-control__header",children:[(0,ll.jsx)(uv.BaseControl.VisualLabel,{as:"legend",className:"spacing-sizes-control__label",children:S}),!m&&!h&&(0,ll.jsx)(ece,{label:t,onClick:b,isLinked:p===Ml.axial})]}),(0,ll.jsx)(uv.__experimentalVStack,{spacing:.5,children:y()})]})}var oce=l(Re(),1);function rce(){return(0,oce.default)("wp.blockEditor.PreviewOptions",{version:"6.5"}),null}var p2=l(O(),1);function nce(e){let[t,o]=(0,p2.useState)(window.innerWidth);(0,p2.useEffect)(()=>{if(e==="Desktop")return;let i=()=>o(window.innerWidth);return window.addEventListener("resize",i),()=>{window.removeEventListener("resize",i)}},[e]);let r=i=>{let s;switch(i){case"Tablet":s=781;break;case"Mobile":s=479;break;default:return null}return s<t?s:t};return(i=>{let s=i==="Mobile"?"768px":"1024px",a="40px",c="auto";switch(i){case"Tablet":case"Mobile":return{width:r(i),marginTop:a,marginBottom:a,marginLeft:c,marginRight:c,height:s,overflowY:"auto"};default:return{marginLeft:c,marginRight:c}}})(e)}var Pv=l(N(),1),mf=l(Y(),1),Xue=l(A(),1),qz=l(z(),1),Que=l(O(),1);var fv=l(A(),1),h2=l(N(),1),ice=l(z(),1),g2=l(Y(),1);var Rp=l(w(),1);function IOe({block:e,onNavigateToEntityRecord:t,isSyncedPattern:o,isTemplatePartBlock:r}){let n=e?.attributes||{};return(0,Rp.jsx)(fv.__experimentalVStack,{className:"block-editor-block-inspector-edit-contents",expanded:!0,children:(0,Rp.jsx)(fv.Button,{className:"block-editor-block-inspector-edit-contents__button",__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>{if(o)t({postId:n.ref,postType:"wp_block"});else if(r){let{theme:s,slug:a}=n,c=s&&a?`${s}//${a}`:null;c&&t({postId:c,postType:"wp_template_part"})}},children:(0,h2.__)("Edit original")})})}function POe({clientId:e,editedContentOnlySection:t,editContentOnlySection:o,stopEditingContentOnlySection:r}){return(0,Rp.jsx)(fv.__experimentalVStack,{className:"block-editor-block-inspector-edit-contents",expanded:!0,children:(0,Rp.jsx)(fv.Button,{className:"block-editor-block-inspector-edit-contents__button",__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>{t?r():o(e)},children:t?(0,h2.__)("Exit pattern"):(0,h2.__)("Edit pattern")})})}function sce({clientId:e}){let{isWithinSection:t,isWithinEditedSection:o,editedContentOnlySection:r,editContentOnlySection:n,stopEditingContentOnlySection:i}=cI(e),{block:s,onNavigateToEntityRecord:a,canEdit:c}=(0,ice.useSelect)(m=>{let{getBlock:h,getSettings:p,canEditBlock:g}=m(x);return{block:h(e),onNavigateToEntityRecord:p().onNavigateToEntityRecord,canEdit:g(e)}},[e]);if(!c||!t&&!o)return null;let u=(0,g2.isReusableBlock)(s),d=(0,g2.isTemplatePart)(s);return(u||d)&&a?(0,Rp.jsx)(IOe,{block:s,onNavigateToEntityRecord:a,isSyncedPattern:u,isTemplatePartBlock:d}):(0,Rp.jsx)(POe,{clientId:e,editedContentOnlySection:r,editContentOnlySection:n,stopEditingContentOnlySection:i})}var ace=l(z(),1),lce=l(N(),1),cce=l(A(),1),uce=l(O(),1);var dce=l(w(),1);function b2(){let e=(0,ace.useSelect)(r=>r(x).getBlockSelectionStart(),[]),t=(0,uce.useRef)();return bm(e,t),e?(0,dce.jsx)(cce.Button,{__next40pxDefaultSize:!0,variant:"secondary",className:"block-editor-skip-to-selected-block",onClick:()=>{t.current?.focus()},children:(0,lce.__)("Skip to the selected block")}):null}var v2=l(N(),1),fce=l(z(),1);var mce=l(A(),1);var US=l(w(),1);function Cz(){let e=(0,fce.useSelect)(t=>t(x).getSelectedBlockCount(),[]);return(0,US.jsxs)(mce.__experimentalHStack,{justify:"flex-start",spacing:2,className:"block-editor-multi-selection-inspector__card",children:[(0,US.jsx)(Ae,{icon:Zf,showColors:!0}),(0,US.jsx)("div",{className:"block-editor-multi-selection-inspector__card-title",children:(0,v2.sprintf)((0,v2._n)("%d Block","%d Blocks",e),e)})]})}var Iv=l(A(),1),ma=l(O(),1),Gue=l(wh(),1),Tv=l(z(),1);var HS=l(N(),1),k2={name:"settings",title:(0,HS.__)("Settings"),value:"settings",icon:nL},y2={name:"styles",title:(0,HS.__)("Styles"),value:"styles",icon:vM},_2={name:"content",title:(0,HS.__)("Content"),value:"content",icon:rm},Nc={name:"list",title:(0,HS.__)("List View"),value:"list-view",icon:Pk};var C2=l(A(),1);var GS=l(A(),1),pce=l(N(),1);var WS=l(w(),1),ROe=({initialOpen:e=!1})=>{let t=(0,GS.__experimentalUseSlotFills)(Sd.slotName),o=(0,GS.__experimentalUseSlotFills)(D_.name),r=!!(t&&t.length),n=!!(o&&o.length);return!r&&!n?null:(0,WS.jsxs)(GS.PanelBody,{className:"block-editor-block-inspector__advanced",title:(0,pce.__)("Advanced"),initialOpen:e,children:[(0,WS.jsx)(fe.Slot,{group:"advanced"}),(0,WS.jsx)(D_.Slot,{})]})},S2=ROe;var mv=l(A(),1),x2=l(z(),1),Bz=l(N(),1);var $S=l(w(),1),OOe=()=>{let{selectedClientIds:e,selectedBlocks:t,hasPositionAttribute:o}=(0,x2.useSelect)(s=>{let{getBlocksByClientId:a,getSelectedBlockClientIds:c}=s(x),u=c(),d=a(u);return{selectedClientIds:u,selectedBlocks:d,hasPositionAttribute:d?.some(({attributes:f})=>!!f?.style?.position?.type)}},[]),{updateBlockAttributes:r}=(0,x2.useDispatch)(x),n=Vo();function i(){if(!e?.length||!t?.length)return;let s=Object.fromEntries(t?.map(({clientId:a,attributes:c})=>[a,{style:Le({...c?.style,position:{...c?.style?.position,type:void 0,top:void 0,right:void 0,bottom:void 0,left:void 0}})}]));r(e,s,!0)}return(0,$S.jsx)(mv.__experimentalToolsPanel,{className:"block-editor-block-inspector__position",label:(0,Bz.__)("Position"),resetAll:i,dropdownMenuProps:n,children:(0,$S.jsx)(mv.__experimentalToolsPanelItem,{isShownByDefault:o,label:(0,Bz.__)("Position"),hasValue:()=>o,onDeselect:i,children:(0,$S.jsx)(fe.Slot,{group:"position"})})})},AOe=()=>{let e=(0,mv.__experimentalUseSlotFills)(es.position.name);return!(e&&e.length)?null:(0,$S.jsx)(OOe,{})},w2=AOe;var cl=l(w(),1),LOe=({showAdvancedControls:e=!1})=>{let t=(0,C2.__experimentalUseSlotFills)(es.default.name),o=(0,C2.__experimentalUseSlotFills)(es.position.name),r=(0,C2.__experimentalUseSlotFills)(es.bindings.name),n=!!t?.length||!!o?.length||!!r?.length;return(0,cl.jsxs)(cl.Fragment,{children:[(0,cl.jsx)(fe.Slot,{}),(0,cl.jsx)(w2,{}),(0,cl.jsx)(fe.Slot,{group:"bindings"}),e&&(0,cl.jsx)("div",{children:(0,cl.jsx)(S2,{initialOpen:!n})})]})},hce=LOe;var Bv=l(N(),1),mR=l(z(),1);var e0=l(Y(),1),Dz=l(A(),1),Cv=l(O(),1),Sue=l(pt(),1),xue=l(z(),1);var Mz={};xa(Mz,{AdvancedPanel:()=>q2,BackgroundPanel:()=>tR,BorderPanel:()=>z2,ColorPanel:()=>G2,DimensionsPanel:()=>M2,FiltersPanel:()=>$2,ImageSettingsPanel:()=>due,StateControl:()=>yue,TypographyPanel:()=>R2,useHasBackgroundPanel:()=>eR,useHasBorderPanel:()=>F2,useHasBorderPanelControls:()=>YS,useHasColorPanel:()=>H2,useHasDimensionsPanel:()=>N2,useHasFiltersPanel:()=>lue,useHasImageSettingsPanel:()=>uue,useHasTypographyPanel:()=>P2,useSettingsForBlockElement:()=>E2});var B2=l(O(),1),gce=l(z(),1),Ez=l(Y(),1),Op=l(N(),1);function E2(e,t,o){let{supportedStyles:r,supports:n}=(0,gce.useSelect)(i=>({supportedStyles:M(i(Ez.store)).getSupportedStyles(t,o),supports:i(Ez.store).getBlockType(t)?.supports}),[t,o]);return(0,B2.useMemo)(()=>{let i={...e};return r.includes("fontSize")||(i.typography={...i.typography,fontSizes:{},customFontSize:!1,defaultFontSizes:!1}),r.includes("fontFamily")||(i.typography={...i.typography,fontFamilies:{}}),i.color={...i.color,text:i.color?.text&&r.includes("color"),background:i.color?.background&&(r.includes("background")||r.includes("backgroundColor")),button:i.color?.button&&r.includes("buttonColor"),heading:i.color?.heading&&r.includes("headingColor"),link:i.color?.link&&r.includes("linkColor"),caption:i.color?.caption&&r.includes("captionColor")},!r.includes("background")&&!r.includes("backgroundGradient")&&(i.color.gradients=[],i.color.customGradient=!1),r.includes("filter")||(i.color.defaultDuotone=!1,i.color.customDuotone=!1),["lineHeight","fontStyle","fontWeight","letterSpacing","textAlign","textTransform","textDecoration","textIndent","writingMode"].forEach(s=>{r.includes(s)||(i.typography={...i.typography,[s]:!1})}),r.includes("textIndent")&&(i.typography={...i.typography,textIndent:i.typography?.textIndent??"subsequent"}),r.includes("columnCount")||(i.typography={...i.typography,textColumns:!1}),["contentSize","wideSize"].forEach(s=>{r.includes(s)||(i.layout={...i.layout,[s]:!1})}),["padding","margin","blockGap"].forEach(s=>{r.includes(s)||(i.spacing={...i.spacing,[s]:!1});let a=Array.isArray(n?.spacing?.[s])?n?.spacing?.[s]:n?.spacing?.[s]?.sides;a?.length&&i.spacing?.[s]&&(i.spacing={...i.spacing,[s]:{...i.spacing?.[s],sides:a}})}),["aspectRatio","height","minHeight","minWidth","width"].forEach(s=>{r.includes(s)||(i.dimensions={...i.dimensions,[s]:!1})}),["radius","color","style","width"].forEach(s=>{r.includes("border"+s.charAt(0).toUpperCase()+s.slice(1))||(i.border={...i.border,[s]:!1})}),[["backgroundImage","backgroundImage"],["backgroundSize","backgroundSize"],["backgroundGradient","gradient"]].forEach(([s,a])=>{r.includes(s)||(i.background={...i.background,[a]:!1})}),i.shadow=r.includes("shadow")?i.shadow:!1,i},[e,r,n])}function ul(e){let t=e?.color?.palette?.custom,o=e?.color?.palette?.theme,r=e?.color?.palette?.default,n=e?.color?.defaultPalette;return(0,B2.useMemo)(()=>{let i=[];return o&&o.length&&i.push({name:(0,Op._x)("Theme","Indicates this palette comes from the theme."),colors:o}),n&&r&&r.length&&i.push({name:(0,Op._x)("Default","Indicates this palette comes from WordPress."),colors:r}),t&&t.length&&i.push({name:(0,Op._x)("Custom","Indicates this palette is created by the user."),colors:t}),i},[t,o,r,n])}function Ap(e){let t=e?.color?.gradients?.custom,o=e?.color?.gradients?.theme,r=e?.color?.gradients?.default,n=e?.color?.defaultGradients;return(0,B2.useMemo)(()=>{let i=[];return o&&o.length&&i.push({name:(0,Op._x)("Theme","Indicates this palette comes from the theme."),gradients:o}),n&&r&&r.length&&i.push({name:(0,Op._x)("Default","Indicates this palette comes from WordPress."),gradients:r}),t&&t.length&&i.push({name:(0,Op._x)("Custom","Indicates this palette is created by the user."),gradients:t}),i},[t,o,r,n])}var po=l(A(),1),Uo=l(N(),1),hv=l(O(),1);var pv=l(N(),1);var bce=l(O(),1),T2=l(A(),1),Tz=l(w(),1),NOe=[{label:(0,pv.__)("Align text left"),value:"left",icon:gu},{label:(0,pv.__)("Align text center"),value:"center",icon:$f},{label:(0,pv.__)("Align text right"),value:"right",icon:bu},{label:(0,pv.__)("Justify text"),value:"justify",icon:LA}],MOe=["left","center","right"];function I2({className:e,value:t,onChange:o,options:r=MOe}){let n=(0,bce.useMemo)(()=>NOe.filter(i=>r.includes(i.value)),[r]);return n.length?(0,Tz.jsx)(T2.__experimentalToggleGroupControl,{isDeselectable:!0,__next40pxDefaultSize:!0,label:(0,pv.__)("Text alignment"),className:D("block-editor-text-alignment-control",e),value:t,onChange:i=>{o(i===t?void 0:i)},children:n.map(i=>(0,Tz.jsx)(T2.__experimentalToggleGroupControlOptionIcon,{value:i.value,icon:i.icon,label:i.label},i.value))}):null}var jo=l(A(),1),KS=l(N(),1);var ps=l(w(),1);function vce({__next40pxDefaultSize:e=!1,value:t,onChange:o,__unstableInputWidth:r="60px",withSlider:n=!1,hasBottomMargin:i=!1,help:s,...a}){let[c]=pe("spacing.units"),u=(0,jo.__experimentalUseCustomUnits)({availableUnits:c||["px","em","rem","ch","%","vw","vh"],defaultValues:{px:16,em:2,rem:2,ch:2}}),[d,f]=(0,jo.__experimentalParseQuantityAndUnitFromRawValue)(t,u),m=!!f&&["em","rem","%","ch","vw","vh"].includes(f);return n?(0,ps.jsxs)(jo.__experimentalView,{style:i?{marginBottom:12}:void 0,children:[(0,ps.jsx)(jo.BaseControl.VisualLabel,{children:(0,KS.__)("Line indent")}),(0,ps.jsxs)(jo.Flex,{children:[(0,ps.jsx)(jo.FlexItem,{isBlock:!0,children:(0,ps.jsx)(jo.__experimentalUnitControl,{__next40pxDefaultSize:e,__shouldNotWarnDeprecated36pxSize:!0,label:(0,KS.__)("Line indent"),labelPosition:"top",hideLabelFromVision:!0,value:t,onChange:o,size:a.size,units:u,__unstableInputWidth:r,min:0})}),n&&(0,ps.jsx)(jo.FlexItem,{isBlock:!0,children:(0,ps.jsx)(jo.__experimentalSpacer,{marginX:2,marginBottom:0,children:(0,ps.jsx)(jo.RangeControl,{__next40pxDefaultSize:e,__shouldNotWarnDeprecated36pxSize:!0,label:(0,KS.__)("Line indent"),hideLabelFromVision:!0,value:d,withInputField:!1,onChange:h=>{o?.(h===void 0?void 0:h+(f??"px"))},min:0,max:m?10:100,step:m?.1:1,initialPosition:0})})})]}),s&&(0,ps.jsx)("p",{className:"components-base-control__help",children:s})]}):(0,ps.jsx)(jo.__experimentalUnitControl,{__next40pxDefaultSize:e,__shouldNotWarnDeprecated36pxSize:!0,...a,label:(0,KS.__)("Line indent"),value:t,__unstableInputWidth:r,units:u,onChange:o,help:s})}function yce(e,t){let o=e?.typography?.fontFamilies,r=["default","theme","custom"].flatMap(i=>o?.[i]??[]),n=r.find(i=>i.fontFamily===t)?.fontFace??[];return{fontFamilies:r,fontFamilyFaces:n}}function kce(e,t){return t=typeof t=="number"?t.toString():t,!t||typeof t!="string"?"":!e||e.length===0?t:e?.reduce((r,{value:n})=>{let i=Math.abs(parseInt(n)-parseInt(t)),s=Math.abs(parseInt(r)-parseInt(t));return i<s?n:r},e[0]?.value)}function DOe(e,t){return typeof t!="string"||!t||!["normal","italic","oblique"].includes(t)?"":!e||e.length===0||e.find(r=>r.value===t)?t:t==="oblique"&&!e.find(r=>r.value==="oblique")?"italic":""}function _ce(e,t,o){let r=t,n=o,{fontStyles:i,fontWeights:s,combinedStyleAndWeightOptions:a}=Nb(e),c=i?.some(({value:d})=>d===t),u=s?.some(({value:d})=>d?.toString()===o?.toString());return c||(r=t?DOe(i,t):a?.find(d=>d.style.fontWeight===kce(s,o))?.style?.fontStyle),u||(n=o?kce(s,o):a?.find(d=>d.style.fontStyle===(r||t))?.style?.fontWeight),{nearestFontStyle:r,nearestFontWeight:n}}var it=l(w(),1),VOe=1,FOe=6;function P2(e){let t=xce(e),o=wce(e),r=Cce(e),n=Bce(e),i=Tce(e),s=Ece(e),a=Ice(e),c=Oce(e),u=Pce(e),d=Rce(e),f=Sce(e);return t||o||r||n||i||s||f||a||c||u||d}function Sce(e){return e?.typography?.defaultFontSizes!==!1&&e?.typography?.fontSizes?.default?.length||e?.typography?.fontSizes?.theme?.length||e?.typography?.fontSizes?.custom?.length||e?.typography?.customFontSize}function xce(e){return["default","theme","custom"].some(t=>e?.typography?.fontFamilies?.[t]?.length)}function wce(e){return e?.typography?.lineHeight}function Cce(e){return e?.typography?.fontStyle||e?.typography?.fontWeight}function zOe(e){return e?.typography?.fontStyle?e?.typography?.fontWeight?(0,Uo.__)("Appearance"):(0,Uo.__)("Font style"):(0,Uo.__)("Font weight")}function Bce(e){return e?.typography?.letterSpacing}function Ece(e){return e?.typography?.textTransform}function Tce(e){return e?.typography?.textAlign}function Ice(e){return e?.typography?.textDecoration}function Pce(e){return e?.typography?.writingMode}function Rce(e){return e?.typography?.textColumns}function Oce(e){return e?.typography?.textIndent}function jOe(e){let t=e?.typography?.fontSizes,o=!!e?.typography?.defaultFontSizes;return[...t?.custom??[],...t?.theme??[],...o?t?.default??[]:[]]}function UOe({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n}){let i=Vo(),s=()=>{let a=e(o);t(a)};return(0,it.jsx)(po.__experimentalToolsPanel,{label:(0,Uo.__)("Typography"),resetAll:s,panelId:r,dropdownMenuProps:i,children:n})}var HOe={fontFamily:!0,fontSize:!0,fontAppearance:!0,lineHeight:!0,letterSpacing:!0,textAlign:!0,textTransform:!0,textDecoration:!0,textIndent:!0,writingMode:!0,textColumns:!0};function R2({as:e=UOe,value:t,onChange:o,inheritedValue:r=t,settings:n,panelId:i,defaultControls:s=HOe,isGlobalStyles:a=!1}){let c=be=>Vr({settings:n},"",be),u=xce(n),d=c(r?.typography?.fontFamily),{fontFamilies:f,fontFamilyFaces:m}=(0,hv.useMemo)(()=>yce(n,d),[n,d]),h=be=>{let Ft=f?.find(({fontFamily:vn})=>vn===be)?.slug,_t=de(t,["typography","fontFamily"],Ft?`var:preset|font-family|${Ft}`:be||void 0),_a=f?.find(({fontFamily:vn})=>vn===be)?.fontFace??[],{fontStyles:$r,fontWeights:ge}=Nb(_a),rr=$r?.some(({value:vn})=>vn===I),Sa=ge?.some(({value:vn})=>vn?.toString()===R?.toString());if(!rr||!Sa){let{nearestFontStyle:vn,nearestFontWeight:oh}=_ce(_a,I,R);vn||oh?_t={..._t,typography:{..._t?.typography,fontStyle:vn||void 0,fontWeight:oh||void 0}}:(I||R)&&(_t={..._t,typography:{..._t?.typography,fontStyle:void 0,fontWeight:void 0}})}o(_t)},p=()=>!!t?.typography?.fontFamily,g=()=>h(void 0),b=Sce(n),k=!n?.typography?.customFontSize,v=jOe(n),y=c(r?.typography?.fontSize),_=(()=>{let be=r?.typography?.fontSize;if(!be||typeof be!="string")return;if(be.startsWith("var:preset|font-size|"))return be.replace("var:preset|font-size|","");let Ft=be.match(/^var\(--wp--preset--font-size--([^)]+)\)$/);if(Ft)return Ft[1]})(),S=(be,Ft)=>{let _t=Ft?.slug?`var:preset|font-size|${Ft?.slug}`:be;o(de(t,["typography","fontSize"],_t||void 0))},C=()=>!!t?.typography?.fontSize,B=()=>S(void 0),P=Cce(n),T=zOe(n),E=n?.typography?.fontStyle,L=n?.typography?.fontWeight,I=c(r?.typography?.fontStyle),R=c(r?.typography?.fontWeight),V=(0,hv.useCallback)(({fontStyle:be,fontWeight:Ft})=>{(be!==I||Ft!==R)&&o({...t,typography:{...t?.typography,fontStyle:be||void 0,fontWeight:Ft||void 0}})},[I,R,o,t]),j=()=>!!t?.typography?.fontStyle||!!t?.typography?.fontWeight,H=(0,hv.useCallback)(()=>{V({})},[V]),F=wce(n),U=c(r?.typography?.lineHeight),G=be=>{o(de(t,["typography","lineHeight"],be||void 0))},W=()=>t?.typography?.lineHeight!==void 0,J=()=>G(void 0),le=Bce(n),oe=c(r?.typography?.letterSpacing),re=be=>{o(de(t,["typography","letterSpacing"],be||void 0))},Q=()=>!!t?.typography?.letterSpacing,$=()=>re(void 0),ee=Oce(n),K=c(r?.typography?.textIndent),ne=(n?.typography?.textIndent??"subsequent")==="all",q=be=>{o(de(t,["typography","textIndent"],be||void 0))},se=be=>{o({...t,settings:{typography:{textIndent:be?"all":"subsequent"}}})},he=()=>!!t?.typography?.textIndent,me=()=>{o(de(t,["typography","textIndent"],void 0))},xe=ne?(0,Uo.__)("Indents the first line of all paragraphs."):(0,Uo.__)("Indents the first line of each paragraph after the first one."),De=Rce(n),lt=c(r?.typography?.textColumns),Dt=be=>{o(de(t,["typography","textColumns"],be||void 0))},so=()=>!!t?.typography?.textColumns,or=()=>Dt(void 0),Je=Ece(n),hr=c(r?.typography?.textTransform),Zt=be=>{o(de(t,["typography","textTransform"],be||void 0))},ao=()=>!!t?.typography?.textTransform,Ze=()=>Zt(void 0),Vt=Ice(n),et=c(r?.typography?.textDecoration),Ue=be=>{o(de(t,["typography","textDecoration"],be||void 0))},Ho=()=>!!t?.typography?.textDecoration,Yn=()=>Ue(void 0),Fe=Pce(n),lo=c(r?.typography?.writingMode),tt=be=>{o(de(t,["typography","writingMode"],be||void 0))},ze=()=>!!t?.typography?.writingMode,yt=()=>tt(void 0),_o=Tce(n),gr=c(r?.typography?.textAlign),ve=be=>{o(de(t,["typography","textAlign"],be||void 0))},Et=()=>!!t?.typography?.textAlign,Mo=()=>ve(void 0),mt=(0,hv.useCallback)(be=>({...be,typography:{}}),[]);return(0,it.jsxs)(e,{resetAllFilter:mt,value:t,onChange:o,panelId:i,children:[u&&(0,it.jsx)(po.__experimentalToolsPanelItem,{label:(0,Uo.__)("Font"),hasValue:p,onDeselect:g,isShownByDefault:s.fontFamily,panelId:i,children:(0,it.jsx)(rP,{fontFamilies:f,value:d,onChange:h,size:"__unstable-large"})}),b&&(0,it.jsx)(po.__experimentalToolsPanelItem,{label:(0,Uo.__)("Size"),hasValue:C,onDeselect:B,isShownByDefault:s.fontSize,panelId:i,children:(0,it.jsx)(po.FontSizePicker,{value:_||y,valueMode:_?"slug":"literal",onChange:S,fontSizes:v,disableCustomFontSizes:k,withReset:!1,withSlider:!0,size:"__unstable-large"})}),P&&(0,it.jsx)(po.__experimentalToolsPanelItem,{label:T,hasValue:j,onDeselect:H,isShownByDefault:s.fontAppearance,panelId:i,children:(0,it.jsx)(oP,{value:{fontStyle:I,fontWeight:R},onChange:V,hasFontStyles:E,hasFontWeights:L,fontFamilyFaces:m,size:"__unstable-large"})}),F&&(0,it.jsx)(po.__experimentalToolsPanelItem,{className:"single-column",label:(0,Uo.__)("Line height"),hasValue:W,onDeselect:J,isShownByDefault:s.lineHeight,panelId:i,children:(0,it.jsx)(UP,{__unstableInputWidth:"auto",value:U,onChange:G,size:"__unstable-large"})}),le&&(0,it.jsx)(po.__experimentalToolsPanelItem,{className:"single-column",label:(0,Uo.__)("Letter spacing"),hasValue:Q,onDeselect:$,isShownByDefault:s.letterSpacing,panelId:i,children:(0,it.jsx)(iP,{value:oe,onChange:re,size:"__unstable-large",__unstableInputWidth:"auto"})}),ee&&(0,it.jsxs)(po.__experimentalToolsPanelItem,{label:(0,Uo.__)("Line indent"),hasValue:he,onDeselect:me,isShownByDefault:s.textIndent,panelId:i,children:[(0,it.jsx)(vce,{value:K,onChange:q,size:"__unstable-large",__unstableInputWidth:"auto",withSlider:!0,hasBottomMargin:a}),a&&(0,it.jsx)(po.ToggleControl,{label:(0,Uo.__)("Indent all paragraphs"),checked:ne,onChange:se,help:xe})]}),De&&(0,it.jsx)(po.__experimentalToolsPanelItem,{className:"single-column",label:(0,Uo.__)("Columns"),hasValue:so,onDeselect:or,isShownByDefault:s.textColumns,panelId:i,children:(0,it.jsx)(po.__experimentalNumberControl,{label:(0,Uo.__)("Columns"),max:FOe,min:VOe,onChange:Dt,size:"__unstable-large",spinControls:"custom",value:lt,initialPosition:1})}),Vt&&(0,it.jsx)(po.__experimentalToolsPanelItem,{className:"single-column",label:(0,Uo.__)("Decoration"),hasValue:Ho,onDeselect:Yn,isShownByDefault:s.textDecoration,panelId:i,children:(0,it.jsx)(aP,{value:et,onChange:Ue,size:"__unstable-large",__unstableInputWidth:"auto"})}),Fe&&(0,it.jsx)(po.__experimentalToolsPanelItem,{className:"single-column",label:(0,Uo.__)("Orientation"),hasValue:ze,onDeselect:yt,isShownByDefault:s.writingMode,panelId:i,children:(0,it.jsx)(dP,{value:lo,onChange:tt,size:"__unstable-large"})}),Je&&(0,it.jsx)(po.__experimentalToolsPanelItem,{label:(0,Uo.__)("Letter case"),hasValue:ao,onDeselect:Ze,isShownByDefault:s.textTransform,panelId:i,children:(0,it.jsx)(cP,{value:hr,onChange:Zt,showNone:!0,isBlock:!0,size:"__unstable-large"})}),_o&&(0,it.jsxs)(po.__experimentalToolsPanelItem,{label:(0,Uo.__)("Text alignment"),hasValue:Et,onDeselect:Mo,isShownByDefault:s.textAlign,panelId:i,children:[(0,it.jsx)(I2,{value:gr,onChange:ve,options:["left","center","right","justify"],size:"__unstable-large"}),gr==="justify"&&(0,it.jsx)("div",{children:(0,it.jsx)(po.Notice,{status:"warning",isDismissible:!1,children:(0,Uo.__)("Justified text can reduce readability. For better accessibility, use left-aligned text instead.")})})]})]})}var At=l(N(),1),Lt=l(A(),1);var bv=l(O(),1);var st=l(A(),1),Xo=l(N(),1),Lce=l(O(),1),O2=l(z(),1);var Ace=l(z(),1);function Lp(e,t){let{getBlockOrder:o,getBlockAttributes:r}=(0,Ace.useSelect)(x);return(i,s)=>{let a=(s-1)*t+i-1,c=0;for(let u of o(e)){let{columnStart:d,rowStart:f}=r(u).style?.layout??{};(f-1)*t+d-1<a&&c++}return c}}var eo=l(w(),1);function GOe(e,t){let{orientation:o="horizontal"}=t;return e==="fill"?(0,Xo.__)("Stretch to fill available space."):e==="fixed"&&o==="horizontal"?(0,Xo.__)("Specify a fixed width."):e==="fixed"?(0,Xo.__)("Specify a fixed height."):(0,Xo.__)("Fit contents.")}function Nce({value:e={},onChange:t,parentLayout:o,isShownByDefault:r,panelId:n}){let{type:i,default:{type:s="default"}={}}=o??{},a=i||s;return a==="flex"?(0,eo.jsx)(WOe,{childLayout:e,onChange:t,parentLayout:o,isShownByDefault:r,panelId:n}):a==="grid"?(0,eo.jsx)(KOe,{childLayout:e,onChange:t,parentLayout:o,isShownByDefault:r,panelId:n}):null}function WOe({childLayout:e,onChange:t,parentLayout:o,isShownByDefault:r,panelId:n}){let{selfStretch:i,flexSize:s}=e,{orientation:a="horizontal"}=o??{},c=()=>!!i,u=a==="horizontal"?(0,Xo.__)("Width"):(0,Xo.__)("Height"),[d]=pe("spacing.units"),f=(0,st.__experimentalUseCustomUnits)({availableUnits:d||["%","px","em","rem","vh","vw"]}),m=()=>{t({selfStretch:void 0,flexSize:void 0})};return(0,Lce.useEffect)(()=>{i==="fixed"&&!s&&t({...e,selfStretch:"fit"})},[]),(0,eo.jsxs)(st.__experimentalVStack,{as:st.__experimentalToolsPanelItem,spacing:2,hasValue:c,label:u,onDeselect:m,isShownByDefault:r,panelId:n,children:[(0,eo.jsxs)(st.__experimentalToggleGroupControl,{size:"__unstable-large",label:$Oe(o),value:i||"fit",help:GOe(i,o),onChange:h=>{t({selfStretch:h,flexSize:h!=="fixed"?null:s})},isBlock:!0,children:[(0,eo.jsx)(st.__experimentalToggleGroupControlOption,{value:"fit",label:(0,Xo._x)("Fit","Intrinsic block width in flex layout")},"fit"),(0,eo.jsx)(st.__experimentalToggleGroupControlOption,{value:"fill",label:(0,Xo._x)("Grow","Block with expanding width in flex layout")},"fill"),(0,eo.jsx)(st.__experimentalToggleGroupControlOption,{value:"fixed",label:(0,Xo._x)("Fixed","Block with fixed width in flex layout")},"fixed")]}),i==="fixed"&&(0,eo.jsx)(st.__experimentalUnitControl,{size:"__unstable-large",units:f,onChange:h=>{t({selfStretch:i,flexSize:h})},value:s,min:0,label:u,hideLabelFromVision:!0})]})}function $Oe(e){let{orientation:t="horizontal"}=e;return t==="horizontal"?(0,Xo.__)("Width"):(0,Xo.__)("Height")}function KOe({childLayout:e,onChange:t,parentLayout:o,isShownByDefault:r,panelId:n}){let{columnStart:i,rowStart:s,columnSpan:a,rowSpan:c}=e,{columnCount:u,rowCount:d}=o??{},f=(0,O2.useSelect)(S=>S(x).getBlockRootClientId(n)),{moveBlocksToPosition:m,__unstableMarkNextChangeAsNotPersistent:h}=(0,O2.useDispatch)(x),p=Lp(f,u||3),g=()=>!!i||!!s,b=()=>!!a||!!c,k=()=>{t({columnStart:void 0,rowStart:void 0})},v=()=>{t({columnSpan:void 0,rowSpan:void 0})},y=u?u-(i??1)+1:void 0,_=window.__experimentalEnableGridInteractivity&&d?d-(s??1)+1:void 0;return(0,eo.jsxs)(eo.Fragment,{children:[(0,eo.jsxs)(st.Flex,{as:st.__experimentalToolsPanelItem,hasValue:b,label:(0,Xo.__)("Grid span"),onDeselect:v,isShownByDefault:r,panelId:n,children:[(0,eo.jsx)(st.FlexItem,{style:{width:"50%"},children:(0,eo.jsx)(st.__experimentalInputControl,{size:"__unstable-large",label:(0,Xo.__)("Column span"),type:"number",onChange:S=>{let C=S===""?1:parseInt(S,10),B=y?Math.min(C,y):C;t({columnStart:i,rowStart:s,rowSpan:c,columnSpan:B})},value:a??1,min:1,max:y})}),(0,eo.jsx)(st.FlexItem,{style:{width:"50%"},children:(0,eo.jsx)(st.__experimentalInputControl,{size:"__unstable-large",label:(0,Xo.__)("Row span"),type:"number",onChange:S=>{let C=S===""?1:parseInt(S,10),B=_?Math.min(C,_):C;t({columnStart:i,rowStart:s,columnSpan:a,rowSpan:B})},value:c??1,min:1,max:_})})]}),window.__experimentalEnableGridInteractivity&&(0,eo.jsxs)(st.Flex,{as:st.__experimentalToolsPanelItem,hasValue:g,label:(0,Xo.__)("Grid placement"),onDeselect:k,isShownByDefault:!1,panelId:n,children:[(0,eo.jsx)(st.FlexItem,{style:{width:"50%"},children:(0,eo.jsx)(st.__experimentalInputControl,{size:"__unstable-large",label:(0,Xo.__)("Column"),type:"number",onChange:S=>{let C=S===""?1:parseInt(S,10);t({columnStart:C,rowStart:s,columnSpan:a,rowSpan:c}),h(),m([n],f,f,p(C,s))},value:i??1,min:1,max:u?u-(a??1)+1:void 0})}),(0,eo.jsx)(st.FlexItem,{style:{width:"50%"},children:(0,eo.jsx)(st.__experimentalInputControl,{size:"__unstable-large",label:(0,Xo.__)("Row"),type:"number",onChange:S=>{let C=S===""?1:parseInt(S,10);t({columnStart:i,rowStart:C,columnSpan:a,rowSpan:c}),h(),m([n],f,f,p(i,C))},value:s??1,min:1,max:d?d-(c??1)+1:void 0})})]})]})}var A2=l(A(),1),gv=l(N(),1);var Iz=l(w(),1);function L2({panelId:e,value:t,onChange:o=()=>{},options:r,defaultValue:n="auto",hasValue:i,isShownByDefault:s=!0}){let a=t??"auto",[c,u,d]=pe("dimensions.aspectRatios.default","dimensions.aspectRatios.theme","dimensions.defaultAspectRatios"),f=u?.map(({name:p,ratio:g})=>({label:p,value:g})),m=c?.map(({name:p,ratio:g})=>({label:p,value:g})),h=[{label:(0,gv._x)("Original","Aspect ratio option for dimensions control"),value:"auto"},...d?m:[],...f||[],{label:(0,gv._x)("Custom","Aspect ratio option for dimensions control"),value:"custom",disabled:!0,hidden:!0}];return(0,Iz.jsx)(A2.__experimentalToolsPanelItem,{hasValue:i||(()=>a!==n),label:(0,gv.__)("Aspect ratio"),onDeselect:()=>o(void 0),isShownByDefault:s,panelId:e,children:(0,Iz.jsx)(A2.SelectControl,{label:(0,gv.__)("Aspect ratio"),value:a,options:r??h,onChange:o,size:"__unstable-large"})})}var je=l(w(),1),Pz=["horizontal","vertical"];function N2(e){return bv.Platform.OS==="web"&&(Vce(e)||Fce(e)||zce(e)||jce(e)||Uce(e)||Hce(e)||Gce(e)||Wce(e)||$ce(e)||Kce(e)||Yce(e))}function Vce(e){return e?.layout?.contentSize}function Fce(e){return e?.layout?.wideSize}function zce(e){return e?.spacing?.padding}function jce(e){return e?.spacing?.margin}function Uce(e){return e?.spacing?.blockGap}function Hce(e){return e?.dimensions?.height}function Gce(e){return e?.dimensions?.minHeight}function Wce(e){return e?.dimensions?.minWidth}function $ce(e){return e?.dimensions?.width}function Kce(e){return e?.dimensions?.aspectRatio}function Yce(e){let{type:t="default",default:{type:o="default"}={},allowSizingOnChildren:r=!1}=e?.parentLayout??{},n=(o==="flex"||t==="flex"||o==="grid"||t==="grid")&&r;return!!e?.layout&&n}function YOe(e){let{defaultSpacingSizes:t,spacingSizes:o}=e?.spacing||{};return t!==!1&&o?.default?.length>0||o?.theme?.length>0||o?.custom?.length>0}function Mce(e,t){if(!t||!e)return e;let o={};return t.forEach(r=>{r==="vertical"&&(o.top=e.top,o.bottom=e.bottom),r==="horizontal"&&(o.left=e.left,o.right=e.right),o[r]=e?.[r]}),o}function Dce(e){return e&&typeof e=="string"?{top:e,right:e,bottom:e,left:e}:e}function qOe(e,t){return e&&(typeof e=="string"?t?{top:e,right:e,bottom:e,left:e}:{top:e}:{...e,right:e?.left,bottom:e?.top})}function ZOe({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n}){let i=Vo(),s=()=>{let a=e(o);t(a)};return(0,je.jsx)(Lt.__experimentalToolsPanel,{label:(0,At.__)("Dimensions"),resetAll:s,panelId:r,dropdownMenuProps:i,children:n})}var hs={contentSize:!0,wideSize:!0,padding:!0,margin:!0,blockGap:!0,height:!0,minHeight:!0,minWidth:!0,width:!0,aspectRatio:!0,childLayout:!0};function M2({as:e=ZOe,value:t,onChange:o,inheritedValue:r=t,settings:n,panelId:i,defaultControls:s=hs,onVisualize:a=()=>{},includeLayoutControls:c=!1}){let{dimensions:u,spacing:d}=n,f=ge=>ge&&typeof ge=="object"?Object.keys(ge).reduce((rr,Sa)=>(rr[Sa]=Vr({settings:{dimensions:u,spacing:d}},"",ge[Sa]),rr),{}):Vr({settings:{dimensions:u,spacing:d}},"",ge),m=YOe(n),h=(0,Lt.__experimentalUseCustomUnits)({availableUnits:n?.spacing?.units||["%","px","em","rem","vw"]}),p=-1/0,[g,b]=(0,bv.useState)(p),k=(0,bv.useCallback)(ge=>({...ge,layout:Le({...ge?.layout,contentSize:void 0,wideSize:void 0,selfStretch:void 0,flexSize:void 0,columnStart:void 0,rowStart:void 0,columnSpan:void 0,rowSpan:void 0}),spacing:{...ge?.spacing,padding:void 0,margin:void 0,blockGap:void 0},dimensions:{...ge?.dimensions,height:void 0,minHeight:void 0,minWidth:void 0,aspectRatio:void 0,width:void 0}}),[]),v=Vce(n)&&c,y=f(r?.layout?.contentSize),_=ge=>{o(de(t,["layout","contentSize"],ge||void 0))},S=()=>!!t?.layout?.contentSize,C=()=>_(void 0),B=Fce(n)&&c,P=f(r?.layout?.wideSize),T=ge=>{o(de(t,["layout","wideSize"],ge||void 0))},E=()=>!!t?.layout?.wideSize,L=()=>T(void 0),I=zce(n),R=f(r?.spacing?.padding),V=Dce(R),j=Array.isArray(n?.spacing?.padding)?n?.spacing?.padding:n?.spacing?.padding?.sides,H=j&&j.some(ge=>Pz.includes(ge)),F=ge=>{let rr=Mce(ge,j);o(de(t,["spacing","padding"],rr))},U=()=>!!t?.spacing?.padding&&Object.keys(t?.spacing?.padding).length,G=()=>F(void 0),W=()=>a("padding"),J=jce(n),le=f(r?.spacing?.margin),oe=Dce(le),re=Array.isArray(n?.spacing?.margin)?n?.spacing?.margin:n?.spacing?.margin?.sides,Q=re&&re.some(ge=>Pz.includes(ge)),$=ge=>{let rr=Mce(ge,re);o(de(t,["spacing","margin"],rr))},ee=()=>!!t?.spacing?.margin&&Object.keys(t?.spacing?.margin).length,K=()=>$(void 0),te=()=>a("margin"),ne=Uce(n),q=Array.isArray(n?.spacing?.blockGap)?n?.spacing?.blockGap:n?.spacing?.blockGap?.sides,se=q&&q.some(ge=>Pz.includes(ge)),he=f(r?.spacing?.blockGap),me=qOe(he,se),xe=ge=>{o(de(t,["spacing","blockGap"],ge))},De=ge=>{ge||xe(null),!se&&ge?.hasOwnProperty("top")?xe(ge.top):xe({top:ge?.top,left:ge?.left})},lt=()=>xe(void 0),Dt=()=>!!t?.spacing?.blockGap,so=Gce(n),or=f(r?.dimensions?.minHeight),Je=ge=>{let rr=de(t,["dimensions","minHeight"],ge);o(de(rr,["dimensions","aspectRatio"],void 0))},hr=()=>{Je(void 0)},Zt=()=>!!t?.dimensions?.minHeight,ao=Hce(n),Ze=f(r?.dimensions?.height),Vt=ge=>{let rr=de(t,["dimensions","height"],ge);o(de(rr,["dimensions","aspectRatio"],void 0))},et=()=>{Vt(void 0)},Ue=()=>!!t?.dimensions?.height,Ho=Wce(n),Yn=f(r?.dimensions?.minWidth),Fe=ge=>{o(de(t,["dimensions","minWidth"],ge))},lo=()=>{Fe(void 0)},tt=()=>!!t?.dimensions?.minWidth,ze=$ce(n),yt=f(r?.dimensions?.width),_o=ge=>{o(de(t,["dimensions","width"],ge))},gr=()=>{_o(void 0)},ve=()=>!!t?.dimensions?.width,Et=Kce(n),Mo=f(r?.dimensions?.aspectRatio),mt=ge=>{let rr=de(t,["dimensions","aspectRatio"],ge);o(de(rr,["dimensions","minHeight"],void 0))},be=()=>!!t?.dimensions?.aspectRatio,Ft=Yce(n),_t=r?.layout,_a=ge=>{o({...t,layout:{...ge}})},$r=()=>a(!1);return(0,je.jsxs)(e,{resetAllFilter:k,value:t,onChange:o,panelId:i,children:[(v||B)&&(0,je.jsx)("span",{className:"span-columns",children:(0,At.__)("Set the width of the main content area.")}),v&&(0,je.jsx)(Lt.__experimentalToolsPanelItem,{label:(0,At.__)("Content width"),hasValue:S,onDeselect:C,isShownByDefault:s.contentSize??hs.contentSize,panelId:i,children:(0,je.jsx)(Lt.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,At.__)("Content width"),labelPosition:"top",value:y||"",onChange:ge=>{_(ge)},units:h,prefix:(0,je.jsx)(Lt.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,je.jsx)(Ee,{icon:Kf})})})}),B&&(0,je.jsx)(Lt.__experimentalToolsPanelItem,{label:(0,At.__)("Wide width"),hasValue:E,onDeselect:L,isShownByDefault:s.wideSize??hs.wideSize,panelId:i,children:(0,je.jsx)(Lt.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,At.__)("Wide width"),labelPosition:"top",value:P||"",onChange:ge=>{T(ge)},units:h,prefix:(0,je.jsx)(Lt.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,je.jsx)(Ee,{icon:sm})})})}),I&&(0,je.jsxs)(Lt.__experimentalToolsPanelItem,{hasValue:U,label:(0,At.__)("Padding"),onDeselect:G,isShownByDefault:s.padding??hs.padding,className:D({"tools-panel-item-spacing":m}),panelId:i,children:[!m&&(0,je.jsx)(Lt.BoxControl,{__next40pxDefaultSize:!0,values:V,onChange:F,label:(0,At.__)("Padding"),sides:j,units:h,allowReset:!1,splitOnAxis:H,inputProps:{onMouseOver:W,onMouseOut:$r}}),m&&(0,je.jsx)(dv,{values:V,onChange:F,label:(0,At.__)("Padding"),sides:j,units:h,allowReset:!1,onMouseOver:W,onMouseOut:$r})]}),J&&(0,je.jsxs)(Lt.__experimentalToolsPanelItem,{hasValue:ee,label:(0,At.__)("Margin"),onDeselect:K,isShownByDefault:s.margin??hs.margin,className:D({"tools-panel-item-spacing":m}),panelId:i,children:[!m&&(0,je.jsx)(Lt.BoxControl,{__next40pxDefaultSize:!0,values:oe,onChange:$,inputProps:{min:g,onDragStart:()=>{b(0)},onDragEnd:()=>{b(p)},onMouseOver:te,onMouseOut:$r},label:(0,At.__)("Margin"),sides:re,units:h,allowReset:!1,splitOnAxis:Q}),m&&(0,je.jsx)(dv,{values:oe,onChange:$,minimumCustomValue:-1/0,label:(0,At.__)("Margin"),sides:re,units:h,allowReset:!1,onMouseOver:te,onMouseOut:$r})]}),ne&&(0,je.jsxs)(Lt.__experimentalToolsPanelItem,{hasValue:Dt,label:(0,At.__)("Block spacing"),onDeselect:lt,isShownByDefault:s.blockGap??hs.blockGap,className:D({"tools-panel-item-spacing":m,"single-column":!m&&!se}),panelId:i,children:[!m&&(se?(0,je.jsx)(Lt.BoxControl,{__next40pxDefaultSize:!0,label:(0,At.__)("Block spacing"),min:0,onChange:De,units:h,sides:q,values:me,allowReset:!1,splitOnAxis:se}):(0,je.jsx)(Lt.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,At.__)("Block spacing"),min:0,onChange:xe,units:h,value:he})),m&&(0,je.jsx)(dv,{label:(0,At.__)("Block spacing"),min:0,onChange:De,showSideInLabel:!1,sides:se?q:["top"],values:me,allowReset:!1})]}),Ft&&(0,je.jsx)(Nce,{value:_t,onChange:_a,parentLayout:n?.parentLayout,panelId:i,isShownByDefault:s.childLayout??hs.childLayout}),so&&(0,je.jsx)(Lt.__experimentalToolsPanelItem,{hasValue:Zt,label:(0,At.__)("Minimum height"),onDeselect:hr,isShownByDefault:s.minHeight??hs.minHeight,panelId:i,children:(0,je.jsx)(vp,{label:(0,At.__)("Minimum height"),value:or,onChange:Je,dimensionSizes:u?.dimensionSizes})}),Ho&&(0,je.jsx)(Lt.__experimentalToolsPanelItem,{hasValue:tt,label:(0,At.__)("Minimum width"),onDeselect:lo,isShownByDefault:s.minWidth??hs.minWidth,panelId:i,children:(0,je.jsx)(vp,{label:(0,At.__)("Minimum width"),value:Yn,onChange:Fe,dimensionSizes:u?.dimensionSizes})}),ao&&(0,je.jsx)(Lt.__experimentalToolsPanelItem,{hasValue:Ue,label:(0,At.__)("Height"),onDeselect:et,isShownByDefault:s.height??hs.height,panelId:i,children:(0,je.jsx)(vp,{label:(0,At.__)("Height"),value:Ze,onChange:Vt,dimensionSizes:u?.dimensionSizes})}),ze&&(0,je.jsx)(Lt.__experimentalToolsPanelItem,{hasValue:ve,label:(0,At.__)("Width"),onDeselect:gr,isShownByDefault:s.width??hs.width,panelId:i,children:(0,je.jsx)(vp,{label:(0,At.__)("Width"),value:yt,onChange:_o,dimensionSizes:u?.dimensionSizes})}),Et&&(0,je.jsx)(L2,{hasValue:be,value:Mo,onChange:mt,panelId:i,isShownByDefault:s.aspectRatio??hs.aspectRatio})]})}var dn=l(A(),1),kv=l(O(),1),vv=l(N(),1);var Np=l(N(),1),Ao=l(A(),1),V2=l(O(),1);var Nt=l(w(),1),D2=[];function XOe({shadow:e,onShadowChange:t,settings:o}){let r=Rz(o);return(0,Nt.jsx)("div",{className:"block-editor-global-styles__shadow-popover-container",children:(0,Nt.jsxs)(Ao.__experimentalVStack,{spacing:4,children:[(0,Nt.jsx)(Ao.__experimentalHeading,{level:5,children:(0,Np.__)("Drop shadow")}),(0,Nt.jsx)(QOe,{presets:r,activeShadow:e,onSelect:t}),(0,Nt.jsx)("div",{className:"block-editor-global-styles__clear-shadow",children:(0,Nt.jsx)(Ao.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>t(void 0),disabled:!e,accessibleWhenDisabled:!0,children:(0,Np.__)("Clear")})})]})})}function QOe({presets:e,activeShadow:t,onSelect:o}){return e?(0,Nt.jsx)(Ao.Composite,{role:"listbox",className:"block-editor-global-styles__shadow__list","aria-label":(0,Np.__)("Drop shadows"),children:e.map(({name:r,slug:n,shadow:i})=>(0,Nt.jsx)(JOe,{label:r,isActive:i===t,type:n==="unset"?"unset":"preset",onSelect:()=>o(i===t?void 0:i),shadow:i},n))}):null}function JOe({type:e,label:t,isActive:o,onSelect:r,shadow:n}){return(0,Nt.jsx)(Ao.Tooltip,{text:t,children:(0,Nt.jsx)(Ao.Composite.Item,{role:"option","aria-label":t,"aria-selected":o,className:D("block-editor-global-styles__shadow__item",{"is-active":o}),render:(0,Nt.jsx)("button",{className:D("block-editor-global-styles__shadow-indicator",{unset:e==="unset"}),onClick:r,style:{boxShadow:n},"aria-label":t,children:o&&(0,Nt.jsx)(Ee,{icon:Ts})})})})}function qce({shadow:e,onShadowChange:t,settings:o}){return(0,Nt.jsx)(Ao.Dropdown,{popoverProps:{placement:"left-start",offset:36,shift:!0},className:"block-editor-global-styles__shadow-dropdown",renderToggle:eAe(e,t),renderContent:()=>(0,Nt.jsx)(Ao.__experimentalDropdownContentWrapper,{paddingSize:"medium",children:(0,Nt.jsx)(XOe,{shadow:e,onShadowChange:t,settings:o})})})}function eAe(e,t){return function({onToggle:r,isOpen:n}){let i=(0,V2.useRef)(void 0),s={onClick:r,className:D("block-editor-global-styles__shadow-dropdown-toggle",{"is-open":n}),"aria-expanded":n,ref:i},a={onClick:()=>{n&&r(),t(void 0),i.current?.focus()},className:D("block-editor-global-styles__shadow-editor__remove-button",{"is-open":n}),label:(0,Np.__)("Remove")};return(0,Nt.jsxs)(Nt.Fragment,{children:[(0,Nt.jsx)(Ao.Button,{__next40pxDefaultSize:!0,...s,children:(0,Nt.jsxs)(Ao.__experimentalHStack,{justify:"flex-start",children:[(0,Nt.jsx)(Ee,{className:"block-editor-global-styles__toggle-icon",icon:iM,size:24}),(0,Nt.jsx)(Ao.FlexItem,{children:(0,Np.__)("Drop shadow")})]})}),!!e&&(0,Nt.jsx)(Ao.Button,{__next40pxDefaultSize:!0,size:"small",icon:kr,...a})]})}}function Rz(e){return(0,V2.useMemo)(()=>{if(!e?.shadow)return D2;let t=e?.shadow?.defaultPresets,{default:o,theme:r,custom:n}=e?.shadow?.presets??{},i={name:(0,Np.__)("Unset"),slug:"unset",shadow:"none"},s=[...t&&o||D2,...r||D2,...n||D2];return s.length&&s.unshift(i),s},[e])}var fa=l(w(),1);function F2(e){return Object.values(YS(e)).some(Boolean)}function YS(e){return{hasBorderColor:Zce(e),hasBorderRadius:Xce(e),hasBorderStyle:Qce(e),hasBorderWidth:Jce(e),hasShadow:eue(e)}}function Zce(e){return e?.border?.color}function Xce(e){return e?.border?.radius}function Qce(e){return e?.border?.style}function Jce(e){return e?.border?.width}function eue(e){let t=Rz(e);return!!e?.shadow&&t.length>0}function tAe({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n,label:i}){let s=Vo();return(0,fa.jsx)(dn.__experimentalToolsPanel,{label:i,resetAll:()=>{let c=e(o);t(c)},panelId:r,dropdownMenuProps:s,children:n})}var oAe={radius:!0,color:!0,width:!0,shadow:!0};function z2({as:e=tAe,value:t,onChange:o,inheritedValue:r=t,settings:n,panelId:i,name:s,defaultControls:a=oAe}){let c=ul(n),u=(0,kv.useCallback)(F=>Vr({settings:n},"",F),[n]),d=F=>{let G=c.flatMap(({colors:W})=>W).find(({color:W})=>W===F);return G?"var:preset|color|"+G.slug:F},f=(0,kv.useMemo)(()=>{if((0,dn.__experimentalHasSplitBorders)(r?.border)){let F={...r?.border};return["top","right","bottom","left"].forEach(U=>{F[U]={...F[U],color:u(F[U]?.color)}}),F}return{...r?.border,color:r?.border?.color?u(r?.border?.color):void 0}},[r?.border,u]),m=F=>o({...t,border:F}),h=Zce(n),p=Qce(n),g=Jce(n),b=Xce(n),k=(0,kv.useMemo)(()=>typeof r?.border?.radius!="object"?u(r?.border?.radius):{topLeft:u(r?.border?.radius?.topLeft),topRight:u(r?.border?.radius?.topRight),bottomLeft:u(r?.border?.radius?.bottomLeft),bottomRight:u(r?.border?.radius?.bottomRight)},[r?.border?.radius,u]),v=F=>m({...f,radius:F}),y=()=>{let F=t?.border?.radius;return typeof F=="object"?Object.entries(F).some(Boolean):!!F},_=eue(n),S=u(r?.shadow),C=n?.shadow?.presets??{},B=C.custom??C.theme??C.default??[],P=F=>{let U=B?.find(({shadow:G})=>G===F)?.slug;o(de(t,["shadow"],U?`var:preset|shadow|${U}`:F||void 0))},T=()=>!!t?.shadow,E=()=>P(void 0),L=()=>{if(y())return m({radius:t?.border?.radius});m(void 0)},I=F=>{let U={...F};(0,dn.__experimentalHasSplitBorders)(U)?["top","right","bottom","left"].forEach(G=>{U[G]&&(U[G]={...U[G],color:d(U[G]?.color)})}):U&&(U.color=d(U.color)),m({radius:f?.radius,...U})},R=(0,kv.useCallback)(F=>({...F,border:void 0,shadow:void 0}),[]),V=a?.color||a?.width,j=h||p||g||b,H=yv({blockName:s,hasShadowControl:_,hasBorderControl:j});return(0,fa.jsxs)(e,{resetAllFilter:R,value:t,onChange:o,panelId:i,label:H,children:[(g||h)&&(0,fa.jsx)(dn.__experimentalToolsPanelItem,{hasValue:()=>(0,dn.__experimentalIsDefinedBorder)(t?.border),label:(0,vv.__)("Border"),onDeselect:()=>L(),isShownByDefault:V,panelId:i,children:(0,fa.jsx)(dn.BorderBoxControl,{colors:c,enableAlpha:!0,enableStyle:p,onChange:I,popoverOffset:40,popoverPlacement:"left-start",value:f,__experimentalIsRenderedInSidebar:!0,size:"__unstable-large",hideLabelFromVision:!_,label:(0,vv.__)("Border")})}),b&&(0,fa.jsx)(dn.__experimentalToolsPanelItem,{hasValue:y,label:(0,vv.__)("Radius"),onDeselect:()=>v(void 0),isShownByDefault:a.radius,panelId:i,children:(0,fa.jsx)(ZI,{presets:n?.border?.radiusSizes,values:k,onChange:F=>{v(F||void 0)}})}),_&&(0,fa.jsxs)(dn.__experimentalToolsPanelItem,{label:(0,vv.__)("Shadow"),hasValue:T,onDeselect:E,isShownByDefault:a.shadow,panelId:i,children:[j?(0,fa.jsx)(dn.BaseControl.VisualLabel,{as:"legend",children:(0,vv.__)("Shadow")}):null,(0,fa.jsx)(qce,{shadow:S,onShadowChange:P,settings:n})]})]})}var oo=l(A(),1),U2=l(O(),1),to=l(N(),1);var dt=l(w(),1);function H2(e){let t=oue(e),o=sue(e),r=rue(e),n=lf(e),i=iue(e),s=nue(e);return t||o||r||n||i||s}function oue(e){let t=ul(e);return e?.color?.text&&(t?.length>0||e?.color?.custom)}function rue(e){let t=ul(e);return e?.color?.link&&(t?.length>0||e?.color?.custom)}function nue(e){let t=ul(e);return e?.color?.caption&&(t?.length>0||e?.color?.custom)}function lf(e){let t=ul(e),o=Ap(e);return e?.color?.heading&&(t?.length>0||e?.color?.custom||o?.length>0||e?.color?.customGradient)}function iue(e){let t=ul(e),o=Ap(e);return e?.color?.button&&(t?.length>0||e?.color?.custom||o?.length>0||e?.color?.customGradient)}function sue(e){let t=ul(e),o=Ap(e);return e?.color?.background&&(t?.length>0||e?.color?.custom||o?.length>0||e?.color?.customGradient)}function Oz({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n,label:i}){let s=Vo(),a=()=>{let c=e(o);t(c)};return(0,dt.jsx)(oo.__experimentalToolsPanel,{label:i||(0,to.__)("Elements"),resetAll:a,panelId:r,hasInnerWrapper:!0,headingLevel:3,className:"color-block-support-panel",__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last",dropdownMenuProps:s,children:(0,dt.jsx)("div",{className:"color-block-support-panel__inner-wrapper",children:n})})}var rAe={text:!0,background:!0,link:!0,heading:!0,button:!0,caption:!0},nAe={placement:"left-start",offset:36,shift:!0},{Tabs:j2}=M(oo.privateApis),iAe=({indicators:e,label:t})=>(0,dt.jsxs)(oo.__experimentalHStack,{justify:"flex-start",children:[(0,dt.jsx)(oo.__experimentalZStack,{isLayered:!1,offset:-8,children:e.map((o,r)=>(0,dt.jsx)(oo.Flex,{expanded:!1,children:(0,dt.jsx)(oo.ColorIndicator,{colorValue:o})},r))}),(0,dt.jsx)(oo.FlexItem,{className:"block-editor-panel-color-gradient-settings__color-name",children:t})]});function tue({isGradient:e,inheritedValue:t,userValue:o,setValue:r,colorGradientControlSettings:n}){return(0,dt.jsx)(Wd,{...n,showTitle:!1,enableAlpha:!0,__experimentalIsRenderedInSidebar:!0,colorValue:e?void 0:t,gradientValue:e?t:void 0,onColorChange:e?void 0:r,onGradientChange:e?r:void 0,clearable:t===o,headingLevel:3})}function Az({label:e,hasValue:t,resetValue:o,isShownByDefault:r,indicators:n,tabs:i,colorGradientControlSettings:s,panelId:a,className:c="block-editor-tools-panel-color-gradient-settings__item"}){let u=i.find(h=>h.userValue!==void 0),{key:d,...f}=i[0]??{},m=(0,U2.useRef)(void 0);return(0,dt.jsx)(oo.__experimentalToolsPanelItem,{className:c,hasValue:t,label:e,onDeselect:o,isShownByDefault:r,panelId:a,children:(0,dt.jsx)(oo.Dropdown,{popoverProps:nAe,className:"block-editor-tools-panel-color-gradient-settings__dropdown",renderToggle:({onToggle:h,isOpen:p})=>{let g={onClick:h,className:D("block-editor-panel-color-gradient-settings__dropdown",{"is-open":p}),"aria-expanded":p,ref:m};return(0,dt.jsxs)(dt.Fragment,{children:[(0,dt.jsx)(oo.Button,{...g,__next40pxDefaultSize:!0,children:(0,dt.jsx)(iAe,{indicators:n,label:e})}),t()&&(0,dt.jsx)(oo.Button,{__next40pxDefaultSize:!0,label:(0,to.__)("Reset"),className:"block-editor-panel-color-gradient-settings__reset",size:"small",icon:kr,onClick:()=>{o(),p&&h(),m.current?.focus()}})]})},renderContent:()=>(0,dt.jsx)(oo.__experimentalDropdownContentWrapper,{paddingSize:"none",children:(0,dt.jsxs)("div",{className:"block-editor-panel-color-gradient-settings__dropdown-content",children:[i.length===1&&(0,dt.jsx)(tue,{...f,colorGradientControlSettings:s},d),i.length>1&&(0,dt.jsxs)(j2,{defaultTabId:u?.key,children:[(0,dt.jsx)(j2.TabList,{children:i.map(h=>(0,dt.jsx)(j2.Tab,{tabId:h.key,children:h.label},h.key))}),i.map(h=>{let{key:p,...g}=h;return(0,dt.jsx)(j2.TabPanel,{tabId:p,focusable:!1,children:(0,dt.jsx)(tue,{...g,colorGradientControlSettings:s},p)},p)})]})]})})})})}function G2({as:e=Oz,value:t,onChange:o,inheritedValue:r=t,settings:n,panelId:i,defaultControls:s=rAe,label:a,children:c}){let u=ul(n),d=Ap(n),f=n?.color?.custom,m=n?.color?.customGradient,h=u.length>0||f,p=d.length>0||m,g=!!n?.background?.gradient,b=p&&!g,k=q=>Vr({settings:n},"",q),v=q=>{let he=u.flatMap(({colors:me})=>me).find(({color:me})=>me===q);return he?"var:preset|color|"+he.slug:q},y=q=>{let he=d.flatMap(({gradients:me})=>me).find(({gradient:me})=>me===q);return he?"var:preset|gradient|"+he.slug:q},_=sue(n),S=k(r?.color?.background),C=k(t?.color?.background),B=k(r?.color?.gradient),P=k(t?.color?.gradient),T=()=>!!C||!g&&!!P,E=q=>{let se=de(t,["color","background"],v(q));g||(se.color.gradient=void 0),o(se)},L=q=>{let se=de(t,["color","gradient"],y(q));se.color.background=void 0,o(se)},I=()=>{let q=de(t,["color","background"],void 0);g||(q.color.gradient=void 0),o(q)},R=rue(n),V=k(r?.elements?.link?.color?.text),j=k(t?.elements?.link?.color?.text),H=q=>{o(de(t,["elements","link","color","text"],v(q)))},F=k(r?.elements?.link?.[":hover"]?.color?.text),U=k(t?.elements?.link?.[":hover"]?.color?.text),G=q=>{o(de(t,["elements","link",":hover","color","text"],v(q)))},W=()=>!!j||!!U,J=()=>{let q=de(t,["elements","link",":hover","color","text"],void 0);q=de(q,["elements","link","color","text"],void 0),o(q)},le=oue(n),oe=k(r?.color?.text),re=k(t?.color?.text),Q=()=>!!re,$=q=>{let se=de(t,["color","text"],v(q));oe===V&&(se=de(se,["elements","link","color","text"],v(q))),o(se)},ee=()=>$(void 0),K=[{name:"caption",label:(0,to.__)("Captions"),showPanel:nue(n)},{name:"button",label:(0,to.__)("Button"),showPanel:iue(n)},{name:"heading",label:(0,to.__)("Heading"),showPanel:lf(n)},{name:"h1",label:(0,to.__)("H1"),showPanel:lf(n)},{name:"h2",label:(0,to.__)("H2"),showPanel:lf(n)},{name:"h3",label:(0,to.__)("H3"),showPanel:lf(n)},{name:"h4",label:(0,to.__)("H4"),showPanel:lf(n)},{name:"h5",label:(0,to.__)("H5"),showPanel:lf(n)},{name:"h6",label:(0,to.__)("H6"),showPanel:lf(n)}],te=(0,U2.useCallback)(q=>({...q,color:void 0,elements:{...q?.elements,link:{...q?.elements?.link,color:void 0,":hover":{color:void 0}},...K.reduce((se,he)=>({...se,[he.name]:{...q?.elements?.[he.name],color:void 0}}),{})}}),[K]),ne=[le&&{key:"text",label:(0,to.__)("Text"),hasValue:Q,resetValue:ee,isShownByDefault:s.text,indicators:[oe],tabs:[{key:"text",label:(0,to.__)("Text"),inheritedValue:oe,setValue:$,userValue:re}]},_&&{key:"background",label:(0,to.__)("Background"),hasValue:T,resetValue:I,isShownByDefault:s.background,indicators:[(b?B:void 0)??S],tabs:[h&&{key:"background",label:(0,to.__)("Color"),inheritedValue:S,setValue:E,userValue:C},b&&{key:"gradient",label:(0,to.__)("Gradient"),inheritedValue:B,setValue:L,userValue:P,isGradient:!0}].filter(Boolean)},R&&{key:"link",label:(0,to.__)("Link"),hasValue:W,resetValue:J,isShownByDefault:s.link,indicators:[V,F],tabs:[{key:"link",label:(0,to.__)("Default"),inheritedValue:V,setValue:H,userValue:j},{key:"hover",label:(0,to.__)("Hover"),inheritedValue:F,setValue:G,userValue:U}]}].filter(Boolean);return K.forEach(({name:q,label:se,showPanel:he})=>{if(!he)return;let me=k(r?.elements?.[q]?.color?.background),xe=k(r?.elements?.[q]?.color?.gradient),De=k(r?.elements?.[q]?.color?.text),lt=k(t?.elements?.[q]?.color?.background),Dt=k(t?.elements?.[q]?.color?.gradient),so=k(t?.elements?.[q]?.color?.text),or=()=>!!(so||lt||Dt),Je=()=>{let et=de(t,["elements",q,"color","background"],void 0);et.elements[q].color.gradient=void 0,et.elements[q].color.text=void 0,o(et)},hr=et=>{o(de(t,["elements",q,"color","text"],v(et)))},Zt=et=>{let Ue=de(t,["elements",q,"color","background"],v(et));Ue.elements[q].color.gradient=void 0,o(Ue)},ao=et=>{let Ue=de(t,["elements",q,"color","gradient"],y(et));Ue.elements[q].color.background=void 0,o(Ue)},Ze=!0,Vt=q!=="caption";ne.push({key:q,label:se,hasValue:or,resetValue:Je,isShownByDefault:s[q],indicators:Ze&&Vt?[De,xe??me]:[Ze?De:xe??me],tabs:[h&&Ze&&{key:"text",label:(0,to.__)("Text"),inheritedValue:De,setValue:hr,userValue:so},h&&Vt&&{key:"background",label:(0,to.__)("Background"),inheritedValue:me,setValue:Zt,userValue:lt},p&&Vt&&{key:"gradient",label:(0,to.__)("Gradient"),inheritedValue:xe,setValue:ao,userValue:Dt,isGradient:!0}].filter(Boolean)})}),(0,dt.jsxs)(e,{resetAllFilter:te,value:t,onChange:o,panelId:i,label:a,children:[ne.map(q=>{let{key:se,...he}=q;return(0,dt.jsx)(Az,{...he,colorGradientControlSettings:{colors:u,disableCustomColors:!f,gradients:d,disableCustomGradients:!m},panelId:i},se)}),c]})}var bt=l(A(),1),Mc=l(N(),1),_v=l(O(),1);var ho=l(w(),1),W2=[];function aue(e,{presetSetting:t,defaultSetting:o}){let r=!e?.color?.[o],n=e?.color?.[t]?.custom||W2,i=e?.color?.[t]?.theme||W2,s=e?.color?.[t]?.default||W2;return(0,_v.useMemo)(()=>[...n,...i,...r?W2:s],[r,n,i,s])}function lue(e){return cue(e)}function cue(e){return e.color.customDuotone||e.color.defaultDuotone||e.color.duotone.length>0}function sAe({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n}){let i=Vo(),s=()=>{let a=e(o);t(a)};return(0,ho.jsx)(bt.__experimentalToolsPanel,{label:(0,Mc._x)("Filters","Name for applying graphical effects"),resetAll:s,panelId:r,dropdownMenuProps:i,children:n})}var aAe={duotone:!0},lAe={placement:"left-start",offset:36,shift:!0,className:"block-editor-duotone-control__popover",headerTitle:(0,Mc.__)("Duotone")},cAe=({indicator:e,label:t})=>(0,ho.jsxs)(bt.__experimentalHStack,{justify:"flex-start",children:[(0,ho.jsx)(bt.__experimentalZStack,{isLayered:!1,offset:-8,children:(0,ho.jsx)(bt.Flex,{expanded:!1,children:e==="unset"||!e?(0,ho.jsx)(bt.ColorIndicator,{className:"block-editor-duotone-control__unset-indicator"}):(0,ho.jsx)(bt.DuotoneSwatch,{values:e})})}),(0,ho.jsx)(bt.FlexItem,{title:t,children:t})]}),uAe=(e,t)=>function({onToggle:r,isOpen:n}){let i=(0,_v.useRef)(void 0),s={onClick:r,className:D("block-editor-global-styles-filters-panel__dropdown-toggle",{"is-open":n}),"aria-expanded":n,ref:i},a={onClick:()=>{n&&r(),t(),i.current?.focus()},className:"block-editor-panel-duotone-settings__reset",label:(0,Mc.__)("Reset")};return(0,ho.jsxs)(ho.Fragment,{children:[(0,ho.jsx)(bt.Button,{__next40pxDefaultSize:!0,...s,children:(0,ho.jsx)(cAe,{indicator:e,label:(0,Mc.__)("Duotone")})}),e&&(0,ho.jsx)(bt.Button,{size:"small",icon:kr,...a})]})};function $2({as:e=sAe,value:t,onChange:o,inheritedValue:r=t,settings:n,panelId:i,defaultControls:s=aAe}){let a=b=>Vr({settings:n},"",b),c=cue(n),u=aue(n,{presetSetting:"duotone",defaultSetting:"defaultDuotone"}),d=aue(n,{presetSetting:"palette",defaultSetting:"defaultPalette"}),f=a(r?.filter?.duotone),m=b=>{let k=u.find(({colors:y})=>y===b),v=k?`var:preset|duotone|${k.slug}`:b;o(de(t,["filter","duotone"],v))},h=()=>!!t?.filter?.duotone,p=()=>m(void 0),g=(0,_v.useCallback)(b=>({...b,filter:{...b.filter,duotone:void 0}}),[]);return(0,ho.jsx)(e,{resetAllFilter:g,value:t,onChange:o,panelId:i,children:c&&(0,ho.jsx)(bt.__experimentalToolsPanelItem,{label:(0,Mc.__)("Duotone"),hasValue:h,onDeselect:p,isShownByDefault:s.duotone,panelId:i,children:(0,ho.jsx)(bt.Dropdown,{popoverProps:lAe,className:"block-editor-global-styles-filters-panel__dropdown",renderToggle:uAe(f,p),renderContent:()=>(0,ho.jsx)(bt.__experimentalDropdownContentWrapper,{paddingSize:"small",children:(0,ho.jsxs)(bt.MenuGroup,{label:(0,Mc.__)("Duotone"),children:[(0,ho.jsx)("p",{children:(0,Mc.__)("Create a two-tone color effect without losing your original image.")}),(0,ho.jsx)(bt.DuotonePicker,{colorPalette:d,duotonePalette:u,disableCustomColors:!0,disableCustomDuotone:!0,value:f,onChange:m})]})})})})})}var Sv=l(A(),1),qS=l(N(),1);var Mp=l(w(),1);function uue(e,t,o){return e==="core/image"&&o?.lightbox?.allowEditing||!!t?.lightbox}function due({onChange:e,value:t,inheritedValue:o,panelId:r}){let n=Vo(),i=()=>{e(void 0)},s=c=>{e({enabled:c})},a=!1;return o?.lightbox?.enabled&&(a=o.lightbox.enabled),(0,Mp.jsx)(Mp.Fragment,{children:(0,Mp.jsx)(Sv.__experimentalToolsPanel,{label:(0,qS._x)("Settings","Image settings"),resetAll:i,panelId:r,dropdownMenuProps:n,children:(0,Mp.jsx)(Sv.__experimentalToolsPanelItem,{hasValue:()=>!!t?.lightbox,label:(0,qS.__)("Enlarge on click"),onDeselect:i,isShownByDefault:!0,panelId:r,children:(0,Mp.jsx)(Sv.ToggleControl,{label:(0,qS.__)("Enlarge on click"),checked:a,onChange:s})})})})}var xv=l(A(),1),fue=l(O(),1),K2=l(N(),1);var ZS=l(w(),1);function Y2(e){return!(typeof e=="string"&&/<\/?\w/.test(e))}function q2({value:e,onChange:t,inheritedValue:o=e,help:r}){let[n,i]=(0,fue.useState)(null),s=o?.css;function a(u){if(t({...e,css:u}),!Y2(u)){i((0,K2.__)("The custom CSS is invalid. Do not use <> markup."));return}n&&i(null)}function c(u){let d=u?.target?.value;if(!d||!Y2(d))return;let[f]=_g([{css:d}],".for-validation-only");i(f===null?(0,K2.__)("There is an error with your CSS structure."):null)}return(0,ZS.jsxs)(xv.__experimentalVStack,{spacing:3,children:[n&&(0,ZS.jsx)(xv.Notice,{status:"error",onRemove:()=>i(null),children:n}),(0,ZS.jsx)(xv.TextareaControl,{label:(0,K2.__)("Additional CSS"),value:s,onChange:u=>a(u),onBlur:c,className:"block-editor-global-styles-advanced-panel__custom-css-input",spellCheck:!1,help:r})]})}var J2=l(A(),1),JS=l(O(),1),QS=l(N(),1);var Ie=l(A(),1);var Mt=l(N(),1),pue=l(Xn(),1),Lz=l(qn(),1),Dc=l(O(),1),XS=l(z(),1),hue=l(Ve(),1),gue=l(B3(),1);var Be=l(w(),1),Z2="image",dAe={placement:"left-start",offset:36,shift:!0,className:"block-editor-global-styles-background-panel__popover"},Q2=()=>{},X2=e=>{window.requestAnimationFrame(()=>{let[t]=hue.focus.tabbable.find(e?.current);t&&t.focus()})};function fAe(e){return e==="cover"||e===void 0?(0,Mt.__)("Image covers the space evenly."):e==="contain"?(0,Mt.__)("Image is contained without distortion."):(0,Mt.__)("Image has a fixed width.")}var mAe=e=>{if(!e||isNaN(e.x)&&isNaN(e.y))return;let t=isNaN(e.x)?.5:e.x,o=isNaN(e.y)?.5:e.y;return`${t*100}% ${o*100}%`},pAe=e=>{if(!e)return{x:void 0,y:void 0};let[t,o]=e.split(" ").map(r=>parseFloat(r)/100);return t=isNaN(t)?void 0:t,o=isNaN(o)?t:o,{x:t,y:o}};function bue({as:e="span",imgUrl:t,toggleProps:o={},filename:r,label:n,onToggleCallback:i=Q2}){let{isOpen:s,...a}=o;(0,Dc.useEffect)(()=>{typeof s<"u"&&i(s)},[s,i]);let c=()=>(0,Be.jsxs)(Ie.__experimentalHStack,{className:"block-editor-global-styles-background-panel__inspector-preview-inner",children:[(0,Be.jsx)("span",{className:"block-editor-global-styles-background-panel__inspector-image-indicator",style:{backgroundImage:t?`url(${t})`:void 0}}),(0,Be.jsxs)(Ie.FlexBlock,{children:[(0,Be.jsx)(Ie.__experimentalTruncate,{numberOfLines:1,className:"block-editor-global-styles-background-panel__inspector-media-replace-title",children:n}),(0,Be.jsx)(Ge,{render:(0,Be.jsx)("span",{}),children:t?(0,Mt.sprintf)((0,Mt.__)("Background image: %s"),r||n):(0,Mt.__)("No background image selected")})]})]});return e==="button"?(0,Be.jsx)(Ie.Button,{__next40pxDefaultSize:!0,...a,children:c()}):c()}function hAe({label:e,filename:t,url:o,children:r,onToggle:n=Q2,hasImageValue:i,onReset:s,containerRef:a}){if(!i)return;let c=e||(0,Lz.getFilename)(o)||(0,Mt.__)("Image");return(0,Be.jsx)(Ie.Dropdown,{popoverProps:dAe,renderToggle:({onToggle:u,isOpen:d})=>{let f={onClick:u,className:"block-editor-global-styles-background-panel__dropdown-toggle","aria-expanded":d,"aria-label":(0,Mt.__)("Background size, position and repeat options."),isOpen:d};return(0,Be.jsxs)(Be.Fragment,{children:[(0,Be.jsx)(bue,{imgUrl:o,filename:t,label:c,toggleProps:f,as:"button",onToggleCallback:n}),s&&(0,Be.jsx)(Ie.Button,{__next40pxDefaultSize:!0,label:(0,Mt.__)("Reset"),className:"block-editor-global-styles-background-panel__reset",size:"small",icon:kr,onClick:()=>{s(),d&&u(),X2(a)}})]})},renderContent:()=>(0,Be.jsx)(Ie.__experimentalDropdownContentWrapper,{className:"block-editor-global-styles-background-panel__dropdown-content-wrapper",paddingSize:"medium",children:r})})}function gAe(){return(0,Be.jsx)(Ie.Placeholder,{className:"block-editor-global-styles-background-panel__loading",children:(0,Be.jsx)(Ie.Spinner,{})})}function mue({onChange:e,style:t,inheritedValue:o,onRemoveImage:r=Q2,onResetImage:n=Q2,displayInPanel:i,defaultValues:s,containerRef:a}){let[c,u]=(0,Dc.useState)(!1),{getSettings:d}=(0,XS.useSelect)(x),{id:f,title:m,url:h}=t?.background?.backgroundImage||{...o?.background?.backgroundImage},{createErrorNotice:p}=(0,XS.useDispatch)(pue.store),g=B=>{p(B,{type:"snackbar"}),u(!1)},b=()=>e(de(t,["background","backgroundImage"],void 0)),k=B=>{if(!B||!B.url){b(),u(!1);return}if((0,gue.isBlobURL)(B.url)){u(!0);return}if(B.media_type&&B.media_type!==Z2||!B.media_type&&B.type&&B.type!==Z2){g((0,Mt.__)("Only images can be used as a background image."));return}let P=t?.background?.backgroundSize||s?.backgroundSize,T=t?.background?.backgroundPosition;e(de(t,["background"],{...t?.background,backgroundImage:{url:B.url,id:B.id,source:"file",title:B.title||void 0},backgroundPosition:!T&&(P==="auto"||!P)?"50% 0":T,backgroundSize:P})),u(!1),X2(a)},v=B=>{d().mediaUpload({allowedTypes:[Z2],filesList:B,onFileChange([P]){k(P)},onError:g,multiple:!1})},y=cf(t),_=()=>e(de(t,["background"],{backgroundImage:"none"})),S=!y&&cf(o),C=m||(0,Lz.getFilename)(h)||(0,Mt.__)("Image");return(0,Be.jsxs)("div",{className:"block-editor-global-styles-background-panel__image-tools-panel-item",children:[c&&(0,Be.jsx)(gAe,{}),(0,Be.jsx)(Zb,{mediaId:f,mediaURL:h,allowedTypes:[Z2],accept:"image/*",onSelect:k,popoverProps:{className:D({"block-editor-global-styles-background-panel__media-replace-popover":i})},name:(0,Be.jsx)(bue,{imgUrl:h,filename:m,label:C}),renderToggle:B=>(0,Be.jsx)(Ie.Button,{...B,__next40pxDefaultSize:!0}),onError:g,onReset:()=>{X2(a),n()},children:S&&(0,Be.jsx)(Ie.MenuItem,{onClick:()=>{X2(a),_(),r()},children:(0,Mt.__)("Remove")})}),(0,Be.jsx)(Ie.DropZone,{onFilesDrop:v,label:(0,Mt.__)("Drop to upload")})]})}function bAe({onChange:e,style:t,inheritedValue:o,defaultValues:r}){let n=t?.background?.backgroundSize||o?.background?.backgroundSize,i=t?.background?.backgroundRepeat||o?.background?.backgroundRepeat,s=t?.background?.backgroundImage?.url||o?.background?.backgroundImage?.url,a=t?.background?.backgroundImage?.id,c=t?.background?.backgroundPosition||o?.background?.backgroundPosition,u=t?.background?.backgroundAttachment||o?.background?.backgroundAttachment,d=!n&&a?r?.backgroundSize:n||"auto";d=["cover","contain","auto"].includes(d)?d:"auto";let f=!(i==="no-repeat"||d==="cover"&&i===void 0),m=k=>{let v=i,y=c;k==="contain"&&(v="no-repeat",y=void 0),k==="cover"&&(v=void 0,y=void 0),(d==="cover"||d==="contain")&&k==="auto"&&(v=void 0,t?.background?.backgroundImage?.id&&(y="50% 0")),!k&&d==="auto"&&(k="auto"),e(de(t,["background"],{...t?.background,backgroundPosition:y,backgroundRepeat:v,backgroundSize:k}))},h=k=>{e(de(t,["background","backgroundPosition"],mAe(k)))},p=()=>e(de(t,["background","backgroundRepeat"],f===!0?"no-repeat":"repeat")),g=()=>e(de(t,["background","backgroundAttachment"],u==="fixed"?"scroll":"fixed")),b=!c&&a&&n==="contain"?r?.backgroundPosition:c;return(0,Be.jsxs)(Ie.__experimentalVStack,{spacing:3,className:"single-column",children:[(0,Be.jsx)(Ie.FocalPointPicker,{label:(0,Mt.__)("Focal point"),url:s,value:pAe(b),onChange:h}),(0,Be.jsx)(Ie.ToggleControl,{label:(0,Mt.__)("Fixed background"),checked:u==="fixed",onChange:g}),(0,Be.jsxs)(Ie.__experimentalToggleGroupControl,{size:"__unstable-large",label:(0,Mt.__)("Size"),value:d,onChange:m,isBlock:!0,help:fAe(n||r?.backgroundSize),children:[(0,Be.jsx)(Ie.__experimentalToggleGroupControlOption,{value:"cover",label:(0,Mt._x)("Cover","Size option for background image control")},"cover"),(0,Be.jsx)(Ie.__experimentalToggleGroupControlOption,{value:"contain",label:(0,Mt._x)("Contain","Size option for background image control")},"contain"),(0,Be.jsx)(Ie.__experimentalToggleGroupControlOption,{value:"auto",label:(0,Mt._x)("Tile","Size option for background image control")},"tile")]}),(0,Be.jsxs)(Ie.__experimentalHStack,{justify:"flex-start",spacing:2,as:"span",children:[(0,Be.jsx)(Ie.__experimentalUnitControl,{"aria-label":(0,Mt.__)("Background image width"),onChange:m,value:n,size:"__unstable-large",__unstableInputWidth:"100px",min:0,placeholder:(0,Mt.__)("Auto"),disabled:d!=="auto"||d===void 0}),(0,Be.jsx)(Ie.ToggleControl,{label:(0,Mt.__)("Repeat"),checked:f,onChange:p,disabled:d==="cover"})]})]})}function vue({value:e,onChange:t,inheritedValue:o=e,settings:r,defaultValues:n={}}){let{globalStyles:i,_links:s}=(0,XS.useSelect)(k=>{let{getSettings:v}=k(x),y=v();return{globalStyles:y[Ri],_links:y[tx]}},[]),a=(0,Dc.useMemo)(()=>{let k={background:{}};return o?.background?(Object.entries(o?.background).forEach(([v,y])=>{k.background[v]=lb(y,{styles:i,_links:s})}),k):o},[i,s,o]),c=()=>t(de(e,["background"],{})),{title:u,url:d}=e?.background?.backgroundImage||{...a?.background?.backgroundImage},f=cf(e)||cf(a),m=e?.background?.backgroundImage||o?.background?.backgroundImage,h=f&&m!=="none"&&(r?.background?.backgroundSize||r?.background?.backgroundPosition||r?.background?.backgroundRepeat),[p,g]=(0,Dc.useState)(!1),b=(0,Dc.useRef)();return(0,Be.jsx)("div",{ref:b,className:D("block-editor-global-styles-background-panel__inspector-media-replace-container",{"is-open":p}),children:h?(0,Be.jsx)(hAe,{label:u,filename:u,url:d,onToggle:g,hasImageValue:f,onReset:c,containerRef:b,children:(0,Be.jsxs)(Ie.__experimentalVStack,{spacing:3,className:"single-column",children:[(0,Be.jsx)(mue,{onChange:t,style:e,inheritedValue:a,displayInPanel:!0,onResetImage:()=>{g(!1),c()},onRemoveImage:()=>g(!1),defaultValues:n,containerRef:b}),(0,Be.jsx)(bAe,{onChange:t,style:e,defaultValues:n,inheritedValue:a})]})}):(0,Be.jsx)(mue,{onChange:t,style:e,inheritedValue:a,defaultValues:n,onResetImage:()=>{g(!1),c()},onRemoveImage:()=>g(!1),containerRef:b})})}var uf=l(w(),1),vAe={backgroundImage:!0,gradient:!0};function kue(e,t){return JS.Platform.OS==="web"&&e?.background?.[t]}function eR(e){let{backgroundImage:t,gradient:o}=e?.background||{};return JS.Platform.OS==="web"&&(t||o)}function cf(e){return!!e?.background?.backgroundImage?.id||typeof e?.background?.backgroundImage=="string"||!!e?.background?.backgroundImage?.url}function Nz(e){return typeof e?.background?.gradient=="string"&&e?.background?.gradient!==""}function kAe({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n,headerLabel:i}){let s=Vo();return(0,uf.jsx)(J2.__experimentalToolsPanel,{label:i,resetAll:()=>{let c=e(o);t(c)},panelId:r,hasInnerWrapper:!0,className:"background-block-support-panel",__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last",dropdownMenuProps:s,children:(0,uf.jsx)("div",{className:"background-block-support-panel__inner-wrapper",children:n})})}function tR({as:e=kAe,value:t,onChange:o,inheritedValue:r,settings:n,panelId:i,defaultControls:s=vAe,defaultValues:a={},headerLabel:c=(0,QS.__)("Background")}){let u=Ap(n),d=n?.color?.customGradient,f=u.length>0||d,m=kue(n,"gradient"),h=f&&m,p=kue(n,"backgroundImage"),g=(0,JS.useCallback)(B=>({...B,background:{},color:m?{...B?.color,gradient:void 0}:B?.color}),[m]);if(!h&&!p)return null;let b=B=>Vr({settings:n},"",B),k=B=>{let T=u.flatMap(({gradients:E})=>E).find(({gradient:E})=>E===B);return T?"var:preset|gradient|"+T.slug:B},v=()=>o(de(t,["background","backgroundImage"],void 0)),y=()=>{let B=de(t,["background","gradient"],void 0);B=de(B,["color","gradient"],void 0),o(B)},_=b(t?.background?.gradient??t?.color?.gradient),S=b(r?.background?.gradient??r?.color?.gradient),C=B=>{let P=de(t,["background","gradient"],k(B));P=de(P,["color","gradient"],void 0),o(P)};return(0,uf.jsxs)(e,{resetAllFilter:g,value:t,onChange:o,panelId:i,headerLabel:c,children:[p&&(0,uf.jsx)(J2.__experimentalToolsPanelItem,{className:"block-editor-background-panel__item",hasValue:()=>cf(t),label:(0,QS.__)("Image"),onDeselect:v,isShownByDefault:s.backgroundImage,panelId:i,children:(0,uf.jsx)(vue,{value:t,onChange:o,settings:n,inheritedValue:r,defaultControls:s,defaultValues:a})}),h&&(0,uf.jsx)(Az,{className:"block-editor-background-panel__item",label:(0,QS.__)("Gradient"),hasValue:()=>Nz(t),resetValue:y,isShownByDefault:s.gradient,indicators:[_],tabs:[{key:"gradient",label:(0,QS.__)("Gradient"),inheritedValue:_??S,setValue:C,userValue:_,isGradient:!0}],colorGradientControlSettings:{gradients:u,disableCustomGradients:!d},panelId:i})]})}var Dp=l(N(),1);var wv=l(A(),1),oR=l(w(),1);function yue({states:e=[],value:t="default",onChange:o}){if(!e||e.length===0)return null;let r=[{label:(0,Dp.__)("Default"),value:"default"},...e.map(i=>({label:i.label,value:i.value}))],n=()=>r.find(s=>s.value===t)?.label||(0,Dp.__)("Default");return(0,oR.jsx)(wv.DropdownMenu,{icon:vr,label:(0,Dp.sprintf)((0,Dp.__)("State: %s"),n()),text:n(),toggleProps:{size:"compact",variant:"tertiary",iconPosition:"right"},children:({onClose:i})=>(0,oR.jsx)(wv.MenuGroup,{label:(0,Dp.__)("State"),children:r.map(s=>(0,oR.jsx)(wv.MenuItem,{onClick:()=>{o(s.value),i()},icon:t===s.value?Ts:null,children:s.label},s.value))})})}var nR=l(N(),1),Vz=l(w(),1),Fp="__experimentalBorder",t0="shadow",_ue=(e,t,o)=>{let r;return e.some(n=>n.colors.some(i=>i[t]===o?(r=i,!0):!1)),r},Vp=({colors:e,namedColor:t,customColor:o})=>{if(t){let n=_ue(e,"slug",t);if(n)return n}if(!o)return{color:void 0};let r=_ue(e,"color",o);return r||{color:o}};function rR(e){let t=/var:preset\|color\|(.+)/.exec(e);return t&&t[1]?t[1]:null}function wue(e){if((0,Dz.__experimentalHasSplitBorders)(e?.border))return{style:e,borderColor:void 0};let t=e?.border?.color,o=t?.startsWith("var:preset|color|")?t.substring(17):void 0,r={...e};return r.border={...r.border,color:o?void 0:t},{style:Le(r),borderColor:o}}function Cue(e){return(0,Dz.__experimentalHasSplitBorders)(e.style?.border)?e.style:{...e.style,border:{...e.style?.border,color:e.borderColor?"var:preset|color|"+e.borderColor:e.style?.border?.color}}}function yAe({label:e,children:t,resetAllFilter:o}){let r=(0,Cv.useCallback)(n=>{let i=Cue(n),s=o(i);return{...n,...wue(s)}},[o]);return(0,Vz.jsx)(fe,{group:"border",resetAllFilter:r,label:e,children:t})}function Bue({clientId:e,name:t,setAttributes:o,settings:r}){let n=F2(r),{style:i,borderColor:s}=(0,xue.useSelect)(d=>{if(!n)return{};let{style:f,borderColor:m}=d(x).getBlockAttributes(e)||{};return{style:f,borderColor:m}},[e,n]),a=(0,Cv.useMemo)(()=>Cue({style:i,borderColor:s}),[i,s]),c=d=>{o(wue(d))};if(!n)return null;let u={...(0,e0.getBlockSupport)(t,[Fp,"__experimentalDefaultControls"]),...(0,e0.getBlockSupport)(t,[t0,"__experimentalDefaultControls"])};return(0,Vz.jsx)(z2,{as:yAe,panelId:e,settings:r,value:a,onChange:c,defaultControls:u})}function iR(e,t="any"){if(Cv.Platform.OS!=="web")return!1;let o=(0,e0.getBlockSupport)(e,Fp);return o===!0?!0:t==="any"?!!(o?.color||o?.radius||o?.width||o?.style):!!o?.[t]}function yv({blockName:e,hasBorderControl:t,hasShadowControl:o}={}){let r=gs(e),n=YS(r);return!t&&!o&&e&&(t=n?.hasBorderColor||n?.hasBorderStyle||n?.hasBorderWidth||n?.hasBorderRadius,o=n?.hasShadow),t&&o?(0,nR.__)("Border & Shadow"):o?(0,nR.__)("Shadow"):(0,nR.__)("Border")}function _Ae(e){return!iR(e,"color")||e.attributes.borderColor?e:{...e,attributes:{...e.attributes,borderColor:{type:"string"}}}}function Eue(e,t,o){if(!iR(t,"color")||We(t,Fp,"color"))return e;let r=Fz(o),n=D(e.className,r);return e.className=n||void 0,e}function Fz(e){let{borderColor:t,style:o}=e,r=Pi("border-color",t);return D({"has-border-color":t||o?.border?.color,[r]:!!r})}function SAe({name:e,borderColor:t,style:o}){let{colors:r}=Kd();if(!iR(e,"color")||We(e,Fp,"color"))return{};let{color:n}=Vp({colors:r,namedColor:t}),{color:i}=Vp({colors:r,namedColor:rR(o?.border?.top?.color)}),{color:s}=Vp({colors:r,namedColor:rR(o?.border?.right?.color)}),{color:a}=Vp({colors:r,namedColor:rR(o?.border?.bottom?.color)}),{color:c}=Vp({colors:r,namedColor:rR(o?.border?.left?.color)});return Eue({style:Le({borderTopColor:i||n,borderRightColor:s||n,borderBottomColor:a||n,borderLeftColor:c||n})||{}},e,{borderColor:t,style:o})}var zz={useBlockProps:SAe,addSaveProps:Eue,attributeKeys:["borderColor","style"],hasSupport(e){return iR(e,"color")}};(0,Sue.addFilter)("blocks.registerBlockType","core/border/addAttributes",_Ae);var Gz=l(pt(),1),Vc=l(Y(),1),df=l(O(),1),Due=l(z(),1);var Uz=l(Y(),1),Tue=l(z(),1),Hz=l(O(),1);var sR=l(w(),1),zp="background",jz={backgroundSize:"cover",backgroundPosition:"50% 50%"};function o0(e,t="any"){let o=(0,Uz.getBlockSupport)(e,zp);return o===!0?!0:t==="any"?!!o?.backgroundImage||!!o?.backgroundSize||!!o?.backgroundRepeat||!!o?.gradient:!!o?.[t]}function aR(e){if(!e||!e?.backgroundImage?.url)return;let t;return e?.backgroundSize||(t={backgroundSize:jz.backgroundSize}),e?.backgroundSize==="contain"&&!e?.backgroundPosition&&(t={backgroundPosition:jz.backgroundPosition}),t}function xAe({name:e,style:t}){if(!o0(e)||!t?.background?.backgroundImage)return;let o=aR(t?.background);if(o)return{style:{...o}}}function Iue(e){return cf(e)||Nz(e)?"has-background":""}function wAe({children:e,backgroundGradientSupported:t=!1}){let o=(0,Hz.useCallback)(r=>{let n=r.className?.includes("has-background")?r.className.split(" ").filter(i=>i!=="has-background").join(" ")||void 0:r.className;return{...r,className:n,style:Le({...r.style,background:void 0,color:t?{...r.style?.color,gradient:void 0}:r.style?.color})}},[t]);return(0,sR.jsx)(fe,{group:"background",resetAllFilter:o,children:e})}function Pue({clientId:e,name:t,setAttributes:o,settings:r}){let{style:n,className:i,inheritedValue:s}=(0,Tue.useSelect)(h=>{let{getBlockAttributes:p,getSettings:g}=h(x),b=g(),k=p(e);return{style:k?.style,className:k?.className,inheritedValue:b[Ri]?.blocks?.[t]}},[e,t]),a=o0(t,"gradient"),c=(0,Hz.useCallback)(({children:h})=>(0,sR.jsx)(wAe,{backgroundGradientSupported:a,children:h}),[a]);if(!eR(r)||!o0(t))return null;let u=h=>{let p=a&&!!n?.color?.gradient,g={style:Le(a?{...h,color:{...h?.color,gradient:void 0}}:h)};p&&h?.background?.gradient?g.className=D(i,"has-background"):!h?.background?.gradient&&i?.includes("has-background")&&(g.className=i.split(" ").filter(b=>b!=="has-background").join(" ")||void 0),o(g)},d=a&&!n?.background?.gradient&&n?.color?.gradient?{...n,background:{...n?.background,gradient:n?.color?.gradient}}:n,f={...r,background:{...r.background,backgroundSize:r?.background?.backgroundSize&&o0(t,"backgroundSize")}},m=(0,Uz.getBlockSupport)(t,[zp,"__experimentalDefaultControls"]);return(0,sR.jsx)(tR,{inheritedValue:s,as:c,panelId:e,defaultValues:jz,settings:f,onChange:u,defaultControls:m,value:d})}var Rue={useBlockProps:xAe,attributeKeys:["style"],hasSupport:o0};var r0=l(O(),1),Aue=l(z(),1),Lue=l(Y(),1);var Nue=l(w(),1);function lR(e,t){return e.ownerDocument.defaultView.getComputedStyle(e).getPropertyValue(t)}function Oue(e,t){if(!e||!t)return{};let o=di(t,"color.text",{fallback:!0}),r=di(t,"color.background",{fallback:!0}),n=e.querySelector(o)||e,i=e.querySelector(r)||e,s=e.querySelector("a"),a=lR(n,"color"),c=s&&s.textContent?lR(s,"color"):void 0,u=i,d=lR(u,"background-color");for(;d==="rgba(0, 0, 0, 0)"&&u.parentNode&&u.parentNode.nodeType===u.parentNode.ELEMENT_NODE;)u=u.parentNode,d=lR(u,"background-color");return{textColor:a,backgroundColor:d,linkColor:c}}function CAe(e,t){return Object.keys(t).some(r=>e[r]!==t[r])?t:e}function Mue({clientId:e,name:t}){let o=rt(e),[r,n]=(0,r0.useReducer)(CAe,{}),i=(0,Aue.useSelect)(s=>t?s(Lue.store).getBlockType(t):void 0,[t]);return(0,r0.useLayoutEffect)(()=>{!o||!i||window.requestAnimationFrame(()=>window.requestAnimationFrame(()=>n(Oue(o,i))))}),(0,r0.useLayoutEffect)(()=>{if(!o||!i)return;let s=new window.MutationObserver(()=>{n(Oue(o,i))});return s.observe(o,{attributes:!0,attributeFilter:["class","style"]}),()=>{s.disconnect()}},[o,i]),(0,Nue.jsx)(QI,{backgroundColor:r.backgroundColor,textColor:r.textColor,linkColor:r.linkColor,enableAlphaChecker:!0})}var cR=l(w(),1),mr="color",uR=e=>{let t=(0,Vc.getBlockSupport)(e,mr);return t&&(t.link===!0||t.gradient===!0||t.background!==!1||t.text!==!1)},BAe=e=>{if(df.Platform.OS!=="web")return!1;let t=(0,Vc.getBlockSupport)(e,mr);return t!==null&&typeof t=="object"&&!!t.link},Wz=e=>{let t=(0,Vc.getBlockSupport)(e,mr);return t!==null&&typeof t=="object"&&!!t.gradients},EAe=e=>{let t=(0,Vc.getBlockSupport)(e,mr);return t&&t.background!==!1},TAe=e=>{let t=(0,Vc.getBlockSupport)(e,mr);return t&&t.text!==!1};function IAe(e){return uR(e)&&(e.attributes.backgroundColor||Object.assign(e.attributes,{backgroundColor:{type:"string"}}),e.attributes.textColor||Object.assign(e.attributes,{textColor:{type:"string"}}),Wz(e)&&!e.attributes.gradient&&Object.assign(e.attributes,{gradient:{type:"string"}})),e}function Vue(e,t,o){if(!uR(t)||We(t,mr))return e;let r=Wz(t),{backgroundColor:n,textColor:i,gradient:s,style:a}=o,c=g=>!We(t,mr,g),u=c("text")?Pi("color",i):void 0,d=c("gradients")?Ih(s):void 0,f=c("background")?Pi("background-color",n):void 0,m=c("background")||c("gradients"),h=n||a?.color?.background||r&&(s||a?.color?.gradient),p=D(e.className,u,d,{[f]:(!r||!a?.color?.gradient)&&!!f,"has-text-color":c("text")&&(i||a?.color?.text),"has-background":m&&h,"has-link-color":c("link")&&a?.elements?.link?.color});return e.className=p||void 0,e}function Fue(e){let t=e?.color?.text,o=t?.startsWith("var:preset|color|")?t.substring(17):void 0,r=e?.color?.background,n=r?.startsWith("var:preset|color|")?r.substring(17):void 0,i=e?.color?.gradient,s=i?.startsWith("var:preset|gradient|")?i.substring(20):void 0,a={...e};return a.color={...a.color,text:o?void 0:t,background:n?void 0:r,gradient:s?void 0:i},{style:Le(a),textColor:o,backgroundColor:n,gradient:s}}function zue(e){return{...e.style,color:{...e.style?.color,text:e.textColor?"var:preset|color|"+e.textColor:e.style?.color?.text,background:e.backgroundColor?"var:preset|color|"+e.backgroundColor:e.style?.color?.background,gradient:e.gradient?"var:preset|gradient|"+e.gradient:e.style?.color?.gradient}}}function PAe({children:e,resetAllFilter:t}){let o=(0,df.useCallback)(r=>{let n=zue(r),i=t(n);return{...r,...Fue(i)}},[t]);return(0,cR.jsx)(fe,{group:"color",resetAllFilter:o,children:e})}function dR({clientId:e,name:t,setAttributes:o,settings:r,asWrapper:n,label:i,defaultControls:s}){let a=H2(r),{style:c,textColor:u,backgroundColor:d,gradient:f}=(0,Due.useSelect)(b=>{if(!a)return{};let{style:k,textColor:v,backgroundColor:y,gradient:_}=b(x).getBlockAttributes(e)||{};return{style:k,textColor:v,backgroundColor:y,gradient:_}},[e,a]),m=(0,df.useMemo)(()=>zue({style:c,textColor:u,backgroundColor:d,gradient:f}),[c,u,d,f]),h=b=>{o(Fue(b))};if(!a)return null;s=s||(0,Vc.getBlockSupport)(t,[mr,"__experimentalDefaultControls"]);let p=df.Platform.OS==="web"&&!m?.color?.gradient&&(r?.color?.text||r?.color?.link)&&(0,Vc.getBlockSupport)(t,[mr,"enableContrastChecker"])!==!1;return(0,cR.jsx)(G2,{as:n||PAe,panelId:e,settings:r,value:m,onChange:h,defaultControls:s,label:i,enableContrastChecker:(0,Vc.getBlockSupport)(t,[mr,"enableContrastChecker"])!==!1,children:p&&(0,cR.jsx)(Mue,{clientId:e,name:t})})}function RAe({name:e,backgroundColor:t,textColor:o,gradient:r,style:n}){let[i,s,a]=pe("color.palette.custom","color.palette.theme","color.palette.default"),c=(0,df.useMemo)(()=>[...i||[],...s||[],...a||[]],[i,s,a]);if(!uR(e)||We(e,mr))return{};let u={};o&&!We(e,mr,"text")&&(u.color=wa(c,o)?.color),t&&!We(e,mr,"background")&&(u.backgroundColor=wa(c,t)?.color);let d=Vue({style:u},e,{textColor:o,backgroundColor:t,gradient:r,style:n}),f=t||n?.color?.background||r||n?.color?.gradient;return{...d,className:D(d.className,!f&&Iue(n))}}var $z={useBlockProps:RAe,addSaveProps:Vue,attributeKeys:["backgroundColor","textColor","gradient","style"],hasSupport:uR},OAe={linkColor:[["style","elements","link","color","text"]],textColor:[["textColor"],["style","color","text"]],backgroundColor:[["backgroundColor"],["style","color","background"]],gradient:[["gradient"],["style","color","gradient"]]};function AAe(e,t,o,r){let n=e.name,i={linkColor:BAe(n),textColor:TAe(n),backgroundColor:EAe(n),gradient:Wz(n)};return fR(i,OAe,e,t,o,r)}(0,Gz.addFilter)("blocks.registerBlockType","core/color/addAttribute",IAe);(0,Gz.addFilter)("blocks.switchToBlockType.transformedBlock","core/color/addTransforms",AAe);var Tr=l(w(),1);function LAe({blockName:e,clientId:t,contentClientIds:o}){let r=gs(e),{updateBlockAttributes:n}=(0,mR.useDispatch)(x),{hasButtons:i,hasHeading:s}=(0,mR.useSelect)(c=>{let u=c(x).getBlockNamesByClientId(o);return{hasButtons:u.includes("core/buttons"),hasHeading:u.includes("core/heading")}},[o]);return(0,Tr.jsx)(dR,{clientId:t,name:e,settings:r,setAttributes:c=>{n(t,c)},asWrapper:Oz,label:(0,Bv.__)("Color"),defaultControls:{text:!0,background:!0,button:i,heading:s}})}var NAe=({blockName:e,clientId:t,hasBlockStyles:o,isSectionBlock:r,contentClientIds:n})=>{let i=yv({blockName:e});return(0,Tr.jsxs)(Tr.Fragment,{children:[o&&(0,Tr.jsx)(Ib,{clientId:t}),r&&(0,Tr.jsx)(LAe,{blockName:e,clientId:t,contentClientIds:n}),!r&&(0,Tr.jsxs)(Tr.Fragment,{children:[(0,Tr.jsx)(fe.Slot,{group:"color",label:(0,Bv.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,Tr.jsx)(fe.Slot,{group:"background",label:(0,Bv.__)("Background image"),className:"background-block-support-panel__inner-wrapper"}),(0,Tr.jsx)(fe.Slot,{group:"filter"}),(0,Tr.jsx)(fe.Slot,{group:"typography",label:(0,Bv.__)("Typography")}),(0,Tr.jsx)(fe.Slot,{group:"dimensions",label:(0,Bv.__)("Dimensions")}),(0,Tr.jsx)(fe.Slot,{group:"border",label:i}),(0,Tr.jsx)(fe.Slot,{group:"styles"})]})]})},jue=NAe;var Uue=l(A(),1),Hue=l(N(),1);var pR=l(Y(),1),hR=l(z(),1),yi=l(A(),1);var bs=l(w(),1);function gR({clientIds:e,onSelect:t,onSwitchToListView:o,hasListViewTab:r}){return e.length?(0,bs.jsx)(yi.__experimentalVStack,{spacing:1,children:e.map(n=>(0,bs.jsx)(MAe,{onSelect:t,onSwitchToListView:o,hasListViewTab:r,clientId:n},n))}):null}function MAe({clientId:e,onSelect:t,onSwitchToListView:o,hasListViewTab:r}){let n=Pt(e),{isSelected:i,childBlocks:s,hasListViewSupport:a,blockName:c}=(0,hR.useSelect)(g=>{let{isBlockSelected:b,hasSelectedInnerBlock:k,getBlockOrder:v,getBlockName:y}=g(x),_=y(e);return{isSelected:b(e)||k(e,!0),childBlocks:v(e),hasListViewSupport:_==="core/navigation"||(0,pR.hasBlockSupport)(_,"listView"),blockName:_}},[e]),u=(0,pR.getBlockType)(c),f=Sr({clientId:e,context:"list-view"})||u?.title||c,{selectBlock:m}=(0,hR.useDispatch)(x),p=s&&s.length>0&&r&&a;return(0,bs.jsx)(yi.Button,{__next40pxDefaultSize:!0,className:"block-editor-block-quick-navigation__item",isPressed:i,onClick:async()=>{await m(e),p&&o&&o(e),t&&t(e)},children:(0,bs.jsxs)(yi.Flex,{children:[(0,bs.jsx)(yi.FlexItem,{children:(0,bs.jsx)(Ae,{icon:n?.icon})}),(0,bs.jsx)(yi.FlexBlock,{style:{textAlign:"left"},children:(0,bs.jsx)(yi.__experimentalTruncate,{children:f})}),p&&(0,bs.jsx)(yi.FlexItem,{children:(0,bs.jsx)(Ee,{icon:Go,size:24})})]})})}var Ev=l(w(),1),DAe=({contentClientIds:e,onSwitchToListView:t,hasListViewTab:o})=>{if(!e||e.length===0)return null;let r=window?.__experimentalContentOnlyInspectorFields;return(0,Ev.jsx)(Ev.Fragment,{children:!r&&(0,Ev.jsx)(Uue.PanelBody,{title:(0,Hue.__)("Content"),children:(0,Ev.jsx)(gR,{clientIds:e,onSwitchToListView:t,hasListViewTab:o})})})},bR=DAe;var Qo=l(w(),1),{Tabs:ff}=M(Iv.privateApis);function Kz({blockName:e,clientId:t,hasBlockStyles:o,tabs:r,isSectionBlock:n,contentClientIds:i}){let s=(0,ma.useRef)(null),a=(0,Tv.useSelect)(_=>_(Gue.store).get("core","showIconLabels"),[]),{requestedTab:c}=(0,Tv.useSelect)(_=>({requestedTab:M(_(x)).getRequestedInspectorTab()})),[u,d]=(0,ma.useState)(()=>c?.tabName??r[0]?.name),f=(0,ma.useRef)(!1),m=(0,ma.useRef)(!1),{__unstableSetOpenListViewPanel:h,__unstableIncrementListViewExpandRevision:p,__unstableSetAllListViewPanelsOpen:g}=(0,Tv.useDispatch)(x),{clearRequestedInspectorTab:b}=M((0,Tv.useDispatch)(x));(0,ma.useEffect)(()=>{f.current=!1},[t]),(0,ma.useEffect)(()=>{c&&(d(c.tabName),c.tabName===Nc.name&&c.options?.openPanel&&(h(c.options.openPanel),p()),m.current=!0,f.current=!0,b())},[c,h,p,b]),(0,ma.useEffect)(()=>{u===Nc.name&&!f.current&&(g(),p())},[t,u,g,p]),(0,ma.useEffect)(()=>{if(!r?.length||f.current&&r.some(S=>S.name===u))return;let _=r[0]?.name;u!==_&&d(_)},[r,u]);let k=_=>{d(_),f.current=!0,_===Nc.name&&!m.current&&(g(),p()),m.current=!1},v=r.some(_=>_.name===Nc.name),y=_=>{v&&(h(_),p(),m.current=!0,k(Nc.name))};return(0,Qo.jsx)("div",{className:"block-editor-block-inspector__tabs",children:(0,Qo.jsxs)(ff,{selectedTabId:u,onSelect:k,children:[(0,Qo.jsx)(ff.TabList,{children:r.map(_=>a?(0,Qo.jsx)(ff.Tab,{tabId:_.name,children:_.title},_.name):(0,Qo.jsx)(Iv.Tooltip,{text:_.title,children:(0,Qo.jsx)(ff.Tab,{tabId:_.name,"aria-label":_.title,children:(0,Qo.jsx)(Iv.Icon,{icon:_.icon})})},_.name))}),(0,Qo.jsxs)(ff.TabPanel,{tabId:_2.name,focusable:!1,children:[(0,Qo.jsx)(bR,{contentClientIds:i,onSwitchToListView:y,hasListViewTab:v}),(0,Qo.jsx)(fe.Slot,{group:"content"})]}),(0,Qo.jsxs)(ff.TabPanel,{tabId:Nc.name,focusable:!1,children:[(0,Qo.jsx)(fe.Slot,{group:"list",ref:s}),(0,Qo.jsx)(rT,{listViewRef:s})]}),(0,Qo.jsx)(ff.TabPanel,{tabId:k2.name,focusable:!1,children:(0,Qo.jsx)(hce,{showAdvancedControls:!!e})}),(0,Qo.jsx)(ff.TabPanel,{tabId:y2.name,focusable:!1,children:(0,Qo.jsx)(jue,{blockName:e,clientId:t,hasBlockStyles:o,isSectionBlock:n,contentClientIds:i})})]},t)})}var _i=l(A(),1),Wue=l(z(),1);var VAe=[];function FAe(e,t={}){return t[e]!==void 0?t[e]:t.default!==void 0?t.default:!0}function $ue(e,t,o,r){let n=[],{bindings:i,border:s,color:a,content:c,default:u,dimensions:d,list:f,position:m,styles:h,typography:p,effects:g}=es,b=(0,_i.__experimentalUseSlotFills)(f.name),k=!!b&&b.length,v=(0,_i.__experimentalUseSlotFills)(c.name),y=!!v&&v.length,S=[...(0,_i.__experimentalUseSlotFills)(s.name)||[],...(0,_i.__experimentalUseSlotFills)(a.name)||[],...(0,_i.__experimentalUseSlotFills)(d.name)||[],...(0,_i.__experimentalUseSlotFills)(h.name)||[],...(0,_i.__experimentalUseSlotFills)(p.name)||[],...(0,_i.__experimentalUseSlotFills)(g.name)||[]].length,C=[...(0,_i.__experimentalUseSlotFills)(Sd.slotName)||[],...(0,_i.__experimentalUseSlotFills)(i.name)||[]],B=[...(0,_i.__experimentalUseSlotFills)(u.name)||[],...(0,_i.__experimentalUseSlotFills)(m.name)||[],...k&&S>1?C:[]],P=window?.__experimentalContentOnlyInspectorFields,T=y||!P&&t?.length;T&&n.push(_2),k&&n.push(Nc),(B.length||C.length&&(T||k))&&n.push(k2),(r||S)&&n.push(y2);let E=(0,Wue.useSelect)(I=>I(x).getSettings().blockInspectorTabs,[]);return FAe(e,E)?n:VAe}var Kue=l(A(),1);var Yz=l(w(),1),{Fill:zAe,Slot:jAe}=(0,Kue.createSlotFill)(Symbol("InspectorControlsLastItem")),Yue=e=>Pe()[Es]?(0,Yz.jsx)(zAe,{...e}):null;Yue.Slot=function(t){return(0,Yz.jsx)(jAe,{...t})};var vR=Yue;var que=l(z(),1);function Zue(e){return(0,que.useSelect)(t=>{if(e){let o=t(x).getSettings().blockInspectorAnimation,r=o?.animationParent,{getSelectedBlockClientId:n,getBlockParentsByBlockName:i}=t(x),s=n();return!i(s,r,!0)[0]&&e.name!==r?null:o?.[e.name]}return null},[e])}var we=l(w(),1);function Jue({blockName:e,showAdvancedControls:t=!0,showPositionControls:o=!0,showBindingsControls:r=!0}){let n=yv({blockName:e});return(0,we.jsxs)(we.Fragment,{children:[(0,we.jsx)(fe.Slot,{}),(0,we.jsx)(fe.Slot,{group:"color",label:(0,Pv.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,we.jsx)(fe.Slot,{group:"background",label:(0,Pv.__)("Background image"),className:"background-block-support-panel__inner-wrapper"}),(0,we.jsx)(fe.Slot,{group:"typography",label:(0,Pv.__)("Typography")}),(0,we.jsx)(fe.Slot,{group:"dimensions",label:(0,Pv.__)("Dimensions")}),(0,we.jsx)(fe.Slot,{group:"border",label:n}),(0,we.jsx)(fe.Slot,{group:"styles"}),o&&(0,we.jsx)(w2,{}),r&&(0,we.jsx)(fe.Slot,{group:"bindings"}),t&&(0,we.jsx)("div",{children:(0,we.jsx)(S2,{})})]})}function UAe(){let{selectedBlockCount:e,renderedBlockName:t,renderedBlockClientId:o,blockType:r,isSectionBlock:n,isSectionBlockInSelection:i,hasBlockStyles:s,editedContentOnlySection:a}=(0,qz.useSelect)(g=>{let{getSelectedBlockClientId:b,getSelectedBlockClientIds:k,getSelectedBlockCount:v,getBlockName:y,getParentSectionBlock:_,isSectionBlock:S,getEditedContentOnlySection:C,isWithinEditedContentOnlySection:B}=M(g(x)),{getBlockStyles:P}=g(mf.store),T=b(),L=B(T)?T:_(T)||T,I=L&&y(L),R=I&&(0,mf.getBlockType)(I),j=k().some(U=>S(U)),H=I&&P(I),F=H&&H.length>0;return{selectedBlockCount:v(),renderedBlockClientId:L,renderedBlockName:I,blockType:R,isSectionBlockInSelection:j,isSectionBlock:S(L),hasBlockStyles:F,editedContentOnlySection:C()}},[]),c=(0,qz.useSelect)(g=>{if(!n||!o)return[];let{getClientIdsOfDescendants:b,getBlockName:k,getBlockEditingMode:v}=M(g(x)),y=b(o),_=new Set;return y.forEach(S=>{let C=k(S);(C==="core/navigation"||(0,mf.hasBlockSupport)(C,"listView"))&&b(S).forEach(P=>_.add(P))}),y.filter(S=>!_.has(S)&&v(S)==="contentOnly")},[n,o]),u=$ue(r?.name,c,n,s),d=u?.length>1,f=Zue(r),m=e>1;if(m&&!i)return(0,we.jsxs)("div",{className:"block-editor-block-inspector",children:[(0,we.jsx)(Cz,{}),d?(0,we.jsx)(Kz,{tabs:u}):(0,we.jsx)(Jue,{blockName:t,showAdvancedControls:!1,showPositionControls:!1,showBindingsControls:!1})]});if(m&&i)return(0,we.jsx)("div",{className:"block-editor-block-inspector",children:(0,we.jsx)(Cz,{})});let h=t===(0,mf.getUnregisteredTypeHandlerName)();return!r||!o||h?(0,we.jsx)("span",{className:"block-editor-block-inspector__no-blocks",children:(0,Pv.__)("No block selected.")}):(0,we.jsx)(HAe,{animate:f,wrapper:g=>(0,we.jsx)(GAe,{blockInspectorAnimationSettings:f,renderedBlockClientId:o,children:g}),children:(0,we.jsx)(WAe,{renderedBlockClientId:o,blockName:r.name,isSectionBlock:n,availableTabs:u,contentClientIds:c,hasBlockStyles:s,editedContentOnlySection:a})})}var HAe=({animate:e,wrapper:t,children:o})=>e?t(o):o,GAe=({blockInspectorAnimationSettings:e,renderedBlockClientId:t,children:o})=>{let r=e&&e.enterDirection==="leftToRight"?-50:50;return(0,we.jsx)(Xue.__unstableMotion.div,{animate:{x:0,opacity:1,transition:{ease:"easeInOut",duration:.14}},initial:{x:r,opacity:0},children:o},t)},WAe=({renderedBlockClientId:e,blockName:t,isSectionBlock:o,availableTabs:r,contentClientIds:n,hasBlockStyles:i,editedContentOnlySection:s})=>{let a=(0,Que.useRef)(null),c=r?.length>1,u=s&&s!==e,d=Pt(s),f=Pt(e),m=f.isSynced;return(0,we.jsxs)("div",{className:"block-editor-block-inspector",children:[u&&(0,we.jsx)(Xy,{...d,className:d?.isSynced&&"is-synced",parentClientId:s}),(0,we.jsx)(Xy,{...f,allowParentNavigation:!0,className:m&&"is-synced",isChild:u,clientId:e}),(0,we.jsx)(VG,{clientId:e}),(0,we.jsx)(sce,{clientId:e}),(0,we.jsx)(WI,{blockClientId:e}),c&&(0,we.jsx)(we.Fragment,{children:(0,we.jsx)(Kz,{hasBlockStyles:i,clientId:e,blockName:t,tabs:r,isSectionBlock:o,contentClientIds:n})}),!c&&(0,we.jsxs)(we.Fragment,{children:[i&&(0,we.jsx)(Ib,{clientId:e}),(0,we.jsx)(bR,{contentClientIds:n}),(0,we.jsx)(fe.Slot,{group:"content"}),(0,we.jsx)(fe.Slot,{group:"list",ref:a}),(0,we.jsx)(rT,{listViewRef:a}),!o&&(0,we.jsx)(Jue,{blockName:t})]}),(0,we.jsx)(vR.Slot,{}),(0,we.jsx)(b2,{},"back")]})},ede=UAe;var Zz=l(Re(),1);var tde=l(w(),1),ode=()=>((0,Zz.default)("__unstableUseClipboardHandler",{alternative:"BlockCanvas or WritingFlow",since:"6.4",version:"6.7"}),e_());function rde(e){return(0,Zz.default)("CopyHandler",{alternative:"BlockCanvas or WritingFlow",since:"6.4",version:"6.7"}),(0,tde.jsx)("div",{...e,ref:e_()})}var nde=l(z(),1),Xz=l(O(),1);var Qz=l(w(),1),$Ae=()=>{};function KAe({rootClientId:e,clientId:t,isAppender:o,showInserterHelpPanel:r,showMostUsedBlocks:n=!1,__experimentalInsertionIndex:i,__experimentalInitialTab:s,__experimentalInitialCategory:a,__experimentalFilterValue:c,onPatternCategorySelection:u,onSelect:d=$Ae,shouldFocusBlock:f=!1,onClose:m},h){let{destinationRootClientId:p}=(0,nde.useSelect)(g=>{let{getBlockRootClientId:b}=g(x);return{destinationRootClientId:e||b(t)||void 0}},[t,e]);return(0,Qz.jsx)(R3,{onSelect:d,rootClientId:p,clientId:t,isAppender:o,showInserterHelpPanel:r,showMostUsedBlocks:n,__experimentalInsertionIndex:i,__experimentalFilterValue:c,onPatternCategorySelection:u,__experimentalInitialTab:s,__experimentalInitialCategory:a,shouldFocusBlock:f,ref:h,onClose:m})}var Jz=(0,Xz.forwardRef)(KAe);function YAe(e,t){return(0,Qz.jsx)(Jz,{...e,onPatternCategorySelection:void 0,ref:t})}var ide=(0,Xz.forwardRef)(YAe);var sde=l(Re(),1);function ade(){return(0,sde.default)("wp.blockEditor.MultiSelectScrollIntoView",{hint:"This behaviour is now built-in.",since:"5.8"}),null}var lde=l(X(),1),n0=l(Ve(),1),cde=l(z(),1),pf=l(ot(),1);var ude=l(w(),1),qAe=window.navigator.userAgent.indexOf("Trident")!==-1,ZAe=new Set([pf.UP,pf.DOWN,pf.LEFT,pf.RIGHT]),XAe=.75;function e6(){let e=(0,cde.useSelect)(t=>t(x).hasSelectedBlock(),[]);return(0,lde.useRefEffect)(t=>{if(!e)return;let{ownerDocument:o}=t,{defaultView:r}=o,n,i,s;function a(){n||(n=r.requestAnimationFrame(()=>{m(),n=null}))}function c(g){i&&r.cancelAnimationFrame(i),i=r.requestAnimationFrame(()=>{u(g),i=null})}function u({keyCode:g}){if(!h())return;let b=(0,n0.computeCaretRect)(r);if(!b)return;if(!s){s=b;return}if(ZAe.has(g)){s=b;return}let k=b.top-s.top;if(k===0)return;let v=(0,n0.getScrollContainer)(t);if(!v)return;let y=v===o.body||v===o.documentElement,_=y?r.scrollY:v.scrollTop,S=y?0:v.getBoundingClientRect().top,C=y?s.top/r.innerHeight:(s.top-S)/(r.innerHeight-S);if(_===0&&C<XAe&&p()){s=b;return}let B=y?r.innerHeight:v.clientHeight;if(s.top+s.height>S+B||s.top<S){s=b;return}y?r.scrollBy(0,k):v.scrollTop+=k}function d(){o.addEventListener("selectionchange",f)}function f(){o.removeEventListener("selectionchange",f),m()}function m(){h()&&(s=(0,n0.computeCaretRect)(r))}function h(){return t.contains(o.activeElement)&&o.activeElement.isContentEditable}function p(){let g=t.querySelectorAll('[contenteditable="true"]');return g[g.length-1]===o.activeElement}return r.addEventListener("scroll",a,!0),r.addEventListener("resize",a,!0),t.addEventListener("keydown",c),t.addEventListener("keyup",u),t.addEventListener("mousedown",d),t.addEventListener("touchstart",d),()=>{r.removeEventListener("scroll",a,!0),r.removeEventListener("resize",a,!0),t.removeEventListener("keydown",c),t.removeEventListener("keyup",u),t.removeEventListener("mousedown",d),t.removeEventListener("touchstart",d),o.removeEventListener("selectionchange",f),r.cancelAnimationFrame(n),r.cancelAnimationFrame(i)}},[e])}function QAe({children:e}){return(0,ude.jsx)("div",{ref:e6(),className:"block-editor__typewriter",children:e})}var JAe=qAe?e=>e.children:QAe,dde=JAe;var jp=l(O(),1),t6=l(Re(),1);var o6=l(w(),1),kR=(0,jp.createContext)({});kR.displayName="RenderedRefsContext";function eLe(e,t,o){let r={...e,[t]:e[t]?new Set(e[t]):new Set};return r[t].add(o),r}function r6({children:e,uniqueId:t,blockName:o=""}){let r=(0,jp.useContext)(kR),{name:n}=Pe();o=o||n;let i=(0,jp.useMemo)(()=>eLe(r,o,t),[r,o,t]);return(0,o6.jsx)(kR.Provider,{value:i,children:e})}function n6(e,t=""){let o=(0,jp.useContext)(kR),{name:r}=Pe();return t=t||r,!!o[t]?.has(e)}var fde=e=>((0,t6.default)("wp.blockEditor.__experimentalRecursionProvider",{since:"6.5",alternative:"wp.blockEditor.RecursionProvider"}),(0,o6.jsx)(r6,{...e})),mde=(...e)=>((0,t6.default)("wp.blockEditor.__experimentalUseHasRecursion",{since:"6.5",alternative:"wp.blockEditor.useHasRecursion"}),n6(...e));var _R=l(A(),1),i6=l(N(),1),s6=l(O(),1),hde=l(Qa(),1);var Si=l(A(),1);var pde=l(N(),1),Fc=l(w(),1);function yR({title:e,help:t,actions:o=[],onClose:r}){return(0,Fc.jsxs)(Si.__experimentalVStack,{className:"block-editor-inspector-popover-header",spacing:4,children:[(0,Fc.jsxs)(Si.__experimentalHStack,{alignment:"center",children:[(0,Fc.jsx)(Si.__experimentalHeading,{className:"block-editor-inspector-popover-header__heading",level:2,size:13,children:e}),(0,Fc.jsx)(Si.__experimentalSpacer,{}),o.map(({label:n,icon:i,onClick:s})=>(0,Fc.jsx)(Si.Button,{size:"small",className:"block-editor-inspector-popover-header__action",label:n,icon:i,variant:!i&&"tertiary",onClick:s,children:!i&&n},n)),r&&(0,Fc.jsx)(Si.Button,{size:"small",className:"block-editor-inspector-popover-header__action",label:(0,pde.__)("Close"),icon:qf,onClick:r})]}),t&&(0,Fc.jsx)(Si.__experimentalText,{children:t})]})}var Rv=l(w(),1);function tLe({onClose:e,onChange:t,showPopoverHeaderActions:o,isCompact:r,currentDate:n,title:i,...s},a){let c={startOfWeek:(0,hde.getSettings)().l10n.startOfWeek,onChange:t,currentDate:r?void 0:n,currentTime:r?n:void 0,...s},u=r?_R.TimePicker:_R.DateTimePicker;return(0,Rv.jsxs)("div",{ref:a,className:"block-editor-publish-date-time-picker",children:[(0,Rv.jsx)(yR,{title:i||(0,i6.__)("Publish"),actions:o?[{label:(0,i6.__)("Now"),onClick:()=>t?.(null)}]:void 0,onClose:e}),(0,Rv.jsx)(u,{...c})]})}var a6=(0,s6.forwardRef)(tLe);function oLe(e,t){return(0,Rv.jsx)(a6,{...e,showPopoverHeaderActions:!0,isCompact:!1,ref:t})}var gde=(0,s6.forwardRef)(oLe);var SR=l(z(),1),bde=l(O(),1);function go(e){let t=Pe(),{clientId:o=""}=t,{setBlockEditingMode:r,unsetBlockEditingMode:n}=(0,SR.useDispatch)(x),i=(0,SR.useSelect)(s=>o?null:s(x).getBlockEditingMode(),[o]);return(0,bde.useEffect)(()=>(e&&r(o,e),()=>{e&&n(o)}),[o,e,r,n]),o?t[W0]:i}var vde=l(Re(),1),kde=l(O(),1);function rLe(){return(0,vde.default)("wp.blockEditor.ToolSelector",{since:"6.9",hint:"The ToolSelector component no longer renders anything."}),null}var yde=(0,kde.forwardRef)(rLe);var s0=l(w(),1),Le=e=>{if(e===null||typeof e!="object"||Array.isArray(e))return e;let t=Object.entries(e).map(([o,r])=>[o,Le(r)]).filter(([,o])=>o!==void 0);return t.length?Object.fromEntries(t):void 0};function fR(e,t,o,r,n,i){if(Object.values(e??{}).every(c=>!c)||i.length===1&&o.innerBlocks.length===r.length)return o;let s=r[0]?.attributes;if(i.length>1&&r.length>1)if(r[n])s=r[n]?.attributes;else return o;let a=o;return Object.entries(e).forEach(([c,u])=>{u&&t[c].forEach(d=>{let f=Pl(s,d);f&&(a={...a,attributes:de(a.attributes,d,f)})})}),a}function We(e,t,o){let n=(0,_de.getBlockSupport)(e,t)?.__experimentalSkipSerialization;return Array.isArray(n)?n.includes(o):n}var zc=new WeakMap;function li({id:e,css:t}){return pc({id:e,css:t})}function pc({id:e,css:t,assets:o,__unstableType:r,variation:n,clientId:i}={}){let{setStyleOverride:s,deleteStyleOverride:a}=M((0,xR.useDispatch)(x)),c=(0,xR.useRegistry)(),u=(0,vs.useId)();(0,vs.useEffect)(()=>{if(!t&&!o)return;let d=e||u,f={id:e,css:t,assets:o,__unstableType:r,variation:n,clientId:i};return zc.get(c)||zc.set(c,[]),zc.get(c).push([d,f]),window.queueMicrotask(()=>{zc.get(c)?.length&&c.batch(()=>{zc.get(c).forEach(m=>{s(...m)}),zc.set(c,[])})}),()=>{zc.get(c)?.find(([h])=>h===d)?zc.set(c,zc.get(c).filter(([h])=>h!==d)):a(d)}},[e,t,i,o,r,u,s,a,c,n])}function gs(e,t){let[o,r,n,i,s,a,c,u,d,f,m,h,p,g,b,k,v,y,_,S,C,B,P,T,E,L,I,R,V,j,H,F,U,G,W,J,le,oe,re,Q,$,ee,K,te,ne,q,se,he,me,xe,De,lt,Dt,so,or,Je,hr,Zt,ao,Ze,Vt,et,Ue]=pe("background.backgroundImage","background.backgroundSize","background.gradient","typography.fontFamilies.custom","typography.fontFamilies.default","typography.fontFamilies.theme","typography.defaultFontSizes","typography.fontSizes.custom","typography.fontSizes.default","typography.fontSizes.theme","typography.customFontSize","typography.fontStyle","typography.fontWeight","typography.lineHeight","typography.textAlign","typography.textColumns","typography.textDecoration","typography.textIndent","typography.writingMode","typography.textTransform","typography.letterSpacing","spacing.padding","spacing.margin","spacing.blockGap","spacing.defaultSpacingSizes","spacing.customSpacingSize","spacing.spacingSizes.custom","spacing.spacingSizes.default","spacing.spacingSizes.theme","spacing.units","dimensions.aspectRatio","dimensions.height","dimensions.minHeight","dimensions.minWidth","dimensions.width","dimensions.dimensionSizes","layout","border.color","border.radius","border.style","border.width","border.radiusSizes","color.custom","color.palette.custom","color.customDuotone","color.palette.theme","color.palette.default","color.defaultPalette","color.defaultDuotone","color.duotone.custom","color.duotone.theme","color.duotone.default","color.gradients.custom","color.gradients.theme","color.gradients.default","color.defaultGradients","color.customGradient","color.background","color.link","color.text","color.heading","color.button","shadow"),Ho=(0,vs.useMemo)(()=>({background:{backgroundImage:o,backgroundSize:r,gradient:n},color:{palette:{custom:te,theme:q,default:se},gradients:{custom:Dt,theme:so,default:or},duotone:{custom:xe,theme:De,default:lt},defaultGradients:Je,defaultPalette:he,defaultDuotone:me,custom:K,customGradient:hr,customDuotone:ne,background:Zt,link:ao,heading:Vt,button:et,text:Ze},typography:{fontFamilies:{custom:i,default:s,theme:a},fontSizes:{custom:u,default:d,theme:f},customFontSize:m,defaultFontSizes:c,fontStyle:h,fontWeight:p,lineHeight:g,textAlign:b,textColumns:k,textDecoration:v,textIndent:y,textTransform:S,letterSpacing:C,writingMode:_},spacing:{spacingSizes:{custom:I,default:R,theme:V},customSpacingSize:L,defaultSpacingSizes:E,padding:B,margin:P,blockGap:T,units:j},border:{color:oe,radius:re,style:Q,width:$,radiusSizes:ee},dimensions:{aspectRatio:H,height:F,minHeight:U,minWidth:G,width:W,dimensionSizes:J},layout:le,parentLayout:t,shadow:Ue}),[o,r,n,i,s,a,c,u,d,f,m,h,p,g,b,k,v,y,S,C,_,B,P,T,E,L,I,R,V,j,H,F,U,G,W,J,le,t,oe,re,Q,$,ee,K,te,ne,q,se,he,me,xe,De,lt,Dt,so,or,Je,hr,Zt,ao,Ze,Vt,et,Ue]);return E2(Ho,e)}function Sde(e){e=e.map(o=>({...o,Edit:(0,vs.memo)(o.edit)}));let t=(0,l6.createHigherOrderComponent)(o=>function(n){let i=Pe();return[...e.map((s,a)=>{let{Edit:c,hasSupport:u,attributeKeys:d=[],shareWithChildBlocks:f,supportsPatternEditing:m}=s;if(!(m&&i[lu]||i[Es]||i[nh]&&f)||!u(n.name))return null;let p={};for(let g of d)n.attributes[g]&&(p[g]=n.attributes[g]);return(0,s0.jsx)(c,{name:n.name,isSelected:n.isSelected,clientId:n.clientId,setAttributes:n.setAttributes,__unstableParentLayout:n.__unstableParentLayout,...p},a)}),(0,s0.jsx)(o,{...n},"edit")]},"withBlockEditHooks");(0,i0.addFilter)("editor.BlockEdit","core/editor/hooks",t)}function nLe({index:e,useBlockProps:t,setAllWrapperProps:o,...r}){let n=t(r),i=s=>o(a=>{let c=[...a];return c[e]=s,c});return(0,vs.useEffect)(()=>(i(n),()=>{i(void 0)})),null}var iLe=(0,vs.memo)(nLe);function xde(e){let t=(0,l6.createHigherOrderComponent)(o=>function(n){let[i,s]=(0,vs.useState)(Array(e.length).fill(void 0));return[...e.map((a,c)=>{let{hasSupport:u,attributeKeys:d=[],useBlockProps:f,isMatch:m}=a,h={};for(let p of d)n.attributes[p]&&(h[p]=n.attributes[p]);return!Object.keys(h).length||!u(n.name)||m&&!m(h)?null:(0,s0.jsx)(iLe,{index:c,useBlockProps:f,setAllWrapperProps:s,name:n.name,clientId:n.clientId,...h},c)}),(0,s0.jsx)(o,{...n,wrapperProps:i.filter(Boolean).reduce((a,c)=>({...a,...c,className:D(a.className,c.className),style:{...a.style,...c.style}}),n.wrapperProps||{})},"edit")]},"withBlockListBlockHooks");(0,i0.addFilter)("editor.BlockListBlock","core/editor/hooks",t)}function wde(e){function t(o,r,n){return e.reduce((i,s)=>{let{hasSupport:a,attributeKeys:c=[],addSaveProps:u}=s,d={};for(let f of c)n[f]&&(d[f]=n[f]);return!Object.keys(d).length||!a(r)?i:u(i,r,d)},o)}(0,i0.addFilter)("blocks.getSaveContent.extraProps","core/editor/hooks",t,0),(0,i0.addFilter)("blocks.getSaveContent.extraProps","core/editor/hooks",o=>(o.hasOwnProperty("className")&&!o.className&&delete o.className,o))}var Cde=l(Y(),1),Bde=l(pt(),1);function sLe(e){let{apiVersion:t=1}=e;return t<2&&(0,Cde.hasBlockSupport)(e,"lightBlockWrapper",!1)&&(e.apiVersion=2),e}(0,Bde.addFilter)("blocks.registerBlockType","core/compat/migrateLightBlockWrapper",sLe);function Ede(e){e.hasAttribute("crossorigin")||e.setAttribute("crossorigin","anonymous")}if(window.crossOriginIsolated){let e=function(){document.body?t.observe(document.body,{childList:!0,attributes:!0,subtree:!0}):document.readyState==="loading"&&document.addEventListener("DOMContentLoaded",()=>{document.body&&t.observe(document.body,{childList:!0,attributes:!0,subtree:!0})})};aLe=e;let t=new window.MutationObserver(o=>{o.forEach(r=>{[r.addedNodes,r.target].forEach(n=>{(n instanceof window.NodeList?n:[n]).forEach(s=>{let a=s;a.querySelectorAll&&(a.querySelectorAll("source,script,video,link").forEach(c=>{Ede(c)}),["SOURCE","SCRIPT","VIDEO","LINK"].includes(a.nodeName)&&Ede(a))})})})});e()}var aLe;var Tde=l(pt(),1),ks=l(Y(),1);var c6=l(w(),1),u6=["left","center","right","wide","full"],lLe=["wide","full"];function d6(e,t=!0,o=!0){let r;return Array.isArray(e)?r=u6.filter(n=>e.includes(n)):e===!0?r=[...u6]:r=[],!o||e===!0&&!t?r.filter(n=>!lLe.includes(n)):r}function cLe(e){return"type"in(e.attributes?.align??{})||(0,ks.hasBlockSupport)(e,"align")&&(e.attributes={...e.attributes,align:{type:"string",enum:[...u6,""]}}),e}function uLe({name:e,align:t,setAttributes:o}){let r=d6((0,ks.getBlockSupport)(e,"align"),(0,ks.hasBlockSupport)(e,"alignWide",!0)),n=my(r).map(({name:a})=>a),i=go();return!n.length||i!=="default"?null:(0,c6.jsx)(Ut,{group:"block",__experimentalShareWithChildBlocks:!0,children:(0,c6.jsx)(HC,{value:t,onChange:a=>{a||(0,ks.getBlockType)(e)?.attributes?.align?.default&&(a=""),o({align:a})},controls:n})})}var wR={shareWithChildBlocks:!0,edit:uLe,useBlockProps:dLe,addSaveProps:fLe,attributeKeys:["align"],hasSupport(e){return(0,ks.hasBlockSupport)(e,"align",!1)}};function dLe({name:e,align:t}){let o=d6((0,ks.getBlockSupport)(e,"align"),(0,ks.hasBlockSupport)(e,"alignWide",!0));return my(o).some(n=>n.name===t)?{"data-align":t}:{}}function fLe(e,t,o){let{align:r}=o,n=(0,ks.getBlockSupport)(t,"align"),i=(0,ks.hasBlockSupport)(t,"alignWide",!0);return d6(n,i).includes(r)&&(e.className=D(`align${r}`,e.className)),e}(0,Tde.addFilter)("blocks.registerBlockType","core/editor/align/addAttribute",cLe);var Ide=l(pt(),1);function mLe(e){return"type"in(e.attributes?.lock??{})||(e.attributes={...e.attributes,lock:{type:"object"}}),e}(0,Ide.addFilter)("blocks.registerBlockType","core/lock/addAttribute",mLe);var g6=l(pt(),1),Mv=l(Y(),1);var a0=l(A(),1),ER=l(N(),1),jde=l(O(),1),Ude=l(z(),1),TR=l(Y(),1);var Vn=l(A(),1),Vde=l(O(),1),Nv=l(N(),1),Fde=l(z(),1);var p6=l(Y(),1),Nde=l(z(),1),Lv=l(A(),1),pa=l(N(),1),CR=l(O(),1),Mde=l(X(),1),Dde=l(ir(),1);var f6=l(O(),1),Ode=l(X(),1),Ade=l(A(),1);var Pde=l(A(),1);var Ov=l(w(),1);function pLe({blockTypes:e,value:t,onItemChange:o}){return(0,Ov.jsx)("ul",{className:"block-editor-block-manager__checklist",children:e.map(r=>(0,Ov.jsxs)("li",{className:"block-editor-block-manager__checklist-item",children:[(0,Ov.jsx)(Pde.CheckboxControl,{label:r.title,checked:t.includes(r.name),onChange:(...n)=>o(r,...n)}),(0,Ov.jsx)(Ae,{icon:r.icon})]},r.name))})}var Rde=pLe;var Av=l(w(),1);function Lde({title:e,blockTypes:t,selectedBlockTypes:o,onChange:r}){let n=(0,Ode.useInstanceId)(Lde),i=(0,f6.useCallback)((f,m)=>{r(m?[...o,f]:o.filter(({name:h})=>h!==f.name))},[o,r]),s=(0,f6.useCallback)(f=>{r(f?[...o,...t.filter(m=>!o.find(({name:h})=>h===m.name))]:o.filter(m=>!t.find(({name:h})=>h===m.name)))},[t,o,r]);if(!t.length)return null;let a=t.map(({name:f})=>f).filter(f=>(o??[]).some(m=>m.name===f)),c="block-editor-block-manager__category-title-"+n,u=a.length===t.length,d=!u&&a.length>0;return(0,Av.jsxs)("div",{role:"group","aria-labelledby":c,className:"block-editor-block-manager__category",children:[(0,Av.jsx)(Ade.CheckboxControl,{checked:u,onChange:s,className:"block-editor-block-manager__category-title",indeterminate:d,label:(0,Av.jsx)("span",{id:c,children:e})}),(0,Av.jsx)(Rde,{blockTypes:t,value:a,onItemChange:i})]})}var m6=Lde;var jc=l(w(),1);function BR({blockTypes:e,selectedBlockTypes:t,onChange:o,showSelectAll:r=!0}){let n=(0,Mde.useDebounce)(Dde.speak,500),[i,s]=(0,CR.useState)(""),{categories:a,isMatchingSearchTerm:c}=(0,Nde.useSelect)(m=>({categories:m(p6.store).getCategories(),isMatchingSearchTerm:m(p6.store).isMatchingSearchTerm}),[]),u=e.filter(m=>!i||c(m,i)),d=t.length>0&&t.length!==e.length,f=e.length>0&&t.length===e.length;return(0,CR.useEffect)(()=>{if(!i)return;let m=u.length,h=(0,pa.sprintf)((0,pa._n)("%d result found.","%d results found.",m),m);n(h)},[u?.length,i,n]),(0,jc.jsxs)(Lv.__experimentalVStack,{className:"block-editor-block-manager__content",spacing:4,children:[(0,jc.jsx)(Lv.SearchControl,{label:(0,pa.__)("Search for a block"),placeholder:(0,pa.__)("Search for a block"),value:i,onChange:m=>s(m),className:"block-editor-block-manager__search"}),r&&(0,jc.jsx)(Lv.CheckboxControl,{className:"block-editor-block-manager__select-all",label:(0,pa.__)("Select all"),checked:f,onChange:()=>{o(f?[]:e)},indeterminate:d}),(0,jc.jsxs)("div",{tabIndex:"0",role:"region","aria-label":(0,pa.__)("Available block types"),className:"block-editor-block-manager__results",children:[u.length===0&&(0,jc.jsx)("p",{className:"block-editor-block-manager__no-results",children:(0,pa.__)("No blocks found.")}),a.map(m=>(0,jc.jsx)(m6,{title:m.title,blockTypes:u.filter(h=>h.category===m.slug),selectedBlockTypes:t,onChange:o},m.slug)),(0,jc.jsx)(m6,{title:(0,pa.__)("Uncategorized"),blockTypes:u.filter(({category:m})=>!m),selectedBlockTypes:t,onChange:o})]})]})}var ha=l(w(),1);function zde({clientId:e,blockTypes:t,selectedBlockTypes:o,onClose:r}){let[n,i]=(0,Vde.useState)(o),{updateBlockAttributes:s}=(0,Fde.useDispatch)(x),a=()=>{let c=n.length===t.length,u=n.map(({name:d})=>d);s(e,{allowedBlocks:c?void 0:u}),r()};return(0,ha.jsx)(Vn.Modal,{title:(0,Nv._x)("Manage allowed blocks","modal title"),onRequestClose:r,overlayClassName:"block-editor-block-allowed-blocks-modal",focusOnMount:"firstContentElement",size:"medium",children:(0,ha.jsxs)(Vn.__experimentalVStack,{as:"form",onSubmit:c=>{c.preventDefault(),a()},spacing:"4",children:[(0,ha.jsx)(Vn.__experimentalText,{children:(0,Nv.__)("Select which blocks can be added inside this container.")}),(0,ha.jsx)(BR,{blockTypes:t,selectedBlockTypes:n,onChange:c=>{i(c)}}),(0,ha.jsxs)(Vn.Flex,{className:"block-editor-block-allowed-blocks-modal__actions",justify:"flex-end",expanded:!1,children:[(0,ha.jsx)(Vn.FlexItem,{children:(0,ha.jsx)(Vn.Button,{variant:"tertiary",onClick:r,__next40pxDefaultSize:!0,children:(0,Nv.__)("Cancel")})}),(0,ha.jsx)(Vn.FlexItem,{children:(0,ha.jsx)(Vn.Button,{variant:"primary",type:"submit",__next40pxDefaultSize:!0,children:(0,Nv.__)("Apply")})})]})]})})}var Up=l(w(),1);function Hde({clientId:e}){let[t,o]=(0,jde.useState)(!1),{blockTypes:r,selectedBlockNames:n}=(0,Ude.useSelect)(a=>{let{getBlockAttributes:c}=a(x);return{blockTypes:a(TR.store).getBlockTypes(),selectedBlockNames:c(e)?.allowedBlocks}},[e]),i=r.filter(a=>(0,TR.hasBlockSupport)(a,"inserter",!0)&&(!a.parent||a.parent.includes("core/post-content")));if(!i)return null;let s=n===void 0?i:i.filter(a=>n.includes(a.name));return(0,Up.jsxs)("div",{className:"block-editor-block-allowed-blocks-control",children:[(0,Up.jsxs)(a0.BaseControl,{help:(0,ER.__)("Specify which blocks are allowed inside this container."),children:[(0,Up.jsx)(a0.BaseControl.VisualLabel,{children:(0,ER.__)("Allowed Blocks")}),(0,Up.jsx)(a0.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>{o(!0)},className:"block-editor-block-allowed-blocks-control__button",children:(0,ER.__)("Manage allowed blocks")})]}),t&&(0,Up.jsx)(zde,{clientId:e,blockTypes:i,selectedBlockTypes:s,onClose:()=>o(!1)})]})}var h6=l(w(),1);function hLe({clientId:e}){return go()==="contentOnly"?null:(0,h6.jsx)(D_.Fill,{children:(0,h6.jsx)(Hde,{clientId:e})})}var Gde={edit:hLe,attributeKeys:["allowedBlocks"],hasSupport(e){return(0,Mv.hasBlockSupport)(e,"allowedBlocks")}};function gLe(e){return e?.attributes?.allowedBlocks?.type||(0,Mv.hasBlockSupport)(e,"allowedBlocks")&&(e.attributes={...e.attributes,allowedBlocks:{type:"array"}}),e}(0,g6.addFilter)("blocks.registerBlockType","core/allowedBlocks/attribute",gLe);function bLe(e,t,o,r){if(!(0,Mv.hasBlockSupport)(e.name,"allowedBlocks")||t.length!==1&&r.length===1&&e.innerBlocks.length===t.length||r.length===1&&t.length>1||r.length>1&&t.length===1||r.length>1&&t.length>1&&r.length!==t.length||e.attributes.allowedBlocks)return e;let n=t[o]?.attributes?.allowedBlocks;if(!n)return e;let s=(0,Mv.getBlockType)(e.name)?.allowedBlocks||[];if(!s.length)return{...e,attributes:{...e.attributes,allowedBlocks:n}};let a=n.filter(c=>s.includes(c));return{...e,attributes:{...e.attributes,allowedBlocks:a}}}(0,g6.addFilter)("blocks.switchToBlockType.transformedBlock","core/allowedBlocks/addTransforms",bLe);var Wde=l(pt(),1),IR=l(A(),1),Dv=l(N(),1),PR=l(Y(),1),$de=l(O(),1);var dl=l(w(),1),vLe=/[\s#]/g;function kLe(e){return"type"in(e.attributes?.anchor??{})||(0,PR.hasBlockSupport)(e,"anchor")&&(e.attributes={...e.attributes,anchor:{type:"string"}}),e}function yLe({anchor:e,setAttributes:t}){if(go()!=="default")return null;let r=$de.Platform.OS==="web";return(0,dl.jsx)(fe,{group:"advanced",children:(0,dl.jsx)(IR.TextControl,{__next40pxDefaultSize:!0,className:"html-anchor-control",label:(0,Dv.__)("HTML anchor"),help:(0,dl.jsxs)(dl.Fragment,{children:[(0,Dv.__)("Enter a word or two\u2014without spaces\u2014to make a unique web address just for this block, called an \u201Canchor\u201D. Then, you\u2019ll be able to link directly to this section of your page."),r&&(0,dl.jsxs)(dl.Fragment,{children:[" ",(0,dl.jsx)(IR.ExternalLink,{href:(0,Dv.__)("https://wordpress.org/documentation/article/page-jumps/"),children:(0,Dv.__)("Learn more about anchors")})]})]}),value:e||"",placeholder:r?null:(0,Dv.__)("Add an anchor"),onChange:n=>{n=n.replace(vLe,"-"),t({anchor:n!==""?n:void 0})},autoCapitalize:"none",autoComplete:"off"})})}var b6={addSaveProps:_Le,edit:yLe,attributeKeys:["anchor"],hasSupport(e){return(0,PR.hasBlockSupport)(e,"anchor")}};function _Le(e,t,o){return(0,PR.hasBlockSupport)(t,"anchor")&&(e.id=o.anchor===""?null:o.anchor),e}(0,Wde.addFilter)("blocks.registerBlockType","core/anchor/attribute",kLe);var Kde=l(pt(),1),RR=l(Y(),1);function SLe(e){return e?.attributes?.ariaLabel?.type||(0,RR.hasBlockSupport)(e,"ariaLabel")&&(e.attributes={...e.attributes,ariaLabel:{type:"string"}}),e}function xLe(e,t,o){return(0,RR.hasBlockSupport)(t,"ariaLabel")&&!We(t,"ariaLabel","ariaLabel")&&(e["aria-label"]=o.ariaLabel===""?null:o.ariaLabel),e}var Yde={addSaveProps:xLe,attributeKeys:["ariaLabel"],hasSupport(e){return(0,RR.hasBlockSupport)(e,"ariaLabel")}};(0,Kde.addFilter)("blocks.registerBlockType","core/ariaLabel/attribute",SLe);var Xv=l(Y(),1),Kpe=l(X(),1),RO=l(A(),1),OO=l(z(),1);var v6=l(N(),1);var Kt="isAny",Yt="isNone",Fr="isAll",zr="isNotAll",fn="between",mn="inThePast",Fn="over",ro="is",no="isNot",hf="lessThan",gf="greaterThan",bf="lessThanOrEqual",vf="greaterThanOrEqual",kf="before",yf="after",_f="beforeInc",Sf="afterInc",fl="contains",ml="notContains",pl="startsWith",xf="on",wf="notOn";var F0t={asc:(0,v6.__)("Sort ascending"),desc:(0,v6.__)("Sort descending")};var qde=l(EA(),1),{lock:j0t,unlock:Ct}=(0,qde.__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 l0=l(O(),1),wLe=[];function zn({elements:e,getElements:t}){let o=Array.isArray(e)&&e.length>0?e:wLe,[r,n]=(0,l0.useState)(o),[i,s]=(0,l0.useState)(!1);return(0,l0.useEffect)(()=>{if(!t){n(o);return}let a=!1;return s(!0),t().then(c=>{if(!a){let u=Array.isArray(c)&&c.length>0?c:o;n(u)}}).catch(()=>{a||n(o)}).finally(()=>{a||s(!1)}),()=>{a=!0}},[t,o]),{elements:r,isLoading:i}}var CLe=Math.pow(10,8)*24*60*60*1e3,G0t=-CLe,OR=6048e5,Zde=864e5;var BLe=3600;var Xde=BLe*24,W0t=Xde*7,ELe=Xde*365.2425,TLe=ELe/12,$0t=TLe*3,k6=Symbol.for("constructDateFrom");function Jo(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&k6 in e?e[k6](t):e instanceof Date?new e.constructor(t):new Date(t)}function ft(e,t){return Jo(t||e,e)}function AR(e,t,o){let r=ft(e,o?.in);return isNaN(t)?Jo(o?.in||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function LR(e,t,o){let r=ft(e,o?.in);if(isNaN(t))return Jo(o?.in||e,NaN);if(!t)return r;let n=r.getDate(),i=Jo(o?.in||e,r.getTime());i.setMonth(r.getMonth()+t+1,0);let s=i.getDate();return n>=s?i:(r.setFullYear(i.getFullYear(),i.getMonth(),n),r)}var ILe={};function Cf(){return ILe}function Uc(e,t){let o=Cf(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??o.weekStartsOn??o.locale?.options?.weekStartsOn??0,n=ft(e,t?.in),i=n.getDay(),s=(i<r?7:0)+i-r;return n.setDate(n.getDate()-s),n.setHours(0,0,0,0),n}function Hp(e,t){return Uc(e,{...t,weekStartsOn:1})}function NR(e,t){let o=ft(e,t?.in),r=o.getFullYear(),n=Jo(o,0);n.setFullYear(r+1,0,4),n.setHours(0,0,0,0);let i=Hp(n),s=Jo(o,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);let a=Hp(s);return o.getTime()>=i.getTime()?r+1:o.getTime()>=a.getTime()?r:r-1}function y6(e){let t=ft(e),o=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return o.setUTCFullYear(t.getFullYear()),+e-+o}function Qde(e,...t){let o=Jo.bind(null,e||t.find(r=>typeof r=="object"));return t.map(o)}function _6(e,t){let o=ft(e,t?.in);return o.setHours(0,0,0,0),o}function Jde(e,t,o){let[r,n]=Qde(o?.in,e,t),i=_6(r),s=_6(n),a=+i-y6(i),c=+s-y6(s);return Math.round((a-c)/Zde)}function efe(e,t){let o=NR(e,t),r=Jo(t?.in||e,0);return r.setFullYear(o,0,4),r.setHours(0,0,0,0),Hp(r)}function tfe(e,t,o){return AR(e,t*7,o)}function ofe(e,t,o){return LR(e,t*12,o)}function rfe(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Hc(e){return!(!rfe(e)&&typeof e!="number"||isNaN(+ft(e)))}function nfe(e,t){let o=ft(e,t?.in);return o.setDate(1),o.setHours(0,0,0,0),o}function MR(e,t){let o=ft(e,t?.in);return o.setFullYear(o.getFullYear(),0,1),o.setHours(0,0,0,0),o}var PLe={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"}},ife=(e,t,o)=>{let r,n=PLe[e];return typeof n=="string"?r=n:t===1?r=n.one:r=n.other.replace("{{count}}",t.toString()),o?.addSuffix?o.comparison&&o.comparison>0?"in "+r:r+" ago":r};function DR(e){return(t={})=>{let o=t.width?String(t.width):e.defaultWidth;return e.formats[o]||e.formats[e.defaultWidth]}}var RLe={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},OLe={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},ALe={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},sfe={date:DR({formats:RLe,defaultWidth:"full"}),time:DR({formats:OLe,defaultWidth:"full"}),dateTime:DR({formats:ALe,defaultWidth:"full"})};var LLe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},afe=(e,t,o,r)=>LLe[e];function Vv(e){return(t,o)=>{let r=o?.context?String(o.context):"standalone",n;if(r==="formatting"&&e.formattingValues){let s=e.defaultFormattingWidth||e.defaultWidth,a=o?.width?String(o.width):s;n=e.formattingValues[a]||e.formattingValues[s]}else{let s=e.defaultWidth,a=o?.width?String(o.width):e.defaultWidth;n=e.values[a]||e.values[s]}let i=e.argumentCallback?e.argumentCallback(t):t;return n[i]}}var NLe={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},MLe={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},DLe={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"]},VLe={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"]},FLe={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"}},zLe={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"}},jLe=(e,t)=>{let o=Number(e),r=o%100;if(r>20||r<10)switch(r%10){case 1:return o+"st";case 2:return o+"nd";case 3:return o+"rd"}return o+"th"},lfe={ordinalNumber:jLe,era:Vv({values:NLe,defaultWidth:"wide"}),quarter:Vv({values:MLe,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Vv({values:DLe,defaultWidth:"wide"}),day:Vv({values:VLe,defaultWidth:"wide"}),dayPeriod:Vv({values:FLe,defaultWidth:"wide",formattingValues:zLe,defaultFormattingWidth:"wide"})};function Fv(e){return(t,o={})=>{let r=o.width,n=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(n);if(!i)return null;let s=i[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(a)?HLe(a,f=>f.test(s)):ULe(a,f=>f.test(s)),u;u=e.valueCallback?e.valueCallback(c):c,u=o.valueCallback?o.valueCallback(u):u;let d=t.slice(s.length);return{value:u,rest:d}}}function ULe(e,t){for(let o in e)if(Object.prototype.hasOwnProperty.call(e,o)&&t(e[o]))return o}function HLe(e,t){for(let o=0;o<e.length;o++)if(t(e[o]))return o}function cfe(e){return(t,o={})=>{let r=t.match(e.matchPattern);if(!r)return null;let n=r[0],i=t.match(e.parsePattern);if(!i)return null;let s=e.valueCallback?e.valueCallback(i[0]):i[0];s=o.valueCallback?o.valueCallback(s):s;let a=t.slice(n.length);return{value:s,rest:a}}}var GLe=/^(\d+)(th|st|nd|rd)?/i,WLe=/\d+/i,$Le={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},KLe={any:[/^b/i,/^(a|c)/i]},YLe={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},qLe={any:[/1/i,/2/i,/3/i,/4/i]},ZLe={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},XLe={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]},QLe={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},JLe={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]},eNe={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},tNe={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}},ufe={ordinalNumber:cfe({matchPattern:GLe,parsePattern:WLe,valueCallback:e=>parseInt(e,10)}),era:Fv({matchPatterns:$Le,defaultMatchWidth:"wide",parsePatterns:KLe,defaultParseWidth:"any"}),quarter:Fv({matchPatterns:YLe,defaultMatchWidth:"wide",parsePatterns:qLe,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Fv({matchPatterns:ZLe,defaultMatchWidth:"wide",parsePatterns:XLe,defaultParseWidth:"any"}),day:Fv({matchPatterns:QLe,defaultMatchWidth:"wide",parsePatterns:JLe,defaultParseWidth:"any"}),dayPeriod:Fv({matchPatterns:eNe,defaultMatchWidth:"any",parsePatterns:tNe,defaultParseWidth:"any"})};var S6={code:"en-US",formatDistance:ife,formatLong:sfe,formatRelative:afe,localize:lfe,match:ufe,options:{weekStartsOn:0,firstWeekContainsDate:1}};function dfe(e,t){let o=ft(e,t?.in);return Jde(o,MR(o))+1}function ffe(e,t){let o=ft(e,t?.in),r=+Hp(o)-+efe(o);return Math.round(r/OR)+1}function VR(e,t){let o=ft(e,t?.in),r=o.getFullYear(),n=Cf(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,s=Jo(t?.in||e,0);s.setFullYear(r+1,0,i),s.setHours(0,0,0,0);let a=Uc(s,t),c=Jo(t?.in||e,0);c.setFullYear(r,0,i),c.setHours(0,0,0,0);let u=Uc(c,t);return+o>=+a?r+1:+o>=+u?r:r-1}function mfe(e,t){let o=Cf(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,n=VR(e,t),i=Jo(t?.in||e,0);return i.setFullYear(n,0,r),i.setHours(0,0,0,0),Uc(i,t)}function pfe(e,t){let o=ft(e,t?.in),r=+Uc(o,t)-+mfe(o,t);return Math.round(r/OR)+1}function qe(e,t){let o=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return o+r}var Gc={y(e,t){let o=e.getFullYear(),r=o>0?o:1-o;return qe(t==="yy"?r%100:r,t.length)},M(e,t){let o=e.getMonth();return t==="M"?String(o+1):qe(o+1,2)},d(e,t){return qe(e.getDate(),t.length)},a(e,t){let o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return o.toUpperCase();case"aaa":return o;case"aaaaa":return o[0];default:return o==="am"?"a.m.":"p.m."}},h(e,t){return qe(e.getHours()%12||12,t.length)},H(e,t){return qe(e.getHours(),t.length)},m(e,t){return qe(e.getMinutes(),t.length)},s(e,t){return qe(e.getSeconds(),t.length)},S(e,t){let o=t.length,r=e.getMilliseconds(),n=Math.trunc(r*Math.pow(10,o-3));return qe(n,t.length)}};var zv={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},x6={G:function(e,t,o){let r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return o.era(r,{width:"abbreviated"});case"GGGGG":return o.era(r,{width:"narrow"});default:return o.era(r,{width:"wide"})}},y:function(e,t,o){if(t==="yo"){let r=e.getFullYear(),n=r>0?r:1-r;return o.ordinalNumber(n,{unit:"year"})}return Gc.y(e,t)},Y:function(e,t,o,r){let n=VR(e,r),i=n>0?n:1-n;if(t==="YY"){let s=i%100;return qe(s,2)}return t==="Yo"?o.ordinalNumber(i,{unit:"year"}):qe(i,t.length)},R:function(e,t){let o=NR(e);return qe(o,t.length)},u:function(e,t){let o=e.getFullYear();return qe(o,t.length)},Q:function(e,t,o){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return qe(r,2);case"Qo":return o.ordinalNumber(r,{unit:"quarter"});case"QQQ":return o.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return o.quarter(r,{width:"narrow",context:"formatting"});default:return o.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,o){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return qe(r,2);case"qo":return o.ordinalNumber(r,{unit:"quarter"});case"qqq":return o.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return o.quarter(r,{width:"narrow",context:"standalone"});default:return o.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,o){let r=e.getMonth();switch(t){case"M":case"MM":return Gc.M(e,t);case"Mo":return o.ordinalNumber(r+1,{unit:"month"});case"MMM":return o.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return o.month(r,{width:"narrow",context:"formatting"});default:return o.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,o){let r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return qe(r+1,2);case"Lo":return o.ordinalNumber(r+1,{unit:"month"});case"LLL":return o.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return o.month(r,{width:"narrow",context:"standalone"});default:return o.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,o,r){let n=pfe(e,r);return t==="wo"?o.ordinalNumber(n,{unit:"week"}):qe(n,t.length)},I:function(e,t,o){let r=ffe(e);return t==="Io"?o.ordinalNumber(r,{unit:"week"}):qe(r,t.length)},d:function(e,t,o){return t==="do"?o.ordinalNumber(e.getDate(),{unit:"date"}):Gc.d(e,t)},D:function(e,t,o){let r=dfe(e);return t==="Do"?o.ordinalNumber(r,{unit:"dayOfYear"}):qe(r,t.length)},E:function(e,t,o){let r=e.getDay();switch(t){case"E":case"EE":case"EEE":return o.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return o.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return o.day(r,{width:"short",context:"formatting"});default:return o.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,o,r){let n=e.getDay(),i=(n-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return qe(i,2);case"eo":return o.ordinalNumber(i,{unit:"day"});case"eee":return o.day(n,{width:"abbreviated",context:"formatting"});case"eeeee":return o.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(n,{width:"short",context:"formatting"});default:return o.day(n,{width:"wide",context:"formatting"})}},c:function(e,t,o,r){let n=e.getDay(),i=(n-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return qe(i,t.length);case"co":return o.ordinalNumber(i,{unit:"day"});case"ccc":return o.day(n,{width:"abbreviated",context:"standalone"});case"ccccc":return o.day(n,{width:"narrow",context:"standalone"});case"cccccc":return o.day(n,{width:"short",context:"standalone"});default:return o.day(n,{width:"wide",context:"standalone"})}},i:function(e,t,o){let r=e.getDay(),n=r===0?7:r;switch(t){case"i":return String(n);case"ii":return qe(n,t.length);case"io":return o.ordinalNumber(n,{unit:"day"});case"iii":return o.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return o.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return o.day(r,{width:"short",context:"formatting"});default:return o.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,o){let n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return o.dayPeriod(n,{width:"narrow",context:"formatting"});default:return o.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(e,t,o){let r=e.getHours(),n;switch(r===12?n=zv.noon:r===0?n=zv.midnight:n=r/12>=1?"pm":"am",t){case"b":case"bb":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"bbb":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return o.dayPeriod(n,{width:"narrow",context:"formatting"});default:return o.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(e,t,o){let r=e.getHours(),n;switch(r>=17?n=zv.evening:r>=12?n=zv.afternoon:r>=4?n=zv.morning:n=zv.night,t){case"B":case"BB":case"BBB":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"BBBBB":return o.dayPeriod(n,{width:"narrow",context:"formatting"});default:return o.dayPeriod(n,{width:"wide",context:"formatting"})}},h:function(e,t,o){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),o.ordinalNumber(r,{unit:"hour"})}return Gc.h(e,t)},H:function(e,t,o){return t==="Ho"?o.ordinalNumber(e.getHours(),{unit:"hour"}):Gc.H(e,t)},K:function(e,t,o){let r=e.getHours()%12;return t==="Ko"?o.ordinalNumber(r,{unit:"hour"}):qe(r,t.length)},k:function(e,t,o){let r=e.getHours();return r===0&&(r=24),t==="ko"?o.ordinalNumber(r,{unit:"hour"}):qe(r,t.length)},m:function(e,t,o){return t==="mo"?o.ordinalNumber(e.getMinutes(),{unit:"minute"}):Gc.m(e,t)},s:function(e,t,o){return t==="so"?o.ordinalNumber(e.getSeconds(),{unit:"second"}):Gc.s(e,t)},S:function(e,t){return Gc.S(e,t)},X:function(e,t,o){let r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return gfe(r);case"XXXX":case"XX":return Gp(r);default:return Gp(r,":")}},x:function(e,t,o){let r=e.getTimezoneOffset();switch(t){case"x":return gfe(r);case"xxxx":case"xx":return Gp(r);default:return Gp(r,":")}},O:function(e,t,o){let r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+hfe(r,":");default:return"GMT"+Gp(r,":")}},z:function(e,t,o){let r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+hfe(r,":");default:return"GMT"+Gp(r,":")}},t:function(e,t,o){let r=Math.trunc(+e/1e3);return qe(r,t.length)},T:function(e,t,o){return qe(+e,t.length)}};function hfe(e,t=""){let o=e>0?"-":"+",r=Math.abs(e),n=Math.trunc(r/60),i=r%60;return i===0?o+String(n):o+String(n)+t+qe(i,2)}function gfe(e,t){return e%60===0?(e>0?"-":"+")+qe(Math.abs(e)/60,2):Gp(e,t)}function Gp(e,t=""){let o=e>0?"-":"+",r=Math.abs(e),n=qe(Math.trunc(r/60),2),i=qe(r%60,2);return o+n+t+i}var bfe=(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"})}},vfe=(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"})}},oNe=(e,t)=>{let o=e.match(/(P+)(p+)?/)||[],r=o[1],n=o[2];if(!n)return bfe(e,t);let i;switch(r){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}}",bfe(r,t)).replace("{{time}}",vfe(n,t))},kfe={p:vfe,P:oNe};var rNe=/^D+$/,nNe=/^Y+$/,iNe=["D","DD","YY","YYYY"];function yfe(e){return rNe.test(e)}function _fe(e){return nNe.test(e)}function Sfe(e,t,o){let r=sNe(e,t,o);if(console.warn(r),iNe.includes(e))throw new RangeError(r)}function sNe(e,t,o){let r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${o}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}var aNe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,lNe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,cNe=/^'([^]*?)'?$/,uNe=/''/g,dNe=/[a-zA-Z]/;function w6(e,t,o){let r=Cf(),n=o?.locale??r.locale??S6,i=o?.firstWeekContainsDate??o?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,s=o?.weekStartsOn??o?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,a=ft(e,o?.in);if(!Hc(a))throw new RangeError("Invalid time value");let c=t.match(lNe).map(d=>{let f=d[0];if(f==="p"||f==="P"){let m=kfe[f];return m(d,n.formatLong)}return d}).join("").match(aNe).map(d=>{if(d==="''")return{isToken:!1,value:"'"};let f=d[0];if(f==="'")return{isToken:!1,value:fNe(d)};if(x6[f])return{isToken:!0,value:d};if(f.match(dNe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+f+"`");return{isToken:!1,value:d}});n.localize.preprocessor&&(c=n.localize.preprocessor(a,c));let u={firstWeekContainsDate:i,weekStartsOn:s,locale:n};return c.map(d=>{if(!d.isToken)return d.value;let f=d.value;(!o?.useAdditionalWeekYearTokens&&_fe(f)||!o?.useAdditionalDayOfYearTokens&&yfe(f))&&Sfe(f,t,String(e));let m=x6[f[0]];return m(a,f,n.localize,u)}).join("")}function fNe(e){let t=e.match(cNe);return t?t[1].replace(uNe,"'"):e}function Wp(e,t,o){return AR(e,-t,o)}function FR(e,t,o){return LR(e,-t,o)}function xfe(e,t,o){return tfe(e,-t,o)}function zR(e,t,o){return ofe(e,-t,o)}var ue=l(N(),1),bo=l(O(),1),pn=l(Qa(),1);var C6=l(w(),1),Lo={Name:(0,C6.jsx)("span",{className:"dataviews-filters__summary-filter-text-name"}),Value:(0,C6.jsx)("span",{className:"dataviews-filters__summary-filter-text-value"})};function wfe(e,t){switch(t){case"days":return Wp(new Date,e);case"weeks":return xfe(new Date,e);case"months":return FR(new Date,e);case"years":return zR(new Date,e);default:return new Date}}var Cfe={label:(0,ue.__)("Is none of"),filterText:(e,t)=>(0,bo.createInterpolateElement)((0,ue.sprintf)((0,ue.__)("<Name>%1$s is none of: </Name><Value>%2$s</Value>"),e.name,t.map(o=>o.label).join(", ")),Lo),filter:((e,t,o)=>{if(!o?.length)return!0;let r=t.getValue({item:e});return Array.isArray(r)?!o.some(n=>r.includes(n)):typeof r=="string"?!o.includes(r):!1}),selection:"multi"},Bfe=[{name:Kt,label:(0,ue.__)("Includes"),filterText:(e,t)=>(0,bo.createInterpolateElement)((0,ue.sprintf)((0,ue.__)("<Name>%1$s includes: </Name><Value>%2$s</Value>"),e.name,t.map(o=>o.label).join(", ")),Lo),filter(e,t,o){if(!o?.length)return!0;let r=t.getValue({item:e});return Array.isArray(r)?o.some(n=>r.includes(n)):typeof r=="string"?o.includes(r):!1},selection:"multi"},{name:Yt,...Cfe},{name:Fr,label:(0,ue.__)("Includes all"),filterText:(e,t)=>(0,bo.createInterpolateElement)((0,ue.sprintf)((0,ue.__)("<Name>%1$s includes all: </Name><Value>%2$s</Value>"),e.name,t.map(o=>o.label).join(", ")),Lo),filter(e,t,o){return o?.length?o.every(r=>t.getValue({item:e})?.includes(r)):!0},selection:"multi"},{name:zr,...Cfe},{name:fn,label:(0,ue.__)("Between (inc)"),filterText:(e,t)=>(0,bo.createInterpolateElement)((0,ue.sprintf)((0,ue.__)("<Name>%1$s between (inc): </Name><Value>%2$s and %3$s</Value>"),e.name,t[0].label[0],t[0].label[1]),Lo),filter(e,t,o){if(!Array.isArray(o)||o.length!==2||o[0]===void 0||o[1]===void 0)return!0;let r=t.getValue({item:e});return typeof r=="number"||r instanceof Date||typeof r=="string"?r>=o[0]&&r<=o[1]:!1},selection:"custom"},{name:mn,label:(0,ue.__)("In the past"),filterText:(e,t)=>(0,bo.createInterpolateElement)((0,ue.sprintf)((0,ue.__)("<Name>%1$s is in the past: </Name><Value>%2$s</Value>"),e.name,`${t[0].value.value} ${t[0].value.unit}`),Lo),filter(e,t,o){if(o?.value===void 0||o?.unit===void 0)return!0;let r=wfe(o.value,o.unit),n=(0,pn.getDate)(t.getValue({item:e}));return n>=r&&n<=new Date},selection:"custom"},{name:Fn,label:(0,ue.__)("Over"),filterText:(e,t)=>(0,bo.createInterpolateElement)((0,ue.sprintf)((0,ue.__)("<Name>%1$s is over: </Name><Value>%2$s</Value>"),e.name,`${t[0].value.value} ${t[0].value.unit}`),Lo),filter(e,t,o){if(o?.value===void 0||o?.unit===void 0)return!0;let r=wfe(o.value,o.unit);return(0,pn.getDate)(t.getValue({item:e}))<r},selection:"custom"},{name:ro,label:(0,ue.__)("Is"),filterText:(e,t)=>(0,bo.createInterpolateElement)((0,ue.sprintf)((0,ue.__)("<Name>%1$s is: </Name><Value>%2$s</Value>"),e.name,t[0].label),Lo),filter(e,t,o){return o===t.getValue({item:e})||o===void 0},selection:"single"},{name:no,label:(0,ue.__)("Is not"),filterText:(e,t)=>(0,bo.createInterpolateElement)((0,ue.sprintf)((0,ue.__)("<Name>%1$s is not: </Name><Value>%2$s</Value>"),e.name,t[0].label),Lo),filter(e,t,o){return o!==t.getValue({item:e})},selection:"single"},{name:hf,label:(0,ue.__)("Less than"),filterText:(e,t)=>(0,bo.createInterpolateElement)((0,ue.sprintf)((0,ue.__)("<Name>%1$s is less than: </Name><Value>%2$s</Value>"),e.name,t[0].label),Lo),filter(e,t,o){return o===void 0?!0:t.getValue({item:e})<o},selection:"single"},{name:gf,label:(0,ue.__)("Greater than"),filterText:(e,t)=>(0,bo.createInterpolateElement)((0,ue.sprintf)((0,ue.__)("<Name>%1$s is greater than: </Name><Value>%2$s</Value>"),e.name,t[0].label),Lo),filter(e,t,o){return o===void 0?!0:t.getValue({item:e})>o},selection:"single"},{name:bf,label:(0,ue.__)("Less than or equal"),filterText:(e,t)=>(0,bo.createInterpolateElement)((0,ue.sprintf)((0,ue.__)("<Name>%1$s is less than or equal to: </Name><Value>%2$s</Value>"),e.name,t[0].label),Lo),filter(e,t,o){return o===void 0?!0:t.getValue({item:e})<=o},selection:"single"},{name:vf,label:(0,ue.__)("Greater than or equal"),filterText:(e,t)=>(0,bo.createInterpolateElement)((0,ue.sprintf)((0,ue.__)("<Name>%1$s is greater than or equal to: </Name><Value>%2$s</Value>"),e.name,t[0].label),Lo),filter(e,t,o){return o===void 0?!0:t.getValue({item:e})>=o},selection:"single"},{name:kf,label:(0,ue.__)("Before"),filterText:(e,t)=>(0,bo.createInterpolateElement)((0,ue.sprintf)((0,ue.__)("<Name>%1$s is before: </Name><Value>%2$s</Value>"),e.name,t[0].label),Lo),filter(e,t,o){if(o===void 0)return!0;let r=(0,pn.getDate)(o);return(0,pn.getDate)(t.getValue({item:e}))<r},selection:"single"},{name:yf,label:(0,ue.__)("After"),filterText:(e,t)=>(0,bo.createInterpolateElement)((0,ue.sprintf)((0,ue.__)("<Name>%1$s is after: </Name><Value>%2$s</Value>"),e.name,t[0].label),Lo),filter(e,t,o){if(o===void 0)return!0;let r=(0,pn.getDate)(o);return(0,pn.getDate)(t.getValue({item:e}))>r},selection:"single"},{name:_f,label:(0,ue.__)("Before (inc)"),filterText:(e,t)=>(0,bo.createInterpolateElement)((0,ue.sprintf)((0,ue.__)("<Name>%1$s is on or before: </Name><Value>%2$s</Value>"),e.name,t[0].label),Lo),filter(e,t,o){if(o===void 0)return!0;let r=(0,pn.getDate)(o);return(0,pn.getDate)(t.getValue({item:e}))<=r},selection:"single"},{name:Sf,label:(0,ue.__)("After (inc)"),filterText:(e,t)=>(0,bo.createInterpolateElement)((0,ue.sprintf)((0,ue.__)("<Name>%1$s is on or after: </Name><Value>%2$s</Value>"),e.name,t[0].label),Lo),filter(e,t,o){if(o===void 0)return!0;let r=(0,pn.getDate)(o);return(0,pn.getDate)(t.getValue({item:e}))>=r},selection:"single"},{name:fl,label:(0,ue.__)("Contains"),filterText:(e,t)=>(0,bo.createInterpolateElement)((0,ue.sprintf)((0,ue.__)("<Name>%1$s contains: </Name><Value>%2$s</Value>"),e.name,t[0].label),Lo),filter(e,t,o){if(o===void 0)return!0;let r=t.getValue({item:e});return typeof r=="string"&&o&&r.toLowerCase().includes(String(o).toLowerCase())},selection:"single"},{name:ml,label:(0,ue.__)("Doesn't contain"),filterText:(e,t)=>(0,bo.createInterpolateElement)((0,ue.sprintf)((0,ue.__)("<Name>%1$s doesn't contain: </Name><Value>%2$s</Value>"),e.name,t[0].label),Lo),filter(e,t,o){if(o===void 0)return!0;let r=t.getValue({item:e});return typeof r=="string"&&o&&!r.toLowerCase().includes(String(o).toLowerCase())},selection:"single"},{name:pl,label:(0,ue.__)("Starts with"),filterText:(e,t)=>(0,bo.createInterpolateElement)((0,ue.sprintf)((0,ue.__)("<Name>%1$s starts with: </Name><Value>%2$s</Value>"),e.name,t[0].label),Lo),filter(e,t,o){if(o===void 0)return!0;let r=t.getValue({item:e});return typeof r=="string"&&o&&r.toLowerCase().startsWith(String(o).toLowerCase())},selection:"single"},{name:xf,label:(0,ue.__)("On"),filterText:(e,t)=>(0,bo.createInterpolateElement)((0,ue.sprintf)((0,ue.__)("<Name>%1$s is: </Name><Value>%2$s</Value>"),e.name,t[0].label),Lo),filter(e,t,o){if(o===void 0)return!0;let r=(0,pn.getDate)(o),n=(0,pn.getDate)(t.getValue({item:e}));return r.getTime()===n.getTime()},selection:"single"},{name:wf,label:(0,ue.__)("Not on"),filterText:(e,t)=>(0,bo.createInterpolateElement)((0,ue.sprintf)((0,ue.__)("<Name>%1$s is not: </Name><Value>%2$s</Value>"),e.name,t[0].label),Lo),filter(e,t,o){if(o===void 0)return!0;let r=(0,pn.getDate)(o),n=(0,pn.getDate)(t.getValue({item:e}));return r.getTime()!==n.getTime()},selection:"single"}],Efe=e=>Bfe.find(t=>t.name===e),Tfe=()=>Bfe.map(e=>e.name);var Ife=l(A(),1),Pfe=l(O(),1);function vt(e,t){let o;return e?.required&&t?.required?o=t?.required?.message?t.required:void 0:e?.pattern&&t?.pattern?o=t.pattern:e?.min&&t?.min?o=t.min:e?.max&&t?.max?o=t.max:e?.minLength&&t?.minLength?o=t.minLength:e?.maxLength&&t?.maxLength?o=t.maxLength:e?.elements&&t?.elements?o=t.elements:t?.custom&&(o=t.custom),o}var Rfe=l(w(),1),{ValidatedCheckboxControl:mNe}=Ct(Ife.privateApis);function Ofe({field:e,onChange:t,data:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{getValue:s,setValue:a,label:c,description:u,isValid:d}=e,f=e.isDisabled({item:o,field:e}),m=(0,Pfe.useCallback)(()=>{t(a({item:o,value:!s({item:o})}))},[o,s,t,a]);return(0,Rfe.jsx)(mNe,{required:!!e.isValid?.required,markWhenOptional:n,customValidity:vt(d,i),hidden:r,label:c,help:u,checked:s({item:o}),onChange:m,disabled:f})}var jR=l(A(),1),Afe=l(O(),1);var B6=l(w(),1),{ValidatedComboboxControl:pNe}=Ct(jR.privateApis);function UR({data:e,field:t,onChange:o,hideLabelFromVision:r,validity:n}){let{label:i,description:s,placeholder:a,getValue:c,setValue:u,isValid:d}=t,f=c({item:e})??"",m=(0,Afe.useCallback)(g=>o(u({item:e,value:g??""})),[e,o,u]),{elements:h,isLoading:p}=zn({elements:t.elements,getElements:t.getElements});return p?(0,B6.jsx)(jR.Spinner,{}):(0,B6.jsx)(pNe,{required:!!t.isValid?.required,customValidity:vt(d,n),label:i,value:f,help:s,placeholder:a,options:h,onChange:m,hideLabelFromVision:r,allowReset:!0,expandOnFocus:!0})}var WR=l(A(),1),ys=l(O(),1),GR=l(N(),1),xi=l(Qa(),1);var Uv=l(A(),1),E6=l(O(),1),hl=l(N(),1);var jv=l(w(),1),hNe={[mn]:[{value:"days",label:(0,hl.__)("Days")},{value:"weeks",label:(0,hl.__)("Weeks")},{value:"months",label:(0,hl.__)("Months")},{value:"years",label:(0,hl.__)("Years")}],[Fn]:[{value:"days",label:(0,hl.__)("Days ago")},{value:"weeks",label:(0,hl.__)("Weeks ago")},{value:"months",label:(0,hl.__)("Months ago")},{value:"years",label:(0,hl.__)("Years ago")}]};function HR({className:e,data:t,field:o,onChange:r,hideLabelFromVision:n,operator:i}){let s=hNe[i===mn?"inThePast":"over"],{id:a,label:c,description:u,getValue:d,setValue:f}=o,m=o.isDisabled({item:t,field:o}),h=d({item:t}),{value:p="",unit:g=s[0].value}=h&&typeof h=="object"?h:{},b=(0,E6.useCallback)(v=>r(f({item:t,value:{value:Number(v),unit:g}})),[r,f,t,g]),k=(0,E6.useCallback)(v=>r(f({item:t,value:{value:p,unit:v}})),[r,f,t,p]);return(0,jv.jsx)(Uv.BaseControl,{id:a,className:D(e,"dataviews-controls__relative-date"),label:c,hideLabelFromVision:n,help:u,children:(0,jv.jsxs)(Ne,{direction:"row",gap:"sm",children:[(0,jv.jsx)(Uv.__experimentalNumberControl,{__next40pxDefaultSize:!0,className:"dataviews-controls__relative-date-number",spinControls:"none",min:1,step:1,value:p,onChange:b,disabled:m}),(0,jv.jsx)(Uv.SelectControl,{className:"dataviews-controls__relative-date-unit",__next40pxDefaultSize:!0,label:(0,hl.__)("Unit"),value:g,options:s,onChange:k,hideLabelFromVision:!0,disabled:m})]})})}var Lfe=l(O(),1);function c0(e,t){let o=typeof e.min?.constraint=="string"?e.min.constraint:void 0,r=typeof e.max?.constraint=="string"?e.max.constraint:void 0,n=(0,Lfe.useMemo)(()=>{let i=[];if(o){let s=t(o);s&&i.push({before:s})}if(r){let s=t(r);s&&i.push({after:s})}return i.length>0?i:void 0},[o,r,t]);return{minConstraint:o,maxConstraint:r,disabledMatchers:n}}var Nfe=l(Qa(),1);function u0(e){if(!e)return null;let t=(0,Nfe.getDate)(e);return t&&Hc(t)?t:null}var Bf=l(w(),1),{DateCalendar:gNe,ValidatedInputControl:bNe}=Ct(WR.privateApis),T6=e=>e?(0,xi.dateI18n)("Y-m-d\\TH:i",(0,xi.getDate)(e)):"";function vNe({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i,config:s}){let{compact:a}=s||{},{id:c,label:u,description:d,setValue:f,getValue:m,isValid:h}=t,p=t.isDisabled({item:e,field:t}),g=m({item:e}),b=typeof g=="string"?g:void 0,[k,v]=(0,ys.useState)(()=>u0(b)||new Date),y=(0,ys.useRef)(null),_=(0,ys.useRef)(void 0),S=(0,ys.useRef)(null),{minConstraint:C,maxConstraint:B,disabledMatchers:P}=c0(h,u0),T=(0,ys.useCallback)(H=>o(f({item:e,value:H})),[e,o,f]);(0,ys.useEffect)(()=>()=>{_.current&&clearTimeout(_.current)},[]);let E=(0,ys.useCallback)(H=>{let F;if(H){let U=(0,xi.dateI18n)("Y-m-d",H),G;b?G=(0,xi.dateI18n)("H:i",(0,xi.getDate)(b)):G=(0,xi.dateI18n)("H:i",H),F=(0,xi.getDate)(`${U}T${G}`).toISOString(),T(F),_.current&&clearTimeout(_.current)}else T(void 0);S.current=y.current&&y.current.ownerDocument.activeElement,_.current=setTimeout(()=>{y.current&&(y.current.focus(),y.current.blur(),T(F),S.current&&S.current instanceof HTMLElement&&S.current.focus())},0)},[T,b]),L=(0,ys.useCallback)(H=>{if(H){let F=(0,xi.getDate)(H);T(F.toISOString());let U=u0(F.toISOString());U&&v(U)}else T(void 0)},[T]),{format:I}=t,R=I.weekStartsOn??(0,xi.getSettings)().l10n.startOfWeek,{timezone:{string:V}}=(0,xi.getSettings)(),j=u;return h?.required&&!n&&!r?j=`${u} (${(0,GR.__)("Required")})`:!h?.required&&n&&!r&&(j=`${u} (${(0,GR.__)("Optional")})`),(0,Bf.jsx)(WR.BaseControl,{id:c,label:j,help:d,hideLabelFromVision:r,children:(0,Bf.jsxs)(Ne,{direction:"column",gap:"lg",children:[(0,Bf.jsx)(bNe,{ref:y,__next40pxDefaultSize:!0,required:!!h?.required,customValidity:vt(h,i),type:"datetime-local",label:(0,GR.__)("Date time"),hideLabelFromVision:!0,value:T6(b),onChange:L,disabled:p,min:C?T6(C):void 0,max:B?T6(B):void 0}),!a&&(0,Bf.jsx)(gNe,{style:{width:"100%"},selected:b&&u0(b)||void 0,onSelect:E,month:k,onMonthChange:v,timeZone:V||void 0,weekStartsOn:R,disabled:p||P})]})})}function Mfe({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,operator:i,validity:s,config:a}){return i===mn||i===Fn?(0,Bf.jsx)(HR,{className:"dataviews-controls__datetime",data:e,field:t,onChange:o,hideLabelFromVision:r,operator:i}):(0,Bf.jsx)(vNe,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:s,config:a})}var Ur=l(A(),1),at=l(O(),1),er=l(N(),1),jr=l(Qa(),1);var kt=l(w(),1),{DateCalendar:kNe,DateRangeCalendar:yNe}=Ct(Ur.privateApis),_Ne=[{id:"today",label:(0,er.__)("Today"),getValue:()=>(0,jr.getDate)(null)},{id:"yesterday",label:(0,er.__)("Yesterday"),getValue:()=>{let e=(0,jr.getDate)(null);return Wp(e,1)}},{id:"past-week",label:(0,er.__)("Past week"),getValue:()=>{let e=(0,jr.getDate)(null);return Wp(e,7)}},{id:"past-month",label:(0,er.__)("Past month"),getValue:()=>{let e=(0,jr.getDate)(null);return FR(e,1)}}],SNe=[{id:"last-7-days",label:(0,er.__)("Last 7 days"),getValue:()=>{let e=(0,jr.getDate)(null);return[Wp(e,7),e]}},{id:"last-30-days",label:(0,er.__)("Last 30 days"),getValue:()=>{let e=(0,jr.getDate)(null);return[Wp(e,30),e]}},{id:"month-to-date",label:(0,er.__)("Month to date"),getValue:()=>{let e=(0,jr.getDate)(null);return[nfe(e),e]}},{id:"last-year",label:(0,er.__)("Last year"),getValue:()=>{let e=(0,jr.getDate)(null);return[zR(e,1),e]}},{id:"year-to-date",label:(0,er.__)("Year to date"),getValue:()=>{let e=(0,jr.getDate)(null);return[MR(e),e]}}],Ef=e=>{if(!e)return null;let t=(0,jr.getDate)(e);return t&&Hc(t)?t:null},I6=e=>e?typeof e=="string"?e:w6(e,"yyyy-MM-dd"):"";function Dfe({field:e,validity:t,inputRefs:o,isTouched:r,setIsTouched:n,children:i}){let{isValid:s}=e,[a,c]=(0,at.useState)(void 0),u=(0,at.useCallback)(()=>{let f=Array.isArray(o)?o:[o];for(let m of f){let h=m.current;if(h&&!h.validity.valid){c({type:"invalid",message:h.validationMessage});return}}c(void 0)},[o]);return(0,at.useEffect)(()=>{let f=Array.isArray(o)?o:[o],m=t?vt(s,t):void 0;for(let h of f){let p=h.current;p&&p.setCustomValidity(m?.type==="invalid"&&m.message?m.message:"")}},[o,s,t]),(0,at.useEffect)(()=>{let f=Array.isArray(o)?o:[o],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)}},[o,n]),(0,at.useEffect)(()=>{if(!r)return;let f=t?vt(s,t):void 0;f?c(f):u()},[r,s,t,u]),(0,kt.jsxs)("div",{onBlur:f=>{r||(!f.relatedTarget||!f.currentTarget.contains(f.relatedTarget))&&n(!0)},children:[i,(0,kt.jsx)("div",{"aria-live":"polite",children:a&&(0,kt.jsxs)("p",{className:D("components-validated-control__indicator",a.type==="invalid"?"is-invalid":void 0),children:[(0,kt.jsx)(Ur.Icon,{className:"components-validated-control__indicator-icon",icon:tm,size:16,fill:"currentColor"}),a.message]})})]})}function xNe({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{id:s,label:a,description:c,setValue:u,getValue:d,isValid:f,format:m}=t,h=t.isDisabled({item:e,field:t}),[p,g]=(0,at.useState)(null),b=m.weekStartsOn??(0,jr.getSettings)().l10n.startOfWeek,k=d({item:e}),v=typeof k=="string"?k:void 0,[y,_]=(0,at.useState)(()=>Ef(v)||new Date),[S,C]=(0,at.useState)(!1),B=(0,at.useRef)(null),{minConstraint:P,maxConstraint:T,disabledMatchers:E}=c0(f,Ef),L=(0,at.useCallback)(F=>o(u({item:e,value:F})),[e,o,u]),I=(0,at.useCallback)(F=>{let U=F?w6(F,"yyyy-MM-dd"):void 0;L(U),g(null),C(!0)},[L]),R=(0,at.useCallback)(F=>{let U=F.getValue(),G=I6(U);_(U),L(G),g(F.id),C(!0)},[L]),V=(0,at.useCallback)(F=>{if(L(F),F){let U=Ef(F);U&&_(U)}g(null),C(!0)},[L]),{timezone:{string:j}}=(0,jr.getSettings)(),H=a;return f?.required&&!n?H=`${a} (${(0,er.__)("Required")})`:!f?.required&&n&&(H=`${a} (${(0,er.__)("Optional")})`),(0,kt.jsx)(Dfe,{field:t,validity:i,inputRefs:B,isTouched:S,setIsTouched:C,children:(0,kt.jsx)(Ur.BaseControl,{id:s,className:"dataviews-controls__date",label:H,help:c,hideLabelFromVision:r,children:(0,kt.jsxs)(Ne,{direction:"column",gap:"lg",children:[(0,kt.jsxs)(Ne,{direction:"row",gap:"sm",wrap:"wrap",justify:"flex-start",children:[_Ne.map(F=>{let U=p===F.id;return(0,kt.jsx)(Ur.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:U,size:"small",disabled:h,accessibleWhenDisabled:!0,onClick:()=>R(F),children:F.label},F.id)}),(0,kt.jsx)(Ur.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:!p,size:"small",disabled:!!p||h,accessibleWhenDisabled:!0,children:(0,er.__)("Custom")})]}),(0,kt.jsx)(Ur.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:B,type:"date",label:(0,er.__)("Date"),hideLabelFromVision:!0,value:v,onChange:V,required:!!t.isValid?.required,disabled:h,min:P,max:T}),(0,kt.jsx)(kNe,{style:{width:"100%"},selected:v&&Ef(v)||void 0,onSelect:I,month:y,onMonthChange:_,timeZone:j||void 0,weekStartsOn:b,disabled:h||E,disableNavigation:h})]})})})}function wNe({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{id:s,label:a,description:c,getValue:u,setValue:d,isValid:f,format:m}=t,h=t.isDisabled({item:e,field:t}),p,g=u({item:e});Array.isArray(g)&&g.length===2&&g.every(W=>typeof W=="string")&&(p=g);let b=m.weekStartsOn??(0,jr.getSettings)().l10n.startOfWeek,{minConstraint:k,maxConstraint:v,disabledMatchers:y}=c0(f,Ef),_=(0,at.useCallback)(W=>{o(d({item:e,value:W}))},[e,o,d]),[S,C]=(0,at.useState)(null),B=(0,at.useMemo)(()=>{if(!p)return{from:void 0,to:void 0};let[W,J]=p;return{from:Ef(W)||void 0,to:Ef(J)||void 0}},[p]),[P,T]=(0,at.useState)(()=>B.from||new Date),[E,L]=(0,at.useState)(!1),I=(0,at.useRef)(null),R=(0,at.useRef)(null),V=(0,at.useCallback)((W,J)=>{W&&J?_([I6(W),I6(J)]):!W&&!J&&_(void 0)},[_]),j=(0,at.useCallback)(W=>{V(W?.from,W?.to),C(null),L(!0)},[V]),H=(0,at.useCallback)(W=>{let[J,le]=W.getValue();T(J),V(J,le),C(W.id),L(!0)},[V]),F=(0,at.useCallback)((W,J)=>{let[le,oe]=p||[void 0,void 0];if(V(W==="from"?J:le,W==="to"?J:oe),J){let $=Ef(J);$&&T($)}C(null),L(!0)},[p,V]),{timezone:U}=(0,jr.getSettings)(),G=a;return t.isValid?.required&&!n?G=`${a} (${(0,er.__)("Required")})`:!t.isValid?.required&&n&&(G=`${a} (${(0,er.__)("Optional")})`),(0,kt.jsx)(Dfe,{field:t,validity:i,inputRefs:[I,R],isTouched:E,setIsTouched:L,children:(0,kt.jsx)(Ur.BaseControl,{id:s,className:"dataviews-controls__date",label:G,help:c,hideLabelFromVision:r,children:(0,kt.jsxs)(Ne,{direction:"column",gap:"lg",children:[(0,kt.jsxs)(Ne,{direction:"row",gap:"sm",wrap:"wrap",justify:"flex-start",children:[SNe.map(W=>{let J=S===W.id;return(0,kt.jsx)(Ur.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:J,size:"small",disabled:h,accessibleWhenDisabled:!0,onClick:()=>H(W),children:W.label},W.id)}),(0,kt.jsx)(Ur.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:!S,size:"small",accessibleWhenDisabled:!0,disabled:!!S||h,children:(0,er.__)("Custom")})]}),(0,kt.jsxs)(Ne,{direction:"row",gap:"sm",justify:"space-between",className:"dataviews-controls__date-range-inputs",children:[(0,kt.jsx)(Ur.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:I,type:"date",label:(0,er.__)("From"),hideLabelFromVision:!0,value:p?.[0],onChange:W=>F("from",W),required:!!t.isValid?.required,disabled:h,min:k,max:v}),(0,kt.jsx)(Ur.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:R,type:"date",label:(0,er.__)("To"),hideLabelFromVision:!0,value:p?.[1],onChange:W=>F("to",W),required:!!t.isValid?.required,disabled:h,min:k,max:v})]}),(0,kt.jsx)(yNe,{style:{width:"100%"},selected:B,onSelect:j,month:P,onMonthChange:T,timeZone:U.string||void 0,weekStartsOn:b,disabled:h||y})]})})})}function Vfe({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,operator:i,validity:s}){return i===mn||i===Fn?(0,kt.jsx)(HR,{className:"dataviews-controls__date",data:e,field:t,onChange:o,hideLabelFromVision:r,operator:i}):i===fn?(0,kt.jsx)(wNe,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:s}):(0,kt.jsx)(xNe,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:s})}var $R=l(A(),1),Ffe=l(O(),1);var P6=l(w(),1),{ValidatedSelectControl:CNe}=Ct($R.privateApis);function KR({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{type:s,label:a,description:c,getValue:u,setValue:d,isValid:f}=t,m=t.isDisabled({item:e,field:t}),h=s==="array",p=u({item:e})??(h?[]:""),g=(0,Ffe.useCallback)(v=>o(d({item:e,value:v})),[e,o,d]),{elements:b,isLoading:k}=zn({elements:t.elements,getElements:t.getElements});return k?(0,P6.jsx)($R.Spinner,{}):(0,P6.jsx)(CNe,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:vt(f,i),label:a,value:p,help:c,options:b,onChange:g,__next40pxDefaultSize:!0,hideLabelFromVision:r,multiple:h,disabled:m})}var R6=l(w(),1),BNe=10;function zfe(e){let{field:t}=e,{elements:o}=zn({elements:t.elements,getElements:t.getElements});return o.length>=BNe?(0,R6.jsx)(UR,{...e}):(0,R6.jsx)(KR,{...e})}var qR=l(A(),1);var jfe=l(A(),1),Ufe=l(O(),1);var Hfe=l(w(),1),{ValidatedInputControl:ENe}=Ct(jfe.privateApis);function gl({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,type:i,prefix:s,suffix:a,validity:c}){let{label:u,placeholder:d,description:f,getValue:m,setValue:h,isValid:p}=t,g=m({item:e}),b=t.isDisabled({item:e,field:t}),k=(0,Ufe.useCallback)(v=>o(h({item:e,value:v})),[e,h,o]);return(0,Hfe.jsx)(ENe,{required:!!p.required,markWhenOptional:n,customValidity:vt(p,c),label:u,placeholder:d,value:g??"",help:f,onChange:k,hideLabelFromVision:r,type:i,prefix:s,suffix:a,disabled:b,pattern:p.pattern?p.pattern.constraint:void 0,minLength:p.minLength?p.minLength.constraint:void 0,maxLength:p.maxLength?p.maxLength.constraint:void 0,__next40pxDefaultSize:!0})}var YR=l(w(),1);function Gfe({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){return(0,YR.jsx)(gl,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i,type:"email",prefix:(0,YR.jsx)(qR.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,YR.jsx)(qR.Icon,{icon:vL})})})}var XR=l(A(),1);var ZR=l(w(),1);function Wfe({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){return(0,ZR.jsx)(gl,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i,type:"tel",prefix:(0,ZR.jsx)(XR.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,ZR.jsx)(XR.Icon,{icon:Ak})})})}var JR=l(A(),1);var QR=l(w(),1);function $fe({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){return(0,QR.jsx)(gl,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i,type:"url",prefix:(0,QR.jsx)(JR.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,QR.jsx)(JR.Icon,{icon:yn})})})}var Wc=l(A(),1),d0=l(O(),1),eO=l(N(),1);var Tf=l(w(),1),{ValidatedNumberControl:TNe}=Ct(Wc.privateApis);function Kfe(e){if(e===""||e===void 0)return"";let t=Number(e);return Number.isFinite(t)?t:""}function INe({value:e,onChange:t,hideLabelFromVision:o,step:r}){let[n="",i=""]=e,s=(0,d0.useCallback)(c=>t([Kfe(c),i]),[t,i]),a=(0,d0.useCallback)(c=>t([n,Kfe(c)]),[t,n]);return(0,Tf.jsx)(Wc.BaseControl,{help:(0,eO.__)("The max. value must be greater than the min. value."),children:(0,Tf.jsxs)(Wc.Flex,{direction:"row",gap:4,children:[(0,Tf.jsx)(Wc.__experimentalNumberControl,{label:(0,eO.__)("Min."),value:n,max:i?Number(i)-r:void 0,onChange:s,__next40pxDefaultSize:!0,hideLabelFromVision:o,step:r}),(0,Tf.jsx)(Wc.__experimentalNumberControl,{label:(0,eO.__)("Max."),value:i,min:n?Number(n)+r:void 0,onChange:a,__next40pxDefaultSize:!0,hideLabelFromVision:o,step:r})]})})}function tO({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,operator:i,validity:s}){let a=t.format?.decimals??0,c=Math.pow(10,Math.abs(a)*-1),{label:u,description:d,getValue:f,setValue:m,isValid:h}=t,p=f({item:e})??"",g=t.isDisabled({item:e,field:t}),b=(0,d0.useCallback)(v=>{o(m({item:e,value:["",void 0].includes(v)?void 0:Number(v)}))},[e,o,m]),k=(0,d0.useCallback)(v=>{o(m({item:e,value:v}))},[e,o,m]);if(i===fn){let v=["",""];return Array.isArray(p)&&p.length===2&&p.every(y=>typeof y=="number"||y==="")&&(v=p),(0,Tf.jsx)(INe,{value:v,onChange:k,hideLabelFromVision:r,step:c})}return(0,Tf.jsx)(TNe,{required:!!h.required,markWhenOptional:n,customValidity:vt(h,s),label:u,help:d,value:p,onChange:b,__next40pxDefaultSize:!0,hideLabelFromVision:r,step:c,min:h.min?h.min.constraint:void 0,max:h.max?h.max.constraint:void 0,disabled:g})}var Yfe=l(w(),1);function qfe(e){return(0,Yfe.jsx)(tO,{...e})}var Zfe=l(w(),1);function Xfe(e){return(0,Zfe.jsx)(tO,{...e})}var oO=l(A(),1),Qfe=l(O(),1);var O6=l(w(),1),{ValidatedRadioControl:PNe}=Ct(oO.privateApis);function Jfe({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{label:s,description:a,getValue:c,setValue:u,isValid:d}=t,f=t.isDisabled({item:e,field:t}),{elements:m,isLoading:h}=zn({elements:t.elements,getElements:t.getElements}),p=c({item:e}),g=(0,Qfe.useCallback)(b=>o(u({item:e,value:b})),[e,o,u]);return h?(0,O6.jsx)(oO.Spinner,{}):(0,O6.jsx)(PNe,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:vt(d,i),label:s,help:a,onChange:g,options:m,selected:p,hideLabelFromVision:r,disabled:f})}var A6=l(O(),1);var eme=l(w(),1);function tme({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,config:i,validity:s}){let{prefix:a,suffix:c}=i||{};return(0,eme.jsx)(gl,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:s,prefix:a?(0,A6.createElement)(a):void 0,suffix:c?(0,A6.createElement)(c):void 0})}var ome=l(A(),1),rme=l(O(),1);var nme=l(w(),1),{ValidatedToggleControl:RNe}=Ct(ome.privateApis);function ime({field:e,onChange:t,data:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{label:s,description:a,getValue:c,setValue:u,isValid:d}=e,f=e.isDisabled({item:o,field:e}),m=(0,rme.useCallback)(()=>{t(u({item:o,value:!c({item:o})}))},[t,u,o,c]);return(0,nme.jsx)(RNe,{required:!!d.required,markWhenOptional:n,customValidity:vt(d,i),hidden:r,label:s,help:a,checked:c({item:o}),onChange:m,disabled:f})}var sme=l(A(),1),ame=l(O(),1);var lme=l(w(),1),{ValidatedTextareaControl:ONe}=Ct(sme.privateApis);function cme({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,config:i,validity:s}){let{rows:a=4}=i||{},c=t.isDisabled({item:e,field:t}),{label:u,placeholder:d,description:f,setValue:m,isValid:h}=t,p=t.getValue({item:e}),g=(0,ame.useCallback)(b=>o(m({item:e,value:b})),[e,o,m]);return(0,lme.jsx)(ONe,{required:!!h.required,markWhenOptional:n,customValidity:vt(h,s),label:u,placeholder:d,value:p??"",help:f,onChange:g,rows:a,disabled:c,minLength:h.minLength?h.minLength.constraint:void 0,maxLength:h.maxLength?h.maxLength.constraint:void 0,__next40pxDefaultSize:!0,hideLabelFromVision:r})}var Hv=l(A(),1),ume=l(O(),1);var rO=l(w(),1),{ValidatedToggleGroupControl:ANe}=Ct(Hv.privateApis);function dme({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{getValue:s,setValue:a,isValid:c}=t,u=t.isDisabled({item:e,field:t}),d=s({item:e}),f=(0,ume.useCallback)(g=>o(a({item:e,value:g})),[e,o,a]),{elements:m,isLoading:h}=zn({elements:t.elements,getElements:t.getElements});if(h)return(0,rO.jsx)(Hv.Spinner,{});if(m.length===0)return null;let p=m.find(g=>g.value===d);return(0,rO.jsx)(ANe,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:vt(c,i),__next40pxDefaultSize:!0,isBlock:!0,label:t.label,help:p?.description||t.description,onChange:f,value:d,hideLabelFromVision:r,children:m.map(g=>(0,rO.jsx)(Hv.__experimentalToggleGroupControlOption,{label:g.label,value:g.value,disabled:u},g.value))})}var nO=l(A(),1),iO=l(O(),1);var f0=l(w(),1),{ValidatedFormTokenField:LNe}=Ct(nO.privateApis);function fme({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{label:s,placeholder:a,description:c,getValue:u,setValue:d,isValid:f}=t,m=u({item:e}),h=t.isDisabled({item:e,field:t}),{elements:p,isLoading:g}=zn({elements:t.elements,getElements:t.getElements}),b=(0,iO.useMemo)(()=>Array.isArray(m)?m.map(v=>p?.find(_=>_.value===v)||{value:v,label:v}):[],[m,p]),k=(0,iO.useCallback)(v=>{let y=v.map(_=>typeof _=="object"&&"value"in _?_.value:_);o(d({item:e,value:y}))},[o,d,e]);return g?(0,f0.jsx)(nO.Spinner,{}):(0,f0.jsx)(LNe,{required:!!f?.required,markWhenOptional:n,customValidity:vt(f,i),label:r?void 0:s,value:b,onChange:k,placeholder:a,suggestions:p?.map(v=>v.value),disabled:h,__experimentalValidateInput:v=>t.isValid?.elements&&p?p.some(y=>y.value===v||y.label===v):!0,__experimentalExpandOnFocus:p&&p.length>0,help:c??(t.isValid?.elements?"":void 0),displayTransform:v=>typeof v=="object"&&"label"in v?v.label:typeof v=="string"&&p&&p.find(_=>_.value===v)?.label||v,__experimentalRenderItem:({item:v})=>{if(typeof v=="string"&&p){let y=p.find(_=>_.value===v);return(0,f0.jsx)("span",{children:y?.label||v})}return(0,f0.jsx)("span",{children:v})}})}var jn=l(A(),1),L6=l(O(),1),mme=l(N(),1);var $c=l(w(),1),{ValidatedInputControl:NNe}=Ct(jn.privateApis),MNe=({color:e,onColorChange:t,disabled:o})=>{let r=e&&Tt(e).isValid()?e:"#ffffff";return(0,$c.jsx)(jn.Dropdown,{className:"dataviews-controls__color-picker-dropdown",popoverProps:{resize:!1},renderToggle:({onToggle:n})=>(0,$c.jsx)(jn.Button,{onClick:n,"aria-label":(0,mme.__)("Open color picker"),size:"small",disabled:o,accessibleWhenDisabled:!0,icon:()=>(0,$c.jsx)(jn.ColorIndicator,{colorValue:r})}),renderContent:()=>(0,$c.jsx)(jn.__experimentalDropdownContentWrapper,{paddingSize:"none",children:(0,$c.jsx)(jn.ColorPicker,{color:r,onChange:t,enableAlpha:!0})})})};function pme({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{label:s,placeholder:a,description:c,setValue:u,isValid:d}=t,f=t.isDisabled({item:e,field:t}),m=t.getValue({item:e})||"",h=(0,L6.useCallback)(g=>{o(u({item:e,value:g}))},[e,o,u]),p=(0,L6.useCallback)(g=>{o(u({item:e,value:g||""}))},[e,o,u]);return(0,$c.jsx)(NNe,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:vt(d,i),label:s,placeholder:a,value:m,help:c,onChange:p,hideLabelFromVision:r,type:"text",disabled:f,prefix:(0,$c.jsx)(jn.__experimentalInputControlPrefixWrapper,{variant:"control",children:(0,$c.jsx)(MNe,{color:m,onColorChange:h,disabled:f})})})}var aO=l(A(),1),lO=l(O(),1),N6=l(N(),1);var sO=l(w(),1);function hme({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let[s,a]=(0,lO.useState)(!1),c=t.isDisabled({item:e,field:t}),u=(0,lO.useCallback)(()=>{a(d=>!d)},[]);return(0,sO.jsx)(gl,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i,type:s?"text":"password",suffix:(0,sO.jsx)(aO.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,sO.jsx)(aO.Button,{icon:s?Ps:im,onClick:u,size:"small",label:s?(0,N6.__)("Hide password"):(0,N6.__)("Show password"),disabled:c,accessibleWhenDisabled:!0})})})}function cO(e){return Array.isArray(e.elements)&&e.elements.length>0||typeof e.getElements=="function"}var bme=l(w(),1),gme={adaptiveSelect:zfe,array:fme,checkbox:Ofe,color:pme,combobox:UR,datetime:Mfe,date:Vfe,email:Gfe,telephone:Wfe,url:$fe,integer:qfe,number:Xfe,password:hme,radio:Jfe,select:KR,text:tme,toggle:ime,textarea:cme,toggleGroup:dme};function DNe(e){return e&&typeof e=="object"&&typeof e.control=="string"}function VNe(e){let{control:t,...o}=e,r=uO(t);return r===null?null:function(i){return(0,bme.jsx)(r,{...i,config:o})}}function vme(e,t){return typeof e.Edit=="function"?e.Edit:typeof e.Edit=="string"?uO(e.Edit):DNe(e.Edit)?VNe(e.Edit):cO(e)&&e.type!=="array"?uO("adaptiveSelect"):t===null?null:uO(t)}function uO(e){return Object.keys(gme).includes(e)?gme[e]:null}function FNe(e,t,o){if(e.filterBy===!1)return!1;let r=e.filterBy?.operators?.filter(n=>o.includes(n))??t;return r.length===0?!1:{isPrimary:!!e.filterBy?.isPrimary,operators:r}}var kme=FNe;var zNe=e=>({item:t})=>{let o=e.split("."),r=t;for(let n of o)r.hasOwnProperty(n)?r=r[n]:r=void 0;return r},yme=zNe;var jNe=e=>({value:t})=>{let o=e.split("."),r={},n=r;for(let i of o.slice(0,-1))n[i]={},n=n[i];return n[o.at(-1)]=t,r},_me=jNe;var xme=l(N(),1);function dO({item:e,field:t}){let{elements:o,isLoading:r}=zn({elements:t.elements,getElements:t.getElements}),n=t.getValue({item:e});return r||o.length===0?n:o?.find(i=>i.value===n)?.label||t.getValue({item:e})}var Sme=l(w(),1);function vo({item:e,field:t}){return t.hasElements?(0,Sme.jsx)(dO,{item:e,field:t}):t.getValueFormatted({item:e,field:t})}var bl=(e,t,o)=>o==="asc"?e.localeCompare(t):t.localeCompare(e);function ko(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)}function vl(e,t){if(typeof t.isValid.minLength?.constraint!="number")return!1;let o=t.getValue({item:e});return[void 0,"",null].includes(o)?!0:String(o).length>=t.isValid.minLength.constraint}function kl(e,t){if(typeof t.isValid.maxLength?.constraint!="number")return!1;let o=t.getValue({item:e});return[void 0,"",null].includes(o)?!0:String(o).length<=t.isValid.maxLength.constraint}function yl(e,t){if(t.isValid.pattern?.constraint===void 0)return!0;try{let o=new RegExp(t.isValid.pattern.constraint),r=t.getValue({item:e});return[void 0,"",null].includes(r)?!0:o.test(String(r))}catch{return!1}}function Bt(e,t){let r=(t.elements??[]).map(i=>i.value);if(r.length===0)return!0;let n=t.getValue({item:e});return[].concat(n).every(i=>r.includes(i))}function UNe({item:e,field:t}){return t.getValue({item:e})}var hn=UNe;var HNe=/^[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 GNe(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)&&!HNe.test(o)?(0,xme.__)("Value must be a valid email address."):null}var wme={type:"email",render:vo,Edit:"email",sort:bl,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Kt,Yt],validOperators:[ro,no,fl,ml,pl,Kt,Yt,Fr,zr],format:{},getValueFormatted:hn,validate:{required:ko,pattern:yl,minLength:vl,maxLength:kl,elements:Bt,custom:GNe}};var Cme=l(N(),1);var Gv=(e,t,o)=>o==="asc"?e-t:t-e;function fO(e,t){if(typeof t.isValid.min?.constraint!="number")return!1;let o=t.getValue({item:e});return[void 0,"",null].includes(o)?!0:Number(o)>=t.isValid.min.constraint}function mO(e,t){if(typeof t.isValid.max?.constraint!="number")return!1;let o=t.getValue({item:e});return[void 0,"",null].includes(o)?!0:Number(o)<=t.isValid.max.constraint}var Bme={separatorThousand:","};function WNe({item:e,field:t}){let o=t.getValue({item:e});if(o==null)return"";if(o=Number(o),!Number.isFinite(o))return String(o);let r;t.type!=="integer"?r=Bme:r=t.format;let{separatorThousand:n}=r,i=Math.trunc(o);return n?String(i).replace(/\B(?=(\d{3})+(?!\d))/g,n):String(i)}function $Ne(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)&&!Number.isInteger(o)?(0,Cme.__)("Value must be an integer."):null}var Eme={type:"integer",render:vo,Edit:"integer",sort:Gv,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[ro,no,hf,gf,bf,vf,fn],validOperators:[ro,no,hf,gf,bf,vf,fn,Kt,Yt,Fr,zr],format:Bme,getValueFormatted:WNe,validate:{required:ko,min:fO,max:mO,elements:Bt,custom:$Ne}};var Tme=l(N(),1);var Ime={separatorThousand:",",separatorDecimal:".",decimals:2};function KNe({item:e,field:t}){let o=t.getValue({item:e});if(o==null)return"";if(o=Number(o),!Number.isFinite(o))return String(o);let r;t.type!=="number"?r=Ime:r=t.format;let{separatorThousand:n,separatorDecimal:i,decimals:s}=r,a=o.toFixed(s),[c,u]=a.split("."),d=n?c.replace(/\B(?=(\d{3})+(?!\d))/g,n):c;return s===0?d:d+i+u}function YNe(e){return e===""||e===void 0||e===null}function qNe(e,t){let o=t.getValue({item:e});return!YNe(o)&&!Number.isFinite(o)?(0,Tme.__)("Value must be a number."):null}var Pme={type:"number",render:vo,Edit:"number",sort:Gv,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[ro,no,hf,gf,bf,vf,fn],validOperators:[ro,no,hf,gf,bf,vf,fn,Kt,Yt,Fr,zr],format:Ime,getValueFormatted:KNe,validate:{required:ko,min:fO,max:mO,elements:Bt,custom:qNe}};var Rme={type:"text",render:vo,Edit:"text",sort:bl,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Kt,Yt],validOperators:[ro,no,fl,ml,pl,Kt,Yt,Fr,zr],format:{},getValueFormatted:hn,validate:{required:ko,pattern:yl,minLength:vl,maxLength:kl,elements:Bt}};var $p=l(Qa(),1);var Ame=l(Qa(),1);function Ome(e){if(!e||!Hc(new Date(e)))return null;let t=(0,Ame.getDate)(e);return t&&Hc(t)?t:null}function Lme(e,t,o){let r=t.isValid[o]?.constraint;if(typeof r!="string")return!1;let n=t.getValue({item:e}),i=Array.isArray(n)?n[o==="min"?0:n.length-1]:n;if(i==null||i==="")return!0;let s=Ome(r),a=Ome(String(i));return!!s&&!!a&&(o==="min"?a.getTime()>=s.getTime():a.getTime()<=s.getTime())}function pO(e,t){return Lme(e,t,"min")}function hO(e,t){return Lme(e,t,"max")}var Nme={datetime:(0,$p.getSettings)().formats.datetime,weekStartsOn:(0,$p.getSettings)().l10n.startOfWeek};function ZNe({item:e,field:t}){let o=t.getValue({item:e});if(["",void 0,null].includes(o))return"";let r;return t.type!=="datetime"?r=Nme:r=t.format,(0,$p.dateI18n)(r.datetime,(0,$p.getDate)(o))}var XNe=(e,t,o)=>{let r=new Date(e).getTime(),n=new Date(t).getTime();return o==="asc"?r-n:n-r},Mme={type:"datetime",render:vo,Edit:"datetime",sort:XNe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[xf,wf,kf,yf,_f,Sf,mn,Fn],validOperators:[xf,wf,kf,yf,_f,Sf,mn,Fn],format:Nme,getValueFormatted:ZNe,validate:{required:ko,elements:Bt,min:pO,max:hO}};var Kp=l(Qa(),1);var Dme={date:(0,Kp.getSettings)().formats.date,weekStartsOn:(0,Kp.getSettings)().l10n.startOfWeek};function QNe({item:e,field:t}){let o=t.getValue({item:e});if(["",void 0,null].includes(o))return"";let r;return t.type!=="date"?r=Dme:r=t.format,(0,Kp.dateI18n)(r.date,(0,Kp.getDate)(o))}var JNe=(e,t,o)=>{let r=new Date(e).getTime(),n=new Date(t).getTime();return o==="asc"?r-n:n-r},Vme={type:"date",render:vo,Edit:"date",sort:JNe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[xf,wf,kf,yf,_f,Sf,mn,Fn,fn],validOperators:[xf,wf,kf,yf,_f,Sf,mn,Fn,fn],format:Dme,getValueFormatted:QNe,validate:{required:ko,elements:Bt,min:pO,max:hO}};var gO=l(N(),1);function Fme(e,t){return t.getValue({item:e})===!0}function eMe({item:e,field:t}){let o=t.getValue({item:e});return o===!0?(0,gO.__)("True"):o===!1?(0,gO.__)("False"):""}function tMe(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)&&![!0,!1].includes(o)?(0,gO.__)("Value must be true, false, or undefined"):null}var oMe=(e,t,o)=>{let r=!!e;return r===!!t?0:o==="asc"?r?1:-1:r?-1:1},zme={type:"boolean",render:vo,Edit:"checkbox",sort:oMe,validate:{required:Fme,elements:Bt,custom:tMe},enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[ro,no],validOperators:[ro,no],format:{},getValueFormatted:eMe};var jme={type:"media",render:()=>null,Edit:null,sort:()=>0,enableSorting:!1,enableGlobalSearch:!1,defaultOperators:[],validOperators:[],format:{},getValueFormatted:hn,validate:{}};var M6=l(N(),1);function Ume(e,t){let o=t.getValue({item:e});return Array.isArray(o)&&o.length>0&&o.every(r=>![void 0,"",null].includes(r))}function Hme({item:e,field:t}){let o=t.getValue({item:e});return(Array.isArray(o)?o:[]).join(", ")}function rMe({item:e,field:t}){return Hme({item:e,field:t})}function nMe(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)&&!Array.isArray(o)?(0,M6.__)("Value must be an array."):o.every(r=>typeof r=="string")?null:(0,M6.__)("Every value must be a string.")}var iMe=(e,t,o)=>{let r=Array.isArray(e)?e:[],n=Array.isArray(t)?t:[];if(r.length!==n.length)return o==="asc"?r.length-n.length:n.length-r.length;let i=r.join(","),s=n.join(",");return o==="asc"?i.localeCompare(s):s.localeCompare(i)},Gme={type:"array",render:rMe,Edit:"array",sort:iMe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Kt,Yt],validOperators:[Kt,Yt,Fr,zr],format:{},getValueFormatted:Hme,validate:{required:Ume,elements:Bt,custom:nMe}};function sMe({item:e,field:t}){return t.getValue({item:e})?"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022":""}var Wme={type:"password",render:vo,Edit:"password",sort:()=>0,enableSorting:!1,enableGlobalSearch:!1,defaultOperators:[],validOperators:[],format:{},getValueFormatted:sMe,validate:{required:ko,pattern:yl,minLength:vl,maxLength:kl,elements:Bt}};var $me={type:"telephone",render:vo,Edit:"telephone",sort:bl,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Kt,Yt],validOperators:[ro,no,fl,ml,pl,Kt,Yt,Fr,zr],format:{},getValueFormatted:hn,validate:{required:ko,pattern:yl,minLength:vl,maxLength:kl,elements:Bt}};var Kme=l(N(),1);var Wv=l(w(),1);function aMe({item:e,field:t}){if(t.hasElements)return(0,Wv.jsx)(dO,{item:e,field:t});let o=hn({item:e,field:t});return!o||!Tt(o).isValid()?o:(0,Wv.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,Wv.jsx)("div",{style:{width:"16px",height:"16px",borderRadius:"50%",backgroundColor:o,border:"1px solid #ddd",flexShrink:0}}),(0,Wv.jsx)("span",{children:o})]})}function lMe(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)&&!Tt(o).isValid()?(0,Kme.__)("Value must be a valid color."):null}var cMe=(e,t,o)=>{let r=Tt(e),n=Tt(t);if(!r.isValid()&&!n.isValid())return 0;if(!r.isValid())return o==="asc"?1:-1;if(!n.isValid())return o==="asc"?-1:1;let i=r.toHsl(),s=n.toHsl();return i.h!==s.h?o==="asc"?i.h-s.h:s.h-i.h:i.s!==s.s?o==="asc"?i.s-s.s:s.s-i.s:o==="asc"?i.l-s.l:s.l-i.l},Yme={type:"color",render:aMe,Edit:"color",sort:cMe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Kt,Yt],validOperators:[ro,no,Kt,Yt],format:{},getValueFormatted:hn,validate:{required:ko,elements:Bt,custom:lMe}};var qme={type:"url",render:vo,Edit:"url",sort:bl,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Kt,Yt],validOperators:[ro,no,fl,ml,pl,Kt,Yt,Fr,zr],format:{},getValueFormatted:hn,validate:{required:ko,pattern:yl,minLength:vl,maxLength:kl,elements:Bt}};var uMe=(e,t,o)=>typeof e=="number"&&typeof t=="number"?Gv(e,t,o):bl(e,t,o),Zme={render:vo,Edit:null,sort:uMe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[ro,no],validOperators:Tfe(),format:{},getValueFormatted:hn,validate:{required:ko,elements:Bt}};function dMe(e){return e==="integer"||e==="number"}function fMe(e){return e==="date"||e==="datetime"}function Xme(e,t,o){let r=t.validate[o];if(r&&(typeof e=="number"&&dMe(t.type)||typeof e=="string"&&fMe(t.type)))return{constraint:e,validate:r}}function Qme(e,t){let o=e.isValid,r;o?.required===!0&&t.validate.required!==void 0&&(r={constraint:!0,validate:t.validate.required});let n;(o?.elements===!0||o?.elements===void 0&&(e.elements||e.getElements))&&t.validate.elements!==void 0&&(n={constraint:!0,validate:t.validate.elements});let i=Xme(o?.min,t,"min"),s=Xme(o?.max,t,"max"),a=o?.minLength,c;typeof a=="number"&&t.validate.minLength!==void 0&&(c={constraint:a,validate:t.validate.minLength});let u=o?.maxLength,d;typeof u=="number"&&t.validate.maxLength!==void 0&&(d={constraint:u,validate:t.validate.maxLength});let f=o?.pattern,m;f!==void 0&&t.validate.pattern!==void 0&&(m={constraint:f,validate:t.validate.pattern});let h=o?.custom??t.validate.custom;return{required:r,elements:n,min:i,max:s,minLength:c,maxLength:d,pattern:m,custom:h}}function Jme(e){return e.validOperators.reduce((t,o)=>{let r=Efe(o);return r?.filter&&(t[o]=r.filter),t},{})}function mMe(e,t){return{...t.format,...e.format}}var epe=mMe;function pMe(e){let t=[wme,Eme,Pme,Rme,Mme,Vme,zme,jme,Gme,Wme,$me,Yme,qme].find(o=>o?.type===e);return t||Zme}function m0(e){return e.map(t=>{let o=pMe(t.type),r=t.getValue||yme(t.id),n=function(i,s,a){let c=r({item:i}),u=r({item:s});return t.sort?t.sort(c,u,a):o.sort(c,u,a)};return{id:t.id,label:t.label||t.id,header:t.header||t.label||t.id,description:t.description,placeholder:t.placeholder,getValue:r,setValue:t.setValue||_me(t.id),elements:t.elements,getElements:t.getElements,hasElements:cO(t),isVisible:t.isVisible,isDisabled:typeof t.isDisabled=="function"?t.isDisabled:()=>!!t.isDisabled,enableHiding:t.enableHiding??!0,readOnly:t.readOnly??!1,type:o.type,render:t.render??o.render,Edit:vme(t,o.Edit),sort:n,enableSorting:t.enableSorting??o.enableSorting,enableGlobalSearch:t.enableGlobalSearch??o.enableGlobalSearch,isValid:Qme(t,o),filterBy:kme(t,o.defaultOperators,o.validOperators),filter:Jme(o),format:epe(t,o),getValueFormatted:t.getValueFormatted??o.getValueFormatted}})}var j6=l(O(),1);var tpe=l(O(),1),ope=l(w(),1),D6=(0,tpe.createContext)({fields:[]});D6.displayName="DataFormContext";function rpe({fields:e,children:t}){return(0,ope.jsx)(D6.Provider,{value:{fields:e},children:t})}var _s=D6;var BO=l(O(),1);var vO=l(O(),1),h0=l(A(),1);var p0=l(N(),1),Hr={type:"regular",labelPosition:"top"},hMe=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 npe(e){let t=Hr;if(e?.type==="regular")t={type:"regular",labelPosition:e?.labelPosition??"top"};else if(e?.type==="panel"){let o=e.summary??[],r=Array.isArray(o)?o:[o],n=e?.openAs,i;typeof n=="object"&&n.type==="modal"?i={type:"modal",applyLabel:n.applyLabel?.trim()||(0,p0.__)("Apply"),cancelLabel:n.cancelLabel?.trim()||(0,p0.__)("Cancel")}:n==="modal"?i={type:"modal",applyLabel:(0,p0.__)("Apply"),cancelLabel:(0,p0.__)("Cancel")}:i={type:"dropdown"},t={type:"panel",labelPosition:e?.labelPosition??"side",openAs:i,summary:r,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 o=e.summary??[];t={type:"card",withHeader:!0,isOpened:typeof e.isOpened=="boolean"?e.isOpened:!0,summary:hMe(o),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 ipe(e){let t=npe(e?.layout),o=(e.fields??[]).map(r=>{if(typeof r=="string")return{id:r,layout:t};let n=r.layout?npe(r.layout):t;return{id:r.id,layout:n,...!!r.label&&{label:r.label},...!!r.description&&{description:r.description},..."children"in r&&Array.isArray(r.children)&&{children:ipe({fields:r.children,layout:Hr}).fields}}});return{layout:t,fields:o}}var bO=ipe;var qt=l(w(),1);function gMe({title:e}){return(0,qt.jsx)(Ne,{direction:"column",className:"dataforms-layouts-regular__header",gap:"lg",children:(0,qt.jsx)(Ne,{direction:"row",align:"center",children:(0,qt.jsx)(h0.__experimentalHeading,{level:2,size:13,children:e})})})}function spe({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{fields:s}=(0,vO.useContext)(_s),a=t.layout,c=(0,vO.useMemo)(()=>({layout:Hr,fields:t.children?t.children:[]}),[t]);if(t.children)return(0,qt.jsxs)(qt.Fragment,{children:[!r&&t.label&&(0,qt.jsx)(gMe,{title:t.label}),(0,qt.jsx)(Un,{data:e,form:c,onChange:o,validity:i?.children})]});let u=a.labelPosition,d=s.find(f=>f.id===t.id);return!d||!d.Edit?null:u==="side"?(0,qt.jsxs)(Ne,{direction:"row",className:"dataforms-layouts-regular__field",gap:"sm",children:[(0,qt.jsx)("div",{className:D("dataforms-layouts-regular__field-label",`dataforms-layouts-regular__field-label--label-position-${u}`),children:(0,qt.jsx)(h0.BaseControl.VisualLabel,{children:d.label})}),(0,qt.jsx)("div",{className:"dataforms-layouts-regular__field-control",children:d.readOnly===!0?(0,qt.jsx)(d.render,{item:e,field:d}):(0,qt.jsx)(d.Edit,{data:e,field:d,onChange:o,hideLabelFromVision:!0,markWhenOptional:n,validity:i},d.id)})]}):(0,qt.jsx)("div",{className:"dataforms-layouts-regular__field",children:d.readOnly===!0?(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsxs)(qt.Fragment,{children:[!r&&u!=="none"&&(0,qt.jsx)(h0.BaseControl.VisualLabel,{children:d.label}),(0,qt.jsx)(d.render,{item:e,field:d})]})}):(0,qt.jsx)(d.Edit,{data:e,field:d,onChange:o,hideLabelFromVision:u==="none"?!0:r,markWhenOptional:n,validity:i})})}var F6=l(x4(),1),Yp=l(A(),1),ga=l(O(),1),SO=l(X(),1);var Kv=l(A(),1),$v=l(N(),1);var dpe=l(X(),1),fpe=l(O(),1);function bMe(e,t){return D("dataforms-layouts-panel__field-label",`dataforms-layouts-panel__field-label--label-position-${e}`,{"has-error":t})}var ape=bMe;var kO=l(A(),1);var g0=l(w(),1);function vMe(e,t,o){return e?(0,g0.jsx)(kO.Tooltip,{text:t,placement:"top",children:(0,g0.jsxs)("span",{className:"dataforms-layouts-panel__field-label-error-content",children:[(0,g0.jsx)(kO.Icon,{icon:tm,size:16}),o]})}):o}var lpe=vMe;function cpe(e){if(!e)return;let t=Object.keys(e).filter(o=>o!=="children");for(let o of t){let r=e[o];if(r!==void 0&&r.type==="invalid")return r.message?r.message:o==="required"?"A required field is empty":"Unidentified validation error"}if(e.children)for(let o of Object.values(e.children)){let r=cpe(o);if(r)return r}}var upe=cpe;var wi=l(w(),1);function b0({data:e,field:t,fieldLabel:o,summaryFields:r,validity:n,touched:i,disabled:s,onClick:a,"aria-expanded":c}){let{labelPosition:u,editVisibility:d}=t.layout,f=upe(n),m=i&&!!f,h=ape(u,m),p=lpe(m,f,o),g=D("dataforms-layouts-panel__field-trigger",`dataforms-layouts-panel__field-trigger--label-${u}`,{"is-disabled":s,"dataforms-layouts-panel__field-trigger--edit-always":d==="always"}),b=(0,dpe.useInstanceId)(b0,"dataforms-layouts-panel__field-control"),k=m?(0,$v.sprintf)((0,$v._x)("Edit %s (has errors)","field"),o||""):(0,$v.sprintf)((0,$v._x)("Edit %s","field"),o||""),v=(0,fpe.useRef)(null);return(0,wi.jsxs)("div",{ref:v,className:g,onClick:s?void 0:()=>{let S=v.current?.ownerDocument.defaultView?.getSelection();S&&S.toString().length>0||a()},onKeyDown:s?void 0:S=>{S.target===S.currentTarget&&(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),a())},children:[u!=="none"&&(0,wi.jsx)("span",{className:h,children:p}),u==="none"&&m&&(0,wi.jsx)(Kv.Tooltip,{text:f,placement:"top",children:(0,wi.jsx)("span",{className:"dataforms-layouts-panel__field-label-error-content",children:(0,wi.jsx)(Kv.Icon,{icon:tm,size:16})})}),(0,wi.jsx)("span",{id:`${b}`,className:"dataforms-layouts-panel__field-control",children:r.length>1?(0,wi.jsx)("span",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",width:"100%",gap:"2px"},children:r.map(S=>(0,wi.jsx)("span",{style:{width:"100%"},children:(0,wi.jsx)(S.render,{item:e,field:S})},S.id))}):r.map(S=>(0,wi.jsx)(S.render,{item:e,field:S},S.id))}),!s&&(0,wi.jsx)(Kv.Button,{className:"dataforms-layouts-panel__field-trigger-icon",label:k,icon:nm,size:"small","aria-expanded":c,"aria-haspopup":"dialog","aria-describedby":`${b}`})]})}var mpe=l(x4(),1),V6=l(Wf(),1),_l=l(O(),1),gn=l(N(),1);function ppe(e){return e?Object.values(e).every(t=>Object.entries(t).every(([o,r])=>o==="children"&&r&&typeof r=="object"?ppe(r):r.type!=="invalid"&&r.type!=="validating")):!0}function kMe(e,t){let o=bO(e);if(o.fields.length===0)return[];let r=new Map;t.forEach(s=>{r.set(s.id,s)});function n(s){if("children"in s&&Array.isArray(s.children)){let u=s.children.map(n).filter(f=>f!==null);if(u.length===0)return null;let d=r.get(s.id);if(d){let[f]=m0([d]);return{id:s.id,children:u,field:f}}return{id:s.id,children:u}}let a=r.get(s.id);if(!a)return null;let[c]=m0([a]);return{id:s.id,children:[],field:c}}return o.fields.map(n).filter(s=>s!==null)}function Yv(e,t,o){if(e||(e={}),o.length===0)return e;let r={...e},n=r;for(let s=0;s<o.length-1;s++){let a=o[s];n[a]||(n[a]={}),n[a]={...n[a]},n=n[a]}let i=o[o.length-1];return n[i]={...n[i]||{},...t},r}function hpe(e,t,o){if(!e||t.length===0)return e;let r={...e},n=r;for(let a=0;a<t.length-1;a++){let c=t[a];if(!n[c])return e;n[c]={...n[c]},n=n[c]}let i=t[t.length-1];if(!n[i])return e;let s={...n[i]};if(delete s[o],Object.keys(s).length===0?delete n[i]:n[i]=s,Object.keys(r).length!==0)return r}function yMe(e,t,o){let{elementsCounterRef:r,setFormValidity:n,path:i,item:s}=o,a=(r.current[t.id]||0)+1;r.current[t.id]=a,e.then(c=>{if(a===r.current[t.id]){if(!Array.isArray(c)){n(u=>Yv(u,{elements:{type:"invalid",message:(0,gn.__)("Could not validate elements.")}},[...i,t.id]));return}t.field?.isValid.elements&&!t.field.isValid.elements.validate(s,{...t.field,elements:c})?n(u=>Yv(u,{elements:{type:"invalid",message:(0,gn.__)("Value must be one of the elements.")}},[...i,t.id])):n(u=>hpe(u,[...i,t.id],"elements"))}}).catch(c=>{if(a!==r.current[t.id])return;let u;c instanceof Error?u=c.message:u=String(c)||(0,gn.__)("Unknown error when running elements validation asynchronously."),n(d=>Yv(d,{elements:{type:"invalid",message:u}},[...i,t.id]))})}function _Me(e,t,o){let{customCounterRef:r,setFormValidity:n,path:i}=o,s=(r.current[t.id]||0)+1;r.current[t.id]=s,e.then(a=>{if(s===r.current[t.id]){if(a===null){n(c=>hpe(c,[...i,t.id],"custom"));return}if(typeof a=="string"){n(c=>Yv(c,{custom:{type:"invalid",message:a}},[...i,t.id]));return}n(c=>Yv(c,{custom:{type:"invalid",message:(0,gn.__)("Validation could not be processed.")}},[...i,t.id]))}}).catch(a=>{if(s!==r.current[t.id])return;let c;a instanceof Error?c=a.message:c=String(a)||(0,gn.__)("Unknown error when running custom validation asynchronously."),n(u=>Yv(u,{custom:{type:"invalid",message:c}},[...i,t.id]))})}function gpe(e,t,o){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,gn.__)("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,gn.__)("Value is below the minimum.")}};if(t.field?.isValid.max&&!t.field.isValid.max.validate(e,t.field))return{max:{type:"invalid",message:(0,gn.__)("Value is above the maximum.")}};if(t.field?.isValid.minLength&&!t.field.isValid.minLength.validate(e,t.field))return{minLength:{type:"invalid",message:(0,gn.__)("Value is too short.")}};if(t.field?.isValid.maxLength&&!t.field.isValid.maxLength.validate(e,t.field))return{maxLength:{type:"invalid",message:(0,gn.__)("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,gn.__)("Value must be one of the elements.")}};let r;if(t.field&&t.field.isValid.custom)try{let i=t.field.getValue({item:e});r=t.field.isValid.custom((0,mpe.default)(e,t.field.setValue({item:e,value:i})),t.field)}catch(i){let s;return i instanceof Error?s=i.message:s=String(i)||(0,gn.__)("Unknown error when running custom validation."),{custom:{type:"invalid",message:s}}}if(typeof r=="string")return{custom:{type:"invalid",message:r}};let n={};if(t.field&&t.field.isValid.elements&&t.field.hasElements&&typeof t.field.getElements=="function"&&(yMe(t.field.getElements(),t,o),n.elements={type:"validating",message:(0,gn.__)("Validating\u2026")}),r instanceof Promise&&(_Me(r,t,o),n.custom={type:"validating",message:(0,gn.__)("Validating\u2026")}),Object.keys(n).length>0)return n;if(t.children.length>0){let i={};t.children.forEach(a=>{i[a.id]=gpe(e,a,{...o,path:[...o.path,t.id,"children"]})});let s={};return Object.entries(i).forEach(([a,c])=>{c!==void 0&&(s[a]=c)}),Object.keys(s).length===0?void 0:{children:s}}}function bpe(e,t){let o=e?.field?.getValue({item:t});if(e.children.length===0)return o;let r=e.children.map(n=>bpe(n,t));return r?{value:o,children:r}:o}function SMe(e,t,o){let[r,n]=(0,_l.useState)(),i=(0,_l.useRef)({}),s=(0,_l.useRef)({}),a=(0,_l.useRef)({}),c=(0,_l.useCallback)(()=>{let u={customCounterRef:i,elementsCounterRef:s,setFormValidity:n,path:[],item:e},d=kMe(o,t);if(d.length===0){n(void 0);return}let f={},m=[];d.forEach(h=>{let p=bpe(h,e);if(a.current.hasOwnProperty(h.id)&&(0,V6.default)(a.current[h.id],p)){m.push(h.id);return}a.current[h.id]=p;let g=gpe(e,h,u);g!==void 0&&(f[h.id]=g)}),n(h=>{let p={...h,...f},g=[...m,...Object.keys(f)];return Object.keys(p).forEach(k=>{p&&!g.includes(k)&&delete p[k]}),Object.keys(p).length===0&&(p=void 0),(0,V6.default)(h,p)?h:p})},[e,t,o]);return(0,_l.useEffect)(()=>{c()},[c]),{validity:r,isValid:ppe(r)}}var vpe=SMe;var kpe=l(O(),1);function If(e,t){(0,kpe.useEffect)(()=>{t&&e.current&&e.current.querySelectorAll("input, textarea, select").forEach(r=>{r.reportValidity()})},[t,e])}var ype=l(O(),1);function xMe(e){return Array.isArray(e)?e.map(t=>typeof t=="string"?t:t.id):[]}var yO=(e,t)=>Array.isArray(e)&&e.length>0?xMe(e).map(r=>t.find(n=>n.id===r)).filter(r=>r!==void 0):[];var wMe=(e,t)=>{let o=t.find(r=>r.id===e.id);return o||t.find(r=>{if(e.children){let n=e.children.filter(i=>!i.children);return n.length===0?!1:r.id===n[0].id}return r.id===e.id})};function CMe(e){let{fields:t}=(0,ype.useContext)(_s),o=e.layout,r=yO(o.summary,t),n=wMe(e,t),i=e.children?e.label:n?.label;return r.length===0?{summaryFields:n?[n]:[],fieldDefinition:n,fieldLabel:i}:{summaryFields:r,fieldDefinition:n,fieldLabel:i}}var _O=CMe;var bn=l(w(),1);function BMe({data:e,field:t,onChange:o,fieldLabel:r,onClose:n,touched:i}){let{openAs:s}=t.layout,{applyLabel:a,cancelLabel:c}=s,{fields:u}=(0,ga.useContext)(_s),[d,f]=(0,ga.useState)({}),m=(0,ga.useMemo)(()=>(0,F6.default)(e,d,{arrayMerge:(S,C)=>C}),[e,d]),h=(0,ga.useMemo)(()=>({layout:Hr,fields:t.children?t.children:[{id:t.id,layout:Hr}]}),[t]),p=u.map(S=>({...S,Edit:S.Edit===null?void 0:S.Edit,isValid:{required:S.isValid.required?.constraint,elements:S.isValid.elements?.constraint,min:S.isValid.min?.constraint,max:S.isValid.max?.constraint,pattern:S.isValid.pattern?.constraint,minLength:S.isValid.minLength?.constraint,maxLength:S.isValid.maxLength?.constraint}})),{validity:g}=vpe(m,p,h),b=()=>{o(d),n()},k=S=>{f(C=>(0,F6.default)(C,S,{arrayMerge:(B,P)=>P}))},v=(0,SO.useFocusOnMount)("firstInputElement"),y=(0,ga.useRef)(null),_=(0,SO.useMergeRefs)([v,y]);return If(y,i),(0,bn.jsxs)(Yp.Modal,{className:"dataforms-layouts-panel__modal",onRequestClose:n,isFullScreen:!1,title:r,size:"medium",children:[(0,bn.jsx)("div",{ref:_,children:(0,bn.jsx)(Un,{data:m,form:h,onChange:k,validity:g,children:(S,C,B,P)=>(0,bn.jsx)(S,{data:m,field:C,onChange:k,hideLabelFromVision:h.fields.length<2,markWhenOptional:P,validity:B},C.id)})}),(0,bn.jsxs)(Ne,{direction:"row",className:"dataforms-layouts-panel__modal-footer",gap:"md",children:[(0,bn.jsx)(Yp.__experimentalSpacer,{style:{flex:1}}),(0,bn.jsx)(Yp.Button,{variant:"tertiary",onClick:n,__next40pxDefaultSize:!0,children:c}),(0,bn.jsx)(Yp.Button,{variant:"primary",onClick:b,__next40pxDefaultSize:!0,children:a})]})]})}function EMe({data:e,field:t,onChange:o,validity:r}){let[n,i]=(0,ga.useState)(!1),[s,a]=(0,ga.useState)(!1),{fieldDefinition:c,fieldLabel:u,summaryFields:d}=_O(t);if(!c)return null;let f=()=>{a(!1),i(!0)};return(0,bn.jsxs)(bn.Fragment,{children:[(0,bn.jsx)(b0,{data:e,field:t,fieldLabel:u,summaryFields:d,validity:r,touched:n,disabled:c.readOnly===!0,onClick:()=>a(!0),"aria-expanded":s}),s&&(0,bn.jsx)(BMe,{data:e,field:t,onChange:o,fieldLabel:u??"",onClose:f,touched:n})]})}var _pe=EMe;var Pf=l(A(),1),Spe=l(N(),1),Kc=l(O(),1);var xpe=l(X(),1);var Gr=l(w(),1);function TMe({title:e,onClose:t}){return(0,Gr.jsx)(Ne,{direction:"column",className:"dataforms-layouts-panel__dropdown-header",gap:"lg",children:(0,Gr.jsxs)(Ne,{direction:"row",gap:"sm",align:"center",children:[e&&(0,Gr.jsx)(Pf.__experimentalHeading,{level:2,size:13,children:e}),(0,Gr.jsx)(Pf.__experimentalSpacer,{style:{flex:1}}),t&&(0,Gr.jsx)(Pf.Button,{label:(0,Spe.__)("Close"),icon:qf,onClick:t,size:"small"})]})})}function IMe({touched:e,children:t}){let o=(0,Kc.useRef)(null);return If(o,e),(0,Gr.jsx)("div",{ref:o,children:t})}function PMe({data:e,field:t,onChange:o,validity:r}){let[n,i]=(0,Kc.useState)(!1),[s,a]=(0,Kc.useState)(null),c=(0,Kc.useMemo)(()=>({anchor:s,placement:"left-start",offset:36,shift:!0}),[s]),[u,d]=(0,xpe.__experimentalUseDialog)({focusOnMount:"firstInputElement"}),f=(0,Kc.useMemo)(()=>({layout:Hr,fields:t.children?t.children:[{id:t.id,layout:Hr}]}),[t]),m=(0,Kc.useMemo)(()=>{if(r!==void 0)return t.children?r?.children:{[t.id]:r}},[r,t]),{fieldDefinition:h,fieldLabel:p,summaryFields:g}=_O(t);return h?(0,Gr.jsx)("div",{ref:a,className:"dataforms-layouts-panel__field-dropdown-anchor",children:(0,Gr.jsx)(Pf.Dropdown,{contentClassName:"dataforms-layouts-panel__field-dropdown",popoverProps:c,focusOnMount:!1,onToggle:b=>{b||i(!0)},renderToggle:({isOpen:b,onToggle:k})=>(0,Gr.jsx)(b0,{data:e,field:t,fieldLabel:p,summaryFields:g,validity:r,touched:n,disabled:h.readOnly===!0,onClick:k,"aria-expanded":b}),renderContent:({onClose:b})=>(0,Gr.jsx)(IMe,{touched:n,children:(0,Gr.jsxs)("div",{ref:u,...d,children:[(0,Gr.jsx)(TMe,{title:p,onClose:b}),(0,Gr.jsx)(Un,{data:e,form:f,onChange:o,validity:m,children:(k,v,y,_)=>(0,Gr.jsx)(k,{data:e,field:v,onChange:o,hideLabelFromVision:(f?.fields??[]).length<2,markWhenOptional:_,validity:y},v.id)})]})})})}):null}var wpe=PMe;var z6=l(w(),1);function Cpe({data:e,field:t,onChange:o,validity:r}){return t.layout.openAs.type==="modal"?(0,z6.jsx)(_pe,{data:e,field:t,onChange:o,validity:r}):(0,z6.jsx)(wpe,{data:e,field:t,onChange:o,validity:r})}var Hn=l(O(),1);var xO=l(N(),1),Bpe=l(w(),1);function Epe(e){if(!e)return 0;let t=0,o=Object.keys(e).filter(r=>r!=="children");for(let r of o)e[r]?.type==="invalid"&&t++;if(e.children)for(let r of Object.values(e.children))t+=Epe(r);return t}function wO({validity:e}){let t=Epe(e);return t===0?null:(0,Bpe.jsx)(qD,{intent:"high",children:(0,xO.sprintf)((0,xO._n)("%d field needs attention","%d fields need attention",t),t)})}var yo=l(w(),1);function RMe(e,t,o){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"&&!o:!0:!1}function OMe({data:e,fields:t,label:o,layout:r,isOpen:n,touched:i,validity:s}){let c=yO(r.summary,t).filter(f=>RMe(f,r.summary,n)),u=i&&r.isCollapsible,d=c.length>0&&r.withHeader;return(0,yo.jsxs)(Ne,{align:"center",justify:"space-between",className:"dataforms-layouts-card__field-header-content",children:[(0,yo.jsx)(La.Title,{children:o}),(u||d)&&(0,yo.jsxs)(Rm.HeaderDescription,{className:"dataforms-layouts-card__field-header-content-description",children:[u&&(0,yo.jsx)(wO,{validity:s}),d&&(0,yo.jsx)("div",{className:"dataforms-layouts-card__field-summary",children:c.map(f=>(0,yo.jsx)(f.render,{item:e,field:f},f.id))})]})]})}function AMe({data:e,field:t,form:o,onChange:r,hideLabelFromVision:n,markWhenOptional:i,validity:s,withHeader:a}){if(t.children)return(0,yo.jsxs)(yo.Fragment,{children:[t.description&&(0,yo.jsx)("div",{className:"dataforms-layouts-card__field-description",children:t.description}),(0,yo.jsx)(Un,{data:e,form:o,onChange:r,validity:s?.children})]});let c=qp("regular")?.component;return c?(0,yo.jsx)(c,{data:e,field:t,onChange:r,hideLabelFromVision:n||a,markWhenOptional:i,validity:s}):null}function Tpe({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{fields:s}=(0,Hn.useContext)(_s),a=t.layout,c=(0,Hn.useRef)(null),u=(0,Hn.useMemo)(()=>({layout:Hr,fields:t.children??[]}),[t]),{isOpened:d,isCollapsible:f}=a,[m,h]=(0,Hn.useState)(d),[p,g]=(0,Hn.useState)(!1);(0,Hn.useEffect)(()=>{h(d)},[d]);let b=(0,Hn.useCallback)(C=>{C||g(!0),h(C)},[]),k=(0,Hn.useCallback)(()=>{g(!0)},[]);If(c,(f?m:!0)&&p);let v=t.label,y;if(t.children)y=!!v&&a.withHeader;else{let C=s.find(B=>B.id===t.id);if(!C||!C.Edit)return null;v=C.label,y=!!v&&a.withHeader}let _=(0,yo.jsx)(AMe,{data:e,field:t,form:u,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i,withHeader:y}),S=(0,yo.jsx)(OMe,{data:e,fields:s,label:v,layout:a,isOpen:f?!!m:!0,touched:p,validity:i});return y&&f?(0,yo.jsxs)(Rm.Root,{className:"dataforms-layouts-card__field",open:m,onOpenChange:b,children:[(0,yo.jsx)(Rm.Header,{children:S}),(0,yo.jsx)(Rm.Content,{ref:c,onBlur:k,children:_})]}):(0,yo.jsxs)(La.Root,{className:"dataforms-layouts-card__field",children:[y&&(0,yo.jsx)(La.Header,{children:S}),(0,yo.jsx)(La.Content,{ref:c,onBlur:k,children:_})]})}var Ipe=l(A(),1);var pr=l(w(),1);function LMe({title:e}){return(0,pr.jsx)(Ne,{direction:"column",className:"dataforms-layouts-row__header",gap:"lg",children:(0,pr.jsx)(Ne,{direction:"row",align:"center",children:(0,pr.jsx)(Ipe.__experimentalHeading,{level:2,size:13,children:e})})})}var NMe=({children:e})=>(0,pr.jsx)(pr.Fragment,{children:e});function Ppe({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let s=t.layout;if(t.children){let c={layout:Hr,fields:t.children};return(0,pr.jsxs)("div",{className:"dataforms-layouts-row__field",children:[!r&&t.label&&(0,pr.jsx)(LMe,{title:t.label}),(0,pr.jsx)(Ne,{direction:"row",align:s.alignment,gap:"lg",children:(0,pr.jsx)(Un,{data:e,form:c,onChange:o,validity:i?.children,as:NMe,children:(u,d,f)=>(0,pr.jsx)("div",{className:"dataforms-layouts-row__field-control",style:s.styles[d.id],children:(0,pr.jsx)(u,{data:e,field:d,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:f})},d.id)})})]})}let a=qp("regular")?.component;return a?(0,pr.jsx)(pr.Fragment,{children:(0,pr.jsx)("div",{className:"dataforms-layouts-row__field-control",children:(0,pr.jsx)(a,{data:e,field:t,onChange:o,markWhenOptional:n,validity:i})})}):null}var Gn=l(O(),1),Rpe=l(N(),1);var Yc=l(w(),1);function Ope({data:e,field:t,onChange:o,validity:r}){let{fields:n}=(0,Gn.useContext)(_s),i=(0,Gn.useRef)(null),s=(0,Gn.useRef)(null),[a,c]=(0,Gn.useState)(!1),[u,d]=(0,Gn.useState)(!1),f=(0,Gn.useMemo)(()=>({layout:Hr,fields:t.children??[]}),[t]);(0,Gn.useEffect)(()=>{let b=i.current;if(!b)return;let k=()=>{let v=b.open;v||c(!0),d(v)};return b.addEventListener("toggle",k),()=>{b.removeEventListener("toggle",k)}},[]),If(s,u&&a);let m=(0,Gn.useCallback)(()=>{c(!0)},[]);if(!t.children)return null;let h=t.layout.summary??"",p=h?n.find(b=>b.id===h):void 0,g;return p&&p.render?g=(0,Yc.jsx)(p.render,{item:e,field:p}):g=t.label||(0,Rpe.__)("More details"),(0,Yc.jsxs)("details",{ref:i,className:"dataforms-layouts-details__details",children:[(0,Yc.jsx)("summary",{className:"dataforms-layouts-details__summary",children:(0,Yc.jsxs)(Ne,{direction:"row",align:"center",gap:"md",className:"dataforms-layouts-details__summary-content",children:[g,a&&(0,Yc.jsx)(wO,{validity:r})]})}),(0,Yc.jsx)("div",{ref:s,className:"dataforms-layouts-details__content",onBlur:m,children:(0,Yc.jsx)(Un,{data:e,form:f,onChange:o,validity:r?.children})})]})}var Zp=l(w(),1),MMe=[{type:"regular",component:spe,wrapper:({children:e})=>(0,Zp.jsx)(Ne,{direction:"column",className:"dataforms-layouts__wrapper",gap:"lg",children:e})},{type:"panel",component:Cpe,wrapper:({children:e})=>(0,Zp.jsx)(Ne,{direction:"column",className:"dataforms-layouts__wrapper",gap:"md",children:e})},{type:"card",component:Tpe,wrapper:({children:e})=>(0,Zp.jsx)(Ne,{direction:"column",className:"dataforms-layouts__wrapper",gap:"xl",children:e})},{type:"row",component:Ppe,wrapper:({children:e,layout:t})=>(0,Zp.jsx)(Ne,{direction:"column",className:"dataforms-layouts__wrapper",gap:"lg",children:(0,Zp.jsx)("div",{className:"dataforms-layouts-row__field",children:(0,Zp.jsx)(Ne,{direction:"row",gap:"lg",align:t.alignment,children:e})})})},{type:"details",component:Ope}];function qp(e){return MMe.find(t=>t.type===e)}var CO=l(w(),1),DMe=({children:e})=>(0,CO.jsx)(Ne,{direction:"column",className:"dataforms-layouts__wrapper",gap:"lg",children:e});function Un({data:e,form:t,onChange:o,validity:r,children:n,as:i}){let{fields:s}=(0,BO.useContext)(_s),a=(0,BO.useMemo)(()=>{let d=s.filter(m=>!!m.isValid?.required).length,f=s.length-d;return d>f},[s]);function c(d){return s.find(f=>f.id===d.id)}let u=i??qp(t.layout.type)?.wrapper??DMe;return(0,CO.jsx)(u,{layout:t.layout,children:t.fields.map(d=>{let f=qp(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,r?.[d.id],a):(0,CO.jsx)(f,{data:e,field:d,onChange:o,markWhenOptional:a,validity:r?.[d.id]},d.id)})})}var U6=l(w(),1);function v0({data:e,form:t,fields:o,onChange:r,validity:n}){let i=(0,j6.useMemo)(()=>bO(t),[t]),s=(0,j6.useMemo)(()=>m0(o),[o]);return t.fields?(0,U6.jsx)(rpe,{fields:s,children:(0,U6.jsx)(Un,{data:e,form:i,onChange:r,validity:n})}):null}var Of=l(O(),1),Ype=l(N(),1);var Zv=l(A(),1);var H6=l(N(),1);var Ape=l(X(),1);function qv({isControl:e}={isControl:!1}){return(0,Ape.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:e?35:259}}}var EO=l(w(),1);function Lpe({fields:e,visibleFields:t,onToggleField:o}){let{popoverProps:r}=qv();return!e||e.length===0?null:(0,EO.jsx)(Zv.DropdownMenu,{icon:Is,label:(0,H6.__)("Options"),popoverProps:r,toggleProps:{size:"small"},children:({onClose:n})=>(0,EO.jsx)(Zv.MenuGroup,{label:(0,H6.__)("Show / Hide"),children:e.map(i=>{let s=t.includes(i.id);return(0,EO.jsx)(Zv.MenuItem,{isSelected:s,onClick:()=>{o(i.id),n()},role:"menuitemcheckbox",icon:s?Ts:null,children:i.label},i.id)})})})}var TO=l(A(),1),Npe=l(X(),1),Mpe=l(z(),1),qc=l(O(),1),Dpe=l(yr(),1);var ba=l(w(),1),{useRichText:VMe}=M(Dpe.privateApis);function Vpe({data:e,field:t,hideLabelFromVision:o,onChange:r,config:n={}}){let i=(0,Mpe.useRegistry)(),s=t.getValue({item:e}),a=t.config||{},{clientId:c}=n,[u,d]=(0,qc.useState)({start:void 0,end:void 0}),[f,m]=(0,qc.useState)(!1),h=(0,qc.useRef)(),p=(0,qc.useRef)(new Set),g=(0,qc.useRef)(new Set),b=Jb({allowedFormats:a?.allowedFormats,disableFormats:a?.disableFormats});function k(){h.current?.focus()}let{value:v,getValue:y,onChange:_,ref:S,formatTypes:C}=VMe({value:s,onChange(T){r(t.setValue({item:e,value:T}))},selectionStart:u.start,selectionEnd:u.end,onSelectionChange:(T,E)=>d({start:T,end:E}),__unstableIsSelected:f,preserveWhiteSpace:!!a?.preserveWhiteSpace,placeholder:a?.placeholder,__unstableDisableFormats:a?.disableFormats,allowedFormats:b,withoutInteractiveFormatting:a?.withoutInteractiveFormatting,__unstableFormatTypeHandlerContext:(0,qc.useMemo)(()=>({richTextIdentifier:t.id,blockClientId:c}),[t.id,c])}),{baseControlProps:B,controlProps:P}=(0,TO.useBaseControlProps)({hideLabelFromVision:o??t.hideLabelFromVision,label:t.label});return(0,ba.jsxs)(ba.Fragment,{children:[f&&(0,ba.jsx)(nv.Provider,{value:g,children:(0,ba.jsx)(sv.Provider,{value:p,children:(0,ba.jsx)("div",{children:(0,ba.jsx)(r2,{value:v,onChange:_,onFocus:k,formatTypes:C,forwardedRef:h,isVisible:!1})})})}),(0,ba.jsx)(TO.BaseControl,{...B,children:(0,ba.jsx)("div",{className:"block-editor-content-only-controls__rich-text",role:"textbox","aria-multiline":!a?.disableLineBreaks,ref:(0,Npe.useMergeRefs)([S,e2({registry:i,getValue:y,onChange:_,formatTypes:C,selectionChange:d,isSelected:f,disableFormats:a?.disableFormats,value:v,tagName:"div",disableLineBreaks:a?.disableLineBreaks,keyboardShortcuts:g,inputEvents:p}),h]),onFocus:()=>m(!0),onBlur:()=>m(!1),contentEditable:!0,...P})})]})}var Rf=l(A(),1),Fpe=l(z(),1),zpe=l(Ve(),1),jpe=l(O(),1),Xp=l(N(),1);var io=l(w(),1),FMe=e=>{window.requestAnimationFrame(()=>{let[t]=zpe.focus.tabbable.find(e?.current);t&&t.focus()})};function zMe({data:e,field:t,attachment:o,config:r}){let{allowedTypes:n=[],multiple:i=!1}=r||{};if(i)return"todo multiple";if(o?.media_type==="image"||o?.poster)return(0,io.jsx)("div",{className:"block-editor-content-only-controls__media-thumbnail",children:(0,io.jsx)("img",{alt:"",width:20,height:20,src:o.media_type==="image"?o.source_url:o.poster})});if(n.length===1){let a=t.getValue({item:e})?.url;if(n[0]==="image"&&a)return(0,io.jsx)("div",{className:"block-editor-content-only-controls__media-thumbnail",children:(0,io.jsx)("img",{alt:"",width:20,height:20,src:a})});let c;if(n[0]==="image"?c=Ik:n[0]==="video"?c=FM:n[0]==="audio"?c=WA:c=hh,c)return(0,io.jsx)(Rf.Icon,{icon:c,size:20})}return(0,io.jsx)(Rf.Icon,{icon:hh,size:20})}function Upe({data:e,field:t,onChange:o,config:r={}}){let{popoverProps:n}=qv({isControl:!0}),i=t.getValue({item:e}),{allowedTypes:s=[],multiple:a=!1,useFeaturedImage:c=!1}=r,u=i?.id,d=i?.url,f=(0,Fpe.useSelect)(p=>{if(!u)return;let b=p(x).getSettings()[nx];if(b)return b(p,u)},[u]),m;if(s.length===1){let p=s[0];p==="image"?m=(0,Xp.__)("Image"):p==="video"?m=(0,Xp.__)("Video"):p==="application"?m=(0,Xp.__)("File"):m=(0,Xp.__)("Media")}else m=(0,Xp.__)("Media");let h=(0,jpe.useRef)();return(0,io.jsx)(Zs,{children:(0,io.jsxs)("div",{ref:h,className:"block-editor-content-only-controls",children:[(0,io.jsx)(Zb,{className:"block-editor-content-only-controls__media-replace-flow",allowedTypes:s,mediaId:u,mediaURL:d,multiple:a,popoverProps:n,onReset:()=>{o(t.setValue({item:e,value:{}}))},...c&&{useFeaturedImage:!!i?.featuredImage,onToggleFeaturedImage:()=>{o(t.setValue({item:e,value:{featuredImage:!i?.featuredImage}}))}},onSelect:p=>{if(p.id&&p.url){let g={...p,mediaType:p.media_type};c&&(g.featuredImage=!1),o(t.setValue({item:e,value:g}))}},renderToggle:p=>(0,io.jsx)(Rf.Button,{__next40pxDefaultSize:!0,className:"block-editor-content-only-controls__media",...p,children:(0,io.jsxs)(Rf.__experimentalGrid,{rowGap:0,columnGap:8,templateColumns:"20px 1fr",className:"block-editor-content-only-controls__media-row",children:[d&&(0,io.jsxs)(io.Fragment,{children:[(0,io.jsx)(zMe,{attachment:f,field:t,data:e,config:r}),(0,io.jsx)("span",{className:"block-editor-content-only-controls__media-title",children:f?.title?.raw&&f?.title?.raw!==""?f?.title?.raw:d})]}),!d&&(0,io.jsxs)(io.Fragment,{children:[(0,io.jsx)("span",{className:"block-editor-content-only-controls__media-placeholder",style:{width:"20px",height:"20px"}}),(0,io.jsx)("span",{className:"block-editor-content-only-controls__media-title",children:m})]})]})})}),d&&(0,io.jsx)(Rf.Button,{label:(0,Xp.__)("Reset"),className:"block-editor-content-only-controls__media-reset",size:"small",icon:kr,onClick:()=>{o(t.setValue({item:e,value:{}})),FMe(h)}})]})})}var Zc=l(A(),1),PO=l(O(),1),Hpe=l(N(),1);var Gpe=l(qn(),1);var Ir=l(w(),1),G6="noopener",Wpe="_blank",IO="nofollow";function jMe({rel:e="",url:t="",opensInNewTab:o,nofollow:r}){let n,i=e;if(o)n=Wpe,i=i?.includes(G6)?i:i+` ${G6}`;else{let s=new RegExp(`\\b${G6}\\s*`,"g");i=i?.replace(s,"").trim()}if(r)i=i?.includes(IO)?i:(i+` ${IO}`).trim();else{let s=new RegExp(`\\b${IO}\\s*`,"g");i=i?.replace(s,"").trim()}return{url:(0,Gpe.prependHTTP)(t),linkTarget:n,rel:i||void 0}}function $pe({data:e,field:t,onChange:o}){let[r,n]=(0,PO.useState)(!1),{popoverProps:i}=qv({isControl:!0}),s=t.getValue({item:e}),a=s?.url,c=s?.rel||"",d=s?.linkTarget===Wpe,f=c===IO,m=(0,PO.useMemo)(()=>({url:a,opensInNewTab:d,nofollow:f}),[a,d,f]);return(0,Ir.jsxs)(Ir.Fragment,{children:[(0,Ir.jsx)(Zc.Button,{__next40pxDefaultSize:!0,className:"block-editor-content-only-controls__link",onClick:()=>{n(!0)},children:(0,Ir.jsxs)(Zc.__experimentalGrid,{rowGap:0,columnGap:8,templateColumns:"24px 1fr",className:"block-editor-content-only-controls__link-row",children:[a&&(0,Ir.jsxs)(Ir.Fragment,{children:[(0,Ir.jsx)(Zc.Icon,{icon:yn,size:24}),(0,Ir.jsx)("span",{className:"block-editor-content-only-controls__link-title",children:a})]}),!a&&(0,Ir.jsxs)(Ir.Fragment,{children:[(0,Ir.jsx)(Zc.Icon,{icon:yn,size:24,style:{opacity:.3}}),(0,Ir.jsx)("span",{className:"block-editor-content-only-controls__link-title",children:(0,Hpe.__)("Link")})]})]})}),r&&(0,Ir.jsx)(Zc.Popover,{onClose:()=>{n(!1)},...i??{},children:(0,Ir.jsx)(Jd,{value:m,onChange:h=>{let p=jMe({rel:c,...h});o(t.setValue({item:e,value:p}))},onRemove:()=>{o(t.setValue({item:e,value:{}}))}})})]})}var Pr=l(w(),1),{fieldsKey:qpe,formKey:W6}=M(Xv.privateApis);function $6(e,t={}){return function(r){return(0,Pr.jsx)(e,{...r,config:t})}}function UMe({clientId:e,blockType:t,setAttributes:o,isMultiBlock:r=!1}){let n=Sr({clientId:e,context:"list-view"}),i=Pt(e),s=t?.[qpe],a=(0,Of.useContext)(Or),c=(0,OO.useSelect)(k=>{let v=k(x).getBlockAttributes(e);if(!v?.metadata?.bindings)return v;let{getBlockBindingsSource:y}=M(k(Xv.store));return Object.entries(v.metadata.bindings).reduce((_,[S,C])=>{let B=y(C.source);if(!B)return _;let P=B.getValues({select:k,context:a,bindings:{[S]:C}});return{..._,...P}},v)},[a,e]),{selectBlock:u,toggleBlockHighlight:d}=(0,OO.useDispatch)(x),f=(0,Kpe.useDebounce)(d,50),m=(0,Of.useMemo)(()=>r?{...t?.[W6],fields:[t?.[W6]?.fields?.[0]]}:t?.[W6],[t,r]),[h,p]=(0,Of.useState)(m),g=(0,Of.useMemo)(()=>s?.length?s.map(k=>{let v={...k};return typeof k.Edit=="string"&&k.Edit==="rich-text"?v.Edit=$6(Vpe,{clientId:e}):typeof k.Edit=="string"&&k.Edit==="link"?v.Edit=$6($pe):typeof k.Edit=="object"&&k.Edit.control==="media"&&(v.Edit=$6(Upe,{...k.Edit})),v}):[],[s,e]);if(!s?.length)return null;let b=k=>{p(v=>v.fields?.includes(k)?{...v,fields:v.fields.filter(y=>y!==k)}:{...v,fields:[...v.fields||[],k]})};return(0,Pr.jsxs)("div",{className:"block-editor-block-fields__container",onMouseEnter:r?()=>f(e,!0):void 0,onMouseLeave:()=>r?f(e,!1):void 0,onFocus:r?()=>{u(e,null)}:void 0,children:[(0,Pr.jsx)("div",{className:"block-editor-block-fields__header",children:(0,Pr.jsxs)(RO.__experimentalHStack,{spacing:1,children:[r&&(0,Pr.jsxs)(Pr.Fragment,{children:[(0,Pr.jsx)(Ae,{className:"block-editor-block-fields__header-icon",icon:i?.icon}),(0,Pr.jsx)("h2",{className:"block-editor-block-fields__header-title",children:(0,Pr.jsx)(RO.__experimentalTruncate,{numberOfLines:1,children:n})}),(0,Pr.jsx)(Lpe,{fields:g,visibleFields:h.fields,onToggleField:b})]}),!r&&(0,Pr.jsx)("h2",{className:"block-editor-block-fields__header-title",children:(0,Ype.__)("Content")})]})}),(0,Pr.jsx)(v0,{data:c,fields:g,form:h,onChange:o})]})}function HMe(e){return!!(window?.__experimentalContentOnlyInspectorFields&&(0,Xv.getBlockType)(e)?.[qpe])}function GMe(e){let{blockType:t,isSelectionWithinCurrentSection:o}=(0,Of.useContext)(br);return(0,Pr.jsx)(Qm,{group:"content",children:(0,Pr.jsx)(UMe,{...e,blockType:t,isMultiBlock:o})})}var Zpe={edit:GMe,hasSupport:HMe,attributeKeys:[],supportsPatternEditing:!0};var q6=l(pt(),1),Xpe=l(A(),1),K6=l(N(),1),k0=l(Y(),1);var Y6=l(w(),1);function WMe(e){return(0,k0.hasBlockSupport)(e,"customClassName",!0)&&(e.attributes={...e.attributes,className:{type:"string"}}),e}function $Me({className:e,setAttributes:t}){return go()!=="default"?null:(0,Y6.jsx)(fe,{group:"advanced",children:(0,Y6.jsx)(Xpe.TextControl,{__next40pxDefaultSize:!0,autoComplete:"off",label:(0,K6.__)("Additional CSS class(es)"),value:e||"",onChange:r=>{t({className:r!==""?r:void 0})},help:(0,K6.__)("Separate multiple classes with spaces.")})})}var Z6={edit:$Me,addSaveProps:KMe,attributeKeys:["className"],hasSupport(e){return(0,k0.hasBlockSupport)(e,"customClassName",!0)}};function KMe(e,t,o){return(0,k0.hasBlockSupport)(t,"customClassName",!0)&&o.className&&(e.className=D(e.className,o.className)),e}function YMe(e,t,o,r){if(!(0,k0.hasBlockSupport)(e.name,"customClassName",!0)||r.length===1&&e.innerBlocks.length===t.length||r.length===1&&t.length>1||r.length>1&&t.length===1)return e;if(t[o]){let n=t[o]?.attributes.className;if(n&&e.attributes.className===void 0)return{...e,attributes:{...e.attributes,className:n}}}return e}(0,q6.addFilter)("blocks.registerBlockType","core/editor/custom-class-name/attribute",WMe);(0,q6.addFilter)("blocks.switchToBlockType.transformedBlock","core/customClassName/addTransforms",YMe);var Qpe=l(pt(),1),y0=l(Y(),1);function qMe(e,t){return(0,y0.hasBlockSupport)(t,"className",!0)&&(typeof e.className=="string"?e.className=[...new Set([(0,y0.getBlockDefaultClassName)(t.name),...e.className.split(" ")])].join(" ").trim():e.className=(0,y0.getBlockDefaultClassName)(t.name)),e}(0,Qpe.addFilter)("blocks.getSaveContent.extraProps","core/generated-class-name/save-props",qMe);var Ihe=l(O(),1),Phe=l(pt(),1),Jc=l(Y(),1),Rhe=l(X(),1),tk=l(fy(),1);var nj=l(Y(),1),VO=l(O(),1),ghe=l(z(),1);var ZMe=l(Y(),1);var XMe=l(w(),1),Jpe="typography.lineHeight";var ehe=l(pt(),1),AO=l(Y(),1),the=l(QT(),1),ohe=l(A(),1);var _0="typography.__experimentalFontFamily",{kebabCase:QMe}=M(ohe.privateApis);function JMe(e){return(0,AO.hasBlockSupport)(e,_0)&&(e.attributes.fontFamily||Object.assign(e.attributes,{fontFamily:{type:"string"}})),e}function rhe(e,t,o){if(!(0,AO.hasBlockSupport)(t,_0)||We(t,Ss,"fontFamily")||!o?.fontFamily)return e;let r=new the.default(e.className);r.add(`has-${QMe(o?.fontFamily)}-font-family`);let n=r.value;return e.className=n||void 0,e}function e5e({name:e,fontFamily:t}){return rhe({},e,{fontFamily:t})}var X6={useBlockProps:e5e,addSaveProps:rhe,attributeKeys:["fontFamily"],hasSupport(e){return(0,AO.hasBlockSupport)(e,_0)}};(0,ehe.addFilter)("blocks.registerBlockType","core/fontFamily/addAttribute",JMe);var Q6=l(pt(),1),Qv=l(Y(),1),nhe=l(QT(),1);var t5e=l(w(),1),Qp="typography.fontSize";function o5e(e){return(0,Qv.hasBlockSupport)(e,Qp)&&(e.attributes.fontSize||Object.assign(e.attributes,{fontSize:{type:"string"}})),e}function ihe(e,t,o){if(!(0,Qv.hasBlockSupport)(t,Qp)||We(t,Ss,"fontSize"))return e;let r=new nhe.default(e.className);r.add(Ru(o.fontSize));let n=r.value;return e.className=n||void 0,e}function r5e({name:e,fontSize:t,style:o}){let[r,n,i]=pe("typography.fontSizes","typography.fluid","layout");if(!(0,Qv.hasBlockSupport)(e,Qp)||We(e,Ss,"fontSize")||!t&&!o?.typography?.fontSize)return;let s;if(o?.typography?.fontSize&&(s={style:{fontSize:mc({size:o.typography.fontSize},{typography:{fluid:n},layout:i})}}),t&&(s={style:{fontSize:Ph(r,t,o?.typography?.fontSize).size}}),!!s)return ihe(s,e,{fontSize:t})}var J6={useBlockProps:r5e,addSaveProps:ihe,attributeKeys:["fontSize","style"],hasSupport(e){return(0,Qv.hasBlockSupport)(e,Qp)}},n5e={fontSize:[["fontSize"],["style","typography","fontSize"]]};function i5e(e,t,o,r){let n=e.name,i={fontSize:(0,Qv.hasBlockSupport)(n,Qp)};return fR(i,n5e,e,t,o,r)}(0,Q6.addFilter)("blocks.registerBlockType","core/font/addAttribute",o5e);(0,Q6.addFilter)("blocks.switchToBlockType.transformedBlock","core/font-size/addTransforms",i5e);var LO=l(N(),1),Jv=l(Y(),1);var ej=l(w(),1),ek="typography.textAlign",s5e=[{icon:gu,title:(0,LO.__)("Align text left"),align:"left"},{icon:$f,title:(0,LO.__)("Align text center"),align:"center"},{icon:bu,title:(0,LO.__)("Align text right"),align:"right"}],she=["left","center","right"],a5e=[];function tj(e){return Array.isArray(e)?she.filter(t=>e.includes(t)):e===!0?she:a5e}function l5e({style:e,name:t,setAttributes:o}){let n=gs(t)?.typography?.textAlign,i=go();if(!n||i!=="default")return null;let s=tj((0,Jv.getBlockSupport)(t,ek));if(!s.length)return null;let a=s5e.filter(u=>s.includes(u.align)),c=u=>{let d={...e,typography:{...e?.typography,textAlign:u}};o({style:Le(d)})};return(0,ej.jsx)(Ut,{group:"block",children:(0,ej.jsx)(BC,{value:e?.typography?.textAlign,onChange:c,alignmentControls:a})})}var NO={edit:l5e,useBlockProps:c5e,addSaveProps:u5e,attributeKeys:["style"],hasSupport(e){return(0,Jv.hasBlockSupport)(e,ek,!1)}};function c5e({name:e,style:t}){if(!t?.typography?.textAlign||!tj((0,Jv.getBlockSupport)(e,ek)).length||We(e,Ss,"textAlign"))return null;let r=t.typography.textAlign;return{className:D({[`has-text-align-${r}`]:r})}}function u5e(e,t,o){if(!o?.style?.typography?.textAlign)return e;let{textAlign:r}=o.style.typography,n=(0,Jv.getBlockSupport)(t,ek);return tj(n).includes(r)&&!We(t,Ss,"textAlign")&&(e.className=D(`has-text-align-${r}`,e.className)),e}var rj=l(pt(),1),Af=l(Y(),1),Jp=l(O(),1),mhe=l(z(),1),S0=l(N(),1),MO=l(A(),1),phe=l(X(),1);function d5e(e,t){let o=e.scrollHeight>e.clientHeight,r=0,n=2400,i=r,s=window.getComputedStyle(e),a=parseFloat(s.paddingLeft)||0,c=parseFloat(s.paddingRight)||0,u=document.createRange();u.selectNodeContents(e);let d=e,f=e.parentElement;if(f){let h=window.getComputedStyle(f);h?.display==="flex"&&(d=f,a+=parseFloat(h.paddingLeft)||0,c+=parseFloat(h.paddingRight)||0)}let m=d.clientHeight;for(;r<=n;){let h=Math.floor((r+n)/2);t(h);let g=u.getBoundingClientRect().width,b=e.scrollWidth<=d.clientWidth&&g<=d.clientWidth-a-c,k=o||e.scrollHeight<=d.clientHeight||e.scrollHeight<=m;d.clientHeight>m&&(m=d.clientHeight),b&&k?(i=h,r=h+1):n=h-1}return u.detach(),i}function ahe(e,t){if(!e)return;t(0);let o=d5e(e,t);return t(o),o}var lhe=l(O(),1),che=l(N(),1),uhe=l(A(),1),dhe=l(ir(),1),oj=l(w(),1);function fhe(){let e=(0,che.__)("The text may be too small to read. Consider using a larger container or less text.");return(0,lhe.useEffect)(()=>{(0,dhe.speak)(e)},[e]),(0,oj.jsx)("div",{className:"block-editor-fit-text-size-warning",children:(0,oj.jsx)(uhe.Notice,{spokenMessage:null,status:"warning",isDismissible:!1,children:e})})}var Wn=l(w(),1),f5e={},m5e=12,Xc="typography.fitText";function p5e(e){return!(0,Af.hasBlockSupport)(e,Xc)||e.attributes?.fitText?e:{...e,attributes:{...e.attributes,fitText:{type:"boolean"}}}}function h5e({fitText:e,name:t,clientId:o}){let[r,n]=(0,Jp.useState)(null),i=(0,Af.hasBlockSupport)(t,Xc),s=rt(o),{blockAttributes:a,parentId:c,blockMode:u}=(0,mhe.useSelect)(f=>{if(!o||!i||!e)return f5e;let m=f(x).getBlockMode(o);return m==="html"?{blockMode:m}:{blockAttributes:f(x).getBlockAttributes(o),parentId:f(x).getBlockRootClientId(o),blockMode:m}},[o,i,e]),d=(0,Jp.useCallback)(()=>{if(!s||!i||!e)return;let f=`fit-text-${o}`,m=s.ownerDocument.getElementById(f);m||(m=s.ownerDocument.createElement("style"),m.id=f,s.ownerDocument.head.appendChild(m));let h=`#block-${o}`,g=ahe(s,b=>{b===0?m.textContent="":m.textContent=`${h} { font-size: ${b}px !important; }`});n(g)},[s,o,i,e]);return(0,Jp.useEffect)(()=>{if(!e||!s||!o||!i||u==="html")return;let f=s,m=f.style.visibility,h=null,p=null,g=null;h=window.requestAnimationFrame(()=>{f.style.visibility="hidden",p=window.requestAnimationFrame(()=>{d(),g=setTimeout(()=>{f.style.visibility=m},10)})});let b;return window.ResizeObserver&&f.parentElement&&(b=new window.ResizeObserver(d),b.observe(f.parentElement),b.observe(f)),()=>{h!==null&&window.cancelAnimationFrame(h),p!==null&&window.cancelAnimationFrame(p),g!==null&&clearTimeout(g),b&&b.disconnect();let k=`fit-text-${o}`,v=f.ownerDocument.getElementById(k);v&&v.remove()}},[e,o,c,d,s,i,u]),(0,Jp.useEffect)(()=>{if(e&&s&&i&&u!=="html"){let f=window.requestAnimationFrame(()=>{s&&d()});return()=>window.cancelAnimationFrame(f)}},[a,e,d,s,i,u]),{fontSize:r}}function g5e({clientId:e,fitText:t=!1,setAttributes:o,name:r,fontSize:n,style:i}){return(0,Af.hasBlockSupport)(r,Xc)?(0,Wn.jsx)(MO.__experimentalToolsPanelItem,{hasValue:()=>t,label:(0,S0.__)("Fit text"),onDeselect:()=>o({fitText:void 0}),resetAllFilter:()=>({fitText:void 0}),panelId:e,children:(0,Wn.jsx)(MO.ToggleControl,{label:(0,S0.__)("Fit text"),checked:t,onChange:()=>{let s=!t||void 0,a={fitText:s};s&&(n&&(a.fontSize=void 0),i?.typography?.fontSize&&(a.style={...i,typography:{...i?.typography,fontSize:void 0}})),o(a)},help:t?(0,S0.__)("Text will resize to fit its container."):(0,S0.__)("The text will resize to fit its container, resetting other font size settings.")})}):null}function b5e(e,t,o){if(!(0,Af.hasBlockSupport)(t,Xc))return e;let{fitText:r}=o;if(!r)return e;let n=e.className?`${e.className} has-fit-text`:"has-fit-text";return{...e,className:n}}function v5e({name:e,fitText:t}){return t&&(0,Af.hasBlockSupport)(e,Xc)?{className:"has-fit-text"}:{}}(0,rj.addFilter)("blocks.registerBlockType","core/fit-text/addAttribute",p5e);var k5e=e=>(0,Af.hasBlockSupport)(e,Xc);function y5e({fitText:e,name:t,clientId:o,isSelected:r}){let{fontSize:n}=h5e({fitText:e,name:t,clientId:o});return r&&n&&n<m5e?(0,Wn.jsx)(fe,{group:"typography",children:(0,Wn.jsx)(fhe,{})}):null}var _5e=(0,phe.createHigherOrderComponent)(e=>function(o){let{name:r,attributes:n,clientId:i,isSelected:s,setAttributes:a}=o,{fitText:c}=n;return(0,Af.hasBlockSupport)(r,Xc)?(0,Wn.jsxs)(Wn.Fragment,{children:[(0,Wn.jsx)(e,{...o}),(0,Wn.jsx)(fe,{group:"typography",children:(0,Wn.jsx)(g5e,{clientId:i,fitText:c,setAttributes:a,name:r,fontSize:n.fontSize,style:n.style})}),c&&(0,Wn.jsx)(y5e,{fitText:c,name:r,clientId:i,isSelected:s})]}):(0,Wn.jsx)(e,{...o})},"addFitTextControl");(0,rj.addFilter)("editor.BlockEdit","core/fit-text/add-fit-text-control",_5e);var DO={useBlockProps:v5e,addSaveProps:b5e,attributeKeys:["fitText","fontSize","style"],hasSupport:k5e,edit:()=>null};var ij=l(w(),1);function hhe(e,t){return Object.fromEntries(Object.entries(e).filter(([o])=>!t.includes(o)))}var S5e="typography.__experimentalLetterSpacing",x5e="typography.__experimentalTextTransform",w5e="typography.__experimentalTextDecoration",C5e="typography.textIndent",B5e="typography.textColumns",E5e="typography.__experimentalFontStyle",T5e="typography.__experimentalFontWeight",I5e="typography.__experimentalWritingMode",Ss="typography",bhe=[Jpe,Qp,E5e,T5e,_0,ek,B5e,w5e,C5e,I5e,x5e,S5e,Xc];function vhe(e){let t={...hhe(e,["fontFamily"])},o=e?.typography?.fontSize,r=e?.typography?.fontFamily,n=typeof o=="string"&&o?.startsWith("var:preset|font-size|")?o.substring(21):void 0,i=r?.startsWith("var:preset|font-family|")?r.substring(23):void 0;return t.typography={...hhe(t.typography,["fontFamily"]),fontSize:n?void 0:o},{style:Le(t),fontFamily:i,fontSize:n}}function khe(e){return{...e.style,typography:{...e.style?.typography,fontFamily:e.fontFamily?"var:preset|font-family|"+e.fontFamily:void 0,fontSize:e.fontSize?"var:preset|font-size|"+e.fontSize:e.style?.typography?.fontSize}}}function P5e({children:e,resetAllFilter:t}){let o=(0,VO.useCallback)(r=>{let n=khe(r),i=t(n);return{...r,...vhe(i)}},[t]);return(0,ij.jsx)(fe,{group:"typography",resetAllFilter:o,children:e})}function yhe({clientId:e,name:t,setAttributes:o,settings:r}){let n=P2(r),{style:i,fontFamily:s,fontSize:a,fitText:c}=(0,ghe.useSelect)(m=>{if(!n)return{};let{style:h,fontFamily:p,fontSize:g,fitText:b}=m(x).getBlockAttributes(e)||{};return{style:h,fontFamily:p,fontSize:g,fitText:b}},[e,n]),u=(0,VO.useMemo)(()=>khe({style:i,fontFamily:s,fontSize:a}),[i,a,s]),d=m=>{let h=vhe(m);(h.fontSize||h.style?.typography?.fontSize)&&c&&(h.fitText=void 0),o(h)};if(!n)return null;let f=(0,nj.getBlockSupport)(t,[Ss,"__experimentalDefaultControls"]);return(0,ij.jsx)(R2,{as:P5e,panelId:e,settings:r,value:u,onChange:d,defaultControls:f})}var Nf=l(O(),1),zO=l(z(),1),FO=l(Y(),1),Che=l(Re(),1);var Sl=l(O(),1),_he=l(P_(),1);var x0=l(w(),1);function She({clientId:e,value:t,computeStyle:o,forceShow:r}){let n=rt(e),[i,s]=(0,Sl.useReducer)(()=>o(n));(0,Sl.useEffect)(()=>{n&&r&&s()},[n,r]),(0,Sl.useEffect)(()=>{if(!n)return;let d=new window.MutationObserver(s);return d.observe(n,{attributes:!0,attributeFilter:["style","class"]}),()=>{d.disconnect()}},[n]);let a=(0,Sl.useRef)(t),[c,u]=(0,Sl.useState)(!1);return(0,Sl.useEffect)(()=>{if((0,_he.isShallowEqual)(t,a.current)||r)return;u(!0),a.current=t;let d=setTimeout(()=>{u(!1)},400);return()=>{u(!1),clearTimeout(d)}},[t,r]),!c&&!r?null:(0,x0.jsx)(Qi,{clientId:e,__unstablePopoverSlot:"block-toolbar",children:(0,x0.jsx)("div",{className:"block-editor__spacing-visualizer",style:i})})}function Lf(e,t){return e.ownerDocument.defaultView.getComputedStyle(e).getPropertyValue(t)}function xhe({clientId:e,value:t,forceShow:o}){return(0,x0.jsx)(She,{clientId:e,value:t?.spacing?.margin,computeStyle:r=>{let n=Lf(r,"margin-top"),i=Lf(r,"margin-right"),s=Lf(r,"margin-bottom"),a=Lf(r,"margin-left");return{borderTopWidth:n,borderRightWidth:i,borderBottomWidth:s,borderLeftWidth:a,top:n?`-${n}`:0,right:i?`-${i}`:0,bottom:s?`-${s}`:0,left:a?`-${a}`:0}},forceShow:o})}function whe({clientId:e,value:t,forceShow:o}){return(0,x0.jsx)(She,{clientId:e,value:t?.spacing?.padding,computeStyle:r=>({borderTopWidth:Lf(r,"padding-top"),borderRightWidth:Lf(r,"padding-right"),borderBottomWidth:Lf(r,"padding-bottom"),borderLeftWidth:Lf(r,"padding-left")}),forceShow:o})}var Qc=l(w(),1),xl="dimensions",w0="spacing";function R5e(){let[e,t]=(0,Nf.useState)(!1),{hideBlockInterface:o,showBlockInterface:r}=M((0,zO.useDispatch)(x));return(0,Nf.useEffect)(()=>{e?o():r()},[e,r,o]),[e,t]}function O5e({children:e,resetAllFilter:t}){let o=(0,Nf.useCallback)(r=>{let n=r.style,i=t(n);return{...r,style:i}},[t]);return(0,Qc.jsx)(fe,{group:"dimensions",resetAllFilter:o,children:e})}function Bhe({clientId:e,name:t,setAttributes:o,settings:r}){let n=N2(r),i=(0,zO.useSelect)(m=>{if(n)return m(x).getBlockAttributes(e)?.style},[e,n]),[s,a]=R5e(),c=m=>{o({style:Le(m)})};if(!n)return null;let u=(0,FO.getBlockSupport)(t,[xl,"__experimentalDefaultControls"]),d=(0,FO.getBlockSupport)(t,[w0,"__experimentalDefaultControls"]),f={minHeight:!1,minWidth:!1,...u,...d};return(0,Qc.jsxs)(Qc.Fragment,{children:[(0,Qc.jsx)(M2,{as:O5e,panelId:e,settings:r,value:i,onChange:c,defaultControls:f,onVisualize:a}),!!r?.spacing?.padding&&s==="padding"&&(0,Qc.jsx)(whe,{forceShow:s==="padding",clientId:e,value:i}),!!r?.spacing?.margin&&s==="margin"&&(0,Qc.jsx)(xhe,{forceShow:s==="margin",clientId:e,value:i})]})}function Ehe(e,t="any"){if(Nf.Platform.OS!=="web")return!1;let o=(0,FO.getBlockSupport)(e,xl);return o===!0?!0:t==="any"?!!(o?.aspectRatio||o?.height||o?.minHeight||o?.width||o?.minWidth):!!o?.[t]}var The={useBlockProps:A5e,attributeKeys:["height","minHeight","width","style"],hasSupport(e){return Ehe(e)}};function A5e({name:e,height:t,minHeight:o,style:r}){if(!Ehe(e,"aspectRatio")||We(e,xl,"aspectRatio"))return{};let n=D({"has-aspect-ratio":!!r?.dimensions?.aspectRatio}),i={};return r?.dimensions?.aspectRatio?(i.minHeight="unset",i.height="unset"):(o||r?.dimensions?.minHeight||t||r?.dimensions?.height)&&(i.aspectRatio="unset"),{className:n,style:i}}function sj(){(0,Che.default)("wp.blockEditor.__experimentalUseCustomSides",{since:"6.3",version:"6.4"})}var wl=l(w(),1),L5e=[...bhe,Fp,mr,xl,zp,w0,t0],lj=e=>L5e.some(t=>(0,Jc.hasBlockSupport)(e,t));function Ci(e={}){let t={};return(0,tk.getCSSRules)(e).forEach(o=>{t[o.key]=o.value}),t}function N5e(e){return!lj(e)&&!(0,Jc.hasBlockSupport)(e,"customCSS",!0)||e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e}var Ohe={[`${Fp}.__experimentalSkipSerialization`]:["border"],[`${mr}.__experimentalSkipSerialization`]:[mr],[`${Ss}.__experimentalSkipSerialization`]:[Ss],[`${xl}.__experimentalSkipSerialization`]:[xl],[`${w0}.__experimentalSkipSerialization`]:[w0],[`${t0}.__experimentalSkipSerialization`]:[t0]},M5e={...Ohe,[`${xl}.aspectRatio`]:[`${xl}.aspectRatio`],[`${zp}`]:[zp]},D5e={[`${xl}.aspectRatio`]:!0,[`${zp}`]:!0},V5e={gradients:"gradient"};function aj(e,t,o=!1){if(!e)return e;let r=e;return o||(r=JSON.parse(JSON.stringify(e))),Array.isArray(t)||(t=[t]),t.forEach(n=>{if(Array.isArray(n)||(n=n.split(".")),n.length>1){let[i,...s]=n;aj(r[i],[s],!0)}else n.length===1&&delete r[n[0]]}),r}function Ahe(e,t,o,r=M5e){if(!lj(t))return e;let{style:n}=o;return Object.entries(r).forEach(([i,s])=>{let a=D5e[i]||(0,Jc.getBlockSupport)(t,i);a===!0&&(n=aj(n,s)),Array.isArray(a)&&a.forEach(c=>{let u=V5e[c]||c;n=aj(n,[[...s,u]])})}),e.style={...Ci(n),...e.style},e}function F5e({clientId:e,name:t,setAttributes:o,__unstableParentLayout:r}){let n=gs(t,r),i=go(),s={clientId:e,name:t,setAttributes:o,settings:{...n,typography:{...n.typography,textAlign:!1}}};return i!=="default"?null:(0,wl.jsxs)(wl.Fragment,{children:[(0,wl.jsx)(dR,{...s}),(0,wl.jsx)(Pue,{...s}),(0,wl.jsx)(yhe,{...s}),(0,wl.jsx)(Bue,{...s}),(0,wl.jsx)(Bhe,{...s})]})}var jO={edit:F5e,hasSupport:lj,addSaveProps:Ahe,attributeKeys:["style"],useBlockProps:H5e},z5e=[{elementType:"button"},{elementType:"link",pseudo:[":hover"]},{elementType:"heading",elements:["h1","h2","h3","h4","h5","h6"]}],j5e={};function U5e(e,t,o){if(!e)return;let r=[];return z5e.forEach(({elementType:n,pseudo:i,elements:s})=>{if(We(t,mr,n))return;let c=e?.[n];if(c){let u=qg(o,Jc.__EXPERIMENTAL_ELEMENTS[n]);r.push((0,tk.compileCSS)(c,{selector:u})),i&&i.forEach(d=>{c[d]&&r.push((0,tk.compileCSS)(c[d],{selector:qg(o,`${Jc.__EXPERIMENTAL_ELEMENTS[n]}${d}`)}))})}s&&s.forEach(u=>{e[u]&&r.push((0,tk.compileCSS)(e[u],{selector:qg(o,Jc.__EXPERIMENTAL_ELEMENTS[u])}))})}),r.length>0?r.join(""):void 0}function H5e({name:e,style:t}){let o=(0,Rhe.useInstanceId)(j5e,"wp-elements"),r=`.${o}`,n=t?.elements,i=(0,Ihe.useMemo)(()=>U5e(n,e,r),[r,n,e]);return li({css:i}),Ahe({className:o},e,{style:t},Ohe)}(0,Phe.addFilter)("blocks.registerBlockType","core/style/addAttribute",N5e);var Lhe=l(pt(),1),Nhe=l(Y(),1),G5e=e=>(0,Nhe.hasBlockSupport)(e,"__experimentalSettings",!1);function W5e(e){return G5e(e)&&(e?.attributes?.settings||(e.attributes={...e.attributes,settings:{type:"object"}})),e}(0,Lhe.addFilter)("blocks.registerBlockType","core/settings/addAttribute",W5e);var Mf=l(Y(),1),Vhe=l(X(),1),Fhe=l(pt(),1),C0=l(O(),1);function $5e(e=[]){let t={r:[],g:[],b:[],a:[]};return e.forEach(o=>{let r=Tt(o).toRgb();t.r.push(r.r/255),t.g.push(r.g/255),t.b.push(r.b/255),t.a.push(r.a)}),t}function Mhe(e){return`${e}{filter:none}`}function Dhe(e,t){return`${e}{filter:url(#${t})}`}function UO(e,t){let o=$5e(t);return` |
| 178 |
<svg |
| 179 |
xmlns:xlink="http://www.w3.org/1999/xlink" |
| 180 |
viewBox="0 0 0 0" |
| 181 |
width="0" |
| 182 |
height="0" |
| 183 |
focusable="false" |
| 184 |
role="none" |
| 185 |
aria-hidden="true" |
| 186 |
style="visibility: hidden; position: absolute; left: -9999px; overflow: hidden;" |
| 187 |
> |
| 188 |
<defs> |
| 189 |
<filter id="${e}"> |
| 190 |
<!-- |
| 191 |
Use sRGB instead of linearRGB so transparency looks correct. |
| 192 |
Use perceptual brightness to convert to grayscale. |
| 193 |
--> |
| 194 |
<feColorMatrix color-interpolation-filters="sRGB" type="matrix" values=" .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 "></feColorMatrix> |
| 195 |
<!-- Use sRGB instead of linearRGB to be consistent with how CSS gradients work. --> |
| 196 |
<feComponentTransfer color-interpolation-filters="sRGB"> |
| 197 |
<feFuncR type="table" tableValues="${o.r.join(" ")}"></feFuncR> |
| 198 |
<feFuncG type="table" tableValues="${o.g.join(" ")}"></feFuncG> |
| 199 |
<feFuncB type="table" tableValues="${o.b.join(" ")}"></feFuncB> |
| 200 |
<feFuncA type="table" tableValues="${o.a.join(" ")}"></feFuncA> |
| 201 |
</feComponentTransfer> |
| 202 |
<!-- Re-mask the image with the original transparency since the feColorMatrix above loses that information. --> |
| 203 |
<feComposite in2="SourceGraphic" operator="in"></feComposite> |
| 204 |
</filter> |
| 205 |
</defs> |
| 206 |
</svg>`}var eu=l(w(),1),cj=[],K5e=window?.navigator.userAgent&&window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome")&&!window.navigator.userAgent.includes("Chromium");cu([uu]);function uj({presetSetting:e,defaultSetting:t}){let[o,r,n,i]=pe(t,`${e}.custom`,`${e}.theme`,`${e}.default`);return(0,C0.useMemo)(()=>[...r||cj,...n||cj,...o&&i||cj],[o,r,n,i])}function zhe(e,t){if(!e)return;let o=t?.find(({slug:r})=>e===`var:preset|duotone|${r}`);return o?o.colors:void 0}function Y5e(e,t){if(!e||!Array.isArray(e))return;let o=t?.find(r=>r?.colors?.every((n,i)=>n===e[i]));return o?`var:preset|duotone|${o.slug}`:void 0}function q5e({style:e,setAttributes:t,name:o}){let r=e?.color?.duotone,n=gs(o),i=go(),s=uj({presetSetting:"color.duotone",defaultSetting:"color.defaultDuotone"}),a=uj({presetSetting:"color.palette",defaultSetting:"color.defaultPalette"}),[c,u]=pe("color.custom","color.customDuotone"),d=!c,f=!u||a?.length===0&&d;if(s?.length===0&&f||i!=="default")return null;let m=r==="unset"||Array.isArray(r)?r:zhe(r,s);return(0,eu.jsxs)(eu.Fragment,{children:[(0,eu.jsx)(fe,{group:"filter",children:(0,eu.jsx)($2,{value:{filter:{duotone:m}},onChange:h=>{let p={...e,color:{...h?.filter}};t({style:Le(p)})},settings:n})}),(0,eu.jsx)(Ut,{group:"block",__experimentalShareWithChildBlocks:!0,children:(0,eu.jsx)(eP,{duotonePalette:s,colorPalette:a,disableCustomDuotone:f,disableCustomColors:d,value:m,onChange:h=>{let p=Y5e(h,s),g={...e,color:{...e?.color,duotone:p??h}};t({style:Le(g)})},settings:n})})]})}var dj={shareWithChildBlocks:!0,edit:q5e,useBlockProps:J5e,attributeKeys:["style"],hasSupport(e){return(0,Mf.hasBlockSupport)(e,"filter.duotone")}};function Z5e(e){return(0,Mf.hasBlockSupport)(e,"filter.duotone")&&(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}})),e}function X5e({clientId:e,id:t,selector:o,attribute:r}){let n=uj({presetSetting:"color.duotone",defaultSetting:"color.defaultDuotone"}),i=Array.isArray(r),s=i?void 0:zhe(r,n),a=typeof r=="string"&&s,c=typeof r=="string"&&!a,u=null;a?u=s:(c||i)&&(u=r);let m=o.split(",").map(g=>`.${t}${g.trim()}`).join(", "),h=Array.isArray(u)||u==="unset";pc(h?{css:u!=="unset"?Dhe(m,t):Mhe(m),__unstableType:"presets"}:void 0),pc(h?{assets:u!=="unset"?UO(t,u):"",__unstableType:"svgs"}:void 0);let p=rt(e);(0,C0.useEffect)(()=>{if(h&&p&&K5e){let g=p.style.display;p.style.setProperty("display","inline-block"),p.offsetHeight,p.style.setProperty("display",g)}},[h,p,u])}var Q5e={};function J5e({clientId:e,name:t,style:o}){let r=(0,Vhe.useInstanceId)(Q5e),n=(0,C0.useMemo)(()=>{let c=(0,Mf.getBlockType)(t);if(c){if(!(0,Mf.getBlockSupport)(c,"filter.duotone",!1))return null;let d=(0,Mf.getBlockSupport)(c,"color.__experimentalDuotone",!1);if(d){let f=di(c);return typeof d=="string"?qg(f,d):f}return di(c,"filter.duotone",{fallback:!0})}},[t]),i=o?.color?.duotone,s=`wp-duotone-${r}`,a=n&&i;return X5e({clientId:e,id:s,selector:n,attribute:i}),{className:a?s:""}}(0,Fhe.addFilter)("blocks.registerBlockType","core/editor/duotone/add-attributes",Z5e);var GO=l(O(),1),B0=l(z(),1),jhe=l(X(),1),E0=l(Y(),1),T0=l(N(),1);var Uhe=l(Xn(),1);var HO=l(w(),1),eDe={},tDe={};function oDe({blockName:e,setAttributes:t,style:o}){if(go()!=="default")return null;let n=(0,E0.getBlockType)(e);function i(a){let c=a?.css?.trim()?a.css:void 0;t({style:Le({...a,css:c})})}let s=(0,T0.sprintf)((0,T0.__)("Add your own CSS to customize the appearance of the %s block. You do not need to include a CSS selector, just add the property and value, e.g. color: red;."),n?.title);return(0,HO.jsx)(fe,{group:"advanced",children:(0,HO.jsx)(q2,{value:o,onChange:i,inheritedValue:o,help:s})})}var rDe="custom-css-edit-warning";function nDe({clientId:e,name:t,setAttributes:o}){let{style:r,canEditCSS:n}=(0,B0.useSelect)(i=>{let{getBlockAttributes:s,getSettings:a}=i(x);return{style:s(e)?.style||tDe,canEditCSS:a().canEditCSS}},[e]);return n?(0,HO.jsx)(oDe,{blockName:t,setAttributes:o,style:r}):null}function iDe({style:e}){let t=e?.css,o=typeof t=="string"&&t.trim().length>0&&Y2(t),r=(0,B0.useSelect)(u=>u(x).getSettings().canEditCSS,[]),{createWarningNotice:n}=(0,B0.useDispatch)(Uhe.store),i=!!t?.trim();(0,GO.useEffect)(()=>{!r&&i&&n((0,T0.__)("This post contains blocks with custom CSS. You do not have permission to edit CSS. If you save this post, the custom CSS will be removed."),{id:rDe,isDismissible:!0})},[r,i,n]);let s=(0,jhe.useInstanceId)(eDe,"wp-custom-css"),a=`.${s}`,c=(0,GO.useMemo)(()=>{if(o)return oS(t,a)},[t,a,o]);return li({css:c}),o?{className:`has-custom-css ${s}`}:{}}function sDe(e,t,o){if(!(0,E0.hasBlockSupport)(t,"customCSS",!0)||!o?.style?.css?.trim())return e;let r=e.className?`${e.className} has-custom-css`:"has-custom-css";return{...e,className:r}}var WO={edit:nDe,useBlockProps:iDe,addSaveProps:sDe,attributeKeys:["style"],hasSupport(e){return(0,E0.hasBlockSupport)(e,"customCSS",!0)}};var $O=l(X(),1),mj=l(pt(),1),tu=l(Y(),1),KO=l(z(),1),Cl=l(A(),1),ok=l(N(),1);var tr=l(w(),1),aDe="is-style-",pj="layout",{kebabCase:fj}=M(Cl.privateApis);function hj(e){return(0,tu.hasBlockSupport)(e,"layout")||(0,tu.hasBlockSupport)(e,"__experimentalLayout")}function YO(e={},t=""){let{layout:o}=e,{default:r}=(0,tu.getBlockSupport)(t,pj)||{},n=o?.inherit||o?.contentSize||o?.wideSize?{...o,type:"constrained"}:o||r||{},i=[];if(Qn[n?.type||"default"]?.className){let a=Qn[n?.type||"default"]?.className,c=t.split("/"),d=`wp-block-${c[0]==="core"?c.pop():c.join("-")}-${a}`;i.push(a,d)}return(0,KO.useSelect)(a=>!n?.inherit&&!n?.contentSize&&n?.type!=="constrained"?!1:a(x).getSettings().__experimentalFeatures?.useRootPaddingAwareAlignments,[n?.contentSize,n?.inherit,n?.type])&&i.push("has-global-padding"),n?.orientation&&i.push(`is-${fj(n.orientation)}`),n?.justifyContent&&i.push(`is-content-justification-${fj(n.justifyContent)}`),n?.flexWrap&&n.flexWrap==="nowrap"&&i.push("is-nowrap"),i}function gj(e={},t,o){let{layout:r={},style:n={}}=e,i=r?.inherit||r?.contentSize||r?.wideSize?{...r,type:"constrained"}:r||{},s=Ns(i?.type||"default"),[a]=pe("spacing.blockGap"),c=a!==null;return s?.getLayoutStyle?.({blockName:t,selector:o,layout:r,style:n,hasBlockGapSupport:c})}function lDe({layout:e,setAttributes:t,name:o,clientId:r}){let n=gs(o),{layout:i}=n,{themeSupportsLayout:s}=(0,KO.useSelect)(I=>{let{getSettings:R}=I(x);return{themeSupportsLayout:R().supportsLayout}},[]);if(go()!=="default")return null;let c=(0,tu.getBlockSupport)(o,pj,{}),u={...i,...c},{allowSwitching:d,allowEditing:f=!0,allowInheriting:m=!0,default:h}=u;if(!f)return null;let p={...c,...e},{type:g,default:{type:b="default"}={}}=p,k=g||b,v=!!(m&&(!k||k==="default"||k==="constrained"||p.inherit)),y=e||h||{},{inherit:_=!1,contentSize:S=null}=y;if((k==="default"||k==="constrained")&&!s)return null;let C=Ns(k),B=Ns("constrained"),P=!y.type&&(S||_),T=!!_||!!S,E=I=>t({layout:{type:I}}),L=I=>t({layout:I});return(0,tr.jsxs)(tr.Fragment,{children:[(0,tr.jsx)(fe,{children:(0,tr.jsxs)(Cl.PanelBody,{title:(0,ok.__)("Layout"),children:[v&&(0,tr.jsx)(tr.Fragment,{children:(0,tr.jsx)(Cl.ToggleControl,{label:(0,ok.__)("Inner blocks use content width"),checked:C?.name==="constrained"||T,onChange:()=>t({layout:{type:C?.name==="constrained"||T?"default":"constrained"}}),help:C?.name==="constrained"||T?(0,ok.__)("Nested blocks use content width with options for full and wide widths."):(0,ok.__)("Nested blocks will fill the width of this container.")})}),!_&&d&&(0,tr.jsx)(cDe,{type:k,onChange:E}),C&&C.name!=="default"&&(0,tr.jsx)(C.inspectorControls,{layout:y,onChange:L,layoutBlockSupport:u,name:o,clientId:r}),B&&P&&(0,tr.jsx)(B.inspectorControls,{layout:y,onChange:L,layoutBlockSupport:u,name:o,clientId:r})]})}),!_&&C&&(0,tr.jsx)(C.toolBarControls,{layout:y,onChange:L,layoutBlockSupport:c,name:o,clientId:r})]})}var Hhe={shareWithChildBlocks:!0,edit:lDe,attributeKeys:["layout"],hasSupport(e){return hj(e)}};function cDe({type:e,onChange:t}){return(0,tr.jsx)(Cl.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,isBlock:!0,label:(0,ok.__)("Layout type"),hideLabelFromVision:!0,isAdaptiveWidth:!0,value:e,onChange:t,children:j7().map(({name:o,label:r})=>(0,tr.jsx)(Cl.__experimentalToggleGroupControlOption,{value:o,label:r},o))})}function uDe(e){return"type"in(e.attributes?.layout??{})||hj(e)&&(e.attributes={...e.attributes,layout:{type:"object"}}),e}function dDe({block:e,props:t,blockGapSupport:o,globalBlockGapValue:r,layoutClasses:n}){let{name:i,attributes:s}=t,a=(0,$O.useInstanceId)(e),{layout:c}=s,{default:u}=(0,tu.getBlockSupport)(i,pj)||{},d=c?.inherit||c?.contentSize||c?.wideSize?{...c,type:"constrained"}:c||u||{},f=`wp-container-${fj(i)}-is-layout-`,m=`.${f}${a}`,h=o!==null,g=Ns(d?.type||"default")?.getLayoutStyle?.({blockName:i,selector:m,layout:d,style:s?.style,hasBlockGapSupport:h,globalBlockGapValue:r}),b=D({[`${f}${a}`]:!!g},n);return li({css:g}),(0,tr.jsx)(e,{...t,__unstableLayoutClassNames:b})}var fDe=(0,$O.createHigherOrderComponent)(e=>function(o){let{clientId:r,name:n,attributes:i}=o,s=hj(n),a=YO(i,n),c=(0,KO.useSelect)(u=>{if(!s)return;let{getSettings:d,getBlockSettings:f}=M(u(x)),m=d(),{disableLayoutStyles:h}=m;if(h)return;let[p]=f(r,"spacing.blockGap"),g=m[Ri],b,k=i?.className;if(k?.includes(aDe)){let{getBlockStyles:y}=u(tu.store),_=y(n),S=R4(k,_);b=S?g?.blocks?.[n]?.variations?.[S]?.spacing?.blockGap:void 0}let v=b??g?.blocks?.[n]?.spacing?.blockGap??g?.spacing?.blockGap;return{blockGapSupport:p,globalBlockGapValue:v}},[s,r,i?.className,n]);return c?(0,tr.jsx)(dDe,{block:e,props:o,layoutClasses:a,...c}):(0,tr.jsx)(e,{...o,__unstableLayoutClassNames:s?a:void 0})},"withLayoutStyles");(0,mj.addFilter)("blocks.registerBlockType","core/layout/addAttribute",uDe);(0,mj.addFilter)("editor.BlockListBlock","core/editor/layout/with-layout-styles",fDe);var Xhe=l(X(),1),_j=l(z(),1),Qhe=l(O(),1);var xs=l(O(),1),Df=l(z(),1),Whe=l(X(),1);function P0(e,t){return Array.from({length:t},(o,r)=>e+r)}var va=class{constructor({columnStart:e,rowStart:t,columnEnd:o,rowEnd:r,columnSpan:n,rowSpan:i}={}){this.columnStart=e??1,this.rowStart=t??1,n!==void 0?this.columnEnd=this.columnStart+n-1:this.columnEnd=o??this.columnStart,i!==void 0?this.rowEnd=this.rowStart+i-1:this.rowEnd=r??this.rowStart}get columnSpan(){return this.columnEnd-this.columnStart+1}get rowSpan(){return this.rowEnd-this.rowStart+1}contains(e,t){return e>=this.columnStart&&e<=this.columnEnd&&t>=this.rowStart&&t<=this.rowEnd}containsRect(e){return this.contains(e.columnStart,e.rowStart)&&this.contains(e.columnEnd,e.rowEnd)}intersectsRect(e){return this.columnStart<=e.columnEnd&&this.columnEnd>=e.columnStart&&this.rowStart<=e.rowEnd&&this.rowEnd>=e.rowStart}};function No(e,t){return e.ownerDocument.defaultView.getComputedStyle(e).getPropertyValue(t)}function I0(e,t){let o=[];for(let r of e.split(" ")){let n=o[o.length-1],i=n?n.end+t:0,s=i+parseFloat(r);o.push({start:i,end:s})}return o}function ou(e,t,o="start"){return e.reduce((r,n,i)=>Math.abs(n[o]-t)<Math.abs(e[r][o]-t)?i:r,0)}function mDe(e,t){let o=parseFloat(No(e,"column-gap")),r=parseFloat(No(e,"row-gap")),n=I0(No(e,"grid-template-columns"),o),i=I0(No(e,"grid-template-rows"),r),s=ou(n,t.left)+1,a=ou(i,t.top)+1,c=ou(n,t.right,"end")+1,u=ou(i,t.bottom,"end")+1;return new va({columnStart:s,columnEnd:c,rowStart:a,rowEnd:u})}function Ghe(e){return mDe(e.parentElement,new window.DOMRect(e.offsetLeft,e.offsetTop,e.offsetWidth,e.offsetHeight))}function bj(e){let t=No(e,"grid-template-columns"),o=No(e,"grid-template-rows"),r=No(e,"border-top-width"),n=No(e,"border-right-width"),i=No(e,"border-bottom-width"),s=No(e,"border-left-width"),a=No(e,"padding-top"),c=No(e,"padding-right"),u=No(e,"padding-bottom"),d=No(e,"padding-left"),f=t.split(" ").length,m=o.split(" ").length,h=f*m;return{numColumns:f,numRows:m,numItems:h,currentColor:No(e,"color"),style:{gridTemplateColumns:t,gridTemplateRows:o,gap:No(e,"gap"),inset:` |
| 207 |
calc(${a} + ${r}) |
| 208 |
calc(${c} + ${n}) |
| 209 |
calc(${u} + ${i}) |
| 210 |
calc(${d} + ${s}) |
| 211 |
`}}}var Bi=l(w(),1);function R0({clientId:e,contentRef:t,parentLayout:o,childGridClientId:r}){let n=(0,Df.useSelect)(a=>a(x).getSettings().isDistractionFree,[]),i=rt(e);if(n||!i)return null;let s=o?.isManualPlacement&&window.__experimentalEnableGridInteractivity;return(0,Bi.jsx)(pDe,{gridClientId:e,gridElement:i,isManualGrid:s,ref:t,childGridClientId:r})}var pDe=(0,xs.forwardRef)(({gridClientId:e,gridElement:t,isManualGrid:o,childGridClientId:r},n)=>{let[i,s]=(0,xs.useState)(()=>bj(t)),[a,c]=(0,xs.useState)(!1),u=rt(r),d=(0,xs.useMemo)(()=>u?Ghe(u):null,[u]);return(0,xs.useEffect)(()=>{let f=()=>s(bj(t)),m=new window.ResizeObserver(f);m.observe(t,{box:"border-box"});let h=new window.ResizeObserver(f);h.observe(t);for(let p of t.children)h.observe(p);return()=>{m.disconnect(),h.disconnect()}},[t]),(0,xs.useEffect)(()=>{function f(){c(!0)}function m(){c(!1)}return document.addEventListener("drag",f),document.addEventListener("dragend",m),()=>{document.removeEventListener("drag",f),document.removeEventListener("dragend",m)}},[]),(0,Bi.jsx)(Qi,{className:D("block-editor-grid-visualizer",{"is-dropping-allowed":a}),clientId:e,__unstablePopoverSlot:"__unstable-block-tools-after",children:(0,Bi.jsx)("div",{ref:n,className:"block-editor-grid-visualizer__grid",style:i.style,children:o?(0,Bi.jsx)(gDe,{gridClientId:e,gridInfo:i,childGridRect:d}):(0,Bi.jsx)(hDe,{gridInfo:i,childGridRect:d})})})});function hDe({gridInfo:e,childGridRect:t}){return P0(1,e.numRows).map(o=>P0(1,e.numColumns).map(r=>{let n=e.currentColor;return t?.contains(r,o)&&(n="transparent"),(0,Bi.jsx)($he,{color:n},`${o}-${r}`)}))}function gDe({gridClientId:e,gridInfo:t,childGridRect:o}){let[r,n]=(0,xs.useState)(null),i=(0,Df.useSelect)(a=>{let{getBlockOrder:c,getBlockStyles:u}=M(a(x)),d=c(e);return u(d)},[e]),s=(0,xs.useMemo)(()=>{let a=[];for(let c of Object.values(i)){let{columnStart:u,rowStart:d,columnSpan:f=1,rowSpan:m=1}=c?.layout??{};!u||!d||a.push(new va({columnStart:u,rowStart:d,columnSpan:f,rowSpan:m}))}return a},[i]);return P0(1,t.numRows).map(a=>P0(1,t.numColumns).map(c=>{let u=o?.contains(c,a),d=t.currentColor;u&&(d="transparent");let f=s.some(h=>h.contains(c,a)),m=r?.contains(c,a)??!1;return(0,Bi.jsx)($he,{color:d,className:m&&"is-highlighted",children:f&&!u?(0,Bi.jsx)(bDe,{column:c,row:a,gridClientId:e,gridInfo:t,setHighlightedRect:n}):(0,Bi.jsx)(vDe,{column:c,row:a,gridClientId:e,gridInfo:t,setHighlightedRect:n})},`${a}-${c}`)}))}function $he({color:e,children:t,className:o}){return(0,Bi.jsx)("div",{className:D("block-editor-grid-visualizer__cell",o),style:{boxShadow:`inset 0 0 0 1px color-mix(in srgb, ${e} 20%, #0000)`,color:e},children:t})}function Khe(e,t,o,r,n){let{getBlockAttributes:i,getBlockRootClientId:s,canInsertBlockType:a,getBlockName:c}=(0,Df.useSelect)(x),{updateBlockAttributes:u,moveBlocksToPosition:d,__unstableMarkNextChangeAsNotPersistent:f}=(0,Df.useDispatch)(x),m=Lp(o,r.numColumns);return kDe({validateDrag(h){let p=c(h);if(!a(p,o))return!1;let g=i(h),b=new va({columnStart:e,rowStart:t,columnSpan:g.style?.layout?.columnSpan,rowSpan:g.style?.layout?.rowSpan});return new va({columnSpan:r.numColumns,rowSpan:r.numRows}).containsRect(b)},onDragEnter(h){let p=i(h);n(new va({columnStart:e,rowStart:t,columnSpan:p.style?.layout?.columnSpan,rowSpan:p.style?.layout?.rowSpan}))},onDragLeave(){n(h=>h?.columnStart===e&&h?.rowStart===t?null:h)},onDrop(h){n(null);let p=i(h);u(h,{style:{...p.style,layout:{...p.style?.layout,columnStart:e,rowStart:t}}}),f(),d([h],s(h),o,m(e,t))}})}function bDe({column:e,row:t,gridClientId:o,gridInfo:r,setHighlightedRect:n}){return(0,Bi.jsx)("div",{className:"block-editor-grid-visualizer__drop-zone",ref:Khe(e,t,o,r,n)})}function vDe({column:e,row:t,gridClientId:o,gridInfo:r,setHighlightedRect:n}){let{updateBlockAttributes:i,moveBlocksToPosition:s,__unstableMarkNextChangeAsNotPersistent:a}=(0,Df.useDispatch)(x),c=Lp(o,r.numColumns);return(0,Bi.jsx)(bd,{rootClientId:o,className:"block-editor-grid-visualizer__appender",ref:Khe(e,t,o,r,n),style:{color:r.currentColor},onSelect:u=>{u&&(i(u.clientId,{style:{layout:{columnStart:e,rowStart:t}}}),a(),s([u.clientId],o,o,c(e,t)))}})}function kDe({validateDrag:e,onDragEnter:t,onDragLeave:o,onDrop:r}){let{getDraggedBlockClientIds:n}=(0,Df.useSelect)(x);return(0,Whe.__experimentalUseDropZone)({onDragEnter(){let[i]=n();i&&e(i)&&t(i)},onDragLeave(){o()},onDrop(){let[i]=n();i&&e(i)&&r(i)}})}var Yhe=l(A(),1),O0=l(O(),1);var qO=l(w(),1);function vj({clientId:e,bounds:t,onChange:o,parentLayout:r}){let n=rt(e),i=n?.parentElement,{isManualPlacement:s}=r;return!n||!i?null:(0,qO.jsx)(yDe,{clientId:e,bounds:t,blockElement:n,rootBlockElement:i,onChange:o,isManualGrid:s&&window.__experimentalEnableGridInteractivity})}function yDe({clientId:e,bounds:t,blockElement:o,rootBlockElement:r,onChange:n,isManualGrid:i}){let[s,a]=(0,O0.useState)(null),[c,u]=(0,O0.useState)({top:!1,bottom:!1,left:!1,right:!1});(0,O0.useEffect)(()=>{let h=new window.ResizeObserver(()=>{let p=o.getBoundingClientRect(),g=r.getBoundingClientRect(),b=p.top>g.top,k=p.bottom<g.bottom,v=p.left>g.left,y=p.right<g.right;u({top:(i||!k)&&b,bottom:k,left:(i||!y)&&v,right:y})});return h.observe(o),()=>h.disconnect()},[o,r,i]);let d={right:"left",left:"right"},f={top:"flex-end",bottom:"flex-start"},m={display:"flex",justifyContent:"center",alignItems:"center",...d[s]&&{justifyContent:d[s]},...f[s]&&{alignItems:f[s]}};return(0,qO.jsx)(Qi,{className:"block-editor-grid-item-resizer",clientId:e,__unstablePopoverSlot:"__unstable-block-tools-after",additionalStyles:m,children:(0,qO.jsx)(Yhe.ResizableBox,{className:"block-editor-grid-item-resizer__box",size:{width:"100%",height:"100%"},enable:{bottom:c.bottom,bottomLeft:!1,bottomRight:!1,left:c.left,right:c.right,top:c.top,topLeft:!1,topRight:!1},bounds:t,boundsByDirection:!0,onPointerDown:({target:h,pointerId:p})=>{h.setPointerCapture(p)},onResizeStart:(h,p)=>{a(p)},onResizeStop:(h,p,g)=>{let b=parseFloat(No(r,"column-gap")),k=parseFloat(No(r,"row-gap")),v=I0(No(r,"grid-template-columns"),b),y=I0(No(r,"grid-template-rows"),k),_=new window.DOMRect(o.offsetLeft+g.offsetLeft,o.offsetTop+g.offsetTop,g.offsetWidth,g.offsetHeight),S=ou(v,_.left)+1,C=ou(y,_.top)+1,B=ou(v,_.right,"end")+1,P=ou(y,_.bottom,"end")+1;n({columnSpan:B-S+1,rowSpan:P-C+1,columnStart:i?S:void 0,rowStart:i?C:void 0})}})})}var ws=l(N(),1),ZO=l(A(),1);var qhe=l(z(),1),Zhe=l(X(),1);var Wr=l(w(),1);function kj({layout:e,parentLayout:t,onChange:o,gridClientId:r,blockClientId:n}){let{moveBlocksToPosition:i,__unstableMarkNextChangeAsNotPersistent:s}=(0,qhe.useDispatch)(x),a=e?.columnStart??1,c=e?.rowStart??1,u=e?.columnSpan??1,d=e?.rowSpan??1,f=a+u-1,m=c+d-1,h=t?.columnCount,p=t?.rowCount,g=Lp(r,h);return(0,Wr.jsx)(Ut,{group:"parent",children:(0,Wr.jsxs)(ZO.ToolbarGroup,{className:"block-editor-grid-item-mover__move-button-container",children:[(0,Wr.jsx)("div",{className:"block-editor-grid-item-mover__move-horizontal-button-container is-left",children:(0,Wr.jsx)(A0,{icon:(0,ws.isRTL)()?Go:Kr,label:(0,ws.__)("Move left"),description:(0,ws.__)("Move left"),isDisabled:a<=1,onClick:()=>{o({columnStart:a-1}),s(),i([n],r,r,g(a-1,c))}})}),(0,Wr.jsxs)("div",{className:"block-editor-grid-item-mover__move-vertical-button-container",children:[(0,Wr.jsx)(A0,{className:"is-up-button",icon:Yf,label:(0,ws.__)("Move up"),description:(0,ws.__)("Move up"),isDisabled:c<=1,onClick:()=>{o({rowStart:c-1}),s(),i([n],r,r,g(a,c-1))}}),(0,Wr.jsx)(A0,{className:"is-down-button",icon:vr,label:(0,ws.__)("Move down"),description:(0,ws.__)("Move down"),isDisabled:p&&m>=p,onClick:()=>{o({rowStart:c+1}),s(),i([n],r,r,g(a,c+1))}})]}),(0,Wr.jsx)("div",{className:"block-editor-grid-item-mover__move-horizontal-button-container is-right",children:(0,Wr.jsx)(A0,{icon:(0,ws.isRTL)()?Kr:Go,label:(0,ws.__)("Move right"),description:(0,ws.__)("Move right"),isDisabled:h&&f>=h,onClick:()=>{o({columnStart:a+1}),s(),i([n],r,r,g(a+1,c))}})})]})})}function A0({className:e,icon:t,label:o,isDisabled:r,onClick:n,description:i}){let a=`block-editor-grid-item-mover-button__description-${(0,Zhe.useInstanceId)(A0)}`;return(0,Wr.jsxs)(Wr.Fragment,{children:[(0,Wr.jsx)(ZO.ToolbarButton,{className:D("block-editor-grid-item-mover-button",e),icon:t,label:o,"aria-describedby":a,onClick:r?null:n,disabled:r,accessibleWhenDisabled:!0}),(0,Wr.jsx)(Ge,{id:a,children:i})]})}var L0=l(z(),1),QO=l(O(),1),XO=l(X(),1);function yj({clientId:e}){let{gridLayout:t,blockOrder:o,selectedBlockLayout:r}=(0,L0.useSelect)(m=>{let{getBlockAttributes:h,getBlockOrder:p}=m(x),g=m(x).getSelectedBlock();return{gridLayout:h(e).layout??{},blockOrder:p(e),selectedBlockLayout:g?.attributes.style?.layout}},[e]),{getBlockAttributes:n,getBlockRootClientId:i}=(0,L0.useSelect)(x),{updateBlockAttributes:s,__unstableMarkNextChangeAsNotPersistent:a}=(0,L0.useDispatch)(x),c=(0,QO.useMemo)(()=>r?new va(r):null,[r]),u=(0,XO.usePrevious)(c),d=(0,XO.usePrevious)(t.isManualPlacement),f=(0,XO.usePrevious)(o);(0,QO.useEffect)(()=>{let m={};if(t.isManualPlacement){let h=[];for(let g of o){let{columnStart:b,rowStart:k,columnSpan:v=1,rowSpan:y=1}=n(g).style?.layout??{};!b||!k||h.push(new va({columnStart:b,rowStart:k,columnSpan:v,rowSpan:y}))}for(let g of o){let b=n(g),{columnStart:k,rowStart:v,columnSpan:y=1,rowSpan:_=1}=b.style?.layout??{};if(k&&v)continue;let[S,C]=_De(h,t.columnCount,y,_,u?.columnEnd,u?.rowEnd);h.push(new va({columnStart:S,rowStart:C,columnSpan:y,rowSpan:_})),m[g]={style:{...b.style,layout:{...b.style?.layout,columnStart:S,rowStart:C}}}}let p=Math.max(...h.map(g=>g.rowEnd));(!t.rowCount||t.rowCount<p)&&(m[e]={layout:{...t,rowCount:p}});for(let g of f??[])if(!o.includes(g)){let b=i(g);if(b===null||n(b)?.layout?.type==="grid")continue;let v=n(g),{columnStart:y,rowStart:_,columnSpan:S,rowSpan:C,...B}=v.style?.layout??{};if(y||_||S||C){let P=Object.keys(B).length===0;m[g]=de(v,["style","layout"],P?void 0:B)}}}else{if(d===!0)for(let h of o){let p=n(h),{columnStart:g,rowStart:b,...k}=p.style?.layout??{};if(g||b){let v=Object.keys(k).length===0;m[h]=de(p,["style","layout"],v?void 0:k)}}t.rowCount&&(m[e]={layout:{...t,rowCount:void 0}})}Object.keys(m).length&&(a(),s(Object.keys(m),m,!0))},[e,t,f,o,u,d,a,n,i,s])}function _De(e,t,o,r,n=1,i=1){for(let s=i;;s++)for(let a=s===i?n:1;a<=t;a++){let c=new va({columnStart:a,rowStart:s,columnSpan:o,rowSpan:r});if(!e.some(u=>u.intersectsRect(c)))return[a,s]}}var ru=l(w(),1),SDe={};function xDe({style:e}){let t=(0,_j.useSelect)(g=>!g(x).getSettings().disableLayoutStyles),o=e?.layout??{},{selfStretch:r,flexSize:n,columnStart:i,rowStart:s,columnSpan:a,rowSpan:c}=o,u=mm()||{},{columnCount:d,minimumColumnWidth:f}=u,m=(0,Xhe.useInstanceId)(SDe),h=`.wp-container-content-${m}`,p="";if(t&&(r==="fixed"&&n?p=`${h} { |
| 212 |
flex-basis: ${n}; |
| 213 |
box-sizing: border-box; |
| 214 |
}`:r==="fill"?p=`${h} { |
| 215 |
flex-grow: 1; |
| 216 |
}`:i&&a?p=`${h} { |
| 217 |
grid-column: ${i} / span ${a}; |
| 218 |
}`:i?p=`${h} { |
| 219 |
grid-column: ${i}; |
| 220 |
}`:a&&(p=`${h} { |
| 221 |
grid-column: span ${a}; |
| 222 |
}`),s&&c?p+=`${h} { |
| 223 |
grid-row: ${s} / span ${c}; |
| 224 |
}`:s?p+=`${h} { |
| 225 |
grid-row: ${s}; |
| 226 |
}`:c&&(p+=`${h} { |
| 227 |
grid-row: span ${c}; |
| 228 |
}`),(a||i)&&(f||!d))){let g=parseFloat(f);isNaN(g)&&(g=12);let b=f?.replace(g,"");["px","rem","em"].includes(b)||(b="rem");let k=2;a&&i?k=a+i-1:a?k=a:k=i;let v=b==="px"?24:1.5,y=k*g+(k-1)*v,_=g*2+v-1,S=a&&a>1?"1/-1":"auto";p+=`@container (max-width: ${Math.max(y,_)}${b}) { |
| 229 |
${h} { |
| 230 |
grid-column: ${S}; |
| 231 |
grid-row: auto; |
| 232 |
} |
| 233 |
}`}if(li({css:p}),!!p)return{className:`wp-container-content-${m}`}}function wDe({clientId:e,style:t,setAttributes:o}){let r=mm()||{},{type:n="default",allowSizingOnChildren:i=!1,isManualPlacement:s}=r;return n!=="grid"?null:(0,ru.jsx)(CDe,{clientId:e,style:t,setAttributes:o,allowSizingOnChildren:i,isManualPlacement:s,parentLayout:r})}function CDe({clientId:e,style:t,setAttributes:o,allowSizingOnChildren:r,isManualPlacement:n,parentLayout:i}){let{rootClientId:s,isVisible:a,parentBlockVisibility:c,blockBlockVisibility:u,deviceType:d,isChildBlockAGrid:f}=(0,_j.useSelect)(y=>{let{getBlockRootClientId:_,getBlockEditingMode:S,getTemplateLock:C,getBlockAttributes:B,getSettings:P}=y(x),T=_(e);if(C(T)||S(T)!=="default")return{rootClientId:T,isVisible:!1};let E=B(T),L=B(e),I=P();return{rootClientId:T,isVisible:!0,parentBlockVisibility:E?.metadata?.blockVisibility,blockBlockVisibility:L?.metadata?.blockVisibility,deviceType:I?.[Oi]?.toLowerCase()||It.desktop.key,isChildBlockAGrid:L?.layout?.type==="grid"}},[e]),{isBlockCurrentlyHidden:m}=Gi({blockVisibility:c,deviceType:d}),{isBlockCurrentlyHidden:h}=Gi({blockVisibility:u,deviceType:d}),[p,g]=(0,Qhe.useState)(),b=f?e:void 0;if(!a||m)return null;let k=r&&!h;function v(y){o({style:{...t,layout:{...t?.layout,...y}}})}return(0,ru.jsxs)(ru.Fragment,{children:[(0,ru.jsx)(R0,{clientId:s,contentRef:g,parentLayout:i,childGridClientId:b}),k&&(0,ru.jsx)(vj,{clientId:e,bounds:p,onChange:v,parentLayout:i}),n&&window.__experimentalEnableGridInteractivity&&(0,ru.jsx)(kj,{layout:t?.layout,parentLayout:i,onChange:v,gridClientId:s,blockClientId:e})]})}var Sj={useBlockProps:xDe,edit:wDe,attributeKeys:["style"],hasSupport(){return!0}};var wj=l(pt(),1),xj=l(Y(),1),Jhe="metadata";function BDe(e){return e?.attributes?.[Jhe]?.type||(e.attributes={...e.attributes,[Jhe]:{type:"object"}}),e}function EDe(e,t,o,r){if(r.length===1&&e.innerBlocks.length===t.length||r.length===1&&t.length>1||r.length>1&&t.length===1||r.length>1&&t.length>1&&r.length!==t.length)return e;let n=t[o]?.attributes?.metadata;if(!n)return e;let i={};return n.noteId&&!e.attributes?.metadata?.noteId&&(i.noteId=n.noteId),n.name&&!e.attributes?.metadata?.name&&(0,xj.hasBlockSupport)(e.name,"renaming",!0)&&(i.name=n.name),n.blockVisibility!==void 0&&!e.attributes?.metadata?.blockVisibility&&(0,xj.hasBlockSupport)(e.name,"visibility",!0)&&(i.blockVisibility=n.blockVisibility),Object.keys(i).length>0?{...e,attributes:{...e.attributes,metadata:{...e.attributes.metadata,...i}}}:e}(0,wj.addFilter)("blocks.registerBlockType","core/metadata/addMetaAttribute",BDe);(0,wj.addFilter)("blocks.switchToBlockType.transformedBlock","core/metadata/addTransforms",EDe);var Cj=l(N(),1),JO=l(O(),1),eA=l(A(),1),tA=l(Y(),1),rk=l(z(),1);var Vf=l(w(),1),TDe={};function IDe({name:e,clientId:t,metadata:{ignoredHookedBlocks:o=[]}={}}){let r=(0,rk.useSelect)(h=>h(tA.store).getBlockTypes(),[]),n=(0,JO.useMemo)(()=>r?.filter(({name:h,blockHooks:p})=>p&&e in p||o.includes(h)),[r,e,o]),i=(0,rk.useSelect)(h=>{let{getBlocks:p,getBlockRootClientId:g,getGlobalBlockCount:b}=h(x),k=g(t),v=n.reduce((y,_)=>{if(b(_.name)===0)return y;let S=_?.blockHooks?.[e],C;switch(S){case"before":case"after":C=p(k);break;case"first_child":case"last_child":C=p(t);break;case void 0:C=[...p(k),...p(t)];break}let B=C?.find(P=>P.name===_.name);return B?{...y,[_.name]:B.clientId}:y},{});return Object.values(v).length>0?v:TDe},[n,e,t]),{getBlockIndex:s,getBlockCount:a,getBlockRootClientId:c}=(0,rk.useSelect)(x),{insertBlock:u,removeBlock:d}=(0,rk.useDispatch)(x);if(!n.length)return null;let f=n.reduce((h,p)=>{let[g]=p.name.split("/");return h[g]||(h[g]=[]),h[g].push(p),h},{}),m=(h,p)=>{let g=s(t),b=a(t),k=c(t);switch(p){case"before":case"after":u(h,p==="after"?g+1:g,k,!1);break;case"first_child":case"last_child":u(h,p==="first_child"?0:b,t,!1);break;case void 0:u(h,g+1,k,!1);break}};return(0,Vf.jsx)(fe,{children:(0,Vf.jsxs)(eA.PanelBody,{className:"block-editor-hooks__block-hooks",title:(0,Cj.__)("Plugins"),initialOpen:!0,children:[(0,Vf.jsx)("p",{className:"block-editor-hooks__block-hooks-helptext",children:(0,Cj.__)("Manage the inclusion of blocks added automatically by plugins.")}),Object.keys(f).map(h=>(0,Vf.jsxs)(JO.Fragment,{children:[(0,Vf.jsx)("h3",{children:h}),f[h].map(p=>{let g=p.name in i;return(0,Vf.jsx)(eA.ToggleControl,{checked:g,label:p.title,onChange:()=>{if(!g){let b=p.blockHooks[e];m((0,tA.createBlock)(p.name),b);return}d(i[p.name],!1)}},p.title)})]},h))]})})}var ege={edit:IDe,attributeKeys:["metadata"],hasSupport(){return!0}};var Bj=l(N(),1),tge=l(Y(),1),nk=l(A(),1),oge=l(z(),1),rge=l(O(),1),nge=l(X(),1);var Ff=l(w(),1),PDe=()=>(0,nge.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}},RDe=({name:e,metadata:t})=>{let o=(0,rge.useContext)(Or),{removeAllBlockBindings:r}=Vl(),n=PDe(),{bindableAttributes:i,hasCompatibleFields:s}=(0,oge.useSelect)(c=>{let{__experimentalBlockBindingsSupportedAttributes:u}=c(x).getSettings(),{getAllBlockBindingsSources:d,getBlockBindingsSourceFieldsList:f}=M(c(tge.store));return{bindableAttributes:u?.[e],hasCompatibleFields:Object.values(d()).some(m=>f(m,o)?.length>0)}},[e,o]);if(!i||i.length===0)return null;let{bindings:a}=t||{};return a===void 0&&!s?null:(0,Ff.jsx)(fe,{group:"bindings",children:(0,Ff.jsxs)(nk.__experimentalToolsPanel,{label:(0,Bj.__)("Attributes"),resetAll:()=>{r()},dropdownMenuProps:n,className:"block-editor-bindings__panel",children:[(0,Ff.jsx)(nk.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:i.map(c=>(0,Ff.jsx)(gy,{attribute:c,blockName:e,binding:a?.[c]},c))}),(0,Ff.jsx)(nk.__experimentalText,{as:"div",variant:"muted",children:(0,Ff.jsx)("p",{children:(0,Bj.__)("Attributes connected to custom fields or other dynamic data.")})})]})})},ige={edit:RDe,attributeKeys:["metadata"],hasSupport(e){return!["core/post-date","core/navigation-link","core/navigation-submenu"].includes(e)}};var sge=l(N(),1),age=l(A(),1),nA=l(z(),1),N0=l(Y(),1),lge=l(O(),1);var oA=l(z(),1);function rA(e){let{isOpened:t,expandRevision:o}=(0,oA.useSelect)(i=>{let{isListViewPanelOpened:s,getListViewExpandRevision:a}=M(i(x));return{isOpened:s(e),expandRevision:a()}},[e]),{__unstableToggleListViewPanel:r}=(0,oA.useDispatch)(x);return{isOpened:t,expandRevision:o,handleToggle:i=>{r(e,i)}}}var ik=l(w(),1),ODe="listView";function cge(e){return(0,N0.hasBlockSupport)(e,ODe)}function ADe({clientId:e,name:t}){let{isSelectionWithinCurrentSection:o}=(0,lge.useContext)(br),{isOpened:r,expandRevision:n,handleToggle:i}=rA(e),{openListViewContentPanel:s}=M((0,nA.useDispatch)(x)),a=cge(t),{hasChildren:c,isNestedListView:u}=(0,nA.useSelect)(h=>{let{getBlockCount:p,getBlockParents:g,getBlockName:b}=h(x),v=g(e,!1).find(y=>{let _=b(y);return _==="core/navigation"||(0,N0.hasBlockSupport)(_,"listView")});return{hasChildren:!!p(e),isNestedListView:v}},[e]),f=(0,N0.getBlockType)(t)?.title||t;return!a||u?null:(0,ik.jsx)(Qm,{group:"list",children:(0,ik.jsxs)(age.PanelBody,{title:o?f:void 0,opened:r,onToggle:i,children:[!c&&(0,ik.jsx)("p",{className:"block-editor-block-inspector__no-blocks",children:(0,sge.__)("No items yet.")}),(0,ik.jsx)(hS,{rootClientId:e,isExpanded:!0,description:f,showAppender:!0,onSelect:s},`${e}-${n}`)]})})}var uge={edit:ADe,hasSupport:cge,attributeKeys:[],supportsPatternEditing:!0};var dge=l(pt(),1),fge=l(Y(),1);function LDe(e){return e.__experimentalLabel||(0,fge.hasBlockSupport)(e,"renaming",!0)&&(e.__experimentalLabel=(o,{context:r})=>{let{metadata:n}=o;if((r==="list-view"||r==="breadcrumb")&&n?.name)return n.name}),e}(0,dge.addFilter)("blocks.registerBlockType","core/metadata/addLabelCallback",LDe);var mge=l(X(),1),pge=l(pt(),1),hge=l(z(),1);var Cs=l(w(),1);function NDe(e){yj(e)}function MDe({clientId:e,layout:t}){let{isVisible:o,blockVisibility:r,deviceType:n,isAnyAncestorHidden:i}=(0,hge.useSelect)(a=>{let{isBlockSelected:c,hasSelectedInnerBlock:u,isDraggingBlocks:d,getTemplateLock:f,getBlockEditingMode:m,getBlockAttributes:h,getSettings:p}=a(x);if(!d()&&!c(e)||f(e)||m(e)!=="default"||u(e))return{isVisible:!1};let{isBlockParentHiddenAtViewport:g}=M(a(x)),b=h(e),v=p()?.[Oi]?.toLowerCase()||It.desktop.key;return{isVisible:!0,blockVisibility:b?.metadata?.blockVisibility,deviceType:v,isAnyAncestorHidden:g(e,v)}},[e]),{isBlockCurrentlyHidden:s}=Gi({blockVisibility:r,deviceType:n});return(0,Cs.jsxs)(Cs.Fragment,{children:[(0,Cs.jsx)(NDe,{clientId:e}),o&&!s&&!i&&(0,Cs.jsx)(R0,{clientId:e,parentLayout:t})]})}var DDe=(0,mge.createHigherOrderComponent)(e=>function(o){return o.attributes.layout?.type!=="grid"?(0,Cs.jsx)(e,{...o},"edit"):(0,Cs.jsxs)(Cs.Fragment,{children:[(0,Cs.jsx)(MDe,{clientId:o.clientId,layout:o.attributes.layout}),(0,Cs.jsx)(e,{...o},"edit")]})},"addGridVisualizerToBlockEdit");(0,pge.addFilter)("editor.BlockEdit","core/editor/grid-visualizer",DDe);var M0=l(Y(),1),bge=l(A(),1),vge=l(z(),1);var sA=l(O(),1),kge=l(N(),1);function gge(e){let t=[],o=[];return Object.entries(e).forEach(([r,n])=>{if(!n.autoGenerateControl)return;let i=VDe(r,n);i&&(t.push(i),o.push(r))}),{fields:t,form:{fields:o}}}function VDe(e,t){let o=t.type,r={id:e,label:t.label||e,type:o==="string"?"text":o};return t.enum&&Array.isArray(t.enum)&&(r.elements=t.enum.map(n=>({value:n,label:String(n)}))),r}var iA=l(w(),1);function FDe(e){return e?Object.values(e).some(t=>t?.autoGenerateControl):!1}function zDe({name:e,clientId:t,setAttributes:o}){let r=go(),n=(0,sA.useContext)(Or),i=(0,vge.useSelect)(u=>{let d=u(x).getBlockAttributes(t);if(!d?.metadata?.bindings)return d;let{getBlockBindingsSource:f}=M(u(M0.store));return Object.entries(d.metadata.bindings).reduce((m,[h,p])=>{let g=f(p.source);if(!g)return m;let b=g.getValues({select:u,context:n,bindings:{[h]:p}});return{...m,...b}},d)},[n,t]),s=(0,M0.getBlockType)(e),{fields:a,form:c}=(0,sA.useMemo)(()=>s?.attributes?gge(s.attributes):{fields:[],form:{fields:[]}},[s?.attributes]);return r!=="default"||!a||a.length===0?null:(0,iA.jsx)(fe,{children:(0,iA.jsx)(bge.PanelBody,{title:(0,kge.__)("Settings"),children:(0,iA.jsx)(v0,{data:i,fields:a,form:c,onChange:o})})})}var yge={edit:zDe,attributeKeys:[],hasSupport(e){let t=(0,M0.getBlockType)(e);return FDe(t?.attributes)}};function aA(e){let{style:t}=e,o=t?.dimensions||{},r=Ci({dimensions:o});return{className:o.aspectRatio?"has-aspect-ratio":void 0,style:r}}function lA(e){let t=e.style?.border||{};return{className:Fz(e)||void 0,style:Ci({border:t})}}function Ej(e){let{colors:t}=Kd(),o=lA(e),{borderColor:r}=e;if(r){let n=Vp({colors:t,namedColor:r});o.style.borderColor=n.color}return o}function Tj(e){let t=e.style?.shadow||"";return{style:Ci({shadow:t})}}var Ij=l(O(),1);function cA(e){let{backgroundColor:t,textColor:o,gradient:r,style:n}=e,i=Pi("background-color",t),s=Pi("color",o),a=Ih(r),c=a||n?.color?.gradient,u=D(s,a,{[i]:!c&&!!i,"has-text-color":o||n?.color?.text,"has-background":t||n?.color?.background||r||n?.color?.gradient,"has-link-color":n?.elements?.link?.color}),d=n?.color||{},f=Ci({color:d});return{className:u||void 0,style:f}}function Pj(e){let{backgroundColor:t,textColor:o,gradient:r}=e,[n,i,s,a,c,u]=pe("color.palette.custom","color.palette.theme","color.palette.default","color.gradients.custom","color.gradients.theme","color.gradients.default"),d=(0,Ij.useMemo)(()=>[...n||[],...i||[],...s||[]],[n,i,s]),f=(0,Ij.useMemo)(()=>[...a||[],...c||[],...u||[]],[a,c,u]),m=cA(e);if(t){let h=wa(d,t);m.style.backgroundColor=h.color}if(r&&(m.style.background=wC(f,r)),o){let h=wa(d,o);m.style.color=h.color}return m}function Rj(e){let{style:t}=e,o=t?.spacing||{};return{style:Ci({spacing:o})}}var _ge=l(A(),1);var{kebabCase:jDe}=M(_ge.privateApis);function Oj(e,t){let o=e?.style?.typography||{};o={...o,fontSize:mc({size:e?.style?.typography?.fontSize},t)};let r=Ci({typography:o}),n=e?.fontFamily?`has-${jDe(e.fontFamily)}-font-family`:"",i=e?.style?.typography?.textAlign?`has-text-align-${e?.style?.typography?.textAlign}`:"";return{className:D(n,i,Ru(e?.fontSize)),style:r}}var uA=l(O(),1);function Aj(e){let[t,o]=(0,uA.useState)(e);return(0,uA.useEffect)(()=>{e&&o(e)},[e]),t}Sde([wR,NO,b6,Z6,jO,WO,dj,DO,Z3,Hhe,ege,ige,Sj,Gde,Zpe,uge,yge].filter(Boolean));xde([wR,NO,Rue,jO,$z,The,dj,X6,J6,DO,zz,WO,Z3,ate,Sj]);wde([wR,NO,b6,Yde,Z6,zz,WO,DO,$z,jO,X6,J6]);var Sge={button:"wp-element-button",caption:"wp-element-caption"},UDe=e=>Sge[e]?Sge[e]:"";var xge=()=>"";var sk=l(O(),1),D0=l(Y(),1),Nj=l(yr(),1);var wge=l(w(),1);function Mj(e,t,o){if(e==null||e===!1)return;if(Array.isArray(e))return Lj(e,t,o);switch(typeof e){case"string":case"number":return}let{type:r,props:n}=e;switch(r){case sk.StrictMode:case sk.Fragment:return Lj(n.children,t,o);case sk.RawHTML:return;case O_.Content:return Cge(t,o);case DS:t.push(n.value);return}switch(typeof r){case"string":return typeof n.children<"u"?Lj(n.children,t,o):void 0;case"function":let i=r.prototype&&typeof r.prototype.render=="function"?new r(n).render():r(n);return Mj(i,t,o)}}function Lj(e,...t){e=Array.isArray(e)?e:[e];for(let o=0;o<e.length;o++)Mj(e[o],...t)}function Cge(e,t){for(let o=0;o<t.length;o++){let{name:r,attributes:n,innerBlocks:i}=t[o],s=(0,D0.getSaveElement)(r,n,(0,wge.jsx)(O_.Content,{}));Mj(s,e,i)}}function Bge(e=[]){D0.__unstableGetBlockProps.skipFilters=!0;let t=[];return Cge(t,e),D0.__unstableGetBlockProps.skipFilters=!1,t.map(o=>o instanceof Nj.RichTextData?o:Nj.RichTextData.fromHTMLString(o))}var Ege=l(A(),1);var Dj=l(w(),1);function Tge({clientId:e,resizableBoxProps:t,...o}){return(0,Dj.jsx)(Qi,{clientId:e,__unstablePopoverSlot:"block-toolbar",...o,children:(0,Dj.jsx)(Ege.ResizableBox,{...t})})}var F0=l(O(),1),dA=l(z(),1),ka=l(A(),1),V0=l(N(),1);var Bs=l(w(),1);function Ige({rules:e}){let[t,o]=(0,F0.useState)(!1),{clientIds:r,selectPrevious:n,message:i}=(0,dA.useSelect)(p=>M(p(x)).getRemovalPromptData()),{clearBlockRemovalPrompt:s,setBlockRemovalRules:a,privateRemoveBlocks:c}=M((0,dA.useDispatch)(x));if((0,F0.useEffect)(()=>(a(e),()=>{a()}),[e,a]),(0,F0.useEffect)(()=>{o(!1)},[r]),!i)return;let u=typeof i=="object"&&i!==null,d=u?i.description:i,f=u&&i.requireConfirmation,m=f&&!t,h=()=>{c(r,n,!0),s()};return(0,Bs.jsx)(ka.Modal,{title:(0,V0.__)("Confirm deletion"),onRequestClose:s,size:"medium",children:(0,Bs.jsxs)(ka.__experimentalVStack,{spacing:4,children:[(0,Bs.jsxs)("div",{children:[(0,Bs.jsx)("p",{children:d}),u&&(i.warning||i.subtext)&&(0,Bs.jsxs)("p",{children:[i.warning&&(0,Bs.jsx)("strong",{children:i.warning}),i.warning&&i.subtext&&" ",i.subtext]})]}),f&&(0,Bs.jsx)(ka.CheckboxControl,{label:(0,V0.__)("I understand the consequences"),checked:t,onChange:o}),(0,Bs.jsxs)(ka.__experimentalHStack,{justify:"right",children:[(0,Bs.jsx)(ka.Button,{variant:"tertiary",onClick:s,__next40pxDefaultSize:!0,children:(0,V0.__)("Cancel")}),(0,Bs.jsx)(ka.Button,{variant:"primary",onClick:h,disabled:m,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,V0.__)("Delete")})]})]})})}var Vj=l(O(),1);var ak=l(A(),1),Rge=l(O(),1),$n=l(N(),1),fA=l(w(),1),Pge=[{value:"fill",label:(0,$n._x)("Fill","Scale option for dimensions control"),help:(0,$n.__)("Fill the space by stretching the content.")},{value:"contain",label:(0,$n._x)("Contain","Scale option for dimensions control"),help:(0,$n.__)("Fit the content to the space without clipping.")},{value:"cover",label:(0,$n._x)("Cover","Scale option for dimensions control"),help:(0,$n.__)("Fill the space by clipping what doesn't fit.")},{value:"none",label:(0,$n._x)("None","Scale option for dimensions control"),help:(0,$n.__)("Do not adjust the sizing of the content. Content that is too large will be clipped, and content that is too small will have additional padding.")},{value:"scale-down",label:(0,$n._x)("Scale down","Scale option for dimensions control"),help:(0,$n.__)("Scale down the content to fit the space if it is too big. Content that is too small will have additional padding.")}];function Oge({panelId:e,value:t,onChange:o,options:r=Pge,defaultValue:n=Pge[0].value,isShownByDefault:i=!0}){let s=t??"fill",a=(0,Rge.useMemo)(()=>r.reduce((c,u)=>(c[u.value]=u.help,c),{}),[r]);return(0,fA.jsx)(ak.__experimentalToolsPanelItem,{label:(0,$n.__)("Scale"),isShownByDefault:i,hasValue:()=>s!==n,onDeselect:()=>o(n),panelId:e,children:(0,fA.jsx)(ak.__experimentalToggleGroupControl,{label:(0,$n.__)("Scale"),isBlock:!0,help:a[s],value:s,onChange:o,size:"__unstable-large",children:r.map(c=>(0,fA.jsx)(ak.__experimentalToggleGroupControlOption,{...c},c.value))})})}var lk=l(A(),1),eh=l(N(),1),nu=l(w(),1);function Age({panelId:e,value:t={},onChange:o=()=>{},units:r,isShownByDefault:n=!0}){let i=t.width==="auto"?"":t.width??"",s=t.height==="auto"?"":t.height??"",a=c=>u=>{let d={...t};u?d[c]=u:delete d[c],o(d)};return(0,nu.jsxs)(nu.Fragment,{children:[(0,nu.jsx)(lk.__experimentalToolsPanelItem,{style:{gridColumn:"span 1"},label:(0,eh.__)("Width"),isShownByDefault:n,hasValue:()=>i!=="",onDeselect:a("width"),panelId:e,children:(0,nu.jsx)(lk.__experimentalUnitControl,{label:(0,eh.__)("Width"),placeholder:(0,eh.__)("Auto"),labelPosition:"top",units:r,min:0,value:i,onChange:a("width"),size:"__unstable-large"})}),(0,nu.jsx)(lk.__experimentalToolsPanelItem,{style:{gridColumn:"span 1"},label:(0,eh.__)("Height"),isShownByDefault:n,hasValue:()=>s!=="",onDeselect:a("height"),panelId:e,children:(0,nu.jsx)(lk.__experimentalUnitControl,{label:(0,eh.__)("Height"),placeholder:(0,eh.__)("Auto"),labelPosition:"top",units:r,min:0,value:s,onChange:a("height"),size:"__unstable-large"})})]})}var zf=l(w(),1);function HDe({panelId:e,value:t={},onChange:o=()=>{},aspectRatioOptions:r,defaultAspectRatio:n="auto",scaleOptions:i,defaultScale:s="fill",unitsOptions:a,tools:c=["aspectRatio","widthHeight","scale"]}){let u=t.width===void 0||t.width==="auto"?null:t.width,d=t.height===void 0||t.height==="auto"?null:t.height,f=t.aspectRatio===void 0||t.aspectRatio==="auto"?null:t.aspectRatio,m=t.scale===void 0||t.scale==="fill"?null:t.scale,[h,p]=(0,Vj.useState)(m),[g,b]=(0,Vj.useState)(f),k=u&&d?"custom":g,v=f||u&&d;return(0,zf.jsxs)(zf.Fragment,{children:[c.includes("aspectRatio")&&(0,zf.jsx)(L2,{panelId:e,options:r,defaultValue:n,value:k,onChange:y=>{let _={...t};y=y==="auto"?null:y,b(y),y?_.aspectRatio=y:delete _.aspectRatio,y?h?_.scale=h:(_.scale=s,p(s)):delete _.scale,y!=="custom"&&u&&d&&delete _.height,o(_)}}),c.includes("widthHeight")&&(0,zf.jsx)(Age,{panelId:e,units:a,value:{width:u,height:d},onChange:({width:y,height:_})=>{let S={...t};y=y==="auto"?null:y,_=_==="auto"?null:_,y?S.width=y:delete S.width,_?S.height=_:delete S.height,y&&_?delete S.aspectRatio:g&&(S.aspectRatio=g),!g&&!!y!=!!_?delete S.scale:h?S.scale=h:(S.scale=s,p(s)),o(S)}}),c.includes("scale")&&v&&(0,zf.jsx)(Oge,{panelId:e,options:i,defaultValue:s,value:h,onChange:y=>{let _={...t};y=y==="fill"?null:y,p(y),y?_.scale=y:delete _.scale,o(_)}})]})}var Lge=HDe;var mA=l(A(),1),iu=l(N(),1),Fj=l(w(),1),Nge=[{label:(0,iu._x)("Thumbnail","Image size option for resolution control"),value:"thumbnail"},{label:(0,iu._x)("Medium","Image size option for resolution control"),value:"medium"},{label:(0,iu._x)("Large","Image size option for resolution control"),value:"large"},{label:(0,iu._x)("Full Size","Image size option for resolution control"),value:"full"}];function Mge({panelId:e,value:t,onChange:o,options:r=Nge,defaultValue:n=Nge[0].value,isShownByDefault:i=!0,resetAllFilter:s}){let a=t??n;return(0,Fj.jsx)(mA.__experimentalToolsPanelItem,{hasValue:()=>a!==n,label:(0,iu.__)("Resolution"),onDeselect:()=>o(n),isShownByDefault:i,panelId:e,resetAllFilter:s,children:(0,Fj.jsx)(mA.SelectControl,{label:(0,iu.__)("Resolution"),value:a,options:r,onChange:o,help:(0,iu.__)("Select the size of the source image."),size:"__unstable-large"})})}var th=l(N(),1),ck=l(A(),1),Vge=l(z(),1);var ya=l(N(),1),Dge={a:(0,ya.__)("The <a> element should be used for links that navigate to a different page or to a different section within the same page."),article:(0,ya.__)("The <article> element should represent a self-contained, syndicatable portion of the document."),aside:(0,ya.__)("The <aside> element should represent a portion of a document whose content is only indirectly related to the document's main content."),button:(0,ya.__)("The <button> element should be used for interactive controls that perform an action on the current page, such as opening a modal or toggling content visibility."),div:(0,ya.__)("The <div> element should only be used if the block is a design element with no semantic meaning."),footer:(0,ya.__)("The <footer> element should represent a footer for its nearest sectioning element (e.g.: <section>, <article>, <main> etc.)."),header:(0,ya.__)("The <header> element should represent introductory content, typically a group of introductory or navigational aids."),main:(0,ya.__)("The <main> element should be used for the primary content of your document only."),nav:(0,ya.__)("The <nav> element should be used to identify groups of links that are intended to be used for website or page content navigation."),section:(0,ya.__)("The <section> element should represent a standalone portion of the document that can't be better represented by another element.")};var z0=l(w(),1);function Fge({tagName:e,onChange:t,clientId:o,options:r=[{label:(0,th.__)("Default (<div>)"),value:"div"},{label:"<header>",value:"header"},{label:"<main>",value:"main"},{label:"<section>",value:"section"},{label:"<article>",value:"article"},{label:"<aside>",value:"aside"},{label:"<footer>",value:"footer"}]}){let n=!!o&&r.some(a=>a.value==="main"),i=(0,Vge.useSelect)(a=>{if(!n)return!1;let{getClientIdsWithDescendants:c,getBlockAttributes:u}=a(x);return c().some(d=>d===o?!1:u(d)?.tagName==="main")},[o,n]),s=r.map(a=>a.value==="main"&&i&&e!=="main"?{...a,disabled:!0,label:(0,th.sprintf)((0,th.__)("%s (Already in use)"),a.label)}:a);return(0,z0.jsxs)(ck.__experimentalVStack,{spacing:2,className:"block-editor-html-element-control",children:[(0,z0.jsx)(ck.SelectControl,{__next40pxDefaultSize:!0,label:(0,th.__)("HTML element"),options:s,value:e,onChange:t,help:Dge[e]}),e==="main"&&i&&(0,z0.jsx)(ck.Notice,{status:"warning",isDismissible:!1,children:(0,th.__)("Multiple <main> elements detected. The duplicate may be in your content or template. This is not valid HTML and may cause accessibility issues. Please change this HTML element.")})]})}var su=l(A(),1);var uk=l(O(),1),pA=l(N(),1);var Kn=l(A(),1);var zge=l(Ve(),1);var Ei=l(w(),1),{Badge:GDe}=M(Kn.privateApis);function jge({title:e,url:t,image:o,badges:r}){return(0,Ei.jsxs)(Kn.__experimentalHStack,{justify:"space-between",alignment:"top",children:[(0,Ei.jsx)(Kn.FlexItem,{className:"link-preview-button__content",children:(0,Ei.jsxs)(Kn.__experimentalHStack,{alignment:"top",children:[o&&(0,Ei.jsx)(Kn.FlexItem,{className:"link-preview-button__image-container",children:(0,Ei.jsx)("img",{className:"link-preview-button__image",src:o,alt:""})}),(0,Ei.jsxs)(Kn.__experimentalVStack,{className:"link-preview-button__details",alignment:"topLeft",children:[(0,Ei.jsx)(Kn.__experimentalTruncate,{numberOfLines:1,className:"link-preview-button__title",children:(0,zge.__unstableStripHTML)(e)}),t&&(0,Ei.jsx)(Kn.__experimentalTruncate,{numberOfLines:1,className:"link-preview-button__hint",children:t}),r&&r.length>0&&(0,Ei.jsx)(Kn.__experimentalHStack,{className:"link-preview-button__badges",alignment:"left",children:r.map(n=>(0,Ei.jsx)(GDe,{intent:n.intent,children:n.label},`${n.label}|${n.intent}`))})]})]})}),(0,Ei.jsx)(Ee,{icon:vr,className:"link-preview-button__icon"})]})}var Ti=l(w(),1);function zj({preview:e,onSelect:t,suggestionsQuery:o,label:r,help:n}){let[i,s]=(0,uk.useState)(!1),a=(0,uk.useId)(),c=`link-picker-title-${a}`,u=`link-picker-description-${a}`,d=(0,uk.useRef)(null),{baseControlProps:f,controlProps:m}=(0,su.useBaseControlProps)({help:n}),h=p=>{if(s(!1),p){let g={url:p.url,kind:p.kind,type:p.type,id:p.id,title:p.title};t(g)}};return(0,Ti.jsxs)(su.BaseControl,{...f,children:[(0,Ti.jsx)(su.BaseControl.VisualLabel,{children:r}),(0,Ti.jsxs)(su.Button,{ref:d,onClick:()=>s(!i),"aria-haspopup":"dialog","aria-expanded":i,"aria-describedby":m["aria-describedby"],variant:"secondary",__next40pxDefaultSize:!0,className:"link-preview-button",children:[r&&(0,Ti.jsxs)(Ge,{children:[r,":"]}),(0,Ti.jsx)(jge,{title:e.title||(0,pA.__)("Add link"),url:e.url,image:e.image,badges:e.badges})]}),i&&(0,Ti.jsx)(su.Popover,{anchor:d.current,onClose:()=>s(!1),placement:"left-start",offset:36,shift:!0,children:(0,Ti.jsxs)("div",{role:"dialog","aria-labelledby":c,"aria-describedby":u,children:[(0,Ti.jsxs)(Ge,{children:[(0,Ti.jsx)("h2",{id:c,children:(0,pA.__)("Select a link")}),(0,Ti.jsx)("p",{id:u,children:(0,pA.__)("Search for and add a link to the navigation item.")})]}),(0,Ti.jsx)(Jd,{value:null,onChange:h,suggestionsQuery:o,showInitialSuggestions:!0,forceIsEditingLink:!0,settings:[]})]})})]})}var jj={};l8(jj,{...Mz,ExperimentalBlockCanvas:$4,BlockCanvasCover:CI,ExperimentalBlockEditorProvider:cg,getDuotoneFilter:UO,getRichTextValues:Bge,PrivateQuickInserter:RE,extractWords:TC,getNormalizedSearchTerms:cy,normalizeString:ly,PrivateListView:hS,ResizableBoxPopover:Tge,InspectorControlsLastItem:vR,useHasBlockToolbar:ZT,cleanEmptyObject:Le,usePrivateStyleOverride:pc,BlockQuickNavigation:gR,LayoutStyle:H7,BlockManager:BR,BlockRemovalWarningModal:Ige,useLayoutClasses:YO,useLayoutStyles:gj,DimensionsTool:Lge,ResolutionTool:Mge,TabbedSidebar:BE,TextAlignmentControl:I2,usesContextKey:cz,useFlashEditableBlocks:M1,HTMLElementControl:Fge,useZoomOut:__,globalStylesDataKey:Ri,globalStylesLinksDataKey:tx,selectBlockPatternsKey:du,requiresWrapperOnCopy:CV,PrivateRichText:VS,PrivateInserterLibrary:Jz,reusableBlocksSelectKey:ox,PrivateBlockPopover:Wm,PrivatePublishDateTimePicker:a6,useSpacingSizes:d2,useBlockDisplayTitle:Sr,BlockStyleVariationOverridesWithConfig:O4,setBackgroundStyleDefaults:aR,sectionRootClientIdKey:fu,NoteIconSlotFill:BT,NoteIconToolbarSlotFill:HT,mediaEditKey:rx,getMediaSelectKey:nx,deviceTypeKey:Oi,isIsolatedEditorKey:mu,isNavigationOverlayContextKey:ix,isNavigationPostEditorKey:w8,mediaUploadOnSuccessKey:bk,openMediaEditorModalKey:C8,useBlockElement:rt,useBlockElementRef:bm,LinkPicker:zj,useRemoteUrlData:MP,PrivateBlockContext:br,useListViewPanelState:rA,isHashLink:jf,isRelativePath:Uf});return qge(WDe);})(); |
| 234 |
/*! Bundled license information: |
| 235 |
|
| 236 |
autosize/dist/autosize.js: |
| 237 |
(*! |
| 238 |
autosize 4.0.2 |
| 239 |
license: MIT |
| 240 |
http://www.jacklmoore.com/autosize |
| 241 |
*) |
| 242 |
|
| 243 |
normalize-wheel/src/isEventSupported.js: |
| 244 |
(** |
| 245 |
* Checks if an event is supported in the current execution environment. |
| 246 |
* |
| 247 |
* NOTE: This will not work correctly for non-generic events such as `change`, |
| 248 |
* `reset`, `load`, `error`, and `select`. |
| 249 |
* |
| 250 |
* Borrows from Modernizr. |
| 251 |
* |
| 252 |
* @param {string} eventNameSuffix Event name, e.g. "click". |
| 253 |
* @param {?boolean} capture Check if the capture phase is supported. |
| 254 |
* @return {boolean} True if the event is supported. |
| 255 |
* @internal |
| 256 |
* @license Modernizr 3.0.0pre (Custom Build) | MIT |
| 257 |
*) |
| 258 |
*/ |
| 259 |
//# sourceMappingURL=index.min.js.map |
| 260 |
|