CoreFiles by mySites.guru
block-editor.min.js259 lines, 1,054,176 bytes, from wordpress-7.0-beta2.zip
Raw History Compare with 7.0-beta1
md5
6ef3bbe3480af36a7a97a10886191443
sha1
a891524cdbf473ebab5e7aef5875c2e8cb3406ae
sha256
704dd37ab327ca414a49f1d95a2085c9ae7f46bfa219a0f1781513f063cf9852
"use strict";var wp;(wp||={}).blockEditor=(()=>{var Vme=Object.create;var n0=Object.defineProperty;var Fme=Object.getOwnPropertyDescriptor;var zme=Object.getOwnPropertyNames;var jme=Object.getPrototypeOf,Ume=Object.prototype.hasOwnProperty;var re=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Pp=(e,t)=>{for(var o in t)n0(e,o,{get:t[o],enumerable:!0})},n6=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of zme(t))!Ume.call(e,n)&&n!==o&&n0(e,n,{get:()=>t[n],enumerable:!(r=Fme(t,n))||r.enumerable});return e};var l=(e,t,o)=>(o=e!=null?Vme(jme(e)):{},n6(t||!e||!e.__esModule?n0(o,"default",{value:e,enumerable:!0}):o,e)),Hme=e=>n6(n0({},"__esModule",{value:!0}),e);var $=re((dLe,s6)=>{s6.exports=window.wp.blocks});var P=re((fLe,a6)=>{a6.exports=window.wp.element});var F=re((mLe,l6)=>{l6.exports=window.wp.data});var Z=re((pLe,c6)=>{c6.exports=window.wp.compose});var rt=re((hLe,u6)=>{u6.exports=window.wp.hooks});var A=re((yLe,S6)=>{S6.exports=window.wp.components});var bO=re((SLe,_6)=>{_6.exports=window.wp.privateApis});var Re=re((TLe,E6)=>{E6.exports=window.wp.deprecated});var w=re((ILe,T6)=>{T6.exports=window.ReactJSXRuntime});var un=re((RLe,P6)=>{P6.exports=window.wp.url});var N=re((ULe,D6)=>{D6.exports=window.wp.i18n});var vf=re((HLe,V6)=>{"use strict";V6.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 Y=re((JLe,W6)=>{W6.exports=window.wp.primitives});var ur=re((yVe,$6)=>{$6.exports=window.wp.richText});var Y6=re((SVe,K6)=>{K6.exports=window.wp.blockSerializationDefaultParser});var Zo=re((XVe,Pj)=>{Pj.exports=window.wp.a11y});var Ti=re((QVe,Mj)=>{Mj.exports=window.wp.notices});var Xp=re((JVe,Dj)=>{Dj.exports=window.wp.preferences});var yU=re((Q3e,Uw)=>{var bU={\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"},kU=Object.keys(bU).join("|"),rve=new RegExp(kU,"g"),nve=new RegExp(kU,"");function ive(e){return bU[e]}var vU=function(e){return e.replace(rve,ive)},sve=function(e){return!!e.match(nve)};Uw.exports=vU;Uw.exports.has=sve;Uw.exports.remove=vU});var OU=re((yFe,RU)=>{RU.exports=window.wp.apiFetch});var hM=re((SFe,AU)=>{AU.exports=window.wp.htmlEntities});var zv=re((KFe,JU)=>{JU.exports=window.wp.styleEngine});var it=re(($4e,_H)=>{_H.exports=window.wp.keycodes});var Fe=re((dze,MH)=>{MH.exports=window.wp.dom});var VH=re(IM=>{"use strict";Object.defineProperty(IM,"__esModule",{value:!0});IM.default=DH;function DH(){}DH.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,v=f[g-1],k=f[g+1],y=(k?k.newPos:0)-g;v&&(f[g-1]=void 0);var S=v&&v.newPos+1<a,x=k&&0<=y&&y<c;if(!S&&!x){f[g]=void 0;continue}if(!S||x&&v.newPos<k.newPos?(b=Jve(k),i.pushComponent(b.components,void 0,!0)):(b=v,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(Qve(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 Qve(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 Jve(e){return{newPos:e.newPos,components:e.components.slice(0)}}});var zH=re(Yv=>{"use strict";Object.defineProperty(Yv,"__esModule",{value:!0});Yv.diffChars=oye;Yv.characterDiff=void 0;var eye=tye(VH());function tye(e){return e&&e.__esModule?e:{default:e}}var FH=new eye.default;Yv.characterDiff=FH;function oye(e,t,o){return FH.diff(e,t,o)}});var zr=re((Bze,e8)=>{e8.exports=window.React});var o8=re((Eze,t8)=>{"use strict";var sye="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";t8.exports=sye});var s8=re((Tze,i8)=>{"use strict";var aye=o8();function r8(){}function n8(){}n8.resetWarningCache=r8;i8.exports=function(){function e(r,n,i,s,a,c){if(c!==aye){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:n8,resetWarningCache:r8};return o.PropTypes=o,o}});var l8=re((Rze,a8)=>{a8.exports=s8()();var Ize,Pze});var u8=re((bC,c8)=>{(function(e,t){if(typeof define=="function"&&define.amd)define(["module","exports"],t);else if(typeof bC<"u")t(c8,bC);else{var o={exports:{}};t(o,o.exports),e.autosize=o.exports}})(bC,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 S=c.style.width;c.style.width="0px",c.offsetWidth,c.style.width=S}c.style.overflowY=y}function p(y){for(var S=[];y&&y.parentNode&&y.parentNode instanceof Element;)y.parentNode.scrollTop&&S.push({node:y.parentNode,scrollTop:y.parentNode.scrollTop}),y=y.parentNode;return S}function g(){if(c.scrollHeight!==0){var y=p(c),S=document.documentElement&&document.documentElement.scrollTop;c.style.height="",c.style.height=c.scrollHeight+u+"px",d=c.clientWidth,y.forEach(function(x){x.node.scrollTop=x.scrollTop}),S&&(document.documentElement.scrollTop=S)}}function b(){g();var y=Math.round(parseFloat(c.style.height)),S=window.getComputedStyle(c,null),x=S.boxSizing==="content-box"?Math.round(parseFloat(S.height)):c.offsetHeight;if(x<y?S.overflowY==="hidden"&&(h("scroll"),g(),x=S.boxSizing==="content-box"?Math.round(parseFloat(window.getComputedStyle(c,null).height)):c.offsetHeight):S.overflowY!=="hidden"&&(h("hidden"),g(),x=S.boxSizing==="content-box"?Math.round(parseFloat(window.getComputedStyle(c,null).height)):c.offsetHeight),f!==x){f=x;var C=r("autosize:resized");try{c.dispatchEvent(C)}catch{}}}var v=function(){c.clientWidth!==d&&b()},k=function(y){window.removeEventListener("resize",v,!1),c.removeEventListener("input",b,!1),c.removeEventListener("keyup",b,!1),c.removeEventListener("autosize:destroy",k,!1),c.removeEventListener("autosize:update",b,!1),Object.keys(y).forEach(function(S){c.style[S]=y[S]}),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",k,!1),"onpropertychange"in c&&"oninput"in c&&c.addEventListener("keyup",b,!1),window.addEventListener("resize",v,!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:k,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 f8=re((Oze,d8)=>{var lye=function(e,t,o){return o=window.getComputedStyle,(o?o(e):e.currentStyle)[t.replace(/-(\w)/gi,function(r,n){return n.toUpperCase()})]};d8.exports=lye});var p8=re((Aze,m8)=>{var RM=f8();function cye(e){var t=RM(e,"line-height"),o=parseFloat(t,10);if(t===o+""){var r=e.style.lineHeight;e.style.lineHeight=t+"em",t=RM(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="&nbsp;",n.toUpperCase()==="TEXTAREA"&&i.setAttribute("rows","1");var s=RM(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}m8.exports=cye});var g8=re(Pl=>{"use strict";var uye=Pl&&Pl.__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)}})(),OM=Pl&&Pl.__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},dye=Pl&&Pl.__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};Pl.__esModule=!0;var vC=zr(),qv=l8(),kC=u8(),fye=p8(),mye=fye,h8="autosize:resized",pye=(function(e){uye(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:mye(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&&kC(o.textarea)}):this.textarea&&kC(this.textarea),this.textarea&&this.textarea.addEventListener(h8,this.onResize)},t.prototype.componentWillUnmount=function(){this.textarea&&(this.textarea.removeEventListener(h8,this.onResize),kC.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=dye(n,["onResize","maxRows","onChange","style","innerRef","children"]),m=r.state.lineHeight,h=s&&m?m*s:null;return vC.createElement("textarea",OM({},f,{onChange:this.onChange,style:h?OM({},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&&kC.update(this.textarea)},t.defaultProps={rows:1,async:!1},t.propTypes={rows:qv.number,maxRows:qv.number,onResize:qv.func,innerRef:qv.any,async:qv.bool},t})(vC.Component);Pl.TextareaAutosize=vC.forwardRef(function(e,t){return vC.createElement(pye,OM({},e,{innerRef:t}))})});var AM=re((Nze,b8)=>{"use strict";var hye=g8();b8.exports=hye.TextareaAutosize});var Zv=re((Vze,S8)=>{S8.exports=window.wp.warning});var k7=re((o6e,b7)=>{b7.exports=window.ReactDOM});var Is=re((P6e,K7)=>{K7.exports=window.wp.keyboardShortcuts});var h9=re((Hje,p9)=>{p9.exports=window.wp.uploadMedia});var E1=re(()=>{});var T1=re(()=>{});var MD=re(()=>{});var BG=re((gHe,CG)=>{var w_e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",C_e=(e,t=21)=>(o=t)=>{let r="",n=o|0;for(;n--;)r+=e[Math.random()*e.length|0];return r},B_e=(e=21)=>{let t="",o=e|0;for(;o--;)t+=w_e[Math.random()*64|0];return t};CG.exports={nanoid:B_e,customAlphabet:C_e}});var DD=re(()=>{});var TG=re((vHe,VD)=>{var Ce=String,EG=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}};VD.exports=EG();VD.exports.createColors=EG});var I1=re((yHe,RG)=>{"use strict";var IG=TG(),PG=DD(),wy=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=IG.isColorSupported),PG&&t&&(o=PG(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}=IG.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+`
 `+h+a("^")}return" "+c(m)+u}).join(`
`)}toString(){let t=this.showSourceCode();return t&&(t=`

`+t+`
`),this.name+": "+this.message+t}};RG.exports=wy;wy.default=wy});var OG=re(()=>{});var MG=re((xHe,NG)=>{"use strict";var{SourceMapConsumer:AG,SourceMapGenerator:LG}=E1(),{existsSync:E_e,readFileSync:T_e}=OG(),{dirname:FD,join:I_e}=T1();function P_e(e){return Buffer?Buffer.from(e,"base64").toString():window.atob(e)}var Cy=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=FD(this.mapFile)),n&&(this.text=n)}consumer(){return this.consumerCache||(this.consumerCache=new AG(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 P_e(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=FD(t),E_e(t))return this.mapFile=t,T_e(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 AG)return LG.fromSourceMap(o).toString();if(o instanceof LG)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=I_e(FD(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)}};NG.exports=Cy;Cy.default=Cy});var GD=re((wHe,zG)=>{"use strict";var{SourceMapConsumer:R_e,SourceMapGenerator:O_e}=E1(),{fileURLToPath:DG,pathToFileURL:P1}=MD(),{isAbsolute:UD,resolve:HD}=T1(),{nanoid:A_e}=BG(),zD=DD(),VG=I1(),L_e=MG(),jD=Symbol("fromOffsetCache"),N_e=!!(R_e&&O_e),FG=!!(HD&&UD),Mh=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&&(!FG||/^\w+:\/\//.test(o.from)||UD(o.from)?this.file=o.from:this.file=HD(o.from)),FG&&N_e){let r=new L_e(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 "+A_e(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 VG(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 VG(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&&(P1&&(i.input.url=P1(this.file).toString()),i.input.file=this.file),i}fromOffset(t){let o,r;if(this[jD])r=this[jD];else{let i=this.css.split(`
`);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[jD]=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:HD(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;UD(s.source)?c=P1(s.source):c=new URL(s.source,this.map.consumer().sourceRoot||P1(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(DG)u.file=DG(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}};zG.exports=Mh;Mh.default=Mh;zD&&zD.registerInput&&zD.registerInput(Mh)});var $D=re((CHe,$G)=>{"use strict";var{SourceMapConsumer:UG,SourceMapGenerator:R1}=E1(),{dirname:O1,relative:HG,resolve:GG,sep:WG}=T1(),{pathToFileURL:jG}=MD(),M_e=GD(),D_e=!!(UG&&R1),V_e=!!(O1&&GG&&HG&&WG),WD=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=`
`;this.css.includes(`\r
`)&&(o=`\r
`),this.css+=o+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(let t of this.previous()){let o=this.toUrl(this.path(t.file)),r=t.root||O1(t.file),n;this.mapOpts.sourcesContent===!1?(n=new UG(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(),V_e&&D_e&&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=R1.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new R1({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 R1({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(`
`),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?O1(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=O1(GG(r,this.mapOpts.annotation)));let n=HG(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 M_e(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(jG){let r=jG(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;WG==="\\"&&(t=t.replace(/\\/g,"/"));let r=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,r),r}};$G.exports=WD});var KD=re((BHe,YG)=>{"use strict";var KG={after:`
`,beforeClose:`
`,beforeComment:`
`,beforeDecl:`
`,beforeOpen:" ",beforeRule:`
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:"    ",semicolon:!1};function F_e(e){return e[0].toUpperCase()+e.slice(1)}var By=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(`
`)){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 KG[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"+F_e(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=KG[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(`
`)&&(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(`
`)&&(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(`
`)&&(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(`
`)&&(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(`
`);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)}};YG.exports=By;By.default=By});var A1=re((EHe,qG)=>{"use strict";var z_e=KD();function YD(e,t){new z_e(t).stringify(e)}qG.exports=YD;YD.default=YD});var qD=re((THe,XG)=>{"use strict";var ZG={};XG.exports=function(t){ZG[t]||(ZG[t]=!0,typeof console<"u"&&console.warn&&console.warn(t))}});var L1=re((IHe,ZD)=>{"use strict";ZD.exports.isClean=Symbol("isClean");ZD.exports.my=Symbol("my")});var M1=re((PHe,QG)=>{"use strict";var{isClean:N1,my:j_e}=L1(),U_e=I1(),H_e=KD(),G_e=A1();function XD(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=>XD(s,o)):(i==="object"&&n!==null&&(n=XD(n)),o[r]=n)}return o}var Ey=class{constructor(t={}){this.raws={},this[N1]=!1,this[j_e]=!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=XD(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 U_e(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[N1]){this[N1]=!1;let t=this;for(;t=t.parent;)t[N1]=!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]===`
`?(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 H_e().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=G_e){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}};QG.exports=Ey;Ey.default=Ey});var QD=re((RHe,JG)=>{"use strict";var W_e=M1(),Ty=class extends W_e{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]==="$"}};JG.exports=Ty;Ty.default=Ty});var JD=re((OHe,eW)=>{"use strict";var $_e=M1(),Iy=class extends $_e{constructor(t){super(t),this.type="comment"}};eW.exports=Iy;Iy.default=Iy});var om=re((AHe,cW)=>{"use strict";var{isClean:tW,my:oW}=L1(),rW=QD(),nW=JD(),K_e=M1(),iW,e5,t5,sW;function aW(e){return e.map(t=>(t.nodes&&(t.nodes=aW(t.nodes)),delete t.source,t))}function lW(e){if(e[tW]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)lW(t)}var Rs=class e extends K_e{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=aW(iW(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 rW(t)]}else if(t.selector)t=[new e5(t)];else if(t.name)t=[new t5(t)];else if(t.text)t=[new nW(t)];else throw new Error("Unknown node type in node creation");return t.map(n=>(n[oW]||e.rebuild(n),n=n.proxyOf,n.parent&&n.parent.removeChild(n),n[tW]&&lW(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]}};Rs.registerParse=e=>{iW=e};Rs.registerRule=e=>{e5=e};Rs.registerAtRule=e=>{t5=e};Rs.registerRoot=e=>{sW=e};cW.exports=Rs;Rs.default=Rs;Rs.rebuild=e=>{e.type==="atrule"?Object.setPrototypeOf(e,t5.prototype):e.type==="rule"?Object.setPrototypeOf(e,e5.prototype):e.type==="decl"?Object.setPrototypeOf(e,rW.prototype):e.type==="comment"?Object.setPrototypeOf(e,nW.prototype):e.type==="root"&&Object.setPrototypeOf(e,sW.prototype),e[oW]=!0,e.nodes&&e.nodes.forEach(t=>{Rs.rebuild(t)})}});var fW=re((LHe,dW)=>{"use strict";var D1=/[\t\n\f\r "#'()/;[\\\]{}]/g,V1=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Y_e=/.[\r\n"'(/\\]/,uW=/[\da-f]/i;dW.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,v=[],k=[];function y(){return b}function S(I){throw t.error("Unclosed "+I,b)}function x(){return k.length===0&&b>=g}function C(I){if(k.length)return k.pop();if(b>=g)return;let O=I?I.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=v.length?v.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||O){s=b;break}else S("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||Y_e.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||O){s=b+1;break}else S("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:{D1.lastIndex=b+1,D1.test(r),D1.lastIndex===0?s=r.length-1:s=D1.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,uW.test(r.charAt(s)))){for(;uW.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||O?s=r.length:S("comment")),p=["comment",r.slice(b,s+1),b,s],b=s):(V1.lastIndex=b+1,V1.test(r),V1.lastIndex===0?s=r.length-1:s=V1.lastIndex-2,p=["word",r.slice(b,s+1),b,s],v.push(p),b=s);break}}return b++,p}function B(I){k.push(I)}return{back:B,endOfFile:x,nextToken:C,position:y}}});var hW=re((NHe,pW)=>{"use strict";var mW=om(),Dh=class extends mW{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)}};pW.exports=Dh;Dh.default=Dh;mW.registerAtRule(Dh)});var F1=re((MHe,vW)=>{"use strict";var gW=om(),bW,kW,Vu=class extends gW{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 bW(new kW,this,t).stringify()}};Vu.registerLazyResult=e=>{bW=e};Vu.registerProcessor=e=>{kW=e};vW.exports=Vu;Vu.default=Vu;gW.registerRoot(Vu)});var SW=re((DHe,yW)=>{"use strict";var Py={comma(e){return Py.split(e,[","],!0)},space(e){let t=[" ",`
`,"	"];return Py.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}};yW.exports=Py;Py.default=Py});var wW=re((VHe,xW)=>{"use strict";var _W=om(),q_e=SW(),Vh=class extends _W{constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return q_e.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)}};xW.exports=Vh;Vh.default=Vh;_W.registerRule(Vh)});var TW=re((FHe,EW)=>{"use strict";var Z_e=QD(),X_e=fW(),Q_e=JD(),J_e=hW(),e0e=F1(),CW=wW(),BW={empty:!0,space:!0};function t0e(e){for(let t=e.length-1;t>=0;t--){let o=e[t],r=o[3]||o[2];if(r)return r}}var o5=class{constructor(t){this.input=t,this.root=new e0e,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 J_e;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 Q_e;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=X_e(this.input)}decl(t,o){let r=new Z_e;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]||t0e(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 CW;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",!BW[f]&&!BW[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 CW;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})}};EW.exports=o5});var r5=re((zHe,IW)=>{"use strict";var o0e=om(),r0e=TW(),n0e=GD();function z1(e,t){let o=new n0e(e,t),r=new r0e(o);try{r.parse()}catch(n){throw n}return r.root}IW.exports=z1;z1.default=z1;o0e.registerParse(z1)});var RW=re((jHe,PW)=>{"use strict";var Ry=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}};PW.exports=Ry;Ry.default=Ry});var n5=re((UHe,OW)=>{"use strict";var i0e=RW(),Oy=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 i0e(t,o);return this.messages.push(r),r}warnings(){return this.messages.filter(t=>t.type==="warning")}get content(){return this.css}};OW.exports=Oy;Oy.default=Oy});var LW=re((GHe,AW)=>{"use strict";var s0e=$D(),a0e=A1(),HHe=qD(),l0e=r5(),c0e=n5(),Ay=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=a0e;this.result=new c0e(this._processor,n,this._opts),this.result.css=o;let s=this;Object.defineProperty(this.result,"root",{get(){return s.root}});let a=new s0e(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=l0e;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"}};AW.exports=Ay;Ay.default=Ay});var i5=re((WHe,DW)=>{"use strict";var u0e=om(),NW,MW,rm=class extends u0e{constructor(t){super({type:"document",...t}),this.nodes||(this.nodes=[])}toResult(t={}){return new NW(new MW,this,t).stringify()}};rm.registerLazyResult=e=>{NW=e};rm.registerProcessor=e=>{MW=e};DW.exports=rm;rm.default=rm});var UW=re((KHe,jW)=>{"use strict";var{isClean:xa,my:d0e}=L1(),f0e=$D(),m0e=A1(),p0e=om(),h0e=i5(),$He=qD(),VW=n5(),g0e=r5(),b0e=F1(),k0e={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},v0e={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},y0e={Once:!0,postcssPlugin:!0,prepare:!0},Fh=0;function Ly(e){return typeof e=="object"&&typeof e.then=="function"}function zW(e){let t=!1,o=k0e[e.type];return e.type==="decl"?t=e.prop.toLowerCase():e.type==="atrule"&&(t=e.name.toLowerCase()),t&&e.append?[o,o+"-"+t,Fh,o+"Exit",o+"Exit-"+t]:t?[o,o+"-"+t,o+"Exit",o+"Exit-"+t]:e.append?[o,Fh,o+"Exit"]:[o,o+"Exit"]}function FW(e){let t;return e.type==="document"?t=["Document",Fh,"DocumentExit"]:e.type==="root"?t=["Root",Fh,"RootExit"]:t=zW(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function s5(e){return e[xa]=!1,e.nodes&&e.nodes.forEach(t=>s5(t)),e}var a5={},Fu=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=s5(o);else if(o instanceof e||o instanceof VW)n=s5(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=g0e;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[d0e]&&p0e.rebuild(n)}this.result=new VW(t,n,r),this.helpers={...a5,postcss:a5,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(!v0e[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${o.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!y0e[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(Ly(r))try{await r}catch(n){throw this.handleError(n)}}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[xa];){t[xa]=!0;let o=[FW(t)];for(;o.length>0;){let r=this.visitTick(o);if(Ly(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 Ly(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=m0e;t.syntax&&(o=t.syntax.stringify),t.stringifier&&(o=t.stringifier),o.stringify&&(o=o.stringify);let n=new f0e(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(Ly(o))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[xa];)t[xa]=!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(Ly(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[xa]){a[xa]=!0,t.push(FW(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===Fh){r.nodes&&r.nodes.length&&(r[xa]=!0,o.iterator=r.getIterator());return}else if(this.listeners[s]){o.visitors=this.listeners[s];return}}t.pop()}walkSync(t){t[xa]=!0;let o=zW(t);for(let r of o)if(r===Fh)t.nodes&&t.each(n=>{n[xa]||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"}};Fu.registerPostcss=e=>{a5=e};jW.exports=Fu;Fu.default=Fu;b0e.registerLazyResult(Fu);h0e.registerLazyResult(Fu)});var GW=re((YHe,HW)=>{"use strict";var S0e=LW(),_0e=UW(),x0e=i5(),w0e=F1(),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 S0e(this,t,o):new _0e(this,t,o)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}};HW.exports=nm;nm.default=nm;w0e.registerProcessor(nm);x0e.registerProcessor(nm)});var KW=re((qHe,$W)=>{$W.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&&WW(s.source.input.file,n)||i.length&&s.source.input.file&&!WW(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&&C0e(u,t.exclude)?u:t.transform?t.transform(o,u,r+u,s.source.input.file,a):r+u))})}};function WW(e,t){return t.some(o=>o instanceof RegExp?o.test(e):e.includes(o))}function C0e(e,t){return t.some(o=>o instanceof RegExp?o.test(e):e===o)}});var qW=re((ZHe,YW)=>{var l5=40,c5=41,j1=39,u5=34,d5=92,zh=47,f5=44,m5=58,U1=42,B0e=117,E0e=85,T0e=43,I0e=/^[a-f0-9?-]+$/i;YW.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,v="",k="",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===c5&&g?y=s:i&&i.type==="div"?(i.after=s,i.sourceEndIndex+=s.length):m===f5||m===m5||m===zh&&o.charCodeAt(r+1)!==U1&&(!b||b&&b.type==="function"&&b.value!=="calc")?k=s:t.push({type:"space",sourceIndex:f,sourceEndIndex:r,value:s}),f=r}else if(m===j1||m===u5){r=f,n=m===j1?"'":'"',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)===d5;)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===zh&&o.charCodeAt(f+1)===U1)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===zh||m===U1)&&b&&b.type==="function"&&b.value==="calc")s=o[f],t.push({type:"word",sourceIndex:f-k.length,sourceEndIndex:f+s.length,value:s}),f+=1,m=o.charCodeAt(f);else if(m===zh||m===f5||m===m5)s=o[f],t.push({type:"div",sourceIndex:f-k.length,sourceEndIndex:f+s.length,value:s,before:k,after:""}),k="",f+=1,m=o.charCodeAt(f);else if(l5===m){r=f;do r+=1,m=o.charCodeAt(r);while(m<=32);if(d=f,s={type:"function",sourceIndex:f-v.length,value:v,before:o.slice(d+1,r)},f=r,v==="url"&&m!==j1&&m!==u5){r-=1;do if(a=!1,r=o.indexOf(")",r+1),~r)for(c=r;o.charCodeAt(c-1)===d5;)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;v=""}else if(c5===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===d5&&(r+=1),r+=1,m=o.charCodeAt(r);while(r<h&&!(m<=32||m===j1||m===u5||m===f5||m===m5||m===zh||m===l5||m===U1&&b&&b.type==="function"&&b.value==="calc"||m===zh&&b.type==="function"&&b.value==="calc"||m===c5&&g));s=o.slice(f,r),l5===m?v=s:(B0e===s.charCodeAt(0)||E0e===s.charCodeAt(0))&&T0e===s.charCodeAt(1)&&I0e.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 XW=re((XHe,ZW)=>{ZW.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 t$=re((QHe,e$)=>{function QW(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=JW(e.nodes,t),o!=="function"?n:r+"("+(e.before||"")+n+(e.after||"")+(e.unclosed?"":")")):r}function JW(e,t){var o,r;if(Array.isArray(e)){for(o="",r=e.length-1;~r;r-=1)o=QW(e[r],t)+o;return o}return QW(e,t)}e$.exports=JW});var r$=re((JHe,o$)=>{var H1=45,G1=43,p5=46,P0e=101,R0e=69;function O0e(e){var t=e.charCodeAt(0),o;if(t===G1||t===H1){if(o=e.charCodeAt(1),o>=48&&o<=57)return!0;var r=e.charCodeAt(2);return o===p5&&r>=48&&r<=57}return t===p5?(o=e.charCodeAt(1),o>=48&&o<=57):t>=48&&t<=57}o$.exports=function(e){var t=0,o=e.length,r,n,i;if(o===0||!O0e(e))return!1;for(r=e.charCodeAt(t),(r===G1||r===H1)&&t++;t<o&&(r=e.charCodeAt(t),!(r<48||r>57));)t+=1;if(r=e.charCodeAt(t),n=e.charCodeAt(t+1),r===p5&&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===P0e||r===R0e)&&(n>=48&&n<=57||(n===G1||n===H1)&&i>=48&&i<=57))for(t+=n===G1||n===H1?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 a$=re((e8e,s$)=>{var A0e=qW(),n$=XW(),i$=t$();function zu(e){return this instanceof zu?(this.nodes=A0e(e),this):new zu(e)}zu.prototype.toString=function(){return Array.isArray(this.nodes)?i$(this.nodes):""};zu.prototype.walk=function(e,t){return n$(this.nodes,e,t),this};zu.unit=r$();zu.walk=n$;zu.stringify=i$;s$.exports=zu});var c$=re((t8e,h5)=>{var l$=a$();h5.exports=e=>{let o=Object.assign({skipHostRelativeUrls:!0},e);return{postcssPlugin:"rebaseUrl",Declaration(r){let n=l$(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=l$.stringify(n))}}};h5.exports.postcss=!0});var _$=re((h8e,S$)=>{S$.exports=window.wp.priorityQueue});var A5=re((l9e,SK)=>{SK.exports=window.wp.blob});var Xy=re((OWe,PY)=>{PY.exports=window.wp.isShallowEqual});var KE=re((jqe,SX)=>{SX.exports=window.wp.tokenList});var PV=re((Jqe,NX)=>{"use strict";var h1e=function(t){return g1e(t)&&!b1e(t)};function g1e(e){return!!e&&typeof e=="object"}function b1e(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||y1e(e)}var k1e=typeof Symbol=="function"&&Symbol.for,v1e=k1e?Symbol.for("react.element"):60103;function y1e(e){return e.$$typeof===v1e}function S1e(e){return Array.isArray(e)?[]:{}}function SS(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Pg(S1e(e),e,t):e}function _1e(e,t,o){return e.concat(t).map(function(r){return SS(r,o)})}function x1e(e,t){if(!t.customMerge)return Pg;var o=t.customMerge(e);return typeof o=="function"?o:Pg}function w1e(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function AX(e){return Object.keys(e).concat(w1e(e))}function LX(e,t){try{return t in e}catch{return!1}}function C1e(e,t){return LX(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function B1e(e,t,o){var r={};return o.isMergeableObject(e)&&AX(e).forEach(function(n){r[n]=SS(e[n],o)}),AX(t).forEach(function(n){C1e(e,n)||(LX(e,n)&&o.isMergeableObject(t[n])?r[n]=x1e(n,o)(e[n],t[n],o):r[n]=SS(t[n],o))}),r}function Pg(e,t,o){o=o||{},o.arrayMerge=o.arrayMerge||_1e,o.isMergeableObject=o.isMergeableObject||h1e,o.cloneUnlessOtherwiseSpecified=SS;var r=Array.isArray(t),n=Array.isArray(e),i=r===n;return i?r?o.arrayMerge(e,t,o):B1e(e,t,o):SS(t,o)}Pg.all=function(t,o){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,n){return Pg(r,n,o)},{})};var E1e=Pg;NX.exports=E1e});var UQ=re((BQe,jQ)=>{jQ.exports=window.wp.commands});var pc=re((rot,nte)=>{nte.exports=window.wp.date});var Dte=re((Got,Mte)=>{var Rte=!1,Hm,I3,P3,dI,fI,Ote,mI,R3,O3,A3,Ate,L3,N3,Lte,Nte;function Bn(){if(!Rte){Rte=!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(L3=/\b(iPhone|iP[ao]d)/.exec(e),N3=/\b(iP[ao]d)/.exec(e),A3=/Android/i.exec(e),Lte=/FBAN\/\w+;/i.exec(e),Nte=/Mobile/i.exec(e),Ate=!!/Win64/.exec(e),t){Hm=t[1]?parseFloat(t[1]):t[5]?parseFloat(t[5]):NaN,Hm&&document&&document.documentMode&&(Hm=document.documentMode);var r=/(?:Trident\/(\d+.\d+))/.exec(e);Ote=r?parseFloat(r[1])+4:Hm,I3=t[2]?parseFloat(t[2]):NaN,P3=t[3]?parseFloat(t[3]):NaN,dI=t[4]?parseFloat(t[4]):NaN,dI?(t=/(?:Chrome\/(\d+\.\d+))/.exec(e),fI=t&&t[1]?parseFloat(t[1]):NaN):fI=NaN}else Hm=I3=P3=fI=dI=NaN;if(o){if(o[1]){var n=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);mI=n?parseFloat(n[1].replace("_",".")):!0}else mI=!1;R3=!!o[2],O3=!!o[3]}else mI=R3=O3=!1}}var M3={ie:function(){return Bn()||Hm},ieCompatibilityMode:function(){return Bn()||Ote>Hm},ie64:function(){return M3.ie()&&Ate},firefox:function(){return Bn()||I3},opera:function(){return Bn()||P3},webkit:function(){return Bn()||dI},safari:function(){return M3.webkit()},chrome:function(){return Bn()||fI},windows:function(){return Bn()||R3},osx:function(){return Bn()||mI},linux:function(){return Bn()||O3},iphone:function(){return Bn()||L3},mobile:function(){return Bn()||L3||N3||A3||Nte},nativeApp:function(){return Bn()||Lte},android:function(){return Bn()||A3},ipad:function(){return Bn()||N3}};Mte.exports=M3});var Fte=re((Wot,Vte)=>{"use strict";var pI=!!(typeof window<"u"&&window.document&&window.document.createElement),bEe={canUseDOM:pI,canUseWorkers:typeof Worker<"u",canUseEventListeners:pI&&!!(window.addEventListener||window.attachEvent),canUseViewport:pI&&!!window.screen,isInWorker:!pI};Vte.exports=bEe});var Hte=re(($ot,Ute)=>{"use strict";var zte=Fte(),jte;zte.canUseDOM&&(jte=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0);function kEe(e,t){if(!zte.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&&jte&&e==="wheel"&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}Ute.exports=kEe});var qte=re((Kot,Yte)=>{"use strict";var vEe=Dte(),yEe=Hte(),Gte=10,Wte=40,$te=800;function Kte(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*Gte,n=o*Gte,"deltaY"in e&&(n=e.deltaY),"deltaX"in e&&(r=e.deltaX),(r||n)&&e.deltaMode&&(e.deltaMode==1?(r*=Wte,n*=Wte):(r*=$te,n*=$te)),r&&!t&&(t=r<1?-1:1),n&&!o&&(o=n<1?-1:1),{spinX:t,spinY:o,pixelX:r,pixelY:n}}Kte.getEventType=function(){return vEe.firefox()?"DOMMouseScroll":yEe("wheel")?"wheel":"mousewheel"};Yte.exports=Kte});var Xte=re((Yot,Zte)=>{Zte.exports=qte()});var Bre=re((Fnt,Cre)=>{"use strict";Cre.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 aLe={};Pp(aLe,{AlignmentControl:()=>jw,AlignmentToolbar:()=>gU,Autocomplete:()=>UU,BlockAlignmentControl:()=>nC,BlockAlignmentToolbar:()=>uH,BlockBindingsAttributeControl:()=>Gv,BlockBindingsSourceFieldsList:()=>Hv,BlockBreadcrumb:()=>AH,BlockCanvas:()=>KQ,BlockColorsStyleSelector:()=>XQ,BlockContextProvider:()=>f0,BlockControls:()=>Mt,BlockEdit:()=>Lw,BlockEditorKeyboardShortcuts:()=>f1,BlockEditorProvider:()=>N9,BlockFormatControls:()=>dV,BlockIcon:()=>Oe,BlockInspector:()=>Lae,BlockList:()=>Hh,BlockMover:()=>pE,BlockNavigationDropdown:()=>see,BlockPopover:()=>fY,BlockPreview:()=>kn,BlockSelectionClearer:()=>CY,BlockSettingsMenu:()=>zE,BlockSettingsMenuControls:()=>NE,BlockStyles:()=>Yg,BlockTitle:()=>$v,BlockToolbar:()=>TQ,BlockTools:()=>PS,BlockVerticalAlignmentControl:()=>eC,BlockVerticalAlignmentToolbar:()=>Pee,ButtonBlockAppender:()=>Xu,ButtonBlockerAppender:()=>oY,ColorPalette:()=>Qee,ColorPaletteControl:()=>tte,ContrastChecker:()=>KT,CopyHandler:()=>Dae,DefaultBlockAppender:()=>lg,DimensionControl:()=>nb,FontSizePicker:()=>sM,HeadingLevelDropdown:()=>bee,HeightControl:()=>Pte,InnerBlocks:()=>Jy,Inserter:()=>Ui,InspectorAdvancedControls:()=>od,InspectorControls:()=>fe,JustifyContentControl:()=>lh,JustifyToolbar:()=>zoe,LineHeightControl:()=>VI,LinkControl:()=>Id,MediaPlaceholder:()=>ane,MediaReplaceFlow:()=>kb,MediaUpload:()=>Yu,MediaUploadCheck:()=>Ms,MultiSelectScrollIntoView:()=>jae,NavigableToolbar:()=>Cg,ObserveTyping:()=>ZY,PanelColorSettings:()=>cne,PlainText:()=>aie,RecursionProvider:()=>s4,RichText:()=>xb,RichTextShortcut:()=>kF,RichTextToolbarButton:()=>yF,SETTINGS_DEFAULTS:()=>Gk,SkipToSelectedBlock:()=>mP,ToolSelector:()=>ele,Typewriter:()=>Wae,URLInput:()=>Ed,URLInputButton:()=>gie,URLPopover:()=>Od,Warning:()=>pu,WritingFlow:()=>x1,__experimentalBlockAlignmentMatrixControl:()=>CH,__experimentalBlockFullHeightAligmentControl:()=>SH,__experimentalBlockPatternSetup:()=>Eee,__experimentalBlockPatternsList:()=>Ca,__experimentalBlockVariationPicker:()=>kee,__experimentalBlockVariationTransforms:()=>zT,__experimentalBorderRadiusControl:()=>WT,__experimentalColorGradientControl:()=>Sd,__experimentalColorGradientSettingsDropdown:()=>aI,__experimentalDateFormatPicker:()=>ite,__experimentalDuotoneControl:()=>qT,__experimentalFontAppearanceControl:()=>XT,__experimentalFontFamilyControl:()=>QT,__experimentalGetBorderClassesAndStyles:()=>QR,__experimentalGetColorClassesAndStyles:()=>JR,__experimentalGetElementClassName:()=>nLe,__experimentalGetGapCSSValue:()=>fr,__experimentalGetGradientClass:()=>oh,__experimentalGetGradientObjectByGradientValue:()=>sU,__experimentalGetShadowClassesAndStyles:()=>Gz,__experimentalGetSpacingClassesAndStyles:()=>Kz,__experimentalImageEditor:()=>Aoe,__experimentalImageSizeControl:()=>Doe,__experimentalImageURLInputUI:()=>xie,__experimentalInspectorPopoverHeader:()=>h2,__experimentalLetterSpacingControl:()=>eI,__experimentalLibrary:()=>Fae,__experimentalLinkControl:()=>DI,__experimentalLinkControlSearchInput:()=>dre,__experimentalLinkControlSearchItem:()=>Qoe,__experimentalLinkControlSearchResults:()=>nre,__experimentalListView:()=>NT,__experimentalPanelColorGradientSettings:()=>cI,__experimentalPreviewOptions:()=>Fie,__experimentalPublishDateTimePicker:()=>Zae,__experimentalRecursionProvider:()=>$ae,__experimentalResponsiveBlockControl:()=>fie,__experimentalSpacingSizesControl:()=>Ab,__experimentalTextDecorationControl:()=>oI,__experimentalTextTransformControl:()=>nI,__experimentalUnitControl:()=>pie,__experimentalUseBlockOverlayActive:()=>NH,__experimentalUseBlockPreview:()=>E$,__experimentalUseBorderProps:()=>Hz,__experimentalUseColorProps:()=>$z,__experimentalUseCustomSides:()=>yz,__experimentalUseGradient:()=>Gke,__experimentalUseHasRecursion:()=>Kae,__experimentalUseMultipleOriginColorsAndGradients:()=>xd,__experimentalUseResizeCanvas:()=>zie,__experimentalWritingModeControl:()=>sI,__unstableBlockSettingsMenuFirstItem:()=>wE,__unstableBlockToolbarLastItem:()=>vE,__unstableEditorStyles:()=>Nl,__unstableIframe:()=>Nh,__unstableInserterMenuExtension:()=>gB,__unstableRichTextInputEvent:()=>SF,__unstableUseBlockSelectionClearer:()=>pm,__unstableUseClipboardHandler:()=>Mae,__unstableUseMouseMoveTypingReset:()=>tS,__unstableUseTypewriter:()=>r4,__unstableUseTypingObserver:()=>oS,createCustomColorsHOC:()=>nU,getColorClassName:()=>yi,getColorObjectByAttributeValues:()=>ua,getColorObjectByColorValue:()=>u0,getComputedFluidTypographyValue:()=>cU,getCustomValueFromPreset:()=>WU,getDimensionsClassesAndStyles:()=>Uz,getFontSize:()=>rh,getFontSizeClass:()=>hu,getFontSizeObjectByValue:()=>iM,getGradientSlugByValue:()=>aU,getGradientValueBySlug:()=>Fw,getPxFromCssUnit:()=>kme,getSpacingPresetCssVar:()=>Fv,getTypographyClassesAndStyles:()=>Yz,isValueSpacingPreset:()=>Jw,privateApis:()=>r6,store:()=>_,storeConfig:()=>Jp,transformStyles:()=>jh,useBlockBindingsUtils:()=>El,useBlockCommands:()=>bT,useBlockDisplayInformation:()=>Tt,useBlockEditContext:()=>Pe,useBlockEditingMode:()=>Mo,useBlockProps:()=>gy,useCachedTruthy:()=>qz,useHasRecursion:()=>a4,useInnerBlocksProps:()=>vm,useSetting:()=>eU,useSettings:()=>me,useStyleOverride:()=>Zn,withColorContext:()=>$T,withColors:()=>iU,withFontSizes:()=>pU});function i6(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=i6(e[t]))&&(r&&(r+=" "),r+=o)}else for(o in e)e[o]&&(r&&(r+=" "),r+=o);return r}function Gme(){for(var e,t,o=0,r="",n=arguments.length;o<n;o++)(e=arguments[o])&&(t=i6(e))&&(r&&(r+=" "),r+=t);return r}var V=Gme;var tle=l($(),1),as=l(P(),1),k2=l(F(),1),d4=l(Z(),1),x_=l(rt(),1);var i0=l(P(),1),bs=Symbol("mayDisplayControls"),Rp=Symbol("mayDisplayParentControls"),$c=Symbol("mayDisplayPatternEditingControls"),s0=Symbol("blockEditingMode"),Op=Symbol("blockBindings"),a0=Symbol("isPreviewMode"),zk=Symbol("isInListViewBlockSupportTree"),lO={name:"",isSelected:!1},cO=(0,i0.createContext)(lO);cO.displayName="BlockEditContext";var{Provider:l0}=cO;function Pe(){return(0,i0.useContext)(cO)}var Wme={grad:.9,turn:360,rad:360/(2*Math.PI)},ml=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},qo=function(e,t,o){return t===void 0&&(t=0),o===void 0&&(o=Math.pow(10,t)),Math.round(o*e)/o+0},vi=function(e,t,o){return t===void 0&&(t=0),o===void 0&&(o=1),e>o?o:e>t?e:t},k6=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},d6=function(e){return{r:vi(e.r,0,255),g:vi(e.g,0,255),b:vi(e.b,0,255),a:vi(e.a)}},uO=function(e){return{r:qo(e.r),g:qo(e.g),b:qo(e.b),a:qo(e.a,3)}},$me=/^#([0-9a-f]{3,8})$/i,c0=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},v6=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}},y6=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}},f6=function(e){return{h:k6(e.h),s:vi(e.s,0,100),l:vi(e.l,0,100),a:vi(e.a)}},m6=function(e){return{h:qo(e.h),s:qo(e.s),l:qo(e.l),a:qo(e.a,3)}},p6=function(e){return y6((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},jk=function(e){return{h:(t=v6(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},Kme=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Yme=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,qme=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Zme=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,mO={string:[[function(e){var t=$me.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?qo(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?qo(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=qme.exec(e)||Zme.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:d6({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=Kme.exec(e)||Yme.exec(e);if(!t)return null;var o,r,n=f6({h:(o=t[1],r=t[2],r===void 0&&(r="deg"),Number(o)*(Wme[r]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return p6(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 ml(t)&&ml(o)&&ml(r)?d6({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(!ml(t)||!ml(o)||!ml(r))return null;var s=f6({h:Number(t),s:Number(o),l:Number(r),a:Number(i)});return p6(s)},"hsl"],[function(e){var t=e.h,o=e.s,r=e.v,n=e.a,i=n===void 0?1:n;if(!ml(t)||!ml(o)||!ml(r))return null;var s=(function(a){return{h:k6(a.h),s:vi(a.s,0,100),v:vi(a.v,0,100),a:vi(a.a)}})({h:Number(t),s:Number(o),v:Number(r),a:Number(i)});return y6(s)},"hsv"]]},h6=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]},Xme=function(e){return typeof e=="string"?h6(e.trim(),mO.string):typeof e=="object"&&e!==null?h6(e,mO.object):[null,void 0]};var dO=function(e,t){var o=jk(e);return{h:o.h,s:vi(o.s+100*t,0,100),l:o.l,a:o.a}},fO=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},g6=function(e,t){var o=jk(e);return{h:o.h,s:o.s,l:vi(o.l+100*t,0,100),a:o.a}},pO=(function(){function e(t){this.parsed=Xme(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 qo(fO(this.rgba),2)},e.prototype.isDark=function(){return fO(this.rgba)<.5},e.prototype.isLight=function(){return fO(this.rgba)>=.5},e.prototype.toHex=function(){return t=uO(this.rgba),o=t.r,r=t.g,n=t.b,s=(i=t.a)<1?c0(qo(255*i)):"","#"+c0(o)+c0(r)+c0(n)+s;var t,o,r,n,i,s},e.prototype.toRgb=function(){return uO(this.rgba)},e.prototype.toRgbString=function(){return t=uO(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 m6(jk(this.rgba))},e.prototype.toHslString=function(){return t=m6(jk(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=v6(this.rgba),{h:qo(t.h),s:qo(t.s),v:qo(t.v),a:qo(t.a,3)};var t},e.prototype.invert=function(){return Bt({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),Bt(dO(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),Bt(dO(this.rgba,-t))},e.prototype.grayscale=function(){return Bt(dO(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),Bt(g6(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),Bt(g6(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"?Bt({r:(o=this.rgba).r,g:o.g,b:o.b,a:t}):qo(this.rgba.a,3);var o},e.prototype.hue=function(t){var o=jk(this.rgba);return typeof t=="number"?Bt({h:t,s:o.s,l:o.l,a:o.a}):qo(o.h)},e.prototype.isEqual=function(t){return this.toHex()===Bt(t).toHex()},e})(),Bt=function(e){return e instanceof pO?e:new pO(e)},b6=[],Kc=function(e){e.forEach(function(t){b6.indexOf(t)<0&&(t(pO,mO),b6.push(t))})};function Yc(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 hO=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},gO=function(e){return .2126*hO(e.r)+.7152*hO(e.g)+.0722*hO(e.b)};function Ap(e){e.prototype.luminance=function(){return t=gO(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=gO(i),c=gO(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 C6=l(A(),1);var x6=l(bO(),1),{lock:w6,unlock:M}=(0,x6.__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");Kc([Yc,Ap]);var{kebabCase:Qme}=M(C6.privateApis),ua=(e,t,o)=>{if(t){let r=e?.find(n=>n.slug===t);if(r)return r}return{color:o}},u0=(e,t)=>e?.find(o=>o.color===t);function yi(e,t){if(!(!e||!t))return`has-${Qme(t)}-${e}`}function B6(e,t){let o=Bt(t),r=({color:i})=>o.contrast(i),n=Math.max(...e.map(r));return e.find(i=>r(i)===n).color}var Nw=l(P(),1),Ff=l(Z(),1),oU=l(A(),1);var Qj=l(F(),1),Jj=l(Re(),1);var Aw=l(P(),1),Ow=l($(),1);var pl=l($(),1),N6=l(A(),1),Hk=l(F(),1),kf=l(P(),1);var Lp=l(P(),1),I6=l(w(),1),d0=(0,Lp.createContext)({});d0.displayName="BlockContext";function f0({value:e,children:t}){let o=(0,Lp.useContext)(d0),r=(0,Lp.useMemo)(()=>({...o,...e}),[o,e]);return(0,I6.jsx)(d0.Provider,{value:r,children:t})}var cn=d0;var Np=l(un(),1);function hf(e){return e?.startsWith("#")&&(0,Np.isValidFragment)(e)}function gf(e){return e?.startsWith("/")||e?.startsWith("./")||e?.startsWith("../")}function bf(e){if(e.includes(" "))return!1;let o=(0,Np.getProtocol)(e),r=(0,Np.isValidProtocol)(o),n=Jme(e),i=e?.startsWith("www.");return r||i||hf(e)||n||gf(e)}function Jme(e,t=6){let o=e.split(/[?#]/)[0];return new RegExp(`(?<=\\S)\\.(?:[a-zA-Z_]{2,${t}})(?:\\/|$)`).test(o)}var epe="__default",R6="core/pattern-overrides";function Uk(e){return e?.[epe]?.source===R6}function O6(e,t){if(Uk(e)){let o={};for(let r of t){let n=e[r]?e[r]:{source:R6};o[r]=n}return o}return e}var A6=l(P(),1),cr=(0,A6.createContext)({});cr.displayName="PrivateBlockContext";var m0=l(w(),1),tpe={},ope=e=>{let{name:t}=e,o=(0,pl.getBlockType)(t);if(!o)return null;let r=o.edit||o.save;return(0,m0.jsx)(r,{...e})},L6=(0,N6.withFilters)("editor.BlockEdit")(ope),rpe=e=>{let{name:t,clientId:o,attributes:r,setAttributes:n}=e,i=(0,Hk.useRegistry)(),s=(0,pl.getBlockType)(t),a=(0,kf.useContext)(cn),c=(0,Hk.useSelect)(v=>M(v(pl.store)).getAllBlockBindingsSources(),[]),{bindableAttributes:u}=(0,kf.useContext)(cr),{blockBindings:d,context:f,hasPatternOverrides:m}=(0,kf.useMemo)(()=>{let v=s?.usesContext?Object.fromEntries(Object.entries(a).filter(([k])=>s.usesContext.includes(k))):tpe;return r?.metadata?.bindings&&Object.values(r?.metadata?.bindings||{}).forEach(k=>{c[k?.source]?.usesContext?.forEach(y=>{v[y]=a[y]})}),{blockBindings:O6(r?.metadata?.bindings,u),context:v,hasPatternOverrides:Uk(r?.metadata?.bindings)}},[s?.usesContext,a,r?.metadata?.bindings,u,c]),h=(0,Hk.useSelect)(v=>{if(!d)return r;let k={},y=new Map;for(let[S,x]of Object.entries(d)){let{source:C,args:B}=x,I=c[C];!I||!u?.includes(S)||y.set(I,{...y.get(I),[S]:{args:B}})}if(y.size)for(let[S,x]of y){let C={};S.getValues?C=S.getValues({select:v,context:f,clientId:o,bindings:x}):Object.keys(x).forEach(B=>{C[B]=S.label});for(let[B,I]of Object.entries(C))B==="url"&&(!I||!bf(I))?k[B]=null:k[B]=I}return{...r,...k}},[r,u,d,o,f,c]),p=(0,kf.useCallback)(v=>{if(!d){n(v);return}i.batch(()=>{let k={...v},y=new Map;for(let[x,C]of Object.entries(k)){if(!d[x]||!u?.includes(x))continue;let B=d[x],I=c[B?.source];I?.setValues&&(y.set(I,{...y.get(I),[x]:{args:B.args,newValue:C}}),delete k[x])}if(y.size)for(let[x,C]of y)x.setValues({select:i.select,dispatch:i.dispatch,context:f,clientId:o,bindings:C});let S=!!f["pattern/overrides"];!(m&&S)&&Object.keys(k).length&&(m&&delete k.href,n(k))})},[u,d,o,f,m,n,c,i]);if(!s)return null;if(s.apiVersion>1)return(0,m0.jsx)(L6,{...e,attributes:h,context:f,setAttributes:p});let g=(0,pl.hasBlockSupport)(s,"className",!0)?(0,pl.getBlockDefaultClassName)(t):null,b=V(g,r?.className,e.className);return(0,m0.jsx)(L6,{...e,attributes:h,className:b,context:f,setAttributes:p})},M6=rpe;var qj=l($(),1),nM=l(A(),1),Zj=l(F(),1),Rw=l(N(),1);var Pw=l(F(),1);var Kk=l(vf(),1),_O=l(Z(),1),Yk=l(F(),1),j6=l(Re(),1),_0=l($(),1);var Le=l(N(),1),F6={insertUsage:{}},Gk={alignWide:!1,supportsLayout:!0,colors:[{name:(0,Le.__)("Black"),slug:"black",color:"#000000"},{name:(0,Le.__)("Cyan bluish gray"),slug:"cyan-bluish-gray",color:"#abb8c3"},{name:(0,Le.__)("White"),slug:"white",color:"#ffffff"},{name:(0,Le.__)("Pale pink"),slug:"pale-pink",color:"#f78da7"},{name:(0,Le.__)("Vivid red"),slug:"vivid-red",color:"#cf2e2e"},{name:(0,Le.__)("Luminous vivid orange"),slug:"luminous-vivid-orange",color:"#ff6900"},{name:(0,Le.__)("Luminous vivid amber"),slug:"luminous-vivid-amber",color:"#fcb900"},{name:(0,Le.__)("Light green cyan"),slug:"light-green-cyan",color:"#7bdcb5"},{name:(0,Le.__)("Vivid green cyan"),slug:"vivid-green-cyan",color:"#00d084"},{name:(0,Le.__)("Pale cyan blue"),slug:"pale-cyan-blue",color:"#8ed1fc"},{name:(0,Le.__)("Vivid cyan blue"),slug:"vivid-cyan-blue",color:"#0693e3"},{name:(0,Le.__)("Vivid purple"),slug:"vivid-purple",color:"#9b51e0"}],fontSizes:[{name:(0,Le._x)("Small","font size name"),size:13,slug:"small"},{name:(0,Le._x)("Normal","font size name"),size:16,slug:"normal"},{name:(0,Le._x)("Medium","font size name"),size:20,slug:"medium"},{name:(0,Le._x)("Large","font size name"),size:36,slug:"large"},{name:(0,Le._x)("Huge","font size name"),size:42,slug:"huge"}],imageDefaultSize:"large",imageSizes:[{slug:"thumbnail",name:(0,Le.__)("Thumbnail")},{slug:"medium",name:(0,Le.__)("Medium")},{slug:"large",name:(0,Le.__)("Large")},{slug:"full",name:(0,Le.__)("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,Le.__)("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,Le.__)("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,Le.__)("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,Le.__)("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,Le.__)("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,Le.__)("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,Le.__)("Blush light purple"),gradient:"linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)",slug:"blush-light-purple"},{name:(0,Le.__)("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,Le.__)("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,Le.__)("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,Le.__)("Electric grass"),gradient:"linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%)",slug:"electric-grass"},{name:(0,Le.__)("Midnight"),gradient:"linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%)",slug:"midnight"}],__unstableResolvedAssets:{styles:[],scripts:[]}};function p0(e,t,o){return[...e.slice(0,o),...Array.isArray(t)?t:[t],...e.slice(o)]}function h0(e,t,o,r=1){let n=[...e];return n.splice(t,r),p0(n,e.slice(t,t+r),o)}var Si=Symbol("globalStylesDataKey"),g0=Symbol("globalStylesLinks"),qc=Symbol("selectBlockPatternsKey"),b0=Symbol("reusableBlocksSelect"),Zc=Symbol("sectionRootClientIdKey"),k0=Symbol("mediaEditKey"),v0=Symbol("getMediaSelect"),Xc=Symbol("isIsolatedEditor"),_i=Symbol("deviceTypeKey"),y0=Symbol("isNavigationOverlayContext");var{isContentBlock:npe}=M(_0.privateApis),ipe=e=>e;function $k(e,t=""){let o=new Map,r=[];return o.set(t,r),e.forEach(n=>{let{clientId:i,innerBlocks:s}=n;r.push(i),$k(s,i).forEach((a,c)=>{o.set(c,a)})}),o}function S0(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 U6(e,t=ipe){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 spe(e){let t={},o=[...e];for(;o.length;){let{innerBlocks:r,...n}=o.shift();o.push(...r),t[n.clientId]=!0}return t}function kO(e){return U6(e,t=>{let{attributes:o,...r}=t;return r})}function vO(e){return U6(e,t=>t.attributes)}function ape(e,t){return(0,Kk.default)(Object.keys(e),Object.keys(t))}function lpe(e,t){return e.type==="UPDATE_BLOCK_ATTRIBUTES"&&t!==void 0&&t.type==="UPDATE_BLOCK_ATTRIBUTES"&&(0,Kk.default)(e.clientIds,t.clientIds)&&ape(e.attributes,t.attributes)}function yO(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 hl(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[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 cpe=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),yO(r,o.blocks),hl(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)}),hl(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)})}),hl(r,o.clientIds,!1);break}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{let i=spe(o.blocks);r.tree=new Map(r.tree),o.replacedClientIds.forEach(a=>{r.tree.delete(a),i[a]||r.tree.delete("controlled||"+a)}),yO(r,o.blocks),hl(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)}hl(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)}),hl(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),hl(r,i,!0);break}case"MOVE_BLOCKS_UP":case"MOVE_BLOCKS_DOWN":{let i=[o.rootClientId?o.rootClientId:""];r.tree=new Map(r.tree),hl(r,i,!0);break}case"SAVE_REUSABLE_BLOCK_SUCCESS":{let i=[];r.attributes.forEach((s,a)=>{r.byClientId.get(a).name==="core/block"&&s.ref===o.updatedId&&i.push(a)}),r.tree=new Map(r.tree),i.forEach(s=>{r.tree.set(s,{...r.byClientId.get(s),attributes:r.attributes.get(s),innerBlocks:r.tree.get(s).innerBlocks})}),hl(r,i,!1)}}return r};function upe(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:!lpe(i,t)},t=i,o=i.type==="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT",s)}}function dpe(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 fpe=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)},mpe=e=>(t,o)=>{if(o.type==="RESET_BLOCKS"){let r=t?.controlledInnerBlocks??{},n={...t,byClientId:new Map(kO(o.blocks)),attributes:new Map(vO(o.blocks)),order:$k(o.blocks),parents:new Map(S0(o.blocks)),controlledInnerBlocks:r};if(t?.order)for(let i of Object.keys(r)){if(!r[i]||!n.byClientId.has(i))continue;let s=t.order.get(i);if(!s?.length)continue;n.order.set(i,s);let a=(c,u)=>{let d=t.byClientId?.get(c);if(!d)return;n.byClientId.set(c,d),n.attributes.set(c,t.attributes?.get(c)),n.parents.set(c,u);let f=t.order?.get(c)||[];n.order.set(c,f),f.forEach(m=>a(m,c))};s.forEach(c=>a(c,i))}n.tree=new Map(t?.tree),yO(n,o.blocks);for(let i of Object.keys(r)){if(!r[i]||!n.byClientId.has(i))continue;let s=n.order.get(i);if(!s?.length)continue;let a=s.map(u=>n.tree.get(u)),c=n.tree.get(i);c&&(c.innerBlocks=a),n.tree.set("controlled||"+i,{innerBlocks:a})}return n.tree.set("",{innerBlocks:o.blocks.map(i=>n.tree.get(i.clientId))}),n}return e(t,o)},ppe=e=>(t,o)=>{if(o.type!=="REPLACE_INNER_BLOCKS")return e(t,o);let r={};if(Object.keys(t.controlledInnerBlocks).length){let s=[...o.blocks];for(;s.length;){let{innerBlocks:a,...c}=s.shift();s.push(...a),t.controlledInnerBlocks[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},hpe=e=>(t,o)=>{if(t&&o.type==="SAVE_REUSABLE_BLOCK_SUCCESS"){let{id:r,updatedId:n}=o;if(r===n)return t;t={...t},t.attributes=new Map(t.attributes),t.attributes.forEach((i,s)=>{let{name:a}=t.byClientId.get(s);a==="core/block"&&i.ref===r&&t.attributes.set(s,{...i,ref:n})})}return e(t,o)},gpe=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)},bpe=(0,_O.pipe)(Yk.combineReducers,hpe,cpe,fpe,ppe,mpe,upe,dpe,gpe)({byClientId(e=new Map,t){switch(t.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{let o=new Map(e);return kO(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)}),kO(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 vO(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)}),vO(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=$k(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=$k(t.blocks,o),{index:i=r.length}=t,s=new Map(e);return n.forEach((a,c)=>{s.set(c,a)}),s.set(o,p0(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]),u=new Map(e);return u.set(r,h0(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,p0(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,h0(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,h0(s,a,a+1,o.length)),c}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{let{clientIds:o}=t;if(!t.blocks)return e;let r=$k(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 S0(t.blocks).forEach(([r,n])=>{o.set(r,n)}),o}case"INSERT_BLOCKS":{let o=new Map(e);return S0(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)}),S0(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={},{type:t,clientId:o,hasControlledInnerBlocks:r}){return t==="SET_HAS_CONTROLLED_INNER_BLOCKS"?{...e,[o]:r}:e}});function kpe(e=!1,t){switch(t.type){case"HIDE_BLOCK_INTERFACE":return!0;case"SHOW_BLOCK_INTERFACE":return!1}return e}function vpe(e=!1,t){switch(t.type){case"START_TYPING":return!0;case"STOP_TYPING":return!1}return e}function ype(e=!1,t){switch(t.type){case"START_DRAGGING":return!0;case"STOP_DRAGGING":return!1}return e}function Spe(e=[],t){switch(t.type){case"START_DRAGGING_BLOCKS":return t.clientIds;case"STOP_DRAGGING_BLOCKS":return[]}return e}function _pe(e={},t){return t.type==="SET_BLOCK_VISIBILITY"?{...e,...t.updates}:e}function z6(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 xpe(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=z6(e.selectionStart,t),r=z6(e.selectionEnd,t);return o===e.selectionStart&&r===e.selectionEnd?e:{selectionStart:o,selectionEnd:r}}function wpe(e=!1,t){switch(t.type){case"START_MULTI_SELECT":return!0;case"STOP_MULTI_SELECT":return!1}return e}function Cpe(e=!0,t){return t.type==="TOGGLE_SELECTION"?t.isSelectionEnabled:e}function Bpe(e=null,t){switch(t.type){case"SHOW_VIEWPORT_MODAL":return t.clientIds;case"HIDE_VIEWPORT_MODAL":return null}return e}function Epe(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 Tpe(e=!1,t){return t.type==="SET_BLOCK_REMOVAL_RULES"?t.rules:e}function Ipe(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 Ppe(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 Rpe(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 Ope(e={isValid:!0},t){return t.type==="SET_TEMPLATE_VALIDITY"?{...e,isValid:t.isValid}:e}function Ape(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,j6.default)("__unstableIsPreviewMode",{since:"6.8",alternative:"isPreviewMode"}),this.isPreviewMode}}),o}return e}function Lpe(e=F6,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)(_0.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 Npe=(e={},t)=>{switch(t.type){case"REPLACE_BLOCKS":{let o=new Set,r=[...t.blocks];for(;r.length;){let n=r.shift();o.add(n.clientId),r.push(...n.innerBlocks)}return Object.fromEntries(Object.entries(e).filter(([n])=>!t.clientIds.includes(n)||o.has(n)))}case"REMOVE_BLOCKS":return Object.fromEntries(Object.entries(e).filter(([o])=>!t.clientIds.includes(o)));case"UPDATE_BLOCK_LIST_SETTINGS":{let o=typeof t.clientId=="string"?{[t.clientId]:t.settings}:t.clientId;for(let n in o)o[n]?(0,Kk.default)(e[n],o[n])&&delete o[n]:e[n]||delete o[n];if(Object.keys(o).length===0)return e;let r={...e,...o};for(let n in o)o[n]||delete r[n];return r}}return e};function Mpe(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 Dpe(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 Vpe(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 Fpe(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 zpe(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 jpe(e,t){return t.type==="EDIT_CONTENT_ONLY_SECTION"?t.clientId:e}function Upe(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}case"RESET_BLOCKS":return e.has("")?new Map().set("",e.get("")):e}return e}function Hpe(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 Gpe(e=[],t){return t.type==="REGISTER_INSERTER_MEDIA_CATEGORY"?[...e,t.category]:e}function Wpe(e=!1,t){return t.type==="LAST_FOCUS"?t.lastFocus:e}function $pe(e=100,t){switch(t.type){case"SET_ZOOM_LEVEL":return t.zoom;case"RESET_ZOOM_LEVEL":return 100}return e}function Kpe(e=null,t){switch(t.type){case"SET_INSERTION_POINT":return t.value;case"SELECT_BLOCK":return null}return e}function Ype(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}case"RESET_BLOCKS":return{allOpen:!1,panels:{}}}return e}function qpe(e=0,t){return t.type==="INCREMENT_LIST_VIEW_EXPAND_REVISION"?e+1:e}function Zpe(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 Xpe(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 Qpe=(0,Yk.combineReducers)({blocks:bpe,isDragging:ype,isTyping:vpe,isBlockInterfaceHidden:kpe,draggedBlocks:Spe,selection:xpe,isMultiSelecting:wpe,isSelectionEnabled:Cpe,initialPosition:Ipe,blocksMode:Ppe,blockListSettings:Npe,insertionPoint:Kpe,insertionCue:Rpe,template:Ope,settings:Ape,preferences:Lpe,lastBlockAttributesChange:Mpe,lastFocus:Wpe,expandedBlock:Fpe,highlightedBlock:Dpe,lastBlockInserted:zpe,editedContentOnlySection:jpe,blockVisibility:_pe,viewportModalClientIds:Bpe,blockEditingModes:Upe,styleOverrides:Hpe,removalPromptData:Epe,blockRemovalRules:Tpe,registeredInserterMediaCategories:Gpe,zoomLevel:$pe,hasBlockSpotlight:Vpe,openedListViewPanels:Ype,listViewExpandRevision:qpe,listViewContentPanelOpen:Zpe,requestedInspectorTab:Xpe});function H6(e,t){if(t===""){let n=e.blocks.tree.get(t);return n?{clientId:"",...n}:void 0}if(!e.blocks.controlledInnerBlocks[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 xO(e,t,o){let r=H6(e,t);if(r&&(o(r),!!r?.innerBlocks?.length))for(let n of r?.innerBlocks)xO(e,n.clientId,o)}function Wk(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 Jpe(e){return e?.attributes?.metadata?.bindings&&Object.keys(e?.attributes?.metadata?.bindings).length}function SO(e,t=""){let o=e?.zoomLevel<100||e?.zoomLevel==="auto-scaled",r=new Map,n=e.settings?.[Zc],i=e.blocks.order.get(n),s=Array.from(e.blockEditingModes).some(([,p])=>p==="disabled"),a=[],c=[];Object.keys(e.blocks.controlledInnerBlocks).forEach(p=>{let g=e.blocks.byClientId?.get(p);g?.name==="core/template-part"&&a.push(p),g?.name==="core/block"&&c.push(p)});let u=Object.keys(e.blockListSettings).filter(p=>e.blockListSettings[p]?.templateLock==="contentOnly"),d=e.settings?.[Xc],f=e.settings?.disableContentOnlyForUnsyncedPatterns,m=d||f?[]:Array.from(e.blocks.attributes.keys()).filter(p=>e.blocks.attributes.get(p)?.metadata?.patternName),h=[...u,...m,...d?[]:a];return xO(e,t,p=>{let{clientId:g,name:b}=p;if(!e.blockEditingModes.has(g)){if(s){let v,k=e.blocks.parents.get(g);for(;k!==void 0&&(e.blockEditingModes.has(k)&&(v=e.blockEditingModes.get(k)),!v);)k=e.blocks.parents.get(k);if(v==="disabled"){r.set(g,"disabled");return}}if(o){if(g===n){r.set(g,"contentOnly");return}if(!i?.length){r.set(g,"disabled");return}if(i.includes(g)){r.set(g,"contentOnly");return}r.set(g,"disabled");return}if(c.length){if(c.includes(g)){if(Wk(e,g,c)){r.set(g,"disabled");return}return}let v=Wk(e,g,c);if(v){if(Wk(e,v,c)){r.set(g,"disabled");return}if(Jpe(p)){r.set(g,"contentOnly");return}r.set(g,"disabled");return}}if(e.editedContentOnlySection){if(e.editedContentOnlySection===g){r.set(g,"default");return}if(Wk(e,g,[e.editedContentOnlySection])){r.set(g,"default");return}r.set(g,"disabled");return}h.length&&Wk(e,g,h)&&(npe(b)?r.set(g,"contentOnly"):r.set(g,"disabled"))}}),r}function Qc({prevState:e,nextState:t,addedBlocks:o,removedClientIds:r}){let n=e.derivedBlockEditingModes,i;return r?.forEach(s=>{xO(e,s,a=>{n.has(a.clientId)&&(i||(i=new Map(n)),i.delete(a.clientId))})}),o?.forEach(s=>{let a=SO(t,s.clientId);a.size&&(i?i=new Map([...i?.size?i:[],...a]):i=new Map([...n?.size?n:[],...a]))}),i}function ehe(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=Qc({prevState:t,nextState:r,removedClientIds:o.clientIds});if(n)return{...r,derivedBlockEditingModes:n??t.derivedBlockEditingModes};break}case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{let n=Qc({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=Qc({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[c]?.templateLock!=="contentOnly"&&r.blockListSettings[c]?.templateLock==="contentOnly",d=t.blockListSettings[c]?.templateLock==="contentOnly"&&r.blockListSettings[c]?.templateLock!=="contentOnly";u?n.push(r.blocks.tree.get(c)):d&&i.push(c)}if(!n.length&&!i.length)break;let a=Qc({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=H6(r,o.clientId);if(!n)break;let i=Qc({prevState:t,nextState:r,removedClientIds:[o.clientId],addedBlocks:[n]});if(i)return{...r,derivedBlockEditingModes:i??t.derivedBlockEditingModes};break}case"REPLACE_BLOCKS":{let n=Qc({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=Qc({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=Qc({prevState:t,nextState:r,addedBlocks:n,removedClientIds:o.clientIds});if(i)return{...r,derivedBlockEditingModes:i??t.derivedBlockEditingModes};break}case"UPDATE_SETTINGS":{if(t?.settings?.[Zc]!==r?.settings?.[Zc]||!!t?.settings?.disableContentOnlyForUnsyncedPatterns!=!!r?.settings?.disableContentOnlyForUnsyncedPatterns||!!t?.settings?.[Xc]!=!!r?.settings?.[Xc])return{...r,derivedBlockEditingModes:SO(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:SO(r)}}return r.derivedBlockEditingModes=t?.derivedBlockEditingModes??new Map,r}}function the(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 G6=(0,_O.pipe)(ehe,the)(Qpe);var XN={};Pp(XN,{__experimentalGetActiveBlockIdByBlockNames:()=>ebe,__experimentalGetAllowedBlocks:()=>Vge,__experimentalGetAllowedPatterns:()=>Uge,__experimentalGetBlockListSettingsForBlocks:()=>Kge,__experimentalGetDirectInsertBlock:()=>Fge,__experimentalGetGlobalBlocksByName:()=>qhe,__experimentalGetLastBlockAttributeChanges:()=>Zge,__experimentalGetParsedPattern:()=>zge,__experimentalGetPatternTransformItems:()=>Wge,__experimentalGetPatternsByBlockTypes:()=>Gge,__experimentalGetReusableBlockTitle:()=>Yge,__unstableGetBlockWithoutInnerBlocks:()=>$he,__unstableGetClientIdWithClientIdsTree:()=>mj,__unstableGetClientIdsTree:()=>pj,__unstableGetContentLockingParent:()=>lbe,__unstableGetSelectedBlocksWithPartialSelection:()=>bge,__unstableGetTemporarilyEditingAsBlocks:()=>cbe,__unstableGetVisibleBlocks:()=>nbe,__unstableHasActiveBlockOverlayActive:()=>Ij,__unstableIsFullySelected:()=>mge,__unstableIsLastBlockChangeIgnored:()=>qge,__unstableIsSelectionCollapsed:()=>pge,__unstableIsSelectionMergeable:()=>gge,__unstableIsWithinBlockOverlay:()=>ibe,__unstableSelectionHasUnmergeableBlock:()=>hge,areInnerBlocksControlled:()=>Ew,canEditBlock:()=>Bj,canInsertBlockType:()=>Mf,canInsertBlocks:()=>Rge,canLockBlockType:()=>Age,canMoveBlock:()=>Cj,canMoveBlocks:()=>Oge,canRemoveBlock:()=>$N,canRemoveBlocks:()=>wj,didAutomaticChange:()=>Qge,getAdjacentBlockClientId:()=>UN,getAllowedBlocks:()=>FN,getBlock:()=>xl,getBlockAttributes:()=>Bi,getBlockCount:()=>Xhe,getBlockEditingMode:()=>Ei,getBlockHierarchyRootClientId:()=>rge,getBlockIndex:()=>vj,getBlockInsertionPoint:()=>Ege,getBlockListSettings:()=>ZN,getBlockMode:()=>_ge,getBlockName:()=>dt,getBlockNamesByClientId:()=>Zhe,getBlockOrder:()=>_r,getBlockParents:()=>ys,getBlockParentsByBlockName:()=>jN,getBlockRootClientId:()=>Io,getBlockSelectionEnd:()=>Jhe,getBlockSelectionStart:()=>Qhe,getBlockTransformItems:()=>Mge,getBlocks:()=>Khe,getBlocksByClientId:()=>Bw,getBlocksByName:()=>gj,getClientIdsOfDescendants:()=>hj,getClientIdsWithDescendants:()=>Kp,getDirectInsertBlock:()=>Tj,getDraggedBlockClientIds:()=>wge,getFirstMultiSelectedBlockClientId:()=>HN,getGlobalBlockCount:()=>Yhe,getHoveredBlockClientId:()=>rbe,getInserterItems:()=>Nge,getLastMultiSelectedBlockClientId:()=>bj,getLowestCommonAncestorWithSelectedBlock:()=>nge,getMultiSelectedBlockClientIds:()=>du,getMultiSelectedBlocks:()=>lge,getMultiSelectedBlocksEndClientId:()=>fge,getMultiSelectedBlocksStartClientId:()=>dge,getNextBlockClientId:()=>sge,getPatternsByBlockTypes:()=>Hge,getPreviousBlockClientId:()=>ige,getSelectedBlock:()=>oge,getSelectedBlockClientId:()=>qp,getSelectedBlockClientIds:()=>Zp,getSelectedBlockCount:()=>ege,getSelectedBlocksInitialCaretPosition:()=>age,getSelectionEnd:()=>Pv,getSelectionStart:()=>Iv,getSettings:()=>su,getTemplate:()=>Pge,getTemplateLock:()=>da,hasBlockMovingClientId:()=>Xge,hasDraggedInnerBlock:()=>_j,hasInserterItems:()=>Dge,hasMultiSelection:()=>vge,hasSelectedBlock:()=>tge,hasSelectedInnerBlock:()=>Sj,isAncestorBeingDragged:()=>Cge,isAncestorMultiSelected:()=>uge,isBlockBeingDragged:()=>GN,isBlockHighlighted:()=>Jge,isBlockInsertionPointVisible:()=>Tge,isBlockMultiSelected:()=>kj,isBlockSelected:()=>yj,isBlockValid:()=>Whe,isBlockVisible:()=>obe,isBlockWithinSelection:()=>kge,isCaretWithinFormattedText:()=>Bge,isDraggingBlocks:()=>xj,isFirstMultiSelectedBlock:()=>cge,isGroupable:()=>abe,isLastBlockChangePersistent:()=>$ge,isMultiSelecting:()=>yge,isSelectionEnabled:()=>Sge,isTyping:()=>xge,isUngroupable:()=>sbe,isValidTemplate:()=>Ige,wasBlockJustInserted:()=>tbe});var Ee=l($(),1),uj=l(P(),1),dj=l(rt(),1);var x0=l(P(),1),xe=(0,x0.forwardRef)(({icon:e,size:t=24,...o},r)=>(0,x0.cloneElement)(e,{width:t,height:t,...o,ref:r}));var w0=l(Y(),1),wO=l(w(),1),yf=(0,wO.jsx)(w0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wO.jsx)(w0.Path,{d:"M7.5 5.5h9V4h-9v1.5Zm-3.5 7h16V11H4v1.5Zm3.5 7h9V18h-9v1.5Z"})});var C0=l(Y(),1),CO=l(w(),1),BO=(0,CO.jsx)(C0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,CO.jsx)(C0.Path,{d:"M4 12.8h16v-1.5H4v1.5zm0 7h12.4v-1.5H4v1.5zM4 4.3v1.5h16V4.3H4z"})});var B0=l(Y(),1),EO=l(w(),1),Jc=(0,EO.jsx)(B0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,EO.jsx)(B0.Path,{d:"M13 5.5H4V4h9v1.5Zm7 7H4V11h16v1.5Zm-7 7H4V18h9v1.5Z"})});var E0=l(Y(),1),TO=l(w(),1),Sf=(0,TO.jsx)(E0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,TO.jsx)(E0.Path,{d:"M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM5 9h14v6H5V9Z"})});var T0=l(Y(),1),IO=l(w(),1),eu=(0,IO.jsx)(T0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,IO.jsx)(T0.Path,{d:"M11.111 5.5H20V4h-8.889v1.5ZM4 12.5h16V11H4v1.5Zm7.111 7H20V18h-8.889v1.5Z"})});var I0=l(Y(),1),PO=l(w(),1),RO=(0,PO.jsx)(I0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,PO.jsx)(I0.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 P0=l(Y(),1),OO=l(w(),1),qk=(0,OO.jsx)(P0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,OO.jsx)(P0.Path,{d:"M20 11.2H6.8l3.7-3.7-1-1L3.9 12l5.6 5.5 1-1-3.7-3.7H20z"})});var R0=l(Y(),1),AO=l(w(),1),Zk=(0,AO.jsx)(R0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,AO.jsx)(R0.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 O0=l(Y(),1),LO=l(w(),1),NO=(0,LO.jsx)(O0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,LO.jsx)(O0.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 A0=l(Y(),1),MO=l(w(),1),DO=(0,MO.jsx)(A0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,MO.jsx)(A0.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 L0=l(Y(),1),VO=l(w(),1),Xk=(0,VO.jsx)(L0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,VO.jsx)(L0.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 N0=l(Y(),1),FO=l(w(),1),zO=(0,FO.jsx)(N0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,FO.jsx)(N0.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 M0=l(Y(),1),jO=l(w(),1),gl=(0,jO.jsx)(M0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,jO.jsx)(M0.Path,{d:"M16.5 7.5 10 13.9l-2.5-2.4-1 1 3.5 3.6 7.5-7.6z"})});var D0=l(Y(),1),UO=l(w(),1),Fn=(0,UO.jsx)(D0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,UO.jsx)(D0.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})});var V0=l(Y(),1),HO=l(w(),1),Qk=(0,HO.jsx)(V0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,HO.jsx)(V0.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"})});var F0=l(Y(),1),GO=l(w(),1),Nr=(0,GO.jsx)(F0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,GO.jsx)(F0.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})});var z0=l(Y(),1),WO=l(w(),1),tu=(0,WO.jsx)(z0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,WO.jsx)(z0.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 j0=l(Y(),1),$O=l(w(),1),Vo=(0,$O.jsx)(j0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$O.jsx)(j0.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})});var U0=l(Y(),1),KO=l(w(),1),_f=(0,KO.jsx)(U0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,KO.jsx)(U0.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})});var H0=l(Y(),1),YO=l(w(),1),xf=(0,YO.jsx)(H0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,YO.jsx)(H0.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 G0=l(Y(),1),qO=l(w(),1),ZO=(0,qO.jsx)(G0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,qO.jsx)(G0.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 W0=l(Y(),1),XO=l(w(),1),QO=(0,XO.jsx)(W0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,XO.jsx)(W0.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 $0=l(Y(),1),JO=l(w(),1),wf=(0,JO.jsx)($0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,JO.jsx)($0.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 K0=l(Y(),1),eA=l(w(),1),tA=(0,eA.jsx)(K0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,eA.jsx)(K0.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 Cf=l(Y(),1),Mp=l(w(),1),oA=(0,Mp.jsxs)(Cf.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Mp.jsx)(Cf.G,{opacity:".25",children:(0,Mp.jsx)(Cf.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,Mp.jsx)(Cf.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 Bf=l(Y(),1),Dp=l(w(),1),rA=(0,Dp.jsxs)(Bf.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Dp.jsx)(Bf.G,{opacity:".25",children:(0,Dp.jsx)(Bf.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,Dp.jsx)(Bf.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 Ef=l(Y(),1),Vp=l(w(),1),nA=(0,Vp.jsxs)(Ef.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Vp.jsx)(Ef.G,{opacity:".25",children:(0,Vp.jsx)(Ef.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,Vp.jsx)(Ef.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 Tf=l(Y(),1),Fp=l(w(),1),iA=(0,Fp.jsxs)(Tf.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Fp.jsx)(Tf.G,{opacity:".25",children:(0,Fp.jsx)(Tf.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,Fp.jsx)(Tf.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 Y0=l(Y(),1),sA=l(w(),1),aA=(0,sA.jsx)(Y0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,sA.jsx)(Y0.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 q0=l(Y(),1),lA=l(w(),1),Jk=(0,lA.jsx)(q0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,lA.jsx)(q0.Path,{d:"M8 7h2V5H8v2zm0 6h2v-2H8v2zm0 6h2v-2H8v2zm6-14v2h2V5h-2zm0 8h2v-2h-2v2zm0 6h2v-2h-2v2z"})});var Z0=l(Y(),1),cA=l(w(),1),uA=(0,cA.jsx)(Z0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,cA.jsx)(Z0.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 X0=l(Y(),1),dA=l(w(),1),If=(0,dA.jsx)(X0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,dA.jsx)(X0.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 Q0=l(Y(),1),fA=l(w(),1),mA=(0,fA.jsx)(Q0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,fA.jsx)(Q0.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 J0=l(Y(),1),pA=l(w(),1),hA=(0,pA.jsx)(J0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,pA.jsx)(J0.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 ex=l(Y(),1),gA=l(w(),1),bA=(0,gA.jsx)(ex.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,gA.jsx)(ex.Path,{d:"M12 4 4 19h16L12 4zm0 3.2 5.5 10.3H12V7.2z"})});var tx=l(Y(),1),kA=l(w(),1),vA=(0,kA.jsx)(tx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,kA.jsx)(tx.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 ox=l(Y(),1),yA=l(w(),1),SA=(0,yA.jsx)(ox.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,yA.jsx)(ox.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 rx=l(Y(),1),_A=l(w(),1),xA=(0,_A.jsx)(rx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,_A.jsx)(rx.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 nx=l(Y(),1),wA=l(w(),1),CA=(0,wA.jsx)(nx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wA.jsx)(nx.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 ix=l(Y(),1),BA=l(w(),1),EA=(0,BA.jsx)(ix.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,BA.jsx)(ix.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 sx=l(Y(),1),TA=l(w(),1),IA=(0,TA.jsx)(sx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,TA.jsx)(sx.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 ax=l(Y(),1),PA=l(w(),1),lx=(0,PA.jsx)(ax.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,PA.jsx)(ax.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 cx=l(Y(),1),RA=l(w(),1),ev=(0,RA.jsx)(cx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,RA.jsx)(cx.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 ux=l(Y(),1),OA=l(w(),1),tv=(0,OA.jsx)(ux.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,OA.jsx)(ux.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 dx=l(Y(),1),AA=l(w(),1),ov=(0,AA.jsx)(dx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,AA.jsx)(dx.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 fx=l(Y(),1),LA=l(w(),1),NA=(0,LA.jsx)(fx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,LA.jsx)(fx.Path,{d:"M17.6 7c-.6.9-1.5 1.7-2.6 2v1h2v7h2V7h-1.4zM11 11H7V7H5v10h2v-4h4v4h2V7h-2v4z"})});var mx=l(Y(),1),MA=l(w(),1),DA=(0,MA.jsx)(mx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,MA.jsx)(mx.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 px=l(Y(),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:"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 hx=l(Y(),1),zA=l(w(),1),jA=(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 13V7h-3l-4 6v2h5v2h2v-2h1v-2h-1zm-2 0h-2.8L18 9v4zm-9-2H5V7H3v10h2v-4h4v4h2V7H9v4z"})});var gx=l(Y(),1),UA=l(w(),1),HA=(0,UA.jsx)(gx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,UA.jsx)(gx.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 bx=l(Y(),1),GA=l(w(),1),WA=(0,GA.jsx)(bx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,GA.jsx)(bx.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 kx=l(Y(),1),$A=l(w(),1),KA=(0,$A.jsx)(kx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$A.jsx)(kx.Path,{d:"M12 4L4 7.9V20h16V7.9L12 4zm6.5 14.5H14V13h-4v5.5H5.5V8.8L12 5.7l6.5 3.1v9.7z"})});var vx=l(Y(),1),YA=l(w(),1),rv=(0,YA.jsx)(vx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,YA.jsx)(vx.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 yx=l(Y(),1),qA=l(w(),1),ZA=(0,qA.jsx)(yx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,qA.jsx)(yx.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 Sx=l(Y(),1),XA=l(w(),1),QA=(0,XA.jsx)(Sx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,XA.jsx)(Sx.Path,{d:"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"})});var _x=l(Y(),1),JA=l(w(),1),eL=(0,JA.jsx)(_x.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,JA.jsx)(_x.Path,{d:"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"})});var xx=l(Y(),1),tL=l(w(),1),ou=(0,tL.jsx)(xx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,tL.jsx)(xx.Path,{d:"M12.5 15v5H11v-5H4V9h7V4h1.5v5h7v6h-7Z"})});var wx=l(Y(),1),oL=l(w(),1),ru=(0,oL.jsx)(wx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,oL.jsx)(wx.Path,{d:"M9 9v6h11V9H9zM4 20h1.5V4H4v16z"})});var Cx=l(Y(),1),rL=l(w(),1),nu=(0,rL.jsx)(Cx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,rL.jsx)(Cx.Path,{d:"M4 15h11V9H4v6zM18.5 4v16H20V4h-1.5z"})});var Bx=l(Y(),1),nL=l(w(),1),iL=(0,nL.jsx)(Bx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,nL.jsx)(Bx.Path,{d:"M7 4H17V8L7 8V4ZM7 16L17 16V20L7 20V16ZM20 11.25H4V12.75H20V11.25Z"})});var Ex=l(Y(),1),sL=l(w(),1),zp=(0,sL.jsx)(Ex.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,sL.jsx)(Ex.Path,{d:"M9 15h6V9H9v6zm-5 5h1.5V4H4v16zM18.5 4v16H20V4h-1.5z"})});var Tx=l(Y(),1),aL=l(w(),1),lL=(0,aL.jsx)(Tx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,aL.jsx)(Tx.Path,{d:"M4 4L20 4L20 5.5L4 5.5L4 4ZM10 7L14 7L14 17L10 17L10 7ZM20 18.5L4 18.5L4 20L20 20L20 18.5Z"})});var Ix=l(Y(),1),cL=l(w(),1),jp=(0,cL.jsx)(Ix.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,cL.jsx)(Ix.Path,{d:"M4 4H5.5V20H4V4ZM7 10L17 10V14L7 14V10ZM20 4H18.5V20H20V4Z"})});var Px=l(Y(),1),uL=l(w(),1),dL=(0,uL.jsx)(Px.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,uL.jsx)(Px.Path,{d:"M9 20h6V9H9v11zM4 4v1.5h16V4H4z"})});var Rx=l(Y(),1),fL=l(w(),1),bl=(0,fL.jsx)(Rx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,fL.jsx)(Rx.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 Ox=l(Y(),1),mL=l(w(),1),pL=(0,mL.jsx)(Ox.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,mL.jsx)(Ox.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 Ax=l(Y(),1),hL=l(w(),1),xi=(0,hL.jsx)(Ax.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,hL.jsx)(Ax.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 Lx=l(Y(),1),gL=l(w(),1),dn=(0,gL.jsx)(Lx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,gL.jsx)(Lx.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 Nx=l(Y(),1),bL=l(w(),1),nv=(0,bL.jsx)(Nx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,bL.jsx)(Nx.Path,{d:"M3 6h11v1.5H3V6Zm3.5 5.5h11V13h-11v-1.5ZM21 17H10v1.5h11V17Z"})});var Mx=l(Y(),1),kL=l(w(),1),vL=(0,kL.jsx)(Mx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,kL.jsx)(Mx.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 Dx=l(Y(),1),yL=l(w(),1),SL=(0,yL.jsx)(Dx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,yL.jsx)(Dx.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 Vx=l(Y(),1),_L=l(w(),1),Pf=(0,_L.jsx)(Vx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,_L.jsx)(Vx.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 iv=l(Y(),1),sv=l(w(),1),Up=(0,sv.jsxs)(iv.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,sv.jsx)(iv.Path,{d:"m7 6.5 4 2.5-4 2.5z"}),(0,sv.jsx)(iv.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 Fx=l(Y(),1),xL=l(w(),1),av=(0,xL.jsx)(Fx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,xL.jsx)(Fx.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 zx=l(Y(),1),wL=l(w(),1),ks=(0,wL.jsx)(zx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wL.jsx)(zx.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})});var lv=l(Y(),1),cv=l(w(),1),kl=(0,cv.jsxs)(lv.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,cv.jsx)(lv.Path,{d:"M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z"}),(0,cv.jsx)(lv.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 jx=l(Y(),1),CL=l(w(),1),BL=(0,CL.jsx)(jx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,CL.jsx)(jx.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 Ux=l(Y(),1),EL=l(w(),1),Rf=(0,EL.jsx)(Ux.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,EL.jsx)(Ux.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})});var Hx=l(Y(),1),TL=l(w(),1),IL=(0,TL.jsx)(Hx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,TL.jsx)(Hx.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 Gx=l(Y(),1),PL=l(w(),1),wi=(0,PL.jsx)(Gx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,PL.jsx)(Gx.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})});var Wx=l(Y(),1),RL=l(w(),1),OL=(0,RL.jsx)(Wx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,RL.jsx)(Wx.Path,{d:"M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM7 9h10v6H7V9Z"})});var $x=l(Y(),1),AL=l(w(),1),LL=(0,AL.jsx)($x.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,AL.jsx)($x.Path,{d:"M5 5.5h8V4H5v1.5ZM5 20h8v-1.5H5V20ZM19 9H5v6h14V9Z"})});var Kx=l(Y(),1),NL=l(w(),1),ML=(0,NL.jsx)(Kx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,NL.jsx)(Kx.Path,{d:"M19 5.5h-8V4h8v1.5ZM19 20h-8v-1.5h8V20ZM5 9h14v6H5V9Z"})});var Yx=l(Y(),1),DL=l(w(),1),VL=(0,DL.jsx)(Yx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,DL.jsx)(Yx.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 qx=l(Y(),1),FL=l(w(),1),zL=(0,FL.jsx)(qx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,FL.jsx)(qx.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 Zx=l(Y(),1),jL=l(w(),1),UL=(0,jL.jsx)(Zx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,jL.jsx)(Zx.Path,{d:"m7.3 9.7 1.4 1.4c.2-.2.3-.3.4-.5 0 0 0-.1.1-.1.3-.5.4-1.1.3-1.6L12 7 9 4 7.2 6.5c-.6-.1-1.1 0-1.6.3 0 0-.1 0-.1.1-.3.1-.4.2-.6.4l1.4 1.4L4 11v1h1l2.3-2.3zM4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4z"})});var Xx=l(Y(),1),HL=l(w(),1),Mr=(0,HL.jsx)(Xx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,HL.jsx)(Xx.Path,{d:"M7 11.5h10V13H7z"})});var Qx=l(Y(),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:"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 Jx=l(Y(),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:"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 ew=l(Y(),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:"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 tw=l(Y(),1),ZL=l(w(),1),Of=(0,ZL.jsx)(tw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ZL.jsx)(tw.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 uv=l(Y(),1),dv=l(w(),1),XL=(0,dv.jsxs)(uv.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,dv.jsx)(uv.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,dv.jsx)(uv.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 ow=l(Y(),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:"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 rw=l(Y(),1),eN=l(w(),1),nw=(0,eN.jsx)(rw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,eN.jsx)(rw.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z"})});var fv=l(Y(),1),mv=l(w(),1),tN=(0,mv.jsxs)(fv.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,mv.jsx)(fv.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,mv.jsx)(fv.Path,{d:"m16.5 19.5h-9v-1.5h9z"})]});var Hp=l(Y(),1),Gp=l(w(),1),oN=(0,Gp.jsxs)(Hp.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Gp.jsx)(Hp.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,Gp.jsx)(Hp.Path,{d:"m4.5 7.5v9h1.5v-9z"}),(0,Gp.jsx)(Hp.Path,{d:"m18 7.5v9h1.5v-9z"})]});var pv=l(Y(),1),hv=l(w(),1),rN=(0,hv.jsxs)(pv.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,hv.jsx)(pv.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,hv.jsx)(pv.Path,{d:"m4.5 16.5v-9h1.5v9z"})]});var gv=l(Y(),1),bv=l(w(),1),nN=(0,bv.jsxs)(gv.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,bv.jsx)(gv.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,bv.jsx)(gv.Path,{d:"m18 16.5v-9h1.5v9z"})]});var kv=l(Y(),1),vv=l(w(),1),iN=(0,vv.jsxs)(kv.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,vv.jsx)(kv.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,vv.jsx)(kv.Path,{d:"m16.5 6h-9v-1.5h9z"})]});var Wp=l(Y(),1),$p=l(w(),1),sN=(0,$p.jsxs)(Wp.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,$p.jsx)(Wp.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,$p.jsx)(Wp.Path,{d:"m7.5 6h9v-1.5h-9z"}),(0,$p.jsx)(Wp.Path,{d:"m7.5 19.5h9v-1.5h-9z"})]});var iw=l(Y(),1),aN=l(w(),1),lN=(0,aN.jsx)(iw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,aN.jsx)(iw.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 sw=l(Y(),1),cN=l(w(),1),yv=(0,cN.jsx)(sw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,cN.jsx)(sw.Path,{d:"M5 4h14v11H5V4Zm11 16H8v-1.5h8V20Z"})});var aw=l(Y(),1),uN=l(w(),1),Af=(0,uN.jsx)(aw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,uN.jsx)(aw.Path,{d:"M16 5.5H8V4h8v1.5ZM16 20H8v-1.5h8V20ZM5 9h14v6H5V9Z"})});var lw=l(Y(),1),dN=l(w(),1),fN=(0,dN.jsx)(lw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,dN.jsx)(lw.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 cw=l(Y(),1),mN=l(w(),1),Ci=(0,mN.jsx)(cw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,mN.jsx)(cw.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 uw=l(Y(),1),pN=l(w(),1),hN=(0,pN.jsx)(uw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,pN.jsx)(uw.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 dw=l(Y(),1),gN=l(w(),1),bN=(0,gN.jsx)(dw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,gN.jsx)(dw.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 fw=l(Y(),1),kN=l(w(),1),vN=(0,kN.jsx)(fw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,kN.jsx)(fw.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 mw=l(Y(),1),yN=l(w(),1),SN=(0,yN.jsx)(mw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,yN.jsx)(mw.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 pw=l(Y(),1),_N=l(w(),1),xN=(0,_N.jsx)(pw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,_N.jsx)(pw.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 hw=l(Y(),1),wN=l(w(),1),CN=(0,wN.jsx)(hw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wN.jsx)(hw.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 gw=l(Y(),1),BN=l(w(),1),vl=(0,BN.jsx)(gw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,BN.jsx)(gw.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 bw=l(Y(),1),EN=l(w(),1),vs=(0,EN.jsx)(bw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,EN.jsx)(bw.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 kw=l(Y(),1),TN=l(w(),1),IN=(0,TN.jsx)(kw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,TN.jsx)(kw.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 vw=l(Y(),1),PN=l(w(),1),RN=(0,PN.jsx)(vw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,PN.jsx)(vw.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 yw=l(Y(),1),ON=l(w(),1),AN=(0,ON.jsx)(yw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ON.jsx)(yw.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 _l=l(ur(),1),zn=l(Re(),1),Te=l(F(),1);var aj=l($(),1),lj=l(Y6(),1);var Wt="core/block-editor";var xw={};Pp(xw,{getAllPatterns:()=>vhe,getBlockRemovalRules:()=>mhe,getBlockSettings:()=>Z6,getBlockStyles:()=>Che,getBlockWithoutAttributes:()=>lhe,getClosestAllowedInsertionPoint:()=>ej,getClosestAllowedInsertionPointForPattern:()=>Ehe,getContentLockingParent:()=>LN,getEditedContentOnlySection:()=>NN,getEnabledBlockParents:()=>dhe,getEnabledClientIdsTree:()=>uhe,getExpandedBlock:()=>whe,getInserterMediaCategories:()=>ghe,getInsertionPoint:()=>The,getLastFocus:()=>_he,getLastInsertedBlocksClientIds:()=>ahe,getListViewExpandRevision:()=>Mhe,getParentSectionBlock:()=>au,getPatternBySlug:()=>khe,getRegisteredInserterMediaCategories:()=>hhe,getRemovalPromptData:()=>fhe,getRequestedInspectorTab:()=>Vhe,getReusableBlocks:()=>She,getSectionRootClientId:()=>Nf,getStyleOverrides:()=>phe,getViewportModalClientIds:()=>Dhe,getZoomLevel:()=>Bhe,hasAllowedPatterns:()=>bhe,hasBlockSpotlight:()=>Ohe,isBlockHiddenAnywhere:()=>Ihe,isBlockHiddenAtViewport:()=>tj,isBlockHiddenEverywhere:()=>VN,isBlockInterfaceHidden:()=>she,isBlockParentHiddenAtViewport:()=>Rhe,isBlockParentHiddenEverywhere:()=>Phe,isBlockSubtreeDisabled:()=>che,isContainerInsertableToInContentOnlyMode:()=>_v,isDragging:()=>xhe,isEditLockedBlock:()=>oj,isListViewContentPanelOpen:()=>Lhe,isListViewPanelOpened:()=>Nhe,isLockedBlock:()=>Ahe,isMoveLockedBlock:()=>rj,isRemoveLockedBlock:()=>nj,isSectionBlock:()=>lu,isWithinEditedContentOnlySection:()=>MN,isZoomOut:()=>DN});var Dr=l(F(),1),Sv=l($(),1);var Sw=l(N(),1);var Et={desktop:{label:(0,Sw.__)("Desktop"),icon:aA,key:"desktop"},tablet:{label:(0,Sw.__)("Tablet"),icon:hN,key:"tablet"},mobile:{label:(0,Sw.__)("Mobile"),icon:av,key:"mobile"}},iu=Object.entries(Et);var _w=l($(),1),q6=l(rt(),1);function pe(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 yl=(e,t,o)=>{let r=Array.isArray(t)?t:t.split("."),n=e;return r.forEach(i=>{n=n?.[i]}),n??o};var ohe=["color","border","dimensions","typography","spacing"],rhe={"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},nhe={"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"},ihe=e=>nhe[e]||e;function Z6(e,t,...o){let r=dt(e,t),n=[];if(t){let i=t;do{let s=dt(e,i);(0,_w.hasBlockSupport)(s,"__experimentalSettings",!1)&&n.push(i)}while(i=e.blocks.parents.get(i))}return o.map(i=>{if(ohe.includes(i)){console.warn("Top level useSetting paths are disabled. Please use a subpath to query the information needed.");return}let s=(0,q6.applyFilters)("blockEditor.useSetting.before",void 0,i,t,r);if(s!==void 0)return s;let a=ihe(i);for(let d of n){let f=Bi(e,d);if(s=yl(f.settings?.blocks?.[r],a)??yl(f.settings,a),s!==void 0)break}let c=su(e);if(s===void 0&&r&&(s=yl(c.__experimentalFeatures?.blocks?.[r],a)),s===void 0&&(s=yl(c.__experimentalFeatures,a)),s!==void 0)return _w.__EXPERIMENTAL_PATHS_WITH_OVERRIDE[a]?s.custom??s.theme??s.default:s;let u=rhe[a]?.(c);return u!==void 0?u:a==="typography.dropCap"?!0:void 0})}var{isContentBlock:X6}=M(Sv.privateApis);function she(e){return e.isBlockInterfaceHidden}function ahe(e){return e?.lastBlockInserted?.clientIds}function lhe(e,t){return e.blocks.byClientId.get(t)}var che=(e,t)=>{let o=r=>Ei(e,r)==="disabled"&&_r(e,r).every(o);return _r(e,t).every(o)};function _v(e,t,o){let r=X6(t),n=dt(e,o),i=X6(n);return Nf(e)===o||i&&r}function Q6(e,t){let o=_r(e,t),r=[];for(let n of o){let i=Q6(e,n);Ei(e,n)!=="disabled"?r.push({clientId:n,innerBlocks:i}):r.push(...i)}return r}var uhe=(0,Dr.createRegistrySelector)(()=>(0,Dr.createSelector)(Q6,e=>[e.blocks.order,e.derivedBlockEditingModes,e.blockEditingModes])),dhe=(0,Dr.createSelector)((e,t,o=!1)=>ys(e,t,o).filter(r=>Ei(e,r)!=="disabled"),e=>[e.blocks.parents,e.blockEditingModes,e.settings.templateLock,e.blockListSettings]);function fhe(e){return e.removalPromptData}function mhe(e){return e.blockRemovalRules}var phe=(0,Dr.createSelector)(e=>{let o=Kp(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 hhe(e){return e.registeredInserterMediaCategories}var ghe=(0,Dr.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]),bhe=(0,Dr.createRegistrySelector)(e=>(0,Dr.createSelector)((t,o=null)=>{let{getAllPatterns:r}=M(e(Wt)),n=r(),{allowedBlockTypes:i}=su(t);return n.some(s=>{let{inserter:a=!0}=s;if(!a)return!1;let c=Lf(s);return wv(c,i)&&c.every(({name:u})=>Mf(t,u,o))})},(t,o)=>[...Cv(e)(t),...cu(e)(t,o)])),khe=(0,Dr.createRegistrySelector)(e=>(0,Dr.createSelector)((t,o)=>{if(o?.startsWith("core/block/")){let r=parseInt(o.slice(11),10),n=M(e(Wt)).getReusableBlocks().find(({id:i})=>i===r);return n?xv(n,t.settings.__experimentalUserPatternCategories):null}return[...t.settings.__experimentalBlockPatterns??[],...t.settings[qc]?.(e)??[]].find(({name:r})=>r===o)},(t,o)=>o?.startsWith("core/block/")?[M(e(Wt)).getReusableBlocks(),t.settings.__experimentalReusableBlocks]:[t.settings.__experimentalBlockPatterns,t.settings[qc]?.(e)])),vhe=(0,Dr.createRegistrySelector)(e=>(0,Dr.createSelector)(t=>[...M(e(Wt)).getReusableBlocks().map(o=>xv(o,t.settings.__experimentalUserPatternCategories)),...t.settings.__experimentalBlockPatterns??[],...t.settings[qc]?.(e)??[]].filter((o,r,n)=>r===n.findIndex(i=>o.name===i.name)),Cv(e))),yhe=[],She=(0,Dr.createRegistrySelector)(e=>t=>{let o=t.settings[b0];return(o?o(e):t.settings.__experimentalReusableBlocks)??yhe});function _he(e){return e.lastFocus}function xhe(e){return e.isDragging}function whe(e){return e.expandedBlock}var LN=(e,t)=>{let o=t,r;for(;!r&&(o=e.blocks.parents.get(o));)da(e,o)==="contentOnly"&&(r=o);return r};function J6(e,t){let o=dt(e,t);if(o==="core/block")return!0;let r=Bi(e,t),n=o==="core/template-part",i=e.settings?.[Xc];if((!e.settings?.disableContentOnlyForUnsyncedPatterns&&r?.metadata?.patternName||n)&&!i)return!0;let a=da(e,t)==="contentOnly",c=Io(e,t),u=da(e,c)==="contentOnly";return!!(a&&!u)}var au=(e,t)=>{if(MN(e,t))return;let o=t,r;for(;o=e.blocks.parents.get(o);)J6(e,o)&&(r=o);return r};function lu(e,t){return MN(e,t)||au(e,t)?!1:J6(e,t)}function NN(e){return e.editedContentOnlySection}function MN(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 Che=(0,Dr.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 Nf(e){return e.settings?.[Zc]}function DN(e){return e.zoomLevel==="auto-scaled"||e.zoomLevel<100}function Bhe(e){return e.zoomLevel}function ej(e,t,o=""){let r=Array.isArray(t)?t:[t],n=s=>r.every(a=>Mf(e,a,s));if(!o){if(n(o))return o;let s=Nf(e);return s&&n(s)?s:null}let i=o;for(;i!==null&&!n(i);)i=Io(e,i);return i}function Ehe(e,t,o){let{allowedBlockTypes:r}=su(e);if(!wv(Lf(t),r))return null;let i=Lf(t).map(({blockName:s})=>s);return ej(e,i,o)}function The(e){return e.insertionPoint}var Ihe=(e,t)=>{let o=dt(e,t);if(!(0,Sv.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(Et).some(i=>n?.viewport?.[i.key]===!1):!1},VN=(e,t)=>{let o=dt(e,t);return(0,Sv.hasBlockSupport)(o,"visibility",!0)?e.blocks.attributes.get(t)?.metadata?.blockVisibility===!1:!1},Phe=(e,t)=>ys(e,t).some(r=>VN(e,r)),tj=(e,t,o)=>{if(VN(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},Rhe=(e,t,o)=>ys(e,t).some(n=>tj(e,n,o));function Ohe(e){return!!e.hasBlockSpotlight||!!e.editedContentOnlySection}function oj(e,t){return!!Bi(e,t)?.lock?.edit}function rj(e,t){let o=Bi(e,t);if(o?.lock?.move!==void 0)return!!o?.lock?.move;let r=Io(e,t);return da(e,r)==="all"}function nj(e,t){let o=Bi(e,t);if(o?.lock?.remove!==void 0)return!!o?.lock?.remove;let r=Io(e,t),n=da(e,r);return n==="all"||n==="insert"}function Ahe(e,t){return oj(e,t)||rj(e,t)||nj(e,t)}function Lhe(e){return e.listViewContentPanelOpen}function Nhe(e,t){return e.openedListViewPanels?.allOpen?!0:e.openedListViewPanels?.panels?.[t]===!0}function Mhe(e){return e.listViewExpandRevision||0}function Dhe(e){return e.viewportModalClientIds}function Vhe(e){return e.requestedInspectorTab}var Ev=l(N(),1),Nt={user:"user",theme:"theme",directory:"directory"},Bv={full:"fully",unsynced:"unsynced"},Df={name:"allPatterns",label:(0,Ev._x)("All","patterns")},Sl={name:"myPatterns",label:(0,Ev.__)("My patterns")},Yp={name:"core/starter-content",label:(0,Ev.__)("Starter content")};function ww(e,t,o){let r=e.name.startsWith("core/block"),n=e.source==="core"||e.source?.startsWith("pattern-directory");return!!(t===Nt.theme&&(r||n)||t===Nt.directory&&(r||!n)||t===Nt.user&&e.type!==Nt.user||o===Bv.full&&e.syncStatus!==""||o===Bv.unsynced&&e.syncStatus!=="unsynced"&&r)}var uu=Symbol("isFiltered"),ij=new WeakMap,sj=new WeakMap;function xv(e,t=[]){return{name:`core/block/${e.id}`,id:e.id,type:Nt.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 Fhe(e){let t=(0,aj.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 Cw(e){let t=ij.get(e);return t||(t=Fhe(e),ij.set(e,t)),t}function Lf(e){let t=sj.get(e);return t||(t=(0,lj.parse)(e.content),t=t.filter(o=>o.blockName!==null),sj.set(e,t)),t}var Vf=(e,t,o=null)=>typeof e=="boolean"?e:Array.isArray(e)?e.includes("core/post-content")&&t===null?!0:e.includes(t):o,wv=(e,t)=>{if(typeof t=="boolean")return t;let o=[...e];for(;o.length>0;){let r=o.shift();if(!Vf(t,r.name||r.blockName,!0))return!1;r.innerBlocks?.forEach(i=>{o.push(i)})}return!0},Cv=e=>t=>[t.settings.__experimentalBlockPatterns,t.settings.__experimentalUserPatternCategories,t.settings.__experimentalReusableBlocks,t.settings[qc]?.(e),t.blockPatterns,M(e(Wt)).getReusableBlocks()],cu=()=>(e,t)=>[e.blockListSettings[t],e.blocks.byClientId.get(t),e.blocks.order.get(t||""),e.settings.allowedBlockTypes,e.settings.templateLock,Ei(e,t),Nf(e),lu(e,t),au(e,t)];var zhe=(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 fa(e,t,o="asc"){return e.concat().sort(zhe(t,e,o))}var{isContentBlock:zN}=M(Ee.privateApis),jhe=3600*1e3,Uhe=24*3600*1e3,Hhe=168*3600*1e3,dr=[],Ghe=new Set,fj={[uu]:!0};function dt(e,t){let o=e.blocks.byClientId.get(t),r="core/social-link";if(uj.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 Whe(e,t){let o=e.blocks.byClientId.get(t);return!!o&&o.isValid}function Bi(e,t){return e.blocks.byClientId.get(t)?e.blocks.attributes.get(t):null}function xl(e,t){return e.blocks.byClientId.has(t)?e.blocks.tree.get(t):null}var $he=(0,Te.createSelector)((e,t)=>{let o=e.blocks.byClientId.get(t);return o?{...o,attributes:Bi(e,t)}:null},(e,t)=>[e.blocks.byClientId.get(t),e.blocks.attributes.get(t)]);function Khe(e,t){let o=!t||!Ew(e,t)?t||"":"controlled||"+t;return e.blocks.tree.get(o)?.innerBlocks||dr}var mj=(0,Te.createSelector)((e,t)=>((0,zn.default)("wp.data.select( 'core/block-editor' ).__unstableGetClientIdWithClientIdsTree",{since:"6.3",version:"6.5"}),{clientId:t,innerBlocks:pj(e,t)}),e=>[e.blocks.order]),pj=(0,Te.createSelector)((e,t="")=>((0,zn.default)("wp.data.select( 'core/block-editor' ).__unstableGetClientIdsTree",{since:"6.3",version:"6.5"}),_r(e,t).map(o=>mj(e,o))),e=>[e.blocks.order]),hj=(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]),Kp=e=>hj(e,""),Yhe=(0,Te.createSelector)((e,t)=>{let o=Kp(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]),gj=(0,Te.createSelector)((e,t)=>{if(!t)return dr;let o=Array.isArray(t)?t:[t],n=Kp(e).filter(i=>{let s=e.blocks.byClientId.get(i);return o.includes(s.name)});return n.length>0?n:dr},e=>[e.blocks.order,e.blocks.byClientId]);function qhe(e,t){return(0,zn.default)("wp.data.select( 'core/block-editor' ).__experimentalGetGlobalBlocksByName",{since:"6.5",alternative:"wp.data.select( 'core/block-editor' ).getBlocksByName"}),gj(e,t)}var Bw=(0,Te.createSelector)((e,t)=>(Array.isArray(t)?t:[t]).map(o=>xl(e,o)),(e,t)=>(Array.isArray(t)?t:[t]).map(o=>e.blocks.tree.get(o))),Zhe=(0,Te.createSelector)((e,t)=>Bw(e,t).filter(Boolean).map(o=>o.name),(e,t)=>Bw(e,t));function Xhe(e,t){return _r(e,t).length}function Iv(e){return e.selection.selectionStart}function Pv(e){return e.selection.selectionEnd}function Qhe(e){return e.selection.selectionStart.clientId}function Jhe(e){return e.selection.selectionEnd.clientId}function ege(e){let t=du(e).length;return t||(e.selection.selectionStart.clientId?1:0)}function tge(e){let{selectionStart:t,selectionEnd:o}=e.selection;return!!t.clientId&&t.clientId===o.clientId}function qp(e){let{selectionStart:t,selectionEnd:o}=e.selection,{clientId:r}=t;return!r||r!==o.clientId?null:r}function oge(e){let t=qp(e);return t?xl(e,t):null}function Io(e,t){return e.blocks.parents.get(t)??null}var ys=(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():dr},e=>[e.blocks.parents]),jN=(0,Te.createSelector)((e,t,o,r=!1)=>{let n=ys(e,t,r),i=Array.isArray(o)?s=>o.includes(s):s=>o===s;return n.filter(s=>i(dt(e,s)))},e=>[e.blocks.parents]);function rge(e,t){let o=t,r;do r=o,o=e.blocks.parents.get(o);while(o);return r}function nge(e,t){let o=qp(e),r=[...ys(e,t),t],n=[...ys(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 UN(e,t,o=1){if(t===void 0&&(t=qp(e)),t===void 0&&(o<0?t=HN(e):t=bj(e)),!t)return null;let r=Io(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 ige(e,t){return UN(e,t,-1)}function sge(e,t){return UN(e,t,1)}function age(e){return e.initialPosition}var Zp=(0,Te.createSelector)(e=>{let{selectionStart:t,selectionEnd:o}=e.selection;if(!t.clientId||!o.clientId)return dr;if(t.clientId===o.clientId)return[t.clientId];let r=Io(e,t.clientId);if(r===null)return dr;let n=_r(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 du(e){let{selectionStart:t,selectionEnd:o}=e.selection;return t.clientId===o.clientId?dr:Zp(e)}var lge=(0,Te.createSelector)(e=>{let t=du(e);return t.length?t.map(o=>xl(e,o)):dr},e=>[...Zp.getDependants(e),e.blocks.byClientId,e.blocks.order,e.blocks.attributes]);function HN(e){return du(e)[0]||null}function bj(e){let t=du(e);return t[t.length-1]||null}function cge(e,t){return HN(e)===t}function kj(e,t){return du(e).indexOf(t)!==-1}var uge=(0,Te.createSelector)((e,t)=>{let o=t,r=!1;for(;o&&!r;)o=Io(e,o),r=kj(e,o);return r},e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]);function dge(e){let{selectionStart:t,selectionEnd:o}=e.selection;return t.clientId===o.clientId?null:t.clientId||null}function fge(e){let{selectionStart:t,selectionEnd:o}=e.selection;return t.clientId===o.clientId?null:o.clientId||null}function mge(e){let t=Iv(e),o=Pv(e);return!t.attributeKey&&!o.attributeKey&&typeof t.offset>"u"&&typeof o.offset>"u"}function pge(e){let t=Iv(e),o=Pv(e);return!!t&&!!o&&t.clientId===o.clientId&&t.attributeKey===o.attributeKey&&t.offset===o.offset}function hge(e){return Zp(e).some(t=>{let o=dt(e,t);return!(0,Ee.getBlockType)(o).merge})}function gge(e,t){let o=Iv(e),r=Pv(e);if(o.clientId===r.clientId||!o.attributeKey||!r.attributeKey||typeof o.offset>"u"||typeof r.offset>"u")return!1;let n=Io(e,o.clientId),i=Io(e,r.clientId);if(n!==i)return!1;let s=_r(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=dt(e,f);if(!(0,Ee.getBlockType)(h).merge)return!1;let g=xl(e,m);if(g.name===h)return!0;let b=(0,Ee.switchToBlockType)(g,h);return b&&b.length}var bge=e=>{let t=Iv(e),o=Pv(e);if(t.clientId===o.clientId||!t.attributeKey||!o.attributeKey||typeof t.offset>"u"||typeof o.offset>"u")return dr;let r=Io(e,t.clientId),n=Io(e,o.clientId);if(r!==n)return dr;let i=_r(e,r),s=i.indexOf(t.clientId),a=i.indexOf(o.clientId),[c,u]=s>a?[o,t]:[t,o],d=xl(e,c.clientId),f=xl(e,u.clientId),m=d.attributes[c.attributeKey],h=f.attributes[u.attributeKey],p=(0,_l.create)({html:m}),g=(0,_l.create)({html:h});return p=(0,_l.remove)(p,0,c.offset),g=(0,_l.remove)(g,u.offset,g.text.length),[{...d,attributes:{...d.attributes,[c.attributeKey]:(0,_l.toHTMLString)({value:p})}},{...f,attributes:{...f.attributes,[u.attributeKey]:(0,_l.toHTMLString)({value:g})}}]};function _r(e,t){return e.blocks.order.get(t||"")||dr}function vj(e,t){let o=Io(e,t);return _r(e,o).indexOf(t)}function yj(e,t){let{selectionStart:o,selectionEnd:r}=e.selection;return o.clientId!==r.clientId?!1:o.clientId===t}function Sj(e,t,o=!1){let r=Zp(e);return r.length?o?r.some(n=>ys(e,n,!0).includes(t)):r.some(n=>Io(e,n)===t):!1}function _j(e,t,o=!1){return _r(e,t).some(r=>GN(e,r)||o&&_j(e,r,o))}function kge(e,t){if(!t)return!1;let o=du(e),r=o.indexOf(t);return r>-1&&r<o.length-1}function vge(e){let{selectionStart:t,selectionEnd:o}=e.selection;return t.clientId!==o.clientId}function yge(e){return e.isMultiSelecting}function Sge(e){return e.isSelectionEnabled}function _ge(e,t){return e.blocksMode[t]||"visual"}function xge(e){return e.isTyping}function xj(e){return!!e.draggedBlocks.length}function wge(e){return e.draggedBlocks}function GN(e,t){return e.draggedBlocks.includes(t)}function Cge(e,t){return xj(e)?ys(e,t).some(r=>GN(e,r)):!1}function Bge(){return(0,zn.default)('wp.data.select( "core/block-editor" ).isCaretWithinFormattedText',{since:"6.1",version:"6.3"}),!1}var Ege=(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=Io(e,i)||void 0,o=vj(e,n.clientId)+1):o=_r(e).length,{rootClientId:t,index:o}},e=>[e.insertionCue,e.selection.selectionEnd.clientId,e.blocks.parents,e.blocks.order]);function Tge(e){return e.insertionCue!==null}function Ige(e){return e.template.isValid}function Pge(e){return e.settings.template}function da(e,t){if(!t)return e.settings.templateLock??!1;let o=ZN(e,t)?.templateLock;return o==="contentOnly"&&e.editedContentOnlySection===t?!1:o??!1}var WN=(e,t,o=null)=>{let r,n;if(t&&typeof t=="object"?(r=t,n=t.name):(r=(0,Ee.getBlockType)(t),n=t),!r)return!1;let{allowedBlockTypes:i}=su(e);if(!Vf(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(dt(e,c))){u=!0;break}c=e.blocks.parents.get(c)}while(c);return u}return!0},Rv=(e,t,o=null)=>{if(e.settings.isPreviewMode||!WN(e,t,o))return!1;let r;t&&typeof t=="object"?(r=t,t=r.name):r=(0,Ee.getBlockType)(t);let n=da(e,o);if(n&&n!=="contentOnly")return!1;let i=Ei(e,o??"");if(i==="disabled"&&t!==(0,Ee.getDefaultBlockName)())return!1;let s=ZN(e,o);if(o&&s===void 0)return!1;let a=zN(t),c=!!lu(e,o),u=c?o:au(e,o),d=!!u;if(d&&!a||d&&dt(e,u)==="core/block")return!1;if((c||i==="contentOnly")&&!_v(e,t,o))if(t===(0,Ee.getDefaultBlockName)()){if(!_r(e,o).some(C=>dt(e,C)===(0,Ee.getDefaultBlockName)()))return!1}else return!1;let f=dt(e,o),h=(0,Ee.getBlockType)(f)?.allowedBlocks,p=Vf(h,t);if(p!==!1){let S=s?.allowedBlocks,x=Vf(S,t);x!==null&&(p=x)}let g=r.parent,b=Vf(g,f),v=!0,k=r.ancestor;k&&(v=[o,...ys(e,o)].some(x=>Vf(k,dt(e,x))));let y=v&&(p===null&&b===null||p===!0||b===!0);return y&&(0,dj.applyFilters)("blockEditor.__unstableCanInsertBlockType",y,r,o,{getBlock:xl.bind(null,e),getBlockParentsByBlockName:jN.bind(null,e)})},Mf=(0,Te.createRegistrySelector)(e=>(0,Te.createSelector)(Rv,(t,o,r)=>cu(e)(t,r)));function Rge(e,t,o=null){return t.every(r=>Mf(e,dt(e,r),o))}function $N(e,t){if(e.settings.isPreviewMode)return!1;let o=Bi(e,t);if(o===null)return!0;if(o.lock?.remove!==void 0)return!o.lock.remove;let r=Io(e,t),n=da(e,r);if(n&&n!=="contentOnly")return!1;let i=!!lu(e,r),s=i?r:au(e,r),a=!!s,c=zN(dt(e,t));if(a&&!c||a&&dt(e,s)==="core/block")return!1;let u=Ei(e,r),d=dt(e,t);if((i||u==="contentOnly"||d===(0,Ee.getDefaultBlockName)())&&!_v(e,dt(e,t),r))if(d===(0,Ee.getDefaultBlockName)()){if(_r(e,r).filter(h=>dt(e,h)===(0,Ee.getDefaultBlockName)()).length>1)return!0}else return!1;return u!=="disabled"}function wj(e,t){return t.every(o=>$N(e,o))}function Cj(e,t){if(e.settings.isPreviewMode)return!1;let o=Bi(e,t);if(o===null)return!0;if(o.lock?.move!==void 0)return!o.lock.move;let r=Io(e,t);if(da(e,r)==="all")return!1;let i=!!au(e,t),s=zN(dt(e,t));if(i&&!s)return!1;let a=!!lu(e,r),c=Ei(e,r);return(a||c==="contentOnly")&&!_v(e,dt(e,t),r)?!1:Ei(e,r)!=="disabled"}function Oge(e,t){return t.every(o=>Cj(e,o))}function Bj(e,t){if(e.settings.isPreviewMode)return!1;let o=Bi(e,t);if(o===null)return!0;let{lock:r}=o;return!r?.edit}function Age(e,t){return e.settings.isPreviewMode||!(0,Ee.hasBlockSupport)(t,"lock",!0)?!1:!!e.settings?.canLockBlocks}function KN(e,t){return e.preferences.insertUsage?.[t]??null}var Tv=(e,t,o)=>(0,Ee.hasBlockSupport)(t,"inserter",!0)?Rv(e,t.name,o):!1,Lge=(e,t)=>o=>{let r=`${t.id}/${o.name}`,{time:n,count:i=0}=KN(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:YN(n,i),isSearchOnly:o.isSearchOnly}},YN=(e,t)=>{if(!e)return t;let o=Date.now()-e;switch(!0){case o<jhe:return t*4;case o<Uhe:return t*2;case o<Hhe:return t/2;default:return t/4}},Ej=(e,{buildScope:t="inserter"})=>o=>{let r=o.name,n=!1;(0,Ee.hasBlockSupport)(o.name,"multiple",!0)||(n=Bw(e,Kp(e)).some(({name:f})=>f===o.name));let{time:i,count:s=0}=KN(e,r)||{},a={id:r,name:o.name,title:o.title,icon:o.icon,isDisabled:n,frecency:YN(i,s)};if(t==="transform")return a;let c=(0,Ee.getBlockVariations)(o.name,"inserter"),u=(0,Ee.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}},Nge=(0,Te.createRegistrySelector)(e=>(0,Te.createSelector)((t,o=null,r=fj)=>{let n=h=>{let p=h.wp_pattern_sync_status?Ci:{src:Ci,foreground:"var(--wp-block-synced-color)"},g=xv(h),{time:b,count:v=0}=KN(t,g.name)||{},k=YN(b,v);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:k,content:g.content,get blocks(){return Cw(g).blocks},syncStatus:g.syncStatus}},i=Rv(t,"core/block",o)?M(e(Wt)).getReusableBlocks().map(n):[],s=Ej(t,{buildScope:"inserter"}),a=(0,Ee.getBlockTypes)().filter(h=>(0,Ee.hasBlockSupport)(h,"inserter",!0)).map(s);if(r[uu]!==!1)a=a.filter(h=>Tv(t,h,o));else{let{getClosestAllowedInsertionPoint:h}=M(e(Wt));a=a.filter(p=>WN(t,p,o)&&h(p.name,o)!==null).map(p=>({...p,isAllowedInCurrentRoot:Tv(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=Lge(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,Ee.getBlockTypes)(),M(e(Wt)).getReusableBlocks(),t.blocks.order,t.preferences.insertUsage,...cu(e)(t,o)])),Mge=(0,Te.createRegistrySelector)(e=>(0,Te.createSelector)((t,o,r=null)=>{let n=Array.isArray(o)?o:[o],i=Ej(t,{buildScope:"transform"}),s=(0,Ee.getBlockTypes)().filter(u=>Tv(t,u,r)).map(i),a=Object.fromEntries(Object.entries(s).map(([,u])=>[u.name,u])),c=(0,Ee.getPossibleBlockTransformations)(n).reduce((u,d)=>(a[d?.name]&&u.push(a[d.name]),u),[]);return fa(c,u=>a[u.name].frecency,"desc")},(t,o,r)=>[(0,Ee.getBlockTypes)(),t.preferences.insertUsage,...cu(e)(t,r)])),Dge=(e,t=null)=>(0,Ee.getBlockTypes)().some(n=>Tv(e,n,t))?!0:Rv(e,"core/block",t),FN=(0,Te.createRegistrySelector)(e=>(0,Te.createSelector)((t,o=null)=>{if(!o)return;let r=(0,Ee.getBlockTypes)().filter(i=>Tv(t,i,o));return Rv(t,"core/block",o)&&r.push("core/block"),r},(t,o)=>[(0,Ee.getBlockTypes)(),...cu(e)(t,o)])),Vge=(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"}),FN(e,t)),(e,t)=>FN.getDependants(e,t));function Tj(e,t=null){if(!t)return;let{defaultBlock:o,directInsert:r}=e.blockListSettings[t]??{};if(!(!o||!r))return o}function Fge(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"}),Tj(e,t)}var zge=(0,Te.createRegistrySelector)(e=>(t,o)=>{let r=M(e(Wt)).getPatternBySlug(o);return r?Cw(r):null}),qN=e=>(t,o)=>[...Cv(e)(t),...cu(e)(t,o)],cj=new WeakMap;function jge(e){let t=cj.get(e);return t||(t={...e,get blocks(){return Cw(e).blocks}},cj.set(e,t)),t}var Uge=(0,Te.createRegistrySelector)(e=>(0,Te.createSelector)((t,o=null,r=fj)=>{let{getAllPatterns:n}=M(e(Wt)),i=n(),{allowedBlockTypes:s}=su(t);return i.filter(({inserter:d=!0})=>!!d).map(jge).filter(d=>wv(Lf(d),s)).filter(d=>Lf(d).every(({blockName:f})=>r[uu]!==!1?Mf(t,f,o):WN(t,f,o)))},qN(e))),Hge=(0,Te.createRegistrySelector)(e=>(0,Te.createSelector)((t,o,r=null)=>{if(!o)return dr;let n=e(Wt).__experimentalGetAllowedPatterns(r),i=Array.isArray(o)?o:[o],s=n.filter(a=>a?.blockTypes?.some?.(c=>i.includes(c)));return s.length===0?dr:s},(t,o,r)=>qN(e)(t,r))),Gge=(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(Wt).getPatternsByBlockTypes)),Wge=(0,Te.createRegistrySelector)(e=>(0,Te.createSelector)((t,o,r=null)=>{if(!o||o.some(({clientId:i,innerBlocks:s})=>s.length||Ew(t,i)))return dr;let n=Array.from(new Set(o.map(({name:i})=>i)));return e(Wt).getPatternsByBlockTypes(n,r)},(t,o,r)=>qN(e)(t,r)));function ZN(e,t){return e.blockListSettings[t]}function su(e){return e.settings}function $ge(e){return e.blocks.isPersistentChange}var Kge=(0,Te.createSelector)((e,t=[])=>t.reduce((o,r)=>e.blockListSettings[r]?{...o,[r]:e.blockListSettings[r]}:o,{}),e=>[e.blockListSettings]),Yge=(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(Wt)).getReusableBlocks().find(n=>n.id===o);return r?r.title?.raw:null},()=>[M(e(Wt)).getReusableBlocks()]));function qge(e){return e.blocks.isIgnoredChange}function Zge(e){return e.lastBlockAttributesChange}function Xge(){return(0,zn.default)('wp.data.select( "core/block-editor" ).hasBlockMovingClientId',{since:"6.7",hint:"Block moving mode feature has been removed"}),!1}function Qge(e){return!!e.automaticChangeStatus}function Jge(e,t){return e.highlightedBlock===t}function Ew(e,t){return!!e.blocks.controlledInnerBlocks[t]}var ebe=(0,Te.createSelector)((e,t)=>{if(!t.length)return null;let o=qp(e);if(t.includes(dt(e,o)))return o;let r=du(e),n=jN(e,o||r[0],t);return n?n[n.length-1]:null},(e,t)=>[e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId,t]);function tbe(e,t,o){let{lastBlockInserted:r}=e;return r.clientIds?.includes(t)&&r.source===o}function obe(e,t){return e.blockVisibility?.[t]??!0}function rbe(){(0,zn.default)("wp.data.select( 'core/block-editor' ).getHoveredBlockClientId",{since:"6.9",version:"7.1"})}var nbe=(0,Te.createSelector)(e=>{let t=new Set(Object.keys(e.blockVisibility).filter(o=>e.blockVisibility[o]));return t.size===0?Ghe:t},e=>[e.blockVisibility]);function Ij(e,t){if(Ei(e,t)!=="default")return!1;if(!Bj(e,t))return!0;if(DN(e)){let n=Nf(e);if(n){if(_r(e,n)?.includes(t))return!0}else if(t&&!Io(e,t))return!0}return((0,Ee.hasBlockSupport)(dt(e,t),"__experimentalDisableBlockOverlay",!1)?!1:Ew(e,t))&&!yj(e,t)&&!Sj(e,t,!0)}function ibe(e,t){let o=e.blocks.parents.get(t);for(;o;){if(Ij(e,o))return!0;o=e.blocks.parents.get(o)}return!1}function Ei(e,t=""){return t===null&&(t=""),e.derivedBlockEditingModes?.has(t)?e.derivedBlockEditingModes.get(t):e.blockEditingModes.has(t)?e.blockEditingModes.get(t):"default"}var sbe=(0,Te.createRegistrySelector)(e=>(t,o="")=>{let r=o||qp(t);if(!r||lu(t,r))return!1;let{getGroupingBlockName:n}=e(Ee.store),i=xl(t,r),s=n();return i&&(i.name===s||(0,Ee.getBlockType)(i.name)?.transforms?.ungroup)&&!!i.innerBlocks.length&&$N(t,r)}),abe=(0,Te.createRegistrySelector)(e=>(t,o=dr)=>{let{getGroupingBlockName:r}=e(Ee.store),n=r(),i=o?.length?o:Zp(t),s=i?.length?Io(t,i[0]):void 0;return Mf(t,n,s)&&i.length&&wj(t,i)}),lbe=(e,t)=>((0,zn.default)("wp.data.select( 'core/block-editor' ).__unstableGetContentLockingParent",{since:"6.1",version:"6.7"}),LN(e,t));function cbe(e){return(0,zn.default)("wp.data.select( 'core/block-editor' ).__unstableGetTemporarilyEditingAsBlocks",{since:"6.1",version:"6.7"}),NN(e)}var Tw={};Pp(Tw,{__experimentalUpdateSettings:()=>QN,clearBlockRemovalPrompt:()=>hbe,clearRequestedInspectorTab:()=>Abe,closeListViewContentPanel:()=>Ibe,deleteStyleOverride:()=>kbe,editContentOnlySection:()=>eM,ensureDefaultBlock:()=>Nj,expandBlock:()=>_be,hideBlockInterface:()=>fbe,hideViewportModal:()=>Rbe,openListViewContentPanel:()=>Tbe,privateRemoveBlocks:()=>JN,requestInspectorTab:()=>Obe,resetZoomLevel:()=>Bbe,setBlockRemovalRules:()=>gbe,setInsertionPoint:()=>xbe,setLastFocus:()=>vbe,setStyleOverride:()=>bbe,setZoomLevel:()=>Cbe,showBlockInterface:()=>mbe,showViewportModal:()=>Pbe,startDragging:()=>ybe,stopDragging:()=>Sbe,stopEditingContentOnlySection:()=>wbe,toggleBlockSpotlight:()=>Ebe});var Rj=l(P(),1),Oj=l(Re(),1),Aj=l(Zo(),1),Lj=l(N(),1),ube=e=>Array.isArray(e)?e:[e],dbe=["inserterMediaCategories","blockInspectorAnimation","mediaSideload"];function QN(e,{stripExperimentalSettings:t=!1,reset:o=!1}={}){let r=e;Object.hasOwn(r,"__unstableIsPreviewMode")&&((0,Oj.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&&Rj.Platform.OS==="web"){n={};for(let i in r)dbe.includes(i)||(n[i]=r[i])}return{type:"UPDATE_SETTINGS",settings:n,reset:o}}function fbe(){return{type:"HIDE_BLOCK_INTERFACE"}}function mbe(){return{type:"SHOW_BLOCK_INTERFACE"}}var JN=(e,t=!0,o=!1)=>({select:r,dispatch:n,registry:i})=>{if(!e||!e.length||(e=ube(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,...v}=g.shift();g.push(...b),p.push(v)}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(pbe(e,t,m));return}}t&&n.selectPreviousBlock(e[0],t),i.batch(()=>{n({type:"REMOVE_BLOCKS",clientIds:e}),n(Nj())})},Nj=()=>({select:e,dispatch:t})=>{if(e.getBlockCount()>0)return;let{__unstableHasCustomAppender:r}=e.getSettings();r||t.insertDefaultBlock()};function pbe(e,t,o){return{type:"DISPLAY_BLOCK_REMOVAL_PROMPT",clientIds:e,selectPrevious:t,message:o}}function hbe(){return{type:"CLEAR_BLOCK_REMOVAL_PROMPT"}}function gbe(e=!1){return{type:"SET_BLOCK_REMOVAL_RULES",rules:e}}function bbe(e,t){return{type:"SET_STYLE_OVERRIDE",id:e,style:t}}function kbe(e){return{type:"DELETE_STYLE_OVERRIDE",id:e}}function vbe(e=null){return{type:"LAST_FOCUS",lastFocus:e}}function ybe(){return{type:"START_DRAGGING"}}function Sbe(){return{type:"STOP_DRAGGING"}}function _be(e){return{type:"SET_BLOCK_EXPANDED_IN_LIST_VIEW",clientId:e}}function xbe(e){return{type:"SET_INSERTION_POINT",value:e}}function eM(e){return{type:"EDIT_CONTENT_ONLY_SECTION",clientId:e}}function wbe(){return{type:"EDIT_CONTENT_ONLY_SECTION"}}var Cbe=(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,Aj.speak)((0,Lj.__)("You are currently in zoom-out mode."))}}o({type:"SET_ZOOM_LEVEL",zoom:e})};function Bbe(){return{type:"RESET_ZOOM_LEVEL"}}function Ebe(e,t){return{type:"TOGGLE_BLOCK_SPOTLIGHT",clientId:e,hasBlockSpotlight:t}}function Tbe(){return{type:"OPEN_LIST_VIEW_CONTENT_PANEL"}}function Ibe(){return{type:"CLOSE_LIST_VIEW_CONTENT_PANEL"}}function Pbe(e){return{type:"SHOW_VIEWPORT_MODAL",clientIds:e}}function Rbe(){return{type:"HIDE_VIEWPORT_MODAL"}}function Obe(e,t={}){return{type:"REQUEST_INSPECTOR_TAB",tabName:e,options:t}}function Abe(){return{type:"CLEAR_REQUESTED_INSPECTOR_TAB"}}var rM={};Pp(rM,{__unstableDeleteSelection:()=>rke,__unstableExpandSelection:()=>ike,__unstableIncrementListViewExpandRevision:()=>Fke,__unstableMarkAutomaticChange:()=>xke,__unstableMarkLastChangeAsPersistent:()=>Ske,__unstableMarkNextChangeAsNotPersistent:()=>_ke,__unstableSaveReusableBlock:()=>yke,__unstableSetAllListViewPanelsOpen:()=>Dke,__unstableSetEditorMode:()=>wke,__unstableSetOpenListViewPanel:()=>Mke,__unstableSetTemporarilyEditingAsBlocks:()=>Oke,__unstableSplitSelection:()=>nke,__unstableToggleListViewPanel:()=>Vke,clearSelectedBlock:()=>$be,duplicateBlocks:()=>Bke,enterFormattedText:()=>pke,exitFormattedText:()=>hke,flashBlock:()=>Ike,hideInsertionPoint:()=>eke,hoverBlock:()=>zbe,insertAfterBlock:()=>Tke,insertBeforeBlock:()=>Eke,insertBlock:()=>Qbe,insertBlocks:()=>Wj,insertDefaultBlock:()=>bke,mergeBlocks:()=>ske,moveBlockToPosition:()=>Xbe,moveBlocksDown:()=>qbe,moveBlocksToPosition:()=>Gj,moveBlocksUp:()=>Zbe,multiSelect:()=>Wbe,receiveBlocks:()=>Mbe,registerInserterMediaCategory:()=>Ake,removeBlock:()=>ake,removeBlocks:()=>$j,replaceBlock:()=>Ybe,replaceBlocks:()=>Uj,replaceInnerBlocks:()=>lke,resetBlocks:()=>Lbe,resetSelection:()=>Nbe,selectBlock:()=>Fbe,selectNextBlock:()=>Ube,selectPreviousBlock:()=>jbe,selectionChange:()=>gke,setBlockEditingMode:()=>Lke,setBlockMovingClientId:()=>Cke,setBlockVisibility:()=>Rke,setHasControlledInnerBlocks:()=>Pke,setTemplateValidity:()=>tke,showInsertionPoint:()=>Jbe,startDraggingBlocks:()=>fke,startMultiSelect:()=>Hbe,startTyping:()=>uke,stopDraggingBlocks:()=>mke,stopMultiSelect:()=>Gbe,stopTyping:()=>dke,synchronizeTemplate:()=>oke,toggleBlockHighlight:()=>oM,toggleBlockMode:()=>cke,toggleSelection:()=>Kbe,unsetBlockEditingMode:()=>Nke,updateBlock:()=>Vbe,updateBlockAttributes:()=>Dbe,updateBlockListSettings:()=>kke,updateSettings:()=>vke,validateBlocksToTemplate:()=>jj});var be=l($(),1),Iw=l(Zo(),1),fu=l(N(),1),Fj=l(Ti(),1),ft=l(ur(),1),mu=l(Re(),1),zj=l(Xp(),1);var Vj=l(ur(),1),wl="\x86";function Ov(e){if(e)return Object.keys(e).find(t=>{let o=e[t];return(typeof o=="string"||o instanceof Vj.RichTextData)&&o.toString().indexOf(wl)!==-1})}function tM(e){for(let[t,o]of Object.entries(e.attributes))if(o.source==="rich-text"||o.source==="html")return t}var Qp=e=>Array.isArray(e)?e:[e],Lbe=e=>({dispatch:t})=>{t({type:"RESET_BLOCKS",blocks:e}),t(jj(e))},jj=e=>({select:t,dispatch:o})=>{let r=t.getTemplate(),n=t.getTemplateLock(),i=!r||n!=="all"||(0,be.doBlocksMatchTemplate)(e,r),s=t.isValidTemplate();if(i!==s)return o.setTemplateValidity(i),i};function Nbe(e,t,o){return{type:"RESET_SELECTION",selectionStart:e,selectionEnd:t,initialPosition:o}}function Mbe(e){return(0,mu.default)('wp.data.dispatch( "core/block-editor" ).receiveBlocks',{since:"5.9",alternative:"resetBlocks or insertBlocks"}),{type:"RECEIVE_BLOCKS",blocks:e}}function Dbe(e,t,o={uniqueByBlock:!1}){return typeof o=="boolean"&&(o={uniqueByBlock:o}),{type:"UPDATE_BLOCK_ATTRIBUTES",clientIds:Qp(e),attributes:t,options:o}}function Vbe(e,t){return{type:"UPDATE_BLOCK",clientId:e,updates:t}}function Fbe(e,t=0){return{type:"SELECT_BLOCK",initialPosition:t,clientId:e}}function zbe(){return(0,mu.default)('wp.data.dispatch( "core/block-editor" ).hoverBlock',{since:"6.9",version:"7.1"}),{type:"DO_NOTHING"}}var jbe=(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)}}},Ube=e=>({select:t,dispatch:o})=>{let r=t.getNextBlockClientId(e);r&&o.selectBlock(r)};function Hbe(){return{type:"START_MULTI_SELECT"}}function Gbe(){return{type:"STOP_MULTI_SELECT"}}var Wbe=(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,Iw.speak)((0,fu.sprintf)((0,fu._n)("%s block selected.","%s blocks selected.",a),a),"assertive")};function $be(){return{type:"CLEAR_SELECTED_BLOCK"}}function Kbe(e=!0){return{type:"TOGGLE_SELECTION",isSelectionEnabled:e}}var Uj=(e,t,o,r=0,n)=>({select:i,dispatch:s,registry:a})=>{e=Qp(e),t=Qp(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 Ybe(e,t){return Uj(e,t)}var Hj=e=>(t,o)=>({select:r,dispatch:n})=>{r.canMoveBlocks(t)&&n({type:e,clientIds:Qp(t),rootClientId:o})},qbe=Hj("MOVE_BLOCKS_DOWN"),Zbe=Hj("MOVE_BLOCKS_UP"),Gj=(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 Xbe(e,t="",o="",r){return Gj([e],t,o,r)}function Qbe(e,t,o,r,n,i){return Wj([e],t,o,r,n,i)}var Wj=(e,t,o,r=!0,n=0,i)=>({select:s,dispatch:a})=>{n!==null&&typeof n=="object"&&(i=n,n=0,(0,mu.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=Qp(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 Jbe(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 eke=()=>({select:e,dispatch:t})=>{e.isBlockInsertionPointVisible()&&t({type:"HIDE_INSERTION_POINT"})};function tke(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}var oke=()=>({select:e,dispatch:t})=>{t({type:"SYNCHRONIZE_TEMPLATE"});let o=e.getBlocks(),r=e.getTemplate(),n=(0,be.synchronizeBlocksWithTemplate)(o,r);t.resetBlocks(n)},rke=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,be.getBlockType)(p.name);if(!g.merge)return;let b=f,v=m,k=o.getBlock(b.clientId),y=o.getBlock(v.clientId),S=k.attributes[b.attributeKey],x=y.attributes[v.attributeKey],C=(0,ft.create)({html:S}),B=(0,ft.create)({html:x});C=(0,ft.remove)(C,b.offset,C.text.length),B=(0,ft.insert)(B,wl,0,v.offset);let I=(0,be.cloneBlock)(k,{[b.attributeKey]:(0,ft.toHTMLString)({value:C})}),O=(0,be.cloneBlock)(y,{[v.attributeKey]:(0,ft.toHTMLString)({value:B})}),E=e?I:O,L=k.name===y.name?[E]:(0,be.switchToBlockType)(E,g.name);if(!L||!L.length)return;let T;if(e){let ne=L.pop();T=g.merge(ne.attributes,O.attributes)}else{let ne=L.shift();T=g.merge(I.attributes,ne.attributes)}let R=Ov(T),D=T[R],j=(0,ft.create)({html:D}),G=j.text.indexOf(wl),z=(0,ft.remove)(j,G,G+1),H=(0,ft.toHTMLString)({value:z});T[R]=H;let W=o.getSelectedBlockClientIds(),te=[...e?L:[],{...p,attributes:{...p.attributes,...T}},...e?[]:L];t.batch(()=>{r.selectionChange(p.clientId,R,G,G),r.replaceBlocks(W,te,0,o.getSelectedBlocksInitialCaretPosition())})},nke=(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),v=(0,be.getBlockType)(g.name),k=(0,be.getBlockType)(b.name),y=typeof h.attributeKey=="string"?h.attributeKey:tM(v),S=typeof p.attributeKey=="string"?p.attributeKey:tM(k),x=o.getBlockAttributes(h.clientId);if(x?.metadata?.bindings?.[y]){if(e.length){let{createWarningNotice:X}=t.dispatch(Fj.store);X((0,fu.__)("Blocks can't be inserted into other blocks with bindings"),{type:"snackbar"});return}r.insertAfterBlock(h.clientId);return}if(!y||!S||typeof n.offset>"u"||typeof i.offset>"u")return;if(h.clientId===p.clientId&&y===S&&h.offset===p.offset){if(e.length){if((0,be.isUnmodifiedDefaultBlock)(g,"content")){r.replaceBlocks([h.clientId],e,e.length-1,-1);return}}else if(!o.getBlockOrder(h.clientId).length){let X=function(){let le=(0,be.getDefaultBlockName)();return o.canInsertBlockType(le,s)?(0,be.createBlock)(le):(0,be.createBlock)(o.getBlockName(h.clientId))};var B=X;let ee=x[y].length;if(h.offset===0&&ee){r.insertBlocks([X()],o.getBlockIndex(h.clientId),s,!1);return}if(h.offset===ee){r.insertBlocks([X()],o.getBlockIndex(h.clientId)+1,s);return}}}let I=g.attributes[y],O=b.attributes[S],E=(0,ft.create)({html:I}),L=(0,ft.create)({html:O});E=(0,ft.remove)(E,h.offset,E.text.length),L=(0,ft.remove)(L,0,p.offset);let T={...g,innerBlocks:g.clientId===b.clientId?[]:g.innerBlocks,attributes:{...g.attributes,[y]:(0,ft.toHTMLString)({value:E})}},R={...b,clientId:g.clientId===b.clientId?(0,be.createBlock)(b.name).clientId:b.clientId,attributes:{...b.attributes,[S]:(0,ft.toHTMLString)({value:L})}},D=(0,be.getDefaultBlockName)();if(g.clientId===b.clientId&&D&&R.name!==D&&o.canInsertBlockType(D,s)){let X=(0,be.switchToBlockType)(R,D);X?.length===1&&(R=X[0])}if(!e.length){r.replaceBlocks(o.getSelectedBlockClientIds(),[T,R]);return}let j,G=[],z=[...e],H=z.shift(),W=(0,be.getBlockType)(T.name),te=W.merge&&H.name===W.name?[H]:(0,be.switchToBlockType)(H,W.name);if(te?.length){let X=te.shift();T={...T,attributes:{...T.attributes,...W.merge(T.attributes,X.attributes)}},G.push(T),j={clientId:T.clientId,attributeKey:y,offset:(0,ft.create)({html:T.attributes[y]}).text.length},z.unshift(...te)}else(0,be.isUnmodifiedBlock)(T)||G.push(T),G.push(H);let ne=z.pop(),ae=(0,be.getBlockType)(R.name);if(z.length&&G.push(...z),ne){let X=ae.merge&&ae.name===ne.name?[ne]:(0,be.switchToBlockType)(ne,ae.name);if(X?.length){let ee=X.pop();G.push({...R,attributes:{...R.attributes,...ae.merge(ee.attributes,R.attributes)}}),G.push(...X),j={clientId:R.clientId,attributeKey:S,offset:(0,ft.create)({html:ee.attributes[S]}).text.length}}else G.push(ne),(0,be.isUnmodifiedBlock)(R)||G.push(R)}else(0,be.isUnmodifiedBlock)(R)||G.push(R);t.batch(()=>{r.replaceBlocks(o.getSelectedBlockClientIds(),G,G.length-1,0),j&&r.selectionChange(j.clientId,j.attributeKey,j.offset,j.offset)})},ike=()=>({select:e,dispatch:t})=>{let o=e.getSelectionStart(),r=e.getSelectionEnd();t.selectionChange({start:{clientId:o.clientId},end:{clientId:r.clientId}})},ske=(e,t)=>({registry:o,select:r,dispatch:n})=>{let i=e,s=t,a=r.getBlock(i),c=(0,be.getBlockType)(a.name);if(!c||r.getBlockEditingMode(i)==="disabled"||r.getBlockEditingMode(s)==="disabled")return;let u=r.getBlock(s);if(!c.merge&&(0,be.getBlockSupport)(a.name,"__experimentalOnMerge")){let x=(0,be.switchToBlockType)(u,c.name);if(x?.length!==1){n.selectBlock(a.clientId);return}let[C]=x;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 I=r.getBlockAttributes(i),O=r.getBlockAttributes(B);Object.keys(I).every(E=>I[E]===O[E])&&(n.moveBlocksToPosition(r.getBlockOrder(B),B,i),n.removeBlock(B,!1))}});return}if((0,be.isUnmodifiedDefaultBlock)(a)){n.removeBlock(i,r.isBlockSelected(i));return}if((0,be.isUnmodifiedDefaultBlock)(u)){n.removeBlock(s,r.isBlockSelected(s));return}if(!c.merge){(0,be.isUnmodifiedBlock)(u,"content")?n.removeBlock(s,r.isBlockSelected(s)):n.selectBlock(a.clientId);return}let d=(0,be.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 v=(0,be.cloneBlock)(a),k=(0,be.cloneBlock)(u);if(b){let x=f===i?v:k,C=x.attributes[m],B=(0,ft.insert)((0,ft.create)({html:C}),wl,h,h);x.attributes[m]=(0,ft.toHTMLString)({value:B})}let y=a.name===u.name?[k]:(0,be.switchToBlockType)(k,a.name);if(!y||!y.length)return;let S=c.merge(v.attributes,y[0].attributes);if(b){let x=Ov(S),C=S[x],B=(0,ft.create)({html:C}),I=B.text.indexOf(wl),O=(0,ft.remove)(B,I,I+1),E=(0,ft.toHTMLString)({value:O});S[x]=E,n.selectionChange(a.clientId,x,I,I)}n.replaceBlocks([a.clientId,u.clientId],[{...a,attributes:{...a.attributes,...S}},...y.slice(1)],0)},$j=(e,t=!0)=>JN(e,t);function ake(e,t){return $j([e],t)}function lke(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 cke(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function uke(){return{type:"START_TYPING"}}function dke(){return{type:"STOP_TYPING"}}function fke(e=[]){return{type:"START_DRAGGING_BLOCKS",clientIds:e}}function mke(){return{type:"STOP_DRAGGING_BLOCKS"}}function pke(){return(0,mu.default)('wp.data.dispatch( "core/block-editor" ).enterFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function hke(){return(0,mu.default)('wp.data.dispatch( "core/block-editor" ).exitFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function gke(e,t,o,r){return typeof e=="string"?{type:"SELECTION_CHANGE",clientId:e,attributeKey:t,startOffset:o,endOffset:r}:{type:"SELECTION_CHANGE",...e}}var bke=(e,t,o)=>({dispatch:r})=>{let n=(0,be.getDefaultBlockName)();if(!n)return;let i=(0,be.createBlock)(n,e);return r.insertBlock(i,o,t)};function kke(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function vke(e){return QN(e,{stripExperimentalSettings:!0})}function yke(e,t){return{type:"SAVE_REUSABLE_BLOCK_SUCCESS",id:e,updatedId:t}}function Ske(){return{type:"MARK_LAST_CHANGE_AS_PERSISTENT"}}function _ke(){return{type:"MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"}}var xke=()=>({dispatch:e})=>{e({type:"MARK_AUTOMATIC_CHANGE"});let{requestIdleCallback:t=o=>setTimeout(o,100)}=window;t(()=>{e({type:"MARK_AUTOMATIC_CHANGE_FINAL"})})},wke=e=>({registry:t})=>{t.dispatch(zj.store).set("core","editorTool",e),e==="navigation"?(0,Iw.speak)((0,fu.__)("You are currently in Write mode.")):e==="edit"&&(0,Iw.speak)((0,fu.__)("You are currently in Design mode."))};function Cke(){return(0,mu.default)('wp.data.dispatch( "core/block-editor" ).setBlockMovingClientId',{since:"6.7",hint:"Block moving mode feature has been removed"}),{type:"DO_NOTHING"}}var Bke=(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,be.hasBlockSupport)(d,"multiple",!0)))return;let s=o.getBlockRootClientId(e[0]),a=Qp(e),c=o.getBlockIndex(a[a.length-1]),u=n.map(d=>(0,be.__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)},Eke=e=>({select:t,dispatch:o})=>{if(!e)return;let r=t.getBlockRootClientId(e);if(t.getTemplateLock(r))return;let i=t.getBlockIndex(e),s=r?t.getDirectInsertBlock(r):null;if(!s)return o.insertDefaultBlock({},r,i);let a={};if(s.attributesToCopy){let u=t.getBlockAttributes(e);s.attributesToCopy.forEach(d=>{u[d]&&(a[d]=u[d])})}let c=(0,be.createBlock)(s.name,{...s.attributes,...a});return o.insertBlock(c,i,r)},Tke=e=>({select:t,dispatch:o})=>{if(!e)return;let r=t.getBlockRootClientId(e);if(t.getTemplateLock(r))return;let i=t.getBlockIndex(e),s=r?t.getDirectInsertBlock(r):null;if(!s)return o.insertDefaultBlock({},r,i+1);let a={};if(s.attributesToCopy){let u=t.getBlockAttributes(e);s.attributesToCopy.forEach(d=>{u[d]&&(a[d]=u[d])})}let c=(0,be.createBlock)(s.name,{...s.attributes,...a});return o.insertBlock(c,i+1,r)};function oM(e,t){return{type:"TOGGLE_BLOCK_HIGHLIGHT",clientId:e,isHighlighted:t}}var Ike=(e,t=150)=>async({dispatch:o})=>{o(oM(e,!0)),await new Promise(r=>setTimeout(r,t)),o(oM(e,!1))};function Pke(e,t){return{type:"SET_HAS_CONTROLLED_INNER_BLOCKS",hasControlledInnerBlocks:t,clientId:e}}function Rke(e){return{type:"SET_BLOCK_VISIBILITY",updates:e}}function Oke(e){return(0,mu.default)("wp.data.dispatch( 'core/block-editor' ).__unstableSetTemporarilyEditingAsBlocks",{since:"7.0"}),eM(e)}var Ake=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 Lke(e="",t){return{type:"SET_BLOCK_EDITING_MODE",clientId:e,mode:t}}function Nke(e=""){return{type:"UNSET_BLOCK_EDITING_MODE",clientId:e}}function Mke(e){return{type:"SET_OPEN_LIST_VIEW_PANEL",clientId:e}}function Dke(){return{type:"SET_ALL_LIST_VIEW_PANELS_OPEN"}}function Vke(e,t){return{type:"TOGGLE_LIST_VIEW_PANEL",clientId:e,isOpen:t}}function Fke(){return{type:"INCREMENT_LIST_VIEW_EXPAND_REVISION"}}var Jp={reducer:G6,selectors:XN,actions:rM},_=(0,Pw.createReduxStore)(Wt,{...Jp,persist:["preferences"]}),Kj=(0,Pw.registerStore)(Wt,{...Jp,persist:["preferences"]});M(Kj).registerPrivateActions(Tw);M(Kj).registerPrivateSelectors(xw);M(_).registerPrivateActions(Tw);M(_).registerPrivateSelectors(xw);var eh=l(A(),1),Yj=l(N(),1);var Ss=l(w(),1);function zke({className:e,actions:t,children:o,secondaryActions:r}){return(0,Ss.jsx)("div",{style:{display:"contents",all:"initial"},children:(0,Ss.jsx)("div",{className:V(e,"block-editor-warning"),children:(0,Ss.jsxs)("div",{className:"block-editor-warning__contents",children:[(0,Ss.jsx)("p",{className:"block-editor-warning__message",children:o}),(t?.length>0||r)&&(0,Ss.jsxs)("div",{className:"block-editor-warning__actions",children:[t?.length>0&&t.map((n,i)=>(0,Ss.jsx)("span",{className:"block-editor-warning__action",children:n},i)),r&&(0,Ss.jsx)(eh.DropdownMenu,{className:"block-editor-warning__secondary",icon:ks,label:(0,Yj.__)("More options"),popoverProps:{placement:"bottom-end",className:"block-editor-warning__dropdown"},noIcons:!0,children:()=>(0,Ss.jsx)(eh.MenuGroup,{children:r.map((n,i)=>(0,Ss.jsx)(eh.MenuItem,{onClick:n.onClick,children:n.title},i))})})]})]})})})}var pu=zke;var th=l(w(),1);function Xj({originalBlockClientId:e,name:t,onReplace:o}){let{selectBlock:r}=(0,Zj.useDispatch)(_),n=(0,qj.getBlockType)(t);return(0,th.jsxs)(pu,{actions:[(0,th.jsx)(nM.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>r(e),children:(0,Rw.__)("Find original")},"find-original"),(0,th.jsx)(nM.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>o([]),children:(0,Rw.__)("Remove")},"remove")],children:[(0,th.jsxs)("strong",{children:[n?.title,": "]}),(0,Rw.__)("This block can only be used once.")]})}var Av=l(w(),1);function Lw({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,Ow.hasBlockSupport)(s,"layout",!1)||(0,Ow.hasBlockSupport)(s,"__experimentalLayout",!1),b=!!Pe()[zk]||(0,Ow.hasBlockSupport)(s,"listView")||s==="core/navigation",{originalBlockClientId:v}=(0,Aw.useContext)(cr);return(0,Av.jsxs)(l0,{value:(0,Aw.useMemo)(()=>({name:s,isSelected:a,clientId:c,layout:p?f:null,__unstableLayoutClassNames:d,[bs]:e,[Rp]:t,[$c]:o&&r!=="disabled",[s0]:r,[Op]:h,[a0]:n,[zk]:b}),[s,a,c,p,f,d,e,t,o,r,h,n,b]),children:[(0,Av.jsx)(M6,{...i}),v&&(0,Av.jsx)(Xj,{originalBlockClientId:v,name:s,onReplace:i.onReplace})]})}function me(...e){let{clientId:t=null}=Pe();return(0,Qj.useSelect)(o=>M(o(_)).getBlockSettings(t,...e),[t,...e])}function eU(e){(0,Jj.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]=me(e);return t}var Mw=l(w(),1),{kebabCase:jke}=M(oU.privateApis),tU=([e,...t])=>e.toUpperCase()+t.join(""),Uke=e=>(0,Ff.createHigherOrderComponent)(t=>function(r){return(0,Mw.jsx)(t,{...r,colors:e})},"withCustomColorPalette"),Hke=()=>(0,Ff.createHigherOrderComponent)(e=>function(o){let[r,n,i]=me("color.palette.custom","color.palette.theme","color.palette.default"),s=(0,Nw.useMemo)(()=>[...r||[],...n||[],...i||[]],[r,n,i]);return(0,Mw.jsx)(e,{...o,colors:s})},"withEditorColorPalette");function rU(e,t){let o=e.reduce((r,n)=>({...r,...typeof n=="string"?{[n]:jke(n)}:n}),{});return(0,Ff.compose)([t,r=>class extends Nw.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 B6(s,i)}createSetters(){return Object.keys(o).reduce((i,s)=>{let a=tU(s),c=`custom${a}`;return i[`set${a}`]=this.createSetColor(s,c),i},{})}createSetColor(i,s){return a=>{let c=u0(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=ua(s,i[u],i[`custom${tU(u)}`]),m=a[u];return m?.color===f.color&&m?c[u]=m:c[u]={...f,class:yi(d,f.slug)},c},{})}render(){return(0,Mw.jsx)(r,{...this.props,colors:void 0,...this.state,...this.setters,colorUtils:this.colorUtils})}}])}function nU(e){return(...t)=>{let o=Uke(e);return(0,Ff.createHigherOrderComponent)(rU(t,o),"withCustomColors")}}function iU(...e){let t=Hke();return(0,Ff.createHigherOrderComponent)(rU(e,t),"withColors")}var Dw=l(P(),1),Vw=l(F(),1);function oh(e){if(e)return`has-${e}-gradient-background`}function Fw(e,t){let o=e?.find(r=>r.slug===t);return o&&o.gradient}function sU(e,t){return e?.find(r=>r.gradient===t)}function aU(e,t){let o=sU(e,t);return o&&o.slug}function Gke({gradientAttribute:e="gradient",customGradientAttribute:t="customGradient"}={}){let{clientId:o}=Pe(),[r,n,i]=me("color.gradients.custom","color.gradients.theme","color.gradients.default"),s=(0,Dw.useMemo)(()=>[...r||[],...n||[],...i||[]],[r,n,i]),{gradient:a,customGradient:c}=(0,Vw.useSelect)(h=>{let{getBlockAttributes:p}=h(_),g=p(o)||{};return{customGradient:g[t],gradient:g[e]}},[o,e,t]),{updateBlockAttributes:u}=(0,Vw.useDispatch)(_),d=(0,Dw.useCallback)(h=>{let p=aU(s,h);if(p){u(o,{[e]:p,[t]:void 0});return}u(o,{[e]:void 0,[t]:h})},[s,o,u]),f=oh(a),m;return a?m=Fw(s,a):m=c,{gradientClass:f,gradientValue:m,setGradient:d}}var lU=l(A(),1);var{kebabCase:Wke}=M(lU.privateApis),rh=(e,t,o)=>{if(t){let r=e?.find(({slug:n})=>n===t);if(r)return r}return{size:o}};function iM(e,t){let o=e?.find(({size:r})=>r===t);return o||{size:t}}function hu(e){if(e)return`has-${Wke(e)}-font-size`}var $ke="1600px",Kke="320px",Yke=1,qke=.25,Zke=.75,Xke="14px";function cU({minimumFontSize:e,maximumFontSize:t,fontSize:o,minimumViewportWidth:r=Kke,maximumViewportWidth:n=$ke,scaleFactor:i=Yke,minimumFontSizeLimit:s}){if(s=gu(s)?s:Xke,o){let y=gu(o);if(!y?.unit)return null;let S=gu(s,{coerceTo:y.unit});if(S?.value&&!e&&!t&&y?.value<=S?.value)return null;if(t||(t=`${y.value}${y.unit}`),!e){let x=y.unit==="px"?y.value:y.value*16,C=Math.min(Math.max(1-.075*Math.log2(x),qke),Zke),B=Lv(y.value*C,3);S?.value&&B<S?.value?e=`${S.value}${S.unit}`:e=`${B}${y.unit}`}}let a=gu(e),c=a?.unit||"rem",u=gu(t,{coerceTo:c});if(!a||!u)return null;let d=gu(e,{coerceTo:"rem"}),f=gu(n,{coerceTo:c}),m=gu(r,{coerceTo:c});if(!f||!m||!d)return null;let h=f.value-m.value;if(!h)return null;let p=Lv(m.value/100,3),g=Lv(p,3)+c,b=100*((u.value-a.value)/h),v=Lv((b||1)*i,3),k=`${d.value}${d.unit} + ((1vw - ${g}) * ${v})`;return`clamp(${e}, ${k}, ${t})`}function gu(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:Lv(d,3),unit:u}}function Lv(e,t=3){let o=Math.pow(10,t);return Number.isFinite(e)?parseFloat(Math.round(e*o)/o):void 0}var uU=l(A(),1);var dU=l(w(),1);function Qke(e){let[t,o]=me("typography.fontSizes","typography.customFontSize");return(0,dU.jsx)(uU.FontSizePicker,{...e,fontSizes:t,disableCustomFontSizes:!o,__next40pxDefaultSize:!0})}var sM=Qke;var Nv=l(Z(),1),mU=l(P(),1);var aM=l(w(),1),Jke=[],fU=([e,...t])=>e.toUpperCase()+t.join(""),pU=(...e)=>{let t=e.reduce((o,r)=>(o[r]=`custom${fU(r)}`,o),{});return(0,Nv.createHigherOrderComponent)((0,Nv.compose)([(0,Nv.createHigherOrderComponent)(o=>function(n){let[i]=me("typography.fontSizes");return(0,aM.jsx)(o,{...n,fontSizes:i||Jke})},"withFontSizes"),o=>class extends mU.Component{constructor(n){super(n),this.setters=this.createSetters(),this.state={}}createSetters(){return Object.entries(t).reduce((n,[i,s])=>{let a=fU(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=rh(i,m,n[f]);return u[d]={...h,class:hu(m)},u},{});return{...s,...c}}render(){return(0,aM.jsx)(o,{...this.props,fontSizes:void 0,...this.state,...this.setters})}}]),"withFontSizes")};var bu=l(N(),1),zw=l(A(),1);var hU=l(w(),1),eve=[{icon:Jc,title:(0,bu.__)("Align text left"),align:"left"},{icon:yf,title:(0,bu.__)("Align text center"),align:"center"},{icon:eu,title:(0,bu.__)("Align text right"),align:"right"}],tve={placement:"bottom-start"};function ove({value:e,onChange:t,alignmentControls:o=eve,label:r=(0,bu.__)("Align text"),description:n=(0,bu.__)("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,bu.isRTL)()?eu:Jc}let d=s?zw.ToolbarGroup:zw.ToolbarDropdownMenu,f=s?{isCollapsed:i}:{toggleProps:{description:n},popoverProps:tve};return(0,hU.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 lM=ove;var cM=l(w(),1),jw=e=>(0,cM.jsx)(lM,{...e,isToolbar:!1}),gU=e=>(0,cM.jsx)(lM,{...e,isToolbar:!0});var Yw=l(rt(),1),qw=l(A(),1),VU=l(P(),1),Zw=l($(),1);var IU=l(F(),1),vu=l($(),1),pM=l(P(),1);var CU=l(yU(),1);var uM=function(e,t){return uM=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])},uM(e,t)};function SU(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");uM(e,t);function o(){this.constructor=e}e.prototype=t===null?Object.create(t):(o.prototype=t.prototype,new o)}var Fo=function(){return Fo=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},Fo.apply(this,arguments)};function _U(e){return e.toLowerCase()}var ave=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],lve=/[^A-Z0-9]+/gi;function wU(e,t){t===void 0&&(t={});for(var o=t.splitRegexp,r=o===void 0?ave:o,n=t.stripRegexp,i=n===void 0?lve:n,s=t.transform,a=s===void 0?_U:s,c=t.delimiter,u=c===void 0?" ":c,d=xU(xU(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 xU(e,t,o){return t instanceof RegExp?e.replace(t,o):t.reduce(function(r,n){return r.replace(n,o)},e)}var cve=e=>e.name||"",uve=e=>e.title,dve=e=>e.description||"",fve=e=>e.keywords||[],mve=e=>e.category,pve=()=>null,hve=[/([\p{Ll}\p{Lo}\p{N}])([\p{Lu}\p{Lt}])/gu,/([\p{Lu}\p{Lt}])([\p{Lu}\p{Lt}][\p{Ll}\p{Lo}])/gu],gve=new RegExp("(\\p{C}|\\p{P}|\\p{S})+","giu"),dM=new Map,fM=new Map;function Hw(e=""){if(dM.has(e))return dM.get(e);let t=wU(e,{splitRegexp:hve,stripRegexp:gve}).split(" ").filter(Boolean);return dM.set(e,t),t}function Mv(e=""){if(fM.has(e))return fM.get(e);let t=(0,CU.default)(e);return t=t.replace(/^\//,""),t=t.toLowerCase(),fM.set(e,t),t}var Dv=(e="")=>Hw(Mv(e)),bve=(e,t)=>e.filter(o=>!Dv(t).some(r=>r.includes(o))),Gw=(e,t,o,r)=>Dv(r).length===0?e:Vv(e,r,{getCategory:s=>t.find(({slug:a})=>a===s.category)?.title,getCollection:s=>o[s.name.split("/")[0]]?.title}),Vv=(e=[],t="",o={})=>{if(Dv(t).length===0)return e;let n=e.map(i=>[i,kve(i,t,o)]).filter(([,i])=>i>0);return n.sort(([,i],[,s])=>s-i),n.map(([i])=>i)};function kve(e,t,o={}){let{getName:r=cve,getTitle:n=uve,getDescription:i=dve,getKeywords:s=fve,getCategory:a=mve,getCollection:c=pve}=o,u=r(e),d=n(e),f=i(e),m=s(e),h=a(e),p=c(e),g=Mv(t),b=Mv(d),v=0;if(g===b)v+=30;else if(b.startsWith(g))v+=20;else{let k=[u,d,f,...m,h,p].join(" "),y=Hw(g);bve(y,k).length===0&&(v+=10)}if(v!==0&&u.startsWith("core/")){let k=u!==e.id;v+=k?1:2}return v}var ma=l($(),1),nh=l(F(),1),Ww=l(P(),1),BU=l(Ti(),1),$w=l(N(),1);var vve=(e,t,o)=>{let r=(0,Ww.useMemo)(()=>({[uu]:!!o}),[o]),[n]=(0,nh.useSelect)(d=>[d(_).getInserterItems(e,r)],[e,r]),{getClosestAllowedInsertionPoint:i}=M((0,nh.useSelect)(_)),{createErrorNotice:s}=(0,nh.useDispatch)(BU.store),[a,c]=(0,nh.useSelect)(d=>{let{getCategories:f,getCollections:m}=d(ma.store);return[f(),m()]},[]),u=(0,Ww.useCallback)(({name:d,initialAttributes:f,innerBlocks:m,syncStatus:h,content:p},g)=>{let b=i(d,e);if(b===null){let k=(0,ma.getBlockType)(d)?.title??d;s((0,$w.sprintf)((0,$w.__)(`Block "%s" can't be inserted.`),k),{type:"snackbar",id:"inserter-notice"});return}let v=h==="unsynced"?(0,ma.parse)(p,{__unstableSkipMigrationLogs:!0}):(0,ma.createBlock)(d,f,(0,ma.createBlocksFromInnerBlocksTemplate)(m));t(v,void 0,g,b)},[i,e,t,s]);return[n,a,c,u]},ku=vve;var EU=l(A(),1);var TU=l(P(),1),mM=l(w(),1);function yve({icon:e,showColors:t=!1,className:o,context:r}){e?.src==="block-default"&&(e={src:Xk});let n=(0,mM.jsx)(EU.Icon,{icon:e&&e.src?e.src:e,context:r}),i=t?{backgroundColor:e&&e.background,color:e&&e.foreground}:{};return(0,mM.jsx)("span",{style:i,className:V("block-editor-block-icon",o,{"has-colors":t}),children:n})}var Oe=(0,TU.memo)(yve);var Kw=(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 ih=l(w(),1),Sve=()=>{},_ve=9;function xve(){return{name:"blocks",className:"block-editor-autocompleters__block",triggerPrefix:"/",useItems(e){let{rootClientId:t,selectedBlockId:o,prioritizedBlocks:r}=(0,IU.useSelect)(u=>{let{getSelectedBlockClientId:d,getBlock:f,getBlockListSettings:m,getBlockRootClientId:h}=u(_),{getActiveBlockVariation:p}=u(vu.store),g=d(),{name:b,attributes:v}=f(g),k=p(b,v),y=h(g);return{selectedBlockId:k?`${b}/${k.name}`:b,rootClientId:y,prioritizedBlocks:m(y)?.prioritizedInserterBlocks}},[]),[n,i,s]=ku(t,Sve,!0),a=(0,pM.useMemo)(()=>(e.trim()?Gw(n,i,s,e):Kw(fa(n,"frecency","desc"),r)).filter(d=>d.id!==o).slice(0,_ve),[e,o,n,i,s,r]);return[(0,pM.useMemo)(()=>a.map(u=>{let{title:d,icon:f,isDisabled:m}=u;return{key:`block-${u.id}`,value:u,label:(0,ih.jsxs)(ih.Fragment,{children:[(0,ih.jsx)(Oe,{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,vu.cloneBlock)(s)):(0,vu.createBlock)(t,o,(0,vu.createBlocksFromInnerBlocksTemplate)(r))}}}}var PU=xve();var LU=l(OU(),1),NU=l(un(),1);var MU=l(hM(),1),zf=l(w(),1),wve=10;function Cve(){return{name:"links",className:"block-editor-autocompleters__link",triggerPrefix:"[[",options:async e=>{let t=await(0,LU.default)({path:(0,NU.addQueryArgs)("/wp/v2/search",{per_page:wve,search:e,type:"post",order_by:"menu_order"})});return t=t.filter(o=>o.title!==""),t},getOptionKeywords(e){return[...e.title.split(/\s+/)]},getOptionLabel(e){return(0,zf.jsxs)(zf.Fragment,{children:[(0,zf.jsx)(xe,{icon:e.subtype==="page"?kl:UL},"icon"),(0,MU.decodeEntities)(e.title)]})},getOptionCompletion(e){return(0,zf.jsx)("a",{href:e.url,children:e.title})}}}var DU=Cve();var FU=l(w(),1),Bve=[];function zU({completers:e=Bve}){let{name:t}=Pe();return(0,VU.useMemo)(()=>{let o=[...e,DU];return(t===(0,Zw.getDefaultBlockName)()||(0,Zw.getBlockSupport)(t,"__experimentalSlashInserter",!1))&&(o=[...o,PU]),(0,Yw.hasFilter)("editor.Autocomplete.completers")&&(o===e&&(o=o.map(r=>({...r}))),o=(0,Yw.applyFilters)("editor.Autocomplete.completers",o,t)),o},[e,t])}function jU(e){return(0,qw.__unstableUseAutocompleteProps)({...e,completers:zU(e)})}function Eve(e){return(0,FU.jsx)(qw.Autocomplete,{...e,completers:zU(e)})}var UU=Eve;var yM=l(N(),1),xu=l(A(),1);var lH=l(F(),1);var oC=l(P(),1);var Ii=l(N(),1);var fn=l(A(),1);var sh=l(N(),1);var jn={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 Un(e,t=""){return e.split(",").map(o=>`${o}${t?` ${t}`:""}`).join(",")}function yu(e,t=jn,o,r){let n="";return t?.[o]?.spacingStyles?.length&&r&&t[o].spacingStyles.forEach(i=>{n+=`${Un(e,i.selector.trim())} { `,n+=Object.entries(i.rules).map(([s,a])=>`${s}: ${a||r}`).join("; "),n+="; }"}),n}function Xw(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,sh.sprintf)((0,sh.__)("Max %s wide"),t)),i.test(o)&&(n.wide=(0,sh.sprintf)((0,sh.__)("Max %s wide"),o)),n}var _s=l(N(),1);var HU=8,Su=["top","right","bottom","left"],GU={top:void 0,right:void 0,bottom:void 0,left:void 0},Qw={custom:nw,axial:nw,horizontal:oN,vertical:sN,top:iN,right:nN,bottom:tN,left:rN},pa={default:(0,_s.__)("Spacing control"),top:(0,_s.__)("Top"),bottom:(0,_s.__)("Bottom"),left:(0,_s.__)("Left"),right:(0,_s.__)("Right"),mixed:(0,_s.__)("Mixed"),vertical:(0,_s.__)("Vertical"),horizontal:(0,_s.__)("Horizontal"),axial:(0,_s.__)("Horizontal & vertical"),custom:(0,_s.__)("Custom")},Cl={axial:"axial",top:"top",right:"right",bottom:"bottom",left:"left",custom:"custom"};function Jw(e){return e?.includes?e==="0"||e.includes("var:preset|spacing|"):!1}function WU(e,t){if(!Jw(e))return e;let o=Tve(e);return t.find(n=>String(n.slug)===o)?.size}function ah(e,t){if(!e||Jw(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 Fv(e){if(!e)return;let t=e.match(/var:preset\|spacing\|(.+)/);return t?`var(--wp--preset--spacing--${t[1]})`:e}function Tve(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 gM(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 Ive(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 $U(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&&Ive(t),u=t?.includes("horizontal")&&t?.includes("vertical")&&t?.length===2;if(gM(t)&&(a||c))return Cl.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]:Cl.custom}function Pve(e){if(!e)return null;let t=typeof e=="string";return{top:t?e:e?.top,left:t?e:e?.left}}function fr(e,t="0"){let o=Pve(e);if(!o)return null;let r=Fv(o?.top)||t,n=Fv(o?.left)||t;return r===n?r:`${r} ${n}`}var oo=l(w(),1),Rve={left:"flex-start",right:"flex-end",center:"center","space-between":"space-between"},KU={left:"flex-start",right:"flex-end",center:"center",stretch:"stretch"},Ove={top:"flex-start",center:"center",bottom:"flex-end",stretch:"stretch","space-between":"space-between"},YU={horizontal:"center",vertical:"top"},Ave=["wrap","nowrap"],ZU={name:"flex",label:(0,Ii.__)("Flex"),inspectorControls:function({layout:t={},onChange:o,layoutBlockSupport:r={}}){let{allowOrientation:n=!0,allowJustification:i=!0,allowWrap:s=!0}=r;return(0,oo.jsxs)(oo.Fragment,{children:[(0,oo.jsxs)(fn.Flex,{children:[i&&(0,oo.jsx)(fn.FlexItem,{children:(0,oo.jsx)(qU,{layout:t,onChange:o})}),n&&(0,oo.jsx)(fn.FlexItem,{children:(0,oo.jsx)(Dve,{layout:t,onChange:o})})]}),s&&(0,oo.jsx)(Mve,{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,oo.jsxs)(Mt,{group:"block",__experimentalShareWithChildBlocks:!0,children:[i&&(0,oo.jsx)(qU,{layout:t,onChange:o,isToolbar:!0}),n&&(0,oo.jsx)(Lve,{layout:t,onChange:o})]})},getLayoutStyle:function({selector:t,layout:o,style:r,blockName:n,hasBlockGapSupport:i,globalBlockGapValue:s,layoutDefinitions:a=jn}){let{orientation:c="horizontal"}=o,u="0.5em";if(s){let k=fr(s,"0.5em").split(" ");u=k.length>1?k[1]:k[0]}let d=r?.spacing?.blockGap&&!He(n,"spacing","blockGap")?fr(r?.spacing?.blockGap,u):void 0,f=Rve[o.justifyContent],m=Ave.includes(o.flexWrap)?o.flexWrap:"wrap",h=Ove[o.verticalAlignment],p=KU[o.justifyContent]||KU.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=`${Un(t)} {
				${b.join("; ")};
			}`),i&&d&&(g+=yu(t,a,"flex",d)),g},getOrientation(e){let{orientation:t="horizontal"}=e;return t},getAlignments(){return[]}};function Lve({layout:e,onChange:t}){let{orientation:o="horizontal"}=e,r=o==="horizontal"?YU.horizontal:YU.vertical,{verticalAlignment:n=r}=e;return(0,oo.jsx)(eC,{onChange:s=>{t({...e,verticalAlignment:s})},value:n,controls:o==="horizontal"?["top","center","bottom","stretch"]:["top","center","bottom","space-between"]})}var Nve={placement:"bottom-start"};function qU({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,oo.jsx)(lh,{allowedControls:s,value:r,onChange:i,popoverProps:Nve});let a=[{value:"left",icon:ru,label:(0,Ii.__)("Justify items left")},{value:"center",icon:ou,label:(0,Ii.__)("Justify items center")},{value:"right",icon:nu,label:(0,Ii.__)("Justify items right")}];return n==="horizontal"?a.push({value:"space-between",icon:zp,label:(0,Ii.__)("Space between items")}):a.push({value:"stretch",icon:jp,label:(0,Ii.__)("Stretch items")}),(0,oo.jsx)(fn.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,label:(0,Ii.__)("Justification"),value:r,onChange:i,className:"block-editor-hooks__flex-layout-justification-controls",children:a.map(({value:c,icon:u,label:d})=>(0,oo.jsx)(fn.__experimentalToggleGroupControlOptionIcon,{value:c,icon:u,label:d},c))})}function Mve({layout:e,onChange:t}){let{flexWrap:o="wrap"}=e;return(0,oo.jsx)(fn.ToggleControl,{label:(0,Ii.__)("Allow to wrap to multiple lines"),onChange:r=>{t({...e,flexWrap:r?"wrap":"nowrap"})},checked:o==="wrap"})}function Dve({layout:e,onChange:t}){let{orientation:o="horizontal",verticalAlignment:r,justifyContent:n}=e;return(0,oo.jsxs)(fn.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,className:"block-editor-hooks__flex-layout-orientation-controls",label:(0,Ii.__)("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,oo.jsx)(fn.__experimentalToggleGroupControlOptionIcon,{icon:Zk,value:"horizontal",label:(0,Ii.__)("Horizontal")}),(0,oo.jsx)(fn.__experimentalToggleGroupControlOptionIcon,{icon:RO,value:"vertical",label:(0,Ii.__)("Vertical")})]})}var XU=l(N(),1);var QU={name:"default",label:(0,XU.__)("Flow"),inspectorControls:function(){return null},toolBarControls:function(){return null},getLayoutStyle:function({selector:t,style:o,blockName:r,hasBlockGapSupport:n,layoutDefinitions:i=jn}){let s=fr(o?.spacing?.blockGap),a="";He(r,"spacing","blockGap")||(s?.top?a=fr(s?.top):typeof s=="string"&&(a=fr(s)));let c="";return n&&a&&(c+=yu(t,i,"default",a)),c},getOrientation(){return"vertical"},getAlignments(e,t){let o=Xw(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 mn=l(A(),1),Bl=l(N(),1);var eH=l(zv(),1);var Xo=l(w(),1),tH={name:"constrained",label:(0,Bl.__)("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:ru,label:(0,Bl.__)("Justify items left")},{value:"center",icon:ou,label:(0,Bl.__)("Justify items center")},{value:"right",icon:nu,label:(0,Bl.__)("Justify items right")}],[f]=me("spacing.units"),m=(0,mn.__experimentalUseCustomUnits)({availableUnits:f||["%","px","em","rem","vw"]});return(0,Xo.jsxs)(mn.__experimentalVStack,{spacing:4,className:"block-editor-hooks__layout-constrained",children:[c&&(0,Xo.jsxs)(Xo.Fragment,{children:[(0,Xo.jsx)(mn.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,Bl.__)("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,Xo.jsx)(mn.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,Xo.jsx)(xe,{icon:Sf})})}),(0,Xo.jsx)(mn.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,Bl.__)("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,Xo.jsx)(mn.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,Xo.jsx)(xe,{icon:Af})})}),(0,Xo.jsx)("p",{className:"block-editor-hooks__layout-constrained-helptext",children:(0,Bl.__)("Customize the width for all elements that are assigned to the center or wide columns.")})]}),a&&(0,Xo.jsx)(mn.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,label:(0,Bl.__)("Justification"),value:s,onChange:u,children:d.map(({value:h,icon:p,label:g})=>(0,Xo.jsx)(mn.__experimentalToggleGroupControlOptionIcon,{value:h,icon:p,label:g},h))})]})},toolBarControls:function({layout:t={},onChange:o,layoutBlockSupport:r}){let{allowJustification:n=!0}=r;return n?(0,Xo.jsx)(Mt,{group:"block",__experimentalShareWithChildBlocks:!0,children:(0,Xo.jsx)(Fve,{layout:t,onChange:o})}):null},getLayoutStyle:function({selector:t,layout:o={},style:r,blockName:n,hasBlockGapSupport:i,layoutDefinitions:s=jn}){let{contentSize:a,wideSize:c,justifyContent:u}=o,d=fr(r?.spacing?.blockGap),f="";He(n,"spacing","blockGap")||(d?.top?f=fr(d?.top):typeof d=="string"&&(f=fr(d)));let m=u==="left"?"0 !important":"auto !important",h=u==="right"?"0 !important":"auto !important",p=a||c?`
					${Un(t,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")} {
						max-width: ${a??c};
						margin-left: ${m};
						margin-right: ${h};
					}
					${Un(t,"> .alignwide")}  {
						max-width: ${c??a};
					}
					${Un(t,"> .alignfull")} {
						max-width: none;
					}
				`:"";return u==="left"?p+=`${Un(t,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")}
			{ margin-left: ${m}; }`:u==="right"&&(p+=`${Un(t,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")}
			{ margin-right: ${h}; }`),r?.spacing?.padding&&(0,eH.getCSSRules)(r).forEach(b=>{if(b.key==="paddingRight"){let v=b.value==="0"?"0px":b.value;p+=`
					${Un(t,"> .alignfull")} {
						margin-right: calc(${v} * -1);
					}
					`}else if(b.key==="paddingLeft"){let v=b.value==="0"?"0px":b.value;p+=`
					${Un(t,"> .alignfull")} {
						margin-left: calc(${v} * -1);
					}
					`}}),i&&f&&(p+=yu(t,s,"constrained",f)),p},getOrientation(){return"vertical"},getAlignments(e){let t=Xw(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}},Vve={placement:"bottom-start"};function Fve({layout:e,onChange:t}){let{justifyContent:o="center"}=e;return(0,Xo.jsx)(lh,{allowedControls:["left","center","right"],value:o,onChange:i=>{t({...e,justifyContent:i})},popoverProps:Vve})}var Vr=l(N(),1),nt=l(A(),1),tC=l(P(),1);var qe=l(w(),1),zve={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},jve=[{value:"px",label:"px",default:0},{value:"rem",label:"rem",default:0},{value:"em",label:"em",default:0}],oH={name:"grid",label:(0,Vr.__)("Grid"),inspectorControls:function({layout:t={},onChange:o,layoutBlockSupport:r={}}){let{allowSizingOnChildren:n=!1}=r,i=!0,s=!t?.isManualPlacement||window.__experimentalEnableGridInteractivity;return(0,qe.jsxs)(qe.Fragment,{children:[window.__experimentalEnableGridInteractivity&&(0,qe.jsx)(Gve,{layout:t,onChange:o}),(0,qe.jsxs)(nt.__experimentalVStack,{spacing:4,children:[i&&(0,qe.jsx)(Hve,{layout:t,onChange:o,allowSizingOnChildren:n}),s&&(0,qe.jsx)(Uve,{layout:t,onChange:o})]})]})},toolBarControls:function(){return null},getLayoutStyle:function({selector:t,layout:o,style:r,blockName:n,hasBlockGapSupport:i,globalBlockGapValue:s,layoutDefinitions:a=jn}){let{minimumColumnWidth:c=null,columnCount:u=null,rowCount:d=null}=o,f="1.2rem";if(s){let b=fr(s,"0.5em").split(" ");f=b.length>1?b[1]:b[0]}let m=r?.spacing?.blockGap&&!He(n,"spacing","blockGap")?fr(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=`${Un(t)} { ${p.join("; ")}; }`),i&&m&&(h+=yu(t,a,"grid",m)),h},getOrientation(){return"horizontal"},getAlignments(){return[]}};function Uve({layout:e,onChange:t}){let{minimumColumnWidth:o,columnCount:r,isManualPlacement:n}=e,s=o||(n||r?null:"12rem"),[a,c="rem"]=(0,nt.__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,qe.jsxs)("fieldset",{className:"block-editor-hooks__grid-layout-minimum-width-control",children:[(0,qe.jsx)(nt.BaseControl.VisualLabel,{as:"legend",children:(0,Vr.__)("Min. column width")}),(0,qe.jsxs)(nt.Flex,{gap:4,children:[(0,qe.jsx)(nt.FlexItem,{isBlock:!0,children:(0,qe.jsx)(nt.__experimentalUnitControl,{size:"__unstable-large",onChange:f=>{t({...e,minimumColumnWidth:f===""?void 0:f})},onUnitChange:d,value:s,units:jve,min:0,label:(0,Vr.__)("Minimum column width"),hideLabelFromVision:!0})}),(0,qe.jsx)(nt.FlexItem,{isBlock:!0,children:(0,qe.jsx)(nt.RangeControl,{__next40pxDefaultSize:!0,onChange:u,value:a||0,min:0,max:zve[c]||600,withInputField:!1,label:(0,Vr.__)("Minimum column width"),hideLabelFromVision:!0})})]}),(0,qe.jsx)("p",{className:"components-base-control__help",children:(0,Vr.__)("Columns will wrap to fewer per row when they can no longer maintain the minimum width.")})]})}function Hve({layout:e,onChange:t,allowSizingOnChildren:o}){let{columnCount:n=void 0,rowCount:i,isManualPlacement:s}=e;return(0,qe.jsx)(qe.Fragment,{children:(0,qe.jsxs)("fieldset",{className:"block-editor-hooks__grid-layout-columns-and-rows-controls",children:[!s&&(0,qe.jsx)(nt.BaseControl.VisualLabel,{as:"legend",children:(0,Vr.__)("Max. columns")}),(0,qe.jsxs)(nt.Flex,{gap:4,children:[(0,qe.jsx)(nt.FlexItem,{isBlock:!0,children:(0,qe.jsx)(nt.__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,Vr.__)("Columns"),hideLabelFromVision:!s})}),(0,qe.jsx)(nt.FlexItem,{isBlock:!0,children:o&&s?(0,qe.jsx)(nt.__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,Vr.__)("Rows")}):(0,qe.jsx)(nt.RangeControl,{__next40pxDefaultSize:!0,value:n??1,onChange:a=>t({...e,columnCount:a===""||a==="0"?1:a}),min:1,max:16,withInputField:!1,label:(0,Vr.__)("Columns"),hideLabelFromVision:!0})})]})]})})}function Gve({layout:e,onChange:t}){let{columnCount:o,rowCount:r,minimumColumnWidth:n,isManualPlacement:i}=e,[s,a]=(0,tC.useState)(o||3),[c,u]=(0,tC.useState)(r),[d,f]=(0,tC.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,Vr.__)("Grid items can be manually placed in any position on the grid."):(0,Vr.__)("Grid items are placed automatically depending on their order.");return(0,qe.jsxs)(nt.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,label:(0,Vr.__)("Grid item position"),value:m,onChange:h,isBlock:!0,help:p,children:[(0,qe.jsx)(nt.__experimentalToggleGroupControlOption,{value:"auto",label:(0,Vr.__)("Auto")},"auto"),(0,qe.jsx)(nt.__experimentalToggleGroupControlOption,{value:"manual",label:(0,Vr.__)("Manual")},"manual")]})}var rH=[QU,ZU,tH,oH];function xs(e="default"){return rH.find(t=>t.name===e)}function nH(){return rH}var bM=l(w(),1),kM={type:"default"},vM=(0,oC.createContext)(kM);vM.displayName="BlockLayoutContext";var iH=vM.Provider;function jf(){return(0,oC.useContext)(vM)}function sH({layout:e={},css:t,...o}){let r=xs(e.type),[n]=me("spacing.blockGap"),i=n!==null;if(r){if(t)return(0,bM.jsx)("style",{children:t});let s=r.getLayoutStyle?.({hasBlockGapSupport:i,layout:e,...o});if(s)return(0,bM.jsx)("style",{children:s})}return null}var rC=[],aH=["none","left","center","right","wide","full"],Wve=["wide","full"];function jv(e=aH){e.includes("none")||(e=["none",...e]);let t=e.length===1&&e[0]==="none",[o,r,n]=(0,lH.useSelect)(c=>{if(t)return[!1,!1,!1];let u=c(_).getSettings();return[u.alignWide??!1,u.supportsLayout,u.__unstableIsBlockBasedTheme]},[t]),i=jf();if(t)return rC;let s=xs(i?.type);if(r){let u=s.getAlignments(i,n).filter(d=>e.includes(d.name));return u.length===1&&u[0].name==="none"?rC:u}if(s.name!=="default"&&s.name!=="constrained")return rC;let a=e.filter(c=>i.alignments?i.alignments.includes(c):!o&&Wve.includes(c)?!1:aH.includes(c)).map(c=>({name:c}));return a.length===1&&a[0].name==="none"?rC:a}var _u=l(N(),1);var Uv={none:{icon:Sf,title:(0,_u._x)("None","Alignment option")},left:{icon:LL,title:(0,_u.__)("Align left")},center:{icon:OL,title:(0,_u.__)("Align center")},right:{icon:ML,title:(0,_u.__)("Align right")},wide:{icon:Af,title:(0,_u.__)("Wide width")},full:{icon:yv,title:(0,_u.__)("Full width")}},cH="none";var Uf=l(w(),1);function $ve({value:e,onChange:t,controls:o,isToolbar:r,isCollapsed:n=!0}){let i=jv(o);if(!!!i.length)return null;function a(h){t([e,"none"].includes(h)?void 0:h)}let c=Uv[e],u=Uv[cH],d=r?xu.ToolbarGroup:xu.ToolbarDropdownMenu,f={icon:c?c.icon:u.icon,label:(0,yM.__)("Align")},m=r?{isCollapsed:n,controls:i.map(({name:h})=>({...Uv[h],isActive:e===h||!e&&h==="none",role:n?"menuitemradio":void 0,onClick:()=>a(h)}))}:{toggleProps:{description:(0,yM.__)("Change alignment")},children:({onClose:h})=>(0,Uf.jsx)(Uf.Fragment,{children:(0,Uf.jsx)(xu.MenuGroup,{className:"block-editor-block-alignment-control__menu-group",children:i.map(({name:p,info:g})=>{let{icon:b,title:v}=Uv[p],k=p===e||!e&&p==="none";return(0,Uf.jsx)(xu.MenuItem,{icon:b,iconPosition:"left",className:V("components-dropdown-menu__menu-item",{"is-active":k}),isSelected:k,onClick:()=>{a(p),h()},role:"menuitemradio",info:g,children:v},p)})})})};return(0,Uf.jsx)(d,{...f,...m})}var SM=$ve;var _M=l(w(),1),nC=e=>(0,_M.jsx)(SM,{...e,isToolbar:!1}),uH=e=>(0,_M.jsx)(SM,{...e,isToolbar:!0});var hH=l(vf(),1),lC=l(N(),1),cC=l($(),1),Cs=l(A(),1),CM=l(F(),1),gH=l(P(),1),bH=l(Z(),1);var wM=l(vf(),1),dH=l($(),1),fH=l(A(),1),mH=l(F(),1),sC=l(P(),1),pH=l(Z(),1);var iC=l(F(),1);function xM(e){return!e||Object.keys(e).length===0}function El(e){let{clientId:t}=Pe(),o=e||t,{updateBlockAttributes:r}=(0,iC.useDispatch)(_),{getBlockAttributes:n}=(0,iC.useRegistry)().select(_);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};xM(f.bindings)&&delete f.bindings,r(o,{metadata:xM(f)?void 0:f})},removeAllBlockBindings:()=>{let{metadata:{bindings:a,...c}={}}=n(o);r(o,{metadata:xM(c)?void 0:c})}}}var ws=l(w(),1),{Menu:wu}=M(fH.privateApis);function Kve({args:e,attribute:t,field:o,source:r,sourceKey:n}){let i=(0,sC.useMemo)(()=>({source:n,args:o.args||{key:o.key}}),[o.args,o.key,n]),s=(0,sC.useContext)(cn),a=(0,mH.useSelect)(u=>r.getValues({select:u,context:s,bindings:{[t]:i}}),[t,s,i,r]),{updateBlockBindings:c}=El();return(0,ws.jsxs)(wu.CheckboxItem,{onChange:()=>{let u=(0,wM.default)(e,o.args)??o.key===e?.key;c(u?{[t]:void 0}:{[t]:i})},name:t+"-binding",value:a[t],checked:(0,wM.default)(e,o.args)??o.key===e?.key,children:[(0,ws.jsx)(wu.ItemLabel,{children:o.label}),(0,ws.jsx)(wu.ItemHelpText,{children:a[t]})]})}function Hv({args:e,attribute:t,sourceKey:o,fields:r}){let n=(0,pH.useViewportMatch)("medium","<");if(!r||r.length===0)return null;let i=(0,dH.getBlockBindingsSource)(o);return(0,ws.jsxs)(wu,{placement:n?"bottom-start":"left-start",children:[(0,ws.jsx)(wu.SubmenuTriggerItem,{children:(0,ws.jsx)(wu.ItemLabel,{children:i.label})}),(0,ws.jsx)(wu.Popover,{gutter:8,children:(0,ws.jsx)(wu.Group,{children:r.map(s=>(0,ws.jsx)(Kve,{args:e,attribute:t,field:s,source:i,sourceKey:o},o+JSON.stringify(s.args)||s.key))})})]},o)}var Pi=l(w(),1),{Menu:aC}=M(Cs.privateApis);function Gv({attribute:e,binding:t,blockName:o}){let{updateBlockBindings:r}=El(),n=(0,bH.useViewportMatch)("medium","<"),i=(0,gH.useContext)(cn),s=(0,CM.useSelect)(g=>{let{getAllBlockBindingsSources:b,getBlockBindingsSourceFieldsList:v,getBlockType:k}=M(g(cC.store)),y=k(o).attributes?.[e]?.type,S=y==="rich-text"?"string":y,x={};return Object.entries(b()).forEach(([C,B])=>{let I=v(B,i);if(!I?.length)return;let O=I.filter(E=>E.type===S);O.length&&(x[C]=O)}),x},[e,o,i]),{canUpdateBlockBindings:a}=(0,CM.useSelect)(g=>({canUpdateBlockBindings:g(_).getSettings().canUpdateBlockBindings})),c=Object.keys(s).length>0,u=!a||!c,{source:d,args:f}=t||{},m=(0,cC.getBlockBindingsSource)(d),h,p=!0;return t===void 0?(c?h=(0,lC.__)("Not connected"):h=(0,lC.__)("No sources available"),p=!0):m?h=s?.[d]?.find(g=>(0,hH.default)(g.args,f))?.label||m?.label||d:(p=!1,h=(0,lC.__)("Source not registered")),(0,Pi.jsx)(Cs.__experimentalToolsPanelItem,{hasValue:()=>!!t,label:e,onDeselect:!!c&&(()=>{r({[e]:void 0})}),children:(0,Pi.jsxs)(aC,{placement:n?"bottom-start":"left-start",children:[(0,Pi.jsx)(aC.TriggerButton,{render:(0,Pi.jsx)(Cs.__experimentalItem,{}),disabled:!c,children:(0,Pi.jsxs)(Cs.__experimentalVStack,{className:"block-editor-bindings__item",spacing:0,children:[(0,Pi.jsx)(Cs.__experimentalText,{truncate:!0,children:e}),(0,Pi.jsx)(Cs.__experimentalText,{truncate:!0,variant:p?"muted":void 0,isDestructive:!p,children:h})]})}),!u&&(0,Pi.jsx)(aC.Popover,{gutter:n?8:36,children:(0,Pi.jsx)(aC,{placement:n?"bottom-start":"left-start",children:Object.entries(s).map(([g,b])=>(0,Pi.jsx)(Hv,{args:t?.args,attribute:e,sourceKey:g,fields:b},g))})})]})})}var kH=l(N(),1),vH=l(A(),1);var yH=l(w(),1);function Yve({isActive:e,label:t=(0,kH.__)("Full height"),onToggle:o,isDisabled:r}){return(0,yH.jsx)(vH.ToolbarButton,{isActive:e,icon:IA,label:t,onClick:()=>o(!e),disabled:r})}var SH=Yve;var xH=l(N(),1),wH=l(it(),1),Hf=l(A(),1),Wv=l(w(),1),qve=()=>{};function Zve(e){let{label:t=(0,xH.__)("Change matrix alignment"),onChange:o=qve,value:r="center",isDisabled:n}=e,i=(0,Wv.jsx)(Hf.AlignmentMatrixControl.Icon,{value:r});return(0,Wv.jsx)(Hf.Dropdown,{popoverProps:{placement:"bottom-start"},renderToggle:({onToggle:s,isOpen:a})=>(0,Wv.jsx)(Hf.ToolbarButton,{onClick:s,"aria-haspopup":"true","aria-expanded":a,onKeyDown:u=>{!a&&u.keyCode===wH.DOWN&&(u.preventDefault(),s())},label:t,icon:i,showTooltip:!0,disabled:n}),renderContent:()=>(0,Wv.jsx)(Hf.AlignmentMatrixControl,{onChange:o,value:r})})}var CH=Zve;var TM=l(A(),1),fC=l(F(),1),mC=l(N(),1);var OH=l(P(),1);var BH=l(F(),1),uC=l($(),1);function Fr({clientId:e,maximumLength:t,context:o}){let r=(0,BH.useSelect)(n=>{if(!e)return null;let{getBlockName:i,getBlockAttributes:s}=n(_),{getBlockType:a,getActiveBlockVariation:c}=n(uC.store),u=i(e),d=a(u);if(!d)return null;let f=s(e),m=(0,uC.__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 $v({clientId:e,maximumLength:t,context:o}){return Fr({clientId:e,maximumLength:t,context:o})}var Gf=l(P(),1),IH=l(Z(),1);var dC=l(P(),1),BM=l(Z(),1),EH=l(w(),1),Kv=(0,dC.createContext)({refsMap:(0,BM.observableMap)()});Kv.displayName="BlockRefsContext";function TH({children:e}){let t=(0,dC.useMemo)(()=>({refsMap:(0,BM.observableMap)()}),[]);return(0,EH.jsx)(Kv.Provider,{value:t,children:e})}function PH(e){let{refsMap:t}=(0,Gf.useContext)(Kv);return(0,IH.useRefEffect)(o=>(t.set(e,o),()=>t.delete(e)),[e])}function EM(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function Wf(e,t){let{refsMap:o}=(0,Gf.useContext)(Kv);(0,Gf.useLayoutEffect)(()=>{EM(t,o.get(e));let r=o.subscribe(e,()=>EM(t,o.get(e)));return()=>{r(),EM(t,null)}},[o,e,t])}function mt(e){let[t,o]=(0,Gf.useState)(null);return Wf(e,o),t}function RH(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 Hn=l(w(),1);function Xve({rootLabelText:e}){let{selectBlock:t,clearSelectedBlock:o}=(0,fC.useDispatch)(_),{clientId:r,parents:n,hasSelection:i}=(0,fC.useSelect)(c=>{let{getSelectionStart:u,getSelectedBlockClientId:d,getEnabledBlockParents:f}=M(c(_)),m=d();return{parents:f(m),clientId:m,hasSelection:!!u().clientId}},[]),s=e||(0,mC._x)("Document","noun, breadcrumb"),a=(0,OH.useRef)();return Wf(r,a),(0,Hn.jsxs)("ul",{className:"block-editor-block-breadcrumb",role:"list","aria-label":(0,mC.__)("Block breadcrumb"),children:[(0,Hn.jsxs)("li",{className:i?void 0:"block-editor-block-breadcrumb__current","aria-current":i?void 0:"true",children:[i&&(0,Hn.jsx)(TM.Button,{size:"small",className:"block-editor-block-breadcrumb__button",onClick:()=>{let c=a.current?.closest(".editor-styles-wrapper");o(),RH(c)?.focus()},children:s}),!i&&(0,Hn.jsx)("span",{children:s}),!!r&&(0,Hn.jsx)(xe,{icon:tu,className:"block-editor-block-breadcrumb__separator"})]}),n.map(c=>(0,Hn.jsxs)("li",{children:[(0,Hn.jsx)(TM.Button,{size:"small",className:"block-editor-block-breadcrumb__button",onClick:()=>t(c),children:(0,Hn.jsx)($v,{clientId:c,maximumLength:35,context:"breadcrumb"})}),(0,Hn.jsx)(xe,{icon:tu,className:"block-editor-block-breadcrumb__separator"})]},c)),!!r&&(0,Hn.jsx)("li",{className:"block-editor-block-breadcrumb__current","aria-current":"true",children:(0,Hn.jsx)($v,{clientId:r,maximumLength:35,context:"breadcrumb"})})]})}var AH=Xve;var LH=l(F(),1);function NH(e){return(0,LH.useSelect)(t=>{let{__unstableHasActiveBlockOverlayActive:o}=t(_);return o(e)},[e])}var vT=l(Z(),1),GQ=l(P(),1),WQ=l(F(),1),$Q=l(A(),1);var Gi=l(F(),1),KB=l(Z(),1),ed=l(P(),1),tq=l($(),1);var Nu=l(P(),1),Ge=l($(),1),s9=l(A(),1),s1=l(F(),1),a9=l(Z(),1),l9=l(Fe(),1);var Tl=l(N(),1),hC=l(A(),1),$f=l(P(),1),uh=l($(),1),gC=l(F(),1);var GH=l(zH(),1),pC=l(N(),1),WH=l($(),1);var jH=l(A(),1),UH=l(P(),1),HH=l(Fe(),1),ha=l(w(),1);function PM({title:e,rawContent:t,renderedContent:o,action:r,actionText:n,className:i}){return(0,ha.jsxs)("div",{className:i,children:[(0,ha.jsxs)("div",{className:"block-editor-block-compare__content",children:[(0,ha.jsx)("h2",{className:"block-editor-block-compare__heading",children:e}),(0,ha.jsx)("div",{className:"block-editor-block-compare__html",children:t}),(0,ha.jsx)("div",{className:"block-editor-block-compare__preview edit-post-visual-editor",children:(0,ha.jsx)(UH.RawHTML,{children:(0,HH.safeHTML)(o)})})]}),(0,ha.jsx)("div",{className:"block-editor-block-compare__action",children:(0,ha.jsx)(jH.Button,{__next40pxDefaultSize:!0,variant:"secondary",tabIndex:"0",onClick:r,children:n})})]})}var ch=l(w(),1);function rye({block:e,onKeep:t,onConvert:o,convertor:r,convertButtonText:n}){function i(u,d){return(0,GH.diffChars)(u,d).map((m,h)=>{let p=V({"block-editor-block-compare__added":m.added,"block-editor-block-compare__removed":m.removed});return(0,ch.jsx)("span",{className:p,children:m.value},h)})}function s(u){return(Array.isArray(u)?u:[u]).map(m=>(0,WH.getSaveContent)(m.name,m.attributes,m.innerBlocks)).join("")}let a=s(r(e)),c=i(e.originalContent,a);return(0,ch.jsxs)("div",{className:"block-editor-block-compare__wrapper",children:[(0,ch.jsx)(PM,{title:(0,pC.__)("Current"),className:"block-editor-block-compare__current",action:t,actionText:(0,pC.__)("Convert to HTML"),rawContent:e.originalContent,renderedContent:e.originalContent}),(0,ch.jsx)(PM,{title:(0,pC.__)("After Conversion"),className:"block-editor-block-compare__converted",action:o,actionText:n,rawContent:c,renderedContent:a})]})}var $H=rye;var Il=l(w(),1),KH=e=>(0,uh.rawHandler)({HTML:e.originalContent});function YH({clientId:e}){let{block:t,canInsertHTMLBlock:o,canInsertClassicBlock:r}=(0,gC.useSelect)(d=>{let{canInsertBlockType:f,getBlock:m,getBlockRootClientId:h}=d(_),p=h(e);return{block:m(e),canInsertHTMLBlock:f("core/html",p),canInsertClassicBlock:f("core/freeform",p)}},[e]),{replaceBlock:n}=(0,gC.useDispatch)(_),[i,s]=(0,$f.useState)(!1),a=(0,$f.useCallback)(()=>s(!1),[]),c=(0,$f.useMemo)(()=>({toClassic(){let d=(0,uh.createBlock)("core/freeform",{content:t.originalContent});return n(t.clientId,d)},toHTML(){let d=(0,uh.createBlock)("core/html",{content:t.originalContent});return n(t.clientId,d)},toBlocks(){let d=KH(t);return n(t.clientId,d)},toRecoveredBlock(){let d=(0,uh.createBlock)(t.name,t.attributes,t.innerBlocks);return n(t.clientId,d)}}),[t,n]),u=(0,$f.useMemo)(()=>[{title:(0,Tl._x)("Resolve","imperative verb"),onClick:()=>s(!0)},o&&{title:(0,Tl.__)("Convert to HTML"),onClick:c.toHTML},r&&{title:(0,Tl.__)("Convert to Classic Block"),onClick:c.toClassic}].filter(Boolean),[o,r,c]);return(0,Il.jsxs)(Il.Fragment,{children:[(0,Il.jsx)(pu,{actions:[(0,Il.jsx)(hC.Button,{__next40pxDefaultSize:!0,onClick:c.toRecoveredBlock,variant:"primary",children:(0,Tl.__)("Attempt recovery")},"recover")],secondaryActions:u,children:(0,Tl.__)("Block contains unexpected or invalid content.")}),i&&(0,Il.jsx)(hC.Modal,{title:(0,Tl.__)("Resolve Block"),onRequestClose:a,className:"block-editor-block-compare",children:(0,Il.jsx)($H,{block:t,onKeep:c.toHTML,onConvert:c.toBlocks,convertor:KH,convertButtonText:(0,Tl.__)("Convert to Blocks")})})]})}var qH=l(N(),1);var ZH=l(w(),1),nye=(0,ZH.jsx)(pu,{className:"block-editor-block-list__block-crash-warning",children:(0,qH.__)("This block has encountered an error and cannot be previewed.")}),XH=()=>nye;var QH=l(P(),1),iye=class extends QH.Component{constructor(){super(...arguments),this.state={hasError:!1}}componentDidCatch(){this.setState({hasError:!0})}render(){return this.state.hasError?this.props.fallback:this.props.children}},JH=iye;var k8=l(AM(),1),yC=l(P(),1),SC=l(F(),1),ga=l($(),1);var v8=l(w(),1);function gye({clientId:e}){let[t,o]=(0,yC.useState)(""),r=(0,SC.useSelect)(s=>s(_).getBlock(e),[e]),{updateBlock:n}=(0,SC.useDispatch)(_),i=()=>{let s=(0,ga.getBlockType)(r.name);if(!s)return;let a=(0,ga.getBlockAttributes)(s,t,r.attributes),c=t||(0,ga.getSaveContent)(s,a),[u]=t?(0,ga.validateBlock)({...r,attributes:a,originalContent:c}):[!0];n(e,{attributes:a,originalContent:c,isValid:u}),t||o(c)};return(0,yC.useEffect)(()=>{o((0,ga.getBlockContent)(r))},[r]),(0,v8.jsx)(k8.default,{className:"block-editor-block-list__block-html-textarea",value:t,onBlur:i,onChange:s=>o(s.target.value)})}var y8=gye;var r9=l(P(),1),r1=l(N(),1),n9=l($(),1),n1=l(Z(),1),i9=l(Zv(),1);var NM=Qv(),ye=e=>Xv(e,NM),MM=Qv();ye.write=e=>Xv(e,MM);var _C=Qv();ye.onStart=e=>Xv(e,_C);var DM=Qv();ye.onFrame=e=>Xv(e,DM);var VM=Qv();ye.onFinish=e=>Xv(e,VM);var dh=[];ye.setTimeout=(e,t)=>{let o=ye.now()+t,r=()=>{let i=dh.findIndex(s=>s.cancel==r);~i&&dh.splice(i,1),Bu-=~i?1:0},n={time:o,handler:e,cancel:r};return dh.splice(_8(o),0,n),Bu+=1,x8(),n};var _8=e=>~(~dh.findIndex(t=>t.time>e)||~dh.length);ye.cancel=e=>{_C.delete(e),DM.delete(e),VM.delete(e),NM.delete(e),MM.delete(e)};ye.sync=e=>{LM=!0,ye.batchedUpdates(e),LM=!1};ye.throttle=e=>{let t;function o(){try{e(...t)}finally{t=null}}function r(...n){t=n,ye.onStart(o)}return r.handler=e,r.cancel=()=>{_C.delete(o),t=null},r};var FM=typeof window<"u"?window.requestAnimationFrame:()=>{};ye.use=e=>FM=e;ye.now=typeof performance<"u"?()=>performance.now():Date.now;ye.batchedUpdates=e=>e();ye.catch=console.error;ye.frameLoop="always";ye.advance=()=>{ye.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):C8()};var Cu=-1,Bu=0,LM=!1;function Xv(e,t){LM?(t.delete(e),e(0)):(t.add(e),x8())}function x8(){Cu<0&&(Cu=0,ye.frameLoop!=="demand"&&FM(w8))}function bye(){Cu=-1}function w8(){~Cu&&(FM(w8),ye.batchedUpdates(C8))}function C8(){let e=Cu;Cu=ye.now();let t=_8(Cu);if(t&&(B8(dh.splice(0,t),o=>o.handler()),Bu-=t),!Bu){bye();return}_C.flush(),NM.flush(e?Math.min(64,Cu-e):16.667),DM.flush(),MM.flush(),VM.flush()}function Qv(){let e=new Set,t=e;return{add(o){Bu+=t==e&&!e.has(o)?1:0,e.add(o)},delete(o){return Bu-=t==e&&e.has(o)?1:0,e.delete(o)},flush(o){t.size&&(e=new Set,Bu-=t.size,B8(t,r=>r(o)&&e.add(r)),Bu+=e.size,t=e)}}}function B8(e,t){e.forEach(o=>{try{t(o)}catch(r){ye.catch(r)}})}var Oi=l(zr());function EC(){}var O8=(e,t,o)=>Object.defineProperty(e,t,{value:o,writable:!0,configurable:!0}),ie={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 ba(e,t){if(ie.arr(e)){if(!ie.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 kt=(e,t)=>e.forEach(t);function Ai(e,t,o){if(ie.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 pn=e=>ie.und(e)?[]:ie.arr(e)?e:[e];function hh(e,t){if(e.size){let o=Array.from(e);e.clear(),kt(o,t)}}var gh=(e,...t)=>hh(e,o=>o(...t)),WM=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),$M,A8,Eu=null,L8=!1,KM=EC,kye=e=>{e.to&&(A8=e.to),e.now&&(ye.now=e.now),e.colors!==void 0&&(Eu=e.colors),e.skipAnimation!=null&&(L8=e.skipAnimation),e.createStringInterpolator&&($M=e.createStringInterpolator),e.requestAnimationFrame&&ye.use(e.requestAnimationFrame),e.batchedUpdates&&(ye.batchedUpdates=e.batchedUpdates),e.willAdvance&&(KM=e.willAdvance),e.frameLoop&&(ye.frameLoop=e.frameLoop)},Gn=Object.freeze({__proto__:null,get createStringInterpolator(){return $M},get to(){return A8},get colors(){return Eu},get skipAnimation(){return L8},get willAdvance(){return KM},assign:kye}),Jv=new Set,Ri=[],zM=[],CC=0,bh={get idle(){return!Jv.size&&!Ri.length},start(e){CC>e.priority?(Jv.add(e),ye.onStart(vye)):(N8(e),ye(HM))},advance:HM,sort(e){if(CC)ye.onFrame(()=>bh.sort(e));else{let t=Ri.indexOf(e);~t&&(Ri.splice(t,1),M8(e))}},clear(){Ri=[],Jv.clear()}};function vye(){Jv.forEach(N8),Jv.clear(),ye(HM)}function N8(e){Ri.includes(e)||M8(e)}function M8(e){Ri.splice(yye(Ri,t=>t.priority>e.priority),0,e)}function HM(e){let t=zM;for(let o=0;o<Ri.length;o++){let r=Ri[o];CC=r.priority,r.idle||(KM(r),r.advance(e),r.idle||t.push(r))}return CC=0,zM=Ri,zM.length=0,Ri=t,Ri.length>0}function yye(e,t){let o=e.findIndex(t);return o<0?e.length:o}var D8={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},Bs="[-+]?\\d*\\.?\\d+",BC=Bs+"%";function TC(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var Sye=new RegExp("rgb"+TC(Bs,Bs,Bs)),_ye=new RegExp("rgba"+TC(Bs,Bs,Bs,Bs)),xye=new RegExp("hsl"+TC(Bs,BC,BC)),wye=new RegExp("hsla"+TC(Bs,BC,BC,Bs)),Cye=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Bye=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Eye=/^#([0-9a-fA-F]{6})$/,Tye=/^#([0-9a-fA-F]{8})$/;function Iye(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=Eye.exec(e))?parseInt(t[1]+"ff",16)>>>0:Eu&&Eu[e]!==void 0?Eu[e]:(t=Sye.exec(e))?(fh(t[1])<<24|fh(t[2])<<16|fh(t[3])<<8|255)>>>0:(t=_ye.exec(e))?(fh(t[1])<<24|fh(t[2])<<16|fh(t[3])<<8|I8(t[4]))>>>0:(t=Cye.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=Tye.exec(e))?parseInt(t[1],16)>>>0:(t=Bye.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=xye.exec(e))?(E8(T8(t[1]),xC(t[2]),xC(t[3]))|255)>>>0:(t=wye.exec(e))?(E8(T8(t[1]),xC(t[2]),xC(t[3]))|I8(t[4]))>>>0:null}function jM(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 E8(e,t,o){let r=o<.5?o*(1+t):o+t-o*t,n=2*o-r,i=jM(n,r,e+1/3),s=jM(n,r,e),a=jM(n,r,e-1/3);return Math.round(i*255)<<24|Math.round(s*255)<<16|Math.round(a*255)<<8}function fh(e){let t=parseInt(e,10);return t<0?0:t>255?255:t}function T8(e){return(parseFloat(e)%360+360)%360/360}function I8(e){let t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function xC(e){let t=parseFloat(e);return t<0?0:t>100?1:t/100}function P8(e){let t=Iye(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 Tu=(e,t,o)=>{if(ie.fun(e))return e;if(ie.arr(e))return Tu({range:e,output:t,extrapolate:o});if(ie.str(e.output[0]))return $M(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=Rye(u,i);return Pye(u,i[d],i[d+1],n[d],n[d+1],c,s,a,r.map)}};function Pye(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 Rye(e,t){for(var o=1;o<t.length-1&&!(t[o]>=e);++o);return o-1}function GM(){return GM=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},GM.apply(this,arguments)}var mh=Symbol.for("FluidValue.get"),Kf=Symbol.for("FluidValue.observers"),jr=e=>!!(e&&e[mh]),mr=e=>e&&e[mh]?e[mh]():e,YM=e=>e[Kf]||null;function Oye(e,t){e.eventObserved?e.eventObserved(t):e(t)}function Yf(e,t){let o=e[Kf];o&&o.forEach(r=>{Oye(r,t)})}var ph=class{constructor(t){if(this[mh]=void 0,this[Kf]=void 0,!t&&!(t=this.get))throw Error("Unknown getter");Aye(this,t)}},Aye=(e,t)=>V8(e,mh,t);function Iu(e,t){if(e[mh]){let o=e[Kf];o||V8(e,Kf,o=new Set),o.has(t)||(o.add(t),e.observerAdded&&e.observerAdded(o.size,t))}return t}function Pu(e,t){let o=e[Kf];if(o&&o.has(t)){let r=o.size-1;r?o.delete(t):e[Kf]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var V8=(e,t,o)=>Object.defineProperty(e,t,{value:o,writable:!0,configurable:!0}),wC=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Lye=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,R8=new RegExp(`(${wC.source})(%|[a-z]+)`,"i"),Nye=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,IC=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,F8=e=>{let[t,o]=Mye(e);if(!t||WM())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&&IC.test(o))return F8(o);if(o)return o}return e},Mye=e=>{let t=IC.exec(e);if(!t)return[,];let[,o,r]=t;return[o,r]},UM,Dye=(e,t,o,r,n)=>`rgba(${Math.round(t)}, ${Math.round(o)}, ${Math.round(r)}, ${n})`,PC=e=>{UM||(UM=Eu?new RegExp(`(${Object.keys(Eu).join("|")})(?!\\w)`,"g"):/^\b$/);let t=e.output.map(i=>mr(i).replace(IC,F8).replace(Lye,P8).replace(UM,P8)),o=t.map(i=>i.match(wC).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=>Tu(GM({},e,{output:i})));return i=>{var s;let a=!R8.test(t[0])&&((s=t.find(u=>R8.test(u)))==null?void 0:s.replace(wC,"")),c=0;return t[0].replace(wC,()=>`${n[c++](i)}${a||""}`).replace(Nye,Dye)}},z8="react-spring: ",j8=e=>{let t=e,o=!1;if(typeof t!="function")throw new TypeError(`${z8}once requires a function parameter`);return(...r)=>{o||(t(...r),o=!0)}},Vye=j8(console.warn);function U8(){Vye(`${z8}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var jze=j8(console.warn);function kh(e){return ie.str(e)&&(e[0]=="#"||/\d/.test(e)||!WM()&&IC.test(e)||e in(Eu||{}))}var ey=WM()?Oi.useEffect:Oi.useLayoutEffect,Fye=()=>{let e=(0,Oi.useRef)(!1);return ey(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function qM(){let e=(0,Oi.useState)()[1],t=Fye();return()=>{t.current&&e(Math.random())}}function H8(e,t){let[o]=(0,Oi.useState)(()=>({inputs:t,result:e()})),r=(0,Oi.useRef)(),n=r.current,i=n;return i?t&&i.inputs&&zye(t,i.inputs)||(i={inputs:t,result:e()}):i=o,(0,Oi.useEffect)(()=>{r.current=i,n==o&&(o.inputs=o.result=void 0)},[i]),i.result}function zye(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 ZM=e=>(0,Oi.useEffect)(e,jye),jye=[];var uy=l(zr()),dy=l(zr());var K8=l(zr()),Rl=l(zr()),ty=Symbol.for("Animated:node"),Uye=e=>!!e&&e[ty]===e,Es=e=>e&&e[ty],LC=(e,t)=>O8(e,ty,t),oy=e=>e&&e[ty]&&e[ty].getPayload(),RC=class{constructor(){this.payload=void 0,LC(this,this)}getPayload(){return this.payload||[]}},qf=class e extends RC{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,ie.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 ie.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,ie.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,t&&(this.lastVelocity=null),this.v0=null)}},Zf=class e extends qf{constructor(t){super(0),this._string=null,this._toString=void 0,this._toString=Tu({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(ie.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=Tu({output:[this.getValue(),t]})),this._value=0,super.reset()}},OC={dependencies:null},Xf=class extends RC{constructor(t){super(),this.source=t,this.setValue(t)}getValue(t){let o={};return Ai(this.source,(r,n)=>{Uye(r)?o[n]=r.getValue(t):jr(r)?o[n]=mr(r):t||(o[n]=r)}),o}setValue(t){this.source=t,this.payload=this._makePayload(t)}reset(){this.payload&&kt(this.payload,t=>t.reset())}_makePayload(t){if(t){let o=new Set;return Ai(t,this._addToPayload,o),Array.from(o)}}_addToPayload(t){OC.dependencies&&jr(t)&&OC.dependencies.add(t);let o=oy(t);o&&kt(o,r=>this.add(r))}},XM=class e extends Xf{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(Hye)),!0)}};function Hye(e){return(kh(e)?Zf:qf).create(e)}function NC(e){let t=Es(e);return t?t.constructor:ie.arr(e)?XM:kh(e)?Zf:qf}function AC(){return AC=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},AC.apply(this,arguments)}var G8=(e,t)=>{let o=!ie.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,Rl.forwardRef)((r,n)=>{let i=(0,Rl.useRef)(null),s=o&&(0,Rl.useCallback)(p=>{i.current=Wye(n,p)},[n]),[a,c]=Gye(r,t),u=qM(),d=()=>{let p=i.current;if(o&&!p)return;(p?t.applyAnimatedValues(p,a.getValue(!0)):!1)===!1&&u()},f=new QM(d,c),m=(0,Rl.useRef)();ey(()=>(m.current=f,kt(c,p=>Iu(p,f)),()=>{m.current&&(kt(m.current.deps,p=>Pu(p,m.current)),ye.cancel(m.current.update))})),(0,Rl.useEffect)(d,[]),ZM(()=>()=>{let p=m.current;kt(p.deps,g=>Pu(g,p))});let h=t.getComponentProps(a.getValue());return K8.createElement(e,AC({},h,{ref:s}))})},QM=class{constructor(t,o){this.update=t,this.deps=o}eventObserved(t){t.type=="change"&&ye.write(this.update)}};function Gye(e,t){let o=new Set;return OC.dependencies=o,e.style&&(e=AC({},e,{style:t.createAnimatedStyle(e.style)})),e=new Xf(e),OC.dependencies=null,[e,o]}function Wye(e,t){return e&&(ie.fun(e)?e(t):e.current=t),t}var W8=Symbol.for("AnimatedComponent"),Y8=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:o=n=>new Xf(n),getComponentProps:r=n=>n}={})=>{let n={applyAnimatedValues:t,createAnimatedStyle:o,getComponentProps:r},i=s=>{let a=$8(s)||"Anonymous";return ie.str(s)?s=i[s]||(i[s]=G8(s,n)):s=s[W8]||(s[W8]=G8(s,n)),s.displayName=`Animated(${a})`,s};return Ai(e,(s,a)=>{ie.arr(e)&&(a=$8(s)),i[a]=i(s)}),{animated:i}},$8=e=>ie.str(e)?e:e&&ie.str(e.displayName)?e.displayName:ie.fun(e)&&e.name||null;function Ur(){return Ur=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},Ur.apply(this,arguments)}function Qf(e,...t){return ie.fun(e)?e(...t):e}var sy=(e,t)=>e===!0||!!(t&&e&&(ie.fun(e)?e(t):pn(e).includes(t))),s7=(e,t)=>ie.obj(e)?t&&e[t]:e,a7=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,$ye=e=>e,l7=(e,t=$ye)=>{let o=Kye;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);ie.und(i)||(r[n]=i)}return r},Kye=["config","onProps","onStart","onChange","onPause","onResume","onRest"],Yye={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 qye(e){let t={},o=0;if(Ai(e,(r,n)=>{Yye[n]||(t[n]=r,o++)}),o)return t}function c7(e){let t=qye(e);if(t){let o={to:t};return Ai(e,(r,n)=>n in t||(o[n]=r)),o}return Ur({},e)}function ay(e){return e=mr(e),ie.arr(e)?e.map(ay):kh(e)?Gn.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function tD(e){return ie.fun(e)||ie.arr(e)&&ie.obj(e[0])}var Zye={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}},VC=1.70158,MC=VC*1.525,q8=VC+1,Z8=2*Math.PI/3,X8=2*Math.PI/4.5,DC=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,Xye={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=>q8*e*e*e-VC*e*e,easeOutBack:e=>1+q8*Math.pow(e-1,3)+VC*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((MC+1)*2*e-MC)/2:(Math.pow(2*e-2,2)*((MC+1)*(e*2-2)+MC)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*Z8),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*Z8)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*X8))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*X8)/2+1,easeInBounce:e=>1-DC(1-e),easeOutBounce:DC,easeInOutBounce:e=>e<.5?(1-DC(1-2*e))/2:(1+DC(2*e-1))/2},oD=Ur({},Zye.default,{mass:1,damping:1,easing:Xye.linear,clamp:!1}),rD=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,oD)}};function Qye(e,t,o){o&&(o=Ur({},o),Q8(o,t),t=Ur({},o,t)),Q8(e,t),Object.assign(e,t);for(let s in oD)e[s]==null&&(e[s]=oD[s]);let{mass:r,frequency:n,damping:i}=e;return ie.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 Q8(e,t){if(!ie.und(t.decay))e.duration=void 0;else{let o=!ie.und(t.tension)||!ie.und(t.friction);(o||!ie.und(t.frequency)||!ie.und(t.damping)||!ie.und(t.mass))&&(e.duration=void 0,e.decay=void 0),o&&(e.frequency=void 0)}}var J8=[],nD=class{constructor(){this.changed=!1,this.values=J8,this.toValues=null,this.fromValues=J8,this.to=void 0,this.from=void 0,this.config=new rD,this.immediate=!1}};function u7(e,{key:t,props:o,defaultProps:r,state:n,actions:i}){return new Promise((s,a)=>{var c;let u,d,f=sy((c=o.cancel)!=null?c:r?.cancel,t);if(f)p();else{ie.und(o.pause)||(n.paused=sy(o.pause,t));let g=r?.pause;g!==!0&&(g=n.paused||sy(g,t)),u=Qf(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-ye.now()}function h(){u>0&&!Gn.skipAnimation?(n.delayed=!0,d=ye.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(Ur({},o,{callId:e,cancel:f}),s)}catch(g){a(g)}}})}var dD=(e,t)=>t.length==1?t[0]:t.some(o=>o.cancelled)?vh(e.get()):t.every(o=>o.noop)?d7(e.get()):Ts(e.get(),t.every(o=>o.finished)),d7=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),Ts=(e,t,o=!1)=>({value:e,finished:t,cancelled:o}),vh=e=>({value:e,cancelled:!0,finished:!1});function f7(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=l7(t,(b,v)=>v==="onRest"?void 0:b),d,f,m=new Promise((b,v)=>(d=b,f=v)),h=b=>{let v=n<=(o.cancelId||0)&&vh(r)||n!==o.asyncId&&Ts(r,!1);if(v)throw b.result=v,f(b),b},p=(b,v)=>{let k=new FC,y=new zC;return(async()=>{if(Gn.skipAnimation)throw ly(o),y.result=Ts(r,!1),f(y),y;h(k);let S=ie.obj(b)?Ur({},b):Ur({},v,{to:b});S.parentId=n,Ai(u,(C,B)=>{ie.und(S[B])&&(S[B]=C)});let x=await r.start(S);return h(k),o.paused&&await new Promise(C=>{o.resumeQueue.add(C)}),x})()},g;if(Gn.skipAnimation)return ly(o),Ts(r,!1);try{let b;ie.arr(e)?b=(async v=>{for(let k of v)await p(k)})(e):b=Promise.resolve(e(p,r.stop.bind(r))),await Promise.all([b.then(d),m]),g=Ts(r.get(),!0,!1)}catch(b){if(b instanceof FC)g=b.result;else if(b instanceof zC)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 ie.fun(s)&&ye.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 FC=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}},zC=class extends Error{constructor(){super("SkipAnimationSignal"),this.result=void 0}},iD=e=>e instanceof cy,Jye=1,cy=class extends ph{constructor(...t){super(...t),this.id=Jye++,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=Es(this);return t&&t.getValue()}to(...t){return Gn.to(this,t)}interpolate(...t){return U8(),Gn.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){Yf(this,{type:"change",parent:this,value:t,idle:o})}_onPriorityChange(t){this.idle||bh.sort(this),Yf(this,{type:"priority",parent:this,priority:t})}},Jf=Symbol.for("SpringPhase"),m7=1,sD=2,aD=4,JM=e=>(e[Jf]&m7)>0,Ru=e=>(e[Jf]&sD)>0,ry=e=>(e[Jf]&aD)>0,e7=(e,t)=>t?e[Jf]|=sD|m7:e[Jf]&=~sD,t7=(e,t)=>t?e[Jf]|=aD:e[Jf]&=~aD,lD=class extends cy{constructor(t,o){if(super(),this.key=void 0,this.animation=new nD,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,!ie.und(t)||!ie.und(o)){let r=ie.obj(t)?Ur({},t):Ur({},o,{from:t});ie.und(r.default)&&(r.default=!0),this.start(r)}}get idle(){return!(Ru(this)||this._state.asyncTo)||ry(this)}get goal(){return mr(this.animation.to)}get velocity(){let t=Es(this);return t instanceof qf?t.lastVelocity||0:t.getPayload().map(o=>o.lastVelocity||0)}get hasAnimated(){return JM(this)}get isAnimating(){return Ru(this)}get isPaused(){return ry(this)}get isDelayed(){return this._state.delayed}advance(t){let o=!0,r=!1,n=this.animation,{config:i,toValues:s}=n,a=oy(n.to);!a&&jr(n.to)&&(s=pn(mr(n.to))),n.values.forEach((d,f)=>{if(d.done)return;let m=d.constructor==Zf?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],v=d.v0!=null?d.v0:d.v0=ie.arr(i.velocity)?i.velocity[f]:i.velocity,k,y=i.precision||(b==m?.005:Math.min(1,Math.abs(m-b)*.001));if(ie.und(i.duration))if(i.decay){let S=i.decay===!0?.998:i.decay,x=Math.exp(-(1-S)*g);p=b+v/(1-S)*(1-x),h=Math.abs(d.lastPosition-p)<=y,k=v*x}else{k=d.lastVelocity==null?v:d.lastVelocity;let S=i.restVelocity||y/10,x=i.clamp?0:i.bounce,C=!ie.und(x),B=b==m?d.v0>0:b<m,I,O=!1,E=1,L=Math.ceil(t/E);for(let T=0;T<L&&(I=Math.abs(k)>S,!(!I&&(h=Math.abs(m-p)<=y,h)));++T){C&&(O=p==m||p>m==B,O&&(k=-k*x,p=m));let R=-i.tension*1e-6*(p-m),D=-i.friction*.001*k,j=(R+D)/i.mass;k=k+j*E,p=p+k*E}}else{let S=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)),S=(i.progress||0)+g/this._memoizedDuration,S=S>1?1:S<0?0:S,d.durationProgress=S),p=b+i.easing(S)*(m-b),k=(p-d.lastPosition)/t,h=S==1}d.lastVelocity=k,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=Es(this),u=c.getValue();if(o){let d=mr(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 ye.batchedUpdates(()=>{this._stop(),this._focus(t),this._set(t)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(Ru(this)){let{to:t,config:o}=this.animation;ye.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 ie.und(t)?(r=this.queue||[],this.queue=[]):r=[ie.obj(t)?t:Ur({},o,{to:t})],Promise.all(r.map(n=>this._update(n))).then(n=>dD(this,n))}stop(t){let{to:o}=this.animation;return this._focus(this.get()),ly(this._state,t&&this._lastCallId),ye.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=ie.obj(r)?r[o]:r,(r==null||tD(r))&&(r=void 0),n=ie.obj(n)?n[o]:n,n==null&&(n=void 0);let i={to:r,from:n};return JM(this)||(t.reverse&&([r,n]=[n,r]),n=mr(n),ie.und(n)?Es(this)||this._set(r):this._set(n)),i}_update(t,o){let r=Ur({},t),{key:n,defaultProps:i}=this;r.default&&Object.assign(i,l7(r,(c,u)=>/^on/.test(u)?s7(c,n):c)),r7(this,r,"onProps"),iy(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 u7(++this._lastCallId,{key:n,props:r,defaultProps:i,state:a,actions:{pause:()=>{ry(this)||(t7(this,!0),gh(a.pauseQueue),iy(this,"onPause",Ts(this,ny(this,this.animation.to)),this))},resume:()=>{ry(this)&&(t7(this,!1),Ru(this)&&this._resume(),gh(a.resumeQueue),iy(this,"onResume",Ts(this,ny(this,this.animation.to)),this))},start:this._merge.bind(this,s)}}).then(c=>{if(r.loop&&c.finished&&!(o&&c.noop)){let u=p7(r);if(u)return this._update(u,!0)}return c})}_merge(t,o,r){if(o.cancel)return this.stop(!0),r(vh(this));let n=!ie.und(t.to),i=!ie.und(t.from);if(n||i)if(o.callId>this._lastToId)this._lastToId=o.callId;else return r(vh(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||ie.und(f))&&(f=m),o.reverse&&([f,m]=[m,f]);let h=!ba(m,d);h&&(c.from=m),m=mr(m);let p=!ba(f,u);p&&this._focus(f);let g=tD(o.to),{config:b}=c,{decay:v,velocity:k}=b;(n||i)&&(b.velocity=0),o.config&&!g&&Qye(b,Qf(o.config,s),o.config!==a.config?Qf(a.config,s):void 0);let y=Es(this);if(!y||ie.und(f))return r(Ts(this,!0));let S=ie.und(o.reset)?i&&!o.default:!ie.und(m)&&sy(o.reset,s),x=S?m:this.get(),C=ay(f),B=ie.num(C)||ie.arr(C)||kh(C),I=!g&&(!B||sy(a.immediate||o.immediate,s));if(p){let T=NC(f);if(T!==y.constructor)if(I)y=this._set(C);else throw Error(`Cannot animate between ${y.constructor.name} and ${T.name}, as the "to" prop suggests`)}let O=y.constructor,E=jr(f),L=!1;if(!E){let T=S||!JM(this)&&h;(p||T)&&(L=ba(ay(x),C),E=!L),(!ba(c.immediate,I)&&!I||!ba(b.decay,v)||!ba(b.velocity,k))&&(E=!0)}if(L&&Ru(this)&&(c.changed&&!S?E=!0:E||this._stop(u)),!g&&((E||jr(u))&&(c.values=y.getPayload(),c.toValues=jr(f)?null:O==Zf?[1]:pn(C)),c.immediate!=I&&(c.immediate=I,!I&&!S&&this._set(u)),E)){let{onRest:T}=c;kt(eSe,D=>r7(this,o,D));let R=Ts(this,ny(this,u));gh(this._pendingCalls,R),this._pendingCalls.add(r),c.changed&&ye.batchedUpdates(()=>{c.changed=!S,T?.(R,this),S?Qf(a.onRest,R):c.onStart==null||c.onStart(R,this)})}S&&this._set(x),g?r(f7(o.to,o,this._state,this)):E?this._start():Ru(this)&&!p?this._pendingCalls.add(r):r(d7(x))}_focus(t){let o=this.animation;t!==o.to&&(YM(this)&&this._detach(),o.to=t,YM(this)&&this._attach())}_attach(){let t=0,{to:o}=this.animation;jr(o)&&(Iu(o,this),iD(o)&&(t=o.priority+1)),this.priority=t}_detach(){let{to:t}=this.animation;jr(t)&&Pu(t,this)}_set(t,o=!0){let r=mr(t);if(!ie.und(r)){let n=Es(this);if(!n||!ba(r,n.getValue())){let i=NC(r);!n||n.constructor!=i?LC(this,i.create(r)):n.setValue(r),n&&ye.batchedUpdates(()=>{this._onChange(r,o)})}}return Es(this)}_onStart(){let t=this.animation;t.changed||(t.changed=!0,iy(this,"onStart",Ts(this,ny(this,t.to)),this))}_onChange(t,o){o||(this._onStart(),Qf(this.animation.onChange,t,this)),Qf(this.defaultProps.onChange,t,this),super._onChange(t,o)}_start(){let t=this.animation;Es(this).reset(mr(t.to)),t.immediate||(t.fromValues=t.values.map(o=>o.lastPosition)),Ru(this)||(e7(this,!0),ry(this)||this._resume())}_resume(){Gn.skipAnimation?this.finish():bh.start(this)}_stop(t,o){if(Ru(this)){e7(this,!1);let r=this.animation;kt(r.values,i=>{i.done=!0}),r.toValues&&(r.onChange=r.onPause=r.onResume=void 0),Yf(this,{type:"idle",parent:this});let n=o?vh(this.get()):Ts(this.get(),ny(this,t??r.to));gh(this._pendingCalls,n),r.changed&&(r.changed=!1,iy(this,"onRest",n,this))}}};function ny(e,t){let o=ay(t),r=ay(e.get());return ba(r,o)}function p7(e,t=e.loop,o=e.to){let r=Qf(t);if(r){let n=r!==!0&&c7(r),i=(n||e).reverse,s=!n||n.reset;return cD(Ur({},e,{loop:t,default:!1,pause:void 0,to:!i||tD(o)?o:void 0,from:s?e.from:void 0,reset:s},n))}}function cD(e){let{to:t,from:o}=e=c7(e),r=new Set;return ie.obj(t)&&o7(t,r),ie.obj(o)&&o7(o,r),e.keys=r.size?Array.from(r):null,e}function o7(e,t){Ai(e,(o,r)=>o!=null&&t.add(r))}var eSe=["onStart","onRest","onChange","onPause","onResume"];function r7(e,t,o){e.animation[o]=t[o]!==a7(t,o)?s7(t[o],e.key):void 0}function iy(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 tSe=["onStart","onChange","onRest"],oSe=1,jC=class{constructor(t,o){this.id=oSe++,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(Ur({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];ie.und(r)||this.springs[o].set(r)}}update(t){return t&&this.queue.push(cD(t)),this}start(t){let{queue:o}=this;return t?o=pn(t).map(cD):this.queue=[],this._flush?this._flush(this,o):(g7(this,o),rSe(this,o))}stop(t,o){if(t!==!!t&&(o=t),o){let r=this.springs;kt(pn(o),n=>r[n].stop(!!t))}else ly(this._state,this._lastAsyncId),this.each(r=>r.stop(!!t));return this}pause(t){if(ie.und(t))this.start({pause:!0});else{let o=this.springs;kt(pn(t),r=>o[r].pause())}return this}resume(t){if(ie.und(t))this.start({pause:!1});else{let o=this.springs;kt(pn(t),r=>o[r].resume())}return this}each(t){Ai(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;ye.onFrame(this._onFrame)}};function rSe(e,t){return Promise.all(t.map(o=>h7(e,o))).then(o=>dD(e,o))}async function h7(e,t,o){let{keys:r,to:n,from:i,loop:s,onRest:a,onResolve:c}=t,u=ie.obj(t.default)&&t.default;s&&(t.loop=!1),n===!1&&(t.to=null),i===!1&&(t.from=null);let d=ie.arr(n)||ie.fun(n)?n:void 0;d?(t.to=void 0,t.onRest=void 0,u&&(u.onRest=void 0)):kt(tSe,g=>{let b=t[g];if(ie.fun(b)){let v=e._events[g];t[g]=({finished:k,cancelled:y})=>{let S=v.get(b);S?(k||(S.finished=!1),y&&(S.cancelled=!0)):v.set(b,{value:null,finished:k||!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||a7(t,"cancel")===!0;(d||h&&f.asyncId)&&m.push(u7(++e._lastAsyncId,{props:t,state:f,actions:{pause:EC,resume:EC,start(g,b){h?(ly(f,e._lastAsyncId),b(vh(e))):(g.onRest=a,b(f7(d,g,f,e)))}}})),f.paused&&await new Promise(g=>{f.resumeQueue.add(g)});let p=dD(e,await Promise.all(m));if(s&&p.finished&&!(o&&p.noop)){let g=p7(t,s,n);if(g)return g7(e,[g]),h7(e,g,!0)}return c&&ye.batchedUpdates(()=>c(p,e,e.item)),p}function nSe(e,t){let o=new lD;return o.key=e,t&&Iu(o,t),o}function iSe(e,t,o){t.keys&&kt(t.keys,r=>{(e[r]||(e[r]=o(r)))._prepareNode(t)})}function g7(e,t){kt(t,o=>{iSe(e.springs,o,r=>nSe(r,e))})}function sSe(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 aSe=["children"],fD=e=>{let{children:t}=e,o=sSe(e,aSe),r=(0,dy.useContext)(UC),n=o.pause||!!r.pause,i=o.immediate||!!r.immediate;o=H8(()=>({pause:n,immediate:i}),[n,i]);let{Provider:s}=UC;return uy.createElement(s,{value:o},t)},UC=lSe(fD,{});fD.Provider=UC.Provider;fD.Consumer=UC.Consumer;function lSe(e,t){return Object.assign(e,uy.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var n7;(function(e){e.MOUNT="mount",e.ENTER="enter",e.UPDATE="update",e.LEAVE="leave"})(n7||(n7={}));var uD=class extends cy{constructor(t,o){super(),this.key=void 0,this.idle=!0,this.calc=void 0,this._active=new Set,this.source=t,this.calc=Tu(...o);let r=this._get(),n=NC(r);LC(this,n.create(r))}advance(t){let o=this._get(),r=this.get();ba(o,r)||(Es(this).setValue(o),this._onChange(o,this.idle)),!this.idle&&i7(this._active)&&eD(this)}_get(){let t=ie.arr(this.source)?this.source.map(mr):pn(mr(this.source));return this.calc(...t)}_start(){this.idle&&!i7(this._active)&&(this.idle=!1,kt(oy(this),t=>{t.done=!1}),Gn.skipAnimation?(ye.batchedUpdates(()=>this.advance()),eD(this)):bh.start(this))}_attach(){let t=1;kt(pn(this.source),o=>{jr(o)&&Iu(o,this),iD(o)&&(o.idle||this._active.add(o),t=Math.max(t,o.priority+1))}),this.priority=t,this._start()}_detach(){kt(pn(this.source),t=>{jr(t)&&Pu(t,this)}),this._active.clear(),eD(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=pn(this.source).reduce((o,r)=>Math.max(o,(iD(r)?r.priority:0)+1),0))}};function cSe(e){return e.idle!==!1}function i7(e){return!e.size||Array.from(e).every(cSe)}function eD(e){e.idle||(e.idle=!0,kt(oy(e),t=>{t.done=!0}),Yf(e,{type:"idle",parent:e}))}Gn.assign({createStringInterpolator:PC,to:(e,t)=>new uD(e,t)});var Xze=bh.advance;var y7=l(k7());function gD(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 uSe=["style","children","scrollTop","scrollLeft"],S7=/^--/;function dSe(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!S7.test(e)&&!(fy.hasOwnProperty(e)&&fy[e])?t+"px":(""+t).trim()}var v7={};function fSe(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=gD(r,uSe),u=Object.values(c),d=Object.keys(c).map(f=>o||e.hasAttribute(f)?f:v7[f]||(v7[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=dSe(f,n[f]);S7.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 fy={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},mSe=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),pSe=["Webkit","Ms","Moz","O"];fy=Object.keys(fy).reduce((e,t)=>(pSe.forEach(o=>e[mSe(o,t)]=e[t]),e),fy);var hSe=["x","y","z"],gSe=/^(matrix|translate|scale|rotate|skew)/,bSe=/^(translate)/,kSe=/^(rotate|skew)/,mD=(e,t)=>ie.num(e)&&e!==0?e+t:e,HC=(e,t)=>ie.arr(e)?e.every(o=>HC(o,t)):ie.num(e)?e===t:parseFloat(e)===t,pD=class extends Xf{constructor(t){let{x:o,y:r,z:n}=t,i=gD(t,hSe),s=[],a=[];(o||r||n)&&(s.push([o||0,r||0,n||0]),a.push(c=>[`translate3d(${c.map(u=>mD(u,"px")).join(",")})`,HC(c,0)])),Ai(i,(c,u)=>{if(u==="transform")s.push([c||""]),a.push(d=>[d,d===""]);else if(gSe.test(u)){if(delete i[u],ie.und(c))return;let d=bSe.test(u)?"px":kSe.test(u)?"deg":"";s.push(pn(c)),a.push(u==="rotate3d"?([f,m,h,p])=>[`rotate3d(${f},${m},${h},${mD(p,d)})`,HC(p,0)]:f=>[`${u}(${f.map(m=>mD(m,d)).join(",")})`,HC(f,u.startsWith("scale")?1:0)])}}),s.length&&(i.transform=new hD(s,a)),super(i)}},hD=class extends ph{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 kt(this.inputs,(r,n)=>{let i=mr(r[0]),[s,a]=this.transforms[n](ie.arr(i)?i:r.map(mr));t+=" "+s,o=o&&a}),o?"none":t}observerAdded(t){t==1&&kt(this.inputs,o=>kt(o,r=>jr(r)&&Iu(r,this)))}observerRemoved(t){t==0&&kt(this.inputs,o=>kt(o,r=>jr(r)&&Pu(r,this)))}eventObserved(t){t.type=="change"&&(this._value=null),Yf(this,t)}},vSe=["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"],ySe=["scrollTop","scrollLeft"];Gn.assign({batchedUpdates:y7.unstable_batchedUpdates,createStringInterpolator:PC,colors:D8});var SSe=Y8(vSe,{applyAnimatedValues:fSe,createAnimatedStyle:e=>new pD(e),getComponentProps:e=>gD(e,ySe)}),_7=SSe.animated;var yh=l(P(),1),w7=l(Fe(),1),C7=l(F(),1);var _Se=200;function x7(e){return{top:e.offsetTop,left:e.offsetLeft}}function xSe({triggerAnimationOnChange:e,clientId:t}){let o=(0,yh.useRef)(),{isTyping:r,getGlobalBlockCount:n,isBlockSelected:i,isFirstMultiSelectedBlock:s,isBlockMultiSelected:a,isAncestorMultiSelected:c,isDraggingBlocks:u}=(0,C7.useSelect)(_),{previous:d,prevRect:f}=(0,yh.useMemo)(()=>({previous:o.current&&x7(o.current),prevRect:o.current&&o.current.getBoundingClientRect()}),[e]);return(0,yh.useLayoutEffect)(()=>{if(!d||!o.current)return;let m=(0,w7.getScrollContainer)(o.current),h=i(t),p=h||s(t),g=u();function b(){if(!g&&p&&f){let O=o.current.getBoundingClientRect().top-f.top;O&&(m.scrollTop+=O)}}if(window.matchMedia("(prefers-reduced-motion: reduce)").matches||r()||n()>_Se){b();return}let k=h||a(t)||c(t);if(k&&g)return;let y=k?"1":"",S=new jC({x:0,y:0,config:{mass:5,tension:2e3,friction:200},onChange({value:I}){if(!o.current)return;let{x:O,y:E}=I;O=Math.round(O),E=Math.round(E);let L=O===0&&E===0;o.current.style.transformOrigin="center center",o.current.style.transform=L?null:`translate3d(${O}px,${E}px,0)`,o.current.style.zIndex=y,b()}});o.current.style.transform=void 0;let x=x7(o.current),C=Math.round(d.left-x.left),B=Math.round(d.top-x.top);return S.start({x:0,y:0,from:{x:C,y:B}}),()=>{S.stop(),S.set({x:0,y:0})}},[d,f,t,r,n,i,s,a,c,u]),o}var GC=xSe;var $C=l(P(),1),Ol=l(Fe(),1),E7=l(F(),1);var WC=".block-editor-block-list__block",wSe=".block-list-appender",CSe=".block-editor-button-block-appender";function B7(e,t){return e.closest(WC)===t.closest(WC)}function ka(e,t){return t.closest([WC,wSe,CSe].join(","))===e}function Li(e){for(;e&&e.nodeType!==e.ELEMENT_NODE;)e=e.parentNode;if(!e)return;let o=e.closest(WC);if(o)return o.id.slice(6)}function bD(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 BSe(e){let t=e.ownerDocument.defaultView;if(!t||e.classList.contains("components-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 ESe(e){let t=window.getComputedStyle(e);return t.overflowX==="auto"||t.overflowX==="scroll"||t.overflowY==="auto"||t.overflowY==="scroll"}var TSe=["core/navigation"];function Sh(e){let t=e.ownerDocument.defaultView;if(!t)return new window.DOMRectReadOnly;let o=e.getBoundingClientRect(),r=e.getAttribute("data-type");if(r&&TSe.includes(r)){let s=[e],a;for(;a=s.pop();)if(!ESe(a)){for(let c of a.children)if(BSe(c)){let u=c.getBoundingClientRect();o=bD(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 T7({clientId:e,initialPosition:t}){let o=(0,$C.useRef)(),{isBlockSelected:r,isMultiSelecting:n,isZoomOut:i}=M((0,E7.useSelect)(_));return(0,$C.useEffect)(()=>{if(!r(e)||n()||i()||t==null||!o.current)return;let{ownerDocument:s}=o.current;if(ka(o.current,s.activeElement))return;let a=Ol.focus.tabbable.find(o.current).filter(d=>(0,Ol.isTextField)(d)),c=t===-1,u=a[c?a.length-1:0]||o.current;if(!ka(o.current,u)){o.current.focus();return}if(!o.current.getAttribute("contenteditable")){let d=Ol.focus.tabbable.findNext(o.current);if(d&&ka(o.current,d)&&(0,Ol.isFormElement)(d)){d.focus();return}}(0,Ol.placeCaretAtHorizontalEdge)(u,c)},[t,e]),o}var I7=l(Z(),1);function KC(e){e.defaultPrevented||(e.preventDefault(),e.currentTarget.classList.toggle("is-hovered",e.type==="mouseover"))}function P7({isEnabled:e=!0}={}){return(0,I7.useRefEffect)(t=>{if(e)return t.addEventListener("mouseout",KC),t.addEventListener("mouseover",KC),()=>{t.removeEventListener("mouseout",KC),t.removeEventListener("mouseover",KC),t.classList.remove("is-hovered")}},[e])}var YC=l(F(),1),R7=l(Z(),1);function O7(e){let{isBlockSelected:t}=(0,YC.useSelect)(_),{selectBlock:o,selectionChange:r}=(0,YC.useDispatch)(_);return(0,R7.useRefEffect)(n=>{function i(s){if(!n.parentElement.closest('[contenteditable="true"]')){if(t(e)){s.target.isContentEditable||r(e);return}ka(n,s.target)&&o(e)}}return n.addEventListener("focusin",i),()=>{n.removeEventListener("focusin",i)}},[t,o])}var _h=l($(),1),L7=l(Fe(),1),Ou=l(it(),1),qC=l(F(),1),N7=l(Z(),1);function A7(e){return!e||e==="transparent"||e==="rgba(0, 0, 0, 0)"}function M7({clientId:e,isSelected:t}){let{getBlockRootClientId:o,isZoomOut:r,hasMultiSelection:n,isSectionBlock:i,editedContentOnlySection:s,getBlock:a}=M((0,qC.useSelect)(_)),{insertAfterBlock:c,removeBlock:u,resetZoomLevel:d,startDraggingBlocks:f,stopDraggingBlocks:m,editContentOnlySection:h}=M((0,qC.useDispatch)(_));return(0,N7.useRefEffect)(p=>{if(!t)return;function g(k){let{keyCode:y,target:S}=k;y!==Ou.ENTER&&y!==Ou.BACKSPACE&&y!==Ou.DELETE||S!==p||(0,L7.isTextField)(S)||(k.preventDefault(),y===Ou.ENTER&&r()?d():y===Ou.ENTER?c(e):u(e))}function b(k){if(p!==k.target||p.isContentEditable||p.ownerDocument.activeElement!==p||n()){k.preventDefault();return}let y=JSON.stringify({type:"block",srcClientIds:[e],srcRootClientId:o(e)});k.dataTransfer.effectAllowed="move",k.dataTransfer.clearData(),k.dataTransfer.setData("wp-blocks",y);let{ownerDocument:S}=p,{defaultView:x}=S;x.getSelection().removeAllRanges();let B=S.createElement("div");B.style.width="1px",B.style.height="1px",B.style.position="fixed",B.style.visibility="hidden",S.body.appendChild(B),k.dataTransfer.setDragImage(B,0,0);let I=p.getBoundingClientRect(),O=p.id,E=p.cloneNode();E.style.display="none",p.id=null,p.after(E);let L=1;{let J=p;for(;J=J.parentElement;){let{scale:q}=x.getComputedStyle(J);if(q&&q!=="none"){L=parseFloat(q);break}}}let T=1/L,R={};for(let J of["transform","transformOrigin","transition","zIndex","position","top","left","pointerEvents","opacity","backgroundColor"])R[J]=p.style[J];let D=x.scrollY,j=x.scrollX,G=k.clientX,z=k.clientY;p.style.position="relative",p.style.top="0px",p.style.left="0px";let H=k.clientX-I.left,W=k.clientY-I.top,te=I.height>200?200/I.height:1;if(p.style.zIndex="1000",p.style.transformOrigin=`${H*T}px ${W*T}px`,p.style.transition="transform 0.2s ease-out",p.style.transform=`scale(${te})`,p.style.opacity="0.9",A7(x.getComputedStyle(p).backgroundColor)){let J="transparent",q=p;for(;q=q.parentElement;){let{backgroundColor:U}=x.getComputedStyle(q);if(!A7(U)){J=U;break}}p.style.backgroundColor=J}let ne=!1,ae=G,X=z;function ee(J){J.clientX===ae&&J.clientY===X||(ae=J.clientX,X=J.clientY,le())}function le(){ne||(ne=!0,p.style.pointerEvents="none");let J=X-z,q=ae-G,U=x.scrollY,K=x.scrollX,se=U-D,ce=K-j,Se=J+se,he=q+ce;p.style.top=`${Se*T}px`,p.style.left=`${he*T}px`}function Q(){S.removeEventListener("dragover",ee),S.removeEventListener("dragend",Q),S.removeEventListener("drop",Q),S.removeEventListener("scroll",le);for(let[J,q]of Object.entries(R))p.style[J]=q;E.remove(),p.id=O,B.remove(),m(),document.body.classList.remove("is-dragging-components-draggable"),S.documentElement.classList.remove("is-dragging")}S.addEventListener("dragover",ee),S.addEventListener("dragend",Q),S.addEventListener("drop",Q),S.addEventListener("scroll",le),f([e]),document.body.classList.add("is-dragging-components-draggable"),S.documentElement.classList.add("is-dragging")}p.addEventListener("keydown",g),p.addEventListener("dragstart",b);function v(k){let y=i(e),S=a(e),x=(0,_h.isReusableBlock)(S),C=(0,_h.isTemplatePart)(S);!y||s===e||x||C||(k.preventDefault(),h(e))}return p.addEventListener("dblclick",v),()=>{p.removeEventListener("keydown",g),p.removeEventListener("dragstart",b),p.removeEventListener("dblclick",v)}},[e,t,o,a,_h.isReusableBlock,_h.isTemplatePart,c,u,r,d,n,f,m,i,s,h])}var D7=l(Z(),1),V7=l(P(),1);function F7(){let e=(0,V7.useContext)(ZC);return(0,D7.useRefEffect)(t=>{if(e)return e.observe(t),()=>{e.unobserve(t)}},[e])}var XC=l(Z(),1);function z7({isSelected:e}){let t=(0,XC.useReducedMotion)();return(0,XC.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 j7=l(Z(),1),U7=l(F(),1);function QC({clientId:e="",isEnabled:t=!0}={}){let{getEnabledClientIdsTree:o}=M((0,U7.useSelect)(_));return(0,j7.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 H7=l(Z(),1),my=new Map;function ISe(e,t){let o=my.get(e);o||(o=new Set,my.set(e,o),e.addEventListener("pointerdown",W7)),o.add(t)}function PSe(e,t){let o=my.get(e);o&&(o.delete(t),G7(t),o.size===0&&(my.delete(e),e.removeEventListener("pointerdown",W7)))}function G7(e){let t=e.getAttribute("data-draggable");t&&(e.removeAttribute("data-draggable"),t==="true"&&!e.getAttribute("draggable")&&e.setAttribute("draggable","true"))}function W7(e){let{target:t}=e,{ownerDocument:o,isContentEditable:r,tagName:n}=t,i=["INPUT","TEXTAREA"].includes(n),s=my.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)G7(a)}function $7(){return(0,H7.useRefEffect)(e=>(ISe(e.ownerDocument,e),()=>{PSe(e.ownerDocument,e)}),[])}var fo=l(N(),1),hn=l(P(),1),Hr=l(A(),1),xh=l(F(),1),Z7=l(Is(),1),X7=l(Ti(),1);var py=l(N(),1);function RSe(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"||!iu.some(([,{key:n}])=>n===t)?!1:r[t]===!1}function Y7(e,t){if(!e?.length)return!1;let o=e.filter(r=>RSe(r,t)).length;return o===0?!1:o===e.length?!0:null}function q7(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 hy(e){if(!e&&e!==!1)return null;if(e===!1)return(0,py.__)("Block is hidden");if(e?.viewport){let t=iu.filter(([o])=>e.viewport?.[o]===!1).map(([,o])=>o.label);if(t.length>0)return(0,py.sprintf)((0,py.__)("Block is hidden on %s"),t.join(", "))}return null}var ro=l(w(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='a7bd308a9a']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","a7bd308a9a"),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 OSe={[Et.mobile.key]:!1,[Et.tablet.key]:!1,[Et.desktop.key]:!1},ASe=[];function kD({clientIds:e,onClose:t}){let{createSuccessNotice:o}=(0,xh.useDispatch)(X7.store),{updateBlockAttributes:r}=(0,xh.useDispatch)(_),n=(0,xh.useSelect)(k=>k(_).getBlocksByClientId(e)??ASe,[e]),i=(0,xh.useSelect)(k=>k(Z7.store).getShortcutRepresentation("core/editor/toggle-list-view"),[]),s=(0,hn.useMemo)(()=>{if(n?.length===0)return{hideEverywhere:!1,viewportChecked:{}};let k={};return iu.forEach(([,{key:y}])=>{k[y]=Y7(n,y)}),{hideEverywhere:q7(n),viewportChecked:k}},[n]),[a,c]=(0,hn.useState)(s?.viewportChecked??{}),[u,d]=(0,hn.useState)(s?.hideEverywhere??!1),f=(0,hn.useCallback)((k,y)=>{c({...a,[k]:y})},[a]),m=(0,hn.useMemo)(()=>{if(!u)return(0,fo.sprintf)((0,fo.__)("Block visibility settings updated. You can access them via the List View (%s)."),i);let k=n?.length>1?(0,fo.__)("Blocks hidden. You can access them via the List View (%s)."):(0,fo.__)("Block hidden. You can access it via the List View (%s).");return(0,fo.sprintf)(k,i)},[u,n?.length,i]),h=(0,hn.useMemo)(()=>Object.values(a).some(k=>k===!0||k===null),[a]),p=(0,hn.useMemo)(()=>u!==s.hideEverywhere?!0:iu.some(([,{key:k}])=>a[k]!==s.viewportChecked[k]),[u,a,s]),g=(0,hn.useMemo)(()=>u===null?!0:Object.values(a).some(k=>k===null),[u,a]),b=(0,hn.useCallback)(k=>{k.preventDefault();let y=u?!1:{viewport:iu.reduce((x,[,{key:C}])=>(a[C]&&(x[C]=!1),x),{})},S=Object.fromEntries(n.map(({clientId:x,attributes:C})=>[x,{metadata:Ne({...C?.metadata,blockVisibility:y})}]));r(e,S,{uniqueByBlock:!0}),o(m,{id:u?"block-visibility-hidden":"block-visibility-viewports-updated",type:"snackbar"}),t()},[n,e,o,u,m,t,r,a]),v=n?.length>1;return(0,ro.jsx)(Hr.Modal,{title:e?.length>1?(0,fo.__)("Hide blocks"):(0,fo.__)("Hide block"),onRequestClose:t,overlayClassName:"block-editor-block-visibility-modal",size:"small",children:(0,ro.jsxs)("form",{onSubmit:b,children:[(0,ro.jsxs)("fieldset",{children:[(0,ro.jsx)("legend",{children:v?(0,fo.__)("Select the viewport sizes for which you want to hide the blocks. Changes will apply to all selected blocks."):(0,fo.__)("Select the viewport size for which you want to hide the block.")}),(0,ro.jsx)("ul",{className:"block-editor-block-visibility-modal__options",children:(0,ro.jsxs)("li",{className:"block-editor-block-visibility-modal__options-item block-editor-block-visibility-modal__options-item--everywhere",children:[(0,ro.jsx)(Hr.CheckboxControl,{className:"block-editor-block-visibility-modal__options-checkbox--everywhere",label:(0,fo.__)("Omit from published content"),checked:u===!0,indeterminate:u===null,onChange:k=>{d(k),c(OSe)}}),u!==!0&&(0,ro.jsx)("ul",{className:"block-editor-block-visibility-modal__sub-options",children:iu.map(([,{label:k,icon:y,key:S}])=>(0,ro.jsxs)("li",{className:"block-editor-block-visibility-modal__options-item",children:[(0,ro.jsx)(Hr.CheckboxControl,{label:(0,fo.sprintf)((0,fo.__)("Hide on %s"),k),checked:a[S]??!1,indeterminate:a[S]===null,onChange:x=>f(S,x)}),(0,ro.jsx)(Hr.Icon,{icon:y,className:V({"block-editor-block-visibility-modal__options-icon--checked":a[S]})})]},S))})]})}),v&&g&&(0,ro.jsx)("p",{className:"block-editor-block-visibility-modal__description",children:(0,fo.__)("Selected blocks have different visibility settings. The checkboxes show an indeterminate state when settings differ.")}),!v&&u===!0&&(0,ro.jsx)("p",{className:"block-editor-block-visibility-modal__description",children:(0,fo.sprintf)((0,fo.__)("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)}),!v&&!u&&h&&(0,ro.jsx)("p",{className:"block-editor-block-visibility-modal__description",children:(0,hn.createInterpolateElement)((0,fo.sprintf)((0,fo.__)("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,ro.jsx)("strong",{})})})]}),(0,ro.jsxs)(Hr.Flex,{className:"block-editor-block-visibility-modal__actions",justify:"flex-end",expanded:!1,children:[(0,ro.jsx)(Hr.FlexItem,{children:(0,ro.jsx)(Hr.Button,{variant:"tertiary",onClick:t,__next40pxDefaultSize:!0,children:(0,fo.__)("Cancel")})}),(0,ro.jsx)(Hr.FlexItem,{children:(0,ro.jsx)(Hr.Button,{variant:"primary",type:"submit",disabled:!p,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,fo.__)("Apply")})})]})]})})}var vD=l(Z(),1);function Ni(e={}){let{blockVisibility:t=void 0,deviceType:o=Et.desktop.key}=e,r=(0,vD.useViewportMatch)("mobile",">="),n=(0,vD.useViewportMatch)("medium",">="),i;return o===Et.mobile.key?i=Et.mobile.key:o===Et.tablet.key?i=Et.tablet.key:r?r&&!n?i=Et.tablet.key:i=Et.desktop.key:i=Et.mobile.key,{isBlockCurrentlyHidden:t===!1||t?.viewport?.[i]===!1,currentViewport:i}}var yD=l(N(),1),JC=l(A(),1),e1=l(P(),1);var Q7=l($(),1),t1=l(F(),1);var SD=l(w(),1);function _D({clientIds:e}){let t=(0,e1.useRef)(!1),{canToggleBlockVisibility:o,areBlocksHiddenAnywhere:r}=(0,t1.useSelect)(s=>{let{getBlocksByClientId:a,getBlockName:c,isBlockHiddenAnywhere:u}=M(s(_));return{canToggleBlockVisibility:a(e).every(({clientId:f})=>(0,Q7.hasBlockSupport)(c(f),"visibility",!0)),areBlocksHiddenAnywhere:e?.every(f=>u(f))}},[e]),n=(0,t1.useDispatch)(_);if((0,e1.useEffect)(()=>{r&&(t.current=!0)},[r]),!r&&!t.current)return null;let{showViewportModal:i}=M(n);return(0,SD.jsx)(JC.ToolbarGroup,{className:"block-editor-block-visibility-toolbar",children:(0,SD.jsx)(JC.ToolbarButton,{disabled:!o,icon:r?vs:Of,label:r?(0,yD.__)("Hidden"):(0,yD.__)("Visible"),onClick:()=>i(e),"aria-haspopup":"dialog"})})}var xD=l(N(),1),J7=l(A(),1),o1=l(F(),1),e9=l(Is(),1);var t9=l(w(),1);function wD({clientIds:e}){let{areBlocksHiddenAnywhere:t,shortcut:o}=(0,o1.useSelect)(n=>{let{isBlockHiddenAnywhere:i}=M(n(_));return{areBlocksHiddenAnywhere:e?.every(s=>i(s)),shortcut:n(e9.store).getShortcutRepresentation("core/block-editor/toggle-block-visibility")}},[e]),{showViewportModal:r}=M((0,o1.useDispatch)(_));return(0,t9.jsx)(J7.MenuItem,{onClick:()=>r(e),shortcut:o,children:t?(0,xD.__)("Show"):(0,xD.__)("Hide")})}var Lu=l(A(),1),CD=l(F(),1),Au=l(N(),1);var wh=l(w(),1),{Badge:LSe}=M(Lu.privateApis),NSe={currentBlockVisibility:void 0,hasParentHiddenEverywhere:!1,selectedDeviceType:Et.desktop.value};function o9({clientId:e}){let{currentBlockVisibility:t,selectedDeviceType:o,hasParentHiddenEverywhere:r}=(0,CD.useSelect)(c=>{if(!e)return NSe;let{getBlockAttributes:u,isBlockParentHiddenEverywhere:d,getSettings:f}=M(c(_));return{currentBlockVisibility:u(e)?.metadata?.blockVisibility,selectedDeviceType:f()?.[_i]?.toLowerCase()||Et.desktop.value,hasParentHiddenEverywhere:d(e)}},[e]),{isBlockCurrentlyHidden:n,currentViewport:i}=Ni({blockVisibility:t,deviceType:o}),s=(0,CD.useSelect)(c=>!e||!i?!1:M(c(_)).isBlockParentHiddenAtViewport(e,i),[e,i]);if(!(n||r||s))return null;let a;if(n)if(t===!1)a=(0,Au.__)("Block is hidden");else{let c=Et[i]?.label||i;a=(0,Au.sprintf)((0,Au.__)("Block is hidden on %s"),c)}if(r)a=(0,Au.__)("Parent block is hidden");else if(s){let c=Et[i]?.label||i;a=(0,Au.sprintf)((0,Au.__)("Parent block is hidden on %s"),c)}return(0,wh.jsx)(LSe,{className:"block-editor-block-visibility-info",children:(0,wh.jsxs)(Lu.__experimentalHStack,{spacing:2,justify:"start",children:[(0,wh.jsx)(Lu.Icon,{icon:vs}),(0,wh.jsx)(Lu.__experimentalText,{children:a})]})})}function gy(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:v,isPartiallySelected:k,isReusable:y,isDragging:S,hasChildSelected:x,isEditingDisabled:C,hasEditableOutline:B,isEditingContentOnlySection:I,defaultClassName:O,isSectionBlock:E,isWithinSectionBlock:L,canMove:T,blockVisibility:R,deviceType:D}=(0,r9.useContext)(cr),j=(0,r1.sprintf)((0,r1.__)("Block: %s"),d),G=a==="html"&&!t?"-visual":"",z=$7(),H=!L,W=(0,n1.useMergeRefs)([e.ref,T7({clientId:o,initialPosition:p}),PH(o),O7(o),M7({clientId:o,isSelected:f}),P7({isEnabled:H}),F7(),GC({triggerAnimationOnChange:s,clientId:o}),(0,n1.useDisabled)({isDisabled:!h}),QC({clientId:o,isEnabled:E}),z7({isSelected:f}),T?z:void 0]),te=Pe(),ae=!!te[Op]?{"--wp-admin-theme-color":"var(--wp-block-synced-color)","--wp-admin-theme-color--rgb":"var(--wp-block-synced-color--rgb)"}:{},{isBlockCurrentlyHidden:X}=Ni({blockVisibility:R,deviceType:D});u<2&&o===te.clientId&&(0,i9.default)(`Block type "${c}" must support API version 2 or higher to work correctly with "useBlockProps" method.`);let ee=!1;return(n?.style?.marginTop?.charAt(0)==="-"||n?.style?.marginBottom?.charAt(0)==="-"||n?.style?.marginLeft?.charAt(0)==="-"||n?.style?.marginRight?.charAt(0)==="-")&&(ee=!0),{tabIndex:g==="disabled"?-1:0,draggable:T&&!x?!0:void 0,...n,...e,ref:W,id:`block-${o}${G}`,role:"document","aria-label":j,"data-block":o,"data-type":c,"data-title":d,inert:m?"true":void 0,className:V("block-editor-block-list__block",{"wp-block":!i,"has-block-overlay":h,"is-selected":f,"is-highlighted":b,"is-multi-selected":v,"is-partially-selected":k,"is-reusable":y,"is-dragging":S,"has-child-selected":x,"is-editing-disabled":C,"has-editable-outline":B,"has-negative-margin":ee,"is-editing-content-only-section":I,"is-block-hidden":X},r,e.className,n.className,O),style:{...n.style,...e.style,...ae}}}gy.save=n9.__unstableGetBlockProps;var mo=l(w(),1);function MSe(e,t){let o={...e,...t};return e?.hasOwnProperty("className")&&t?.hasOwnProperty("className")&&(o.className=V(e.className,t.className)),e?.hasOwnProperty("style")&&t?.hasOwnProperty("style")&&(o.style={...e.style,...t.style}),o}function i1({children:e,isHtml:t,...o}){return(0,mo.jsx)("div",{...gy(o,{__unstableIsHtml:t}),children:e})}function BD({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:v,toggleSelection:k}){let{mayDisplayControls:y,mayDisplayParentControls:S,isSelectionWithinCurrentSection:x,themeSupportsLayout:C,...B}=(0,Nu.useContext)(cr),I=jf()||{},O=(0,mo.jsx)(Lw,{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?v:void 0,clientId:n,isSelectionEnabled:s,toggleSelection:k,__unstableLayoutClassNames:c,__unstableParentLayout:Object.keys(I).length?I:void 0,mayDisplayControls:y,mayDisplayParentControls:S,mayDisplayPatternEditingControls:x,blockEditingMode:B.blockEditingMode,isPreviewMode:B.isPreviewMode}),E=(0,Ge.getBlockType)(u);E?.getEditWrapperProps&&(m=MSe(m,E.getEditWrapperProps(f)));let L=m&&!!m["data-align"]&&!C,T=a?.includes("is-position-sticky");L&&(O=(0,mo.jsx)("div",{className:V("wp-block",T&&a),"data-align":m["data-align"],children:O}));let R;if(d)t==="html"?R=(0,mo.jsxs)(mo.Fragment,{children:[(0,mo.jsx)("div",{style:{display:"none"},children:O}),(0,mo.jsx)(i1,{isHtml:!0,children:(0,mo.jsx)(y8,{clientId:n})})]}):E?.apiVersion>1?R=O:R=(0,mo.jsx)(i1,{children:O});else{let z=e?(0,Ge.serializeRawBlock)(e):(0,Ge.getSaveContent)(E,f);R=(0,mo.jsxs)(i1,{className:"has-warning",children:[(0,mo.jsx)(YH,{clientId:n}),(0,mo.jsx)(Nu.RawHTML,{children:(0,l9.safeHTML)(z)})]})}let{"data-align":D,...j}=m??{},G={...j,className:V(j.className,D&&C&&`align${D}`,!(D&&T)&&a)};return(0,mo.jsx)(cr.Provider,{value:{wrapperProps:G,isAligned:L,isSelectionWithinCurrentSection:x,...B},children:(0,mo.jsx)(JH,{fallback:(0,mo.jsx)(i1,{className:"has-warning",children:(0,mo.jsx)(XH,{})}),children:R})})}var DSe=(0,s1.withDispatch)((e,t,o)=>{let{updateBlockAttributes:r,insertBlocks:n,mergeBlocks:i,replaceBlocks:s,toggleSelection:a,__unstableMarkLastChangeAsPersistent:c,moveBlocksToPosition:u,removeBlock:d,selectBlock:f}=e(_);return{setAttributes(m){let{getMultiSelectedBlockClientIds:h}=o.select(_),p=h(),{clientId:g,attributes:b}=t,v=p.length?p:[g],k=typeof m=="function"?m(b):m;r(v,k)},onInsertBlocks(m,h){let{rootClientId:p}=t;n(m,h,p)},onInsertBlocksAfter(m){let{clientId:h,rootClientId:p}=t,{getBlockIndex:g}=o.select(_),b=g(h);n(m,b+1,p)},onMerge(m){let{clientId:h,rootClientId:p}=t,{getPreviousBlockClientId:g,getNextBlockClientId:b,getBlock:v,getBlockAttributes:k,getBlockName:y,getBlockOrder:S,getBlockIndex:x,getBlockRootClientId:C,canInsertBlockType:B}=o.select(_);function I(){let E=v(h),L=(0,Ge.getDefaultBlockName)(),T=(0,Ge.getBlockType)(L);if(y(h)!==L){let R=(0,Ge.switchToBlockType)(E,L);R&&R.length&&s(h,R)}else if((0,Ge.isUnmodifiedDefaultBlock)(E)){let R=b(h);R&&o.batch(()=>{d(h),f(R)})}else if(T.merge){let R=T.merge({},E.attributes);s([h],[(0,Ge.createBlock)(L,R)])}}function O(E,L=!0){let T=y(E),D=(0,Ge.getBlockType)(T).category==="text",j=C(E),G=S(E),[z]=G;G.length===1&&(0,Ge.isUnmodifiedBlock)(v(z))?d(E):D?o.batch(()=>{if(B(y(z),j))u([z],E,j,x(E));else{let H=(0,Ge.switchToBlockType)(v(z),(0,Ge.getDefaultBlockName)());H&&H.length&&H.every(W=>B(W.name,j))?(n(H,x(E),j,L),d(z,!1)):I()}!S(E).length&&(0,Ge.isUnmodifiedBlock)(v(E))&&d(E,!1)}):I()}if(m){if(p){let L=b(p);if(L)if(y(p)===y(L)){let T=k(p),R=k(L);if(Object.keys(T).every(D=>T[D]===R[D])){o.batch(()=>{u(S(L),L,p),d(L,!1)});return}}else{i(p,L);return}}let E=b(h);if(!E)return;S(E).length?O(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 T=k(p),R=k(L);if(Object.keys(T).every(D=>T[D]===R[D])){o.batch(()=>{u(S(p),p,L),d(p,!1)});return}}O(p)}else I()}},onReplace(m,h,p){m.length&&!(0,Ge.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)}}});BD=(0,a9.compose)(DSe,(0,s9.withFilters)("editor.BlockListBlock"))(BD);function VSe(e){let{clientId:t,rootClientId:o}=e,r=(0,s1.useSelect)(se=>{let{isBlockSelected:ce,getBlockMode:Se,isSelectionEnabled:he,getTemplateLock:we,isSectionBlock:De,getParentSectionBlock:ct,getBlockWithoutAttributes:Jt,getBlockAttributes:uo,canRemoveBlock:Do,canMoveBlock:ot,getSettings:sr,getEditedContentOnlySection:ze,getBlockEditingMode:wt,getBlockName:je,isFirstMultiSelectedBlock:At,getMultiSelectedBlockClientIds:ar,hasSelectedInnerBlock:Ue,getBlocksByName:Lr,getBlockIndex:ki,isBlockMultiSelected:eo,isBlockSubtreeDisabled:Bo,isBlockHighlighted:Xe,__unstableIsFullySelected:Ve,__unstableSelectionHasUnmergeableBlock:bt,isBlockBeingDragged:Eo,isDragging:lr,__unstableHasActiveBlockOverlayActive:ge,getSelectedBlocksInitialCaretPosition:Ct}=M(se(_)),To=Jt(t);if(!To)return;let{hasBlockSupport:Ye,getActiveBlockVariation:oe}=se(Ge.store),Ae=uo(t),{name:ut,isValid:Gc}=To,ca=(0,Ge.getBlockType)(ut),Ep=sr(),{supportsLayout:Vk,isPreviewMode:pf,__experimentalBlockBindingsSupportedAttributes:an}=Ep,Tp=an?.[ut],Ip=Ae?.metadata?.blockVisibility,o0=Ep?.[_i]?.toLowerCase()||"desktop",r0=ca?.apiVersion>1,Fk=eo(t),ue=wt(t),to={isPreviewMode:pf,blockWithoutAttributes:To,name:ut,attributes:Ae,isValid:Gc,themeSupportsLayout:Vk,index:ki(t),isReusable:(0,Ge.isReusableBlock)(ca),className:r0?Ae.className:void 0,defaultClassName:r0?(0,Ge.getBlockDefaultClassName)(ut):void 0,blockTitle:ca?.title,bindableAttributes:Tp,blockVisibility:Ip,deviceType:o0,isMultiSelected:Fk,blockEditingMode:ue,isEditingDisabled:ue==="disabled"};if(pf)return to;let ve=ce(t),Lt=Do(t),ln=ot(t),Sr=oe(ut,Ae),Wc=!0,iO=Ue(t,Wc),sO=De(t)?t:ct(t),aO=(0,Ge.hasBlockSupport)(ut,"multiple",!0)?[]:Lr(ut),Mme=aO.length&&aO[0]!==t;return{...to,mode:Se(t),isSelectionEnabled:he(),isLocked:!!we(o),isSectionBlock:De(t),isWithinSectionBlock:!!sO,isSelectionWithinCurrentSection:ce(sO)||Ue(sO,Wc),blockType:ca,canRemove:Lt,canMove:ln,isSelected:ve,isEditingContentOnlySection:ze()===t,blockEditingMode:ue,mayDisplayControls:ve||At(t)&&ar().every(Dme=>je(Dme)===ut),mayDisplayParentControls:Ye(je(t),"__experimentalExposeControlsToChildren",!1)&&Ue(t),blockApiVersion:ca?.apiVersion||1,blockTitle:Sr?.title||ca?.title,isSubtreeDisabled:ue==="disabled"&&Bo(t),hasOverlay:ge(t)&&!lr(),initialPosition:ve?Ct():void 0,isHighlighted:Xe(t),isMultiSelected:Fk,isPartiallySelected:Fk&&!Ve()&&!bt(),isDragging:Eo(t),hasChildSelected:iO,isEditingDisabled:ue==="disabled",hasEditableOutline:ue!=="disabled"&&wt(o)==="disabled",originalBlockClientId:Mme?aO[0]:!1,blockVisibility:Ip,deviceType:o0}},[t,o]),{isPreviewMode:n,mode:i="visual",isSelectionEnabled:s=!1,isLocked:a=!1,canRemove:c=!1,canMove:u=!1,blockWithoutAttributes:d,name:f,attributes:m,isValid:h,isSelected:p=!1,themeSupportsLayout:g,isEditingContentOnlySection:b,blockEditingMode:v,mayDisplayControls:k,mayDisplayParentControls:y,index:S,blockApiVersion:x,blockType:C,blockTitle:B,isSubtreeDisabled:I,hasOverlay:O,initialPosition:E,isHighlighted:L,isMultiSelected:T,isPartiallySelected:R,isReusable:D,isDragging:j,hasChildSelected:G,isSectionBlock:z,isWithinSectionBlock:H,isSelectionWithinCurrentSection:W,isEditingDisabled:te,hasEditableOutline:ne,className:ae,defaultClassName:X,originalBlockClientId:ee,bindableAttributes:le,blockVisibility:Q,deviceType:J}=r,{isBlockCurrentlyHidden:q}=Ni({blockVisibility:Q,deviceType:J}),U=(0,Nu.useMemo)(()=>({...d,attributes:m}),[d,m]);if(!r)return null;let K={isPreviewMode:n,clientId:t,className:ae,index:S,mode:i,name:f,blockApiVersion:x,blockType:C,blockTitle:B,isSelected:p,isSubtreeDisabled:I,hasOverlay:O,initialPosition:E,blockEditingMode:v,isHighlighted:L,isMultiSelected:T,isPartiallySelected:R,isReusable:D,isDragging:j,hasChildSelected:G,isSectionBlock:z,isWithinSectionBlock:H,isSelectionWithinCurrentSection:W,isEditingDisabled:te,hasEditableOutline:ne,isEditingContentOnlySection:b,defaultClassName:X,mayDisplayControls:k,mayDisplayParentControls:y,originalBlockClientId:ee,themeSupportsLayout:g,canMove:u,isBlockCurrentlyHidden:q,bindableAttributes:le,blockVisibility:Q,deviceType:J};return q&&!p&&!T&&!G?null:(0,mo.jsx)(cr.Provider,{value:K,children:(0,mo.jsx)(BD,{...e,mode:i,isSelectionEnabled:s,isLocked:a,canRemove:c,canMove:u,block:U,name:f,attributes:m,isValid:h,isSelected:p})})}var c9=(0,Nu.memo)(VSe);var U5=l(F(),1),rY=l($(),1);var z5=l(N(),1),QK=l(hM(),1),IB=l(F(),1),PB=l(it(),1);var ZK=l(Zo(),1),Gl=l(N(),1),BB=l(A(),1),XK=l(P(),1),EB=l(F(),1),TB=l(Z(),1),$y=l($(),1);var Ft=l(P(),1),ag=l(A(),1),Zu=l(N(),1),Hy=l(Z(),1),WK=l(F(),1);var Ch=l(N(),1),Bh=l(P(),1),d9=l(A(),1),by=l(w(),1),u9=[(0,Bh.createInterpolateElement)((0,Ch.__)("While writing, you can press <kbd>/</kbd> to quickly insert new blocks."),{kbd:(0,by.jsx)("kbd",{})}),(0,Bh.createInterpolateElement)((0,Ch.__)("Indent a list by pressing <kbd>space</kbd> at the beginning of a line."),{kbd:(0,by.jsx)("kbd",{})}),(0,Bh.createInterpolateElement)((0,Ch.__)("Outdent a list by pressing <kbd>backspace</kbd> at the beginning of a line."),{kbd:(0,by.jsx)("kbd",{})}),(0,Ch.__)("Drag files into the editor to automatically insert media blocks."),(0,Ch.__)("Change a block's type by pressing the block icon on the toolbar.")];function FSe(){let[e]=(0,Bh.useState)(Math.floor(Math.random()*u9.length));return(0,by.jsx)(d9.Tip,{children:u9[e]})}var f9=FSe;var Wh=l($(),1),T$=l(P(),1),I$=l(N(),1);var gn=l(A(),1),a1=l(F(),1),m9=l(Re(),1),Mu=l(N(),1);var l1=l($(),1);var xr=l(w(),1),{Badge:zSe}=M(gn.privateApis);function jSe({children:e,onClick:t}){return t?(0,xr.jsx)(gn.Button,{__next40pxDefaultSize:!0,className:"block-editor-block-card__parent-select-button",onClick:t,children:e}):e}function USe({title:e,icon:t,description:o,blockType:r,className:n,name:i,allowParentNavigation:s,parentClientId:a,isChild:c,children:u,clientId:d}){r&&((0,m9.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,a1.useSelect)(g=>{if(a||c||!s)return{};let{getBlockParents:b,getBlockName:v}=g(_),y=b(d,!1).find(S=>{let x=v(S);return x==="core/navigation"||(0,l1.hasBlockSupport)(x,"listView")});return{parentBlockClientId:y,parentBlockName:y?v(y):null}},[d,s,c,a]),{selectBlock:h}=(0,a1.useDispatch)(_),p=a?"div":"h2";return(0,xr.jsx)("div",{className:V("block-editor-block-card",{"is-parent":a,"is-child":c},n),children:(0,xr.jsxs)(gn.__experimentalVStack,{children:[(0,xr.jsxs)(gn.__experimentalHStack,{justify:"flex-start",spacing:0,children:[f&&(0,xr.jsx)(gn.Button,{onClick:()=>h(f),label:m?(0,Mu.sprintf)((0,Mu.__)('Go to "%s" block'),(0,l1.getBlockType)(m)?.title):(0,Mu.__)("Go to parent block"),style:{minWidth:24,padding:0},icon:(0,Mu.isRTL)()?Vo:Nr,size:"small"}),c&&(0,xr.jsx)("span",{className:"block-editor-block-card__child-indicator-icon",children:(0,xr.jsx)(gn.Icon,{icon:(0,Mu.isRTL)()?qk:Zk})}),(0,xr.jsxs)(jSe,{onClick:a?()=>{h(a)}:void 0,children:[(0,xr.jsx)(Oe,{icon:t,showColors:!0}),(0,xr.jsxs)(gn.__experimentalVStack,{spacing:1,children:[(0,xr.jsxs)(p,{className:"block-editor-block-card__title",children:[(0,xr.jsx)("span",{className:"block-editor-block-card__name",children:i?.length?i:e}),!a&&!c&&!!i?.length&&(0,xr.jsx)(zSe,{children:e})]}),u]})]})]}),!a&&!c&&o&&(0,xr.jsx)(gn.__experimentalText,{className:"block-editor-block-card__description",children:o})]})})}var ky=USe;var $1=l(Z(),1),k5=l(F(),1),im=l(P(),1),b5=l(Re(),1);var A9=l(F(),1),Du=l(P(),1),L9=l(A(),1),em=l(h9(),1);var g9=l(P(),1),Eh=l(F(),1),b9=l(Z(),1);var c1=l(w(),1);function HSe(e,t,o){if(!o)return t;let r=e.get(t);return r||(r=(0,Eh.createRegistry)({},t),r.registerStore(Wt,Jp),e.set(t,r)),r}var GSe=(0,b9.createHigherOrderComponent)(e=>function({useSubRegistry:o=!0,...r}){let n=(0,Eh.useRegistry)(),[i]=(0,g9.useState)(()=>new WeakMap),s=HSe(i,n,o);return s===n?(0,c1.jsx)(e,{registry:n,...r}):(0,c1.jsx)(Eh.RegistryProvider,{value:s,children:(0,c1.jsx)(e,{registry:s,...r})})},"withRegistryProvider"),k9=GSe;var Gr=l(P(),1),_9=l(F(),1),x9=l($(),1);var v9=l(P(),1),WSe=()=>{},u1=(0,v9.createContext)({getSelection:()=>{},onChangeSelection:WSe});var y9=()=>{};function w9(e,t){let o=(0,x9.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=>w9(r,t))),o}function C9(e,t){return e.map(o=>{let r=t.internalToExternal.get(o.clientId);return{...o,clientId:r??o.clientId,innerBlocks:C9(o.innerBlocks,t)}})}function S9(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 d1({clientId:e=null,value:t,onChange:o=y9,onInput:r=y9}){let n=(0,_9.useRegistry)(),{getSelection:i,onChangeSelection:s}=(0,Gr.useContext)(u1),{resetBlocks:a,resetSelection:c,replaceInnerBlocks:u,setHasControlledInnerBlocks:d,__unstableMarkNextChangeAsNotPersistent:f}=n.dispatch(_),{getBlockName:m,getBlocks:h,getSelectionStart:p,getSelectionEnd:g}=n.select(_),b=(0,Gr.useRef)({incoming:null,outgoing:[]}),v=(0,Gr.useRef)(!1),k=(0,Gr.useRef)({externalToInternal:new Map,internalToExternal:new Map}),y=(0,Gr.useRef)(null),S=(0,Gr.useRef)(!1),x=()=>{let E=i();if(!E?.selectionStart?.clientId||E===y.current)return;let L=E.selectionStart.clientId;if(e?k.current.externalToInternal.has(L):!!m(L)){y.current=E;let R=D=>!D?.clientId||!e?D:{...D,clientId:k.current.externalToInternal.get(D.clientId)??D.clientId};S.current=!0,c(R(E.selectionStart),R(E.selectionEnd),E.initialPosition),S.current=!1}},C=()=>{t&&(e?n.batch(()=>{k.current.externalToInternal.clear(),k.current.internalToExternal.clear();let E=t.map(L=>w9(L,k.current));d(e,!0),v.current&&(b.current.incoming=E),f(),u(e,E),y.current=null}):(v.current&&(b.current.incoming=t),f(),a(t)))},B=()=>{f(),e?(d(e,!1),f(),u(e,[])):a([])},I=(0,Gr.useRef)(r),O=(0,Gr.useRef)(o);(0,Gr.useEffect)(()=>{I.current=r,O.current=o},[r,o]),(0,Gr.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(),x())},[t,e]),(0,Gr.useEffect)(()=>{let{getSelectedBlocksInitialCaretPosition:E,isLastBlockChangePersistent:L,__unstableIsLastBlockChangeIgnored:T,areInnerBlocksControlled:R,getBlockParents:D}=n.select(_),j=h(e),G=L(),z=!1,H=p(),W=g();v.current=!0;let te=n.subscribe(()=>{if(e!==null&&m(e)===null)return;let ne=L(),ae=h(e),X=ae!==j;if(j=ae,X&&(b.current.incoming||T())){b.current.incoming=null,G=ne;return}let le=X||z&&!X&&ne&&!G,Q=p(),J=g(),q=Q!==H||J!==W;q&&(H=Q,W=J),(le||q)&&n.batch(()=>{if(le){G=ne;let U=e?C9(j,k.current):j,K={selectionStart:Q,selectionEnd:J,initialPosition:E()},se=e?S9(K,k.current):K;b.current.outgoing.push(U),(G?O.current:I.current)(U,{selection:se})}if(q&&!le&&Q?.clientId&&!S.current&&(e?k.current.internalToExternal.has(Q.clientId):!D(Q.clientId).some(K=>R(K)))){let K={selectionStart:Q,selectionEnd:J,initialPosition:E()};s(e?S9(K,k.current):K)}}),z=X},_);return()=>{v.current=!1,te()}},[n,e]),(0,Gr.useEffect)(()=>()=>{B()},[])}var B9=l(P(),1),E9=l(F(),1),T9=l(Is(),1),po=l(N(),1);function I9(){return null}function $Se(){let{registerShortcut:e}=(0,E9.useDispatch)(T9.store);return(0,B9.useEffect)(()=>{e({name:"core/block-editor/copy",category:"block",description:(0,po.__)("Copy the selected block(s)."),keyCombination:{modifier:"primary",character:"c"}}),e({name:"core/block-editor/cut",category:"block",description:(0,po.__)("Cut the selected block(s)."),keyCombination:{modifier:"primary",character:"x"}}),e({name:"core/block-editor/paste",category:"block",description:(0,po.__)("Paste the selected block(s)."),keyCombination:{modifier:"primary",character:"v"}}),e({name:"core/block-editor/duplicate",category:"block",description:(0,po.__)("Duplicate the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"d"}}),e({name:"core/block-editor/remove",category:"block",description:(0,po.__)("Remove the selected block(s)."),keyCombination:{modifier:"access",character:"z"}}),e({name:"core/block-editor/paste-styles",category:"block",description:(0,po.__)("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,po.__)("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,po.__)("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,po.__)("Delete selection."),keyCombination:{character:"del"},aliases:[{character:"backspace"}]}),e({name:"core/block-editor/stop-editing-as-blocks",category:"block",description:(0,po.__)("Finish editing a design."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/select-all",category:"selection",description:(0,po.__)("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,po.__)("Clear selection."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/multi-text-selection",category:"selection",description:(0,po.__)("Select text across multiple blocks."),keyCombination:{modifier:"shift",character:"arrow"}}),e({name:"core/block-editor/focus-toolbar",category:"global",description:(0,po.__)("Navigate to the nearest toolbar."),keyCombination:{modifier:"alt",character:"F10"}}),e({name:"core/block-editor/move-up",category:"block",description:(0,po.__)("Move the selected block(s) up."),keyCombination:{modifier:"secondary",character:"t"}}),e({name:"core/block-editor/move-down",category:"block",description:(0,po.__)("Move the selected block(s) down."),keyCombination:{modifier:"secondary",character:"y"}}),e({name:"core/block-editor/collapse-list-view",category:"list-view",description:(0,po.__)("Collapse all other items."),keyCombination:{modifier:"alt",character:"l"}}),e({name:"core/block-editor/group",category:"block",description:(0,po.__)("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,po.__)("Show or hide the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"h"}}),e({name:"core/block-editor/rename",category:"block",description:(0,po.__)("Rename the selected block."),keyCombination:{modifier:"primaryAlt",character:"r"}})},[e]),null}I9.Register=$Se;var f1=I9;var P9=l(P(),1);function KSe(e={}){return(0,P9.useMemo)(()=>({mediaUpload:e.mediaUpload,mediaSideload:e.mediaSideload,maxUploadFileSize:e.maxUploadFileSize,allowedMimeTypes:e.allowedMimeTypes,allImageSizes:e.allImageSizes,bigImageSizeThreshold:e.bigImageSizeThreshold}),[e])}var R9=KSe;var Al=l(w(),1),ED=()=>{},O9=!1,Th=null;function YSe(){if(Th!==null)return Th;if(!window.__clientSideMediaProcessing||typeof em.detectClientSideMediaSupport!="function")return Th=!1,!1;let e=(0,em.detectClientSideMediaSupport)();return!e||!e.supported?(O9||(console.info(`Client-side media processing unavailable: ${e.reason}. Using server-side processing.`),O9=!0),Th=!1,!1):(Th=!0,!0)}function qSe(e,{allowedTypes:t,additionalData:o={},filesList:r,onError:n=ED,onFileChange:i,onSuccess:s,onBatchSuccess:a}){e.dispatch(em.store).addItems({files:Array.from(r),onChange:i,onSuccess:s,onBatchSuccess:a,onError:({message:c})=>n(c),additionalData:o,allowedTypes:t})}function ZSe(e){return d1(e),null}var Ih=k9(e=>{let{settings:t,registry:o,stripExperimentalSettings:r=!1}=e,n=R9(t),i=YSe(),s=(0,Du.useMemo)(()=>i&&t?.mediaUpload?{...t,mediaUpload:qSe.bind(null,o)}:t,[t,o,i]),{__experimentalUpdateSettings:a}=M((0,A9.useDispatch)(_));(0,Du.useEffect)(()=>{a({...s,__internalIsInitialized:!0},{stripExperimentalSettings:r,reset:!0})},[s,r,a]);let c=(0,Du.useRef)(e.selection);c.current=e.selection;let u=(0,Du.useRef)(e.onChangeSelection??ED);u.current=e.onChangeSelection??ED;let d=(0,Du.useMemo)(()=>({getSelection:()=>c.current,onChangeSelection:(...h)=>u.current(...h)}),[]),f=(0,Al.jsxs)(L9.SlotFillProvider,{passthrough:!0,children:[!s?.isPreviewMode&&(0,Al.jsx)(f1.Register,{}),(0,Al.jsx)(TH,{children:e.children})]}),m=(0,Al.jsxs)(u1.Provider,{value:d,children:[(0,Al.jsx)(ZSe,{clientId:e.clientId,value:e.value,onChange:e.onChange,onInput:e.onInput}),f]});return i?(0,Al.jsx)(em.MediaUploadProvider,{settings:n,useSubRegistry:!1,children:m}):m}),XSe=e=>(0,Al.jsx)(Ih,{...e,stripExperimentalSettings:!0,children:e.children}),N9=XSe;var Ny=l(Z(),1),k$=l(F(),1),W1=l(P(),1),v$=l(A(),1);var tm=l(P(),1),SG=l(N(),1),_a=l(Z(),1),_G=l(A(),1),LD=l(F(),1);var pG=l(F(),1),hG=l(N(),1),_y=l(Z(),1),gG=l(P(),1);var M9=l(Z(),1),D9=l(F(),1);function QSe(e){let{isMultiSelecting:t,getMultiSelectedBlockClientIds:o,hasMultiSelection:r,getSelectedBlockClientId:n,getSelectedBlocksInitialCaretPosition:i,__unstableIsFullySelected:s}=e(_);return{isMultiSelecting:t(),multiSelectedBlockClientIds:o(),hasMultiSelection:r(),selectedBlockClientId:n(),initialPosition:i(),isFullSelection:s()}}function V9(){let{initialPosition:e,isMultiSelecting:t,multiSelectedBlockClientIds:o,hasMultiSelection:r,selectedBlockClientId:n,isFullSelection:i}=(0,D9.useSelect)(QSe,[]);return(0,M9.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 Ph=l(Fe(),1),TD=l(it(),1),m1=l(F(),1),p1=l(Z(),1),vy=l(P(),1);var ID=l(w(),1);function F9(){let e=(0,vy.useRef)(),t=(0,vy.useRef)(),o=(0,vy.useRef)(),{hasMultiSelection:r,getSelectedBlockClientId:n,getBlockCount:i,getBlockOrder:s,getLastFocus:a,getSectionRootClientId:c,isZoomOut:u}=M((0,m1.useSelect)(_)),{setLastFocus:d}=M((0,m1.useDispatch)(_)),f=(0,vy.useRef)();function m(v){let k=e.current.ownerDocument===v.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=s(y);S.length?e.current.querySelector(`[data-block="${S[0]}"]`).focus():y?e.current.querySelector(`[data-block="${y}"]`).focus():k.focus()}else{let y=v.target.compareDocumentPosition(k)&v.target.DOCUMENT_POSITION_FOLLOWING,S=Ph.focus.tabbable.find(e.current);S.length&&(y?S[0]:S[S.length-1]).focus()}}let h=(0,ID.jsx)("div",{ref:t,tabIndex:"0",onFocus:m}),p=(0,ID.jsx)("div",{ref:o,tabIndex:"0",onFocus:m}),g=(0,p1.useRefEffect)(v=>{function k(B){if(B.defaultPrevented||B.keyCode!==TD.TAB||!o.current||!t.current)return;let{target:I,shiftKey:O}=B,E=O?"findPrevious":"findNext",L=Ph.focus.tabbable[E](I),T=I.closest("[data-block]"),R=T&&L&&(B7(T,L)||ka(T,L));if((0,Ph.isFormElement)(L)&&R)return;let D=O?t:o;f.current=!0,D.current.focus({preventScroll:!0})}function y(B){d({...a(),current:B.target});let{ownerDocument:I}=v;!B.relatedTarget&&B.target.hasAttribute("data-block")&&I.activeElement===I.body&&i()===0&&v.focus()}function S(B){if(B.keyCode!==TD.TAB||B.target?.getAttribute("role")==="region"||e.current===B.target)return;let O=B.shiftKey?"findPrevious":"findNext",E=Ph.focus.tabbable[O](B.target);(E===t.current||E===o.current)&&(B.preventDefault(),E.focus({preventScroll:!0}))}let{ownerDocument:x}=v,{defaultView:C}=x;return C.addEventListener("keydown",S),v.addEventListener("keydown",k),v.addEventListener("focusout",y),()=>{C.removeEventListener("keydown",S),v.removeEventListener("keydown",k),v.removeEventListener("focusout",y)}},[]),b=(0,p1.useMergeRefs)([e,g]);return[h,b,p]}var ho=l(Fe(),1),va=l(it(),1),h1=l(F(),1),z9=l(Z(),1);function JSe(e,t,o){let r=t===va.UP||t===va.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 PD(e,t,o,r){let n=ho.focus.focusable.find(o);t&&n.reverse(),n=n.slice(n.indexOf(e)+1);let i;r&&(i=e.getBoundingClientRect());function s(a){if(Li(a)&&ho.focus.focusable.find(a).filter(c=>!(0,ho.isFormElement)(c)).length!==0||!ho.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 j9(){let{getMultiSelectedBlocksStartClientId:e,getMultiSelectedBlocksEndClientId:t,getSettings:o,hasMultiSelection:r,__unstableIsFullySelected:n}=(0,h1.useSelect)(_),{selectBlock:i}=(0,h1.useDispatch)(_);return(0,z9.useRefEffect)(s=>{let a;function c(){a=null}function u(f,m){let h=PD(f,m,s);return h&&Li(h)}function d(f){if(f.defaultPrevented)return;let{keyCode:m,target:h,shiftKey:p,ctrlKey:g,altKey:b,metaKey:v}=f,k=m===va.UP,y=m===va.DOWN,S=m===va.LEFT,x=m===va.RIGHT,C=k||S,B=S||x,I=k||y,O=B||I,E=p||g||b||v,L=I?ho.isVerticalEdge:ho.isHorizontalEdge,{ownerDocument:T}=s,{defaultView:R}=T;if(!O||o().isPreviewMode)return;if(r()){if(p||!n())return;f.preventDefault(),C?i(e()):i(t(),-1);return}if(!JSe(h,m,E))return;I?a||(a=(0,ho.computeCaretRect)(R)):a=null;let D=(0,ho.isRTL)(h)?!C:C,{keepCaretInsideBlock:j}=o();if(p)u(h,C)&&L(h,C)&&(s.contentEditable=!0,s.focus());else if(I&&(0,ho.isVerticalEdge)(h,C)&&(!b||(0,ho.isHorizontalEdge)(h,D))&&!j){let G=PD(h,C,s,!0);G&&((0,ho.placeCaretAtVerticalEdge)(G,b?!C:C,b?void 0:a),f.preventDefault())}else if(B&&R.getSelection().isCollapsed&&(0,ho.isHorizontalEdge)(h,D)&&!j){let G=PD(h,D,s);(0,ho.placeCaretAtHorizontalEdge)(G,C),f.preventDefault()}}return s.addEventListener("mousedown",c),s.addEventListener("keydown",d),()=>{s.removeEventListener("mousedown",c),s.removeEventListener("keydown",d)}},[])}var U9=l(Z(),1),H9=l(F(),1),ya=l(it(),1);function G9(){let e=(0,H9.useSelect)(t=>t(_).getSettings().isPreviewMode,[]);return(0,U9.useRefEffect)(t=>{if(!e)return;function o(r){let{keyCode:n,shiftKey:i,target:s}=r,a=n===ya.TAB,c=n===ya.UP,u=n===ya.DOWN,d=n===ya.LEFT;if(!a&&!(c||u||d||n===ya.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 v;h?v=b<=0?p.length-1:b-1:v=b===-1||b>=p.length-1?0:b+1,r.preventDefault(),p[v].focus()}return t.addEventListener("keydown",o),()=>{t.removeEventListener("keydown",o)}},[e])}var W9=l(Fe(),1),g1=l(F(),1),$9=l(Is(),1),K9=l(Z(),1);function Y9(){let{getBlockOrder:e,getSelectedBlockClientIds:t,getBlockRootClientId:o}=(0,g1.useSelect)(_),{multiSelect:r,selectBlock:n}=(0,g1.useDispatch)(_),i=(0,$9.__unstableUseShortcutEventMatch)();return(0,K9.useRefEffect)(s=>{function a(c){if(!i("core/block-editor/select-all",c))return;let u=t();if(u.length<2&&!(0,W9.isEntirelySelected)(c.target))return;c.preventDefault();let{ownerDocument:d}=c.target,[f]=u,m=Li(d.activeElement);if(m&&m!==f&&!ka(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 b1=l(F(),1),Z9=l(Z(),1);function q9(e,t){e.contentEditable=t,t&&e.focus()}function X9(){let{startMultiSelect:e,stopMultiSelect:t}=(0,b1.useDispatch)(_),{getSettings:o,isSelectionEnabled:r,hasSelectedBlock:n,isDraggingBlocks:i,isMultiSelecting:s}=(0,b1.useSelect)(_);return(0,Z9.useRefEffect)(a=>{let{ownerDocument:c}=a,{defaultView:u}=c,d,f;function m(){t(),u.removeEventListener("mouseup",m),f=u.requestAnimationFrame(()=>{if(!n())return;q9(a,!1);let b=u.getSelection();if(b.rangeCount){let v=b.getRangeAt(0),{commonAncestorContainer:k}=v,y=v.cloneRange();d.contains(k)&&(d.focus(),b.removeAllRanges(),b.addRange(y))}})}let h;function p({target:b}){h=b}function g({buttons:b,target:v,relatedTarget:k}){v.contains(h)&&(v.contains(k)||i()||b===1&&(s()||a!==v&&(v.getAttribute("contenteditable")!=="true"&&!o().isPreviewMode||r()&&(d=v,e(),u.addEventListener("mouseup",m),q9(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 k1=l(F(),1),eG=l(Z(),1),RD=l(ur(),1),tG=l(Fe(),1);function e_e(e){let{anchorNode:t,anchorOffset:o}=e;return t.nodeType===t.TEXT_NODE||o===0?t:t.childNodes[o-1]}function t_e(e){let{focusNode:t,focusOffset:o}=e;return t.nodeType===t.TEXT_NODE||o===t.childNodes.length?t:o===0&&(0,tG.isSelectionForward)(e)?t.previousSibling??t.parentElement:t.childNodes[o]}function o_e(e,t){let o=0;for(;e[o]===t[o];)o++;return o}function Q9(e,t){e.contentEditable!==String(t)&&(e.contentEditable=t,t&&e.focus())}function J9(e){return(e.nodeType===e.ELEMENT_NODE?e:e.parentElement)?.closest("[data-wp-block-attribute-key]")}function oG(){let{multiSelect:e,selectBlock:t,selectionChange:o}=(0,k1.useDispatch)(_),{getBlockParents:r,getBlockSelectionStart:n,isMultiSelecting:i}=(0,k1.useSelect)(_);return(0,eG.useRefEffect)(s=>{let{ownerDocument:a}=s,{defaultView:c}=a;function u(d){let f=c.getSelection();if(!f.rangeCount)return;let m=e_e(f),h=t_e(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()){Q9(s,!1);let k=m.nodeType===m.ELEMENT_NODE?m:m.parentElement;k=k?.closest("[contenteditable]"),k?.focus()}return}let g=Li(m),b=Li(h);if(p){let k=n(),y=Li(d.target),S=y!==b;(g===b&&f.isCollapsed||!b||S)&&(b=y),g!==k&&(g=k)}if(g===void 0&&b===void 0){Q9(s,!1);return}if(d.type==="mouseup"&&!d.shiftKey&&!i()&&g===b){let k=Li(d.target);if(k&&k!==g){f.removeAllRanges();return}}if(g===b)i()?e(g,g):t(g);else{let k=[...r(g),g],y=[...r(b),b],S=o_e(k,y);if(k[S]!==g||y[S]!==b){e(k[S],y[S]);return}let x=J9(m),C=J9(h);if(x&&C){let B=f.getRangeAt(0),I=(0,RD.create)({element:x,range:B,__unstableIsEditableTree:!0}),O=(0,RD.create)({element:C,range:B,__unstableIsEditableTree:!0}),E=I.start??I.end,L=O.start??O.end;o({start:{clientId:g,attributeKey:x.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 v1=l(F(),1),rG=l(Z(),1);function nG(){let{selectBlock:e}=(0,v1.useDispatch)(_),{isSelectionEnabled:t,getBlockSelectionStart:o,hasMultiSelection:r}=(0,v1.useSelect)(_);return(0,rG.useRefEffect)(n=>{function i(s){if(!t()||s.button!==0)return;let a=o(),c=Li(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 y1=l(F(),1),iG=l(Z(),1),Ll=l(it(),1),Ps=l($(),1);function sG(){let{__unstableIsFullySelected:e,getSelectedBlockClientIds:t,getSelectedBlockClientId:o,__unstableIsSelectionMergeable:r,hasMultiSelection:n,getBlockName:i,canInsertBlockType:s,getBlockRootClientId:a,getSelectionStart:c,getSelectionEnd:u,getBlockAttributes:d}=(0,y1.useSelect)(_),{replaceBlocks:f,__unstableSplitSelection:m,removeBlocks:h,__unstableDeleteSelection:p,__unstableExpandSelection:g,__unstableMarkAutomaticChange:b}=(0,y1.useDispatch)(_);return(0,iG.useRefEffect)(v=>{function k(x){v.contentEditable==="true"&&x.preventDefault()}function y(x){if(!x.defaultPrevented){if(!n()){if(x.keyCode===Ll.ENTER){if(x.shiftKey||e())return;let C=o(),B=i(C),I=c(),O=u();if(I.attributeKey===O.attributeKey){let E=d(C)[I.attributeKey],L=(0,Ps.getBlockTransforms)("from").filter(({type:R})=>R==="enter"),T=(0,Ps.findTransform)(L,R=>R.regExp.test(E));if(T){f(C,T.transform({content:E})),b();return}}if(!(0,Ps.hasBlockSupport)(B,"splitting",!1)&&!x.__deprecatedOnSplit)return;(s((0,Ps.getDefaultBlockName)(),a(C))||s(B,a(C)))&&(m(),x.preventDefault())}return}x.keyCode===Ll.ENTER?(v.contentEditable=!1,x.preventDefault(),e()?f(t(),(0,Ps.createBlock)((0,Ps.getDefaultBlockName)())):m()):x.keyCode===Ll.BACKSPACE||x.keyCode===Ll.DELETE?(v.contentEditable=!1,x.preventDefault(),e()?h(t()):r()?p(x.keyCode===Ll.DELETE):g()):x.key.length===1&&!(x.metaKey||x.ctrlKey)&&(v.contentEditable=!1,r()?p(x.keyCode===Ll.DELETE):(x.preventDefault(),v.ownerDocument.defaultView.getSelection().removeAllRanges()))}}function S(x){n()&&(v.contentEditable=!1,r()?p():(x.preventDefault(),v.ownerDocument.defaultView.getSelection().removeAllRanges()))}return v.addEventListener("beforeinput",k),v.addEventListener("keydown",y),v.addEventListener("compositionstart",S),()=>{v.removeEventListener("beforeinput",k),v.removeEventListener("keydown",y),v.removeEventListener("compositionstart",S)}},[])}var Sa=l($(),1),_1=l(Fe(),1),Ah=l(F(),1),mG=l(Z(),1);var aG=l(P(),1),lG=l($(),1),yy=l(F(),1),Mi=l(N(),1),cG=l(Ti(),1);function Rh(){let{getBlockName:e}=(0,yy.useSelect)(_),{getBlockType:t}=(0,yy.useSelect)(lG.store),{createSuccessNotice:o}=(0,yy.useDispatch)(cG.store);return(0,aG.useCallback)((r,n)=>{let i="";if(r==="copyStyles")i=(0,Mi.__)("Styles copied to clipboard.");else if(n.length===1){let s=n[0],a=t(e(s))?.title;r==="copy"?i=(0,Mi.sprintf)((0,Mi.__)('Copied "%s" to clipboard.'),a):i=(0,Mi.sprintf)((0,Mi.__)('Moved "%s" to clipboard.'),a)}else r==="copy"?i=(0,Mi.sprintf)((0,Mi._n)("Copied %d block to clipboard.","Copied %d blocks to clipboard.",n.length),n.length):i=(0,Mi.sprintf)((0,Mi._n)("Moved %d block to clipboard.","Moved %d blocks to clipboard.",n.length),n.length);o(i,{type:"snackbar"})},[o,e,t])}var dG=l(Fe(),1),Di=l($(),1);var uG=l(Fe(),1);function r_e(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 n_e(e){let t="<meta charset='utf-8'>";return e.startsWith(t)?e.slice(t.length):e}function Oh({clipboardData:e}){let t="",o="";try{t=e.getData("text/plain"),o=e.getData("text/html")}catch{return}o=r_e(o),o=n_e(o);let r=(0,uG.getFilesFromDataTransfer)(e);return r.length&&!i_e(r,o)?{files:r}:{html:o,plainText:t,files:[]}}function i_e(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 OD=Symbol("requiresWrapperOnCopy");function S1(e,t,o){let r=t,[n]=t;if(n&&o.select(Di.store).getBlockType(n.name)[OD]){let{getBlockRootClientId:a,getBlockName:c,getBlockAttributes:u}=o.select(_),d=a(n.clientId),f=c(d);f&&(r=(0,Di.createBlock)(f,u(d),r))}let i=(0,Di.serialize)(r);e.clipboardData.setData("text/plain",s_e(i)),e.clipboardData.setData("text/html",i)}function fG(e,t){let{plainText:o,html:r,files:n}=Oh(e),i=[];if(n.length){let s=(0,Di.getBlockTransforms)("from");i=n.reduce((a,c)=>{let u=(0,Di.findTransform)(s,d=>d.type==="files"&&d.isMatch([c]));return u&&a.push(u.transform([c])),a},[]).flat()}else i=(0,Di.pasteHandler)({HTML:r,plainText:o,mode:"BLOCKS",canUserUseUnfilteredHTML:t});return i}function s_e(e){return e=e.replace(/<br>/g,`
`),(0,dG.__unstableStripHTML)(e).trim().replace(/\n\n+/g,`

`)}function Sy(){let e=(0,Ah.useRegistry)(),{getBlocksByClientId:t,getSelectedBlockClientIds:o,hasMultiSelection:r,getSettings:n,getBlockName:i,__unstableIsFullySelected:s,__unstableIsSelectionCollapsed:a,__unstableIsSelectionMergeable:c,__unstableGetSelectedBlocksWithPartialSelection:u,canInsertBlockType:d,getBlockRootClientId:f}=(0,Ah.useSelect)(_),{flashBlock:m,removeBlocks:h,replaceBlocks:p,__unstableDeleteSelection:g,__unstableExpandSelection:b,__unstableSplitSelection:v}=(0,Ah.useDispatch)(_),k=Rh();return(0,mG.useRefEffect)(y=>{function S(x){if(x.defaultPrevented)return;let C=o();if(C.length===0)return;if(!r()){let{target:L}=x,{ownerDocument:T}=L;if(x.type==="copy"||x.type==="cut"?(0,_1.documentHasUncollapsedSelection)(T):(0,_1.documentHasSelection)(T)&&!T.activeElement.isContentEditable)return}let{activeElement:B}=x.target.ownerDocument;if(!y.contains(B))return;let I=c(),O=a()||s(),E=!O&&!I;if(x.type==="copy"||x.type==="cut")if(x.preventDefault(),C.length===1&&m(C[0]),E)b();else{k(x.type,C);let L;if(O)L=t(C);else{let[T,R]=u(),D=t(C.slice(1,C.length-1));L=[T,...D,R]}S1(x,L,e)}if(x.type==="cut")O&&!E?h(C):(x.target.ownerDocument.activeElement.contentEditable=!1,g());else if(x.type==="paste"){let{__experimentalCanUserUseUnfilteredHTML:L,mediaUpload:T}=n();if(x.clipboardData.getData("rich-text")==="true")return;let{plainText:D,html:j,files:G}=Oh(x),z=s(),H=[];if(G.length){if(!T){x.preventDefault();return}let ae=(0,Sa.getBlockTransforms)("from");H=G.reduce((X,ee)=>{let le=(0,Sa.findTransform)(ae,Q=>Q.type==="files"&&Q.isMatch([ee]));return le&&X.push(le.transform([ee])),X},[]).flat()}else H=(0,Sa.pasteHandler)({HTML:j,plainText:D,mode:z?"BLOCKS":"AUTO",canUserUseUnfilteredHTML:L});if(typeof H=="string")return;if(z){p(C,H,H.length-1,-1),x.preventDefault();return}if(!r()&&!(0,Sa.hasBlockSupport)(i(C[0]),"splitting",!1)&&!x.__deprecatedOnSplit)return;let[W]=C,te=f(W),ne=[];for(let ae of H)if(d(ae.name,te))ne.push(ae);else{let X=i(te),ee=ae.name!==X?(0,Sa.switchToBlockType)(ae,X):[ae];if(!ee)return;for(let le of ee)for(let Q of le.innerBlocks)ne.push(Q)}v(ne),x.preventDefault()}}return y.ownerDocument.addEventListener("copy",S),y.ownerDocument.addEventListener("cut",S),y.ownerDocument.addEventListener("paste",S),()=>{y.ownerDocument.removeEventListener("copy",S),y.ownerDocument.removeEventListener("cut",S),y.ownerDocument.removeEventListener("paste",S)}},[])}var Lh=l(w(),1);function AD(){let[e,t,o]=F9(),r=(0,pG.useSelect)(n=>n(_).hasMultiSelection(),[]);return[e,(0,_y.useMergeRefs)([t,Sy(),sG(),X9(),oG(),nG(),V9(),Y9(),j9(),G9(),(0,_y.useRefEffect)(n=>(n.tabIndex=0,n.dataset.hasMultiSelection=r,r?(n.setAttribute("aria-label",(0,hG.__)("Multiple selected blocks")),()=>{delete n.dataset.hasMultiSelection,n.removeAttribute("aria-label")}):()=>{delete n.dataset.hasMultiSelection}),[r])]),o]}function a_e({children:e,...t},o){let[r,n,i]=AD();return(0,Lh.jsxs)(Lh.Fragment,{children:[r,(0,Lh.jsx)("div",{...t,ref:(0,_y.useMergeRefs)([n,o]),className:V(t.className,"block-editor-writing-flow"),children:e}),i]})}var x1=(0,gG.forwardRef)(a_e);var w1=null;function bG(){return w1||(w1=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},[]),w1)}var bn=l(P(),1),xy=l(Z(),1);function kG({frameSize:e,containerWidth:t,maxContainerWidth:o,scaleContainerWidth:r}){return(Math.min(t,o)-e*2)/r}function l_e(e,t){let{scaleValue:o,scrollHeight:r}=e,{frameSize:n,scaleValue:i}=t;return r*(i/o)+n*2}function c_e(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 u_e(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 vG({frameSize:e,iframeDocument:t,maxContainerWidth:o=750,scale:r}){let[n,{height:i}]=(0,xy.useResizeObserver)(),[s,{width:a,height:c}]=(0,xy.useResizeObserver)(),u=(0,bn.useRef)(0),d=r!==1,f=(0,xy.useReducedMotion)(),m=r==="auto-scaled",h=(0,bn.useRef)(!1),p=(0,bn.useRef)(null);(0,bn.useEffect)(()=>{d||(u.current=a)},[a,d]);let g=Math.max(u.current,a),b=m?kG({frameSize:e,containerWidth:a,maxContainerWidth:o,scaleContainerWidth:g}):r,v=(0,bn.useRef)({scaleValue:b,frameSize:e,containerHeight:0,scrollTop:0,scrollHeight:0}),k=(0,bn.useRef)({scaleValue:b,frameSize:e,containerHeight:0,scrollTop:0,scrollHeight:0}),y=(0,bn.useCallback)(()=>{let{scrollTop:C}=v.current,{scrollTop:B}=k.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",v.current.scrollHeight===v.current.containerHeight?"auto":"scroll"),t.documentElement.classList.add("zoom-out-animation"),t.documentElement.animate(u_e(v.current,k.current),{easing:"cubic-bezier(0.46, 0.03, 0.52, 0.96)",duration:400})},[t]),S=(0,bn.useCallback)(()=>{h.current=!1,p.current=null,t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scale",k.current.scaleValue),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-frame-size",`${k.current.frameSize}px`),t.documentElement.classList.remove("zoom-out-animation"),t.documentElement.scrollTop=k.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"),v.current=k.current},[t]),x=(0,bn.useRef)(!1);return(0,bn.useEffect)(()=>{let C=t&&x.current!==d;if(x.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,bn.useEffect)(()=>{if(t&&(m&&v.current.scaleValue!==1&&(v.current.scaleValue=kG({frameSize:v.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=v.current,B=k.current;v.current=B,k.current=C}else v.current.scrollTop=t.documentElement.scrollTop,v.current.scrollHeight=t.documentElement.scrollHeight,v.current.containerHeight=c,k.current={scaleValue:b,frameSize:e,containerHeight:t.documentElement.clientHeight},k.current.scrollHeight=l_e(v.current,k.current),k.current.scrollTop=c_e(v.current,k.current),p.current=y(),f?S():p.current.onfinish=S},[y,S,f,m,b,e,t,i,a,c,o,g]),{isZoomedOut:d,scaleContainerWidth:g,containerWidth:a,contentResizeListener:n,containerResizeListener:s}}var Vi=l(w(),1),d_e=_a.useViewportMatch.__experimentalWidthProvider;function xG(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 f_e(e){return(0,_a.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];xG(a,d,o)},r.addEventListener(s,i[s]);return()=>{for(let s of n)r.removeEventListener(s,i[s])}})}var yG=new WeakMap,m_e=globalThis.FinalizationRegistry?new globalThis.FinalizationRegistry(e=>URL.revokeObjectURL(e)):void 0;function p_e(e){let t=yG.get(e);if(t)return t;let o=`<!doctype html>
<html>
	<head>
		<meta charset="utf-8">
		<base href="${window.location.href}">
		<script>window.frameElement._load()<\/script>
		<style>
			html{
				height: auto !important;
				min-height: 100%;
			}
			/* Lowest specificity to not override global styles */
			:where(body) {
				margin: 0;
				/* Default background color in case zoom out mode background
				colors the html element */
				background-color: white;
			}
		</style>
		${e.styles??""}
		${e.scripts??""}
	</head>
	<body>
		<script>document.currentScript.parentElement.remove()<\/script>
	</body>
</html>`;return t=URL.createObjectURL(new Blob([o],{type:"text/html"})),yG.set(e,t),m_e?.register(e,t),t}function h_e({contentRef:e,children:t,tabIndex:o=0,scale:r=1,frameSize:n=0,readonly:i,forwardedRef:s,title:a=(0,SG.__)("Editor canvas"),...c}){let{resolvedAssets:u,isPreviewMode:d}=(0,LD.useSelect)(R=>{let D=R(_).getSettings();return{resolvedAssets:D.__unstableResolvedAssets,isPreviewMode:D.isPreviewMode}},[]),[f,m]=(0,tm.useState)(),[h,p]=(0,tm.useState)([]),[g,b,v]=AD(),k=(0,_a.useRefEffect)(R=>{R._load=()=>{m(R.contentDocument)};let D;function j(W){W.preventDefault()}function G(W){W.target.tagName==="A"&&W.target.getAttribute("href")?.startsWith("#")&&(W.preventDefault(),D.defaultView.location.hash=W.target.getAttribute("href").slice(1))}let{ownerDocument:z}=R;p(Array.from(z.body.classList).filter(W=>W.startsWith("admin-color-")||W.startsWith("post-type-")||W==="wp-embed-responsive"));function H(){let{contentDocument:W}=R,{documentElement:te}=W;D=W,te.classList.add("block-editor-iframe__html"),W.dir=z.dir;for(let ne of bG())W.getElementById(ne.id)||(W.head.appendChild(ne.cloneNode(!0)),d||console.warn(`${ne.id} was added to the iframe incorrectly. Please use block.json or enqueue_block_assets to add styles to the iframe.`,ne));D.addEventListener("dragover",j,!1),D.addEventListener("drop",j,!1),D.addEventListener("click",G)}return R.addEventListener("load",H),()=>{delete R._load,R.removeEventListener("load",H),D?.removeEventListener("dragover",j),D?.removeEventListener("drop",j),D?.removeEventListener("click",G)}},[]),{contentResizeListener:y,containerResizeListener:S,containerWidth:x,isZoomedOut:C,scaleContainerWidth:B}=vG({scale:r,frameSize:parseInt(n),iframeDocument:f}),I=(0,_a.useDisabled)({isDisabled:!i}),O=(0,_a.useMergeRefs)([f_e(f),e,b,I]),E=p_e(u),L=o>=0&&!d,T=(0,Vi.jsxs)(Vi.Fragment,{children:[L&&g,(0,Vi.jsx)("iframe",{...c,style:{...c.style,height:c.style?.height,border:0},ref:(0,_a.useMergeRefs)([s,k]),tabIndex:o,src:E,title:a,onKeyDown:R=>{if(c.onKeyDown&&c.onKeyDown(R),R.currentTarget.ownerDocument!==R.target.ownerDocument){let{stopPropagation:D}=R.nativeEvent;R.nativeEvent.stopPropagation=()=>{},R.stopPropagation(),R.nativeEvent.stopPropagation=D,xG(R,window.KeyboardEvent,R.currentTarget)}},children:f&&(0,tm.createPortal)((0,Vi.jsxs)("body",{ref:O,className:V("block-editor-iframe__body","editor-styles-wrapper",...h),children:[y,(0,Vi.jsx)(_G.__experimentalStyleProvider,{document:f,children:(0,Vi.jsx)(d_e,{value:x,children:t})})]}),f.documentElement)}),L&&v]});return(0,Vi.jsxs)("div",{className:"block-editor-iframe__container",children:[S,(0,Vi.jsx)("div",{className:V("block-editor-iframe__scale-container",C&&"is-zoomed-out"),style:{"--wp-block-editor-iframe-zoom-out-scale-container-width":C&&`${B}px`},children:T})]})}function g_e(e,t){return(0,LD.useSelect)(r=>r(_).getSettings().__internalIsInitialized,[])?(0,Vi.jsx)(h_e,{...e,forwardedRef:t}):null}var Nh=(0,tm.forwardRef)(g_e);var g$=l(A(),1),Uh=l(P(),1),b$=l(F(),1);var B1={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},b_e=new Set(["combinator","comma"]);var k_e=e=>{switch(e){case"pseudo-element":case"pseudo-class":return new RegExp(B1[e].source.replace("(?<argument>\xB6*)","(?<argument>.*)"),"gu");default:return B1[e]}};function v_e(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 y_e(e,t=B1){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],b_e.has(n.type)&&(n.content=n.content.trim()||" ");break}return o}var S_e=/(['"])([^\\\n]+?)\1/g,__e=/\\./g;function ND(e,t=B1){if(e=e.trim(),e==="")return[];let o=[];e=e.replace(__e,(i,s)=>(o.push({value:i,offset:s}),"\uE000".repeat(i.length))),e=e.replace(S_e,(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=v_e(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=y_e(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=k_e(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*C1(e,t){switch(e.type){case"list":for(let o of e.list)yield*C1(o,e);break;case"complex":yield*C1(e.left,e),yield*C1(e.right,e);break;case"compound":yield*e.list.map(o=>[o,e]);break;default:yield[e,t]}}function wG(e){let t;return Array.isArray(e)?t=e:t=[...C1(e)].map(([o])=>o),t.map(o=>o.content).join("")}var d$=l(GW(),1),f$=l(I1(),1),m$=l(KW(),1),p$=l(c$(),1),u$=new Map,h$=[{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 L0e(e,t){let o=ND(t),r=o.findLastIndex(({content:s,type:a})=>h$.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=ND(e);return o.splice(n===-1?o.length:n,0,{type:"combinator",content:" "},...i),wG(o)}function N0e({css:e,ignoredSelectors:t=[],baseURL:o},r="",n){if(!r&&!o)return e;try{let i=[...t,...n?.ignoredSelectors??[],r];return new d$.default([r&&(0,m$.default)({prefix:r,transform(s,a,c){return i.some(d=>d instanceof RegExp?a.match(d):a.includes(d))?a:h$.some(d=>a.startsWith(d.content))?L0e(s,a):c}}),o&&(0,p$.default)({rootUrl:o})].filter(Boolean)).process(e,{}).css}catch(i){return i instanceof f$.default?console.warn("wp.blockEditor.transformStyles Failed to transform CSS.",i.message+`
`+i.showSourceCode(!1)):console.warn("wp.blockEditor.transformStyles Failed to transform CSS.",i),null}}var M0e=(e,t="",o)=>{let r=u$.get(t);return r||(r=new WeakMap,u$.set(t,r)),e.map(n=>{let i=r.get(n);return i||(i=N0e(n,t,o),r.set(n,i)),i})},jh=M0e;var ju=l(w(),1);Kc([Yc,Ap]);function D0e(e,t){return(0,Uh.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=Bt(a);c.luminance()>.5||c.alpha()===0?i.classList.remove("is-dark-theme"):i.classList.add("is-dark-theme")},[e,t])}function V0e({styles:e,scope:t,transformOptions:o}){let r=(0,b$.useSelect)(s=>M(s(_)).getStyleOverrides(),[]),[n,i]=(0,Uh.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[jh(s.filter(a=>a?.css),t,o),s.filter(a=>a.__unstableType==="svgs").map(a=>a.assets).join("")]},[e,r,t,o]);return(0,ju.jsxs)(ju.Fragment,{children:[(0,ju.jsx)("style",{ref:D0e(n,t)}),n.map((s,a)=>(0,ju.jsx)("style",{children:s},a)),(0,ju.jsx)(g$.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 Nl=(0,Uh.memo)(V0e);var Fi=l(w(),1),F0e=(0,W1.memo)(Hh),g5=2e3,z0e=[];function j0e({viewportWidth:e,containerWidth:t,minHeight:o,additionalStyles:r=z0e}){e||(e=t);let[n,{height:i}]=(0,Ny.useResizeObserver)(),{styles:s}=(0,k$.useSelect)(d=>({styles:d(_).getSettings().styles}),[]),a=(0,W1.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,Fi.jsx)(v$.Disabled,{className:"block-editor-block-preview__content",style:{transform:`scale(${c})`,aspectRatio:u,maxHeight:i>g5?g5*c:void 0,minHeight:o},children:(0,Fi.jsxs)(Nh,{contentRef:(0,Ny.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:g5,minHeight:c!==0&&c<1&&o?o/c:o},children:[(0,Fi.jsx)(Nl,{styles:a}),n,(0,Fi.jsx)(F0e,{renderAppender:!1})]})})}function y$(e){let[t,{width:o}]=(0,Ny.useResizeObserver)();return(0,Fi.jsxs)(Fi.Fragment,{children:[(0,Fi.jsx)("div",{style:{position:"relative",width:"100%",height:0},children:t}),(0,Fi.jsx)("div",{className:"block-editor-block-preview__container",children:!!o&&(0,Fi.jsx)(j0e,{...e,containerWidth:o})})]})}var Gh=l(P(),1),w$=l(_$(),1),x$=(0,w$.createQueue)();function C$({children:e,placeholder:t}){let[o,r]=(0,Gh.useState)(!1);return(0,Gh.useEffect)(()=>{let n={};return x$.add(n,()=>{(0,Gh.flushSync)(()=>{r(!0)})}),()=>{x$.cancel(n)}},[]),o?e:t}var sm=l(w(),1),U0e=[];function H0e({blocks:e,viewportWidth:t=1200,minHeight:o,additionalStyles:r=U0e,__experimentalMinHeight:n,__experimentalPadding:i}){n&&(o=n,(0,b5.default)("The __experimentalMinHeight prop",{since:"6.2",version:"6.4",alternative:"minHeight"})),i&&(r=[...r,{css:`body { padding: ${i}px; }`}],(0,b5.default)("The __experimentalPadding prop of BlockPreview",{since:"6.2",version:"6.4",alternative:"additionalStyles"}));let s=(0,k5.useSelect)(u=>u(_).getSettings(),[]),a=(0,im.useMemo)(()=>({...s,focusMode:!1,isPreviewMode:!0}),[s]),c=(0,im.useMemo)(()=>Array.isArray(e)?e:[e],[e]);return!e||e.length===0?null:(0,sm.jsx)(Ih,{value:c,settings:a,children:(0,sm.jsx)(y$,{viewportWidth:t,minHeight:o,additionalStyles:r})})}var B$=(0,im.memo)(H0e);B$.Async=C$;var kn=B$;function E$({blocks:e,props:t={},layout:o}){let r=(0,k5.useSelect)(u=>u(_).getSettings(),[]),n=(0,im.useMemo)(()=>({...r,styles:void 0,focusMode:!1,isPreviewMode:!0}),[r]),i=(0,$1.useDisabled)(),s=(0,$1.useMergeRefs)([t.ref,i]),a=(0,im.useMemo)(()=>Array.isArray(e)?e:[e],[e]),c=(0,sm.jsxs)(Ih,{value:a,settings:n,children:[(0,sm.jsx)(Nl,{}),(0,sm.jsx)(My,{renderAppender:!1,layout:o})]});return{...t,ref:s,className:V(t.className,"block-editor-block-preview__live-content","components-disabled"),children:e?.length?c:null}}var Uu=l(w(),1);function G0e({item:e}){let{name:t,title:o,icon:r,description:n,initialAttributes:i,example:s}=e,a=(0,Wh.isReusableBlock)(e),c=(0,T$.useMemo)(()=>s?(0,Wh.getBlockFromExample)(t,{attributes:{...s.attributes,...i},innerBlocks:s.innerBlocks}):(0,Wh.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,Uu.jsxs)("div",{className:"block-editor-inserter__preview-container",children:[(0,Uu.jsx)("div",{className:"block-editor-inserter__preview",children:a||s?(0,Uu.jsx)("div",{className:"block-editor-inserter__preview-content",children:(0,Uu.jsx)(kn,{blocks:c,viewportWidth:f,minHeight:u,additionalStyles:[{css:`
										body { 
											padding: 24px;
											min-height:${Math.round(h)}px;
											display:flex;
											align-items:center;
										}
										.is-root-container { width: 100%; }
									`}]})}):(0,Uu.jsx)("div",{className:"block-editor-inserter__preview-content-missing",children:(0,I$.__)("No preview available.")})}),!a&&(0,Uu.jsx)(ky,{title:o,icon:r,description:n})]})}var K1=G0e;var Qh=l(N(),1),Vl=l(P(),1),C5=l(Z(),1);var H$=l($(),1),G$=l(Z(),1);var Xh=l(P(),1),Hu=l($(),1),j$=l(A(),1),Dy=l(it(),1);var D$=l(A(),1),V$=l(P(),1);var $h=l(P(),1),P$=l(N(),1),R$=l(Zo(),1),O$=l(w(),1);function W0e(e,t){let[o,r]=(0,$h.useState)(!1);return(0,$h.useEffect)(()=>{o&&(0,R$.speak)((0,P$.__)("Use left and right arrow keys to move through blocks"))},[o]),(0,O$.jsx)("div",{ref:t,role:"listbox","aria-orientation":"horizontal",onFocus:()=>{r(!0)},onBlur:n=>{!n.currentTarget.contains(n.relatedTarget)&&r(!1)},...e})}var v5=(0,$h.forwardRef)(W0e);var A$=l(P(),1),L$=l(A(),1),N$=l(w(),1);function $0e(e,t){return(0,N$.jsx)(L$.Composite.Group,{role:"presentation",ref:t,...e})}var y5=(0,A$.forwardRef)($0e);var q1=l(A(),1),M$=l(P(),1),Y1=l(w(),1);function K0e({isFirst:e,as:t,children:o,...r},n){return(0,Y1.jsx)(q1.Composite.Item,{ref:n,role:"option",accessibleWhenDisabled:!0,...r,render:i=>{let s={...i,tabIndex:e?0:i.tabIndex};return t?(0,Y1.jsx)(t,{...s,children:o}):typeof o=="function"?o(s):(0,Y1.jsx)(q1.Button,{__next40pxDefaultSize:!0,...s,children:o})}})}var S5=(0,M$.forwardRef)(K0e);var _5=l(w(),1);function Y0e({key:e,children:t}){return(0,_5.jsx)(V$.Fragment,{children:t},e)}function q0e({children:e}){return(0,_5.jsx)(D$.Composite,{focusShift:!0,focusWrap:"horizontal",render:Y0e,children:e})}var Kh=q0e;var F$=l(A(),1),X1=l($(),1),Q1=l(F(),1),z$=l(P(),1);var qh=l(N(),1),Yh=l(A(),1);var Os=l(w(),1);function Z1({count:e,icon:t,isPattern:o,fadeWhenDisabled:r}){let n=o&&(0,qh.__)("Pattern");return(0,Os.jsx)("div",{className:"block-editor-block-draggable-chip-wrapper",children:(0,Os.jsx)("div",{className:"block-editor-block-draggable-chip","data-testid":"block-draggable-chip",children:(0,Os.jsxs)(Yh.Flex,{justify:"center",className:"block-editor-block-draggable-chip__content",children:[(0,Os.jsx)(Yh.FlexItem,{children:t?(0,Os.jsx)(Oe,{icon:t}):n||(0,qh.sprintf)((0,qh._n)("%d block","%d blocks",e),e)}),(0,Os.jsx)(Yh.FlexItem,{children:(0,Os.jsx)(Oe,{icon:Jk})}),r&&(0,Os.jsx)(Yh.FlexItem,{className:"block-editor-block-draggable-chip__disabled",children:(0,Os.jsx)("span",{className:"block-editor-block-draggable-chip__disabled-icon"})})]})})})}var x5=l(w(),1),Z0e=({isEnabled:e,blocks:t,icon:o,children:r,pattern:n})=>{let i=t.length===1?t[0].name:void 0,s=(0,Q1.useSelect)(f=>i&&f(X1.store).getBlockType(i)?.icon,[i]),{startDragging:a,stopDragging:c}=M((0,Q1.useDispatch)(_)),u=(0,z$.useMemo)(()=>n?.type===Nt.user&&n?.syncStatus!=="unsynced"?[(0,X1.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,x5.jsx)(F$.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,x5.jsx)(Z1,{count:t.length,icon:o||!n&&s,isPattern:!!n}),children:({onDraggableStart:f,onDraggableEnd:m})=>r({draggable:!0,onDragStart:f,onDragEnd:m})})},Zh=Z0e;var Ml=l(w(),1);function X0e({className:e,isFirst:t,item:o,onSelect:r,onHover:n,isDraggable:i,...s}){let a=(0,Xh.useRef)(!1),c=o.icon?{backgroundColor:o.icon.background,color:o.icon.foreground}:{},u=(0,Xh.useMemo)(()=>[(0,Hu.createBlock)(o.name,o.initialAttributes,(0,Hu.createBlocksFromInnerBlocksTemplate)(o.innerBlocks))],[o.name,o.initialAttributes,o.innerBlocks]),d=(0,Hu.isReusableBlock)(o)&&o.syncStatus!=="unsynced"||(0,Hu.isTemplatePart)(o);return(0,Ml.jsx)(Zh,{isEnabled:i&&!o.isDisabled,blocks:u,icon:o.icon,children:({draggable:f,onDragStart:m,onDragEnd:h})=>(0,Ml.jsx)("div",{className:V("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,Ml.jsxs)(S5,{isFirst:t,className:V("block-editor-block-types-list__item",e),disabled:o.isDisabled,onClick:p=>{p.preventDefault(),r(o,(0,Dy.isAppleOS)()?p.metaKey:p.ctrlKey),n(null)},onKeyDown:p=>{let{keyCode:g}=p;g===Dy.ENTER&&(p.preventDefault(),r(o,(0,Dy.isAppleOS)()?p.metaKey:p.ctrlKey),n(null))},onMouseEnter:()=>{a.current||n(o)},onMouseLeave:()=>n(null),...s,children:[(0,Ml.jsx)("span",{className:"block-editor-block-types-list__item-icon",style:c,children:(0,Ml.jsx)(Oe,{icon:o.icon,showColors:!0})}),(0,Ml.jsx)("span",{className:"block-editor-block-types-list__item-title",children:(0,Ml.jsx)(j$.__experimentalTruncate,{numberOfLines:3,children:o.title})})]})})})}var U$=(0,Xh.memo)(X0e);var Vy=l(w(),1);function Q0e(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 W$({items:e=[],onSelect:t,onHover:o=()=>{},children:r,label:n,isDraggable:i=!0}){let s="block-editor-block-types-list",a=(0,G$.useInstanceId)(W$,s);return(0,Vy.jsxs)(v5,{className:s,"aria-label":n,children:[Q0e(e,3).map((c,u)=>(0,Vy.jsx)(y5,{children:c.map((d,f)=>(0,Vy.jsx)(U$,{item:d,className:(0,H$.getBlockMenuDefaultClassName)(d.id),onSelect:t,onHover:o,isDraggable:i&&!d.isDisabled,isFirst:u===0&&f===0,rowId:`${a}-${u}`},d.id))},u)),r]})}var am=W$;var $$=l(A(),1),Dl=l(w(),1);function J0e({title:e,icon:t,children:o}){return(0,Dl.jsxs)(Dl.Fragment,{children:[(0,Dl.jsxs)("div",{className:"block-editor-inserter__panel-header",children:[(0,Dl.jsx)("h2",{className:"block-editor-inserter__panel-title",children:e}),(0,Dl.jsx)($$.Icon,{icon:t})]}),(0,Dl.jsx)("div",{className:"block-editor-inserter__panel-content",children:o})]})}var Gu=J0e;var K$=l(N(),1),w5=l(w(),1);function exe(){return(0,w5.jsx)("div",{className:"block-editor-inserter__no-results",children:(0,w5.jsx)("p",{children:(0,K$.__)("No results found.")})})}var As=exe;var zo=l(w(),1),txe=e=>e.name.split("/")[0],oxe=6,rxe=[];function Y$({items:e,collections:t,categories:o,onSelectItem:r,onHover:n,showMostUsedBlocks:i,className:s}){let a=(0,Vl.useMemo)(()=>fa(e,"frecency","desc").slice(0,oxe),[e]),c=(0,Vl.useMemo)(()=>e.filter(p=>!p.category),[e]),u=(0,Vl.useMemo)(()=>{let p={...t};return Object.keys(t).forEach(g=>{p[g]=e.filter(b=>txe(b)===g),p[g].length===0&&delete p[g]}),p},[e,t]);(0,Vl.useEffect)(()=>()=>n(null),[]);let d=(0,C5.useAsyncList)(o),f=o.length===d.length,m=(0,Vl.useMemo)(()=>Object.entries(t),[t]),h=(0,C5.useAsyncList)(f?m:rxe);return(0,zo.jsxs)("div",{className:s,children:[i&&e.length>3&&!!a.length&&(0,zo.jsx)(Gu,{title:(0,Qh._x)("Most used","blocks"),children:(0,zo.jsx)(am,{items:a,onSelect:r,onHover:n,label:(0,Qh._x)("Most used","blocks")})}),d.map(p=>{let g=e.filter(b=>b.category===p.slug);return!g||!g.length?null:(0,zo.jsx)(Gu,{title:p.title,icon:p.icon,children:(0,zo.jsx)(am,{items:g,onSelect:r,onHover:n,label:p.title})},p.slug)}),f&&c.length>0&&(0,zo.jsx)(Gu,{className:"block-editor-inserter__uncategorized-blocks-panel",title:(0,Qh.__)("Uncategorized"),children:(0,zo.jsx)(am,{items:c,onSelect:r,onHover:n,label:(0,Qh.__)("Uncategorized")})}),h.map(([p,g])=>{let b=u[p];return!b||!b.length?null:(0,zo.jsx)(Gu,{title:g.title,icon:g.icon,children:(0,zo.jsx)(am,{items:b,onSelect:r,onHover:n,label:g.title})},p)})]})}function nxe({rootClientId:e,onInsert:t,onHover:o,showMostUsedBlocks:r},n){let[i,s,a,c]=ku(e,t);if(!i.length)return(0,zo.jsx)(As,{});let u=[],d=[];for(let f of i)f.category!=="reusable"&&(f.isSearchOnly||(f.isAllowedInCurrentRoot?u.push(f):d.push(f)));return(0,zo.jsx)(Kh,{children:(0,zo.jsxs)("div",{ref:n,children:[!!u.length&&(0,zo.jsx)(zo.Fragment,{children:(0,zo.jsx)(Y$,{items:u,categories:s,collections:a,onSelectItem:c,onHover:o,showMostUsedBlocks:r,className:"block-editor-inserter__insertable-blocks-at-selection"})}),(0,zo.jsx)(Y$,{items:d,categories:s,collections:a,onSelectItem:c,onHover:o,showMostUsedBlocks:r,className:"block-editor-inserter__all-blocks"})]})})}var q$=(0,Vl.forwardRef)(nxe);var gK=l(P(),1),bK=l(Z(),1),kK=l(A(),1),vK=l(N(),1);var uK=l(A(),1),R5=l(P(),1),dK=l(N(),1);var J1=l(A(),1),B5=l(N(),1),Fl=l(w(),1);function ixe({selectedCategory:e,patternCategories:t,onClickCategory:o}){let r="block-editor-block-patterns-explorer__sidebar";return(0,Fl.jsx)("div",{className:`${r}__categories-list`,children:t.map(({name:n,label:i})=>(0,Fl.jsx)(J1.Button,{__next40pxDefaultSize:!0,label:i,className:`${r}__categories-list__item`,isPressed:e===n,onClick:()=>{o(n)},children:i},n))})}function sxe({searchValue:e,setSearchValue:t}){return(0,Fl.jsx)("div",{className:"block-editor-block-patterns-explorer__search",children:(0,Fl.jsx)(J1.SearchControl,{onChange:t,value:e,label:(0,B5.__)("Search"),placeholder:(0,B5.__)("Search")})})}function axe({selectedCategory:e,patternCategories:t,onClickCategory:o,searchValue:r,setSearchValue:n}){return(0,Fl.jsxs)("div",{className:"block-editor-block-patterns-explorer__sidebar",children:[(0,Fl.jsx)(sxe,{searchValue:r,setSearchValue:n}),!r&&(0,Fl.jsx)(ixe,{selectedCategory:e,patternCategories:t,onClickCategory:o})]})}var Z$=axe;var jl=l(P(),1),og=l(N(),1),iK=l(Z(),1),sK=l(A(),1),aK=l(Zo(),1);var X$=l($(),1),wa=l(P(),1),zl=l(A(),1),Q$=l(Z(),1),J$=l(N(),1);var vn=l(A(),1),zi=l(N(),1),wr=l(w(),1);function eB({currentPage:e,numPages:t,changePage:o,totalItems:r}){return(0,wr.jsxs)(vn.__experimentalVStack,{className:"block-editor-patterns__grid-pagination-wrapper",children:[(0,wr.jsx)(vn.__experimentalText,{variant:"muted",children:(0,zi.sprintf)((0,zi._n)("%s item","%s items",r),r)}),t>1&&(0,wr.jsxs)(vn.__experimentalHStack,{expanded:!1,spacing:3,justify:"flex-start",className:"block-editor-patterns__grid-pagination",children:[(0,wr.jsxs)(vn.__experimentalHStack,{expanded:!1,spacing:1,className:"block-editor-patterns__grid-pagination-previous",children:[(0,wr.jsx)(vn.Button,{variant:"tertiary",onClick:()=>o(1),disabled:e===1,"aria-label":(0,zi.__)("First page"),size:"compact",accessibleWhenDisabled:!0,className:"block-editor-patterns__grid-pagination-button",children:(0,wr.jsx)("span",{children:"\xAB"})}),(0,wr.jsx)(vn.Button,{variant:"tertiary",onClick:()=>o(e-1),disabled:e===1,"aria-label":(0,zi.__)("Previous page"),size:"compact",accessibleWhenDisabled:!0,className:"block-editor-patterns__grid-pagination-button",children:(0,wr.jsx)("span",{children:"\u2039"})})]}),(0,wr.jsx)(vn.__experimentalText,{variant:"muted",children:(0,zi.sprintf)((0,zi._x)("%1$s of %2$s","paging"),e,t)}),(0,wr.jsxs)(vn.__experimentalHStack,{expanded:!1,spacing:1,className:"block-editor-patterns__grid-pagination-next",children:[(0,wr.jsx)(vn.Button,{variant:"tertiary",onClick:()=>o(e+1),disabled:e===t,"aria-label":(0,zi.__)("Next page"),size:"compact",accessibleWhenDisabled:!0,className:"block-editor-patterns__grid-pagination-button",children:(0,wr.jsx)("span",{children:"\u203A"})}),(0,wr.jsx)(vn.Button,{variant:"tertiary",onClick:()=>o(t),disabled:e===t,"aria-label":(0,zi.__)("Last page"),size:"compact",accessibleWhenDisabled:!0,className:"block-editor-patterns__grid-pagination-button",children:(0,wr.jsx)("span",{children:"\xBB"})})]})]})]})}var $t=l(w(),1),lxe=({showTooltip:e,title:t,children:o})=>e?(0,$t.jsx)(zl.Tooltip,{text:t,children:o}):(0,$t.jsx)($t.Fragment,{children:o});function eK({id:e,isDraggable:t,pattern:o,onClick:r,onHover:n,showTitlesAsTooltip:i,category:s,isSelected:a}){let[c,u]=(0,wa.useState)(!1),{blocks:d,viewportWidth:f}=o,h=`block-editor-block-patterns-list__item-description-${(0,Q$.useInstanceId)(eK)}`,p=o.type===Nt.user,g=(0,wa.useMemo)(()=>!s||!t?d:(d??[]).map(b=>{let v=(0,X$.cloneBlock)(b);return v.attributes.metadata?.categories?.includes(s)&&(v.attributes.metadata.categories=[s]),v}),[d,t,s]);return(0,$t.jsx)(Zh,{isEnabled:t,blocks:g,pattern:o,children:({draggable:b,onDragStart:v,onDragEnd:k})=>(0,$t.jsx)("div",{className:"block-editor-block-patterns-list__list-item",draggable:b,onDragStart:y=>{u(!0),v&&(n?.(null),v(y))},onDragEnd:y=>{u(!1),k&&k(y)},children:(0,$t.jsx)(lxe,{showTooltip:i&&!p,title:o.title,children:(0,$t.jsxs)(zl.Composite.Item,{render:(0,$t.jsx)("div",{role:"option","aria-label":o.title,"aria-describedby":o.description?h:void 0,className:V("block-editor-block-patterns-list__item",{"block-editor-block-patterns-list__list-item-synced":o.type===Nt.user&&!o.syncStatus,"is-selected":a})}),id:e,onClick:()=>{r(o,d),n?.(null)},onMouseEnter:()=>{c||n?.(o)},onMouseLeave:()=>n?.(null),children:[(0,$t.jsx)(kn.Async,{placeholder:(0,$t.jsx)(cxe,{}),children:(0,$t.jsx)(kn,{blocks:d,viewportWidth:f})}),(!i||p)&&(0,$t.jsxs)(zl.__experimentalHStack,{className:"block-editor-patterns__pattern-details",spacing:2,children:[p&&!o.syncStatus&&(0,$t.jsx)("div",{className:"block-editor-patterns__pattern-icon-wrapper",children:(0,$t.jsx)(xe,{className:"block-editor-patterns__pattern-icon",icon:Ci})}),(0,$t.jsx)("div",{className:"block-editor-block-patterns-list__item-title",children:o.title})]}),!!o.description&&(0,$t.jsx)(zl.VisuallyHidden,{id:h,children:o.description})]})})})})}function cxe(){return(0,$t.jsx)("div",{className:"block-editor-block-patterns-list__item is-placeholder"})}function uxe({isDraggable:e,blockPatterns:t,onHover:o,onClickPattern:r,orientation:n,label:i=(0,J$.__)("Block patterns"),category:s,showTitlesAsTooltip:a,pagingProps:c},u){let[d,f]=(0,wa.useState)(void 0),[m,h]=(0,wa.useState)(null);(0,wa.useEffect)(()=>{let g=t[0]?.name;f(g)},[t]);let p=(g,b)=>{h(g.name),r(g,b)};return(0,$t.jsxs)(zl.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,$t.jsx)(eK,{id:g.name,pattern:g,onClick:p,onHover:o,isDraggable:e,showTitlesAsTooltip:a,category:s,isSelected:!!m&&m===g.name},g.name)),c&&(0,$t.jsx)(eB,{...c})]})}var Ca=(0,wa.forwardRef)(uxe);var lm=l(F(),1),oK=l($(),1),tB=l(N(),1),rK=l(Zo(),1),E5=l(P(),1);function tK({destinationRootClientId:e,destinationIndex:t,rootClientId:o,registry:r}){if(o===e)return t;let n=["",...r.select(_).getBlockParents(e),e],i=n.indexOf(o);return i!==-1?r.select(_).getBlockIndex(n[i+1])+1:r.select(_).getBlockOrder(o).length}function dxe({rootClientId:e="",insertionIndex:t,clientId:o,isAppender:r,onSelect:n,shouldFocusBlock:i=!0,selectBlockOnInsert:s=!0}){let a=(0,lm.useRegistry)(),{getSelectedBlock:c,getClosestAllowedInsertionPoint:u,isBlockInsertionPointVisible:d}=M((0,lm.useSelect)(_)),{destinationRootClientId:f,destinationIndex:m}=(0,lm.useSelect)(S=>{let{getSelectedBlockClientId:x,getBlockRootClientId:C,getBlockIndex:B,getBlockOrder:I,getInsertionPoint:O}=M(S(_)),E=x(),L=e,T,R=O();return t!==void 0?T=t:R&&R.hasOwnProperty("index")?(L=R?.rootClientId?R.rootClientId:e,T=R.index):o?T=B(o):!r&&E?(L=C(E),T=B(E)+1):T=I(L).length,{destinationRootClientId:L,destinationIndex:T}},[e,t,o,r]),{replaceBlocks:h,insertBlocks:p,showInsertionPoint:g,hideInsertionPoint:b,setLastFocus:v}=M((0,lm.useDispatch)(_)),k=(0,E5.useCallback)((S,x,C=!1,B)=>{(C||i||s)&&v(null);let I=c();!r&&I&&(0,oK.isUnmodifiedDefaultBlock)(I,"content")?h(I.clientId,S,null,i||C?0:null,x):p(S,r||B===void 0?m:tK({destinationRootClientId:f,destinationIndex:m,rootClientId:B,registry:a}),r||B===void 0?f:B,s,i||C?0:null,x);let O=Array.isArray(S)?S.length:1,E=(0,tB.sprintf)((0,tB._n)("%d block added.","%d blocks added.",O),O);(0,rK.speak)(E),n&&n(S)},[r,c,h,p,f,m,n,i,s,v,a]),y=(0,E5.useCallback)(S=>{if(S&&!d()){let x=u(S.name,f);x!==null&&g(x,tK({destinationRootClientId:f,destinationIndex:m,rootClientId:x,registry:a}))}else b()},[u,d,g,b,f,m,a]);return[f,k,y]}var Wu=dxe;var Jh=l(P(),1),oB=l($(),1),eg=l(F(),1),rB=l(N(),1),nK=l(Ti(),1);var fxe=(e,t,o,r)=>{let n=(0,Jh.useMemo)(()=>({[uu]:!!r}),[r]),i=(0,eg.useSelect)(p=>{let{getSettings:g}=M(p(_));return g()[y0]??!1},[]),{patternCategories:s,patterns:a,userPatternCategories:c}=(0,eg.useSelect)(p=>{let{getSettings:g,__experimentalGetAllowedPatterns:b}=M(p(_)),{__experimentalUserPatternCategories:v,__experimentalBlockPatternCategories:k}=g();return{patterns:b(t,n),userPatternCategories:v,patternCategories:k}},[t,n]),u=(0,Jh.useMemo)(()=>a.filter(p=>!(p.categories?.includes("navigation")&&!i)),[a,i]),{getClosestAllowedInsertionPointForPattern:d}=M((0,eg.useSelect)(_)),f=(0,Jh.useMemo)(()=>{let p=[...s];return c?.forEach(g=>{p.find(b=>b.name===g.name)||p.push(g)}),p},[s,c]),{createSuccessNotice:m}=(0,eg.useDispatch)(nK.store),h=(0,Jh.useCallback)((p,g)=>{let b=r?t:d(p,t);if(b===null)return;let v=p.type===Nt.user&&p.syncStatus!=="unsynced"?[(0,oB.createBlock)("core/block",{ref:p.id})]:g;e((v??[]).map(k=>{let y=(0,oB.cloneBlock)(k);return y.attributes.metadata?.categories?.includes(o)&&(y.attributes.metadata.categories=[o]),y}),p.name,!1,b),m((0,rB.sprintf)((0,rB.__)('Block pattern "%s" inserted.'),p.title),{type:"snackbar",id:"inserter-notice"})},[m,e,o,t,d,r]);return[u,f,h]},$u=fxe;var tg=l(P(),1),T5=l(Z(),1),I5=l(Fe(),1),nB=20;function iB(e,t,o,r=""){let[n,i]=(0,tg.useState)(1),s=(0,T5.usePrevious)(t),a=(0,T5.usePrevious)(r);(s!==t||a!==r)&&n!==1&&i(1);let c=e.length,u=n-1,d=(0,tg.useMemo)(()=>e.slice(u*nB,u*nB+nB),[u,e]),f=Math.ceil(e.length/nB),m=h=>{(0,I5.getScrollContainer)(o?.current)?.scrollTo(0,0),i(h)};return(0,tg.useEffect)(function(){(0,I5.getScrollContainer)(o?.current)?.scrollTo(0,0)},[t,o]),{totalItems:c,categoryPatterns:d,numPages:f,changePage:m,currentPage:n}}var Ls=l(w(),1);function mxe({filterValue:e,filteredBlockPatternsLength:t}){return e?(0,Ls.jsx)(sK.__experimentalHeading,{level:2,lineHeight:"48px",className:"block-editor-block-patterns-explorer__search-results-count",children:(0,og.sprintf)((0,og._n)("%d pattern found","%d patterns found",t),t)}):null}function pxe({searchValue:e,selectedCategory:t,patternCategories:o,rootClientId:r,onModalClose:n}){let i=(0,jl.useRef)(),s=(0,iK.useDebounce)(aK.speak,500),[a,c]=Wu({rootClientId:r,shouldFocusBlock:!0}),[u,,d]=$u(c,a,t),f=(0,jl.useMemo)(()=>o.map(v=>v.name),[o]),m=(0,jl.useMemo)(()=>{let v=u.filter(k=>{if(t===Df.name||t===Sl.name&&k.type===Nt.user||t===Yp.name&&k.blockTypes?.includes("core/post-content"))return!0;if(t==="uncategorized"){let y=k.categories?.some(S=>f.includes(S))??!1;return!k.categories?.length||!y}return k.categories?.includes(t)});return e?Vv(v,e):v},[e,u,t,f]);(0,jl.useEffect)(()=>{if(!e)return;let v=m.length,k=(0,og.sprintf)((0,og._n)("%d result found.","%d results found.",v),v);s(k)},[e,s,m.length]);let h=iB(m,t,i),[p,g]=(0,jl.useState)(e);e!==p&&(g(e),h.changePage(1));let b=!!m?.length;return(0,Ls.jsxs)("div",{className:"block-editor-block-patterns-explorer__list",ref:i,children:[(0,Ls.jsx)(mxe,{filterValue:e,filteredBlockPatternsLength:m.length}),(0,Ls.jsx)(Kh,{children:b&&(0,Ls.jsxs)(Ls.Fragment,{children:[(0,Ls.jsx)(Ca,{blockPatterns:h.categoryPatterns,onClickPattern:(v,k)=>{d(v,k),n()},isDraggable:!1}),(0,Ls.jsx)(eB,{...h})]})})]})}var lK=pxe;var P5=l(P(),1),rg=l(N(),1),cK=l(Zo(),1);function hxe(e,t){return!e.categories||!e.categories.length?!1:e.categories.some(o=>t.some(r=>r.name===o))}function ng(e,t="all"){let[o,r]=$u(void 0,e),n=(0,P5.useMemo)(()=>t==="all"?o:o.filter(s=>!ww(s,t)),[t,o]);return(0,P5.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=>!hxe(a,r))&&!s.find(a=>a.name==="uncategorized")&&s.push({name:"uncategorized",label:(0,rg._x)("Uncategorized")}),n.some(a=>a.blockTypes?.includes("core/post-content"))&&s.unshift(Yp),n.some(a=>a.type===Nt.user)&&s.unshift(Sl),n.length>0&&s.unshift({name:Df.name,label:Df.label}),(0,cK.speak)((0,rg.sprintf)((0,rg._n)("%d category button displayed.","%d category buttons displayed.",s.length),s.length)),s},[r,n])}var cm=l(w(),1);function gxe({initialCategory:e,rootClientId:t,onModalClose:o}){let[r,n]=(0,R5.useState)(""),[i,s]=(0,R5.useState)(e?.name),a=ng(t);return(0,cm.jsxs)("div",{className:"block-editor-block-patterns-explorer",children:[(0,cm.jsx)(Z$,{selectedCategory:i,patternCategories:a,onClickCategory:s,searchValue:r,setSearchValue:n}),(0,cm.jsx)(lK,{searchValue:r,selectedCategory:i,patternCategories:a,rootClientId:t,onModalClose:o})]})}function bxe({onModalClose:e,...t}){return(0,cm.jsx)(uK.Modal,{title:(0,dK.__)("Patterns"),onRequestClose:e,isFullScreen:!0,children:(0,cm.jsx)(gxe,{onModalClose:e,...t})})}var fK=bxe;var ig=l(N(),1),Dt=l(A(),1);var Qo=l(w(),1);function kxe({title:e}){return(0,Qo.jsx)(Dt.__experimentalVStack,{spacing:0,children:(0,Qo.jsx)(Dt.__experimentalView,{children:(0,Qo.jsx)(Dt.__experimentalSpacer,{marginBottom:0,paddingX:4,paddingY:3,children:(0,Qo.jsxs)(Dt.__experimentalHStack,{spacing:2,children:[(0,Qo.jsx)(Dt.Navigator.BackButton,{style:{minWidth:24,padding:0},icon:(0,ig.isRTL)()?Vo:Nr,size:"small",label:(0,ig.__)("Back")}),(0,Qo.jsx)(Dt.__experimentalSpacer,{children:(0,Qo.jsx)(Dt.__experimentalHeading,{level:5,children:e})})]})})})})}function sB({categories:e,children:t}){return(0,Qo.jsxs)(Dt.Navigator,{initialPath:"/",className:"block-editor-inserter__mobile-tab-navigation",children:[(0,Qo.jsx)(Dt.Navigator.Screen,{path:"/",children:(0,Qo.jsx)(Dt.__experimentalItemGroup,{children:e.map(o=>(0,Qo.jsx)(Dt.Navigator.Button,{path:`/category/${o.name}`,as:Dt.__experimentalItem,isAction:!0,children:(0,Qo.jsxs)(Dt.__experimentalHStack,{children:[(0,Qo.jsx)(Dt.FlexBlock,{children:o.label}),(0,Qo.jsx)(xe,{icon:(0,ig.isRTL)()?Nr:Vo})]})},o.name))})}),e.map(o=>(0,Qo.jsxs)(Dt.Navigator.Screen,{path:`/category/${o.name}`,children:[(0,Qo.jsx)(kxe,{title:(0,ig.__)("Back")}),t(o)]},o.name))]})}var ji=l(P(),1),O5=l(N(),1),Ns=l(A(),1);var Sn=l(A(),1),yn=l(N(),1);var aB=l(P(),1);var pr=l(w(),1),mK=e=>e!=="all"&&e!=="user",vxe=e=>e.name===Sl.name,yxe=[{value:"all",label:(0,yn._x)("All","patterns")},{value:Nt.directory,label:(0,yn.__)("Pattern Directory")},{value:Nt.theme,label:(0,yn.__)("Theme & Plugins")},{value:Nt.user,label:(0,yn.__)("User")}];function pK({setPatternSyncFilter:e,setPatternSourceFilter:t,patternSyncFilter:o,patternSourceFilter:r,scrollContainerRef:n,category:i}){let s=i.name===Sl.name?Nt.user:r,a=mK(s),c=vxe(i),u=(0,aB.useMemo)(()=>[{value:"all",label:(0,yn._x)("All","patterns")},{value:Bv.full,label:(0,yn._x)("Synced","patterns"),disabled:a},{value:Bv.unsynced,label:(0,yn._x)("Not synced","patterns"),disabled:a}],[a]);function d(f){t(f),mK(f)&&e("all")}return(0,pr.jsx)(pr.Fragment,{children:(0,pr.jsx)(Sn.DropdownMenu,{popoverProps:{placement:"right-end"},label:(0,yn.__)("Filter patterns"),toggleProps:{size:"compact"},icon:(0,pr.jsx)(xe,{icon:(0,pr.jsx)(Sn.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,pr.jsx)(Sn.Path,{d:"M10 17.5H14V16H10V17.5ZM6 6V7.5H18V6H6ZM8 12.5H16V11H8V12.5Z",fill:"currentColor"})})}),children:()=>(0,pr.jsxs)(pr.Fragment,{children:[!c&&(0,pr.jsx)(Sn.MenuGroup,{label:(0,yn.__)("Source"),children:(0,pr.jsx)(Sn.MenuItemsChoice,{choices:yxe,onSelect:f=>{d(f),n.current?.scrollTo(0,0)},value:s})}),(0,pr.jsx)(Sn.MenuGroup,{label:(0,yn.__)("Type"),children:(0,pr.jsx)(Sn.MenuItemsChoice,{choices:u,onSelect:f=>{e(f),n.current?.scrollTo(0,0)},value:o})}),(0,pr.jsx)("div",{className:"block-editor-inserter__patterns-filter-help",children:(0,aB.createInterpolateElement)((0,yn.__)("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,pr.jsx)(Sn.ExternalLink,{href:(0,yn.__)("https://wordpress.org/patterns/")})})})]})})})}var Wr=l(w(),1),Sxe=()=>{};function lB({rootClientId:e,onInsert:t,onHover:o=Sxe,category:r,showTitlesAsTooltip:n}){let[i,,s]=$u(t,e,r?.name),[a,c]=(0,ji.useState)("all"),[u,d]=(0,ji.useState)("all"),f=ng(e,u),m=(0,ji.useRef)(),h=(0,ji.useMemo)(()=>i.filter(k=>ww(k,u,a)?!1:r.name===Df.name||r.name===Sl.name&&k.type===Nt.user||r.name===Yp.name&&k.blockTypes?.includes("core/post-content")?!0:r.name==="uncategorized"?k.categories?!k.categories.some(y=>f.some(S=>S.name===y)):!0:k.categories?.includes(r.name)),[i,f,r.name,u,a]),p=iB(h,r,m),{changePage:g}=p;(0,ji.useEffect)(()=>()=>o(null),[]);let b=(0,ji.useCallback)(k=>{c(k),g(1)},[c,g]),v=(0,ji.useCallback)(k=>{d(k),g(1)},[d,g]);return(0,Wr.jsxs)(Wr.Fragment,{children:[(0,Wr.jsxs)(Ns.__experimentalVStack,{spacing:2,className:"block-editor-inserter__patterns-category-panel-header",children:[(0,Wr.jsxs)(Ns.__experimentalHStack,{children:[(0,Wr.jsx)(Ns.FlexBlock,{children:(0,Wr.jsx)(Ns.__experimentalHeading,{className:"block-editor-inserter__patterns-category-panel-title",size:13,level:4,as:"div",children:r.label})}),(0,Wr.jsx)(pK,{patternSyncFilter:a,patternSourceFilter:u,setPatternSyncFilter:b,setPatternSourceFilter:v,scrollContainerRef:m,category:r})]}),!h.length&&(0,Wr.jsx)(Ns.__experimentalText,{variant:"muted",className:"block-editor-inserter__patterns-category-no-results",children:(0,O5.__)("No results found")})]}),h.length>0&&(0,Wr.jsxs)(Wr.Fragment,{children:[(0,Wr.jsx)(Ns.__experimentalText,{size:"12",as:"p",className:"block-editor-inserter__help-text",children:(0,O5.__)("Drag and drop patterns into the canvas.")}),(0,Wr.jsx)(Ca,{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 uB=l(Z(),1),dB=l(A(),1),hK=l(P(),1);var um=l(w(),1),{Tabs:cB}=M(dB.privateApis);function _xe({categories:e,selectedCategory:t,onSelectCategory:o,children:r}){let s={type:"tween",duration:(0,uB.useReducedMotion)()?0:.25,ease:[.6,0,.4,1]},a=(0,uB.usePrevious)(t),c=t?t.name:null,[u,d]=(0,hK.useState)(),f=e?.[0]?.name;return c===null&&!u&&f&&d(f),(0,um.jsxs)(cB,{selectOnMove:!1,selectedTabId:c,orientation:"vertical",onSelect:m=>{o(e.find(h=>h.name===m))},activeTabId:u,onActiveTabIdChange:d,children:[(0,um.jsx)(cB.TabList,{className:"block-editor-inserter__category-tablist",children:e.map(m=>(0,um.jsx)(cB.Tab,{tabId:m.name,"aria-current":m===t?"true":void 0,children:m.label},m.name))}),e.map(m=>(0,um.jsx)(cB.TabPanel,{tabId:m.name,focusable:!1,children:(0,um.jsx)(dB.__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 fB=_xe;var Wn=l(w(),1);function xxe({onSelectCategory:e,selectedCategory:t,onInsert:o,rootClientId:r,children:n}){let[i,s]=(0,gK.useState)(!1),a=ng(r),c=(0,bK.useViewportMatch)("medium","<");return a.length?(0,Wn.jsxs)(Wn.Fragment,{children:[!c&&(0,Wn.jsxs)("div",{className:"block-editor-inserter__block-patterns-tabs-container",children:[(0,Wn.jsx)(fB,{categories:a,selectedCategory:t,onSelectCategory:e,children:n}),(0,Wn.jsx)(kK.Button,{__next40pxDefaultSize:!0,className:"block-editor-inserter__patterns-explore-button",onClick:()=>s(!0),variant:"secondary",children:(0,vK.__)("Explore all patterns")})]}),c&&(0,Wn.jsx)(sB,{categories:a,children:u=>(0,Wn.jsx)("div",{className:"block-editor-inserter__category-panel",children:(0,Wn.jsx)(lB,{onInsert:o,rootClientId:r,category:u},u.name)})}),i&&(0,Wn.jsx)(fK,{initialCategory:t||a[0],patternCategories:a,onModalClose:()=>s(!1),rootClientId:r})]}):(0,Wn.jsx)(As,{})}var yK=xxe;var DK=l(N(),1),VK=l(Z(),1),FK=l(A(),1),hB=l(P(),1);var pB=l(A(),1),AK=l(N(),1),LK=l(Z(),1);var TK=l(A(),1),IK=l(N(),1);var Vt=l(A(),1),$n=l(N(),1),Ba=l(P(),1),L5=l($(),1);var Fy=l(F(),1),wK=l(Ti(),1),CK=l(A5(),1),BK=l(un(),1);var _K=l($(),1),xK=l(w(),1),wxe={image:"img",video:"video",audio:"audio"};function mB(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=wxe[t],s=(0,xK.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,_K.createBlock)(`core/${t}`,o),s]}var st=l(w(),1),Cxe=["image"],Bxe={placement:"bottom-end",className:"block-editor-inserter__media-list__item-preview-options__popover"};function Exe({category:e,media:t}){if(!e.getReportUrl)return null;let o=e.getReportUrl(t);return(0,st.jsx)(Vt.DropdownMenu,{className:"block-editor-inserter__media-list__item-preview-options",label:(0,$n.__)("Options"),popoverProps:Bxe,icon:ks,children:()=>(0,st.jsx)(Vt.MenuGroup,{children:(0,st.jsx)(Vt.MenuItem,{onClick:()=>window.open(o,"_blank").focus(),icon:mA,children:(0,$n.sprintf)((0,$n.__)("Report %s"),e.mediaType)})})})}function Txe({onClose:e,onSubmit:t}){return(0,st.jsxs)(Vt.Modal,{title:(0,$n.__)("Insert external image"),onRequestClose:e,className:"block-editor-inserter-media-tab-media-preview-inserter-external-image-modal",children:[(0,st.jsxs)(Vt.__experimentalVStack,{spacing:3,children:[(0,st.jsx)("p",{children:(0,$n.__)("This image cannot be uploaded to your Media Library, but it can still be inserted as an external image.")}),(0,st.jsx)("p",{children:(0,$n.__)("External images can be removed by the external provider without warning and could even have legal compliance issues related to privacy legislation.")})]}),(0,st.jsxs)(Vt.Flex,{className:"block-editor-block-lock-modal__actions",justify:"flex-end",expanded:!1,children:[(0,st.jsx)(Vt.FlexItem,{children:(0,st.jsx)(Vt.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:e,children:(0,$n.__)("Cancel")})}),(0,st.jsx)(Vt.FlexItem,{children:(0,st.jsx)(Vt.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:t,children:(0,$n.__)("Insert")})})]})]})}function EK({media:e,onClick:t,category:o}){let[r,n]=(0,Ba.useState)(!1),[i,s]=(0,Ba.useState)(!1),[a,c]=(0,Ba.useState)(!1),[u,d]=(0,Ba.useMemo)(()=>mB(e,o.mediaType),[e,o.mediaType]),{createErrorNotice:f,createSuccessNotice:m}=(0,Fy.useDispatch)(wK.store),{getSettings:h,getBlock:p}=(0,Fy.useSelect)(_),{updateBlockAttributes:g}=(0,Fy.useDispatch)(_),b=(0,Ba.useCallback)(S=>{if(a)return;let x=h(),C=(0,L5.cloneBlock)(S),{id:B,url:I,caption:O}=C.attributes;if(!B&&!x.mediaUpload){n(!0);return}if(B){t(C);return}c(!0),window.fetch(I).then(E=>E.blob()).then(E=>{let L=(0,BK.getFilename)(I)||"image.jpg",T=new File([E],L,{type:E.type});x.mediaUpload({filesList:[T],additionalData:{caption:O},onFileChange([R]){(0,CK.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,$n.__)("Image uploaded and inserted."),{type:"snackbar",id:"inserter-notice"})),c(!1))},allowedTypes:Cxe,onError(R){f(R,{type:"snackbar",id:"inserter-notice"}),c(!1)}})}).catch(()=>{n(!0),c(!1)})},[a,h,t,m,g,f,p]),v=typeof e.title=="string"?e.title:e.title?.rendered||(0,$n.__)("no title"),k=(0,Ba.useCallback)(()=>s(!0),[]),y=(0,Ba.useCallback)(()=>s(!1),[]);return(0,st.jsxs)(st.Fragment,{children:[(0,st.jsx)(Zh,{isEnabled:!0,blocks:[u],children:({draggable:S,onDragStart:x,onDragEnd:C})=>(0,st.jsx)("div",{className:V("block-editor-inserter__media-list__list-item",{"is-hovered":i}),draggable:S,onDragStart:x,onDragEnd:C,children:(0,st.jsxs)("div",{onMouseEnter:k,onMouseLeave:y,children:[(0,st.jsx)(Vt.Tooltip,{text:v,children:(0,st.jsx)(Vt.Composite.Item,{render:(0,st.jsx)("div",{"aria-label":v,role:"option",className:"block-editor-inserter__media-list__item"}),onClick:()=>b(u),children:(0,st.jsxs)("div",{className:"block-editor-inserter__media-list__item-preview",children:[d,a&&(0,st.jsx)("div",{className:"block-editor-inserter__media-list__item-preview-spinner",children:(0,st.jsx)(Vt.Spinner,{})})]})})}),!a&&(0,st.jsx)(Exe,{category:o,media:e})]})})}),r&&(0,st.jsx)(Txe,{onClose:()=>n(!1),onSubmit:()=>{t((0,L5.cloneBlock)(u)),m((0,$n.__)("Image inserted."),{type:"snackbar",id:"inserter-notice"}),n(!1)}})]})}var N5=l(w(),1);function Ixe({mediaList:e,category:t,onClick:o,label:r=(0,IK.__)("Media List")}){return(0,N5.jsx)(TK.Composite,{role:"listbox",className:"block-editor-inserter__media-list","aria-label":r,children:e.map((n,i)=>(0,N5.jsx)(EK,{media:n,category:t,onClick:o},n.id||n.sourceId||i))})}var PK=Ixe;var Ul=l(P(),1),M5=l(F(),1);function RK(e,t={}){let[o,r]=(0,Ul.useState)(),[n,i]=(0,Ul.useState)(!1),s=(0,Ul.useRef)();return(0,Ul.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 OK(e){let[t,o]=(0,Ul.useState)([]),r=(0,M5.useSelect)(a=>M(a(_)).getInserterMediaCategories(),[]),{canInsertImage:n,canInsertVideo:i,canInsertAudio:s}=(0,M5.useSelect)(a=>{let{canInsertBlockType:c}=a(_);return{canInsertImage:c("core/image",e),canInsertVideo:c("core/video",e),canInsertAudio:c("core/audio",e)}},[e]);return(0,Ul.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 Ku=l(w(),1),Pxe=10;function zy({rootClientId:e,onInsert:t,category:o}){let[r,n,i]=(0,LK.useDebouncedInput)(),{mediaList:s,isLoading:a}=RK(o,{per_page:i?20:Pxe,search:i}),c="block-editor-inserter__media-panel",u=o.labels.search_items||(0,AK.__)("Search");return(0,Ku.jsxs)("div",{className:c,children:[(0,Ku.jsx)(pB.SearchControl,{className:`${c}-search`,onChange:n,value:r,label:u,placeholder:u}),a&&(0,Ku.jsx)("div",{className:`${c}-spinner`,children:(0,Ku.jsx)(pB.Spinner,{})}),!a&&!s?.length&&(0,Ku.jsx)(As,{}),!a&&!!s?.length&&(0,Ku.jsx)(PK,{rootClientId:e,onClick:t,mediaList:s,category:o})]})}var NK=l(F(),1);function Rxe({fallback:e=null,children:t}){return(0,NK.useSelect)(r=>{let{getSettings:n}=r(_);return!!n().mediaUpload},[])?t:e}var Ms=Rxe;var MK=l(A(),1),Oxe=()=>null,Yu=(0,MK.withFilters)("editor.MediaUpload")(Oxe);var Kn=l(w(),1),Axe=["image","video","audio"];function Lxe({rootClientId:e,selectedCategory:t,onSelectCategory:o,onInsert:r,children:n}){let i=OK(e),s=(0,VK.useViewportMatch)("medium","<"),a="block-editor-inserter__media-tabs",c=(0,hB.useCallback)(d=>{if(!d?.url)return;let f=window.__experimentalDataViewsMediaModal&&d.mime_type?d.mime_type.split("/")[0]:d.type,[m]=mB(d,f);r(m)},[r]),u=(0,hB.useMemo)(()=>i.map(d=>({...d,label:d.labels.name})),[i]);return u.length?(0,Kn.jsxs)(Kn.Fragment,{children:[!s&&(0,Kn.jsxs)("div",{className:`${a}-container`,children:[(0,Kn.jsx)(fB,{categories:u,selectedCategory:t,onSelectCategory:o,children:n}),(0,Kn.jsx)(Ms,{children:(0,Kn.jsx)(Yu,{multiple:!1,onSelect:c,allowedTypes:Axe,render:({open:d})=>(0,Kn.jsx)(FK.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,DK.__)("Open Media Library")})})})]}),s&&(0,Kn.jsx)(sB,{categories:u,children:d=>(0,Kn.jsx)(zy,{onInsert:r,rootClientId:e,category:d})})]}):(0,Kn.jsx)(As,{})}var D5=Lxe;var jy=l(P(),1),qu=l(N(),1),V5=l(A(),1),bB=l(Z(),1),UK=l(Zo(),1),HK=l(F(),1);var zK=l(A(),1),{Fill:jK,Slot:Nxe}=(0,zK.createSlotFill)("__unstableInserterMenuExtension");jK.Slot=Nxe;var gB=jK;var _n=l(w(),1),Mxe=9,Dxe=[];function Vxe({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,bB.useDebounce)(UK.speak,500),{prioritizedBlocks:v}=(0,HK.useSelect)(z=>({prioritizedBlocks:z(_).getBlockListSettings(n)?.prioritizedInserterBlocks||Dxe}),[n]),[k,y]=Wu({onSelect:t,rootClientId:n,clientId:i,isAppender:s,insertionIndex:a,shouldFocusBlock:m,selectBlockOnInsert:p}),[S,x,C,B]=ku(k,y,g),[I,,O]=$u(y,k,void 0,g),E=(0,jy.useMemo)(()=>{if(c===0)return[];let z=Vv(I,e);return c!==void 0?z.slice(0,c):z},[e,I,c]),L=u;h&&E.length>2&&(L=0);let T=(0,jy.useMemo)(()=>{if(L===0)return[];let z=S.filter(te=>te.name!=="core/block"),H=fa(z,"frecency","desc");!e&&v.length&&(H=Kw(H,v));let W=Gw(H,x,C,e);return L!==void 0?W.slice(0,L):W},[e,S,x,C,L,v]);(0,jy.useEffect)(()=>{if(!e)return;let z=T.length+E.length,H=(0,qu.sprintf)((0,qu._n)("%d result found.","%d results found.",z),z);b(H)},[e,b,T,E]);let R=(0,bB.useAsyncList)(T,{step:Mxe}),D=T.length>0||E.length>0,j=!!T.length&&(0,_n.jsx)(Gu,{title:(0,_n.jsx)(V5.VisuallyHidden,{children:(0,qu.__)("Blocks")}),children:(0,_n.jsx)(am,{items:R,onSelect:B,onHover:o,label:(0,qu.__)("Blocks"),isDraggable:f})}),G=!!E.length&&(0,_n.jsx)(Gu,{title:(0,_n.jsx)(V5.VisuallyHidden,{children:(0,qu.__)("Block patterns")}),children:(0,_n.jsx)("div",{className:"block-editor-inserter__quick-inserter-patterns",children:(0,_n.jsx)(Ca,{blockPatterns:E,onClickPattern:O,onHover:r,isDraggable:f})})});return(0,_n.jsxs)(Kh,{children:[!d&&!D&&(0,_n.jsx)(As,{}),h?G:j,!!T.length&&!!E.length&&(0,_n.jsx)("div",{className:"block-editor-inserter__quick-inserter-separator"}),h?j:G,d&&(0,_n.jsx)(gB.Slot,{fillProps:{onSelect:B,onHover:o,filterValue:e,hasItems:D,rootClientId:k},children:z=>z.length?z:D?null:(0,_n.jsx)(As,{})})]})}var kB=Vxe;var yB=l(A(),1),GK=l(P(),1);var Hl=l(w(),1),{Tabs:vB}=M(yB.privateApis);function Fxe({defaultTabId:e,onClose:t,onSelect:o,selectedTab:r,tabs:n,closeButtonLabel:i},s){return(0,Hl.jsx)("div",{className:"block-editor-tabbed-sidebar",children:(0,Hl.jsxs)(vB,{selectOnMove:!1,defaultTabId:e,onSelect:o,selectedTabId:r,children:[(0,Hl.jsxs)("div",{className:"block-editor-tabbed-sidebar__tablist-and-close-button",children:[(0,Hl.jsx)(yB.Button,{className:"block-editor-tabbed-sidebar__close-button",icon:xf,label:i,onClick:()=>t(),size:"compact"}),(0,Hl.jsx)(vB.TabList,{className:"block-editor-tabbed-sidebar__tablist",ref:s,children:n.map(a=>(0,Hl.jsx)(vB.Tab,{tabId:a.name,className:"block-editor-tabbed-sidebar__tab",children:a.title},a.name))})]}),n.map(a=>(0,Hl.jsx)(vB.TabPanel,{tabId:a.name,focusable:!1,className:"block-editor-tabbed-sidebar__tabpanel",ref:a.panelRef,children:a.panel},a.name))]})})}var SB=(0,GK.forwardRef)(Fxe);var _B=l(F(),1),sg=l(P(),1);function Uy(e=!0){let{setZoomLevel:t,resetZoomLevel:o}=M((0,_B.useDispatch)(_)),{isZoomedOut:r,isZoomOut:n}=(0,_B.useSelect)(a=>{let{isZoomOut:c}=M(a(_));return{isZoomedOut:c(),isZoomOut:c}},[]),i=(0,sg.useRef)(!1),s=(0,sg.useRef)(e);(0,sg.useEffect)(()=>{r!==s.current&&(i.current=!1)},[r]),(0,sg.useEffect)(()=>(s.current=e,e!==n()&&(i.current=!0,e?t("auto-scaled"):o()),()=>{i.current&&n()&&o()}),[e,n,o,t])}var Ze=l(w(),1),$K=()=>{};function zxe({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,WK.useSelect)(he=>{let{isZoomOut:we,getSectionRootClientId:De}=M(he(_));return{isZoomOutMode:we(),hasSectionRootClientId:!!De()}},[]),[b,v,k]=(0,Hy.useDebouncedInput)(a),[y,S]=(0,Ft.useState)(null),[x,C]=(0,Ft.useState)(m),[B,I]=(0,Ft.useState)("all"),[O,E]=(0,Ft.useState)(null),L=(0,Hy.useViewportMatch)("large"),R=(0,Hy.useViewportMatch)("medium","<")?d:$K;function D(){return f||(p?"patterns":"blocks")}let[j,G]=(0,Ft.useState)(D());Uy(g&&(j==="patterns"||j==="media")&&L);let[H,W,te]=Wu({rootClientId:e,clientId:t,isAppender:o,insertionIndex:r,shouldFocusBlock:c}),ne=(0,Ft.useRef)(),ae=(0,Ft.useCallback)((he,we,De,ct)=>{W(he,we,De,ct),n(he),R(),window.requestAnimationFrame(()=>{!c&&!ne.current?.contains(h.current.ownerDocument.activeElement)&&ne.current?.querySelector("button").focus()})},[W,R,n,h,c]),X=(0,Ft.useCallback)((he,we,...De)=>{te(!1),W(he,{patternName:we},...De),n(),R()},[W,R,n,te]),ee=(0,Ft.useCallback)(he=>{te(he),S(he)},[te,S]),le=(0,Ft.useCallback)((he,we)=>{C(he),I(we),u?.()},[C,u]),Q=j==="patterns"&&!k&&!!x,J=j==="media"&&!!O,q=(0,Ft.useMemo)(()=>j==="media"?null:(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(ag.SearchControl,{className:"block-editor-inserter__search",onChange:he=>{y&&S(null),v(he)},value:b,label:(0,Zu.__)("Search"),placeholder:(0,Zu.__)("Search")}),!!k&&(0,Ze.jsx)(kB,{filterValue:k,onSelect:n,onHover:ee,rootClientId:e,clientId:t,isAppender:o,__experimentalInsertionIndex:r,showBlockDirectory:!0,shouldFocusBlock:c,prioritizePatterns:j==="patterns"})]}),[j,y,S,v,b,k,n,ee,c,t,e,r,o]),U=(0,Ft.useMemo)(()=>(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)("div",{className:"block-editor-inserter__block-list",children:(0,Ze.jsx)(q$,{ref:ne,rootClientId:H,onInsert:ae,onHover:ee,showMostUsedBlocks:s})}),i&&(0,Ze.jsxs)("div",{className:"block-editor-inserter__tips",children:[(0,Ze.jsx)(ag.VisuallyHidden,{as:"h2",children:(0,Zu.__)("A tip for using the block editor")}),(0,Ze.jsx)(f9,{})]})]}),[H,ae,ee,s,i]),K=(0,Ft.useMemo)(()=>(0,Ze.jsx)(yK,{rootClientId:H,onInsert:X,onSelectCategory:le,selectedCategory:x,children:Q&&(0,Ze.jsx)(lB,{rootClientId:H,onInsert:X,category:x,patternFilter:B,showTitlesAsTooltip:!0})}),[H,X,le,B,x,Q]),se=(0,Ft.useMemo)(()=>(0,Ze.jsx)(D5,{rootClientId:H,selectedCategory:O,onSelectCategory:E,onInsert:ae,children:J&&(0,Ze.jsx)(zy,{rootClientId:H,onInsert:ae,category:O})}),[H,ae,O,E,J]),ce=he=>{he!=="patterns"&&C(null),G(he)},Se=(0,Ft.useRef)();return(0,Ft.useLayoutEffect)(()=>{Se.current&&window.requestAnimationFrame(()=>{Se.current.querySelector('[role="tab"][aria-selected="true"]')?.focus()})},[]),(0,Ze.jsxs)("div",{className:V("block-editor-inserter__menu",{"show-panel":Q||J,"is-zoom-out":p}),ref:h,children:[(0,Ze.jsx)("div",{className:"block-editor-inserter__main-area",children:(0,Ze.jsx)(SB,{ref:Se,onSelect:ce,onClose:d,selectedTab:j,closeButtonLabel:(0,Zu.__)("Close Block Inserter"),tabs:[{name:"blocks",title:(0,Zu.__)("Blocks"),panel:(0,Ze.jsxs)(Ze.Fragment,{children:[q,j==="blocks"&&!k&&U]})},{name:"patterns",title:(0,Zu.__)("Patterns"),panel:(0,Ze.jsxs)(Ze.Fragment,{children:[q,j==="patterns"&&!k&&K]})},{name:"media",title:(0,Zu.__)("Media"),panel:(0,Ze.jsxs)(Ze.Fragment,{children:[q,se]})}]})}),i&&y&&(0,Ze.jsx)(ag.Popover,{className:"block-editor-inserter__preview-container__popover",placement:"right-start",offset:16,focusOnMount:!1,animate:!1,children:(0,Ze.jsx)(K1,{item:y})})]})}var F5=(0,Ft.forwardRef)(zxe);function jxe(e,t){return(0,Ze.jsx)(F5,{...e,onPatternCategorySelection:$K,ref:t})}var KK=(0,Ft.forwardRef)(jxe);var xB=l(P(),1),Gy=l(N(),1),wB=l(A(),1),YK=l(F(),1);var dm=l(w(),1),Uxe=6,Hxe=6,Gxe=2;function CB({onSelect:e,rootClientId:t,clientId:o,isAppender:r,selectBlockOnInsert:n,hasSearch:i=!0}){let[s,a]=(0,xB.useState)(""),[c,u]=Wu({onSelect:e,rootClientId:t,clientId:o,isAppender:r,selectBlockOnInsert:n}),[d]=ku(c,u,!0),{setInserterIsOpened:f,insertionIndex:m}=(0,YK.useSelect)(g=>{let{getSettings:b,getBlockIndex:v,getBlockCount:k}=g(_),y=b(),S=v(o),x=k();return{setInserterIsOpened:y.__experimentalSetIsInserterOpened,insertionIndex:S===-1?x:S}},[o]),h=i&&d.length>Uxe;(0,xB.useEffect)(()=>{f&&f(!1)},[f]);let p=()=>{f({filterValue:s,onSelect:e,rootClientId:t,insertionIndex:m})};return(0,dm.jsxs)("div",{className:V("block-editor-inserter__quick-inserter",{"has-search":h,"has-expand":f}),children:[h&&(0,dm.jsx)(wB.SearchControl,{className:"block-editor-inserter__search",value:s,onChange:g=>{a(g)},label:(0,Gy.__)("Search"),placeholder:(0,Gy.__)("Search")}),(0,dm.jsx)("div",{className:"block-editor-inserter__quick-inserter-results",children:(0,dm.jsx)(kB,{filterValue:s,onSelect:e,rootClientId:t,clientId:o,isAppender:r,maxBlockPatterns:s?Gxe:0,maxBlockTypes:Hxe,isDraggable:!1,selectBlockOnInsert:n,isQuick:!0})}),f&&(0,dm.jsx)(wB.Button,{__next40pxDefaultSize:!0,className:"block-editor-inserter__quick-inserter-expand",onClick:p,"aria-label":(0,Gy.__)("Browse all. This will open the main inserter panel in the editor toolbar."),children:(0,Gy.__)("Browse all")})]})}var Wxe=50;function qK(e,t){if(!e||!e.attributes||!t?.__experimentalLabel)return null;let o=t.__experimentalLabel(e.attributes,{context:"appender"});return typeof o=="string"&&o.length<Wxe&&o.length>0?o:null}var Wy=l(w(),1),$xe=({onToggle:e,disabled:t,isOpen:o,blockTitle:r,hasSingleBlockType:n,appenderLabel:i,toggleProps:s={}})=>{let{as:a=BB.Button,label:c,onClick:u,...d}=s,f=c;!f&&i?f=i:!f&&n?f=(0,Gl.sprintf)((0,Gl._x)("Add %s","directly add the only allowed block"),r.toLowerCase()):f||(f=(0,Gl._x)("Add block","Generic label for block inserter button"));function m(h){e&&e(h),u&&u(h)}return(0,Wy.jsx)(a,{__next40pxDefaultSize:s.as?void 0:!0,icon:wi,label:f,tooltipPosition:"bottom",onClick:m,className:"block-editor-inserter__toggle","aria-haspopup":n?!1:"true","aria-expanded":n?!1:o,disabled:t,...d})},Kxe=class extends XK.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=$xe}=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,Wy.jsx)(CB,{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,Wy.jsx)(KK,{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,Wy.jsx)(BB.Dropdown,{className:"block-editor-inserter",contentClassName:V("block-editor-inserter__popover",{"is-quick":n}),popoverProps:{position:e,shift:!0},onToggle:this.onToggle,expandOnMobile:!0,headerTitle:(0,Gl.__)("Add a block"),renderToggle:this.renderToggle,renderContent:this.renderContent,onClose:i})}},Ui=(0,TB.compose)([(0,EB.withSelect)((e,{clientId:t,rootClientId:o,shouldDirectInsert:r=!0})=>{let{getBlockRootClientId:n,hasInserterItems:i,getAllowedBlocks:s,getDirectInsertBlock:a}=e(_),{getBlockVariations:c,getBlockType:u}=e($y.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=qK(f,p);return{hasItems:i(o),hasSingleBlockType:m,blockTitle:h?h.title:"",allowedBlockType:h,directInsertBlock:f,appenderLabel:g,rootClientId:o}}),(0,EB.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:v,getPreviousBlockClientId:k}=o(_);if(!b||!n&&!r)return{};let y={},S={};if(n){let x=v(n),C=v(k(n));x?.name===C?.name&&(S=C?.attributes||{})}else{let x=v(r);if(x?.innerBlocks?.length){let C=x.innerBlocks[x.innerBlocks.length-1];c&&c?.name===C.name&&(S=C.attributes)}}return b.forEach(x=>{S.hasOwnProperty(x)&&(y[x]=S[x])}),y}function m(){let{getBlockIndex:b,getBlockSelectionEnd:v,getBlockOrder:k,getBlockRootClientId:y}=o(_);if(n)return b(n);let S=v();return!i&&S&&y(S)===r?b(S)+1:k(r).length}let{insertBlock:h}=e(_),p;if(c){let b=f(c.attributesToCopy);p=(0,$y.createBlock)(c.name,{...c.attributes||{},...b})}else p=(0,$y.createBlock)(a.name);h(p,m(),r,d),u&&u(p);let g=(0,Gl.sprintf)((0,Gl.__)("%s block added"),a.title);(0,ZK.speak)(g)}})),(0,TB.ifCondition)(({hasItems:e,isAppender:t,rootClientId:o,clientId:r})=>e||!t&&!o&&!r)])(Kxe);var Ky=l(w(),1),Yxe="\uFEFF";function lg({rootClientId:e}){let{showPrompt:t,isLocked:o,placeholder:r,isManualGrid:n}=(0,IB.useSelect)(u=>{let{getBlockCount:d,getSettings:f,getTemplateLock:m,getBlockAttributes:h}=u(_),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,IB.useDispatch)(_);if(o||n)return null;let a=(0,QK.decodeEntities)(r)||(0,z5.__)("Type / to choose a block"),c=()=>{i(void 0,e),s()};return(0,Ky.jsxs)("div",{"data-root-client-id":e||"",className:V("block-editor-default-block-appender",{"has-visible-prompt":t}),children:[(0,Ky.jsx)("p",{tabIndex:"0",role:"button","aria-label":(0,z5.__)("Add default block"),className:"block-editor-default-block-appender__content",onKeyDown:u=>{(PB.ENTER===u.keyCode||PB.SPACE===u.keyCode)&&c()},onClick:()=>c(),onFocus:()=>{t&&c()},children:t?a:Yxe}),(0,Ky.jsx)(Ui,{rootClientId:e,position:"bottom right",isAppender:!0,__experimentalIsQuick:!0})]})}var JK=l(A(),1),j5=l(P(),1),Yy=l(N(),1);var eY=l(Re(),1);var RB=l(w(),1);function tY({rootClientId:e,className:t,onFocus:o,tabIndex:r,onSelect:n},i){return(0,RB.jsx)(Ui,{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,Yy.sprintf)((0,Yy._x)("Add %s","directly add the only allowed block"),u.toLowerCase()):h=(0,Yy._x)("Add block","Generic label for block inserter button"),(0,RB.jsx)(JK.Button,{__next40pxDefaultSize:!0,ref:i,onFocus:o,tabIndex:r,className:V(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,RB.jsx)(xe,{icon:wi})})},isAppender:!0})}var oY=(0,j5.forwardRef)((e,t)=>((0,eY.default)("wp.blockEditor.ButtonBlockerAppender",{alternative:"wp.blockEditor.ButtonBlockAppender",since:"5.9"}),tY(e,t))),Xu=(0,j5.forwardRef)(tY);var cg=l(w(),1);function qxe({rootClientId:e}){return(0,U5.useSelect)(o=>o(_).canInsertBlockType((0,rY.getDefaultBlockName)(),e))?(0,cg.jsx)(lg,{rootClientId:e}):(0,cg.jsx)(Xu,{rootClientId:e,className:"block-list-appender__toggle"})}function nY({rootClientId:e,CustomAppender:t,className:o,tagName:r="div"}){let n=(0,U5.useSelect)(i=>{let{getBlockInsertionPoint:s,isBlockInsertionPointVisible:a,getBlockCount:c}=i(_),u=s();return a()&&e===u?.rootClientId&&c(e)===0},[e]);return(0,cg.jsx)(r,{tabIndex:-1,className:V("block-list-appender wp-block",o,{"is-drag-over":n}),contentEditable:!1,"data-block":!0,children:t?(0,cg.jsx)(t,{}):(0,cg.jsx)(qxe,{rootClientId:e})})}var vY=l(Z(),1),Zy=l(F(),1),yY=l(P(),1),SY=l(N(),1);var ug=l(F(),1),Ju=l(P(),1),LB=l(A(),1),bY=l(Z(),1);var aY=l(F(),1),Qu=l(P(),1),lY=l(A(),1),cY=l(N(),1);var sY=l(Z(),1),H5=l(Fe(),1),iY=new WeakMap;function Zxe(e){let t=(0,sY.useRefEffect)(o=>{function r(i){let{deltaX:s,deltaY:a,target:c}=i,u=e.current,d=iY.get(u);d||(d=(0,H5.getScrollContainer)(u),iY.set(u,d));let f=(0,H5.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 fm=Zxe;var G5=l(w(),1),Xxe=Number.MAX_SAFE_INTEGER;function Qxe({previousClientId:e,nextClientId:t,children:o,__unstablePopoverSlot:r,__unstableContentRef:n,operation:i="insert",nearestSide:s="right",...a}){let[c,u]=(0,Qu.useReducer)(k=>(k+1)%Xxe,0),{orientation:d,rootClientId:f,isVisible:m}=(0,aY.useSelect)(k=>{let{getBlockListSettings:y,getBlockRootClientId:S,isBlockVisible:x}=k(_),C=S(e??t);return{orientation:y(C)?.orientation||"vertical",rootClientId:C,isVisible:x(e)&&x(t)}},[e,t]),h=mt(e),p=mt(t),g=d==="vertical",b=(0,Qu.useMemo)(()=>c<0||!h&&!p||!m?void 0:{contextElement:i==="group"?p||h:h||p,getBoundingClientRect(){let y=h?h.getBoundingClientRect():null,S=p?p.getBoundingClientRect():null,x=0,C=0,B=0,I=0;if(i==="group"){let O=S||y;C=O.top,B=0,I=O.bottom-O.top,x=s==="left"?O.left-2:O.right-2}else g?(C=y?y.bottom:S.top,B=y?y.width:S.width,I=S&&y?S.top-y.bottom:0,x=y?y.left:S.left):(C=y?y.top:S.top,I=y?y.height:S.height,(0,cY.isRTL)()?(x=S?S.right:y.left,B=y&&S?y.left-S.right:0):(x=y?y.right:S.left,B=y&&S?S.left-y.right:0),B=Math.max(B,0));return new window.DOMRect(x,C,B,I)}},[h,p,c,g,m,i,s]),v=fm(n);return(0,Qu.useLayoutEffect)(()=>{if(!h)return;let k=new window.MutationObserver(u);return k.observe(h,{attributes:!0}),()=>{k.disconnect()}},[h]),(0,Qu.useLayoutEffect)(()=>{if(!p)return;let k=new window.MutationObserver(u);return k.observe(p,{attributes:!0}),()=>{k.disconnect()}},[p]),(0,Qu.useLayoutEffect)(()=>{if(h)return h.ownerDocument.defaultView.addEventListener("resize",u),()=>{h.ownerDocument.defaultView?.removeEventListener("resize",u)}},[h]),!h&&!p||!m?null:(0,G5.jsx)(lY.Popover,{ref:v,animate:!1,anchor:b,focusOnMount:!1,__unstableSlotName:r,inline:!r,...a,className:V("block-editor-block-popover","block-editor-block-popover__inbetween",a.className),resize:!1,flip:!1,placement:"overlay",variant:"unstyled",children:(0,G5.jsx)("div",{className:"block-editor-block-popover__inbetween-container",children:o})},t+"--"+f)}var OB=Qxe;var mY=l(F(),1),pY=l(Z(),1),hY=l(A(),1);var $l=l(P(),1);var uY=l(Z(),1),dY=l(A(),1),Wl=l(P(),1);var W5=l(w(),1),Jxe=Number.MAX_SAFE_INTEGER;function ewe({clientId:e,bottomClientId:t,children:o,__unstablePopoverSlot:r,__unstableContentRef:n,shift:i=!0,...s},a){let c=mt(e),u=mt(t??e),d=(0,uY.useMergeRefs)([a,fm(n)]),[f,m]=(0,Wl.useReducer)(p=>(p+1)%Jxe,0);(0,Wl.useLayoutEffect)(()=>{if(!c)return;let p=new window.MutationObserver(m);return p.observe(c,{attributes:!0}),()=>{p.disconnect()}},[c]);let h=(0,Wl.useMemo)(()=>{if(!(f<0||!c||t&&!u))return{getBoundingClientRect(){return u?bD(Sh(c),Sh(u)):Sh(c)},contextElement:c}},[f,c,t,u]);return!c||t&&!u?null:(0,W5.jsx)(dY.Popover,{ref:d,animate:!1,focusOnMount:!1,anchor:h,__unstableSlotName:r,inline:!r,placement:"top-start",resize:!1,flip:!1,shift:i,...s,className:V("block-editor-block-popover",s.className),variant:"unstyled",children:o})}var mm=(0,Wl.forwardRef)(ewe),twe=({clientId:e,bottomClientId:t,children:o,...r},n)=>(0,W5.jsx)(mm,{...r,bottomClientId:t,clientId:e,__unstableContentRef:void 0,__unstablePopoverSlot:void 0,ref:n,children:o}),fY=(0,Wl.forwardRef)(twe);var AB=l(w(),1);function owe({clientId:e,bottomClientId:t,children:o,shift:r=!1,additionalStyles:n,...i},s){t??=e;let a=mt(e);return(0,AB.jsx)(mm,{ref:s,clientId:e,bottomClientId:t,shift:r,...i,children:a&&e===t?(0,AB.jsx)(rwe,{selectedElement:a,additionalStyles:n,children:o}):o})}function rwe({selectedElement:e,additionalStyles:t={},children:o}){let[r,n]=(0,$l.useState)(e.offsetWidth),[i,s]=(0,$l.useState)(e.offsetHeight);(0,$l.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,$l.useMemo)(()=>({position:"absolute",width:r,height:i,...t}),[r,i,t]);return(0,AB.jsx)("div",{style:a,children:o})}var Hi=(0,$l.forwardRef)(owe);var $5=l(w(),1),qy={hide:{opacity:0,scaleY:.75},show:{opacity:1,scaleY:1},exit:{opacity:0,scaleY:.9}};function nwe({__unstablePopoverSlot:e,__unstableContentRef:t}){let{clientId:o}=(0,mY.useSelect)(n=>{let{getBlockOrder:i,getBlockInsertionPoint:s}=n(_),a=s(),c=i(a.rootClientId);return c.length?{clientId:c[a.index]}:{}},[]),r=(0,pY.useReducedMotion)();return(0,$5.jsx)(Hi,{clientId:o,__unstablePopoverSlot:e,__unstableContentRef:t,className:"block-editor-block-popover__drop-zone",children:(0,$5.jsx)(hY.__unstableMotion.div,{"data-testid":"block-popover-drop-zone",initial:r?qy.show:qy.hide,animate:qy.show,exit:r?qy.show:qy.exit,className:"block-editor-block-popover__drop-zone-foreground"})})}var gY=nwe;var Kl=l(w(),1),dg=(0,Ju.createContext)();dg.displayName="InsertionPointOpenRefContext";function iwe({__unstablePopoverSlot:e,__unstableContentRef:t,operation:o="insert",nearestSide:r="right"}){let{selectBlock:n,hideInsertionPoint:i}=(0,ug.useDispatch)(_),s=(0,Ju.useContext)(dg),a=(0,Ju.useRef)(),{orientation:c,previousClientId:u,nextClientId:d,rootClientId:f,isInserterShown:m,isDistractionFree:h,isZoomOutMode:p}=(0,ug.useSelect)(O=>{let{getBlockOrder:E,getBlockListSettings:L,getBlockInsertionPoint:T,isBlockBeingDragged:R,getPreviousBlockClientId:D,getNextBlockClientId:j,getSettings:G,isZoomOut:z}=M(O(_)),H=T(),W=E(H.rootClientId);if(!W.length)return{};let te=W[H.index-1],ne=W[H.index];for(;R(te);)te=D(te);for(;R(ne);)ne=j(ne);let ae=G();return{previousClientId:te,nextClientId:ne,orientation:L(H.rootClientId)?.orientation||"vertical",rootClientId:H.rootClientId,isDistractionFree:ae.isDistractionFree,isInserterShown:H?.__unstableWithInserter,isZoomOutMode:z()}},[]),{getBlockEditingMode:g}=(0,ug.useSelect)(_),b=(0,bY.useReducedMotion)();function v(O){O.target===a.current&&d&&g(d)!=="disabled"&&n(d,-1)}function k(O){O.target===a.current&&!s.current&&i()}function y(O){O.target!==a.current&&(s.current=!0)}let S=(0,Ju.useCallback)(O=>{!O&&s.current&&(s.current=!1)},[s]),x={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 I=V("block-editor-block-list__insertion-point",c==="horizontal"||o==="group"?"is-horizontal":"is-vertical");return(0,Kl.jsx)(OB,{previousClientId:u,nextClientId:d,__unstablePopoverSlot:e,__unstableContentRef:t,operation:o,nearestSide:r,children:(0,Kl.jsxs)(LB.__unstableMotion.div,{layout:!b,initial:b?"rest":"start",animate:"rest",whileHover:"hover",whileTap:"pressed",exit:"start",ref:a,tabIndex:-1,onClick:v,onFocus:y,className:V(I,{"is-with-inserter":m}),onHoverEnd:k,children:[(0,Kl.jsx)(LB.__unstableMotion.div,{variants:x,className:"block-editor-block-list__insertion-point-indicator","data-testid":"block-list-insertion-point-indicator"}),m&&(0,Kl.jsx)(LB.__unstableMotion.div,{variants:C,className:V("block-editor-block-list__insertion-point-inserter"),children:(0,Kl.jsx)(Ui,{ref:S,position:"bottom center",clientId:d,rootClientId:f,__experimentalIsQuick:!0,onToggle:O=>{s.current=O},onSelectOrClose:()=>{s.current=!1}})})]})})}function kY(e){let{insertionPoint:t,isVisible:o,isBlockListEmpty:r}=(0,ug.useSelect)(n=>{let{getBlockInsertionPoint:i,isBlockInsertionPointVisible:s,getBlockCount:a}=n(_),c=i();return{insertionPoint:c,isVisible:s(),isBlockListEmpty:a(c?.rootClientId)===0}},[]);return!o||r?null:t.operation==="replace"?(0,Kl.jsx)(gY,{...e},`${t.rootClientId}-${t.index}`):(0,Kl.jsx)(iwe,{operation:t.operation,nearestSide:t.nearestSide,...e})}function _Y(){let e=(0,yY.useContext)(dg),t=(0,Zy.useSelect)(g=>{let b=g(_).getSettings();return b.isDistractionFree||b.isPreviewMode||M(g(_)).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,Zy.useSelect)(_)),{showInsertionPoint:h,hideInsertionPoint:p}=(0,Zy.useDispatch)(_);return(0,vY.useRefEffect)(g=>{if(t)return;function b(v){if(e===void 0||e.current||v.target.nodeType===v.target.TEXT_NODE||n())return;if(!v.target.classList.contains("block-editor-block-list__layout")){p();return}let k;if(v.target.classList.contains("is-root-container")||(k=(v.target.getAttribute("data-block")?v.target:v.target.closest("[data-block]")).getAttribute("data-block")),a(k)||u(k)==="disabled"||d(k)==="core/block"||k&&f(k).layout?.isManualPlacement)return;let y=o(k),S=y?.orientation||"vertical",x=!!y?.__experimentalCaptureToolbars,C=v.clientY,B=v.clientX,O=Array.from(v.target.children).find(R=>{let D=R.getBoundingClientRect();return R.classList.contains("wp-block")&&S==="vertical"&&D.top>C||R.classList.contains("wp-block")&&S==="horizontal"&&((0,SY.isRTL)()?D.right<B:D.left>B)});if(!O){p();return}if(!O.id&&(O=O.firstElementChild,!O)){p();return}let E=O.id.slice(6);if(!E||c(E)||m(E)||i().includes(E)&&S==="vertical"&&!x&&!s().hasFixedToolbar)return;let L=O.getBoundingClientRect();if(S==="horizontal"&&(v.clientY>L.bottom||v.clientY<L.top)||S==="vertical"&&(v.clientX>L.right||v.clientX<L.left)){p();return}let T=r(E);if(T===0){p();return}h(k,T,{__unstableWithInserter:!0})}return g.addEventListener("mousemove",b),()=>{g.removeEventListener("mousemove",b)}},[e,o,r,n,h,p,i,t])}var NB=l(F(),1),xY=l(Z(),1);var wY=l(w(),1);function pm(){let{getSettings:e,hasSelectedBlock:t,hasMultiSelection:o}=(0,NB.useSelect)(_),{clearSelectedBlock:r}=(0,NB.useDispatch)(_),{clearBlockSelection:n}=e();return(0,xY.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 CY(e){return(0,wY.jsx)("div",{ref:pm(),...e})}var $Y=l(Z(),1),mg=l(P(),1),KY=l(F(),1),km=l($(),1);var BY=l(w(),1);function EY({showSeparator:e,isFloating:t,onAddBlock:o,isToggle:r}){let{clientId:n}=Pe();return(0,BY.jsx)(Xu,{className:V({"block-list-appender__toggle":r}),rootClientId:n,showSeparator:e,isFloating:t,onAddBlock:o})}var TY=l(w(),1);function IY(){let{clientId:e}=Pe();return(0,TY.jsx)(lg,{rootClientId:e})}var DB=l(P(),1),OY=l(F(),1),MB=l(Re(),1),AY=l(Xy(),1);var Qy=new WeakMap;function swe(){let e;return t=>((e===void 0||!(0,AY.isShallowEqual)(e,t))&&(e=t),e)}function RY(e){let[t]=(0,DB.useState)(swe);return t(e)}function LY(e,t,o,r,n,i,s,a,c,u,d,f){let m=(0,OY.useRegistry)(),h=RY(o),p=RY(r),g=c===void 0||t==="contentOnly"?t:c;(0,DB.useLayoutEffect)(()=>{let b={allowedBlocks:h,prioritizedInserterBlocks:p,templateLock:g};if(u!==void 0&&(b.__experimentalCaptureToolbars=u),d!==void 0)b.orientation=d;else{let v=xs(f?.type);b.orientation=v.getOrientation(f)}s!==void 0&&((0,MB.default)("__experimentalDefaultBlock",{alternative:"defaultBlock",since:"6.3",version:"6.4"}),b.defaultBlock=s),n!==void 0&&(b.defaultBlock=n),a!==void 0&&((0,MB.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,MB.default)("Using `Function` as a `directInsert` argument",{alternative:"`boolean` values",since:"6.5"}),Qy.get(m)||Qy.set(m,{}),Qy.get(m)[e]=b,window.queueMicrotask(()=>{let v=Qy.get(m);if(Object.keys(v).length){let{updateBlockListSettings:k}=m.dispatch(_);k(v),Qy.set(m,{})}})},[e,h,p,g,n,i,s,a,u,d,f,m])}var K5=l(vf(),1),VB=l(P(),1),NY=l(F(),1),MY=l($(),1);function DY(e,t,o,r){let n=(0,NY.useRegistry)(),i=(0,VB.useRef)(null);(0,VB.useLayoutEffect)(()=>{let s=!1,{getBlocks:a,getSelectedBlocksInitialCaretPosition:c,isBlockSelected:u}=n.select(_),{replaceInnerBlocks:d,__unstableMarkNextChangeAsNotPersistent:f}=n.dispatch(_);return window.queueMicrotask(()=>{if(s)return;let m=a(e),h=m.length===0||o==="all"||o==="contentOnly",p=!(0,K5.default)(t,i.current);if(!h||!p)return;i.current=t;let g=(0,MY.synchronizeBlocksWithTemplate)(m,t);(0,K5.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 VY=l($(),1),FY=l(F(),1);function zY(e){return(0,FY.useSelect)(t=>{let o=t(_).getBlock(e);if(!o)return;let r=t(VY.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 bm=l(F(),1),jB=l(P(),1),UB=l(Z(),1),GY=l(N(),1),fg=l($(),1);var Y5=l(P(),1),Yn=l($(),1),hm=l(F(),1),jY=l(Fe(),1);function q5(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 awe(e,t,o,r,n,i,s,a,c){return u=>{let{srcRootClientId:d,srcClientIds:f,type:m,blocks:h}=q5(u);if(m==="inserter"){s();let p=h.map(g=>(0,Yn.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(k=>k===e))return;if(a==="group"){let k=f.map(y=>c(y));i(k,!0,null,f);return}let g=d===e,b=f.length,v=g&&p<t?t-b:t;n(f,d,v)}}}function lwe(e,t,o,r,n){return i=>{if(!t().mediaUpload)return;let s=(0,Yn.findTransform)((0,Yn.getBlockTransforms)("from"),a=>a.type==="files"&&r(a.blockName,e)&&a.isMatch(i));if(s){let a=s.transform(i,o);n(a)}}}function cwe(e){return t=>{let o=(0,Yn.pasteHandler)({HTML:t,mode:"BLOCKS"});o.length&&e(o)}}function FB(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,hm.useSelect)(_),{getGroupingBlockName:m}=(0,hm.useSelect)(Yn.store),{insertBlocks:h,moveBlocksToPosition:p,updateBlockAttributes:g,clearSelectedBlock:b,replaceBlocks:v,removeBlocks:k}=(0,hm.useDispatch)(_),y=(0,hm.useRegistry)(),S=(0,Y5.useCallback)((O,E=!0,L=0,T=[])=>{Array.isArray(O)||(O=[O]);let D=c(e)[t];if(r==="replace")v(D,O,void 0,L);else if(r==="group"){let j=f(D);n==="left"?O.push(j):O.unshift(j);let G=O.map(te=>(0,Yn.createBlock)(te.name,te.attributes,te.innerBlocks)),z=O.every(te=>te.name==="core/image"),H=i("core/gallery",e),W=(0,Yn.createBlock)(z&&H?"core/gallery":m(),{layout:{type:"flex",flexWrap:z&&H?null:"nowrap"}},G);v([D,...T],W,void 0,L)}else h(O,t,e,E,L)},[c,e,t,r,v,f,n,i,m,h]),x=(0,Y5.useCallback)((O,E,L)=>{if(r==="replace"){let T=u(O),D=c(e)[t];y.batch(()=>{k(O,!1),v(D,T,void 0,0)})}else p(O,E,e,L)},[r,c,u,p,y,k,v,t,e]),C=awe(e,t,s,a,x,S,b,r,f),B=lwe(e,d,g,i,S),I=cwe(S);return O=>{let E=(0,jY.getFilesFromDataTransfer)(O.dataTransfer),L=O.dataTransfer.getData("text/html");L?I(L):E.length?B(E):C(O)}}function uwe(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 gm(e,t,o=["top","bottom","left","right"]){let r,n;return o.forEach(i=>{let s=uwe(e,t,i);(r===void 0||s<r)&&(r=s,n=i)}),[r,n]}function zB(e,t){return t.left<=e.x&&t.right>=e.x&&t.top<=e.y&&t.bottom>=e.y}function UY(e,t){return t.top<=e.y&&t.bottom>=e.y}var Z5=30,dwe=120,fwe=120;function mwe(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 v=d.getBoundingClientRect(),[k,y]=gm(t,v,["top","bottom"]);if(v.height>dwe&&k<Z5){if(y==="top")return[m,"before"];if(y==="bottom")return[m+1,"after"]}}let h=(0,GY.isRTL)();if(d&&f==="horizontal"){let v=d.getBoundingClientRect(),[k,y]=gm(t,v,["left","right"]);if(v.width>fwe&&k<Z5){if(h&&y==="right"||!h&&y==="left")return[m,"before"];if(h&&y==="left"||!h&&y==="right")return[m+1,"after"]}}e.forEach(({isUnmodifiedDefaultBlock:v,getBoundingClientRect:k,blockIndex:y,blockOrientation:S})=>{let x=k();if(!x)return;let[C,B]=gm(t,x,n),[I,O]=gm(t,x,["left","right"]),E=zB(t,x);v&&E?C=0:o==="vertical"&&S!=="horizontal"&&(E&&I<Z5||!E&&UY(t,x))&&(c=y,u=O),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 HB(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 HY(e,t){let{defaultView:o}=t;return!!(o&&e instanceof o.HTMLElement&&e.closest("[data-is-insertion-point]"))}function WY({dropZoneElement:e,rootClientId:t="",parentClientId:o="",isDisabled:r=!1}={}){let n=(0,bm.useRegistry)(),[i,s]=(0,jB.useState)({index:null,operation:"insert"}),{getBlockType:a,getBlockVariations:c,getGroupingBlockName:u}=(0,bm.useSelect)(fg.store),{canInsertBlockType:d,getBlockListSettings:f,getBlocks:m,getBlockIndex:h,getDraggedBlockClientIds:p,getBlockNamesByClientId:g,getAllowedBlocks:b,isDragging:v,isGroupable:k,isZoomOut:y,getSectionRootClientId:S,getBlockParents:x}=M((0,bm.useSelect)(_)),{showInsertionPoint:C,hideInsertionPoint:B,startDragging:I,stopDragging:O}=M((0,bm.useDispatch)(_)),E=FB(i.operation==="before"||i.operation==="after"?o:t,i.index,{operation:i.operation,nearestSide:i.nearestSide}),L=(0,UB.useThrottle)((0,jB.useCallback)((T,R)=>{v()||I();let D=p(),j=[t,...x(t,!0)];if(D.some(U=>j.includes(U)))return;let z=b(t),H=g([t])[0],W=g(D);if(!HB(a,z,W,H))return;let ne=S();if(y()&&ne!==t)return;let ae=m(t).filter(U=>!((0,fg.hasBlockSupport)(U.name,"visibility",!0)&&U.attributes?.metadata?.blockVisibility===!1));if(ae.length===0){n.batch(()=>{s({index:0,operation:"insert"}),C(t,0,{operation:"insert"})});return}let X=ae.map(U=>{let K=U.clientId;return{isUnmodifiedDefaultBlock:(0,fg.isUnmodifiedDefaultBlock)(U),getBoundingClientRect:()=>{let se=R.getElementById(`block-${K}`);return se?se.getBoundingClientRect():null},blockIndex:h(K),blockOrientation:f(K)?.orientation}}),ee=mwe(X,{x:T.clientX,y:T.clientY},f(t)?.orientation,{dropZoneElement:e,parentBlockClientId:o,parentBlockOrientation:o?f(o)?.orientation:void 0,rootBlockIndex:h(t)}),[le,Q,J]=ee,q=X[le]?.isUnmodifiedDefaultBlock;if(!(y()&&!q&&Q!=="insert")){if(Q==="group"){let U=ae[le],K=[U.name,...W].every(we=>we==="core/image"),se=d("core/gallery",t),ce=k([U.clientId,p()]),Se=c(u(),"block"),he=Se&&Se.find(({name:we})=>we==="group-row");if(K&&!se&&(!ce||!he)||!K&&(!ce||!he))return}n.batch(()=>{s({index:le,operation:Q,nearestSide:J});let U=["before","after"].includes(Q)?o:t;C(U,le,{operation:Q,nearestSide:J})})}},[v,b,t,g,p,a,S,y,m,f,e,o,h,n,I,C,d,k,c,u]),200);return(0,UB.__experimentalUseDropZone)({dropZoneElement:e,isDisabled:r,onDrop:E,onDragOver(T){L(T,T.currentTarget.ownerDocument)},onDragLeave(T){let{ownerDocument:R}=T.currentTarget;HY(T.relatedTarget,R)||HY(T.target,R)||(L.cancel(),B())},onDragEnd(){L.cancel(),O(),B()}})}var Yl=l(w(),1),pwe={};function hwe({children:e,clientId:t}){let o=zY(t);return(0,Yl.jsx)(f0,{value:o,children:e})}var gwe=(0,mg.memo)(My);function YY(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:v,name:k,blockType:y,parentLock:S,defaultLayout:x}=e;LY(t,S,o,r,n,i,s,a,u,m,g,v),DY(t,c,u,f);let C=(0,km.getBlockSupport)(k,"layout")||(0,km.getBlockSupport)(k,"__experimentalLayout")||pwe,{allowSizingOnChildren:B=!1}=C,I=v||C,O=(0,mg.useMemo)(()=>({...x,...I,...B&&{allowSizingOnChildren:!0}}),[x,I,B]),E=(0,Yl.jsx)(gwe,{rootClientId:t,renderAppender:p,__experimentalAppenderTagName:h,layout:O,wrapperRef:d,placeholder:b});return!y?.providesContext||Object.keys(y.providesContext).length===0?E:(0,Yl.jsx)(hwe,{clientId:t,children:E})}function bwe(e){return d1(e),(0,Yl.jsx)(YY,{...e})}var GB=(0,mg.forwardRef)((e,t)=>{let o=vm({ref:t},e);return(0,Yl.jsx)("div",{className:"block-editor-inner-blocks",children:(0,Yl.jsx)("div",{...o})})});function vm(e={},t={}){let{__unstableDisableLayoutClassNames:o,__unstableDisableDropZone:r,dropZoneElement:n}=t,{clientId:i,layout:s=null,__unstableLayoutClassNames:a=""}=Pe(),c=(0,KY.useSelect)(S=>{let{getBlockName:x,isZoomOut:C,getTemplateLock:B,getBlockRootClientId:I,getBlockEditingMode:O,getBlockSettings:E,getSectionRootClientId:L}=M(S(_));if(!i){let W=L();return{isDropZoneDisabled:C()&&W!==""}}let{hasBlockSupport:T,getBlockType:R}=S(km.store),D=x(i),j=O(i),G=I(i),[z]=E(i,"layout"),H=j==="disabled";if(C()){let W=L();H=i!==W}return{__experimentalCaptureToolbars:T(D,"__experimentalExposeControlsToChildren",!1),name:D,blockType:R(D),parentLock:B(G),parentClientId:G,isDropZoneDisabled:H,defaultLayout:z}},[i]),{__experimentalCaptureToolbars:u,name:d,blockType:f,parentLock:m,parentClientId:h,isDropZoneDisabled:p,defaultLayout:g}=c,b=WY({dropZoneElement:n,rootClientId:i,parentClientId:h}),v=(0,$Y.useMergeRefs)([e.ref,r||p||s?.isManualPlacement&&window.__experimentalEnableGridInteractivity?null:b]),k={__experimentalCaptureToolbars:u,layout:s,name:d,blockType:f,parentLock:m,defaultLayout:g,...t},y=k.value&&k.onChange?bwe:YY;return{...e,ref:v,className:V(e.className,"block-editor-block-list__layout",o?"":a),children:i?(0,Yl.jsx)(y,{...k,clientId:i}):(0,Yl.jsx)(My,{...t})}}vm.save=km.__unstableGetInnerBlocksProps;GB.DefaultBlockAppender=IY;GB.ButtonBlockAppender=EY;GB.Content=()=>vm.save().children;var Jy=GB;var eS=l(Z(),1),pg=l(F(),1),X5=l(Fe(),1),Cr=l(it(),1);var qY=l(w(),1),kwe=new Set([Cr.UP,Cr.RIGHT,Cr.DOWN,Cr.LEFT,Cr.ENTER,Cr.BACKSPACE]);function vwe(e){let{keyCode:t,shiftKey:o}=e;return!o&&kwe.has(t)}function tS(){let e=(0,pg.useSelect)(o=>o(_).isTyping(),[]),{stopTyping:t}=(0,pg.useDispatch)(_);return(0,eS.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 oS(){let{isTyping:e}=(0,pg.useSelect)(i=>{let{isTyping:s}=i(_);return{isTyping:s()}},[]),{startTyping:t,stopTyping:o}=(0,pg.useDispatch)(_),r=tS(),n=(0,eS.useRefEffect)(i=>{let{ownerDocument:s}=i,{defaultView:a}=s,c=a.getSelection();if(e){let h=function(v){let{target:k}=v;b=a.setTimeout(()=>{(0,X5.isTextField)(k)||o()})},p=function(v){let{keyCode:k}=v;(k===Cr.ESCAPE||k===Cr.TAB)&&o()},g=function(){c.isCollapsed||o()};var u=h,d=p,f=g;let b;return i.addEventListener("focus",h),i.addEventListener("keydown",p),s.addEventListener("selectionchange",g),()=>{a.clearTimeout(b),i.removeEventListener("focus",h),i.removeEventListener("keydown",p),s.removeEventListener("selectionchange",g)}}function m(h){let{type:p,target:g}=h;!(0,X5.isTextField)(g)||!i.contains(g)||p==="keydown"&&!vwe(h)||t()}return i.addEventListener("keypress",m),i.addEventListener("keydown",m),()=>{i.removeEventListener("keypress",m),i.removeEventListener("keydown",m)}},[e,t,o]);return(0,eS.useMergeRefs)([r,n])}function ywe({children:e}){return(0,qY.jsx)("div",{ref:oS(),children:e})}var ZY=ywe;var rS=l(A(),1),XY=l(Z(),1),QY=l(F(),1),JY=l(P(),1),eq=l(N(),1);var WB=l(w(),1);function Q5({clientId:e,rootClientId:t="",position:o="top"}){let[r,n]=(0,JY.useState)(!1),{sectionRootClientId:i,sectionClientIds:s,insertionPoint:a,blockInsertionPointVisible:c,blockInsertionPoint:u,blocksBeingDragged:d}=(0,QY.useSelect)(x=>{let{getInsertionPoint:C,getBlockOrder:B,getSectionRootClientId:I,isBlockInsertionPointVisible:O,getBlockInsertionPoint:E,getDraggedBlockClientIds:L}=M(x(_)),T=I(),R=B(T);return{sectionRootClientId:T,sectionClientIds:R,insertionPoint:C(),blockInsertionPoint:E(),blockInsertionPointVisible:O(),blocksBeingDragged:L()}},[]),f=(0,XY.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],v=d.includes(e),k=s.indexOf(b),S=(k>0?s[k-1]:null)===e;return(v||S)&&(m=!1),(0,WB.jsx)(rS.__unstableAnimatePresence,{children:m&&(0,WB.jsx)(rS.__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:V("block-editor-block-list__zoom-out-separator",{"is-dragged-over":r}),"data-is-insertion-point":"true",onDragOver:()=>n(!0),onDragLeave:()=>n(!1),children:(0,WB.jsx)(rS.__unstableMotion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0,transition:{delay:-.125}},transition:{ease:"linear",duration:.1,delay:.125},children:(0,eq.__)("Drop pattern.")})})})}var $r=l(w(),1),ZC=(0,ed.createContext)();ZC.displayName="IntersectionObserverContext";var $B=new WeakMap,Swe={trailing:!0};function _we({className:e,...t}){let{isOutlineMode:o,isFocusMode:r,isPreviewMode:n,editedContentOnlySection:i}=(0,Gi.useSelect)(f=>{let{getSettings:m,isTyping:h,hasBlockSpotlight:p,getEditedContentOnlySection:g}=M(f(_)),{outlineMode:b,focusMode:v,isPreviewMode:k}=m();return{isOutlineMode:b&&!h(),isFocusMode:v||p(),isPreviewMode:k,editedContentOnlySection:g()}},[]),s=(0,Gi.useRegistry)(),{setBlockVisibility:a}=(0,Gi.useDispatch)(_),c=(0,KB.useDebounce)((0,ed.useCallback)(()=>{let f={};$B.get(s).forEach(([m,h])=>{f[m]=h}),a(f)},[s]),300,Swe),u=(0,ed.useMemo)(()=>{let{IntersectionObserver:f}=window;if(f)return new f(m=>{$B.get(s)||$B.set(s,[]);for(let h of m){let p=h.target.getAttribute("data-block");$B.get(s).push([p,h.isIntersecting])}c()})},[]),d=vm({ref:(0,KB.useMergeRefs)([pm(),_Y(),oS()]),className:V("is-root-container",e,{"is-outline-mode":o,"is-focus-mode":r,"is-preview-mode":n})},t);return(0,$r.jsxs)(ZC.Provider,{value:u,children:[(0,$r.jsx)("div",{...d}),!!i&&(0,$r.jsx)(xwe,{clientId:i})]})}function xwe({clientId:e}){let{stopEditingContentOnlySection:t}=M((0,Gi.useDispatch)(_)),o=(0,Gi.useSelect)(r=>{let{isBlockSelected:n,hasSelectedInnerBlock:i,getBlockSelectionStart:s}=r(_);return!s()||n(e)||i(e,!0)},[e]);return(0,ed.useEffect)(()=>{o||t()},[o,t]),null}function Hh(e){return(0,$r.jsx)(l0,{value:lO,children:(0,$r.jsx)(_we,{...e})})}var wwe=[],Cwe=new Set;function Bwe({placeholder:e,rootClientId:t,renderAppender:o,__experimentalAppenderTagName:r,layout:n=kM}){let i=o!==!1,s=!!o,{order:a,isZoomOut:c,selectedBlocks:u,visibleBlocks:d,shouldRenderAppender:f}=(0,Gi.useSelect)(m=>{let{getSettings:h,getBlockOrder:p,getSelectedBlockClientIds:g,__unstableGetVisibleBlocks:b,getTemplateLock:v,getBlockEditingMode:k,isSectionBlock:y,isContainerInsertableToInContentOnlyMode:S,getBlockName:x,isZoomOut:C,canInsertBlockType:B}=M(m(_)),I=p(t);if(h().isPreviewMode)return{order:I,selectedBlocks:wwe,visibleBlocks:Cwe};let O=g(),E=O[0],L=!t&&!E&&(!I.length||!B((0,tq.getDefaultBlockName)(),t)),T=!!(t&&E&&t===E),R=v(t);return{order:I,selectedBlocks:O,visibleBlocks:b(),isZoomOut:C(),shouldRenderAppender:(!y(t)||S(x(E),t))&&k(t)!=="disabled"&&(!R||R==="contentOnly")&&i&&!C()&&(s||T||L)}},[t,i,s]);return(0,$r.jsxs)(iH,{value:n,children:[a.map(m=>(0,$r.jsxs)(Gi.AsyncModeProvider,{value:!d.has(m)&&!u.includes(m),children:[c&&(0,$r.jsx)(Q5,{clientId:m,rootClientId:t,position:"top"}),(0,$r.jsx)(c9,{rootClientId:t,clientId:m}),c&&(0,$r.jsx)(Q5,{clientId:m,rootClientId:t,position:"bottom"})]},m)),a.length<1&&e,f&&(0,$r.jsx)(nY,{tagName:r,rootClientId:t,CustomAppender:o})]})}function My(e){return(0,$r.jsx)(Gi.AsyncModeProvider,{value:!1,children:(0,$r.jsx)(Bwe,{...e})})}var Vg=l(F(),1),KV=l(Fe(),1),YV=l(A(),1),zQ=l(Is(),1),gT=l(P(),1),Fg=l($(),1),qV=l(Zo(),1),zg=l(N(),1);var Iq=l(Z(),1),Pq=l(F(),1),Rq=l(Fe(),1),Ea=l(P(),1);var qn=l(N(),1),Sm=l($(),1),oE=l(A(),1),xq=l(Z(),1),wq=l(F(),1),rE=l(P(),1);var iS=l(A(),1),sq=l(Zv(),1),aq=l(Re(),1),QB=l(P(),1);var Br=l(A(),1),oq=(0,Br.createSlotFill)("InspectorControls"),Ewe=(0,Br.createSlotFill)("InspectorAdvancedControls"),Twe=(0,Br.createSlotFill)("InspectorControlsBindings"),Iwe=(0,Br.createSlotFill)("InspectorControlsBackground"),Pwe=(0,Br.createSlotFill)("InspectorControlsBorder"),Rwe=(0,Br.createSlotFill)("InspectorControlsColor"),Owe=(0,Br.createSlotFill)("InspectorControlsFilter"),Awe=(0,Br.createSlotFill)("InspectorControlsDimensions"),Lwe=(0,Br.createSlotFill)("InspectorControlsPosition"),Nwe=(0,Br.createSlotFill)("InspectorControlsTypography"),Mwe=(0,Br.createSlotFill)("InspectorControlsListView"),Dwe=(0,Br.createSlotFill)("InspectorControlsStyles"),Vwe=(0,Br.createSlotFill)("InspectorControlsEffects"),Fwe=(0,Br.createSlotFill)("InspectorControlsContent"),zwe={default:oq,advanced:Ewe,background:Iwe,bindings:Twe,border:Pwe,color:Rwe,content:Fwe,dimensions:Awe,effects:Vwe,filter:Owe,list:Mwe,position:Lwe,settings:oq,styles:Dwe,typography:Nwe},Wi=zwe,nS=(0,Br.createSlotFill)(Symbol("PrivateInspectorControlsAllowedBlocks"));var hg=l(A(),1),qB=l(P(),1),rq=l(Z(),1),ZB=l(F(),1);var YB=l(w(),1),nq=Symbol("ListViewContentPopover"),{Fill:iq,Slot:jwe}=(0,hg.createSlotFill)(nq);function Uwe(){return(0,rq.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:35,resize:!1}}}function XB({listViewRef:e}){let{popoverProps:t}=Uwe(),o=(0,hg.__experimentalUseSlotFills)(nq),r=!!(o&&o.length),{selectedClientId:n,isOpen:i}=(0,ZB.useSelect)(u=>{let{getSelectedBlockClientId:d}=u(_),f=M(u(_));return{selectedClientId:d(),isOpen:f.isListViewContentPanelOpen()}},[]),[s,a]=(0,qB.useState)(null);(0,qB.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,ZB.useDispatch)(_));return!i||!r||!s?null:(0,YB.jsx)(hg.Popover,{...t??{},className:"block-editor-inspector-list-view-content-popover",anchor:s,onClose:c,children:(0,YB.jsx)("div",{style:{width:"280px"},children:(0,YB.jsx)(jwe,{})})})}var td=l(w(),1),Hwe=["content","list"],Gwe=["default","settings","advanced"];function ym({children:e,group:t="default",__experimentalGroup:o,resetAllFilter:r}){o&&((0,aq.default)("`__experimentalGroup` property in `InspectorControlsFill`",{since:"6.2",version:"6.4",alternative:"`group`"}),t=o);let n=Pe(),i=Wi[t]?.Fill;if(!i)return(0,sq.default)(`Unknown InspectorControls group "${t}" provided.`),null;if(n[$c]){let s=n.name==="core/template-part",a=Gwe.includes(t),c=Hwe.includes(t);if(!(s&&a||c))return null}return!n[$c]&&!n[bs]?null:t==="content"&&n[zk]&&n[$c]?n[bs]?(0,td.jsx)(iS.__experimentalStyleProvider,{document,children:(0,td.jsx)(iq,{children:e})}):null:(0,td.jsx)(iS.__experimentalStyleProvider,{document,children:(0,td.jsx)(i,{children:s=>(0,td.jsx)($we,{fillProps:s,children:e,resetAllFilter:r})})})}function Wwe({resetAllFilter:e,children:t}){let{registerResetAllFilter:o,deregisterResetAllFilter:r}=(0,QB.useContext)(iS.__experimentalToolsPanelContext);return(0,QB.useEffect)(()=>{if(e&&o&&r)return o(e),()=>{r(e)}},[e,o,r]),t}function $we({children:e,resetAllFilter:t,fillProps:o}){let{forwardedContext:r=[]}=o,n=(0,td.jsx)(Wwe,{resetAllFilter:t,children:e});return r.reduce((i,[s,a])=>(0,td.jsx)(s,{...a,children:i}),n)}var hq=l(A(),1),gq=l(P(),1),bq=l(Zv(),1),kq=l(Re(),1);var cq=l(A(),1),JB=l(F(),1),uq=l(P(),1);var lq=l(Z(),1);function Po(){return(0,lq.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}}}function gg(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 dq=l(w(),1);function fq({children:e,group:t,label:o}){let{updateBlockAttributes:r}=(0,JB.useDispatch)(_),{getBlockAttributes:n,getMultiSelectedBlockClientIds:i,getSelectedBlockClientId:s,hasMultiSelection:a}=(0,JB.useSelect)(_),c=Po(),u=s(),d=(0,uq.useCallback)((f=[])=>{let m={},h=a()?i():[u];h.forEach(p=>{let{style:g}=n(p),b={style:g};f.forEach(v=>{b={...b,...v(b)}}),b={...b,style:Ne(b.style)},m[p]=b}),r(h,m,!0)},[n,i,a,u,r]);return(0,dq.jsx)(cq.__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 J5=l(A(),1),eE=l(P(),1),mq=l(w(),1);function pq({Slot:e,fillProps:t,...o}){let r=(0,eE.useContext)(J5.__experimentalToolsPanelContext),n=(0,eE.useMemo)(()=>({...t??{},forwardedContext:[...t?.forwardedContext??[],[J5.__experimentalToolsPanelContext.Provider,{value:r}]]}),[r,t]);return(0,mq.jsx)(e,{...o,fillProps:n,bubblesVirtually:!0})}var tE=l(w(),1);function Kwe({__experimentalGroup:e,group:t="default",label:o,fillProps:r,...n},i){e&&((0,kq.default)("`__experimentalGroup` property in `InspectorControlsSlot`",{since:"6.2",version:"6.4",alternative:"`group`"}),t=e);let s=Wi[t],a=(0,hq.__experimentalUseSlotFills)(s?.name);if(!s)return(0,bq.default)(`Unknown InspectorControls group "${t}" provided.`),null;if(!a?.length)return null;let{Slot:c}=s;return o?(0,tE.jsx)(fq,{group:t,label:o,children:(0,tE.jsx)(pq,{...n,fillProps:r,Slot:c})}):(0,tE.jsx)(c,{...n,ref:i,fillProps:r,bubblesVirtually:!0})}var eV=(0,gq.forwardRef)(Kwe);var tV=l(w(),1),vq=ym;vq.Slot=eV;var od=e=>(0,tV.jsx)(ym,{...e,group:"advanced"});od.Slot=function(t){return(0,tV.jsx)(eV,{...t,group:"advanced"})};od.slotName="InspectorAdvancedControls";var fe=vq;var Sq=l(F(),1),rd=l($(),1),sS=l(N(),1);function yq(e){let t=e?.style?.position?.type;return t==="sticky"?(0,sS.__)("Sticky"):t==="fixed"?(0,sS.__)("Fixed"):null}function Tt(e){return(0,Sq.useSelect)(t=>{if(!e)return null;let{getBlockName:o,getBlockAttributes:r,__experimentalGetParsedPattern:n}=t(_),{getBlockType:i,getActiveBlockVariation:s}=t(rd.store),a=o(e),c=i(a);if(!c)return null;let u=r(e),d=u?.metadata?.patternName;if(d){let v=n(d),k=yq(u);return{isSynced:!1,title:(0,sS.__)("Pattern"),icon:Ci,description:v?.description||(0,sS.__)("A block pattern."),anchor:u?.anchor,positionLabel:k,positionType:u?.style?.position?.type,name:v?.title||u?.metadata?.name}}let f=s(a,u),m=(0,rd.isReusableBlock)(c)||(0,rd.isTemplatePart)(c),p=(m?(0,rd.__experimentalGetBlockLabel)(c,u):void 0)||c.title,g=yq(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 aS=l(w(),1),lS="position",oV={key:"default",value:"",name:(0,qn.__)("Default")},rV={key:"sticky",value:"sticky",name:(0,qn._x)("Sticky","Name for the value of the CSS position property"),hint:(0,qn.__)("The block will stick to the top of the window instead of scrolling.")},_q={key:"fixed",value:"fixed",name:(0,qn._x)("Fixed","Name for the value of the CSS position property"),hint:(0,qn.__)("The block will not move when the page is scrolled.")},Ywe=["top","right","bottom","left"],qwe=["sticky","fixed"];function Zwe({selector:e,style:t}){let o="",{type:r}=t?.position||{};return qwe.includes(r)&&(o+=`${e} {`,o+=`position: ${r};`,Ywe.forEach(n=>{t?.position?.[n]!==void 0&&(o+=`${n}: ${t.position[n]};`)}),(r==="sticky"||r==="fixed")&&(o+="z-index: 10"),o+="}"),o}function Xwe(e){let t=(0,Sm.getBlockSupport)(e,lS);return!!(t===!0||t?.sticky)}function Qwe(e){let t=(0,Sm.getBlockSupport)(e,lS);return!!(t===!0||t?.fixed)}function Jwe(e){return!!(0,Sm.getBlockSupport)(e,lS)}function Cq(e){let t=e?.style?.position?.type;return t==="sticky"||t==="fixed"}function Bq({name:e}={}){let[t,o]=me("position.fixed","position.sticky"),r=!t&&!o;return!Jwe(e)||r}function eCe({style:e={},clientId:t,name:o,setAttributes:r}){let n=Qwe(o),i=Xwe(o),s=e?.position?.type,{firstParentClientId:a}=(0,wq.useSelect)(h=>{let{getBlockParents:p}=h(_),g=p(t);return{firstParentClientId:g[g.length-1]}},[t]),c=Tt(a),u=i&&s===rV.value&&c?(0,qn.sprintf)((0,qn.__)("The block will stick to the scrollable area of the parent %s block."),c.title):null,d=(0,rE.useMemo)(()=>{let h=[oV];return(i||s===rV.value)&&h.push(rV),(n||s===_q.value)&&h.push(_q),h},[n,i,s]),f=h=>{let g={...e,position:{...e?.position,type:h,top:h==="sticky"||h==="fixed"?"0px":void 0}};r({style:Ne(g)})},m=s&&d.find(h=>h.value===s)||oV;return rE.Platform.select({web:d.length>1?(0,aS.jsx)(fe,{group:"position",children:(0,aS.jsx)(oE.BaseControl,{help:u,children:(0,aS.jsx)(oE.CustomSelectControl,{__next40pxDefaultSize:!0,label:(0,qn.__)("Position"),hideLabelFromVision:!0,describedBy:(0,qn.sprintf)((0,qn.__)("Currently selected position: %s"),m.name),options:d,value:m,onChange:({selectedItem:h})=>{f(h.value)},size:"__unstable-large"})})}):null,native:null})}var nV={edit:function(t){return Bq(t)?null:(0,aS.jsx)(eCe,{...t})},useBlockProps:oCe,attributeKeys:["style"],hasSupport(e){return(0,Sm.hasBlockSupport)(e,lS)}},tCe={};function oCe({name:e,style:t}){let o=(0,Sm.hasBlockSupport)(e,lS),r=Bq({name:e}),n=o&&!r,i=(0,xq.useInstanceId)(tCe),s=`.wp-container-${i}.wp-container-${i}`,a;n&&(a=Zwe({selector:s,style:t})||"");let c=V({[`wp-container-${i}`]:n&&!!a,[`is-position-${t?.position?.type}`]:n&&!!a&&!!t?.position?.type});return Zn({css:a}),{className:c}}var Oq={placement:"top-start"},Eq={...Oq,flip:!1,shift:!0},rCe={...Oq,flip:!0,shift:!1};function Tq(e,t,o,r,n){if(!e||!t)return Eq;let i=o?.scrollTop||0,s=Sh(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)?Eq:rCe}function nE({contentElement:e,clientId:t}){let o=mt(t),[r,n]=(0,Ea.useState)(0),{blockIndex:i,isSticky:s}=(0,Pq.useSelect)(m=>{let{getBlockIndex:h,getBlockAttributes:p}=m(_);return{blockIndex:h(t),isSticky:Cq(p(t))}},[t]),a=(0,Ea.useMemo)(()=>{if(e)return(0,Rq.getScrollContainer)(e)},[e]),[c,u]=(0,Ea.useState)(()=>Tq(e,o,a,r,s)),d=(0,Iq.useRefEffect)(m=>{n(m.offsetHeight)},[]),f=(0,Ea.useCallback)(()=>u(Tq(e,o,a,r,s)),[e,o,a,r]);return(0,Ea.useLayoutEffect)(f,[i,f]),(0,Ea.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 Aq=l(F(),1);function iE(e){return(0,Aq.useSelect)(o=>{let{getBlockRootClientId:r,getBlockParents:n,__experimentalGetBlockListSettingsForBlocks:i,isBlockInsertionPointVisible:s,getBlockInsertionPoint:a,getBlockOrder:c,hasMultiSelection:u,getLastMultiSelectedBlockClientId:d}=o(_),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 sE=l(w(),1);function Lq({clientId:e,__unstableContentRef:t}){let{capturingClientId:o,isInsertionPointVisible:r,lastClientId:n,rootClientId:i}=iE(e),s=nE({contentElement:t?.current,clientId:e});return(0,sE.jsx)(Hi,{clientId:o||e,bottomClientId:n,className:V("block-editor-block-list__block-side-inserter-popover",{"is-insertion-point-visible":r}),__unstableContentRef:t,...s,children:(0,sE.jsx)("div",{className:"block-editor-block-list__empty-block-inserter",children:(0,sE.jsx)(Ui,{position:"bottom right",rootClientId:i,clientId:e,__experimentalIsQuick:!0})})})}var IQ=l(F(),1),Dg=l(P(),1),PQ=l(Is(),1);var wQ=l(N(),1),CQ=l(F(),1),HV=l(P(),1),BQ=l(Z(),1),nc=l($(),1),EQ=l(A(),1);var _m=l(A(),1),Wq=l(F(),1),$q=l(N(),1);var Fq=l($(),1),zq=l(A(),1),cS=l(F(),1),uS=l(P(),1),jq=l(Z(),1);var Mq=l(Fe(),1),Ta=l(P(),1),aE=50,Dq=25,nCe=1e3,Nq=nCe*(Dq/1e3);function Vq(){let e=(0,Ta.useRef)(null),t=(0,Ta.useRef)(null),o=(0,Ta.useRef)(null),r=(0,Ta.useRef)(null);(0,Ta.useEffect)(()=>()=>{r.current&&(clearInterval(r.current),r.current=null)},[]);let n=(0,Ta.useCallback)(a=>{e.current=a.clientY,o.current=(0,Mq.getScrollContainer)(a.target),r.current=setInterval(()=>{if(o.current&&t.current){let c=o.current.scrollTop+t.current;o.current.scroll({top:c})}},Dq)},[]),i=(0,Ta.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-aE,0),m=Math.max(d-u-aE,0),h=f===0||m===0?0:m/f;t.current=Nq*h}else if(a.clientY<u){let f=Math.max(u-aE,0),m=Math.max(u-d-aE,0),h=f===0||m===0?0:m/f;t.current=-Nq*h}else t.current=0},[]);return[n,i,()=>{e.current=null,o.current=null,r.current&&(clearInterval(r.current),r.current=null)}]}var iV=l(w(),1),iCe=({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,cS.useSelect)(E=>{let{canMoveBlocks:L,getBlockRootClientId:T,getBlockName:R,getBlockAttributes:D,isBlockInsertionPointVisible:j}=E(_),{getBlockType:G,getActiveBlockVariation:z}=E(Fq.store),H=T(o[0]),W=R(o[0]),te=z(W,D(o[0]));return{srcRootClientId:H,isDraggable:L(o),icon:te?.icon||G(W)?.icon,visibleInserter:j(),getBlockType:G}},[o]),p=(0,uS.useRef)(!1),[g,b,v]=Vq(),{getAllowedBlocks:k,getBlockNamesByClientId:y,getBlockRootClientId:S}=(0,cS.useSelect)(_),{startDraggingBlocks:x,stopDraggingBlocks:C}=(0,cS.useDispatch)(_);(0,uS.useEffect)(()=>()=>{p.current&&C()},[]);let I=mt(o[0])?.closest("body");return(0,uS.useEffect)(()=>{if(!I||!a)return;let L=(0,jq.throttle)(T=>{if(!T.target.closest("[data-block]"))return;let R=y(o),D=T.target.closest("[data-block]").getAttribute("data-block"),j=k(D),G=y([D])[0],z;if(j?.length===0){let H=S(D),W=y([H])[0],te=k(H);z=HB(h,te,R,W)}else z=HB(h,j,R,G);!z&&!m?window?.document?.body?.classList?.add("block-draggable-invalid-drag-token"):window?.document?.body?.classList?.remove("block-draggable-invalid-drag-token")},200);return I.addEventListener("dragover",L),()=>{I.removeEventListener("dragover",L)}},[o,I,a,k,y,S,h,m]),d?(0,iV.jsx)(zq.Draggable,{appendToOwnerDocument:e,cloneClassname:r,__experimentalTransferDataType:"wp-blocks",transferData:{type:"block",srcClientIds:o,srcRootClientId:u},onDragStart:E=>{window.requestAnimationFrame(()=>{x(o),p.current=!0,g(E),i&&i()})},onDragOver:b,onDragEnd:()=>{C(),p.current=!1,v(),s&&s()},__experimentalDragComponent:c!==void 0?c:(0,iV.jsx)(Z1,{count:o.length,icon:f,fadeWhenDisabled:!0}),elementId:n,children:({onDraggableStart:E,onDraggableEnd:L})=>t({draggable:!0,onDragStart:E,onDragEnd:L})}):t({draggable:!1})},lE=iCe;var Hq=l($(),1),cE=l(A(),1),Gq=l(Z(),1),uE=l(F(),1),dE=l(P(),1),$i=l(N(),1);var ke=l(N(),1),nd=(e,t)=>e==="up"?t==="horizontal"?(0,ke.isRTL)()?"right":"left":"up":e==="down"?t==="horizontal"?(0,ke.isRTL)()?"left":"right":"down":null;function Uq(e,t,o,r,n,i,s){let a=o+1;if(e>1)return sCe(e,o,r,n,i,s);if(r&&n)return(0,ke.sprintf)((0,ke.__)("Block %s is the only block, and cannot be moved"),t);if(i>0&&!n){let c=nd("down",s);if(c==="down")return(0,ke.sprintf)((0,ke.__)("Move %1$s block from position %2$d down to position %3$d"),t,a,a+1);if(c==="left")return(0,ke.sprintf)((0,ke.__)("Move %1$s block from position %2$d left to position %3$d"),t,a,a+1);if(c==="right")return(0,ke.sprintf)((0,ke.__)("Move %1$s block from position %2$d right to position %3$d"),t,a,a+1)}if(i>0&&n){let c=nd("down",s);if(c==="down")return(0,ke.sprintf)((0,ke.__)("Block %1$s is at the end of the content and can\u2019t be moved down"),t);if(c==="left")return(0,ke.sprintf)((0,ke.__)("Block %1$s is at the end of the content and can\u2019t be moved left"),t);if(c==="right")return(0,ke.sprintf)((0,ke.__)("Block %1$s is at the end of the content and can\u2019t be moved right"),t)}if(i<0&&!r){let c=nd("up",s);if(c==="up")return(0,ke.sprintf)((0,ke.__)("Move %1$s block from position %2$d up to position %3$d"),t,a,a-1);if(c==="left")return(0,ke.sprintf)((0,ke.__)("Move %1$s block from position %2$d left to position %3$d"),t,a,a-1);if(c==="right")return(0,ke.sprintf)((0,ke.__)("Move %1$s block from position %2$d right to position %3$d"),t,a,a-1)}if(i<0&&r){let c=nd("up",s);if(c==="up")return(0,ke.sprintf)((0,ke.__)("Block %1$s is at the beginning of the content and can\u2019t be moved up"),t);if(c==="left")return(0,ke.sprintf)((0,ke.__)("Block %1$s is at the beginning of the content and can\u2019t be moved left"),t);if(c==="right")return(0,ke.sprintf)((0,ke.__)("Block %1$s is at the beginning of the content and can\u2019t be moved right"),t)}}function sCe(e,t,o,r,n,i){let s=t+1;if(o&&r)return(0,ke.__)("All blocks are selected, and cannot be moved");if(n>0&&!r){let a=nd("down",i);if(a==="down")return(0,ke.sprintf)((0,ke.__)("Move %1$d blocks from position %2$d down by one place"),e,s);if(a==="left")return(0,ke.sprintf)((0,ke.__)("Move %1$d blocks from position %2$d left by one place"),e,s);if(a==="right")return(0,ke.sprintf)((0,ke.__)("Move %1$d blocks from position %2$d right by one place"),e,s)}if(n>0&&r){let a=nd("down",i);if(a==="down")return(0,ke.__)("Blocks cannot be moved down as they are already at the bottom");if(a==="left")return(0,ke.__)("Blocks cannot be moved left as they are already are at the leftmost position");if(a==="right")return(0,ke.__)("Blocks cannot be moved right as they are already are at the rightmost position")}if(n<0&&!o){let a=nd("up",i);if(a==="up")return(0,ke.sprintf)((0,ke.__)("Move %1$d blocks from position %2$d up by one place"),e,s);if(a==="left")return(0,ke.sprintf)((0,ke.__)("Move %1$d blocks from position %2$d left by one place"),e,s);if(a==="right")return(0,ke.sprintf)((0,ke.__)("Move %1$d blocks from position %2$d right by one place"),e,s)}if(n<0&&o){let a=nd("up",i);if(a==="up")return(0,ke.__)("Blocks cannot be moved up as they are already at the top");if(a==="left")return(0,ke.__)("Blocks cannot be moved left as they are already are at the leftmost position");if(a==="right")return(0,ke.__)("Blocks cannot be moved right as they are already are at the rightmost position")}}var ql=l(w(),1),aCe=(e,t)=>e==="up"?t==="horizontal"?(0,$i.isRTL)()?Vo:Nr:_f:e==="down"?t==="horizontal"?(0,$i.isRTL)()?Nr:Vo:Fn:null,lCe=(e,t)=>e==="up"?t==="horizontal"?(0,$i.isRTL)()?(0,$i.__)("Move right"):(0,$i.__)("Move left"):(0,$i.__)("Move up"):e==="down"?t==="horizontal"?(0,$i.isRTL)()?(0,$i.__)("Move left"):(0,$i.__)("Move right"):(0,$i.__)("Move down"):null,sV=(0,dE.forwardRef)(({clientIds:e,direction:t,orientation:o,...r},n)=>{let i=(0,Gq.useInstanceId)(sV),s=Array.isArray(e)?e:[e],a=s.length,{disabled:c}=r,{blockType:u,isDisabled:d,rootClientId:f,isFirst:m,isLast:h,firstIndex:p,orientation:g="vertical"}=(0,uE.useSelect)(x=>{let{getBlockIndex:C,getBlockRootClientId:B,getBlockOrder:I,getBlock:O,getBlockListSettings:E}=x(_),L=s[0],T=B(L),R=C(L),D=C(s[s.length-1]),j=I(T),G=O(L),z=R===0,H=D===j.length-1,{orientation:W}=E(T)||{};return{blockType:G?(0,Hq.getBlockType)(G.name):null,isDisabled:c||(t==="up"?z:H),rootClientId:T,firstIndex:R,isFirst:z,isLast:H,orientation:o||W}},[e,t]),{moveBlocksDown:b,moveBlocksUp:v}=(0,uE.useDispatch)(_),k=t==="up"?v:b,y=x=>{k(e,f),r.onClick&&r.onClick(x)},S=`block-editor-block-mover-button__description-${i}`;return(0,ql.jsxs)(ql.Fragment,{children:[(0,ql.jsx)(cE.Button,{__next40pxDefaultSize:!0,ref:n,className:V("block-editor-block-mover-button",`is-${t}-button`),icon:aCe(t,g),label:lCe(t,g),"aria-describedby":S,...r,onClick:d?null:y,disabled:d,accessibleWhenDisabled:!0}),(0,ql.jsx)(cE.VisuallyHidden,{id:S,children:Uq(a,u&&u.title,p,m,h,t==="up"?-1:1,g)})]})}),fE=(0,dE.forwardRef)((e,t)=>(0,ql.jsx)(sV,{direction:"up",ref:t,...e})),mE=(0,dE.forwardRef)((e,t)=>(0,ql.jsx)(sV,{direction:"down",ref:t,...e}));var Ia=l(w(),1);function cCe({clientIds:e,hideDragHandle:t,isBlockMoverUpButtonDisabled:o,isBlockMoverDownButtonDisabled:r}){let{canMove:n,rootClientId:i,isFirst:s,isLast:a,orientation:c,isManualGrid:u}=(0,Wq.useSelect)(d=>{let{getBlockIndex:f,getBlockListSettings:m,canMoveBlocks:h,getBlockOrder:p,getBlockRootClientId:g,getBlockAttributes:b}=d(_),v=Array.isArray(e)?e:[e],k=v[0],y=g(k),S=f(k),x=f(v[v.length-1]),C=p(y),{layout:B={}}=b(y)??{};return{canMove:h(e),rootClientId:y,isFirst:S===0,isLast:x===C.length-1,orientation:m(y)?.orientation,isManualGrid:B.type==="grid"&&B.isManualPlacement&&window.__experimentalEnableGridInteractivity}},[e]);return!n||s&&a&&!i||t&&u?null:(0,Ia.jsxs)(_m.ToolbarGroup,{className:V("block-editor-block-mover",{"is-horizontal":c==="horizontal"}),children:[!t&&(0,Ia.jsx)(lE,{clientIds:e,fadeWhenDisabled:!0,children:d=>(0,Ia.jsx)(_m.Button,{__next40pxDefaultSize:!0,icon:Jk,className:"block-editor-block-mover__drag-handle",label:(0,$q.__)("Drag"),tabIndex:"-1",...d})}),!u&&(0,Ia.jsxs)("div",{className:"block-editor-block-mover__move-button-container",children:[(0,Ia.jsx)(_m.ToolbarItem,{children:d=>(0,Ia.jsx)(fE,{disabled:o,clientIds:e,...d})}),(0,Ia.jsx)(_m.ToolbarItem,{children:d=>(0,Ia.jsx)(mE,{disabled:r,clientIds:e,...d})})]})]})}var pE=cCe;var qq=l(A(),1),gE=l(F(),1),bE=l(N(),1),Zq=l(P(),1);var dS=l(F(),1),id=l(P(),1);var{clearTimeout:Kq,setTimeout:uCe}=window,Yq=200;function dCe({ref:e,isFocused:t,highlightParent:o,debounceTimeout:r=Yq}){let{getSelectedBlockClientId:n,getBlockRootClientId:i}=(0,dS.useSelect)(_),{toggleBlockHighlight:s}=(0,dS.useDispatch)(_),a=(0,id.useRef)(),c=(0,dS.useSelect)(g=>g(_).getSettings().isDistractionFree,[]),u=g=>{if(g&&c)return;let b=n(),v=o?i(b):b;s(v,g)},d=()=>e?.current&&e.current.matches(":hover"),f=()=>{let g=d();return!t&&!g},m=()=>{let g=a.current;g&&Kq&&Kq(g)},h=g=>{g&&g.stopPropagation(),m(),u(!0)},p=g=>{g&&g.stopPropagation(),m(),a.current=uCe(()=>{f()&&u(!1)},r)};return(0,id.useEffect)(()=>()=>{u(!1),m()},[]),{debouncedShowGestures:h,debouncedHideGestures:p}}function bg({ref:e,highlightParent:t=!1,debounceTimeout:o=Yq}){let[r,n]=(0,id.useState)(!1),{debouncedShowGestures:i,debouncedHideGestures:s}=dCe({ref:e,debounceTimeout:o,isFocused:r,highlightParent:t}),a=(0,id.useRef)(!1),c=()=>e?.current&&e.current.contains(e.current.ownerDocument.activeElement);return(0,id.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 hE=l(w(),1);function Xq(){let{selectBlock:e}=(0,gE.useDispatch)(_),{parentClientId:t}=(0,gE.useSelect)(i=>{let{getBlockParents:s,getSelectedBlockClientId:a,getParentSectionBlock:c}=M(i(_)),u=a(),d=c(u),f=s(u);return{parentClientId:d??f[f.length-1]}},[]),o=Tt(t),r=(0,Zq.useRef)(),n=bg({ref:r,highlightParent:!0});return(0,hE.jsx)("div",{className:"block-editor-block-parent-selector",ref:r,...n,children:(0,hE.jsx)(qq.ToolbarButton,{className:"block-editor-block-parent-selector__button",onClick:()=>e(t),label:(0,bE.sprintf)((0,bE.__)("Select parent block: %s"),o?.title),showTooltip:!0,icon:(0,hE.jsx)(Oe,{icon:o?.icon})})},t)}var kE=l(A(),1);var kg=l(A(),1),fCe=(0,kg.createSlotFill)("BlockControls"),mCe=(0,kg.createSlotFill)("BlockControlsBlock"),pCe=(0,kg.createSlotFill)("BlockFormatControls"),hCe=(0,kg.createSlotFill)("BlockControlsOther"),gCe=(0,kg.createSlotFill)("BlockControlsParent"),bCe={default:fCe,block:mCe,inline:pCe,other:hCe,parent:gCe},fS=bCe;function Qq(e,t){let o=Pe();return o[bs]?fS[e]?.Fill:o[Rp]&&t?fS.parent.Fill:null}var Zl=l(w(),1);function aV({group:e="default",controls:t,children:o,__experimentalShareWithChildBlocks:r=!1}){let n=Qq(e,r);if(!n)return null;let i=(0,Zl.jsxs)(Zl.Fragment,{children:[e==="default"&&(0,Zl.jsx)(kE.ToolbarGroup,{controls:t}),o]});return(0,Zl.jsx)(kE.__experimentalStyleProvider,{document,children:(0,Zl.jsx)(n,{children:s=>{let{forwardedContext:a=[]}=s;return a.reduce((c,[u,d])=>(0,Zl.jsx)(u,{...d,children:c}),i)}})})}var mS=l(P(),1),Xl=l(A(),1),eZ=l(Zv(),1);var lV=l(w(),1),{ComponentsContext:Jq}=M(Xl.privateApis);function cV({group:e="default",...t}){let o=(0,mS.useContext)(Xl.__experimentalToolbarContext),r=(0,mS.useContext)(Jq),n=(0,mS.useMemo)(()=>({forwardedContext:[[Xl.__experimentalToolbarContext.Provider,{value:o}],[Jq.Provider,{value:r}]]}),[o,r]),i=fS[e],s=(0,Xl.__experimentalUseSlotFills)(i.name);if(!i)return(0,eZ.default)(`Unknown BlockControls group "${e}" provided.`),null;if(!s?.length)return null;let{Slot:a}=i,c=(0,lV.jsx)(a,{...t,bubblesVirtually:!0,fillProps:n});return e==="default"?c:(0,lV.jsx)(Xl.ToolbarGroup,{children:c})}var uV=l(w(),1),tZ=aV;tZ.Slot=cV;var dV=e=>(0,uV.jsx)(aV,{group:"inline",...e});dV.Slot=function(t){return(0,uV.jsx)(cV,{group:"inline",...t})};var Mt=tZ;var oZ=l(A(),1),{Fill:rZ,Slot:kCe}=(0,oZ.createSlotFill)("__unstableBlockToolbarLastItem");rZ.Slot=kCe;var vE=rZ;var FE=l(A(),1);var xg=l($(),1),Jn=l(A(),1),Rm=l(F(),1);var DE=l(P(),1),Pa=l(N(),1),iX=l(Is(),1),Pm=l(Z(),1);var yg=l(F(),1),sd=l($(),1);var yZ=l(P(),1),hS=l($(),1),pS=l(F(),1),SZ=l(Ti(),1),Ql=l(N(),1);var Xn=l($(),1),nZ=l(P(),1),vCe="align";var iZ="__experimentalBorder",yE="color",yCe="customClassName",sZ="typography.__experimentalFontFamily",aZ="typography.fontSize",SCe="typography.lineHeight",_Ce="typography.__experimentalFontStyle",xCe="typography.__experimentalFontWeight",lZ="typography.textAlign",wCe="typography.textColumns",CCe="typography.__experimentalTextDecoration",BCe="typography.__experimentalWritingMode",ECe="typography.__experimentalTextTransform",TCe="typography.__experimentalLetterSpacing",ICe="layout",PCe=[SCe,aZ,_Ce,xCe,sZ,lZ,wCe,CCe,ECe,BCe,TCe],RCe=["shadow"],OCe="spacing",ACe=[...RCe,...PCe,iZ,yE,OCe],cZ=e=>(0,Xn.hasBlockSupport)(e,vCe);function uZ(e,t="any"){if(nZ.Platform.OS!=="web")return!1;let o=(0,Xn.getBlockSupport)(e,iZ);return o===!0?!0:t==="any"?!!(o?.color||o?.radius||o?.width||o?.style):!!o?.[t]}var dZ=e=>{let t=(0,Xn.getBlockSupport)(e,yE);return t!==null&&typeof t=="object"&&!!t.gradients},fZ=e=>{let t=(0,Xn.getBlockSupport)(e,yE);return t&&t.background!==!1},mZ=e=>(0,Xn.hasBlockSupport)(e,lZ);var pZ=e=>{let t=(0,Xn.getBlockSupport)(e,yE);return t&&t.text!==!1};var hZ=e=>(0,Xn.hasBlockSupport)(e,yCe,!0);var gZ=e=>(0,Xn.hasBlockSupport)(e,sZ);var bZ=e=>(0,Xn.hasBlockSupport)(e,aZ);var kZ=e=>(0,Xn.hasBlockSupport)(e,ICe);var vZ=e=>ACe.some(t=>(0,Xn.hasBlockSupport)(e,t));function LCe(e){try{let t=(0,hS.parse)(e,{__unstableSkipMigrationLogs:!0,__unstableSkipAutop:!0});return!(t.length===1&&t[0].name==="core/freeform")}catch{return!1}}var NCe={align:cZ,borderColor:e=>uZ(e,"color"),backgroundColor:fZ,textAlign:mZ,textColor:pZ,gradient:dZ,className:hZ,fontFamily:gZ,fontSize:bZ,layout:kZ,style:vZ};function MCe(e,t){return Object.entries(NCe).reduce((o,[r,n])=>(n(e.name)&&n(t.name)&&(o[r]=e.attributes[r]),o),{})}function fV(e,t,o){for(let r=0;r<Math.min(t.length,e.length);r+=1)o(e[r].clientId,MCe(t[r],e[r])),fV(e[r].innerBlocks,t[r].innerBlocks,o)}function vg(){let e=(0,pS.useRegistry)(),{updateBlockAttributes:t}=(0,pS.useDispatch)(_),{createSuccessNotice:o,createWarningNotice:r,createErrorNotice:n}=(0,pS.useDispatch)(SZ.store);return(0,yZ.useCallback)(async i=>{let s="";try{if(!window.navigator.clipboard){n((0,Ql.__)("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,Ql.__)("Unable to paste styles. Please allow browser clipboard permissions before continuing."),{type:"snackbar"});return}if(!s||!LCe(s)){r((0,Ql.__)("Unable to paste styles. Block styles couldn't be found within the copied content."),{type:"snackbar"});return}let a=(0,hS.parse)(s);if(a.length===1?e.batch(()=>{fV(i,i.map(()=>a[0]),t)}):e.batch(()=>{fV(i,a,t)}),i.length===1){let c=(0,hS.getBlockType)(i[0].name)?.title;o((0,Ql.sprintf)((0,Ql.__)("Pasted styles to %s."),c),{type:"snackbar"})}else o((0,Ql.sprintf)((0,Ql.__)("Pasted styles to %d blocks."),i.length),{type:"snackbar"})},[e.batch,t,o,r,n])}function _Z({clientIds:e,children:t,__experimentalUpdateSelection:o}){let{getDefaultBlockName:r,getGroupingBlockName:n}=(0,yg.useSelect)(sd.store),i=(0,yg.useSelect)(y=>{let{canInsertBlockType:S,getBlockRootClientId:x,getBlocksByClientId:C,getDirectInsertBlock:B,canRemoveBlocks:I}=y(_),O=C(e),E=x(e[0]),L=S(r(),E),T=E?B(E):null;return{canRemove:I(e),canInsertBlock:O.every(R=>(L||!!T)&&S(R.name,E)),canCopyStyles:O.every(R=>!!R&&((0,sd.hasBlockSupport)(R.name,"color")||(0,sd.hasBlockSupport)(R.name,"typography"))),canDuplicate:O.every(R=>!!R&&(0,sd.hasBlockSupport)(R.name,"multiple",!0)&&S(R.name,E))}},[e,r]),{getBlocksByClientId:s,getBlocks:a}=(0,yg.useSelect)(_),{canRemove:c,canInsertBlock:u,canCopyStyles:d,canDuplicate:f}=i,{removeBlocks:m,replaceBlocks:h,duplicateBlocks:p,insertAfterBlock:g,insertBeforeBlock:b,flashBlock:v}=(0,yg.useDispatch)(_),k=vg();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(),S=(0,sd.switchToBlockType)(s(e),y);S&&h(e,S)},onUngroup(){if(!e.length)return;let y=a(e[0]);y.length&&h(e,y)},onCopy(){e.length===1&&v(e[0])},async onPasteStyles(){await k(s(e))}})}var xZ=l(A(),1),DCe=(0,xZ.createSlotFill)(Symbol("CommentIconSlotFill")),SE=DCe;var wZ=l(N(),1),CZ=l(A(),1),_E=l($(),1),xE=l(F(),1);var BZ=l(w(),1);function VCe({clientId:e}){let t=(0,xE.useSelect)(r=>r(_).getBlock(e),[e]),{replaceBlocks:o}=(0,xE.useDispatch)(_);return!t||t.name!=="core/html"?null:(0,BZ.jsx)(CZ.MenuItem,{onClick:()=>o(e,(0,_E.rawHandler)({HTML:(0,_E.getBlockContent)(t)})),children:(0,wZ.__)("Convert to Blocks")})}var EZ=VCe;var TZ=l(A(),1),{Fill:IZ,Slot:FCe}=(0,TZ.createSlotFill)("__unstableBlockSettingsMenuFirstItem");IZ.Slot=FCe;var wE=IZ;var _g=l(A(),1),XZ=l($(),1),QZ=l(F(),1);var pV=l(A(),1),hV=l(N(),1),OZ=l($(),1),EE=l(F(),1),AZ=l(it(),1);var PZ=l($(),1),RZ=l(F(),1);function gS(e){return(0,RZ.useSelect)(t=>{let{getBlocksByClientId:o,getSelectedBlockClientIds:r,isUngroupable:n,isGroupable:i}=t(_),{getGroupingBlockName:s,getBlockType:a}=t(PZ.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 CE=l(F(),1),BE=l($(),1),xm=l(A(),1);var bS=l(N(),1);var wm=l(w(),1),zCe={group:{type:"constrained"},row:{type:"flex",flexWrap:"nowrap"},stack:{type:"flex",orientation:"vertical"},grid:{type:"grid"}};function jCe(){let{blocksSelection:e,clientIds:t,groupingBlockName:o,isGroupable:r}=gS(),{replaceBlocks:n}=(0,CE.useDispatch)(_),{canRemove:i,variations:s}=(0,CE.useSelect)(p=>{let{canRemoveBlocks:g}=p(_),{getBlockVariations:b}=p(BE.store);return{canRemove:g(t),variations:b(o,"transform")}},[t,o]),a=p=>{let g=(0,BE.switchToBlockType)(e,o);typeof p!="string"&&(p="group"),g&&g.length>0&&(g[0].attributes.layout=zCe[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,wm.jsxs)(xm.ToolbarGroup,{children:[(0,wm.jsx)(xm.ToolbarButton,{icon:ov,label:(0,bS._x)("Group","action: convert blocks to group"),onClick:a}),f&&(0,wm.jsx)(xm.ToolbarButton,{icon:KL,label:(0,bS._x)("Row","action: convert blocks to row"),onClick:c}),m&&(0,wm.jsx)(xm.ToolbarButton,{icon:lN,label:(0,bS._x)("Stack","action: convert blocks to stack"),onClick:u}),h&&(0,wm.jsx)(xm.ToolbarButton,{icon:tv,label:(0,bS._x)("Grid","action: convert blocks to grid"),onClick:d})]})}var mV=jCe;var Cm=l(w(),1);function LZ({clientIds:e,isGroupable:t,isUngroupable:o,onUngroup:r,blocksSelection:n,groupingBlockName:i,onClose:s=()=>{}}){let{getSelectedBlockClientIds:a}=(0,EE.useSelect)(_),{replaceBlocks:c}=(0,EE.useDispatch)(_),u=()=>{let m=(0,OZ.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,Cm.jsxs)(Cm.Fragment,{children:[t&&(0,Cm.jsx)(pV.MenuItem,{shortcut:f.length>1?AZ.displayShortcut.primary("g"):void 0,onClick:()=>{u(),s()},children:(0,hV._x)("Group","verb")}),o&&(0,Cm.jsx)(pV.MenuItem,{onClick:()=>{d(),s()},children:(0,hV._x)("Ungroup","Ungrouping blocks from within a grouping block back into individual blocks within the Editor")})]})}var gV=l(N(),1),DZ=l(P(),1),VZ=l(A(),1);var NZ=l(F(),1);function Qn(e){return(0,NZ.useSelect)(t=>{let{canLockBlockType:o,getBlockName:r,isEditLockedBlock:n,isMoveLockedBlock:i,isRemoveLockedBlock:s,isLockedBlock:a}=M(t(_));return{isEditLocked:n(e),isMoveLocked:i(e),isRemoveLocked:s(e),canLock:o(r(e)),isLocked:a(e)}},[e])}var Ki=l(N(),1),kS=l(P(),1),go=l(A(),1);var TE=l(F(),1),MZ=l($(),1);var It=l(w(),1),UCe=["core/navigation"];function HCe(e){return e.remove&&e.move?"all":e.remove&&!e.move?"insert":!1}function IE({clientId:e,onClose:t}){let[o,r]=(0,kS.useState)({move:!1,remove:!1}),{isEditLocked:n,isMoveLocked:i,isRemoveLocked:s}=Qn(e),{allowsEditLocking:a,templateLock:c,hasTemplateLock:u}=(0,TE.useSelect)(v=>{let{getBlockName:k,getBlockAttributes:y}=v(_),S=k(e),x=(0,MZ.getBlockType)(S);return{allowsEditLocking:UCe.includes(S),templateLock:y(e)?.templateLock,hasTemplateLock:!!x?.attributes?.templateLock}},[e]),[d,f]=(0,kS.useState)(!!c),{updateBlockAttributes:m}=(0,TE.useDispatch)(_),h=Tt(e);(0,kS.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,It.jsx)(go.Modal,{title:(0,Ki.sprintf)((0,Ki.__)("Lock %s"),h.title),overlayClassName:"block-editor-block-lock-modal",onRequestClose:t,size:"small",children:(0,It.jsxs)("form",{onSubmit:v=>{v.preventDefault(),b&&(m([e],{lock:o,templateLock:d?HCe(o):void 0}),t())},children:[(0,It.jsxs)("fieldset",{className:"block-editor-block-lock-modal__options",children:[(0,It.jsx)("legend",{children:(0,Ki.__)("Select the features you want to lock")}),(0,It.jsx)("ul",{role:"list",className:"block-editor-block-lock-modal__checklist",children:(0,It.jsxs)("li",{children:[(0,It.jsx)(go.CheckboxControl,{className:"block-editor-block-lock-modal__options-all",label:(0,Ki.__)("Lock all"),checked:p,indeterminate:g,onChange:v=>r({move:v,remove:v,...a?{edit:v}:{}})}),(0,It.jsxs)("ul",{role:"list",className:"block-editor-block-lock-modal__checklist",children:[a&&(0,It.jsxs)("li",{className:"block-editor-block-lock-modal__checklist-item",children:[(0,It.jsx)(go.CheckboxControl,{label:(0,Ki.__)("Lock editing"),checked:!!o.edit,onChange:v=>r(k=>({...k,edit:v}))}),(0,It.jsx)(go.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:o.edit?Pf:vl})]}),(0,It.jsxs)("li",{className:"block-editor-block-lock-modal__checklist-item",children:[(0,It.jsx)(go.CheckboxControl,{label:(0,Ki.__)("Lock movement"),checked:o.move,onChange:v=>r(k=>({...k,move:v}))}),(0,It.jsx)(go.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:o.move?Pf:vl})]}),(0,It.jsxs)("li",{className:"block-editor-block-lock-modal__checklist-item",children:[(0,It.jsx)(go.CheckboxControl,{label:(0,Ki.__)("Lock removal"),checked:o.remove,onChange:v=>r(k=>({...k,remove:v}))}),(0,It.jsx)(go.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:o.remove?Pf:vl})]})]})]})}),u&&(0,It.jsx)(go.ToggleControl,{className:"block-editor-block-lock-modal__template-lock",label:(0,Ki.__)("Apply to all blocks inside"),checked:d,disabled:o.move&&!o.remove,onChange:()=>f(!d)})]}),(0,It.jsxs)(go.Flex,{className:"block-editor-block-lock-modal__actions",justify:"flex-end",expanded:!1,children:[(0,It.jsx)(go.FlexItem,{children:(0,It.jsx)(go.Button,{variant:"tertiary",onClick:t,__next40pxDefaultSize:!0,children:(0,Ki.__)("Cancel")})}),(0,It.jsx)(go.FlexItem,{children:(0,It.jsx)(go.Button,{variant:"primary",type:"submit",disabled:!b,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,Ki.__)("Apply")})})]})]})})}var Bm=l(w(),1);function bV({clientId:e}){let{canLock:t,isLocked:o}=Qn(e),[r,n]=(0,DZ.useReducer)(s=>!s,!1);if(!t)return null;let i=o?(0,gV.__)("Unlock"):(0,gV.__)("Lock");return(0,Bm.jsxs)(Bm.Fragment,{children:[(0,Bm.jsx)(VZ.MenuItem,{icon:o?vl:vL,onClick:n,"aria-expanded":r,"aria-haspopup":"dialog",children:i}),r&&(0,Bm.jsx)(IE,{clientId:e,onClose:n})]})}var PE=l(N(),1),RE=l(A(),1),Sg=l(P(),1);var ad=l(w(),1);function kV({clientId:e}){let{canLock:t,isLocked:o}=Qn(e),[r,n]=(0,Sg.useReducer)(a=>!a,!1),i=(0,Sg.useRef)(!1);if((0,Sg.useEffect)(()=>{o&&(i.current=!0)},[o]),!o&&!i.current)return null;let s=o?(0,PE.__)("Unlock"):(0,PE.__)("Lock");return!t&&o&&(s=(0,PE.__)("Locked")),(0,ad.jsxs)(ad.Fragment,{children:[(0,ad.jsx)(RE.ToolbarGroup,{className:"block-editor-block-lock-toolbar",children:(0,ad.jsx)(RE.ToolbarButton,{disabled:!t,icon:o?Pf:vl,label:s,onClick:n,"aria-expanded":r,"aria-haspopup":"dialog"})}),r&&(0,ad.jsx)(IE,{clientId:e,onClose:n})]})}var vV=l(N(),1),FZ=l(A(),1),OE=l($(),1),AE=l(F(),1);var zZ=l(w(),1),GCe=()=>{};function jZ({clientId:e,onToggle:t=GCe}){let{blockType:o,mode:r,enabled:n}=(0,AE.useSelect)(a=>{let{getBlock:c,getBlockMode:u,getSettings:d}=a(_),f=c(e);return{mode:u(e),blockType:f?(0,OE.getBlockType)(f.name):null,enabled:d().codeEditingEnabled&&!!f?.isValid}},[e]),{toggleBlockMode:i}=(0,AE.useDispatch)(_);if(!o||!(0,OE.hasBlockSupport)(o,"html",!0)||!n)return null;let s=r==="visual"?(0,vV.__)("Edit as HTML"):(0,vV.__)("Edit visually");return(0,zZ.jsx)(FZ.MenuItem,{onClick:()=>{i(e),t()},children:s})}var WZ=l(A(),1),$Z=l(N(),1),KZ=l(P(),1),YZ=l(F(),1),qZ=l(Is(),1);var Vs=l(A(),1),Ds=l(N(),1),HZ=l(P(),1),GZ=l(Zo(),1),LE=l(F(),1);function UZ(e){return e?.trim()?.length===0}var Jl=l(w(),1);function Em({clientId:e,onClose:t}){let[o,r]=(0,HZ.useState)(),n=Tt(e),{metadata:i}=(0,LE.useSelect)(b=>{let{getBlockAttributes:v}=b(_);return{metadata:v(e)?.metadata}},[e]),{updateBlockAttributes:s}=(0,LE.useDispatch)(_),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=UZ(o),h=d||f,p=b=>b.target.select(),g=()=>{let b=f||m?void 0:o,v=f||m?(0,Ds.sprintf)((0,Ds.__)('Block name reset to: "%s".'),o):(0,Ds.sprintf)((0,Ds.__)('Block name changed to: "%s".'),o);(0,GZ.speak)(v,"assertive"),s([e],{metadata:Ne({...i,name:b})}),t()};return(0,Jl.jsx)(Vs.Modal,{title:(0,Ds.__)("Rename"),onRequestClose:t,overlayClassName:"block-editor-block-rename-modal",focusOnMount:"firstContentElement",size:"small",children:(0,Jl.jsx)("form",{onSubmit:b=>{b.preventDefault(),h&&g()},children:(0,Jl.jsxs)(Vs.__experimentalVStack,{spacing:"3",children:[(0,Jl.jsx)(Vs.TextControl,{__next40pxDefaultSize:!0,value:o??a,label:(0,Ds.__)("Name"),help:u?(0,Ds.__)("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,Jl.jsxs)(Vs.__experimentalHStack,{justify:"right",children:[(0,Jl.jsx)(Vs.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,children:(0,Ds.__)("Cancel")}),(0,Jl.jsx)(Vs.Button,{__next40pxDefaultSize:!0,accessibleWhenDisabled:!0,disabled:!h,variant:"primary",type:"submit",children:(0,Ds.__)("Save")})]})]})})})}var Tm=l(w(),1);function yV({clientId:e}){let[t,o]=(0,KZ.useState)(!1),r=(0,YZ.useSelect)(n=>n(qZ.store).getShortcutRepresentation("core/block-editor/rename"),[]);return(0,Tm.jsxs)(Tm.Fragment,{children:[(0,Tm.jsx)(WZ.MenuItem,{onClick:()=>{o(!0)},"aria-expanded":t,"aria-haspopup":"dialog",shortcut:r,children:(0,$Z.__)("Rename")}),t&&(0,Tm.jsx)(Em,{clientId:e,onClose:()=>o(!1)})]})}var ZZ=l($(),1);function Im(e){return{canRename:!!e&&(0,ZZ.getBlockSupport)(e,"renaming",!0)}}var Fs=l(w(),1),{Fill:WCe,Slot:$Ce}=(0,_g.createSlotFill)("BlockSettingsMenuControls"),KCe=({fillProps:e,clientIds:t=null})=>{let{selectedBlocks:o,selectedClientIds:r,isContentOnly:n,canToggleSelectedBlocksVisibility:i,canEdit:s}=(0,QZ.useSelect)(b=>{let{getBlocksByClientId:v,getBlockNamesByClientId:k,getSelectedBlockClientIds:y,getBlockEditingMode:S,canEditBlock:x}=b(_),C=t!==null?t:y();return{selectedBlocks:k(C),selectedClientIds:C,isContentOnly:S(C[0])==="contentOnly",canToggleSelectedBlocksVisibility:v(C).every(B=>(0,XZ.hasBlockSupport)(B.name,"visibility",!0)),canEdit:x(C[0])}},[t]),{canLock:a}=Qn(r[0]),{canRename:c}=Im(o[0]),u=r.length===1&&a&&!n,d=r.length===1&&c&&!n,f=i&&!n,m=gS(r),{isGroupable:h,isUngroupable:p}=m,g=(h||p)&&!n;return(0,Fs.jsx)($Ce,{fillProps:{...e,selectedBlocks:o,selectedClientIds:r},children:b=>!b?.length>0&&!g&&!u?null:(0,Fs.jsxs)(_g.MenuGroup,{children:[g&&(0,Fs.jsx)(LZ,{...m,onClose:e?.onClose}),s&&u&&(0,Fs.jsx)(bV,{clientId:r[0]}),s&&d&&(0,Fs.jsx)(yV,{clientId:r[0]}),s&&f&&(0,Fs.jsx)(wD,{clientIds:r}),b,s&&e?.count===1&&!n&&(0,Fs.jsx)(jZ,{clientId:e?.firstBlockClientId,onToggle:e?.onClose})]})})};function JZ({...e}){return(0,Fs.jsx)(_g.__experimentalStyleProvider,{document,children:(0,Fs.jsx)(WCe,{...e})})}JZ.Slot=KCe;var NE=JZ;var eX=l(P(),1),tX=l(A(),1),oX=l(Z(),1),rX=l(F(),1),ME=l(N(),1);var SV=l(w(),1);function nX({parentClientId:e,parentBlockType:t}){let o=(0,oX.useViewportMatch)("medium","<"),{selectBlock:r}=(0,rX.useDispatch)(_),n=(0,eX.useRef)(),i=bg({ref:n,highlightParent:!0});return o?(0,SV.jsx)(tX.MenuItem,{...i,ref:n,icon:(0,SV.jsx)(Oe,{icon:t.icon}),onClick:()=>r(e),children:(0,ME.sprintf)((0,ME.__)("Select parent block (%s)"),t.title)}):null}var vt=l(w(),1),YCe={className:"block-editor-block-settings-menu__popover",placement:"bottom-start"};function _V({clientIds:e,onCopy:t,label:o,shortcut:r,eventType:n="copy",__experimentalUpdateSelection:i=!1}){let{getBlocksByClientId:s}=(0,Rm.useSelect)(_),{removeBlocks:a}=(0,Rm.useDispatch)(_),c=Rh(),u=(0,Pm.useCopyToClipboard)(()=>(0,xg.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,Pa.__)("Copy");return(0,vt.jsx)(Jn.MenuItem,{ref:u,shortcut:r,children:d})}function xV({block:e,clientIds:t,children:o,__experimentalSelectBlock:r,...n}){let i=t.length,s=t[0],{firstParentClientId:a,parentBlockType:c,previousBlockClientId:u,selectedBlockClientIds:d,isContentOnly:f,isZoomOut:m,canEdit:h}=(0,Rm.useSelect)(C=>{let{getBlockName:B,getBlockRootClientId:I,getPreviousBlockClientId:O,getSelectedBlockClientIds:E,getBlockAttributes:L,getBlockEditingMode:T,isZoomOut:R,canEditBlock:D}=M(C(_)),{getActiveBlockVariation:j}=C(xg.store),G=I(s),z=G&&B(G);return{firstParentClientId:G,parentBlockType:G&&(j(z,L(G))||(0,xg.getBlockType)(z)),previousBlockClientId:O(s),selectedBlockClientIds:E(),isContentOnly:T(s)==="contentOnly",isZoomOut:R(),canEdit:D(s)}},[s]),{getBlockOrder:p,getSelectedBlockClientIds:g}=(0,Rm.useSelect)(_),b=(0,Rm.useSelect)(C=>{let{getShortcutRepresentation:B}=C(iX.store);return{copy:B("core/block-editor/copy"),cut:B("core/block-editor/cut"),duplicate:B("core/block-editor/duplicate"),remove:B("core/block-editor/remove"),insertAfter:B("core/block-editor/insert-after"),insertBefore:B("core/block-editor/insert-before")}},[]),v=d.length>0;async function k(C){if(!r)return;let B=await C;B&&B[0]&&r(B[0],!1)}function y(){if(!r)return;let C=u||a;C||(C=p()[0]);let B=v&&g().length===0;r(C,B)}let x=!d?.includes(a)&&!!a;return(0,vt.jsx)(_Z,{clientIds:t,__experimentalUpdateSelection:!r,children:({canCopyStyles:C,canDuplicate:B,canInsertBlock:I,canRemove:O,onDuplicate:E,onInsertAfter:L,onInsertBefore:T,onRemove:R,onCopy:D,onPasteStyles:j})=>!O&&!B&&!I&&f?null:(0,vt.jsx)(Jn.DropdownMenu,{icon:ks,label:(0,Pa.__)("Options"),className:"block-editor-block-settings-menu",popoverProps:YCe,noIcons:!0,...n,children:({onClose:z})=>(0,vt.jsxs)(vt.Fragment,{children:[(0,vt.jsxs)(Jn.MenuGroup,{children:[(0,vt.jsx)(wE.Slot,{fillProps:{onClose:z}}),x&&(0,vt.jsx)(nX,{parentClientId:a,parentBlockType:c}),h&&i===1&&(0,vt.jsx)(EZ,{clientId:s}),!f&&(0,vt.jsx)(_V,{clientIds:t,onCopy:D,shortcut:b.copy}),O&&!f&&(0,vt.jsx)(_V,{clientIds:t,label:(0,Pa.__)("Cut"),eventType:"cut",shortcut:b.cut,__experimentalUpdateSelection:!r}),B&&(0,vt.jsx)(Jn.MenuItem,{onClick:(0,Pm.pipe)(z,E,k),shortcut:b.duplicate,children:(0,Pa.__)("Duplicate")}),I&&!m&&(0,vt.jsxs)(vt.Fragment,{children:[(0,vt.jsx)(Jn.MenuItem,{onClick:(0,Pm.pipe)(z,T),shortcut:b.insertBefore,children:(0,Pa.__)("Add before")}),(0,vt.jsx)(Jn.MenuItem,{onClick:(0,Pm.pipe)(z,L),shortcut:b.insertAfter,children:(0,Pa.__)("Add after")})]}),h&&i===1&&(0,vt.jsx)(SE.Slot,{fillProps:{clientId:s,onClose:z}})]}),C&&!f&&(0,vt.jsxs)(Jn.MenuGroup,{children:[(0,vt.jsx)(_V,{clientIds:t,onCopy:D,label:(0,Pa.__)("Copy styles"),eventType:"copyStyles"}),h&&(0,vt.jsx)(Jn.MenuItem,{onClick:j,children:(0,Pa.__)("Paste styles")})]}),!f&&(0,vt.jsx)(NE.Slot,{fillProps:{onClose:z,count:i,firstBlockClientId:s},clientIds:t}),typeof o=="function"?o({onClose:z}):DE.Children.map(H=>(0,DE.cloneElement)(H,{onClose:z})),O&&(0,vt.jsx)(Jn.MenuGroup,{children:(0,vt.jsx)(Jn.MenuItem,{onClick:(0,Pm.pipe)(z,R,y),shortcut:b.remove,children:(0,Pa.__)("Delete")})})]})})})}var sX=xV;var aX=l(A(),1),qCe=(0,aX.createSlotFill)(Symbol("CommentIconToolbarSlotFill")),VE=qCe;var wg=l(w(),1);function ZCe({clientIds:e,...t}){return(0,wg.jsxs)(FE.ToolbarGroup,{children:[(0,wg.jsx)(VE.Slot,{}),(0,wg.jsx)(FE.ToolbarItem,{children:o=>(0,wg.jsx)(sX,{clientIds:e,toggleProps:o,...t})})]})}var zE=ZCe;var jE=l(A(),1),lX=l(N(),1),UE=l(F(),1);var wV=l(w(),1);function cX({clientIds:e}){let t=e.length===1?e[0]:void 0,o=(0,UE.useSelect)(n=>!!t&&n(_).getBlockMode(t)==="html",[t]),{toggleBlockMode:r}=(0,UE.useDispatch)(_);return o?(0,wV.jsx)(jE.ToolbarGroup,{children:(0,wV.jsx)(jE.ToolbarButton,{onClick:()=>{r(t)},children:(0,lX.__)("Edit visually")})}):null}var HE=l(A(),1),Kr=l(P(),1),fX=l(F(),1),mX=l(Re(),1),BV=l(Fe(),1),pX=l(Is(),1),hX=l(it(),1);var CV=l(w(),1);function XCe(e){let t="toolbarItem";return!e.some(o=>!(t in o.dataset))}function uX(e){return Array.from(e.querySelectorAll("[data-toolbar-item]:not([disabled])"))}function dX(e){return e.contains(e.ownerDocument.activeElement)}function QCe(e){let[t]=BV.focus.tabbable.find(e);t&&t.focus({preventScroll:!0})}function JCe(e){let[o,r]=(0,Kr.useState)(!0),n=(0,Kr.useCallback)(()=>{let i=BV.focus.tabbable.find(e.current),s=XCe(i);s||(0,mX.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,Kr.useLayoutEffect)(()=>{let i=new window.MutationObserver(n);return i.observe(e.current,{childList:!0,subtree:!0}),()=>i.disconnect()},[n,o,e]),o}function e1e({toolbarRef:e,focusOnMount:t,isAccessibleToolbar:o,defaultIndex:r,onIndexChange:n,shouldUseKeyboardFocusShortcut:i,focusEditorOnEscape:s}){let[a]=(0,Kr.useState)(t),[c]=(0,Kr.useState)(r),u=(0,Kr.useCallback)(()=>{QCe(e.current)},[e]);(0,pX.useShortcut)("core/block-editor/focus-toolbar",()=>{i&&u()}),(0,Kr.useEffect)(()=>{a&&u()},[o,a,u]),(0,Kr.useEffect)(()=>{let m=e.current,h=0;return!a&&!dX(m)&&(h=window.requestAnimationFrame(()=>{let p=uX(m),g=c||0;p[g]&&dX(m)&&p[g].focus({preventScroll:!0})})),()=>{if(window.cancelAnimationFrame(h),!n||!m)return;let g=uX(m).findIndex(b=>b.tabIndex===0);n(g)}},[c,a,n,e]);let{getLastFocus:f}=M((0,fX.useSelect)(_));(0,Kr.useEffect)(()=>{let m=e.current;if(s){let h=p=>{let g=f();p.keyCode===hX.ESCAPE&&g?.current&&(p.preventDefault(),g.current.focus())};return m.addEventListener("keydown",h),()=>{m.removeEventListener("keydown",h)}}},[s,f,e])}function Cg({children:e,focusOnMount:t,focusEditorOnEscape:o=!1,shouldUseKeyboardFocusShortcut:r=!0,__experimentalInitialIndex:n,__experimentalOnIndexChange:i,orientation:s="horizontal",...a}){let c=(0,Kr.useRef)(),u=JCe(c);return e1e({toolbarRef:c,focusOnMount:t,defaultIndex:n,onIndexChange:i,isAccessibleToolbar:u,shouldUseKeyboardFocusShortcut:r,focusEditorOnEscape:o}),u?(0,CV.jsx)(HE.Toolbar,{label:a["aria-label"],ref:c,orientation:s,...a,children:e}):(0,CV.jsx)(HE.NavigableMenu,{orientation:s,role:"toolbar",ref:c,...a,children:e})}var gX=l(F(),1),GE=l($(),1);function WE(){return(0,gX.useSelect)(t=>{let{getBlockEditingMode:o,getBlockName:r,getBlockSelectionStart:n}=t(_),i=n(),s=i&&(0,GE.getBlockType)(r(i));return s&&(0,GE.hasBlockSupport)(s,"__experimentalToolbar",!0)&&o(i)!=="disabled"},[])}var ld=l(A(),1),bX=l(N(),1),kX=l($(),1),vX=l(P(),1),$E=l(F(),1);var Bg=l(w(),1),EV=[],t1e=6,o1e={placement:"bottom-start"};function yX({clientId:e}){let{categories:t,currentPatternName:o,patterns:r}=(0,$E.useSelect)(a=>{let{getBlockAttributes:c,getBlockRootClientId:u,__experimentalGetAllowedPatterns:d}=a(_),f=c(e),m=f?.metadata?.categories||EV,h=u(e),p=m.length>0?d(h):EV;return{categories:m,currentPatternName:f?.metadata?.patternName,patterns:p}},[e]),{replaceBlocks:n}=(0,$E.useDispatch)(_),i=(0,vX.useMemo)(()=>t.length===0||!r||r.length===0?EV: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,t1e),[t,o,r]);if(i.length<2)return null;let s=a=>{let c=(a.blocks??[]).map(u=>(0,kX.cloneBlock)(u));c[0].attributes.metadata={...c[0].attributes.metadata,categories:t},n(e,c)};return(0,Bg.jsx)(ld.Dropdown,{popoverProps:o1e,renderToggle:({onToggle:a,isOpen:c})=>(0,Bg.jsx)(ld.ToolbarGroup,{children:(0,Bg.jsx)(ld.ToolbarButton,{onClick:()=>a(!c),"aria-expanded":c,children:(0,bX.__)("Change design")})}),renderContent:()=>(0,Bg.jsx)(ld.__experimentalDropdownContentWrapper,{className:"block-editor-block-toolbar-change-design-content-wrapper",paddingSize:"none",children:(0,Bg.jsx)(Ca,{blockPatterns:i,onClickPattern:s,showTitlesAsTooltip:!0})})})}var js=l(A(),1),GX=l(N(),1),tT=l(F(),1);var qE=l(F(),1),cd=l($(),1),CX=l(P(),1);var TV=l(KE(),1),_X=l(N(),1);function xX(e,t){for(let o of new TV.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 YE(e)}function Eg(e,t,o){let r=new TV.default(e);return t&&r.remove("is-style-"+t.name),r.add("is-style-"+o.name),r.value}function wX(e){return!e||e.length===0?[]:YE(e)?e:[{name:"default",label:(0,_X._x)("Default","block style"),isDefault:!0},...e]}function YE(e){return e?.find(t=>t.isDefault)}function r1e(e,t){return(0,CX.useMemo)(()=>{let o=t?.example,r=t?.name;if(o&&r)return(0,cd.getBlockFromExample)(r,{attributes:o.attributes,innerBlocks:o.innerBlocks});if(e)return(0,cd.cloneBlock)(e)},[e,t?.example,t?.name])}function Tg({clientId:e,onSwitch:t}){let o=m=>{let{getBlock:h}=m(_),p=h(e);if(!p)return{};let g=(0,cd.getBlockType)(p.name),{getBlockStyles:b}=m(cd.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,qE.useSelect)(o,[e]),{updateBlockAttributes:a}=(0,qE.useDispatch)(_),c=wX(r),u=xX(c,s),d=r1e(n,i);return{onSelect:m=>{let h=Eg(s,u,m);a(e,{className:h}),t()},stylesToRender:c,activeStyle:u,genericPreviewBlock:d,className:s}}var Ag=l($(),1),wS=l(F(),1),eT=l(P(),1);function BX(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 Ro=(e,t,o)=>{let r=Array.isArray(t)?t:t.split("."),n=e;return r.forEach(i=>{n=n?.[i]}),n??o};var TX=l(zv(),1);var n1e="1600px",i1e="320px",s1e=1,a1e=.25,l1e=.75,c1e="14px";function EX({minimumFontSize:e,maximumFontSize:t,fontSize:o,minimumViewportWidth:r=i1e,maximumViewportWidth:n=n1e,scaleFactor:i=s1e,minimumFontSizeLimit:s}){if(s=Ra(s)?s:c1e,o){let y=Ra(o);if(!y?.unit||!y?.value)return null;let S=Ra(s,{coerceTo:y.unit});if(S?.value&&!e&&!t&&y?.value<=S?.value)return null;if(t||(t=`${y.value}${y.unit}`),!e){let x=y.unit==="px"?y.value:y.value*16,C=Math.min(Math.max(1-.075*Math.log2(x),a1e),l1e),B=vS(y.value*C,3);S?.value&&B<S?.value?e=`${S.value}${S.unit}`:e=`${B}${y.unit}`}}let a=Ra(e),c=a?.unit||"rem",u=Ra(t,{coerceTo:c});if(!a||!u)return null;let d=Ra(e,{coerceTo:"rem"}),f=Ra(n,{coerceTo:c}),m=Ra(r,{coerceTo:c});if(!f||!m||!d)return null;let h=f.value-m.value;if(!h)return null;let p=vS(m.value/100,3),g=vS(p,3)+c,b=100*((u.value-a.value)/h),v=vS((b||1)*i,3),k=`${d.value}${d.unit} + ((1vw - ${g}) * ${v})`;return`clamp(${e}, ${k}, ${t})`}function Ra(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:vS(d,3),unit:u}:null}function vS(e,t=3){let o=Math.pow(10,t);return Math.round(e*o)/o}function IV(e){let t=e?.fluid;return t===!0||t&&typeof t=="object"&&Object.keys(t).length>0}function u1e(e){let t=e?.typography??{},o=e?.layout,r=Ra(o?.wideSize)?o?.wideSize:null;return IV(t)&&r?{fluid:{maxViewportWidth:r,...typeof t.fluid=="object"?t.fluid:{}}}:{fluid:t?.fluid}}function ec(e,t){let{size:o}=e;if(!o||o==="0"||e?.fluid===!1||!IV(t?.typography)&&!IV(e))return o;let r=u1e(t)?.fluid??{},n=EX({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 Oa="body",yS=":root",ZE=[{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)=>ec(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 zs(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 IX(e,t){if(!e||!t)return;let o={};return Object.entries(t).forEach(([r,n])=>{typeof n=="string"&&(o[r]=zs(e,n)),typeof n=="object"&&(o[r]={},Object.entries(n).forEach(([i,s])=>{o[r][i]=zs(e,s)}))}),o}function PX(e,t){return e.includes(",")?e.split(",").map(n=>n+t).join(","):e+t}function RX(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 d1e(e,t){if(!e||!t)return e;if(typeof e=="object"&&"ref"in e&&e?.ref){let o=(0,TX.getCSSValueFromRawStyle)(Ro(t,e.ref));return typeof o=="object"&&o!==null&&"ref"in o&&o?.ref?void 0:o===void 0?e:o}return e}function f1e(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 Ig(e,t){if(!e||!t)return e;let o=d1e(e,t);return typeof o=="object"&&o!==null&&"url"in o&&o?.url&&(o.url=f1e(o.url,t?._links?.["wp:theme-file"])),o}function OX(e,t,o=[],r="slug",n){let i=[t?Ro(e,["blocks",t,...o]):void 0,Ro(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"||OX(e,t,o,"slug",d.slug)[r]===d[r]?d:void 0}}}}function m1e(e,t,o,[r,n]=[]){let i=ZE.find(a=>a.cssVarInfix===r);if(!i||!e.settings)return o;let s=OX(e.settings,t,i.path,"slug",n);if(s){let{valueKey:a}=i,c=s[a];return xn(e,t,c)}return o}function p1e(e,t,o,r=[]){let n=(t?Ro(e?.settings??{},["blocks",t,"custom",...r]):void 0)??Ro(e?.settings??{},["custom",...r]);return n?xn(e,t,n):o}function xn(e,t,o){if(!o||typeof o!="string")if(typeof o=="object"&&o!==null&&"ref"in o&&typeof o.ref=="string"){let u=Ro(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"?m1e(e,t,o,c):a==="custom"?p1e(e,t,o,c):o}var Yr=l($(),1),_S=l(zv(),1),jX=l(F(),1);function ei(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 Ro(i,`${c}.root`,null)||Ro(i,c,null)||m;let h=s?Ro(s,`${c}.__experimentalSelector`,null):void 0;return h?zs(u,h):m}let f;return a&&(f=Ro(i,c,null)),f||(r?ei(e,d[0],o):null)}function Rg(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 RV(e){if(!e)return;let t=e.match(/var:preset\|spacing\|(.+)/);return t?`var(--wp--preset--spacing--${t[1]})`:e}function T1e(e){if(!e)return null;let t=typeof e=="string";return{top:t?e:e?.top,left:t?e:e?.left}}function OV(e,t="0"){let o=T1e(e);if(!o)return null;let r=RV(o?.top)||t,n=RV(o?.left)||t;return r===n?r:`${r} ${n}`}var MX={backgroundSize:"cover",backgroundPosition:"50% 50%"};function DX(e){if(!e||!e?.backgroundImage?.url)return;let t;return e?.backgroundSize||(t={backgroundSize:MX.backgroundSize}),e?.backgroundSize==="contain"&&!e?.backgroundPosition&&(t={backgroundPosition:MX.backgroundPosition}),t}var VX={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 I1e={button:"wp-element-button",caption:"wp-element-caption"},P1e={__experimentalBorder:"border",color:"color",dimensions:"dimensions",spacing:"spacing",typography:"typography"};function R1e(e="*",t={}){return ZE.reduce((o,{path:r,cssVarInfix:n,classes:i})=>{if(!i)return o;let s=Ro(t,r,[]);return["default","theme","custom"].forEach(a=>{s[a]&&s[a].forEach(({slug:c})=>{i.forEach(({classSuffix:u,propertyName:d})=>{let f=`.has-${Rg(c)}-${u}`,m=e.split(",").map(p=>`${p}${f}`).join(","),h=`var(--wp--preset--${n}--${Rg(c)})`;o+=`${m}{${d}: ${h} !important;}`})})}),o},"")}function O1e(e,t){let o=e.split(","),r=[];return o.forEach(n=>{r.push(`${t.trim()}${n.trim()}`)}),r.join(", ")}var FX=(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},zX=(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=Og(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=Og(a);o[s]=[...o[s]||[],...c],delete t[r]}}),o};function Og(e={},t="",o,r={},n=!1){let i=Oa===t,s=Object.entries(Yr.__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=Ro(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[v,k]=b;if(!Ro(g,[k],!1))return;let y=v.startsWith("--")?v:Rg(v);c.push(`${y}: ${(0,_S.getCSSValueFromRawStyle)(Ro(g,[k]))}`)});else if(Ro(e,p,!1)){let b=u.startsWith("--")?u:Rg(u);c.push(`${b}: ${(0,_S.getCSSValueFromRawStyle)(Ro(e,p))}`)}return c},[]);return e.background&&(e.background?.backgroundImage&&(e.background.backgroundImage=Ig(e.background.backgroundImage,r)),!i&&e.background?.backgroundImage?.id&&(e={...e,background:{...e.background,...DX(e.background)}})),(0,_S.getCSSRules)(e).forEach(c=>{if(i&&(o||n)&&c.key.startsWith("padding"))return;let u=c.key.startsWith("--")?c.key:Rg(c.key),d=Ig(c.value,r);u==="font-size"&&(d=ec({name:"",slug:"",size:d},r?.settings)),u==="aspect-ratio"&&s.push("min-height: unset"),s.push(`${u}: ${d}`)}),s}function AV({layoutDefinitions:e=VX,style:t,selector:o,hasBlockGapSupport:r,hasFallbackGapSupport:n,fallbackGapValue:i}){let s="",a=r?OV(t?.spacing?.blockGap):"";if(n&&(o===Oa?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===Oa?`:root :where(.${c})${f?.selector||""}`:`:root :where(${o}-${c})${f?.selector||""}`:h=o===Oa?`:where(.${c}${f?.selector||""})`:`:where(${o}.${c}${f?.selector||""})`,s+=`${h} { ${m.join("; ")}; }`}})}),o===Oa&&r&&(s+=`${yS} { --wp--style--block-gap: ${a}; }`)),o===Oa&&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 A1e=["border","color","dimensions","spacing","typography","filter","outline","shadow","background"];function XE(e){if(!e)return{};let r=Object.entries(e).filter(([n])=>A1e.includes(n)).map(([n,i])=>[n,JSON.parse(JSON.stringify(i))]);return Object.fromEntries(r)}var L1e=(e,t)=>{let o=[];if(!e?.styles)return o;let r=XE(e.styles);return r&&o.push({styles:r,selector:Oa,skipSelectorWrapper:!0}),Object.entries(Yr.__EXPERIMENTAL_ELEMENTS).forEach(([n,i])=>{e.styles?.elements?.[n]&&o.push({styles:e.styles?.elements?.[n]??{},selector:i,skipSelectorWrapper:!I1e[n]})}),Object.entries(e.styles?.blocks??{}).forEach(([n,i])=>{let s=XE(i),a=i,c=[];if(a?.variations){let u={};Object.entries(a.variations).forEach(([d,f])=>{let m=f;u[d]=XE(m),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&&Yr.__EXPERIMENTAL_ELEMENTS[p]&&c.push({styles:g,selector:zs(h,Yr.__EXPERIMENTAL_ELEMENTS[p])})}),Object.entries(m?.blocks??{}).forEach(([p,g])=>{let b=typeof t!="string"?zs(h,t[p]?.selector):void 0,v=typeof t!="string"?zs(h,t[p]?.duotoneSelector):void 0,k=typeof t!="string"?IX(h,t[p]?.featureSelectors??{}):void 0,y=XE(g);g?.css&&(y.css=g.css),!(!b||typeof t=="string")&&(c.push({selector:b,duotoneSelector:v,featureSelectors:k,fallbackGapValue:t[p]?.fallbackGapValue,hasLayoutSupport:t[p]?.hasLayoutSupport,styles:y}),Object.entries(g.elements??{}).forEach(([S,x])=>{x&&Yr.__EXPERIMENTAL_ELEMENTS[S]&&c.push({styles:x,selector:zs(b,Yr.__EXPERIMENTAL_ELEMENTS[S])})}))})}),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]&&Yr.__EXPERIMENTAL_ELEMENTS[u]&&o.push({styles:d,selector:t[n]?.selector.split(",").map(f=>Yr.__EXPERIMENTAL_ELEMENTS[u].split(",").map(h=>f+" "+h)).join(",")})}),o.push(...c)}),o},N1e=(e,t)=>{let o=[];if(!e?.settings)return o;let r=s=>{let a={};return ZE.forEach(({path:c})=>{let u=Ro(s,c,!1);u!==!1&&(a=BX(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:yS}),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})}),o};var QE=(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=L1e(e,t),u=N1e(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+=`${yS} {`,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) }
				.has-global-padding { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }
				.has-global-padding > .alignfull { margin-right: calc(var(--wp--style--root--padding-right) * -1); margin-left: calc(var(--wp--style--root--padding-left) * -1); }
				.has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) { padding-right: 0; padding-left: 0; }
				.has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) > .alignfull { margin-left: 0; margin-right: 0;
				`),p+="}"),a.blockStyles&&c.forEach(({selector:g,duotoneSelector:b,styles:v,fallbackGapValue:k,hasLayoutSupport:y,featureSelectors:S,styleVariationSelectors:x,skipSelectorWrapper:C,name:B})=>{if(S){let E=zX(S,v);E=FX(E,e.settings,B),Object.entries(E).forEach(([L,T])=>{if(T.length){let R=T.join(";");p+=`:root :where(${L}){${R};}`}})}if(b){let E={};v?.filter&&(E.filter=v.filter,delete v.filter);let L=Og(E);L.length&&(p+=`${b}{${L.join(";")};}`)}!n&&(Oa===g||y)&&(p+=AV({style:v,selector:g,hasBlockGapSupport:o,hasFallbackGapSupport:r,fallbackGapValue:k}));let I=Og(v,g,d,e,i);if(I?.length){let E=C?g:`:root :where(${g})`;p+=`${E}{${I.join(";")};}`}v?.css&&(p+=xS(v.css,`:root :where(${g})`)),a.variationStyles&&x&&Object.entries(x).forEach(([E,L])=>{let T=v?.variations?.[E];if(T){if(S){let D=zX(S,T);D=FX(D,e.settings,B),Object.entries(D).forEach(([j,G])=>{if(G.length){let z=O1e(j,L),H=G.join(";");p+=`:root :where(${z}){${H};}`}})}let R=Og(T,L,d,e);if(R.length&&(p+=`:root :where(${L}){${R.join(";")};}`),T?.css&&(p+=xS(T.css,`:root :where(${L})`)),y&&T?.spacing?.blockGap){let D=L+g;p+=AV({style:T,selector:D,hasBlockGapSupport:!0,hasFallbackGapSupport:r,fallbackGapValue:k})}}});let O=Object.entries(v).filter(([E])=>E.startsWith(":"));O?.length&&O.forEach(([E,L])=>{let T=Og(L);if(!T?.length)return;let D=`:root :where(${g.split(",").map(j=>j+E).join(",")}){${T.join(";")};}`;p+=D})}),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=OV(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})=>{(Oa===g||yS===g)&&(g="");let v=R1e(g,b);v.length>0&&(p+=v)}),p};var M1e=(e,t)=>{if(e?.selectors&&Object.keys(e.selectors).length>0)return e.selectors;let o={root:t};return Object.entries(P1e).forEach(([r,n])=>{let i=ei(e,r);i&&(o[n]=i)}),o},JE=(e,t)=>{let{getBlockStyles:o}=(0,jX.select)(Yr.store),r={};return e.forEach(n=>{let i=n.name,s=ei(n);if(!s)return;let a=ei(n,"filter.duotone");if(!a){let h=ei(n),p=(0,Yr.getBlockSupport)(n,"color.__experimentalDuotone",!1);a=p&&h&&zs(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=RX(g,s);f[g]=b});let m=M1e(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 xS(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(" ")?zs(t,f):PX(t,f),o+=`:root :where(${m})${d}{${c.trim()}}`}}),o}var CS=l(w(),1),LV="is-style-";function UX(e){return e?e.split(/\s+/).reduce((t,o)=>{if(o.startsWith(LV)){let r=o.slice(LV.length);r!=="default"&&t.push(r)}return t},[]):[]}function NV(e,t=[]){let o=UX(e);if(!o)return null;for(let r of o)if(t.some(n=>n.name===r))return r;return null}function D1e({override:e}){tc(e)}function MV({config:e}){let{getBlockStyles:t,overrides:o}=(0,wS.useSelect)(i=>({getBlockStyles:i(Ag.store).getBlockStyles,overrides:M(i(_)).getStyleOverrides()}),[]),{getBlockName:r}=(0,wS.useSelect)(_),n=(0,eT.useMemo)(()=>{if(!o?.length)return;let i=[],s=[];for(let[,a]of o)if(a?.variation&&a?.clientId&&!s.includes(a.clientId)){let c=r(a.clientId),u=e?.styles?.blocks?.[c]?.variations?.[a.variation];if(u){let d={settings:e?.settings,styles:{blocks:{[c]:{variations:{[`${a.variation}-${a.clientId}`]:u}}}}},f=JE((0,Ag.getBlockTypes)(),a.clientId),b=QE(d,f,!1,!0,!0,!0,{blockGap:!1,blockStyles:!0,layoutStyles:!1,marginReset:!1,presets:!1,rootPadding:!1,variationStyles:!0});i.push({id:`${a.variation}-${a.clientId}`,css:b,__unstableType:"variation",variation:a.variation,clientId:a.clientId}),s.push(a.clientId)}}return i},[e,o,t,r]);return!n||!n.length?null:(0,CS.jsx)(CS.Fragment,{children:n.map(i=>(0,CS.jsx)(D1e,{override:i},i.id))})}function DV(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=yl(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 V1e(e,t,o){let{globalSettings:r,globalStyles:n}=(0,wS.useSelect)(i=>{let s=i(_).getSettings();return{globalSettings:s.__experimentalFeatures,globalStyles:s[Si]}},[]);return(0,eT.useMemo)(()=>{let i=DV({settings:r,styles:n},e,t);return{settings:r,styles:{blocks:{[e]:{variations:{[`${t}-${o}`]:i}}}}}},[r,n,t,o,e])}function F1e({name:e,className:t,clientId:o}){let{getBlockStyles:r}=(0,wS.useSelect)(Ag.store),n=r(e),i=NV(t,n),s=`${LV}${i}-${o}`,{settings:a,styles:c}=V1e(e,i,o),u=(0,eT.useMemo)(()=>{if(!i)return;let d={settings:a,styles:c},f=JE((0,Ag.getBlockTypes)(),o);return QE(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 tc({id:`variation-${o}`,css:u,__unstableType:"variation",variation:i,clientId:o}),i?{className:s}:{}}var HX={hasSupport:()=>!0,attributeKeys:["className"],isMatch:({className:e})=>UX(e).length>0,useBlockProps:F1e};var ud=l(w(),1),z1e=(0,ud.jsxs)(js.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24","aria-hidden":"true",focusable:"false",children:[(0,ud.jsx)(js.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,ud.jsx)(js.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 j1e({clientId:e}){let{stylesToRender:t,activeStyle:o,className:r}=Tg({clientId:e}),{updateBlockAttributes:n}=(0,tT.useDispatch)(_),{globalSettings:i,globalStyles:s,blockName:a}=(0,tT.useSelect)(d=>{let f=d(_).getSettings();return{globalSettings:f.__experimentalFeatures,globalStyles:f[Si],blockName:d(_).getBlockName(e)}},[e]),c=o?.name?DV({settings:i,styles:s},a,o.name)?.color?.background:void 0;return!t||t.length===0?null:(0,ud.jsx)(js.ToolbarGroup,{children:(0,ud.jsx)(js.ToolbarButton,{onClick:()=>{let f=(t.findIndex(p=>p.name===o.name)+1)%t.length,m=t[f],h=Eg(r,o,m);n(e,{className:h})},label:(0,GX.__)("Shuffle styles"),children:(0,ud.jsx)(js.Icon,{icon:z1e,style:{fill:c||"transparent"}})})})}var WX=j1e;var nT=l(A(),1),VV=l(N(),1),$X=l(F(),1),iT=l($(),1);var oT=l(F(),1);function rT(e){let{isSectionBlock:t,isWithinSection:o,isWithinEditedSection:r,isEditingContentOnlySection:n,editedContentOnlySection:i}=(0,oT.useSelect)(u=>{let{isSectionBlock:d,getParentSectionBlock:f,getEditedContentOnlySection:m,isWithinEditedContentOnlySection:h}=M(u(_)),p=m();return{isSectionBlock:d(e),isWithinSection:d(e)||!!f(e),isWithinEditedSection:h(e),isEditingContentOnlySection:p===e,editedContentOnlySection:p}},[e]),s=(0,oT.useDispatch)(_),{editContentOnlySection:a,stopEditingContentOnlySection:c}=M(s);return{isSectionBlock:t,isWithinSection:o,isWithinEditedSection:r,isEditingContentOnlySection:n,editedContentOnlySection:i,editContentOnlySection:a,stopEditingContentOnlySection:c}}var FV=l(w(),1);function KX({clientId:e}){let{isSectionBlock:t,isEditingContentOnlySection:o,editContentOnlySection:r,stopEditingContentOnlySection:n}=rT(e),i=(0,$X.useSelect)(c=>{if(!e)return null;let{getBlockName:u}=c(_),d=u(e);return d?{name:d}:null},[e]);if(!e||!t&&!o||(0,iT.isReusableBlock)(i)||(0,iT.isTemplatePart)(i))return null;let s=o;return(0,FV.jsx)(nT.ToolbarGroup,{children:(0,FV.jsx)(nT.ToolbarButton,{onClick:()=>{s?n():r(e)},children:s?(0,VV.__)("Exit pattern"):(0,VV.__)("Edit pattern")})})}var vQ=l(A(),1),yQ=l(N(),1),SQ=l(F(),1);var IS=l($(),1),_Q=l(Xp(),1);var Aa=l(N(),1),La=l(A(),1),dd=l($(),1),fT=l(F(),1);var tQ=l(N(),1),BS=l(A(),1),lT=l($(),1),cT=l(P(),1);var YX=l(N(),1),qX=l(A(),1),ZX=l(Z(),1);var Om=l(w(),1);function sT({blocks:e}){return(0,ZX.useViewportMatch)("medium","<")?null:(0,Om.jsx)("div",{className:"block-editor-block-switcher__popover-preview-container",children:(0,Om.jsx)(qX.Popover,{className:"block-editor-block-switcher__popover-preview",placement:"right-start",focusOnMount:!1,offset:16,children:(0,Om.jsxs)("div",{className:"block-editor-block-switcher__preview",children:[(0,Om.jsx)("div",{className:"block-editor-block-switcher__preview-title",children:(0,YX.__)("Preview")}),(0,Om.jsx)(kn,{viewportWidth:601,blocks:e})]})})})}var XX=l(A(),1),Lg=l($(),1),QX=l(F(),1),aT=l(P(),1);var oc=l(w(),1),U1e={};function JX({clientIds:e,blocks:t}){let{activeBlockVariation:o,blockVariationTransformations:r}=(0,QX.useSelect)(i=>{let{getBlockAttributes:s,canRemoveBlocks:a}=i(_),{getActiveBlockVariation:c,getBlockVariations:u}=i(Lg.store),d=a(e);if(t.length!==1||!d)return U1e;let[f]=t;return{blockVariationTransformations:u(f.name,"transform"),activeBlockVariation:c(f.name,s(f.clientId))}},[e,t]);return(0,aT.useMemo)(()=>r?.filter(({name:i})=>i!==o?.name),[r,o])}var H1e=({transformations:e,onSelect:t,blocks:o})=>{let[r,n]=(0,aT.useState)();return(0,oc.jsxs)(oc.Fragment,{children:[r&&(0,oc.jsx)(sT,{blocks:(0,Lg.cloneBlock)(o[0],e.find(({name:i})=>i===r).attributes)}),e?.map(i=>(0,oc.jsx)(G1e,{item:i,onSelect:t,setHoveredTransformItemName:n},i.name))]})};function G1e({item:e,onSelect:t,setHoveredTransformItemName:o}){let{name:r,icon:n,title:i}=e;return(0,oc.jsxs)(XX.MenuItem,{className:(0,Lg.getBlockMenuDefaultClassName)(r),onClick:s=>{s.preventDefault(),t(r)},onMouseLeave:()=>o(null),onMouseEnter:()=>o(r),children:[(0,oc.jsx)(Oe,{icon:n,showColors:!0}),i]})}var eQ=H1e;var wn=l(w(),1);function W1e(e){let t={"core/paragraph":1,"core/heading":2,"core/list":3,"core/quote":4},o=(0,cT.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 $1e=({className:e,possibleBlockTransformations:t,possibleBlockVariationTransformations:o,onSelect:r,onSelectVariation:n,blocks:i})=>{let[s,a]=(0,cT.useState)(),{priorityTextTransformations:c,restTransformations:u}=W1e(t),d=c.length&&u.length,f=!!u.length&&(0,wn.jsx)(K1e,{restTransformations:u,onSelect:r,setHoveredTransformItemName:a});return(0,wn.jsxs)(wn.Fragment,{children:[(0,wn.jsxs)(BS.MenuGroup,{label:(0,tQ.__)("Transform to"),className:e,children:[s&&(0,wn.jsx)(sT,{blocks:(0,lT.switchToBlockType)(i,s)}),!!o?.length&&(0,wn.jsx)(eQ,{transformations:o,blocks:i,onSelect:n}),c.map(m=>(0,wn.jsx)(oQ,{item:m,onSelect:r,setHoveredTransformItemName:a},m.name)),!d&&f]}),!!d&&(0,wn.jsx)(BS.MenuGroup,{className:e,children:f})]})};function K1e({restTransformations:e,onSelect:t,setHoveredTransformItemName:o}){return e.map(r=>(0,wn.jsx)(oQ,{item:r,onSelect:t,setHoveredTransformItemName:o},r.name))}function oQ({item:e,onSelect:t,setHoveredTransformItemName:o}){let{name:r,icon:n,title:i,isDisabled:s}=e;return(0,wn.jsxs)(BS.MenuItem,{className:(0,lT.getBlockMenuDefaultClassName)(r),onClick:a=>{a.preventDefault(),t(r)},disabled:s,onMouseLeave:()=>o(null),onMouseEnter:()=>o(r),children:[(0,wn.jsx)(Oe,{icon:n,showColors:!0}),i]})}var rQ=$1e;var iQ=l(N(),1),sQ=l(A(),1);var uT=l(A(),1);var Ng=l(w(),1),Y1e=()=>{};function nQ({clientId:e,onSwitch:t=Y1e}){let{onSelect:o,stylesToRender:r,activeStyle:n}=Tg({clientId:e,onSwitch:t});return!r||r.length===0?null:(0,Ng.jsx)(Ng.Fragment,{children:r.map(i=>{let s=i.label||i.name;return(0,Ng.jsx)(uT.MenuItem,{icon:n.name===i.name?gl:null,onClick:()=>o(i),children:(0,Ng.jsx)(uT.__experimentalText,{as:"span",limit:18,ellipsizeMode:"tail",truncate:!0,children:s})},i.name)})})}var zV=l(w(),1);function aQ({hoveredBlock:e,onSwitch:t}){let{clientId:o}=e;return(0,zV.jsx)(sQ.MenuGroup,{label:(0,iQ.__)("Styles"),className:"block-editor-block-switcher__styles__menugroup",children:(0,zV.jsx)(nQ,{clientId:o,onSwitch:t})})}var UV=l(N(),1),mQ=l(P(),1),dT=l(Z(),1);var Us=l(A(),1);var uQ=l(P(),1),dQ=l($(),1);var lQ=l($(),1),jV=(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=jV(s,t,o);if(a)return a}}},cQ=(e,t)=>{let o=(0,lQ.getBlockAttributesNamesByRole)(e,"content");return o?.length?o.reduce((r,n)=>(t[n]&&(r[n]=t[n]),r),{}):t};var q1e=(e,t)=>{let o=cQ(t.name,t.attributes);e.attributes={...e.attributes,...o}},Z1e=(e,t)=>{let o=t.map(n=>(0,dQ.cloneBlock)(n)),r=new Set;for(let n of e){let i=!1;for(let s of o){let a=jV(s,n.name,r);if(a){i=!0,r.add(a.clientId),q1e(a,n);break}}if(!i)return}return o},X1e=(e,t)=>(0,uQ.useMemo)(()=>e.reduce((o,r)=>{let n=Z1e(t,r.blocks);return n&&o.push({...r,transformedBlocks:n}),o},[]),[e,t]),fQ=X1e;var hr=l(w(),1);function Q1e({blocks:e,patterns:t,onSelect:o}){let[r,n]=(0,mQ.useState)(!1),i=fQ(t,e);return i.length?(0,hr.jsxs)(Us.MenuGroup,{className:"block-editor-block-switcher__pattern__transforms__menugroup",children:[r&&(0,hr.jsx)(J1e,{patterns:i,onSelect:o}),(0,hr.jsx)(Us.MenuItem,{onClick:s=>{s.preventDefault(),n(!r)},icon:Vo,children:(0,UV.__)("Patterns")})]}):null}function J1e({patterns:e,onSelect:t}){let o=(0,dT.useViewportMatch)("medium","<");return(0,hr.jsx)("div",{className:"block-editor-block-switcher__popover-preview-container",children:(0,hr.jsx)(Us.Popover,{className:"block-editor-block-switcher__popover-preview",placement:o?"bottom":"right-start",offset:16,children:(0,hr.jsx)("div",{className:"block-editor-block-switcher__preview is-pattern-list-preview",children:(0,hr.jsx)(eBe,{patterns:e,onSelect:t})})})})}function eBe({patterns:e,onSelect:t}){return(0,hr.jsx)(Us.Composite,{role:"listbox",className:"block-editor-block-switcher__preview-patterns-container","aria-label":(0,UV.__)("Patterns list"),children:e.map(o=>(0,hr.jsx)(pQ,{pattern:o,onSelect:t},o.name))})}function pQ({pattern:e,onSelect:t}){let o="block-editor-block-switcher__preview-patterns-container",r=(0,dT.useInstanceId)(pQ,`${o}-list__item-description`);return(0,hr.jsxs)("div",{className:`${o}-list__list-item`,children:[(0,hr.jsxs)(Us.Composite.Item,{render:(0,hr.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,hr.jsx)(kn,{blocks:e.transformedBlocks,viewportWidth:e.viewportWidth||500}),(0,hr.jsx)("div",{className:`${o}-list__item-title`,children:e.title})]}),!!e.description&&(0,hr.jsx)(Us.VisuallyHidden,{id:r,children:e.description})]})}var hQ=Q1e;var ti=l(w(),1);function tBe({onClose:e,clientIds:t}){let{replaceBlocks:o,multiSelect:r,updateBlockAttributes:n}=(0,fT.useDispatch)(_),{possibleBlockTransformations:i,patterns:s,blocks:a,isUsingBindings:c,canRemove:u,hasBlockStyles:d}=(0,fT.useSelect)(I=>{let{getBlockAttributes:O,getBlocksByClientId:E,getBlockRootClientId:L,getBlockTransformItems:T,__experimentalGetPatternTransformItems:R,canRemoveBlocks:D,getBlockName:j}=I(_),{getBlockStyles:G}=I(dd.store),z=L(t[0]),H=E(t),W=t.length===1,te=W&&j(t[0]),ne=W&&!!G(te)?.length;return{blocks:H,possibleBlockTransformations:T(H,z),patterns:R(H,z),isUsingBindings:t.every(ae=>!!O(ae)?.metadata?.bindings),canRemove:D(t),hasBlockStyles:ne}},[t]),f=JX({clientIds:t,blocks:a});function m(I){I.length>1&&r(I[0].clientId,I[I.length-1].clientId)}function h(I){let O=(0,dd.switchToBlockType)(a,I);o(t,O),m(O)}function p(I){n(a[0].clientId,{...f.find(({name:O})=>O===I).attributes})}function g(I){o(t,I),m(I)}let b=a.length===1,v=b&&((0,dd.isTemplatePart)(a[0])||(0,dd.isReusableBlock)(a[0])),k=!!i?.length&&u&&!v,y=!!f?.length,S=!!s?.length&&u,x=k||y;if(!(d||x||S))return(0,ti.jsx)("p",{className:"block-editor-block-switcher__no-transforms",children:(0,Aa.__)("No transforms.")});let B=b?(0,Aa._x)("This block is connected.","block toolbar button label and description"):(0,Aa._x)("These blocks are connected.","block toolbar button label and description");return(0,ti.jsxs)("div",{className:"block-editor-block-switcher__container",children:[S&&(0,ti.jsx)(hQ,{blocks:a,patterns:s,onSelect:I=>{g(I),e()}}),x&&(0,ti.jsx)(rQ,{className:"block-editor-block-switcher__transforms__menugroup",possibleBlockTransformations:i,possibleBlockVariationTransformations:f,blocks:a,onSelect:I=>{h(I),e()},onSelectVariation:I=>{p(I),e()}}),d&&(0,ti.jsx)(aQ,{hoveredBlock:a[0],onSwitch:e}),c&&(0,ti.jsx)(La.MenuGroup,{children:(0,ti.jsx)(La.__experimentalText,{className:"block-editor-block-switcher__binding-indicator",children:B})})]})}var oBe=({children:e,clientIds:t,label:o,text:r})=>{let i=t.length===1?(0,Aa.__)("Change block type or style"):(0,Aa.sprintf)((0,Aa._n)("Change type of %d block","Change type of %d blocks",t.length),t.length);return(0,ti.jsx)(La.ToolbarGroup,{children:(0,ti.jsx)(La.ToolbarItem,{children:s=>(0,ti.jsx)(La.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,ti.jsx)(tBe,{onClose:a,clientIds:t})})})})},gQ=oBe;var Mg=l(A(),1),ES=l(N(),1),mT=l(P(),1),bQ=l(F(),1);var rc=l(w(),1);function rBe({clientIds:e,blockTitle:t}){let o=(0,bQ.useSelect)(i=>{let{getBlockAttributes:s}=i(_);return s(e?.[0])?.metadata?.name},[e]),r=e.length===1,n;return r&&o?n=(0,ES.sprintf)((0,ES.__)('This %1$s is editable using the "%2$s" override.'),t.toLowerCase(),o):n=(0,ES.__)("These blocks are editable using overrides."),(0,rc.jsx)(Mg.__experimentalText,{children:n})}function kQ({icon:e,clientIds:t,blockTitle:o,label:r}){let[n,i]=(0,mT.useState)(!1),s=(0,mT.useRef)();return(0,rc.jsxs)(rc.Fragment,{children:[(0,rc.jsx)(Mg.ToolbarButton,{ref:s,className:"block-editor-block-toolbar__pattern-overrides-indicator",icon:e,label:r,onClick:()=>i(!n),"aria-expanded":n}),n&&(0,rc.jsx)(Mg.Popover,{anchor:s.current,onClose:()=>i(!1),placement:"bottom-start",offset:16,className:"block-editor-block-toolbar__pattern-overrides-popover",children:(0,rc.jsx)(rBe,{clientIds:t,blockTitle:o})})]})}var TS=l(w(),1);function nBe({select:e,clientIds:t}){let{getBlockName:o,getBlockAttributes:r,getBlockParentsByBlockName:n,canRemoveBlocks:i,getTemplateLock:s,getBlockEditingMode:a,canEditBlock:c}=M(e(_)),{getBlockStyles:u}=e(IS.store),d=t.some(B=>s(B)==="contentOnly"),f=t.length===1,m=f&&o(t[0]),h=f&&!!u(m)?.length,p=t.some(B=>!!r(B)?.metadata?.patternName),g=t.every(B=>Uk(r(B)?.metadata?.bindings)),b=t.every(B=>n(B,"core/block",!0).length>0),v=i(t),k=t.every(B=>c(B)),y=a(t[0])==="default",x=!p&&y&&(h||v)&&!d&&k,C=g&&b;return x?"switcher":C?"pattern-overrides":"default"}function iBe({select:e,clientIds:t}){let{getBlockName:o,getBlockAttributes:r}=M(e(_)),n=t.length===1,i=t[0],s=r(i);if(n&&s?.metadata?.patternName)return Ci;let a=o(i),c=(0,IS.getBlockType)(a);if(n){let{getActiveBlockVariation:f}=e(IS.store);return f(a,s)?.icon||c?.icon}let u=t.map(f=>o(f));return new Set(u).size===1?c?.icon:wf}function xQ({clientIds:e,isSynced:t}){let{icon:o,showIconLabels:r,variant:n}=(0,SQ.useSelect)(f=>({icon:iBe({select:f,clientIds:e}),showIconLabels:f(_Q.store).get("core","showIconLabels"),variant:nBe({select:f,clientIds:e})}),[e]),i=Fr({clientId:e?.[0],maximumLength:35}),s=e.length===1,a=s&&t&&!r,c=s?i:(0,yQ.__)("Multiple blocks selected"),u=a&&i?i:void 0,d=(0,TS.jsx)(Oe,{className:"block-editor-block-toolbar__block-icon",icon:o});return n==="switcher"?(0,TS.jsx)(gQ,{clientIds:e,label:c,text:u,children:d}):n==="pattern-overrides"?(0,TS.jsx)(kQ,{icon:d,clientIds:e,blockTitle:i,label:c}):(0,TS.jsx)(vQ.ToolbarButton,{disabled:!0,className:"block-editor-block-toolbar__block-icon-button",title:c,icon:d,text:u})}var Qe=l(w(),1);function GV({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:v,showLockButtons:k,showBlockVisibilityButton:y,showSwitchSectionStyleButton:S,areSelectedBlocksHiddenOnViewport:x}=(0,CQ.useSelect)(j=>{let{getBlockName:G,getBlockMode:z,getBlockParents:H,getSelectedBlockClientIds:W,isBlockValid:te,getBlockEditingMode:ne,getBlockAttributes:ae,getSettings:X,getTemplateLock:ee,getParentSectionBlock:le,isZoomOut:Q,isSectionBlock:J,isBlockHiddenAtViewport:q}=M(j(_)),U=W(),K=U[0],se=H(K),Se=le(K)??se[se.length-1],he=G(Se),we=(0,nc.getBlockType)(he),De=ne(K),ct=De==="default",Jt=G(K),uo=U.every(Ue=>te(Ue)),Do=U.every(Ue=>z(Ue)==="visual"),ot=U.every(Ue=>!!ae(Ue)?.metadata?.bindings),sr=U.some(Ue=>ee(Ue)==="contentOnly"),ze=Q(),wt=J(K),je=ze||wt,At=X()?.[_i]?.toLowerCase()||"desktop",ar=U.length>0&&U.every(Ue=>q(Ue,At));return{blockClientId:K,blockClientIds:U,isDefaultEditingMode:ct,blockType:K&&(0,nc.getBlockType)(Jt),shouldShowVisualToolbar:uo&&Do,toolbarKey:`${K}${Se}`,showParentSelector:!ze&&we&&De!=="contentOnly"&&ne(Se)!=="disabled"&&(0,nc.hasBlockSupport)(we,"__experimentalParentSelector",!0)&&U.length===1,isUsingBindings:ot,isSectionContainer:wt,hasContentOnlyLocking:sr,showShuffleButton:ze,showSlots:!ze,showGroupButtons:!ze,showLockButtons:!ze,showBlockVisibilityButton:!ze,showSwitchSectionStyleButton:je,areSelectedBlocksHiddenOnViewport:ar}},[]),C=(0,HV.useRef)(null),B=(0,HV.useRef)(),I=bg({ref:B}),O=!(0,BQ.useViewportMatch)("medium","<");if(!WE())return null;let L=s.length>1,T=(0,nc.isReusableBlock)(c)||(0,nc.isTemplatePart)(c),R=V("block-editor-block-contextual-toolbar",{"has-parent":f}),D=V("block-editor-block-toolbar",{"is-synced":T,"is-connected":m});return(0,Qe.jsx)(Cg,{focusEditorOnEscape:!0,className:R,"aria-label":(0,wQ.__)("Block tools"),variant:n==="toolbar"?void 0:n,focusOnMount:t,__experimentalInitialIndex:o,__experimentalOnIndexChange:r,children:(0,Qe.jsxs)("div",{ref:C,className:D,children:[f&&!L&&O&&(0,Qe.jsx)(Xq,{}),(d||L)&&(0,Qe.jsx)("div",{ref:B,...I,children:(0,Qe.jsxs)(EQ.ToolbarGroup,{className:"block-editor-block-toolbar__block-controls",children:[(0,Qe.jsx)(xQ,{clientIds:s,isSynced:T}),a&&y&&(0,Qe.jsx)(_D,{clientIds:s}),!L&&a&&k&&(0,Qe.jsx)(kV,{clientId:i}),(0,Qe.jsx)(pE,{clientIds:s,hideDragHandle:e})]})}),!x&&!p&&d&&L&&v&&(0,Qe.jsx)(mV,{}),!L&&(0,Qe.jsx)(KX,{clientId:s[0]}),!x&&g&&(0,Qe.jsx)(yX,{clientId:s[0]}),!x&&S&&(0,Qe.jsx)(WX,{clientId:s[0]}),!x&&d&&b&&(0,Qe.jsxs)(Qe.Fragment,{children:[!h&&(0,Qe.jsxs)(Qe.Fragment,{children:[(0,Qe.jsx)(Mt.Slot,{group:"parent",className:"block-editor-block-toolbar__slot"}),(0,Qe.jsx)(Mt.Slot,{group:"block",className:"block-editor-block-toolbar__slot"}),(0,Qe.jsx)(Mt.Slot,{className:"block-editor-block-toolbar__slot"}),(0,Qe.jsx)(Mt.Slot,{group:"inline",className:"block-editor-block-toolbar__slot"})]}),(0,Qe.jsx)(Mt.Slot,{group:"other",className:"block-editor-block-toolbar__slot"}),(0,Qe.jsx)(vE.Slot,{})]}),(0,Qe.jsx)(cX,{clientIds:s}),(0,Qe.jsx)(zE,{clientIds:s})]})},u)}function TQ({hideDragHandle:e,variant:t}){return(0,Qe.jsx)(GV,{hideDragHandle:e,variant:t,focusOnMount:void 0,__experimentalInitialIndex:void 0,__experimentalOnIndexChange:void 0})}var WV=l(w(),1);function RQ({clientId:e,isTyping:t,__unstableContentRef:o}){let{capturingClientId:r,isInsertionPointVisible:n,lastClientId:i}=iE(e),s=(0,Dg.useRef)();(0,Dg.useEffect)(()=>{s.current=void 0},[e]);let{stopTyping:a}=(0,IQ.useDispatch)(_),c=(0,Dg.useRef)(!1);(0,PQ.useShortcut)("core/block-editor/focus-toolbar",()=>{c.current=!0,a(!0)}),(0,Dg.useEffect)(()=>{c.current=!1});let u=r||e,d=nE({contentElement:o?.current,clientId:u});return!t&&(0,WV.jsx)(mm,{clientId:u,bottomClientId:i,className:V("block-editor-block-list__block-popover",{"is-insertion-point-visible":n}),resize:!1,...d,__unstableContentRef:o,children:(0,WV.jsx)(GV,{focusOnMount:c.current,__experimentalInitialIndex:s.current,__experimentalOnIndexChange:f=>{s.current=f},variant:"toolbar"})})}var pT=l(F(),1),hT=l(P(),1);var OQ=l(A(),1);var AQ=l(N(),1),LQ=l(w(),1);function sBe({onClick:e}){return(0,LQ.jsx)(OQ.Button,{variant:"primary",icon:wi,size:"compact",className:V("block-editor-button-pattern-inserter__button","block-editor-block-tools__zoom-out-mode-inserter-button"),onClick:e,label:(0,AQ._x)("Add pattern","Generic label for pattern inserter button")})}var NQ=sBe;var $V=l(w(),1);function aBe(){let[e,t]=(0,hT.useState)(!1),{hasSelection:o,blockOrder:r,setInserterIsOpened:n,sectionRootClientId:i,selectedBlockClientId:s,blockInsertionPoint:a,insertionPointVisible:c}=(0,pT.useSelect)(p=>{let{getSettings:g,getBlockOrder:b,getSelectionStart:v,getSelectedBlockClientId:k,getSectionRootClientId:y,getBlockInsertionPoint:S,isBlockInsertionPointVisible:x}=M(p(_)),C=y();return{hasSelection:!!v().clientId,blockOrder:b(C),sectionRootClientId:C,setInserterIsOpened:g().__experimentalSetIsInserterOpened,selectedBlockClientId:k(),blockInsertionPoint:S(),insertionPointVisible:x()}},[]),{showInsertionPoint:u}=M((0,pT.useDispatch)(_));if((0,hT.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,$V.jsx)(OB,{previousClientId:d,nextClientId:h,children:(0,$V.jsx)(NQ,{onClick:()=>{n({rootClientId:i,insertionIndex:m,tab:"patterns",category:"all"}),u(i,m,{operation:"insert"})}})})}var MQ=aBe;var DQ=l(F(),1),VQ=l($(),1);function FQ(){return(0,DQ.useSelect)(e=>{let{getSelectedBlockClientId:t,getFirstMultiSelectedBlockClientId:o,getBlock:r,getBlockMode:n,getSettings:i,isTyping:s,isBlockInterfaceHidden:a}=M(e(_)),c=t()||o(),u=r(c),d=!!c&&!!u,f=d&&(0,VQ.isUnmodifiedDefaultBlock)(u,"content")&&n(c)!=="html",m=c&&!s()&&f,h=!a()&&!i().hasFixedToolbar&&!m&&d&&!f;return{showEmptyBlockSideInserter:m,showBlockToolbarPopover:h}},[])}var Yi=l(w(),1);function lBe(e){let{getSelectedBlockClientId:t,getFirstMultiSelectedBlockClientId:o,getSettings:r,isTyping:n,isDragging:i,isZoomOut:s,getViewportModalClientIds:a}=M(e(_));return{clientId:t()||o(),hasFixedToolbar:r().hasFixedToolbar,isTyping:n(),isZoomOutMode:s(),isDragging:i(),viewportModalClientIds:a()}}function PS({children:e,__unstableContentRef:t,...o}){let{clientId:r,hasFixedToolbar:n,isTyping:i,isZoomOutMode:s,isDragging:a,viewportModalClientIds:c}=(0,Vg.useSelect)(lBe,[]),u=(0,zQ.__unstableUseShortcutEventMatch)(),{getBlocksByClientId:d,getSelectedBlockClientIds:f,getBlockRootClientId:m,getBlockEditingMode:h,getBlockName:p,isGroupable:g,getEditedContentOnlySection:b}=M((0,Vg.useSelect)(_)),{getGroupingBlockName:v}=(0,Vg.useSelect)(Fg.store),{showEmptyBlockSideInserter:k,showBlockToolbarPopover:y}=FQ(),S=vg(),[x,C]=(0,gT.useState)(null),{canRename:B}=Im(p(f()[0])),{duplicateBlocks:I,removeBlocks:O,replaceBlocks:E,insertAfterBlock:L,insertBeforeBlock:T,selectBlock:R,moveBlocksUp:D,moveBlocksDown:j,expandBlock:G,stopEditingContentOnlySection:z,showViewportModal:H,hideViewportModal:W}=M((0,Vg.useDispatch)(_));function te(X){if(!X.defaultPrevented){if(u("core/block-editor/move-up",X)||u("core/block-editor/move-down",X)){let ee=f();if(ee.length){X.preventDefault();let le=m(ee[0]);(u("core/block-editor/move-up",X)?"up":"down")==="up"?D(ee,le):j(ee,le);let J=Array.isArray(ee)?ee.length:1,q=(0,zg.sprintf)((0,zg._n)("%d block moved.","%d blocks moved.",ee.length),J);(0,qV.speak)(q)}}else if(u("core/block-editor/duplicate",X)){let ee=f();ee.length&&(X.preventDefault(),I(ee))}else if(u("core/block-editor/remove",X)){let ee=f();ee.length&&(X.preventDefault(),O(ee))}else if(u("core/block-editor/paste-styles",X)){let ee=f();if(ee.length){X.preventDefault();let le=d(ee);S(le)}}else if(u("core/block-editor/insert-after",X)){let ee=f();ee.length&&(X.preventDefault(),L(ee[ee.length-1]))}else if(u("core/block-editor/insert-before",X)){let ee=f();ee.length&&(X.preventDefault(),T(ee[0]))}else if(u("core/block-editor/unselect",X)){if(X.target.closest("[role=toolbar]"))return;let ee=f();ee.length>1&&(X.preventDefault(),R(ee[0]))}else if(u("core/block-editor/collapse-list-view",X)){if((0,KV.isTextField)(X.target)||(0,KV.isTextField)(X.target?.contentWindow?.document?.activeElement))return;X.preventDefault(),G(r)}else if(u("core/block-editor/group",X)){let ee=f();if(ee.length>1&&g(ee)){X.preventDefault();let le=d(ee),Q=v(),J=(0,Fg.switchToBlockType)(le,Q);E(ee,J),(0,qV.speak)((0,zg.__)("Selected blocks are grouped."))}}else if(u("core/block-editor/rename",X)){let ee=f();if(ee.length===1){let le=h(ee[0])==="contentOnly";B&&!le&&(X.preventDefault(),C(ee[0]))}}else if(u("core/block-editor/toggle-block-visibility",X)){let ee=f();if(ee.length){if(X.preventDefault(),!d(ee).every(J=>(0,Fg.hasBlockSupport)(J.name,"visibility",!0))||ee.some(J=>h(J)!=="default"))return;H(ee)}}u("core/block-editor/stop-editing-as-blocks",X)&&b()&&z()}}let ne=fm(t),ae=fm(t);return(0,Yi.jsxs)("div",{...o,onKeyDown:te,className:V(o.className,{"block-editor-block-tools--is-dragging":a}),children:[(0,Yi.jsxs)(dg.Provider,{value:(0,gT.useRef)(!1),children:[!i&&!s&&(0,Yi.jsx)(kY,{__unstableContentRef:t}),k&&(0,Yi.jsx)(Lq,{__unstableContentRef:t,clientId:r}),y&&(0,Yi.jsx)(RQ,{__unstableContentRef:t,clientId:r,isTyping:i}),!s&&!n&&(0,Yi.jsx)(YV.Popover.Slot,{name:"block-toolbar",ref:ne}),e,(0,Yi.jsx)(YV.Popover.Slot,{name:"__unstable-block-tools-after",ref:ae}),s&&!a&&(0,Yi.jsx)(MQ,{__unstableContentRef:t})]}),x&&(0,Yi.jsx)(Em,{clientId:x,onClose:()=>C(null)}),c&&(0,Yi.jsx)(kD,{clientIds:c,onClose:W})]})}var qi=l(N(),1),Na=l($(),1),ic=l(F(),1),ZV=l(UQ(),1);var cBe=()=>function(){let{replaceBlocks:t,multiSelect:o}=(0,ic.useDispatch)(_),{blocks:r,clientIds:n,canRemove:i,possibleBlockTransformations:s,invalidSelection:a}=(0,ic.useSelect)(h=>{let{getBlockRootClientId:p,getBlockTransformItems:g,getSelectedBlockClientIds:b,getBlocksByClientId:v,canRemoveBlocks:k}=h(_),y=b(),S=v(y);if(S.filter(C=>!C).length>0)return{invalidSelection:!0};let x=p(y[0]);return{blocks:S,clientIds:y,possibleBlockTransformations:g(S,x),canRemove:k(y),invalidSelection:!1}},[]);if(a)return{isLoading:!1,commands:[]};let c=r.length===1&&(0,Na.isTemplatePart)(r[0]);function u(h){h.length>1&&o(h[0].clientId,h[h.length-1].clientId)}function d(h){let p=(0,Na.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,v=!b?.src||b?.src==="block-default"?{src:Xk}:b;return{name:"core/block-editor/transform-to-"+p.replace("/","-"),label:(0,qi.sprintf)((0,qi.__)("Transform to %s"),g),icon:v?.src,category:"command",callback:({close:k})=>{d(p),k()}}})}},uBe=()=>function(){let{clientIds:t,isUngroupable:o,isGroupable:r}=(0,ic.useSelect)(R=>{let{getSelectedBlockClientIds:D,isUngroupable:j,isGroupable:G}=R(_);return{clientIds:D(),isUngroupable:j(),isGroupable:G()}},[]),{canInsertBlockType:n,getBlockRootClientId:i,getBlocksByClientId:s,canRemoveBlocks:a,isBlockHiddenAnywhere:c}=M((0,ic.useSelect)(_)),{getBlockEditingMode:u}=(0,ic.useSelect)(_),{getDefaultBlockName:d,getGroupingBlockName:f}=(0,ic.useSelect)(Na.store),m=s(t),h=(0,ic.useDispatch)(_),{removeBlocks:p,replaceBlocks:g,duplicateBlocks:b,insertAfterBlock:v,insertBeforeBlock:k}=h,y=()=>{if(!m.length)return;let R=f(),D=(0,Na.switchToBlockType)(m,R);D&&g(t,D)},S=()=>{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:x}=M(h),C=i(t[0]),B=n(d(),C),I=m.every(R=>!!R&&(0,Na.hasBlockSupport)(R.name,"multiple",!0)&&n(R.name,C)),O=a(t),E=[];I&&E.push({name:"duplicate",label:(0,qi.__)("Duplicate"),callback:()=>b(t,!0),icon:wf}),B&&E.push({name:"add-before",label:(0,qi.__)("Add before"),callback:()=>{let R=Array.isArray(t)?t[0]:R;k(R)},icon:wi},{name:"add-after",label:(0,qi.__)("Add after"),callback:()=>{let R=Array.isArray(t)?t[t.length-1]:R;v(R)},icon:wi}),r&&E.push({name:"Group",label:(0,qi.__)("Group"),callback:y,icon:ov}),o&&E.push({name:"ungroup",label:(0,qi.__)("Ungroup"),callback:S,icon:CN}),O&&E.push({name:"remove",label:(0,qi.__)("Delete"),callback:()=>p(t,!0),icon:xN});let L=m.every(R=>!!R&&(0,Na.hasBlockSupport)(R.name,"visibility",!0)),T=t.every(R=>u(R)==="default");if(L&&T){let R=t.some(D=>c(D));E.push({name:"toggle-visibility",label:R?(0,qi.__)("Show"):(0,qi.__)("Hide"),callback:()=>x(t),icon:R?Of:vs})}return{isLoading:!1,commands:E.map(R=>({...R,name:"core/block-editor/action-"+R.name,category:"command",callback:({close:D})=>{R.callback(),D()}}))}},bT=()=>{(0,ZV.useCommandLoader)({name:"core/block-editor/blockTransforms",hook:cBe()}),(0,ZV.useCommandLoader)({name:"core/block-editor/blockQuickActions",hook:uBe(),context:"block-selection-edit"})};var qr=l(w(),1),kT=(0,$Q.createSlotFill)(Symbol("BlockCanvasCover"));function HQ({children:e}){return(0,qr.jsx)("div",{className:"block-canvas-cover",style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",pointerEvents:"none"},children:e})}var dBe={ignoredSelectors:[/\.editor-styles-wrapper/gi]};function XV({shouldIframe:e=!0,height:t="300px",children:o=(0,qr.jsx)(Hh,{}),styles:r,contentRef:n,iframeProps:i}){bT();let s=(0,vT.useViewportMatch)("medium","<"),a=tS(),c=pm(),u=(0,GQ.useRef)(),d=(0,vT.useMergeRefs)([n,c,u]),f=(0,WQ.useSelect)(h=>M(h(_)).getZoomLevel(),[]),m=f!==100&&!s?{scale:f,frameSize:"40px"}:{};return e?(0,qr.jsx)(PS,{__unstableContentRef:u,style:{height:t,display:"flex"},children:(0,qr.jsxs)(Nh,{...i,...m,ref:a,contentRef:d,style:{...i?.style},name:"editor-canvas",children:[(0,qr.jsx)(kT.Slot,{fillProps:{containerRef:u},children:h=>h.map((p,g)=>(0,qr.jsx)(HQ,{children:p},g))}),(0,qr.jsx)(Nl,{styles:r}),o]})}):(0,qr.jsxs)(PS,{__unstableContentRef:u,style:{height:t,display:"flex"},children:[(0,qr.jsx)(kT.Slot,{fillProps:{containerRef:u},children:h=>h.map((p,g)=>(0,qr.jsx)(HQ,{children:p},g))}),(0,qr.jsx)(Nl,{styles:r,scope:":where(.editor-styles-wrapper)",transformOptions:dBe}),(0,qr.jsx)(x1,{ref:d,className:"editor-styles-wrapper",tabIndex:-1,style:{height:"100%",width:"100%",overflow:"auto"},children:o})]})}function fBe({children:e,height:t,styles:o}){return(0,qr.jsx)(XV,{height:t,styles:o,children:e})}var KQ=fBe;var Ma=l(A(),1),YQ=l(N(),1),qQ=l(it(),1),ZQ=l(Re(),1),Zi=l(w(),1),mBe=()=>(0,Zi.jsx)(Ma.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:(0,Zi.jsx)(Ma.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"})}),pBe=({style:e,className:t})=>(0,Zi.jsx)("div",{className:"block-library-colors-selector__icon-container",children:(0,Zi.jsx)("div",{className:`${t} block-library-colors-selector__state-selection`,style:e,children:(0,Zi.jsx)(mBe,{})})}),hBe=({TextColor:e,BackgroundColor:t})=>function({onToggle:r,isOpen:n}){let i=s=>{!n&&s.keyCode===qQ.DOWN&&(s.preventDefault(),r())};return(0,Zi.jsx)(Ma.ToolbarGroup,{children:(0,Zi.jsx)(Ma.ToolbarButton,{className:"components-toolbar__control block-library-colors-selector__toggle",label:(0,YQ.__)("Open Colors Selector"),onClick:r,onKeyDown:i,icon:(0,Zi.jsx)(t,{children:(0,Zi.jsx)(e,{children:(0,Zi.jsx)(pBe,{})})})})})},gBe=({children:e,...t})=>((0,ZQ.default)("wp.blockEditor.BlockColorsStyleSelector",{alternative:"block supports API",since:"6.1",version:"6.3"}),(0,Zi.jsx)(Ma.Dropdown,{popoverProps:{placement:"bottom-start"},className:"block-library-colors-selector",contentClassName:"block-library-colors-selector__popover",renderToggle:hBe(t),renderContent:()=>e})),XQ=gBe;var ree=l(Re(),1),MT=l(A(),1),r3=l(N(),1),nee=l(F(),1),iee=l(P(),1);var Kg=l(Z(),1),LT=l(A(),1),AS=l(F(),1),tee=l(Re(),1),ko=l(P(),1),o3=l(N(),1);var IT=l(A(),1),PT=l(P(),1),RT=l(F(),1);var JQ=l(Z(),1),eJ=l(Zo(),1),tJ=l(F(),1),wT=l(P(),1),jg=l(N(),1);var yT=l(P(),1),ST=(0,yT.createContext)({});ST.displayName="ListViewContext";var fd=()=>(0,yT.useContext)(ST);var _T=l(P(),1),QQ=l(w(),1);function xT({children:e,...t}){let o=(0,_T.useRef)();return(0,_T.useEffect)(()=>{o.current&&(o.current.textContent=o.current.textContent)},[e]),(0,QQ.jsx)("div",{hidden:!0,...t,ref:o,children:e})}var RS=l(w(),1),QV=(0,wT.forwardRef)(({nestingLevel:e,blockCount:t,clientId:o,...r},n)=>{let{insertedBlock:i,setInsertedBlock:s}=fd(),a=(0,JQ.useInstanceId)(QV),{directInsert:c,hideInserter:u}=(0,tJ.useSelect)(p=>{let{getBlockListSettings:g,getTemplateLock:b,isZoomOut:v}=M(p(_)),y=g(o)?.directInsert||!1,S=!!b(o)||v();return{directInsert:y,hideInserter:S}},[o]),d=Fr({clientId:o,context:"list-view"}),f=Fr({clientId:i?.clientId,context:"list-view"});if((0,wT.useEffect)(()=>{f?.length&&(0,eJ.speak)((0,jg.sprintf)((0,jg.__)("%s block inserted"),f),"assertive")},[f]),u)return null;let m=`list-view-appender__${a}`,h=(0,jg.sprintf)((0,jg.__)("Append to %1$s block at position %2$d, Level %3$d"),d,t+1,e);return(0,RS.jsxs)("div",{className:"list-view-appender",children:[(0,RS.jsx)(Ui,{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,RS.jsx)(xT,{id:m,children:h})]})});var hd=l($(),1),Lm=l(A(),1),ET=l(Z(),1);var bo=l(P(),1),Hg=l(F(),1),e3=l(N(),1),TT=l(it(),1),BJ=l(Xy(),1),EJ=l(Is(),1),TJ=l(Zo(),1);var oJ=l(A(),1),rJ=l(Z(),1),nJ=l(P(),1);var iJ=l(w(),1),bBe=_7(oJ.__experimentalTreeGridRow),kBe=(0,nJ.forwardRef)(({isDragged:e,isSelected:t,position:o,level:r,rowCount:n,children:i,className:s,path:a,...c},u)=>{let d=GC({clientId:c["data-block"],enableAnimation:!0,triggerAnimationOnChange:a}),f=(0,rJ.useMergeRefs)([u,d]);return(0,iJ.jsx)(bBe,{ref:f,className:V("block-editor-list-view-leaf",s),level:r,positionInSet:o,setSize:n,isExpanded:void 0,...c,children:i})}),sJ=kBe;var aJ=l(Fe(),1),lJ=l(P(),1);function cJ({isSelected:e,selectedClientIds:t,rowItemRef:o}){let r=t.length===1;(0,lJ.useLayoutEffect)(()=>{if(!e||!r||!o.current)return;let n=(0,aJ.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 kJ=l(P(),1);var md=l(A(),1),hJ=l(P(),1);var BT=l(it(),1),gJ=l(F(),1);var uJ=l(N(),1),JV=l(w(),1);function CT({onClick:e}){return(0,JV.jsx)("span",{className:"block-editor-list-view__expander",onClick:t=>e(t,{forceToggle:!0}),"aria-hidden":"true","data-testid":"list-view-expander",children:(0,JV.jsx)(xe,{icon:(0,uJ.isRTL)()?Qk:tu})})}var dJ=l(P(),1),fJ=l(F(),1);var vBe=3,mJ={"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?mJ[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>=vBe)return t}return t}};function yBe(e,t){let o=mJ[e.name],r=o?o(e):void 0;return r?Array.isArray(r)?t?[]:r:[r]:[]}function pJ({clientId:e,isExpanded:t}){let{block:o}=(0,fJ.useSelect)(n=>({block:n(_).getBlock(e)}),[e]);return(0,dJ.useMemo)(()=>yBe(o,t),[o,t])}var jo=l(w(),1),{Badge:SBe}=M(md.privateApis);function _Be({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=Tt(t),g=Fr({clientId:t,context:"list-view"}),{isLocked:b}=Qn(t),{hasPatternName:v,blockVisibility:k}=(0,gJ.useSelect)(O=>{let{getBlockAttributes:E}=M(O(_)),L=E(t);return{hasPatternName:!!L?.metadata?.patternName,blockVisibility:L?.metadata?.blockVisibility}},[t]),y=b,S=p?.positionType==="sticky",x=pJ({clientId:t,isExpanded:f}),C=hy(k),B=O=>{O.dataTransfer.clearData(),c?.(O)};function I(O){(O.keyCode===BT.ENTER||O.keyCode===BT.SPACE)&&o(O)}return(0,jo.jsxs)("a",{className:V("block-editor-list-view-block-select-button",e),onClick:o,onContextMenu:r,onKeyDown:I,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,jo.jsx)(CT,{onClick:i}),(0,jo.jsx)(Oe,{icon:v?Ci:p?.icon,showColors:!0,context:"list-view"}),(0,jo.jsxs)(md.__experimentalHStack,{alignment:"center",className:"block-editor-list-view-block-select-button__label-wrapper",justify:"flex-start",spacing:1,children:[(0,jo.jsx)("span",{className:"block-editor-list-view-block-select-button__title",children:(0,jo.jsx)(md.__experimentalTruncate,{ellipsizeMode:"auto",children:g})}),p?.anchor&&(0,jo.jsx)("span",{className:"block-editor-list-view-block-select-button__anchor-wrapper",children:(0,jo.jsx)(SBe,{className:"block-editor-list-view-block-select-button__anchor",children:p.anchor})}),S&&(0,jo.jsx)("span",{className:"block-editor-list-view-block-select-button__sticky",children:(0,jo.jsx)(xe,{icon:IL})}),x.length?(0,jo.jsx)("span",{className:"block-editor-list-view-block-select-button__images","aria-hidden":!0,children:x.map((O,E)=>(0,jo.jsx)("span",{className:"block-editor-list-view-block-select-button__image",style:{backgroundImage:`url(${O.url})`,zIndex:x.length-E}},O.clientId))}):null,!!C&&(0,jo.jsx)(md.Tooltip,{text:C,children:(0,jo.jsx)("span",{className:"block-editor-list-view-block-select-button__block-visibility","aria-hidden":"true",children:(0,jo.jsx)(xe,{icon:vs})})}),y&&(0,jo.jsx)("span",{className:"block-editor-list-view-block-select-button__lock",children:(0,jo.jsx)(xe,{icon:SL})})]})]})}var bJ=(0,hJ.forwardRef)(_Be);var pd=l(w(),1),xBe=(0,kJ.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}=fd(),g=c.includes(f)?c:[f];return(0,pd.jsxs)(pd.Fragment,{children:[m&&(0,pd.jsx)(m,{block:o,insertedBlock:h,setInsertedBlock:p}),(0,pd.jsx)(lE,{appendToOwnerDocument:!0,clientIds:g,cloneClassname:"block-editor-list-view-draggable-chip",children:({draggable:b,onDragStart:v,onDragEnd:k})=>(0,pd.jsx)(bJ,{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:v,onDragEnd:k,isExpanded:a,...u})})]})}),vJ=xBe;var Am=l(N(),1),yJ=l(Fe(),1),SJ=(e,t,o)=>(0,Am.sprintf)((0,Am.__)("Block %1$d of %2$d, Level %3$d."),e,t,o),_J=(e,t)=>[e?.positionLabel?`${(0,Am.sprintf)((0,Am.__)("Position: %s"),e.positionLabel)}.`:void 0,t?(0,Am.__)("This block is locked."):void 0].filter(Boolean).join(" "),xJ=(e,t)=>Array.isArray(t)&&t.length?t.indexOf(e)!==-1:t===e;function wJ(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 Ug(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&&yJ.focus.focusable.find(r)?.[0]?.focus()})}function CJ({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 Jo=l(w(),1);function IJ({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 v=(0,bo.useRef)(null),k=(0,bo.useRef)(null),y=(0,bo.useRef)(null),[S,x]=(0,bo.useState)(!1),[C,B]=(0,bo.useState)(),[I,O]=(0,bo.useState)(!1),{isLocked:E}=Qn(e),L=i&&g[0]===e,T=i&&g[g.length-1]===e,{toggleBlockHighlight:R,duplicateBlocks:D,multiSelect:j,replaceBlocks:G,removeBlocks:z,insertAfterBlock:H,insertBeforeBlock:W,showViewportModal:te}=M((0,Hg.useDispatch)(_)),ne=(0,ET.useDebounce)(R,50),{canInsertBlockType:ae,getSelectedBlockClientIds:X,getPreviousBlockClientId:ee,getBlockRootClientId:le,getBlockOrder:Q,getBlockParents:J,getBlockEditingMode:q,getBlocksByClientId:U,canEditBlock:K,canMoveBlock:se,canRemoveBlocks:ce,isGroupable:Se}=(0,Hg.useSelect)(_),{getGroupingBlockName:he}=(0,Hg.useSelect)(hd.store),we=Tt(e),De=vg(),{block:ct,blockName:Jt,allowRightClickOverrides:uo}=(0,Hg.useSelect)(ue=>{let{getBlock:to,getBlockName:ve,getSettings:Lt}=M(ue(_));return{block:to(e),blockName:ve(e),allowRightClickOverrides:Lt().allowRightClickOverrides}},[e]),{canRename:Do}=Im(Jt),ot=(0,hd.hasBlockSupport)(Jt,"__experimentalToolbar",!0),ze=`list-view-block-select-button__description-${(0,ET.useInstanceId)(IJ)}`,{expand:wt,collapse:je,collapseAll:At,BlockSettingsMenu:ar,listViewInstanceId:Ue,expandedState:Lr,setInsertedBlock:ki,treeGridElementRef:eo,rootClientId:Bo}=fd(),Xe=(0,EJ.__unstableUseShortcutEventMatch)();function Ve(){let ue=X(),to=ue.includes(e),ve=to?ue[0]:e,Lt=le(ve);return{blocksToUpdate:to?ue:[e],firstBlockClientId:ve,firstBlockRootClientId:Lt,selectedBlockClientIds:ue}}async function bt(ue){if(ue.defaultPrevented||ue.target.closest("[role=dialog]"))return;let to=[TT.BACKSPACE,TT.DELETE].includes(ue.keyCode);if(Xe("core/block-editor/unselect",ue)&&g.length>0)ue.stopPropagation(),ue.preventDefault(),a(ue,void 0);else if(to||Xe("core/block-editor/remove",ue)){let{blocksToUpdate:ve,firstBlockClientId:Lt,firstBlockRootClientId:ln,selectedBlockClientIds:Sr}=Ve();if(!ce(ve))return;let Wc=ee(Lt)??ln;z(ve,!1);let iO=Sr.length>0&&X().length===0;Wc||(Wc=Q()[0]),Ct(Wc,iO)}else if(Xe("core/block-editor/paste-styles",ue)){ue.preventDefault();let{blocksToUpdate:ve}=Ve(),Lt=U(ve);De(Lt)}else if(Xe("core/block-editor/duplicate",ue)){ue.preventDefault();let{blocksToUpdate:ve,firstBlockRootClientId:Lt}=Ve();if(U(ve).every(Sr=>!!Sr&&(0,hd.hasBlockSupport)(Sr.name,"multiple",!0)&&ae(Sr.name,Lt))){let Sr=await D(ve,!1);Sr?.length&&Ct(Sr[0],!1)}}else if(Xe("core/block-editor/insert-before",ue)){ue.preventDefault();let{blocksToUpdate:ve}=Ve();await W(ve[0]);let Lt=X();Ct(Lt[0],!1)}else if(Xe("core/block-editor/insert-after",ue)){ue.preventDefault();let{blocksToUpdate:ve}=Ve();await H(ve.at(-1));let Lt=X();Ct(Lt[0],!1)}else if(Xe("core/block-editor/select-all",ue)){ue.preventDefault();let{firstBlockRootClientId:ve,selectedBlockClientIds:Lt}=Ve(),ln=Q(ve);if(!ln.length)return;if((0,BJ.isShallowEqual)(Lt,ln)&&ve&&ve!==Bo){Ct(ve,!0);return}j(ln[0],ln[ln.length-1],null)}else if(Xe("core/block-editor/collapse-list-view",ue)){ue.preventDefault();let{firstBlockClientId:ve}=Ve(),Lt=J(ve,!1);At(),wt(Lt)}else if(Xe("core/block-editor/group",ue)){let{blocksToUpdate:ve}=Ve();if(ve.length>1&&Se(ve)){ue.preventDefault();let Lt=U(ve),ln=he(),Sr=(0,hd.switchToBlockType)(Lt,ln);G(ve,Sr),(0,TJ.speak)((0,e3.__)("Selected blocks are grouped."));let Wc=X();Ct(Wc[0],!1)}}else if(Xe("core/block-editor/toggle-block-visibility",ue)){ue.preventDefault();let{blocksToUpdate:ve}=Ve();if(!U(ve).every(Sr=>(0,hd.hasBlockSupport)(Sr.name,"visibility",!0))||ve.some(Sr=>q(Sr)!=="default"))return;te(ve)}else if(Xe("core/block-editor/rename",ue)){let{blocksToUpdate:ve}=Ve(),Lt=q(ve[0])==="contentOnly";ve.length===1&&Do&&!Lt&&(ue.preventDefault(),O(!0))}}let Eo=(0,bo.useCallback)(()=>{x(!0),ne(e,!0)},[e,x,ne]),lr=(0,bo.useCallback)(()=>{x(!1),ne(e,!1)},[e,x,ne]),ge=(0,bo.useCallback)(ue=>{a(ue,e),ue.preventDefault()},[e,a]),Ct=(0,bo.useCallback)((ue,to)=>{to&&a(void 0,ue,null,null),Ug(ue,eo?.current)},[a,eo]),To=(0,bo.useCallback)(ue=>{ue.preventDefault(),ue.stopPropagation(),p===!0?je(e):p===!1&&wt(e)},[e,wt,je,p]),Ye=(0,bo.useCallback)(ue=>{let{ownerDocument:to}=y?.current||{};!to||!to.hasFocus()||ot&&uo&&(y.current?.click(),B(new window.DOMRect(ue.clientX,ue.clientY,0,0)),ue.preventDefault())},[uo,y,ot]),oe=(0,bo.useCallback)(ue=>{uo&&ue.button===2&&ue.preventDefault()},[uo]),Ae=(0,bo.useMemo)(()=>{let{ownerDocument:ue}=k?.current||{};if(!(!C||!ue))return{ownerDocument:ue,getBoundingClientRect(){return C}}},[C]),ut=(0,bo.useCallback)(()=>{B(void 0)},[B]);if(cJ({isSelected:i,rowItemRef:k,selectedClientIds:g}),!ct)return null;let Gc=SJ(c,f,u),ca=_J(we,E),Ep=hy(ct?.attributes?.metadata?.blockVisibility),Vk=f>0,pf=m&&Vk,an=V("block-editor-list-view-block__mover-cell",{"is-visible":S||i}),Tp=V("block-editor-list-view-block__menu-cell",{"is-visible":S||L}),Ip;pf?Ip=2:ot||(Ip=3);let o0=V({"is-selected":i,"is-first-selected":L,"is-last-selected":T,"is-branch-selected":s,"is-synced-branch":b,"is-dragging":r,"has-single-cell":!ot,"is-synced":we?.isSynced,"is-draggable":se,"is-displacement-normal":t==="normal","is-displacement-up":t==="up","is-displacement-down":t==="down","is-after-dragged-blocks":o,"is-nesting":n}),r0=g.includes(e)?g:[e],Fk=i&&g.length===1;return(0,Jo.jsxs)(sJ,{className:o0,isDragged:r,onKeyDown:bt,onMouseEnter:Eo,onMouseLeave:lr,onFocus:Eo,onBlur:lr,level:u,position:c,rowCount:d,path:h,id:`list-view-${Ue}-block-${e}`,"data-block":e,"data-expanded":K?p:void 0,ref:k,children:[(0,Jo.jsx)(Lm.__experimentalTreeGridCell,{className:"block-editor-list-view-block__contents-cell",colSpan:Ip,ref:v,"aria-selected":!!i,children:({ref:ue,tabIndex:to,onFocus:ve})=>(0,Jo.jsxs)("div",{className:"block-editor-list-view-block__contents-container",children:[(0,Jo.jsx)(vJ,{block:ct,onClick:ge,onContextMenu:Ye,onMouseDown:oe,onToggleExpanded:To,isSelected:i,position:c,siblingBlockCount:f,level:u,ref:ue,tabIndex:Fk?0:to,onFocus:ve,isExpanded:K?p:void 0,selectedClientIds:g,ariaDescribedBy:ze}),(0,Jo.jsx)(xT,{id:ze,children:[Gc,ca,Ep].filter(Boolean).join(" ")})]})}),pf&&(0,Jo.jsx)(Jo.Fragment,{children:(0,Jo.jsxs)(Lm.__experimentalTreeGridCell,{className:an,withoutGridItem:!0,children:[(0,Jo.jsx)(Lm.__experimentalTreeGridItem,{children:({ref:ue,tabIndex:to,onFocus:ve})=>(0,Jo.jsx)(fE,{orientation:"vertical",clientIds:[e],ref:ue,tabIndex:to,onFocus:ve})}),(0,Jo.jsx)(Lm.__experimentalTreeGridItem,{children:({ref:ue,tabIndex:to,onFocus:ve})=>(0,Jo.jsx)(mE,{orientation:"vertical",clientIds:[e],ref:ue,tabIndex:to,onFocus:ve})})]})}),ot&&ar&&(0,Jo.jsx)(Lm.__experimentalTreeGridCell,{className:Tp,"aria-selected":!!i,ref:y,children:({ref:ue,tabIndex:to,onFocus:ve})=>(0,Jo.jsx)(ar,{clientIds:r0,block:ct,icon:ks,label:(0,e3.__)("Options"),popoverProps:{anchor:Ae},toggleProps:{ref:ue,className:"block-editor-list-view-block__menu",tabIndex:to,onClick:ut,onFocus:ve,size:"small"},disableOpenOnArrowDown:!0,expand:wt,expandedState:Lr,setInsertedBlock:ki,__experimentalSelectBlock:Ct})}),I&&(0,Jo.jsx)(Em,{clientId:e,onClose:()=>O(!1)})]})}var PJ=(0,bo.memo)(IJ);var oi=l(w(),1);function RJ(e,t,o,r){return o?.includes(e.clientId)?0:t[e.clientId]??r?1+e.innerBlocks.reduce(wBe(t,o,r),0):1}var wBe=(e,t,o)=>(r,n)=>t?.includes(n.clientId)?r:(e[n.clientId]??o)&&n.innerBlocks.length>0?r+RJ(n,e,t,o):r+1,CBe=()=>{};function OJ(e){let{blocks:t,selectBlock:o=CBe,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=Tt(f),b=h||!!g?.isSynced,v=(0,RT.useSelect)(R=>f?R(_).canEditBlock(f):!0,[f]),{blockDropPosition:k,blockDropTargetIndex:y,firstDraggedBlockIndex:S,blockIndexes:x,expandedState:C,draggedClientIds:B}=fd(),I=(0,PT.useRef)();if(!v)return null;let O=p&&i===1,E=t.filter(Boolean),L=E.length,T=O?L+1:L;return I.current=c,(0,oi.jsxs)(oi.Fragment,{children:[E.map((R,D)=>{let{clientId:j,innerBlocks:G}=R;D>0&&(I.current+=RJ(E[D-1],C,B,d));let z=!!B?.includes(j),{displacement:H,isAfterDraggedBlocks:W,isNesting:te}=CJ({blockIndexes:x,blockDropTargetIndex:y,blockDropPosition:k,clientId:j,firstDraggedBlockIndex:S,isDragged:z}),{itemInView:ne}=u,ae=ne(I.current),X=D+1,ee=s.length>0?`${s}_${X}`:`${X}`,le=!!G?.length,Q=le&&m?C[j]??d:void 0,J=xJ(j,n),q=a||J&&le,U=z||ae||J&&j===n[0]||D===0||D===L-1;return(0,oi.jsxs)(RT.AsyncModeProvider,{value:!J,children:[U&&(0,oi.jsx)(PJ,{block:R,selectBlock:o,isSelected:J,isBranchSelected:q,isDragged:z,level:i,position:X,rowCount:T,siblingBlockCount:L,showBlockMovers:r,path:ee,isExpanded:z?!1:Q,listPosition:I.current,selectedClientIds:n,isSyncedBranch:b,displacement:H,isAfterDraggedBlocks:W,isNesting:te}),!U&&(0,oi.jsx)("tr",{children:(0,oi.jsx)("td",{className:"block-editor-list-view-placeholder"})}),le&&Q&&!z&&(0,oi.jsx)(OJ,{parentId:j,blocks:G,selectBlock:o,showBlockMovers:r,level:i+1,path:ee,listPosition:I.current+1,fixedListWindow:u,isBranchSelected:q,selectedClientIds:n,isExpanded:d,isSyncedBranch:b})]},j)}),O&&(0,oi.jsx)(IT.__experimentalTreeGridRow,{level:i,setSize:T,positionInSet:T,isExpanded:!0,children:(0,oi.jsx)(IT.__experimentalTreeGridCell,{children:R=>(0,oi.jsx)(QV,{clientId:f,nestingLevel:i,blockCount:L,...R})})})]})}var AJ=(0,PT.memo)(OJ);var Gg=l(A(),1),OT=l(Fe(),1),sc=l(P(),1),t3=l(N(),1);var Xi=l(w(),1);function LJ({draggedBlockClientId:e,listViewRef:t,blockDropTarget:o}){let r=Tt(e),n=Fr({clientId:e,context:"list-view"}),{rootClientId:i,clientId:s,dropPosition:a}=o||{},[c,u]=(0,sc.useMemo)(()=>{if(!t.current)return[];let k=i?t.current.querySelector(`[data-block="${i}"]`):void 0,y=s?t.current.querySelector(`[data-block="${s}"]`):void 0;return[k,y]},[t,i,s]),d=u||c,f=(0,t3.isRTL)(),m=(0,sc.useCallback)((k,y)=>{if(!d)return 0;let S=d.offsetWidth,x=(0,OT.getScrollContainer)(d,"horizontal"),C=d.ownerDocument,B=x===C.body||x===C.documentElement;if(x&&!B){let I=x.getBoundingClientRect(),O=(0,t3.isRTL)()?I.right-k.right:k.left-I.left,E=x.clientWidth;if(E<S+O&&(S=E-O),!f&&k.left+y<I.left)return S-=I.left-k.left,S;if(f&&k.right-y>I.right)return S-=k.right-I.right,S}return S-y},[f,d]),h=(0,sc.useMemo)(()=>{if(!d)return{};let k=d.getBoundingClientRect();return{width:m(k,0)}},[m,d]),p=(0,sc.useMemo)(()=>{if(!d)return{};let k=(0,OT.getScrollContainer)(d),y=d.ownerDocument,S=k===y.body||k===y.documentElement;if(k&&!S){let x=k.getBoundingClientRect(),C=d.getBoundingClientRect(),B=f?x.right-C.right:C.left-x.left;if(!f&&x.left>C.left)return{transform:`translateX( ${B}px )`};if(f&&x.right<C.right)return{transform:`translateX( ${B*-1}px )`}}return{}},[f,d]),g=(0,sc.useMemo)(()=>{if(!c)return 1;let k=parseInt(c.getAttribute("aria-level"),10);return k?k+1:1},[c]),b=(0,sc.useMemo)(()=>d?d.classList.contains("is-branch-selected"):!1,[d]),v=(0,sc.useMemo)(()=>{if(!(!d||!(a==="top"||a==="bottom"||a==="inside")))return{contextElement:d,getBoundingClientRect(){let y=d.getBoundingClientRect(),S=y.left,x=0,C=(0,OT.getScrollContainer)(d,"horizontal"),B=d.ownerDocument,I=C===B.body||C===B.documentElement;if(C&&!I){let L=C.getBoundingClientRect(),T=f?C.offsetWidth-C.clientWidth:0;S<L.left+T&&(S=L.left+T)}a==="top"?x=y.top-y.height*2:x=y.top;let O=m(y,0),E=y.height;return new window.DOMRect(S,x,O,E)}}},[d,a,m,f]);return d?(0,Xi.jsx)(Gg.Popover,{animate:!1,anchor:v,focusOnMount:!1,className:"block-editor-list-view-drop-indicator--preview",variant:"unstyled",flip:!1,resize:!0,children:(0,Xi.jsx)("div",{style:h,className:V("block-editor-list-view-drop-indicator__line",{"block-editor-list-view-drop-indicator__line--darker":b}),children:(0,Xi.jsxs)("div",{className:"block-editor-list-view-leaf","aria-level":g,children:[(0,Xi.jsxs)("div",{className:V("block-editor-list-view-block-select-button","block-editor-list-view-block-contents"),style:p,children:[(0,Xi.jsx)(CT,{onClick:()=>{}}),(0,Xi.jsx)(Oe,{icon:r?.icon,showColors:!0,context:"list-view"}),(0,Xi.jsx)(Gg.__experimentalHStack,{alignment:"center",className:"block-editor-list-view-block-select-button__label-wrapper",justify:"flex-start",spacing:1,children:(0,Xi.jsx)("span",{className:"block-editor-list-view-block-select-button__title",children:(0,Xi.jsx)(Gg.__experimentalTruncate,{ellipsizeMode:"auto",children:n})})})]}),(0,Xi.jsx)("div",{className:"block-editor-list-view-block__menu-cell"})]})})}):null}var NJ=l(Zo(),1),Wg=l(N(),1),OS=l(F(),1),MJ=l(P(),1),ri=l(it(),1),DJ=l($(),1);function VJ(){let{clearSelectedBlock:e,multiSelect:t,selectBlock:o}=(0,OS.useDispatch)(_),{getBlockName:r,getBlockParents:n,getBlockSelectionStart:i,getSelectedBlockClientIds:s,hasMultiSelection:a,hasSelectedBlock:c}=(0,OS.useSelect)(_),{getBlockType:u}=(0,OS.useSelect)(DJ.store);return{updateBlockSelection:(0,MJ.useCallback)(async(f,m,h,p)=>{if(!f?.shiftKey&&f?.keyCode!==ri.ESCAPE){o(m,p);return}f.preventDefault();let g=f.type==="keydown"&&f.keyCode===ri.ESCAPE,b=f.type==="keydown"&&(f.keyCode===ri.UP||f.keyCode===ri.DOWN||f.keyCode===ri.HOME||f.keyCode===ri.END);if(!b&&!c()&&!a()){o(m,null);return}let v=s(),k=[...n(m),m];if((g||b&&!v.some(C=>k.includes(C)))&&await e(),!g){let C=i(),B=m;b&&(!c()&&!a()&&(C=m),h&&(B=h));let I=n(C),O=n(B),{start:E,end:L}=wJ(C,B,I,O);await t(E,L,null)}let y=s();if((f.keyCode===ri.HOME||f.keyCode===ri.END)&&y.length>1)return;let S=v.filter(C=>!y.includes(C)),x;if(S.length===1){let C=u(r(S[0]))?.title;C&&(x=(0,Wg.sprintf)((0,Wg.__)("%s deselected."),C))}else S.length>1&&(x=(0,Wg.sprintf)((0,Wg.__)("%s blocks deselected."),S.length));x&&(0,NJ.speak)(x,"assertive")},[e,r,u,n,i,s,a,c,t,o])}}var FJ=l(P(),1);function zJ(e){return(0,FJ.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 jJ=l(F(),1);function UJ({blocks:e,rootClientId:t}){return(0,jJ.useSelect)(o=>{let{getDraggedBlockClientIds:r,getSelectedBlockClientIds:n,getEnabledClientIdsTree:i}=M(o(_));return{selectedClientIds:n(),draggedClientIds:r(),clientIdsTree:e??i(t)}},[e,t])}var HJ=l(P(),1),GJ=l(F(),1);function WJ({collapseAll:e,expand:t}){let{expandedBlock:o,getBlockParents:r}=(0,GJ.useSelect)(n=>{let{getBlockParents:i,getExpandedBlock:s}=M(n(_));return{expandedBlock:s(),getBlockParents:i}},[]);(0,HJ.useEffect)(()=>{if(o){let n=r(o,!1);e(),t(n)}},[e,t,o,r])}var $J=l(F(),1),Nm=l(P(),1),Mm=l(Z(),1),KJ=l(N(),1);var ac=24;function BBe(e,t,o=1,r=!1){let n=r?t.right-o*ac:t.left+o*ac;return r?e.x>n:e.x<n}function EBe(e,t,o=1,r=!1){let n=r?t.right-o*ac:t.left+o*ac,i=r?n-e.x:e.x-n,s=Math.round(i/ac);return Math.abs(s)}function TBe(e,t){let o=[],r=e;for(;r;)o.push({...r}),r=t.find(n=>n.clientId===r.rootClientId);return o}function YJ(e,t){let o=e[t+1];return o&&o.isDraggedBlock?YJ(e,t+1):o}function IBe(e,t,o=1,r=!1){let n=r?t.right-o*ac:t.left+o*ac;return(r?e.x<n-ac:e.x>n+ac)&&e.y<t.bottom}var PBe=["top","bottom"];function RBe(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]=gm(t,h,PBe),b=zB(t,h);if(i===void 0||p<i||b){i=p;let v=e.indexOf(m),k=e[v-1];if(g==="top"&&k&&k.rootClientId===m.rootClientId&&!k.isDraggedBlock?(n=k,r="bottom",s=k.element.getBoundingClientRect(),a=v-1):(n=m,r=g,s=h,a=v),b)break}}if(!n)return;let c=TBe(n,e),u=r==="bottom";if(u&&n.canInsertDraggedBlocksAsChild&&(n.innerBlockCount>0&&n.isExpanded||IBe(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&&BBe(t,s,c.length,o)){let f=YJ(e,a),m=n.nestingLevel,h=f?f.nestingLevel:1;if(m&&h){let p=EBe(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 v=a;v>=0;v--){let k=e[v];if(k.rootClientId===c[g].rootClientId){b=k.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 OBe={leading:!1,trailing:!0};function qJ({dropZoneElement:e,expandedState:t,setExpandedState:o}){let{getBlockRootClientId:r,getBlockIndex:n,getBlockCount:i,getDraggedBlockClientIds:s,canInsertBlocks:a}=(0,$J.useSelect)(_),[c,u]=(0,Nm.useState)(),{rootClientId:d,blockIndex:f}=c||{},m=FB(d,f),h=(0,KJ.isRTL)(),p=(0,Mm.usePrevious)(d),g=(0,Nm.useCallback)((S,x)=>{let{rootClientId:C}=x||{};C&&x?.dropPosition==="inside"&&!S[C]&&o({type:"expand",clientIds:[C]})},[o]),b=(0,Mm.useThrottle)(g,500,OBe);(0,Nm.useEffect)(()=>{if(c?.dropPosition!=="inside"||p!==c?.rootClientId){b.cancel();return}b(t,c)},[t,p,c,b]);let v=s(),k=(0,Mm.useThrottle)((0,Nm.useCallback)((S,x)=>{let C={x:S.clientX,y:S.clientY},B=!!v?.length,O=Array.from(x.querySelectorAll("[data-block]")).map(L=>{let T=L.dataset.block,R=L.dataset.expanded==="true",D=L.classList.contains("is-dragging"),j=parseInt(L.getAttribute("aria-level"),10),G=r(T);return{clientId:T,isExpanded:R,rootClientId:G,blockIndex:n(T),element:L,nestingLevel:j||void 0,isDraggedBlock:B?D:!1,innerBlockCount:i(T),canInsertDraggedBlocksAsSibling:B?a(v,G):!0,canInsertDraggedBlocksAsChild:B?a(v,T):!0}}),E=RBe(O,C,h);E&&u(E)},[a,v,i,n,r,h]),50);return{ref:(0,Mm.__experimentalUseDropZone)({dropZoneElement:e,onDrop(S){k.cancel(),c&&m(S),u(void 0)},onDragLeave(){k.cancel(),u(null)},onDragOver(S){k(S,S.currentTarget)},onDragEnd(){k.cancel(),u(void 0)}}),target:c}}var AT=l(P(),1),ZJ=l(F(),1);function XJ({firstSelectedBlockClientId:e,setExpandedState:t}){let[o,r]=(0,AT.useState)(null),{selectedBlockParentClientIds:n}=(0,ZJ.useSelect)(i=>{let{getBlockParents:s}=i(_);return{selectedBlockParentClientIds:s(e,!1)}},[e]);return(0,AT.useEffect)(()=>{o!==e&&n?.length&&t({type:"expand",clientIds:n})},[e,n,o,t]),{setSelectedTreeId:r}}var $g=l(F(),1),QJ=l(Z(),1);function JJ({selectBlock:e}){let t=(0,$g.useRegistry)(),{getBlockOrder:o,getBlockRootClientId:r,getBlocksByClientId:n,getPreviousBlockClientId:i,getSelectedBlockClientIds:s,getSettings:a,canInsertBlockType:c,canRemoveBlocks:u}=(0,$g.useSelect)(_),{flashBlock:d,removeBlocks:f,replaceBlocks:m,insertBlocks:h}=(0,$g.useDispatch)(_),p=Rh();return(0,QJ.useRefEffect)(g=>{function b(y,S){S&&e(void 0,y,null,null),Ug(y,g)}function v(y){let S=s(),x=S.includes(y),C=x?S[0]:y,B=r(C);return{blocksToUpdate:x?S:[y],firstBlockClientId:C,firstBlockRootClientId:B,originallySelectedBlockClientIds:S}}function k(y){if(y.defaultPrevented||!g.contains(y.target.ownerDocument.activeElement))return;let x=y.target.ownerDocument.activeElement?.closest("[role=row]")?.dataset?.block;if(!x)return;let{blocksToUpdate:C,firstBlockClientId:B,firstBlockRootClientId:I,originallySelectedBlockClientIds:O}=v(x);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);S1(y,E,t)}if(y.type==="cut"){if(!u(C))return;let E=i(B)??I;f(C,!1);let L=O.length>0&&s().length===0;E||(E=o()[0]),b(E,L)}else if(y.type==="paste"){let{__experimentalCanUserUseUnfilteredHTML:E}=a(),L=fG(y,E);if(C.length===1){let[T]=C;if(L.every(R=>c(R.name,T))){h(L,void 0,T),b(L[0]?.clientId,!1);return}}m(C,L,L.length-1,-1),b(L[0]?.clientId,!1)}}}return g.ownerDocument.addEventListener("copy",k),g.ownerDocument.addEventListener("cut",k),g.ownerDocument.addEventListener("paste",k),()=>{g.ownerDocument.removeEventListener("copy",k),g.ownerDocument.removeEventListener("cut",k),g.ownerDocument.removeEventListener("paste",k)}},[])}var lc=l(w(),1),ABe=(e,t)=>t.type==="clear"?{}:Array.isArray(t.clientIds)?{...e,...t.clientIds.reduce((o,r)=>({...o,[r]:t.type==="expand"}),{})}:e,eee=32;function oee({id:e,blocks:t,dropZoneElement:o,showBlockMovers:r=!1,isExpanded:n=!1,showAppender:i=!1,blockSettingsMenu:s=xV,rootClientId:a,description:c,onSelect:u,additionalBlockContent:d},f){t&&(0,tee.default)("`blocks` property in `wp.blockEditor.__experimentalListView`",{since:"6.3",alternative:"`rootClientId` property"});let m=(0,Kg.useInstanceId)(oee),{clientIdsTree:h,draggedClientIds:p,selectedClientIds:g}=UJ({blocks:t,rootClientId:a}),b=zJ(h),{getBlock:v,getSelectedBlockClientIds:k}=(0,AS.useSelect)(_),{visibleBlockCount:y}=(0,AS.useSelect)(K=>{let{getGlobalBlockCount:se,getClientIdsOfDescendants:ce}=K(_),Se=p?.length>0?ce(p).length+1:0;return{visibleBlockCount:se()-Se}},[p]),{updateBlockSelection:S}=VJ(),[x,C]=(0,ko.useReducer)(ABe,{}),[B,I]=(0,ko.useState)(null),{setSelectedTreeId:O}=XJ({firstSelectedBlockClientId:g[0],setExpandedState:C}),E=(0,ko.useCallback)((K,se,ce)=>{S(K,se,null,ce),O(se),u&&u(v(se))},[O,S,u,v]),{ref:L,target:T}=qJ({dropZoneElement:o,expandedState:x,setExpandedState:C}),R=(0,ko.useRef)(),D=JJ({selectBlock:E}),j=(0,ko.useCallback)(K=>{let[se]=k();se&&K&&Ug(se,K)},[k]),G=(0,Kg.useMergeRefs)([D,j,R,L,f]),z=(0,ko.useCallback)(K=>{if(!K)return;let se=Array.isArray(K)?K:[K];C({type:"expand",clientIds:se})},[C]),H=(0,ko.useCallback)(K=>{K&&C({type:"collapse",clientIds:[K]})},[C]),W=(0,ko.useCallback)(()=>{C({type:"clear"})},[C]),te=(0,ko.useCallback)(K=>{z(K?.dataset?.block)},[z]),ne=(0,ko.useCallback)(K=>{H(K?.dataset?.block)},[H]),ae=(0,ko.useCallback)((K,se,ce)=>{K.shiftKey&&S(K,se?.dataset?.block,ce?.dataset?.block)},[S]);WJ({collapseAll:W,expand:z});let X=p?.[0],{blockDropTargetIndex:ee,blockDropPosition:le,firstDraggedBlockIndex:Q}=(0,ko.useMemo)(()=>{let K,se;if(T?.clientId){let ce=b[T.clientId];K=ce===void 0||T?.dropPosition==="top"?ce:ce+1}else T===null&&(K=null);if(X){let ce=b[X];se=ce===void 0||T?.dropPosition==="top"?ce:ce+1}return{blockDropTargetIndex:K,blockDropPosition:T?.dropPosition,firstDraggedBlockIndex:se}},[T,b,X]),J=(0,ko.useMemo)(()=>({blockDropPosition:le,blockDropTargetIndex:ee,blockIndexes:b,draggedClientIds:p,expandedState:x,expand:z,firstDraggedBlockIndex:Q,collapse:H,collapseAll:W,BlockSettingsMenu:s,listViewInstanceId:m,AdditionalBlockContent:d,insertedBlock:B,setInsertedBlock:I,treeGridElementRef:R,rootClientId:a}),[le,ee,b,p,x,z,Q,H,W,s,m,d,B,I,a]),[q]=(0,Kg.__experimentalUseFixedWindowList)(R,eee,y,{expandedState:x,useWindowing:!0,windowOverscan:40});if(!h.length&&!i)return null;let U=c&&`block-editor-list-view-description-${m}`;return(0,lc.jsxs)(AS.AsyncModeProvider,{value:!0,children:[(0,lc.jsx)(LJ,{draggedBlockClientId:X,listViewRef:R,blockDropTarget:T}),c&&(0,lc.jsx)(LT.VisuallyHidden,{id:U,children:c}),(0,lc.jsx)(LT.__experimentalTreeGrid,{id:e,className:V("block-editor-list-view-tree",{"is-dragging":p?.length>0&&ee!==void 0}),"aria-label":(0,o3.__)("Block navigation structure"),ref:G,onCollapseRow:ne,onExpandRow:te,onFocusRow:ae,applicationAriaLabel:(0,o3.__)("Block navigation structure"),"aria-describedby":U,style:{"--wp-admin--list-view-dragged-items-height":p?.length?`${eee*(p.length-1)}px`:null},children:(0,lc.jsx)(ST.Provider,{value:J,children:(0,lc.jsx)(AJ,{blocks:h,parentId:a,selectBlock:E,showBlockMovers:r,fixedListWindow:q,selectedClientIds:g,isExpanded:n,showAppender:i})})})]})}var LS=(0,ko.forwardRef)(oee),NT=(0,ko.forwardRef)((e,t)=>(0,lc.jsx)(LS,{ref:t,...e,showAppender:!1,rootClientId:null,onSelect:null,additionalBlockContent:null,blockSettingsMenu:void 0}));var gd=l(w(),1);function LBe({isEnabled:e,onToggle:t,isOpen:o,innerRef:r,...n}){return(0,gd.jsx)(MT.Button,{__next40pxDefaultSize:!0,...n,ref:r,icon:nv,"aria-expanded":o,"aria-haspopup":"true",onClick:e?t:void 0,label:(0,r3.__)("List view"),className:"block-editor-block-navigation","aria-disabled":!e})}function NBe({isDisabled:e,...t},o){(0,ree.default)("wp.blockEditor.BlockNavigationDropdown",{since:"6.1",alternative:"wp.components.Dropdown and wp.blockEditor.ListView"});let n=(0,nee.useSelect)(i=>!!i(_).getBlockCount(),[])&&!e;return(0,gd.jsx)(MT.Dropdown,{contentClassName:"block-editor-block-navigation__popover",popoverProps:{placement:"bottom-start"},renderToggle:({isOpen:i,onToggle:s})=>(0,gd.jsx)(LBe,{...t,innerRef:o,isOpen:i,onToggle:s,isEnabled:n}),renderContent:()=>(0,gd.jsxs)("div",{className:"block-editor-block-navigation__container",children:[(0,gd.jsx)("p",{className:"block-editor-block-navigation__label",children:(0,r3.__)("List view")}),(0,gd.jsx)(NT,{})]})})}var see=(0,iee.forwardRef)(NBe);var dee=l(P(),1),DT=l(Z(),1),Da=l(A(),1),n3=l(N(),1);var aee=l(P(),1);var lee=l(w(),1);function cee({genericPreviewBlock:e,style:t,className:o,activeStyle:r}){let n=Eg(o,r,t),i=(0,aee.useMemo)(()=>({name:e.name,title:t.label||t.name,description:t.description,initialAttributes:{...e.attributes,className:n+" block-editor-block-styles__block-preview-container"},example:e}),[e,t,n]);return(0,lee.jsx)(K1,{item:i})}var Hs=l(w(),1),uee=()=>{};function MBe({clientId:e,onSwitch:t=uee,onHoverClassName:o=uee}){let{onSelect:r,stylesToRender:n,activeStyle:i,genericPreviewBlock:s,className:a}=Tg({clientId:e,onSwitch:t}),[c,u]=(0,dee.useState)(null),d=(0,DT.useViewportMatch)("medium","<"),f=Po();if(!n||n.length===0)return null;let m=(0,DT.debounce)(u,250),h=k=>{r(k),o(null),u(null),m.cancel()},p=k=>{if(c===k){m.cancel();return}m(k),o(k?.name??null)},g=YE(n),b=()=>i?.name!==g?.name,v=()=>{h(g)};return(0,Hs.jsx)(Da.__experimentalToolsPanel,{label:(0,n3.__)("Styles"),resetAll:v,panelId:e,hasInnerWrapper:!0,dropdownMenuProps:f,children:(0,Hs.jsx)(Da.__experimentalToolsPanelItem,{hasValue:b,label:(0,n3.__)("Variation"),onDeselect:v,isShownByDefault:!0,panelId:e,children:(0,Hs.jsxs)("div",{className:"block-editor-block-styles",children:[(0,Hs.jsx)("div",{className:"block-editor-block-styles__variants",children:n.map(k=>{let y=k.label||k.name;return(0,Hs.jsx)(Da.Button,{__next40pxDefaultSize:!0,className:V("block-editor-block-styles__item",{"is-active":i.name===k.name}),variant:"secondary",label:y,onMouseEnter:()=>p(k),onFocus:()=>p(k),onMouseLeave:()=>p(null),onBlur:()=>p(null),onClick:()=>h(k),"aria-current":i.name===k.name,children:(0,Hs.jsx)(Da.__experimentalTruncate,{numberOfLines:1,className:"block-editor-block-styles__item-text",children:y})},k.name)})}),c&&!d&&(0,Hs.jsx)(Da.Popover,{placement:"left-start",offset:34,focusOnMount:!1,children:(0,Hs.jsx)("div",{className:"block-editor-block-styles__preview-panel",onMouseLeave:()=>p(null),children:(0,Hs.jsx)(cee,{activeStyle:i,className:a,genericPreviewBlock:s,style:c})})})]})})})}var Yg=MBe;var gee=l(A(),1),qg=l(N(),1);var mee=l(A(),1),pee=l(w(),1),fee={0:BL,1:NA,2:DA,3:FA,4:jA,5:HA,6:WA};function i3({level:e}){return fee[e]?(0,pee.jsx)(mee.Icon,{icon:fee[e]}):null}var VT=l(w(),1),hee=[1,2,3,4,5,6],DBe={className:"block-library-heading-level-dropdown"};function bee({options:e=hee,value:t,onChange:o}){let r=e.filter(n=>n===0||hee.includes(n)).sort((n,i)=>n-i);return(0,VT.jsx)(gee.ToolbarDropdownMenu,{popoverProps:DBe,icon:(0,VT.jsx)(i3,{level:t}),label:(0,qg.__)("Change level"),controls:r.map(n=>{let i=n===t;return{icon:(0,VT.jsx)(i3,{level:n}),title:n===0?(0,qg.__)("Paragraph"):(0,qg.sprintf)((0,qg.__)("Heading %d"),n),isActive:i,onClick(){o(n)},role:"menuitemradio"}})})}var NS=l(N(),1),MS=l(A(),1);var cc=l(w(),1);function VBe({icon:e=pL,label:t=(0,NS.__)("Choose variation"),instructions:o=(0,NS.__)("Select a variation to start with:"),variations:r,onSelect:n,allowSkip:i}){let s=V("block-editor-block-variation-picker",{"has-many-variations":r.length>4});return(0,cc.jsxs)(MS.Placeholder,{icon:e,label:t,instructions:o,className:s,children:[(0,cc.jsx)("ul",{className:"block-editor-block-variation-picker__variations",role:"list","aria-label":(0,NS.__)("Block variations"),children:r.map(a=>(0,cc.jsxs)("li",{children:[(0,cc.jsx)(MS.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,cc.jsx)("span",{className:"block-editor-block-variation-picker__variation-label",children:a.title})]},a.name))}),i&&(0,cc.jsx)("div",{className:"block-editor-block-variation-picker__skip",children:(0,cc.jsx)(MS.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:()=>n(),children:(0,NS.__)("Skip")})})]})}var kee=VBe;var _ee=l(F(),1),xee=l($(),1),Xg=l(A(),1),s3=l(P(),1),a3=l(Z(),1),wee=l(N(),1);var uc=l(N(),1),Zg=l(A(),1);var bd={carousel:"carousel",grid:"grid"};var ni=l(w(),1),FBe=({onBlockPatternSelect:e})=>(0,ni.jsx)("div",{className:"block-editor-block-pattern-setup__actions",children:(0,ni.jsx)(Zg.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:e,children:(0,uc.__)("Choose")})}),zBe=({handlePrevious:e,handleNext:t,activeSlide:o,totalSlides:r})=>(0,ni.jsxs)("div",{className:"block-editor-block-pattern-setup__navigation",children:[(0,ni.jsx)(Zg.Button,{size:"compact",icon:(0,uc.isRTL)()?Vo:Nr,label:(0,uc.__)("Previous pattern"),onClick:e,disabled:o===0,accessibleWhenDisabled:!0}),(0,ni.jsx)(Zg.Button,{size:"compact",icon:(0,uc.isRTL)()?Nr:Vo,label:(0,uc.__)("Next pattern"),onClick:t,disabled:o===r-1,accessibleWhenDisabled:!0})]}),jBe=({viewMode:e,setViewMode:t,handlePrevious:o,handleNext:r,activeSlide:n,totalSlides:i,onBlockPatternSelect:s})=>{let a=e===bd.carousel,c=(0,ni.jsxs)("div",{className:"block-editor-block-pattern-setup__display-controls",children:[(0,ni.jsx)(Zg.Button,{size:"compact",icon:yv,label:(0,uc.__)("Carousel view"),onClick:()=>t(bd.carousel),isPressed:a}),(0,ni.jsx)(Zg.Button,{size:"compact",icon:tv,label:(0,uc.__)("Grid view"),onClick:()=>t(bd.grid),isPressed:e===bd.grid})]});return(0,ni.jsxs)("div",{className:"block-editor-block-pattern-setup__toolbar",children:[a&&(0,ni.jsx)(zBe,{handlePrevious:o,handleNext:r,activeSlide:n,totalSlides:i}),c,a&&(0,ni.jsx)(FBe,{onBlockPatternSelect:s})]})},vee=jBe;var yee=l(F(),1);function UBe(e,t,o){return(0,yee.useSelect)(r=>{let{getBlockRootClientId:n,getPatternsByBlockTypes:i,__experimentalGetAllowedPatterns:s}=r(_),a=n(e);return o?s(a).filter(o):i(t,a)},[e,t,o])}var See=UBe;var zt=l(w(),1),HBe=({viewMode:e,activeSlide:t,patterns:o,onBlockPatternSelect:r,showTitles:n})=>{let i="block-editor-block-pattern-setup__container";if(e===bd.carousel){let s=new Map([[t,"active-slide"],[t-1,"previous-slide"],[t+1,"next-slide"]]);return(0,zt.jsx)("div",{className:"block-editor-block-pattern-setup__carousel",children:(0,zt.jsx)("div",{className:i,children:(0,zt.jsx)("div",{className:"carousel-container",children:o.map((a,c)=>(0,zt.jsx)(Bee,{active:c===t,className:s.get(c)||"",pattern:a},a.name))})})})}return(0,zt.jsx)("div",{className:"block-editor-block-pattern-setup__grid",children:(0,zt.jsx)(Xg.Composite,{role:"listbox",className:i,"aria-label":(0,wee.__)("Patterns list"),children:o.map(s=>(0,zt.jsx)(Cee,{pattern:s,onSelect:r,showTitles:n},s.name))})})};function Cee({pattern:e,onSelect:t,showTitles:o}){let r="block-editor-block-pattern-setup-list",{blocks:n,description:i,viewportWidth:s=700}=e,a=(0,a3.useInstanceId)(Cee,`${r}__item-description`);return(0,zt.jsx)("div",{className:`${r}__list-item`,children:(0,zt.jsxs)(Xg.Composite.Item,{render:(0,zt.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,zt.jsx)(kn,{blocks:n,viewportWidth:s}),o&&(0,zt.jsx)("div",{className:`${r}__item-title`,children:e.title}),!!i&&(0,zt.jsx)(Xg.VisuallyHidden,{id:a,children:i})]})})}function Bee({active:e,className:t,pattern:o,minHeight:r}){let{blocks:n,title:i,description:s}=o,a=(0,a3.useInstanceId)(Bee,"block-editor-block-pattern-setup-list__item-description");return(0,zt.jsxs)("div",{"aria-hidden":!e,role:"img",className:`pattern-slide ${t}`,"aria-label":i,"aria-describedby":s?a:void 0,children:[(0,zt.jsx)(kn,{blocks:n,minHeight:r}),!!s&&(0,zt.jsx)(Xg.VisuallyHidden,{id:a,children:s})]})}var GBe=({clientId:e,blockName:t,filterPatternsFn:o,onBlockPatternSelect:r,initialViewMode:n=bd.carousel,showTitles:i=!1})=>{let[s,a]=(0,s3.useState)(n),[c,u]=(0,s3.useState)(0),{replaceBlock:d}=(0,_ee.useDispatch)(_),f=See(e,t,o);if(!f?.length)return null;let h=r||(p=>{let g=p.map(b=>(0,xee.cloneBlock)(b));d(e,g)});return(0,zt.jsx)(zt.Fragment,{children:(0,zt.jsxs)("div",{className:`block-editor-block-pattern-setup view-mode-${s}`,children:[(0,zt.jsx)(HBe,{viewMode:s,activeSlide:c,patterns:f,onBlockPatternSelect:h,showTitles:i}),(0,zt.jsx)(vee,{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)}})]})})},Eee=GBe;var l3=l($(),1),dc=l(N(),1),Gs=l(A(),1),FT=l(F(),1),Tee=l(P(),1);var Oo=l(w(),1),{Menu:Dm}=M(Gs.privateApis);function WBe({className:e,onSelectVariation:t,selectedValue:o,variations:r}){return(0,Oo.jsxs)("fieldset",{className:e,children:[(0,Oo.jsx)(Gs.VisuallyHidden,{as:"legend",children:(0,dc.__)("Transform to variation")}),r.map(n=>(0,Oo.jsx)(Gs.Button,{__next40pxDefaultSize:!0,size:"compact",icon:(0,Oo.jsx)(Oe,{icon:n.icon,showColors:!0}),isPressed:o===n.name,label:o===n.name?n.title:(0,dc.sprintf)((0,dc.__)("Transform to %s"),n.title),onClick:()=>t(n.name),"aria-label":n.title,showTooltip:!0},n.name))]})}function $Be({className:e,onSelectVariation:t,selectedValue:o,variations:r}){return(0,Oo.jsx)("div",{className:e,children:(0,Oo.jsxs)(Dm,{children:[(0,Oo.jsx)(Dm.TriggerButton,{render:(0,Oo.jsx)(Gs.Button,{className:"block-editor-block-variation-transforms__button",__next40pxDefaultSize:!0,variant:"secondary",children:(0,dc.__)("Transform to variation")})}),(0,Oo.jsx)(Dm.Popover,{position:"bottom",children:(0,Oo.jsx)(Dm.Group,{children:r.map(n=>(0,Oo.jsxs)(Dm.RadioItem,{value:n.name,checked:o===n.name,onChange:()=>t(n.name),children:[(0,Oo.jsx)(Dm.ItemLabel,{children:n.title}),n.description&&(0,Oo.jsx)(Dm.ItemHelpText,{children:n.description})]},n.name))})})]})})}function KBe({className:e,onSelectVariation:t,selectedValue:o,variations:r}){return(0,Oo.jsx)("div",{className:e,children:(0,Oo.jsx)(Gs.__experimentalToggleGroupControl,{label:(0,dc.__)("Transform to variation"),value:o,hideLabelFromVision:!0,onChange:t,__next40pxDefaultSize:!0,children:r.map(n=>(0,Oo.jsx)(Gs.__experimentalToggleGroupControlOptionIcon,{icon:(0,Oo.jsx)(Oe,{icon:n.icon,showColors:!0}),value:n.name,label:o===n.name?n.title:(0,dc.sprintf)((0,dc.__)("Transform to %s"),n.title)},n.name))})})}function YBe({blockClientId:e}){let{updateBlockAttributes:t}=(0,FT.useDispatch)(_),{activeBlockVariation:o,variations:r,isContentOnly:n,isSection:i}=(0,FT.useSelect)(h=>{let{getActiveBlockVariation:p,getBlockVariations:g}=h(l3.store),{getBlockName:b,getBlockAttributes:v,getBlockEditingMode:k,isSectionBlock:y}=M(h(_)),S=e&&b(e),{hasContentRoleAttribute:x}=M(h(l3.store)),C=x(S);return{activeBlockVariation:p(S,v(e),"transform"),variations:S&&g(S,"transform"),isContentOnly:k(e)==="contentOnly"&&!C,isSection:y(e)}},[e]),s=o?.name,a=(0,Tee.useMemo)(()=>{let h=new Set;return r?(r.forEach(p=>{p.icon&&h.add(p.icon?.src||p.icon)}),h.size===r.length):!1},[r]),c=h=>{t(e,{...r.find(({name:p})=>p===h).attributes})};if(!r?.length||n||i)return null;let u="block-editor-block-variation-transforms",f=r.length>6?WBe:KBe;return(0,Oo.jsx)(a?f:$Be,{className:u,onSelectVariation:c,selectedValue:s,variations:r})}var zT=YBe;var Vm=l(N(),1),jT=l(A(),1);var Iee=l(w(),1),c3={top:{icon:dL,title:(0,Vm._x)("Align top","Block vertical alignment setting")},center:{icon:eL,title:(0,Vm._x)("Align middle","Block vertical alignment setting")},bottom:{icon:QA,title:(0,Vm._x)("Align bottom","Block vertical alignment setting")},stretch:{icon:lL,title:(0,Vm._x)("Stretch to fill","Block vertical alignment setting")},"space-between":{icon:iL,title:(0,Vm._x)("Space between","Block vertical alignment setting")}},qBe=["top","center","bottom"],ZBe="top";function XBe({value:e,onChange:t,controls:o=qBe,isCollapsed:r=!0,isToolbar:n}){function i(d){return()=>t(e===d?void 0:d)}let s=c3[e],a=c3[ZBe],c=n?jT.ToolbarGroup:jT.ToolbarDropdownMenu,u=n?{isCollapsed:r}:{};return(0,Iee.jsx)(c,{icon:s?s.icon:a.icon,label:(0,Vm._x)("Change vertical alignment","Block vertical alignment setting label"),controls:o.map(d=>({...c3[d],isActive:e===d,role:r?"menuitemradio":void 0,onClick:i(d)})),...u})}var u3=XBe;var d3=l(w(),1),eC=e=>(0,d3.jsx)(u3,{...e,isToolbar:!1}),Pee=e=>(0,d3.jsx)(u3,{...e,isToolbar:!0});var Cn=l(A(),1),DS=l(P(),1),GT=l(N(),1);var Ree=l(A(),1);var f3=l(N(),1),Oee=l(w(),1);function Aee({isLinked:e,...t}){let o=e?(0,f3.__)("Unlink radii"):(0,f3.__)("Link radii");return(0,Oee.jsx)(Ree.Button,{...t,className:"components-border-radius-control__linked-button",size:"small",icon:e?dn:xi,iconSize:24,label:o})}var Lee=l(A(),1);function QBe(e){return[...e].sort((o,r)=>e.filter(n=>n===r).length-e.filter(n=>n===o).length).shift()}function Nee(e={}){if(typeof e=="string")return e;let t=Object.values(e).map(a=>{let c=(0,Lee.__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=QBe(r);return n===0||n?`${n}${i||""}`:void 0}function Mee(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 Dee(e){return e?typeof e=="string"?!0:!!Object.values(e).filter(o=>!!o||o===0).length:!1}var Qi=l(A(),1),Hee=l(Z(),1),vd=l(N(),1);var Fm=l(P(),1);var m3=24,Vee=8,UT={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 kd=(e,t)=>e?.includes?e==="0"||e.includes(`var:preset|${t}|`):!1;function Fee(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 zee(e,t,o){if(e===void 0)return 0;let r=parseFloat(e,10)===0?"0":Fee(e,o),n=t.findIndex(i=>String(i.slug)===r);return n!==-1?n:NaN}function p3(e,t,o){if(!kd(e,o))return e;let r=parseFloat(e,10)===0?"0":Fee(e,o);return t.find(i=>String(i.slug)===r)?.size}function jee(e,t,o){if(!e||kd(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 Qg=l(A(),1),fc=l(w(),1);function Uee({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:v,setMinValue:k}){let y=(0,fc.jsx)(Qg.__experimentalUnitControl,{className:"preset-input-control__unit-control",disableUnits:a,hideLabelFromVision:!0,label:t,min:r,onChange:h,onUnitChange:g,onBlur:b,onFocus:v,onMouseOut:b,onMouseOver:v,size:"__unstable-large",units:s,value:[n,i].join(""),placeholder:o,onDragStart:()=>{e&&f?.charAt(0)==="-"&&k(0)},onDrag:()=>{e&&f?.charAt(0)==="-"&&k(0)},onDragEnd:()=>{e&&k(m)}});return(0,fc.jsxs)(fc.Fragment,{children:[d?(0,fc.jsx)(Qg.Tooltip,{text:t,placement:"top",children:(0,fc.jsx)("div",{className:"preset-input-control__tooltip-wrapper",children:y})}):y,(0,fc.jsx)(Qg.RangeControl,{className:"preset-input-control__custom-value-range",hideLabelFromVision:!0,initialPosition:0,label:t,max:u,min:0,onBlur:b,onChange:p,onFocus:v,onMouseOut:b,onMouseOver:v,step:c,value:n,withInputField:!1,__next40pxDefaultSize:!0})]})}var yd=l(w(),1);function zm({allowNegativeOnDrag:e=!1,ariaLabel:t,className:o,customValueSettings:r=UT,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:v}){let k=(0,Fm.useMemo)(()=>jee(a,h,p),[a,h,p]),y=o??"preset-input-control",S=h.slice(1,h.length-1).map((q,U)=>({value:U+1,label:void 0})),x=S.length>0,C=h.length<=Vee,B=s?(0,vd.__)("Mixed"):null,[I,O]=(0,Fm.useState)(c),[E,L]=(0,Fm.useState)(!n&&k!==void 0&&!kd(k,p)),T=null,R=(0,Hee.usePrevious)(k);(0,Fm.useEffect)(()=>{k&&R!==k&&!kd(k,p)&&E!==!0&&L(!0)},[k,R,p,E]);let D=!C&&!E&&k!==void 0&&(!kd(k,p)||kd(k,p)&&s),j=h;D?(j=[...h,{name:s?(0,vd.__)("Mixed"):(0,vd.sprintf)((0,vd.__)("Custom (%s)"),k),slug:"custom",size:k}],T=j.length-1):s||(T=E?p3(k,h,p):zee(k,h,p));let G=j.map((q,U)=>({key:U,name:q.name})),z=kd(k,p)?p3(k,h,p):k,[H,W]=(0,Qi.__experimentalParseQuantityAndUnitFromRawValue)(z),te=W||g||"px",ne=v?.find(q=>q.value===te),ae=ne?.step??r[te]?.steps??.1,X=ne?.max??r[te]?.max??10,ee=q=>{let K=!isNaN(parseFloat(q))?q:void 0;K!==void 0&&u(K)},le=q=>{u([q,te].join(""))},Q=q=>k===void 0?void 0:h[q]?.name,J=(q,U)=>{let K=parseInt(q,10);if(U==="selectList"){if(K===0&&h[0]?.slug==="0")return"0";if(K===0)return}else if(K===0)return"0";return`var:preset|${p}|${h[q]?.slug}`};return(0,yd.jsxs)(Qi.__experimentalHStack,{className:`preset-input-control__wrapper ${y}__wrapper`,children:[i&&(0,yd.jsx)(Qi.Icon,{className:"preset-input-control__icon",icon:i,size:m3}),(!x||E)&&(0,yd.jsx)(Uee,{allowNegativeOnDrag:e,ariaLabel:t,allPlaceholder:B,minValue:I,parsedQuantity:H,computedUnit:te,units:v,isMixed:s,step:ae,max:X,showTooltip:b,value:k,minimumCustomValue:c,onCustomValueChange:ee,onCustomValueSliderChange:le,onUnitChange:m,onMouseOut:d,onMouseOver:f,setMinValue:O}),x&&C&&!E&&(0,yd.jsx)(Qi.RangeControl,{"aria-valuenow":T,"aria-valuetext":h[T]?.name,className:"preset-input-control__preset-range",hideLabelFromVision:!0,initialPosition:0,label:t,max:h.length-1,marks:S,min:0,onBlur:d,onChange:q=>u(J(q)),onFocus:f,onMouseDown:q=>{q?.nativeEvent?.offsetX<35&&k===void 0&&u("0")},onMouseOut:d,onMouseOver:f,renderTooltipContent:Q,step:1,value:T,withInputField:!1,__next40pxDefaultSize:!0}),x&&!C&&!E&&(0,yd.jsx)(Qi.CustomSelectControl,{className:"preset-input-control__custom-select-control",hideLabelFromVision:!0,label:t,onBlur:d,onChange:q=>{D&&q.selectedItem.key===G.length-1?L(!0):u(J(q.selectedItem.key,"selectList"))},onFocus:f,onMouseOut:d,onMouseOver:f,options:G,size:"__unstable-large",value:G.find(q=>q.key===T)||""}),x&&!n&&(0,yd.jsx)(Qi.Button,{className:"preset-input-control__custom-toggle",icon:XL,iconSize:m3,isPressed:E,label:E?(0,vd.__)("Use preset"):(0,vd.__)("Set custom value"),onClick:()=>{L(!E)},size:"small"})]})}var Jg=l(N(),1);var Gee=8,HT=[],h3={all:(0,Jg.__)("Border radius"),topLeft:(0,Jg.__)("Top left"),topRight:(0,Jg.__)("Top right"),bottomLeft:(0,Jg.__)("Bottom left"),bottomRight:(0,Jg.__)("Bottom right")},g3={all:tA,topLeft:nA,topRight:iA,bottomLeft:oA,bottomRight:rA},b3=0;var mc=l(w(),1);function JBe(e){let t=e?.default??HT,o=e?.custom??HT,r=e?.theme??HT;return(0,DS.useMemo)(()=>{let n=[{name:(0,GT.__)("None"),slug:"0",size:0},...o,...r,...t];return n.length>Gee?[{name:(0,GT.__)("Default"),slug:"default",size:void 0},...n]:n},[o,r,t])}function Wee(e,t){return t==="all"?Nee(e):typeof e=="string"?e:e?.[t]}function $ee(e,t){return t==="all"?e.flat:e[t]}function Kee(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 Yee(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 WT({onChange:e,values:t,presets:o}){let[r,n]=(0,DS.useState)(!Dee(t)||!Mee(t)),i=JBe(o),[s,a]=(0,DS.useState)({flat:typeof t=="string"?(0,Cn.__experimentalParseQuantityAndUnitFromRawValue)(t)[1]:void 0,topLeft:(0,Cn.__experimentalParseQuantityAndUnitFromRawValue)(t?.topLeft)[1],topRight:(0,Cn.__experimentalParseQuantityAndUnitFromRawValue)(t?.topRight)[1],bottomLeft:(0,Cn.__experimentalParseQuantityAndUnitFromRawValue)(t?.bottomLeft)[1],bottomRight:(0,Cn.__experimentalParseQuantityAndUnitFromRawValue)(t?.bottomRight)[1]}),[c]=me("spacing.units"),u=(0,Cn.__experimentalUseCustomUnits)({availableUnits:c||["px","em","rem"]}),d=()=>n(!r);return(0,mc.jsxs)("fieldset",{className:"components-border-radius-control",children:[(0,mc.jsxs)(Cn.__experimentalHStack,{className:"components-border-radius-control__header",children:[(0,mc.jsx)(Cn.BaseControl.VisualLabel,{as:"legend",children:(0,GT.__)("Radius")}),(0,mc.jsx)(Aee,{onClick:d,isLinked:r})]}),r?(0,mc.jsx)(zm,{ariaLabel:h3.all,className:"components-border-radius-control",icon:g3.all,minimumCustomValue:b3,onChange:Kee("all",t,e),onUnitChange:Yee("all",s,a),presets:i,presetType:"border-radius",selectedUnit:$ee(s,"all"),showTooltip:!0,units:u,value:Wee(t,"all")}):(0,mc.jsx)(Cn.__experimentalVStack,{children:["topLeft","topRight","bottomLeft","bottomRight"].map(f=>(0,mc.jsx)(zm,{ariaLabel:h3[f],className:"components-border-radius-control",icon:g3[f],minimumCustomValue:b3,onChange:Kee(f,t,e),onUnitChange:Yee(f,s,a),presets:i,presetType:"border-radius",selectedUnit:$ee(s,f),showTooltip:!0,units:u,value:Wee(t,f)},f))})]})}var Xee=l(A(),1);var qee=l(Z(),1);var Zee=l(w(),1),$T=(0,qee.createHigherOrderComponent)(e=>function(o){let[r,n,i,s,a]=me("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,Zee.jsx)(e,{...o,colors:u,disableCustomColors:d,hasColorsToChoose:f})},"withColorContext");var Qee=$T(Xee.ColorPalette);var k3=l(N(),1),Ws=l(A(),1);var vo=l(w(),1),{Tabs:eb}=M(Ws.privateApis),eEe=["colors","disableCustomColors","gradients","disableCustomGradients"],Va={color:"color",gradient:"gradient"};function Jee({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 v={[Va.color]:(0,vo.jsx)(Ws.ColorPalette,{value:u,onChange:b?y=>{a(y),c()}:a,colors:e,disableCustomColors:o,__experimentalIsRenderedInSidebar:n,clearable:f,enableAlpha:h,headingLevel:p}),[Va.gradient]:(0,vo.jsx)(Ws.GradientPicker,{value:d,onChange:g?y=>{c(y),a()}:c,gradients:t,disableCustomGradients:r,__experimentalIsRenderedInSidebar:n,clearable:f,headingLevel:p})},k=y=>(0,vo.jsx)("div",{className:"block-editor-color-gradient-control__panel",children:v[y]});return(0,vo.jsx)(Ws.BaseControl,{className:V("block-editor-color-gradient-control",i),children:(0,vo.jsx)("fieldset",{className:"block-editor-color-gradient-control__fieldset",children:(0,vo.jsxs)(Ws.__experimentalVStack,{spacing:1,children:[m&&(0,vo.jsx)("legend",{children:(0,vo.jsx)("div",{className:"block-editor-color-gradient-control__color-indicator",children:(0,vo.jsx)(Ws.BaseControl.VisualLabel,{children:s})})}),g&&b&&(0,vo.jsx)("div",{children:(0,vo.jsxs)(eb,{defaultTabId:d?Va.gradient:!!g&&Va.color,children:[(0,vo.jsxs)(eb.TabList,{children:[(0,vo.jsx)(eb.Tab,{tabId:Va.color,children:(0,k3.__)("Color")}),(0,vo.jsx)(eb.Tab,{tabId:Va.gradient,children:(0,k3.__)("Gradient")})]}),(0,vo.jsx)(eb.TabPanel,{tabId:Va.color,className:"block-editor-color-gradient-control__panel",focusable:!1,children:v.color}),(0,vo.jsx)(eb.TabPanel,{tabId:Va.gradient,className:"block-editor-color-gradient-control__panel",focusable:!1,children:v.gradient})]})}),!b&&k(Va.color),!g&&k(Va.gradient)]})})})}function tEe(e){let[t,o,r,n]=me("color.palette","color.gradients","color.custom","color.customGradient");return(0,vo.jsx)(Jee,{colors:t,gradients:o,disableCustomColors:!r,disableCustomGradients:!n,...e})}function oEe(e){return eEe.every(t=>e.hasOwnProperty(t))?(0,vo.jsx)(Jee,{...e}):(0,vo.jsx)(tEe,{...e})}var Sd=oEe;var ete=l(w(),1);function tte({onChange:e,value:t,...o}){return(0,ete.jsx)(Sd,{...o,onColorChange:e,colorValue:t,gradients:[],disableCustomGradients:!0})}var $s=l(N(),1),ote=l(A(),1),rte=l(Zo(),1),v3=l(w(),1);Kc([Yc,Ap]);function rEe({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,$s.__)("text color")},{color:f,description:(0,$s.__)("link color")}],h=Bt(u),p=h.alpha()<1,g=h.brightness(),b={level:"AA",size:i||i!==!1&&n>=24?"large":"small"},v="",k="";for(let y of m){if(!y.color)continue;let S=Bt(y.color),x=S.isReadable(h,b),C=S.alpha()<1;if(!x){if(p||C)continue;v=g<S.brightness()?(0,$s.sprintf)((0,$s.__)("This color combination may be hard for people to read. Try using a darker background color and/or a brighter %s."),y.description):(0,$s.sprintf)((0,$s.__)("This color combination may be hard for people to read. Try using a brighter background color and/or a darker %s."),y.description),k=(0,$s.__)("This color combination may be hard for people to read.");break}C&&c&&(v=(0,$s.__)("Transparent text may be hard for people to read."),k=(0,$s.__)("Transparent text may be hard for people to read."))}return v?((0,rte.speak)(k),(0,v3.jsx)("div",{className:"block-editor-contrast-checker",children:(0,v3.jsx)(ote.Notice,{spokenMessage:null,status:"warning",isDismissible:!1,children:v})})):null}var KT=rEe;var gr=l(N(),1),VS=l(pc(),1),YT=l(P(),1),ii=l(A(),1),Fa=l(w(),1),_d=new Date;_d.setDate(20);_d.setMonth(_d.getMonth()-3);_d.getMonth()===4&&_d.setMonth(3);function ite({format:e,defaultFormat:t,onChange:o}){return(0,Fa.jsxs)(ii.__experimentalVStack,{as:"fieldset",spacing:4,className:"block-editor-date-format-picker",children:[(0,Fa.jsx)(ii.VisuallyHidden,{as:"legend",children:(0,gr.__)("Date format")}),(0,Fa.jsx)(ii.ToggleControl,{label:(0,gr.__)("Default format"),help:`${(0,gr.__)("Example:")}  ${(0,VS.dateI18n)(t,_d)}`,checked:!e,onChange:r=>o(r?null:t)}),e&&(0,Fa.jsx)(nEe,{format:e,onChange:o})]})}function nEe({format:e,onChange:t}){let r=[...[...new Set(["Y-m-d",(0,gr._x)("n/j/Y","short date format"),(0,gr._x)("n/j/Y g:i A","short date format with time"),(0,gr._x)("M j, Y","medium date format"),(0,gr._x)("M j, Y g:i A","medium date format with time"),(0,gr._x)("F j, Y","long date format"),(0,gr._x)("M j","short date format without the year")])].map((a,c)=>({key:`suggested-${c}`,name:(0,VS.dateI18n)(a,_d),format:a})),{key:"human-diff",name:(0,VS.humanTimeDiff)(_d),format:"human-diff"}],n={key:"custom",name:(0,gr.__)("Custom"),className:"block-editor-date-format-picker__custom-format-select-control__custom-option",hint:(0,gr.__)("Enter your own date format")},[i,s]=(0,YT.useState)(()=>!!e&&!r.some(a=>a.format===e));return(0,Fa.jsxs)(ii.__experimentalVStack,{children:[(0,Fa.jsx)(ii.CustomSelectControl,{__next40pxDefaultSize:!0,label:(0,gr.__)("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,Fa.jsx)(ii.TextControl,{__next40pxDefaultSize:!0,label:(0,gr.__)("Custom format"),hideLabelFromVision:!0,help:(0,YT.createInterpolateElement)((0,gr.__)("Enter a date or time <Link>format string</Link>."),{Link:(0,Fa.jsx)(ii.ExternalLink,{href:(0,gr.__)("https://wordpress.org/documentation/article/customize-date-and-time-format/")})}),value:e,onChange:a=>t(a)})]})}var Ji=l(A(),1),FS=l(N(),1),ste=l(it(),1);var ate=l(Z(),1),za=l(w(),1);function lte({id:e,colorPalette:t,duotonePalette:o,disableCustomColors:r,disableCustomDuotone:n,value:i,onChange:s}){let a;i==="unset"?a=(0,za.jsx)(Ji.ColorIndicator,{className:"block-editor-duotone-control__unset-indicator"}):i?a=(0,za.jsx)(Ji.DuotoneSwatch,{values:i}):a=(0,za.jsx)(xe,{icon:bA});let c=(0,FS.__)("Apply duotone filter"),d=`${(0,ate.useInstanceId)(lte,"duotone-control",e)}__description`;return(0,za.jsx)(Ji.Dropdown,{popoverProps:{className:"block-editor-duotone-control__popover",headerTitle:(0,FS.__)("Duotone")},renderToggle:({isOpen:f,onToggle:m})=>(0,za.jsx)(Ji.ToolbarButton,{showTooltip:!0,onClick:m,"aria-haspopup":"true","aria-expanded":f,onKeyDown:p=>{!f&&p.keyCode===ste.DOWN&&(p.preventDefault(),m())},label:c,icon:a}),renderContent:()=>(0,za.jsxs)(Ji.MenuGroup,{label:(0,FS.__)("Duotone"),children:[(0,za.jsx)("p",{children:(0,FS.__)("Create a two-tone color effect without losing your original image.")}),(0,za.jsx)(Ji.DuotonePicker,{"aria-label":c,"aria-describedby":d,colorPalette:t,duotonePalette:o,disableCustomColors:r,disableCustomDuotone:n,value:i,onChange:s})]})})}var qT=lte;var fte=l(A(),1),mte=l(Re(),1),pte=l(P(),1),si=l(N(),1);var er=l(N(),1);var ZT=l(N(),1);function cte(e){if(!e)return{};if(typeof e=="object")return e;let t;switch(e){case"normal":t=(0,ZT._x)("Regular","font style");break;case"italic":t=(0,ZT._x)("Italic","font style");break;case"oblique":t=(0,ZT._x)("Oblique","font style");break;default:t=e;break}return{name:t,value:e}}var Ks=l(N(),1);function y3(e){if(!e)return{};if(typeof e=="object")return e;let t;switch(e){case"normal":case"400":t=(0,Ks._x)("Regular","font weight");break;case"bold":case"700":t=(0,Ks._x)("Bold","font weight");break;case"100":t=(0,Ks._x)("Thin","font weight");break;case"200":t=(0,Ks._x)("Extra Light","font weight");break;case"300":t=(0,Ks._x)("Light","font weight");break;case"500":t=(0,Ks._x)("Medium","font weight");break;case"600":t=(0,Ks._x)("Semi Bold","font weight");break;case"800":t=(0,Ks._x)("Extra Bold","font weight");break;case"900":t=(0,Ks._x)("Black","font weight");break;case"1000":t=(0,Ks._x)("Extra Black","font weight");break;default:t=e;break}return{name:t,value:e}}var ute=[{name:(0,er._x)("Regular","font style"),value:"normal"},{name:(0,er._x)("Italic","font style"),value:"italic"}],dte=[{name:(0,er._x)("Thin","font weight"),value:"100"},{name:(0,er._x)("Extra Light","font weight"),value:"200"},{name:(0,er._x)("Light","font weight"),value:"300"},{name:(0,er._x)("Regular","font weight"),value:"400"},{name:(0,er._x)("Medium","font weight"),value:"500"},{name:(0,er._x)("Semi Bold","font weight"),value:"600"},{name:(0,er._x)("Bold","font weight"),value:"700"},{name:(0,er._x)("Extra Bold","font weight"),value:"800"},{name:(0,er._x)("Black","font weight"),value:"900"},{name:(0,er._x)("Extra Black","font weight"),value:"1000"}];function tb(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(y3(m))}}let a=y3(typeof s.fontWeight=="number"?s.fontWeight.toString():s.fontWeight),c=cte(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,er._x)("Bold","font weight"),value:"700"}),t.some(s=>s.value==="italic")||t.push({name:(0,er._x)("Italic","font style"),value:"italic"}),n&&(t=ute,o=dte),t=t.length===0?ute:t,o=o.length===0?dte:o,t.forEach(({name:s,value:a})=>{o.forEach(({name:c,value:u})=>{let d=a==="normal"?c:(0,er.sprintf)((0,er._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 hte=l(w(),1),iEe=(e,t)=>e?t?(0,si.__)("Appearance"):(0,si.__)("Font style"):(0,si.__)("Font weight");function XT(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=iEe(r,n),f={key:"default",name:(0,si.__)("Default"),style:{fontStyle:void 0,fontWeight:void 0}},{fontStyles:m,fontWeights:h,combinedStyleAndWeightOptions:p}=tb(i),g=()=>{let x=[f];return p&&x.push(...p),x},b=()=>{let x=[f];return m.forEach(({name:C,value:B})=>{x.push({key:B,name:C,style:{fontStyle:B,fontWeight:void 0}})}),x},v=()=>{let x=[f];return h.forEach(({name:C,value:B})=>{x.push({key:B,name:C,style:{fontStyle:void 0,fontWeight:B}})}),x},k=(0,pte.useMemo)(()=>r&&n?g():r?b():v(),[e.options,m,h,p]),y=k.find(x=>x.style.fontStyle===s&&x.style.fontWeight===a)||k[0],S=()=>y?r?n?(0,si.sprintf)((0,si.__)("Currently selected font appearance: %s"),y.name):(0,si.sprintf)((0,si.__)("Currently selected font style: %s"),y.name):(0,si.sprintf)((0,si.__)("Currently selected font weight: %s"),y.name):(0,si.__)("No selected font appearance");return!t&&(c.size===void 0||c.size==="default")&&(0,mte.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,hte.jsx)(fte.CustomSelectControl,{...c,className:"components-font-appearance-control",__next40pxDefaultSize:t,__shouldNotWarnDeprecated36pxSize:!0,label:d,describedBy:S(),options:k,value:y,onChange:({selectedItem:x})=>o(x.style)})}var gte=l(A(),1),bte=l(Re(),1),S3=l(N(),1);var kte=l(w(),1);function QT({__next40pxDefaultSize:e=!1,value:t="",onChange:o,fontFamilies:r,className:n,...i}){let[s]=me("typography.fontFamilies");if(r||(r=s),!r||r.length===0)return null;let a=[{key:"",name:(0,S3.__)("Default")},...r.map(({fontFamily:u,name:d})=>({key:u,name:d||u,style:{fontFamily:u}}))];!e&&(i.size===void 0||i.size==="default")&&(0,bte.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,kte.jsx)(gte.CustomSelectControl,{__next40pxDefaultSize:e,__shouldNotWarnDeprecated36pxSize:!0,label:(0,S3.__)("Font"),value:c,onChange:({selectedItem:u})=>o(u.key),options:a,className:V("block-editor-font-family-control",n),...i})}var JT=l(A(),1),vte=l(Re(),1),yte=l(N(),1);var Ste=l(w(),1);function eI({__next40pxDefaultSize:e=!1,value:t,onChange:o,__unstableInputWidth:r="60px",...n}){let[i]=me("spacing.units"),s=(0,JT.__experimentalUseCustomUnits)({availableUnits:i||["px","em","rem"],defaultValues:{px:2,em:.2,rem:.2}});return!e&&(n.size===void 0||n.size==="default")&&(0,vte.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,Ste.jsx)(JT.__experimentalUnitControl,{__next40pxDefaultSize:e,__shouldNotWarnDeprecated36pxSize:!0,...n,label:(0,yte.__)("Letter spacing"),value:t,__unstableInputWidth:r,units:s,onChange:o})}var zS=l(N(),1),tI=l(A(),1),_3=l(w(),1),sEe=[{label:(0,zS.__)("None"),value:"none",icon:Mr},{label:(0,zS.__)("Underline"),value:"underline",icon:CA},{label:(0,zS.__)("Strikethrough"),value:"line-through",icon:xA}];function oI({value:e,onChange:t,className:o}){return(0,_3.jsx)(tI.__experimentalToggleGroupControl,{isDeselectable:!0,__next40pxDefaultSize:!0,label:(0,zS.__)("Decoration"),className:V("block-editor-text-decoration-control",o),value:e,onChange:r=>{t(r===e?void 0:r)},children:sEe.map(r=>(0,_3.jsx)(tI.__experimentalToggleGroupControlOptionIcon,{value:r.value,icon:r.icon,label:r.label},r.value))})}var ob=l(N(),1);var rI=l(A(),1),x3=l(w(),1),aEe=[{label:(0,ob.__)("None"),value:"none",icon:Mr},{label:(0,ob.__)("Uppercase"),value:"uppercase",icon:EA},{label:(0,ob.__)("Lowercase"),value:"lowercase",icon:SA},{label:(0,ob.__)("Capitalize"),value:"capitalize",icon:vA}];function nI({className:e,value:t,onChange:o}){return(0,x3.jsx)(rI.__experimentalToggleGroupControl,{isDeselectable:!0,__next40pxDefaultSize:!0,label:(0,ob.__)("Letter case"),className:V("block-editor-text-transform-control",e),value:t,onChange:r=>{o(r===t?void 0:r)},children:aEe.map(r=>(0,x3.jsx)(rI.__experimentalToggleGroupControlOptionIcon,{value:r.value,icon:r.icon,label:r.label},r.value))})}var rb=l(N(),1);var iI=l(A(),1),w3=l(w(),1),lEe=[{label:(0,rb.__)("Horizontal"),value:"horizontal-tb",icon:vN},{label:(0,rb.__)("Vertical"),value:(0,rb.isRTL)()?"vertical-lr":"vertical-rl",icon:SN}];function sI({className:e,value:t,onChange:o}){return(0,w3.jsx)(iI.__experimentalToggleGroupControl,{isDeselectable:!0,__next40pxDefaultSize:!0,label:(0,rb.__)("Orientation"),className:V("block-editor-writing-mode-control",e),value:t,onChange:r=>{o(r===t?void 0:r)},children:lEe.map(r=>(0,w3.jsx)(iI.__experimentalToggleGroupControlOptionIcon,{value:r.value,icon:r.icon,label:r.label},r.value))})}var Zr=l(A(),1),_te=l(P(),1),xte=l(N(),1);var Uo=l(w(),1),cEe=({setting:e,children:t,panelId:o,...r})=>{let n=()=>{e.colorValue?e.onColorChange():e.gradientValue&&e.onGradientChange()};return(0,Uo.jsx)(Zr.__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})},uEe=({colorValue:e,label:t})=>(0,Uo.jsxs)(Zr.__experimentalHStack,{justify:"flex-start",children:[(0,Uo.jsx)(Zr.ColorIndicator,{className:"block-editor-panel-color-gradient-settings__color-indicator",colorValue:e}),(0,Uo.jsx)(Zr.FlexItem,{className:"block-editor-panel-color-gradient-settings__color-name",title:t,children:t})]}),dEe=e=>function({onToggle:o,isOpen:r}){let{clearable:n,colorValue:i,gradientValue:s,onColorChange:a,onGradientChange:c,label:u}=e,d=(0,_te.useRef)(void 0),f={onClick:o,className:V("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,Uo.jsxs)(Uo.Fragment,{children:[(0,Uo.jsx)(Zr.Button,{__next40pxDefaultSize:!0,...f,children:(0,Uo.jsx)(uEe,{colorValue:h,label:u})}),n&&h&&(0,Uo.jsx)(Zr.Button,{__next40pxDefaultSize:!0,label:(0,xte.__)("Reset"),className:"block-editor-panel-color-gradient-settings__reset",size:"small",icon:Mr,onClick:()=>{m(),r&&o(),d.current?.focus()}})]})};function aI({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,Uo.jsx)(Uo.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,Uo.jsx)(cEe,{setting:u,...a,children:(0,Uo.jsx)(Zr.Dropdown,{popoverProps:c,className:"block-editor-tools-panel-color-gradient-settings__dropdown",renderToggle:dEe(m),renderContent:()=>(0,Uo.jsx)(Zr.__experimentalDropdownContentWrapper,{paddingSize:"none",children:(0,Uo.jsx)("div",{className:"block-editor-panel-color-gradient-settings__dropdown-content",children:(0,Uo.jsx)(Sd,{...f})})})})},d)})})}var lI=l(A(),1),wte=l(F(),1),Cte=l(Z(),1);var C3=l(P(),1),jm=l(N(),1);function xd(){let[e,t,o,r,n,i,s,a,c,u]=me("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,C3.useMemo)(()=>{let f=[];return o&&o.length&&f.push({name:(0,jm._x)("Theme","Indicates this palette comes from the theme."),slug:"theme",colors:o}),n&&r&&r.length&&f.push({name:(0,jm._x)("Default","Indicates this palette comes from WordPress."),slug:"default",colors:r}),t&&t.length&&f.push({name:(0,jm._x)("Custom","Indicates this palette is created by the user."),slug:"custom",colors:t}),f},[t,o,r,n]),d.gradients=(0,C3.useMemo)(()=>{let f=[];return a&&a.length&&f.push({name:(0,jm._x)("Theme","Indicates this palette comes from the theme."),slug:"theme",gradients:a}),u&&c&&c.length&&f.push({name:(0,jm._x)("Default","Indicates this palette comes from WordPress."),slug:"default",gradients:c}),s&&s.length&&f.push({name:(0,jm._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 Ys=l(w(),1),fEe=["colors","disableCustomColors","gradients","disableCustomGradients"],B3=({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,Cte.useInstanceId)(B3),{batch:m}=(0,wte.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,Ys.jsxs)(lI.__experimentalToolsPanel,{className:V("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,Ys.jsx)(aI,{settings:s,panelId:f,colors:t,gradients:o,disableCustomColors:r,disableCustomGradients:n,__experimentalIsRenderedInSidebar:u,enableAlpha:d}),!!i&&(0,Ys.jsxs)(Ys.Fragment,{children:[(0,Ys.jsx)(lI.__experimentalSpacer,{marginY:4})," ",i]})]})},mEe=e=>{let t=xd();return(0,Ys.jsx)(B3,{...t,...e})},pEe=e=>fEe.every(t=>e.hasOwnProperty(t))?(0,Ys.jsx)(B3,{...e}):(0,Ys.jsx)(mEe,{...e}),cI=pEe;var uI=l(P(),1),Um=l(A(),1),T3=l(N(),1);var jS=l(w(),1),E3=[],hEe={...UT,px:{max:1e3,steps:1},em:{max:50,steps:.1},rem:{max:50,steps:.1}};function gEe(e){let t=e?.default??E3,o=e?.custom??E3,r=e?.theme??E3;return(0,uI.useMemo)(()=>[{name:(0,T3.__)("None"),slug:"0",size:0},...o,...r,...t],[o,r,t])}function nb({label:e=(0,T3.__)("Dimension"),onChange:t,value:o}){let[r,n]=me("dimensions.dimensionSizes","spacing.units"),i=(0,Um.__experimentalUseCustomUnits)({availableUnits:n||["%","px","em","rem","vh","vw"]}),s=gEe(r),[a,c]=(0,uI.useState)(()=>{let[,d]=(0,Um.__experimentalParseQuantityAndUnitFromRawValue)(o);return d||i[0]?.value||"px"}),u=d=>{let[f,m]=(0,Um.__experimentalParseQuantityAndUnitFromRawValue)(o);["em","rem"].includes(d)&&m==="px"?t((f/16).toFixed(2)+d):["em","rem"].includes(m)&&d==="px"?t(Math.round(f*16)+d):["%","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(d)&&f>100&&t(100+d),c(d)};return(0,jS.jsxs)("fieldset",{className:"block-editor-dimension-control",children:[(0,jS.jsx)(Um.BaseControl.VisualLabel,{as:"legend",children:e}),(0,jS.jsx)(zm,{ariaLabel:e,className:"block-editor-dimension-control",customValueSettings:hEe,minimumCustomValue:0,onChange:t,onUnitChange:u,presets:s,presetType:"dimension",selectedUnit:a,showTooltip:!0,units:i,value:o})]})}var Ete=l(P(),1),tr=l(A(),1),Tte=l(N(),1),Ite=l(Re(),1);var ja=l(w(),1),Bte={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 Pte({label:e=(0,Tte.__)("Height"),onChange:t,value:o}){(0,Ite.default)("wp.blockEditor.HeightControl",{since:"7.0",version:"7.2",alternative:"wp.blockEditor.DimensionControl"});let r=parseFloat(o),[n]=me("spacing.units"),i=(0,tr.__experimentalUseCustomUnits)({availableUnits:n||["%","px","em","rem","vh","vw"]}),s=(0,Ete.useMemo)(()=>(0,tr.__experimentalParseQuantityAndUnitFromRawValue)(o),[o])[1]||i[0]?.value||"px",a=u=>{t([u,s].join(""))},c=u=>{let[d,f]=(0,tr.__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,ja.jsxs)("fieldset",{className:"block-editor-height-control",children:[(0,ja.jsx)(tr.BaseControl.VisualLabel,{as:"legend",children:e}),(0,ja.jsxs)(tr.Flex,{children:[(0,ja.jsx)(tr.FlexItem,{isBlock:!0,children:(0,ja.jsx)(tr.__experimentalUnitControl,{value:o,units:i,onChange:t,onUnitChange:c,min:0,size:"__unstable-large",label:e,hideLabelFromVision:!0})}),(0,ja.jsx)(tr.FlexItem,{isBlock:!0,children:(0,ja.jsx)(tr.__experimentalSpacer,{marginX:2,marginBottom:0,children:(0,ja.jsx)(tr.RangeControl,{__next40pxDefaultSize:!0,value:r,min:0,max:Bte[s]?.max??100,step:Bte[s]?.step??.1,withInputField:!1,onChange:a,label:e,hideLabelFromVision:!0})})})]})]})}var WS=l(A(),1);var es=l(zr()),ooe=l(Xte());function SEe(e,t,o,r,n,i){i===void 0&&(i=0);var s=ib(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 _Ee(e){return e.width>e.height?e.width/e.naturalWidth:e.height/e.naturalHeight}function US(e,t,o,r,n){n===void 0&&(n=0);var i=ib(t.width,t.height,n),s=i.width,a=i.height;return{x:Qte(e.x,s,o.width,r),y:Qte(e.y,a,o.height,r)}}function Qte(e,t,o,r){var n=t*r/2-o/2;return gI(e,-n,n)}function Jte(e,t){return Math.sqrt(Math.pow(e.y-t.y,2)+Math.pow(e.x-t.x,2))}function eoe(e,t){return Math.atan2(t.y-e.y,t.x-e.x)*180/Math.PI}function xEe(e,t,o,r,n,i,s){i===void 0&&(i=0),s===void 0&&(s=!0);var a=s?wEe:CEe,c=ib(t.width,t.height,i),u=ib(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=Fo(Fo({},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 wEe(e,t){return Math.min(e,Math.max(0,t))}function CEe(e,t){return t}function BEe(e,t,o,r,n,i){var s=ib(t.width,t.height,o),a=gI(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 EEe(e,t,o){var r=_Ee(t);return o.height>o.width?o.height/(e.height*r):o.width/(e.width*r)}function TEe(e,t,o,r,n,i){o===void 0&&(o=0);var s=ib(t.naturalWidth,t.naturalHeight,o),a=gI(EEe(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 toe(e,t){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function IEe(e){return e*Math.PI/180}function ib(e,t,o){var r=IEe(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 gI(e,t,o){return Math.min(Math.max(e,t),o)}function hI(){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 PEe=`.reactEasyCrop_Container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  user-select: none;
  touch-action: none;
  cursor: move;
  display: flex;
  justify-content: center;
  align-items: center;
}

.reactEasyCrop_Image,
.reactEasyCrop_Video {
  will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */
}

.reactEasyCrop_Contain {
  max-width: 100%;
  max-height: 100%;
  margin: auto;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}
.reactEasyCrop_Cover_Horizontal {
  width: 100%;
  height: auto;
}
.reactEasyCrop_Cover_Vertical {
  width: auto;
  height: 100%;
}

.reactEasyCrop_CropArea {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-sizing: border-box;
  box-shadow: 0 0 0 9999em;
  color: rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.reactEasyCrop_CropAreaRound {
  border-radius: 50%;
}

.reactEasyCrop_CropAreaGrid::before {
  content: ' ';
  box-sizing: border-box;
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.5);
  top: 0;
  bottom: 0;
  left: 33.33%;
  right: 33.33%;
  border-top: 0;
  border-bottom: 0;
}

.reactEasyCrop_CropAreaGrid::after {
  content: ' ';
  box-sizing: border-box;
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.5);
  top: 33.33%;
  bottom: 33.33%;
  left: 0;
  right: 0;
  border-left: 0;
  border-right: 0;
}
`,REe=1,OEe=3,AEe=1,roe=(function(e){SU(t,e);function t(){var o=e!==null&&e.apply(this,arguments)||this;return o.cropperRef=es.createRef(),o.imageRef=es.createRef(),o.videoRef=es.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=BEe(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=TEe(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=Fo(Fo({},g),{naturalWidth:f,naturalHeight:m}),o.props.setMediaSize&&o.props.setMediaSize(o.mediaSize);var b=o.props.cropSize?o.props.cropSize:SEe(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=Fo({},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?US(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,ooe.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=gI(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?US(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?US(o.props.crop,o.mediaSize,o.state.cropSize,o.props.zoom,o.props.rotation):o.props.crop;return xEe(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?US(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=Fo({},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=US(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=PEe,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=Jte(r,n),this.lastPinchRotation=eoe(r,n),this.onDragStart(toe(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=toe(n,i);this.onDrag(s),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame(function(){var a=Jte(n,i),c=r.props.zoom*(a/r.lastPinchDistance);r.setNewZoom(c,s,{shouldUpdatePosition:!1}),r.lastPinchDistance=a;var u=eoe(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,v=n.roundCropAreaPixels,k=n.style,y=k.containerStyle,S=k.cropAreaStyle,x=k.mediaStyle,C=n.classes,B=C.containerClassName,I=C.cropAreaClassName,O=C.mediaClassName,E=(r=this.state.mediaObjectFit)!==null&&r!==void 0?r:this.getObjectFit();return es.createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(T){return o.containerRef=T},"data-testid":"container",style:y,className:hI("reactEasyCrop_Container",B)},i?es.createElement("img",Fo({alt:"",className:hI("reactEasyCrop_Image",E==="contain"&&"reactEasyCrop_Contain",E==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",E==="vertical-cover"&&"reactEasyCrop_Cover_Vertical",O)},a,{src:i,ref:this.imageRef,style:Fo(Fo({},x),{transform:u||"translate(".concat(f,"px, ").concat(m,"px) rotate(").concat(h,"deg) scale(").concat(p,")")}),onLoad:this.onMediaLoad})):s&&es.createElement("video",Fo({autoPlay:!0,playsInline:!0,loop:!0,muted:!0,className:hI("reactEasyCrop_Video",E==="contain"&&"reactEasyCrop_Contain",E==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",E==="vertical-cover"&&"reactEasyCrop_Cover_Vertical",O)},a,{ref:this.videoRef,onLoadedMetadata:this.onMediaLoad,style:Fo(Fo({},x),{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 es.createElement("source",Fo({key:L.src},L))})),this.state.cropSize&&es.createElement("div",Fo({ref:this.cropperRef,style:Fo(Fo({},S),{width:v?Math.round(this.state.cropSize.width):this.state.cropSize.width,height:v?Math.round(this.state.cropSize.height):this.state.cropSize.height}),tabIndex:0,onKeyDown:this.onKeyDown,onKeyUp:this.onKeyUp,"data-testid":"cropper",className:hI("reactEasyCrop_CropArea",g==="round"&&"reactEasyCrop_CropAreaRound",b&&"reactEasyCrop_CropAreaGrid",I)},c)))},t.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:OEe,minZoom:REe,cropShape:"rect",objectFit:"contain",showGrid:!0,style:{},classes:{},mediaProps:{},cropperProps:{},zoomSpeed:1,restrictPosition:!0,zoomWithScroll:!0,keyboardStep:AEe},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})(es.Component);var foe=l(P(),1);var ab=l(P(),1);var noe=Object.prototype.hasOwnProperty;function ioe(e,t,o){for(o of e.keys())if(Gm(o,t))return o}function Gm(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--&&Gm(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=ioe(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=ioe(t,n),!n)||!Gm(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(noe.call(e,o)&&++r&&!noe.call(t,o)||!(o in t)||!Gm(e[o],t[o]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}var qs=l(P(),1);var sb=1,soe=5;var bI=e=>e>=0?e%360:(360+e%360)%360,LEe=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 aoe(e){return e*Math.PI/180}function NEe(e,t,o){let r=aoe(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 loe(e,t,o=0,r={horizontal:!1,vertical:!1}){try{let n=await LEe(e),i=document.createElement("canvas"),s=i.getContext("2d");if(!s)return null;let a=aoe(o),{width:c,height:u}=NEe(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 Wm={crop:{x:0,y:0,width:100,height:100},zoom:sb,rotation:0,aspectRatio:1,flip:{horizontal:!1,vertical:!1}},MEe={x:0,y:0},D3={crop:MEe,croppedArea:Wm.crop,croppedAreaPixels:null,zoom:Wm.zoom,rotation:Wm.rotation,flip:Wm.flip,aspectRatio:Wm.aspectRatio,mediaSize:null};function coe(){let[e,t]=(0,qs.useState)(D3),[o,r]=(0,qs.useState)(null),n=(0,qs.useCallback)(u=>{t(d=>{let m={...typeof u=="function"?u(d):u};return"rotation"in m&&m.rotation!==void 0&&(m.rotation=bI(m.rotation)),{...d,...m}})},[]),i=(0,qs.useCallback)((u=null)=>{if(!u){r(null),n(D3);return}if(typeof u=="object"){let d={...Wm,...u};r(d),n(d)}},[n,r]),s=(0,qs.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({...D3})},[o,n]),a=(0,qs.useMemo)(()=>{if(o){let d={crop:e.croppedAreaPixels||e.croppedArea,zoom:e.zoom,rotation:bI(e.rotation),aspectRatio:e.aspectRatio,flip:e.flip};return Gm(d,o)===!1}let u={crop:e.croppedArea,zoom:e.zoom,rotation:bI(e.rotation),aspectRatio:e.aspectRatio,flip:e.flip};return Gm(u,Wm)===!1},[e,o]),c=(0,qs.useCallback)(async u=>e.croppedAreaPixels?loe(u,e.croppedAreaPixels,e.rotation,e.flip):null,[e.croppedAreaPixels,e.rotation,e.flip]);return(0,qs.useMemo)(()=>({cropperState:e,setCropperState:n,resetState:o,setResetState:i,isDirty:a,reset:s,getCroppedImage:c}),[e,n,o,i,a,s,c])}var uoe=l(w(),1),doe=(0,ab.createContext)({cropperState:{crop:{x:0,y:0},croppedArea:{x:0,y:0,width:100,height:100},croppedAreaPixels:null,zoom:sb,rotation:0,aspectRatio:1,flip:{horizontal:!1,vertical:!1},mediaSize:null},setCropperState:()=>{},resetState:null,setResetState:()=>{},isDirty:!1,reset:()=>{},getCroppedImage:()=>Promise.resolve(null)});function V3({children:e}){let t=coe(),o=(0,ab.useMemo)(()=>({...t}),[t]);return(0,uoe.jsx)(doe.Provider,{value:o,children:e})}var HS=()=>{let e=(0,ab.useContext)(doe);if(!e)throw new Error("Missing ImageCropperContext");return e};var moe=l(w(),1);function F3({src:e,onLoad:t,minZoom:o=sb,maxZoom:r=soe,...n}){let{cropperState:i,setCropperState:s}=HS(),{crop:a,zoom:c,rotation:u,aspectRatio:d,flip:f}=i,m=v=>s({crop:v}),h=v=>s({zoom:v}),p=v=>s({rotation:v}),g=v=>s({mediaSize:v}),b=(0,foe.useCallback)((v,k)=>{s({croppedArea:v,croppedAreaPixels:k})},[s]);return(0,moe.jsx)(roe,{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:v=>{t?.(v)},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 ub=l(A(),1),cb=l(N(),1);var poe=100,hoe=300,kI={placement:"bottom-start"};var lb=l(P(),1);var vI=l(F(),1),$m=l(P(),1),hc=l(N(),1),goe=l(Ti(),1),boe=l(Fe(),1);var DEe={crop:(0,hc.__)("Image cropped."),rotate:(0,hc.__)("Image rotated."),cropAndRotate:(0,hc.__)("Image cropped and rotated.")};function koe({crop:e,rotation:t,url:o,id:r,onSaveImage:n,onFinishEditing:i}){let{createErrorNotice:s,createSuccessNotice:a}=(0,vI.useDispatch)(goe.store),[c,u]=(0,$m.useState)(!1),{editMediaEntity:d}=(0,vI.useSelect)(h=>({editMediaEntity:h(_).getSettings()?.[k0]}),[]),f=(0,$m.useCallback)(()=>{u(!1),i()},[i]),m=(0,$m.useCallback)(async()=>{if(!d){i(),s((0,hc.__)("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(DEe[p],{type:"snackbar",actions:[{label:(0,hc.__)("Undo"),onClick:()=>{n({id:r,url:o})}}]}))}catch(g){s((0,hc.sprintf)((0,hc.__)("Could not edit image. %s"),(0,boe.__unstableStripHTML)(g.message)),{id:"image-editing-error",type:"snackbar"})}finally{u(!1),i()}},[e,t,r,o,n,s,a,i,d]);return(0,$m.useMemo)(()=>({isInProgress:c,apply:m,cancel:f}),[c,m,f])}var Zs=l(P(),1),voe=l(rt(),1);function yoe({url:e,naturalWidth:t,naturalHeight:o}){let[r,n]=(0,Zs.useState)(),{cropperState:i,setCropperState:s}=HS(),{zoom:a,aspectRatio:c,crop:u,croppedArea:d}=i,f=(0,Zs.useCallback)(k=>{s({zoom:k})},[s]),m=(0,Zs.useCallback)(k=>{s({aspectRatio:k})},[s]),h=t/o,p=o/t;(0,Zs.useEffect)(()=>{m(h)},[]);let[g,b]=(0,Zs.useState)(0),v=(0,Zs.useCallback)(()=>{let k=(g+90)%360,y=h,x=a!==1||!(h===c||p===c);if(g%180===90&&(y=1/h),k===0){n(),b(k),s({aspectRatio:x?c:h,crop:{x:-(u.y*y),y:u.x*y}});return}function C(O){let E=document.createElement("canvas"),L=0,T=0;k%180?(E.width=O.target.height,E.height=O.target.width):(E.width=O.target.width,E.height=O.target.height),(k===90||k===180)&&(L=E.width),(k===270||k===180)&&(T=E.height);let R=E.getContext("2d");R.translate(L,T),R.rotate(k*Math.PI/180),R.drawImage(O.target,0,0),E.toBlob(D=>{n(URL.createObjectURL(D)),b(k);let j=x?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 I=(0,voe.applyFilters)("media.crossOrigin",void 0,e);typeof I=="string"&&(B.crossOrigin=I)},[g,h,e,s,u,a,c,p,b]);return(0,Zs.useMemo)(()=>({editedUrl:r,setEditedUrl:n,crop:d,zoom:a,setZoom:f,rotation:g,rotateClockwise:v,aspect:c,setAspect:m,defaultAspect:h}),[r,d,a,f,g,v,c,m,h])}var Soe=l(w(),1),z3=(0,lb.createContext)({});z3.displayName="ImageEditingContext";var Ua=()=>(0,lb.useContext)(z3);function _oe({id:e,url:t,naturalWidth:o,naturalHeight:r,onFinishEditing:n,onSaveImage:i,children:s}){let a=yoe({url:t,naturalWidth:o,naturalHeight:r}),c=koe({id:e,url:t,onSaveImage:i,onFinishEditing:n,...a}),u=(0,lb.useMemo)(()=>({...a,...c}),[a,c]);return(0,Soe.jsx)(z3.Provider,{value:u,children:s})}var ts=l(w(),1);function yI({aspectRatios:e,isDisabled:t,label:o,onClick:r,value:n}){return(0,ts.jsx)(ub.MenuGroup,{label:o,children:e.map(({name:i,slug:s,ratio:a})=>(0,ts.jsx)(ub.MenuItem,{disabled:t,onClick:()=>{r(a)},role:"menuitemradio",isSelected:a===n,icon:a===n?gl:void 0,children:i},s))})}function VEe(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 j3({ratio:e,...t}){return{ratio:VEe(e),...t}}function xoe({toggleProps:e}){let{isInProgress:t,aspect:o,setAspect:r,defaultAspect:n}=Ua(),[i,s,a]=me("dimensions.aspectRatios.default","dimensions.aspectRatios.theme","dimensions.defaultAspectRatios");return(0,ts.jsx)(ub.DropdownMenu,{icon:NO,label:(0,cb.__)("Aspect Ratio"),popoverProps:kI,toggleProps:e,children:({onClose:c})=>(0,ts.jsxs)(ts.Fragment,{children:[(0,ts.jsx)(yI,{isDisabled:t,onClick:u=>{r(u),c()},value:o,aspectRatios:[{slug:"original",name:(0,cb.__)("Original"),ratio:n},...a?i.map(j3).filter(({ratio:u})=>u===1):[]]}),s?.length>0&&(0,ts.jsx)(yI,{label:(0,cb.__)("Theme"),isDisabled:t,onClick:u=>{r(u),c()},value:o,aspectRatios:s}),a&&(0,ts.jsx)(yI,{label:(0,cb.__)("Landscape"),isDisabled:t,onClick:u=>{r(u),c()},value:o,aspectRatios:i.map(j3).filter(({ratio:u})=>u>1)}),a&&(0,ts.jsx)(yI,{label:(0,cb.__)("Portrait"),isDisabled:t,onClick:u=>{r(u),c()},value:o,aspectRatios:i.map(j3).filter(({ratio:u})=>u<1)})]})})}var woe=l(A(),1),Coe=l(Z(),1);var wd=l(w(),1);function Boe({url:e,width:t,height:o,naturalHeight:r,naturalWidth:n,borderProps:i}){let{isInProgress:s,editedUrl:a,rotation:c}=Ua(),[u,{width:d}]=(0,Coe.useResizeObserver)(),f=o||d*r/n;c%180===90&&(f=d*n/r);let m=(0,wd.jsxs)("div",{className:V("wp-block-image__crop-area",i?.className,{"is-applying":s}),style:{...i?.style,width:t||d,height:f},children:[(0,wd.jsx)(F3,{src:a||e}),s&&(0,wd.jsx)(woe.Spinner,{})]});return(0,wd.jsxs)(wd.Fragment,{children:[u,m]})}var Cd=l(A(),1),U3=l(N(),1);var GS=l(w(),1);function Eoe(){let{isInProgress:e,zoom:t,setZoom:o}=Ua();return(0,GS.jsx)(Cd.Dropdown,{contentClassName:"wp-block-image__zoom",popoverProps:kI,renderToggle:({isOpen:r,onToggle:n})=>(0,GS.jsx)(Cd.ToolbarButton,{icon:qL,label:(0,U3.__)("Zoom"),onClick:n,"aria-expanded":r,disabled:e}),renderContent:()=>(0,GS.jsx)(Cd.__experimentalDropdownContentWrapper,{paddingSize:"medium",children:(0,GS.jsx)(Cd.RangeControl,{__next40pxDefaultSize:!0,label:(0,U3.__)("Zoom"),min:poe,max:hoe,value:Math.round(t*100),onChange:r=>o(r/100)})})})}var Toe=l(A(),1),Ioe=l(N(),1);var Poe=l(w(),1);function Roe(){let{isInProgress:e,rotateClockwise:t}=Ua();return(0,Poe.jsx)(Toe.ToolbarButton,{icon:WL,label:(0,Ioe.__)("Rotate"),onClick:t,disabled:e})}var H3=l(A(),1),G3=l(N(),1);var Km=l(w(),1);function Ooe(){let{isInProgress:e,apply:t,cancel:o}=Ua();return(0,Km.jsxs)(Km.Fragment,{children:[(0,Km.jsx)(H3.ToolbarButton,{onClick:t,disabled:e,children:(0,G3.__)("Apply")}),(0,Km.jsx)(H3.ToolbarButton,{onClick:o,children:(0,G3.__)("Cancel")})]})}var ai=l(w(),1);function Aoe({id:e,url:t,width:o,height:r,naturalHeight:n,naturalWidth:i,onSaveImage:s,onFinishEditing:a,borderProps:c}){return(0,ai.jsx)(V3,{children:(0,ai.jsxs)(_oe,{id:e,url:t,naturalWidth:i,naturalHeight:n,onSaveImage:s,onFinishEditing:a,children:[(0,ai.jsx)(Boe,{borderProps:c,url:t,width:o,height:r,naturalHeight:n,naturalWidth:i}),(0,ai.jsxs)(Mt,{children:[(0,ai.jsxs)(WS.ToolbarGroup,{children:[(0,ai.jsx)(Eoe,{}),(0,ai.jsx)(WS.ToolbarItem,{children:u=>(0,ai.jsx)(xoe,{toggleProps:u})}),(0,ai.jsx)(Roe,{})]}),(0,ai.jsx)(WS.ToolbarGroup,{children:(0,ai.jsx)(Ooe,{})})]})]})})}var li=l(A(),1),Bd=l(N(),1);var db=l(P(),1);function Loe(e,t,o,r,n){let[i,s]=(0,db.useState)(t??r??""),[a,c]=(0,db.useState)(e??o??"");return(0,db.useEffect)(()=>{t===void 0&&r!==void 0&&s(r),e===void 0&&o!==void 0&&c(o)},[r,o]),(0,db.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 os=l(w(),1),Noe=[25,50,75,100],FEe=()=>{};function Moe(e,t,o){let r=Math.round(t*(e/100)),n=Math.round(o*(e/100));return{scaledWidth:r,scaledHeight:n}}function Doe({imageSizeHelp:e,imageWidth:t,imageHeight:o,imageSizeOptions:r=[],isResizable:n=!0,slug:i,width:s,height:a,onChange:c,onChangeImage:u=FEe}){let{currentHeight:d,currentWidth:f,updateDimension:m,updateDimensions:h}=Loe(a,s,o,t,c),p=b=>{if(b===void 0){h();return}let{scaledWidth:v,scaledHeight:k}=Moe(b,t,o);h(k,v)},g=Noe.find(b=>{let{scaledWidth:v,scaledHeight:k}=Moe(b,t,o);return f===v&&d===k});return(0,os.jsxs)(li.__experimentalVStack,{className:"block-editor-image-size-control",spacing:"4",children:[r&&r.length>0&&(0,os.jsx)(li.SelectControl,{label:(0,Bd.__)("Resolution"),value:i,options:r,onChange:u,help:e,size:"__unstable-large"}),n&&(0,os.jsxs)(os.Fragment,{children:[(0,os.jsxs)(li.__experimentalHStack,{align:"baseline",spacing:"4",children:[(0,os.jsx)(li.__experimentalNumberControl,{label:(0,Bd.__)("Width"),value:f,min:1,onChange:b=>m("width",b),size:"__unstable-large"}),(0,os.jsx)(li.__experimentalNumberControl,{label:(0,Bd.__)("Height"),value:d,min:1,onChange:b=>m("height",b),size:"__unstable-large"})]}),(0,os.jsx)(li.__experimentalToggleGroupControl,{label:(0,Bd.__)("Image size presets"),hideLabelFromVision:!0,onChange:p,value:g,isBlock:!0,__next40pxDefaultSize:!0,children:Noe.map(b=>(0,os.jsx)(li.__experimentalToggleGroupControlOption,{value:b,label:(0,Bd.sprintf)((0,Bd.__)("%d%%"),b)},b))})]})]})}var SI=l(A(),1);var Ym=l(N(),1),Foe=l(w(),1),Voe={left:ru,center:ou,right:nu,"space-between":zp,stretch:jp};function zEe({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?Voe[r]:Voe.left,c=[{name:"left",icon:ru,title:(0,Ym.__)("Justify items left"),isActive:r==="left",onClick:()=>s("left")},{name:"center",icon:ou,title:(0,Ym.__)("Justify items center"),isActive:r==="center",onClick:()=>s("center")},{name:"right",icon:nu,title:(0,Ym.__)("Justify items right"),isActive:r==="right",onClick:()=>s("right")},{name:"space-between",icon:zp,title:(0,Ym.__)("Space between items"),isActive:r==="space-between",onClick:()=>s("space-between")},{name:"stretch",icon:jp,title:(0,Ym.__)("Stretch items"),isActive:r==="stretch",onClick:()=>s("stretch")}],u=i?SI.ToolbarGroup:SI.ToolbarDropdownMenu,d=i?{isCollapsed:t}:{};return(0,Foe.jsx)(u,{icon:a,popoverProps:n,label:(0,Ym.__)("Change items justification"),controls:c.filter(f=>e.includes(f.name)),...d})}var W3=zEe;var $3=l(w(),1),lh=e=>(0,$3.jsx)(W3,{...e,isToolbar:!1}),zoe=e=>(0,$3.jsx)(W3,{...e,isToolbar:!0});var Xr=l(A(),1),Xs=l(N(),1),no=l(P(),1),Rre=l(Z(),1),Ore=l(Fe(),1),Are=l(it(),1),Lre=l(Xy(),1),NI=l(F(),1),tF=l(Xp(),1);var Nre=l(Re(),1),MI=l(un(),1);var fb=l(A(),1);var _I=l(Z(),1),xI=l(N(),1),joe=l(P(),1),gc=l(w(),1);function Uoe({children:e,settingsOpen:t,setSettingsOpen:o}){let r=(0,_I.useReducedMotion)(),n=r?joe.Fragment:fb.__unstableAnimatePresence,i=r?"div":fb.__unstableMotion.div,a=`link-control-settings-drawer-${(0,_I.useInstanceId)(Uoe)}`;return(0,gc.jsxs)(gc.Fragment,{children:[(0,gc.jsx)(fb.Button,{__next40pxDefaultSize:!0,className:"block-editor-link-control__drawer-toggle","aria-expanded":t,onClick:()=>o(!t),icon:(0,xI.isRTL)()?Qk:tu,"aria-controls":a,children:(0,xI._x)("Advanced","Additional link settings")}),(0,gc.jsx)(n,{children:t&&(0,gc.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,gc.jsx)("div",{className:"block-editor-link-control__drawer-inner",children:e})})})]})}var Hoe=Uoe;var II=l(P(),1),J3=l(N(),1),lre=l(Re(),1);var $S=l(N(),1),ere=l(A(),1);var wI=l(N(),1),Goe=l(A(),1),Woe=l(P(),1);var K3=l(w(),1),jEe=({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,Woe.createInterpolateElement)((0,wI.sprintf)((0,wI.__)("Create: <mark>%s</mark>"),e),{mark:(0,K3.jsx)("mark",{})}),(0,K3.jsx)(Goe.MenuItem,{...o,iconPosition:"left",icon:wi,className:"block-editor-link-control__search-item",onClick:t,children:n})},$oe=jEe;var bc=l(N(),1),BI=l(A(),1);var Koe=l(Fe(),1),pb=l(un(),1),Yoe=l(Z(),1),qoe=l(Re(),1),mb=l(w(),1),CI={post:{icon:zL,label:(0,bc.__)("Post")},page:{icon:kl,label:(0,bc.__)("Page")},post_tag:{icon:bN,label:(0,bc.__)("Tag")},category:{icon:zO,label:(0,bc.__)("Category")},attachment:{icon:hA,label:(0,bc.__)("Attachment")}};function UEe({isURL:e,suggestion:t}){let o=null;return e?o=ev:t.type in CI&&(o=CI[t.type].icon,t.type==="page"&&(t.isFrontPage&&(o=KA),t.isBlogHome&&(o=RN))),o?(0,mb.jsx)(xe,{className:"block-editor-link-control__search-item-icon",icon:o}):null}function HEe(e){return e?.trim()?.length?e?.replace(/^\/?/,"/"):e}function GEe(e){return e?.trim()?.length?e?.replace(/\/$/,""):e}var WEe=(e,...t)=>(...o)=>e(...o,...t),$Ee=e=>t=>t==null||t!==t?e:t;function KEe(e){return e&&(0,Yoe.pipe)(pb.safeDecodeURI,pb.getPath,$Ee(""),WEe(pb.filterURLForDisplay,24),GEe,HEe)(e)}var Zoe=({itemProps:e,suggestion:t,searchTerm:o,onClick:r,isURL:n=!1,shouldShowType:i=!1})=>{let s=n?(0,bc.__)("Press ENTER to add this link"):KEe(t.url);return(0,mb.jsx)(BI.MenuItem,{...e,info:s,iconPosition:"left",icon:(0,mb.jsx)(UEe,{suggestion:t,isURL:n}),onClick:r,shortcut:i&&YEe(t),className:"block-editor-link-control__search-item",children:(0,mb.jsx)(BI.TextHighlight,{text:(0,Koe.__unstableStripHTML)(t.title),highlight:o})})};function YEe(e){return e.isFrontPage?(0,bc.__)("Front page"):e.isBlogHome?(0,bc.__)("Blog home"):e.type in CI?CI[e.type].label:e.type}var Xoe=Zoe,Qoe=e=>((0,qoe.default)("wp.blockEditor.__experimentalLinkControlSearchItem",{since:"6.8"}),(0,mb.jsx)(Zoe,{...e}));var Joe=l(N(),1),qm="__CREATE__",Y3="tel",EI="link",q3="mailto",Z3="internal",hb=[EI,q3,Y3,Z3],X3=[{id:"opensInNewTab",title:(0,Joe.__)("Open in new tab")}];var tre=l(Re(),1),Zm=l(w(),1);function ore({withCreateSuggestion:e,currentInputValue:t,handleSuggestionClick:o,suggestionsListProps:r,buildSuggestionItemProps:n,suggestions:i,selectedSuggestion:s,isLoading:a,isInitialSuggestions:c,createSuggestionButtonText:u,suggestionsQuery:d}){let f=V("block-editor-link-control__search-results",{"is-loading":a}),m=i.length===1&&hb.includes(i[0].type),h=e&&!m&&!c,p=!d?.type,g=c?(0,$S.__)("Suggestions"):(0,$S.sprintf)((0,$S.__)('Search results for "%s"'),t);return(0,Zm.jsx)("div",{className:"block-editor-link-control__search-results-wrapper",children:(0,Zm.jsx)("div",{...r,className:f,"aria-label":g,children:(0,Zm.jsx)(ere.MenuGroup,{children:i.map((b,v)=>h&&qm===b.type?(0,Zm.jsx)($oe,{searchTerm:t,buttonText:u,onClick:()=>o(b),itemProps:n(b,v),isSelected:v===s},b.type):qm===b.type?null:(0,Zm.jsx)(Xoe,{itemProps:n(b,v),suggestion:b,index:v,onClick:()=>{o(b)},isSelected:v===s,isURL:hb.includes(b.type),searchTerm:t,shouldShowType:p,isFrontPage:b?.isFrontPage,isBlogHome:b?.isBlogHome},`${b.id}-${b.type}`))})})})}var rre=ore,nre=e=>((0,tre.default)("wp.blockEditor.__experimentalLinkControlSearchResults",{since:"6.8"}),(0,Zm.jsx)(ore,{...e}));var ire=l(P(),1),sre=l(F(),1);var TI=l(un(),1);function KS(e){let t=e?.trim();if(!t)return{url:t,type:EI};let o=EI,r=(0,TI.getProtocol)(t)||"";return r.includes("mailto")?o=q3:r.includes("tel")?o=Y3:t?.startsWith("#")&&(o=Z3),hf(t)||gf(t)||t.startsWith("?")||r?{url:t,type:o}:{url:(0,TI.prependHTTPS)(t),type:o}}var qEe=()=>Promise.resolve([]),ZEe=e=>{let{url:t,type:o}=KS(e);return Promise.resolve([{id:e,title:e,url:t,type:o}])},XEe=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||bf(e)||!r?a:a.concat({title:e,url:e,type:qm})};function are(e,t,o){let{fetchSearchSuggestions:r,pageOnFront:n,pageForPosts:i}=(0,sre.useSelect)(a=>{let{getSettings:c}=a(_);return{pageOnFront:c().pageOnFront,pageForPosts:c().pageForPosts,fetchSearchSuggestions:c().__experimentalFetchLinkSuggestions}},[]),s=t?ZEe:qEe;return(0,ire.useCallback)((a,{isInitialSuggestions:c})=>bf(a)?s(a,{isInitialSuggestions:c}):XEe(a,{...e,isInitialSuggestions:c},r,o,n,i),[s,r,n,i,e,o])}var gb=l(w(),1),QEe=()=>Promise.resolve([]),Q3=()=>{},cre=(0,II.forwardRef)(({value:e,children:t,currentLink:o={},className:r=null,placeholder:n=null,withCreateSuggestion:i=!1,onCreateSuggestion:s=Q3,onChange:a=Q3,onSelect:c=Q3,showSuggestions:u=!0,renderSuggestions:d=C=>(0,gb.jsx)(rre,{...C}),fetchSuggestions:f=null,allowDirectEntry:m=!0,showInitialSuggestions:h=!1,suggestionsQuery:p={},withURLSuggestion:g=!0,createSuggestionButtonText:b,hideLabelFromVision:v=!1,suffix:k,isEntity:y=!1,customValidity:S},x)=>{let C=are(p,m,i,g),B=u?f||C:QEe,[I,O]=(0,II.useState)(),E=(j,G)=>{a(j),O(G)},L=j=>d({...j,withCreateSuggestion:i,createSuggestionButtonText:b,suggestionsQuery:p,handleSuggestionClick:G=>{j.handleSuggestionClick&&j.handleSuggestionClick(G),T(G)}}),T=async j=>{let G=j;if(qm===j.type){try{G=await s(j.title),G?.url&&c(G)}catch{}return}if(m||G&&Object.keys(G).length>=1){let{id:z,url:H,kind:W,type:te,...ne}=o??{};c({...ne,...G},G)}},R=n??(0,J3.__)("Search or type URL"),D=v&&n!==""?R:(0,J3.__)("Link");return(0,gb.jsxs)("div",{className:"block-editor-link-control__search-input-container",children:[(0,gb.jsx)(Ed,{disableSuggestions:o?.url===e,label:D,hideLabelFromVision:v,className:r,value:e,onChange:E,placeholder:R,__experimentalRenderSuggestions:u?L:null,__experimentalFetchLinkSuggestions:B,__experimentalHandleURLSuggestions:!0,__experimentalShowInitialSuggestions:h,customValidity:S,required:!1,onSubmit:(j,G)=>{let z=j||I;!z&&!e?.trim()?.length?G.preventDefault():T(z||{url:e})},inputRef:x,suffix:k,disabled:y}),t]})}),ure=cre,dre=e=>((0,lre.default)("wp.blockEditor.__experimentalLinkControlSearchInput",{since:"6.8"}),(0,gb.jsx)(cre,{...e}));var Td=l(N(),1),Ao=l(A(),1),gre=l(Z(),1),OI=l(un(),1);var bre=l(Fe(),1),AI=l(F(),1),kre=l(Ti(),1),vre=l(Xp(),1);var fre=l(A(),1),{Slot:mre,Fill:pre}=(0,fre.createSlotFill)("BlockEditorLinkControlViewer");var hre=l(F(),1),PI=l(P(),1);function JEe(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 eTe(e){let[t,o]=(0,PI.useReducer)(JEe,{richData:null,isFetching:!1}),{fetchRichUrlData:r}=(0,hre.useSelect)(n=>{let{getSettings:i}=n(_);return{fetchRichUrlData:i().__experimentalFetchRichUrlData}},[]);return(0,PI.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 RI=eTe;var yt=l(w(),1),{Badge:tTe}=M(Ao.privateApis);function yre({value:e,onEditClick:t,hasRichPreviews:o=!1,hasUnlinkControl:r=!1,onRemove:n}){let i=(0,AI.useSelect)(b=>b(vre.store).get("core","showIconLabels"),[]),s=o?e?.url:null,{richData:a,isFetching:c}=RI(s),u=a&&Object.keys(a).length,d=e&&(0,OI.filterURLForDisplay)((0,OI.safeDecodeURI)(e.url),24)||"",f=!e?.url?.length,m=!f&&(0,bre.__unstableStripHTML)(a?.title||e?.title||d),h;a?.icon?h=(0,yt.jsx)("img",{src:a?.icon,alt:""}):f?h=(0,yt.jsx)(xe,{icon:ZA,size:32}):h=(0,yt.jsx)(xe,{icon:ev});let{createNotice:p}=(0,AI.useDispatch)(kre.store),g=(0,gre.useCopyToClipboard)(e.url,()=>{p("info",(0,Td.__)("Link copied to clipboard."),{isDismissible:!0,type:"snackbar"})});return(0,yt.jsx)(Ao.Flex,{role:"group","aria-label":(0,Td.__)("Manage link"),className:V("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,yt.jsxs)(Ao.Flex,{gap:0,align:"flex-start",children:[(0,yt.jsxs)(Ao.Flex,{className:"block-editor-link-control__link-information",role:"figure","aria-label":(0,Td.__)("Link information"),justify:"start",align:"flex-start",children:[e?.image?(0,yt.jsx)(Ao.Flex,{className:"block-editor-link-control__preview-image",justify:"center",children:(0,yt.jsx)("img",{src:e?.image,alt:""})}):(0,yt.jsx)(Ao.Flex,{className:V("block-editor-link-control__preview-icon",{"is-image":a?.icon}),justify:"center",children:h}),(0,yt.jsx)(Ao.Flex,{className:"block-editor-link-control__preview-details",direction:"column",gap:2,children:f?(0,yt.jsx)("span",{className:"block-editor-link-control__preview-error-notice",children:(0,Td.__)("Link is empty")}):(0,yt.jsxs)(yt.Fragment,{children:[(0,yt.jsx)(Ao.ExternalLink,{className:"block-editor-link-control__preview-title",href:e.url,children:(0,yt.jsx)(Ao.__experimentalTruncate,{numberOfLines:1,children:m})}),(0,yt.jsx)("span",{className:"block-editor-link-control__preview-info",children:(0,yt.jsx)(Ao.__experimentalTruncate,{numberOfLines:1,children:d})}),e?.badges?.length>0&&(0,yt.jsx)(Ao.__experimentalHStack,{className:"block-editor-link-control__preview-badges",alignment:"left",gap:1,children:e.badges.map((b,v)=>(0,yt.jsx)(tTe,{intent:b.intent,children:b.label},`${b.label}|${b.intent}|${v}`))})]})})]}),(0,yt.jsx)(Ao.Button,{icon:Rf,label:(0,Td.__)("Edit link"),onClick:t,size:"compact",showTooltip:!i}),r&&(0,yt.jsx)(Ao.Button,{icon:xi,label:(0,Td.__)("Remove link"),onClick:n,size:"compact",showTooltip:!i}),(0,yt.jsx)(Ao.Button,{icon:QO,label:(0,Td.__)("Copy link"),ref:g,accessibleWhenDisabled:!0,disabled:f,size:"compact",showTooltip:!i}),(0,yt.jsx)(mre,{fillProps:e})]})})}var Sre=l(N(),1),LI=l(A(),1),bb=l(w(),1),oTe=()=>{},rTe=({value:e,onChange:t=oTe,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,bb.jsx)("div",{className:"block-editor-link-control__setting",children:s},i.id)}return null}return(0,bb.jsx)(LI.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,bb.jsxs)("fieldset",{className:"block-editor-link-control__settings",children:[(0,bb.jsx)(LI.VisuallyHidden,{as:"legend",children:(0,Sre.__)("Currently selected link settings")}),n]})},_re=rTe;var xre=l(N(),1),Xm=l(P(),1);function wre(e){let t=(0,Xm.useRef)(),[o,r]=(0,Xm.useState)(!1),[n,i]=(0,Xm.useState)(null),s=async function(a){r(!0),i(null);try{return t.current=nTe(Promise.resolve(e(a))),await t.current.promise}catch(c){if(c&&c.isCanceled)return;throw i(c.message||(0,xre.__)("An unknown error occurred during creation. Please try again.")),c}finally{r(!1)}};return(0,Xm.useEffect)(()=>()=>{t.current&&t.current.cancel()},[]),{createPage:s,isCreatingPage:o,errorMessage:n}}var nTe=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 eF=l(P(),1),Ere=l(Bre(),1);function Tre(e){let[t,o]=(0,eF.useState)(e||{}),[r,n]=(0,eF.useState)(e);return(0,Ere.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 Pt=l(w(),1),oF=()=>{},Ire="core/block-editor",Pre="linkControlSettingsDrawer";function Qm({searchInputPlaceholder:e,value:t,settings:o=X3,onChange:r=oF,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:v=!1,hasTextControl:k=!1,renderControlBottom:y=null,handleEntities:S=!1}){m===void 0&&f&&(m=!0);let[x,C]=(0,no.useState)(!1),[B,I]=(0,no.useState)(void 0),{advancedSettingsPreference:O}=(0,NI.useSelect)(ge=>({advancedSettingsPreference:ge(tF.store).get(Ire,Pre)??!1}),[]),{set:E}=(0,NI.useDispatch)(tF.store),L=ge=>{E&&E(Ire,Pre,ge),C(ge)},T=O||x,R=(0,no.useRef)(!0),D=(0,no.useRef)(),j=(0,no.useRef)(),G=(0,no.useRef)(),z=(0,no.useRef)(),H=o.map(({id:ge})=>ge),[W,te,ne,ae,X]=Tre(t),ee=ge=>{ne(ge),n?.(ge)},le=S&&!!W?.id,Q=(0,Rre.useInstanceId)(Qm,"link-control"),J=le?`${Q}__help`:null,q=t&&!(0,Lre.isShallowEqualObjects)(W,t),[U,K]=(0,no.useState)(d!==void 0?d:!t||!t.url),{createPage:se,isCreatingPage:ce,errorMessage:Se}=wre(f);(0,no.useEffect)(()=>{d!==void 0&&K(d)},[d]),(0,no.useEffect)(()=>{if(R.current)return;(Ore.focus.focusable.find(D.current)[0]||D.current).focus()},[U,ce]),(0,no.useEffect)(()=>(R.current=!1,()=>{R.current=!0}),[]);let he=(0,no.useRef)();(0,no.useEffect)(()=>{if(he.current===void 0){he.current=h;return}he.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."),he.current=h)},[h]),(0,no.useEffect)(()=>{if(B?.type==="invalid"){let ge=G.current;ge&&typeof ge.reportValidity=="function"&&ge.reportValidity()}},[B]);let we=t?.url?.trim()?.length>0,De=()=>{K(!1)},ct=ge=>{let Ct={type:"invalid",message:(0,Xs.__)("Please enter a valid URL.")},To={type:"valid"},Ye=ge?.trim();if(!Ye?.length||!bf(Ye))return Ct;if(hf(Ye)||gf(Ye))return To;let oe=(0,MI.prependHTTPS)(Ye);return(0,MI.isURL)(oe)?To:Ct},Jt=ge=>{if(!(ge&&ge.id&&ge.type&&!hb.includes(ge.type))){let Ye=ge?.url||Ue,oe=ct(Ye);if(oe.type==="invalid"){I(oe);return}let{url:Ae}=KS(Ye);ge={...ge,url:Ae}}ge?.kind==="taxonomy"&&ge?.url&&(z.current=ge.url);let To=Object.keys(ge).reduce((Ye,oe)=>(H.includes(oe)||(Ye[oe]=ge[oe]),Ye),{});r({...W,...To,title:W?.title||ge?.title}),I(void 0),De()},uo=()=>{if(Lr)return!1;let ge=Ue.trim(),Ct=W&&W.id&&W.type&&!hb.includes(W.type),To=t?.url===ge;if(Ct&&To)return I(void 0),!0;let Ye=ct(Ue);return Ye.type==="invalid"?(I(Ye),!1):(I(void 0),!0)},Do=()=>{q&&r({...t,...W,url:KS(Ue).url}),De(),I(void 0)},ot=()=>{uo()&&Do()},sr=ge=>{let{keyCode:Ct}=ge;Ct===Are.ENTER&&!Lr&&(ge.preventDefault(),ot())},ze=()=>{te(t)},wt=ge=>{ge.preventDefault(),ge.stopPropagation(),ze(),I(void 0),we?De():i?.(),s?.()},[je,At]=(0,no.useState)(!1),ar=()=>{let{id:ge,kind:Ct,type:To,...Ye}=W;te({...Ye,id:void 0,kind:void 0,type:void 0,url:void 0}),At(!0)};(0,no.useEffect)(()=>{je&&(G.current?.focus(),At(!1))},[je]);let Ue=W?.url!==void 0?W.url:h||"",Lr=!Ue?.trim()?.length;(0,no.useEffect)(()=>{I(void 0)},[Ue]);let ki=!B,eo=i&&t&&!U&&!ce,Bo=U&&we,Xe=we&&k,Ve=(U||!t)&&!ce,bt=Lr||!ki||t&&!q,Eo=!!o?.length&&U&&we,lr=(0,no.useMemo)(()=>t?.kind==="taxonomy"&&!t?.url&&z.current?{...t,url:z.current}:t,[t]);return(0,Pt.jsxs)("div",{tabIndex:-1,ref:D,className:"block-editor-link-control",children:[ce&&(0,Pt.jsxs)("div",{className:"block-editor-link-control__loading",children:[(0,Pt.jsx)(Xr.Spinner,{})," ",(0,Xs.__)("Creating"),"\u2026"]}),Ve&&(0,Pt.jsxs)(Pt.Fragment,{children:[(0,Pt.jsxs)("div",{className:V({"block-editor-link-control__search-input-wrapper":!0,"has-text-control":Xe,"has-actions":Bo}),children:[Xe&&(0,Pt.jsx)(Xr.TextControl,{ref:j,className:"block-editor-link-control__field block-editor-link-control__text-content",label:(0,Xs.__)("Text"),value:W?.title,onChange:ae,onKeyDown:sr,__next40pxDefaultSize:!0}),(0,Pt.jsx)(ure,{ref:G,currentLink:t,className:"block-editor-link-control__field block-editor-link-control__search-input",placeholder:e,value:Ue,withCreateSuggestion:m,onCreateSuggestion:se,onChange:ee,onSelect:Jt,showInitialSuggestions:u,allowDirectEntry:!a,showSuggestions:c,suggestionsQuery:p,withURLSuggestion:!g,createSuggestionButtonText:b,hideLabelFromVision:!Xe,isEntity:le,customValidity:B,suffix:(0,Pt.jsx)(iTe,{isEntity:le,showActions:Bo,isDisabled:bt,onUnlink:ar,onSubmit:ot,helpTextId:J})}),le&&J&&(0,Pt.jsx)("p",{id:J,className:"block-editor-link-control__help",children:(0,Xs.sprintf)((0,Xs.__)("Synced with the selected %s."),W?.type||"item")})]}),Se&&(0,Pt.jsx)(Xr.Notice,{className:"block-editor-link-control__search-error",status:"error",isDismissible:!1,children:Se})]}),t&&!U&&!ce&&(0,Pt.jsx)(yre,{value:lr,onEditClick:()=>K(!0),hasRichPreviews:v,hasUnlinkControl:eo,onRemove:()=>{i(),K(!0)}},lr?.url),Eo&&(0,Pt.jsx)("div",{className:"block-editor-link-control__tools",children:!Lr&&(0,Pt.jsx)(Hoe,{settingsOpen:T,setSettingsOpen:L,children:(0,Pt.jsx)(_re,{value:W,settings:o,onChange:X(H)})})}),Bo&&(0,Pt.jsxs)(Xr.__experimentalHStack,{justify:"right",className:"block-editor-link-control__search-actions",children:[(0,Pt.jsx)(Xr.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:wt,children:(0,Xs.__)("Cancel")}),(0,Pt.jsx)(Xr.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:bt?oF:ot,className:"block-editor-link-control__search-submit","aria-disabled":bt,children:(0,Xs.__)("Apply")})]}),!ce&&y&&y()]})}function iTe({isEntity:e,showActions:t,isDisabled:o,onUnlink:r,onSubmit:n,helpTextId:i}){if(e)return(0,Pt.jsx)(Xr.Button,{icon:xi,onClick:r,"aria-describedby":i,showTooltip:!0,label:(0,Xs.__)("Unsync and edit"),__next40pxDefaultSize:!0});if(!t)return(0,Pt.jsx)(Xr.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,Pt.jsx)(Xr.Button,{onClick:o?oF:n,label:(0,Xs.__)("Submit"),icon:bl,className:"block-editor-link-control__search-submit","aria-disabled":o,size:"small"})})}Qm.ViewerFill=pre;Qm.DEFAULT_LINK_SETTINGS=X3;var DI=e=>((0,Nre.default)("wp.blockEditor.__experimentalLinkControl",{since:"6.8",alternative:"wp.blockEditor.LinkControl"}),(0,Pt.jsx)(Qm,{...e}));DI.ViewerFill=Qm.ViewerFill;DI.DEFAULT_LINK_SETTINGS=Qm.DEFAULT_LINK_SETTINGS;var Id=Qm;var Dre=l(N(),1),Vre=l(A(),1),Fre=l(Re(),1);var YS=1.5,rF=.01,nF=10,iF="";function Mre(e){return e!==void 0&&e!==iF}var sF=l(w(),1),sTe=({__next40pxDefaultSize:e=!1,value:t,onChange:o,__unstableInputWidth:r="60px",...n})=>{let i=Mre(t),s=(d,f)=>{if(i)return d;let m=rF*nF;switch(`${d}`){case`${m}`:return YS+m;case"0":return f?d:YS-m;case"":return YS;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:iF,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,Fre.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,sF.jsx)("div",{className:"block-editor-line-height-control",children:(0,sF.jsx)(Vre.__experimentalNumberControl,{...n,__shouldNotWarnDeprecated36pxSize:!0,__next40pxDefaultSize:e,__unstableInputWidth:r,__unstableStateReducer:a,onChange:u,label:(0,Dre.__)("Line height"),placeholder:YS,step:rF,spinFactor:nF,value:c,min:0,spinControls:"custom"})})},VI=sTe;var Ha=l(N(),1),zre=l(Zo(),1),Qr=l(A(),1),zI=l(F(),1),jre=l(it(),1);var Ure=l(Z(),1),Hre=l(Fe(),1),Gre=l(Ti(),1),Wre=l(P(),1);function FI(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 or=l(w(),1),aTe=()=>{},lTe=0,cTe=({mediaURL:e,mediaId:t,mediaIds:o,allowedTypes:r,accept:n,onError:i,onSelect:s,onSelectURL:a,onReset:c,onToggleFeaturedImage:u,useFeaturedImage:d,onFilesUpload:f=aTe,name:m=(0,Ha.__)("Replace"),createNotice:h,removeNotice:p,children:g,multiple:b=!1,addToGallery:v,handleUpload:k=!0,variant:y,popoverProps:S,renderToggle:x,className:C})=>{let{mediaUpload:B,allowedMimeTypes:I}=(0,zI.useSelect)(H=>{let{getSettings:W}=H(_),te=W();return{mediaUpload:te.mediaUpload,allowedMimeTypes:te.allowedMimeTypes}},[]),O=`block-editor/media-replace-flow/error-notice/${++lTe}`,E=(0,Wre.useMemo)(()=>FI(r,I,n),[r,I,n]),L=H=>{let W=(0,Hre.__unstableStripHTML)(H);if(i){i(W);return}setTimeout(()=>{h("error",W,{speak:!0,id:O,isDismissible:!0})},1e3)},T=(H,W)=>{d&&u&&u(),W(),s(H),(0,zre.speak)((0,Ha.__)("The media file has been replaced")),p(O)},R=(H,W)=>{let te=H.target.files;if(!k)return W(),s(te);f(te),B({allowedTypes:r,filesList:te,onFileChange:([ne])=>{T(ne,W)},onError:L})},D=H=>{H.keyCode===jre.DOWN&&(H.preventDefault(),H.target.click())},G=b&&(!r||r.length===0?!1:r.every(H=>H==="image"||H.startsWith("image/"))),z={...S,variant:y};return(0,or.jsx)(Qr.Dropdown,{popoverProps:z,className:C,contentClassName:V("block-editor-media-replace-flow__options",y&&`is-variant-${y}`),renderToggle:({isOpen:H,onToggle:W})=>x?x({"aria-expanded":H,"aria-haspopup":"true",onClick:W,onKeyDown:D,children:m}):(0,or.jsx)(Qr.ToolbarButton,{"aria-expanded":H,"aria-haspopup":"true",onClick:W,onKeyDown:D,children:m}),renderContent:({onClose:H})=>(0,or.jsxs)(or.Fragment,{children:[(0,or.jsxs)(Qr.NavigableMenu,{className:"block-editor-media-replace-flow__media-upload-menu",children:[(0,or.jsxs)(Ms,{children:[(0,or.jsx)(Yu,{gallery:G,addToGallery:v,multiple:b,value:b?o:t,onSelect:W=>T(W,H),allowedTypes:r,render:({open:W})=>(0,or.jsx)(Qr.MenuItem,{icon:Up,onClick:W,children:(0,Ha.__)("Open Media Library")})}),(0,or.jsx)(Qr.FormFileUpload,{onChange:W=>{R(W,H)},accept:E,multiple:!!b,render:({openFileDialog:W})=>(0,or.jsx)(Qr.MenuItem,{icon:IN,onClick:()=>{W()},children:(0,Ha._x)("Upload","verb")})})]}),u&&(0,or.jsx)(Qr.MenuItem,{icon:VL,onClick:u,isPressed:d,children:(0,Ha.__)("Use featured image")}),typeof g=="function"?g({onClose:H}):g,e&&c&&(0,or.jsx)(Qr.MenuItem,{onClick:()=>{c(),H()},children:(0,Ha.__)("Reset")})]}),a&&(0,or.jsxs)("form",{className:"block-editor-media-flow__url-input",children:[(0,or.jsx)("span",{className:"block-editor-media-replace-flow__image-url-label",children:(0,Ha.__)("Current media URL:")}),(0,or.jsx)(Id,{value:{url:e},settings:[],showSuggestions:!1,onChange:({url:W})=>{a(W)},searchInputPlaceholder:(0,Ha.__)("Paste or type URL")})]})]})})},kb=(0,Ure.compose)([(0,zI.withDispatch)(e=>{let{createNotice:t,removeNotice:o}=e(Gre.store);return{createNotice:t,removeNotice:o}}),(0,Qr.withFilters)("editor.MediaReplaceFlow")])(cTe);var So=l(A(),1),yo=l(N(),1),Ad=l(P(),1),ine=l(F(),1);var sne=l(Re(),1);var lF=l(N(),1),UI=l(P(),1),vb=l(A(),1);var nne=l(Re(),1);var Yre=l(N(),1),qre=l(A(),1);var $re=l(A(),1),jI=l(un(),1),aF=l(w(),1);function Kre({url:e,urlLabel:t,className:o}){let r=V(o,"block-editor-url-popover__link-viewer-url");return e?(0,aF.jsx)($re.ExternalLink,{className:r,href:e,children:t||(0,jI.filterURLForDisplay)((0,jI.safeDecodeURI)(e))}):(0,aF.jsx)("span",{className:r})}var qS=l(w(),1);function Zre({className:e,linkClassName:t,onEditLinkClick:o,url:r,urlLabel:n,...i}){return(0,qS.jsxs)("div",{className:V("block-editor-url-popover__link-viewer",e),...i,children:[(0,qS.jsx)(Kre,{url:r,urlLabel:n,className:t}),o&&(0,qS.jsx)(qre.Button,{icon:Rf,label:(0,Yre.__)("Edit"),onClick:o,size:"compact"})]})}var tne=l(N(),1),one=l(A(),1);var kc=l(N(),1),ZS=l(P(),1),Qs=l(it(),1),En=l(A(),1),Pd=l(Z(),1),Xre=l(F(),1),Qre=l(un(),1);var Ga=l(w(),1),Jre=l(zr(),1),{ValidatedInputControl:uTe}=M(En.privateApis);function ene(e){return typeof e=="function"}var dTe=class extends ZS.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,ZS.createRef)(),this.inputRef=e.inputRef||(0,ZS.createRef)(),this.hasRenderedValidation={current:!1},this.updateSuggestions=(0,Pd.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,Qre.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,kc.sprintf)((0,kc._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,kc.__)("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 Qs.UP:{e.target.selectionStart!==0&&(e.preventDefault(),e.target.setSelectionRange(0,0));break}case Qs.DOWN:{this.props.value.length!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(this.props.value.length,this.props.value.length));break}case Qs.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 Qs.UP:{e.preventDefault();let s=o?o-1:r.length-1;this.setState({selectedSuggestion:s});break}case Qs.DOWN:{e.preventDefault();let s=o===null||o===r.length-1?0:o+1;this.setState({selectedSuggestion:s});break}case Qs.TAB:{this.state.selectedSuggestion!==null&&(this.selectLink(i),this.props.speak((0,kc.__)("Link selected.")));break}case Qs.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,Ga.jsxs)(Ga.Fragment,{children:[this.renderControl(),this.renderSuggestions()]})}renderControl(){let{label:e=null,className:t,isFullWidth:o,instanceId:r,placeholder:n=(0,kc.__)("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,v=`url-input-control-${r}`,k={id:v,label:e,className:V("block-editor-url-input",t,{"is-full-width":o}),hideLabelFromVision:a},y={id:v,value:s,required:this.props.required??!0,type:"text",name:v,autoComplete:"off",onChange:u?()=>{}:this.onChange,onFocus:u?()=>{}:this.onFocus,placeholder:n,onKeyDown:u?()=>{}:this.onKeyDown,role:"combobox","aria-label":e?void 0:(0,kc.__)("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},S={customValidity:d,...f!==void 0&&{markWhenOptional:f}};if(i)return i(k,y,m);d!==void 0&&(this.hasRenderedValidation.current=!0);let x=this.hasRenderedValidation.current?uTe:En.__experimentalInputControl;return(0,Ga.jsxs)(En.BaseControl,{...k,children:[(0,Ga.jsx)(x,{...y,...this.hasRenderedValidation.current?S:{},__next40pxDefaultSize:!0}),m&&(0,Ga.jsx)(En.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 ene(t)?t({suggestions:r,selectedSuggestion:i,suggestionsListProps:u,buildSuggestionItemProps:d,isLoading:c,handleSuggestionClick:this.handleOnClick,isInitialSuggestions:!n?.length,currentInputValue:n}):(0,Ga.jsx)(En.Popover,{placement:"bottom",focusOnMount:!1,children:(0,Ga.jsx)("div",{...u,className:V("block-editor-url-input__suggestions",{[`${e}__suggestions`]:e}),children:r.map((f,m)=>(0,Jre.createElement)(En.Button,{__next40pxDefaultSize:!0,...d(f,m),key:f.id,className:V("block-editor-url-input__suggestion",{"is-selected":m===i}),onClick:()=>this.handleOnClick(f)},f.title))})})}},Ed=(0,Pd.compose)(Pd.withSafeTimeout,En.withSpokenMessages,Pd.withInstanceId,(0,Xre.withSelect)((e,t)=>{if(ene(t.__experimentalFetchLinkSuggestions))return;let{getSettings:o}=e(_);return{__experimentalFetchLinkSuggestions:o().__experimentalFetchLinkSuggestions}}))(dTe);var XS=l(w(),1);function rne({autocompleteRef:e,className:t,onChangeInputValue:o,value:r,...n}){return(0,XS.jsxs)("form",{className:V("block-editor-url-popover__link-editor",t),...n,children:[(0,XS.jsx)(Ed,{value:r,onChange:o,autocompleteRef:e}),(0,XS.jsx)(one.Button,{icon:bl,label:(0,tne.__)("Apply"),type:"submit",size:"compact"})]})}var Rd=l(w(),1),{__experimentalPopoverLegacyPositionToPlacement:fTe}=M(vb.privateApis),mTe="bottom",cF=(0,UI.forwardRef)(({additionalControls:e,children:t,renderSettings:o,placement:r,focusOnMount:n="firstElement",position:i,...s},a)=>{i!==void 0&&(0,nne.default)("`position` prop in wp.blockEditor.URLPopover",{since:"6.2",alternative:"`placement` prop"});let c;r!==void 0?c=r:i!==void 0&&(c=fTe(i)),c=c||mTe;let[u,d]=(0,UI.useState)(!1),f=!!o&&u,m=()=>{d(!u)};return(0,Rd.jsxs)(vb.Popover,{ref:a,role:"dialog","aria-modal":"true","aria-label":(0,lF.__)("Edit URL"),className:"block-editor-url-popover",focusOnMount:n,placement:c,shift:!0,variant:"toolbar",...s,children:[(0,Rd.jsx)("div",{className:"block-editor-url-popover__input-container",children:(0,Rd.jsxs)("div",{className:"block-editor-url-popover__row",children:[t,!!o&&(0,Rd.jsx)(vb.Button,{className:"block-editor-url-popover__settings-toggle",icon:Fn,label:(0,lF.__)("Link settings"),onClick:m,"aria-expanded":u,size:"compact"})]})}),f&&(0,Rd.jsx)("div",{className:"block-editor-url-popover__settings",children:o()}),e&&!f&&(0,Rd.jsx)("div",{className:"block-editor-url-popover__additional-controls",children:e})]})});cF.LinkEditor=rne;cF.LinkViewer=Zre;var Od=cF;var We=l(w(),1),pTe=()=>{},hTe=({src:e,onChange:t,onSubmit:o,onClose:r,popoverAnchor:n})=>(0,We.jsx)(Od,{anchor:n,onClose:r,children:(0,We.jsx)("form",{className:"block-editor-media-placeholder__url-input-form",onSubmit:o,children:(0,We.jsx)(So.__experimentalInputControl,{__next40pxDefaultSize:!0,label:(0,yo.__)("URL"),type:"text",hideLabelFromVision:!0,placeholder:(0,yo.__)("Paste or type URL"),onChange:t,value:e,suffix:(0,We.jsx)(So.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,We.jsx)(So.Button,{size:"small",icon:bl,label:(0,yo.__)("Apply"),type:"submit"})})})})}),gTe=({src:e,onChangeSrc:t,onSelectURL:o})=>{let[r,n]=(0,Ad.useState)(null),[i,s]=(0,Ad.useState)(!1),a=()=>{s(!0)},c=()=>{s(!1),r?.focus()},u=d=>{d.preventDefault(),e&&o&&(o(e),c())};return(0,We.jsxs)("div",{className:"block-editor-media-placeholder__url-input-container",children:[(0,We.jsx)(So.Button,{__next40pxDefaultSize:!0,className:"block-editor-media-placeholder__button",onClick:a,isPressed:i,variant:"secondary","aria-haspopup":"dialog",ref:n,children:(0,yo.__)("Insert from URL")}),i&&(0,We.jsx)(hTe,{src:e,onChange:t,onSubmit:u,onClose:c,popoverAnchor:r})]})};function bTe({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:v,onToggleFeaturedImage:k,onDoubleClick:y,onFilesPreUpload:S=pTe,onHTMLDrop:x,children:C,mediaLibraryButton:B,placeholder:I,style:O}){x&&(0,sne.default)("wp.blockEditor.MediaPlaceholder onHTMLDrop prop",{since:"6.2",version:"6.4"});let{mediaUpload:E,allowedMimeTypes:L}=(0,ine.useSelect)(Q=>{let{getSettings:J}=Q(_),q=J();return{mediaUpload:q.mediaUpload,allowedMimeTypes:q.allowedMimeTypes}},[]),[T,R]=(0,Ad.useState)("");(0,Ad.useEffect)(()=>{R(e?.src??"")},[e?.src]);let D=(0,Ad.useMemo)(()=>FI(t,L,c),[t,L,c]),j=()=>!t||t.length===0?!1:t.every(Q=>Q==="image"||Q.startsWith("image/")),G=Q=>{if(!f||typeof f=="function"&&!f(Q))return g(Q);S(Q);let J;if(d)if(u){let q=[];J=U=>{let K=(e??[]).filter(se=>se.id?!q.some(({id:ce})=>Number(ce)===Number(se.id)):!q.some(({urlSlug:ce})=>se.url.includes(ce)));g(K.concat(U)),q=U.map(se=>{let ce=se.url.lastIndexOf("."),Se=se.url.slice(0,ce);return{id:se.id,urlSlug:Se}})}}else J=g;else J=([q])=>g(q);E({allowedTypes:t,filesList:Q,onFileChange:J,onError:p,multiple:d})};async function z(Q){let{blocks:J}=q5(Q);if(!J?.length)return;let q=await Promise.all(J.map(U=>{let K=U.name.split("/")[1];return U.attributes.id?(U.attributes.type=K,U.attributes):new Promise((se,ce)=>{window.fetch(U.attributes.url).then(Se=>Se.blob()).then(Se=>E({filesList:[Se],additionalData:{title:U.attributes.title,alt_text:U.attributes.alt,caption:U.attributes.caption,type:K},onFileChange:([he])=>{he.id&&se(he)},allowedTypes:t,onError:ce})).catch(()=>se(U.attributes.url))})})).catch(U=>p(U));q?.length&&g(d?q:q[0])}let H=Q=>{G(Q.target.files)},te=I??(Q=>{let{instructions:J,title:q}=n;if(!E&&!v&&(J=(0,yo.__)("To edit this block, you need permission to upload media.")),J===void 0||q===void 0){let K=t??[],[se]=K,ce=K.length===1,Se=ce&&se==="audio",he=ce&&se==="image",we=ce&&se==="video";J===void 0&&E&&(J=(0,yo.__)("Drag and drop an image or video, upload, or choose from your library."),Se?J=(0,yo.__)("Drag and drop an audio file, upload, or choose from your library."):he?J=(0,yo.__)("Drag and drop an image, upload, or choose from your library."):we&&(J=(0,yo.__)("Drag and drop a video, upload, or choose from your library."))),q===void 0&&(q=(0,yo.__)("Media"),Se?q=(0,yo.__)("Audio"):he?q=(0,yo.__)("Image"):we&&(q=(0,yo.__)("Video")))}let U=V("block-editor-media-placeholder",o,{"is-appender":a});return(0,We.jsxs)(So.Placeholder,{icon:r,label:q,instructions:J,className:U,notices:s,onDoubleClick:y,preview:i,style:O,children:[Q,C]})}),ne=()=>m?null:(0,We.jsx)(So.DropZone,{onFilesDrop:G,onDrop:z,isEligible:Q=>{let J="wp-block:core/",q=[];for(let U of Q.types)U.startsWith(J)&&q.push(U.slice(J.length));return q.every(U=>t.includes(U))&&(d?!0:q.length===1)}}),ae=()=>b&&(0,We.jsx)(So.Button,{__next40pxDefaultSize:!0,className:"block-editor-media-placeholder__cancel-button",title:(0,yo.__)("Cancel"),variant:"link",onClick:b,children:(0,yo.__)("Cancel")}),X=()=>v&&(0,We.jsx)(gTe,{src:T,onChangeSrc:R,onSelectURL:v}),ee=()=>k&&(0,We.jsx)("div",{className:"block-editor-media-placeholder__url-input-container",children:(0,We.jsx)(So.Button,{__next40pxDefaultSize:!0,className:"block-editor-media-placeholder__button",onClick:k,variant:"secondary",children:(0,yo.__)("Use featured image")})}),le=()=>{let J=B??(({open:U})=>(0,We.jsx)(So.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>{U()},children:(0,yo.__)("Media Library")})),q=(0,We.jsx)(Yu,{addToGallery:u,gallery:d&&j(),multiple:d,onSelect:g,allowedTypes:t,mode:"browse",value:Array.isArray(e)?e.map(({id:U})=>U):e.id,render:J});if(E&&a)return(0,We.jsxs)(We.Fragment,{children:[ne(),(0,We.jsx)(So.FormFileUpload,{onChange:H,accept:D,multiple:!!d,render:({openFileDialog:U})=>{let K=(0,We.jsxs)(We.Fragment,{children:[(0,We.jsx)(So.Button,{__next40pxDefaultSize:!0,variant:"primary",className:V("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onClick:U,children:(0,yo._x)("Upload","verb")}),q,X(),ee(),ae()]});return te(K)}})]});if(E){let U=(0,We.jsxs)(We.Fragment,{children:[ne(),(0,We.jsx)(So.FormFileUpload,{render:({openFileDialog:K})=>(0,We.jsx)(So.Button,{__next40pxDefaultSize:!0,onClick:K,variant:"primary",className:V("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),children:(0,yo._x)("Upload","verb")}),onChange:H,accept:D,multiple:!!d}),q,X(),ee(),ae()]});return te(U)}return te(q)};return h?(0,We.jsx)(Ms,{children:ne()}):(0,We.jsx)(Ms,{fallback:te(X()),children:le()})}var ane=(0,So.withFilters)("editor.MediaPlaceholder")(bTe);var lne=l(w(),1),kTe=({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,lne.jsx)(cI,{settings:o,gradients:[],disableCustomGradients:!0,...t})},cne=kTe;var iie=l(AM(),1);var sie=l(P(),1);var oie=l(P(),1);var Zne=l(vf(),1),rr=l(P(),1),Nd=l(F(),1),rP=l(Z(),1),Xne=l(ur(),1),Qne=l(A(),1),Jne=l($(),1),eie=l(Re(),1),Ib=l(N(),1);var une=l(N(),1),HI=l(A(),1);var uF=l(N(),1),Jm=l(A(),1);var vc=l(w(),1),vTe={placement:"bottom-start"},yTe=()=>(0,vc.jsxs)(vc.Fragment,{children:[["bold","italic","link","unknown"].map(e=>(0,vc.jsx)(Jm.Slot,{name:`RichText.ToolbarControls.${e}`},e)),(0,vc.jsx)(Jm.Slot,{name:"RichText.ToolbarControls",children:e=>{if(!e.length)return null;let o=e.map(([{props:r}])=>r).some(({isActive:r})=>r);return(0,vc.jsx)(Jm.ToolbarItem,{children:r=>(0,vc.jsx)(Jm.DropdownMenu,{icon:Fn,label:(0,uF.__)("More"),toggleProps:{...r,className:V(r.className,{"is-pressed":o}),description:(0,uF.__)("Displays more block tools")},controls:fa(e.map(([{props:n}])=>n),"title"),popoverProps:vTe})})}})]}),dF=yTe;var Ld=l(w(),1);function STe({popoverAnchor:e}){return(0,Ld.jsx)(HI.Popover,{placement:"top",focusOnMount:!1,anchor:e,className:"block-editor-rich-text__inline-format-toolbar",__unstableSlotName:"block-toolbar",children:(0,Ld.jsx)(Cg,{className:"block-editor-rich-text__inline-format-toolbar-group","aria-label":(0,une.__)("Format tools"),children:(0,Ld.jsx)(HI.ToolbarGroup,{children:(0,Ld.jsx)(dF,{})})})})}var _Te=({inline:e,editableContentElement:t})=>e?(0,Ld.jsx)(STe,{popoverAnchor:t}):(0,Ld.jsx)(Mt,{group:"inline",children:(0,Ld.jsx)(dF,{})}),dne=_Te;var GI=l(P(),1),fne=l(F(),1);function mne({html:e,value:t}){let o=(0,GI.useRef)(),r=!!t.activeFormats?.length,{__unstableMarkLastChangeAsPersistent:n}=(0,fne.useDispatch)(_);(0,GI.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 _b=l(P(),1),One=l(Z(),1);var QS=l(ur(),1),pne=l(rt(),1);var xTe=["`",'"',"'","\u201C\u201D","\u2018\u2019"],hne=e=>t=>{function o(r){let{inputType:n,data:i}=r,{value:s,onChange:a,registry:c}=e.current;if(n!=="insertText"||(0,QS.isCollapsed)(s))return;let u=(0,pne.applyFilters)("blockEditor.wrapSelectionSettings",xTe).find(([x,C])=>x===i||C===i);if(!u)return;let[d,f=d]=u,m=s.start,h=s.end+d.length,p=(0,QS.insert)(s,d,m,m);p=(0,QS.insert)(p,f,h,h);let{__unstableMarkLastChangeAsPersistent:g,__unstableMarkAutomaticChange:b}=c.dispatch(_);g(),a(p),b();let v={};for(let x in r)v[x]=r[x];v.data=f;let{ownerDocument:k}=t,{defaultView:y}=k,S=new y.InputEvent("input",v);window.queueMicrotask(()=>{r.target.dispatchEvent(S)}),r.preventDefault()}return t.addEventListener("beforeinput",o),()=>{t.removeEventListener("beforeinput",o)}};var WI=l(ur(),1),yb=l($(),1);var gne=l(ur(),1);function bne(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,gne.insert)(e,o)}function kne(e){let t=e.length;for(;t--;){let o=Ov(e[t].attributes);if(o)return e[t].attributes[o]=e[t].attributes[o].toString().replace(wl,""),[e[t].clientId,o,0,0];let r=kne(e[t].innerBlocks);if(r)return r}return[]}var vne=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,yb.getBlockTransforms)("from").filter(({type:v})=>v==="prefix"),p=(0,yb.findTransform)(h,({prefix:v})=>m===v);if(!p)return;let g=(0,WI.toHTMLString)({value:(0,WI.insert)(c,wl,0,u)}),b=p.transform(g);return s(...kne([b])),i([b]),a.dispatch(_).__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,yb.getBlockTransforms)("from").filter(y=>y.type==="input"),g=(0,yb.findTransform)(p,y=>y.regExp.test(h.text));if(g){m(g.transform()),f.dispatch(_).__unstableMarkAutomaticChange();return}let b=d.reduce((y,{__unstableInputRule:S})=>(S&&(y=S(y)),y),bne(h)),{__unstableMarkLastChangeAsPersistent:v,__unstableMarkAutomaticChange:k}=f.dispatch(_);b!==h&&(v(),c({...b,activeFormats:h.activeFormats}),k())}return t.addEventListener("input",r),t.addEventListener("compositionend",r),()=>{t.removeEventListener("input",r),t.removeEventListener("compositionend",r)}};var yne=e=>t=>{function o(r){if(r.inputType!=="insertReplacementText")return;let{registry:n}=e.current;n.dispatch(_).__unstableMarkLastChangeAsPersistent()}return t.addEventListener("beforeinput",o),()=>{t.removeEventListener("beforeinput",o)}};var $I=l(it(),1),Sne=()=>e=>{function t(o){($I.isKeyboardEvent.primary(o,"z")||$I.isKeyboardEvent.primary(o,"y")||$I.isKeyboardEvent.primaryShift(o,"z"))&&o.preventDefault()}return e.addEventListener("keydown",t),()=>{e.removeEventListener("keydown",t)}};var _ne=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 xne=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 KI=l(it(),1);var wne=e=>t=>{function o(r){let{keyCode:n}=r;if(r.defaultPrevented||n!==KI.BACKSPACE&&n!==KI.ESCAPE)return;let{registry:i}=e.current,{didAutomaticChange:s,getSettings:a}=i.select(_),{__experimentalUndo:c}=a();c&&s()&&(r.preventDefault(),c())}return t.addEventListener("keydown",o),()=>{t.removeEventListener("keydown",o)}};var Bne=l($(),1),Wa=l(ur(),1),Ene=l(un(),1);var wTe=l(P(),1),CTe=l($(),1),BTe=l(w(),1);function Cne(e,t){if(t?.length){let o=e.formats.length;for(;o--;)e.formats[o]=[...t,...e.formats[o]||[]]}}function YI(e){if(!(e!==!0&&e!=="p"&&e!=="li"))return e===!0?"p":e}function Sb({allowedFormats:e,disableFormats:t}){return t?Sb.EMPTY_ARRAY:e}Sb.EMPTY_ARRAY=[];var Tne=e=>t=>{function o(n){let{disableFormats:i,onChange:s,value:a,formatTypes:c,tagName:u,onReplace:d,__unstableEmbedURLOnPaste:f,preserveWhiteSpace:m,pastePlainText:h}=e.current;if(!t.contains(n.target)||n.defaultPrevented)return;let{plainText:p,html:g}=Oh(n);if(n.preventDefault(),window.console.log(`Received HTML (RichText):

`,g),window.console.log(`Received plain text (RichText):

`,p),i){s((0,Wa.insert)(a,p));return}let b=n.clipboardData.getData("rich-text")==="true";function v(x){let C=c.reduce((B,{__unstablePasteRule:I})=>(I&&B===a&&(B=I(a,{html:g,plainText:p})),B),a);if(C!==a)s(C);else{let B=(0,Wa.create)({html:x});Cne(B,a.activeFormats),s((0,Wa.insert)(a,B))}}if(b){v(g);return}if(h){s((0,Wa.insert)(a,(0,Wa.create)({text:p})));return}let k="INLINE",y=p.trim();f&&(0,Wa.isEmpty)(a)&&(0,Ene.isURL)(y)&&/^https?:/.test(y)&&(k="BLOCKS");let S=(0,Bne.pasteHandler)({HTML:g,plainText:p,mode:k,tagName:u,preserveWhiteSpace:m});typeof S=="string"?v(S):S.length>0&&d&&(0,Wa.isEmpty)(a)&&d(S,S.length-1,-1)}let{defaultView:r}=t.ownerDocument;return r.addEventListener("paste",o),()=>{r.removeEventListener("paste",o)}};var JS=l(it(),1),qI=l(ur(),1),Ine=e=>t=>{function o(r){let{keyCode:n}=r;if(r.defaultPrevented)return;let{value:i,onMerge:s,onRemove:a}=e.current;if(n===JS.DELETE||n===JS.BACKSPACE){let{start:c,end:u,text:d}=i,f=n===JS.BACKSPACE,m=i.activeFormats&&!!i.activeFormats.length;if(!(0,qI.isCollapsed)(i)||m||f&&c!==0||!f&&u!==d.length)return;s?s(!f):a&&(0,qI.isEmpty)(i)&&f&&a(!f),r.preventDefault()}}return t.addEventListener("keydown",o),()=>{t.removeEventListener("keydown",o)}};var fF=l(it(),1),e_=l(ur(),1),Pne=e=>t=>{function o(i){if(i.keyCode!==fF.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!==fF.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,e_.insert)(s,`
`)):u&&h===p&&p===m.length?u():d&&h===p&&p===m.length&&m.slice(-2)===`

`?f.batch(()=>{let g={...s};g.start=g.end-2,a((0,e_.remove)(g)),d()}):c||a((0,e_.insert)(s,`
`))}let{defaultView:n}=t.ownerDocument;return n.addEventListener("keydown",r),t.addEventListener("keydown",o),()=>{n.removeEventListener("keydown",r),t.removeEventListener("keydown",o)}};var Rne=e=>t=>{function o(){let{registry:r}=e.current;if(!r.select(_).isMultiSelecting())return;let n=t.parentElement.closest('[contenteditable="true"]');n&&n.focus()}return t.addEventListener("focus",o),()=>{t.removeEventListener("focus",o)}};var ETe=[hne,vne,yne,Sne,_ne,xne,wne,Tne,Ine,Pne,Rne];function ZI(e){let t=(0,_b.useRef)(e);(0,_b.useInsertionEffect)(()=>{t.current=e});let o=(0,_b.useMemo)(()=>ETe.map(r=>r(t)),[t]);return(0,One.useRefEffect)(r=>{if(!e.isSelected)return;let n=o.map(i=>i(r));return()=>{n.forEach(i=>i())}},[o,e.isSelected])}var XI=l(ur(),1),QI=l(P(),1);var Ane=l(w(),1),Lne=l(zr(),1),TTe={},mF=Symbol("usesContext");function ITe({onChange:e,onFocus:t,value:o,forwardedRef:r,settings:n,isVisible:i}){let{name:s,edit:a,[mF]:c}=n,u=(0,QI.useContext)(cn),d=(0,QI.useMemo)(()=>c?Object.fromEntries(Object.entries(u).filter(([g])=>c.includes(g))):TTe,[c,u]);if(!a)return null;let f=(0,XI.getActiveFormat)(o,s),m=f!==void 0,h=(0,XI.getActiveObject)(o),p=h!==void 0&&h.type===s;return(0,Ane.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 JI({formatTypes:e,...t}){return e.map(o=>(0,Lne.createElement)(ITe,{settings:o,...t,key:o.name}))}var Nne=l(P(),1),Mne=l($(),1),Dne=l(Re(),1);var pF=l(w(),1);function hF(e,t){if(xb.isEmpty(e)){let o=YI(t);return o?`<${o}></${o}>`:""}return Array.isArray(e)?((0,Dne.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/"}),Mne.children.toHTML(e)):typeof e=="string"?e:e.toHTMLString()}function t_({value:e,tagName:t,multiline:o,format:r,...n}){return e=(0,pF.jsx)(Nne.RawHTML,{children:hF(e,o)}),t?(0,pF.jsx)(t,{...n,children:e}):e}var Une=l(P(),1),bF=l($(),1),Hne=l(ur(),1),Gne=l(Re(),1);var Vne=l(P(),1),Fne=l(Re(),1),eP=l(F(),1),zne=l(it(),1),wb=l(ur(),1);var gF=l(w(),1);function PTe({children:e,identifier:t,tagName:o="div",value:r="",onChange:n,multiline:i,...s},a){(0,Fne.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,eP.useSelect)(_),{selectionChange:f}=(0,eP.useDispatch)(_),m=YI(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,gF.jsx)(o,{ref:a,children:p.map((b,v)=>(0,gF.jsx)(tP,{identifier:`${t}-${v}`,tagName:m,value:b,onChange:k=>{let y=p.slice();y[v]=k,g(y)},isSelected:void 0,onKeyDown:k=>{if(k.keyCode!==zne.ENTER)return;k.preventDefault();let{offset:y}=u(),{offset:S}=d();if(typeof y!="number"||typeof S!="number")return;let x=(0,wb.create)({html:b});x.start=y,x.end=S;let C=(0,wb.split)(x).map(I=>(0,wb.toHTMLString)({value:I})),B=p.slice();B.splice(v,1,...C),g(B),f(c,`${t}-${v+1}`,0,0)},onMerge:k=>{let y=p.slice(),S=0;if(k){if(!y[v+1])return;y.splice(v,2,y[v]+y[v+1]),S=y[v].length-1}else{if(!y[v-1])return;y.splice(v-1,2,y[v-1]+y[v]),S=y[v-1].length-1}g(y),f(c,`${t}-${v-(k?0:1)}`,S,S)},...s},v))})}var jne=(0,Vne.forwardRef)(PTe);var Wne=l(w(),1);function $ne(e){return(0,Une.forwardRef)((t,o)=>{let r=t.value,n=t.onChange;Array.isArray(r)&&((0,Gne.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=bF.children.toHTML(t.value),n=s=>t.onChange(bF.children.fromDOM((0,Hne.__unstableCreateElement)(document,s).childNodes)));let i=t.multiline?jne:e;return(0,Wne.jsx)(i,{...t,value:r,onChange:n,ref:o})})}var Kne=l(it(),1),Cb=l(P(),1);function kF({character:e,type:t,onUse:o}){let r=(0,Cb.useContext)(Bb),n=(0,Cb.useRef)();return n.current=o,(0,Cb.useEffect)(()=>{function i(s){Kne.isKeyboardEvent[t](s,e)&&(n.current(),s.preventDefault())}return r.current.add(i),()=>{r.current.delete(i)}},[e,t]),null}var oP=l(A(),1),Yne=l(it(),1),vF=l(w(),1);function yF({name:e,shortcutType:t,shortcutCharacter:o,...r}){let n,i="RichText.ToolbarControls";return e&&(i+=`.${e}`),t&&o&&(n=Yne.displayShortcut[t](o)),(0,vF.jsx)(oP.Fill,{name:i,children:(0,vF.jsx)(oP.ToolbarButton,{...r,shortcut:n})})}var Eb=l(P(),1);function SF({inputType:e,onInput:t}){let o=(0,Eb.useContext)(Tb),r=(0,Eb.useRef)();return r.current=t,(0,Eb.useEffect)(()=>{function n(i){i.inputType===e&&(r.current(),i.preventDefault())}return o.current.add(n),()=>{o.current.delete(n)}},[e]),null}var ci=l(w(),1),{useRichText:RTe}=M(Xne.privateApis),Bb=(0,rr.createContext)();Bb.displayName="keyboardShortcutContext";var Tb=(0,rr.createContext)();Tb.displayName="inputEventContext";var qne=Symbol("instanceId");function tie(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 tP({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:v,identifier:k,preserveWhiteSpace:y,__unstablePastePlainText:S,__unstableEmbedURLOnPaste:x,__unstableDisableFormats:C,disableLineBreaks:B,__unstableAllowPrefixTransformations:I,readOnly:O,...E},L){E=tie(E),g&&(0,eie.default)("wp.blockEditor.RichText onSplit prop",{since:"6.4",alternative:'block.json support key: "splitting"'});let T=(0,rP.useInstanceId)(tP),R=(0,rr.useRef)(),[D,j]=(0,rr.useState)(null),G=Pe(),{clientId:z,isSelected:H,name:W}=G,te=G[Op],ne=(0,rr.useContext)(cn),ae=(0,Nd.useRegistry)(),X=eo=>{if(!H)return{isSelected:!1};let{getSelectionStart:Bo,getSelectionEnd:Xe}=eo(_),Ve=Bo(),bt=Xe(),Eo;return n===void 0?Eo=Ve.clientId===z&&bt.clientId===z&&(k?Ve.attributeKey===k:Ve[qne]===T):n&&(Eo=Ve.clientId===z),{selectionStart:Eo?Ve.offset:void 0,selectionEnd:Eo?bt.offset:void 0,isSelected:Eo}},{selectionStart:ee,selectionEnd:le,isSelected:Q}=(0,Nd.useSelect)(X,[z,k,T,n,H]),{disableBoundBlock:J,bindingsPlaceholder:q,bindingsLabel:U}=(0,Nd.useSelect)(eo=>{if(!te?.[k])return{};let{__experimentalBlockBindingsSupportedAttributes:Bo}=eo(_).getSettings();if(!Bo?.[W])return{};let Ve=te[k],bt=(0,Jne.getBlockBindingsSource)(Ve.source),Eo={};if(bt?.usesContext?.length)for(let ut of bt.usesContext)Eo[ut]=ne[ut];let lr=!bt?.canUserEditValue?.({select:eo,context:Eo,args:Ve.args});if(o.length>0)return{disableBoundBlock:lr,bindingsPlaceholder:null,bindingsLabel:null};let{getBlockAttributes:ge}=eo(_),Ct=ge(z),To=null;bt?.getFieldsList&&(To=bt.getFieldsList({select:eo,context:Eo})?.find(Gc=>(0,Zne.default)(Gc.args,Ve?.args))?.label);let Ye=To??bt?.label,oe=lr?Ye:(0,Ib.sprintf)((0,Ib.__)("Add %s"),Ye),Ae=lr?Ve?.args?.key||bt?.label:(0,Ib.sprintf)((0,Ib.__)("Empty %s; start writing to edit its value"),Ve?.args?.key||bt?.label);return{disableBoundBlock:lr,bindingsPlaceholder:Ct?.placeholder||oe,bindingsLabel:Ae}},[te,k,W,o,z,ne]),K=!!ne?.["pattern/overrides"],se=te?.__default?.source==="core/pattern-overrides",Se=O||J||K&&!se,{getSelectionStart:he,getSelectionEnd:we,getBlockRootClientId:De}=(0,Nd.useSelect)(_),{selectionChange:ct}=(0,Nd.useDispatch)(_),Jt=Sb({allowedFormats:f,disableFormats:C}),uo=!Jt||Jt.length>0,Do=(0,rr.useCallback)((eo,Bo)=>{let Xe={},Ve=eo===void 0&&Bo===void 0,bt={clientId:z,[k?"attributeKey":qne]:k||T};if(typeof eo=="number"||Ve){if(Bo===void 0&&De(z)!==De(we().clientId))return;Xe.start={...bt,offset:eo}}if(typeof Bo=="number"||Ve){if(eo===void 0&&De(z)!==De(he().clientId))return;Xe.end={...bt,offset:Bo}}ct(Xe)},[z,De,we,he,k,T,ct]),{value:ot,getValue:sr,onChange:ze,ref:wt,formatTypes:je}=RTe({value:o,onChange:r,selectionStart:ee,selectionEnd:le,onSelectionChange:Do,placeholder:q||d,__unstableIsSelected:Q,__unstableDisableFormats:C,preserveWhiteSpace:y,__unstableDependencies:[t],allowedFormats:Jt,withoutInteractiveFormatting:m,__unstableFormatTypeHandlerContext:(0,rr.useMemo)(()=>({richTextIdentifier:k,blockClientId:z}),[k,z])}),At=jU({onReplace:u,completers:c,record:ot,onChange:ze});mne({html:o,value:ot});let ar=(0,rr.useRef)(new Set),Ue=(0,rr.useRef)(new Set);function Lr(){R.current?.focus()}let ki=t;return(0,ci.jsxs)(ci.Fragment,{children:[Q&&(0,ci.jsx)(Bb.Provider,{value:ar,children:(0,ci.jsx)(Tb.Provider,{value:Ue,children:(0,ci.jsxs)(Qne.Popover.__unstableSlotNameProvider,{value:"__unstable-block-tools-after",children:[e&&e({value:ot,onChange:ze,onFocus:Lr}),(0,ci.jsx)(JI,{value:ot,onChange:ze,onFocus:Lr,formatTypes:je,forwardedRef:R})]})})}),Q&&uo&&(0,ci.jsx)(dne,{inline:s,editableContentElement:D}),(0,ci.jsx)(ki,{role:"textbox","aria-multiline":!B,"aria-readonly":Se,...E,draggable:void 0,"aria-label":U||E["aria-label"]||d,...At,ref:(0,rP.useMergeRefs)([wt,L,At.ref,E.ref,ZI({registry:ae,getValue:sr,onChange:ze,__unstableAllowPrefixTransformations:I,formatTypes:je,onReplace:u,selectionChange:ct,isSelected:Q,disableFormats:C,value:ot,tagName:t,onSplit:g,__unstableEmbedURLOnPaste:x,pastePlainText:S,onMerge:p,onRemove:h,disableLineBreaks:B,onSplitAtEnd:b,onSplitAtDoubleLineEnd:v,keyboardShortcuts:ar,inputEvents:Ue}),R,j]),contentEditable:!Se,suppressContentEditableWarning:!0,className:V("block-editor-rich-text__editable",E.className,"rich-text"),tabIndex:E.tabIndex===0&&!Se?null:E.tabIndex,"data-wp-block-attribute-key":k})]})}var o_=$ne((0,rr.forwardRef)(tP));o_.Content=t_;o_.isEmpty=e=>!e||e.length===0;var _F=(0,rr.forwardRef)((e,t)=>{if(Pe()[a0]){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:v,onMerge:k,onSplit:y,__unstableOnSplitAtEnd:S,__unstableOnSplitAtDoubleLineEnd:x,identifier:C,preserveWhiteSpace:B,__unstablePastePlainText:I,__unstableEmbedURLOnPaste:O,__unstableDisableFormats:E,disableLineBreaks:L,__unstableAllowPrefixTransformations:T,readOnly:R,...D}=tie(e);return(0,ci.jsx)(i,{ref:t,...D,dangerouslySetInnerHTML:{__html:hF(s,u)||"<br>"}})}return(0,ci.jsx)(o_,{ref:t,...e,readOnly:!1})});_F.Content=t_;_F.isEmpty=e=>!e||e.length===0;var xb=_F;var xF=l(w(),1),rie=(0,oie.forwardRef)((e,t)=>(0,xF.jsx)(xb,{ref:t,...e,__unstableDisableFormats:!0}));rie.Content=function({value:t="",tagName:o="div",...r}){return(0,xF.jsx)(o,{...r,children:t})};var nie=rie;var wF=l(w(),1),OTe=(0,sie.forwardRef)(({__experimentalVersion:e,...t},o)=>{if(e===2)return(0,wF.jsx)(nie,{ref:o,...t});let{className:r,onChange:n,...i}=t;return(0,wF.jsx)(iie.default,{ref:o,className:V("block-editor-plain-text",r),onChange:s=>n(s.target.value),...i})}),aie=OTe;var $a=l(N(),1),uie=l(P(),1),die=l(A(),1);var lie=l(Z(),1),cie=l(A(),1),nP=l(N(),1),ep=l(w(),1);function iP({property:e,viewport:t,desc:o}){let r=(0,lie.useInstanceId)(iP),n=o||(0,nP.sprintf)((0,nP._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,ep.jsxs)(ep.Fragment,{children:[(0,ep.jsx)("span",{"aria-describedby":`rbc-desc-${r}`,children:t.label}),(0,ep.jsx)(cie.VisuallyHidden,{as:"span",id:`rbc-desc-${r}`,children:n})]})}var Ka=l(w(),1);function ATe(e){let{title:t,property:o,toggleLabel:r,onIsResponsiveChange:n,renderDefaultControl:i,renderResponsiveControls:s,isResponsive:a=!1,defaultLabel:c={id:"all",label:(0,$a._x)("All","screen sizes")},viewports:u=[{id:"small",label:(0,$a.__)("Small screens")},{id:"medium",label:(0,$a.__)("Medium screens")},{id:"large",label:(0,$a.__)("Large screens")}]}=e;if(!t||!o||!i)return null;let d=r||(0,$a.sprintf)((0,$a.__)("Use the same %s on all screen sizes."),o),f=(0,$a.__)("Choose whether to use the same value for all screen sizes or a unique value for each screen size."),m=i((0,Ka.jsx)(iP,{property:o,viewport:c}),c),h=()=>u.map(p=>(0,Ka.jsx)(uie.Fragment,{children:i((0,Ka.jsx)(iP,{property:o,viewport:p}),p)},p.id));return(0,Ka.jsxs)("fieldset",{className:"block-editor-responsive-block-control",children:[(0,Ka.jsx)("legend",{className:"block-editor-responsive-block-control__title",children:t}),(0,Ka.jsxs)("div",{className:"block-editor-responsive-block-control__inner",children:[(0,Ka.jsx)(die.ToggleControl,{className:"block-editor-responsive-block-control__toggle",label:d,checked:!a,onChange:n,help:f}),(0,Ka.jsxs)("div",{className:V("block-editor-responsive-block-control__group",{"is-responsive":a}),children:[!a&&m,a&&(s?s(u):h())]})]})]})}var fie=ATe;var sP=l(A(),1);var mie=l(w(),1);function pie({units:e,...t}){let[o]=me("spacing.units"),r=(0,sP.__experimentalUseCustomUnits)({availableUnits:o||["%","px","em","rem","vw"],units:e});return(0,mie.jsx)(sP.__experimentalUnitControl,{units:r,...t})}var r_=l(N(),1),hie=l(P(),1),Pb=l(A(),1);var Ya=l(w(),1);function LTe({url:e,onChange:t}){let[o,r]=(0,hie.useReducer)(i=>!i,!1),n=i=>{i.preventDefault(),r()};return(0,Ya.jsxs)("div",{className:"block-editor-url-input__button",children:[(0,Ya.jsx)(Pb.Button,{size:"compact",icon:dn,label:e?(0,r_.__)("Edit link"):(0,r_.__)("Insert link"),onClick:r,className:"components-toolbar__control",isPressed:!!e}),o&&(0,Ya.jsx)("form",{className:"block-editor-url-input__button-modal",onSubmit:n,children:(0,Ya.jsxs)("div",{className:"block-editor-url-input__button-modal-line",children:[(0,Ya.jsx)(Pb.Button,{__next40pxDefaultSize:!0,className:"block-editor-url-input__back",icon:qk,label:(0,r_.__)("Close"),onClick:r}),(0,Ya.jsx)(Ed,{value:e||"",onChange:t,suffix:(0,Ya.jsx)(Pb.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,Ya.jsx)(Pb.Button,{size:"small",icon:bl,label:(0,r_.__)("Submit"),type:"submit"})})})]})})]})}var gie=LTe;var Tn=l(N(),1),rs=l(P(),1),Sie=l(Fe(),1),Ho=l(A(),1);var _ie=l(un(),1);var St=l(w(),1),CF="none",bie="custom",kie="media",vie="attachment",yie=["noreferrer","noopener"],xie=({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,rs.useState)(!1),[g,b]=(0,rs.useState)(null),v=()=>{p(!0)},[k,y]=(0,rs.useState)(!1),[S,x]=(0,rs.useState)(null),C=(0,rs.useRef)(null),B=(0,rs.useRef)();(0,rs.useEffect)(()=>{if(!B.current)return;(Sie.focus.focusable.find(B.current)[0]||B.current).focus()},[k,o,d]);let I=()=>{(e===kie||e===vie)&&x(""),y(!0)},O=()=>{y(!1)},E=()=>{x(null),O(),p(!1)},L=Q=>{let J=Q?"_blank":void 0,q;if(J){let U=(c??"").split(" ");yie.forEach(K=>{U.includes(K)||U.push(K)}),q=U.join(" ")}else{let U=(c??"").split(" ").filter(K=>yie.includes(K)===!1);q=U.length?U.join(" "):void 0}return{linkTarget:J,rel:q}},T=()=>Q=>{let J=C.current;J&&J.contains(Q.target)||(p(!1),x(null),O())},R=()=>Q=>{if(S){let J=j().find(q=>q.url===S)?.linkDestination||bie;t({href:(0,_ie.prependHTTPS)(S),linkDestination:J,lightbox:{enabled:!1}})}O(),x(null),Q.preventDefault()},D=()=>{t({linkDestination:CF,href:""})},j=()=>{let Q=[{linkDestination:kie,title:(0,Tn.__)("Link to image file"),url:r==="image"?n:void 0,icon:rv}];return r==="image"&&i&&Q.push({linkDestination:vie,title:(0,Tn.__)("Link to attachment page"),url:r==="image"?i:void 0,icon:kl}),Q},G=Q=>{let J=j(),q;Q?q=(J.find(U=>U.url===Q)||{linkDestination:bie}).linkDestination:q=CF,t({linkDestination:q,href:Q})},z=Q=>{let J=L(Q);t(J)},H=Q=>{t({rel:Q})},W=Q=>{t({linkClass:Q})},te=(0,St.jsxs)(Ho.__experimentalVStack,{spacing:"3",children:[(0,St.jsx)(Ho.ToggleControl,{label:(0,Tn.__)("Open in new tab"),onChange:z,checked:s==="_blank"}),(0,St.jsx)(Ho.TextControl,{__next40pxDefaultSize:!0,label:(0,Tn.__)("Link relation"),value:c??"",onChange:H,help:(0,rs.createInterpolateElement)((0,Tn.__)("The <a>Link Relation</a> attribute defines the relationship between a linked resource and the current document."),{a:(0,St.jsx)(Ho.ExternalLink,{href:"https://developer.mozilla.org/docs/Web/HTML/Attributes/rel"})})}),(0,St.jsx)(Ho.TextControl,{__next40pxDefaultSize:!0,label:(0,Tn.__)("Link CSS class"),value:a||"",onChange:W})]}),ne=S!==null?S:o,ae=!d||d&&!u,X=!ne&&ae,ee=(j().find(Q=>Q.linkDestination===e)||{}).title,le=()=>{if(d&&u&&!o&&!k)return(0,St.jsxs)("div",{className:"block-editor-url-popover__expand-on-click",children:[(0,St.jsx)(xe,{icon:lx}),(0,St.jsxs)("div",{className:"text",children:[(0,St.jsx)("p",{children:(0,Tn.__)("Enlarge on click")}),(0,St.jsx)("p",{className:"description",children:(0,Tn.__)("Scales the image with a lightbox effect")})]}),(0,St.jsx)(Ho.Button,{icon:xi,label:(0,Tn.__)("Disable enlarge on click"),onClick:()=>{f?.(!1)},size:"compact"})]});if(!o||k)return(0,St.jsx)(Od.LinkEditor,{className:"block-editor-format-toolbar__link-container-content",value:ne,onChangeInputValue:x,onSubmit:R(),autocompleteRef:C});if(o&&!k)return(0,St.jsxs)(St.Fragment,{children:[(0,St.jsx)(Od.LinkViewer,{className:"block-editor-format-toolbar__link-container-content",url:o,onEditLinkClick:I,urlLabel:ee}),(0,St.jsx)(Ho.Button,{icon:xi,label:(0,Tn.__)("Remove link"),onClick:()=>{D(),m?.()},size:"compact"})]})};return(0,St.jsxs)(St.Fragment,{children:[(0,St.jsx)(Ho.ToolbarButton,{icon:dn,className:"components-toolbar__control",label:(0,Tn.__)("Link"),"aria-expanded":h,onClick:v,ref:b,isActive:!!o||d&&u}),h&&(0,St.jsx)(Od,{ref:B,anchor:g,onFocusOutside:T(),onClose:E,renderSettings:ae?()=>te:null,additionalControls:X&&(0,St.jsxs)(Ho.NavigableMenu,{children:[j().map(Q=>(0,St.jsx)(Ho.MenuItem,{icon:Q.icon,iconPosition:"left",onClick:()=>{x(null),G(Q.url),O()},children:Q.title},Q.linkDestination)),u&&(0,St.jsx)(Ho.MenuItem,{className:"block-editor-url-popover__expand-on-click",icon:lx,info:(0,Tn.__)("Scale the image with a lightbox effect."),iconPosition:"left",onClick:()=>{x(null),t({linkDestination:CF,href:""}),f?.(!0),O()},children:(0,Tn.__)("Enlarge on click")},"expand-on-click")]}),offset:13,children:le()})]})};var Ob=l(A(),1),Die=l(P(),1),cP=l(N(),1);var wie=l(P(),1),EF=l(N(),1);var BF=[],NTe=new Intl.Collator("und",{numeric:!0}).compare;function aP(){let[e,t,o,r]=me("spacing.spacingSizes.custom","spacing.spacingSizes.theme","spacing.spacingSizes.default","spacing.defaultSpacingSizes"),n=e??BF,i=t??BF,s=o&&r!==!1?o:BF;return(0,wie.useMemo)(()=>{let a=[{name:(0,EF.__)("None"),slug:"0",size:0},...n,...i,...s];return a.every(({slug:c})=>/^[0-9]/.test(c))&&a.sort((c,u)=>NTe(c.slug,u.slug)),a.length>HU?[{name:(0,EF.__)("Default"),slug:"default",size:void 0},...a]:a},[n,i,s])}var Cie=l(P(),1),Bie=l(F(),1),lP=l(N(),1),Eie=l(A(),1);var Tie=l(w(),1),MTe={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 Rb({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,Bie.useSelect)(S=>S(_).getSettings()?.disableCustomSpacingSizes),[h]=me("spacing.units"),p=(0,Eie.__experimentalUseCustomUnits)({availableUnits:h||["px","em","rem"]}),g=(0,Cie.useMemo)(()=>c?.map(S=>({name:S.name,slug:S.slug,size:S.size}))||[],[c]),b=(Su.includes(a)||["vertical","horizontal"].includes(a))&&s?pa[a]:"",v=s?u?.toLowerCase():u,k=(0,lP.sprintf)((0,lP._x)("%1$s %2$s","spacing"),b,v).trim(),y=p[0]?.value||"px";return(0,Tie.jsx)(zm,{allowNegativeOnDrag:o<0,ariaLabel:k,className:"spacing-sizes-control",customValueSettings:MTe,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 n_=l(w(),1),Iie=["vertical","horizontal"];function Pie({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]=ah(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?Iie.filter(d=>gM(n,d)):Iie;return(0,n_.jsx)(n_.Fragment,{children:u.map(d=>{let f=d==="vertical"?a.top:a.left;return(0,n_.jsx)(Rb,{icon:Qw[d],label:pa[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 i_=l(w(),1);function Rie({minimumCustomValue:e,onChange:t,onMouseOut:o,onMouseOver:r,sides:n,spacingSizes:i,type:s,values:a}){let c=n?.length?Su.filter(d=>n.includes(d)):Su,u=d=>f=>{let m={...Object.keys(a).reduce((h,p)=>(h[p]=ah(a[p],i),h),{})};m[d]=f,t(m)};return(0,i_.jsx)(i_.Fragment,{children:c.map(d=>(0,i_.jsx)(Rb,{icon:Qw[d],label:pa[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 Oie=l(w(),1);function Aie({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]=ah(c[p],s),h),{})};m[d]=f,t(m)};return(0,Oie.jsx)(Rb,{label:pa[i],minimumCustomValue:e,onChange:u(i),onMouseOut:o,onMouseOver:r,showSideInLabel:n,side:i,spacingSizes:s,type:a,value:c[i],withInputField:!1})}var Lie=l(A(),1);var TF=l(N(),1),Nie=l(w(),1);function Mie({isLinked:e,...t}){let o=e?(0,TF.__)("Unlink sides"):(0,TF.__)("Link sides");return(0,Nie.jsx)(Lie.Button,{...t,size:"small",icon:e?dn:xi,iconSize:24,label:o})}var qa=l(w(),1);function Ab({inputProps:e,label:t,minimumCustomValue:o=0,onChange:r,onMouseOut:n,onMouseOver:i,showSideInLabel:s=!0,sides:a=Su,useSelect:c,values:u}){let d=aP(),f=u||GU,m=a?.length===1,h=a?.includes("horizontal")&&a?.includes("vertical")&&a?.length===2,[p,g]=(0,Die.useState)($U(f,a)),b=()=>{g(p===Cl.axial?Cl.custom:Cl.axial)},k={...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===Cl.axial?(0,qa.jsx)(Pie,{...k}):p===Cl.custom?(0,qa.jsx)(Rie,{...k}):(0,qa.jsx)(Aie,{side:p,...k,showSideInLabel:s}),S=Su.includes(p)&&s?pa[p]:"",x=(0,cP.sprintf)((0,cP._x)("%1$s %2$s","spacing"),t,S).trim();return(0,qa.jsxs)("fieldset",{className:"spacing-sizes-control",children:[(0,qa.jsxs)(Ob.__experimentalHStack,{className:"spacing-sizes-control__header",children:[(0,qa.jsx)(Ob.BaseControl.VisualLabel,{as:"legend",className:"spacing-sizes-control__label",children:x}),!m&&!h&&(0,qa.jsx)(Mie,{label:t,onClick:b,isLinked:p===Cl.axial})]}),(0,qa.jsx)(Ob.__experimentalVStack,{spacing:.5,children:y()})]})}var Vie=l(Re(),1);function Fie(){return(0,Vie.default)("wp.blockEditor.PreviewOptions",{version:"6.5"}),null}var uP=l(P(),1);function zie(e){let[t,o]=(0,uP.useState)(window.innerWidth);(0,uP.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 Xb=l(N(),1),Fd=l($(),1),Rae=l(A(),1),QF=l(F(),1),Oae=l(P(),1);var Lb=l(A(),1),dP=l(N(),1),jie=l(F(),1),fP=l($(),1);var tp=l(w(),1);function DTe({block:e,onNavigateToEntityRecord:t,isSyncedPattern:o,isTemplatePartBlock:r}){let n=e?.attributes||{};return(0,tp.jsx)(Lb.__experimentalVStack,{className:"block-editor-block-inspector-edit-contents",expanded:!0,children:(0,tp.jsx)(Lb.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,dP.__)("Edit original")})})}function VTe({clientId:e,editedContentOnlySection:t,editContentOnlySection:o,stopEditingContentOnlySection:r}){return(0,tp.jsx)(Lb.__experimentalVStack,{className:"block-editor-block-inspector-edit-contents",expanded:!0,children:(0,tp.jsx)(Lb.Button,{className:"block-editor-block-inspector-edit-contents__button",__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>{t?r():o(e)},children:t?(0,dP.__)("Exit pattern"):(0,dP.__)("Edit pattern")})})}function Uie({clientId:e}){let{isWithinSection:t,isWithinEditedSection:o,editedContentOnlySection:r,editContentOnlySection:n,stopEditingContentOnlySection:i}=rT(e),{block:s,onNavigateToEntityRecord:a}=(0,jie.useSelect)(f=>{let{getBlock:m,getSettings:h}=f(_);return{block:m(e),onNavigateToEntityRecord:h().onNavigateToEntityRecord}},[e]);if(!t&&!o)return null;let c=(0,fP.isReusableBlock)(s),u=(0,fP.isTemplatePart)(s);return(c||u)&&a?(0,tp.jsx)(DTe,{block:s,onNavigateToEntityRecord:a,isSyncedPattern:c,isTemplatePartBlock:u}):(0,tp.jsx)(VTe,{clientId:e,editedContentOnlySection:r,editContentOnlySection:n,stopEditingContentOnlySection:i})}var Hie=l(F(),1),Gie=l(N(),1),Wie=l(A(),1),$ie=l(P(),1);var Kie=l(w(),1);function mP(){let e=(0,Hie.useSelect)(r=>r(_).getBlockSelectionStart(),[]),t=(0,$ie.useRef)();return Wf(e,t),e?(0,Kie.jsx)(Wie.Button,{__next40pxDefaultSize:!0,variant:"secondary",className:"block-editor-skip-to-selected-block",onClick:()=>{t.current?.focus()},children:(0,Gie.__)("Skip to the selected block")}):null}var pP=l(N(),1),Yie=l(F(),1);var qie=l(A(),1);var s_=l(w(),1);function IF(){let e=(0,Yie.useSelect)(t=>t(_).getSelectedBlockCount(),[]);return(0,s_.jsxs)(qie.__experimentalHStack,{justify:"flex-start",spacing:2,className:"block-editor-multi-selection-inspector__card",children:[(0,s_.jsx)(Oe,{icon:wf,showColors:!0}),(0,s_.jsx)("div",{className:"block-editor-multi-selection-inspector__card-title",children:(0,pP.sprintf)((0,pP._n)("%d Block","%d Blocks",e),e)})]})}var Zb=l(A(),1),ta=l(P(),1),wae=l(Xp(),1),qb=l(F(),1);var a_=l(N(),1),hP={name:"settings",title:(0,a_.__)("Settings"),value:"settings",icon:ZO},gP={name:"styles",title:(0,a_.__)("Styles"),value:"styles",icon:fN},bP={name:"content",title:(0,a_.__)("Content"),value:"content",icon:kl},yc={name:"list",title:(0,a_.__)("List View"),value:"list-view",icon:nv};var SP=l(A(),1);var l_=l(A(),1),Zie=l(N(),1);var c_=l(w(),1),FTe=({initialOpen:e=!1})=>{let t=(0,l_.__experimentalUseSlotFills)(od.slotName),o=(0,l_.__experimentalUseSlotFills)(nS.name),r=!!(t&&t.length),n=!!(o&&o.length);return!r&&!n?null:(0,c_.jsxs)(l_.PanelBody,{className:"block-editor-block-inspector__advanced",title:(0,Zie.__)("Advanced"),initialOpen:e,children:[(0,c_.jsx)(fe.Slot,{group:"advanced"}),(0,c_.jsx)(nS.Slot,{})]})},kP=FTe;var Nb=l(A(),1),vP=l(F(),1),PF=l(N(),1);var u_=l(w(),1),zTe=()=>{let{selectedClientIds:e,selectedBlocks:t,hasPositionAttribute:o}=(0,vP.useSelect)(s=>{let{getBlocksByClientId:a,getSelectedBlockClientIds:c}=s(_),u=c(),d=a(u);return{selectedClientIds:u,selectedBlocks:d,hasPositionAttribute:d?.some(({attributes:f})=>!!f?.style?.position?.type)}},[]),{updateBlockAttributes:r}=(0,vP.useDispatch)(_),n=Po();function i(){if(!e?.length||!t?.length)return;let s=Object.fromEntries(t?.map(({clientId:a,attributes:c})=>[a,{style:Ne({...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,u_.jsx)(Nb.__experimentalToolsPanel,{className:"block-editor-block-inspector__position",label:(0,PF.__)("Position"),resetAll:i,dropdownMenuProps:n,children:(0,u_.jsx)(Nb.__experimentalToolsPanelItem,{isShownByDefault:o,label:(0,PF.__)("Position"),hasValue:()=>o,onDeselect:i,children:(0,u_.jsx)(fe.Slot,{group:"position"})})})},jTe=()=>{let e=(0,Nb.__experimentalUseSlotFills)(Wi.position.name);return!(e&&e.length)?null:(0,u_.jsx)(zTe,{})},yP=jTe;var Za=l(w(),1),UTe=({showAdvancedControls:e=!1})=>{let t=(0,SP.__experimentalUseSlotFills)(Wi.default.name),o=(0,SP.__experimentalUseSlotFills)(Wi.position.name),r=(0,SP.__experimentalUseSlotFills)(Wi.bindings.name),n=!!t?.length||!!o?.length||!!r?.length;return(0,Za.jsxs)(Za.Fragment,{children:[(0,Za.jsx)(fe.Slot,{}),(0,Za.jsx)(yP,{}),(0,Za.jsx)(fe.Slot,{group:"bindings"}),e&&(0,Za.jsx)("div",{children:(0,Za.jsx)(kP,{initialOpen:!n})})]})},Xie=UTe;var Kb=l(N(),1),l2=l(F(),1);var v_=l($(),1),zF=l(A(),1),$b=l(P(),1),tae=l(rt(),1),oae=l(F(),1);var FF={};Pp(FF,{AdvancedPanel:()=>WP,BackgroundPanel:()=>XP,BorderPanel:()=>MP,ColorPanel:()=>zP,DimensionsPanel:()=>OP,FiltersPanel:()=>UP,ImageSettingsPanel:()=>$se,TypographyPanel:()=>EP,useHasBackgroundPanel:()=>k_,useHasBorderPanel:()=>NP,useHasBorderPanelControls:()=>m_,useHasColorPanel:()=>FP,useHasDimensionsPanel:()=>RP,useHasFiltersPanel:()=>Hse,useHasImageSettingsPanel:()=>Wse,useHasTypographyPanel:()=>BP,useSettingsForBlockElement:()=>xP});var _P=l(P(),1),Qie=l(F(),1),RF=l($(),1),op=l(N(),1);function xP(e,t,o){let{supportedStyles:r,supports:n}=(0,Qie.useSelect)(i=>({supportedStyles:M(i(RF.store)).getSupportedStyles(t,o),supports:i(RF.store).getBlockType(t)?.supports}),[t,o]);return(0,_P.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")||(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","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","backgroundSize"].forEach(s=>{r.includes(s)||(i.background={...i.background,[s]:!1})}),i.shadow=r.includes("shadow")?i.shadow:!1,i},[e,r,n])}function Xa(e){let t=e?.color?.palette?.custom,o=e?.color?.palette?.theme,r=e?.color?.palette?.default,n=e?.color?.defaultPalette;return(0,_P.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 d_(e){let t=e?.color?.gradients?.custom,o=e?.color?.gradients?.theme,r=e?.color?.gradients?.default,n=e?.color?.defaultGradients;return(0,_P.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 io=l(A(),1),No=l(N(),1),Db=l(P(),1);var Mb=l(N(),1);var Jie=l(P(),1),wP=l(A(),1),OF=l(w(),1),HTe=[{label:(0,Mb.__)("Align text left"),value:"left",icon:Jc},{label:(0,Mb.__)("Align text center"),value:"center",icon:yf},{label:(0,Mb.__)("Align text right"),value:"right",icon:eu},{label:(0,Mb.__)("Justify text"),value:"justify",icon:BO}],GTe=["left","center","right"];function CP({className:e,value:t,onChange:o,options:r=GTe}){let n=(0,Jie.useMemo)(()=>HTe.filter(i=>r.includes(i.value)),[r]);return n.length?(0,OF.jsx)(wP.__experimentalToggleGroupControl,{isDeselectable:!0,__next40pxDefaultSize:!0,label:(0,Mb.__)("Text alignment"),className:V("block-editor-text-alignment-control",e),value:t,onChange:i=>{o(i===t?void 0:i)},children:n.map(i=>(0,OF.jsx)(wP.__experimentalToggleGroupControlOptionIcon,{value:i.value,icon:i.icon,label:i.label},i.value))}):null}var Lo=l(A(),1),f_=l(N(),1);var ns=l(w(),1);function ese({__next40pxDefaultSize:e=!1,value:t,onChange:o,__unstableInputWidth:r="60px",withSlider:n=!1,hasBottomMargin:i=!1,help:s,...a}){let[c]=me("spacing.units"),u=(0,Lo.__experimentalUseCustomUnits)({availableUnits:c||["px","em","rem","ch","%","vw","vh"],defaultValues:{px:16,em:2,rem:2,ch:2}}),[d,f]=(0,Lo.__experimentalParseQuantityAndUnitFromRawValue)(t,u),m=!!f&&["em","rem","%","ch","vw","vh"].includes(f);return n?(0,ns.jsxs)(Lo.__experimentalView,{style:i?{marginBottom:12}:void 0,children:[(0,ns.jsx)(Lo.BaseControl.VisualLabel,{children:(0,f_.__)("Line indent")}),(0,ns.jsxs)(Lo.Flex,{children:[(0,ns.jsx)(Lo.FlexItem,{isBlock:!0,children:(0,ns.jsx)(Lo.__experimentalUnitControl,{__next40pxDefaultSize:e,__shouldNotWarnDeprecated36pxSize:!0,label:(0,f_.__)("Line indent"),labelPosition:"top",hideLabelFromVision:!0,value:t,onChange:o,size:a.size,units:u,__unstableInputWidth:r,min:0})}),n&&(0,ns.jsx)(Lo.FlexItem,{isBlock:!0,children:(0,ns.jsx)(Lo.__experimentalSpacer,{marginX:2,marginBottom:0,children:(0,ns.jsx)(Lo.RangeControl,{__next40pxDefaultSize:e,__shouldNotWarnDeprecated36pxSize:!0,label:(0,f_.__)("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,ns.jsx)("p",{className:"components-base-control__help",children:s})]}):(0,ns.jsx)(Lo.__experimentalUnitControl,{__next40pxDefaultSize:e,__shouldNotWarnDeprecated36pxSize:!0,...a,label:(0,f_.__)("Line indent"),value:t,__unstableInputWidth:r,units:u,onChange:o,help:s})}function ose(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 tse(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 WTe(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 rse(e,t,o){let r=t,n=o,{fontStyles:i,fontWeights:s,combinedStyleAndWeightOptions:a}=tb(e),c=i?.some(({value:d})=>d===t),u=s?.some(({value:d})=>d?.toString()===o?.toString());return c||(r=t?WTe(i,t):a?.find(d=>d.style.fontWeight===tse(s,o))?.style?.fontStyle),u||(n=o?tse(s,o):a?.find(d=>d.style.fontStyle===(r||t))?.style?.fontWeight),{nearestFontStyle:r,nearestFontWeight:n}}var Je=l(w(),1),$Te=1,KTe=6;function BP(e){let t=ise(e),o=sse(e),r=ase(e),n=lse(e),i=use(e),s=cse(e),a=dse(e),c=pse(e),u=fse(e),d=mse(e),f=nse(e);return t||o||r||n||i||s||f||a||c||u||d}function nse(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 ise(e){return["default","theme","custom"].some(t=>e?.typography?.fontFamilies?.[t]?.length)}function sse(e){return e?.typography?.lineHeight}function ase(e){return e?.typography?.fontStyle||e?.typography?.fontWeight}function YTe(e){return e?.typography?.fontStyle?e?.typography?.fontWeight?(0,No.__)("Appearance"):(0,No.__)("Font style"):(0,No.__)("Font weight")}function lse(e){return e?.typography?.letterSpacing}function cse(e){return e?.typography?.textTransform}function use(e){return e?.typography?.textAlign}function dse(e){return e?.typography?.textDecoration}function fse(e){return e?.typography?.writingMode}function mse(e){return e?.typography?.textColumns}function pse(e){return e?.typography?.textIndent}function qTe(e){let t=e?.typography?.fontSizes,o=!!e?.typography?.defaultFontSizes;return[...t?.custom??[],...t?.theme??[],...o?t?.default??[]:[]]}function ZTe({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n}){let i=Po(),s=()=>{let a=e(o);t(a)};return(0,Je.jsx)(io.__experimentalToolsPanel,{label:(0,No.__)("Typography"),resetAll:s,panelId:r,dropdownMenuProps:i,children:n})}var XTe={fontFamily:!0,fontSize:!0,fontAppearance:!0,lineHeight:!0,letterSpacing:!0,textAlign:!0,textTransform:!0,textDecoration:!0,textIndent:!0,writingMode:!0,textColumns:!0};function EP({as:e=ZTe,value:t,onChange:o,inheritedValue:r=t,settings:n,panelId:i,defaultControls:s=XTe,isGlobalStyles:a=!1}){let c=oe=>xn({settings:n},"",oe),u=ise(n),d=c(r?.typography?.fontFamily),{fontFamilies:f,fontFamilyFaces:m}=(0,Db.useMemo)(()=>ose(n,d),[n,d]),h=oe=>{let Ae=f?.find(({fontFamily:an})=>an===oe)?.slug,ut=pe(t,["typography","fontFamily"],Ae?`var:preset|font-family|${Ae}`:oe||void 0),Gc=f?.find(({fontFamily:an})=>an===oe)?.fontFace??[],{fontStyles:ca,fontWeights:Ep}=tb(Gc),Vk=ca?.some(({value:an})=>an===T),pf=Ep?.some(({value:an})=>an?.toString()===R?.toString());if(!Vk||!pf){let{nearestFontStyle:an,nearestFontWeight:Tp}=rse(Gc,T,R);an||Tp?ut={...ut,typography:{...ut?.typography,fontStyle:an||void 0,fontWeight:Tp||void 0}}:(T||R)&&(ut={...ut,typography:{...ut?.typography,fontStyle:void 0,fontWeight:void 0}})}o(ut)},p=()=>!!t?.typography?.fontFamily,g=()=>h(void 0),b=nse(n),v=!n?.typography?.customFontSize,k=qTe(n),y=c(r?.typography?.fontSize),S=(()=>{let oe=r?.typography?.fontSize;if(!oe||typeof oe!="string")return;if(oe.startsWith("var:preset|font-size|"))return oe.replace("var:preset|font-size|","");let Ae=oe.match(/^var\(--wp--preset--font-size--([^)]+)\)$/);if(Ae)return Ae[1]})(),x=(oe,Ae)=>{let ut=Ae?.slug?`var:preset|font-size|${Ae?.slug}`:oe;o(pe(t,["typography","fontSize"],ut||void 0))},C=()=>!!t?.typography?.fontSize,B=()=>x(void 0),I=ase(n),O=YTe(n),E=n?.typography?.fontStyle,L=n?.typography?.fontWeight,T=c(r?.typography?.fontStyle),R=c(r?.typography?.fontWeight),D=(0,Db.useCallback)(({fontStyle:oe,fontWeight:Ae})=>{(oe!==T||Ae!==R)&&o({...t,typography:{...t?.typography,fontStyle:oe||void 0,fontWeight:Ae||void 0}})},[T,R,o,t]),j=()=>!!t?.typography?.fontStyle||!!t?.typography?.fontWeight,G=(0,Db.useCallback)(()=>{D({})},[D]),z=sse(n),H=c(r?.typography?.lineHeight),W=oe=>{o(pe(t,["typography","lineHeight"],oe||void 0))},te=()=>t?.typography?.lineHeight!==void 0,ne=()=>W(void 0),ae=lse(n),X=c(r?.typography?.letterSpacing),ee=oe=>{o(pe(t,["typography","letterSpacing"],oe||void 0))},le=()=>!!t?.typography?.letterSpacing,Q=()=>ee(void 0),J=pse(n),q=c(r?.typography?.textIndent),K=(n?.typography?.textIndent??"subsequent")==="all",se=oe=>{o(pe(t,["typography","textIndent"],oe||void 0))},ce=oe=>{o({...t,settings:{typography:{textIndent:oe?"all":"subsequent"}}})},Se=()=>!!t?.typography?.textIndent,he=()=>{o(pe(t,["typography","textIndent"],void 0))},we=K?(0,No.__)("Indents the first line of all paragraphs."):(0,No.__)("Indents the first line of each paragraph after the first one."),De=mse(n),ct=c(r?.typography?.textColumns),Jt=oe=>{o(pe(t,["typography","textColumns"],oe||void 0))},uo=()=>!!t?.typography?.textColumns,Do=()=>Jt(void 0),ot=cse(n),sr=c(r?.typography?.textTransform),ze=oe=>{o(pe(t,["typography","textTransform"],oe||void 0))},wt=()=>!!t?.typography?.textTransform,je=()=>ze(void 0),At=dse(n),ar=c(r?.typography?.textDecoration),Ue=oe=>{o(pe(t,["typography","textDecoration"],oe||void 0))},Lr=()=>!!t?.typography?.textDecoration,ki=()=>Ue(void 0),eo=fse(n),Bo=c(r?.typography?.writingMode),Xe=oe=>{o(pe(t,["typography","writingMode"],oe||void 0))},Ve=()=>!!t?.typography?.writingMode,bt=()=>Xe(void 0),Eo=use(n),lr=c(r?.typography?.textAlign),ge=oe=>{o(pe(t,["typography","textAlign"],oe||void 0))},Ct=()=>!!t?.typography?.textAlign,To=()=>ge(void 0),Ye=(0,Db.useCallback)(oe=>({...oe,typography:{}}),[]);return(0,Je.jsxs)(e,{resetAllFilter:Ye,value:t,onChange:o,panelId:i,children:[u&&(0,Je.jsx)(io.__experimentalToolsPanelItem,{label:(0,No.__)("Font"),hasValue:p,onDeselect:g,isShownByDefault:s.fontFamily,panelId:i,children:(0,Je.jsx)(QT,{fontFamilies:f,value:d,onChange:h,size:"__unstable-large"})}),b&&(0,Je.jsx)(io.__experimentalToolsPanelItem,{label:(0,No.__)("Size"),hasValue:C,onDeselect:B,isShownByDefault:s.fontSize,panelId:i,children:(0,Je.jsx)(io.FontSizePicker,{value:S||y,valueMode:S?"slug":"literal",onChange:x,fontSizes:k,disableCustomFontSizes:v,withReset:!1,withSlider:!0,size:"__unstable-large"})}),I&&(0,Je.jsx)(io.__experimentalToolsPanelItem,{label:O,hasValue:j,onDeselect:G,isShownByDefault:s.fontAppearance,panelId:i,children:(0,Je.jsx)(XT,{value:{fontStyle:T,fontWeight:R},onChange:D,hasFontStyles:E,hasFontWeights:L,fontFamilyFaces:m,size:"__unstable-large"})}),z&&(0,Je.jsx)(io.__experimentalToolsPanelItem,{className:"single-column",label:(0,No.__)("Line height"),hasValue:te,onDeselect:ne,isShownByDefault:s.lineHeight,panelId:i,children:(0,Je.jsx)(VI,{__unstableInputWidth:"auto",value:H,onChange:W,size:"__unstable-large"})}),ae&&(0,Je.jsx)(io.__experimentalToolsPanelItem,{className:"single-column",label:(0,No.__)("Letter spacing"),hasValue:le,onDeselect:Q,isShownByDefault:s.letterSpacing,panelId:i,children:(0,Je.jsx)(eI,{value:X,onChange:ee,size:"__unstable-large",__unstableInputWidth:"auto"})}),J&&(0,Je.jsxs)(io.__experimentalToolsPanelItem,{label:(0,No.__)("Line indent"),hasValue:Se,onDeselect:he,isShownByDefault:s.textIndent,panelId:i,children:[(0,Je.jsx)(ese,{value:q,onChange:se,size:"__unstable-large",__unstableInputWidth:"auto",withSlider:!0,hasBottomMargin:a}),a&&(0,Je.jsx)(io.ToggleControl,{label:(0,No.__)("Indent all paragraphs"),checked:K,onChange:ce,help:we})]}),De&&(0,Je.jsx)(io.__experimentalToolsPanelItem,{className:"single-column",label:(0,No.__)("Columns"),hasValue:uo,onDeselect:Do,isShownByDefault:s.textColumns,panelId:i,children:(0,Je.jsx)(io.__experimentalNumberControl,{label:(0,No.__)("Columns"),max:KTe,min:$Te,onChange:Jt,size:"__unstable-large",spinControls:"custom",value:ct,initialPosition:1})}),At&&(0,Je.jsx)(io.__experimentalToolsPanelItem,{className:"single-column",label:(0,No.__)("Decoration"),hasValue:Lr,onDeselect:ki,isShownByDefault:s.textDecoration,panelId:i,children:(0,Je.jsx)(oI,{value:ar,onChange:Ue,size:"__unstable-large",__unstableInputWidth:"auto"})}),eo&&(0,Je.jsx)(io.__experimentalToolsPanelItem,{className:"single-column",label:(0,No.__)("Orientation"),hasValue:Ve,onDeselect:bt,isShownByDefault:s.writingMode,panelId:i,children:(0,Je.jsx)(sI,{value:Bo,onChange:Xe,size:"__unstable-large"})}),ot&&(0,Je.jsx)(io.__experimentalToolsPanelItem,{label:(0,No.__)("Letter case"),hasValue:wt,onDeselect:je,isShownByDefault:s.textTransform,panelId:i,children:(0,Je.jsx)(nI,{value:sr,onChange:ze,showNone:!0,isBlock:!0,size:"__unstable-large"})}),Eo&&(0,Je.jsxs)(io.__experimentalToolsPanelItem,{label:(0,No.__)("Text alignment"),hasValue:Ct,onDeselect:To,isShownByDefault:s.textAlign,panelId:i,children:[(0,Je.jsx)(CP,{value:lr,onChange:ge,options:["left","center","right","justify"],size:"__unstable-large"}),lr==="justify"&&(0,Je.jsx)("div",{children:(0,Je.jsx)(io.Notice,{status:"warning",isDismissible:!1,children:(0,No.__)("Justified text can reduce readability. For better accessibility, use left-aligned text instead.")})})]})]})}var Yt=l(N(),1),jt=l(A(),1);var Fb=l(P(),1);var et=l(A(),1),Go=l(N(),1),gse=l(P(),1),TP=l(F(),1);var hse=l(F(),1);function rp(e,t){let{getBlockOrder:o,getBlockAttributes:r}=(0,hse.useSelect)(_);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 Kt=l(w(),1);function QTe(e,t){let{orientation:o="horizontal"}=t;return e==="fill"?(0,Go.__)("Stretch to fill available space."):e==="fixed"&&o==="horizontal"?(0,Go.__)("Specify a fixed width."):e==="fixed"?(0,Go.__)("Specify a fixed height."):(0,Go.__)("Fit contents.")}function bse({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,Kt.jsx)(JTe,{childLayout:e,onChange:t,parentLayout:o,isShownByDefault:r,panelId:n}):a==="grid"?(0,Kt.jsx)(tIe,{childLayout:e,onChange:t,parentLayout:o,isShownByDefault:r,panelId:n}):null}function JTe({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,Go.__)("Width"):(0,Go.__)("Height"),[d]=me("spacing.units"),f=(0,et.__experimentalUseCustomUnits)({availableUnits:d||["%","px","em","rem","vh","vw"]}),m=()=>{t({selfStretch:void 0,flexSize:void 0})};return(0,gse.useEffect)(()=>{i==="fixed"&&!s&&t({...e,selfStretch:"fit"})},[]),(0,Kt.jsxs)(et.__experimentalVStack,{as:et.__experimentalToolsPanelItem,spacing:2,hasValue:c,label:u,onDeselect:m,isShownByDefault:r,panelId:n,children:[(0,Kt.jsxs)(et.__experimentalToggleGroupControl,{size:"__unstable-large",label:eIe(o),value:i||"fit",help:QTe(i,o),onChange:h=>{t({selfStretch:h,flexSize:h!=="fixed"?null:s})},isBlock:!0,children:[(0,Kt.jsx)(et.__experimentalToggleGroupControlOption,{value:"fit",label:(0,Go._x)("Fit","Intrinsic block width in flex layout")},"fit"),(0,Kt.jsx)(et.__experimentalToggleGroupControlOption,{value:"fill",label:(0,Go._x)("Grow","Block with expanding width in flex layout")},"fill"),(0,Kt.jsx)(et.__experimentalToggleGroupControlOption,{value:"fixed",label:(0,Go._x)("Fixed","Block with fixed width in flex layout")},"fixed")]}),i==="fixed"&&(0,Kt.jsx)(et.__experimentalUnitControl,{size:"__unstable-large",units:f,onChange:h=>{t({selfStretch:i,flexSize:h})},value:s,min:0,label:u,hideLabelFromVision:!0})]})}function eIe(e){let{orientation:t="horizontal"}=e;return t==="horizontal"?(0,Go.__)("Width"):(0,Go.__)("Height")}function tIe({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,TP.useSelect)(x=>x(_).getBlockRootClientId(n)),{moveBlocksToPosition:m,__unstableMarkNextChangeAsNotPersistent:h}=(0,TP.useDispatch)(_),p=rp(f,u||3),g=()=>!!i||!!s,b=()=>!!a||!!c,v=()=>{t({columnStart:void 0,rowStart:void 0})},k=()=>{t({columnSpan:void 0,rowSpan:void 0})},y=u?u-(i??1)+1:void 0,S=window.__experimentalEnableGridInteractivity&&d?d-(s??1)+1:void 0;return(0,Kt.jsxs)(Kt.Fragment,{children:[(0,Kt.jsxs)(et.Flex,{as:et.__experimentalToolsPanelItem,hasValue:b,label:(0,Go.__)("Grid span"),onDeselect:k,isShownByDefault:r,panelId:n,children:[(0,Kt.jsx)(et.FlexItem,{style:{width:"50%"},children:(0,Kt.jsx)(et.__experimentalInputControl,{size:"__unstable-large",label:(0,Go.__)("Column span"),type:"number",onChange:x=>{let C=x===""?1:parseInt(x,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,Kt.jsx)(et.FlexItem,{style:{width:"50%"},children:(0,Kt.jsx)(et.__experimentalInputControl,{size:"__unstable-large",label:(0,Go.__)("Row span"),type:"number",onChange:x=>{let C=x===""?1:parseInt(x,10),B=S?Math.min(C,S):C;t({columnStart:i,rowStart:s,columnSpan:a,rowSpan:B})},value:c??1,min:1,max:S})})]}),window.__experimentalEnableGridInteractivity&&(0,Kt.jsxs)(et.Flex,{as:et.__experimentalToolsPanelItem,hasValue:g,label:(0,Go.__)("Grid placement"),onDeselect:v,isShownByDefault:!1,panelId:n,children:[(0,Kt.jsx)(et.FlexItem,{style:{width:"50%"},children:(0,Kt.jsx)(et.__experimentalInputControl,{size:"__unstable-large",label:(0,Go.__)("Column"),type:"number",onChange:x=>{let C=x===""?1:parseInt(x,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,Kt.jsx)(et.FlexItem,{style:{width:"50%"},children:(0,Kt.jsx)(et.__experimentalInputControl,{size:"__unstable-large",label:(0,Go.__)("Row"),type:"number",onChange:x=>{let C=x===""?1:parseInt(x,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 IP=l(A(),1),Vb=l(N(),1);var AF=l(w(),1);function PP({panelId:e,value:t,onChange:o=()=>{},options:r,defaultValue:n="auto",hasValue:i,isShownByDefault:s=!0}){let a=t??"auto",[c,u,d]=me("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,Vb._x)("Original","Aspect ratio option for dimensions control"),value:"auto"},...d?m:[],...f||[],{label:(0,Vb._x)("Custom","Aspect ratio option for dimensions control"),value:"custom",disabled:!0,hidden:!0}];return(0,AF.jsx)(IP.__experimentalToolsPanelItem,{hasValue:i||(()=>a!==n),label:(0,Vb.__)("Aspect ratio"),onDeselect:()=>o(void 0),isShownByDefault:s,panelId:e,children:(0,AF.jsx)(IP.SelectControl,{label:(0,Vb.__)("Aspect ratio"),value:a,options:r??h,onChange:o,size:"__unstable-large"})})}var $e=l(w(),1),LF=["horizontal","vertical"];function RP(e){let t=yse(e),o=Sse(e),r=_se(e),n=xse(e),i=wse(e),s=Cse(e),a=Bse(e),c=Ese(e),u=Tse(e),d=Ise(e);return Fb.Platform.OS==="web"&&(t||o||r||n||i||s||a||c||u||d)}function yse(e){return e?.layout?.contentSize}function Sse(e){return e?.layout?.wideSize}function _se(e){return e?.spacing?.padding}function xse(e){return e?.spacing?.margin}function wse(e){return e?.spacing?.blockGap}function Cse(e){return e?.dimensions?.height}function Bse(e){return e?.dimensions?.minHeight}function Ese(e){return e?.dimensions?.width}function Tse(e){return e?.dimensions?.aspectRatio}function Ise(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 oIe(e){let{defaultSpacingSizes:t,spacingSizes:o}=e?.spacing||{};return t!==!1&&o?.default?.length>0||o?.theme?.length>0||o?.custom?.length>0}function kse(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 vse(e){return e&&typeof e=="string"?{top:e,right:e,bottom:e,left:e}:e}function rIe(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 nIe({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n}){let i=Po(),s=()=>{let a=e(o);t(a)};return(0,$e.jsx)(jt.__experimentalToolsPanel,{label:(0,Yt.__)("Dimensions"),resetAll:s,panelId:r,dropdownMenuProps:i,children:n})}var Js={contentSize:!0,wideSize:!0,padding:!0,margin:!0,blockGap:!0,height:!0,minHeight:!0,width:!0,aspectRatio:!0,childLayout:!0};function OP({as:e=nIe,value:t,onChange:o,inheritedValue:r=t,settings:n,panelId:i,defaultControls:s=Js,onVisualize:a=()=>{},includeLayoutControls:c=!1}){let{dimensions:u,spacing:d}=n,f=oe=>oe&&typeof oe=="object"?Object.keys(oe).reduce((Ae,ut)=>(Ae[ut]=xn({settings:{dimensions:u,spacing:d}},"",oe[ut]),Ae),{}):xn({settings:{dimensions:u,spacing:d}},"",oe),m=oIe(n),h=(0,jt.__experimentalUseCustomUnits)({availableUnits:n?.spacing?.units||["%","px","em","rem","vw"]}),p=-1/0,[g,b]=(0,Fb.useState)(p),v=yse(n)&&c,k=f(r?.layout?.contentSize),y=oe=>{o(pe(t,["layout","contentSize"],oe||void 0))},S=()=>!!t?.layout?.contentSize,x=()=>y(void 0),C=Sse(n)&&c,B=f(r?.layout?.wideSize),I=oe=>{o(pe(t,["layout","wideSize"],oe||void 0))},O=()=>!!t?.layout?.wideSize,E=()=>I(void 0),L=_se(n),T=f(r?.spacing?.padding),R=vse(T),D=Array.isArray(n?.spacing?.padding)?n?.spacing?.padding:n?.spacing?.padding?.sides,j=D&&D.some(oe=>LF.includes(oe)),G=oe=>{let Ae=kse(oe,D);o(pe(t,["spacing","padding"],Ae))},z=()=>!!t?.spacing?.padding&&Object.keys(t?.spacing?.padding).length,H=()=>G(void 0),W=()=>a("padding"),te=xse(n),ne=f(r?.spacing?.margin),ae=vse(ne),X=Array.isArray(n?.spacing?.margin)?n?.spacing?.margin:n?.spacing?.margin?.sides,ee=X&&X.some(oe=>LF.includes(oe)),le=oe=>{let Ae=kse(oe,X);o(pe(t,["spacing","margin"],Ae))},Q=()=>!!t?.spacing?.margin&&Object.keys(t?.spacing?.margin).length,J=()=>le(void 0),q=()=>a("margin"),U=wse(n),K=Array.isArray(n?.spacing?.blockGap)?n?.spacing?.blockGap:n?.spacing?.blockGap?.sides,se=K&&K.some(oe=>LF.includes(oe)),ce=f(r?.spacing?.blockGap),Se=rIe(ce,se),he=oe=>{o(pe(t,["spacing","blockGap"],oe))},we=oe=>{oe||he(null),!se&&oe?.hasOwnProperty("top")?he(oe.top):he({top:oe?.top,left:oe?.left})},De=()=>he(void 0),ct=()=>!!t?.spacing?.blockGap,Jt=Bse(n),uo=f(r?.dimensions?.minHeight),Do=oe=>{let Ae=pe(t,["dimensions","minHeight"],oe);o(pe(Ae,["dimensions","aspectRatio"],void 0))},ot=()=>{Do(void 0)},sr=()=>!!t?.dimensions?.minHeight,ze=Cse(n),wt=f(r?.dimensions?.height),je=oe=>{let Ae=pe(t,["dimensions","height"],oe);o(pe(Ae,["dimensions","aspectRatio"],void 0))},At=()=>{je(void 0)},ar=()=>!!t?.dimensions?.height,Ue=Ese(n),Lr=f(r?.dimensions?.width),ki=oe=>{o(pe(t,["dimensions","width"],oe))},eo=()=>{ki(void 0)},Bo=()=>!!t?.dimensions?.width,Xe=Tse(n),Ve=f(r?.dimensions?.aspectRatio),bt=oe=>{let Ae=pe(t,["dimensions","aspectRatio"],oe);o(pe(Ae,["dimensions","minHeight"],void 0))},Eo=()=>!!t?.dimensions?.aspectRatio,lr=Ise(n),ge=r?.layout,Ct=oe=>{o({...t,layout:{...oe}})},To=(0,Fb.useCallback)(oe=>({...oe,layout:Ne({...oe?.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:{...oe?.spacing,padding:void 0,margin:void 0,blockGap:void 0},dimensions:{...oe?.dimensions,height:void 0,minHeight:void 0,aspectRatio:void 0,width:void 0}}),[]),Ye=()=>a(!1);return(0,$e.jsxs)(e,{resetAllFilter:To,value:t,onChange:o,panelId:i,children:[(v||C)&&(0,$e.jsx)("span",{className:"span-columns",children:(0,Yt.__)("Set the width of the main content area.")}),v&&(0,$e.jsx)(jt.__experimentalToolsPanelItem,{label:(0,Yt.__)("Content width"),hasValue:S,onDeselect:x,isShownByDefault:s.contentSize??Js.contentSize,panelId:i,children:(0,$e.jsx)(jt.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,Yt.__)("Content width"),labelPosition:"top",value:k||"",onChange:oe=>{y(oe)},units:h,prefix:(0,$e.jsx)(jt.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,$e.jsx)(xe,{icon:Sf})})})}),C&&(0,$e.jsx)(jt.__experimentalToolsPanelItem,{label:(0,Yt.__)("Wide width"),hasValue:O,onDeselect:E,isShownByDefault:s.wideSize??Js.wideSize,panelId:i,children:(0,$e.jsx)(jt.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,Yt.__)("Wide width"),labelPosition:"top",value:B||"",onChange:oe=>{I(oe)},units:h,prefix:(0,$e.jsx)(jt.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,$e.jsx)(xe,{icon:Af})})})}),L&&(0,$e.jsxs)(jt.__experimentalToolsPanelItem,{hasValue:z,label:(0,Yt.__)("Padding"),onDeselect:H,isShownByDefault:s.padding??Js.padding,className:V({"tools-panel-item-spacing":m}),panelId:i,children:[!m&&(0,$e.jsx)(jt.BoxControl,{__next40pxDefaultSize:!0,values:R,onChange:G,label:(0,Yt.__)("Padding"),sides:D,units:h,allowReset:!1,splitOnAxis:j,inputProps:{onMouseOver:W,onMouseOut:Ye}}),m&&(0,$e.jsx)(Ab,{values:R,onChange:G,label:(0,Yt.__)("Padding"),sides:D,units:h,allowReset:!1,onMouseOver:W,onMouseOut:Ye})]}),te&&(0,$e.jsxs)(jt.__experimentalToolsPanelItem,{hasValue:Q,label:(0,Yt.__)("Margin"),onDeselect:J,isShownByDefault:s.margin??Js.margin,className:V({"tools-panel-item-spacing":m}),panelId:i,children:[!m&&(0,$e.jsx)(jt.BoxControl,{__next40pxDefaultSize:!0,values:ae,onChange:le,inputProps:{min:g,onDragStart:()=>{b(0)},onDragEnd:()=>{b(p)},onMouseOver:q,onMouseOut:Ye},label:(0,Yt.__)("Margin"),sides:X,units:h,allowReset:!1,splitOnAxis:ee}),m&&(0,$e.jsx)(Ab,{values:ae,onChange:le,minimumCustomValue:-1/0,label:(0,Yt.__)("Margin"),sides:X,units:h,allowReset:!1,onMouseOver:q,onMouseOut:Ye})]}),U&&(0,$e.jsxs)(jt.__experimentalToolsPanelItem,{hasValue:ct,label:(0,Yt.__)("Block spacing"),onDeselect:De,isShownByDefault:s.blockGap??Js.blockGap,className:V({"tools-panel-item-spacing":m,"single-column":!m&&!se}),panelId:i,children:[!m&&(se?(0,$e.jsx)(jt.BoxControl,{__next40pxDefaultSize:!0,label:(0,Yt.__)("Block spacing"),min:0,onChange:we,units:h,sides:K,values:Se,allowReset:!1,splitOnAxis:se}):(0,$e.jsx)(jt.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,Yt.__)("Block spacing"),min:0,onChange:he,units:h,value:ce})),m&&(0,$e.jsx)(Ab,{label:(0,Yt.__)("Block spacing"),min:0,onChange:we,showSideInLabel:!1,sides:se?K:["top"],values:Se,allowReset:!1})]}),lr&&(0,$e.jsx)(bse,{value:ge,onChange:Ct,parentLayout:n?.parentLayout,panelId:i,isShownByDefault:s.childLayout??Js.childLayout}),Jt&&(0,$e.jsx)(jt.__experimentalToolsPanelItem,{hasValue:sr,label:(0,Yt.__)("Minimum height"),onDeselect:ot,isShownByDefault:s.minHeight??Js.minHeight,panelId:i,children:(0,$e.jsx)(nb,{label:(0,Yt.__)("Minimum height"),value:uo,onChange:Do})}),ze&&(0,$e.jsx)(jt.__experimentalToolsPanelItem,{hasValue:ar,label:(0,Yt.__)("Height"),onDeselect:At,isShownByDefault:s.height??Js.height,panelId:i,children:(0,$e.jsx)(nb,{label:(0,Yt.__)("Height"),value:wt,onChange:je})}),Ue&&(0,$e.jsx)(jt.__experimentalToolsPanelItem,{hasValue:Bo,label:(0,Yt.__)("Width"),onDeselect:eo,isShownByDefault:s.width??Js.width,panelId:i,children:(0,$e.jsx)(nb,{label:(0,Yt.__)("Width"),value:Lr,onChange:ki})}),Xe&&(0,$e.jsx)(PP,{hasValue:Eo,value:Ve,onChange:bt,panelId:i,isShownByDefault:s.aspectRatio??Js.aspectRatio})]})}var Jr=l(A(),1),jb=l(P(),1),zb=l(N(),1);var np=l(N(),1),_o=l(A(),1),LP=l(P(),1);var Rt=l(w(),1),AP=[];function iIe({shadow:e,onShadowChange:t,settings:o}){let r=NF(o);return(0,Rt.jsx)("div",{className:"block-editor-global-styles__shadow-popover-container",children:(0,Rt.jsxs)(_o.__experimentalVStack,{spacing:4,children:[(0,Rt.jsx)(_o.__experimentalHeading,{level:5,children:(0,np.__)("Drop shadow")}),(0,Rt.jsx)(sIe,{presets:r,activeShadow:e,onSelect:t}),(0,Rt.jsx)("div",{className:"block-editor-global-styles__clear-shadow",children:(0,Rt.jsx)(_o.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>t(void 0),disabled:!e,accessibleWhenDisabled:!0,children:(0,np.__)("Clear")})})]})})}function sIe({presets:e,activeShadow:t,onSelect:o}){return e?(0,Rt.jsx)(_o.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,Rt.jsx)(aIe,{label:r,isActive:i===t,type:n==="unset"?"unset":"preset",onSelect:()=>o(i===t?void 0:i),shadow:i},n))}):null}function aIe({type:e,label:t,isActive:o,onSelect:r,shadow:n}){return(0,Rt.jsx)(_o.Tooltip,{text:t,children:(0,Rt.jsx)(_o.Composite.Item,{role:"option","aria-label":t,"aria-selected":o,className:V("block-editor-global-styles__shadow__item",{"is-active":o}),render:(0,Rt.jsx)("button",{className:V("block-editor-global-styles__shadow-indicator",{unset:e==="unset"}),onClick:r,style:{boxShadow:n},"aria-label":t,children:o&&(0,Rt.jsx)(xe,{icon:gl})})})})}function Pse({shadow:e,onShadowChange:t,settings:o}){return(0,Rt.jsx)(_o.Dropdown,{popoverProps:{placement:"left-start",offset:36,shift:!0},className:"block-editor-global-styles__shadow-dropdown",renderToggle:lIe(e,t),renderContent:()=>(0,Rt.jsx)(_o.__experimentalDropdownContentWrapper,{paddingSize:"medium",children:(0,Rt.jsx)(iIe,{shadow:e,onShadowChange:t,settings:o})})})}function lIe(e,t){return function({onToggle:r,isOpen:n}){let i=(0,LP.useRef)(void 0),s={onClick:r,className:V("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:V("block-editor-global-styles__shadow-editor__remove-button",{"is-open":n}),label:(0,np.__)("Remove")};return(0,Rt.jsxs)(Rt.Fragment,{children:[(0,Rt.jsx)(_o.Button,{__next40pxDefaultSize:!0,...s,children:(0,Rt.jsxs)(_o.__experimentalHStack,{justify:"flex-start",children:[(0,Rt.jsx)(xe,{className:"block-editor-global-styles__toggle-icon",icon:JL,size:24}),(0,Rt.jsx)(_o.FlexItem,{children:(0,np.__)("Drop shadow")})]})}),!!e&&(0,Rt.jsx)(_o.Button,{__next40pxDefaultSize:!0,size:"small",icon:Mr,...a})]})}}function NF(e){return(0,LP.useMemo)(()=>{if(!e?.shadow)return AP;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||AP,...r||AP,...n||AP];return s.length&&s.unshift(i),s},[e])}var ea=l(w(),1);function NP(e){return Object.values(m_(e)).some(Boolean)}function m_(e){return{hasBorderColor:Rse(e),hasBorderRadius:Ose(e),hasBorderStyle:Ase(e),hasBorderWidth:Lse(e),hasShadow:Nse(e)}}function Rse(e){return e?.border?.color}function Ose(e){return e?.border?.radius}function Ase(e){return e?.border?.style}function Lse(e){return e?.border?.width}function Nse(e){let t=NF(e);return!!e?.shadow&&t.length>0}function cIe({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n,label:i}){let s=Po();return(0,ea.jsx)(Jr.__experimentalToolsPanel,{label:i,resetAll:()=>{let c=e(o);t(c)},panelId:r,dropdownMenuProps:s,children:n})}var uIe={radius:!0,color:!0,width:!0,shadow:!0};function MP({as:e=cIe,value:t,onChange:o,inheritedValue:r=t,settings:n,panelId:i,name:s,defaultControls:a=uIe}){let c=Xa(n),u=(0,jb.useCallback)(z=>xn({settings:n},"",z),[n]),d=z=>{let W=c.flatMap(({colors:te})=>te).find(({color:te})=>te===z);return W?"var:preset|color|"+W.slug:z},f=(0,jb.useMemo)(()=>{if((0,Jr.__experimentalHasSplitBorders)(r?.border)){let z={...r?.border};return["top","right","bottom","left"].forEach(H=>{z[H]={...z[H],color:u(z[H]?.color)}}),z}return{...r?.border,color:r?.border?.color?u(r?.border?.color):void 0}},[r?.border,u]),m=z=>o({...t,border:z}),h=Rse(n),p=Ase(n),g=Lse(n),b=Ose(n),v=(0,jb.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]),k=z=>m({...f,radius:z}),y=()=>{let z=t?.border?.radius;return typeof z=="object"?Object.entries(z).some(Boolean):!!z},S=Nse(n),x=u(r?.shadow),C=n?.shadow?.presets??{},B=C.custom??C.theme??C.default??[],I=z=>{let H=B?.find(({shadow:W})=>W===z)?.slug;o(pe(t,["shadow"],H?`var:preset|shadow|${H}`:z||void 0))},O=()=>!!t?.shadow,E=()=>I(void 0),L=()=>{if(y())return m({radius:t?.border?.radius});m(void 0)},T=z=>{let H={...z};(0,Jr.__experimentalHasSplitBorders)(H)?["top","right","bottom","left"].forEach(W=>{H[W]&&(H[W]={...H[W],color:d(H[W]?.color)})}):H&&(H.color=d(H.color)),m({radius:f?.radius,...H})},R=(0,jb.useCallback)(z=>({...z,border:void 0,shadow:void 0}),[]),D=a?.color||a?.width,j=h||p||g||b,G=Ub({blockName:s,hasShadowControl:S,hasBorderControl:j});return(0,ea.jsxs)(e,{resetAllFilter:R,value:t,onChange:o,panelId:i,label:G,children:[(g||h)&&(0,ea.jsx)(Jr.__experimentalToolsPanelItem,{hasValue:()=>(0,Jr.__experimentalIsDefinedBorder)(t?.border),label:(0,zb.__)("Border"),onDeselect:()=>L(),isShownByDefault:D,panelId:i,children:(0,ea.jsx)(Jr.BorderBoxControl,{colors:c,enableAlpha:!0,enableStyle:p,onChange:T,popoverOffset:40,popoverPlacement:"left-start",value:f,__experimentalIsRenderedInSidebar:!0,size:"__unstable-large",hideLabelFromVision:!S,label:(0,zb.__)("Border")})}),b&&(0,ea.jsx)(Jr.__experimentalToolsPanelItem,{hasValue:y,label:(0,zb.__)("Radius"),onDeselect:()=>k(void 0),isShownByDefault:a.radius,panelId:i,children:(0,ea.jsx)(WT,{presets:n?.border?.radiusSizes,values:v,onChange:z=>{k(z||void 0)}})}),S&&(0,ea.jsxs)(Jr.__experimentalToolsPanelItem,{label:(0,zb.__)("Shadow"),hasValue:O,onDeselect:E,isShownByDefault:a.shadow,panelId:i,children:[j?(0,ea.jsx)(Jr.BaseControl.VisualLabel,{as:"legend",children:(0,zb.__)("Shadow")}):null,(0,ea.jsx)(Pse,{shadow:x,onShadowChange:I,settings:n})]})]})}var Zt=l(A(),1),VP=l(P(),1),qt=l(N(),1);var at=l(w(),1);function FP(e){let t=Dse(e),o=jse(e),r=Vse(e),n=Md(e),i=zse(e),s=Fse(e);return t||o||r||n||i||s}function Dse(e){let t=Xa(e);return e?.color?.text&&(t?.length>0||e?.color?.custom)}function Vse(e){let t=Xa(e);return e?.color?.link&&(t?.length>0||e?.color?.custom)}function Fse(e){let t=Xa(e);return e?.color?.caption&&(t?.length>0||e?.color?.custom)}function Md(e){let t=Xa(e),o=d_(e);return e?.color?.heading&&(t?.length>0||e?.color?.custom||o?.length>0||e?.color?.customGradient)}function zse(e){let t=Xa(e),o=d_(e);return e?.color?.button&&(t?.length>0||e?.color?.custom||o?.length>0||e?.color?.customGradient)}function jse(e){let t=Xa(e),o=d_(e);return e?.color?.background&&(t?.length>0||e?.color?.custom||o?.length>0||e?.color?.customGradient)}function MF({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n,label:i}){let s=Po(),a=()=>{let c=e(o);t(c)};return(0,at.jsx)(Zt.__experimentalToolsPanel,{label:i||(0,qt.__)("Elements"),resetAll:a,panelId:r,hasInnerWrapper:!0,headingLevel:3,className:"color-block-support-panel",__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last",dropdownMenuProps:s,children:(0,at.jsx)("div",{className:"color-block-support-panel__inner-wrapper",children:n})})}var dIe={text:!0,background:!0,link:!0,heading:!0,button:!0,caption:!0},fIe={placement:"left-start",offset:36,shift:!0},{Tabs:DP}=M(Zt.privateApis),mIe=({indicators:e,label:t})=>(0,at.jsxs)(Zt.__experimentalHStack,{justify:"flex-start",children:[(0,at.jsx)(Zt.__experimentalZStack,{isLayered:!1,offset:-8,children:e.map((o,r)=>(0,at.jsx)(Zt.Flex,{expanded:!1,children:(0,at.jsx)(Zt.ColorIndicator,{colorValue:o})},r))}),(0,at.jsx)(Zt.FlexItem,{className:"block-editor-panel-color-gradient-settings__color-name",children:t})]});function Mse({isGradient:e,inheritedValue:t,userValue:o,setValue:r,colorGradientControlSettings:n}){return(0,at.jsx)(Sd,{...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 pIe({label:e,hasValue:t,resetValue:o,isShownByDefault:r,indicators:n,tabs:i,colorGradientControlSettings:s,panelId:a}){let c=i.find(m=>m.userValue!==void 0),{key:u,...d}=i[0]??{},f=(0,VP.useRef)(void 0);return(0,at.jsx)(Zt.__experimentalToolsPanelItem,{className:"block-editor-tools-panel-color-gradient-settings__item",hasValue:t,label:e,onDeselect:o,isShownByDefault:r,panelId:a,children:(0,at.jsx)(Zt.Dropdown,{popoverProps:fIe,className:"block-editor-tools-panel-color-gradient-settings__dropdown",renderToggle:({onToggle:m,isOpen:h})=>{let p={onClick:m,className:V("block-editor-panel-color-gradient-settings__dropdown",{"is-open":h}),"aria-expanded":h,ref:f};return(0,at.jsxs)(at.Fragment,{children:[(0,at.jsx)(Zt.Button,{...p,__next40pxDefaultSize:!0,children:(0,at.jsx)(mIe,{indicators:n,label:e})}),t()&&(0,at.jsx)(Zt.Button,{__next40pxDefaultSize:!0,label:(0,qt.__)("Reset"),className:"block-editor-panel-color-gradient-settings__reset",size:"small",icon:Mr,onClick:()=>{o(),h&&m(),f.current?.focus()}})]})},renderContent:()=>(0,at.jsx)(Zt.__experimentalDropdownContentWrapper,{paddingSize:"none",children:(0,at.jsxs)("div",{className:"block-editor-panel-color-gradient-settings__dropdown-content",children:[i.length===1&&(0,at.jsx)(Mse,{...d,colorGradientControlSettings:s},u),i.length>1&&(0,at.jsxs)(DP,{defaultTabId:c?.key,children:[(0,at.jsx)(DP.TabList,{children:i.map(m=>(0,at.jsx)(DP.Tab,{tabId:m.key,children:m.label},m.key))}),i.map(m=>{let{key:h,...p}=m;return(0,at.jsx)(DP.TabPanel,{tabId:h,focusable:!1,children:(0,at.jsx)(Mse,{...p,colorGradientControlSettings:s},h)},h)})]})]})})})})}function zP({as:e=MF,value:t,onChange:o,inheritedValue:r=t,settings:n,panelId:i,defaultControls:s=dIe,label:a,children:c}){let u=Xa(n),d=d_(n),f=n?.color?.custom,m=n?.color?.customGradient,h=u.length>0||f,p=d.length>0||m,g=U=>xn({settings:n},"",U),b=U=>{let se=u.flatMap(({colors:ce})=>ce).find(({color:ce})=>ce===U);return se?"var:preset|color|"+se.slug:U},v=U=>{let se=d.flatMap(({gradients:ce})=>ce).find(({gradient:ce})=>ce===U);return se?"var:preset|gradient|"+se.slug:U},k=jse(n),y=g(r?.color?.background),S=g(t?.color?.background),x=g(r?.color?.gradient),C=g(t?.color?.gradient),B=()=>!!S||!!C,I=U=>{let K=pe(t,["color","background"],b(U));K.color.gradient=void 0,o(K)},O=U=>{let K=pe(t,["color","gradient"],v(U));K.color.background=void 0,o(K)},E=()=>{let U=pe(t,["color","background"],void 0);U.color.gradient=void 0,o(U)},L=Vse(n),T=g(r?.elements?.link?.color?.text),R=g(t?.elements?.link?.color?.text),D=U=>{o(pe(t,["elements","link","color","text"],b(U)))},j=g(r?.elements?.link?.[":hover"]?.color?.text),G=g(t?.elements?.link?.[":hover"]?.color?.text),z=U=>{o(pe(t,["elements","link",":hover","color","text"],b(U)))},H=()=>!!R||!!G,W=()=>{let U=pe(t,["elements","link",":hover","color","text"],void 0);U=pe(U,["elements","link","color","text"],void 0),o(U)},te=Dse(n),ne=g(r?.color?.text),ae=g(t?.color?.text),X=()=>!!ae,ee=U=>{let K=pe(t,["color","text"],b(U));ne===T&&(K=pe(K,["elements","link","color","text"],b(U))),o(K)},le=()=>ee(void 0),Q=[{name:"caption",label:(0,qt.__)("Captions"),showPanel:Fse(n)},{name:"button",label:(0,qt.__)("Button"),showPanel:zse(n)},{name:"heading",label:(0,qt.__)("Heading"),showPanel:Md(n)},{name:"h1",label:(0,qt.__)("H1"),showPanel:Md(n)},{name:"h2",label:(0,qt.__)("H2"),showPanel:Md(n)},{name:"h3",label:(0,qt.__)("H3"),showPanel:Md(n)},{name:"h4",label:(0,qt.__)("H4"),showPanel:Md(n)},{name:"h5",label:(0,qt.__)("H5"),showPanel:Md(n)},{name:"h6",label:(0,qt.__)("H6"),showPanel:Md(n)}],J=(0,VP.useCallback)(U=>({...U,color:void 0,elements:{...U?.elements,link:{...U?.elements?.link,color:void 0,":hover":{color:void 0}},...Q.reduce((K,se)=>({...K,[se.name]:{...U?.elements?.[se.name],color:void 0}}),{})}}),[Q]),q=[te&&{key:"text",label:(0,qt.__)("Text"),hasValue:X,resetValue:le,isShownByDefault:s.text,indicators:[ne],tabs:[{key:"text",label:(0,qt.__)("Text"),inheritedValue:ne,setValue:ee,userValue:ae}]},k&&{key:"background",label:(0,qt.__)("Background"),hasValue:B,resetValue:E,isShownByDefault:s.background,indicators:[x??y],tabs:[h&&{key:"background",label:(0,qt.__)("Color"),inheritedValue:y,setValue:I,userValue:S},p&&{key:"gradient",label:(0,qt.__)("Gradient"),inheritedValue:x,setValue:O,userValue:C,isGradient:!0}].filter(Boolean)},L&&{key:"link",label:(0,qt.__)("Link"),hasValue:H,resetValue:W,isShownByDefault:s.link,indicators:[T,j],tabs:[{key:"link",label:(0,qt.__)("Default"),inheritedValue:T,setValue:D,userValue:R},{key:"hover",label:(0,qt.__)("Hover"),inheritedValue:j,setValue:z,userValue:G}]}].filter(Boolean);return Q.forEach(({name:U,label:K,showPanel:se})=>{if(!se)return;let ce=g(r?.elements?.[U]?.color?.background),Se=g(r?.elements?.[U]?.color?.gradient),he=g(r?.elements?.[U]?.color?.text),we=g(t?.elements?.[U]?.color?.background),De=g(t?.elements?.[U]?.color?.gradient),ct=g(t?.elements?.[U]?.color?.text),Jt=()=>!!(ct||we||De),uo=()=>{let je=pe(t,["elements",U,"color","background"],void 0);je.elements[U].color.gradient=void 0,je.elements[U].color.text=void 0,o(je)},Do=je=>{o(pe(t,["elements",U,"color","text"],b(je)))},ot=je=>{let At=pe(t,["elements",U,"color","background"],b(je));At.elements[U].color.gradient=void 0,o(At)},sr=je=>{let At=pe(t,["elements",U,"color","gradient"],v(je));At.elements[U].color.background=void 0,o(At)},ze=!0,wt=U!=="caption";q.push({key:U,label:K,hasValue:Jt,resetValue:uo,isShownByDefault:s[U],indicators:ze&&wt?[he,Se??ce]:[ze?he:Se??ce],tabs:[h&&ze&&{key:"text",label:(0,qt.__)("Text"),inheritedValue:he,setValue:Do,userValue:ct},h&&wt&&{key:"background",label:(0,qt.__)("Background"),inheritedValue:ce,setValue:ot,userValue:we},p&&wt&&{key:"gradient",label:(0,qt.__)("Gradient"),inheritedValue:Se,setValue:sr,userValue:De,isGradient:!0}].filter(Boolean)})}),(0,at.jsxs)(e,{resetAllFilter:J,value:t,onChange:o,panelId:i,label:a,children:[q.map(U=>{let{key:K,...se}=U;return(0,at.jsx)(pIe,{...se,colorGradientControlSettings:{colors:u,disableCustomColors:!f,gradients:d,disableCustomGradients:!m},panelId:i},K)}),c]})}var pt=l(A(),1),Sc=l(N(),1),Hb=l(P(),1);var so=l(w(),1),jP=[];function Use(e,{presetSetting:t,defaultSetting:o}){let r=!e?.color?.[o],n=e?.color?.[t]?.custom||jP,i=e?.color?.[t]?.theme||jP,s=e?.color?.[t]?.default||jP;return(0,Hb.useMemo)(()=>[...n,...i,...r?jP:s],[r,n,i,s])}function Hse(e){return Gse(e)}function Gse(e){return e.color.customDuotone||e.color.defaultDuotone||e.color.duotone.length>0}function hIe({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n}){let i=Po(),s=()=>{let a=e(o);t(a)};return(0,so.jsx)(pt.__experimentalToolsPanel,{label:(0,Sc._x)("Filters","Name for applying graphical effects"),resetAll:s,panelId:r,dropdownMenuProps:i,children:n})}var gIe={duotone:!0},bIe={placement:"left-start",offset:36,shift:!0,className:"block-editor-duotone-control__popover",headerTitle:(0,Sc.__)("Duotone")},kIe=({indicator:e,label:t})=>(0,so.jsxs)(pt.__experimentalHStack,{justify:"flex-start",children:[(0,so.jsx)(pt.__experimentalZStack,{isLayered:!1,offset:-8,children:(0,so.jsx)(pt.Flex,{expanded:!1,children:e==="unset"||!e?(0,so.jsx)(pt.ColorIndicator,{className:"block-editor-duotone-control__unset-indicator"}):(0,so.jsx)(pt.DuotoneSwatch,{values:e})})}),(0,so.jsx)(pt.FlexItem,{title:t,children:t})]}),vIe=(e,t)=>function({onToggle:r,isOpen:n}){let i=(0,Hb.useRef)(void 0),s={onClick:r,className:V("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,Sc.__)("Reset")};return(0,so.jsxs)(so.Fragment,{children:[(0,so.jsx)(pt.Button,{__next40pxDefaultSize:!0,...s,children:(0,so.jsx)(kIe,{indicator:e,label:(0,Sc.__)("Duotone")})}),e&&(0,so.jsx)(pt.Button,{size:"small",icon:Mr,...a})]})};function UP({as:e=hIe,value:t,onChange:o,inheritedValue:r=t,settings:n,panelId:i,defaultControls:s=gIe}){let a=b=>xn({settings:n},"",b),c=Gse(n),u=Use(n,{presetSetting:"duotone",defaultSetting:"defaultDuotone"}),d=Use(n,{presetSetting:"palette",defaultSetting:"defaultPalette"}),f=a(r?.filter?.duotone),m=b=>{let v=u.find(({colors:y})=>y===b),k=v?`var:preset|duotone|${v.slug}`:b;o(pe(t,["filter","duotone"],k))},h=()=>!!t?.filter?.duotone,p=()=>m(void 0),g=(0,Hb.useCallback)(b=>({...b,filter:{...b.filter,duotone:void 0}}),[]);return(0,so.jsx)(e,{resetAllFilter:g,value:t,onChange:o,panelId:i,children:c&&(0,so.jsx)(pt.__experimentalToolsPanelItem,{label:(0,Sc.__)("Duotone"),hasValue:h,onDeselect:p,isShownByDefault:s.duotone,panelId:i,children:(0,so.jsx)(pt.Dropdown,{popoverProps:bIe,className:"block-editor-global-styles-filters-panel__dropdown",renderToggle:vIe(f,p),renderContent:()=>(0,so.jsx)(pt.__experimentalDropdownContentWrapper,{paddingSize:"small",children:(0,so.jsxs)(pt.MenuGroup,{label:(0,Sc.__)("Duotone"),children:[(0,so.jsx)("p",{children:(0,Sc.__)("Create a two-tone color effect without losing your original image.")}),(0,so.jsx)(pt.DuotonePicker,{colorPalette:d,duotonePalette:u,disableCustomColors:!0,disableCustomDuotone:!0,value:f,onChange:m})]})})})})})}var Gb=l(A(),1),p_=l(N(),1);var ip=l(w(),1);function Wse(e,t,o){return e==="core/image"&&o?.lightbox?.allowEditing||!!t?.lightbox}function $se({onChange:e,value:t,inheritedValue:o,panelId:r}){let n=Po(),i=()=>{e(void 0)},s=c=>{e({enabled:c})},a=!1;return o?.lightbox?.enabled&&(a=o.lightbox.enabled),(0,ip.jsx)(ip.Fragment,{children:(0,ip.jsx)(Gb.__experimentalToolsPanel,{label:(0,p_._x)("Settings","Image settings"),resetAll:i,panelId:r,dropdownMenuProps:n,children:(0,ip.jsx)(Gb.__experimentalToolsPanelItem,{hasValue:()=>!!t?.lightbox,label:(0,p_.__)("Enlarge on click"),onDeselect:i,isShownByDefault:!0,panelId:r,children:(0,ip.jsx)(Gb.ToggleControl,{label:(0,p_.__)("Enlarge on click"),checked:a,onChange:s})})})})}var Wb=l(A(),1),Kse=l(P(),1),HP=l(N(),1);var h_=l(w(),1);function GP(e){return!(typeof e=="string"&&/<\/?\w/.test(e))}function WP({value:e,onChange:t,inheritedValue:o=e,help:r}){let[n,i]=(0,Kse.useState)(null),s=o?.css;function a(u){if(t({...e,css:u}),!GP(u)){i((0,HP.__)("The custom CSS is invalid. Do not use <> markup."));return}n&&i(null)}function c(u){let d=u?.target?.value;if(!d||!GP(d))return;let[f]=jh([{css:d}],".for-validation-only");i(f===null?(0,HP.__)("There is an error with your CSS structure."):null)}return(0,h_.jsxs)(Wb.__experimentalVStack,{spacing:3,children:[n&&(0,h_.jsx)(Wb.Notice,{status:"error",onRemove:()=>i(null),children:n}),(0,h_.jsx)(Wb.TextareaControl,{label:(0,HP.__)("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 qP=l(A(),1),ZP=l(P(),1),VF=l(N(),1);var Be=l(A(),1);var Ot=l(N(),1),qse=l(Ti(),1),DF=l(un(),1),_c=l(P(),1),g_=l(F(),1),Zse=l(Fe(),1),Xse=l(A5(),1);var Ie=l(w(),1),$P="image",yIe={placement:"left-start",offset:36,shift:!0,className:"block-editor-global-styles-background-panel__popover"},YP=()=>{},KP=e=>{window.requestAnimationFrame(()=>{let[t]=Zse.focus.tabbable.find(e?.current);t&&t.focus()})};function SIe(e){return e==="cover"||e===void 0?(0,Ot.__)("Image covers the space evenly."):e==="contain"?(0,Ot.__)("Image is contained without distortion."):(0,Ot.__)("Image has a fixed width.")}var _Ie=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}%`},xIe=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 Qse({as:e="span",imgUrl:t,toggleProps:o={},filename:r,label:n,onToggleCallback:i=YP}){let{isOpen:s,...a}=o;(0,_c.useEffect)(()=>{typeof s<"u"&&i(s)},[s,i]);let c=()=>(0,Ie.jsxs)(Be.__experimentalHStack,{className:"block-editor-global-styles-background-panel__inspector-preview-inner",children:[(0,Ie.jsx)("span",{className:"block-editor-global-styles-background-panel__inspector-image-indicator",style:{backgroundImage:t?`url(${t})`:void 0}}),(0,Ie.jsxs)(Be.FlexBlock,{children:[(0,Ie.jsx)(Be.__experimentalTruncate,{numberOfLines:1,className:"block-editor-global-styles-background-panel__inspector-media-replace-title",children:n}),(0,Ie.jsx)(Be.VisuallyHidden,{as:"span",children:t?(0,Ot.sprintf)((0,Ot.__)("Background image: %s"),r||n):(0,Ot.__)("No background image selected")})]})]});return e==="button"?(0,Ie.jsx)(Be.Button,{__next40pxDefaultSize:!0,...a,children:c()}):c()}function wIe({label:e,filename:t,url:o,children:r,onToggle:n=YP,hasImageValue:i,onReset:s,containerRef:a}){if(!i)return;let c=e||(0,DF.getFilename)(o)||(0,Ot.__)("Image");return(0,Ie.jsx)(Be.Dropdown,{popoverProps:yIe,renderToggle:({onToggle:u,isOpen:d})=>{let f={onClick:u,className:"block-editor-global-styles-background-panel__dropdown-toggle","aria-expanded":d,"aria-label":(0,Ot.__)("Background size, position and repeat options."),isOpen:d};return(0,Ie.jsxs)(Ie.Fragment,{children:[(0,Ie.jsx)(Qse,{imgUrl:o,filename:t,label:c,toggleProps:f,as:"button",onToggleCallback:n}),s&&(0,Ie.jsx)(Be.Button,{__next40pxDefaultSize:!0,label:(0,Ot.__)("Reset"),className:"block-editor-global-styles-background-panel__reset",size:"small",icon:Mr,onClick:()=>{s(),d&&u(),KP(a)}})]})},renderContent:()=>(0,Ie.jsx)(Be.__experimentalDropdownContentWrapper,{className:"block-editor-global-styles-background-panel__dropdown-content-wrapper",paddingSize:"medium",children:r})})}function CIe(){return(0,Ie.jsx)(Be.Placeholder,{className:"block-editor-global-styles-background-panel__loading",children:(0,Ie.jsx)(Be.Spinner,{})})}function Yse({onChange:e,style:t,inheritedValue:o,onRemoveImage:r=YP,onResetImage:n=YP,displayInPanel:i,defaultValues:s,containerRef:a}){let[c,u]=(0,_c.useState)(!1),{getSettings:d}=(0,g_.useSelect)(_),{id:f,title:m,url:h}=t?.background?.backgroundImage||{...o?.background?.backgroundImage},{createErrorNotice:p}=(0,g_.useDispatch)(qse.store),g=B=>{p(B,{type:"snackbar"}),u(!1)},b=()=>e(pe(t,["background","backgroundImage"],void 0)),v=B=>{if(!B||!B.url){b(),u(!1);return}if((0,Xse.isBlobURL)(B.url)){u(!0);return}if(B.media_type&&B.media_type!==$P||!B.media_type&&B.type&&B.type!==$P){g((0,Ot.__)("Only images can be used as a background image."));return}let I=t?.background?.backgroundSize||s?.backgroundSize,O=t?.background?.backgroundPosition;e(pe(t,["background"],{...t?.background,backgroundImage:{url:B.url,id:B.id,source:"file",title:B.title||void 0},backgroundPosition:!O&&(I==="auto"||!I)?"50% 0":O,backgroundSize:I})),u(!1),KP(a)},k=B=>{d().mediaUpload({allowedTypes:[$P],filesList:B,onFileChange([I]){v(I)},onError:g,multiple:!1})},y=sp(t),S=()=>e(pe(t,["background"],{backgroundImage:"none"})),x=!y&&sp(o),C=m||(0,DF.getFilename)(h)||(0,Ot.__)("Image");return(0,Ie.jsxs)("div",{className:"block-editor-global-styles-background-panel__image-tools-panel-item",children:[c&&(0,Ie.jsx)(CIe,{}),(0,Ie.jsx)(kb,{mediaId:f,mediaURL:h,allowedTypes:[$P],accept:"image/*",onSelect:v,popoverProps:{className:V({"block-editor-global-styles-background-panel__media-replace-popover":i})},name:(0,Ie.jsx)(Qse,{imgUrl:h,filename:m,label:C}),renderToggle:B=>(0,Ie.jsx)(Be.Button,{...B,__next40pxDefaultSize:!0}),onError:g,onReset:()=>{KP(a),n()},children:x&&(0,Ie.jsx)(Be.MenuItem,{onClick:()=>{KP(a),S(),r()},children:(0,Ot.__)("Remove")})}),(0,Ie.jsx)(Be.DropZone,{onFilesDrop:k,label:(0,Ot.__)("Drop to upload")})]})}function BIe({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=v=>{let k=i,y=c;v==="contain"&&(k="no-repeat",y=void 0),v==="cover"&&(k=void 0,y=void 0),(d==="cover"||d==="contain")&&v==="auto"&&(k=void 0,t?.background?.backgroundImage?.id&&(y="50% 0")),!v&&d==="auto"&&(v="auto"),e(pe(t,["background"],{...t?.background,backgroundPosition:y,backgroundRepeat:k,backgroundSize:v}))},h=v=>{e(pe(t,["background","backgroundPosition"],_Ie(v)))},p=()=>e(pe(t,["background","backgroundRepeat"],f===!0?"no-repeat":"repeat")),g=()=>e(pe(t,["background","backgroundAttachment"],u==="fixed"?"scroll":"fixed")),b=!c&&a&&n==="contain"?r?.backgroundPosition:c;return(0,Ie.jsxs)(Be.__experimentalVStack,{spacing:3,className:"single-column",children:[(0,Ie.jsx)(Be.FocalPointPicker,{label:(0,Ot.__)("Focal point"),url:s,value:xIe(b),onChange:h}),(0,Ie.jsx)(Be.ToggleControl,{label:(0,Ot.__)("Fixed background"),checked:u==="fixed",onChange:g}),(0,Ie.jsxs)(Be.__experimentalToggleGroupControl,{size:"__unstable-large",label:(0,Ot.__)("Size"),value:d,onChange:m,isBlock:!0,help:SIe(n||r?.backgroundSize),children:[(0,Ie.jsx)(Be.__experimentalToggleGroupControlOption,{value:"cover",label:(0,Ot._x)("Cover","Size option for background image control")},"cover"),(0,Ie.jsx)(Be.__experimentalToggleGroupControlOption,{value:"contain",label:(0,Ot._x)("Contain","Size option for background image control")},"contain"),(0,Ie.jsx)(Be.__experimentalToggleGroupControlOption,{value:"auto",label:(0,Ot._x)("Tile","Size option for background image control")},"tile")]}),(0,Ie.jsxs)(Be.__experimentalHStack,{justify:"flex-start",spacing:2,as:"span",children:[(0,Ie.jsx)(Be.__experimentalUnitControl,{"aria-label":(0,Ot.__)("Background image width"),onChange:m,value:n,size:"__unstable-large",__unstableInputWidth:"100px",min:0,placeholder:(0,Ot.__)("Auto"),disabled:d!=="auto"||d===void 0}),(0,Ie.jsx)(Be.ToggleControl,{label:(0,Ot.__)("Repeat"),checked:f,onChange:p,disabled:d==="cover"})]})]})}function Jse({value:e,onChange:t,inheritedValue:o=e,settings:r,defaultValues:n={}}){let{globalStyles:i,_links:s}=(0,g_.useSelect)(v=>{let{getSettings:k}=v(_),y=k();return{globalStyles:y[Si],_links:y[g0]}},[]),a=(0,_c.useMemo)(()=>{let v={background:{}};return o?.background?(Object.entries(o?.background).forEach(([k,y])=>{v.background[k]=Ig(y,{styles:i,_links:s})}),v):o},[i,s,o]),c=()=>t(pe(e,["background"],{})),{title:u,url:d}=e?.background?.backgroundImage||{...a?.background?.backgroundImage},f=sp(e)||sp(a),m=e?.background?.backgroundImage||o?.background?.backgroundImage,h=f&&m!=="none"&&(r?.background?.backgroundSize||r?.background?.backgroundPosition||r?.background?.backgroundRepeat),[p,g]=(0,_c.useState)(!1),b=(0,_c.useRef)();return(0,Ie.jsx)("div",{ref:b,className:V("block-editor-global-styles-background-panel__inspector-media-replace-container",{"is-open":p}),children:h?(0,Ie.jsx)(wIe,{label:u,filename:u,url:d,onToggle:g,hasImageValue:f,onReset:c,containerRef:b,children:(0,Ie.jsxs)(Be.__experimentalVStack,{spacing:3,className:"single-column",children:[(0,Ie.jsx)(Yse,{onChange:t,style:e,inheritedValue:a,displayInPanel:!0,onResetImage:()=>{g(!1),c()},onRemoveImage:()=>g(!1),defaultValues:n,containerRef:b}),(0,Ie.jsx)(BIe,{onChange:t,style:e,defaultValues:n,inheritedValue:a})]})}):(0,Ie.jsx)(Yse,{onChange:t,style:e,inheritedValue:a,defaultValues:n,onResetImage:()=>{g(!1),c()},onRemoveImage:()=>g(!1),containerRef:b})})}var b_=l(w(),1),EIe={backgroundImage:!0};function k_(e){return ZP.Platform.OS==="web"&&e?.background?.backgroundImage}function sp(e){return!!e?.background?.backgroundImage?.id||typeof e?.background?.backgroundImage=="string"||!!e?.background?.backgroundImage?.url}function TIe({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n,headerLabel:i}){let s=Po();return(0,b_.jsx)(qP.__experimentalToolsPanel,{label:i,resetAll:()=>{let c=e(o);t(c)},panelId:r,dropdownMenuProps:s,children:n})}function XP({as:e=TIe,value:t,onChange:o,inheritedValue:r,settings:n,panelId:i,defaultControls:s=EIe,defaultValues:a={},headerLabel:c=(0,VF.__)("Background")}){let u=k_(n),d=()=>o(pe(t,["background"],{})),f=(0,ZP.useCallback)(m=>({...m,background:{}}),[]);return(0,b_.jsx)(e,{resetAllFilter:f,value:t,onChange:o,panelId:i,headerLabel:c,children:u&&(0,b_.jsx)(qP.__experimentalToolsPanelItem,{hasValue:()=>!!t?.background,label:(0,VF.__)("Image"),onDeselect:d,isShownByDefault:s.backgroundImage,panelId:i,children:(0,b_.jsx)(Jse,{value:t,onChange:o,settings:n,inheritedValue:r,defaultControls:s,defaultValues:a})})})}var JP=l(N(),1),jF=l(w(),1),lp="__experimentalBorder",y_="shadow",eae=(e,t,o)=>{let r;return e.some(n=>n.colors.some(i=>i[t]===o?(r=i,!0):!1)),r},ap=({colors:e,namedColor:t,customColor:o})=>{if(t){let n=eae(e,"slug",t);if(n)return n}if(!o)return{color:void 0};let r=eae(e,"color",o);return r||{color:o}};function QP(e){let t=/var:preset\|color\|(.+)/.exec(e);return t&&t[1]?t[1]:null}function rae(e){if((0,zF.__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:Ne(r),borderColor:o}}function nae(e){return(0,zF.__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 IIe({label:e,children:t,resetAllFilter:o}){let r=(0,$b.useCallback)(n=>{let i=nae(n),s=o(i);return{...n,...rae(s)}},[o]);return(0,jF.jsx)(fe,{group:"border",resetAllFilter:r,label:e,children:t})}function iae({clientId:e,name:t,setAttributes:o,settings:r}){let n=NP(r),{style:i,borderColor:s}=(0,oae.useSelect)(d=>{if(!n)return{};let{style:f,borderColor:m}=d(_).getBlockAttributes(e)||{};return{style:f,borderColor:m}},[e,n]),a=(0,$b.useMemo)(()=>nae({style:i,borderColor:s}),[i,s]),c=d=>{o(rae(d))};if(!n)return null;let u={...(0,v_.getBlockSupport)(t,[lp,"__experimentalDefaultControls"]),...(0,v_.getBlockSupport)(t,[y_,"__experimentalDefaultControls"])};return(0,jF.jsx)(MP,{as:IIe,panelId:e,settings:r,value:a,onChange:c,defaultControls:u})}function e2(e,t="any"){if($b.Platform.OS!=="web")return!1;let o=(0,v_.getBlockSupport)(e,lp);return o===!0?!0:t==="any"?!!(o?.color||o?.radius||o?.width||o?.style):!!o?.[t]}function Ub({blockName:e,hasBorderControl:t,hasShadowControl:o}={}){let r=is(e),n=m_(r);return!t&&!o&&e&&(t=n?.hasBorderColor||n?.hasBorderStyle||n?.hasBorderWidth||n?.hasBorderRadius,o=n?.hasShadow),t&&o?(0,JP.__)("Border & Shadow"):o?(0,JP.__)("Shadow"):(0,JP.__)("Border")}function PIe(e){return!e2(e,"color")||e.attributes.borderColor?e:{...e,attributes:{...e.attributes,borderColor:{type:"string"}}}}function sae(e,t,o){if(!e2(t,"color")||He(t,lp,"color"))return e;let r=UF(o),n=V(e.className,r);return e.className=n||void 0,e}function UF(e){let{borderColor:t,style:o}=e,r=yi("border-color",t);return V({"has-border-color":t||o?.border?.color,[r]:!!r})}function RIe({name:e,borderColor:t,style:o}){let{colors:r}=xd();if(!e2(e,"color")||He(e,lp,"color"))return{};let{color:n}=ap({colors:r,namedColor:t}),{color:i}=ap({colors:r,namedColor:QP(o?.border?.top?.color)}),{color:s}=ap({colors:r,namedColor:QP(o?.border?.right?.color)}),{color:a}=ap({colors:r,namedColor:QP(o?.border?.bottom?.color)}),{color:c}=ap({colors:r,namedColor:QP(o?.border?.left?.color)});return sae({style:Ne({borderTopColor:i||n,borderRightColor:s||n,borderBottomColor:a||n,borderLeftColor:c||n})||{}},e,{borderColor:t,style:o})}var HF={useBlockProps:RIe,addSaveProps:sae,attributeKeys:["borderColor","style"],hasSupport(e){return e2(e,"color")}};(0,tae.addFilter)("blocks.registerBlockType","core/border/addAttributes",PIe);var KF=l(rt(),1),xc=l($(),1),Dd=l(P(),1),bae=l(F(),1);var WF=l($(),1),aae=l(F(),1),lae=l(P(),1);var $F=l(w(),1),cp="background",GF={backgroundSize:"cover",backgroundPosition:"50% 50%"};function t2(e,t="any"){let o=(0,WF.getBlockSupport)(e,cp);return o===!0?!0:t==="any"?!!o?.backgroundImage||!!o?.backgroundSize||!!o?.backgroundRepeat:!!o?.[t]}function o2(e){if(!e||!e?.backgroundImage?.url)return;let t;return e?.backgroundSize||(t={backgroundSize:GF.backgroundSize}),e?.backgroundSize==="contain"&&!e?.backgroundPosition&&(t={backgroundPosition:GF.backgroundPosition}),t}function OIe({name:e,style:t}){if(!t2(e)||!t?.background?.backgroundImage)return;let o=o2(t?.background);if(o)return{style:{...o}}}function cae(e){return sp(e)?"has-background":""}function AIe({children:e}){let t=(0,lae.useCallback)(o=>({...o,style:{...o.style,background:void 0}}),[]);return(0,$F.jsx)(fe,{group:"background",resetAllFilter:t,children:e})}function uae({clientId:e,name:t,setAttributes:o,settings:r}){let{style:n,inheritedValue:i}=(0,aae.useSelect)(u=>{let{getBlockAttributes:d,getSettings:f}=u(_),m=f();return{style:d(e)?.style,inheritedValue:m[Si]?.blocks?.[t]}},[e,t]);if(!k_(r)||!t2(t,"backgroundImage"))return null;let s=u=>{o({style:Ne(u)})},a={...r,background:{...r.background,backgroundSize:r?.background?.backgroundSize&&t2(t,"backgroundSize")}},c=(0,WF.getBlockSupport)(t,[cp,"defaultControls"]);return(0,$F.jsx)(XP,{inheritedValue:i,as:AIe,panelId:e,defaultValues:GF,settings:a,onChange:s,defaultControls:c,value:n})}var dae={useBlockProps:OIe,attributeKeys:["style"],hasSupport:t2};var S_=l(P(),1),mae=l(F(),1),pae=l($(),1);var hae=l(w(),1);function r2(e,t){return e.ownerDocument.defaultView.getComputedStyle(e).getPropertyValue(t)}function fae(e,t){if(!e||!t)return{};let o=ei(t,"color.text",{fallback:!0}),r=ei(t,"color.background",{fallback:!0}),n=e.querySelector(o)||e,i=e.querySelector(r)||e,s=e.querySelector("a"),a=r2(n,"color"),c=s&&s.textContent?r2(s,"color"):void 0,u=i,d=r2(u,"background-color");for(;d==="rgba(0, 0, 0, 0)"&&u.parentNode&&u.parentNode.nodeType===u.parentNode.ELEMENT_NODE;)u=u.parentNode,d=r2(u,"background-color");return{textColor:a,backgroundColor:d,linkColor:c}}function LIe(e,t){return Object.keys(t).some(r=>e[r]!==t[r])?t:e}function gae({clientId:e,name:t}){let o=mt(e),[r,n]=(0,S_.useReducer)(LIe,{}),i=(0,mae.useSelect)(s=>t?s(pae.store).getBlockType(t):void 0,[t]);return(0,S_.useLayoutEffect)(()=>{!o||!i||window.requestAnimationFrame(()=>window.requestAnimationFrame(()=>n(fae(o,i))))}),(0,S_.useLayoutEffect)(()=>{if(!o||!i)return;let s=new window.MutationObserver(()=>{n(fae(o,i))});return s.observe(o,{attributes:!0,attributeFilter:["class","style"]}),()=>{s.disconnect()}},[o,i]),(0,hae.jsx)(KT,{backgroundColor:r.backgroundColor,textColor:r.textColor,linkColor:r.linkColor,enableAlphaChecker:!0})}var n2=l(w(),1),nr="color",i2=e=>{let t=(0,xc.getBlockSupport)(e,nr);return t&&(t.link===!0||t.gradient===!0||t.background!==!1||t.text!==!1)},NIe=e=>{if(Dd.Platform.OS!=="web")return!1;let t=(0,xc.getBlockSupport)(e,nr);return t!==null&&typeof t=="object"&&!!t.link},YF=e=>{let t=(0,xc.getBlockSupport)(e,nr);return t!==null&&typeof t=="object"&&!!t.gradients},MIe=e=>{let t=(0,xc.getBlockSupport)(e,nr);return t&&t.background!==!1},DIe=e=>{let t=(0,xc.getBlockSupport)(e,nr);return t&&t.text!==!1};function VIe(e){return i2(e)&&(e.attributes.backgroundColor||Object.assign(e.attributes,{backgroundColor:{type:"string"}}),e.attributes.textColor||Object.assign(e.attributes,{textColor:{type:"string"}}),YF(e)&&!e.attributes.gradient&&Object.assign(e.attributes,{gradient:{type:"string"}})),e}function kae(e,t,o){if(!i2(t)||He(t,nr))return e;let r=YF(t),{backgroundColor:n,textColor:i,gradient:s,style:a}=o,c=g=>!He(t,nr,g),u=c("text")?yi("color",i):void 0,d=c("gradients")?oh(s):void 0,f=c("background")?yi("background-color",n):void 0,m=c("background")||c("gradients"),h=n||a?.color?.background||r&&(s||a?.color?.gradient),p=V(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 vae(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:Ne(a),textColor:o,backgroundColor:n,gradient:s}}function yae(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 FIe({children:e,resetAllFilter:t}){let o=(0,Dd.useCallback)(r=>{let n=yae(r),i=t(n);return{...r,...vae(i)}},[t]);return(0,n2.jsx)(fe,{group:"color",resetAllFilter:o,children:e})}function s2({clientId:e,name:t,setAttributes:o,settings:r,asWrapper:n,label:i,defaultControls:s}){let a=FP(r),{style:c,textColor:u,backgroundColor:d,gradient:f}=(0,bae.useSelect)(b=>{if(!a)return{};let{style:v,textColor:k,backgroundColor:y,gradient:S}=b(_).getBlockAttributes(e)||{};return{style:v,textColor:k,backgroundColor:y,gradient:S}},[e,a]),m=(0,Dd.useMemo)(()=>yae({style:c,textColor:u,backgroundColor:d,gradient:f}),[c,u,d,f]),h=b=>{o(vae(b))};if(!a)return null;s=s||(0,xc.getBlockSupport)(t,[nr,"__experimentalDefaultControls"]);let p=Dd.Platform.OS==="web"&&!m?.color?.gradient&&(r?.color?.text||r?.color?.link)&&(0,xc.getBlockSupport)(t,[nr,"enableContrastChecker"])!==!1;return(0,n2.jsx)(zP,{as:n||FIe,panelId:e,settings:r,value:m,onChange:h,defaultControls:s,label:i,enableContrastChecker:(0,xc.getBlockSupport)(t,[nr,"enableContrastChecker"])!==!1,children:p&&(0,n2.jsx)(gae,{clientId:e,name:t})})}function zIe({name:e,backgroundColor:t,textColor:o,gradient:r,style:n}){let[i,s,a]=me("color.palette.custom","color.palette.theme","color.palette.default"),c=(0,Dd.useMemo)(()=>[...i||[],...s||[],...a||[]],[i,s,a]);if(!i2(e)||He(e,nr))return{};let u={};o&&!He(e,nr,"text")&&(u.color=ua(c,o)?.color),t&&!He(e,nr,"background")&&(u.backgroundColor=ua(c,t)?.color);let d=kae({style:u},e,{textColor:o,backgroundColor:t,gradient:r,style:n}),f=t||n?.color?.background||r||n?.color?.gradient;return{...d,className:V(d.className,!f&&cae(n))}}var qF={useBlockProps:zIe,addSaveProps:kae,attributeKeys:["backgroundColor","textColor","gradient","style"],hasSupport:i2},jIe={linkColor:[["style","elements","link","color","text"]],textColor:[["textColor"],["style","color","text"]],backgroundColor:[["backgroundColor"],["style","color","background"]],gradient:[["gradient"],["style","color","gradient"]]};function UIe(e,t,o,r){let n=e.name,i={linkColor:NIe(n),textColor:DIe(n),backgroundColor:MIe(n),gradient:YF(n)};return a2(i,jIe,e,t,o,r)}(0,KF.addFilter)("blocks.registerBlockType","core/color/addAttribute",VIe);(0,KF.addFilter)("blocks.switchToBlockType.transformedBlock","core/color/addTransforms",UIe);var br=l(w(),1);function HIe({blockName:e,clientId:t,contentClientIds:o}){let r=is(e),{updateBlockAttributes:n}=(0,l2.useDispatch)(_),{hasButtons:i,hasHeading:s}=(0,l2.useSelect)(c=>{let u=c(_).getBlockNamesByClientId(o);return{hasButtons:u.includes("core/buttons"),hasHeading:u.includes("core/heading")}},[o]);return(0,br.jsx)(s2,{clientId:t,name:e,settings:r,setAttributes:c=>{n(t,c)},asWrapper:MF,label:(0,Kb.__)("Color"),defaultControls:{text:!0,background:!0,button:i,heading:s}})}var GIe=({blockName:e,clientId:t,hasBlockStyles:o,isSectionBlock:r,contentClientIds:n})=>{let i=Ub({blockName:e});return(0,br.jsxs)(br.Fragment,{children:[o&&(0,br.jsx)(Yg,{clientId:t}),r&&(0,br.jsx)(HIe,{blockName:e,clientId:t,contentClientIds:n}),!r&&(0,br.jsxs)(br.Fragment,{children:[(0,br.jsx)(fe.Slot,{group:"color",label:(0,Kb.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,br.jsx)(fe.Slot,{group:"background",label:(0,Kb.__)("Background image")}),(0,br.jsx)(fe.Slot,{group:"filter"}),(0,br.jsx)(fe.Slot,{group:"typography",label:(0,Kb.__)("Typography")}),(0,br.jsx)(fe.Slot,{group:"dimensions",label:(0,Kb.__)("Dimensions")}),(0,br.jsx)(fe.Slot,{group:"border",label:i}),(0,br.jsx)(fe.Slot,{group:"styles"})]})]})},Sae=GIe;var _ae=l(A(),1),xae=l(N(),1);var c2=l($(),1),u2=l(F(),1),ui=l(A(),1);var ss=l(w(),1);function d2({clientIds:e,onSelect:t,onSwitchToListView:o,hasListViewTab:r}){return e.length?(0,ss.jsx)(ui.__experimentalVStack,{spacing:1,children:e.map(n=>(0,ss.jsx)(WIe,{onSelect:t,onSwitchToListView:o,hasListViewTab:r,clientId:n},n))}):null}function WIe({clientId:e,onSelect:t,onSwitchToListView:o,hasListViewTab:r}){let n=Tt(e),{isSelected:i,childBlocks:s,hasListViewSupport:a,blockName:c}=(0,u2.useSelect)(p=>{let{isBlockSelected:g,hasSelectedInnerBlock:b,getBlockOrder:v,getBlockName:k}=p(_),y=k(e);return{isSelected:g(e)||b(e,!0),childBlocks:v(e),hasListViewSupport:y==="core/navigation"||(0,c2.hasBlockSupport)(y,"listView"),blockName:y}},[e]),d=(0,c2.getBlockType)(c)?.title||c,{selectBlock:f}=(0,u2.useDispatch)(_),h=s&&s.length>0&&r&&a;return(0,ss.jsx)(ui.Button,{__next40pxDefaultSize:!0,className:"block-editor-block-quick-navigation__item",isPressed:i,onClick:async()=>{await f(e),h&&o&&o(e),t&&t(e)},children:(0,ss.jsxs)(ui.Flex,{children:[(0,ss.jsx)(ui.FlexItem,{children:(0,ss.jsx)(Oe,{icon:n?.icon})}),(0,ss.jsx)(ui.FlexBlock,{style:{textAlign:"left"},children:(0,ss.jsx)(ui.__experimentalTruncate,{children:d})}),h&&(0,ss.jsx)(ui.FlexItem,{children:(0,ss.jsx)(xe,{icon:Vo,size:24})})]})})}var Yb=l(w(),1),$Ie=({contentClientIds:e,onSwitchToListView:t,hasListViewTab:o})=>{if(!e||e.length===0)return null;let r=window?.__experimentalContentOnlyInspectorFields;return(0,Yb.jsx)(Yb.Fragment,{children:!r&&(0,Yb.jsx)(_ae.PanelBody,{title:(0,xae.__)("Content"),children:(0,Yb.jsx)(d2,{clientIds:e,onSwitchToListView:t,hasListViewTab:o})})})},f2=$Ie;var Wo=l(w(),1),{Tabs:Vd}=M(Zb.privateApis);function ZF({blockName:e,clientId:t,hasBlockStyles:o,tabs:r,isSectionBlock:n,contentClientIds:i}){let s=(0,ta.useRef)(null),a=(0,qb.useSelect)(S=>S(wae.store).get("core","showIconLabels"),[]),{requestedTab:c}=(0,qb.useSelect)(S=>({requestedTab:M(S(_)).getRequestedInspectorTab()})),[u,d]=(0,ta.useState)(()=>c?.tabName??r[0]?.name),f=(0,ta.useRef)(!1),m=(0,ta.useRef)(!1),{__unstableSetOpenListViewPanel:h,__unstableIncrementListViewExpandRevision:p,__unstableSetAllListViewPanelsOpen:g}=(0,qb.useDispatch)(_),{clearRequestedInspectorTab:b}=M((0,qb.useDispatch)(_));(0,ta.useEffect)(()=>{f.current=!1},[t]),(0,ta.useEffect)(()=>{c&&(d(c.tabName),c.tabName===yc.name&&c.options?.openPanel&&(h(c.options.openPanel),p()),m.current=!0,f.current=!0,b())},[c,h,p,b]),(0,ta.useEffect)(()=>{u===yc.name&&!f.current&&(g(),p())},[t,u,g,p]),(0,ta.useEffect)(()=>{if(!r?.length||f.current&&r.some(x=>x.name===u))return;let S=r[0]?.name;u!==S&&d(S)},[r,u]);let v=S=>{d(S),f.current=!0,S===yc.name&&!m.current&&(g(),p()),m.current=!1},k=r.some(S=>S.name===yc.name),y=S=>{k&&(h(S),p(),m.current=!0,v(yc.name))};return(0,Wo.jsx)("div",{className:"block-editor-block-inspector__tabs",children:(0,Wo.jsxs)(Vd,{selectedTabId:u,onSelect:v,children:[(0,Wo.jsx)(Vd.TabList,{children:r.map(S=>a?(0,Wo.jsx)(Vd.Tab,{tabId:S.name,children:S.title},S.name):(0,Wo.jsx)(Zb.Tooltip,{text:S.title,children:(0,Wo.jsx)(Vd.Tab,{tabId:S.name,"aria-label":S.title,children:(0,Wo.jsx)(Zb.Icon,{icon:S.icon})})},S.name))}),(0,Wo.jsxs)(Vd.TabPanel,{tabId:bP.name,focusable:!1,children:[(0,Wo.jsx)(f2,{contentClientIds:i,onSwitchToListView:y,hasListViewTab:k}),(0,Wo.jsx)(fe.Slot,{group:"content"})]}),(0,Wo.jsxs)(Vd.TabPanel,{tabId:yc.name,focusable:!1,children:[(0,Wo.jsx)(fe.Slot,{group:"list",ref:s}),(0,Wo.jsx)(XB,{listViewRef:s})]}),(0,Wo.jsx)(Vd.TabPanel,{tabId:hP.name,focusable:!1,children:(0,Wo.jsx)(Xie,{showAdvancedControls:!!e})}),(0,Wo.jsx)(Vd.TabPanel,{tabId:gP.name,focusable:!1,children:(0,Wo.jsx)(Sae,{blockName:e,clientId:t,hasBlockStyles:o,isSectionBlock:n,contentClientIds:i})})]},t)})}var di=l(A(),1),Cae=l(F(),1);var KIe=[];function YIe(e,t={}){return t[e]!==void 0?t[e]:t.default!==void 0?t.default:!0}function Bae(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}=Wi,b=(0,di.__experimentalUseSlotFills)(f.name),v=!!b&&b.length,k=(0,di.__experimentalUseSlotFills)(c.name),y=!!k&&k.length,x=[...(0,di.__experimentalUseSlotFills)(s.name)||[],...(0,di.__experimentalUseSlotFills)(a.name)||[],...(0,di.__experimentalUseSlotFills)(d.name)||[],...(0,di.__experimentalUseSlotFills)(h.name)||[],...(0,di.__experimentalUseSlotFills)(p.name)||[],...(0,di.__experimentalUseSlotFills)(g.name)||[]].length,C=[...(0,di.__experimentalUseSlotFills)(od.slotName)||[],...(0,di.__experimentalUseSlotFills)(i.name)||[]],B=[...(0,di.__experimentalUseSlotFills)(u.name)||[],...(0,di.__experimentalUseSlotFills)(m.name)||[],...v&&x>1?C:[]],I=window?.__experimentalContentOnlyInspectorFields,O=y||!I&&t?.length;O&&n.push(bP),v&&n.push(yc),(B.length||C.length&&(O||v))&&n.push(hP),(r||x)&&n.push(gP);let E=(0,Cae.useSelect)(T=>T(_).getSettings().blockInspectorTabs,[]);return YIe(e,E)?n:KIe}var Eae=l(A(),1);var XF=l(w(),1),{Fill:qIe,Slot:ZIe}=(0,Eae.createSlotFill)(Symbol("InspectorControlsLastItem")),Tae=e=>Pe()[bs]?(0,XF.jsx)(qIe,{...e}):null;Tae.Slot=function(t){return(0,XF.jsx)(ZIe,{...t})};var m2=Tae;var Iae=l(F(),1);function Pae(e){return(0,Iae.useSelect)(t=>{if(e){let o=t(_).getSettings().blockInspectorAnimation,r=o?.animationParent,{getSelectedBlockClientId:n,getBlockParentsByBlockName:i}=t(_),s=n();return!i(s,r,!0)[0]&&e.name!==r?null:o?.[e.name]}return null},[e])}var _e=l(w(),1);function Aae({blockName:e,showAdvancedControls:t=!0,showPositionControls:o=!0,showBindingsControls:r=!0}){let n=Ub({blockName:e});return(0,_e.jsxs)(_e.Fragment,{children:[(0,_e.jsx)(fe.Slot,{}),(0,_e.jsx)(fe.Slot,{group:"color",label:(0,Xb.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,_e.jsx)(fe.Slot,{group:"background",label:(0,Xb.__)("Background image")}),(0,_e.jsx)(fe.Slot,{group:"typography",label:(0,Xb.__)("Typography")}),(0,_e.jsx)(fe.Slot,{group:"dimensions",label:(0,Xb.__)("Dimensions")}),(0,_e.jsx)(fe.Slot,{group:"border",label:n}),(0,_e.jsx)(fe.Slot,{group:"styles"}),o&&(0,_e.jsx)(yP,{}),r&&(0,_e.jsx)(fe.Slot,{group:"bindings"}),t&&(0,_e.jsx)("div",{children:(0,_e.jsx)(kP,{})})]})}function XIe(){let{selectedBlockCount:e,renderedBlockName:t,renderedBlockClientId:o,blockType:r,isSectionBlock:n,isSectionBlockInSelection:i,hasBlockStyles:s,editedContentOnlySection:a}=(0,QF.useSelect)(g=>{let{getSelectedBlockClientId:b,getSelectedBlockClientIds:v,getSelectedBlockCount:k,getBlockName:y,getParentSectionBlock:S,isSectionBlock:x,getEditedContentOnlySection:C,isWithinEditedContentOnlySection:B}=M(g(_)),{getBlockStyles:I}=g(Fd.store),O=b(),L=B(O)?O:S(O)||O,T=L&&y(L),R=T&&(0,Fd.getBlockType)(T),j=v().some(H=>x(H)),G=T&&I(T),z=G&&G.length>0;return{selectedBlockCount:k(),renderedBlockClientId:L,renderedBlockName:T,blockType:R,isSectionBlockInSelection:j,isSectionBlock:x(L),hasBlockStyles:z,editedContentOnlySection:C()}},[]),c=(0,QF.useSelect)(g=>{if(!n||!o)return[];let{getClientIdsOfDescendants:b,getBlockName:v,getBlockEditingMode:k}=M(g(_)),y=b(o),S=new Set;return y.forEach(x=>{let C=v(x);(C==="core/navigation"||(0,Fd.hasBlockSupport)(C,"listView"))&&b(x).forEach(I=>S.add(I))}),y.filter(x=>!S.has(x)&&k(x)==="contentOnly")},[n,o]),u=Bae(r?.name,c,n,s),d=u?.length>1,f=Pae(r),m=e>1;if(m&&!i)return(0,_e.jsxs)("div",{className:"block-editor-block-inspector",children:[(0,_e.jsx)(IF,{}),d?(0,_e.jsx)(ZF,{tabs:u}):(0,_e.jsx)(Aae,{blockName:t,showAdvancedControls:!1,showPositionControls:!1,showBindingsControls:!1})]});if(m&&i)return(0,_e.jsx)("div",{className:"block-editor-block-inspector",children:(0,_e.jsx)(IF,{})});let h=t===(0,Fd.getUnregisteredTypeHandlerName)();return!r||!o||h?(0,_e.jsx)("span",{className:"block-editor-block-inspector__no-blocks",children:(0,Xb.__)("No block selected.")}):(0,_e.jsx)(QIe,{animate:f,wrapper:g=>(0,_e.jsx)(JIe,{blockInspectorAnimationSettings:f,renderedBlockClientId:o,children:g}),children:(0,_e.jsx)(ePe,{renderedBlockClientId:o,blockName:r.name,isSectionBlock:n,availableTabs:u,contentClientIds:c,hasBlockStyles:s,editedContentOnlySection:a})})}var QIe=({animate:e,wrapper:t,children:o})=>e?t(o):o,JIe=({blockInspectorAnimationSettings:e,renderedBlockClientId:t,children:o})=>{let r=e&&e.enterDirection==="leftToRight"?-50:50;return(0,_e.jsx)(Rae.__unstableMotion.div,{animate:{x:0,opacity:1,transition:{ease:"easeInOut",duration:.14}},initial:{x:r,opacity:0},children:o},t)},ePe=({renderedBlockClientId:e,blockName:t,isSectionBlock:o,availableTabs:r,contentClientIds:n,hasBlockStyles:i,editedContentOnlySection:s})=>{let a=(0,Oae.useRef)(null),c=r?.length>1,u=s&&s!==e,d=Tt(s),f=Tt(e),m=f.isSynced;return(0,_e.jsxs)("div",{className:"block-editor-block-inspector",children:[u&&(0,_e.jsx)(ky,{...d,className:d?.isSynced&&"is-synced",parentClientId:s}),(0,_e.jsx)(ky,{...f,allowParentNavigation:!0,className:m&&"is-synced",isChild:u,clientId:e}),(0,_e.jsx)(o9,{clientId:e}),(0,_e.jsx)(Uie,{clientId:e}),(0,_e.jsx)(zT,{blockClientId:e}),c&&(0,_e.jsx)(_e.Fragment,{children:(0,_e.jsx)(ZF,{hasBlockStyles:i,clientId:e,blockName:t,tabs:r,isSectionBlock:o,contentClientIds:n})}),!c&&(0,_e.jsxs)(_e.Fragment,{children:[i&&(0,_e.jsx)(Yg,{clientId:e}),(0,_e.jsx)(f2,{contentClientIds:n}),(0,_e.jsx)(fe.Slot,{group:"content"}),(0,_e.jsx)(fe.Slot,{group:"list",ref:a}),(0,_e.jsx)(XB,{listViewRef:a}),!o&&(0,_e.jsx)(Aae,{blockName:t})]}),(0,_e.jsx)(m2.Slot,{}),(0,_e.jsx)(mP,{},"back")]})},Lae=XIe;var JF=l(Re(),1);var Nae=l(w(),1),Mae=()=>((0,JF.default)("__unstableUseClipboardHandler",{alternative:"BlockCanvas or WritingFlow",since:"6.4",version:"6.7"}),Sy());function Dae(e){return(0,JF.default)("CopyHandler",{alternative:"BlockCanvas or WritingFlow",since:"6.4",version:"6.7"}),(0,Nae.jsx)("div",{...e,ref:Sy()})}var Vae=l(F(),1),e4=l(P(),1);var t4=l(w(),1),tPe=()=>{};function oPe({rootClientId:e,clientId:t,isAppender:o,showInserterHelpPanel:r,showMostUsedBlocks:n=!1,__experimentalInsertionIndex:i,__experimentalInitialTab:s,__experimentalInitialCategory:a,__experimentalFilterValue:c,onPatternCategorySelection:u,onSelect:d=tPe,shouldFocusBlock:f=!1,onClose:m},h){let{destinationRootClientId:p}=(0,Vae.useSelect)(g=>{let{getBlockRootClientId:b}=g(_);return{destinationRootClientId:e||b(t)||void 0}},[t,e]);return(0,t4.jsx)(F5,{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 o4=(0,e4.forwardRef)(oPe);function rPe(e,t){return(0,t4.jsx)(o4,{...e,onPatternCategorySelection:void 0,ref:t})}var Fae=(0,e4.forwardRef)(rPe);var zae=l(Re(),1);function jae(){return(0,zae.default)("wp.blockEditor.MultiSelectScrollIntoView",{hint:"This behaviour is now built-in.",since:"5.8"}),null}var Uae=l(Z(),1),__=l(Fe(),1),Hae=l(F(),1),zd=l(it(),1);var Gae=l(w(),1),nPe=window.navigator.userAgent.indexOf("Trident")!==-1,iPe=new Set([zd.UP,zd.DOWN,zd.LEFT,zd.RIGHT]),sPe=.75;function r4(){let e=(0,Hae.useSelect)(t=>t(_).hasSelectedBlock(),[]);return(0,Uae.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,__.computeCaretRect)(r);if(!b)return;if(!s){s=b;return}if(iPe.has(g)){s=b;return}let v=b.top-s.top;if(v===0)return;let k=(0,__.getScrollContainer)(t);if(!k)return;let y=k===o.body||k===o.documentElement,S=y?r.scrollY:k.scrollTop,x=y?0:k.getBoundingClientRect().top,C=y?s.top/r.innerHeight:(s.top-x)/(r.innerHeight-x);if(S===0&&C<sPe&&p()){s=b;return}let B=y?r.innerHeight:k.clientHeight;if(s.top+s.height>x+B||s.top<x){s=b;return}y?r.scrollBy(0,v):k.scrollTop+=v}function d(){o.addEventListener("selectionchange",f)}function f(){o.removeEventListener("selectionchange",f),m()}function m(){h()&&(s=(0,__.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 aPe({children:e}){return(0,Gae.jsx)("div",{ref:r4(),className:"block-editor__typewriter",children:e})}var lPe=nPe?e=>e.children:aPe,Wae=lPe;var up=l(P(),1),n4=l(Re(),1);var i4=l(w(),1),p2=(0,up.createContext)({});p2.displayName="RenderedRefsContext";function cPe(e,t,o){let r={...e,[t]:e[t]?new Set(e[t]):new Set};return r[t].add(o),r}function s4({children:e,uniqueId:t,blockName:o=""}){let r=(0,up.useContext)(p2),{name:n}=Pe();o=o||n;let i=(0,up.useMemo)(()=>cPe(r,o,t),[r,o,t]);return(0,i4.jsx)(p2.Provider,{value:i,children:e})}function a4(e,t=""){let o=(0,up.useContext)(p2),{name:r}=Pe();return t=t||r,!!o[t]?.has(e)}var $ae=e=>((0,n4.default)("wp.blockEditor.__experimentalRecursionProvider",{since:"6.5",alternative:"wp.blockEditor.RecursionProvider"}),(0,i4.jsx)(s4,{...e})),Kae=(...e)=>((0,n4.default)("wp.blockEditor.__experimentalUseHasRecursion",{since:"6.5",alternative:"wp.blockEditor.useHasRecursion"}),a4(...e));var g2=l(A(),1),l4=l(N(),1),c4=l(P(),1),qae=l(pc(),1);var fi=l(A(),1);var Yae=l(N(),1),wc=l(w(),1);function h2({title:e,help:t,actions:o=[],onClose:r}){return(0,wc.jsxs)(fi.__experimentalVStack,{className:"block-editor-inspector-popover-header",spacing:4,children:[(0,wc.jsxs)(fi.__experimentalHStack,{alignment:"center",children:[(0,wc.jsx)(fi.__experimentalHeading,{className:"block-editor-inspector-popover-header__heading",level:2,size:13,children:e}),(0,wc.jsx)(fi.__experimentalSpacer,{}),o.map(({label:n,icon:i,onClick:s})=>(0,wc.jsx)(fi.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,wc.jsx)(fi.Button,{size:"small",className:"block-editor-inspector-popover-header__action",label:(0,Yae.__)("Close"),icon:xf,onClick:r})]}),t&&(0,wc.jsx)(fi.__experimentalText,{children:t})]})}var Qb=l(w(),1);function uPe({onClose:e,onChange:t,showPopoverHeaderActions:o,isCompact:r,currentDate:n,title:i,...s},a){let c={startOfWeek:(0,qae.getSettings)().l10n.startOfWeek,onChange:t,currentDate:r?void 0:n,currentTime:r?n:void 0,...s},u=r?g2.TimePicker:g2.DateTimePicker;return(0,Qb.jsxs)("div",{ref:a,className:"block-editor-publish-date-time-picker",children:[(0,Qb.jsx)(h2,{title:i||(0,l4.__)("Publish"),actions:o?[{label:(0,l4.__)("Now"),onClick:()=>t?.(null)}]:void 0,onClose:e}),(0,Qb.jsx)(u,{...c})]})}var u4=(0,c4.forwardRef)(uPe);function dPe(e,t){return(0,Qb.jsx)(u4,{...e,showPopoverHeaderActions:!0,isCompact:!1,ref:t})}var Zae=(0,c4.forwardRef)(dPe);var b2=l(F(),1),Xae=l(P(),1);function Mo(e){let t=Pe(),{clientId:o=""}=t,{setBlockEditingMode:r,unsetBlockEditingMode:n}=(0,b2.useDispatch)(_),i=(0,b2.useSelect)(s=>o?null:s(_).getBlockEditingMode(),[o]);return(0,Xae.useEffect)(()=>(e&&r(o,e),()=>{e&&n(o)}),[o,e,r,n]),o?t[s0]:i}var Qae=l(Re(),1),Jae=l(P(),1);function fPe(){return(0,Qae.default)("wp.blockEditor.ToolSelector",{since:"6.9",hint:"The ToolSelector component no longer renders anything."}),null}var ele=(0,Jae.forwardRef)(fPe);var w_=l(w(),1),Ne=e=>{if(e===null||typeof e!="object"||Array.isArray(e))return e;let t=Object.entries(e).map(([o,r])=>[o,Ne(r)]).filter(([,o])=>o!==void 0);return t.length?Object.fromEntries(t):void 0};function a2(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=yl(s,d);f&&(a={...a,attributes:pe(a.attributes,d,f)})})}),a}function He(e,t,o){let n=(0,tle.getBlockSupport)(e,t)?.__experimentalSkipSerialization;return Array.isArray(n)?n.includes(o):n}var Cc=new WeakMap;function Zn({id:e,css:t}){return tc({id:e,css:t})}function tc({id:e,css:t,assets:o,__unstableType:r,variation:n,clientId:i}={}){let{setStyleOverride:s,deleteStyleOverride:a}=M((0,k2.useDispatch)(_)),c=(0,k2.useRegistry)(),u=(0,as.useId)();(0,as.useEffect)(()=>{if(!t&&!o)return;let d=e||u,f={id:e,css:t,assets:o,__unstableType:r,variation:n,clientId:i};return Cc.get(c)||Cc.set(c,[]),Cc.get(c).push([d,f]),window.queueMicrotask(()=>{Cc.get(c)?.length&&c.batch(()=>{Cc.get(c).forEach(m=>{s(...m)}),Cc.set(c,[])})}),()=>{Cc.get(c)?.find(([h])=>h===d)?Cc.set(c,Cc.get(c).filter(([h])=>h!==d)):a(d)}},[e,t,i,o,r,u,s,a,c,n])}function is(e,t){let[o,r,n,i,s,a,c,u,d,f,m,h,p,g,b,v,k,y,S,x,C,B,I,O,E,L,T,R,D,j,G,z,H,W,te,ne,ae,X,ee,le,Q,J,q,U,K,se,ce,Se,he,we,De,ct,Jt,uo,Do,ot,sr,ze,wt,je,At]=me("background.backgroundImage","background.backgroundSize","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.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"),ar=(0,as.useMemo)(()=>({background:{backgroundImage:o,backgroundSize:r},color:{palette:{custom:J,theme:U,default:K},gradients:{custom:De,theme:ct,default:Jt},duotone:{custom:Se,theme:he,default:we},defaultGradients:uo,defaultPalette:se,defaultDuotone:ce,custom:Q,customGradient:Do,customDuotone:q,background:ot,link:sr,heading:wt,button:je,text:ze},typography:{fontFamilies:{custom:n,default:i,theme:s},fontSizes:{custom:c,default:u,theme:d},customFontSize:f,defaultFontSizes:a,fontStyle:m,fontWeight:h,lineHeight:p,textAlign:g,textColumns:b,textDecoration:v,textIndent:k,textTransform:S,letterSpacing:x,writingMode:y},spacing:{spacingSizes:{custom:L,default:T,theme:R},customSpacingSize:E,defaultSpacingSizes:O,padding:C,margin:B,blockGap:I,units:D},border:{color:ne,radius:ae,style:X,width:ee,radiusSizes:le},dimensions:{aspectRatio:j,height:G,minHeight:z,width:H,dimensionSizes:W},layout:te,parentLayout:t,shadow:At}),[o,r,n,i,s,a,c,u,d,f,m,h,p,g,b,v,k,S,x,y,C,B,I,O,E,L,T,R,D,j,G,z,H,W,te,t,ne,ae,X,ee,le,Q,J,q,U,K,se,ce,Se,he,we,De,ct,Jt,uo,Do,ot,sr,ze,wt,je,At]);return xP(ar,e)}function ole(e){e=e.map(o=>({...o,Edit:(0,as.memo)(o.edit)}));let t=(0,d4.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[$c]||i[bs]||i[Rp]&&f)||!u(n.name))return null;let p={};for(let g of d)n.attributes[g]&&(p[g]=n.attributes[g]);return(0,w_.jsx)(c,{name:n.name,isSelected:n.isSelected,clientId:n.clientId,setAttributes:n.setAttributes,__unstableParentLayout:n.__unstableParentLayout,...p},a)}),(0,w_.jsx)(o,{...n},"edit")]},"withBlockEditHooks");(0,x_.addFilter)("editor.BlockEdit","core/editor/hooks",t)}function mPe({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,as.useEffect)(()=>(i(n),()=>{i(void 0)})),null}var pPe=(0,as.memo)(mPe);function rle(e){let t=(0,d4.createHigherOrderComponent)(o=>function(n){let[i,s]=(0,as.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,w_.jsx)(pPe,{index:c,useBlockProps:f,setAllWrapperProps:s,name:n.name,clientId:n.clientId,...h},c)}),(0,w_.jsx)(o,{...n,wrapperProps:i.filter(Boolean).reduce((a,c)=>({...a,...c,className:V(a.className,c.className),style:{...a.style,...c.style}}),n.wrapperProps||{})},"edit")]},"withBlockListBlockHooks");(0,x_.addFilter)("editor.BlockListBlock","core/editor/hooks",t)}function nle(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,x_.addFilter)("blocks.getSaveContent.extraProps","core/editor/hooks",t,0),(0,x_.addFilter)("blocks.getSaveContent.extraProps","core/editor/hooks",o=>(o.hasOwnProperty("className")&&!o.className&&delete o.className,o))}var ile=l($(),1),sle=l(rt(),1);function hPe(e){let{apiVersion:t=1}=e;return t<2&&(0,ile.hasBlockSupport)(e,"lightBlockWrapper",!1)&&(e.apiVersion=2),e}(0,sle.addFilter)("blocks.registerBlockType","core/compat/migrateLightBlockWrapper",hPe);var lle=l(rt(),1),cle=l(Z(),1),f4=l(w(),1);function ale(e){if(e.hasAttribute("crossorigin")||e.setAttribute("crossorigin","anonymous"),e.nodeName==="IFRAME"&&!e.hasAttribute("credentialless")){if(e.getAttribute("src")?.startsWith("blob:"))return;e.setAttribute("credentialless","");let t=e.getAttribute("src")||"";e.setAttribute("src",""),e.setAttribute("src",t)}}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})})};gPe=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;if(a.querySelectorAll){if(a.querySelectorAll("img,source,script,video,link,iframe").forEach(c=>{ale(c)}),a.nodeName==="IFRAME"){let c=a;c.classList.contains("components-sandbox")||c.addEventListener("load",()=>{try{c.contentDocument&&c.contentDocument.body&&t.observe(c.contentDocument,{childList:!0,attributes:!0,subtree:!0})}catch{}})}["IMG","SOURCE","SCRIPT","VIDEO","LINK","IFRAME"].includes(a.nodeName)&&ale(a)}})})})});e()}var gPe;if(window.crossOriginIsolated){let e="credentialless"in window.HTMLIFrameElement.prototype,t=(0,cle.createHigherOrderComponent)(o=>function(n){if(n.name!=="core/embed")return(0,f4.jsx)(o,{...n});let i=e&&!["facebook","smugmug"].includes(n.attributes.providerNameSlug);return(0,f4.jsx)(o,{...n,attributes:{...n.attributes,previewable:i}})},"withDisabledEmbedPreview");(0,lle.addFilter)("editor.BlockEdit","media-experiments/disable-embed-previews",t)}var ule=l(rt(),1),ls=l($(),1);var m4=l(w(),1),p4=["left","center","right","wide","full"],bPe=["wide","full"];function h4(e,t=!0,o=!0){let r;return Array.isArray(e)?r=p4.filter(n=>e.includes(n)):e===!0?r=[...p4]:r=[],!o||e===!0&&!t?r.filter(n=>!bPe.includes(n)):r}function kPe(e){return"type"in(e.attributes?.align??{})||(0,ls.hasBlockSupport)(e,"align")&&(e.attributes={...e.attributes,align:{type:"string",enum:[...p4,""]}}),e}function vPe({name:e,align:t,setAttributes:o}){let r=h4((0,ls.getBlockSupport)(e,"align"),(0,ls.hasBlockSupport)(e,"alignWide",!0)),n=jv(r).map(({name:a})=>a),i=Mo();return!n.length||i!=="default"?null:(0,m4.jsx)(Mt,{group:"block",__experimentalShareWithChildBlocks:!0,children:(0,m4.jsx)(nC,{value:t,onChange:a=>{a||(0,ls.getBlockType)(e)?.attributes?.align?.default&&(a=""),o({align:a})},controls:n})})}var v2={shareWithChildBlocks:!0,edit:vPe,useBlockProps:yPe,addSaveProps:SPe,attributeKeys:["align"],hasSupport(e){return(0,ls.hasBlockSupport)(e,"align",!1)}};function yPe({name:e,align:t}){let o=h4((0,ls.getBlockSupport)(e,"align"),(0,ls.hasBlockSupport)(e,"alignWide",!0));return jv(o).some(n=>n.name===t)?{"data-align":t}:{}}function SPe(e,t,o){let{align:r}=o,n=(0,ls.getBlockSupport)(t,"align"),i=(0,ls.hasBlockSupport)(t,"alignWide",!0);return h4(n,i).includes(r)&&(e.className=V(`align${r}`,e.className)),e}(0,ule.addFilter)("blocks.registerBlockType","core/editor/align/addAttribute",kPe);var dle=l(rt(),1);function _Pe(e){return"type"in(e.attributes?.lock??{})||(e.attributes={...e.attributes,lock:{type:"object"}}),e}(0,dle.addFilter)("blocks.registerBlockType","core/lock/addAttribute",_Pe);var y4=l(rt(),1),rk=l($(),1);var C_=l(A(),1),_2=l(N(),1),xle=l(P(),1),wle=l(F(),1),x2=l($(),1);var In=l(A(),1),yle=l(P(),1),ok=l(N(),1),Sle=l(F(),1);var k4=l($(),1),ble=l(F(),1),tk=l(A(),1),oa=l(N(),1),y2=l(P(),1),kle=l(Z(),1),vle=l(Zo(),1);var g4=l(P(),1),ple=l(Z(),1),hle=l(A(),1);var fle=l(A(),1);var Jb=l(w(),1);function xPe({blockTypes:e,value:t,onItemChange:o}){return(0,Jb.jsx)("ul",{className:"block-editor-block-manager__checklist",children:e.map(r=>(0,Jb.jsxs)("li",{className:"block-editor-block-manager__checklist-item",children:[(0,Jb.jsx)(fle.CheckboxControl,{label:r.title,checked:t.includes(r.name),onChange:(...n)=>o(r,...n)}),(0,Jb.jsx)(Oe,{icon:r.icon})]},r.name))})}var mle=xPe;var ek=l(w(),1);function gle({title:e,blockTypes:t,selectedBlockTypes:o,onChange:r}){let n=(0,ple.useInstanceId)(gle),i=(0,g4.useCallback)((f,m)=>{r(m?[...o,f]:o.filter(({name:h})=>h!==f.name))},[o,r]),s=(0,g4.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,ek.jsxs)("div",{role:"group","aria-labelledby":c,className:"block-editor-block-manager__category",children:[(0,ek.jsx)(hle.CheckboxControl,{checked:u,onChange:s,className:"block-editor-block-manager__category-title",indeterminate:d,label:(0,ek.jsx)("span",{id:c,children:e})}),(0,ek.jsx)(mle,{blockTypes:t,value:a,onItemChange:i})]})}var b4=gle;var Bc=l(w(),1);function S2({blockTypes:e,selectedBlockTypes:t,onChange:o,showSelectAll:r=!0}){let n=(0,kle.useDebounce)(vle.speak,500),[i,s]=(0,y2.useState)(""),{categories:a,isMatchingSearchTerm:c}=(0,ble.useSelect)(m=>({categories:m(k4.store).getCategories(),isMatchingSearchTerm:m(k4.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,y2.useEffect)(()=>{if(!i)return;let m=u.length,h=(0,oa.sprintf)((0,oa._n)("%d result found.","%d results found.",m),m);n(h)},[u?.length,i,n]),(0,Bc.jsxs)(tk.__experimentalVStack,{className:"block-editor-block-manager__content",spacing:4,children:[(0,Bc.jsx)(tk.SearchControl,{label:(0,oa.__)("Search for a block"),placeholder:(0,oa.__)("Search for a block"),value:i,onChange:m=>s(m),className:"block-editor-block-manager__search"}),r&&(0,Bc.jsx)(tk.CheckboxControl,{className:"block-editor-block-manager__select-all",label:(0,oa.__)("Select all"),checked:f,onChange:()=>{o(f?[]:e)},indeterminate:d}),(0,Bc.jsxs)("div",{tabIndex:"0",role:"region","aria-label":(0,oa.__)("Available block types"),className:"block-editor-block-manager__results",children:[u.length===0&&(0,Bc.jsx)("p",{className:"block-editor-block-manager__no-results",children:(0,oa.__)("No blocks found.")}),a.map(m=>(0,Bc.jsx)(b4,{title:m.title,blockTypes:u.filter(h=>h.category===m.slug),selectedBlockTypes:t,onChange:o},m.slug)),(0,Bc.jsx)(b4,{title:(0,oa.__)("Uncategorized"),blockTypes:u.filter(({category:m})=>!m),selectedBlockTypes:t,onChange:o})]})]})}var ra=l(w(),1);function _le({clientId:e,blockTypes:t,selectedBlockTypes:o,onClose:r}){let[n,i]=(0,yle.useState)(o),{updateBlockAttributes:s}=(0,Sle.useDispatch)(_),a=()=>{let c=n.length===t.length,u=n.map(({name:d})=>d);s(e,{allowedBlocks:c?void 0:u}),r()};return(0,ra.jsx)(In.Modal,{title:(0,ok._x)("Manage allowed blocks","modal title"),onRequestClose:r,overlayClassName:"block-editor-block-allowed-blocks-modal",focusOnMount:"firstContentElement",size:"medium",children:(0,ra.jsxs)(In.__experimentalVStack,{as:"form",onSubmit:c=>{c.preventDefault(),a()},spacing:"4",children:[(0,ra.jsx)(In.__experimentalText,{children:(0,ok.__)("Select which blocks can be added inside this container.")}),(0,ra.jsx)(S2,{blockTypes:t,selectedBlockTypes:n,onChange:c=>{i(c)}}),(0,ra.jsxs)(In.Flex,{className:"block-editor-block-allowed-blocks-modal__actions",justify:"flex-end",expanded:!1,children:[(0,ra.jsx)(In.FlexItem,{children:(0,ra.jsx)(In.Button,{variant:"tertiary",onClick:r,__next40pxDefaultSize:!0,children:(0,ok.__)("Cancel")})}),(0,ra.jsx)(In.FlexItem,{children:(0,ra.jsx)(In.Button,{variant:"primary",type:"submit",__next40pxDefaultSize:!0,children:(0,ok.__)("Apply")})})]})]})})}var dp=l(w(),1);function Cle({clientId:e}){let[t,o]=(0,xle.useState)(!1),{blockTypes:r,selectedBlockNames:n}=(0,wle.useSelect)(a=>{let{getBlockAttributes:c}=a(_);return{blockTypes:a(x2.store).getBlockTypes(),selectedBlockNames:c(e)?.allowedBlocks}},[e]),i=r.filter(a=>(0,x2.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,dp.jsxs)("div",{className:"block-editor-block-allowed-blocks-control",children:[(0,dp.jsxs)(C_.BaseControl,{help:(0,_2.__)("Specify which blocks are allowed inside this container."),children:[(0,dp.jsx)(C_.BaseControl.VisualLabel,{children:(0,_2.__)("Allowed Blocks")}),(0,dp.jsx)(C_.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>{o(!0)},className:"block-editor-block-allowed-blocks-control__button",children:(0,_2.__)("Manage allowed blocks")})]}),t&&(0,dp.jsx)(_le,{clientId:e,blockTypes:i,selectedBlockTypes:s,onClose:()=>o(!1)})]})}var v4=l(w(),1);function wPe({clientId:e}){return Mo()==="contentOnly"?null:(0,v4.jsx)(nS.Fill,{children:(0,v4.jsx)(Cle,{clientId:e})})}var Ble={edit:wPe,attributeKeys:["allowedBlocks"],hasSupport(e){return(0,rk.hasBlockSupport)(e,"allowedBlocks")}};function CPe(e){return e?.attributes?.allowedBlocks?.type||(0,rk.hasBlockSupport)(e,"allowedBlocks")&&(e.attributes={...e.attributes,allowedBlocks:{type:"array"}}),e}(0,y4.addFilter)("blocks.registerBlockType","core/allowedBlocks/attribute",CPe);function BPe(e,t,o,r){if(!(0,rk.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,rk.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,y4.addFilter)("blocks.switchToBlockType.transformedBlock","core/allowedBlocks/addTransforms",BPe);var Ele=l(rt(),1),w2=l(A(),1),nk=l(N(),1),C2=l($(),1),Tle=l(P(),1);var Qa=l(w(),1),EPe=/[\s#]/g;function TPe(e){return"type"in(e.attributes?.anchor??{})||(0,C2.hasBlockSupport)(e,"anchor")&&(e.attributes={...e.attributes,anchor:{type:"string"}}),e}function IPe({anchor:e,setAttributes:t}){if(Mo()!=="default")return null;let r=Tle.Platform.OS==="web";return(0,Qa.jsx)(fe,{group:"advanced",children:(0,Qa.jsx)(w2.TextControl,{__next40pxDefaultSize:!0,className:"html-anchor-control",label:(0,nk.__)("HTML anchor"),help:(0,Qa.jsxs)(Qa.Fragment,{children:[(0,nk.__)("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,Qa.jsxs)(Qa.Fragment,{children:[" ",(0,Qa.jsx)(w2.ExternalLink,{href:(0,nk.__)("https://wordpress.org/documentation/article/page-jumps/"),children:(0,nk.__)("Learn more about anchors")})]})]}),value:e||"",placeholder:r?null:(0,nk.__)("Add an anchor"),onChange:n=>{n=n.replace(EPe,"-"),t({anchor:n!==""?n:void 0})},autoCapitalize:"none",autoComplete:"off"})})}var S4={addSaveProps:PPe,edit:IPe,attributeKeys:["anchor"],hasSupport(e){return(0,C2.hasBlockSupport)(e,"anchor")}};function PPe(e,t,o){return(0,C2.hasBlockSupport)(t,"anchor")&&(e.id=o.anchor===""?null:o.anchor),e}(0,Ele.addFilter)("blocks.registerBlockType","core/anchor/attribute",TPe);var Ile=l(rt(),1),B2=l($(),1);function RPe(e){return e?.attributes?.ariaLabel?.type||(0,B2.hasBlockSupport)(e,"ariaLabel")&&(e.attributes={...e.attributes,ariaLabel:{type:"string"}}),e}function OPe(e,t,o){return(0,B2.hasBlockSupport)(t,"ariaLabel")&&!He(t,"ariaLabel","ariaLabel")&&(e["aria-label"]=o.ariaLabel===""?null:o.ariaLabel),e}var Ple={addSaveProps:OPe,attributeKeys:["ariaLabel"],hasSupport(e){return(0,B2.hasBlockSupport)(e,"ariaLabel")}};(0,Ile.addFilter)("blocks.registerBlockType","core/ariaLabel/attribute",RPe);var xk=l($(),1),CR=l(A(),1),Fde=l(F(),1);var Ole=l(zr(),1),Rle={};function _4(e,t){let o=Ole.useRef(Rle);return o.current===Rle&&(o.current=e(t)),o}function x4(e,...t){let o=new URL(`https://base-ui.com/production-error/${e}`);return t.forEach(r=>o.searchParams.append("args[]",r)),`Base UI error #${e}; visit ${o} for the full message.`}var E2=l(zr(),1);function w4(e,t,o,r){let n=_4(Lle).current;return APe(n,e,t,o,r)&&Nle(n,[e,t,o,r]),n.callback}function Ale(e){let t=_4(Lle).current;return LPe(t,e)&&Nle(t,e),t.callback}function Lle(){return{callback:null,cleanup:null,refs:[]}}function APe(e,t,o,r,n){return e.refs[0]!==t||e.refs[1]!==o||e.refs[2]!==r||e.refs[3]!==n}function LPe(e,t){return e.refs.length!==t.length||e.refs.some((o,r)=>o!==t[r])}function Nle(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 Vle=l(zr(),1);var Mle=l(zr(),1),NPe=parseInt(Mle.version,10);function Dle(e){return NPe>=e}function C4(e){if(!Vle.isValidElement(e))return null;let t=e,o=t.props;return(Dle(19)?o?.ref:t.ref)??null}function B_(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function Fle(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 zle(e,t){return typeof e=="function"?e(t):e}function jle(e,t){return typeof e=="function"?e(t):e}var T_={};function ik(e,t,o,r,n){let i={...B4(e,T_)};return t&&(i=E_(i,t)),o&&(i=E_(i,o)),r&&(i=E_(i,r)),n&&(i=E_(i,n)),i}function Ule(e){if(e.length===0)return T_;if(e.length===1)return B4(e[0],T_);let t={...B4(e[0],T_)};for(let o=1;o<e.length;o+=1)t=E_(t,e[o]);return t}function E_(e,t){return Hle(t)?t(e):MPe(e,t)}function MPe(e,t){if(!t)return e;for(let o in t){let r=t[o];switch(o){case"style":{e[o]=B_(e.style,r);break}case"className":{e[o]=E4(e.className,r);break}default:DPe(o,r)?e[o]=VPe(e[o],r):e[o]=r}}return e}function DPe(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 Hle(e){return typeof e=="function"}function B4(e,t){return Hle(e)?e(t):e??T_}function VPe(e,t){return t?e?o=>{if(zPe(o)){let n=o;FPe(n);let i=t(n);return n.baseUIHandlerPrevented||e?.(n),i}let r=t(o);return e?.(o),r}:t:e}function FPe(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function E4(e,t){return t?e?t+" "+e:t:e}function zPe(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}var jPe=Object.freeze([]),jd=Object.freeze({});var T4=l(zr(),1);function Gle(e,t,o={}){let r=t.render,n=UPe(t,o);if(o.enabled===!1)return null;let i=o.state??jd;return HPe(e,r,n,i)}function UPe(e,t={}){let{className:o,style:r,render:n}=e,{state:i=jd,ref:s,props:a,stateAttributesMapping:c,enabled:u=!0}=t,d=u?zle(o,i):void 0,f=u?jle(r,i):void 0,m=u?Fle(i,c):jd,h=u?B_(m,Array.isArray(a)?Ule(a):a)??jd:jd;return typeof document<"u"&&(u?Array.isArray(s)?h.ref=Ale([h.ref,C4(n),...s]):h.ref=w4(h.ref,C4(n),s):w4(null,null)),u?(d!==void 0&&(h.className=E4(h.className,d)),f!==void 0&&(h.style=B_(h.style,f)),h):jd}function HPe(e,t,o,r){if(t){if(typeof t=="function")return t(o,r);let n=ik(o,t.props);return n.ref=o.ref,E2.cloneElement(t,n)}if(e&&typeof e=="string")return GPe(e,o);throw new Error(x4(8))}function GPe(e,t){return e==="button"?(0,T4.createElement)("button",{type:"button",...t,key:t.key}):e==="img"?(0,T4.createElement)("img",{alt:"",...t,key:t.key}):E2.createElement(e,t)}function T2(e){return Gle(e.defaultTagName??"div",e,e)}var $le=l(P(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='244b5c59c0']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","244b5c59c0"),e.appendChild(document.createTextNode('@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);font-family:var(--wpds-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-font-size-sm,12px);font-weight:var(--wpds-font-weight-regular,400);line-height:var(--wpds-font-line-height-xs,16px);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,#fde6bd);color:var(--wpds-color-fg-content-warning,#2e1900)}._365e1626c6202e52__is-low-intent{background-color:var(--wpds-color-bg-surface-caution,#fee994);color:var(--wpds-color-fg-content-caution,#281d00)}._33f8198127ddf4ef__is-stable-intent{background-color:var(--wpds-color-bg-surface-success,#c5f7cc);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,#f0f0f0);color:var(--wpds-color-fg-content-neutral,#1e1e1e)}._898f4a544993bd39__is-none-intent{background-color:var(--wpds-color-bg-surface-neutral,#f8f8f8);color:var(--wpds-color-fg-content-neutral-weak,#6d6d6d)}}')),document.head.appendChild(e)}var Wle={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"},I4=(0,$le.forwardRef)(function({children:t,intent:o="none",render:r,className:n,...i},s){return T2({render:r,defaultTagName:"span",ref:s,props:ik(i,{className:V(Wle.badge,Wle[`is-${o}-intent`],n),children:t})})});var Kle=l(P(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='71d20935c2']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","71d20935c2"),e.appendChild(document.createTextNode("@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._19ce0419607e1896__stack{display:flex}}")),document.head.appendChild(e)}var WPe={stack:"_19ce0419607e1896__stack"},$Pe={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)"},Me=(0,Kle.forwardRef)(function({direction:t,gap:o,align:r,justify:n,wrap:i,render:s,...a},c){let u={gap:o&&$Pe[o],alignItems:r,justifyContent:n,flexDirection:t,flexWrap:i};return T2({render:s,ref:c,props:ik(a,{style:u,className:WPe.stack})})});var P4=l(N(),1);var Ut="isAny",Ht="isNone",Er="isAll",Tr="isNotAll",en="between",tn="inThePast",Pn="over",Xt="is",Qt="isNot",Ud="lessThan",Hd="greaterThan",Gd="lessThanOrEqual",Wd="greaterThanOrEqual",$d="before",Kd="after",Yd="beforeInc",qd="afterInc",Ja="contains",el="notContains",tl="startsWith",Zd="on",Xd="notOn";var Aht={asc:(0,P4.__)("Sort ascending"),desc:(0,P4.__)("Sort descending")};var Yle=l(bO(),1),{lock:Nht,unlock:_t}=(0,Yle.__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 I_=l(P(),1),KPe=[];function Rn({elements:e,getElements:t}){let o=Array.isArray(e)&&e.length>0?e:KPe,[r,n]=(0,I_.useState)(o),[i,s]=(0,I_.useState)(!1);return(0,I_.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 YPe=Math.pow(10,8)*24*60*60*1e3,Vht=-YPe,I2=6048e5,qle=864e5;var qPe=3600;var Zle=qPe*24,Fht=Zle*7,ZPe=Zle*365.2425,XPe=ZPe/12,zht=XPe*3,R4=Symbol.for("constructDateFrom");function $o(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&R4 in e?e[R4](t):e instanceof Date?new e.constructor(t):new Date(t)}function lt(e,t){return $o(t||e,e)}function P2(e,t,o){let r=lt(e,o?.in);return isNaN(t)?$o(o?.in||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function R2(e,t,o){let r=lt(e,o?.in);if(isNaN(t))return $o(o?.in||e,NaN);if(!t)return r;let n=r.getDate(),i=$o(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 QPe={};function Qd(){return QPe}function Ec(e,t){let o=Qd(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??o.weekStartsOn??o.locale?.options?.weekStartsOn??0,n=lt(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 fp(e,t){return Ec(e,{...t,weekStartsOn:1})}function O2(e,t){let o=lt(e,t?.in),r=o.getFullYear(),n=$o(o,0);n.setFullYear(r+1,0,4),n.setHours(0,0,0,0);let i=fp(n),s=$o(o,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);let a=fp(s);return o.getTime()>=i.getTime()?r+1:o.getTime()>=a.getTime()?r:r-1}function O4(e){let t=lt(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 Xle(e,...t){let o=$o.bind(null,e||t.find(r=>typeof r=="object"));return t.map(o)}function A4(e,t){let o=lt(e,t?.in);return o.setHours(0,0,0,0),o}function Qle(e,t,o){let[r,n]=Xle(o?.in,e,t),i=A4(r),s=A4(n),a=+i-O4(i),c=+s-O4(s);return Math.round((a-c)/qle)}function Jle(e,t){let o=O2(e,t),r=$o(t?.in||e,0);return r.setFullYear(o,0,4),r.setHours(0,0,0,0),fp(r)}function ece(e,t,o){return P2(e,t*7,o)}function tce(e,t,o){return R2(e,t*12,o)}function oce(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function sk(e){return!(!oce(e)&&typeof e!="number"||isNaN(+lt(e)))}function rce(e,t){let o=lt(e,t?.in);return o.setDate(1),o.setHours(0,0,0,0),o}function A2(e,t){let o=lt(e,t?.in);return o.setFullYear(o.getFullYear(),0,1),o.setHours(0,0,0,0),o}var JPe={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"}},nce=(e,t,o)=>{let r,n=JPe[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 L2(e){return(t={})=>{let o=t.width?String(t.width):e.defaultWidth;return e.formats[o]||e.formats[e.defaultWidth]}}var e2e={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},t2e={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},o2e={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},ice={date:L2({formats:e2e,defaultWidth:"full"}),time:L2({formats:t2e,defaultWidth:"full"}),dateTime:L2({formats:o2e,defaultWidth:"full"})};var r2e={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},sce=(e,t,o,r)=>r2e[e];function ak(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 n2e={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},i2e={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},s2e={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},a2e={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"]},l2e={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"}},c2e={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"}},u2e=(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"},ace={ordinalNumber:u2e,era:ak({values:n2e,defaultWidth:"wide"}),quarter:ak({values:i2e,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ak({values:s2e,defaultWidth:"wide"}),day:ak({values:a2e,defaultWidth:"wide"}),dayPeriod:ak({values:l2e,defaultWidth:"wide",formattingValues:c2e,defaultFormattingWidth:"wide"})};function lk(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)?f2e(a,f=>f.test(s)):d2e(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 d2e(e,t){for(let o in e)if(Object.prototype.hasOwnProperty.call(e,o)&&t(e[o]))return o}function f2e(e,t){for(let o=0;o<e.length;o++)if(t(e[o]))return o}function lce(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 m2e=/^(\d+)(th|st|nd|rd)?/i,p2e=/\d+/i,h2e={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},g2e={any:[/^b/i,/^(a|c)/i]},b2e={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},k2e={any:[/1/i,/2/i,/3/i,/4/i]},v2e={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},y2e={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]},S2e={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},_2e={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]},x2e={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},w2e={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}},cce={ordinalNumber:lce({matchPattern:m2e,parsePattern:p2e,valueCallback:e=>parseInt(e,10)}),era:lk({matchPatterns:h2e,defaultMatchWidth:"wide",parsePatterns:g2e,defaultParseWidth:"any"}),quarter:lk({matchPatterns:b2e,defaultMatchWidth:"wide",parsePatterns:k2e,defaultParseWidth:"any",valueCallback:e=>e+1}),month:lk({matchPatterns:v2e,defaultMatchWidth:"wide",parsePatterns:y2e,defaultParseWidth:"any"}),day:lk({matchPatterns:S2e,defaultMatchWidth:"wide",parsePatterns:_2e,defaultParseWidth:"any"}),dayPeriod:lk({matchPatterns:x2e,defaultMatchWidth:"any",parsePatterns:w2e,defaultParseWidth:"any"})};var L4={code:"en-US",formatDistance:nce,formatLong:ice,formatRelative:sce,localize:ace,match:cce,options:{weekStartsOn:0,firstWeekContainsDate:1}};function uce(e,t){let o=lt(e,t?.in);return Qle(o,A2(o))+1}function dce(e,t){let o=lt(e,t?.in),r=+fp(o)-+Jle(o);return Math.round(r/I2)+1}function N2(e,t){let o=lt(e,t?.in),r=o.getFullYear(),n=Qd(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,s=$o(t?.in||e,0);s.setFullYear(r+1,0,i),s.setHours(0,0,0,0);let a=Ec(s,t),c=$o(t?.in||e,0);c.setFullYear(r,0,i),c.setHours(0,0,0,0);let u=Ec(c,t);return+o>=+a?r+1:+o>=+u?r:r-1}function fce(e,t){let o=Qd(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,n=N2(e,t),i=$o(t?.in||e,0);return i.setFullYear(n,0,r),i.setHours(0,0,0,0),Ec(i,t)}function mce(e,t){let o=lt(e,t?.in),r=+Ec(o,t)-+fce(o,t);return Math.round(r/I2)+1}function Ke(e,t){let o=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return o+r}var Tc={y(e,t){let o=e.getFullYear(),r=o>0?o:1-o;return Ke(t==="yy"?r%100:r,t.length)},M(e,t){let o=e.getMonth();return t==="M"?String(o+1):Ke(o+1,2)},d(e,t){return Ke(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 Ke(e.getHours()%12||12,t.length)},H(e,t){return Ke(e.getHours(),t.length)},m(e,t){return Ke(e.getMinutes(),t.length)},s(e,t){return Ke(e.getSeconds(),t.length)},S(e,t){let o=t.length,r=e.getMilliseconds(),n=Math.trunc(r*Math.pow(10,o-3));return Ke(n,t.length)}};var ck={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},N4={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 Tc.y(e,t)},Y:function(e,t,o,r){let n=N2(e,r),i=n>0?n:1-n;if(t==="YY"){let s=i%100;return Ke(s,2)}return t==="Yo"?o.ordinalNumber(i,{unit:"year"}):Ke(i,t.length)},R:function(e,t){let o=O2(e);return Ke(o,t.length)},u:function(e,t){let o=e.getFullYear();return Ke(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 Ke(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 Ke(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 Tc.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 Ke(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=mce(e,r);return t==="wo"?o.ordinalNumber(n,{unit:"week"}):Ke(n,t.length)},I:function(e,t,o){let r=dce(e);return t==="Io"?o.ordinalNumber(r,{unit:"week"}):Ke(r,t.length)},d:function(e,t,o){return t==="do"?o.ordinalNumber(e.getDate(),{unit:"date"}):Tc.d(e,t)},D:function(e,t,o){let r=uce(e);return t==="Do"?o.ordinalNumber(r,{unit:"dayOfYear"}):Ke(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 Ke(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 Ke(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 Ke(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=ck.noon:r===0?n=ck.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=ck.evening:r>=12?n=ck.afternoon:r>=4?n=ck.morning:n=ck.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 Tc.h(e,t)},H:function(e,t,o){return t==="Ho"?o.ordinalNumber(e.getHours(),{unit:"hour"}):Tc.H(e,t)},K:function(e,t,o){let r=e.getHours()%12;return t==="Ko"?o.ordinalNumber(r,{unit:"hour"}):Ke(r,t.length)},k:function(e,t,o){let r=e.getHours();return r===0&&(r=24),t==="ko"?o.ordinalNumber(r,{unit:"hour"}):Ke(r,t.length)},m:function(e,t,o){return t==="mo"?o.ordinalNumber(e.getMinutes(),{unit:"minute"}):Tc.m(e,t)},s:function(e,t,o){return t==="so"?o.ordinalNumber(e.getSeconds(),{unit:"second"}):Tc.s(e,t)},S:function(e,t){return Tc.S(e,t)},X:function(e,t,o){let r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return hce(r);case"XXXX":case"XX":return mp(r);default:return mp(r,":")}},x:function(e,t,o){let r=e.getTimezoneOffset();switch(t){case"x":return hce(r);case"xxxx":case"xx":return mp(r);default:return mp(r,":")}},O:function(e,t,o){let r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+pce(r,":");default:return"GMT"+mp(r,":")}},z:function(e,t,o){let r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+pce(r,":");default:return"GMT"+mp(r,":")}},t:function(e,t,o){let r=Math.trunc(+e/1e3);return Ke(r,t.length)},T:function(e,t,o){return Ke(+e,t.length)}};function pce(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+Ke(i,2)}function hce(e,t){return e%60===0?(e>0?"-":"+")+Ke(Math.abs(e)/60,2):mp(e,t)}function mp(e,t=""){let o=e>0?"-":"+",r=Math.abs(e),n=Ke(Math.trunc(r/60),2),i=Ke(r%60,2);return o+n+t+i}var gce=(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"})}},bce=(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"})}},C2e=(e,t)=>{let o=e.match(/(P+)(p+)?/)||[],r=o[1],n=o[2];if(!n)return gce(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}}",gce(r,t)).replace("{{time}}",bce(n,t))},kce={p:bce,P:C2e};var B2e=/^D+$/,E2e=/^Y+$/,T2e=["D","DD","YY","YYYY"];function vce(e){return B2e.test(e)}function yce(e){return E2e.test(e)}function Sce(e,t,o){let r=I2e(e,t,o);if(console.warn(r),T2e.includes(e))throw new RangeError(r)}function I2e(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 P2e=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,R2e=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,O2e=/^'([^]*?)'?$/,A2e=/''/g,L2e=/[a-zA-Z]/;function P_(e,t,o){let r=Qd(),n=o?.locale??r.locale??L4,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=lt(e,o?.in);if(!sk(a))throw new RangeError("Invalid time value");let c=t.match(R2e).map(d=>{let f=d[0];if(f==="p"||f==="P"){let m=kce[f];return m(d,n.formatLong)}return d}).join("").match(P2e).map(d=>{if(d==="''")return{isToken:!1,value:"'"};let f=d[0];if(f==="'")return{isToken:!1,value:N2e(d)};if(N4[f])return{isToken:!0,value:d};if(f.match(L2e))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&&yce(f)||!o?.useAdditionalDayOfYearTokens&&vce(f))&&Sce(f,t,String(e));let m=N4[f[0]];return m(a,f,n.localize,u)}).join("")}function N2e(e){let t=e.match(O2e);return t?t[1].replace(A2e,"'"):e}function pp(e,t,o){return P2(e,-t,o)}function M2(e,t,o){return R2(e,-t,o)}function _ce(e,t,o){return ece(e,-t,o)}function D2(e,t,o){return tce(e,-t,o)}var de=l(N(),1),ao=l(P(),1),on=l(pc(),1);var M4=l(w(),1),xo={Name:(0,M4.jsx)("span",{className:"dataviews-filters__summary-filter-text-name"}),Value:(0,M4.jsx)("span",{className:"dataviews-filters__summary-filter-text-value"})};function xce(e,t){switch(t){case"days":return pp(new Date,e);case"weeks":return _ce(new Date,e);case"months":return M2(new Date,e);case"years":return D2(new Date,e);default:return new Date}}var wce={label:(0,de.__)("Is none of"),filterText:(e,t)=>(0,ao.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is none of: </Name><Value>%2$s</Value>"),e.name,t.map(o=>o.label).join(", ")),xo),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"},Cce=[{name:Ut,label:(0,de.__)("Includes"),filterText:(e,t)=>(0,ao.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s includes: </Name><Value>%2$s</Value>"),e.name,t.map(o=>o.label).join(", ")),xo),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:Ht,...wce},{name:Er,label:(0,de.__)("Includes all"),filterText:(e,t)=>(0,ao.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s includes all: </Name><Value>%2$s</Value>"),e.name,t.map(o=>o.label).join(", ")),xo),filter(e,t,o){return o?.length?o.every(r=>t.getValue({item:e})?.includes(r)):!0},selection:"multi"},{name:Tr,...wce},{name:en,label:(0,de.__)("Between (inc)"),filterText:(e,t)=>(0,ao.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s between (inc): </Name><Value>%2$s and %3$s</Value>"),e.name,t[0].label[0],t[0].label[1]),xo),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:tn,label:(0,de.__)("In the past"),filterText:(e,t)=>(0,ao.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is in the past: </Name><Value>%2$s</Value>"),e.name,`${t[0].value.value} ${t[0].value.unit}`),xo),filter(e,t,o){if(o?.value===void 0||o?.unit===void 0)return!0;let r=xce(o.value,o.unit),n=(0,on.getDate)(t.getValue({item:e}));return n>=r&&n<=new Date},selection:"custom"},{name:Pn,label:(0,de.__)("Over"),filterText:(e,t)=>(0,ao.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is over: </Name><Value>%2$s</Value>"),e.name,`${t[0].value.value} ${t[0].value.unit}`),xo),filter(e,t,o){if(o?.value===void 0||o?.unit===void 0)return!0;let r=xce(o.value,o.unit);return(0,on.getDate)(t.getValue({item:e}))<r},selection:"custom"},{name:Xt,label:(0,de.__)("Is"),filterText:(e,t)=>(0,ao.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is: </Name><Value>%2$s</Value>"),e.name,t[0].label),xo),filter(e,t,o){return o===t.getValue({item:e})||o===void 0},selection:"single"},{name:Qt,label:(0,de.__)("Is not"),filterText:(e,t)=>(0,ao.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is not: </Name><Value>%2$s</Value>"),e.name,t[0].label),xo),filter(e,t,o){return o!==t.getValue({item:e})},selection:"single"},{name:Ud,label:(0,de.__)("Less than"),filterText:(e,t)=>(0,ao.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is less than: </Name><Value>%2$s</Value>"),e.name,t[0].label),xo),filter(e,t,o){return o===void 0?!0:t.getValue({item:e})<o},selection:"single"},{name:Hd,label:(0,de.__)("Greater than"),filterText:(e,t)=>(0,ao.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is greater than: </Name><Value>%2$s</Value>"),e.name,t[0].label),xo),filter(e,t,o){return o===void 0?!0:t.getValue({item:e})>o},selection:"single"},{name:Gd,label:(0,de.__)("Less than or equal"),filterText:(e,t)=>(0,ao.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is less than or equal to: </Name><Value>%2$s</Value>"),e.name,t[0].label),xo),filter(e,t,o){return o===void 0?!0:t.getValue({item:e})<=o},selection:"single"},{name:Wd,label:(0,de.__)("Greater than or equal"),filterText:(e,t)=>(0,ao.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is greater than or equal to: </Name><Value>%2$s</Value>"),e.name,t[0].label),xo),filter(e,t,o){return o===void 0?!0:t.getValue({item:e})>=o},selection:"single"},{name:$d,label:(0,de.__)("Before"),filterText:(e,t)=>(0,ao.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is before: </Name><Value>%2$s</Value>"),e.name,t[0].label),xo),filter(e,t,o){if(o===void 0)return!0;let r=(0,on.getDate)(o);return(0,on.getDate)(t.getValue({item:e}))<r},selection:"single"},{name:Kd,label:(0,de.__)("After"),filterText:(e,t)=>(0,ao.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is after: </Name><Value>%2$s</Value>"),e.name,t[0].label),xo),filter(e,t,o){if(o===void 0)return!0;let r=(0,on.getDate)(o);return(0,on.getDate)(t.getValue({item:e}))>r},selection:"single"},{name:Yd,label:(0,de.__)("Before (inc)"),filterText:(e,t)=>(0,ao.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is on or before: </Name><Value>%2$s</Value>"),e.name,t[0].label),xo),filter(e,t,o){if(o===void 0)return!0;let r=(0,on.getDate)(o);return(0,on.getDate)(t.getValue({item:e}))<=r},selection:"single"},{name:qd,label:(0,de.__)("After (inc)"),filterText:(e,t)=>(0,ao.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is on or after: </Name><Value>%2$s</Value>"),e.name,t[0].label),xo),filter(e,t,o){if(o===void 0)return!0;let r=(0,on.getDate)(o);return(0,on.getDate)(t.getValue({item:e}))>=r},selection:"single"},{name:Ja,label:(0,de.__)("Contains"),filterText:(e,t)=>(0,ao.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s contains: </Name><Value>%2$s</Value>"),e.name,t[0].label),xo),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:el,label:(0,de.__)("Doesn't contain"),filterText:(e,t)=>(0,ao.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s doesn't contain: </Name><Value>%2$s</Value>"),e.name,t[0].label),xo),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:tl,label:(0,de.__)("Starts with"),filterText:(e,t)=>(0,ao.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s starts with: </Name><Value>%2$s</Value>"),e.name,t[0].label),xo),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:Zd,label:(0,de.__)("On"),filterText:(e,t)=>(0,ao.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is: </Name><Value>%2$s</Value>"),e.name,t[0].label),xo),filter(e,t,o){if(o===void 0)return!0;let r=(0,on.getDate)(o),n=(0,on.getDate)(t.getValue({item:e}));return r.getTime()===n.getTime()},selection:"single"},{name:Xd,label:(0,de.__)("Not on"),filterText:(e,t)=>(0,ao.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is not: </Name><Value>%2$s</Value>"),e.name,t[0].label),xo),filter(e,t,o){if(o===void 0)return!0;let r=(0,on.getDate)(o),n=(0,on.getDate)(t.getValue({item:e}));return r.getTime()!==n.getTime()},selection:"single"}],Bce=e=>Cce.find(t=>t.name===e),Ece=()=>Cce.map(e=>e.name);var Tce=l(A(),1),Ice=l(P(),1);function ht(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 Pce=l(w(),1),{ValidatedCheckboxControl:M2e}=_t(Tce.privateApis);function Rce({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=(0,Ice.useCallback)(()=>{t(a({item:o,value:!s({item:o})}))},[o,s,t,a]);return(0,Pce.jsx)(M2e,{required:!!e.isValid?.required,markWhenOptional:n,customValidity:ht(d,i),hidden:r,label:c,help:u,checked:s({item:o}),onChange:f})}var V2=l(A(),1),Oce=l(P(),1);var D4=l(w(),1),{ValidatedComboboxControl:D2e}=_t(V2.privateApis);function F2({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,Oce.useCallback)(g=>o(u({item:e,value:g??""})),[e,o,u]),{elements:h,isLoading:p}=Rn({elements:t.elements,getElements:t.getElements});return p?(0,D4.jsx)(V2.Spinner,{}):(0,D4.jsx)(D2e,{required:!!t.isValid?.required,customValidity:ht(d,n),label:i,value:f,help:s,placeholder:a,options:h,onChange:m,hideLabelFromVision:r,allowReset:!0,expandOnFocus:!0})}var U2=l(A(),1),cs=l(P(),1),j2=l(N(),1),F4=l(pc(),1);var dk=l(A(),1),V4=l(P(),1),ol=l(N(),1);var uk=l(w(),1),V2e={[tn]:[{value:"days",label:(0,ol.__)("Days")},{value:"weeks",label:(0,ol.__)("Weeks")},{value:"months",label:(0,ol.__)("Months")},{value:"years",label:(0,ol.__)("Years")}],[Pn]:[{value:"days",label:(0,ol.__)("Days ago")},{value:"weeks",label:(0,ol.__)("Weeks ago")},{value:"months",label:(0,ol.__)("Months ago")},{value:"years",label:(0,ol.__)("Years ago")}]};function z2({className:e,data:t,field:o,onChange:r,hideLabelFromVision:n,operator:i}){let s=V2e[i===tn?"inThePast":"over"],{id:a,label:c,getValue:u,setValue:d}=o,f=u({item:t}),{value:m="",unit:h=s[0].value}=f&&typeof f=="object"?f:{},p=(0,V4.useCallback)(b=>r(d({item:t,value:{value:Number(b),unit:h}})),[r,d,t,h]),g=(0,V4.useCallback)(b=>r(d({item:t,value:{value:m,unit:b}})),[r,d,t,m]);return(0,uk.jsx)(dk.BaseControl,{id:a,className:V(e,"dataviews-controls__relative-date"),label:c,hideLabelFromVision:n,children:(0,uk.jsxs)(Me,{direction:"row",gap:"sm",children:[(0,uk.jsx)(dk.__experimentalNumberControl,{__next40pxDefaultSize:!0,className:"dataviews-controls__relative-date-number",spinControls:"none",min:1,step:1,value:m,onChange:p}),(0,uk.jsx)(dk.SelectControl,{className:"dataviews-controls__relative-date-unit",__next40pxDefaultSize:!0,label:(0,ol.__)("Unit"),value:h,options:s,onChange:g,hideLabelFromVision:!0})]})})}var Ace=l(pc(),1);function fk(e){if(!e)return null;let t=(0,Ace.getDate)(e);return t&&sk(t)?t:null}var Jd=l(w(),1),{DateCalendar:F2e,ValidatedInputControl:z2e}=_t(U2.privateApis),j2e=e=>e?typeof e=="string"?e:P_(e,"yyyy-MM-dd'T'HH:mm"):"";function U2e({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}=t,m=d({item:e}),h=typeof m=="string"?m:void 0,[p,g]=(0,cs.useState)(()=>fk(h)||new Date),b=(0,cs.useRef)(null),v=(0,cs.useRef)(void 0),k=(0,cs.useRef)(null),y=(0,cs.useCallback)(E=>o(u({item:e,value:E})),[e,o,u]);(0,cs.useEffect)(()=>()=>{v.current&&clearTimeout(v.current)},[]);let S=(0,cs.useCallback)(E=>{let L;if(E){let T=E;if(h){let R=fk(h);R&&(T=new Date(E),T.setHours(R.getHours()),T.setMinutes(R.getMinutes()))}L=T.toISOString(),y(L),v.current&&clearTimeout(v.current)}else y(void 0);k.current=b.current&&b.current.ownerDocument.activeElement,v.current=setTimeout(()=>{b.current&&(b.current.focus(),b.current.blur(),y(L),k.current&&k.current instanceof HTMLElement&&k.current.focus())},0)},[y,h]),x=(0,cs.useCallback)(E=>{if(E){let L=new Date(E);y(L.toISOString());let T=fk(L.toISOString());T&&g(T)}else y(void 0)},[y]),{format:C}=t,B=C.weekStartsOn??(0,F4.getSettings)().l10n.startOfWeek,{timezone:{string:I}}=(0,F4.getSettings)(),O=a;return f?.required&&!n&&!r?O=`${a} (${(0,j2.__)("Required")})`:!f?.required&&n&&!r&&(O=`${a} (${(0,j2.__)("Optional")})`),(0,Jd.jsx)(U2.BaseControl,{id:s,label:O,help:c,hideLabelFromVision:r,children:(0,Jd.jsxs)(Me,{direction:"column",gap:"lg",children:[(0,Jd.jsx)(F2e,{style:{width:"100%"},selected:h&&fk(h)||void 0,onSelect:S,month:p,onMonthChange:g,timeZone:I||void 0,weekStartsOn:B}),(0,Jd.jsx)(z2e,{ref:b,__next40pxDefaultSize:!0,required:!!f?.required,customValidity:ht(f,i),type:"datetime-local",label:(0,j2.__)("Date time"),hideLabelFromVision:!0,value:h?j2e(fk(h)||void 0):"",onChange:x})]})})}function Lce({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,operator:i,validity:s}){return i===tn||i===Pn?(0,Jd.jsx)(z2,{className:"dataviews-controls__datetime",data:e,field:t,onChange:o,hideLabelFromVision:r,operator:i}):(0,Jd.jsx)(U2e,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:s})}var Pr=l(A(),1),tt=l(P(),1),Ko=l(N(),1),Ir=l(pc(),1);var gt=l(w(),1),{DateCalendar:H2e,DateRangeCalendar:G2e}=_t(Pr.privateApis),W2e=[{id:"today",label:(0,Ko.__)("Today"),getValue:()=>(0,Ir.getDate)(null)},{id:"yesterday",label:(0,Ko.__)("Yesterday"),getValue:()=>{let e=(0,Ir.getDate)(null);return pp(e,1)}},{id:"past-week",label:(0,Ko.__)("Past week"),getValue:()=>{let e=(0,Ir.getDate)(null);return pp(e,7)}},{id:"past-month",label:(0,Ko.__)("Past month"),getValue:()=>{let e=(0,Ir.getDate)(null);return M2(e,1)}}],$2e=[{id:"last-7-days",label:(0,Ko.__)("Last 7 days"),getValue:()=>{let e=(0,Ir.getDate)(null);return[pp(e,7),e]}},{id:"last-30-days",label:(0,Ko.__)("Last 30 days"),getValue:()=>{let e=(0,Ir.getDate)(null);return[pp(e,30),e]}},{id:"month-to-date",label:(0,Ko.__)("Month to date"),getValue:()=>{let e=(0,Ir.getDate)(null);return[rce(e),e]}},{id:"last-year",label:(0,Ko.__)("Last year"),getValue:()=>{let e=(0,Ir.getDate)(null);return[D2(e,1),e]}},{id:"year-to-date",label:(0,Ko.__)("Year to date"),getValue:()=>{let e=(0,Ir.getDate)(null);return[A2(e),e]}}],mk=e=>{if(!e)return null;let t=(0,Ir.getDate)(e);return t&&sk(t)?t:null},z4=e=>e?typeof e=="string"?e:P_(e,"yyyy-MM-dd"):"";function Nce({field:e,validity:t,inputRefs:o,isTouched:r,setIsTouched:n,children:i}){let{isValid:s}=e,[a,c]=(0,tt.useState)(void 0),u=(0,tt.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,tt.useEffect)(()=>{let f=Array.isArray(o)?o:[o],m=t?ht(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,tt.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,tt.useEffect)(()=>{if(!r)return;let f=t?ht(s,t):void 0;f?c(f):u()},[r,s,t,u]),(0,gt.jsxs)("div",{onBlur:f=>{r||(!f.relatedTarget||!f.currentTarget.contains(f.relatedTarget))&&n(!0)},children:[i,(0,gt.jsx)("div",{"aria-live":"polite",children:a&&(0,gt.jsxs)("p",{className:V("components-validated-control__indicator",a.type==="invalid"?"is-invalid":void 0),children:[(0,gt.jsx)(Pr.Icon,{className:"components-validated-control__indicator-icon",icon:If,size:16,fill:"currentColor"}),a.message]})})]})}function K2e({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{id:s,label:a,setValue:c,getValue:u,isValid:d,format:f}=t,[m,h]=(0,tt.useState)(null),p=f.weekStartsOn??(0,Ir.getSettings)().l10n.startOfWeek,g=u({item:e}),b=typeof g=="string"?g:void 0,[v,k]=(0,tt.useState)(()=>mk(b)||new Date),[y,S]=(0,tt.useState)(!1),x=(0,tt.useRef)(null),C=(0,tt.useCallback)(T=>o(c({item:e,value:T})),[e,o,c]),B=(0,tt.useCallback)(T=>{let R=T?P_(T,"yyyy-MM-dd"):void 0;C(R),h(null),S(!0)},[C]),I=(0,tt.useCallback)(T=>{let R=T.getValue(),D=z4(R);k(R),C(D),h(T.id),S(!0)},[C]),O=(0,tt.useCallback)(T=>{if(C(T),T){let R=mk(T);R&&k(R)}h(null),S(!0)},[C]),{timezone:{string:E}}=(0,Ir.getSettings)(),L=a;return d?.required&&!n?L=`${a} (${(0,Ko.__)("Required")})`:!d?.required&&n&&(L=`${a} (${(0,Ko.__)("Optional")})`),(0,gt.jsx)(Nce,{field:t,validity:i,inputRefs:x,isTouched:y,setIsTouched:S,children:(0,gt.jsx)(Pr.BaseControl,{id:s,className:"dataviews-controls__date",label:L,hideLabelFromVision:r,children:(0,gt.jsxs)(Me,{direction:"column",gap:"lg",children:[(0,gt.jsxs)(Me,{direction:"row",gap:"sm",wrap:"wrap",justify:"flex-start",children:[W2e.map(T=>{let R=m===T.id;return(0,gt.jsx)(Pr.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:R,size:"small",onClick:()=>I(T),children:T.label},T.id)}),(0,gt.jsx)(Pr.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:!m,size:"small",disabled:!!m,accessibleWhenDisabled:!1,children:(0,Ko.__)("Custom")})]}),(0,gt.jsx)(Pr.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:x,type:"date",label:(0,Ko.__)("Date"),hideLabelFromVision:!0,value:b,onChange:O,required:!!t.isValid?.required}),(0,gt.jsx)(H2e,{style:{width:"100%"},selected:b&&mk(b)||void 0,onSelect:B,month:v,onMonthChange:k,timeZone:E||void 0,weekStartsOn:p})]})})})}function Y2e({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{id:s,label:a,getValue:c,setValue:u,format:d}=t,f,m=c({item:e});Array.isArray(m)&&m.length===2&&m.every(D=>typeof D=="string")&&(f=m);let h=d.weekStartsOn??(0,Ir.getSettings)().l10n.startOfWeek,p=(0,tt.useCallback)(D=>{o(u({item:e,value:D}))},[e,o,u]),[g,b]=(0,tt.useState)(null),v=(0,tt.useMemo)(()=>{if(!f)return{from:void 0,to:void 0};let[D,j]=f;return{from:mk(D)||void 0,to:mk(j)||void 0}},[f]),[k,y]=(0,tt.useState)(()=>v.from||new Date),[S,x]=(0,tt.useState)(!1),C=(0,tt.useRef)(null),B=(0,tt.useRef)(null),I=(0,tt.useCallback)((D,j)=>{D&&j?p([z4(D),z4(j)]):!D&&!j&&p(void 0)},[p]),O=(0,tt.useCallback)(D=>{I(D?.from,D?.to),b(null),x(!0)},[I]),E=(0,tt.useCallback)(D=>{let[j,G]=D.getValue();y(j),I(j,G),b(D.id),x(!0)},[I]),L=(0,tt.useCallback)((D,j)=>{let[G,z]=f||[void 0,void 0];if(I(D==="from"?j:G,D==="to"?j:z),j){let te=mk(j);te&&y(te)}b(null),x(!0)},[f,I]),{timezone:T}=(0,Ir.getSettings)(),R=a;return t.isValid?.required&&!n?R=`${a} (${(0,Ko.__)("Required")})`:!t.isValid?.required&&n&&(R=`${a} (${(0,Ko.__)("Optional")})`),(0,gt.jsx)(Nce,{field:t,validity:i,inputRefs:[C,B],isTouched:S,setIsTouched:x,children:(0,gt.jsx)(Pr.BaseControl,{id:s,className:"dataviews-controls__date",label:R,hideLabelFromVision:r,children:(0,gt.jsxs)(Me,{direction:"column",gap:"lg",children:[(0,gt.jsxs)(Me,{direction:"row",gap:"sm",wrap:"wrap",justify:"flex-start",children:[$2e.map(D=>{let j=g===D.id;return(0,gt.jsx)(Pr.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:j,size:"small",onClick:()=>E(D),children:D.label},D.id)}),(0,gt.jsx)(Pr.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:!g,size:"small",accessibleWhenDisabled:!1,disabled:!!g,children:(0,Ko.__)("Custom")})]}),(0,gt.jsxs)(Me,{direction:"row",gap:"sm",justify:"space-between",className:"dataviews-controls__date-range-inputs",children:[(0,gt.jsx)(Pr.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:C,type:"date",label:(0,Ko.__)("From"),hideLabelFromVision:!0,value:f?.[0],onChange:D=>L("from",D),required:!!t.isValid?.required}),(0,gt.jsx)(Pr.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:B,type:"date",label:(0,Ko.__)("To"),hideLabelFromVision:!0,value:f?.[1],onChange:D=>L("to",D),required:!!t.isValid?.required})]}),(0,gt.jsx)(G2e,{style:{width:"100%"},selected:v,onSelect:O,month:k,onMonthChange:y,timeZone:T.string||void 0,weekStartsOn:h})]})})})}function Mce({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,operator:i,validity:s}){return i===tn||i===Pn?(0,gt.jsx)(z2,{className:"dataviews-controls__date",data:e,field:t,onChange:o,hideLabelFromVision:r,operator:i}):i===en?(0,gt.jsx)(Y2e,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:s}):(0,gt.jsx)(K2e,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:s})}var H2=l(A(),1),Dce=l(P(),1);var j4=l(w(),1),{ValidatedSelectControl:q2e}=_t(H2.privateApis);function G2({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=s==="array",h=u({item:e})??(m?[]:""),p=(0,Dce.useCallback)(v=>o(d({item:e,value:v})),[e,o,d]),{elements:g,isLoading:b}=Rn({elements:t.elements,getElements:t.getElements});return b?(0,j4.jsx)(H2.Spinner,{}):(0,j4.jsx)(q2e,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:ht(f,i),label:a,value:h,help:c,options:g,onChange:p,__next40pxDefaultSize:!0,hideLabelFromVision:r,multiple:m})}var U4=l(w(),1),Z2e=10;function Vce(e){let{field:t}=e,{elements:o}=Rn({elements:t.elements,getElements:t.getElements});return o.length>=Z2e?(0,U4.jsx)(F2,{...e}):(0,U4.jsx)(G2,{...e})}var $2=l(A(),1);var Fce=l(A(),1),zce=l(P(),1);var jce=l(w(),1),{ValidatedInputControl:X2e}=_t(Fce.privateApis);function rl({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=(0,zce.useCallback)(v=>o(h({item:e,value:v})),[e,h,o]);return(0,jce.jsx)(X2e,{required:!!p.required,markWhenOptional:n,customValidity:ht(p,c),label:u,placeholder:d,value:g??"",help:f,onChange:b,hideLabelFromVision:r,type:i,prefix:s,suffix:a,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 W2=l(w(),1);function Uce({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){return(0,W2.jsx)(rl,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i,type:"email",prefix:(0,W2.jsx)($2.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,W2.jsx)($2.Icon,{icon:uA})})})}var Y2=l(A(),1);var K2=l(w(),1);function Hce({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){return(0,K2.jsx)(rl,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i,type:"tel",prefix:(0,K2.jsx)(Y2.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,K2.jsx)(Y2.Icon,{icon:av})})})}var Z2=l(A(),1);var q2=l(w(),1);function Gce({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){return(0,q2.jsx)(rl,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i,type:"url",prefix:(0,q2.jsx)(Z2.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,q2.jsx)(Z2.Icon,{icon:dn})})})}var Ic=l(A(),1),R_=l(P(),1),X2=l(N(),1);var ef=l(w(),1),{ValidatedNumberControl:Q2e}=_t(Ic.privateApis);function Wce(e){if(e===""||e===void 0)return"";let t=Number(e);return Number.isFinite(t)?t:""}function J2e({value:e,onChange:t,hideLabelFromVision:o,step:r}){let[n="",i=""]=e,s=(0,R_.useCallback)(c=>t([Wce(c),i]),[t,i]),a=(0,R_.useCallback)(c=>t([n,Wce(c)]),[t,n]);return(0,ef.jsx)(Ic.BaseControl,{help:(0,X2.__)("The max. value must be greater than the min. value."),children:(0,ef.jsxs)(Ic.Flex,{direction:"row",gap:4,children:[(0,ef.jsx)(Ic.__experimentalNumberControl,{label:(0,X2.__)("Min."),value:n,max:i?Number(i)-r:void 0,onChange:s,__next40pxDefaultSize:!0,hideLabelFromVision:o,step:r}),(0,ef.jsx)(Ic.__experimentalNumberControl,{label:(0,X2.__)("Max."),value:i,min:n?Number(n)+r:void 0,onChange:a,__next40pxDefaultSize:!0,hideLabelFromVision:o,step:r})]})})}function Q2({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=(0,R_.useCallback)(v=>{o(m({item:e,value:["",void 0].includes(v)?void 0:Number(v)}))},[e,o,m]),b=(0,R_.useCallback)(v=>{o(m({item:e,value:v}))},[e,o,m]);if(i===en){let v=["",""];return Array.isArray(p)&&p.length===2&&p.every(k=>typeof k=="number"||k==="")&&(v=p),(0,ef.jsx)(J2e,{value:v,onChange:b,hideLabelFromVision:r,step:c})}return(0,ef.jsx)(Q2e,{required:!!h.required,markWhenOptional:n,customValidity:ht(h,s),label:u,help:d,value:p,onChange:g,__next40pxDefaultSize:!0,hideLabelFromVision:r,step:c,min:h.min?h.min.constraint:void 0,max:h.max?h.max.constraint:void 0})}var $ce=l(w(),1);function Kce(e){return(0,$ce.jsx)(Q2,{...e})}var Yce=l(w(),1);function qce(e){return(0,Yce.jsx)(Q2,{...e})}var J2=l(A(),1),Zce=l(P(),1);var H4=l(w(),1),{ValidatedRadioControl:eRe}=_t(J2.privateApis);function Xce({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{label:s,description:a,getValue:c,setValue:u,isValid:d}=t,{elements:f,isLoading:m}=Rn({elements:t.elements,getElements:t.getElements}),h=c({item:e}),p=(0,Zce.useCallback)(g=>o(u({item:e,value:g})),[e,o,u]);return m?(0,H4.jsx)(J2.Spinner,{}):(0,H4.jsx)(eRe,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:ht(d,i),label:s,help:a,onChange:p,options:f,selected:h,hideLabelFromVision:r})}var G4=l(P(),1);var Qce=l(w(),1);function Jce({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,config:i,validity:s}){let{prefix:a,suffix:c}=i||{};return(0,Qce.jsx)(rl,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:s,prefix:a?(0,G4.createElement)(a):void 0,suffix:c?(0,G4.createElement)(c):void 0})}var eue=l(A(),1),tue=l(P(),1);var oue=l(w(),1),{ValidatedToggleControl:tRe}=_t(eue.privateApis);function rue({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=(0,tue.useCallback)(()=>{t(u({item:o,value:!c({item:o})}))},[t,u,o,c]);return(0,oue.jsx)(tRe,{required:!!d.required,markWhenOptional:n,customValidity:ht(d,i),hidden:r,label:s,help:a,checked:c({item:o}),onChange:f})}var nue=l(A(),1),iue=l(P(),1);var sue=l(w(),1),{ValidatedTextareaControl:oRe}=_t(nue.privateApis);function aue({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,config:i,validity:s}){let{rows:a=4}=i||{},{label:c,placeholder:u,description:d,setValue:f,isValid:m}=t,h=t.getValue({item:e}),p=(0,iue.useCallback)(g=>o(f({item:e,value:g})),[e,o,f]);return(0,sue.jsx)(oRe,{required:!!m.required,markWhenOptional:n,customValidity:ht(m,s),label:c,placeholder:u,value:h??"",help:d,onChange:p,rows:a,minLength:m.minLength?m.minLength.constraint:void 0,maxLength:m.maxLength?m.maxLength.constraint:void 0,__next40pxDefaultSize:!0,hideLabelFromVision:r})}var pk=l(A(),1),lue=l(P(),1);var eR=l(w(),1),{ValidatedToggleGroupControl:rRe}=_t(pk.privateApis);function cue({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{getValue:s,setValue:a,isValid:c}=t,u=s({item:e}),d=(0,lue.useCallback)(p=>o(a({item:e,value:p})),[e,o,a]),{elements:f,isLoading:m}=Rn({elements:t.elements,getElements:t.getElements});if(m)return(0,eR.jsx)(pk.Spinner,{});if(f.length===0)return null;let h=f.find(p=>p.value===u);return(0,eR.jsx)(rRe,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:ht(c,i),__next40pxDefaultSize:!0,isBlock:!0,label:t.label,help:h?.description||t.description,onChange:d,value:u,hideLabelFromVision:r,children:f.map(p=>(0,eR.jsx)(pk.__experimentalToggleGroupControlOption,{label:p.label,value:p.value},p.value))})}var tR=l(A(),1),oR=l(P(),1);var O_=l(w(),1),{ValidatedFormTokenField:nRe}=_t(tR.privateApis);function uue({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{label:s,placeholder:a,getValue:c,setValue:u,isValid:d}=t,f=c({item:e}),{elements:m,isLoading:h}=Rn({elements:t.elements,getElements:t.getElements}),p=(0,oR.useMemo)(()=>Array.isArray(f)?f.map(b=>m?.find(k=>k.value===b)||{value:b,label:b}):[],[f,m]),g=(0,oR.useCallback)(b=>{let v=b.map(k=>typeof k=="object"&&"value"in k?k.value:k);o(u({item:e,value:v}))},[o,u,e]);return h?(0,O_.jsx)(tR.Spinner,{}):(0,O_.jsx)(nRe,{required:!!d?.required,markWhenOptional:n,customValidity:ht(d,i),label:r?void 0:s,value:p,onChange:g,placeholder:a,suggestions:m?.map(b=>b.value),__experimentalValidateInput:b=>t.isValid?.elements&&m?m.some(v=>v.value===b||v.label===b):!0,__experimentalExpandOnFocus:m&&m.length>0,__experimentalShowHowTo:!t.isValid?.elements,displayTransform:b=>typeof b=="object"&&"label"in b?b.label:typeof b=="string"&&m&&m.find(k=>k.value===b)?.label||b,__experimentalRenderItem:({item:b})=>{if(typeof b=="string"&&m){let v=m.find(k=>k.value===b);return(0,O_.jsx)("span",{children:v?.label||b})}return(0,O_.jsx)("span",{children:b})}})}var On=l(A(),1),W4=l(P(),1),due=l(N(),1);var Pc=l(w(),1),{ValidatedInputControl:iRe}=_t(On.privateApis),sRe=({color:e,onColorChange:t})=>{let o=e&&Bt(e).isValid()?e:"#ffffff";return(0,Pc.jsx)(On.Dropdown,{className:"dataviews-controls__color-picker-dropdown",popoverProps:{resize:!1},renderToggle:({onToggle:r})=>(0,Pc.jsx)(On.Button,{onClick:r,"aria-label":(0,due.__)("Open color picker"),size:"small",icon:()=>(0,Pc.jsx)(On.ColorIndicator,{colorValue:o})}),renderContent:()=>(0,Pc.jsx)(On.__experimentalDropdownContentWrapper,{paddingSize:"none",children:(0,Pc.jsx)(On.ColorPicker,{color:o,onChange:t,enableAlpha:!0})})})};function fue({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.getValue({item:e})||"",m=(0,W4.useCallback)(p=>{o(u({item:e,value:p}))},[e,o,u]),h=(0,W4.useCallback)(p=>{o(u({item:e,value:p||""}))},[e,o,u]);return(0,Pc.jsx)(iRe,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:ht(d,i),label:s,placeholder:a,value:f,help:c,onChange:h,hideLabelFromVision:r,type:"text",prefix:(0,Pc.jsx)(On.__experimentalInputControlPrefixWrapper,{variant:"control",children:(0,Pc.jsx)(sRe,{color:f,onColorChange:m})})})}var nR=l(A(),1),iR=l(P(),1),$4=l(N(),1);var rR=l(w(),1);function mue({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let[s,a]=(0,iR.useState)(!1),c=(0,iR.useCallback)(()=>{a(u=>!u)},[]);return(0,rR.jsx)(rl,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i,type:s?"text":"password",suffix:(0,rR.jsx)(nR.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,rR.jsx)(nR.Button,{icon:s?vs:Of,onClick:c,size:"small",label:s?(0,$4.__)("Hide password"):(0,$4.__)("Show password")})})})}function sR(e){return Array.isArray(e.elements)&&e.elements.length>0||typeof e.getElements=="function"}var hue=l(w(),1),pue={adaptiveSelect:Vce,array:uue,checkbox:Rce,color:fue,combobox:F2,datetime:Lce,date:Mce,email:Uce,telephone:Hce,url:Gce,integer:Kce,number:qce,password:mue,radio:Xce,select:G2,text:Jce,toggle:rue,textarea:aue,toggleGroup:cue};function aRe(e){return e&&typeof e=="object"&&typeof e.control=="string"}function lRe(e){let{control:t,...o}=e,r=aR(t);return r===null?null:function(i){return(0,hue.jsx)(r,{...i,config:o})}}function gue(e,t){return typeof e.Edit=="function"?e.Edit:typeof e.Edit=="string"?aR(e.Edit):aRe(e.Edit)?lRe(e.Edit):sR(e)&&e.type!=="array"?aR("adaptiveSelect"):t===null?null:aR(t)}function aR(e){return Object.keys(pue).includes(e)?pue[e]:null}function cRe(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 bue=cRe;var uRe=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},kue=uRe;var dRe=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},vue=dRe;var Sue=l(N(),1);function lR({item:e,field:t}){let{elements:o,isLoading:r}=Rn({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 yue=l(w(),1);function lo({item:e,field:t}){return t.hasElements?(0,yue.jsx)(lR,{item:e,field:t}):t.getValueFormatted({item:e,field:t})}var nl=(e,t,o)=>o==="asc"?e.localeCompare(t):t.localeCompare(e);function co(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)}function il(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 sl(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 al(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 xt(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 fRe({item:e,field:t}){return t.getValue({item:e})}var rn=fRe;var mRe=/^[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 pRe(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)&&!mRe.test(o)?(0,Sue.__)("Value must be a valid email address."):null}var _ue={type:"email",render:lo,Edit:"email",sort:nl,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ut,Ht],validOperators:[Xt,Qt,Ja,el,tl,Ut,Ht,Er,Tr],format:{},getValueFormatted:rn,validate:{required:co,pattern:al,minLength:il,maxLength:sl,elements:xt,custom:pRe}};var xue=l(N(),1);var hk=(e,t,o)=>o==="asc"?e-t:t-e;function cR(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 uR(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 wue={separatorThousand:","};function hRe({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=wue: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 gRe(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)&&!Number.isInteger(o)?(0,xue.__)("Value must be an integer."):null}var Cue={type:"integer",render:lo,Edit:"integer",sort:hk,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Xt,Qt,Ud,Hd,Gd,Wd,en],validOperators:[Xt,Qt,Ud,Hd,Gd,Wd,en,Ut,Ht,Er,Tr],format:wue,getValueFormatted:hRe,validate:{required:co,min:cR,max:uR,elements:xt,custom:gRe}};var Bue=l(N(),1);var Eue={separatorThousand:",",separatorDecimal:".",decimals:2};function bRe({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=Eue: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 kRe(e){return e===""||e===void 0||e===null}function vRe(e,t){let o=t.getValue({item:e});return!kRe(o)&&!Number.isFinite(o)?(0,Bue.__)("Value must be a number."):null}var Tue={type:"number",render:lo,Edit:"number",sort:hk,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Xt,Qt,Ud,Hd,Gd,Wd,en],validOperators:[Xt,Qt,Ud,Hd,Gd,Wd,en,Ut,Ht,Er,Tr],format:Eue,getValueFormatted:bRe,validate:{required:co,min:cR,max:uR,elements:xt,custom:vRe}};var Iue={type:"text",render:lo,Edit:"text",sort:nl,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ut,Ht],validOperators:[Xt,Qt,Ja,el,tl,Ut,Ht,Er,Tr],format:{},getValueFormatted:rn,validate:{required:co,pattern:al,minLength:il,maxLength:sl,elements:xt}};var hp=l(pc(),1);var Pue={datetime:(0,hp.getSettings)().formats.datetime,weekStartsOn:(0,hp.getSettings)().l10n.startOfWeek};function yRe({item:e,field:t}){let o=t.getValue({item:e});if(["",void 0,null].includes(o))return"";let r;return t.type!=="datetime"?r=Pue:r=t.format,(0,hp.dateI18n)(r.datetime,(0,hp.getDate)(o))}var SRe=(e,t,o)=>{let r=new Date(e).getTime(),n=new Date(t).getTime();return o==="asc"?r-n:n-r},Rue={type:"datetime",render:lo,Edit:"datetime",sort:SRe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Zd,Xd,$d,Kd,Yd,qd,tn,Pn],validOperators:[Zd,Xd,$d,Kd,Yd,qd,tn,Pn],format:Pue,getValueFormatted:yRe,validate:{required:co,elements:xt}};var gp=l(pc(),1);var Oue={date:(0,gp.getSettings)().formats.date,weekStartsOn:(0,gp.getSettings)().l10n.startOfWeek};function _Re({item:e,field:t}){let o=t.getValue({item:e});if(["",void 0,null].includes(o))return"";let r;return t.type!=="date"?r=Oue:r=t.format,(0,gp.dateI18n)(r.date,(0,gp.getDate)(o))}var xRe=(e,t,o)=>{let r=new Date(e).getTime(),n=new Date(t).getTime();return o==="asc"?r-n:n-r},Aue={type:"date",render:lo,Edit:"date",sort:xRe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Zd,Xd,$d,Kd,Yd,qd,tn,Pn,en],validOperators:[Zd,Xd,$d,Kd,Yd,qd,tn,Pn,en],format:Oue,getValueFormatted:_Re,validate:{required:co,elements:xt}};var dR=l(N(),1);function Lue(e,t){return t.getValue({item:e})===!0}function wRe({item:e,field:t}){let o=t.getValue({item:e});return o===!0?(0,dR.__)("True"):o===!1?(0,dR.__)("False"):""}function CRe(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)&&![!0,!1].includes(o)?(0,dR.__)("Value must be true, false, or undefined"):null}var BRe=(e,t,o)=>{let r=!!e;return r===!!t?0:o==="asc"?r?1:-1:r?-1:1},Nue={type:"boolean",render:lo,Edit:"checkbox",sort:BRe,validate:{required:Lue,elements:xt,custom:CRe},enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Xt,Qt],validOperators:[Xt,Qt],format:{},getValueFormatted:wRe};var Mue={type:"media",render:()=>null,Edit:null,sort:()=>0,enableSorting:!1,enableGlobalSearch:!1,defaultOperators:[],validOperators:[],format:{},getValueFormatted:rn,validate:{}};var K4=l(N(),1);function Due(e,t){let o=t.getValue({item:e});return Array.isArray(o)&&o.length>0&&o.every(r=>![void 0,"",null].includes(r))}function Vue({item:e,field:t}){let o=t.getValue({item:e});return(Array.isArray(o)?o:[]).join(", ")}function ERe({item:e,field:t}){return Vue({item:e,field:t})}function TRe(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)&&!Array.isArray(o)?(0,K4.__)("Value must be an array."):o.every(r=>typeof r=="string")?null:(0,K4.__)("Every value must be a string.")}var IRe=(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)},Fue={type:"array",render:ERe,Edit:"array",sort:IRe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ut,Ht],validOperators:[Ut,Ht,Er,Tr],format:{},getValueFormatted:Vue,validate:{required:Due,elements:xt,custom:TRe}};function PRe({item:e,field:t}){return t.getValue({item:e})?"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022":""}var zue={type:"password",render:lo,Edit:"password",sort:()=>0,enableSorting:!1,enableGlobalSearch:!1,defaultOperators:[],validOperators:[],format:{},getValueFormatted:PRe,validate:{required:co,pattern:al,minLength:il,maxLength:sl,elements:xt}};var jue={type:"telephone",render:lo,Edit:"telephone",sort:nl,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ut,Ht],validOperators:[Xt,Qt,Ja,el,tl,Ut,Ht,Er,Tr],format:{},getValueFormatted:rn,validate:{required:co,pattern:al,minLength:il,maxLength:sl,elements:xt}};var Uue=l(N(),1);var gk=l(w(),1);function RRe({item:e,field:t}){if(t.hasElements)return(0,gk.jsx)(lR,{item:e,field:t});let o=rn({item:e,field:t});return!o||!Bt(o).isValid()?o:(0,gk.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,gk.jsx)("div",{style:{width:"16px",height:"16px",borderRadius:"50%",backgroundColor:o,border:"1px solid #ddd",flexShrink:0}}),(0,gk.jsx)("span",{children:o})]})}function ORe(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)&&!Bt(o).isValid()?(0,Uue.__)("Value must be a valid color."):null}var ARe=(e,t,o)=>{let r=Bt(e),n=Bt(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},Hue={type:"color",render:RRe,Edit:"color",sort:ARe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ut,Ht],validOperators:[Xt,Qt,Ut,Ht],format:{},getValueFormatted:rn,validate:{required:co,elements:xt,custom:ORe}};var Gue={type:"url",render:lo,Edit:"url",sort:nl,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ut,Ht],validOperators:[Xt,Qt,Ja,el,tl,Ut,Ht,Er,Tr],format:{},getValueFormatted:rn,validate:{required:co,pattern:al,minLength:il,maxLength:sl,elements:xt}};var LRe=(e,t,o)=>typeof e=="number"&&typeof t=="number"?hk(e,t,o):nl(e,t,o),Wue={render:lo,Edit:null,sort:LRe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Xt,Qt],validOperators:Ece(),format:{},getValueFormatted:rn,validate:{required:co,elements:xt}};function $ue(e,t){let o;e.isValid?.required===!0&&t.validate.required!==void 0&&(o={constraint:!0,validate:t.validate.required});let r;(e.isValid?.elements===!0||e.isValid?.elements===void 0&&(e.elements||e.getElements))&&t.validate.elements!==void 0&&(r={constraint:!0,validate:t.validate.elements});let n;typeof e.isValid?.min=="number"&&t.validate.min!==void 0&&(n={constraint:e.isValid.min,validate:t.validate.min});let i;typeof e.isValid?.max=="number"&&t.validate.max!==void 0&&(i={constraint:e.isValid.max,validate:t.validate.max});let s;typeof e.isValid?.minLength=="number"&&t.validate.minLength!==void 0&&(s={constraint:e.isValid.minLength,validate:t.validate.minLength});let a;typeof e.isValid?.maxLength=="number"&&t.validate.maxLength!==void 0&&(a={constraint:e.isValid.maxLength,validate:t.validate.maxLength});let c;e.isValid?.pattern!==void 0&&t.validate.pattern!==void 0&&(c={constraint:e.isValid?.pattern,validate:t.validate.pattern});let u=e.isValid?.custom??t.validate.custom;return{required:o,elements:r,min:n,max:i,minLength:s,maxLength:a,pattern:c,custom:u}}function Kue(e){return e.validOperators.reduce((t,o)=>{let r=Bce(o);return r?.filter&&(t[o]=r.filter),t},{})}function NRe(e,t){return{...t.format,...e.format}}var Yue=NRe;function MRe(e){let t=[_ue,Cue,Tue,Iue,Rue,Aue,Nue,Mue,Fue,zue,jue,Hue,Gue].find(o=>o?.type===e);return t||Wue}function A_(e){return e.map(t=>{let o=MRe(t.type),r=t.getValue||kue(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||vue(t.id),elements:t.elements,getElements:t.getElements,hasElements:sR(t),isVisible:t.isVisible,enableHiding:t.enableHiding??!0,readOnly:t.readOnly??!1,type:o.type,render:t.render??o.render,Edit:gue(t,o.Edit),sort:n,enableSorting:t.enableSorting??o.enableSorting,enableGlobalSearch:t.enableGlobalSearch??o.enableGlobalSearch,isValid:$ue(t,o),filterBy:bue(t,o.defaultOperators,o.validOperators),filter:Kue(o),format:Yue(t,o),getValueFormatted:t.getValueFormatted??o.getValueFormatted}})}var tz=l(P(),1);var que=l(P(),1),Zue=l(w(),1),Y4=(0,que.createContext)({fields:[]});Y4.displayName="DataFormContext";function Xue({fields:e,children:t}){return(0,Zue.jsx)(Y4.Provider,{value:{fields:e},children:t})}var us=Y4;var yR=l(P(),1);var mR=l(P(),1),L_=l(A(),1);var Rr={type:"regular",labelPosition:"top"},DRe=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 Que(e){let t=Rr;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];t={type:"panel",labelPosition:e?.labelPosition??"side",openAs:e?.openAs??"dropdown",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:DRe(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 Jue(e){let t=Que(e?.layout),o=(e.fields??[]).map(r=>{if(typeof r=="string")return{id:r,layout:t};let n=r.layout?Que(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:Jue({fields:r.children,layout:Rr}).fields}}});return{layout:t,fields:o}}var fR=Jue;var Gt=l(w(),1);function VRe({title:e}){return(0,Gt.jsx)(Me,{direction:"column",className:"dataforms-layouts-regular__header",gap:"lg",children:(0,Gt.jsx)(Me,{direction:"row",align:"center",children:(0,Gt.jsx)(L_.__experimentalHeading,{level:2,size:13,children:e})})})}function ede({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{fields:s}=(0,mR.useContext)(us),a=t.layout,c=(0,mR.useMemo)(()=>({layout:Rr,fields:t.children?t.children:[]}),[t]);if(t.children)return(0,Gt.jsxs)(Gt.Fragment,{children:[!r&&t.label&&(0,Gt.jsx)(VRe,{title:t.label}),(0,Gt.jsx)(An,{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,Gt.jsxs)(Me,{direction:"row",className:"dataforms-layouts-regular__field",gap:"sm",children:[(0,Gt.jsx)("div",{className:V("dataforms-layouts-regular__field-label",`dataforms-layouts-regular__field-label--label-position-${u}`),children:(0,Gt.jsx)(L_.BaseControl.VisualLabel,{children:d.label})}),(0,Gt.jsx)("div",{className:"dataforms-layouts-regular__field-control",children:d.readOnly===!0?(0,Gt.jsx)(d.render,{item:e,field:d}):(0,Gt.jsx)(d.Edit,{data:e,field:d,onChange:o,hideLabelFromVision:!0,markWhenOptional:n,validity:i},d.id)})]}):(0,Gt.jsx)("div",{className:"dataforms-layouts-regular__field",children:d.readOnly===!0?(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsxs)(Gt.Fragment,{children:[!r&&u!=="none"&&(0,Gt.jsx)(L_.BaseControl.VisualLabel,{children:d.label}),(0,Gt.jsx)(d.render,{item:e,field:d})]})}):(0,Gt.jsx)(d.Edit,{data:e,field:d,onChange:o,hideLabelFromVision:u==="none"?!0:r,markWhenOptional:n,validity:i})})}var Z4=l(PV(),1),vp=l(A(),1),X4=l(N(),1),na=l(P(),1),gR=l(Z(),1);var kk=l(A(),1),bk=l(N(),1);var ide=l(Z(),1),sde=l(P(),1);function FRe(e,t){return V("dataforms-layouts-panel__field-label",`dataforms-layouts-panel__field-label--label-position-${e}`,{"has-error":t})}var tde=FRe;var kp=l(A(),1);var bp=l(w(),1);function zRe(e,t,o){return e?(0,bp.jsx)(kp.Tooltip,{text:t,placement:"top",children:(0,bp.jsxs)("span",{className:"dataforms-layouts-panel__field-label-error-content",children:[(0,bp.jsx)(kp.Icon,{icon:If,size:16}),(0,bp.jsx)(kp.BaseControl.VisualLabel,{children:o})]})}):(0,bp.jsx)(kp.BaseControl.VisualLabel,{children:o})}var ode=zRe;function rde(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=rde(o);if(r)return r}}var nde=rde;var mi=l(w(),1);function N_({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=nde(n),m=i&&!!f,h=tde(u,m),p=ode(m,f,o),g=V("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,ide.useInstanceId)(N_,"dataforms-layouts-panel__field-control"),v=m?(0,bk.sprintf)((0,bk._x)("Edit %s (has errors)","field"),o||""):(0,bk.sprintf)((0,bk._x)("Edit %s","field"),o||""),k=(0,sde.useRef)(null);return(0,mi.jsxs)("div",{ref:k,className:g,onClick:s?void 0:()=>{let x=k.current?.ownerDocument.defaultView?.getSelection();x&&x.toString().length>0||a()},onKeyDown:s?void 0:x=>{x.target===x.currentTarget&&(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),a())},children:[u!=="none"&&(0,mi.jsx)("span",{className:h,children:p}),u==="none"&&m&&(0,mi.jsx)(kk.Tooltip,{text:f,placement:"top",children:(0,mi.jsx)("span",{className:"dataforms-layouts-panel__field-label-error-content",children:(0,mi.jsx)(kk.Icon,{icon:If,size:16})})}),(0,mi.jsx)("span",{id:`${b}`,className:"dataforms-layouts-panel__field-control",children:r.length>1?(0,mi.jsx)("span",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",width:"100%",gap:"2px"},children:r.map(x=>(0,mi.jsx)("span",{style:{width:"100%"},children:(0,mi.jsx)(x.render,{item:e,field:x})},x.id))}):r.map(x=>(0,mi.jsx)(x.render,{item:e,field:x},x.id))}),!s&&(0,mi.jsx)(kk.Button,{className:"dataforms-layouts-panel__field-trigger-icon",label:v,showTooltip:!1,icon:Rf,size:"small","aria-expanded":c,"aria-haspopup":"dialog","aria-describedby":`${b}`})]})}var ade=l(PV(),1),q4=l(vf(),1),ll=l(P(),1),nn=l(N(),1);function lde(e){return e?Object.values(e).every(t=>Object.entries(t).every(([o,r])=>o==="children"&&r&&typeof r=="object"?lde(r):r.type!=="invalid"&&r.type!=="validating")):!0}function jRe(e,t){let o=fR(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]=A_([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]=A_([a]);return{id:s.id,children:[],field:c}}return o.fields.map(n).filter(s=>s!==null)}function vk(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 cde(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 URe(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=>vk(u,{elements:{type:"invalid",message:(0,nn.__)("Could not validate elements.")}},[...i,t.id]));return}t.field?.isValid.elements&&!t.field.isValid.elements.validate(s,{...t.field,elements:c})?n(u=>vk(u,{elements:{type:"invalid",message:(0,nn.__)("Value must be one of the elements.")}},[...i,t.id])):n(u=>cde(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,nn.__)("Unknown error when running elements validation asynchronously."),n(d=>vk(d,{elements:{type:"invalid",message:u}},[...i,t.id]))})}function HRe(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=>cde(c,[...i,t.id],"custom"));return}if(typeof a=="string"){n(c=>vk(c,{custom:{type:"invalid",message:a}},[...i,t.id]));return}n(c=>vk(c,{custom:{type:"invalid",message:(0,nn.__)("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,nn.__)("Unknown error when running custom validation asynchronously."),n(u=>vk(u,{custom:{type:"invalid",message:c}},[...i,t.id]))})}function ude(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,nn.__)("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,nn.__)("Value is below the minimum.")}};if(t.field?.isValid.max&&!t.field.isValid.max.validate(e,t.field))return{max:{type:"invalid",message:(0,nn.__)("Value is above the maximum.")}};if(t.field?.isValid.minLength&&!t.field.isValid.minLength.validate(e,t.field))return{minLength:{type:"invalid",message:(0,nn.__)("Value is too short.")}};if(t.field?.isValid.maxLength&&!t.field.isValid.maxLength.validate(e,t.field))return{maxLength:{type:"invalid",message:(0,nn.__)("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,nn.__)("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,ade.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,nn.__)("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"&&(URe(t.field.getElements(),t,o),n.elements={type:"validating",message:(0,nn.__)("Validating\u2026")}),r instanceof Promise&&(HRe(r,t,o),n.custom={type:"validating",message:(0,nn.__)("Validating\u2026")}),Object.keys(n).length>0)return n;if(t.children.length>0){let i={};t.children.forEach(a=>{i[a.id]=ude(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 dde(e,t){let o=e?.field?.getValue({item:t});if(e.children.length===0)return o;let r=e.children.map(n=>dde(n,t));return r?{value:o,children:r}:o}function GRe(e,t,o){let[r,n]=(0,ll.useState)(),i=(0,ll.useRef)({}),s=(0,ll.useRef)({}),a=(0,ll.useRef)({}),c=(0,ll.useCallback)(()=>{let u={customCounterRef:i,elementsCounterRef:s,setFormValidity:n,path:[],item:e},d=jRe(o,t);if(d.length===0){n(void 0);return}let f={},m=[];d.forEach(h=>{let p=dde(h,e);if(a.current.hasOwnProperty(h.id)&&(0,q4.default)(a.current[h.id],p)){m.push(h.id);return}a.current[h.id]=p;let g=ude(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(v=>{p&&!g.includes(v)&&delete p[v]}),Object.keys(p).length===0&&(p=void 0),(0,q4.default)(h,p)?h:p})},[e,t,o]);return(0,ll.useEffect)(()=>{c()},[c]),{validity:r,isValid:lde(r)}}var fde=GRe;var mde=l(P(),1);function tf(e,t){(0,mde.useEffect)(()=>{t&&e.current&&e.current.querySelectorAll("input, textarea, select").forEach(r=>{r.reportValidity()})},[t,e])}var pde=l(P(),1);function WRe(e){return Array.isArray(e)?e.map(t=>typeof t=="string"?t:t.id):[]}var pR=(e,t)=>Array.isArray(e)&&e.length>0?WRe(e).map(r=>t.find(n=>n.id===r)).filter(r=>r!==void 0):[];var $Re=(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 KRe(e){let{fields:t}=(0,pde.useContext)(us),o=e.layout,r=pR(o.summary,t),n=$Re(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 hR=KRe;var sn=l(w(),1);function YRe({data:e,field:t,onChange:o,fieldLabel:r,onClose:n,touched:i}){let{fields:s}=(0,na.useContext)(us),[a,c]=(0,na.useState)({}),u=(0,na.useMemo)(()=>(0,Z4.default)(e,a,{arrayMerge:(k,y)=>y}),[e,a]),d=(0,na.useMemo)(()=>({layout:Rr,fields:t.children?t.children:[{id:t.id,layout:Rr}]}),[t]),f=s.map(k=>({...k,Edit:k.Edit===null?void 0:k.Edit,isValid:{required:k.isValid.required?.constraint,elements:k.isValid.elements?.constraint,min:k.isValid.min?.constraint,max:k.isValid.max?.constraint,pattern:k.isValid.pattern?.constraint,minLength:k.isValid.minLength?.constraint,maxLength:k.isValid.maxLength?.constraint}})),{validity:m}=fde(u,f,d),h=()=>{o(a),n()},p=k=>{c(y=>(0,Z4.default)(y,k,{arrayMerge:(S,x)=>x}))},g=(0,gR.useFocusOnMount)("firstInputElement"),b=(0,na.useRef)(null),v=(0,gR.useMergeRefs)([g,b]);return tf(b,i),(0,sn.jsxs)(vp.Modal,{className:"dataforms-layouts-panel__modal",onRequestClose:n,isFullScreen:!1,title:r,size:"medium",children:[(0,sn.jsx)("div",{ref:v,children:(0,sn.jsx)(An,{data:u,form:d,onChange:p,validity:m,children:(k,y,S,x)=>(0,sn.jsx)(k,{data:u,field:y,onChange:p,hideLabelFromVision:d.fields.length<2,markWhenOptional:x,validity:S},y.id)})}),(0,sn.jsxs)(Me,{direction:"row",className:"dataforms-layouts-panel__modal-footer",gap:"md",children:[(0,sn.jsx)(vp.__experimentalSpacer,{style:{flex:1}}),(0,sn.jsx)(vp.Button,{variant:"tertiary",onClick:n,__next40pxDefaultSize:!0,children:(0,X4.__)("Cancel")}),(0,sn.jsx)(vp.Button,{variant:"primary",onClick:h,__next40pxDefaultSize:!0,children:(0,X4.__)("Apply")})]})]})}function qRe({data:e,field:t,onChange:o,validity:r}){let[n,i]=(0,na.useState)(!1),[s,a]=(0,na.useState)(!1),{fieldDefinition:c,fieldLabel:u,summaryFields:d}=hR(t);if(!c)return null;let f=()=>{a(!1),i(!0)};return(0,sn.jsxs)(sn.Fragment,{children:[(0,sn.jsx)(N_,{data:e,field:t,fieldLabel:u,summaryFields:d,validity:r,touched:n,disabled:c.readOnly===!0,onClick:()=>a(!0),"aria-expanded":s}),s&&(0,sn.jsx)(YRe,{data:e,field:t,onChange:o,fieldLabel:u??"",onClose:f,touched:n})]})}var hde=qRe;var of=l(A(),1),gde=l(N(),1),Rc=l(P(),1);var bde=l(Z(),1);var Or=l(w(),1);function ZRe({title:e,onClose:t}){return(0,Or.jsx)(Me,{direction:"column",className:"dataforms-layouts-panel__dropdown-header",gap:"lg",children:(0,Or.jsxs)(Me,{direction:"row",gap:"sm",align:"center",children:[e&&(0,Or.jsx)(of.__experimentalHeading,{level:2,size:13,children:e}),(0,Or.jsx)(of.__experimentalSpacer,{style:{flex:1}}),t&&(0,Or.jsx)(of.Button,{label:(0,gde.__)("Close"),icon:xf,onClick:t,size:"small"})]})})}function XRe({touched:e,children:t}){let o=(0,Rc.useRef)(null);return tf(o,e),(0,Or.jsx)("div",{ref:o,children:t})}function QRe({data:e,field:t,onChange:o,validity:r}){let[n,i]=(0,Rc.useState)(!1),[s,a]=(0,Rc.useState)(null),c=(0,Rc.useMemo)(()=>({anchor:s,placement:"left-start",offset:36,shift:!0}),[s]),[u,d]=(0,bde.__experimentalUseDialog)({focusOnMount:"firstInputElement"}),f=(0,Rc.useMemo)(()=>({layout:Rr,fields:t.children?t.children:[{id:t.id,layout:Rr}]}),[t]),m=(0,Rc.useMemo)(()=>{if(r!==void 0)return t.children?r?.children:{[t.id]:r}},[r,t]),{fieldDefinition:h,fieldLabel:p,summaryFields:g}=hR(t);return h?(0,Or.jsx)("div",{ref:a,className:"dataforms-layouts-panel__field-dropdown-anchor",children:(0,Or.jsx)(of.Dropdown,{contentClassName:"dataforms-layouts-panel__field-dropdown",popoverProps:c,focusOnMount:!1,onToggle:b=>{b||i(!0)},renderToggle:({isOpen:b,onToggle:v})=>(0,Or.jsx)(N_,{data:e,field:t,fieldLabel:p,summaryFields:g,validity:r,touched:n,disabled:h.readOnly===!0,onClick:v,"aria-expanded":b}),renderContent:({onClose:b})=>(0,Or.jsx)(XRe,{touched:n,children:(0,Or.jsxs)("div",{ref:u,...d,children:[(0,Or.jsx)(ZRe,{title:p,onClose:b}),(0,Or.jsx)(An,{data:e,form:f,onChange:o,validity:m,children:(v,k,y,S)=>(0,Or.jsx)(v,{data:e,field:k,onChange:o,hideLabelFromVision:(f?.fields??[]).length<2,markWhenOptional:S,validity:y},k.id)})]})})})}):null}var kde=QRe;var Q4=l(w(),1);function vde({data:e,field:t,onChange:o,validity:r}){return t.layout.openAs==="modal"?(0,Q4.jsx)(hde,{data:e,field:t,onChange:o,validity:r}):(0,Q4.jsx)(kde,{data:e,field:t,onChange:o,validity:r})}var rf=l(A(),1),_de=l(Z(),1),Ln=l(P(),1),J4=l(N(),1);var bR=l(N(),1),yde=l(w(),1);function Sde(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+=Sde(r);return t}function kR({validity:e}){let t=Sde(e);return t===0?null:(0,yde.jsx)(I4,{intent:"high",children:(0,bR.sprintf)((0,bR._n)("%d field needs attention","%d fields need attention",t),t)})}var kr=l(w(),1);function JRe(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 ez({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{fields:s}=(0,Ln.useContext)(us),a=t.layout,c=(0,Ln.useRef)(null),u=(0,_de.useInstanceId)(ez,"dataforms-layouts-card-card-body"),d=(0,Ln.useMemo)(()=>({layout:Rr,fields:t.children??[]}),[t]),{isOpened:f,isCollapsible:m}=a,[h,p]=(0,Ln.useState)(f),[g,b]=(0,Ln.useState)(!1);(0,Ln.useEffect)(()=>{p(f)},[f]);let v=(0,Ln.useCallback)(()=>{p(T=>(T&&b(!0),!T))},[]),k=m?h:!0,y=(0,Ln.useCallback)(()=>{b(!0)},[b]);tf(c,k&&g);let x=pR(a.summary,s).filter(T=>JRe(T,a.summary,k)),C=g&&a.isCollapsible?(0,kr.jsx)(kR,{validity:i}):null,B={blockStart:"medium",blockEnd:"medium",inlineStart:"medium",inlineEnd:"medium"},I=t.label,O,E;if(t.children)O=!!I&&a.withHeader,E=(0,kr.jsxs)(kr.Fragment,{children:[t.description&&(0,kr.jsx)("div",{className:"dataforms-layouts-card__field-description",children:t.description}),(0,kr.jsx)(An,{data:e,form:d,onChange:o,validity:i?.children})]});else{let T=s.find(D=>D.id===t.id);if(!T||!T.Edit)return null;let R=yp("regular")?.component;if(!R)return null;I=T.label,O=!!I&&a.withHeader,E=(0,kr.jsx)(R,{data:e,field:t,onChange:o,hideLabelFromVision:r||O,markWhenOptional:n,validity:i})}let L={blockStart:O?"none":"medium",blockEnd:"medium",inlineStart:"medium",inlineEnd:"medium"};return(0,kr.jsxs)(rf.Card,{className:"dataforms-layouts-card__field",size:B,children:[O&&(0,kr.jsxs)(rf.CardHeader,{className:"dataforms-layouts-card__field-header",onClick:m?v:void 0,style:{cursor:m?"pointer":void 0},isBorderless:!0,children:[(0,kr.jsxs)("div",{style:{height:m?void 0:"40px",width:"100%",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,kr.jsx)("span",{className:"dataforms-layouts-card__field-header-label",children:I}),C,x.length>0&&a.withHeader&&(0,kr.jsx)("div",{className:"dataforms-layouts-card__field-summary",children:x.map(T=>(0,kr.jsx)(T.render,{item:e,field:T},T.id))})]}),m&&(0,kr.jsx)(rf.Button,{__next40pxDefaultSize:!0,variant:"tertiary",icon:k?_f:Fn,"aria-expanded":k,"aria-controls":u,"aria-label":k?(0,J4.__)("Collapse"):(0,J4.__)("Expand")})]}),(k||!O)&&(0,kr.jsx)(rf.CardBody,{id:u,size:L,className:"dataforms-layouts-card__field-control",ref:c,onBlur:y,children:E})]})}var xde=l(A(),1);var ir=l(w(),1);function eOe({title:e}){return(0,ir.jsx)(Me,{direction:"column",className:"dataforms-layouts-row__header",gap:"lg",children:(0,ir.jsx)(Me,{direction:"row",align:"center",children:(0,ir.jsx)(xde.__experimentalHeading,{level:2,size:13,children:e})})})}var tOe=({children:e})=>(0,ir.jsx)(ir.Fragment,{children:e});function wde({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let s=t.layout;if(t.children){let c={layout:Rr,fields:t.children};return(0,ir.jsxs)("div",{className:"dataforms-layouts-row__field",children:[!r&&t.label&&(0,ir.jsx)(eOe,{title:t.label}),(0,ir.jsx)(Me,{direction:"row",align:s.alignment,gap:"lg",children:(0,ir.jsx)(An,{data:e,form:c,onChange:o,validity:i?.children,as:tOe,children:(u,d,f)=>(0,ir.jsx)("div",{className:"dataforms-layouts-row__field-control",style:s.styles[d.id],children:(0,ir.jsx)(u,{data:e,field:d,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:f})},d.id)})})]})}let a=yp("regular")?.component;return a?(0,ir.jsx)(ir.Fragment,{children:(0,ir.jsx)("div",{className:"dataforms-layouts-row__field-control",children:(0,ir.jsx)(a,{data:e,field:t,onChange:o,markWhenOptional:n,validity:i})})}):null}var Nn=l(P(),1),Cde=l(N(),1);var Oc=l(w(),1);function Bde({data:e,field:t,onChange:o,validity:r}){let{fields:n}=(0,Nn.useContext)(us),i=(0,Nn.useRef)(null),s=(0,Nn.useRef)(null),[a,c]=(0,Nn.useState)(!1),[u,d]=(0,Nn.useState)(!1),f=(0,Nn.useMemo)(()=>({layout:Rr,fields:t.children??[]}),[t]);(0,Nn.useEffect)(()=>{let b=i.current;if(!b)return;let v=()=>{let k=b.open;k||c(!0),d(k)};return b.addEventListener("toggle",v),()=>{b.removeEventListener("toggle",v)}},[]),tf(s,u&&a);let m=(0,Nn.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,Oc.jsx)(p.render,{item:e,field:p}):g=t.label||(0,Cde.__)("More details"),(0,Oc.jsxs)("details",{ref:i,className:"dataforms-layouts-details__details",children:[(0,Oc.jsx)("summary",{className:"dataforms-layouts-details__summary",children:(0,Oc.jsxs)(Me,{direction:"row",align:"center",gap:"md",className:"dataforms-layouts-details__summary-content",children:[g,a&&(0,Oc.jsx)(kR,{validity:r})]})}),(0,Oc.jsx)("div",{ref:s,className:"dataforms-layouts-details__content",onBlur:m,children:(0,Oc.jsx)(An,{data:e,form:f,onChange:o,validity:r?.children})})]})}var Sp=l(w(),1),oOe=[{type:"regular",component:ede,wrapper:({children:e})=>(0,Sp.jsx)(Me,{direction:"column",className:"dataforms-layouts__wrapper",gap:"lg",children:e})},{type:"panel",component:vde,wrapper:({children:e})=>(0,Sp.jsx)(Me,{direction:"column",className:"dataforms-layouts__wrapper",gap:"md",children:e})},{type:"card",component:ez,wrapper:({children:e})=>(0,Sp.jsx)(Me,{direction:"column",className:"dataforms-layouts__wrapper",gap:"xl",children:e})},{type:"row",component:wde,wrapper:({children:e,layout:t})=>(0,Sp.jsx)(Me,{direction:"column",className:"dataforms-layouts__wrapper",gap:"lg",children:(0,Sp.jsx)("div",{className:"dataforms-layouts-row__field",children:(0,Sp.jsx)(Me,{direction:"row",gap:"lg",align:t.alignment,children:e})})})},{type:"details",component:Bde}];function yp(e){return oOe.find(t=>t.type===e)}var vR=l(w(),1),rOe=({children:e})=>(0,vR.jsx)(Me,{direction:"column",className:"dataforms-layouts__wrapper",gap:"lg",children:e});function An({data:e,form:t,onChange:o,validity:r,children:n,as:i}){let{fields:s}=(0,yR.useContext)(us),a=(0,yR.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??yp(t.layout.type)?.wrapper??rOe;return(0,vR.jsx)(u,{layout:t.layout,children:t.fields.map(d=>{let f=yp(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,vR.jsx)(f,{data:e,field:d,onChange:o,markWhenOptional:a,validity:r?.[d.id]},d.id)})})}var oz=l(w(),1);function M_({data:e,form:t,fields:o,onChange:r,validity:n}){let i=(0,tz.useMemo)(()=>fR(t),[t]),s=(0,tz.useMemo)(()=>A_(o),[o]);return t.fields?(0,oz.jsx)(Xue,{fields:s,children:(0,oz.jsx)(An,{data:e,form:i,onChange:r,validity:n})}):null}var nf=l(P(),1),zde=l(N(),1);var Sk=l(A(),1);var rz=l(N(),1);var Ede=l(Z(),1);function yk({isControl:e}={isControl:!1}){return(0,Ede.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:e?35:259}}}var SR=l(w(),1);function Tde({fields:e,visibleFields:t,onToggleField:o}){let{popoverProps:r}=yk();return!e||e.length===0?null:(0,SR.jsx)(Sk.DropdownMenu,{icon:ks,label:(0,rz.__)("Options"),popoverProps:r,toggleProps:{size:"small"},children:({onClose:n})=>(0,SR.jsx)(Sk.MenuGroup,{label:(0,rz.__)("Show / Hide"),children:e.map(i=>{let s=t.includes(i.id);return(0,SR.jsx)(Sk.MenuItem,{isSelected:s,onClick:()=>{o(i.id),n()},role:"menuitemcheckbox",icon:s?gl:null,children:i.label},i.id)})})})}var _R=l(A(),1),Ide=l(Z(),1),Pde=l(F(),1),Ac=l(P(),1),Rde=l(ur(),1);var ia=l(w(),1),{useRichText:nOe}=M(Rde.privateApis);function Ode({data:e,field:t,hideLabelFromVision:o,onChange:r,config:n={}}){let i=(0,Pde.useRegistry)(),s=t.getValue({item:e}),a=t.config||{},{clientId:c}=n,[u,d]=(0,Ac.useState)({start:void 0,end:void 0}),[f,m]=(0,Ac.useState)(!1),h=(0,Ac.useRef)(),p=(0,Ac.useRef)(new Set),g=(0,Ac.useRef)(new Set),b=Sb({allowedFormats:a?.allowedFormats,disableFormats:a?.disableFormats});function v(){h.current?.focus()}let{value:k,getValue:y,onChange:S,ref:x,formatTypes:C}=nOe({value:s,onChange(O){r(t.setValue({item:e,value:O}))},selectionStart:u.start,selectionEnd:u.end,onSelectionChange:(O,E)=>d({start:O,end:E}),__unstableIsSelected:f,preserveWhiteSpace:!!a?.preserveWhiteSpace,placeholder:a?.placeholder,__unstableDisableFormats:a?.disableFormats,allowedFormats:b,withoutInteractiveFormatting:a?.withoutInteractiveFormatting,__unstableFormatTypeHandlerContext:(0,Ac.useMemo)(()=>({richTextIdentifier:t.id,blockClientId:c}),[t.id,c])}),{baseControlProps:B,controlProps:I}=(0,_R.useBaseControlProps)({hideLabelFromVision:o??t.hideLabelFromVision,label:t.label});return(0,ia.jsxs)(ia.Fragment,{children:[f&&(0,ia.jsx)(Bb.Provider,{value:g,children:(0,ia.jsx)(Tb.Provider,{value:p,children:(0,ia.jsx)("div",{children:(0,ia.jsx)(JI,{value:k,onChange:S,onFocus:v,formatTypes:C,forwardedRef:h,isVisible:!1})})})}),(0,ia.jsx)(_R.BaseControl,{...B,children:(0,ia.jsx)("div",{className:"block-editor-content-only-controls__rich-text",role:"textbox","aria-multiline":!a?.disableLineBreaks,ref:(0,Ide.useMergeRefs)([x,ZI({registry:i,getValue:y,onChange:S,formatTypes:C,selectionChange:d,isSelected:f,disableFormats:a?.disableFormats,value:k,tagName:"div",disableLineBreaks:a?.disableLineBreaks,keyboardShortcuts:g,inputEvents:p}),h]),onFocus:()=>m(!0),onBlur:()=>m(!1),contentEditable:!0,...I})})]})}var _p=l(A(),1),Ade=l(F(),1),_k=l(N(),1);var wo=l(w(),1);function iOe({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,wo.jsx)("div",{className:"block-editor-content-only-controls__media-thumbnail",children:(0,wo.jsx)("img",{alt:"",width:24,height:24,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,wo.jsx)("div",{className:"block-editor-content-only-controls__media-thumbnail",children:(0,wo.jsx)("img",{alt:"",width:24,height:24,src:a})});let c;if(n[0]==="image"?c=rv:n[0]==="video"?c=AN:n[0]==="audio"?c=DO:c=Up,c)return(0,wo.jsx)(_p.Icon,{icon:c,size:24})}return(0,wo.jsx)(_p.Icon,{icon:Up,size:24})}function Lde({data:e,field:t,onChange:o,config:r={}}){let{popoverProps:n}=yk({isControl:!0}),i=t.getValue({item:e}),{allowedTypes:s=[],multiple:a=!1,useFeaturedImage:c=!1}=r,u=i?.id,d=i?.url,f=(0,Ade.useSelect)(h=>{if(!u)return;let g=h(_).getSettings()[v0];if(g)return g(h,u)},[u]),m;if(s.length===1){let h=s[0];h==="image"?m=(0,_k.__)("Choose an image\u2026"):h==="video"?m=(0,_k.__)("Choose a video\u2026"):h==="application"?m=(0,_k.__)("Choose a file\u2026"):m=(0,_k.__)("Choose a media item\u2026")}else m=(0,_k.__)("Choose a media item\u2026");return(0,wo.jsx)(Ms,{children:(0,wo.jsx)(kb,{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:h=>{if(h.id&&h.url){let p={...h,mediaType:h.media_type};c&&(p.featuredImage=!1),o(t.setValue({item:e,value:p}))}},renderToggle:h=>(0,wo.jsx)(_p.Button,{__next40pxDefaultSize:!0,className:"block-editor-content-only-controls__media",...h,children:(0,wo.jsxs)(_p.__experimentalGrid,{rowGap:0,columnGap:8,templateColumns:"24px 1fr",className:"block-editor-content-only-controls__media-row",children:[d&&(0,wo.jsxs)(wo.Fragment,{children:[(0,wo.jsx)(iOe,{attachment:f,field:t,data:e,config:r}),(0,wo.jsx)("span",{className:"block-editor-content-only-controls__media-title",children:f?.title?.raw&&f?.title?.raw!==""?f?.title?.raw:d})]}),!d&&(0,wo.jsxs)(wo.Fragment,{children:[(0,wo.jsx)("span",{className:"block-editor-content-only-controls__media-placeholder",style:{width:"24px",height:"24px"}}),(0,wo.jsx)("span",{className:"block-editor-content-only-controls__media-title",children:m})]})]})})})})}var Lc=l(A(),1),wR=l(P(),1),Nde=l(N(),1);var Mde=l(un(),1);var vr=l(w(),1),nz="noreferrer noopener",Dde="_blank",xR="nofollow";function sOe({rel:e="",url:t="",opensInNewTab:o,nofollow:r}){let n,i=e;if(o)n=Dde,i=i?.includes(nz)?i:i+` ${nz}`;else{let s=new RegExp(`\\b${nz}\\s*`,"g");i=i?.replace(s,"").trim()}if(r)i=i?.includes(xR)?i:(i+` ${xR}`).trim();else{let s=new RegExp(`\\b${xR}\\s*`,"g");i=i?.replace(s,"").trim()}return{url:(0,Mde.prependHTTP)(t),linkTarget:n,rel:i||void 0}}function Vde({data:e,field:t,onChange:o}){let[r,n]=(0,wR.useState)(!1),{popoverProps:i}=yk({isControl:!0}),s=t.getValue({item:e}),a=s?.url,c=s?.rel||"",d=s?.linkTarget===Dde,f=c===xR,m=(0,wR.useMemo)(()=>({url:a,opensInNewTab:d,nofollow:f}),[a,d,f]);return(0,vr.jsxs)(vr.Fragment,{children:[(0,vr.jsx)(Lc.Button,{__next40pxDefaultSize:!0,className:"block-editor-content-only-controls__link",onClick:()=>{n(!0)},children:(0,vr.jsxs)(Lc.__experimentalGrid,{rowGap:0,columnGap:8,templateColumns:"24px 1fr",className:"block-editor-content-only-controls__link-row",children:[a&&(0,vr.jsxs)(vr.Fragment,{children:[(0,vr.jsx)(Lc.Icon,{icon:dn,size:24}),(0,vr.jsx)("span",{className:"block-editor-content-only-controls__link-title",children:a})]}),!a&&(0,vr.jsxs)(vr.Fragment,{children:[(0,vr.jsx)(Lc.Icon,{icon:dn,size:24,style:{opacity:.3}}),(0,vr.jsx)("span",{className:"block-editor-content-only-controls__link-title",children:(0,Nde.__)("Link")})]})]})}),r&&(0,vr.jsx)(Lc.Popover,{onClose:()=>{n(!1)},...i??{},children:(0,vr.jsx)(Id,{value:m,onChange:h=>{let p=sOe({rel:c,...h});o(t.setValue({item:e,value:p}))},onRemove:()=>{o(t.setValue({item:e,value:{}}))}})})]})}var yr=l(w(),1),{fieldsKey:jde,formKey:iz}=M(xk.privateApis);function sz(e,t={}){return function(r){return(0,yr.jsx)(e,{...r,config:t})}}function aOe({clientId:e,blockType:t,setAttributes:o,isCollapsed:r=!1}){let n=Fr({clientId:e,context:"list-view"}),i=Tt(e),s=t?.[jde],a=(0,nf.useContext)(cn),c=(0,Fde.useSelect)(p=>{let g=p(_).getBlockAttributes(e);if(!g?.metadata?.bindings)return g;let{getBlockBindingsSource:b}=M(p(xk.store));return Object.entries(g.metadata.bindings).reduce((v,[k,y])=>{let S=b(y.source);if(!S)return v;let x=S.getValues({select:p,context:a,bindings:{[k]:y}});return{...v,...x}},g)},[a,e]),u=(0,nf.useMemo)(()=>r?{...t?.[iz],fields:[t?.[iz]?.fields?.[0]]}:t?.[iz],[t,r]),[d,f]=(0,nf.useState)(u),m=(0,nf.useMemo)(()=>s?.length?s.map(p=>{let g={...p};return typeof p.Edit=="string"&&p.Edit==="rich-text"?g.Edit=sz(Ode,{clientId:e}):typeof p.Edit=="string"&&p.Edit==="link"?g.Edit=sz(Vde):typeof p.Edit=="object"&&p.Edit.control==="media"&&(g.Edit=sz(Lde,{...p.Edit})),g}):[],[s,e]);if(!s?.length)return null;let h=p=>{f(g=>g.fields?.includes(p)?{...g,fields:g.fields.filter(b=>b!==p)}:{...g,fields:[...g.fields||[],p]})};return(0,yr.jsxs)("div",{className:"block-editor-block-fields__container",children:[(0,yr.jsx)("div",{className:"block-editor-block-fields__header",children:(0,yr.jsxs)(CR.__experimentalHStack,{spacing:1,children:[r&&(0,yr.jsxs)(yr.Fragment,{children:[(0,yr.jsx)(Oe,{className:"block-editor-block-fields__header-icon",icon:i?.icon}),(0,yr.jsx)("h2",{className:"block-editor-block-fields__header-title",children:(0,yr.jsx)(CR.__experimentalTruncate,{numberOfLines:1,children:n})}),(0,yr.jsx)(Tde,{fields:m,visibleFields:d.fields,onToggleField:h})]}),!r&&(0,yr.jsx)("h2",{className:"block-editor-block-fields__header-title",children:(0,zde.__)("Content")})]})}),(0,yr.jsx)(M_,{data:c,fields:m,form:d,onChange:o})]})}function lOe(e){return!!(window?.__experimentalContentOnlyInspectorFields&&(0,xk.getBlockType)(e)?.[jde])}function cOe(e){let{blockType:t,isSelectionWithinCurrentSection:o}=(0,nf.useContext)(cr);return(0,yr.jsx)(ym,{group:"content",children:(0,yr.jsx)(aOe,{...e,blockType:t,isCollapsed:o})})}var Ude={edit:cOe,hasSupport:lOe,attributeKeys:[],supportsPatternEditing:!0};var cz=l(rt(),1),Hde=l(A(),1),az=l(N(),1),D_=l($(),1);var lz=l(w(),1);function uOe(e){return(0,D_.hasBlockSupport)(e,"customClassName",!0)&&(e.attributes={...e.attributes,className:{type:"string"}}),e}function dOe({className:e,setAttributes:t}){return Mo()!=="default"?null:(0,lz.jsx)(fe,{group:"advanced",children:(0,lz.jsx)(Hde.TextControl,{__next40pxDefaultSize:!0,autoComplete:"off",label:(0,az.__)("Additional CSS class(es)"),value:e||"",onChange:r=>{t({className:r!==""?r:void 0})},help:(0,az.__)("Separate multiple classes with spaces.")})})}var uz={edit:dOe,addSaveProps:fOe,attributeKeys:["className"],hasSupport(e){return(0,D_.hasBlockSupport)(e,"customClassName",!0)}};function fOe(e,t,o){return(0,D_.hasBlockSupport)(t,"customClassName",!0)&&o.className&&(e.className=V(e.className,o.className)),e}function mOe(e,t,o,r){if(!(0,D_.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,cz.addFilter)("blocks.registerBlockType","core/editor/custom-class-name/attribute",uOe);(0,cz.addFilter)("blocks.switchToBlockType.transformedBlock","core/customClassName/addTransforms",mOe);var Gde=l(rt(),1),V_=l($(),1);function pOe(e,t){return(0,V_.hasBlockSupport)(t,"className",!0)&&(typeof e.className=="string"?e.className=[...new Set([(0,V_.getBlockDefaultClassName)(t.name),...e.className.split(" ")])].join(" ").trim():e.className=(0,V_.getBlockDefaultClassName)(t.name)),e}(0,Gde.addFilter)("blocks.getSaveContent.extraProps","core/generated-class-name/save-props",pOe);var _fe=l(P(),1),xfe=l(rt(),1),Dc=l($(),1),wfe=l(Z(),1),Ek=l(zv(),1);var kz=l($(),1),RR=l(P(),1),cfe=l(F(),1);var hOe=l($(),1);var gOe=l(w(),1),Wde="typography.lineHeight";var $de=l(rt(),1),BR=l($(),1),Kde=l(KE(),1),Yde=l(A(),1);var F_="typography.__experimentalFontFamily",{kebabCase:bOe}=M(Yde.privateApis);function kOe(e){return(0,BR.hasBlockSupport)(e,F_)&&(e.attributes.fontFamily||Object.assign(e.attributes,{fontFamily:{type:"string"}})),e}function qde(e,t,o){if(!(0,BR.hasBlockSupport)(t,F_)||He(t,ds,"fontFamily")||!o?.fontFamily)return e;let r=new Kde.default(e.className);r.add(`has-${bOe(o?.fontFamily)}-font-family`);let n=r.value;return e.className=n||void 0,e}function vOe({name:e,fontFamily:t}){return qde({},e,{fontFamily:t})}var dz={useBlockProps:vOe,addSaveProps:qde,attributeKeys:["fontFamily"],hasSupport(e){return(0,BR.hasBlockSupport)(e,F_)}};(0,$de.addFilter)("blocks.registerBlockType","core/fontFamily/addAttribute",kOe);var fz=l(rt(),1),wk=l($(),1),Zde=l(KE(),1);var yOe=l(w(),1),xp="typography.fontSize";function SOe(e){return(0,wk.hasBlockSupport)(e,xp)&&(e.attributes.fontSize||Object.assign(e.attributes,{fontSize:{type:"string"}})),e}function Xde(e,t,o){if(!(0,wk.hasBlockSupport)(t,xp)||He(t,ds,"fontSize"))return e;let r=new Zde.default(e.className);r.add(hu(o.fontSize));let n=r.value;return e.className=n||void 0,e}function _Oe({name:e,fontSize:t,style:o}){let[r,n,i]=me("typography.fontSizes","typography.fluid","layout");if(!(0,wk.hasBlockSupport)(e,xp)||He(e,ds,"fontSize")||!t&&!o?.typography?.fontSize)return;let s;if(o?.typography?.fontSize&&(s={style:{fontSize:ec({size:o.typography.fontSize},{typography:{fluid:n},layout:i})}}),t&&(s={style:{fontSize:rh(r,t,o?.typography?.fontSize).size}}),!!s)return Xde(s,e,{fontSize:t})}var mz={useBlockProps:_Oe,addSaveProps:Xde,attributeKeys:["fontSize","style"],hasSupport(e){return(0,wk.hasBlockSupport)(e,xp)}},xOe={fontSize:[["fontSize"],["style","typography","fontSize"]]};function wOe(e,t,o,r){let n=e.name,i={fontSize:(0,wk.hasBlockSupport)(n,xp)};return a2(i,xOe,e,t,o,r)}(0,fz.addFilter)("blocks.registerBlockType","core/font/addAttribute",SOe);(0,fz.addFilter)("blocks.switchToBlockType.transformedBlock","core/font-size/addTransforms",wOe);var ER=l(N(),1),Ck=l($(),1);var pz=l(w(),1),Bk="typography.textAlign",COe=[{icon:Jc,title:(0,ER.__)("Align text left"),align:"left"},{icon:yf,title:(0,ER.__)("Align text center"),align:"center"},{icon:eu,title:(0,ER.__)("Align text right"),align:"right"}],Qde=["left","center","right"],BOe=[];function hz(e){return Array.isArray(e)?Qde.filter(t=>e.includes(t)):e===!0?Qde:BOe}function EOe({style:e,name:t,setAttributes:o}){let n=is(t)?.typography?.textAlign,i=Mo();if(!n||i!=="default")return null;let s=hz((0,Ck.getBlockSupport)(t,Bk));if(!s.length)return null;let a=COe.filter(u=>s.includes(u.align)),c=u=>{let d={...e,typography:{...e?.typography,textAlign:u}};o({style:Ne(d)})};return(0,pz.jsx)(Mt,{group:"block",children:(0,pz.jsx)(jw,{value:e?.typography?.textAlign,onChange:c,alignmentControls:a})})}var TR={edit:EOe,useBlockProps:TOe,addSaveProps:IOe,attributeKeys:["style"],hasSupport(e){return(0,Ck.hasBlockSupport)(e,Bk,!1)}};function TOe({name:e,style:t}){if(!t?.typography?.textAlign||!hz((0,Ck.getBlockSupport)(e,Bk)).length||He(e,ds,"textAlign"))return null;let r=t.typography.textAlign;return{className:V({[`has-text-align-${r}`]:r})}}function IOe(e,t,o){if(!o?.style?.typography?.textAlign)return e;let{textAlign:r}=o.style.typography,n=(0,Ck.getBlockSupport)(t,Bk);return hz(n).includes(r)&&!He(t,ds,"textAlign")&&(e.className=V(`has-text-align-${r}`,e.className)),e}var bz=l(rt(),1),sf=l($(),1),wp=l(P(),1),sfe=l(F(),1),z_=l(N(),1),IR=l(A(),1),afe=l(Z(),1);function POe(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,v=o||e.scrollHeight<=d.clientHeight||e.scrollHeight<=m;d.clientHeight>m&&(m=d.clientHeight),b&&v?(i=h,r=h+1):n=h-1}return u.detach(),i}function Jde(e,t){if(!e)return;t(0);let o=POe(e,t);return t(o),o}var efe=l(P(),1),tfe=l(N(),1),ofe=l(A(),1),rfe=l(Zo(),1),gz=l(w(),1);function nfe(){let e=(0,tfe.__)("The text may be too small to read. Consider using a larger container or less text.");return(0,efe.useEffect)(()=>{(0,rfe.speak)(e)},[e]),(0,gz.jsx)("div",{className:"block-editor-fit-text-size-warning",children:(0,gz.jsx)(ofe.Notice,{spokenMessage:null,status:"warning",isDismissible:!1,children:e})})}var Mn=l(w(),1),ROe={},OOe=12,Nc="typography.fitText";function AOe(e){return!(0,sf.hasBlockSupport)(e,Nc)||e.attributes?.fitText?e:{...e,attributes:{...e.attributes,fitText:{type:"boolean"}}}}function LOe({fitText:e,name:t,clientId:o}){let[r,n]=(0,wp.useState)(null),i=(0,sf.hasBlockSupport)(t,Nc),s=mt(o),{blockAttributes:a,parentId:c,blockMode:u}=(0,sfe.useSelect)(f=>{if(!o||!i||!e)return ROe;let m=f(_).getBlockMode(o);return m==="html"?{blockMode:m}:{blockAttributes:f(_).getBlockAttributes(o),parentId:f(_).getBlockRootClientId(o),blockMode:m}},[o,i,e]),d=(0,wp.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=Jde(s,b=>{b===0?m.textContent="":m.textContent=`${h} { font-size: ${b}px !important; }`});n(g)},[s,o,i,e]);return(0,wp.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 v=`fit-text-${o}`,k=f.ownerDocument.getElementById(v);k&&k.remove()}},[e,o,c,d,s,i,u]),(0,wp.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 ife({clientId:e,fitText:t=!1,setAttributes:o,name:r,fontSize:n,style:i,warning:s}){return(0,sf.hasBlockSupport)(r,Nc)?(0,Mn.jsx)(fe,{group:"typography",children:(0,Mn.jsxs)(IR.__experimentalToolsPanelItem,{hasValue:()=>t,label:(0,z_.__)("Fit text"),onDeselect:()=>o({fitText:void 0}),resetAllFilter:()=>({fitText:void 0}),panelId:e,children:[(0,Mn.jsx)(IR.ToggleControl,{label:(0,z_.__)("Fit text"),checked:t,onChange:()=>{let a=!t||void 0,c={fitText:a};a&&(n&&(c.fontSize=void 0),i?.typography?.fontSize&&(c.style={...i,typography:{...i?.typography,fontSize:void 0}})),o(c)},help:t?(0,z_.__)("Text will resize to fit its container."):(0,z_.__)("The text will resize to fit its container, resetting other font size settings.")}),s]})}):null}function NOe(e,t,o){if(!(0,sf.hasBlockSupport)(t,Nc))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 MOe({name:e,fitText:t}){return t&&(0,sf.hasBlockSupport)(e,Nc)?{className:"has-fit-text"}:{}}(0,bz.addFilter)("blocks.registerBlockType","core/fit-text/addAttribute",AOe);var DOe=e=>(0,sf.hasBlockSupport)(e,Nc);function VOe({fitText:e,name:t,clientId:o,children:r}){let{fontSize:n}=LOe({fitText:e,name:t,clientId:o});return r(n)}var FOe=(0,afe.createHigherOrderComponent)(e=>function(o){let{name:r,attributes:n,clientId:i,isSelected:s,setAttributes:a}=o,{fitText:c}=n;return(0,sf.hasBlockSupport)(r,Nc)?(0,Mn.jsxs)(Mn.Fragment,{children:[(0,Mn.jsx)(e,{...o}),c&&(0,Mn.jsx)(VOe,{fitText:c,name:r,clientId:i,children:d=>s&&(0,Mn.jsx)(ife,{clientId:i,fitText:c,setAttributes:a,name:r,fontSize:n.fontSize,style:n.style,warning:d<OOe&&(0,Mn.jsx)(nfe,{})})}),!c&&s&&(0,Mn.jsx)(ife,{clientId:i,fitText:c,setAttributes:a,name:r,fontSize:n.fontSize,style:n.style})]}):(0,Mn.jsx)(e,{...o})},"addFitTextControl");(0,bz.addFilter)("editor.BlockEdit","core/fit-text/add-fit-text-control",FOe);var PR={useBlockProps:MOe,addSaveProps:NOe,attributeKeys:["fitText","fontSize","style"],hasSupport:DOe,edit:()=>null};var vz=l(w(),1);function lfe(e,t){return Object.fromEntries(Object.entries(e).filter(([o])=>!t.includes(o)))}var zOe="typography.__experimentalLetterSpacing",jOe="typography.__experimentalTextTransform",UOe="typography.__experimentalTextDecoration",HOe="typography.textIndent",GOe="typography.textColumns",WOe="typography.__experimentalFontStyle",$Oe="typography.__experimentalFontWeight",KOe="typography.__experimentalWritingMode",ds="typography",ufe=[Wde,xp,WOe,$Oe,F_,Bk,GOe,UOe,HOe,KOe,jOe,zOe,Nc];function dfe(e){let t={...lfe(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={...lfe(t.typography,["fontFamily"]),fontSize:n?void 0:o},{style:Ne(t),fontFamily:i,fontSize:n}}function ffe(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 YOe({children:e,resetAllFilter:t}){let o=(0,RR.useCallback)(r=>{let n=ffe(r),i=t(n);return{...r,...dfe(i)}},[t]);return(0,vz.jsx)(fe,{group:"typography",resetAllFilter:o,children:e})}function mfe({clientId:e,name:t,setAttributes:o,settings:r}){let n=BP(r),{style:i,fontFamily:s,fontSize:a,fitText:c}=(0,cfe.useSelect)(m=>{if(!n)return{};let{style:h,fontFamily:p,fontSize:g,fitText:b}=m(_).getBlockAttributes(e)||{};return{style:h,fontFamily:p,fontSize:g,fitText:b}},[e,n]),u=(0,RR.useMemo)(()=>ffe({style:i,fontFamily:s,fontSize:a}),[i,a,s]),d=m=>{let h=dfe(m);(h.fontSize||h.style?.typography?.fontSize)&&c&&(h.fitText=void 0),o(h)};if(!n)return null;let f=(0,kz.getBlockSupport)(t,[ds,"__experimentalDefaultControls"]);return(0,vz.jsx)(EP,{as:YOe,panelId:e,settings:r,value:u,onChange:d,defaultControls:f})}var lf=l(P(),1),AR=l(F(),1),OR=l($(),1),kfe=l(Re(),1);var cl=l(P(),1),pfe=l(Xy(),1);var j_=l(w(),1);function hfe({clientId:e,value:t,computeStyle:o,forceShow:r}){let n=mt(e),[i,s]=(0,cl.useReducer)(()=>o(n));(0,cl.useEffect)(()=>{n&&r&&s()},[n,r]),(0,cl.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,cl.useRef)(t),[c,u]=(0,cl.useState)(!1);return(0,cl.useEffect)(()=>{if((0,pfe.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,j_.jsx)(Hi,{clientId:e,__unstablePopoverSlot:"block-toolbar",children:(0,j_.jsx)("div",{className:"block-editor__spacing-visualizer",style:i})})}function af(e,t){return e.ownerDocument.defaultView.getComputedStyle(e).getPropertyValue(t)}function gfe({clientId:e,value:t,forceShow:o}){return(0,j_.jsx)(hfe,{clientId:e,value:t?.spacing?.margin,computeStyle:r=>{let n=af(r,"margin-top"),i=af(r,"margin-right"),s=af(r,"margin-bottom"),a=af(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 bfe({clientId:e,value:t,forceShow:o}){return(0,j_.jsx)(hfe,{clientId:e,value:t?.spacing?.padding,computeStyle:r=>({borderTopWidth:af(r,"padding-top"),borderRightWidth:af(r,"padding-right"),borderBottomWidth:af(r,"padding-bottom"),borderLeftWidth:af(r,"padding-left")}),forceShow:o})}var Mc=l(w(),1),ul="dimensions",U_="spacing";function qOe(){let[e,t]=(0,lf.useState)(!1),{hideBlockInterface:o,showBlockInterface:r}=M((0,AR.useDispatch)(_));return(0,lf.useEffect)(()=>{e?o():r()},[e,r,o]),[e,t]}function ZOe({children:e,resetAllFilter:t}){let o=(0,lf.useCallback)(r=>{let n=r.style,i=t(n);return{...r,style:i}},[t]);return(0,Mc.jsx)(fe,{group:"dimensions",resetAllFilter:o,children:e})}function vfe({clientId:e,name:t,setAttributes:o,settings:r}){let n=RP(r),i=(0,AR.useSelect)(m=>{if(n)return m(_).getBlockAttributes(e)?.style},[e,n]),[s,a]=qOe(),c=m=>{o({style:Ne(m)})};if(!n)return null;let u=(0,OR.getBlockSupport)(t,[ul,"__experimentalDefaultControls"]),d=(0,OR.getBlockSupport)(t,[U_,"__experimentalDefaultControls"]),f={...u,...d};return(0,Mc.jsxs)(Mc.Fragment,{children:[(0,Mc.jsx)(OP,{as:ZOe,panelId:e,settings:r,value:i,onChange:c,defaultControls:f,onVisualize:a}),!!r?.spacing?.padding&&s==="padding"&&(0,Mc.jsx)(bfe,{forceShow:s==="padding",clientId:e,value:i}),!!r?.spacing?.margin&&s==="margin"&&(0,Mc.jsx)(gfe,{forceShow:s==="margin",clientId:e,value:i})]})}function yfe(e,t="any"){if(lf.Platform.OS!=="web")return!1;let o=(0,OR.getBlockSupport)(e,ul);return o===!0?!0:t==="any"?!!(o?.aspectRatio||o?.height||o?.minHeight||o?.width):!!o?.[t]}var Sfe={useBlockProps:XOe,attributeKeys:["height","minHeight","width","style"],hasSupport(e){return yfe(e)}};function XOe({name:e,height:t,minHeight:o,style:r}){if(!yfe(e,"aspectRatio")||He(e,ul,"aspectRatio"))return{};let n=V({"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 yz(){(0,kfe.default)("wp.blockEditor.__experimentalUseCustomSides",{since:"6.3",version:"6.4"})}var dl=l(w(),1),QOe=[...ufe,lp,nr,ul,cp,U_,y_],_z=e=>QOe.some(t=>(0,Dc.hasBlockSupport)(e,t));function pi(e={}){let t={};return(0,Ek.getCSSRules)(e).forEach(o=>{t[o.key]=o.value}),t}function JOe(e){return!_z(e)&&!(0,Dc.hasBlockSupport)(e,"customCSS",!0)||e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e}var Cfe={[`${lp}.__experimentalSkipSerialization`]:["border"],[`${nr}.__experimentalSkipSerialization`]:[nr],[`${ds}.__experimentalSkipSerialization`]:[ds],[`${ul}.__experimentalSkipSerialization`]:[ul],[`${U_}.__experimentalSkipSerialization`]:[U_],[`${y_}.__experimentalSkipSerialization`]:[y_]},eAe={...Cfe,[`${ul}.aspectRatio`]:[`${ul}.aspectRatio`],[`${cp}`]:[cp]},tAe={[`${ul}.aspectRatio`]:!0,[`${cp}`]:!0},oAe={gradients:"gradient"};function Sz(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;Sz(r[i],[s],!0)}else n.length===1&&delete r[n[0]]}),r}function Bfe(e,t,o,r=eAe){if(!_z(t))return e;let{style:n}=o;return Object.entries(r).forEach(([i,s])=>{let a=tAe[i]||(0,Dc.getBlockSupport)(t,i);a===!0&&(n=Sz(n,s)),Array.isArray(a)&&a.forEach(c=>{let u=oAe[c]||c;n=Sz(n,[[...s,u]])})}),e.style={...pi(n),...e.style},e}function rAe({clientId:e,name:t,setAttributes:o,__unstableParentLayout:r}){let n=is(t,r),i=Mo(),s={clientId:e,name:t,setAttributes:o,settings:{...n,typography:{...n.typography,textAlign:!1}}};return i!=="default"?null:(0,dl.jsxs)(dl.Fragment,{children:[(0,dl.jsx)(s2,{...s}),(0,dl.jsx)(uae,{...s}),(0,dl.jsx)(mfe,{...s}),(0,dl.jsx)(iae,{...s}),(0,dl.jsx)(vfe,{...s})]})}var LR={edit:rAe,hasSupport:_z,addSaveProps:Bfe,attributeKeys:["style"],useBlockProps:sAe},nAe=[{elementType:"button"},{elementType:"link",pseudo:[":hover"]},{elementType:"heading",elements:["h1","h2","h3","h4","h5","h6"]}],iAe={};function sAe({name:e,style:t}){let o=(0,wfe.useInstanceId)(iAe,"wp-elements"),r=`.${o}`,n=t?.elements,i=(0,_fe.useMemo)(()=>{if(!n)return;let s=[];return nAe.forEach(({elementType:a,pseudo:c,elements:u})=>{if(He(e,nr,a))return;let f=n?.[a];if(f){let m=gg(r,Dc.__EXPERIMENTAL_ELEMENTS[a]);s.push((0,Ek.compileCSS)(f,{selector:m})),c&&c.forEach(h=>{f[h]&&s.push((0,Ek.compileCSS)(f[h],{selector:gg(r,`${Dc.__EXPERIMENTAL_ELEMENTS[a]}${h}`)}))})}u&&u.forEach(m=>{n[m]&&s.push((0,Ek.compileCSS)(n[m],{selector:gg(r,Dc.__EXPERIMENTAL_ELEMENTS[m])}))})}),s.length>0?s.join(""):void 0},[r,n,e]);return Zn({css:i}),Bfe({className:o},e,{style:t},Cfe)}(0,xfe.addFilter)("blocks.registerBlockType","core/style/addAttribute",JOe);var Efe=l(rt(),1),Tfe=l($(),1),aAe=e=>(0,Tfe.hasBlockSupport)(e,"__experimentalSettings",!1);function lAe(e){return aAe(e)&&(e?.attributes?.settings||(e.attributes={...e.attributes,settings:{type:"object"}})),e}(0,Efe.addFilter)("blocks.registerBlockType","core/settings/addAttribute",lAe);var cf=l($(),1),Rfe=l(Z(),1),Ofe=l(rt(),1),H_=l(P(),1);function cAe(e=[]){let t={r:[],g:[],b:[],a:[]};return e.forEach(o=>{let r=Bt(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 Ife(e){return`${e}{filter:none}`}function Pfe(e,t){return`${e}{filter:url(#${t})}`}function NR(e,t){let o=cAe(t);return`
<svg
	xmlns:xlink="http://www.w3.org/1999/xlink"
	viewBox="0 0 0 0"
	width="0"
	height="0"
	focusable="false"
	role="none"
	aria-hidden="true"
	style="visibility: hidden; position: absolute; left: -9999px; overflow: hidden;"
>
	<defs>
		<filter id="${e}">
			<!--
				Use sRGB instead of linearRGB so transparency looks correct.
				Use perceptual brightness to convert to grayscale.
			-->
			<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>
			<!-- Use sRGB instead of linearRGB to be consistent with how CSS gradients work. -->
			<feComponentTransfer color-interpolation-filters="sRGB">
				<feFuncR type="table" tableValues="${o.r.join(" ")}"></feFuncR>
				<feFuncG type="table" tableValues="${o.g.join(" ")}"></feFuncG>
				<feFuncB type="table" tableValues="${o.b.join(" ")}"></feFuncB>
				<feFuncA type="table" tableValues="${o.a.join(" ")}"></feFuncA>
			</feComponentTransfer>
			<!-- Re-mask the image with the original transparency since the feColorMatrix above loses that information. -->
			<feComposite in2="SourceGraphic" operator="in"></feComposite>
		</filter>
	</defs>
</svg>`}var Vc=l(w(),1),xz=[],uAe=window?.navigator.userAgent&&window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome")&&!window.navigator.userAgent.includes("Chromium");Kc([Yc]);function wz({presetSetting:e,defaultSetting:t}){let[o,r,n,i]=me(t,`${e}.custom`,`${e}.theme`,`${e}.default`);return(0,H_.useMemo)(()=>[...r||xz,...n||xz,...o&&i||xz],[o,r,n,i])}function Afe(e,t){if(!e)return;let o=t?.find(({slug:r})=>e===`var:preset|duotone|${r}`);return o?o.colors:void 0}function dAe(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 fAe({style:e,setAttributes:t,name:o}){let r=e?.color?.duotone,n=is(o),i=Mo(),s=wz({presetSetting:"color.duotone",defaultSetting:"color.defaultDuotone"}),a=wz({presetSetting:"color.palette",defaultSetting:"color.defaultPalette"}),[c,u]=me("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:Afe(r,s);return(0,Vc.jsxs)(Vc.Fragment,{children:[(0,Vc.jsx)(fe,{group:"filter",children:(0,Vc.jsx)(UP,{value:{filter:{duotone:m}},onChange:h=>{let p={...e,color:{...h?.filter}};t({style:Ne(p)})},settings:n})}),(0,Vc.jsx)(Mt,{group:"block",__experimentalShareWithChildBlocks:!0,children:(0,Vc.jsx)(qT,{duotonePalette:s,colorPalette:a,disableCustomDuotone:f,disableCustomColors:d,value:m,onChange:h=>{let p=dAe(h,s),g={...e,color:{...e?.color,duotone:p??h}};t({style:Ne(g)})},settings:n})})]})}var Cz={shareWithChildBlocks:!0,edit:fAe,useBlockProps:gAe,attributeKeys:["style"],hasSupport(e){return(0,cf.hasBlockSupport)(e,"filter.duotone")}};function mAe(e){return(0,cf.hasBlockSupport)(e,"filter.duotone")&&(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}})),e}function pAe({clientId:e,id:t,selector:o,attribute:r}){let n=wz({presetSetting:"color.duotone",defaultSetting:"color.defaultDuotone"}),i=Array.isArray(r),s=i?void 0:Afe(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";tc(h?{css:u!=="unset"?Pfe(m,t):Ife(m),__unstableType:"presets"}:void 0),tc(h?{assets:u!=="unset"?NR(t,u):"",__unstableType:"svgs"}:void 0);let p=mt(e);(0,H_.useEffect)(()=>{if(h&&p&&uAe){let g=p.style.display;p.style.setProperty("display","inline-block"),p.offsetHeight,p.style.setProperty("display",g)}},[h,p,u])}var hAe={};function gAe({clientId:e,name:t,style:o}){let r=(0,Rfe.useInstanceId)(hAe),n=(0,H_.useMemo)(()=>{let c=(0,cf.getBlockType)(t);if(c){if(!(0,cf.getBlockSupport)(c,"filter.duotone",!1))return null;let d=(0,cf.getBlockSupport)(c,"color.__experimentalDuotone",!1);if(d){let f=ei(c);return typeof d=="string"?gg(f,d):f}return ei(c,"filter.duotone",{fallback:!0})}},[t]),i=o?.color?.duotone,s=`wp-duotone-${r}`,a=n&&i;return pAe({clientId:e,id:s,selector:n,attribute:i}),{className:a?s:""}}(0,Ofe.addFilter)("blocks.registerBlockType","core/editor/duotone/add-attributes",mAe);var Lfe=l(P(),1),Nfe=l(F(),1),Mfe=l(Z(),1),G_=l($(),1),DR=l(N(),1);var MR=l(w(),1),bAe={},kAe={};function vAe({blockName:e,setAttributes:t,style:o}){let r=(0,G_.getBlockType)(e);function n(s){let a=s?.css?.trim()?s.css:void 0;t({style:Ne({...s,css:a})})}let i=(0,DR.sprintf)((0,DR.__)("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;."),r?.title);return(0,MR.jsx)(fe,{group:"advanced",children:(0,MR.jsx)(WP,{value:o,onChange:n,inheritedValue:o,help:i})})}function yAe({clientId:e,name:t,setAttributes:o}){let{style:r,canEditCSS:n}=(0,Nfe.useSelect)(i=>{let{getBlockAttributes:s,getSettings:a}=i(_);return{style:s(e)?.style||kAe,canEditCSS:a().canEditCSS}},[e]);return n?(0,MR.jsx)(vAe,{blockName:t,setAttributes:o,style:r}):null}function SAe({style:e}){let t=e?.css,o=typeof t=="string"&&t.trim().length>0&&GP(t),r=(0,Mfe.useInstanceId)(bAe,"wp-custom-css"),n=`.${r}`,i=(0,Lfe.useMemo)(()=>{if(o)return xS(t,n)},[t,n,o]);return Zn({css:i}),o?{className:`has-custom-css ${r}`}:{}}function _Ae(e,t,o){if(!(0,G_.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 VR={edit:yAe,useBlockProps:SAe,addSaveProps:_Ae,attributeKeys:["style"],hasSupport(e){return(0,G_.hasBlockSupport)(e,"customCSS",!0)}};var FR=l(Z(),1),Ez=l(rt(),1),Fc=l($(),1),zR=l(F(),1),fl=l(A(),1),Tk=l(N(),1);var Yo=l(w(),1),xAe="is-style-",Tz="layout",{kebabCase:Bz}=M(fl.privateApis);function Iz(e){return(0,Fc.hasBlockSupport)(e,"layout")||(0,Fc.hasBlockSupport)(e,"__experimentalLayout")}function jR(e={},t=""){let{layout:o}=e,{default:r}=(0,Fc.getBlockSupport)(t,Tz)||{},n=o?.inherit||o?.contentSize||o?.wideSize?{...o,type:"constrained"}:o||r||{},i=[];if(jn[n?.type||"default"]?.className){let a=jn[n?.type||"default"]?.className,c=t.split("/"),d=`wp-block-${c[0]==="core"?c.pop():c.join("-")}-${a}`;i.push(a,d)}return(0,zR.useSelect)(a=>!n?.inherit&&!n?.contentSize&&n?.type!=="constrained"?!1:a(_).getSettings().__experimentalFeatures?.useRootPaddingAwareAlignments,[n?.contentSize,n?.inherit,n?.type])&&i.push("has-global-padding"),n?.orientation&&i.push(`is-${Bz(n.orientation)}`),n?.justifyContent&&i.push(`is-content-justification-${Bz(n.justifyContent)}`),n?.flexWrap&&n.flexWrap==="nowrap"&&i.push("is-nowrap"),i}function Pz(e={},t,o){let{layout:r={},style:n={}}=e,i=r?.inherit||r?.contentSize||r?.wideSize?{...r,type:"constrained"}:r||{},s=xs(i?.type||"default"),[a]=me("spacing.blockGap"),c=a!==null;return s?.getLayoutStyle?.({blockName:t,selector:o,layout:r,style:n,hasBlockGapSupport:c})}function wAe({layout:e,setAttributes:t,name:o,clientId:r}){let n=is(o),{layout:i}=n,{themeSupportsLayout:s}=(0,zR.useSelect)(T=>{let{getSettings:R}=T(_);return{themeSupportsLayout:R().supportsLayout}},[]);if(Mo()!=="default")return null;let c=(0,Fc.getBlockSupport)(o,Tz,{}),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,v=g||b,k=!!(m&&(!v||v==="default"||v==="constrained"||p.inherit)),y=e||h||{},{inherit:S=!1,contentSize:x=null}=y;if((v==="default"||v==="constrained")&&!s)return null;let C=xs(v),B=xs("constrained"),I=!y.type&&(x||S),O=!!S||!!x,E=T=>t({layout:{type:T}}),L=T=>t({layout:T});return(0,Yo.jsxs)(Yo.Fragment,{children:[(0,Yo.jsx)(fe,{children:(0,Yo.jsxs)(fl.PanelBody,{title:(0,Tk.__)("Layout"),children:[k&&(0,Yo.jsx)(Yo.Fragment,{children:(0,Yo.jsx)(fl.ToggleControl,{label:(0,Tk.__)("Inner blocks use content width"),checked:C?.name==="constrained"||O,onChange:()=>t({layout:{type:C?.name==="constrained"||O?"default":"constrained"}}),help:C?.name==="constrained"||O?(0,Tk.__)("Nested blocks use content width with options for full and wide widths."):(0,Tk.__)("Nested blocks will fill the width of this container.")})}),!S&&d&&(0,Yo.jsx)(CAe,{type:v,onChange:E}),C&&C.name!=="default"&&(0,Yo.jsx)(C.inspectorControls,{layout:y,onChange:L,layoutBlockSupport:u,name:o,clientId:r}),B&&I&&(0,Yo.jsx)(B.inspectorControls,{layout:y,onChange:L,layoutBlockSupport:u,name:o,clientId:r})]})}),!S&&C&&(0,Yo.jsx)(C.toolBarControls,{layout:y,onChange:L,layoutBlockSupport:c,name:o,clientId:r})]})}var Dfe={shareWithChildBlocks:!0,edit:wAe,attributeKeys:["layout"],hasSupport(e){return Iz(e)}};function CAe({type:e,onChange:t}){return(0,Yo.jsx)(fl.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,isBlock:!0,label:(0,Tk.__)("Layout type"),hideLabelFromVision:!0,isAdaptiveWidth:!0,value:e,onChange:t,children:nH().map(({name:o,label:r})=>(0,Yo.jsx)(fl.__experimentalToggleGroupControlOption,{value:o,label:r},o))})}function BAe(e){return"type"in(e.attributes?.layout??{})||Iz(e)&&(e.attributes={...e.attributes,layout:{type:"object"}}),e}function EAe({block:e,props:t,blockGapSupport:o,globalBlockGapValue:r,layoutClasses:n}){let{name:i,attributes:s}=t,a=(0,FR.useInstanceId)(e),{layout:c}=s,{default:u}=(0,Fc.getBlockSupport)(i,Tz)||{},d=c?.inherit||c?.contentSize||c?.wideSize?{...c,type:"constrained"}:c||u||{},f=`wp-container-${Bz(i)}-is-layout-`,m=`.${f}${a}`,h=o!==null,g=xs(d?.type||"default")?.getLayoutStyle?.({blockName:i,selector:m,layout:d,style:s?.style,hasBlockGapSupport:h,globalBlockGapValue:r}),b=V({[`${f}${a}`]:!!g},n);return Zn({css:g}),(0,Yo.jsx)(e,{...t,__unstableLayoutClassNames:b})}var TAe=(0,FR.createHigherOrderComponent)(e=>function(o){let{clientId:r,name:n,attributes:i}=o,s=Iz(n),a=jR(i,n),c=(0,zR.useSelect)(u=>{if(!s)return;let{getSettings:d,getBlockSettings:f}=M(u(_)),m=d(),{disableLayoutStyles:h}=m;if(h)return;let[p]=f(r,"spacing.blockGap"),g=m[Si],b,v=i?.className;if(v?.includes(xAe)){let{getBlockStyles:y}=u(Fc.store),S=y(n),x=NV(v,S);b=x?g?.blocks?.[n]?.variations?.[x]?.spacing?.blockGap:void 0}let k=b??g?.blocks?.[n]?.spacing?.blockGap??g?.spacing?.blockGap;return{blockGapSupport:p,globalBlockGapValue:k}},[s,r,i?.className,n]);return c?(0,Yo.jsx)(EAe,{block:e,props:o,layoutClasses:a,...c}):(0,Yo.jsx)(e,{...o,__unstableLayoutClassNames:s?a:void 0})},"withLayoutStyles");(0,Ez.addFilter)("blocks.registerBlockType","core/layout/addAttribute",BAe);(0,Ez.addFilter)("editor.BlockListBlock","core/editor/layout/with-layout-styles",TAe);var Wfe=l(Z(),1),Nz=l(F(),1),$fe=l(P(),1);var fs=l(P(),1),uf=l(F(),1),Ffe=l(Z(),1);function $_(e,t){return Array.from({length:t},(o,r)=>e+r)}var sa=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 Co(e,t){return e.ownerDocument.defaultView.getComputedStyle(e).getPropertyValue(t)}function W_(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 zc(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 IAe(e,t){let o=parseFloat(Co(e,"column-gap")),r=parseFloat(Co(e,"row-gap")),n=W_(Co(e,"grid-template-columns"),o),i=W_(Co(e,"grid-template-rows"),r),s=zc(n,t.left)+1,a=zc(i,t.top)+1,c=zc(n,t.right,"end")+1,u=zc(i,t.bottom,"end")+1;return new sa({columnStart:s,columnEnd:c,rowStart:a,rowEnd:u})}function Vfe(e){return IAe(e.parentElement,new window.DOMRect(e.offsetLeft,e.offsetTop,e.offsetWidth,e.offsetHeight))}function Rz(e){let t=Co(e,"grid-template-columns"),o=Co(e,"grid-template-rows"),r=Co(e,"border-top-width"),n=Co(e,"border-right-width"),i=Co(e,"border-bottom-width"),s=Co(e,"border-left-width"),a=Co(e,"padding-top"),c=Co(e,"padding-right"),u=Co(e,"padding-bottom"),d=Co(e,"padding-left"),f=t.split(" ").length,m=o.split(" ").length,h=f*m;return{numColumns:f,numRows:m,numItems:h,currentColor:Co(e,"color"),style:{gridTemplateColumns:t,gridTemplateRows:o,gap:Co(e,"gap"),inset:`
				calc(${a} + ${r})
				calc(${c} + ${n})
				calc(${u} + ${i})
				calc(${d} + ${s})
			`}}}var hi=l(w(),1);function K_({clientId:e,contentRef:t,parentLayout:o,childGridClientId:r}){let n=(0,uf.useSelect)(a=>a(_).getSettings().isDistractionFree,[]),i=mt(e);if(n||!i)return null;let s=o?.isManualPlacement&&window.__experimentalEnableGridInteractivity;return(0,hi.jsx)(PAe,{gridClientId:e,gridElement:i,isManualGrid:s,ref:t,childGridClientId:r})}var PAe=(0,fs.forwardRef)(({gridClientId:e,gridElement:t,isManualGrid:o,childGridClientId:r},n)=>{let[i,s]=(0,fs.useState)(()=>Rz(t)),[a,c]=(0,fs.useState)(!1),u=mt(r),d=(0,fs.useMemo)(()=>u?Vfe(u):null,[u]);return(0,fs.useEffect)(()=>{let f=()=>s(Rz(t)),m=new window.ResizeObserver(f);m.observe(t,{box:"border-box"});let h=new window.ResizeObserver(f);return h.observe(t),()=>{m.disconnect(),h.disconnect()}},[t]),(0,fs.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,hi.jsx)(Hi,{className:V("block-editor-grid-visualizer",{"is-dropping-allowed":a}),clientId:e,__unstablePopoverSlot:"__unstable-block-tools-after",children:(0,hi.jsx)("div",{ref:n,className:"block-editor-grid-visualizer__grid",style:i.style,children:o?(0,hi.jsx)(OAe,{gridClientId:e,gridInfo:i,childGridRect:d}):(0,hi.jsx)(RAe,{gridInfo:i,childGridRect:d})})})});function RAe({gridInfo:e,childGridRect:t}){return $_(1,e.numRows).map(o=>$_(1,e.numColumns).map(r=>{let n=e.currentColor;return t?.contains(r,o)&&(n="transparent"),(0,hi.jsx)(zfe,{color:n},`${o}-${r}`)}))}function OAe({gridClientId:e,gridInfo:t,childGridRect:o}){let[r,n]=(0,fs.useState)(null),i=(0,uf.useSelect)(a=>{let{getBlockOrder:c,getBlockStyles:u}=M(a(_)),d=c(e);return u(d)},[e]),s=(0,fs.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 sa({columnStart:u,rowStart:d,columnSpan:f,rowSpan:m}))}return a},[i]);return $_(1,t.numRows).map(a=>$_(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,hi.jsx)(zfe,{color:d,className:m&&"is-highlighted",children:f&&!u?(0,hi.jsx)(AAe,{column:c,row:a,gridClientId:e,gridInfo:t,setHighlightedRect:n}):(0,hi.jsx)(LAe,{column:c,row:a,gridClientId:e,gridInfo:t,setHighlightedRect:n})},`${a}-${c}`)}))}function zfe({color:e,children:t,className:o}){return(0,hi.jsx)("div",{className:V("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 jfe(e,t,o,r,n){let{getBlockAttributes:i,getBlockRootClientId:s,canInsertBlockType:a,getBlockName:c}=(0,uf.useSelect)(_),{updateBlockAttributes:u,moveBlocksToPosition:d,__unstableMarkNextChangeAsNotPersistent:f}=(0,uf.useDispatch)(_),m=rp(o,r.numColumns);return NAe({validateDrag(h){let p=c(h);if(!a(p,o))return!1;let g=i(h),b=new sa({columnStart:e,rowStart:t,columnSpan:g.style?.layout?.columnSpan,rowSpan:g.style?.layout?.rowSpan});return new sa({columnSpan:r.numColumns,rowSpan:r.numRows}).containsRect(b)},onDragEnter(h){let p=i(h);n(new sa({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 AAe({column:e,row:t,gridClientId:o,gridInfo:r,setHighlightedRect:n}){return(0,hi.jsx)("div",{className:"block-editor-grid-visualizer__drop-zone",ref:jfe(e,t,o,r,n)})}function LAe({column:e,row:t,gridClientId:o,gridInfo:r,setHighlightedRect:n}){let{updateBlockAttributes:i,moveBlocksToPosition:s,__unstableMarkNextChangeAsNotPersistent:a}=(0,uf.useDispatch)(_),c=rp(o,r.numColumns);return(0,hi.jsx)(Xu,{rootClientId:o,className:"block-editor-grid-visualizer__appender",ref:jfe(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 NAe({validateDrag:e,onDragEnter:t,onDragLeave:o,onDrop:r}){let{getDraggedBlockClientIds:n}=(0,uf.useSelect)(_);return(0,Ffe.__experimentalUseDropZone)({onDragEnter(){let[i]=n();i&&e(i)&&t(i)},onDragLeave(){o()},onDrop(){let[i]=n();i&&e(i)&&r(i)}})}var Ufe=l(A(),1),Y_=l(P(),1);var UR=l(w(),1);function Oz({clientId:e,bounds:t,onChange:o,parentLayout:r}){let n=mt(e),i=n?.parentElement,{isManualPlacement:s}=r;return!n||!i?null:(0,UR.jsx)(MAe,{clientId:e,bounds:t,blockElement:n,rootBlockElement:i,onChange:o,isManualGrid:s&&window.__experimentalEnableGridInteractivity})}function MAe({clientId:e,bounds:t,blockElement:o,rootBlockElement:r,onChange:n,isManualGrid:i}){let[s,a]=(0,Y_.useState)(null),[c,u]=(0,Y_.useState)({top:!1,bottom:!1,left:!1,right:!1});(0,Y_.useEffect)(()=>{let h=new window.ResizeObserver(()=>{let p=o.getBoundingClientRect(),g=r.getBoundingClientRect(),b=p.top>g.top,v=p.bottom<g.bottom,k=p.left>g.left,y=p.right<g.right;u({top:(i||!v)&&b,bottom:v,left:(i||!y)&&k,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,UR.jsx)(Hi,{className:"block-editor-grid-item-resizer",clientId:e,__unstablePopoverSlot:"__unstable-block-tools-after",additionalStyles:m,children:(0,UR.jsx)(Ufe.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(Co(r,"column-gap")),v=parseFloat(Co(r,"row-gap")),k=W_(Co(r,"grid-template-columns"),b),y=W_(Co(r,"grid-template-rows"),v),S=new window.DOMRect(o.offsetLeft+g.offsetLeft,o.offsetTop+g.offsetTop,g.offsetWidth,g.offsetHeight),x=zc(k,S.left)+1,C=zc(y,S.top)+1,B=zc(k,S.right,"end")+1,I=zc(y,S.bottom,"end")+1;n({columnSpan:B-x+1,rowSpan:I-C+1,columnStart:i?x:void 0,rowStart:i?C:void 0})}})})}var ms=l(N(),1),Ik=l(A(),1);var Hfe=l(F(),1),Gfe=l(Z(),1);var Ar=l(w(),1);function Az({layout:e,parentLayout:t,onChange:o,gridClientId:r,blockClientId:n}){let{moveBlocksToPosition:i,__unstableMarkNextChangeAsNotPersistent:s}=(0,Hfe.useDispatch)(_),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=rp(r,h);return(0,Ar.jsx)(Mt,{group:"parent",children:(0,Ar.jsxs)(Ik.ToolbarGroup,{className:"block-editor-grid-item-mover__move-button-container",children:[(0,Ar.jsx)("div",{className:"block-editor-grid-item-mover__move-horizontal-button-container is-left",children:(0,Ar.jsx)(q_,{icon:(0,ms.isRTL)()?Vo:Nr,label:(0,ms.__)("Move left"),description:(0,ms.__)("Move left"),isDisabled:a<=1,onClick:()=>{o({columnStart:a-1}),s(),i([n],r,r,g(a-1,c))}})}),(0,Ar.jsxs)("div",{className:"block-editor-grid-item-mover__move-vertical-button-container",children:[(0,Ar.jsx)(q_,{className:"is-up-button",icon:_f,label:(0,ms.__)("Move up"),description:(0,ms.__)("Move up"),isDisabled:c<=1,onClick:()=>{o({rowStart:c-1}),s(),i([n],r,r,g(a,c-1))}}),(0,Ar.jsx)(q_,{className:"is-down-button",icon:Fn,label:(0,ms.__)("Move down"),description:(0,ms.__)("Move down"),isDisabled:p&&m>=p,onClick:()=>{o({rowStart:c+1}),s(),i([n],r,r,g(a,c+1))}})]}),(0,Ar.jsx)("div",{className:"block-editor-grid-item-mover__move-horizontal-button-container is-right",children:(0,Ar.jsx)(q_,{icon:(0,ms.isRTL)()?Nr:Vo,label:(0,ms.__)("Move right"),description:(0,ms.__)("Move right"),isDisabled:h&&f>=h,onClick:()=>{o({columnStart:a+1}),s(),i([n],r,r,g(a+1,c))}})})]})})}function q_({className:e,icon:t,label:o,isDisabled:r,onClick:n,description:i}){let a=`block-editor-grid-item-mover-button__description-${(0,Gfe.useInstanceId)(q_)}`;return(0,Ar.jsxs)(Ar.Fragment,{children:[(0,Ar.jsx)(Ik.ToolbarButton,{className:V("block-editor-grid-item-mover-button",e),icon:t,label:o,"aria-describedby":a,onClick:r?null:n,disabled:r,accessibleWhenDisabled:!0}),(0,Ar.jsx)(Ik.VisuallyHidden,{id:a,children:i})]})}var Z_=l(F(),1),GR=l(P(),1),HR=l(Z(),1);function Lz({clientId:e}){let{gridLayout:t,blockOrder:o,selectedBlockLayout:r}=(0,Z_.useSelect)(m=>{let{getBlockAttributes:h,getBlockOrder:p}=m(_),g=m(_).getSelectedBlock();return{gridLayout:h(e).layout??{},blockOrder:p(e),selectedBlockLayout:g?.attributes.style?.layout}},[e]),{getBlockAttributes:n,getBlockRootClientId:i}=(0,Z_.useSelect)(_),{updateBlockAttributes:s,__unstableMarkNextChangeAsNotPersistent:a}=(0,Z_.useDispatch)(_),c=(0,GR.useMemo)(()=>r?new sa(r):null,[r]),u=(0,HR.usePrevious)(c),d=(0,HR.usePrevious)(t.isManualPlacement),f=(0,HR.usePrevious)(o);(0,GR.useEffect)(()=>{let m={};if(t.isManualPlacement){let h=[];for(let g of o){let{columnStart:b,rowStart:v,columnSpan:k=1,rowSpan:y=1}=n(g).style?.layout??{};!b||!v||h.push(new sa({columnStart:b,rowStart:v,columnSpan:k,rowSpan:y}))}for(let g of o){let b=n(g),{columnStart:v,rowStart:k,columnSpan:y=1,rowSpan:S=1}=b.style?.layout??{};if(v&&k)continue;let[x,C]=DAe(h,t.columnCount,y,S,u?.columnEnd,u?.rowEnd);h.push(new sa({columnStart:x,rowStart:C,columnSpan:y,rowSpan:S})),m[g]={style:{...b.style,layout:{...b.style?.layout,columnStart:x,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 k=n(g),{columnStart:y,rowStart:S,columnSpan:x,rowSpan:C,...B}=k.style?.layout??{};if(y||S||x||C){let I=Object.keys(B).length===0;m[g]=pe(k,["style","layout"],I?void 0:B)}}}else{if(d===!0)for(let h of o){let p=n(h),{columnStart:g,rowStart:b,...v}=p.style?.layout??{};if(g||b){let k=Object.keys(v).length===0;m[h]=pe(p,["style","layout"],k?void 0:v)}}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 DAe(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 sa({columnStart:a,rowStart:s,columnSpan:o,rowSpan:r});if(!e.some(u=>u.intersectsRect(c)))return[a,s]}}var jc=l(w(),1),VAe={};function FAe({style:e}){let t=(0,Nz.useSelect)(g=>!g(_).getSettings().disableLayoutStyles),o=e?.layout??{},{selfStretch:r,flexSize:n,columnStart:i,rowStart:s,columnSpan:a,rowSpan:c}=o,u=jf()||{},{columnCount:d,minimumColumnWidth:f}=u,m=(0,Wfe.useInstanceId)(VAe),h=`.wp-container-content-${m}`,p="";if(t&&(r==="fixed"&&n?p=`${h} {
				flex-basis: ${n};
				box-sizing: border-box;
			}`:r==="fill"?p=`${h} {
				flex-grow: 1;
			}`:i&&a?p=`${h} {
				grid-column: ${i} / span ${a};
			}`:i?p=`${h} {
				grid-column: ${i};
			}`:a&&(p=`${h} {
				grid-column: span ${a};
			}`),s&&c?p+=`${h} {
				grid-row: ${s} / span ${c};
			}`:s?p+=`${h} {
				grid-row: ${s};
			}`:c&&(p+=`${h} {
				grid-row: span ${c};
			}`),(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 v=2;a&&i?v=a+i-1:a?v=a:v=i;let k=b==="px"?24:1.5,y=v*g+(v-1)*k,S=g*2+k-1,x=a&&a>1?"1/-1":"auto";p+=`@container (max-width: ${Math.max(y,S)}${b}) {
				${h} {
					grid-column: ${x};
					grid-row: auto;
				}
			}`}if(Zn({css:p}),!!p)return{className:`wp-container-content-${m}`}}function zAe({clientId:e,style:t,setAttributes:o}){let r=jf()||{},{type:n="default",allowSizingOnChildren:i=!1,isManualPlacement:s}=r;return n!=="grid"?null:(0,jc.jsx)(jAe,{clientId:e,style:t,setAttributes:o,allowSizingOnChildren:i,isManualPlacement:s,parentLayout:r})}function jAe({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,Nz.useSelect)(y=>{let{getBlockRootClientId:S,getBlockEditingMode:x,getTemplateLock:C,getBlockAttributes:B,getSettings:I}=y(_),O=S(e);if(C(O)||x(O)!=="default")return{rootClientId:O,isVisible:!1};let E=B(O),L=B(e),T=I();return{rootClientId:O,isVisible:!0,parentBlockVisibility:E?.metadata?.blockVisibility,blockBlockVisibility:L?.metadata?.blockVisibility,deviceType:T?.[_i]?.toLowerCase()||Et.desktop.value,isChildBlockAGrid:L?.layout?.type==="grid"}},[e]),{isBlockCurrentlyHidden:m}=Ni({blockVisibility:c,deviceType:d}),{isBlockCurrentlyHidden:h}=Ni({blockVisibility:u,deviceType:d}),[p,g]=(0,$fe.useState)(),b=f?e:void 0;if(!a||m)return null;let v=r&&!h;function k(y){o({style:{...t,layout:{...t?.layout,...y}}})}return(0,jc.jsxs)(jc.Fragment,{children:[(0,jc.jsx)(K_,{clientId:s,contentRef:g,parentLayout:i,childGridClientId:b}),v&&(0,jc.jsx)(Oz,{clientId:e,bounds:p,onChange:k,parentLayout:i}),n&&window.__experimentalEnableGridInteractivity&&(0,jc.jsx)(Az,{layout:t?.layout,parentLayout:i,onChange:k,gridClientId:s,blockClientId:e})]})}var Mz={useBlockProps:FAe,edit:zAe,attributeKeys:["style"],hasSupport(){return!0}};var Vz=l(rt(),1),Dz=l($(),1),Kfe="metadata";function UAe(e){return e?.attributes?.[Kfe]?.type||(e.attributes={...e.attributes,[Kfe]:{type:"object"}}),e}function HAe(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,Dz.hasBlockSupport)(e.name,"renaming",!0)&&(i.name=n.name),n.blockVisibility!==void 0&&!e.attributes?.metadata?.blockVisibility&&(0,Dz.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,Vz.addFilter)("blocks.registerBlockType","core/metadata/addMetaAttribute",UAe);(0,Vz.addFilter)("blocks.switchToBlockType.transformedBlock","core/metadata/addTransforms",HAe);var Fz=l(N(),1),WR=l(P(),1),$R=l(A(),1),KR=l($(),1),Pk=l(F(),1);var df=l(w(),1),GAe={};function WAe({name:e,clientId:t,metadata:{ignoredHookedBlocks:o=[]}={}}){let r=(0,Pk.useSelect)(h=>h(KR.store).getBlockTypes(),[]),n=(0,WR.useMemo)(()=>r?.filter(({name:h,blockHooks:p})=>p&&e in p||o.includes(h)),[r,e,o]),i=(0,Pk.useSelect)(h=>{let{getBlocks:p,getBlockRootClientId:g,getGlobalBlockCount:b}=h(_),v=g(t),k=n.reduce((y,S)=>{if(b(S.name)===0)return y;let x=S?.blockHooks?.[e],C;switch(x){case"before":case"after":C=p(v);break;case"first_child":case"last_child":C=p(t);break;case void 0:C=[...p(v),...p(t)];break}let B=C?.find(I=>I.name===S.name);return B?{...y,[S.name]:B.clientId}:y},{});return Object.values(k).length>0?k:GAe},[n,e,t]),{getBlockIndex:s,getBlockCount:a,getBlockRootClientId:c}=(0,Pk.useSelect)(_),{insertBlock:u,removeBlock:d}=(0,Pk.useDispatch)(_);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),v=c(t);switch(p){case"before":case"after":u(h,p==="after"?g+1:g,v,!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,v,!1);break}};return(0,df.jsx)(fe,{children:(0,df.jsxs)($R.PanelBody,{className:"block-editor-hooks__block-hooks",title:(0,Fz.__)("Plugins"),initialOpen:!0,children:[(0,df.jsx)("p",{className:"block-editor-hooks__block-hooks-helptext",children:(0,Fz.__)("Manage the inclusion of blocks added automatically by plugins.")}),Object.keys(f).map(h=>(0,df.jsxs)(WR.Fragment,{children:[(0,df.jsx)("h3",{children:h}),f[h].map(p=>{let g=p.name in i;return(0,df.jsx)($R.ToggleControl,{checked:g,label:p.title,onChange:()=>{if(!g){let b=p.blockHooks[e];m((0,KR.createBlock)(p.name),b);return}d(i[p.name],!1)}},p.title)})]},h))]})})}var Yfe={edit:WAe,attributeKeys:["metadata"],hasSupport(){return!0}};var zz=l(N(),1),qfe=l($(),1),Rk=l(A(),1),Zfe=l(F(),1),Xfe=l(P(),1),Qfe=l(Z(),1);var ff=l(w(),1),$Ae=()=>(0,Qfe.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}},KAe=({name:e,metadata:t})=>{let o=(0,Xfe.useContext)(cn),{removeAllBlockBindings:r}=El(),n=$Ae(),{bindableAttributes:i,hasCompatibleFields:s}=(0,Zfe.useSelect)(c=>{let{__experimentalBlockBindingsSupportedAttributes:u}=c(_).getSettings(),{getAllBlockBindingsSources:d,getBlockBindingsSourceFieldsList:f}=M(c(qfe.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)(Rk.__experimentalToolsPanel,{label:(0,zz.__)("Attributes"),resetAll:()=>{r()},dropdownMenuProps:n,className:"block-editor-bindings__panel",children:[(0,ff.jsx)(Rk.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:i.map(c=>(0,ff.jsx)(Gv,{attribute:c,blockName:e,binding:a?.[c]},c))}),(0,ff.jsx)(Rk.__experimentalText,{as:"div",variant:"muted",children:(0,ff.jsx)("p",{children:(0,zz.__)("Attributes connected to custom fields or other dynamic data.")})})]})})},Jfe={edit:KAe,attributeKeys:["metadata"],hasSupport(e){return!["core/post-date","core/navigation-link","core/navigation-submenu"].includes(e)}};var eme=l(N(),1),tme=l(A(),1),ZR=l(F(),1),X_=l($(),1),ome=l(P(),1);var YR=l(F(),1);function qR(e){let{isOpened:t,expandRevision:o}=(0,YR.useSelect)(i=>{let{isListViewPanelOpened:s,getListViewExpandRevision:a}=M(i(_));return{isOpened:s(e),expandRevision:a()}},[e]),{__unstableToggleListViewPanel:r}=(0,YR.useDispatch)(_);return{isOpened:t,expandRevision:o,handleToggle:i=>{r(e,i)}}}var Ok=l(w(),1),YAe="listView";function rme(e){return(0,X_.hasBlockSupport)(e,YAe)}function qAe({clientId:e,name:t}){let{isSelectionWithinCurrentSection:o}=(0,ome.useContext)(cr),{isOpened:r,expandRevision:n,handleToggle:i}=qR(e),{openListViewContentPanel:s}=M((0,ZR.useDispatch)(_)),a=rme(t),{hasChildren:c,isNestedListView:u}=(0,ZR.useSelect)(h=>{let{getBlockCount:p,getBlockParents:g,getBlockName:b}=h(_),k=g(e,!1).find(y=>{let S=b(y);return S==="core/navigation"||(0,X_.hasBlockSupport)(S,"listView")});return{hasChildren:!!p(e),isNestedListView:k}},[e]),f=(0,X_.getBlockType)(t)?.title||t;return!a||u?null:(0,Ok.jsx)(ym,{group:"list",children:(0,Ok.jsxs)(tme.PanelBody,{title:o?f:void 0,opened:r,onToggle:i,children:[!c&&(0,Ok.jsx)("p",{className:"block-editor-block-inspector__no-blocks",children:(0,eme.__)("No items yet.")}),(0,Ok.jsx)(LS,{rootClientId:e,isExpanded:!0,description:f,showAppender:!0,onSelect:s},`${e}-${n}`)]})})}var nme={edit:qAe,hasSupport:rme,attributeKeys:[],supportsPatternEditing:!0};var ime=l(rt(),1),sme=l($(),1);function ZAe(e){return e.__experimentalLabel||(0,sme.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,ime.addFilter)("blocks.registerBlockType","core/metadata/addLabelCallback",ZAe);var ame=l(Z(),1),lme=l(rt(),1),cme=l(F(),1);var ps=l(w(),1);function XAe(e){Lz(e)}function QAe({clientId:e,layout:t}){let{isVisible:o,blockVisibility:r,deviceType:n,isAnyAncestorHidden:i}=(0,cme.useSelect)(a=>{let{isBlockSelected:c,hasSelectedInnerBlock:u,isDraggingBlocks:d,getTemplateLock:f,getBlockEditingMode:m,getBlockAttributes:h,getSettings:p}=a(_);if(!d()&&!c(e)||f(e)||m(e)!=="default"||u(e))return{isVisible:!1};let{isBlockParentHiddenAtViewport:g}=M(a(_)),b=h(e),k=p()?.[_i]?.toLowerCase()||Et.desktop.value;return{isVisible:!0,blockVisibility:b?.metadata?.blockVisibility,deviceType:k,isAnyAncestorHidden:g(e,k)}},[e]),{isBlockCurrentlyHidden:s}=Ni({blockVisibility:r,deviceType:n});return(0,ps.jsxs)(ps.Fragment,{children:[(0,ps.jsx)(XAe,{clientId:e}),o&&!s&&!i&&(0,ps.jsx)(K_,{clientId:e,parentLayout:t})]})}var JAe=(0,ame.createHigherOrderComponent)(e=>function(o){return o.attributes.layout?.type!=="grid"?(0,ps.jsx)(e,{...o},"edit"):(0,ps.jsxs)(ps.Fragment,{children:[(0,ps.jsx)(QAe,{clientId:o.clientId,layout:o.attributes.layout}),(0,ps.jsx)(e,{...o},"edit")]})},"addGridVisualizerToBlockEdit");(0,lme.addFilter)("editor.BlockEdit","core/editor/grid-visualizer",JAe);var jz=l($(),1),dme=l(A(),1),fme=l(F(),1);var mme=l(P(),1),pme=l(N(),1);function ume(e){let t=[],o=[];return Object.entries(e).forEach(([r,n])=>{if(!n.autoGenerateControl)return;let i=eLe(r,n);i&&(t.push(i),o.push(r))}),{fields:t,form:{fields:o}}}function eLe(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 XR=l(w(),1);function tLe(e){return e?Object.values(e).some(t=>t?.autoGenerateControl):!1}function oLe({name:e,clientId:t,setAttributes:o}){let r=Mo(),n=(0,fme.useSelect)(c=>c(_).getBlockAttributes(t),[t]),i=(0,jz.getBlockType)(e),{fields:s,form:a}=(0,mme.useMemo)(()=>i?.attributes?ume(i.attributes):{fields:[],form:{fields:[]}},[i?.attributes]);return r!=="default"||!s||s.length===0?null:(0,XR.jsx)(fe,{children:(0,XR.jsx)(dme.PanelBody,{title:(0,pme.__)("Settings"),children:(0,XR.jsx)(M_,{data:n,fields:s,form:a,onChange:o})})})}var hme={edit:oLe,attributeKeys:[],hasSupport(e){let t=(0,jz.getBlockType)(e);return tLe(t?.attributes)}};function Uz(e){let{style:t}=e,o=t?.dimensions||{},r=pi({dimensions:o});return{className:o.aspectRatio?"has-aspect-ratio":void 0,style:r}}function QR(e){let t=e.style?.border||{};return{className:UF(e)||void 0,style:pi({border:t})}}function Hz(e){let{colors:t}=xd(),o=QR(e),{borderColor:r}=e;if(r){let n=ap({colors:t,namedColor:r});o.style.borderColor=n.color}return o}function Gz(e){let t=e.style?.shadow||"";return{style:pi({shadow:t})}}var Wz=l(P(),1);function JR(e){let{backgroundColor:t,textColor:o,gradient:r,style:n}=e,i=yi("background-color",t),s=yi("color",o),a=oh(r),c=a||n?.color?.gradient,u=V(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=pi({color:d});return{className:u||void 0,style:f}}function $z(e){let{backgroundColor:t,textColor:o,gradient:r}=e,[n,i,s,a,c,u]=me("color.palette.custom","color.palette.theme","color.palette.default","color.gradients.custom","color.gradients.theme","color.gradients.default"),d=(0,Wz.useMemo)(()=>[...n||[],...i||[],...s||[]],[n,i,s]),f=(0,Wz.useMemo)(()=>[...a||[],...c||[],...u||[]],[a,c,u]),m=JR(e);if(t){let h=ua(d,t);m.style.backgroundColor=h.color}if(r&&(m.style.background=Fw(f,r)),o){let h=ua(d,o);m.style.color=h.color}return m}function Kz(e){let{style:t}=e,o=t?.spacing||{};return{style:pi({spacing:o})}}var gme=l(A(),1);var{kebabCase:rLe}=M(gme.privateApis);function Yz(e,t){let o=e?.style?.typography||{};o={...o,fontSize:ec({size:e?.style?.typography?.fontSize},t)};let r=pi({typography:o}),n=e?.fontFamily?`has-${rLe(e.fontFamily)}-font-family`:"",i=e?.style?.typography?.textAlign?`has-text-align-${e?.style?.typography?.textAlign}`:"";return{className:V(n,i,hu(e?.fontSize)),style:r}}var eO=l(P(),1);function qz(e){let[t,o]=(0,eO.useState)(e);return(0,eO.useEffect)(()=>{e&&o(e)},[e]),t}ole([v2,TR,S4,uz,LR,VR,Cz,PR,nV,Dfe,Yfe,Jfe,Mz,Ble,Ude,nme,hme].filter(Boolean));rle([v2,TR,dae,LR,qF,Sfe,Cz,dz,mz,PR,HF,VR,nV,HX,Mz]);nle([v2,TR,S4,Ple,uz,HF,VR,PR,qF,LR,dz,mz]);var bme={button:"wp-element-button",caption:"wp-element-caption"},nLe=e=>bme[e]?bme[e]:"";var kme=()=>"";var Ak=l(P(),1),Q_=l($(),1),Xz=l(ur(),1);var vme=l(w(),1);function Qz(e,t,o){if(e==null||e===!1)return;if(Array.isArray(e))return Zz(e,t,o);switch(typeof e){case"string":case"number":return}let{type:r,props:n}=e;switch(r){case Ak.StrictMode:case Ak.Fragment:return Zz(n.children,t,o);case Ak.RawHTML:return;case Jy.Content:return yme(t,o);case t_:t.push(n.value);return}switch(typeof r){case"string":return typeof n.children<"u"?Zz(n.children,t,o):void 0;case"function":let i=r.prototype&&typeof r.prototype.render=="function"?new r(n).render():r(n);return Qz(i,t,o)}}function Zz(e,...t){e=Array.isArray(e)?e:[e];for(let o=0;o<e.length;o++)Qz(e[o],...t)}function yme(e,t){for(let o=0;o<t.length;o++){let{name:r,attributes:n,innerBlocks:i}=t[o],s=(0,Q_.getSaveElement)(r,n,(0,vme.jsx)(Jy.Content,{}));Qz(s,e,i)}}function Sme(e=[]){Q_.__unstableGetBlockProps.skipFilters=!0;let t=[];return yme(t,e),Q_.__unstableGetBlockProps.skipFilters=!1,t.map(o=>o instanceof Xz.RichTextData?o:Xz.RichTextData.fromHTMLString(o))}var _me=l(A(),1);var Jz=l(w(),1);function xme({clientId:e,resizableBoxProps:t,...o}){return(0,Jz.jsx)(Hi,{clientId:e,__unstablePopoverSlot:"block-toolbar",...o,children:(0,Jz.jsx)(_me.ResizableBox,{...t})})}var e0=l(P(),1),tO=l(F(),1),aa=l(A(),1),J_=l(N(),1);var hs=l(w(),1);function wme({rules:e}){let[t,o]=(0,e0.useState)(!1),{clientIds:r,selectPrevious:n,message:i}=(0,tO.useSelect)(p=>M(p(_)).getRemovalPromptData()),{clearBlockRemovalPrompt:s,setBlockRemovalRules:a,privateRemoveBlocks:c}=M((0,tO.useDispatch)(_));if((0,e0.useEffect)(()=>(a(e),()=>{a()}),[e,a]),(0,e0.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,hs.jsx)(aa.Modal,{title:(0,J_.__)("Confirm deletion"),onRequestClose:s,size:"medium",children:(0,hs.jsxs)(aa.__experimentalVStack,{spacing:4,children:[(0,hs.jsxs)("div",{children:[(0,hs.jsx)("p",{children:d}),u&&(i.warning||i.subtext)&&(0,hs.jsxs)("p",{children:[i.warning&&(0,hs.jsx)("strong",{children:i.warning}),i.warning&&i.subtext&&" ",i.subtext]})]}),f&&(0,hs.jsx)(aa.CheckboxControl,{label:(0,J_.__)("I understand the consequences"),checked:t,onChange:o}),(0,hs.jsxs)(aa.__experimentalHStack,{justify:"right",children:[(0,hs.jsx)(aa.Button,{variant:"tertiary",onClick:s,__next40pxDefaultSize:!0,children:(0,J_.__)("Cancel")}),(0,hs.jsx)(aa.Button,{variant:"primary",onClick:h,disabled:m,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,J_.__)("Delete")})]})]})})}var e6=l(P(),1);var Lk=l(A(),1),Bme=l(P(),1),Dn=l(N(),1),oO=l(w(),1),Cme=[{value:"fill",label:(0,Dn._x)("Fill","Scale option for dimensions control"),help:(0,Dn.__)("Fill the space by stretching the content.")},{value:"contain",label:(0,Dn._x)("Contain","Scale option for dimensions control"),help:(0,Dn.__)("Fit the content to the space without clipping.")},{value:"cover",label:(0,Dn._x)("Cover","Scale option for dimensions control"),help:(0,Dn.__)("Fill the space by clipping what doesn't fit.")},{value:"none",label:(0,Dn._x)("None","Scale option for dimensions control"),help:(0,Dn.__)("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,Dn._x)("Scale down","Scale option for dimensions control"),help:(0,Dn.__)("Scale down the content to fit the space if it is too big. Content that is too small will have additional padding.")}];function Eme({panelId:e,value:t,onChange:o,options:r=Cme,defaultValue:n=Cme[0].value,isShownByDefault:i=!0}){let s=t??"fill",a=(0,Bme.useMemo)(()=>r.reduce((c,u)=>(c[u.value]=u.help,c),{}),[r]);return(0,oO.jsx)(Lk.__experimentalToolsPanelItem,{label:(0,Dn.__)("Scale"),isShownByDefault:i,hasValue:()=>s!==n,onDeselect:()=>o(n),panelId:e,children:(0,oO.jsx)(Lk.__experimentalToggleGroupControl,{label:(0,Dn.__)("Scale"),isBlock:!0,help:a[s],value:s,onChange:o,size:"__unstable-large",children:r.map(c=>(0,oO.jsx)(Lk.__experimentalToggleGroupControlOption,{...c},c.value))})})}var Nk=l(A(),1),Cp=l(N(),1),Uc=l(w(),1);function Tme({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,Uc.jsxs)(Uc.Fragment,{children:[(0,Uc.jsx)(Nk.__experimentalToolsPanelItem,{style:{gridColumn:"span 1"},label:(0,Cp.__)("Width"),isShownByDefault:n,hasValue:()=>i!=="",onDeselect:a("width"),panelId:e,children:(0,Uc.jsx)(Nk.__experimentalUnitControl,{label:(0,Cp.__)("Width"),placeholder:(0,Cp.__)("Auto"),labelPosition:"top",units:r,min:0,value:i,onChange:a("width"),size:"__unstable-large"})}),(0,Uc.jsx)(Nk.__experimentalToolsPanelItem,{style:{gridColumn:"span 1"},label:(0,Cp.__)("Height"),isShownByDefault:n,hasValue:()=>s!=="",onDeselect:a("height"),panelId:e,children:(0,Uc.jsx)(Nk.__experimentalUnitControl,{label:(0,Cp.__)("Height"),placeholder:(0,Cp.__)("Auto"),labelPosition:"top",units:r,min:0,value:s,onChange:a("height"),size:"__unstable-large"})})]})}var mf=l(w(),1);function iLe({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,e6.useState)(m),[g,b]=(0,e6.useState)(f),v=u&&d?"custom":g,k=f||u&&d;return(0,mf.jsxs)(mf.Fragment,{children:[c.includes("aspectRatio")&&(0,mf.jsx)(PP,{panelId:e,options:r,defaultValue:n,value:v,onChange:y=>{let S={...t};y=y==="auto"?null:y,b(y),y?S.aspectRatio=y:delete S.aspectRatio,y?h?S.scale=h:(S.scale=s,p(s)):delete S.scale,y!=="custom"&&u&&d&&delete S.height,o(S)}}),c.includes("widthHeight")&&(0,mf.jsx)(Tme,{panelId:e,units:a,value:{width:u,height:d},onChange:({width:y,height:S})=>{let x={...t};y=y==="auto"?null:y,S=S==="auto"?null:S,y?x.width=y:delete x.width,S?x.height=S:delete x.height,y&&S?delete x.aspectRatio:g&&(x.aspectRatio=g),!g&&!!y!=!!S?delete x.scale:h?x.scale=h:(x.scale=s,p(s)),o(x)}}),c.includes("scale")&&k&&(0,mf.jsx)(Eme,{panelId:e,options:i,defaultValue:s,value:h,onChange:y=>{let S={...t};y=y==="fill"?null:y,p(y),y?S.scale=y:delete S.scale,o(S)}})]})}var Ime=iLe;var rO=l(A(),1),Hc=l(N(),1),t6=l(w(),1),Pme=[{label:(0,Hc._x)("Thumbnail","Image size option for resolution control"),value:"thumbnail"},{label:(0,Hc._x)("Medium","Image size option for resolution control"),value:"medium"},{label:(0,Hc._x)("Large","Image size option for resolution control"),value:"large"},{label:(0,Hc._x)("Full Size","Image size option for resolution control"),value:"full"}];function Rme({panelId:e,value:t,onChange:o,options:r=Pme,defaultValue:n=Pme[0].value,isShownByDefault:i=!0,resetAllFilter:s}){let a=t??n;return(0,t6.jsx)(rO.__experimentalToolsPanelItem,{hasValue:()=>a!==n,label:(0,Hc.__)("Resolution"),onDeselect:()=>o(n),isShownByDefault:i,panelId:e,resetAllFilter:s,children:(0,t6.jsx)(rO.SelectControl,{label:(0,Hc.__)("Resolution"),value:a,options:r,onChange:o,help:(0,Hc.__)("Select the size of the source image."),size:"__unstable-large"})})}var Bp=l(N(),1),Mk=l(A(),1),Ame=l(F(),1);var la=l(N(),1),Ome={a:(0,la.__)("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,la.__)("The <article> element should represent a self-contained, syndicatable portion of the document."),aside:(0,la.__)("The <aside> element should represent a portion of a document whose content is only indirectly related to the document's main content."),button:(0,la.__)("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,la.__)("The <div> element should only be used if the block is a design element with no semantic meaning."),footer:(0,la.__)("The <footer> element should represent a footer for its nearest sectioning element (e.g.: <section>, <article>, <main> etc.)."),header:(0,la.__)("The <header> element should represent introductory content, typically a group of introductory or navigational aids."),main:(0,la.__)("The <main> element should be used for the primary content of your document only."),nav:(0,la.__)("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,la.__)("The <section> element should represent a standalone portion of the document that can't be better represented by another element.")};var t0=l(w(),1);function Lme({tagName:e,onChange:t,clientId:o,options:r=[{label:(0,Bp.__)("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,Ame.useSelect)(a=>{if(!n)return!1;let{getClientIdsWithDescendants:c,getBlockAttributes:u}=a(_);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,Bp.sprintf)((0,Bp.__)("%s (Already in use)"),a.label)}:a);return(0,t0.jsxs)(Mk.__experimentalVStack,{spacing:2,className:"block-editor-html-element-control",children:[(0,t0.jsx)(Mk.SelectControl,{__next40pxDefaultSize:!0,label:(0,Bp.__)("HTML element"),options:s,value:e,onChange:t,help:Ome[e]}),e==="main"&&i&&(0,t0.jsx)(Mk.Notice,{status:"warning",isDismissible:!1,children:(0,Bp.__)("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 gs=l(A(),1),Dk=l(P(),1),nO=l(N(),1);var Vn=l(A(),1);var gi=l(w(),1),{Badge:sLe}=M(Vn.privateApis);function Nme({title:e,url:t,image:o,badges:r}){return(0,gi.jsxs)(Vn.__experimentalHStack,{justify:"space-between",alignment:"top",children:[(0,gi.jsx)(Vn.FlexItem,{className:"link-preview-button__content",children:(0,gi.jsxs)(Vn.__experimentalHStack,{alignment:"top",children:[o&&(0,gi.jsx)(Vn.FlexItem,{className:"link-preview-button__image-container",children:(0,gi.jsx)("img",{className:"link-preview-button__image",src:o,alt:""})}),(0,gi.jsxs)(Vn.__experimentalVStack,{className:"link-preview-button__details",alignment:"topLeft",children:[(0,gi.jsx)(Vn.__experimentalTruncate,{numberOfLines:1,className:"link-preview-button__title",children:e}),t&&(0,gi.jsx)(Vn.__experimentalTruncate,{numberOfLines:1,className:"link-preview-button__hint",children:t}),r&&r.length>0&&(0,gi.jsx)(Vn.__experimentalHStack,{className:"link-preview-button__badges",alignment:"left",children:r.map(n=>(0,gi.jsx)(sLe,{intent:n.intent,children:n.label},`${n.label}|${n.intent}`))})]})]})}),(0,gi.jsx)(xe,{icon:Fn,className:"link-preview-button__icon"})]})}var bi=l(w(),1);function o6({preview:e,onSelect:t,suggestionsQuery:o,label:r,help:n}){let[i,s]=(0,Dk.useState)(!1),a=(0,Dk.useId)(),c=`link-picker-title-${a}`,u=`link-picker-description-${a}`,d=(0,Dk.useRef)(null),{baseControlProps:f,controlProps:m}=(0,gs.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,bi.jsxs)(gs.BaseControl,{...f,children:[(0,bi.jsx)(gs.BaseControl.VisualLabel,{children:r}),(0,bi.jsxs)(gs.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,bi.jsxs)(gs.VisuallyHidden,{children:[r,":"]}),(0,bi.jsx)(Nme,{title:e.title||(0,nO.__)("Add link"),url:e.url,image:e.image,badges:e.badges})]}),i&&(0,bi.jsx)(gs.Popover,{anchor:d.current,onClose:()=>s(!1),placement:"left-start",offset:36,shift:!0,children:(0,bi.jsxs)("div",{role:"dialog","aria-labelledby":c,"aria-describedby":u,children:[(0,bi.jsxs)(gs.VisuallyHidden,{children:[(0,bi.jsx)("h2",{id:c,children:(0,nO.__)("Select a link")}),(0,bi.jsx)("p",{id:u,children:(0,nO.__)("Search for and add a link to the navigation item.")})]}),(0,bi.jsx)(Id,{value:null,onChange:h,suggestionsQuery:o,showInitialSuggestions:!0,forceIsEditingLink:!0,settings:[]})]})})]})}var r6={};w6(r6,{...FF,ExperimentalBlockCanvas:XV,BlockCanvasCover:kT,ExperimentalBlockEditorProvider:Ih,getDuotoneFilter:NR,getRichTextValues:Sme,PrivateQuickInserter:CB,extractWords:Hw,getNormalizedSearchTerms:Dv,normalizeString:Mv,PrivateListView:LS,ResizableBoxPopover:xme,InspectorControlsLastItem:m2,useHasBlockToolbar:WE,cleanEmptyObject:Ne,usePrivateStyleOverride:tc,BlockQuickNavigation:d2,LayoutStyle:sH,BlockManager:S2,BlockRemovalWarningModal:wme,useLayoutClasses:jR,useLayoutStyles:Pz,DimensionsTool:Ime,ResolutionTool:Rme,TabbedSidebar:SB,TextAlignmentControl:CP,usesContextKey:mF,useFlashEditableBlocks:QC,HTMLElementControl:Lme,useZoomOut:Uy,globalStylesDataKey:Si,globalStylesLinksDataKey:g0,selectBlockPatternsKey:qc,requiresWrapperOnCopy:OD,PrivateRichText:o_,PrivateInserterLibrary:o4,reusableBlocksSelectKey:b0,PrivateBlockPopover:mm,PrivatePublishDateTimePicker:u4,useSpacingSizes:aP,useBlockDisplayTitle:Fr,__unstableBlockStyleVariationOverridesWithConfig:MV,setBackgroundStyleDefaults:o2,sectionRootClientIdKey:Zc,CommentIconSlotFill:SE,CommentIconToolbarSlotFill:VE,mediaEditKey:k0,getMediaSelectKey:v0,deviceTypeKey:_i,isIsolatedEditorKey:Xc,isNavigationOverlayContextKey:y0,useBlockElement:mt,useBlockElementRef:Wf,LinkPicker:o6,useRemoteUrlData:RI,PrivateBlockContext:cr,useListViewPanelState:qR,isHashLink:hf,isRelativePath:gf});return Hme(aLe);})();
/*! Bundled license information:

autosize/dist/autosize.js:
  (*!
  	autosize 4.0.2
  	license: MIT
  	http://www.jacklmoore.com/autosize
  *)

normalize-wheel/src/isEventSupported.js:
  (**
   * Checks if an event is supported in the current execution environment.
   *
   * NOTE: This will not work correctly for non-generic events such as `change`,
   * `reset`, `load`, `error`, and `select`.
   *
   * Borrows from Modernizr.
   *
   * @param {string} eventNameSuffix Event name, e.g. "click".
   * @param {?boolean} capture Check if the capture phase is supported.
   * @return {boolean} True if the event is supported.
   * @internal
   * @license Modernizr 3.0.0pre (Custom Build) | MIT
   *)
*/

No other release has this exact content. See every version of this file.