File: //srv/wordpress/core/beta/wp-includes/js/dist/block-editor.min.js
/*! This file is auto-generated */
"use strict";var wp;(wp||={}).blockEditor=(()=>{var yPe=Object.create;var y1=Object.defineProperty;var vPe=Object.getOwnPropertyDescriptor;var SPe=Object.getOwnPropertyNames;var kPe=Object.getPrototypeOf,_Pe=Object.prototype.hasOwnProperty;var ke=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Cr=(e,t)=>{for(var o in t)y1(e,o,{get:t[o],enumerable:!0})},NK=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of SPe(t))!_Pe.call(e,n)&&n!==o&&y1(e,n,{get:()=>t[n],enumerable:!(r=vPe(t,n))||r.enumerable});return e};var c=(e,t,o)=>(o=e!=null?yPe(kPe(e)):{},NK(t||!e||!e.__esModule?y1(o,"default",{value:e,enumerable:!0}):o,e)),xPe=e=>NK(y1({},"__esModule",{value:!0}),e);var ce=ke((JQe,VK)=>{VK.exports=window.wp.blocks});var F=ke((eJe,FK)=>{FK.exports=window.wp.element});var Z=ke((tJe,zK)=>{zK.exports=window.wp.data});var fe=ke((oJe,jK)=>{jK.exports=window.wp.compose});var uo=ke((rJe,HK)=>{HK.exports=window.wp.hooks});var H=ke((lJe,JK)=>{JK.exports=window.wp.components});var Q_=ke((cJe,eY)=>{eY.exports=window.wp.privateApis});var Tt=ke((hJe,iY)=>{iY.exports=window.wp.deprecated});var E=ke((bJe,sY)=>{sY.exports=window.ReactJSXRuntime});var As=ke((vJe,lY)=>{lY.exports=window.wp.url});var G=ke((PJe,gY)=>{gY.exports=window.wp.i18n});var wg=ke((IJe,hY)=>{"use strict";hY.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 ue=ke((jJe,BY)=>{BY.exports=window.wp.primitives});var jo=ke((unt,PY)=>{PY.exports=window.wp.richText});var OY=ke((dnt,IY)=>{IY.exports=window.wp.blockSerializationDefaultParser});var Dx=ke((mnt,LY)=>{LY.exports=window.wp.styleEngine});var VR=ke((knt,HY)=>{"use strict";var KIe=function(t){return YIe(t)&&!qIe(t)};function YIe(e){return!!e&&typeof e=="object"}function qIe(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||QIe(e)}var ZIe=typeof Symbol=="function"&&Symbol.for,XIe=ZIe?Symbol.for("react.element"):60103;function QIe(e){return e.$$typeof===XIe}function JIe(e){return Array.isArray(e)?[]:{}}function zx(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Ry(JIe(e),e,t):e}function eOe(e,t,o){return e.concat(t).map(function(r){return zx(r,o)})}function tOe(e,t){if(!t.customMerge)return Ry;var o=t.customMerge(e);return typeof o=="function"?o:Ry}function oOe(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function zY(e){return Object.keys(e).concat(oOe(e))}function jY(e,t){try{return t in e}catch{return!1}}function rOe(e,t){return jY(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function nOe(e,t,o){var r={};return o.isMergeableObject(e)&&zY(e).forEach(function(n){r[n]=zx(e[n],o)}),zY(t).forEach(function(n){rOe(e,n)||(jY(e,n)&&o.isMergeableObject(t[n])?r[n]=tOe(n,o)(e[n],t[n],o):r[n]=zx(t[n],o))}),r}function Ry(e,t,o){o=o||{},o.arrayMerge=o.arrayMerge||eOe,o.isMergeableObject=o.isMergeableObject||KIe,o.cloneUnlessOtherwiseSpecified=zx;var r=Array.isArray(t),n=Array.isArray(e),i=r===n;return i?r?o.arrayMerge(e,t,o):nOe(e,t,o):zx(t,o)}Ry.all=function(t,o){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,n){return Ry(r,n,o)},{})};var iOe=Ry;HY.exports=iOe});var Kr=ke((Ait,Fq)=>{Fq.exports=window.wp.a11y});var es=ke((Lit,Gq)=>{Gq.exports=window.wp.notices});var Ny=ke((Mit,Wq)=>{Wq.exports=window.wp.preferences});var RZ=ke((Lst,gB)=>{var CZ={\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"},EZ=Object.keys(CZ).join("|"),UMe=new RegExp(EZ,"g"),GMe=new RegExp(EZ,"");function WMe(e){return CZ[e]}var TZ=function(e){return e.replace(UMe,WMe)},$Me=function(e){return!!e.match(GMe)};gB.exports=TZ;gB.exports.has=$Me;gB.exports.remove=TZ});var oo=ke((wlt,xX)=>{xX.exports=window.wp.keycodes});var Et=ke((Ult,DX)=>{DX.exports=window.wp.dom});var le=ke((lct,XX)=>{XX.exports=window.React});var JX=ke((cct,QX)=>{"use strict";var UNe="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";QX.exports=UNe});var rQ=ke((uct,oQ)=>{"use strict";var GNe=JX();function eQ(){}function tQ(){}tQ.resetWarningCache=eQ;oQ.exports=function(){function e(r,n,i,s,a,l){if(l!==GNe){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:tQ,resetWarningCache:eQ};return o.PropTypes=o,o}});var iQ=ke((pct,nQ)=>{nQ.exports=rQ()();var dct,fct});var aQ=ke((WB,sQ)=>{(function(e,t){if(typeof define=="function"&&define.amd)define(["module","exports"],t);else if(typeof WB<"u")t(sQ,WB);else{var o={exports:{}};t(o,o.exports),e.autosize=o.exports}})(WB,function(e,t){"use strict";var o=typeof Map=="function"?new Map:(function(){var l=[],u=[];return{has:function(f){return l.indexOf(f)>-1},get:function(f){return u[l.indexOf(f)]},set:function(f,p){l.indexOf(f)===-1&&(l.push(f),u.push(p))},delete:function(f){var p=l.indexOf(f);p>-1&&(l.splice(p,1),u.splice(p,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(l){if(!l||!l.nodeName||l.nodeName!=="TEXTAREA"||o.has(l))return;var u=null,d=null,f=null;function p(){var k=window.getComputedStyle(l,null);k.resize==="vertical"?l.style.resize="none":k.resize==="both"&&(l.style.resize="horizontal"),k.boxSizing==="content-box"?u=-(parseFloat(k.paddingTop)+parseFloat(k.paddingBottom)):u=parseFloat(k.borderTopWidth)+parseFloat(k.borderBottomWidth),isNaN(u)&&(u=0),b()}function g(k){{var S=l.style.width;l.style.width="0px",l.offsetWidth,l.style.width=S}l.style.overflowY=k}function m(k){for(var S=[];k&&k.parentNode&&k.parentNode instanceof Element;)k.parentNode.scrollTop&&S.push({node:k.parentNode,scrollTop:k.parentNode.scrollTop}),k=k.parentNode;return S}function h(){if(l.scrollHeight!==0){var k=m(l),S=document.documentElement&&document.documentElement.scrollTop;l.style.height="",l.style.height=l.scrollHeight+u+"px",d=l.clientWidth,k.forEach(function(_){_.node.scrollTop=_.scrollTop}),S&&(document.documentElement.scrollTop=S)}}function b(){h();var k=Math.round(parseFloat(l.style.height)),S=window.getComputedStyle(l,null),_=S.boxSizing==="content-box"?Math.round(parseFloat(S.height)):l.offsetHeight;if(_<k?S.overflowY==="hidden"&&(g("scroll"),h(),_=S.boxSizing==="content-box"?Math.round(parseFloat(window.getComputedStyle(l,null).height)):l.offsetHeight):S.overflowY!=="hidden"&&(g("hidden"),h(),_=S.boxSizing==="content-box"?Math.round(parseFloat(window.getComputedStyle(l,null).height)):l.offsetHeight),f!==_){f=_;var x=r("autosize:resized");try{l.dispatchEvent(x)}catch{}}}var v=function(){l.clientWidth!==d&&b()},y=function(k){window.removeEventListener("resize",v,!1),l.removeEventListener("input",b,!1),l.removeEventListener("keyup",b,!1),l.removeEventListener("autosize:destroy",y,!1),l.removeEventListener("autosize:update",b,!1),Object.keys(k).forEach(function(S){l.style[S]=k[S]}),o.delete(l)}.bind(l,{height:l.style.height,resize:l.style.resize,overflowY:l.style.overflowY,overflowX:l.style.overflowX,wordWrap:l.style.wordWrap});l.addEventListener("autosize:destroy",y,!1),"onpropertychange"in l&&"oninput"in l&&l.addEventListener("keyup",b,!1),window.addEventListener("resize",v,!1),l.addEventListener("input",b,!1),l.addEventListener("autosize:update",b,!1),l.style.overflowX="hidden",l.style.wordWrap="break-word",o.set(l,{destroy:y,update:b}),p()}function i(l){var u=o.get(l);u&&u.destroy()}function s(l){var u=o.get(l);u&&u.update()}var a=null;typeof window>"u"||typeof window.getComputedStyle!="function"?(a=function(u){return u},a.destroy=function(l){return l},a.update=function(l){return l}):(a=function(u,d){return u&&Array.prototype.forEach.call(u.length?u:[u],function(f){return n(f,d)}),u},a.destroy=function(l){return l&&Array.prototype.forEach.call(l.length?l:[l],i),l},a.update=function(l){return l&&Array.prototype.forEach.call(l.length?l:[l],s),l}),t.default=a,e.exports=t.default})});var cQ=ke((mct,lQ)=>{var WNe=function(e,t,o){return o=window.getComputedStyle,(o?o(e):e.currentStyle)[t.replace(/-(\w)/gi,function(r,n){return n.toUpperCase()})]};lQ.exports=WNe});var dQ=ke((gct,uQ)=>{var iz=cQ();function $Ne(e){var t=iz(e,"line-height"),o=parseFloat(t,10);if(t===o+""){var r=e.style.lineHeight;e.style.lineHeight=t+"em",t=iz(e,"line-height"),o=parseFloat(t,10),r?e.style.lineHeight=r:delete e.style.lineHeight}if(t.indexOf("pt")!==-1?(o*=4,o/=3):t.indexOf("mm")!==-1?(o*=96,o/=25.4):t.indexOf("cm")!==-1?(o*=96,o/=2.54):t.indexOf("in")!==-1?o*=96:t.indexOf("pc")!==-1&&(o*=16),o=Math.round(o),t==="normal"){var n=e.nodeName,i=document.createElement(n);i.innerHTML=" ",n.toUpperCase()==="TEXTAREA"&&i.setAttribute("rows","1");var s=iz(e,"font-size");i.style.fontSize=s,i.style.padding="0px",i.style.border="0px";var a=document.body;a.appendChild(i);var l=i.offsetHeight;o=l,a.removeChild(i)}return o}uQ.exports=$Ne});var pQ=ke(td=>{"use strict";var KNe=td&&td.__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)}})(),sz=td&&td.__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},YNe=td&&td.__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};td.__esModule=!0;var KB=le(),bw=iQ(),$B=aQ(),qNe=dQ(),ZNe=qNe,fQ="autosize:resized",XNe=(function(e){KNe(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:ZNe(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&&$B(o.textarea)}):this.textarea&&$B(this.textarea),this.textarea&&this.textarea.addEventListener(fQ,this.onResize)},t.prototype.componentWillUnmount=function(){this.textarea&&(this.textarea.removeEventListener(fQ,this.onResize),$B.destroy(this.textarea))},t.prototype.render=function(){var o=this,r=this,n=r.props,i=n.onResize,s=n.maxRows,a=n.onChange,l=n.style,u=n.innerRef,d=n.children,f=YNe(n,["onResize","maxRows","onChange","style","innerRef","children"]),p=r.state.lineHeight,g=s&&p?p*s:null;return KB.createElement("textarea",sz({},f,{onChange:this.onChange,style:g?sz({},l,{maxHeight:g}):l,ref:function(m){o.textarea=m,typeof o.props.innerRef=="function"?o.props.innerRef(m):o.props.innerRef&&(o.props.innerRef.current=m)}}),d)},t.prototype.componentDidUpdate=function(){this.textarea&&$B.update(this.textarea)},t.defaultProps={rows:1,async:!1},t.propTypes={rows:bw.number,maxRows:bw.number,onResize:bw.func,innerRef:bw.any,async:bw.bool},t})(KB.Component);td.TextareaAutosize=KB.forwardRef(function(e,t){return KB.createElement(XNe,sz({},e,{innerRef:t}))})});var az=ke((bct,mQ)=>{"use strict";var QNe=pQ();mQ.exports=QNe.TextareaAutosize});var yw=ke((Sct,yQ)=>{yQ.exports=window.wp.warning});var rd=ke((Vct,mJ)=>{mJ.exports=window.ReactDOM});var Il=ke((vut,YJ)=>{YJ.exports=window.wp.keyboardShortcuts});var uee=ke((Odt,cee)=>{cee.exports=window.wp.htmlEntities});var _oe=ke(koe=>{"use strict";var vv=le();function ZFe(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var XFe=typeof Object.is=="function"?Object.is:ZFe,QFe=vv.useState,JFe=vv.useEffect,e3e=vv.useLayoutEffect,t3e=vv.useDebugValue;function o3e(e,t){var o=t(),r=QFe({inst:{value:o,getSnapshot:t}}),n=r[0].inst,i=r[1];return e3e(function(){n.value=o,n.getSnapshot=t,i8(n)&&i({inst:n})},[e,o,t]),JFe(function(){return i8(n)&&i({inst:n}),e(function(){i8(n)&&i({inst:n})})},[e]),t3e(o),o}function i8(e){var t=e.getSnapshot;e=e.value;try{var o=t();return!XFe(e,o)}catch{return!0}}function r3e(e,t){return t()}var n3e=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r3e:o3e;koe.useSyncExternalStore=vv.useSyncExternalStore!==void 0?vv.useSyncExternalStore:n3e});var s8=ke((Pht,xoe)=>{"use strict";xoe.exports=_oe()});var Coe=ke(woe=>{"use strict";var SI=le(),i3e=s8();function s3e(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var a3e=typeof Object.is=="function"?Object.is:s3e,l3e=i3e.useSyncExternalStore,c3e=SI.useRef,u3e=SI.useEffect,d3e=SI.useMemo,f3e=SI.useDebugValue;woe.useSyncExternalStoreWithSelector=function(e,t,o,r,n){var i=c3e(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=d3e(function(){function l(g){if(!u){if(u=!0,d=g,g=r(g),n!==void 0&&s.hasValue){var m=s.value;if(n(m,g))return f=m}return f=g}if(m=f,a3e(d,g))return m;var h=r(g);return n!==void 0&&n(m,h)?(d=g,m):(d=g,f=h)}var u=!1,d,f,p=o===void 0?null:o;return[function(){return l(t())},p===null?void 0:function(){return l(p())}]},[t,o,r,n]);var a=l3e(e,i[0],i[1]);return u3e(function(){s.hasValue=!0,s.value=a},[a]),f3e(a),a}});var Toe=ke((Oht,Eoe)=>{"use strict";Eoe.exports=Coe()});var sse=ke((sBt,ise)=>{ise.exports=window.wp.theme});var Fae=ke((MIt,Vae)=>{Vae.exports=window.wp.uploadMedia});var ece=ke((vAt,p7)=>{var lt=String,Jle=function(){return{isColorSupported:!1,reset:lt,bold:lt,dim:lt,italic:lt,underline:lt,inverse:lt,hidden:lt,strikethrough:lt,black:lt,red:lt,green:lt,yellow:lt,blue:lt,magenta:lt,cyan:lt,white:lt,gray:lt,bgBlack:lt,bgRed:lt,bgGreen:lt,bgYellow:lt,bgBlue:lt,bgMagenta:lt,bgCyan:lt,bgWhite:lt,blackBright:lt,redBright:lt,greenBright:lt,yellowBright:lt,blueBright:lt,magentaBright:lt,cyanBright:lt,whiteBright:lt,bgBlackBright:lt,bgRedBright:lt,bgGreenBright:lt,bgYellowBright:lt,bgBlueBright:lt,bgMagentaBright:lt,bgCyanBright:lt,bgWhiteBright:lt}};p7.exports=Jle();p7.exports.createColors=Jle});var m7=ke(()=>{});var JO=ke((_At,rce)=>{"use strict";var tce=ece(),oce=m7(),z0=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=tce.isColorSupported);let r=d=>d,n=d=>d,i=d=>d;if(t){let{bold:d,gray:f,red:p}=tce.createColors(!0);n=g=>d(p(g)),r=g=>f(g),oce&&(i=g=>oce(g))}let s=o.split(/\r?\n/),a=Math.max(this.line-3,0),l=Math.min(this.line+2,s.length),u=String(l).length;return s.slice(a,l).map((d,f)=>{let p=a+1+f,g=" "+(" "+p).slice(-u)+" | ";if(p===this.line){if(d.length>160){let h=20,b=Math.max(0,this.column-h),v=Math.max(this.column+h,this.endColumn+h),y=d.slice(b,v),k=r(g.replace(/\d/g," "))+d.slice(0,Math.min(this.column-1,h-1)).replace(/[^\t]/g," ");return n(">")+r(g)+i(y)+`
`+k+n("^")}let m=r(g.replace(/\d/g," "))+d.slice(0,this.column-1).replace(/[^\t]/g," ");return n(">")+r(g)+i(d)+`
`+m+n("^")}return" "+r(g)+i(d)}).join(`
`)}toString(){let t=this.showSourceCode();return t&&(t=`
`+t+`
`),this.name+": "+this.message+t}};rce.exports=z0;z0.default=z0});var g7=ke((xAt,ice)=>{"use strict";var Hze=/(<)(\/?style\b)/gi,Uze=/(<)(!--)/g;function Np(e){return typeof e!="string"||!e.includes("<")?e:e.replace(Hze,"\\3c $2").replace(Uze,"\\3c $2")}var nce={after:`
`,beforeClose:`
`,beforeComment:`
`,beforeDecl:`
`,beforeOpen:" ",beforeRule:`
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function Gze(e){return e[0].toUpperCase()+e.slice(1)}var j0=class{constructor(t){this.builder=t}atrule(t,o){let r=t.raws,n="@"+t.name,i=t.params?this.rawValue(t,"params"):"";if(typeof r.afterName<"u"?n+=r.afterName:i&&(n+=" "),t.nodes)this.block(t,n+i);else{let s=(r.between||"")+(o?";":"");this.builder(Np(n+i+s),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(Np(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(Np(n)),this.builder("}",t,"end")}body(t){let o=t.nodes,r=o.length-1;for(;r>0&&o[r].type==="comment";)r-=1;let n=this.raw(t,"semicolon"),i=t.type==="document";for(let s=0;s<o.length;s++){let a=o[s],l=this.raw(a,"before");l&&this.builder(i?l:Np(l)),this.stringify(a,r!==s||n)}}comment(t){let o=this.raw(t,"left","commentLeft"),r=this.raw(t,"right","commentRight");this.builder(Np("/*"+o+t.text+r+"*/"),t)}decl(t,o){let r=t.raws,n=this.raw(t,"between","colon"),i=t.prop+n+this.rawValue(t,"value");t.important&&(i+=r.important||" !important"),o&&(i+=";"),this.builder(Np(i),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 nce[r];let s=t.root(),a=s.rawCache||(s.rawCache={});if(typeof a[r]<"u")return a[r];if(r==="before"||r==="after")return this.beforeAfter(t,r);{let l="raw"+Gze(r);this[l]?n=this[l](s,t):s.walk(u=>{if(n=u.raws[o],typeof n<"u")return!1})}return typeof n>"u"&&(n=nce[r]),a[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){if(this.body(t),t.raws.after){let o=t.raws.after,r=t.parent&&t.parent.type==="document";this.builder(r?o:Np(o))}}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(Np(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)}};ice.exports=j0;j0.default=j0});var eA=ke((wAt,sce)=>{"use strict";var Wze=g7();function h7(e,t){new Wze(t).stringify(e)}sce.exports=h7;h7.default=h7});var tA=ke((CAt,b7)=>{"use strict";b7.exports.isClean=Symbol("isClean");b7.exports.my=Symbol("my")});var oA=ke((EAt,ace)=>{"use strict";var $ze=JO(),Kze=g7(),Yze=eA(),{isClean:H0,my:qze}=tA();function y7(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=>y7(s,o)):(i==="object"&&n!==null&&(n=y7(n)),o[r]=n)}return o}function Zc(e,t){if(t&&typeof t.offset<"u")return t.offset;let o=1,r=1,n=0;for(let i=0;i<e.length;i++){if(r===t.line&&o===t.column){n=i;break}e[i]===`
`?(o=1,r+=1):o+=1}return n}var U0=class{get proxyOf(){return this}constructor(t={}){this.raws={},this[H0]=!1,this[qze]=!0;for(let o in t)if(o==="nodes"){this.nodes=[];for(let r of t[o])typeof r.clone=="function"&&r.parent?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=y7(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 $ze(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}}}markClean(){this[H0]=!0}markDirty(){if(this[H0]){this[H0]=!1;let t=this;for(;t=t.parent;)t[H0]=!1}}next(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t+1]}positionBy(t={}){let o="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:Zc(o,this.source.start)};if(t.index)r=this.positionInside(t.index);else if(t.word){let i=o.slice(Zc(o,this.source.start),Zc(o,this.source.end)).indexOf(t.word);i!==-1&&(r=this.positionInside(i))}return r}positionInside(t){let o=this.source.start.column,r=this.source.start.line,n="document"in this.source.input?this.source.input.document:this.source.input.css,i=Zc(n,this.source.start),s=i+t;for(let a=i;a<s;a++)n[a]===`
`?(o=1,r+=1):o+=1;return{column:o,line:r,offset:s}}prev(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t-1]}rangeBy(t={}){let o="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:Zc(o,this.source.start)},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset=="number"?this.source.end.offset:Zc(o,this.source.end)+1}:{column:r.column+1,line:r.line,offset:r.offset+1};if(t.word){let s=o.slice(Zc(o,this.source.start),Zc(o,this.source.end)).indexOf(t.word);s!==-1&&(r=this.positionInside(s),n=this.positionInside(s+t.word.length))}else t.start?r={column:t.start.column,line:t.start.line,offset:Zc(o,t.start)}:typeof t.index=="number"&&(r=this.positionInside(t.index)),t.end?n={column:t.end.column,line:t.end.line,offset:Zc(o,t.end)}:typeof t.endIndex=="number"?n=this.positionInside(t.endIndex):typeof t.index=="number"&&(n=this.positionInside(t.index+1));return(n.line<r.line||n.line===r.line&&n.column<=r.column)&&(n={column:r.column+1,line:r.line,offset:r.offset+1}),{end:n,start:r}}raw(t,o){return new Kze().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(l=>typeof l=="object"&&l.toJSON?l.toJSON(null,o):l);else if(typeof a=="object"&&a.toJSON)r[s]=a.toJSON(null,o);else if(s==="source"){if(a==null)continue;let l=o.get(a.input);l==null&&(l=i,o.set(a.input,i),i++),r[s]={end:a.end,inputId:l,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=Yze){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)}};ace.exports=U0;U0.default=U0});var v7=ke((TAt,lce)=>{"use strict";var Zze=oA(),G0=class extends Zze{constructor(t){super(t),this.type="comment"}};lce.exports=G0;G0.default=G0});var S7=ke((RAt,cce)=>{"use strict";var Xze=oA(),W0=class extends Xze{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(t){t&&typeof t.value<"u"&&typeof t.value!="string"&&(t={...t,value:String(t.value)}),super(t),this.type="decl"}};cce.exports=W0;W0.default=W0});var Nh=ke((BAt,yce)=>{"use strict";var uce=v7(),dce=S7(),Qze=oA(),{isClean:fce,my:pce}=tA(),k7,mce,gce,_7;function hce(e){return e.map(t=>(t.nodes&&(t.nodes=hce(t.nodes)),delete t.source,t))}function bce(e){if(e[fce]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)bce(t)}var Ul=class e extends Qze{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]}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=hce(mce(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 dce(t)]}else if(t.selector||t.selectors)t=[new _7(t)];else if(t.name)t=[new k7(t)];else if(t.text)t=[new uce(t)];else throw new Error("Unknown node type in node creation");return t.map(n=>(n[pce]||e.rebuild(n),n=n.proxyOf,n.parent&&n.parent.removeChild(n),n[fce]&&bce(n),n.raws||(n.raws={}),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)}))}};Ul.registerParse=e=>{mce=e};Ul.registerRule=e=>{_7=e};Ul.registerAtRule=e=>{k7=e};Ul.registerRoot=e=>{gce=e};yce.exports=Ul;Ul.default=Ul;Ul.rebuild=e=>{e.type==="atrule"?Object.setPrototypeOf(e,k7.prototype):e.type==="rule"?Object.setPrototypeOf(e,_7.prototype):e.type==="decl"?Object.setPrototypeOf(e,dce.prototype):e.type==="comment"?Object.setPrototypeOf(e,uce.prototype):e.type==="root"&&Object.setPrototypeOf(e,gce.prototype),e[pce]=!0,e.nodes&&e.nodes.forEach(t=>{Ul.rebuild(t)})}});var x7=ke((PAt,kce)=>{"use strict";var Jze=Nh(),vce,Sce,Dh=class extends Jze{constructor(t){super({type:"document",...t}),this.nodes||(this.nodes=[])}toResult(t={}){return new vce(new Sce,this,t).stringify()}};Dh.registerLazyResult=e=>{vce=e};Dh.registerProcessor=e=>{Sce=e};kce.exports=Dh;Dh.default=Dh});var rA=ke(()=>{});var nA=ke(()=>{});var w7=ke(()=>{});var xce=ke((DAt,_ce)=>{var eje="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",tje=(e,t=21)=>(o=t)=>{let r="",n=o|0;for(;n--;)r+=e[Math.random()*e.length|0];return r},oje=(e=21)=>{let t="",o=e|0;for(;o--;)t+=eje[Math.random()*64|0];return t};_ce.exports={nanoid:oje,customAlphabet:tje}});var wce=ke(()=>{});var Rce=ke((zAt,Tce)=>{"use strict";var{existsSync:rje,readFileSync:nje}=wce(),{dirname:C7,join:ije}=rA(),{SourceMapConsumer:Cce,SourceMapGenerator:Ece}=nA();function sje(e){return Buffer?Buffer.from(e,"base64").toString():window.atob(e)}var $0=class{constructor(t,o){if(o.map===!1)return;o.unsafeMap&&(this.unsafeMap=!0),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=C7(this.mapFile)),n&&(this.text=n)}consumer(){return this.consumerCache||(this.consumerCache=new Cce(this.json||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,/,s=t.match(n)||t.match(i);if(s)return decodeURIComponent(t.substr(s[0].length));let a=t.match(o)||t.match(r);if(a)return sje(t.substr(a[0].length));let l=t.slice(22);throw l=l.slice(0,l.indexOf(",")),new Error("Unsupported source map encoding "+l)}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=/g);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,o,r){if(!(!r&&!this.unsafeMap&&!/\.map$/i.test(t))&&(this.root=C7(t),rje(t)))return this.mapFile=t,nje(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,t,!0);if(!n)throw new Error("Unable to load previous source map: "+r.toString());return n}}else{if(o instanceof Cce)return Ece.fromSourceMap(o).toString();if(o instanceof Ece)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;t&&(r=ije(C7(t),r));let n=this.loadFile(r,t,!1);if(n)try{this.json=JSON.parse(n.replace(/^\)]}'[^\n]*\n/,""))}catch{return}return n}}}startWith(t,o){return t?t.substr(0,o.length)===o:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};Tce.exports=$0;$0.default=$0});var P7=ke((jAt,Ace)=>{"use strict";var{nanoid:aje}=xce(),{isAbsolute:R7,resolve:B7}=rA(),{SourceMapConsumer:lje,SourceMapGenerator:cje}=nA(),{fileURLToPath:Bce,pathToFileURL:iA}=w7(),Pce=JO(),uje=Rce(),E7=m7(),T7=Symbol("lineToIndexCache"),dje=!!(lje&&cje),Ice=!!(B7&&R7);function Oce(e){if(e[T7])return e[T7];let t=e.css.split(`
`),o=new Array(t.length),r=0;for(let n=0,i=t.length;n<i;n++)o[n]=r,r+=t[n].length+1;return e[T7]=o,o}var nS=class{get from(){return this.file||this.id}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,this.document=this.css,o.document&&(this.document=o.document.toString()),o.from&&(!Ice||/^\w+:\/\//.test(o.from)||R7(o.from)?this.file=o.from:this.file=B7(o.from)),Ice&&dje){let r=new uje(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 "+aje(6)+">"),this.map&&(this.map.file=this.from)}error(t,o,r,n={}){let i,s,a,l,u;if(o&&typeof o=="object"){let f=o,p=r;if(typeof f.offset=="number"){l=f.offset;let g=this.fromOffset(l);o=g.line,r=g.col}else o=f.line,r=f.column,l=this.fromLineAndColumn(o,r);if(typeof p.offset=="number"){a=p.offset;let g=this.fromOffset(a);s=g.line,i=g.col}else s=p.line,i=p.column,a=this.fromLineAndColumn(p.line,p.column)}else if(r)l=this.fromLineAndColumn(o,r);else{l=o;let f=this.fromOffset(l);o=f.line,r=f.col}let d=this.origin(o,r,s,i);return d?u=new Pce(t,d.endLine===void 0?d.line:{column:d.column,line:d.line},d.endLine===void 0?d.column:{column:d.endColumn,line:d.endLine},d.source,d.file,n.plugin):u=new Pce(t,s===void 0?o:{column:r,line:o},s===void 0?r:{column:i,line:s},this.css,this.file,n.plugin),u.input={column:r,endColumn:i,endLine:s,endOffset:a,line:o,offset:l,source:this.css},this.file&&(iA&&(u.input.url=iA(this.file).toString()),u.input.file=this.file),u}fromLineAndColumn(t,o){return Oce(this)[t-1]+o-1}fromOffset(t){let o=Oce(this),r=o[o.length-1],n=0;if(t>=r)n=o.length-1;else{let i=o.length-2,s;for(;n<i;)if(s=n+(i-n>>1),t<o[s])i=s-1;else if(t>=o[s+1])n=s+1;else{n=s;break}}return{col:t-o[n]+1,line:n+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:B7(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-1,line:t});if(!s.source)return!1;let a;typeof r=="number"&&(a=i.originalPositionFor({column:n-1,line:r}));let l;R7(s.source)?l=iA(s.source):l=new URL(s.source,this.map.consumer().sourceRoot||iA(this.map.mapFile));let u={column:s.column+1,endColumn:a&&a.column+1,endLine:a&&a.line,line:s.line,url:l.toString()};if(l.protocol==="file:")if(Bce)u.file=Bce(l);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}};Ace.exports=nS;nS.default=nS;E7&&E7.registerInput&&E7.registerInput(nS)});var O7=ke((HAt,Fce)=>{"use strict";var{dirname:sA,relative:Mce,resolve:Nce,sep:Dce}=rA(),{SourceMapConsumer:Vce,SourceMapGenerator:aA}=nA(),{pathToFileURL:Lce}=w7(),fje=P7(),pje=!!(Vce&&aA),mje=!!(sA&&Nce&&Mce&&Dce),I7=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||sA(t.file),n;this.mapOpts.sourcesContent===!1?(n=new Vce(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.startsWith("# sourceMappingURL=")&&this.root.removeChild(o)}else if(this.css){let t;for(;(t=this.css.lastIndexOf("/*#"))!==-1;){let o=this.css.indexOf("*/",t+3);if(o===-1)break;for(;t>0&&this.css[t-1]===`
`;)t--;this.css=this.css.slice(0,t)+this.css.slice(o+2)}}}}generate(){if(this.clearAnnotation(),mje&&pje&&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=aA.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new aA({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 aA({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,l,u)=>{if(this.css+=a,l&&u!=="end"&&(n.generated.line=t,n.generated.column=o-1,l.source&&l.source.start?(n.source=this.sourcePath(l),n.original.line=l.source.start.line,n.original.column=l.source.start.column-1,this.map.addMapping(n)):(n.source=r,n.original.line=1,n.original.column=0,this.map.addMapping(n))),s=a.match(/\n/g),s?(t+=s.length,i=a.lastIndexOf(`
`),o=a.length-i):o+=a.length,l&&u!=="start"){let d=l.parent||{raws:{}};(!(l.type==="decl"||l.type==="atrule"&&!l.nodes)||l!==d.last||d.raws.semicolon)&&(l.source&&l.source.end?(n.source=this.sourcePath(l),n.original.line=l.source.end.line,n.original.column=l.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?sA(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=sA(Nce(r,this.mapOpts.annotation)));let n=Mce(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 fje(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(Lce){let r=Lce(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;Dce==="\\"&&(t=t.replace(/\\/g,"/"));let r=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,r),r}};Fce.exports=I7});var Hce=ke((UAt,jce)=>{"use strict";var zce=Nh(),iS=class extends zce{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)}};jce.exports=iS;iS.default=iS;zce.registerAtRule(iS)});var lA=ke((GAt,$ce)=>{"use strict";var Uce=Nh(),Gce,Wce,Dp=class extends Uce{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 Gce(new Wce,this,t).stringify()}};Dp.registerLazyResult=e=>{Gce=e};Dp.registerProcessor=e=>{Wce=e};$ce.exports=Dp;Dp.default=Dp;Uce.registerRoot(Dp)});var Yce=ke((WAt,Kce)=>{"use strict";var K0={comma(e){return K0.split(e,[","],!0)},space(e){let t=[" ",`
`," "];return K0.split(e,t)},split(e,t,o){let r=[],n="",i=!1,s=0,a=!1,l="",u=!1;for(let d of e)u?u=!1:d==="\\"?u=!0:a?d===l&&(a=!1):d==='"'||d==="'"?(a=!0,l=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}};Kce.exports=K0;K0.default=K0});var Xce=ke(($At,Zce)=>{"use strict";var qce=Nh(),gje=Yce(),sS=class extends qce{get selectors(){return gje.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)}constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}};Zce.exports=sS;sS.default=sS;qce.registerRule(sS)});var eue=ke((KAt,Jce)=>{"use strict";var cA=/[\t\n\f\r "#'()/;[\\\]{}]/g,uA=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,hje=/.[\r\n"'(/\\]/,Qce=/[\da-f]/i;Jce.exports=function(t,o={}){let r=t.css.valueOf(),n=o.ignoreErrors,i,s,a,l,u,d,f,p,g,m,h=r.length,b=0,v=[],y=[],k=-1;function S(){return b}function _(B){throw t.error("Unclosed "+B,b)}function x(){return y.length===0&&b>=h}function w(B){if(y.length)return y.pop();if(b>=h)return;let R=B?B.ignoreUnclosed:!1;switch(i=r.charCodeAt(b),i){case 10:case 32:case 9:case 13:case 12:{l=b;do l+=1,i=r.charCodeAt(l);while(i===32||i===10||i===9||i===13||i===12);d=["space",r.slice(b,l)],b=l-1;break}case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let A=String.fromCharCode(i);d=[A,A,b];break}case 40:{if(m=v.length?v.pop()[1]:"",g=r.charCodeAt(b+1),m==="url"&&g!==39&&g!==34&&g!==32&&g!==10&&g!==9&&g!==12&&g!==13){l=b;do{if(f=!1,l=r.indexOf(")",l+1),l===-1)if(n||R){l=b;break}else _("bracket");for(p=l;r.charCodeAt(p-1)===92;)p-=1,f=!f}while(f);d=["brackets",r.slice(b,l+1),b,l],b=l}else b<=k?d=["(","(",b]:(l=r.indexOf(")",b+1),s=r.slice(b,l+1),l===-1||hje.test(s)?(k=l===-1?h:l,d=["(","(",b]):(d=["brackets",s,b,l],b=l));break}case 39:case 34:{u=i===39?"'":'"',l=b;do{if(f=!1,l=r.indexOf(u,l+1),l===-1)if(n||R){l=b+1;break}else _("string");for(p=l;r.charCodeAt(p-1)===92;)p-=1,f=!f}while(f);d=["string",r.slice(b,l+1),b,l],b=l;break}case 64:{cA.lastIndex=b+1,cA.test(r),cA.lastIndex===0?l=r.length-1:l=cA.lastIndex-2,d=["at-word",r.slice(b,l+1),b,l],b=l;break}case 92:{for(l=b,a=!0;r.charCodeAt(l+1)===92;)l+=1,a=!a;if(i=r.charCodeAt(l+1),a&&i!==47&&i!==32&&i!==10&&i!==9&&i!==13&&i!==12&&(l+=1,Qce.test(r.charAt(l)))){for(;Qce.test(r.charAt(l+1));)l+=1;r.charCodeAt(l+1)===32&&(l+=1)}d=["word",r.slice(b,l+1),b,l],b=l;break}default:{i===47&&r.charCodeAt(b+1)===42?(l=r.indexOf("*/",b+2)+1,l===0&&(n||R?l=r.length:_("comment")),d=["comment",r.slice(b,l+1),b,l],b=l):(uA.lastIndex=b+1,uA.test(r),uA.lastIndex===0?l=r.length-1:l=uA.lastIndex-2,d=["word",r.slice(b,l+1),b,l],v.push(d),b=l);break}}return b++,d}function T(B){y.push(B)}return{back:T,endOfFile:x,nextToken:w,position:S}}});var nue=ke((YAt,rue)=>{"use strict";var bje=Hce(),yje=v7(),vje=S7(),Sje=lA(),tue=Xce(),kje=eue(),oue={empty:!0,space:!0};function _je(e){for(let t=e.length-1;t>=0;t--){let o=e[t],r=o[3]||o[2];if(r)return r}}function A7(e,t,o){let r="";for(let n=t;n<o;n++)r+=e[n][1];return r}var L7=class{constructor(t){this.input=t,this.root=new Sje,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 bje;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,l=[],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(l.length>0){for(i=l.length-1,n=l[i];n&&n[0]==="space";)n=l[--i];n&&(o.source.end=this.getPosition(n[3]||n[2]),o.source.end.offset++)}this.end(t);break}else l.push(t);else l.push(t);if(this.tokenizer.endOfFile()){s=!0;break}}o.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(o.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(o,"params",l),s&&(t=l[l.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(n=a,i=n[0],i==="("&&(o+=1),i===")"&&(o-=1),o===0&&i===":")if(!r)this.doubleColon(n);else{if(r[0]==="word"&&r[1]==="progid")continue;return s}r=n}return!1}comment(t){let o=new yje;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(!r.trim())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=kje(this.input)}decl(t,o){let r=new vje;this.init(r,t[0][2]);let n=t[t.length-1];n[0]===";"&&(this.semicolon=!0,t.pop()),r.source.end=this.getPosition(n[3]||n[2]||_je(t)),r.source.end.offset++;let i=0;for(;t[i][0]!=="word";)i===t.length-1&&this.unknownWord([t[i]]),i++;r.raws.before+=A7(t,0,i),r.source.start=this.getPosition(t[i][2]);let s=i;for(;i<t.length;){let p=t[i][0];if(p===":"||p==="space"||p==="comment")break;i++}r.prop=A7(t,s,i);let a=i,l;for(;i<t.length&&(l=t[i],i++,l[0]!==":");)l[0]==="word"&&/\w/.test(l[1])&&this.unknownWord([l]);r.raws.between=A7(t,a,i),(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let u=i;for(;i<t.length;){let p=t[i][0];if(p!=="space"&&p!=="comment")break;i++}let d=t.slice(u,i);t=t.slice(i),this.precheckMissedSemicolon(t);for(let p=t.length-1;p>=0;p--){if(l=t[p],l[1].toLowerCase()==="!important"){r.important=!0;let g=this.stringFrom(t,p);g=this.spacesFromEnd(t)+g,g!==" !important"&&(r.raws.important=g);break}else if(l[1].toLowerCase()==="important"){let g=t.slice(0),m="";for(let h=p;h>0;h--){let b=g[h][0];if(m.trim().startsWith("!")&&b!=="space")break;m=g.pop()[1]+m}m.trim().startsWith("!")&&(r.important=!0,r.raws.important=m,t=g)}if(l[0]!=="space"&&l[0]!=="comment")break}t.some(p=>p[0]!=="space"&&p[0]!=="comment")&&(r.raws.between+=d.map(p=>p[1]).join(""),d=[]),this.raw(r,"value",d.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 tue;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="",o.source.end=this.getPosition(t[2]),o.source.end.offset+=o.raws.ownSemicolon.length)}}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("--"),l=[],u=t;for(;u;){if(r=u[0],l.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(l,a);return}else break;else if(r==="{"){this.rule(l);return}else if(r==="}"){this.tokenizer.back(l.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(;l.length&&(u=l[l.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(l.pop());this.decl(l,a)}else this.unknownWord(l)}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,l="",u=!0,d,f;for(let p=0;p<a;p+=1)i=r[p],s=i[0],s==="space"&&p===a-1&&!n?u=!1:s==="comment"?(f=r[p-1]?r[p-1][0]:"empty",d=r[p+1]?r[p+1][0]:"empty",!oue[f]&&!oue[d]?l.slice(-1)===","?u=!1:l+=i[1]:u=!1):l+=i[1];if(!u){let p=r.reduce((g,m)=>g+m[1],"");t.raws[o]={raw:p,value:l}}t[o]=l}rule(t){t.pop();let o=new tue;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 "+t[0][1],{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})}};rue.exports=L7});var M7=ke((qAt,iue)=>{"use strict";var xje=Nh(),wje=P7(),Cje=nue();function dA(e,t){let o=new wje(e,t),r=new Cje(o);try{r.parse()}catch(n){throw n}return r.root}iue.exports=dA;dA.default=dA;xje.registerParse(dA)});var aue=ke((ZAt,sue)=>{"use strict";var Y0=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}};sue.exports=Y0;Y0.default=Y0});var N7=ke((XAt,lue)=>{"use strict";var Eje=aue(),q0=class{get content(){return this.css}constructor(t,o,r){this.processor=t,this.messages=[],this.root=o,this.opts=r,this.css="",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 Eje(t,o);return this.messages.push(r),r}warnings(){return this.messages.filter(t=>t.type==="warning")}};lue.exports=q0;q0.default=q0});var D7=ke((QAt,uue)=>{"use strict";var cue={};uue.exports=function(t){cue[t]||(cue[t]=!0,typeof console<"u"&&console.warn&&console.warn(t))}});var gue=ke((e2t,mue)=>{"use strict";var Tje=Nh(),Rje=x7(),Bje=O7(),Pje=M7(),due=N7(),Ije=lA(),Oje=eA(),{isClean:Xc,my:Aje}=tA(),JAt=D7(),Lje={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Mje={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},Nje={Once:!0,postcssPlugin:!0,prepare:!0},aS=0;function Z0(e){return typeof e=="object"&&typeof e.then=="function"}function pue(e){let t=!1,o=Lje[e.type];return e.type==="decl"?t=e.prop.toLowerCase():e.type==="atrule"&&(t=e.name.toLowerCase()),t&&e.append?[o,o+"-"+t,aS,o+"Exit",o+"Exit-"+t]:t?[o,o+"-"+t,o+"Exit",o+"Exit-"+t]:e.append?[o,aS,o+"Exit"]:[o,o+"Exit"]}function fue(e){let t;return e.type==="document"?t=["Document",aS,"DocumentExit"]:e.type==="root"?t=["Root",aS,"RootExit"]:t=pue(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function V7(e){return e[Xc]=!1,e.nodes&&e.nodes.forEach(t=>V7(t)),e}var F7={},Vp=class e{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"}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=V7(o);else if(o instanceof e||o instanceof due)n=V7(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=Pje;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[Aje]&&Tje.rebuild(n)}this.result=new due(t,n,r),this.helpers={...F7,postcss:F7,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(!Mje[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${o.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Nje[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(Z0(r))try{await r}catch(n){throw this.handleError(n)}}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[Xc];){t[Xc]=!0;let o=[fue(t)];for(;o.length>0;){let r=this.visitTick(o);if(Z0(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 Z0(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=Oje;t.syntax&&(o=t.syntax.stringify),t.stringifier&&(o=t.stringifier),o.stringify&&(o=o.stringify);let r=this.result.root.source;if(t.map===void 0&&!(r&&r.input&&r.input.map)){let s="";return o(this.result.root,a=>{s+=a}),this.result.css=s,this.result}let i=new Bje(o,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[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(Z0(o))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[Xc];)t[Xc]=!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(Z0(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(l){throw this.handleError(l,r)}}if(o.iterator!==0){let s=o.iterator,a;for(;a=r.nodes[r.indexes[s]];)if(r.indexes[s]+=1,!a[Xc]){a[Xc]=!0,t.push(fue(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===aS){r.nodes&&r.nodes.length&&(r[Xc]=!0,o.iterator=r.getIterator());return}else if(this.listeners[s]){o.visitors=this.listeners[s];return}}t.pop()}walkSync(t){t[Xc]=!0;let o=pue(t);for(let r of o)if(r===aS)t.nodes&&t.each(n=>{n[Xc]||this.walkSync(n)});else{let n=this.listeners[r];if(n&&this.visitSync(n,t.toProxy()))return}}warnings(){return this.sync().warnings()}};Vp.registerPostcss=e=>{F7=e};mue.exports=Vp;Vp.default=Vp;Ije.registerLazyResult(Vp);Rje.registerLazyResult(Vp)});var bue=ke((o2t,hue)=>{"use strict";var Dje=O7(),Vje=M7(),Fje=N7(),zje=eA(),t2t=D7(),X0=class{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=Vje;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"}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=zje;this.result=new Fje(this._processor,void 0,this._opts),this.result.css=o;let i=this;Object.defineProperty(this.result,"root",{get(){return i.root}});let s=new Dje(n,void 0,this._opts,o);if(s.isMap()){let[a,l]=s.generate();a&&(this.result.css=a),l&&(this.result.map=l)}else s.clearAnnotation(),this.result.css=s.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[]}};hue.exports=X0;X0.default=X0});var vue=ke((r2t,yue)=>{"use strict";var jje=x7(),Hje=gue(),Uje=bue(),Gje=lA(),Vh=class{constructor(t=[]){this.version="8.5.16",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 Uje(this,t,o):new Hje(this,t,o)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}};yue.exports=Vh;Vh.default=Vh;Gje.registerProcessor(Vh);jje.registerProcessor(Vh)});var _ue=ke((n2t,kue)=>{kue.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&&Sue(s.source.input.file,n)||i.length&&s.source.input.file&&!Sue(s.source.input.file,i)||s.walkRules(a=>{let l=["keyframes","-webkit-keyframes","-moz-keyframes","-o-keyframes","-ms-keyframes"];a.parent&&l.includes(a.parent.name)||(a.selectors=a.selectors.map(u=>t.exclude&&Wje(u,t.exclude)?u:t.transform?t.transform(o,u,r+u,s.source.input.file,a):r+u))})}};function Sue(e,t){return t.some(o=>o instanceof RegExp?o.test(e):e.includes(o))}function Wje(e,t){return t.some(o=>o instanceof RegExp?o.test(e):e===o)}});var wue=ke((i2t,xue)=>{var z7=40,j7=41,fA=39,H7=34,U7=92,lS=47,G7=44,W7=58,pA=42,$je=117,Kje=85,Yje=43,qje=/^[a-f0-9?-]+$/i;xue.exports=function(e){for(var t=[],o=e,r,n,i,s,a,l,u,d,f=0,p=o.charCodeAt(f),g=o.length,m=[{nodes:t}],h=0,b,v="",y="",k="";f<g;)if(p<=32){r=f;do r+=1,p=o.charCodeAt(r);while(p<=32);s=o.slice(f,r),i=t[t.length-1],p===j7&&h?k=s:i&&i.type==="div"?(i.after=s,i.sourceEndIndex+=s.length):p===G7||p===W7||p===lS&&o.charCodeAt(r+1)!==pA&&(!b||b&&b.type==="function"&&b.value!=="calc")?y=s:t.push({type:"space",sourceIndex:f,sourceEndIndex:r,value:s}),f=r}else if(p===fA||p===H7){r=f,n=p===fA?"'":'"',s={type:"string",sourceIndex:f,quote:n};do if(a=!1,r=o.indexOf(n,r+1),~r)for(l=r;o.charCodeAt(l-1)===U7;)l-=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,p=o.charCodeAt(f)}else if(p===lS&&o.charCodeAt(f+1)===pA)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,p=o.charCodeAt(f);else if((p===lS||p===pA)&&b&&b.type==="function"&&b.value==="calc")s=o[f],t.push({type:"word",sourceIndex:f-y.length,sourceEndIndex:f+s.length,value:s}),f+=1,p=o.charCodeAt(f);else if(p===lS||p===G7||p===W7)s=o[f],t.push({type:"div",sourceIndex:f-y.length,sourceEndIndex:f+s.length,value:s,before:y,after:""}),y="",f+=1,p=o.charCodeAt(f);else if(z7===p){r=f;do r+=1,p=o.charCodeAt(r);while(p<=32);if(d=f,s={type:"function",sourceIndex:f-v.length,value:v,before:o.slice(d+1,r)},f=r,v==="url"&&p!==fA&&p!==H7){r-=1;do if(a=!1,r=o.indexOf(")",r+1),~r)for(l=r;o.charCodeAt(l-1)===U7;)l-=1,a=!a;else o+=")",r=o.length-1,s.unclosed=!0;while(a);u=r;do u-=1,p=o.charCodeAt(u);while(p<=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,p=o.charCodeAt(f),t.push(s)}else h+=1,s.after="",s.sourceEndIndex=f+1,t.push(s),m.push(s),t=s.nodes=[],b=s;v=""}else if(j7===p&&h)f+=1,p=o.charCodeAt(f),b.after=k,b.sourceEndIndex+=k.length,k="",h-=1,m[m.length-1].sourceEndIndex=f,m.pop(),b=m[h],t=b.nodes;else{r=f;do p===U7&&(r+=1),r+=1,p=o.charCodeAt(r);while(r<g&&!(p<=32||p===fA||p===H7||p===G7||p===W7||p===lS||p===z7||p===pA&&b&&b.type==="function"&&b.value==="calc"||p===lS&&b.type==="function"&&b.value==="calc"||p===j7&&h));s=o.slice(f,r),z7===p?v=s:($je===s.charCodeAt(0)||Kje===s.charCodeAt(0))&&Yje===s.charCodeAt(1)&&qje.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=m.length-1;f;f-=1)m[f].unclosed=!0,m[f].sourceEndIndex=o.length;return m[0].nodes}});var Eue=ke((s2t,Cue)=>{Cue.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 Pue=ke((a2t,Bue)=>{function Tue(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=Rue(e.nodes,t),o!=="function"?n:r+"("+(e.before||"")+n+(e.after||"")+(e.unclosed?"":")")):r}function Rue(e,t){var o,r;if(Array.isArray(e)){for(o="",r=e.length-1;~r;r-=1)o=Tue(e[r],t)+o;return o}return Tue(e,t)}Bue.exports=Rue});var Oue=ke((l2t,Iue)=>{var mA=45,gA=43,$7=46,Zje=101,Xje=69;function Qje(e){var t=e.charCodeAt(0),o;if(t===gA||t===mA){if(o=e.charCodeAt(1),o>=48&&o<=57)return!0;var r=e.charCodeAt(2);return o===$7&&r>=48&&r<=57}return t===$7?(o=e.charCodeAt(1),o>=48&&o<=57):t>=48&&t<=57}Iue.exports=function(e){var t=0,o=e.length,r,n,i;if(o===0||!Qje(e))return!1;for(r=e.charCodeAt(t),(r===gA||r===mA)&&t++;t<o&&(r=e.charCodeAt(t),!(r<48||r>57));)t+=1;if(r=e.charCodeAt(t),n=e.charCodeAt(t+1),r===$7&&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===Zje||r===Xje)&&(n>=48&&n<=57||(n===gA||n===mA)&&i>=48&&i<=57))for(t+=n===gA||n===mA?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 Nue=ke((c2t,Mue)=>{var Jje=wue(),Aue=Eue(),Lue=Pue();function Fp(e){return this instanceof Fp?(this.nodes=Jje(e),this):new Fp(e)}Fp.prototype.toString=function(){return Array.isArray(this.nodes)?Lue(this.nodes):""};Fp.prototype.walk=function(e,t){return Aue(this.nodes,e,t),this};Fp.unit=Oue();Fp.walk=Aue;Fp.stringify=Lue;Mue.exports=Fp});var Vue=ke((u2t,K7)=>{var Due=Nue();K7.exports=e=>{let o=Object.assign({skipHostRelativeUrls:!0},e);return{postcssPlugin:"rebaseUrl",Declaration(r){let n=Due(r.value),i=!1;n.walk(s=>{if(s.type!=="function"||s.value!=="url")return;let a=s.nodes[0].value,l=new URL(a,e.rootUrl);return l.pathname===a&&o.skipHostRelativeUrls||(s.nodes[0].value=l.toString(),i=!0),!1}),i&&(r.value=Due.stringify(n))}}};K7.exports.postcss=!0});var Xue=ke((w2t,Zue)=>{Zue.exports=window.wp.priorityQueue});var dU=ke((yMt,Xde)=>{Xde.exports=window.wp.blob});var mC=ke((qDt,lpe)=>{lpe.exports=window.wp.isShallowEqual});var fL=ke((l4t,Jge)=>{Jge.exports=window.wp.tokenList});var abe=ke((wzt,sbe)=>{sbe.exports=window.wp.commands});var du=ke((e7t,_ve)=>{_ve.exports=window.wp.date});var Qve=ke((H7t,Xve)=>{var $ve=!1,xb,nG,iG,CM,EM,Kve,TM,sG,aG,lG,Yve,cG,uG,qve,Zve;function vs(){if(!$ve){$ve=!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(cG=/\b(iPhone|iP[ao]d)/.exec(e),uG=/\b(iP[ao]d)/.exec(e),lG=/Android/i.exec(e),qve=/FBAN\/\w+;/i.exec(e),Zve=/Mobile/i.exec(e),Yve=!!/Win64/.exec(e),t){xb=t[1]?parseFloat(t[1]):t[5]?parseFloat(t[5]):NaN,xb&&document&&document.documentMode&&(xb=document.documentMode);var r=/(?:Trident\/(\d+.\d+))/.exec(e);Kve=r?parseFloat(r[1])+4:xb,nG=t[2]?parseFloat(t[2]):NaN,iG=t[3]?parseFloat(t[3]):NaN,CM=t[4]?parseFloat(t[4]):NaN,CM?(t=/(?:Chrome\/(\d+\.\d+))/.exec(e),EM=t&&t[1]?parseFloat(t[1]):NaN):EM=NaN}else xb=nG=iG=EM=CM=NaN;if(o){if(o[1]){var n=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);TM=n?parseFloat(n[1].replace("_",".")):!0}else TM=!1;sG=!!o[2],aG=!!o[3]}else TM=sG=aG=!1}}var dG={ie:function(){return vs()||xb},ieCompatibilityMode:function(){return vs()||Kve>xb},ie64:function(){return dG.ie()&&Yve},firefox:function(){return vs()||nG},opera:function(){return vs()||iG},webkit:function(){return vs()||CM},safari:function(){return dG.webkit()},chrome:function(){return vs()||EM},windows:function(){return vs()||sG},osx:function(){return vs()||TM},linux:function(){return vs()||aG},iphone:function(){return vs()||cG},mobile:function(){return vs()||cG||uG||lG||Zve},nativeApp:function(){return vs()||qve},android:function(){return vs()||lG},ipad:function(){return vs()||uG}};Xve.exports=dG});var eSe=ke((U7t,Jve)=>{"use strict";var RM=!!(typeof window<"u"&&window.document&&window.document.createElement),cGe={canUseDOM:RM,canUseWorkers:typeof Worker<"u",canUseEventListeners:RM&&!!(window.addEventListener||window.attachEvent),canUseViewport:RM&&!!window.screen,isInWorker:!RM};Jve.exports=cGe});var nSe=ke((G7t,rSe)=>{"use strict";var tSe=eSe(),oSe;tSe.canUseDOM&&(oSe=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0);function uGe(e,t){if(!tSe.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&&oSe&&e==="wheel"&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}rSe.exports=uGe});var uSe=ke((W7t,cSe)=>{"use strict";var dGe=Qve(),fGe=nSe(),iSe=10,sSe=40,aSe=800;function lSe(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*iSe,n=o*iSe,"deltaY"in e&&(n=e.deltaY),"deltaX"in e&&(r=e.deltaX),(r||n)&&e.deltaMode&&(e.deltaMode==1?(r*=sSe,n*=sSe):(r*=aSe,n*=aSe)),r&&!t&&(t=r<1?-1:1),n&&!o&&(o=n<1?-1:1),{spinX:t,spinY:o,pixelX:r,pixelY:n}}lSe.getEventType=function(){return dGe.firefox()?"DOMMouseScroll":fGe("wheel")?"wheel":"mousewheel"};cSe.exports=lSe});var fSe=ke(($7t,dSe)=>{dSe.exports=uSe()});var Uke=ke((V9t,Hke)=>{"use strict";Hke.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 ZQe={};Cr(ZQe,{AlignmentControl:()=>mB,AlignmentToolbar:()=>wZ,Autocomplete:()=>UZ,BlockAlignmentControl:()=>OB,BlockAlignmentToolbar:()=>dX,BlockBindingsAttributeControl:()=>dw,BlockBindingsSourceFieldsList:()=>uw,BlockBreadcrumb:()=>LX,BlockCanvas:()=>fbe,BlockColorsStyleSelector:()=>hbe,BlockContextProvider:()=>E1,BlockControls:()=>Po,BlockEdit:()=>aB,BlockEditorKeyboardShortcuts:()=>DO,BlockEditorProvider:()=>ale,BlockFormatControls:()=>UU,BlockIcon:()=>Ct,BlockInspector:()=>DCe,BlockList:()=>dS,BlockMover:()=>A2,BlockNavigationDropdown:()=>Cye,BlockPopover:()=>Gfe,BlockPreview:()=>us,BlockSelectionClearer:()=>rpe,BlockSettingsMenu:()=>iL,BlockSettingsMenuControls:()=>eL,BlockStyles:()=>yk,BlockTitle:()=>pw,BlockToolbar:()=>Whe,BlockTools:()=>jC,BlockVerticalAlignmentControl:()=>TB,BlockVerticalAlignmentToolbar:()=>Kye,ButtonBlockAppender:()=>Yp,ButtonBlockerAppender:()=>Lfe,ColorPalette:()=>gve,ColorPaletteControl:()=>yve,ContrastChecker:()=>kve,CopyHandler:()=>zCe,DefaultBlockAppender:()=>AS,DimensionControl:()=>_b,FontSizePicker:()=>L6,HeadingLevelDropdown:()=>Lye,HeightControl:()=>Wve,InnerBlocks:()=>hC,Inserter:()=>za,InspectorAdvancedControls:()=>Jp,InspectorControls:()=>Oe,JustifyContentControl:()=>Ky,JustifyToolbar:()=>oke,LineHeightControl:()=>XM,LinkControl:()=>Pm,MediaPlaceholder:()=>x_e,MediaReplaceFlow:()=>Vk,MediaUpload:()=>tu,MediaUploadCheck:()=>Ws,MultiSelectScrollIntoView:()=>GCe,NavigableToolbar:()=>ZS,ObserveTyping:()=>ibe,PanelColorSettings:()=>C_e,PlainText:()=>Ixe,RecursionProvider:()=>e$,RichText:()=>Wk,RichTextShortcut:()=>wxe,RichTextToolbarButton:()=>YG,SETTINGS_DEFAULTS:()=>tx,SkipToSelectedBlock:()=>wN,ToolSelector:()=>tEe,Typewriter:()=>KCe,URLInput:()=>Rm,URLInputButton:()=>Fxe,URLPopover:()=>Am,Warning:()=>$f,WritingFlow:()=>qO,__experimentalBlockAlignmentMatrixControl:()=>EX,__experimentalBlockFullHeightAligmentControl:()=>_X,__experimentalBlockPatternSetup:()=>Gye,__experimentalBlockPatternsList:()=>Jc,__experimentalBlockVariationPicker:()=>Mye,__experimentalBlockVariationTransforms:()=>eM,__experimentalBorderRadiusControl:()=>sM,__experimentalColorGradientControl:()=>_m,__experimentalColorGradientSettingsDropdown:()=>kM,__experimentalDateFormatPicker:()=>xve,__experimentalDuotoneControl:()=>cM,__experimentalFontAppearanceControl:()=>dM,__experimentalFontFamilyControl:()=>fM,__experimentalGetBorderClassesAndStyles:()=>E5,__experimentalGetColorClassesAndStyles:()=>T5,__experimentalGetDimensionsClassesAndStyles:()=>C5,__experimentalGetElementClassName:()=>$Qe,__experimentalGetGapCSSValue:()=>Si,__experimentalGetGradientClass:()=>jy,__experimentalGetGradientObjectByGradientValue:()=>mZ,__experimentalGetShadowClassesAndStyles:()=>kK,__experimentalGetSpacingClassesAndStyles:()=>wK,__experimentalImageEditor:()=>qSe,__experimentalImageSizeControl:()=>JSe,__experimentalImageURLInputUI:()=>$xe,__experimentalInspectorPopoverHeader:()=>VD,__experimentalLetterSpacingControl:()=>mM,__experimentalLibrary:()=>HCe,__experimentalLinkControl:()=>ZM,__experimentalLinkControlSearchInput:()=>Tke,__experimentalLinkControlSearchItem:()=>mke,__experimentalLinkControlSearchResults:()=>Ske,__experimentalListView:()=>ZL,__experimentalPanelColorGradientSettings:()=>xM,__experimentalPreviewOptions:()=>lwe,__experimentalPublishDateTimePicker:()=>QCe,__experimentalRecursionProvider:()=>YCe,__experimentalResponsiveBlockControl:()=>Mxe,__experimentalSpacingSizesControl:()=>Xk,__experimentalTextDecorationControl:()=>hM,__experimentalTextTransformControl:()=>yM,__experimentalUnitControl:()=>Dxe,__experimentalUseBlockOverlayActive:()=>NX,__experimentalUseBlockPreview:()=>ode,__experimentalUseBorderProps:()=>SK,__experimentalUseColorProps:()=>xK,__experimentalUseCustomSides:()=>Z$,__experimentalUseGradient:()=>PMe,__experimentalUseHasRecursion:()=>qCe,__experimentalUseMultipleOriginColorsAndGradients:()=>wm,__experimentalUseResizeCanvas:()=>uwe,__experimentalWritingModeControl:()=>SM,__unstableBlockSettingsMenuFirstItem:()=>U2,__unstableBlockToolbarLastItem:()=>V2,__unstableEditorStyles:()=>gd,__unstableIframe:()=>rS,__unstableInserterMenuExtension:()=>DA,__unstableRichTextInputEvent:()=>Cxe,__unstableUseBlockSelectionClearer:()=>qh,__unstableUseClipboardHandler:()=>FCe,__unstableUseMouseMoveTypingReset:()=>UC,__unstableUseTypewriter:()=>XW,__unstableUseTypingObserver:()=>GC,createCustomColorsHOC:()=>fZ,getColorClassName:()=>ma,getColorObjectByAttributeValues:()=>wc,getColorObjectByColorValue:()=>w1,getComputedFluidTypographyValue:()=>bZ,getCustomValueFromPreset:()=>$Z,getDimensionsClassesAndStyles:()=>C5,getFontSize:()=>Hy,getFontSizeClass:()=>Kf,getFontSizeObjectByValue:()=>A6,getGradientSlugByValue:()=>gZ,getGradientValueBySlug:()=>fB,getPxFromCssUnit:()=>XBe,getSpacingPresetCssVar:()=>Cl,getTypographyClassesAndStyles:()=>CK,isValueSpacingPreset:()=>EB,privateApis:()=>MK,store:()=>C,storeConfig:()=>Vy,transformStyles:()=>cS,useBlockBindingsUtils:()=>Ju,useBlockCommands:()=>AL,useBlockDisplayInformation:()=>Oo,useBlockEditContext:()=>ht,useBlockEditingMode:()=>yr,useBlockProps:()=>Dw,useCachedTruthy:()=>EK,useHasRecursion:()=>t$,useInnerBlocksProps:()=>eb,useSetting:()=>lZ,useSettings:()=>Me,useStyleOverride:()=>hs,withColorContext:()=>aM,withColors:()=>pZ,withFontSizes:()=>_Z});function DK(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=DK(e[t]))&&(r&&(r+=" "),r+=o)}else for(o in e)e[o]&&(r&&(r+=" "),r+=o);return r}function wPe(){for(var e,t,o=0,r="",n=arguments.length;o<n;o++)(e=arguments[o])&&(t=DK(e))&&(r&&(r+=" "),r+=t);return r}var W=wPe;var oEe=c(ce(),1),cl=c(F(),1),zD=c(Z(),1),i$=c(fe(),1),FE=c(uo(),1);var v1=c(F(),1),yl=Symbol("mayDisplayControls"),dy=Symbol("mayDisplayParentControls"),Tf=Symbol("mayDisplayPatternEditingControls"),S1=Symbol("blockEditingMode"),fy=Symbol("blockBindings"),k1=Symbol("isPreviewMode"),Z_=Symbol("isInListViewBlockSupportTree"),M5={name:"",isSelected:!1},N5=(0,v1.createContext)(M5);N5.displayName="BlockEditContext";var{Provider:_1}=N5;function ht(){return(0,v1.useContext)(N5)}var CPe={grad:.9,turn:360,rad:360/(2*Math.PI)},Fu=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},pn=function(e,t,o){return t===void 0&&(t=0),o===void 0&&(o=Math.pow(10,t)),Math.round(o*e)/o+0},pa=function(e,t,o){return t===void 0&&(t=0),o===void 0&&(o=1),e>o?o:e>t?e:t},ZK=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},UK=function(e){return{r:pa(e.r,0,255),g:pa(e.g,0,255),b:pa(e.b,0,255),a:pa(e.a)}},D5=function(e){return{r:pn(e.r),g:pn(e.g),b:pn(e.b),a:pn(e.a,3)}},EPe=/^#([0-9a-f]{3,8})$/i,x1=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},XK=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}},QK=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),l=r*(1-(1-t+i)*o),u=i%6;return{r:255*[r,a,s,s,l,r][u],g:255*[l,r,r,a,s,s][u],b:255*[s,s,l,r,r,a][u],a:n}},GK=function(e){return{h:ZK(e.h),s:pa(e.s,0,100),l:pa(e.l,0,100),a:pa(e.a)}},WK=function(e){return{h:pn(e.h),s:pn(e.s),l:pn(e.l),a:pn(e.a,3)}},$K=function(e){return QK((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},X_=function(e){return{h:(t=XK(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},TPe=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,RPe=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,BPe=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,PPe=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,z5={string:[[function(e){var t=EPe.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?pn(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?pn(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=BPe.exec(e)||PPe.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:UK({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=TPe.exec(e)||RPe.exec(e);if(!t)return null;var o,r,n=GK({h:(o=t[1],r=t[2],r===void 0&&(r="deg"),Number(o)*(CPe[r]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return $K(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 Fu(t)&&Fu(o)&&Fu(r)?UK({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(!Fu(t)||!Fu(o)||!Fu(r))return null;var s=GK({h:Number(t),s:Number(o),l:Number(r),a:Number(i)});return $K(s)},"hsl"],[function(e){var t=e.h,o=e.s,r=e.v,n=e.a,i=n===void 0?1:n;if(!Fu(t)||!Fu(o)||!Fu(r))return null;var s=(function(a){return{h:ZK(a.h),s:pa(a.s,0,100),v:pa(a.v,0,100),a:pa(a.a)}})({h:Number(t),s:Number(o),v:Number(r),a:Number(i)});return QK(s)},"hsv"]]},KK=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]},IPe=function(e){return typeof e=="string"?KK(e.trim(),z5.string):typeof e=="object"&&e!==null?KK(e,z5.object):[null,void 0]};var V5=function(e,t){var o=X_(e);return{h:o.h,s:pa(o.s+100*t,0,100),l:o.l,a:o.a}},F5=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},YK=function(e,t){var o=X_(e);return{h:o.h,s:o.s,l:pa(o.l+100*t,0,100),a:o.a}},j5=(function(){function e(t){this.parsed=IPe(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 pn(F5(this.rgba),2)},e.prototype.isDark=function(){return F5(this.rgba)<.5},e.prototype.isLight=function(){return F5(this.rgba)>=.5},e.prototype.toHex=function(){return t=D5(this.rgba),o=t.r,r=t.g,n=t.b,s=(i=t.a)<1?x1(pn(255*i)):"","#"+x1(o)+x1(r)+x1(n)+s;var t,o,r,n,i,s},e.prototype.toRgb=function(){return D5(this.rgba)},e.prototype.toRgbString=function(){return t=D5(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 WK(X_(this.rgba))},e.prototype.toHslString=function(){return t=WK(X_(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=XK(this.rgba),{h:pn(t.h),s:pn(t.s),v:pn(t.v),a:pn(t.a,3)};var t},e.prototype.invert=function(){return Bo({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),Bo(V5(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),Bo(V5(this.rgba,-t))},e.prototype.grayscale=function(){return Bo(V5(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),Bo(YK(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),Bo(YK(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"?Bo({r:(o=this.rgba).r,g:o.g,b:o.b,a:t}):pn(this.rgba.a,3);var o},e.prototype.hue=function(t){var o=X_(this.rgba);return typeof t=="number"?Bo({h:t,s:o.s,l:o.l,a:o.a}):pn(o.h)},e.prototype.isEqual=function(t){return this.toHex()===Bo(t).toHex()},e})(),Bo=function(e){return e instanceof j5?e:new j5(e)},qK=[],Rf=function(e){e.forEach(function(t){qK.indexOf(t)<0&&(t(j5,z5),qK.push(t))})};function Bf(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,l,u=r[this.toHex()];if(u)return u;if(s?.closest){var d=this.toRgb(),f=1/0,p="black";if(!i.length)for(var g in o)i[g]=new e(o[g]).toRgb();for(var m in o){var h=(a=d,l=i[m],Math.pow(a.r-l.r,2)+Math.pow(a.g-l.g,2)+Math.pow(a.b-l.b,2));h<f&&(f=h,p=m)}return p}},t.string.push([function(s){var a=s.toLowerCase(),l=a==="transparent"?"#0000":o[a];return l?new e(l).toRgb():null},"name"])}var H5=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},U5=function(e){return .2126*H5(e.r)+.7152*H5(e.g)+.0722*H5(e.b)};function py(e){e.prototype.luminance=function(){return t=U5(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,l,u=t instanceof e?t:new e(t);return i=this.rgba,s=u.toRgb(),a=U5(i),l=U5(s),o=a>l?(a+.05)/(l+.05):(l+.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 rY=c(H(),1);var tY=c(Q_(),1),{lock:oY,unlock:U}=(0,tY.__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");Rf([Bf,py]);var{kebabCase:OPe}=U(rY.privateApis),wc=(e,t,o)=>{if(t){let r=e?.find(n=>n.slug===t);if(r)return r}return{color:o}},w1=(e,t)=>e?.find(o=>o.color===t);function ma(e,t){if(!(!e||!t))return`has-${OPe(t)}-${e}`}function nY(e,t){let o=Bo(t),r=({color:i})=>o.contrast(i),n=Math.max(...e.map(r));return e.find(i=>r(i)===n).color}var lB=c(F(),1),Wg=c(fe(),1),uZ=c(H(),1);var sZ=c(Z(),1),aZ=c(Tt(),1);var sB=c(F(),1),iB=c(ce(),1);var zu=c(ce(),1),pY=c(H(),1),ex=c(Z(),1),xg=c(F(),1);var my=c(F(),1),aY=c(E(),1),C1=(0,my.createContext)({});C1.displayName="BlockContext";function E1({value:e,children:t}){let o=(0,my.useContext)(C1),r=(0,my.useMemo)(()=>({...o,...e}),[o,e]);return(0,aY.jsx)(C1.Provider,{value:r,children:t})}var Kn=C1;var gy=c(As(),1);function Sg(e){return e?.startsWith("#")&&(0,gy.isValidFragment)(e)}function kg(e){return e?.startsWith("/")||e?.startsWith("./")||e?.startsWith("../")}function _g(e){if(e.includes(" "))return!1;let o=(0,gy.getProtocol)(e),r=(0,gy.isValidProtocol)(o),n=APe(e),i=e?.startsWith("www.");return r||i||Sg(e)||n||kg(e)}function APe(e,t=6){let o=e.split(/[?#]/)[0];return new RegExp(`(?<=\\S)\\.(?:[a-zA-Z_]{2,${t}})(?:\\/|$)`).test(o)}var LPe="__default",cY="core/pattern-overrides",MPe={};function uY(e,t,o){let r;if(t)for(let[n,i]of Object.entries(e))t.includes(n)&&(r===void 0&&(r={}),r[n]=i);if(o)for(let n of o)n?.usesContext?.forEach(i=>{i in e&&(r===void 0&&(r={}),r[i]=e[i])});return r??MPe}function J_(e){return e?.[LPe]?.source===cY}function T1(e,t){if(!J_(e))return e;let o={};for(let r of t){let n=e[r]?e[r]:{source:cY};o[r]=n}return o}var dY=c(F(),1),Rn=(0,dY.createContext)({});Rn.displayName="PrivateBlockContext";var R1=c(E(),1),NPe=e=>{let{name:t}=e,o=(0,zu.getBlockType)(t);if(!o)return null;let r=o.edit||o.save;return(0,R1.jsx)(r,{...e})},fY=(0,pY.withFilters)("editor.BlockEdit")(NPe),DPe=e=>{let{name:t,clientId:o,attributes:r,setAttributes:n}=e,i=(0,ex.useRegistry)(),s=(0,zu.getBlockType)(t),a=(0,xg.useContext)(Kn),l=(0,ex.useSelect)(v=>U(v(zu.store)).getAllBlockBindingsSources(),[]),{bindableAttributes:u}=(0,xg.useContext)(Rn),{blockBindings:d,context:f,hasPatternOverrides:p}=(0,xg.useMemo)(()=>({blockBindings:T1(r?.metadata?.bindings,u),context:uY(a,s?.usesContext,r?.metadata?.bindings?Object.values(r.metadata.bindings).map(v=>l[v?.source]):void 0),hasPatternOverrides:J_(r?.metadata?.bindings)}),[s?.usesContext,a,r?.metadata?.bindings,u,l]),g=(0,ex.useSelect)(v=>{if(!d)return r;let y={},k=new Map;for(let[S,_]of Object.entries(d)){let{source:x,args:w}=_,T=l[x];!T||!u?.includes(S)||k.set(T,{...k.get(T),[S]:{args:w}})}if(k.size)for(let[S,_]of k){let x={};S.getValues?x=S.getValues({select:v,context:f,clientId:o,bindings:_}):Object.keys(_).forEach(w=>{x[w]=S.label});for(let[w,T]of Object.entries(x))w==="url"&&(!T||!_g(T))?y[w]=null:y[w]=T}return{...r,...y}},[r,u,d,o,f,l]),m=(0,xg.useCallback)(v=>{if(!d){n(v);return}i.batch(()=>{let y={...v},k=new Map;for(let[_,x]of Object.entries(y)){if(!d[_]||!u?.includes(_))continue;let w=d[_],T=l[w?.source];T?.setValues&&(k.set(T,{...k.get(T),[_]:{args:w.args,newValue:x}}),delete y[_])}if(k.size)for(let[_,x]of k)_.setValues({select:i.select,dispatch:i.dispatch,context:f,clientId:o,bindings:x});let S=!!f["pattern/overrides"];!(p&&S)&&Object.keys(y).length&&(p&&delete y.href,n(y))})},[u,d,o,f,p,n,l,i]);if(!s)return null;if(s.apiVersion>1)return(0,R1.jsx)(fY,{...e,attributes:g,context:f,setAttributes:m});let h=(0,zu.hasBlockSupport)(s,"className",!0)?(0,zu.getBlockDefaultClassName)(t):null,b=W(h,r?.className,e.className);return(0,R1.jsx)(fY,{...e,attributes:g,className:b,context:f,setAttributes:m})},mY=DPe;var rZ=c(ce(),1),O6=c(H(),1),nZ=c(Z(),1),nB=c(G(),1);var rB=c(Z(),1);var nx=c(wg(),1),$5=c(fe(),1),ix=c(Z(),1),CY=c(Tt(),1),D1=c(ce(),1);var Rt=c(G(),1),bY={insertUsage:{}},tx={alignWide:!1,supportsLayout:!0,colors:[{name:(0,Rt.__)("Black"),slug:"black",color:"#000000"},{name:(0,Rt.__)("Cyan bluish gray"),slug:"cyan-bluish-gray",color:"#abb8c3"},{name:(0,Rt.__)("White"),slug:"white",color:"#ffffff"},{name:(0,Rt.__)("Pale pink"),slug:"pale-pink",color:"#f78da7"},{name:(0,Rt.__)("Vivid red"),slug:"vivid-red",color:"#cf2e2e"},{name:(0,Rt.__)("Luminous vivid orange"),slug:"luminous-vivid-orange",color:"#ff6900"},{name:(0,Rt.__)("Luminous vivid amber"),slug:"luminous-vivid-amber",color:"#fcb900"},{name:(0,Rt.__)("Light green cyan"),slug:"light-green-cyan",color:"#7bdcb5"},{name:(0,Rt.__)("Vivid green cyan"),slug:"vivid-green-cyan",color:"#00d084"},{name:(0,Rt.__)("Pale cyan blue"),slug:"pale-cyan-blue",color:"#8ed1fc"},{name:(0,Rt.__)("Vivid cyan blue"),slug:"vivid-cyan-blue",color:"#0693e3"},{name:(0,Rt.__)("Vivid purple"),slug:"vivid-purple",color:"#9b51e0"}],fontSizes:[{name:(0,Rt._x)("Small","font size name"),size:13,slug:"small"},{name:(0,Rt._x)("Normal","font size name"),size:16,slug:"normal"},{name:(0,Rt._x)("Medium","font size name"),size:20,slug:"medium"},{name:(0,Rt._x)("Large","font size name"),size:36,slug:"large"},{name:(0,Rt._x)("Huge","font size name"),size:42,slug:"huge"}],imageDefaultSize:"large",imageSizes:[{slug:"thumbnail",name:(0,Rt.__)("Thumbnail")},{slug:"medium",name:(0,Rt.__)("Medium")},{slug:"large",name:(0,Rt.__)("Large")},{slug:"full",name:(0,Rt.__)("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,Rt.__)("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,Rt.__)("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,Rt.__)("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,Rt.__)("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,Rt.__)("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,Rt.__)("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,Rt.__)("Blush light purple"),gradient:"linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)",slug:"blush-light-purple"},{name:(0,Rt.__)("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,Rt.__)("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,Rt.__)("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,Rt.__)("Electric grass"),gradient:"linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%)",slug:"electric-grass"},{name:(0,Rt.__)("Midnight"),gradient:"linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%)",slug:"midnight"}],__unstableResolvedAssets:{styles:[],scripts:[]}};function B1(e,t,o){return[...e.slice(0,o),...Array.isArray(t)?t:[t],...e.slice(o)]}function P1(e,t,o,r=1){let n=[...e];return n.splice(t,r),B1(n,e.slice(t,t+r),o)}var Zi=Symbol("globalStylesDataKey"),I1=Symbol("globalStylesLinks"),Pf=Symbol("selectBlockPatternsKey"),O1=Symbol("reusableBlocksSelect"),ju=Symbol("userPatternCategoriesSelect"),If=Symbol("sectionRootClientIdKey"),A1=Symbol("mediaEditKey"),L1=Symbol("getMediaSelect"),Of=Symbol("isIsolatedEditor"),ga=Symbol("deviceTypeKey"),M1=Symbol("isNavigationOverlayContext"),yY=Symbol("isNavigationPostEditor"),ox=Symbol("mediaUploadOnSuccess"),vY=Symbol("mediaSideloadFromUrl"),SY=Symbol("openMediaEditorModal");var{isContentBlock:VPe}=U(D1.privateApis),FPe=e=>e;function N1(e,t=""){let o=new Map,r=[];return o.set(t,r),e.forEach(n=>{let{clientId:i,innerBlocks:s}=n;r.push(i),N1(s,i).forEach((a,l)=>{o.set(l,a)})}),o}function G5(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 EY(e,t=FPe){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 K5(e){let t={},o=[...e];for(;o.length;){let{innerBlocks:r,...n}=o.shift();o.push(...r),t[n.clientId]=!0}return t}function kY(e){return EY(e,t=>{let{attributes:o,...r}=t;return r})}function _Y(e){return EY(e,t=>t.attributes)}function zPe(e,t){return(0,nx.default)(Object.keys(e),Object.keys(t))}function jPe(e,t){return e.type==="UPDATE_BLOCK_ATTRIBUTES"&&t!==void 0&&t.type==="UPDATE_BLOCK_ATTRIBUTES"&&(0,nx.default)(e.clientIds,t.clientIds)&&zPe(e.attributes,t.attributes)}function xY(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 Af(e,t,o=!1){let r=e.tree,n=new Set([]),i=new Set;for(let s of t){let a=o?s:e.parents.get(s);do if(e.controlledInnerBlocks.has(a)){i.add(a);break}else n.add(a),a=e.parents.get(a);while(a!==void 0)}for(let s of n)r.set(s,{...r.get(s)});for(let s of n)r.get(s).innerBlocks=(e.order.get(s)||[]).map(a=>r.get(a));for(let s of i)r.set("controlled||"+s,{innerBlocks:(e.order.get(s)||[]).map(a=>r.get(a))})}var HPe=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),xY(r,o.blocks),Af(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)}),Af(r,[o.clientId],!1);break;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)})}),Af(r,o.clientIds,!1);break}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{let i=K5(o.blocks);r.tree=new Map(r.tree),o.replacedClientIds.forEach(a=>{r.tree.delete(a),i[a]||r.tree.delete("controlled||"+a)}),xY(r,o.blocks),Af(r,o.blocks.map(a=>a.clientId),!1);let s=[];for(let a of o.clientIds){let l=t.parents.get(a);l!==void 0&&(l===""||r.byClientId.get(l))&&s.push(l)}Af(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)}),Af(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),Af(r,i,!0);break}case"MOVE_BLOCKS_UP":case"MOVE_BLOCKS_DOWN":{let i=[o.rootClientId?o.rootClientId:""];r.tree=new Map(r.tree),Af(r,i,!0);break}}return r};function UPe(e){let t,o;return(r,n)=>{let i=e(r,n),s=o;o=n.type==="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"?n.history??"merge":void 0;let a=n.type==="MARK_LAST_CHANGE_AS_PERSISTENT"||s;if(r===i&&!a)return r.isPersistentChange!==void 0?r:{...i,isPersistentChange:!0};let l=a?!s:!jPe(n,t);if(t=n,s==="ignore")return{...i,isPersistentChange:l,lastBlockChangeHistoryMode:"ignore"};let{lastBlockChangeHistoryMode:u,...d}=i;return{...d,isPersistentChange:l}}}function GPe(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 WPe=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)},$Pe=e=>(t,o)=>{if(o.type==="RESET_BLOCKS"){let r=e(void 0,{type:"INSERT_BLOCKS",rootClientId:"",blocks:o.blocks}),n=t?.controlledInnerBlocks??new Set;if(t?.order)for(let s of n){if(!r.byClientId.has(s))continue;r.controlledInnerBlocks.add(s);let a=t.order.get(s);if(!a?.length)continue;r.order.set(s,a);let l=(u,d)=>{let f=t.byClientId.get(u);if(!f)return;r.byClientId.set(u,f),r.attributes.set(u,t.attributes.get(u)),r.parents.set(u,d);let p=t.order.get(u)||[];r.order.set(u,p),p.forEach(g=>l(g,u))};a.forEach(u=>l(u,s))}for(let s of r.controlledInnerBlocks){let a=r.order.get(s);if(!a?.length)continue;let l=a.map(f=>t.tree.get(f)),u=r.tree.get(s);u&&(u.innerBlocks=l),r.tree.set("controlled||"+s,{innerBlocks:l});let d=f=>{let p=t.tree.get(f);if(!p)return;r.tree.set(f,p),(r.order.get(f)||[]).forEach(d)};a.forEach(d)}let i=t?.blockEditingModes??new Map;for(let[s,a]of i)r.tree.has(s)&&r.blockEditingModes.set(s,a);return r}return e(t,o)},KPe=e=>(t,o)=>{if(o.type!=="REPLACE_INNER_BLOCKS")return e(t,o);let r={};if(t.controlledInnerBlocks.size){let s=[...o.blocks];for(;s.length;){let{innerBlocks:a,...l}=s.shift();s.push(...a),t.controlledInnerBlocks.has(l.clientId)&&(r[l.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 l=`controlled||${a}`;t.tree.has(l)&&i.tree.set(l,t.tree.get(l))})}return i},YPe=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)},qPe=(0,$5.pipe)(ix.combineReducers,HPe,WPe,KPe,$Pe,UPe,GPe,YPe)({byClientId(e=new Map,t){switch(t.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{let o=new Map(e);return kY(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)}),kY(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 _Y(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"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),l={};i.forEach(([u,d])=>{a[u]!==d&&(s=!0,l[u]=d)}),o=o||s,s&&r.set(n,{...a,...l})}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)}),_Y(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=N1(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=N1(t.blocks,o),{index:i=r.length}=t,s=new Map(e);return n.forEach((a,l)=>{s.set(l,a)}),s.set(o,B1(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 l=e.get(r).indexOf(n[0]);if(l===-1)return e;let u=new Map(e);return u.set(r,P1(e.get(r),l,i,n.length)),u}let s=new Map(e);return s.set(o,e.get(o)?.filter(a=>!n.includes(a))??[]),s.set(r,B1(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,P1(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),l=new Map(e);return l.set(r,P1(s,a,a+1,o.length)),l}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{let{clientIds:o}=t;if(!t.blocks)return e;let r=N1(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((l,u)=>u===o[0]?[...l,...r.get("")]:(o.indexOf(u)===-1&&l.push(u),l),[]);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 G5(t.blocks).forEach(([r,n])=>{o.set(r,n)}),o}case"INSERT_BLOCKS":{let o=new Map(e);return G5(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)}),G5(t.blocks,e.get(t.clientIds[0])).forEach(([r,n])=>{o.set(r,n)}),o}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{let o=new Map(e);return t.removedClientIds.forEach(r=>{o.delete(r)}),o}}return e},controlledInnerBlocks(e=new Set,{type:t,clientId:o,hasControlledInnerBlocks:r}){if(t==="SET_HAS_CONTROLLED_INNER_BLOCKS"){if(r)return e.has(o)?e:new Set(e).add(o);if(!e.has(o))return e;let n=new Set(e);return n.delete(o),n}return e},blockEditingModes(e=new Map,t){switch(t.type){case"SET_BLOCK_EDITING_MODE":return e.get(t.clientId)===t.mode?e:new Map(e).set(t.clientId,t.mode);case"UNSET_BLOCK_EDITING_MODE":{if(!e.has(t.clientId))return e;let o=new Map(e);return o.delete(t.clientId),o}}return e}});function ZPe(e=!1,t){switch(t.type){case"HIDE_BLOCK_INTERFACE":return!0;case"SHOW_BLOCK_INTERFACE":return!1}return e}function XPe(e=!1,t){switch(t.type){case"START_TYPING":return!0;case"STOP_TYPING":return!1}return e}function QPe(e=!1,t){switch(t.type){case"START_DRAGGING":return!0;case"STOP_DRAGGING":return!1}return e}function JPe(e=[],t){switch(t.type){case"START_DRAGGING_BLOCKS":return t.clientIds;case"STOP_DRAGGING_BLOCKS":return[]}return e}function eIe(e={},t){return t.type==="SET_BLOCK_VISIBILITY"?{...e,...t.updates}:e}function wY(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 tIe(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 l=e?.selectionStart?.clientId,u=e?.selectionEnd?.clientId;if(!l&&!u)return e;if(!t.blocks.some(d=>d.clientId===l))return{selectionStart:{},selectionEnd:{}};if(!t.blocks.some(d=>d.clientId===u))return{...e,selectionEnd:e.selectionStart}}let o=wY(e.selectionStart,t),r=wY(e.selectionEnd,t);return o===e.selectionStart&&r===e.selectionEnd?e:{selectionStart:o,selectionEnd:r}}function oIe(e=!1,t){switch(t.type){case"START_MULTI_SELECT":return!0;case"STOP_MULTI_SELECT":return!1}return e}function rIe(e=!0,t){return t.type==="TOGGLE_SELECTION"?t.isSelectionEnabled:e}function nIe(e=null,t){switch(t.type){case"SHOW_VIEWPORT_MODAL":return t.clientIds;case"HIDE_VIEWPORT_MODAL":return null}return e}function iIe(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 sIe(e=!1,t){return t.type==="SET_BLOCK_REMOVAL_RULES"?t.rules:e}function aIe(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 lIe(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 cIe(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,nx.default)(e,a)?e:a}case"HIDE_INSERTION_POINT":return null}return e}function uIe(e={isValid:!0},t){return t.type==="SET_TEMPLATE_VALIDITY"?{...e,isValid:t.isValid}:e}function dIe(e=tx,t){if(t.type==="UPDATE_SETTINGS"){let o=t.reset?{...tx,...t.settings}:{...e,...t.settings};return Object.defineProperty(o,"__unstableIsPreviewMode",{get(){return(0,CY.default)("__unstableIsPreviewMode",{since:"6.8",alternative:"isPreviewMode"}),this.isPreviewMode}}),o}return e}function fIe(e=bY,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,l=(0,ix.select)(D1.store).getActiveBlockVariation(s,i);return l?.name&&(a+="/"+l.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 pIe=(e=new Map,t)=>{switch(t.type){case"REPLACE_BLOCKS":{let o=new Set,r=[...t.blocks];for(;r.length;){let i=r.shift();o.add(i.clientId),r.push(...i.innerBlocks)}let n=new Map(e);for(let i of t.clientIds)o.has(i)||n.delete(i);return n}case"REMOVE_BLOCKS":{let o=new Map(e);for(let r of t.clientIds)o.delete(r);return o}case"UPDATE_BLOCK_LIST_SETTINGS":{let r=(typeof t.clientId=="string"?[[t.clientId,t.settings]]:Object.entries(t.clientId)).filter(([i,s])=>s?!(0,nx.default)(e.get(i),s):e.has(i));if(!r.length)return e;let n=new Map(e);for(let[i,s]of r)s?n.set(i,s):n.delete(i);return n}}return e};function mIe(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 gIe(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 hIe(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 bIe(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 yIe(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 vIe(e,t){if(t.type==="EDIT_CONTENT_ONLY_SECTION")return t.clientId;if(!e)return e;switch(t.type){case"REMOVE_BLOCKS":case"REPLACE_BLOCKS":if(t.clientIds.includes(e))return;break;case"RESET_BLOCKS":if(!K5(t.blocks)[e])return;break}return e}function SIe(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 kIe(e=[],t){return t.type==="REGISTER_INSERTER_MEDIA_CATEGORY"?[...e,t.category]:e}function _Ie(e=!1,t){return t.type==="LAST_FOCUS"?t.lastFocus:e}function xIe(e=100,t){switch(t.type){case"SET_ZOOM_LEVEL":return t.zoom;case"RESET_ZOOM_LEVEL":return 100}return e}function wIe(e=null,t){switch(t.type){case"SET_INSERTION_POINT":return t.value;case"SELECT_BLOCK":return null}return e}function CIe(e={allOpen:!1,panels:{}},t){switch(t.type){case"SET_OPEN_LIST_VIEW_PANEL":return{allOpen:!1,panels:t.clientId?{[t.clientId]:!0}:{}};case"SET_ALL_LIST_VIEW_PANELS_OPEN":return{allOpen:!0,panels:{}};case"TOGGLE_LIST_VIEW_PANEL":return{allOpen:!1,panels:{...e.panels,[t.clientId]:t.isOpen}};case"REPLACE_BLOCKS":case"REMOVE_BLOCKS":{if(!t.clientIds||t.clientIds.length===0)return e;let o={...e.panels},r=!1;return t.clientIds.forEach(n=>{n in o&&(delete o[n],r=!0)}),r?{...e,panels:o}:e}}return e}function EIe(e=0,t){return t.type==="INCREMENT_LIST_VIEW_EXPAND_REVISION"?e+1:e}function TIe(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 RIe(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}function BIe(e=void 0,t){switch(t.type){case"SET_SELECTED_BLOCK_STYLE_STATE":{if(!t.clientId||!t.value)return;let o=e?.clientId===t.clientId?e.showStateOnCanvas??!0:!0,r=e?.clientId===t.clientId?e.value:{};return{clientId:t.clientId,showStateOnCanvas:o,value:{pseudo:"default",...r,...t.value}}}case"SET_SELECTED_BLOCK_STYLE_STATE_CANVAS_PREVIEW":{if(!t.clientId||typeof t.value!="boolean")return e;let o=e?.clientId===t.clientId?e.value:{};return{clientId:t.clientId,showStateOnCanvas:t.value,value:{pseudo:"default",...o}}}case"SELECT_BLOCK":case"SELECTION_CHANGE":{if(e?.clientId&&e.clientId!==t.clientId)return;break}case"RESET_SELECTION":{if(e?.clientId&&e.clientId!==t.selectionStart?.clientId)return;break}case"CLEAR_SELECTED_BLOCK":case"MULTI_SELECT":return;case"REMOVE_BLOCKS":case"REPLACE_BLOCKS":{if(e?.clientId&&t.clientIds?.includes(e.clientId))return;break}case"RESET_BLOCKS":{if(e?.clientId&&!K5(t.blocks)[e.clientId])return;break}}return e}function PIe(e="default",t){return t.type==="SET_STYLE_STATE_VIEWPORT"?t.viewport??"default":e}function IIe(e=!1,t){return t.type==="SET_RESPONSIVE_EDITING"?t.enabled:e}var OIe=(0,ix.combineReducers)({blocks:qPe,isDragging:QPe,isTyping:XPe,isBlockInterfaceHidden:ZPe,draggedBlocks:JPe,selection:tIe,isMultiSelecting:oIe,isSelectionEnabled:rIe,initialPosition:aIe,blocksMode:lIe,blockListSettings:pIe,insertionPoint:wIe,insertionCue:cIe,template:uIe,settings:dIe,preferences:fIe,lastBlockAttributesChange:mIe,lastFocus:_Ie,expandedBlock:bIe,highlightedBlock:gIe,lastBlockInserted:yIe,editedContentOnlySection:vIe,blockVisibility:eIe,viewportModalClientIds:nIe,styleOverrides:SIe,removalPromptData:iIe,blockRemovalRules:sIe,registeredInserterMediaCategories:kIe,zoomLevel:xIe,hasBlockSpotlight:hIe,openedListViewPanels:CIe,listViewExpandRevision:EIe,listViewContentPanelOpen:TIe,requestedInspectorTab:RIe,selectedBlockStyleState:BIe,styleStateViewport:PIe,isResponsiveEditing:IIe});function TY(e,t){if(t===""){let n=e.blocks.tree.get(t);return n?{clientId:"",...n}:void 0}if(!e.blocks.controlledInnerBlocks.has(t))return e.blocks.tree.get(t);let o=e.blocks.tree.get(`controlled||${t}`);return{...e.blocks.tree.get(t),innerBlocks:o?.innerBlocks}}function Y5(e,t,o){let r=TY(e,t);if(r&&(o(r),!!r?.innerBlocks?.length))for(let n of r?.innerBlocks)Y5(e,n.clientId,o)}function rx(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 AIe(e){return e?.attributes?.metadata?.bindings&&Object.keys(e?.attributes?.metadata?.bindings).length}function W5(e,t=""){let o=e?.zoomLevel<100||e?.zoomLevel==="auto-scaled",r=new Map,n=e.settings?.[If],i=e.blocks.order.get(n),s=Array.from(e.blocks.blockEditingModes).some(([,h])=>h==="disabled"),a=[],l=[];e.blocks.controlledInnerBlocks.forEach(h=>{let b=e.blocks.byClientId?.get(h);b?.name==="core/template-part"&&a.push(h),b?.name==="core/block"&&l.push(h)});let u=Array.from(e.blockListSettings).flatMap(([h,b])=>b?.templateLock==="contentOnly"?[h]:[]),d=e.settings?.[Of],f=e.settings?.disableContentOnlyForUnsyncedPatterns,p=d||f?[]:Array.from(e.blocks.attributes.keys()).filter(h=>e.blocks.attributes.get(h)?.metadata?.patternName),g=e.settings?.disableContentOnlyForTemplateParts,m=[...u,...p,...d||g?[]:a];return Y5(e,t,h=>{let{clientId:b,name:v}=h,y=!!e.editedContentOnlySection,k=!1;if(y&&(k=b===e.editedContentOnlySection||!!rx(e,b,[e.editedContentOnlySection]),!k)){r.set(b,"disabled");return}if(!e.blocks.blockEditingModes.has(b)){if(s){let S,_=e.blocks.parents.get(b);for(;_!==void 0&&(e.blocks.blockEditingModes.has(_)&&(S=e.blocks.blockEditingModes.get(_)),!S);)_=e.blocks.parents.get(_);if(S==="disabled"){r.set(b,"disabled");return}}if(o){if(b===n){r.set(b,"contentOnly");return}if(!i?.length){r.set(b,"disabled");return}if(i.includes(b)){r.set(b,"contentOnly");return}r.set(b,"disabled");return}if(l.length){if(l.includes(b)){if(rx(e,b,l)){r.set(b,"disabled");return}return}let S=rx(e,b,l);if(S){if(rx(e,S,l)){r.set(b,"disabled");return}if(AIe(h)){r.set(b,"contentOnly");return}r.set(b,"disabled");return}}if(y&&k){r.set(b,"default");return}m.length&&rx(e,b,m)&&(VPe(v)?r.set(b,"contentOnly"):r.set(b,"disabled"))}}),r}function Lf({prevState:e,nextState:t,addedBlocks:o,removedClientIds:r}){let n=e.derivedBlockEditingModes,i;return r?.forEach(s=>{Y5(e,s,a=>{n.has(a.clientId)&&(i||(i=new Map(n)),i.delete(a.clientId))})}),o?.forEach(s=>{let a=W5(t,s.clientId);a.size&&(i?i=new Map([...i?.size?i:[],...a]):i=new Map([...n?.size?n:[],...a]))}),i}function LIe(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=Lf({prevState:t,nextState:r,removedClientIds:o.clientIds});if(n)return{...r,derivedBlockEditingModes:n??t.derivedBlockEditingModes};break}case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{let n=Lf({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 l of o?.clientIds){let u=o.options?.uniqueByBlock?o.attributes[l]:o.attributes;if(!u)break;u.metadata?.patternName&&!t.blocks.attributes.get(l)?.metadata?.patternName?i.push(r.blocks.tree.get(l)):u.metadata&&!u.metadata?.patternName&&t.blocks.attributes.get(l)?.metadata?.patternName&&s.push(l)}if(!i?.length&&!s?.length)break;let a=Lf({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 l in s){let u=t.blockListSettings.get(l)?.templateLock!=="contentOnly"&&r.blockListSettings.get(l)?.templateLock==="contentOnly",d=t.blockListSettings.get(l)?.templateLock==="contentOnly"&&r.blockListSettings.get(l)?.templateLock!=="contentOnly";u?n.push(r.blocks.tree.get(l)):d&&i.push(l)}if(!n.length&&!i.length)break;let a=Lf({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=TY(r,o.clientId);if(!n)break;let i=Lf({prevState:t,nextState:r,removedClientIds:[o.clientId],addedBlocks:[n]});if(i)return{...r,derivedBlockEditingModes:i??t.derivedBlockEditingModes};break}case"REPLACE_BLOCKS":{let n=Lf({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=Lf({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=Lf({prevState:t,nextState:r,addedBlocks:n,removedClientIds:o.clientIds});if(i)return{...r,derivedBlockEditingModes:i??t.derivedBlockEditingModes};break}case"UPDATE_SETTINGS":{if(t?.settings?.[If]!==r?.settings?.[If]||!!t?.settings?.disableContentOnlyForUnsyncedPatterns!=!!r?.settings?.disableContentOnlyForUnsyncedPatterns||!!t?.settings?.[Of]!=!!r?.settings?.[Of]||!!t?.settings?.disableContentOnlyForTemplateParts!=!!r?.settings?.disableContentOnlyForTemplateParts)return{...r,derivedBlockEditingModes:W5(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:W5(r)}}return r.derivedBlockEditingModes=t?.derivedBlockEditingModes??new Map,r}}function MIe(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 RY=(0,$5.pipe)(LIe,MIe)(OIe);var C6={};Cr(C6,{__experimentalGetActiveBlockIdByBlockNames:()=>N2e,__experimentalGetAllowedBlocks:()=>v2e,__experimentalGetAllowedPatterns:()=>x2e,__experimentalGetBlockListSettingsForBlocks:()=>B2e,__experimentalGetDirectInsertBlock:()=>S2e,__experimentalGetGlobalBlocksByName:()=>BAe,__experimentalGetLastBlockAttributeChanges:()=>O2e,__experimentalGetParsedPattern:()=>k2e,__experimentalGetPatternTransformItems:()=>E2e,__experimentalGetPatternsByBlockTypes:()=>C2e,__experimentalGetReusableBlockTitle:()=>P2e,__unstableGetBlockWithoutInnerBlocks:()=>wAe,__unstableGetClientIdWithClientIdsTree:()=>EAe,__unstableGetClientIdsTree:()=>TAe,__unstableGetContentLockingParent:()=>G2e,__unstableGetLastBlockChangeHistoryMode:()=>R2e,__unstableGetSelectedBlocksWithPartialSelection:()=>XAe,__unstableGetTemporarilyEditingAsBlocks:()=>W2e,__unstableGetVisibleBlocks:()=>z2e,__unstableHasActiveBlockOverlayActive:()=>Vq,__unstableIsFullySelected:()=>KAe,__unstableIsLastBlockChangeIgnored:()=>I2e,__unstableIsSelectionCollapsed:()=>YAe,__unstableIsSelectionMergeable:()=>ZAe,__unstableIsWithinBlockOverlay:()=>j2e,__unstableSelectionHasUnmergeableBlock:()=>qAe,areInnerBlocksControlled:()=>eB,canEditBlock:()=>Mq,canInsertBlockType:()=>Hg,canInsertBlocks:()=>d2e,canLockBlockType:()=>p2e,canMoveBlock:()=>Lq,canMoveBlocks:()=>f2e,canRemoveBlock:()=>x6,canRemoveBlocks:()=>Aq,didAutomaticChange:()=>L2e,getAdjacentBlockClientId:()=>y6,getAllowedBlocks:()=>g6,getBlock:()=>qu,getBlockAttributes:()=>ya,getBlockCount:()=>IAe,getBlockEditingMode:()=>Ns,getBlockHierarchyRootClientId:()=>DAe,getBlockIndex:()=>Rq,getBlockInsertionPoint:()=>a2e,getBlockListSettings:()=>Oy,getBlockMode:()=>o2e,getBlockName:()=>Yt,getBlockNamesByClientId:()=>PAe,getBlockOrder:()=>Pn,getBlockParents:()=>_l,getBlockParentsByBlockName:()=>b6,getBlockRootClientId:()=>cr,getBlockSelectionEnd:()=>AAe,getBlockSelectionStart:()=>OAe,getBlockTransformItems:()=>b2e,getBlocks:()=>CAe,getBlocksByClientId:()=>XR,getBlocksByName:()=>Cq,getClientIdsOfDescendants:()=>wq,getClientIdsWithDescendants:()=>Iy,getDirectInsertBlock:()=>Dq,getDraggedBlockClientIds:()=>n2e,getFirstMultiSelectedBlockClientId:()=>v6,getGlobalBlockCount:()=>RAe,getHoveredBlockClientId:()=>F2e,getInserterItems:()=>h2e,getLastMultiSelectedBlockClientId:()=>Eq,getLowestCommonAncestorWithSelectedBlock:()=>VAe,getMultiSelectedBlockClientIds:()=>Gf,getMultiSelectedBlocks:()=>HAe,getMultiSelectedBlocksEndClientId:()=>$Ae,getMultiSelectedBlocksStartClientId:()=>WAe,getNextBlockClientId:()=>zAe,getPatternsByBlockTypes:()=>w2e,getPreviousBlockClientId:()=>FAe,getSelectedBlock:()=>NAe,getSelectedBlockClientId:()=>Ly,getSelectedBlockClientIds:()=>My,getSelectedBlockCount:()=>LAe,getSelectedBlocksInitialCaretPosition:()=>jAe,getSelectionEnd:()=>Qx,getSelectionStart:()=>Xx,getSettings:()=>Wu,getTemplate:()=>u2e,getTemplateLock:()=>Bc,hasBlockMovingClientId:()=>A2e,hasDraggedInnerBlock:()=>Iq,hasInserterItems:()=>y2e,hasMultiSelection:()=>JAe,hasSelectedBlock:()=>MAe,hasSelectedInnerBlock:()=>Pq,isAncestorBeingDragged:()=>i2e,isAncestorMultiSelected:()=>GAe,isBlockBeingDragged:()=>S6,isBlockHighlighted:()=>M2e,isBlockInsertionPointVisible:()=>l2e,isBlockMultiSelected:()=>Tq,isBlockSelected:()=>Bq,isBlockValid:()=>xAe,isBlockVisible:()=>V2e,isBlockWithinSelection:()=>QAe,isCaretWithinFormattedText:()=>s2e,isDraggingBlocks:()=>Oq,isFirstMultiSelectedBlock:()=>UAe,isGroupable:()=>U2e,isLastBlockChangePersistent:()=>T2e,isMultiSelecting:()=>e2e,isSelectionEnabled:()=>t2e,isTyping:()=>r2e,isUngroupable:()=>H2e,isValidTemplate:()=>c2e,wasBlockJustInserted:()=>D2e});var bt=c(ce(),1),_q=c(uo(),1);var V1=c(F(),1),ft=(0,V1.forwardRef)(({icon:e,size:t=24,...o},r)=>(0,V1.cloneElement)(e,{width:t,height:t,...o,ref:r}));var F1=c(ue(),1),q5=c(E(),1),Cg=(0,q5.jsx)(F1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,q5.jsx)(F1.Path,{d:"M7.5 5.5h9V4h-9v1.5Zm-3.5 7h16V11H4v1.5Zm3.5 7h9V18h-9v1.5Z"})});var z1=c(ue(),1),Z5=c(E(),1),X5=(0,Z5.jsx)(z1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,Z5.jsx)(z1.Path,{d:"M4 12.8h16v-1.5H4v1.5zm0 7h12.4v-1.5H4v1.5zM4 4.3v1.5h16V4.3H4z"})});var j1=c(ue(),1),Q5=c(E(),1),Mf=(0,Q5.jsx)(j1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,Q5.jsx)(j1.Path,{d:"M13 5.5H4V4h9v1.5Zm7 7H4V11h16v1.5Zm-7 7H4V18h9v1.5Z"})});var H1=c(ue(),1),J5=c(E(),1),Eg=(0,J5.jsx)(H1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,J5.jsx)(H1.Path,{d:"M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM5 9h14v6H5V9Z"})});var U1=c(ue(),1),eF=c(E(),1),Nf=(0,eF.jsx)(U1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,eF.jsx)(U1.Path,{d:"M11.111 5.5H20V4h-8.889v1.5ZM4 12.5h16V11H4v1.5Zm7.111 7H20V18h-8.889v1.5Z"})});var G1=c(ue(),1),tF=c(E(),1),oF=(0,tF.jsx)(G1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,tF.jsx)(G1.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 W1=c(ue(),1),rF=c(E(),1),sx=(0,rF.jsx)(W1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,rF.jsx)(W1.Path,{d:"M20 11.2H6.8l3.7-3.7-1-1L3.9 12l5.6 5.5 1-1-3.7-3.7H20z"})});var $1=c(ue(),1),nF=c(E(),1),ax=(0,nF.jsx)($1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,nF.jsx)($1.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 K1=c(ue(),1),iF=c(E(),1),sF=(0,iF.jsx)(K1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,iF.jsx)(K1.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 Y1=c(ue(),1),aF=c(E(),1),lF=(0,aF.jsx)(Y1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,aF.jsx)(Y1.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 q1=c(ue(),1),cF=c(E(),1),lx=(0,cF.jsx)(q1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,cF.jsx)(q1.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 Z1=c(ue(),1),uF=c(E(),1),dF=(0,uF.jsx)(Z1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,uF.jsx)(Z1.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 X1=c(ue(),1),fF=c(E(),1),pF=(0,fF.jsx)(X1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,fF.jsx)(X1.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 12v-1.5h1.5V16h-1.5Zm0-8v5h1.5V8h-1.5Z"})});var Q1=c(ue(),1),mF=c(E(),1),Xi=(0,mF.jsx)(Q1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,mF.jsx)(Q1.Path,{d:"M16.5 7.5 10 13.9l-2.5-2.4-1 1 3.5 3.6 7.5-7.6z"})});var J1=c(ue(),1),gF=c(E(),1),on=(0,gF.jsx)(J1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,gF.jsx)(J1.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})});var eT=c(ue(),1),hF=c(E(),1),cx=(0,hF.jsx)(eT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,hF.jsx)(eT.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"})});var tT=c(ue(),1),bF=c(E(),1),yi=(0,bF.jsx)(tT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,bF.jsx)(tT.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})});var oT=c(ue(),1),yF=c(E(),1),Df=(0,yF.jsx)(oT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,yF.jsx)(oT.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 rT=c(ue(),1),vF=c(E(),1),rn=(0,vF.jsx)(rT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,vF.jsx)(rT.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})});var nT=c(ue(),1),SF=c(E(),1),Tg=(0,SF.jsx)(nT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,SF.jsx)(nT.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})});var iT=c(ue(),1),kF=c(E(),1),Rg=(0,kF.jsx)(iT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,kF.jsx)(iT.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 sT=c(ue(),1),_F=c(E(),1),xF=(0,_F.jsx)(sT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,_F.jsx)(sT.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 aT=c(ue(),1),wF=c(E(),1),CF=(0,wF.jsx)(aT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,wF.jsx)(aT.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 lT=c(ue(),1),EF=c(E(),1),Bg=(0,EF.jsx)(lT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,EF.jsx)(lT.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 cT=c(ue(),1),TF=c(E(),1),RF=(0,TF.jsx)(cT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,TF.jsx)(cT.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 Pg=c(ue(),1),hy=c(E(),1),BF=(0,hy.jsxs)(Pg.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,hy.jsx)(Pg.G,{opacity:".25",children:(0,hy.jsx)(Pg.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,hy.jsx)(Pg.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 Ig=c(ue(),1),by=c(E(),1),PF=(0,by.jsxs)(Ig.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,by.jsx)(Ig.G,{opacity:".25",children:(0,by.jsx)(Ig.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,by.jsx)(Ig.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 Og=c(ue(),1),yy=c(E(),1),IF=(0,yy.jsxs)(Og.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,yy.jsx)(Og.G,{opacity:".25",children:(0,yy.jsx)(Og.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,yy.jsx)(Og.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 Ag=c(ue(),1),vy=c(E(),1),OF=(0,vy.jsxs)(Ag.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,vy.jsx)(Ag.G,{opacity:".25",children:(0,vy.jsx)(Ag.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,vy.jsx)(Ag.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 uT=c(ue(),1),AF=c(E(),1),LF=(0,AF.jsx)(uT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,AF.jsx)(uT.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 dT=c(ue(),1),MF=c(E(),1),ux=(0,MF.jsx)(dT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,MF.jsx)(dT.Path,{d:"M8 7h2V5H8v2zm0 6h2v-2H8v2zm0 6h2v-2H8v2zm6-14v2h2V5h-2zm0 8h2v-2h-2v2zm0 6h2v-2h-2v2z"})});var fT=c(ue(),1),NF=c(E(),1),DF=(0,NF.jsx)(fT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,NF.jsx)(fT.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 pT=c(ue(),1),VF=c(E(),1),Lg=(0,VF.jsx)(pT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,VF.jsx)(pT.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 mT=c(ue(),1),FF=c(E(),1),zF=(0,FF.jsx)(mT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,FF.jsx)(mT.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 gT=c(ue(),1),jF=c(E(),1),HF=(0,jF.jsx)(gT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,jF.jsx)(gT.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 hT=c(ue(),1),UF=c(E(),1),GF=(0,UF.jsx)(hT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,UF.jsx)(hT.Path,{d:"M12 4 4 19h16L12 4zm0 3.2 5.5 10.3H12V7.2z"})});var bT=c(ue(),1),WF=c(E(),1),$F=(0,WF.jsx)(bT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,WF.jsx)(bT.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 yT=c(ue(),1),KF=c(E(),1),YF=(0,KF.jsx)(yT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,KF.jsx)(yT.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 vT=c(ue(),1),qF=c(E(),1),ZF=(0,qF.jsx)(vT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,qF.jsx)(vT.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 ST=c(ue(),1),XF=c(E(),1),QF=(0,XF.jsx)(ST.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,XF.jsx)(ST.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 kT=c(ue(),1),JF=c(E(),1),e3=(0,JF.jsx)(kT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,JF.jsx)(kT.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 _T=c(ue(),1),t3=c(E(),1),o3=(0,t3.jsx)(_T.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,t3.jsx)(_T.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 xT=c(ue(),1),r3=c(E(),1),wT=(0,r3.jsx)(xT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,r3.jsx)(xT.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 CT=c(ue(),1),n3=c(E(),1),dx=(0,n3.jsx)(CT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,n3.jsx)(CT.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 ET=c(ue(),1),i3=c(E(),1),fx=(0,i3.jsx)(ET.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,i3.jsx)(ET.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 TT=c(ue(),1),s3=c(E(),1),px=(0,s3.jsx)(TT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,s3.jsx)(TT.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 RT=c(ue(),1),a3=c(E(),1),l3=(0,a3.jsx)(RT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,a3.jsx)(RT.Path,{d:"M17.6 7c-.6.9-1.5 1.7-2.6 2v1h2v7h2V7h-1.4zM11 11H7V7H5v10h2v-4h4v4h2V7h-2v4z"})});var BT=c(ue(),1),c3=c(E(),1),u3=(0,c3.jsx)(BT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,c3.jsx)(BT.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 PT=c(ue(),1),d3=c(E(),1),f3=(0,d3.jsx)(PT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,d3.jsx)(PT.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 IT=c(ue(),1),p3=c(E(),1),m3=(0,p3.jsx)(IT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,p3.jsx)(IT.Path,{d:"M20 13V7h-3l-4 6v2h5v2h2v-2h1v-2h-1zm-2 0h-2.8L18 9v4zm-9-2H5V7H3v10h2v-4h4v4h2V7H9v4z"})});var OT=c(ue(),1),g3=c(E(),1),h3=(0,g3.jsx)(OT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,g3.jsx)(OT.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 AT=c(ue(),1),b3=c(E(),1),y3=(0,b3.jsx)(AT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,b3.jsx)(AT.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 LT=c(ue(),1),v3=c(E(),1),S3=(0,v3.jsx)(LT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,v3.jsx)(LT.Path,{d:"M12 4L4 7.9V20h16V7.9L12 4zm6.5 14.5H14V13h-4v5.5H5.5V8.8L12 5.7l6.5 3.1v9.7z"})});var MT=c(ue(),1),k3=c(E(),1),mx=(0,k3.jsx)(MT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,k3.jsx)(MT.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 NT=c(ue(),1),_3=c(E(),1),x3=(0,_3.jsx)(NT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,_3.jsx)(NT.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 DT=c(ue(),1),w3=c(E(),1),gx=(0,w3.jsx)(DT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,w3.jsx)(DT.Path,{d:"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"})});var VT=c(ue(),1),C3=c(E(),1),hx=(0,C3.jsx)(VT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,C3.jsx)(VT.Path,{d:"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"})});var FT=c(ue(),1),E3=c(E(),1),Vf=(0,E3.jsx)(FT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,E3.jsx)(FT.Path,{d:"M12.5 15v5H11v-5H4V9h7V4h1.5v5h7v6h-7Z"})});var zT=c(ue(),1),T3=c(E(),1),Ff=(0,T3.jsx)(zT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,T3.jsx)(zT.Path,{d:"M9 9v6h11V9H9zM4 20h1.5V4H4v16z"})});var jT=c(ue(),1),R3=c(E(),1),zf=(0,R3.jsx)(jT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,R3.jsx)(jT.Path,{d:"M4 15h11V9H4v6zM18.5 4v16H20V4h-1.5z"})});var HT=c(ue(),1),B3=c(E(),1),bx=(0,B3.jsx)(HT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,B3.jsx)(HT.Path,{d:"M7 4H17V8L7 8V4ZM7 16L17 16V20L7 20V16ZM20 11.25H4V12.75H20V11.25Z"})});var UT=c(ue(),1),P3=c(E(),1),Sy=(0,P3.jsx)(UT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,P3.jsx)(UT.Path,{d:"M9 15h6V9H9v6zm-5 5h1.5V4H4v16zM18.5 4v16H20V4h-1.5z"})});var GT=c(ue(),1),I3=c(E(),1),yx=(0,I3.jsx)(GT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,I3.jsx)(GT.Path,{d:"M4 4L20 4L20 5.5L4 5.5L4 4ZM10 7L14 7L14 17L10 17L10 7ZM20 18.5L4 18.5L4 20L20 20L20 18.5Z"})});var WT=c(ue(),1),O3=c(E(),1),ky=(0,O3.jsx)(WT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,O3.jsx)(WT.Path,{d:"M4 4H5.5V20H4V4ZM7 10L17 10V14L7 14V10ZM20 4H18.5V20H20V4Z"})});var $T=c(ue(),1),A3=c(E(),1),vx=(0,A3.jsx)($T.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,A3.jsx)($T.Path,{d:"M9 20h6V9H9v11zM4 4v1.5h16V4H4z"})});var KT=c(ue(),1),L3=c(E(),1),Hu=(0,L3.jsx)(KT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,L3.jsx)(KT.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 YT=c(ue(),1),M3=c(E(),1),N3=(0,M3.jsx)(YT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,M3.jsx)(YT.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 qT=c(ue(),1),D3=c(E(),1),Qi=(0,D3.jsx)(qT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,D3.jsx)(qT.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 ZT=c(ue(),1),V3=c(E(),1),Ji=(0,V3.jsx)(ZT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,V3.jsx)(ZT.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 XT=c(ue(),1),F3=c(E(),1),Sx=(0,F3.jsx)(XT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,F3.jsx)(XT.Path,{d:"M3 6h11v1.5H3V6Zm3.5 5.5h11V13h-11v-1.5ZM21 17H10v1.5h11V17Z"})});var QT=c(ue(),1),z3=c(E(),1),j3=(0,z3.jsx)(QT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,z3.jsx)(QT.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 JT=c(ue(),1),H3=c(E(),1),U3=(0,H3.jsx)(JT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,H3.jsx)(JT.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 eR=c(ue(),1),G3=c(E(),1),Mg=(0,G3.jsx)(eR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,G3.jsx)(eR.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 kx=c(ue(),1),_x=c(E(),1),_y=(0,_x.jsxs)(kx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,_x.jsx)(kx.Path,{d:"m7 6.5 4 2.5-4 2.5z"}),(0,_x.jsx)(kx.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 tR=c(ue(),1),W3=c(E(),1),xx=(0,W3.jsx)(tR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,W3.jsx)(tR.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 oR=c(ue(),1),$3=c(E(),1),Ls=(0,$3.jsx)(oR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,$3.jsx)(oR.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})});var wx=c(ue(),1),Cx=c(E(),1),Ng=(0,Cx.jsxs)(wx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,Cx.jsx)(wx.Path,{d:"M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z"}),(0,Cx.jsx)(wx.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 rR=c(ue(),1),K3=c(E(),1),Y3=(0,K3.jsx)(rR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,K3.jsx)(rR.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 nR=c(ue(),1),q3=c(E(),1),Dg=(0,q3.jsx)(nR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,q3.jsx)(nR.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})});var iR=c(ue(),1),Z3=c(E(),1),X3=(0,Z3.jsx)(iR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,Z3.jsx)(iR.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 sR=c(ue(),1),Q3=c(E(),1),ha=(0,Q3.jsx)(sR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,Q3.jsx)(sR.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})});var aR=c(ue(),1),J3=c(E(),1),e4=(0,J3.jsx)(aR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,J3.jsx)(aR.Path,{d:"M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM7 9h10v6H7V9Z"})});var lR=c(ue(),1),t4=c(E(),1),o4=(0,t4.jsx)(lR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,t4.jsx)(lR.Path,{d:"M5 5.5h8V4H5v1.5ZM5 20h8v-1.5H5V20ZM19 9H5v6h14V9Z"})});var cR=c(ue(),1),r4=c(E(),1),n4=(0,r4.jsx)(cR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,r4.jsx)(cR.Path,{d:"M19 5.5h-8V4h8v1.5ZM19 20h-8v-1.5h8V20ZM5 9h14v6H5V9Z"})});var uR=c(ue(),1),i4=c(E(),1),s4=(0,i4.jsx)(uR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,i4.jsx)(uR.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 dR=c(ue(),1),a4=c(E(),1),l4=(0,a4.jsx)(dR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,a4.jsx)(dR.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 fR=c(ue(),1),c4=c(E(),1),Bn=(0,c4.jsx)(fR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,c4.jsx)(fR.Path,{d:"M7 11.5h10V13H7z"})});var pR=c(ue(),1),u4=c(E(),1),d4=(0,u4.jsx)(pR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,u4.jsx)(pR.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 mR=c(ue(),1),f4=c(E(),1),p4=(0,f4.jsx)(mR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,f4.jsx)(mR.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 gR=c(ue(),1),m4=c(E(),1),g4=(0,m4.jsx)(gR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,m4.jsx)(gR.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 hR=c(ue(),1),h4=c(E(),1),Vg=(0,h4.jsx)(hR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h4.jsx)(hR.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 Ex=c(ue(),1),Tx=c(E(),1),b4=(0,Tx.jsxs)(Ex.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,Tx.jsx)(Ex.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,Tx.jsx)(Ex.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 bR=c(ue(),1),y4=c(E(),1),v4=(0,y4.jsx)(bR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,y4.jsx)(bR.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 yR=c(ue(),1),S4=c(E(),1),vR=(0,S4.jsx)(yR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,S4.jsx)(yR.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z"})});var Rx=c(ue(),1),Bx=c(E(),1),k4=(0,Bx.jsxs)(Rx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,Bx.jsx)(Rx.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,Bx.jsx)(Rx.Path,{d:"m16.5 19.5h-9v-1.5h9z"})]});var xy=c(ue(),1),wy=c(E(),1),_4=(0,wy.jsxs)(xy.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,wy.jsx)(xy.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,wy.jsx)(xy.Path,{d:"m4.5 7.5v9h1.5v-9z"}),(0,wy.jsx)(xy.Path,{d:"m18 7.5v9h1.5v-9z"})]});var Px=c(ue(),1),Ix=c(E(),1),x4=(0,Ix.jsxs)(Px.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,Ix.jsx)(Px.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,Ix.jsx)(Px.Path,{d:"m4.5 16.5v-9h1.5v9z"})]});var Ox=c(ue(),1),Ax=c(E(),1),w4=(0,Ax.jsxs)(Ox.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,Ax.jsx)(Ox.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,Ax.jsx)(Ox.Path,{d:"m18 16.5v-9h1.5v9z"})]});var Lx=c(ue(),1),Mx=c(E(),1),C4=(0,Mx.jsxs)(Lx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,Mx.jsx)(Lx.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,Mx.jsx)(Lx.Path,{d:"m16.5 6h-9v-1.5h9z"})]});var Cy=c(ue(),1),Ey=c(E(),1),E4=(0,Ey.jsxs)(Cy.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,Ey.jsx)(Cy.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,Ey.jsx)(Cy.Path,{d:"m7.5 6h9v-1.5h-9z"}),(0,Ey.jsx)(Cy.Path,{d:"m7.5 19.5h9v-1.5h-9z"})]});var SR=c(ue(),1),T4=c(E(),1),R4=(0,T4.jsx)(SR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,T4.jsx)(SR.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 kR=c(ue(),1),B4=c(E(),1),Nx=(0,B4.jsx)(kR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,B4.jsx)(kR.Path,{d:"M5 4h14v11H5V4Zm11 16H8v-1.5h8V20Z"})});var _R=c(ue(),1),P4=c(E(),1),Fg=(0,P4.jsx)(_R.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,P4.jsx)(_R.Path,{d:"M16 5.5H8V4h8v1.5ZM16 20H8v-1.5h8V20ZM5 9h14v6H5V9Z"})});var xR=c(ue(),1),I4=c(E(),1),O4=(0,I4.jsx)(xR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,I4.jsx)(xR.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 wR=c(ue(),1),A4=c(E(),1),Cc=(0,A4.jsx)(wR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,A4.jsx)(wR.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 CR=c(ue(),1),L4=c(E(),1),M4=(0,L4.jsx)(CR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,L4.jsx)(CR.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 ER=c(ue(),1),N4=c(E(),1),D4=(0,N4.jsx)(ER.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,N4.jsx)(ER.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 TR=c(ue(),1),V4=c(E(),1),F4=(0,V4.jsx)(TR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,V4.jsx)(TR.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 RR=c(ue(),1),z4=c(E(),1),j4=(0,z4.jsx)(RR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,z4.jsx)(RR.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 BR=c(ue(),1),H4=c(E(),1),U4=(0,H4.jsx)(BR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,H4.jsx)(BR.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 PR=c(ue(),1),G4=c(E(),1),W4=(0,G4.jsx)(PR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,G4.jsx)(PR.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 IR=c(ue(),1),$4=c(E(),1),Uu=(0,$4.jsx)(IR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,$4.jsx)(IR.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 OR=c(ue(),1),K4=c(E(),1),vl=(0,K4.jsx)(OR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,K4.jsx)(OR.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 AR=c(ue(),1),Y4=c(E(),1),q4=(0,Y4.jsx)(AR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,Y4.jsx)(AR.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 LR=c(ue(),1),Z4=c(E(),1),X4=(0,Z4.jsx)(LR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,Z4.jsx)(LR.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 MR=c(ue(),1),Q4=c(E(),1),J4=(0,Q4.jsx)(MR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,Q4.jsx)(MR.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 Yu=c(jo(),1),Ds=c(Tt(),1),yt=c(Z(),1);var yq=c(ce(),1),vq=c(OY(),1);var Qo="core/block-editor";var YR={};Cr(YR,{getAllPatterns:()=>KOe,getBlockRemovalRules:()=>jOe,getBlockSettings:()=>nq,getBlockStyles:()=>JOe,getBlockWithoutAttributes:()=>OOe,getClientIdWithClientIdsTree:()=>l6,getClientIdsTree:()=>c6,getClosestAllowedInsertionPoint:()=>cq,getClosestAllowedInsertionPointForPattern:()=>tAe,getContentLockingParent:()=>d6,getEditedContentOnlySection:()=>f6,getEnabledBlockParents:()=>FOe,getEnabledClientIdsTree:()=>DOe,getExpandedBlock:()=>QOe,getInserterMediaCategories:()=>GOe,getInsertionPoint:()=>oAe,getLastFocus:()=>ZOe,getLastInsertedBlocksClientIds:()=>IOe,getListViewClientIdsTree:()=>VOe,getListViewExpandRevision:()=>uAe,getParentSectionBlock:()=>$u,getPatternBySlug:()=>$Oe,getRegisteredInserterMediaCategories:()=>UOe,getRemovalPromptData:()=>zOe,getRequestedInspectorTab:()=>pAe,getReusableBlocks:()=>qOe,getSectionRootClientId:()=>jg,getSelectedBlockStyleState:()=>gq,getStyleOverrides:()=>HOe,getStyleStateViewport:()=>mq,getViewportModalClientIds:()=>fAe,getZoomLevel:()=>eAe,hasAllowedPatterns:()=>WOe,hasBlockSpotlight:()=>sAe,hasSelectedStyleState:()=>gAe,isBlockHiddenAnywhere:()=>rAe,isBlockHiddenAtViewport:()=>uq,isBlockHiddenEverywhere:()=>m6,isBlockInterfaceHidden:()=>POe,isBlockParentHiddenAtViewport:()=>iAe,isBlockParentHiddenEverywhere:()=>nAe,isBlockSubtreeDisabled:()=>AOe,isContainerInsertableToInContentOnlyMode:()=>Gx,isDragging:()=>XOe,isEditLockedBlock:()=>dq,isListViewContentPanelOpen:()=>lAe,isListViewPanelOpened:()=>cAe,isLockedBlock:()=>aAe,isMoveLockedBlock:()=>fq,isRemoveLockedBlock:()=>pq,isResponsiveEditing:()=>mAe,isSectionBlock:()=>jf,isSelectedBlockStyleStateShownOnCanvas:()=>hAe,isWithinEditedContentOnlySection:()=>KR,isZoomOut:()=>p6,shouldRenderBlockListView:()=>dAe});var $r=c(Z(),1),Py=c(ce(),1);function AY(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 Wr=(e,t,o)=>{let r=Array.isArray(t)?t:t.split("."),n=e;return r.forEach(i=>{n=n?.[i]}),n??o};var NY=c(Dx(),1);var NIe="1600px",DIe="320px",VIe=1,FIe=.25,zIe=.75,jIe="14px";function MY({minimumFontSize:e,maximumFontSize:t,fontSize:o,minimumViewportWidth:r=DIe,maximumViewportWidth:n=NIe,scaleFactor:i=VIe,minimumFontSizeLimit:s}){if(s=Ec(s)?s:jIe,o){let k=Ec(o);if(!k?.unit||!k?.value)return null;let S=Ec(s,{coerceTo:k.unit});if(S?.value&&!e&&!t&&k?.value<=S?.value)return null;if(t||(t=`${k.value}${k.unit}`),!e){let _=k.unit==="px"?k.value:k.value*16,x=Math.min(Math.max(1-.075*Math.log2(_),FIe),zIe),w=Vx(k.value*x,3);S?.value&&w<S?.value?e=`${S.value}${S.unit}`:e=`${w}${k.unit}`}}let a=Ec(e),l=a?.unit||"rem",u=Ec(t,{coerceTo:l});if(!a||!u)return null;let d=Ec(e,{coerceTo:"rem"}),f=Ec(n,{coerceTo:l}),p=Ec(r,{coerceTo:l});if(!f||!p||!d)return null;let g=f.value-p.value;if(!g)return null;let m=Vx(p.value/100,3),h=Vx(m,3)+l,b=100*((u.value-a.value)/g),v=Vx((b||1)*i,3),y=`${d.value}${d.unit} + ((1vw - ${h}) * ${v})`;return`clamp(${e}, ${y}, ${t})`}function Ec(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[,l,u]=a,d=parseFloat(l);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:Vx(d,3),unit:u}:null}function Vx(e,t=3){let o=Math.pow(10,t);return Math.round(e*o)/o}function e6(e){let t=e?.fluid;return t===!0||t&&typeof t=="object"&&Object.keys(t).length>0}function HIe(e){let t=e?.typography??{},o=e?.layout,r=Ec(o?.wideSize)?o?.wideSize:null;return e6(t)&&r?{fluid:{maxViewportWidth:r,...typeof t.fluid=="object"?t.fluid:{}}}:{fluid:t?.fluid}}function Gu(e,t){let{size:o}=e;if(!o||o==="0"||e?.fluid===!1||!e6(t?.typography)&&!e6(e))return o;let r=HIe(t)?.fluid??{},n=MY({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 Rc="body",Fx=":root";function Tc(e){if(!e.includes(","))return[e];let t=[],o="",r=0;for(let n of e){if(n==="(")r++;else if(n===")"&&r>0)r--;else if(n===","&&r===0){t.push(o),o="";continue}o+=n}return t.push(o),t}var NR=[{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)=>Gu(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 Sl(e,t){if(!e||!t)return t;let o=Tc(e),r=Tc(t),n=[];return o.forEach(i=>{r.forEach(s=>{n.push(`${i.trim()} ${s.trim()}`)})}),n.join(", ")}function DY(e,t){if(!e||!t)return;let o={};return Object.entries(t).forEach(([r,n])=>{typeof n=="string"&&(o[r]=Sl(e,n)),typeof n=="object"&&(o[r]={},Object.entries(n).forEach(([i,s])=>{o[r][i]=Sl(e,s)}))}),o}function DR(e,t){return e.includes(",")?Tc(e).map(n=>n+t).join(","):e+t}function t6(e,t){let o=`.is-style-${e}`;if(!t)return o;let r=/[^\s:]+/,n=s=>s+o;return Tc(t).map(s=>s.replace(r,n)).join(",")}function VY(e,t){let o=`.is-style-${e}`,r=Tc(t).map(n=>{let i=n.trim(),s=`${o} `;return i.startsWith(s)?i.slice(s.length):i});return t6(e,r.join(","))}function UIe(e,t){if(!e||!t)return e;if(typeof e=="object"&&"ref"in e&&e?.ref){let o=(0,NY.getCSSValueFromRawStyle)(Wr(t,e.ref));return typeof o=="object"&&o!==null&&"ref"in o&&o?.ref?void 0:o===void 0?e:o}return e}function GIe(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 Ty(e,t){if(!e||!t)return e;let o=UIe(e,t);return typeof o=="object"&&o!==null&&"url"in o&&o?.url&&(o.url=GIe(o.url,t?._links?.["wp:theme-file"])),o}function FY(e,t,o=[],r="slug",n){let i=[t?Wr(e,["blocks",t,...o]):void 0,Wr(e,o)].filter(Boolean);for(let s of i)if(s){let a=["custom","theme","default"];for(let l of a){let u=s[l];if(u){let d=u.find(f=>f[r]===n);if(d)return r==="slug"||FY(e,t,o,"slug",d.slug)[r]===d[r]?d:void 0}}}}function WIe(e,t,o,[r,n]=[]){let i=NR.find(a=>a.cssVarInfix===r);if(!i||!e.settings)return o;let s=FY(e.settings,t,i.path,"slug",n);if(s){let{valueKey:a}=i,l=s[a];return ba(e,t,l)}return o}function $Ie(e,t,o,r=[]){let n=(t?Wr(e?.settings??{},["blocks",t,"custom",...r]):void 0)??Wr(e?.settings??{},["custom",...r]);return n?ba(e,t,n):o}function ba(e,t,o){if(!o||typeof o!="string")if(typeof o=="object"&&o!==null&&"ref"in o&&typeof o.ref=="string"){let u=Wr(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,...l]=s;return a==="preset"?WIe(e,t,o,l):a==="custom"?$Ie(e,t,o,l):o}var WY=c(VR(),1);function UY(e){return Object.prototype.toString.call(e)==="[object Object]"}function GY(e){var t,o;return UY(e)===!1?!1:(t=e.constructor,t===void 0?!0:(o=t.prototype,!(UY(o)===!1||o.hasOwnProperty("isPrototypeOf")===!1)))}function FR(e,t){return(0,WY.default)(e,t,{isMergeableObject:GY,customMerge:o=>{if(o==="backgroundImage")return(r,n)=>n??r}})}var vi=c(ce(),1),Hx=c(Dx(),1),QY=c(Z(),1);function Ms(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,l=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("/","-"),l==="root")return u;let d=Array.isArray(t)?t:t.split(".");if(d.length===1){let p=r?u:null;if(a)return Wr(i,`${l}.root`,null)||Wr(i,l,null)||p;let g=s?Wr(s,`${l}.__experimentalSelector`,null):void 0;return g?Sl(u,g):p}let f;return a&&(f=Wr(i,l,null)),f||(r?Ms(e,d[0],o):null)}function By(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 o6(e){if(!e)return;let t=e.match(/var:preset\|spacing\|(.+)/);return t?`var(--wp--preset--spacing--${t[1]})`:e}function sOe(e){if(!e)return null;let t=typeof e=="string";return{top:t?e:e?.top,left:t?e:e?.left}}function r6(e,t="0"){let o=sOe(e);if(!o)return null;let r=o6(o?.top)||t,n=o6(o?.left)||t;return r===n?r:`${r} ${n}`}var $Y={backgroundSize:"cover",backgroundPosition:"50% 50%"};function KY(e){if(!e||!e?.backgroundImage?.url)return;let t;return e?.backgroundSize||(t={backgroundSize:$Y.backgroundSize}),e?.backgroundSize==="contain"&&!e?.backgroundPosition&&(t={backgroundPosition:$Y.backgroundPosition}),t}var YY={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 qY={mobile:"480px",tablet:"782px"},ZY=/^(\d+|\d*\.\d+)(px|em|rem)$/,aOe=16;function lOe(e){return"mobile"in e||"tablet"in e}function cOe(e){return!e||typeof e!="object"?{}:lOe(e)?e:e.settings?.viewport??{}}function uOe(e){return typeof e=="string"&&ZY.test(e.trim())}function n6(e){if(typeof e=="number")return e;if(typeof e!="string")return;let t=e.trim().match(ZY);if(!t)return;let o=Number.parseFloat(t[1]);return t[2]==="px"?o:o*aOe}function i6(e){let t=cOe(e),o={},r={};Object.keys(qY).forEach(a=>{let l=a,u=t[l],d=n6(u);d!==void 0&&uOe(u)&&(o[l]=u.trim(),r[l]=d)});let n=Object.keys(o);if(!n.length)return{...qY};if(n.length===1)return o;let i=o.mobile,s=o.tablet;return r.mobile>=r.tablet?{mobile:i}:{mobile:i,tablet:s}}function jx(e){let t=i6(e),o={};return t.mobile&&(o["@mobile"]=`@media (width <= ${t.mobile})`),t.tablet&&(o["@tablet"]=t.mobile?`@media (${t.mobile} < width <= ${t.tablet})`:`@media (width <= ${t.tablet})`),o}var dOe={button:"wp-element-button",caption:"wp-element-caption"},fOe={__experimentalBorder:"border",color:"color",dimensions:"dimensions",spacing:"spacing",typography:"typography"},JY={"core/button":[":hover",":focus",":focus-visible",":active"],"core/navigation-link":[":hover",":focus",":focus-visible",":active"]},pOe={link:[":link",":any-link",":visited",":hover",":focus",":focus-visible",":active"],button:[":link",":any-link",":visited",":hover",":focus",":focus-visible",":active"]};function mOe(e="*",t={}){return NR.reduce((o,{path:r,cssVarInfix:n,classes:i})=>{if(!i)return o;let s=Wr(t,r,[]);return["default","theme","custom"].forEach(a=>{s[a]&&s[a].forEach(({slug:l})=>{i.forEach(({classSuffix:u,propertyName:d})=>{let f=`.has-${By(l)}-${u}`,p=e.split(",").map(m=>`${m}${f}`).join(","),g=`var(--wp--preset--${n}--${By(l)})`;o+=`${p}{${d}: ${g} !important;}`})})}),o},"")}var gOe=(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],l={...e};return delete l[i],l[s]=a,l}return e},hOe=(e,t)=>{let o=".wp-block-button";if(!(o in e))return e;let r={...e};return r[o]=r[o].map(n=>{let i=n.match(/^width:\s*(.+)$/);if(!i)return n;let s=i[1],a=null;s.endsWith("%")&&(a=parseFloat(s));let l="var(--wp--preset--dimension--";if(a===null&&s.startsWith(l)&&s.endsWith(")")){let u=s.slice(l.length,-1),d={...t?.dimensions?.dimensionSizes??{},...t?.blocks?.["core/button"]?.dimensions?.dimensionSizes??{}};for(let f of Object.values(d))if(Array.isArray(f)){for(let p of f)if(p.slug===u&&typeof p.size=="string"&&p.size.endsWith("%")){a=parseFloat(p.size);break}if(a!==null)break}}return a===null||isNaN(a)?n:`width: calc(${a} * 1% - (var(--wp--style--block-gap, 0.5em) * (1 - ${a} / 100)))`}),r},bOe=(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 l={[r]:{[s]:t[r][s]}},u=jR(l);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]},l=jR(a);o[s]=[...o[s]||[],...l],delete t[r]}}),o};function jR(e={},t="",o,r={},n=!1){let i=Rc===t,s=Object.entries(vi.__EXPERIMENTAL_STYLE_PROPERTY).reduce((l,[u,{value:d,properties:f,useEngine:p,rootOnly:g}])=>{if(g&&!i)return l;let m=d;if(m[0]==="elements"||p)return l;let h=Wr(e,m);if(u==="--wp--style--root--padding"&&(typeof h=="string"||!o))return l;if(f&&typeof h!="string")Object.entries(f).forEach(b=>{let[v,y]=b;if(!Wr(h,[y],!1))return;let k=v.startsWith("--")?v:By(v);l.push(`${k}: ${(0,Hx.getCSSValueFromRawStyle)(Wr(h,[y]))}`)});else if(Wr(e,m,!1)){let b=u.startsWith("--")?u:By(u);l.push(`${b}: ${(0,Hx.getCSSValueFromRawStyle)(Wr(e,m))}`)}return l},[]);return e.background&&(e.background?.backgroundImage&&(e.background.backgroundImage=Ty(e.background.backgroundImage,r)),!i&&e.background?.backgroundImage?.id&&(e={...e,background:{...e.background,...KY(e.background)}})),(0,Hx.getCSSRules)(e).forEach(l=>{if(i&&(o||n)&&l.key.startsWith("padding"))return;let u=l.key.startsWith("--")?l.key:By(l.key),d=Ty(l.value,r);u==="font-size"&&(d=Gu({name:"",slug:"",size:d},r?.settings)),u==="aspect-ratio"&&s.push("min-height: unset"),s.push(`${u}: ${d}`)}),s}function eq({layoutDefinitions:e=YY,style:t,selector:o,hasBlockGapSupport:r,hasFallbackGapSupport:n,fallbackGapValue:i}){let s="",a=r?r6(t?.spacing?.blockGap):"";if(n&&(o===Rc?a=a||"0.5em":!r&&i&&(a=i)),a&&e&&(Object.values(e).forEach(({className:l,name:u,spacingStyles:d})=>{!r&&u!=="flex"&&u!=="grid"||d?.length&&d.forEach(f=>{let p=[];if(f.rules&&Object.entries(f.rules).forEach(([g,m])=>{p.push(`${g}: ${m||a}`)}),p.length){let g="";r?g=o===Rc?`:root :where(.${l})${f?.selector||""}`:`:root :where(${o}-${l})${f?.selector||""}`:g=o===Rc?`:where(.${l}${f?.selector||""})`:`:where(${o}.${l}${f?.selector||""})`,s+=`${g} { ${p.join("; ")}; }`}})}),o===Rc&&r&&(s+=`${Fx} { --wp--style--block-gap: ${a}; }`)),o===Rc&&e){let l=["block","flex","grid"];Object.values(e).forEach(({className:u,displayMode:d,baseStyles:f})=>{d&&l.includes(d)&&(s+=`${o} .${u} { display:${d}; }`),f?.length&&f.forEach(p=>{let g=[];if(p.rules&&Object.entries(p.rules).forEach(([m,h])=>{g.push(`${m}: ${h}`)}),g.length){let m=`.${u}${p?.selector||""}`;s+=`${m} { ${g.join("; ")}; }`}})})}return s}var yOe=["border","color","dimensions","spacing","typography","filter","outline","shadow","background"];function vOe(e,t){return zR(e,void 0,t)}function zR(e,t,o){if(!e)return{};let r=Object.entries(e),n=t?JY[t]??[]:[],s=r.filter(([a])=>yOe.includes(a)||n.includes(a)||o[a]).map(([a,l])=>[a,JSON.parse(JSON.stringify(l))]);return Object.fromEntries(s)}function XY(e){let{styles:t,selector:o,featureSelectors:r,name:n,elementName:i,mediaQuery:s,variationName:a}=e,l=n?JY[n]??[]:pOe[i??""]??[];return l.length?l.flatMap(u=>{let d=t?.[u];return!d||typeof d!="object"?[]:[{styles:JSON.parse(JSON.stringify(d)),selector:o,selectorSuffix:u,mediaQuery:s,featureSelectors:r&&typeof r!="string"?r:void 0,name:n,elementName:i,variationName:a}]}):[]}function SOe(e,t){let{styles:o,selector:r,fallbackGapValue:n,featureSelectors:i,hasLayoutSupport:s,layoutHasBlockGapSupport:a,layoutSelector:l,name:u,elementName:d,isStyleVariation:f,variationName:p}=e;return!u&&!d?[]:Object.entries(t).flatMap(([g,m])=>{let h=o?.[g];return!h||typeof h!="object"?[]:[{styles:JSON.parse(JSON.stringify(h)),selector:r,mediaQuery:m,featureSelectors:i&&typeof i!="string"?i:void 0,fallbackGapValue:n,hasLayoutSupport:s,name:u,elementName:d,isStyleVariation:f,variationName:p,layoutSelector:l,layoutHasBlockGapSupport:a}]})}var kOe=(e,t)=>{let o=[];if(!e?.styles)return o;let r=jx(e),n=vOe(e.styles,r);return n&&o.push({styles:n,selector:Rc,skipSelectorWrapper:!0}),Object.entries(vi.__EXPERIMENTAL_ELEMENTS).forEach(([i,s])=>{e.styles?.elements?.[i]&&o.push({styles:e.styles?.elements?.[i]??{},selector:s,elementName:i,skipSelectorWrapper:!dOe[i]})}),Object.entries(e.styles?.blocks??{}).forEach(([i,s])=>{let a=zR(s,i,r),l=s,u=[],d=[];l?.variations&&Object.entries(l.variations).forEach(([f,p])=>{let g=p,m=zR(g,i,r);g?.css&&(m.css=g.css);let h=typeof t!="string"?t[i]?.styleVariationSelectors?.[f]:void 0;if(h&&typeof t!="string"){let b=t[i];d.push({styles:m,selector:h,featureSelectors:b?.featureSelectors,fallbackGapValue:b?.fallbackGapValue,hasLayoutSupport:b?.hasLayoutSupport,isStyleVariation:!0,variationName:f,layoutSelector:h+b.selector,layoutHasBlockGapSupport:!0,name:i})}Object.entries(g?.elements??{}).forEach(([b,v])=>{v&&vi.__EXPERIMENTAL_ELEMENTS[b]&&u.push({styles:v,selector:Sl(h,vi.__EXPERIMENTAL_ELEMENTS[b]),elementName:b,isStyleVariation:!0})}),Object.entries(g?.blocks??{}).forEach(([b,v])=>{let y=typeof t!="string"?Sl(h,t[b]?.selector):void 0,k=typeof t!="string"?Sl(h,t[b]?.duotoneSelector):void 0,S=typeof t!="string"?DY(h,t[b]?.featureSelectors??{}):void 0,_=zR(v,b,r);v?.css&&(_.css=v.css),!(!y||typeof t=="string")&&(u.push({selector:y,name:b,isStyleVariation:!0,duotoneSelector:k,featureSelectors:S,fallbackGapValue:t[b]?.fallbackGapValue,hasLayoutSupport:t[b]?.hasLayoutSupport,styles:_}),Object.entries(v.elements??{}).forEach(([x,w])=>{w&&vi.__EXPERIMENTAL_ELEMENTS[x]&&u.push({styles:w,selector:Sl(y,vi.__EXPERIMENTAL_ELEMENTS[x]),elementName:x,isStyleVariation:!0})}))})}),typeof t!="string"&&t?.[i]?.selector&&o.push({duotoneSelector:t[i].duotoneSelector,fallbackGapValue:t[i].fallbackGapValue,hasLayoutSupport:t[i].hasLayoutSupport,selector:t[i].selector,styles:a,featureSelectors:t[i].featureSelectors,name:i}),o.push(...d),Object.entries(l?.elements??{}).forEach(([f,p])=>{typeof t!="string"&&p&&t?.[i]&&vi.__EXPERIMENTAL_ELEMENTS[f]&&o.push({styles:p,selector:t[i]?.selector.split(",").map(g=>vi.__EXPERIMENTAL_ELEMENTS[f].split(",").map(h=>g+" "+h)).join(","),elementName:f})}),o.push(...u)}),o},_Oe=(e,t)=>{let o=[];if(!e?.settings)return o;let r=s=>{let a={};return NR.forEach(({path:l})=>{let u=Wr(s,l,!1);u!==!1&&(a=AY(a,l,u))}),a},n=r(e.settings),i=e.settings?.custom;return(Object.keys(n).length>0||i)&&o.push({presets:n,custom:i,selector:Fx}),Object.entries(e.settings?.blocks??{}).forEach(([s,a])=>{let l=a.custom;if(typeof t=="string"||!t[s])return;let u=r(a);(Object.keys(u).length>0||l)&&o.push({presets:u,custom:l,selector:t[s]?.selector,featureSelectors:t[s]?.featureSelectors})}),o};function xOe(e,{tree:t,useRootPaddingAlign:o,disableLayoutStyles:r,hasBlockGapSupport:n,hasFallbackGapSupport:i,disableRootPadding:s}){let{selector:a,selectorSuffix:l,mediaQuery:u,duotoneSelector:d,styles:f,fallbackGapValue:p,hasLayoutSupport:g,featureSelectors:m,layoutSelector:h,layoutHasBlockGapSupport:b,skipSelectorWrapper:v,name:y,variationName:k}=e,S="",_=l?DR(a,l):a;if(m&&typeof m!="string"){let B=bOe(m,f);B=gOe(B,t.settings,y),B=hOe(B,t.settings),Object.entries(B).forEach(([R,A])=>{if(A.length){let O=k?VY(k,R):R;O=l?DR(O,l):O;let P=A.join(";");S+=`:root :where(${O}){${P};}`}})}if(d){let B={};f?.filter&&(B.filter=f.filter,delete f.filter);let R=jR(B);R.length&&(S+=`${d}{${R.join(";")};}`)}let x=h??_;!r&&(Rc===x||g)&&(S+=eq({style:f,selector:x,hasBlockGapSupport:b??n,hasFallbackGapSupport:i,fallbackGapValue:p}));let T=jR(f,_,o,t,s);if(T?.length){let B=v?_:`:root :where(${_})`;S+=`${B}{${T.join(";")};}`}return f?.css&&(S+=GR(f.css,`:root :where(${_})`)),u&&S?`${u}{${S}}`:S}var HR=(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},l=e,u=kOe(l,t),d=_Oe(l,t),f=l?.settings?.useRootPaddingAwareAlignments,{contentSize:p,wideSize:g}=l?.settings?.layout||{},m=a.marginReset||a.rootPadding||a.layoutStyles,h="";if(a.presets&&(p||g)&&(h+=`${Fx} {`,h=p?h+` --wp--style--global--content-size: ${p};`:h,h=g?h+` --wp--style--global--wide-size: ${g};`:h,h+="}"),m&&(h+=":where(body) {margin: 0;",a.rootPadding&&f&&(h+=`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;
`),h+="}"),a.blockStyles){let b=jx(e);u.forEach(v=>{if(v.isStyleVariation&&!a.variationStyles)return;let y=SOe(v,b);[v,...y,...XY(v),...y.flatMap(XY)].forEach(k=>{h+=xOe(k,{tree:l,useRootPaddingAlign:f,disableLayoutStyles:n,hasBlockGapSupport:o,hasFallbackGapSupport:r,disableRootPadding:i})})})}if(a.layoutStyles&&(h=h+".wp-site-blocks > .alignleft { float: left; margin-right: 2em; }",h=h+".wp-site-blocks > .alignright { float: right; margin-left: 2em; }",h=h+".wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }"),a.blockGap&&o){let b=r6(l?.styles?.spacing?.blockGap)||"0.5em";h=h+`:root :where(.wp-site-blocks) > * { margin-block-start: ${b}; margin-block-end: 0; }`,h=h+":root :where(.wp-site-blocks) > :first-child { margin-block-start: 0; }",h=h+":root :where(.wp-site-blocks) > :last-child { margin-block-end: 0; }"}return a.presets&&d.forEach(({selector:b,presets:v})=>{(Rc===b||Fx===b)&&(b="");let y=mOe(b,v);y.length>0&&(h+=y)}),h};var wOe=(e,t)=>{if(e?.selectors&&Object.keys(e.selectors).length>0)return e.selectors;let o={root:t};return Object.entries(fOe).forEach(([r,n])=>{let i=Ms(e,r);i&&(o[n]=i)}),o},UR=(e,t)=>{let{getBlockStyles:o}=(0,QY.select)(vi.store),r={};return e.forEach(n=>{let i=n.name,s=Ms(n);if(!s)return;let a=Ms(n,"filter.duotone");if(!a){let g=Ms(n),m=(0,vi.getBlockSupport)(n,"color.__experimentalDuotone",!1);typeof m=="string"&&g&&(a=Sl(g,m))}let l=!!n?.supports?.layout||!!n?.supports?.__experimentalLayout,u=n?.supports?.spacing?.blockGap?.__experimentalDefault,d=o(i),f={};d?.forEach(g=>{let m=t?`-${t}`:"",h=`${g.name}${m}`,b=t6(h,s);f[h]=b});let p=wOe(n,s);r[i]={duotoneSelector:a??void 0,fallbackGapValue:u,featureSelectors:Object.keys(p).length?p:void 0,hasLayoutSupport:l,name:i,selector:s,styleVariationSelectors:d?.length?f:void 0}}),r};function GR(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,l]=s,u=a.match(/([>+~\s]*::[a-zA-Z-]+)/),d=u?u[1]:"",f=u?a.replace(d,"").trim():a.trim(),p;f===""?p=t:p=a.startsWith(" ")?Sl(t,f):DR(t,f),o+=`:root :where(${p})${d}{${l.trim()}}`}}),o}var tq=c(Q_(),1),{lock:oq,unlock:Wnt}=(0,tq.__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/global-styles-engine");var Yn={};oq(Yn,{getResponsiveMediaQueries:jx,getViewportBreakpoints:i6,getViewportBreakpointValueInPixels:n6});var WR=c(G(),1);var to={desktop:{label:(0,WR.__)("Desktop"),icon:LF,key:"desktop"},tablet:{label:(0,WR.__)("Tablet"),icon:M4,key:"tablet"},mobile:{label:(0,WR.__)("Mobile"),icon:xx,key:"mobile"}},s6=Object.entries(to);var $R=c(ce(),1),rq=c(uo(),1);function Ve(e,t,o){let r=Array.isArray(t)?[...t]:[t],n=Array.isArray(e)?[...e]:{...e},i=r.pop(),s=n;for(let a of r){let l=s[a];s[a]=s=Array.isArray(l)?[...l]:{...l}}return s[i]=o,n}var kl=(e,t,o)=>{let r=Array.isArray(t)?t:t.split("."),n=e;return r.forEach(i=>{n=n?.[i]}),n??o};var COe=["color","border","dimensions","typography","spacing"],EOe={"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},TOe={"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"},ROe=e=>TOe[e]||e;function nq(e,t,...o){let r=Yt(e,t),n=[];if(t){let i=t;do{let s=Yt(e,i);(0,$R.hasBlockSupport)(s,"__experimentalSettings",!1)&&n.push(i)}while(i=e.blocks.parents.get(i))}return o.map(i=>{if(COe.includes(i)){console.warn("Top level useSetting paths are disabled. Please use a subpath to query the information needed.");return}let s=(0,rq.applyFilters)("blockEditor.useSetting.before",void 0,i,t,r);if(s!==void 0)return s;let a=ROe(i);for(let d of n){let f=ya(e,d);if(s=kl(f.settings?.blocks?.[r],a)??kl(f.settings,a),s!==void 0)break}let l=Wu(e);if(s===void 0&&r&&(s=kl(l.__experimentalFeatures?.blocks?.[r],a)),s===void 0&&(s=kl(l.__experimentalFeatures,a)),s!==void 0)return $R.__EXPERIMENTAL_PATHS_WITH_OVERRIDE[a]?s.custom??s.theme??s.default:s;let u=EOe[a]?.(l);return u!==void 0?u:a==="typography.dropCap"?!0:void 0})}var{isContentBlock:a6}=U(Py.privateApis),{getViewportBreakpoints:BOe}=U(Yn);function iq(e,t){return t===to.desktop.key?!0:BOe(Wu(e)?.__experimentalFeatures?.viewport)[t]!==void 0}function POe(e){return e.isBlockInterfaceHidden}function IOe(e){return e?.lastBlockInserted?.clientIds}function OOe(e,t){return e.blocks.byClientId.get(t)}var AOe=(e,t)=>{let o=r=>Ns(e,r)==="disabled"&&Pn(e,r).every(o);return Pn(e,t).every(o)};function Gx(e,t,o){let r=a6(t),n=Yt(e,o),i=a6(n);return jg(e)===o||i&&r}function sq(e,t){return{clientId:t,innerBlocks:aq(e,t)}}function aq(e,t=""){return Pn(e,t).map(o=>sq(e,o))}var l6=(0,$r.createSelector)(sq,e=>[e.blocks.order]),c6=(0,$r.createSelector)(aq,e=>[e.blocks.order]);function u6(e,t,o){let r=Pn(e,t),n=[];for(let i of r){let s=u6(e,i,o);o(e,i)?n.push({clientId:i,innerBlocks:s}):n.push(...s)}return n}function LOe(e,t){return u6(e,t,(o,r)=>Ns(o,r)!=="disabled")}function MOe(e,t){let o=e.blocks.parents.get(t);for(;o!==void 0;){let r=e.blocks.blockEditingModes.get(o);if(r)return r==="disabled";o=e.blocks.parents.get(o)}return!1}function NOe(e,t){return u6(e,t,(o,r)=>{if(Ns(o,r)!=="disabled")return!0;let n=o.blocks.blockEditingModes.get(r);if(n)return n!=="disabled";if(MOe(o,r))return!1;if(o.editedContentOnlySection){if(KR(o,r))return!1;if(!$u(o,r)||a6(Yt(o,r)))return!0}return!1})}var DOe=(0,$r.createRegistrySelector)(()=>(0,$r.createSelector)(LOe,e=>[e.blocks.order,e.derivedBlockEditingModes,e.blocks.blockEditingModes])),VOe=(0,$r.createRegistrySelector)(()=>(0,$r.createSelector)(NOe,e=>[e.blocks.order,e.derivedBlockEditingModes,e.blocks.blockEditingModes,e.blocks.parents,e.blocks.byClientId,e.blocks.attributes,e.blockListSettings,e.editedContentOnlySection,e.settings])),FOe=(0,$r.createSelector)((e,t,o=!1)=>_l(e,t,o).filter(r=>Ns(e,r)!=="disabled"),e=>[e.blocks.parents,e.blocks.blockEditingModes,e.settings.templateLock,e.blockListSettings]);function zOe(e){return e.removalPromptData}function jOe(e){return e.blockRemovalRules}var HOe=(0,$r.createSelector)(e=>{let o=Iy(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,l=o[s]??-1;return a-l})},e=>[e.blocks.order,e.styleOverrides]);function UOe(e){return e.registeredInserterMediaCategories}var GOe=(0,$r.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(l=>l.startsWith(`${a.mediaType}/`)))},e=>[e.settings.inserterMediaCategories,e.settings.allowedMimeTypes,e.settings.enableOpenverseMediaCategory,e.registeredInserterMediaCategories]),WOe=(0,$r.createRegistrySelector)(e=>(0,$r.createSelector)((t,o=null)=>{let{getAllPatterns:r}=U(e(Qo)),n=r(),{allowedBlockTypes:i}=Wu(t);return n.some(s=>{let{inserter:a=!0}=s;if(!a)return!1;let l=zg(s);return $x(l,i)&&l.every(({name:u})=>Hg(t,u,o))})},(t,o)=>[...Kx(e)(t),...Hf(e)(t,o)])),$Oe=(0,$r.createRegistrySelector)(e=>(0,$r.createSelector)((t,o)=>{if(o?.startsWith("core/block/")){let r=parseInt(o.slice(11),10),n=U(e(Qo)).getReusableBlocks().find(({id:i})=>i===r);return n?Wx(n,t.settings[ju]?.(e)??t.settings.__experimentalUserPatternCategories):null}return[...t.settings.__experimentalBlockPatterns??[],...t.settings[Pf]?.(e)??[]].find(({name:r})=>r===o)},(t,o)=>o?.startsWith("core/block/")?[U(e(Qo)).getReusableBlocks(),t.settings.__experimentalReusableBlocks]:[t.settings.__experimentalBlockPatterns,t.settings[Pf]?.(e)])),KOe=(0,$r.createRegistrySelector)(e=>(0,$r.createSelector)(t=>[...U(e(Qo)).getReusableBlocks().map(o=>Wx(o,t.settings[ju]?.(e)??t.settings.__experimentalUserPatternCategories)),...t.settings.__experimentalBlockPatterns??[],...t.settings[Pf]?.(e)??[]].filter((o,r,n)=>r===n.findIndex(i=>o.name===i.name)),Kx(e))),YOe=[],qOe=(0,$r.createRegistrySelector)(e=>t=>{let o=t.settings[O1];return(o?o(e):t.settings.__experimentalReusableBlocks)??YOe});function ZOe(e){return e.lastFocus}function XOe(e){return e.isDragging}function QOe(e){return e.expandedBlock}var d6=(e,t)=>{let o=t,r;for(;!r&&(o=e.blocks.parents.get(o));)Bc(e,o)==="contentOnly"&&(r=o);return r};function lq(e,t){let o=Yt(e,t);if(o==="core/block")return!0;let r=ya(e,t),n=o==="core/template-part",i=e.settings?.[Of],s=e.settings?.disableContentOnlyForUnsyncedPatterns,a=e.settings?.disableContentOnlyForTemplateParts;if((!s&&r?.metadata?.patternName||n&&!a)&&!i)return!0;let l=Bc(e,t)==="contentOnly",u=cr(e,t),d=Bc(e,u)==="contentOnly";return!!(l&&!d)}var $u=(e,t)=>{if(KR(e,t))return;let o=t,r;for(;o=e.blocks.parents.get(o);)lq(e,o)&&(r=o);return r};function jf(e,t){return KR(e,t)||$u(e,t)?!1:lq(e,t)}function f6(e){return e.editedContentOnlySection}function KR(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 JOe=(0,$r.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 jg(e){return e.settings?.[If]}function p6(e){return e.zoomLevel==="auto-scaled"||e.zoomLevel<100}function eAe(e){return e.zoomLevel}function cq(e,t,o=""){let r=Array.isArray(t)?t:[t],n=s=>r.every(a=>Hg(e,a,s));if(!o){if(n(o))return o;let s=jg(e);return s&&n(s)?s:null}let i=o;for(;i!==null&&!n(i);)i=cr(e,i);return i}function tAe(e,t,o){let{allowedBlockTypes:r}=Wu(e);if(!$x(zg(t),r))return null;let i=zg(t).map(({blockName:s})=>s);return cq(e,i,o)}function oAe(e){return e.insertionPoint}var rAe=(e,t)=>{let o=Yt(e,t);if(!(0,Py.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(to).some(i=>iq(e,i.key)&&n?.viewport?.[i.key]===!1):!1},m6=(e,t)=>{let o=Yt(e,t);return(0,Py.hasBlockSupport)(o,"visibility",!0)?e.blocks.attributes.get(t)?.metadata?.blockVisibility===!1:!1},nAe=(e,t)=>_l(e,t).some(r=>m6(e,r)),uq=(e,t,o)=>{if(m6(e,t))return!0;let n=e.blocks.attributes.get(t)?.metadata?.blockVisibility?.viewport;if(typeof n=="object"&&n!==null&&typeof o=="string"){let i=o.toLowerCase();return iq(e,i)&&n?.[i]===!1}return!1},iAe=(e,t,o)=>_l(e,t).some(n=>uq(e,n,o));function sAe(e){return!!e.hasBlockSpotlight||!!e.editedContentOnlySection}function dq(e,t){return!!ya(e,t)?.lock?.edit}function fq(e,t){let o=ya(e,t);if(o?.lock?.move!==void 0)return!!o?.lock?.move;let r=cr(e,t);return Bc(e,r)==="all"}function pq(e,t){let o=ya(e,t);if(o?.lock?.remove!==void 0)return!!o?.lock?.remove;let r=cr(e,t),n=Bc(e,r);return n==="all"||n==="insert"}function aAe(e,t){return dq(e,t)||fq(e,t)||pq(e,t)}function lAe(e){return e.listViewContentPanelOpen}function cAe(e,t){return e.openedListViewPanels?.allOpen?!0:e.openedListViewPanels?.panels?.[t]===!0}function uAe(e){return e.listViewExpandRevision||0}function dAe(e,t){let o=Yt(e,t);if(o==="core/navigation")return!0;if(!(0,Py.hasBlockSupport)(o,"listView"))return!1;let r=Oy(e,t)?.allowedBlocks;return!(Pn(e,t).length===0&&(r===!1||Array.isArray(r)&&r.length===0))}function fAe(e){return e.viewportModalClientIds}function pAe(e){return e.requestedInspectorTab}var Ux={viewport:"default",pseudo:"default"};function mq(e){return e.styleStateViewport??Ux.viewport}function mAe(e){return e.isResponsiveEditing}var gq=(0,$r.createSelector)((e,t)=>({...e.selectedBlockStyleState?.clientId===t?e.selectedBlockStyleState.value??Ux:Ux,viewport:mq(e)}),e=>[e.styleStateViewport,e.selectedBlockStyleState]);function gAe(e,t){let o=gq(e,t);return o.viewport!==Ux.viewport||o.pseudo!==Ux.pseudo}function hAe(e,t){return e.selectedBlockStyleState?.clientId!==t?!0:e.selectedBlockStyleState.showStateOnCanvas??!0}var qx=c(G(),1),Ho={user:"user",theme:"theme",directory:"directory"},Yx={full:"fully",unsynced:"unsynced"},Ug={name:"allPatterns",label:(0,qx._x)("All","patterns")},Ku={name:"myPatterns",label:(0,qx.__)("My patterns")},Ay={name:"core/starter-content",label:(0,qx.__)("Starter content")};function qR(e,t,o){let r=e.name.startsWith("core/block"),n=e.source==="core"||e.source?.startsWith("pattern-directory");return!!(t===Ho.theme&&(r||n)||t===Ho.directory&&(r||!n)||t===Ho.user&&e.type!==Ho.user||o===Yx.full&&e.syncStatus!==""||o===Yx.unsynced&&e.syncStatus!=="unsynced"&&r)}var Uf=Symbol("isFiltered"),hq=new WeakMap,bq=new WeakMap;function Wx(e,t=[]){return{name:`core/block/${e.id}`,id:e.id,type:Ho.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 bAe(e){let t=(0,yq.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 ZR(e){let t=hq.get(e);return t||(t=bAe(e),hq.set(e,t)),t}function zg(e){let t=bq.get(e);return t||(t=(0,vq.parse)(e.content),t=t.filter(o=>o.blockName!==null),bq.set(e,t)),t}var Gg=(e,t,o=null)=>typeof e=="boolean"?e:Array.isArray(e)?e.includes("core/post-content")&&t===null?!0:e.includes(t):o,$x=(e,t)=>{if(typeof t=="boolean")return t;let o=[...e];for(;o.length>0;){let r=o.shift();if(!Gg(t,r.name||r.blockName,!0))return!1;r.innerBlocks?.forEach(i=>{o.push(i)})}return!0},Kx=e=>t=>[t.settings.__experimentalBlockPatterns,t.settings[ju]?.(e)??t.settings.__experimentalUserPatternCategories,t.settings.__experimentalReusableBlocks,t.settings[Pf]?.(e),t.blockPatterns,U(e(Qo)).getReusableBlocks()],Hf=()=>(e,t)=>[e.blockListSettings.get(t),e.blocks.byClientId.get(t),e.blocks.order.get(t||""),e.settings.allowedBlockTypes,e.settings.templateLock,Ns(e,t),jg(e),jf(e,t),$u(e,t)];function Sq(e,t){return typeof e=="string"&&typeof t=="string"?e>t:Number(e)>Number(t)}var yAe=(e,t,o)=>(r,n)=>{let i,s;if(typeof e=="function"?(i=e(r),s=e(n)):(i=r[e],s=n[e]),Sq(i,s))return o==="asc"?1:-1;if(Sq(s,i))return o==="asc"?-1:1;let a=t.findIndex(u=>u===r),l=t.findIndex(u=>u===n);return a>l?1:l>a?-1:0};function Pc(e,t,o="asc"){return e.concat().sort(yAe(t,e,o))}var{isContentBlock:h6}=U(bt.privateApis),vAe=3600*1e3,SAe=24*3600*1e3,kAe=168*3600*1e3,In=[],_Ae=new Set,xq={[Uf]:!0};function Yt(e,t){let o=e.blocks.byClientId.get(t);return o?o.name:null}function xAe(e,t){let o=e.blocks.byClientId.get(t);return!!o&&o.isValid}function ya(e,t){return e.blocks.byClientId.get(t)?e.blocks.attributes.get(t):null}function qu(e,t){return e.blocks.byClientId.has(t)?e.blocks.tree.get(t):null}var wAe=(0,yt.createSelector)((e,t)=>{let o=e.blocks.byClientId.get(t);return o?{...o,attributes:ya(e,t)}:null},(e,t)=>[e.blocks.byClientId.get(t),e.blocks.attributes.get(t)]);function CAe(e,t){let o=!t||!eB(e,t)?t||"":"controlled||"+t;return e.blocks.tree.get(o)?.innerBlocks||In}function EAe(e,t){return(0,Ds.default)("wp.data.select( 'core/block-editor' ).__unstableGetClientIdWithClientIdsTree",{since:"6.3",version:"6.5"}),l6(e,t)}function TAe(e,t){return(0,Ds.default)("wp.data.select( 'core/block-editor' ).__unstableGetClientIdsTree",{since:"6.3",version:"6.5"}),c6(e,t)}var wq=(0,yt.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]),Iy=e=>wq(e,""),RAe=(0,yt.createSelector)((e,t)=>{let o=Iy(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]),Cq=(0,yt.createSelector)((e,t)=>{if(!t)return In;let o=Array.isArray(t)?t:[t],n=Iy(e).filter(i=>{let s=e.blocks.byClientId.get(i);return o.includes(s.name)});return n.length>0?n:In},e=>[e.blocks.order,e.blocks.byClientId]);function BAe(e,t){return(0,Ds.default)("wp.data.select( 'core/block-editor' ).__experimentalGetGlobalBlocksByName",{since:"6.5",alternative:"wp.data.select( 'core/block-editor' ).getBlocksByName"}),Cq(e,t)}var XR=(0,yt.createSelector)((e,t)=>(Array.isArray(t)?t:[t]).map(o=>qu(e,o)),(e,t)=>(Array.isArray(t)?t:[t]).map(o=>e.blocks.tree.get(o))),PAe=(0,yt.createSelector)((e,t)=>XR(e,t).filter(Boolean).map(o=>o.name),(e,t)=>XR(e,t));function IAe(e,t){return Pn(e,t).length}function Xx(e){return e.selection.selectionStart}function Qx(e){return e.selection.selectionEnd}function OAe(e){return e.selection.selectionStart.clientId}function AAe(e){return e.selection.selectionEnd.clientId}function LAe(e){let t=Gf(e).length;return t||(e.selection.selectionStart.clientId?1:0)}function MAe(e){let{selectionStart:t,selectionEnd:o}=e.selection;return!!t.clientId&&t.clientId===o.clientId}function Ly(e){let{selectionStart:t,selectionEnd:o}=e.selection,{clientId:r}=t;return!r||r!==o.clientId?null:r}function NAe(e){let t=Ly(e);return t?qu(e,t):null}function cr(e,t){return e.blocks.parents.get(t)??null}var _l=(0,yt.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():In},e=>[e.blocks.parents]),b6=(0,yt.createSelector)((e,t,o,r=!1)=>{let n=_l(e,t,r),i=Array.isArray(o)?s=>o.includes(s):s=>o===s;return n.filter(s=>i(Yt(e,s)))},e=>[e.blocks.parents]);function DAe(e,t){let o=t,r;do r=o,o=e.blocks.parents.get(o);while(o);return r}function VAe(e,t){let o=Ly(e),r=[..._l(e,t),t],n=[..._l(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 y6(e,t,o=1){if(t===void 0&&(t=Ly(e)),t===void 0&&(o<0?t=v6(e):t=Eq(e)),!t)return null;let r=cr(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 FAe(e,t){return y6(e,t,-1)}function zAe(e,t){return y6(e,t,1)}function jAe(e){return e.initialPosition}var My=(0,yt.createSelector)(e=>{let{selectionStart:t,selectionEnd:o}=e.selection;if(!t.clientId||!o.clientId)return In;if(t.clientId===o.clientId)return[t.clientId];let r=cr(e,t.clientId);if(r===null)return In;let n=Pn(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 Gf(e){let{selectionStart:t,selectionEnd:o}=e.selection;return t.clientId===o.clientId?In:My(e)}var HAe=(0,yt.createSelector)(e=>{let t=Gf(e);return t.length?t.map(o=>qu(e,o)):In},e=>[...My.getDependants(e),e.blocks.byClientId,e.blocks.order,e.blocks.attributes]);function v6(e){return Gf(e)[0]||null}function Eq(e){let t=Gf(e);return t[t.length-1]||null}function UAe(e,t){return v6(e)===t}function Tq(e,t){return Gf(e).indexOf(t)!==-1}var GAe=(0,yt.createSelector)((e,t)=>{let o=t,r=!1;for(;o&&!r;)o=cr(e,o),r=Tq(e,o);return r},e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]);function WAe(e){let{selectionStart:t,selectionEnd:o}=e.selection;return t.clientId===o.clientId?null:t.clientId||null}function $Ae(e){let{selectionStart:t,selectionEnd:o}=e.selection;return t.clientId===o.clientId?null:o.clientId||null}function KAe(e){let t=Xx(e),o=Qx(e);return!t.attributeKey&&!o.attributeKey&&typeof t.offset>"u"&&typeof o.offset>"u"}function YAe(e){let t=Xx(e),o=Qx(e);return!!t&&!!o&&t.clientId===o.clientId&&t.attributeKey===o.attributeKey&&t.offset===o.offset}function qAe(e){return My(e).some(t=>{let o=Yt(e,t);return!(0,bt.getBlockType)(o).merge})}function ZAe(e,t){let o=Xx(e),r=Qx(e);if(o.clientId===r.clientId||!o.attributeKey||!r.attributeKey||typeof o.offset>"u"||typeof r.offset>"u")return!1;let n=cr(e,o.clientId),i=cr(e,r.clientId);if(n!==i)return!1;let s=Pn(e,n),a=s.indexOf(o.clientId),l=s.indexOf(r.clientId),u,d;a>l?(u=r,d=o):(u=o,d=r);let f=t?d.clientId:u.clientId,p=t?u.clientId:d.clientId,g=Yt(e,f);if(!(0,bt.getBlockType)(g).merge)return!1;let h=qu(e,p);if(h.name===g)return!0;let b=(0,bt.switchToBlockType)(h,g);return b&&b.length}var XAe=e=>{let t=Xx(e),o=Qx(e);if(t.clientId===o.clientId||!t.attributeKey||!o.attributeKey||typeof t.offset>"u"||typeof o.offset>"u")return In;let r=cr(e,t.clientId),n=cr(e,o.clientId);if(r!==n)return In;let i=Pn(e,r),s=i.indexOf(t.clientId),a=i.indexOf(o.clientId),[l,u]=s>a?[o,t]:[t,o],d=qu(e,l.clientId),f=qu(e,u.clientId),p=d.attributes[l.attributeKey],g=f.attributes[u.attributeKey],m=(0,Yu.create)({html:p}),h=(0,Yu.create)({html:g});return m=(0,Yu.remove)(m,0,l.offset),h=(0,Yu.remove)(h,u.offset,h.text.length),[{...d,attributes:{...d.attributes,[l.attributeKey]:(0,Yu.toHTMLString)({value:m})}},{...f,attributes:{...f.attributes,[u.attributeKey]:(0,Yu.toHTMLString)({value:h})}}]};function Pn(e,t){return e.blocks.order.get(t||"")||In}function Rq(e,t){let o=cr(e,t);return Pn(e,o).indexOf(t)}function Bq(e,t){let{selectionStart:o,selectionEnd:r}=e.selection;return o.clientId!==r.clientId?!1:o.clientId===t}function Pq(e,t,o=!1){let r=My(e);return r.length?o?r.some(n=>_l(e,n,!0).includes(t)):r.some(n=>cr(e,n)===t):!1}function Iq(e,t,o=!1){return Pn(e,t).some(r=>S6(e,r)||o&&Iq(e,r,o))}function QAe(e,t){if(!t)return!1;let o=Gf(e),r=o.indexOf(t);return r>-1&&r<o.length-1}function JAe(e){let{selectionStart:t,selectionEnd:o}=e.selection;return t.clientId!==o.clientId}function e2e(e){return e.isMultiSelecting}function t2e(e){return e.isSelectionEnabled}function o2e(e,t){return e.blocksMode[t]||"visual"}function r2e(e){return e.isTyping}function Oq(e){return!!e.draggedBlocks.length}function n2e(e){return e.draggedBlocks}function S6(e,t){return e.draggedBlocks.includes(t)}function i2e(e,t){return Oq(e)?_l(e,t).some(r=>S6(e,r)):!1}function s2e(){return(0,Ds.default)('wp.data.select( "core/block-editor" ).isCaretWithinFormattedText',{since:"6.1",version:"6.3"}),!1}var a2e=(0,yt.createSelector)(e=>{let t,o,{insertionCue:r,selection:{selectionEnd:n}}=e;if(r!==null)return r;let{clientId:i}=n;return i?(t=cr(e,i)||void 0,o=Rq(e,n.clientId)+1):o=Pn(e).length,{rootClientId:t,index:o}},e=>[e.insertionCue,e.selection.selectionEnd.clientId,e.blocks.parents,e.blocks.order]);function l2e(e){return e.insertionCue!==null}function c2e(e){return e.template.isValid}function u2e(e){return e.settings.template}function Bc(e,t){if(!t)return e.settings.templateLock??!1;let o=Oy(e,t)?.templateLock;return o==="contentOnly"&&e.editedContentOnlySection===t?!1:o??!1}var k6=(e,t,o=null)=>{let r,n;if(t&&typeof t=="object"?(r=t,n=t.name):(r=(0,bt.getBlockType)(t),n=t),!r)return!1;let{allowedBlockTypes:i}=Wu(e);if(!Gg(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 l=o,u=!1;do{if(a.includes(Yt(e,l))){u=!0;break}l=e.blocks.parents.get(l)}while(l);return u}return!0},Jx=(e,t,o=null)=>{if(e.settings.isPreviewMode||!k6(e,t,o))return!1;let r;t&&typeof t=="object"?(r=t,t=r.name):r=(0,bt.getBlockType)(t);let n=Bc(e,o);if(n&&n!=="contentOnly"||_6(e,o))return!1;let i=Ns(e,o??""),s=!!jf(e,o),a=s?o:$u(e,o),l=!!a;if(i==="disabled"&&(!l||t!==(0,bt.getDefaultBlockName)()))return!1;let u=Oy(e,o);if(o&&u===void 0)return!1;let d=h6(t);if(l&&!d||l&&Yt(e,a)==="core/block")return!1;if(l&&(s||i==="contentOnly"||i==="disabled")&&!Gx(e,t,o)){let S=(0,bt.getDefaultBlockName)();if(t===S){if(!Pn(e,o).some(w=>Yt(e,w)===S))return!1}else return!1}let f=Yt(e,o),g=(0,bt.getBlockType)(f)?.allowedBlocks,m=Gg(g,t);if(m!==!1){let S=u?.allowedBlocks,_=Gg(S,t);_!==null&&(m=_)}let h=r.parent,b=Gg(h,f),v=!0,y=r.ancestor;y&&(v=[o,..._l(e,o)].some(_=>Gg(y,Yt(e,_))));let k=v&&(m===null&&b===null||m===!0||b===!0);return k&&(0,_q.applyFilters)("blockEditor.__unstableCanInsertBlockType",k,r,o,{getBlock:qu.bind(null,e),getBlockParentsByBlockName:b6.bind(null,e)})},Hg=(0,yt.createRegistrySelector)(e=>(0,yt.createSelector)(Jx,(t,o,r)=>Hf(e)(t,r)));function d2e(e,t,o=null){return t.every(r=>Hg(e,Yt(e,r),o))}function _6(e,t){return!!t&&Yt(e,t)==="core/html"}function x6(e,t){if(e.settings.isPreviewMode||_6(e,cr(e,t)))return!1;let o=ya(e,t);if(o===null)return!0;if(o.lock?.remove!==void 0)return!o.lock.remove;let r=cr(e,t),n=Bc(e,r);if(n&&n!=="contentOnly")return!1;let i=!!jf(e,r),s=i?r:$u(e,r),a=!!s,l=h6(Yt(e,t));if(a&&!l||a&&Yt(e,s)==="core/block")return!1;let u=Ns(e,r),d=Yt(e,t),f=(0,bt.getDefaultBlockName)();return a&&(i||d===f||u==="contentOnly")&&!Gx(e,Yt(e,t),r)?d===f?Pn(e,r).filter(m=>Yt(e,m)===f).length>1:!1:u!=="disabled"}function Aq(e,t){return t.every(o=>x6(e,o))}function Lq(e,t){if(e.settings.isPreviewMode||_6(e,cr(e,t)))return!1;let o=ya(e,t);if(o===null)return!0;if(o.lock?.move!==void 0)return!o.lock.move;let r=cr(e,t);if(Bc(e,r)==="all")return!1;let i=!!$u(e,t),s=h6(Yt(e,t));if(i&&!s)return!1;let a=!!jf(e,r),l=Ns(e,r);return i&&(a||l==="contentOnly")&&!Gx(e,Yt(e,t),r)?!1:Ns(e,r)!=="disabled"}function f2e(e,t){return t.every(o=>Lq(e,o))}function Mq(e,t){if(e.settings.isPreviewMode)return!1;let o=ya(e,t);if(o===null)return!0;let{lock:r}=o;return!r?.edit}function p2e(e,t){return e.settings.isPreviewMode||!(0,bt.hasBlockSupport)(t,"lock",!0)?!1:!!e.settings?.canLockBlocks}function QR(e,t){return e.preferences.insertUsage?.[t]??null}var Zx=(e,t,o)=>(0,bt.hasBlockSupport)(t,"inserter",!0)?Jx(e,t.name,o):!1,m2e=(e,t)=>o=>{let r=`${t.id}/${o.name}`,{time:n,count:i=0}=QR(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,innerContent:o.innerContent,keywords:o.keywords||t.keywords,frecency:JR(n,i),isSearchOnly:o.isSearchOnly}},JR=(e,t)=>{if(!e)return t;let o=Date.now()-e;switch(!0){case o<vAe:return t*4;case o<SAe:return t*2;case o<kAe:return t/2;default:return t/4}},Nq=(e,{buildScope:t="inserter"})=>o=>{let r=o.name,n=!1;(0,bt.hasBlockSupport)(o.name,"multiple",!0)||(n=XR(e,Iy(e)).some(({name:f})=>f===o.name));let{time:i,count:s=0}=QR(e,r)||{},a={id:r,name:o.name,title:o.title,icon:o.icon,isDisabled:n,frecency:JR(i,s)};if(t==="transform")return a;let l=(0,bt.getBlockVariations)(o.name,"inserter"),u=(0,bt.getBlockVariations)(o.name,"block"),d=[...l,...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}},g2e=(e,t)=>o=>{let r=`${t.id}/${o.name}`,{time:n,count:i=0}=QR(e,r)||{};return{...t,id:r,icon:o.icon||t.icon,title:o.title||t.title,frecency:JR(n,i),variationName:o.name}},h2e=(0,yt.createRegistrySelector)(e=>(0,yt.createSelector)((t,o=null,r=xq)=>{let n=g=>{let m=g.wp_pattern_sync_status?Cc:{src:Cc,foreground:"var(--wp-block-synced-color)"},h=Wx(g),{time:b,count:v=0}=QR(t,h.name)||{},y=JR(b,v);return{id:h.name,name:"core/block",initialAttributes:{ref:g.id},title:h.title,icon:m,category:"reusable",keywords:["reusable"],isDisabled:!1,utility:1,frecency:y,content:h.content,get blocks(){return ZR(h).blocks},syncStatus:h.syncStatus}},i=Jx(t,"core/block",o)?U(e(Qo)).getReusableBlocks().map(n):[],s=Nq(t,{buildScope:"inserter"}),a=(0,bt.getBlockTypes)().filter(g=>(0,bt.hasBlockSupport)(g,"inserter",!0)).map(s);if(r[Uf]!==!1)a=a.filter(g=>Zx(t,g,o));else{let{getClosestAllowedInsertionPoint:g}=U(e(Qo));a=a.filter(m=>k6(t,m,o)&&g(m.name,o)!==null).map(m=>({...m,isAllowedInCurrentRoot:Zx(t,m,o)}))}let l=a.reduce((g,m)=>{let{variations:h=[]}=m;if(h.some(({isDefault:b})=>b)||g.push(m),h.length){let b=m2e(t,m);g.push(...h.map(b))}return g},[]),u=(g,m)=>{let{core:h,noncore:b}=g;return(m.name.startsWith("core/")?h:b).push(m),g},{core:d,noncore:f}=l.reduce(u,{core:[],noncore:[]});return[...[...d,...f],...i]},(t,o)=>[(0,bt.getBlockTypes)(),U(e(Qo)).getReusableBlocks(),t.blocks.order,t.preferences.insertUsage,...Hf(e)(t,o)])),b2e=(0,yt.createRegistrySelector)(e=>(0,yt.createSelector)((t,o,r=null)=>{let n=Array.isArray(o)?o:[o],i=Nq(t,{buildScope:"transform"}),s=(0,bt.getBlockTypes)().filter(u=>Zx(t,u,r)).map(i),a=Object.fromEntries(Object.entries(s).map(([,u])=>[u.name,u])),l=(0,bt.getPossibleBlockTransformations)(n).reduce((u,d)=>{let f=a[d?.name];if(!f)return u;let{variationName:p}=d;if(!p)return u.push(f),u;let g=(0,bt.getBlockVariations)(f.name,"transform")?.find(({name:m})=>m===p);return g?(u.push(g2e(t,f)(g)),u):(u.push(f),u)},[]);return Pc(l,u=>u.frecency,"desc")},(t,o,r)=>[(0,bt.getBlockTypes)(),t.preferences.insertUsage,...Hf(e)(t,r)])),y2e=(e,t=null)=>(0,bt.getBlockTypes)().some(n=>Zx(e,n,t))?!0:Jx(e,"core/block",t),g6=(0,yt.createRegistrySelector)(e=>(0,yt.createSelector)((t,o=null)=>{if(!o)return;let r=(0,bt.getBlockTypes)().filter(i=>Zx(t,i,o));return Jx(t,"core/block",o)&&r.push("core/block"),r},(t,o)=>[(0,bt.getBlockTypes)(),...Hf(e)(t,o)])),v2e=(0,yt.createSelector)((e,t=null)=>((0,Ds.default)('wp.data.select( "core/block-editor" ).__experimentalGetAllowedBlocks',{alternative:'wp.data.select( "core/block-editor" ).getAllowedBlocks',since:"6.2",version:"6.4"}),g6(e,t)),(e,t)=>g6.getDependants(e,t));function Dq(e,t=null){if(!t)return;let{defaultBlock:o,directInsert:r}=e.blockListSettings.get(t)??{};if(!(!o||!r))return o}function S2e(e,t=null){return(0,Ds.default)('wp.data.select( "core/block-editor" ).__experimentalGetDirectInsertBlock',{alternative:'wp.data.select( "core/block-editor" ).getDirectInsertBlock',since:"6.3",version:"6.4"}),Dq(e,t)}var k2e=(0,yt.createRegistrySelector)(e=>(t,o)=>{let r=U(e(Qo)).getPatternBySlug(o);return r?ZR(r):null}),w6=e=>(t,o)=>[...Kx(e)(t),...Hf(e)(t,o)],kq=new WeakMap;function _2e(e){let t=kq.get(e);return t||(t={...e,get blocks(){return ZR(e).blocks}},kq.set(e,t)),t}var x2e=(0,yt.createRegistrySelector)(e=>(0,yt.createSelector)((t,o=null,r=xq)=>{let{getAllPatterns:n}=U(e(Qo)),i=n(),{allowedBlockTypes:s}=Wu(t);return i.filter(({inserter:d=!0})=>!!d).map(_2e).filter(d=>$x(zg(d),s)).filter(d=>zg(d).every(({blockName:f})=>r[Uf]!==!1?Hg(t,f,o):k6(t,f,o)))},w6(e))),w2e=(0,yt.createRegistrySelector)(e=>(0,yt.createSelector)((t,o,r=null)=>{if(!o)return In;let n=e(Qo).__experimentalGetAllowedPatterns(r),i=Array.isArray(o)?o:[o],s=n.filter(a=>a?.blockTypes?.some?.(l=>i.includes(l)));return s.length===0?In:s},(t,o,r)=>w6(e)(t,r))),C2e=(0,yt.createRegistrySelector)(e=>((0,Ds.default)('wp.data.select( "core/block-editor" ).__experimentalGetPatternsByBlockTypes',{alternative:'wp.data.select( "core/block-editor" ).getPatternsByBlockTypes',since:"6.2",version:"6.4"}),e(Qo).getPatternsByBlockTypes)),E2e=(0,yt.createRegistrySelector)(e=>(0,yt.createSelector)((t,o,r=null)=>{if(!o||o.some(({clientId:i,innerBlocks:s})=>s.length||eB(t,i)))return In;let n=Array.from(new Set(o.map(({name:i})=>i)));return e(Qo).getPatternsByBlockTypes(n,r)},(t,o,r)=>w6(e)(t,r)));function Oy(e,t){return e.blockListSettings.get(t)}function Wu(e){return e.settings}function T2e(e){return e.blocks.isPersistentChange}function R2e(e){return e.blocks.lastBlockChangeHistoryMode?e.blocks.lastBlockChangeHistoryMode:e.blocks.isPersistentChange===!1?"merge":"persistent"}var B2e=(0,yt.createSelector)((e,t=[])=>{let o={};for(let r of t){let n=Oy(e,r);n&&(o[r]=n)}return o},e=>[e.blockListSettings]),P2e=(0,yt.createRegistrySelector)(e=>(0,yt.createSelector)((t,o)=>{(0,Ds.default)("wp.data.select( 'core/block-editor' ).__experimentalGetReusableBlockTitle",{since:"6.6",version:"6.8"});let r=U(e(Qo)).getReusableBlocks().find(n=>n.id===o);return r?r.title?.raw:null},()=>[U(e(Qo)).getReusableBlocks()]));function I2e(e){return e.blocks.isIgnoredChange}function O2e(e){return e.lastBlockAttributesChange}function A2e(){return(0,Ds.default)('wp.data.select( "core/block-editor" ).hasBlockMovingClientId',{since:"6.7",hint:"Block moving mode feature has been removed"}),!1}function L2e(e){return!!e.automaticChangeStatus}function M2e(e,t){return e.highlightedBlock===t}function eB(e,t){return e.blocks.controlledInnerBlocks.has(t)}var N2e=(0,yt.createSelector)((e,t)=>{if(!t.length)return null;let o=Ly(e);if(t.includes(Yt(e,o)))return o;let r=Gf(e),n=b6(e,o||r[0],t);return n?n[n.length-1]:null},(e,t)=>[e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId,t]);function D2e(e,t,o){let{lastBlockInserted:r}=e;return r.clientIds?.includes(t)&&r.source===o}function V2e(e,t){return e.blockVisibility?.[t]??!0}function F2e(){(0,Ds.default)("wp.data.select( 'core/block-editor' ).getHoveredBlockClientId",{since:"6.9",version:"7.1"})}var z2e=(0,yt.createSelector)(e=>{let t=new Set(Object.keys(e.blockVisibility).filter(o=>e.blockVisibility[o]));return t.size===0?_Ae:t},e=>[e.blockVisibility]);function Vq(e,t){if(Ns(e,t)!=="default")return!1;if(!Mq(e,t))return!0;if(p6(e)){let n=jg(e);if(n){if(Pn(e,n)?.includes(t))return!0}else if(t&&!cr(e,t))return!0}return((0,bt.hasBlockSupport)(Yt(e,t),"__experimentalDisableBlockOverlay",!1)?!1:eB(e,t))&&!Bq(e,t)&&!Pq(e,t,!0)}function j2e(e,t){let o=e.blocks.parents.get(t);for(;o;){if(Vq(e,o))return!0;o=e.blocks.parents.get(o)}return!1}function Ns(e,t=""){return t===null&&(t=""),e.derivedBlockEditingModes?.has(t)?e.derivedBlockEditingModes.get(t):e.blocks.blockEditingModes.has(t)?e.blocks.blockEditingModes.get(t):"default"}var H2e=(0,yt.createRegistrySelector)(e=>(t,o="")=>{let r=o||Ly(t);if(!r||jf(t,r))return!1;let{getGroupingBlockName:n}=e(bt.store),i=qu(t,r),s=n();return i&&(i.name===s||(0,bt.getBlockType)(i.name)?.transforms?.ungroup)&&!!i.innerBlocks.length&&x6(t,r)}),U2e=(0,yt.createRegistrySelector)(e=>(t,o=In)=>{let{getGroupingBlockName:r}=e(bt.store),n=r(),i=o?.length?o:My(t),s=i?.length?cr(t,i[0]):void 0;return Hg(t,n,s)&&i.length&&Aq(t,i)}),G2e=(e,t)=>((0,Ds.default)("wp.data.select( 'core/block-editor' ).__unstableGetContentLockingParent",{since:"6.1",version:"6.7"}),d6(e,t));function W2e(e){return(0,Ds.default)("wp.data.select( 'core/block-editor' ).__unstableGetTemporarilyEditingAsBlocks",{since:"6.1",version:"6.7"}),f6(e)}var tB={};Cr(tB,{__experimentalUpdateSettings:()=>E6,clearBlockRemovalPrompt:()=>X2e,clearRequestedInspectorTab:()=>gLe,closeListViewContentPanel:()=>dLe,deleteStyleOverride:()=>eLe,editContentOnlySection:()=>R6,ensureDefaultBlock:()=>Uq,expandBlock:()=>nLe,hideBlockInterface:()=>Y2e,hideViewportModal:()=>pLe,openListViewContentPanel:()=>uLe,privateRemoveBlocks:()=>T6,requestInspectorTab:()=>mLe,resetZoomLevel:()=>lLe,setBlockRemovalRules:()=>Q2e,setInsertionPoint:()=>iLe,setLastFocus:()=>tLe,setResponsiveEditing:()=>vLe,setSelectedBlockStyleState:()=>hLe,setSelectedBlockStyleStateCanvasPreview:()=>bLe,setStyleOverride:()=>J2e,setStyleStateViewport:()=>yLe,setZoomLevel:()=>aLe,showBlockInterface:()=>q2e,showViewportModal:()=>fLe,startDragging:()=>oLe,stopDragging:()=>rLe,stopEditingContentOnlySection:()=>sLe,toggleBlockSpotlight:()=>cLe});var zq=c(Tt(),1),jq=c(Kr(),1),Hq=c(G(),1),$2e=e=>Array.isArray(e)?e:[e],K2e=["inserterMediaCategories","blockInspectorAnimation","mediaSideload"];function E6(e,{stripExperimentalSettings:t=!1,reset:o=!1}={}){let r=e;Object.hasOwn(r,"__unstableIsPreviewMode")&&((0,zq.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){n={};for(let i in r)K2e.includes(i)||(n[i]=r[i])}return{type:"UPDATE_SETTINGS",settings:n,reset:o}}function Y2e(){return{type:"HIDE_BLOCK_INTERFACE"}}function q2e(){return{type:"SHOW_BLOCK_INTERFACE"}}var T6=(e,t=!0,o=!1)=>({select:r,dispatch:n,registry:i})=>{if(!e||!e.length||(e=$2e(e),!r.canRemoveBlocks(e)))return;let a=!o&&r.getBlockRemovalRules();if(a){let u=function(g){let m=[],h=[...g];for(;h.length;){let{innerBlocks:b,...v}=h.shift();h.push(...b),m.push(v)}return m};var l=u;let d=e.map(r.getBlock),f=u(d),p;for(let g of a)if(p=g.callback(f),p){n(Z2e(e,t,p));return}}t&&n.selectPreviousBlock(e[0],t),i.batch(()=>{n({type:"REMOVE_BLOCKS",clientIds:e}),n(Uq())})},Uq=()=>({select:e,dispatch:t})=>{if(e.getBlockCount()>0)return;let{__unstableHasCustomAppender:r}=e.getSettings();r||t.insertDefaultBlock()};function Z2e(e,t,o){return{type:"DISPLAY_BLOCK_REMOVAL_PROMPT",clientIds:e,selectPrevious:t,message:o}}function X2e(){return{type:"CLEAR_BLOCK_REMOVAL_PROMPT"}}function Q2e(e=!1){return{type:"SET_BLOCK_REMOVAL_RULES",rules:e}}function J2e(e,t){return{type:"SET_STYLE_OVERRIDE",id:e,style:t}}function eLe(e){return{type:"DELETE_STYLE_OVERRIDE",id:e}}function tLe(e=null){return{type:"LAST_FOCUS",lastFocus:e}}function oLe(){return{type:"START_DRAGGING"}}function rLe(){return{type:"STOP_DRAGGING"}}function nLe(e){return{type:"SET_BLOCK_EXPANDED_IN_LIST_VIEW",clientId:e}}function iLe(e){return{type:"SET_INSERTION_POINT",value:e}}function R6(e){return{type:"EDIT_CONTENT_ONLY_SECTION",clientId:e}}function sLe(){return{type:"EDIT_CONTENT_ONLY_SECTION"}}var aLe=(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,jq.speak)((0,Hq.__)("You are currently in zoom-out mode."))}}o({type:"SET_ZOOM_LEVEL",zoom:e})};function lLe(){return{type:"RESET_ZOOM_LEVEL"}}function cLe(e,t){return{type:"TOGGLE_BLOCK_SPOTLIGHT",clientId:e,hasBlockSpotlight:t}}function uLe(){return{type:"OPEN_LIST_VIEW_CONTENT_PANEL"}}function dLe(){return{type:"CLOSE_LIST_VIEW_CONTENT_PANEL"}}function fLe(e){return{type:"SHOW_VIEWPORT_MODAL",clientIds:e}}function pLe(){return{type:"HIDE_VIEWPORT_MODAL"}}function mLe(e,t={}){return{type:"REQUEST_INSPECTOR_TAB",tabName:e,options:t}}function gLe(){return{type:"CLEAR_REQUESTED_INSPECTOR_TAB"}}function hLe(e,t){return{type:"SET_SELECTED_BLOCK_STYLE_STATE",clientId:e,value:t}}function bLe(e,t){return{type:"SET_SELECTED_BLOCK_STYLE_STATE_CANVAS_PREVIEW",clientId:e,value:t}}function yLe(e){return{type:"SET_STYLE_STATE_VIEWPORT",viewport:e}}function vLe(e){return{type:"SET_RESPONSIVE_EDITING",enabled:e}}var I6={};Cr(I6,{__unstableDeleteSelection:()=>ULe,__unstableExpandSelection:()=>WLe,__unstableIncrementListViewExpandRevision:()=>CMe,__unstableMarkAutomaticChange:()=>cMe,__unstableMarkLastChangeAsPersistent:()=>aMe,__unstableMarkNextChangeAsNotPersistent:()=>lMe,__unstableSaveReusableBlock:()=>sMe,__unstableSetAllListViewPanelsOpen:()=>xMe,__unstableSetEditorMode:()=>uMe,__unstableSetOpenListViewPanel:()=>_Me,__unstableSetTemporarilyEditingAsBlocks:()=>yMe,__unstableSplitSelection:()=>GLe,__unstableToggleListViewPanel:()=>wMe,clearSelectedBlock:()=>OLe,duplicateBlocks:()=>fMe,enterFormattedText:()=>eMe,exitFormattedText:()=>tMe,flashBlock:()=>gMe,hideInsertionPoint:()=>zLe,hoverBlock:()=>ELe,insertAfterBlock:()=>mMe,insertBeforeBlock:()=>pMe,insertBlock:()=>VLe,insertBlocks:()=>Jq,insertDefaultBlock:()=>rMe,mergeBlocks:()=>$Le,moveBlockToPosition:()=>DLe,moveBlocksDown:()=>MLe,moveBlocksToPosition:()=>Qq,moveBlocksUp:()=>NLe,multiSelect:()=>ILe,receiveBlocks:()=>_Le,registerInserterMediaCategory:()=>vMe,removeBlock:()=>KLe,removeBlocks:()=>eZ,replaceBlock:()=>LLe,replaceBlocks:()=>Zq,replaceInnerBlocks:()=>YLe,resetBlocks:()=>SLe,resetSelection:()=>kLe,selectBlock:()=>CLe,selectNextBlock:()=>RLe,selectPreviousBlock:()=>TLe,selectionChange:()=>oMe,setBlockEditingMode:()=>SMe,setBlockMovingClientId:()=>dMe,setBlockVisibility:()=>bMe,setHasControlledInnerBlocks:()=>hMe,setTemplateValidity:()=>jLe,showInsertionPoint:()=>FLe,startDraggingBlocks:()=>QLe,startMultiSelect:()=>BLe,startTyping:()=>ZLe,stopDraggingBlocks:()=>JLe,stopMultiSelect:()=>PLe,stopTyping:()=>XLe,synchronizeTemplate:()=>HLe,toggleBlockHighlight:()=>P6,toggleBlockMode:()=>qLe,toggleSelection:()=>ALe,unsetBlockEditingMode:()=>kMe,updateBlock:()=>wLe,updateBlockAttributes:()=>xLe,updateBlockListSettings:()=>nMe,updateSettings:()=>iMe,validateBlocksToTemplate:()=>qq});var Qe=c(ce(),1),oB=c(Kr(),1),Wf=c(G(),1),Kq=c(es(),1),fo=c(jo(),1),Xu=c(Tt(),1),Yq=c(Ny(),1);var $q=c(jo(),1),Zu="\x86";function ew(e){if(e)return Object.keys(e).find(t=>{let o=e[t];return(typeof o=="string"||o instanceof $q.RichTextData)&&o.toString().indexOf(Zu)!==-1})}function B6(e){for(let[t,o]of Object.entries(e.attributes))if(o.source==="rich-text"||o.source==="html")return t}var Dy=e=>Array.isArray(e)?e:[e],SLe=e=>({dispatch:t})=>{t({type:"RESET_BLOCKS",blocks:e}),t(qq(e))},qq=e=>({select:t,dispatch:o})=>{let r=t.getTemplate(),n=t.getTemplateLock(),i=!r||n!=="all"||(0,Qe.doBlocksMatchTemplate)(e,r),s=t.isValidTemplate();if(i!==s)return o.setTemplateValidity(i),i};function kLe(e,t,o){return{type:"RESET_SELECTION",selectionStart:e,selectionEnd:t,initialPosition:o}}function _Le(e){return(0,Xu.default)('wp.data.dispatch( "core/block-editor" ).receiveBlocks',{since:"5.9",alternative:"resetBlocks or insertBlocks"}),{type:"RECEIVE_BLOCKS",blocks:e}}function xLe(e,t,o={uniqueByBlock:!1}){return typeof o=="boolean"&&(o={uniqueByBlock:o}),{type:"UPDATE_BLOCK_ATTRIBUTES",clientIds:Dy(e),attributes:t,options:o}}function wLe(e,t){return{type:"UPDATE_BLOCK",clientId:e,updates:t}}function CLe(e,t=0){return{type:"SELECT_BLOCK",initialPosition:t,clientId:e}}function ELe(){return(0,Xu.default)('wp.data.dispatch( "core/block-editor" ).hoverBlock',{since:"6.9",version:"7.1"}),{type:"DO_NOTHING"}}var TLe=(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)}}},RLe=e=>({select:t,dispatch:o})=>{let r=t.getNextBlockClientId(e);r&&o.selectBlock(r)};function BLe(){return{type:"START_MULTI_SELECT"}}function PLe(){return{type:"STOP_MULTI_SELECT"}}var ILe=(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,oB.speak)((0,Wf.sprintf)((0,Wf._n)("%s block selected.","%s blocks selected.",a),a),"assertive")};function OLe(){return{type:"CLEAR_SELECTED_BLOCK"}}function ALe(e=!0){return{type:"TOGGLE_SELECTION",isSelectionEnabled:e}}var Zq=(e,t,o,r=0,n)=>({select:i,dispatch:s,registry:a})=>{e=Dy(e),t=Dy(t);let l=i.getBlockRootClientId(e[0]);for(let u=0;u<t.length;u++){let d=t[u];if(!i.canInsertBlockType(d.name,l))return}a.batch(()=>{s({type:"REPLACE_BLOCKS",clientIds:e,blocks:t,time:Date.now(),indexToSelect:o,initialPosition:r,meta:n}),s.ensureDefaultBlock()})};function LLe(e,t){return Zq(e,t)}var Xq=e=>(t,o)=>({select:r,dispatch:n})=>{r.canMoveBlocks(t)&&n({type:e,clientIds:Dy(t),rootClientId:o})},MLe=Xq("MOVE_BLOCKS_DOWN"),NLe=Xq("MOVE_BLOCKS_UP"),Qq=(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 DLe(e,t="",o="",r){return Qq([e],t,o,r)}function VLe(e,t,o,r,n,i){return Jq([e],t,o,r,n,i)}var Jq=(e,t,o,r=!0,n=0,i)=>({select:s,dispatch:a})=>{n!==null&&typeof n=="object"&&(i=n,n=0,(0,Xu.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=Dy(e);let l=[];for(let u of e)s.canInsertBlockType(u.name,o)&&l.push(u);l.length&&a({type:"INSERT_BLOCKS",blocks:l,index:t,rootClientId:o,time:Date.now(),updateSelection:r,initialPosition:r?n:null,meta:i})};function FLe(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 zLe=()=>({select:e,dispatch:t})=>{e.isBlockInsertionPointVisible()&&t({type:"HIDE_INSERTION_POINT"})};function jLe(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}var HLe=()=>({select:e,dispatch:t})=>{t({type:"SYNCHRONIZE_TEMPLATE"});let o=e.getBlocks(),r=e.getTemplate(),n=(0,Qe.synchronizeBlocksWithTemplate)(o,r);t.resetBlocks(n)},ULe=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 l=o.getBlockOrder(s),u=l.indexOf(n.clientId),d=l.indexOf(i.clientId),f,p;u>d?(f=i,p=n):(f=n,p=i);let g=e?p:f,m=o.getBlock(g.clientId),h=(0,Qe.getBlockType)(m.name);if(!h.merge)return;let b=f,v=p,y=o.getBlock(b.clientId),k=o.getBlock(v.clientId),S=y.attributes[b.attributeKey],_=k.attributes[v.attributeKey],x=(0,fo.create)({html:S}),w=(0,fo.create)({html:_});x=(0,fo.remove)(x,b.offset,x.text.length),w=(0,fo.insert)(w,Zu,0,v.offset);let T=(0,Qe.cloneBlock)(y,{[b.attributeKey]:(0,fo.toHTMLString)({value:x})}),B=(0,Qe.cloneBlock)(k,{[v.attributeKey]:(0,fo.toHTMLString)({value:w})}),R=e?T:B,A=y.name===k.name?[R]:(0,Qe.switchToBlockType)(R,h.name);if(!A||!A.length)return;let O;if(e){let j=A.pop();O=h.merge(j.attributes,B.attributes)}else{let j=A.shift();O=h.merge(T.attributes,j.attributes)}let P=ew(O),L=O[P],M=(0,fo.create)({html:L}),z=M.text.indexOf(Zu),V=(0,fo.remove)(M,z,z+1),I=(0,fo.toHTMLString)({value:V});O[P]=I;let N=o.getSelectedBlockClientIds(),D=[...e?A:[],{...m,attributes:{...m.attributes,...O},innerBlocks:k.innerBlocks},...e?[]:A];t.batch(()=>{r.selectionChange(m.clientId,P,z,z),r.replaceBlocks(N,D,0,o.getSelectedBlocksInitialCaretPosition())})},GLe=(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 l=o.getBlockOrder(s),u=l.indexOf(n.clientId),d=l.indexOf(i.clientId),f,p;u>d?(f=i,p=n):(f=n,p=i);let g=f,m=p,h=o.getBlock(g.clientId),b=o.getBlock(m.clientId),v=(0,Qe.getBlockType)(h.name),y=(0,Qe.getBlockType)(b.name),k=typeof g.attributeKey=="string"?g.attributeKey:B6(v),S=typeof m.attributeKey=="string"?m.attributeKey:B6(y),_=o.getBlockAttributes(g.clientId);if(_?.metadata?.bindings?.[k]){if(e.length){let{createWarningNotice:X}=t.dispatch(Kq.store);X((0,Wf.__)("Blocks can't be inserted into other blocks with bindings"),{type:"snackbar"});return}r.insertAfterBlock(g.clientId);return}if(!k||!S||typeof n.offset>"u"||typeof i.offset>"u")return;if(g.clientId===m.clientId&&k===S&&g.offset===m.offset){if(e.length){if((0,Qe.isUnmodifiedDefaultBlock)(h,"content")){r.replaceBlocks([g.clientId],e,e.length-1,-1);return}}else if(!o.getBlockOrder(g.clientId).length){let X=function(){let J=(0,Qe.getDefaultBlockName)();return o.canInsertBlockType(J,s)?(0,Qe.createBlock)(J):(0,Qe.createBlock)(o.getBlockName(g.clientId))};var w=X;let ee=_[k].length;if(g.offset===0&&ee){r.insertBlocks([X()],o.getBlockIndex(g.clientId),s,!1);return}if(g.offset===ee){r.insertBlocks([X()],o.getBlockIndex(g.clientId)+1,s);return}}}let T=h.attributes[k],B=b.attributes[S],R=(0,fo.create)({html:T}),A=(0,fo.create)({html:B});R=(0,fo.remove)(R,g.offset,R.text.length),A=(0,fo.remove)(A,0,m.offset);let O={...h,innerBlocks:h.clientId===b.clientId?[]:h.innerBlocks,attributes:{...h.attributes,[k]:(0,fo.toHTMLString)({value:R})}},P={...b,clientId:h.clientId===b.clientId?(0,Qe.createBlock)(b.name).clientId:b.clientId,attributes:{...b.attributes,[S]:(0,fo.toHTMLString)({value:A})}},L=(0,Qe.getDefaultBlockName)();if(h.clientId===b.clientId&&L&&P.name!==L&&o.canInsertBlockType(L,s)){let X=(0,Qe.switchToBlockType)(P,L);X?.length===1&&(P=X[0])}if(!e.length){r.replaceBlocks(o.getSelectedBlockClientIds(),[O,P]);return}let M,z=[],V=[...e],I=V.shift(),N=(0,Qe.getBlockType)(O.name),D=N.merge&&I.name===N.name?[I]:(0,Qe.switchToBlockType)(I,N.name);if(D?.length){let X=D.shift();O={...O,attributes:{...O.attributes,...N.merge(O.attributes,X.attributes)}},z.push(O),M={clientId:O.clientId,attributeKey:k,offset:(0,fo.create)({html:O.attributes[k]}).text.length},V.unshift(...D)}else(0,Qe.isUnmodifiedBlock)(O)||z.push(O),z.push(I);let j=V.pop(),Y=(0,Qe.getBlockType)(P.name);if(V.length&&z.push(...V),j){let X=Y.merge&&Y.name===j.name?[j]:(0,Qe.switchToBlockType)(j,Y.name);if(X?.length){let ee=X.pop();z.push({...P,attributes:{...P.attributes,...Y.merge(ee.attributes,P.attributes)}}),z.push(...X),M={clientId:P.clientId,attributeKey:S,offset:(0,fo.create)({html:ee.attributes[S]}).text.length}}else z.push(j),(0,Qe.isUnmodifiedBlock)(P)||z.push(P)}else(0,Qe.isUnmodifiedBlock)(P)||z.push(P);t.batch(()=>{r.replaceBlocks(o.getSelectedBlockClientIds(),z,z.length-1,0),M&&r.selectionChange(M.clientId,M.attributeKey,M.offset,M.offset)})},WLe=()=>({select:e,dispatch:t})=>{let o=e.getSelectionStart(),r=e.getSelectionEnd();t.selectionChange({start:{clientId:o.clientId},end:{clientId:r.clientId}})},$Le=(e,t)=>({registry:o,select:r,dispatch:n})=>{let i=e,s=t,a=r.getBlock(i),l=(0,Qe.getBlockType)(a.name);if(!l||r.getBlockEditingMode(i)==="disabled"||r.getBlockEditingMode(s)==="disabled")return;let u=r.getBlock(s);if(!l.merge&&(0,Qe.getBlockSupport)(a.name,"__experimentalOnMerge")){let _=(0,Qe.switchToBlockType)(u,l.name);if(_?.length!==1){n.selectBlock(a.clientId);return}let[x]=_;if(x.innerBlocks.length<1){n.selectBlock(a.clientId);return}o.batch(()=>{n.insertBlocks(x.innerBlocks,void 0,i),n.removeBlock(s),n.selectBlock(x.innerBlocks[0].clientId);let w=r.getNextBlockClientId(i);if(w&&r.getBlockName(i)===r.getBlockName(w)){let T=r.getBlockAttributes(i),B=r.getBlockAttributes(w);Object.keys(T).every(R=>T[R]===B[R])&&(n.moveBlocksToPosition(r.getBlockOrder(w),w,i),n.removeBlock(w,!1))}});return}if((0,Qe.isUnmodifiedDefaultBlock)(a)){n.removeBlock(i,r.isBlockSelected(i));return}if((0,Qe.isUnmodifiedDefaultBlock)(u)){n.removeBlock(s,r.isBlockSelected(s));return}if(!l.merge){(0,Qe.isUnmodifiedBlock)(u,"content")?n.removeBlock(s,r.isBlockSelected(s)):n.selectBlock(a.clientId);return}let d=(0,Qe.getBlockType)(u.name),{clientId:f,attributeKey:p,offset:g}=r.getSelectionStart(),h=(f===i?l:d).attributes[p],b=(f===i||f===s)&&p!==void 0&&g!==void 0&&!!h;h||(typeof p=="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 p}`):window.console.error("The RichText identifier prop does not match any attributes defined by the block."));let v=(0,Qe.cloneBlock)(a),y=(0,Qe.cloneBlock)(u);if(b){let _=f===i?v:y,x=_.attributes[p],w=(0,fo.insert)((0,fo.create)({html:x}),Zu,g,g);_.attributes[p]=(0,fo.toHTMLString)({value:w})}let k=a.name===u.name?[y]:(0,Qe.switchToBlockType)(y,a.name);if(!k||!k.length)return;let S=l.merge(v.attributes,k[0].attributes);if(b){let _=ew(S),x=S[_],w=(0,fo.create)({html:x}),T=w.text.indexOf(Zu),B=(0,fo.remove)(w,T,T+1),R=(0,fo.toHTMLString)({value:B});S[_]=R,n.selectionChange(a.clientId,_,T,T)}n.replaceBlocks([a.clientId,u.clientId],[{...a,attributes:{...a.attributes,...S}},...k.slice(1)],0)},eZ=(e,t=!0)=>T6(e,t);function KLe(e,t){return eZ([e],t)}function YLe(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 qLe(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function ZLe(){return{type:"START_TYPING"}}function XLe(){return{type:"STOP_TYPING"}}function QLe(e=[]){return{type:"START_DRAGGING_BLOCKS",clientIds:e}}function JLe(){return{type:"STOP_DRAGGING_BLOCKS"}}function eMe(){return(0,Xu.default)('wp.data.dispatch( "core/block-editor" ).enterFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function tMe(){return(0,Xu.default)('wp.data.dispatch( "core/block-editor" ).exitFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function oMe(e,t,o,r){return typeof e=="string"?{type:"SELECTION_CHANGE",clientId:e,attributeKey:t,startOffset:o,endOffset:r}:{type:"SELECTION_CHANGE",...e}}var rMe=(e,t,o)=>({dispatch:r})=>{let n=(0,Qe.getDefaultBlockName)();if(!n)return;let i=(0,Qe.createBlock)(n,e);return r.insertBlock(i,o,t)};function nMe(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function iMe(e){return E6(e,{stripExperimentalSettings:!0})}function sMe(){return(0,Xu.default)('wp.data.dispatch( "core/block-editor" ).__unstableSaveReusableBlock',{since:"7.1"}),{type:"DO_NOTHING"}}function aMe(){return{type:"MARK_LAST_CHANGE_AS_PERSISTENT"}}function lMe({history:e="merge"}={}){return{type:"MARK_NEXT_CHANGE_AS_NOT_PERSISTENT",history:e}}var cMe=()=>({dispatch:e})=>{e({type:"MARK_AUTOMATIC_CHANGE"});let{requestIdleCallback:t=o=>setTimeout(o,100)}=window;t(()=>{e({type:"MARK_AUTOMATIC_CHANGE_FINAL"})})},uMe=e=>({registry:t})=>{t.dispatch(Yq.store).set("core","editorTool",e),e==="navigation"?(0,oB.speak)((0,Wf.__)("You are currently in Write mode.")):e==="edit"&&(0,oB.speak)((0,Wf.__)("You are currently in Design mode."))};function dMe(){return(0,Xu.default)('wp.data.dispatch( "core/block-editor" ).setBlockMovingClientId',{since:"6.7",hint:"Block moving mode feature has been removed"}),{type:"DO_NOTHING"}}var fMe=(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,Qe.hasBlockSupport)(d,"multiple",!0)))return;let s=o.getBlockRootClientId(e[0]),a=Dy(e),l=o.getBlockIndex(a[a.length-1]),u=n.map(d=>(0,Qe.cloneSanitizedBlock)(d));return r.insertBlocks(u,l+1,s,t),u.length>1&&t&&r.multiSelect(u[0].clientId,u[u.length-1].clientId),u.map(d=>d.clientId)},pMe=e=>({select:t,dispatch:o})=>{if(!e)return;let r=t.getBlockRootClientId(e),n=t.getBlockIndex(e),{defaultBlock:i}=r?t.getBlockListSettings(r)??{}:{};if(!i)return o.insertDefaultBlock({},r,n);let s={};if(i.attributesToCopy){let l=t.getBlockAttributes(e);i.attributesToCopy.forEach(u=>{l[u]&&(s[u]=l[u])})}let a=(0,Qe.createBlock)(i.name,{...i.attributes,...s});return o.insertBlock(a,n,r)},mMe=e=>({select:t,dispatch:o})=>{if(!e)return;let r=t.getBlockRootClientId(e),n=t.getBlockIndex(e),{defaultBlock:i}=r?t.getBlockListSettings(r)??{}:{};if(!i)return o.insertDefaultBlock({},r,n+1);let s={};if(i.attributesToCopy){let l=t.getBlockAttributes(e);i.attributesToCopy.forEach(u=>{l[u]&&(s[u]=l[u])})}let a=(0,Qe.createBlock)(i.name,{...i.attributes,...s});return o.insertBlock(a,n+1,r)};function P6(e,t){return{type:"TOGGLE_BLOCK_HIGHLIGHT",clientId:e,isHighlighted:t}}var gMe=(e,t=150)=>async({dispatch:o})=>{o(P6(e,!0)),await new Promise(r=>setTimeout(r,t)),o(P6(e,!1))};function hMe(e,t){return{type:"SET_HAS_CONTROLLED_INNER_BLOCKS",hasControlledInnerBlocks:t,clientId:e}}function bMe(e){return{type:"SET_BLOCK_VISIBILITY",updates:e}}function yMe(e){return(0,Xu.default)("wp.data.dispatch( 'core/block-editor' ).__unstableSetTemporarilyEditingAsBlocks",{since:"7.0"}),R6(e)}var vMe=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[]|InserterMediaResponse>`.");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 SMe(e="",t){return{type:"SET_BLOCK_EDITING_MODE",clientId:e,mode:t}}function kMe(e=""){return{type:"UNSET_BLOCK_EDITING_MODE",clientId:e}}function _Me(e){return{type:"SET_OPEN_LIST_VIEW_PANEL",clientId:e}}function xMe(){return{type:"SET_ALL_LIST_VIEW_PANELS_OPEN"}}function wMe(e,t){return{type:"TOGGLE_LIST_VIEW_PANEL",clientId:e,isOpen:t}}function CMe(){return{type:"INCREMENT_LIST_VIEW_EXPAND_REVISION"}}var Vy={reducer:RY,selectors:C6,actions:I6},C=(0,rB.createReduxStore)(Qo,{...Vy,persist:["preferences"]}),tZ=(0,rB.registerStore)(Qo,{...Vy,persist:["preferences"]});U(tZ).registerPrivateActions(tB);U(tZ).registerPrivateSelectors(YR);U(C).registerPrivateActions(tB);U(C).registerPrivateSelectors(YR);var Fy=c(H(),1),oZ=c(G(),1);var xl=c(E(),1);function EMe({className:e,actions:t,children:o,secondaryActions:r}){return(0,xl.jsx)("div",{style:{display:"contents",all:"initial"},children:(0,xl.jsx)("div",{className:W(e,"block-editor-warning"),children:(0,xl.jsxs)("div",{className:"block-editor-warning__contents",children:[(0,xl.jsx)("p",{className:"block-editor-warning__message",children:o}),(t?.length>0||r)&&(0,xl.jsxs)("div",{className:"block-editor-warning__actions",children:[t?.length>0&&t.map((n,i)=>(0,xl.jsx)("span",{className:"block-editor-warning__action",children:n},i)),r&&(0,xl.jsx)(Fy.DropdownMenu,{className:"block-editor-warning__secondary",icon:Ls,label:(0,oZ.__)("More options"),popoverProps:{placement:"bottom-end",className:"block-editor-warning__dropdown"},noIcons:!0,children:()=>(0,xl.jsx)(Fy.MenuGroup,{children:r.map((n,i)=>(0,xl.jsx)(Fy.MenuItem,{onClick:n.onClick,children:n.title},i))})})]})]})})})}var $f=EMe;var zy=c(E(),1);function iZ({originalBlockClientId:e,name:t,onReplace:o}){let{selectBlock:r}=(0,nZ.useDispatch)(C),n=(0,rZ.getBlockType)(t);return(0,zy.jsxs)($f,{actions:[(0,zy.jsx)(O6.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>r(e),children:(0,nB.__)("Find original")},"find-original"),(0,zy.jsx)(O6.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>o([]),children:(0,nB.__)("Remove")},"remove")],children:[(0,zy.jsxs)("strong",{children:[n?.title,": "]}),(0,nB.__)("This block can only be used once.")]})}var tw=c(E(),1);function aB({mayDisplayControls:e,mayDisplayParentControls:t,mayDisplayPatternEditingControls:o,blockEditingMode:r,isPreviewMode:n,...i}){let{name:s,isSelected:a,clientId:l,attributes:u={},__unstableLayoutClassNames:d}=i,{layout:f=null,metadata:p={}}=u,{bindings:g}=p,m=(0,iB.hasBlockSupport)(s,"layout",!1)||(0,iB.hasBlockSupport)(s,"__experimentalLayout",!1),b=!!ht()[Z_]||(0,iB.hasBlockSupport)(s,"listView")||s==="core/navigation",{originalBlockClientId:v}=(0,sB.useContext)(Rn);return(0,tw.jsxs)(_1,{value:(0,sB.useMemo)(()=>({name:s,isSelected:a,clientId:l,layout:m?f:null,__unstableLayoutClassNames:d,[yl]:e,[dy]:t,[Tf]:o&&r!=="disabled",[S1]:r,[fy]:g,[k1]:n,[Z_]:b}),[s,a,l,m,f,d,e,t,o,r,g,n,b]),children:[(0,tw.jsx)(mY,{...i}),v&&(0,tw.jsx)(iZ,{originalBlockClientId:v,name:s,onReplace:i.onReplace})]})}function Me(...e){let{clientId:t=null}=ht();return(0,sZ.useSelect)(o=>U(o(C)).getBlockSettings(t,...e),[t,...e])}function lZ(e){(0,aZ.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 cB=c(E(),1),{kebabCase:TMe}=U(uZ.privateApis),cZ=([e,...t])=>e.toUpperCase()+t.join(""),RMe=e=>(0,Wg.createHigherOrderComponent)(t=>function(r){return(0,cB.jsx)(t,{...r,colors:e})},"withCustomColorPalette"),BMe=()=>(0,Wg.createHigherOrderComponent)(e=>function(o){let[r,n,i]=Me("color.palette.custom","color.palette.theme","color.palette.default"),s=(0,lB.useMemo)(()=>[...r||[],...n||[],...i||[]],[r,n,i]);return(0,cB.jsx)(e,{...o,colors:s})},"withEditorColorPalette");function dZ(e,t){let o=e.reduce((r,n)=>({...r,...typeof n=="string"?{[n]:TMe(n)}:n}),{});return(0,Wg.compose)([t,r=>class extends lB.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 nY(s,i)}createSetters(){return Object.keys(o).reduce((i,s)=>{let a=cZ(s),l=`custom${a}`;return i[`set${a}`]=this.createSetColor(s,l),i},{})}createSetColor(i,s){return a=>{let l=w1(this.props.colors,a);this.props.setAttributes({[i]:l&&l.slug?l.slug:void 0,[s]:l&&l.slug?void 0:a})}}static getDerivedStateFromProps({attributes:i,colors:s},a){return Object.entries(o).reduce((l,[u,d])=>{let f=wc(s,i[u],i[`custom${cZ(u)}`]),p=a[u];return p?.color===f.color&&p?l[u]=p:l[u]={...f,class:ma(d,f.slug)},l},{})}render(){return(0,cB.jsx)(r,{...this.props,colors:void 0,...this.state,...this.setters,colorUtils:this.colorUtils})}}])}function fZ(e){return(...t)=>{let o=RMe(e);return(0,Wg.createHigherOrderComponent)(dZ(t,o),"withCustomColors")}}function pZ(...e){let t=BMe();return(0,Wg.createHigherOrderComponent)(dZ(e,t),"withColors")}var uB=c(F(),1),dB=c(Z(),1);function jy(e){if(e)return`has-${e}-gradient-background`}function fB(e,t){let o=e?.find(r=>r.slug===t);return o&&o.gradient}function mZ(e,t){return e?.find(r=>r.gradient===t)}function gZ(e,t){let o=mZ(e,t);return o&&o.slug}function PMe({gradientAttribute:e="gradient",customGradientAttribute:t="customGradient"}={}){let{clientId:o}=ht(),[r,n,i]=Me("color.gradients.custom","color.gradients.theme","color.gradients.default"),s=(0,uB.useMemo)(()=>[...r||[],...n||[],...i||[]],[r,n,i]),{gradient:a,customGradient:l}=(0,dB.useSelect)(g=>{let{getBlockAttributes:m}=g(C),h=m(o)||{};return{customGradient:h[t],gradient:h[e]}},[o,e,t]),{updateBlockAttributes:u}=(0,dB.useDispatch)(C),d=(0,uB.useCallback)(g=>{let m=gZ(s,g);if(m){u(o,{[e]:m,[t]:void 0});return}u(o,{[e]:void 0,[t]:g})},[s,o,u]),f=jy(a),p;return a?p=fB(s,a):p=l,{gradientClass:f,gradientValue:p,setGradient:d}}var hZ=c(H(),1);var{kebabCase:IMe}=U(hZ.privateApis),Hy=(e,t,o)=>{if(t){let r=e?.find(({slug:n})=>n===t);if(r)return r}return{size:o}};function A6(e,t){let o=e?.find(({size:r})=>r===t);return o||{size:t}}function Kf(e){if(e)return`has-${IMe(e)}-font-size`}var OMe="1600px",AMe="320px",LMe=1,MMe=.25,NMe=.75,DMe="14px";function bZ({minimumFontSize:e,maximumFontSize:t,fontSize:o,minimumViewportWidth:r=AMe,maximumViewportWidth:n=OMe,scaleFactor:i=LMe,minimumFontSizeLimit:s}){if(s=Yf(s)?s:DMe,o){let k=Yf(o);if(!k?.unit)return null;let S=Yf(s,{coerceTo:k.unit});if(S?.value&&!e&&!t&&k?.value<=S?.value)return null;if(t||(t=`${k.value}${k.unit}`),!e){let _=k.unit==="px"?k.value:k.value*16,x=Math.min(Math.max(1-.075*Math.log2(_),MMe),NMe),w=ow(k.value*x,3);S?.value&&w<S?.value?e=`${S.value}${S.unit}`:e=`${w}${k.unit}`}}let a=Yf(e),l=a?.unit||"rem",u=Yf(t,{coerceTo:l});if(!a||!u)return null;let d=Yf(e,{coerceTo:"rem"}),f=Yf(n,{coerceTo:l}),p=Yf(r,{coerceTo:l});if(!f||!p||!d)return null;let g=f.value-p.value;if(!g)return null;let m=ow(p.value/100,3),h=ow(m,3)+l,b=100*((u.value-a.value)/g),v=ow((b||1)*i,3),y=`${d.value}${d.unit} + ((1vw - ${h}) * ${v})`;return`clamp(${e}, ${y}, ${t})`}function Yf(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[,l,u]=a,d=parseFloat(l);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:ow(d,3),unit:u}}function ow(e,t=3){let o=Math.pow(10,t);return Number.isFinite(e)?parseFloat(Math.round(e*o)/o):void 0}var yZ=c(H(),1);var vZ=c(E(),1);function VMe(e){let[t,o]=Me("typography.fontSizes","typography.customFontSize");return(0,vZ.jsx)(yZ.FontSizePicker,{...e,fontSizes:t,disableCustomFontSizes:!o})}var L6=VMe;var rw=c(fe(),1),kZ=c(F(),1);var M6=c(E(),1),FMe=[],SZ=([e,...t])=>e.toUpperCase()+t.join(""),_Z=(...e)=>{let t=e.reduce((o,r)=>(o[r]=`custom${SZ(r)}`,o),{});return(0,rw.createHigherOrderComponent)((0,rw.compose)([(0,rw.createHigherOrderComponent)(o=>function(n){let[i]=Me("typography.fontSizes");return(0,M6.jsx)(o,{...n,fontSizes:i||FMe})},"withFontSizes"),o=>class extends kZ.Component{constructor(n){super(n),this.setters=this.createSetters(),this.state={}}createSetters(){return Object.entries(t).reduce((n,[i,s])=>{let a=SZ(i);return n[`set${a}`]=this.createSetFontSize(i,s),n},{})}createSetFontSize(n,i){return s=>{let a=this.props.fontSizes?.find(({size:l})=>l===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 l=Object.entries(t).filter(([u,d])=>a(d,u)).reduce((u,[d,f])=>{let p=n[d],g=Hy(i,p,n[f]);return u[d]={...g,class:Kf(p)},u},{});return{...s,...l}}render(){return(0,M6.jsx)(o,{...this.props,fontSizes:void 0,...this.state,...this.setters})}}]),"withFontSizes")};var qf=c(G(),1),pB=c(H(),1);var xZ=c(E(),1),zMe=[{icon:Mf,title:(0,qf.__)("Align text left"),align:"left"},{icon:Cg,title:(0,qf.__)("Align text center"),align:"center"},{icon:Nf,title:(0,qf.__)("Align text right"),align:"right"}],jMe={placement:"bottom-start"};function HMe({value:e,onChange:t,alignmentControls:o=zMe,label:r=(0,qf.__)("Align text"),description:n=(0,qf.__)("Change text alignment"),isCollapsed:i=!0,isToolbar:s}){function a(p){return()=>t(e===p?void 0:p)}let l=o.find(p=>p.align===e);function u(){return l?l.icon:(0,qf.isRTL)()?Nf:Mf}let d=s?pB.ToolbarGroup:pB.ToolbarDropdownMenu,f=s?{isCollapsed:i}:{toggleProps:{description:n},popoverProps:jMe};return(0,xZ.jsx)(d,{icon:u(),label:r,controls:o.map(p=>{let{align:g}=p;return{...p,isActive:e===g,role:i?"menuitemradio":void 0,onClick:a(g)}}),...f})}var N6=HMe;var D6=c(E(),1),mB=e=>(0,D6.jsx)(N6,{...e,isToolbar:!1}),wZ=e=>(0,D6.jsx)(N6,{...e,isToolbar:!0});var kB=c(uo(),1),_B=c(H(),1),FZ=c(F(),1),xB=c(ce(),1);var DZ=c(Z(),1),Xf=c(ce(),1),H6=c(F(),1);var AZ=c(RZ(),1);var V6=function(e,t){return V6=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])},V6(e,t)};function BZ(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");V6(e,t);function o(){this.constructor=e}e.prototype=t===null?Object.create(t):(o.prototype=t.prototype,new o)}var nn=function(){return nn=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},nn.apply(this,arguments)};function PZ(e){return e.toLowerCase()}var KMe=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],YMe=/[^A-Z0-9]+/gi;function OZ(e,t){t===void 0&&(t={});for(var o=t.splitRegexp,r=o===void 0?KMe:o,n=t.stripRegexp,i=n===void 0?YMe:n,s=t.transform,a=s===void 0?PZ:s,l=t.delimiter,u=l===void 0?" ":l,d=IZ(IZ(e,r,"$1\0$2"),i,"\0"),f=0,p=d.length;d.charAt(f)==="\0";)f++;for(;d.charAt(p-1)==="\0";)p--;return d.slice(f,p).split("\0").map(a).join(u)}function IZ(e,t,o){return t instanceof RegExp?e.replace(t,o):t.reduce(function(r,n){return r.replace(n,o)},e)}var qMe=e=>e.name||"",ZMe=e=>e.title,XMe=e=>e.description||"",QMe=e=>e.keywords||[],JMe=e=>e.category,eNe=()=>null,tNe=[/([\p{Ll}\p{Lo}\p{N}])([\p{Lu}\p{Lt}])/gu,/([\p{Lu}\p{Lt}])([\p{Lu}\p{Lt}][\p{Ll}\p{Lo}])/gu],oNe=new RegExp("(\\p{C}|\\p{P}|\\p{S})+","giu"),F6=new Map,z6=new Map;function hB(e=""){if(F6.has(e))return F6.get(e);let t=OZ(e,{splitRegexp:tNe,stripRegexp:oNe}).split(" ").filter(Boolean);return F6.set(e,t),t}function nw(e=""){if(z6.has(e))return z6.get(e);let t=(0,AZ.default)(e);return t=t.replace(/^\//,""),t=t.toLowerCase(),z6.set(e,t),t}var iw=(e="")=>hB(nw(e)),rNe=(e,t)=>e.filter(o=>!iw(t).some(r=>r.includes(o))),bB=(e,t,o,r)=>iw(r).length===0?e:sw(e,r,{getCategory:s=>t.find(({slug:a})=>a===s.category)?.title,getCollection:s=>o[s.name.split("/")[0]]?.title}),sw=(e=[],t="",o={})=>{if(iw(t).length===0)return e;let n=e.map(i=>[i,nNe(i,t,o)]).filter(([,i])=>i>0);return n.sort(([,i],[,s])=>s-i),n.map(([i])=>i)};function nNe(e,t,o={}){let{getName:r=qMe,getTitle:n=ZMe,getDescription:i=XMe,getKeywords:s=QMe,getCategory:a=JMe,getCollection:l=eNe}=o,u=r(e),d=n(e),f=i(e),p=s(e),g=a(e),m=l(e),h=nw(t),b=nw(d),v=0;if(h===b)v+=30;else if(b.startsWith(h))v+=20;else{let y=[u,d,f,...p,g,m].join(" "),k=hB(h);rNe(k,y).length===0&&(v+=10)}if(v!==0&&u.startsWith("core/")){let y=u!==e.id;v+=y?1:2}return v}var Ic=c(ce(),1),Uy=c(Z(),1),yB=c(F(),1),LZ=c(es(),1),vB=c(G(),1);var iNe=(e,t,o)=>{let r=(0,yB.useMemo)(()=>({[Uf]:!!o}),[o]),[n]=(0,Uy.useSelect)(d=>[d(C).getInserterItems(e,r)],[e,r]),{getClosestAllowedInsertionPoint:i}=U((0,Uy.useSelect)(C)),{createErrorNotice:s}=(0,Uy.useDispatch)(LZ.store),[a,l]=(0,Uy.useSelect)(d=>{let{getCategories:f,getCollections:p}=d(Ic.store);return[f(),p()]},[]),u=(0,yB.useCallback)(({name:d,initialAttributes:f,innerBlocks:p,innerContent:g,syncStatus:m,content:h},b)=>{let v=i(d,e);if(v===null){let k=(0,Ic.getBlockType)(d)?.title??d;s((0,vB.sprintf)((0,vB.__)(`Block "%s" can't be inserted.`),k),{type:"snackbar",id:"inserter-notice"});return}let y=m==="unsynced"?(0,Ic.parse)(h,{__unstableSkipMigrationLogs:!0}):(0,Ic.createBlock)(d,f,(0,Ic.createBlocksFromInnerBlocksTemplate)(p),g);t(y,void 0,b,v)},[i,e,t,s]);return[n,a,l,u]},Zf=iNe;var MZ=c(H(),1);var NZ=c(F(),1),j6=c(E(),1);function sNe({icon:e,showColors:t=!1,className:o,context:r}){e?.src==="block-default"&&(e={src:lx});let n=(0,j6.jsx)(MZ.Icon,{icon:e&&e.src?e.src:e,context:r}),i=t?{backgroundColor:e&&e.background,color:e&&e.foreground}:{};return(0,j6.jsx)("span",{style:i,className:W("block-editor-block-icon",o,{"has-colors":t}),children:n})}var Ct=(0,NZ.memo)(sNe);var SB=(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 Gy=c(E(),1),aNe=()=>{},lNe=9;function cNe(){return{name:"blocks",className:"block-editor-autocompleters__block",triggerPrefix:"/",useItems(e){let{rootClientId:t,selectedBlockId:o,prioritizedBlocks:r}=(0,DZ.useSelect)(u=>{let{getSelectedBlockClientId:d,getBlock:f,getBlockListSettings:p,getBlockRootClientId:g}=u(C),{getActiveBlockVariation:m}=u(Xf.store),h=d(),{name:b,attributes:v}=f(h),y=m(b,v),k=g(h);return{selectedBlockId:y?`${b}/${y.name}`:b,rootClientId:k,prioritizedBlocks:p(k)?.prioritizedInserterBlocks}},[]),[n,i,s]=Zf(t,aNe,!0),a=(0,H6.useMemo)(()=>(e.trim()?bB(n,i,s,e):SB(Pc(n,"frecency","desc"),r)).filter(d=>d.id!==o).slice(0,lNe),[e,o,n,i,s,r]);return[(0,H6.useMemo)(()=>a.map(u=>{let{title:d,icon:f,isDisabled:p}=u;return{key:`block-${u.id}`,value:u,label:(0,Gy.jsxs)(Gy.Fragment,{children:[(0,Gy.jsx)(Ct,{icon:f,showColors:!0},"icon"),d]}),isDisabled:p}}),[a])]},allowContext(e,t){return!(/\S/.test(e)||/\S/.test(t))},getOptionCompletion(e){let{name:t,initialAttributes:o,innerBlocks:r,innerContent:n,syncStatus:i,blocks:s}=e;return{action:"replace",value:i==="unsynced"?(s??[]).map(a=>(0,Xf.cloneBlock)(a)):(0,Xf.createBlock)(t,o,(0,Xf.createBlocksFromInnerBlocksTemplate)(r),n)}}}}var VZ=cNe();var zZ=c(E(),1),uNe=[];function jZ({completers:e=uNe}){let{name:t}=ht();return(0,FZ.useMemo)(()=>{let o=[...e];return(t===(0,xB.getDefaultBlockName)()||(0,xB.getBlockSupport)(t,"__experimentalSlashInserter",!1))&&(o=[...o,VZ]),(0,kB.hasFilter)("editor.Autocomplete.completers")&&(o===e&&(o=o.map(r=>({...r}))),o=(0,kB.applyFilters)("editor.Autocomplete.completers",o,t)),o},[e,t])}function HZ(e){return(0,_B.__unstableUseAutocompleteProps)({...e,completers:jZ(e)})}function dNe(e){return(0,zZ.jsx)(_B.Autocomplete,{...e,completers:jZ(e)})}var UZ=dNe;var K6=c(G(),1),tp=c(H(),1);var cX=c(Z(),1);var BB=c(F(),1);var Jo=c(G(),1);var mn=c(H(),1);var Wy=c(G(),1);var Vs={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 ts(e,t=""){return e.split(",").map(o=>`${o}${t?` ${t}`:""}`).join(",")}function Qf(e,t=Vs,o,r){let n="";return t?.[o]?.spacingStyles?.length&&r&&t[o].spacingStyles.forEach(i=>{n+=`${ts(e,i.selector.trim())} { `,n+=Object.entries(i.rules).map(([s,a])=>`${s}: ${a||r}`).join("; "),n+="; }"}),n}function wB(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,Wy.sprintf)((0,Wy.__)("Max %s wide"),t)),i.test(o)&&(n.wide=(0,Wy.sprintf)((0,Wy.__)("Max %s wide"),o)),n}var wl=c(G(),1);var GZ=8,Jf=["top","bottom","left","right"],WZ={top:void 0,right:void 0,bottom:void 0,left:void 0},CB={custom:vR,axial:vR,horizontal:_4,vertical:E4,top:C4,right:w4,bottom:k4,left:x4},Oc={default:(0,wl.__)("Spacing control"),top:(0,wl.__)("Top"),bottom:(0,wl.__)("Bottom"),left:(0,wl.__)("Left"),right:(0,wl.__)("Right"),mixed:(0,wl.__)("Mixed"),vertical:(0,wl.__)("Vertical"),horizontal:(0,wl.__)("Horizontal"),axial:(0,wl.__)("Horizontal & vertical"),custom:(0,wl.__)("Custom")},Qu={axial:"axial",top:"top",right:"right",bottom:"bottom",left:"left",custom:"custom"};function EB(e){return e?.includes?e==="0"||e.includes("var:preset|spacing|"):!1}function $Z(e,t){if(!EB(e))return e;let o=fNe(e);return t.find(n=>String(n.slug)===o)?.size}function $y(e,t){if(!e||EB(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 Cl(e){if(!e)return;let t=e.match(/var:preset\|spacing\|(.+)/);return t?`var(--wp--preset--spacing--${t[1]})`:e}function fNe(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 U6(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 pNe(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 KZ(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),l=!s.length&&pNe(t),u=t?.includes("horizontal")&&t?.includes("vertical")&&t?.length===2;if(U6(t)&&(a||l))return Qu.axial;if(u&&s.length===1){let d;return Object.entries(e).some(([f,p])=>(d=f,p!==void 0)),d}return t?.length===1&&!s.length?t[0]:Qu.custom}function aw(e){if(!e)return null;let t=typeof e=="string";return{top:t?e:e?.top,left:t?e:e?.left}}function Si(e,t="0"){let o=aw(e);if(!o)return null;let r=Cl(o?.top)||t,n=Cl(o?.left)||t;return r===n?r:`${r} ${n}`}var po=c(E(),1),mNe={left:"flex-start",right:"flex-end",center:"center","space-between":"space-between"},YZ={left:"flex-start",right:"flex-end",center:"center",stretch:"stretch"},gNe={top:"flex-start",center:"center",bottom:"flex-end",stretch:"stretch","space-between":"space-between"},qZ={horizontal:"center",vertical:"top"},hNe={top:{icon:vx,label:(0,Jo._x)("Align top","Block vertical alignment setting")},center:{icon:hx,label:(0,Jo._x)("Align middle","Block vertical alignment setting")},bottom:{icon:gx,label:(0,Jo._x)("Align bottom","Block vertical alignment setting")},stretch:{icon:yx,label:(0,Jo._x)("Stretch to fill","Block vertical alignment setting")},"space-between":{icon:bx,label:(0,Jo._x)("Space between","Block vertical alignment setting")}},bNe=["wrap","nowrap"],QZ={name:"flex",label:(0,Jo.__)("Flex"),inspectorControls:function({layout:t={},onChange:o,layoutBlockSupport:r={},resetLayout:n={},clientId:i}){let{allowOrientation:s=!0,allowJustification:a=!0,allowVerticalAlignment:l=!0,allowWrap:u=!0}=r,d=(k,S)=>(t?.[k]??S)!==(n?.[k]??S),f=()=>d("justifyContent","left"),p=()=>d("verticalAlignment",JZ(t)),g=()=>d("orientation","horizontal"),m=()=>d("flexWrap","wrap"),h=()=>o(Ge({...t,justifyContent:n?.justifyContent})),b=()=>o(Ge({...t,verticalAlignment:yNe(n?.verticalAlignment,t?.orientation)})),v=()=>{let{verticalAlignment:k,justifyContent:S}=t,_=n?.orientation,x=!_||_==="horizontal";o(Ge({...t,orientation:_,verticalAlignment:n?.verticalAlignment??(x&&k==="space-between"?"center":k),justifyContent:n?.justifyContent??(x&&S==="stretch"?"left":S)}))},y=()=>o(Ge({...t,flexWrap:n?.flexWrap}));return(0,po.jsxs)(po.Fragment,{children:[(a||s)&&(0,po.jsxs)(mn.Flex,{align:"flex-start",className:"block-editor-hooks__flex-layout-controls",gap:4,justify:"flex-start",children:[a&&(0,po.jsx)(mn.__experimentalToolsPanelItem,{label:(0,Jo.__)("Justification"),hasValue:f,onDeselect:h,isShownByDefault:!0,panelId:i,children:(0,po.jsx)(XZ,{layout:t,onChange:o})}),s&&(0,po.jsx)(mn.__experimentalToolsPanelItem,{label:(0,Jo.__)("Orientation"),hasValue:g,onDeselect:v,isShownByDefault:!0,panelId:i,children:(0,po.jsx)(_Ne,{layout:t,onChange:o})})]}),l&&(0,po.jsx)(mn.__experimentalToolsPanelItem,{label:(0,Jo.__)("Alignment"),hasValue:p,onDeselect:b,panelId:i,children:(0,po.jsx)(ZZ,{layout:t,onChange:o})}),u&&(0,po.jsx)(mn.__experimentalToolsPanelItem,{label:(0,Jo.__)("Wrapping"),hasValue:m,onDeselect:y,panelId:i,children:(0,po.jsx)(kNe,{layout:t,onChange:o})})]})},toolBarControls:function({layout:t={},onChange:o,layoutBlockSupport:r,controlsGroup:n="block"}){let{allowVerticalAlignment:i=!0,allowJustification:s=!0}=r;return!s&&!i?null:(0,po.jsxs)(Po,{group:n,__experimentalShareWithChildBlocks:!0,children:[s&&(0,po.jsx)(XZ,{layout:t,onChange:o,isToolbar:!0}),i&&(0,po.jsx)(ZZ,{layout:t,onChange:o,isToolbar:!0})]})},getLayoutStyle:function({selector:t,layout:o={},viewportOverrides:r,style:n,blockName:i,hasBlockGapSupport:s,globalBlockGapValue:a,layoutDefinitions:l=Vs}){let u=r!==void 0,d=u?{...o,...r}:o,f=R=>Object.hasOwn(r||{},R),{orientation:p="horizontal"}=d,g="0.5em";if(a){let R=aw(a);g=Cl(R?.left)||Cl(R?.top)||"0.5em"}let m=n?.spacing?.blockGap&&!Ft(i,"spacing","blockGap")?Si(n?.spacing?.blockGap,g):void 0,h=!u||Object.hasOwn(n?.spacing||{},"blockGap"),b=mNe[d.justifyContent],v=bNe.includes(d.flexWrap)?d.flexWrap:"wrap",y=gNe[d.verticalAlignment],k=YZ[d.justifyContent]||YZ.left,S="",_=[],x=!u||f("flexWrap"),w=!u||f("orientation"),T=!u||f("justifyContent")||f("orientation"),B=!u||f("verticalAlignment")||f("orientation");return x&&v&&v!=="wrap"&&_.push(`flex-wrap: ${v}`),p==="horizontal"?(B&&y&&_.push(`align-items: ${y}`),T&&b&&_.push(`justify-content: ${b}`)):(B&&y&&_.push(`justify-content: ${y}`),w&&_.push("flex-direction: column"),T&&_.push(`align-items: ${k}`)),_.length&&(S=`${ts(t)} {
${_.join("; ")};
}`),s&&h&&m&&(S+=Qf(t,l,"flex",m)),S},getOrientation(e){let{orientation:t="horizontal"}=e;return t},getAlignments(){return[]}};function JZ({orientation:e="horizontal"}={}){return e==="horizontal"?qZ.horizontal:qZ.vertical}function yNe(e,t){if(!(t==="horizontal"&&e==="space-between"||t==="vertical"&&e==="stretch"))return e}function vNe(e){return e==="horizontal"?["top","center","bottom","stretch"]:["top","center","bottom","space-between"]}function ZZ({layout:e,onChange:t,isToolbar:o=!1}){let{orientation:r="horizontal"}=e,{verticalAlignment:n=JZ(e)}=e,i=a=>{t({...e,verticalAlignment:a})},s=vNe(r);return o?(0,po.jsx)(TB,{onChange:i,value:n,controls:s}):(0,po.jsx)(mn.__experimentalToggleGroupControl,{label:(0,Jo.__)("Alignment"),onChange:i,value:n,className:"block-editor-hooks__flex-layout-alignment-controls",children:s.map(a=>{let{icon:l,label:u}=hNe[a];return(0,po.jsx)(mn.__experimentalToggleGroupControlOptionIcon,{value:a,icon:l,label:u},a)})})}var SNe={placement:"bottom-start"};function XZ({layout:e,onChange:t,isToolbar:o=!1}){let{justifyContent:r="left",orientation:n="horizontal"}=e,i=l=>{t({...e,justifyContent:l})},s=["left","center","right"];if(n==="horizontal"?s.push("space-between"):s.push("stretch"),o)return(0,po.jsx)(Ky,{allowedControls:s,value:r,onChange:i,popoverProps:SNe});let a=[{value:"left",icon:Ff,label:(0,Jo.__)("Justify items left")},{value:"center",icon:Vf,label:(0,Jo.__)("Justify items center")},{value:"right",icon:zf,label:(0,Jo.__)("Justify items right")}];return n==="horizontal"?a.push({value:"space-between",icon:Sy,label:(0,Jo.__)("Space between items")}):a.push({value:"stretch",icon:ky,label:(0,Jo.__)("Stretch items")}),(0,po.jsx)(mn.__experimentalToggleGroupControl,{label:(0,Jo.__)("Justification"),value:r,onChange:i,className:"block-editor-hooks__flex-layout-justification-controls",children:a.map(({value:l,icon:u,label:d})=>(0,po.jsx)(mn.__experimentalToggleGroupControlOptionIcon,{value:l,icon:u,label:d},l))})}function kNe({layout:e,onChange:t}){let{flexWrap:o="wrap"}=e;return(0,po.jsx)(mn.ToggleControl,{label:(0,Jo.__)("Allow to wrap to multiple lines"),onChange:r=>{t({...e,flexWrap:r?"wrap":"nowrap"})},checked:o==="wrap"})}function _Ne({layout:e,onChange:t}){let{orientation:o="horizontal",verticalAlignment:r,justifyContent:n}=e;return(0,po.jsxs)(mn.__experimentalToggleGroupControl,{className:"block-editor-hooks__flex-layout-orientation-controls",label:(0,Jo.__)("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,po.jsx)(mn.__experimentalToggleGroupControlOptionIcon,{icon:ax,value:"horizontal",label:(0,Jo.__)("Horizontal")}),(0,po.jsx)(mn.__experimentalToggleGroupControlOptionIcon,{icon:oF,value:"vertical",label:(0,Jo.__)("Vertical")})]})}var eX=c(G(),1);var tX={name:"default",label:(0,eX.__)("Flow"),inspectorControls:function(){return null},toolBarControls:function(){return null},getLayoutStyle:function({selector:t,style:o,blockName:r,hasBlockGapSupport:n,layoutDefinitions:i=Vs}){let s=Si(o?.spacing?.blockGap),a="";Ft(r,"spacing","blockGap")||(s?.top?a=Si(s?.top):typeof s=="string"&&(a=Si(s)));let l="";return n&&a&&(l+=Qf(t,i,"default",a)),l},getOrientation(){return"vertical"},getAlignments(e,t){let o=wB(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 qn=c(H(),1),va=c(G(),1);var oX=c(Dx(),1);var ur=c(E(),1),xNe="var(--wp--style--global--content-size, none)",wNe="var(--wp--style--global--wide-size, none)",rX={name:"constrained",label:(0,va.__)("Constrained"),inspectorControls:function({layout:t,onChange:o,layoutBlockSupport:r={},resetLayout:n={},clientId:i}){let{wideSize:s,contentSize:a,justifyContent:l="center"}=t,{allowJustification:u=!0,allowCustomContentAndWideSize:d=!0}=r,f=x=>{o({...t,justifyContent:x})},p=[{value:"left",icon:Ff,label:(0,va.__)("Justify items left")},{value:"center",icon:Vf,label:(0,va.__)("Justify items center")},{value:"right",icon:zf,label:(0,va.__)("Justify items right")}],[g]=Me("spacing.units"),m=(0,qn.__experimentalUseCustomUnits)({availableUnits:g||["%","px","em","rem","vw"]}),h=(x,w)=>(t?.[x]??w)!==(n?.[x]??w),b=()=>o(Ge({...t,contentSize:n?.contentSize})),v=()=>o(Ge({...t,wideSize:n?.wideSize})),y=()=>o(Ge({...t,justifyContent:n?.justifyContent})),k=()=>h("contentSize"),S=()=>h("wideSize"),_=()=>h("justifyContent","center");return(0,ur.jsxs)(ur.Fragment,{children:[d&&(0,ur.jsxs)(ur.Fragment,{children:[(0,ur.jsx)(qn.__experimentalToolsPanelItem,{label:(0,va.__)("Content width"),hasValue:k,onDeselect:b,panelId:i,children:(0,ur.jsx)(qn.__experimentalUnitControl,{label:(0,va.__)("Content width"),labelPosition:"top",value:a===null?"":a||s||"",onChange:x=>{x=0>parseFloat(x)?"0":x,o({...t,contentSize:x!==""?x:void 0})},units:m,prefix:(0,ur.jsx)(qn.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,ur.jsx)(ft,{icon:Eg})})})}),(0,ur.jsxs)(qn.__experimentalToolsPanelItem,{label:(0,va.__)("Wide width"),hasValue:S,onDeselect:v,panelId:i,children:[(0,ur.jsx)(qn.__experimentalUnitControl,{label:(0,va.__)("Wide width"),labelPosition:"top",value:s===null?"":s||a||"",onChange:x=>{x=0>parseFloat(x)?"0":x,o({...t,wideSize:x!==""?x:void 0})},units:m,prefix:(0,ur.jsx)(qn.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,ur.jsx)(ft,{icon:Fg})})}),(0,ur.jsx)("p",{className:"block-editor-hooks__layout-constrained-helptext",children:(0,va.__)("Customize the width for all elements that are assigned to the center or wide columns.")})]})]}),u&&(0,ur.jsx)(qn.__experimentalToolsPanelItem,{label:(0,va.__)("Justification"),hasValue:_,onDeselect:y,panelId:i,children:(0,ur.jsx)(qn.__experimentalToggleGroupControl,{label:(0,va.__)("Justification"),value:l,onChange:f,children:p.map(({value:x,icon:w,label:T})=>(0,ur.jsx)(qn.__experimentalToggleGroupControlOptionIcon,{value:x,icon:w,label:T},x))})})]})},toolBarControls:function({layout:t={},onChange:o,layoutBlockSupport:r,controlsGroup:n="block"}){let{allowJustification:i=!0}=r;return i?(0,ur.jsx)(Po,{group:n,__experimentalShareWithChildBlocks:!0,children:(0,ur.jsx)(ENe,{layout:t,onChange:o})}):null},getLayoutStyle:function({selector:t,layout:o={},viewportOverrides:r,style:n,blockName:i,hasBlockGapSupport:s,layoutDefinitions:a=Vs}){let l=r!==void 0,u=l?{...o,...r}:o,d=P=>Object.hasOwn(r||{},P),{contentSize:f,wideSize:p,justifyContent:g}=u,m=Si(n?.spacing?.blockGap),h=!l||Object.hasOwn(n?.spacing||{},"blockGap"),b=!l||Object.hasOwn(n?.spacing||{},"padding"),v="";Ft(i,"spacing","blockGap")||(m?.top?v=Si(m?.top):typeof m=="string"&&(v=Si(m)));let y=g==="left"?"0 !important":"auto !important",k=g==="right"?"0 !important":"auto !important",S=l&&d("justifyContent"),_=l&&d("contentSize"),x=l&&d("wideSize"),w=!l||_||x,T=l&&(_&&!f||x&&!p),B=f||(p&&!_?p:xNe),R=p||(f&&!x?f:wNe),A=[`max-width: ${B}`];(!l||S)&&A.push(`margin-left: ${y}`,`margin-right: ${k}`);let O=w&&(f||p||T)?`
${ts(t,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")} {
${A.join("; ")};
}
${ts(t,"> .alignwide")} {
max-width: ${R};
}
${ts(t,"> .alignfull")} {
max-width: none;
}
`:"";return S&&!w?O+=`${ts(t,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")}
{ margin-left: ${y}; margin-right: ${k}; }`:l||(g==="left"?O+=`${ts(t,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")}
{ margin-left: ${y}; }`:g==="right"&&(O+=`${ts(t,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")}
{ margin-right: ${k}; }`)),b&&n?.spacing?.padding&&(0,oX.getCSSRules)(n).forEach(L=>{if(L.key==="paddingRight"){let M=L.value==="0"?"0px":L.value;O+=`
${ts(t,"> .alignfull")} {
margin-right: calc(${M} * -1);
}
`}else if(L.key==="paddingLeft"){let M=L.value==="0"?"0px":L.value;O+=`
${ts(t,"> .alignfull")} {
margin-left: calc(${M} * -1);
}
`}}),s&&h&&v&&(O+=Qf(t,a,"constrained",v)),O},getOrientation(){return"vertical"},getAlignments(e){let t=wB(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}},CNe={placement:"bottom-start"};function ENe({layout:e,onChange:t}){let{justifyContent:o="center"}=e;return(0,ur.jsx)(Ky,{allowedControls:["left","center","right"],value:o,onChange:i=>{t({...e,justifyContent:i})},popoverProps:CNe})}var Er=c(G(),1),Lt=c(H(),1),RB=c(F(),1);var Bt=c(E(),1),TNe={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},RNe=[{value:"px",label:"px",default:0},{value:"rem",label:"rem",default:0},{value:"em",label:"em",default:0}],nX={name:"grid",label:(0,Er.__)("Grid"),inspectorControls:function({layout:t={},onChange:o,layoutBlockSupport:r={},resetLayout:n={},clientId:i}){let{allowSizingOnChildren:s=!1}=r,a=!0,l=!t?.isManualPlacement||window.__experimentalEnableGridInteractivity,u=!t?.isManualPlacement,d=t.isManualPlacement?3:void 0,f=(S,_)=>(t?.[S]??_)!==(n?.[S]??_),p=()=>f("isManualPlacement",!1),g=()=>f("columnCount",d)||f("rowCount"),m=()=>f("minimumColumnWidth"),h=()=>f("autoFit",!1),b=()=>o(Ge({...t,isManualPlacement:n?.isManualPlacement,rowCount:n?.rowCount,minimumColumnWidth:n?.minimumColumnWidth})),v=()=>o(Ge({...t,columnCount:n?.columnCount??d,rowCount:n?.rowCount})),y=()=>o(Ge({...t,minimumColumnWidth:n?.minimumColumnWidth})),k=()=>o(Ge({...t,autoFit:n?.autoFit}));return(0,Bt.jsxs)(Bt.Fragment,{children:[window.__experimentalEnableGridInteractivity&&(0,Bt.jsx)(Lt.__experimentalToolsPanelItem,{label:(0,Er.__)("Grid item position"),hasValue:p,onDeselect:b,isShownByDefault:!0,panelId:i,children:(0,Bt.jsx)(ONe,{layout:t,onChange:o})}),a&&(0,Bt.jsx)(Lt.__experimentalToolsPanelItem,{label:(0,Er.__)("Columns and rows"),hasValue:g,onDeselect:v,isShownByDefault:!0,panelId:i,children:(0,Bt.jsx)(PNe,{layout:t,onChange:o,allowSizingOnChildren:s})}),l&&(0,Bt.jsx)(Lt.__experimentalToolsPanelItem,{label:(0,Er.__)("Min. column width"),hasValue:m,onDeselect:y,isShownByDefault:!0,panelId:i,children:(0,Bt.jsx)(BNe,{layout:t,onChange:o})}),u&&(0,Bt.jsx)(Lt.__experimentalToolsPanelItem,{label:(0,Er.__)("Fill available space"),hasValue:h,onDeselect:k,panelId:i,children:(0,Bt.jsx)(INe,{layout:t,onChange:o})})]})},toolBarControls:function(){return null},getLayoutStyle:function({selector:t,layout:o={},viewportOverrides:r,style:n,blockName:i,hasBlockGapSupport:s,globalBlockGapValue:a,layoutDefinitions:l=Vs}){let u=r!==void 0,d=u?{...o,...r}:o,f=T=>Object.hasOwn(r||{},T),{minimumColumnWidth:p=null,columnCount:g=null,rowCount:m=null,autoFit:h=!1}=d,b=h?"auto-fit":"auto-fill",v="1.2rem";if(a){let T=aw(a);v=Cl(T?.left)||Cl(T?.top)||"1.2rem"}let y=n?.spacing?.blockGap&&!Ft(i,"spacing","blockGap")?Si(n?.spacing?.blockGap,v):void 0,k=!u||Object.hasOwn(n?.spacing||{},"blockGap"),S="",_=[],x=!u||f("minimumColumnWidth")||f("columnCount")||f("autoFit")||k&&p&&g>0,w=(!u||f("rowCount"))&&g&&m;if(x&&p&&g>0){let T=y||v;(T==="0"||T===0)&&(T="0px");let B=`max(min( ${p}, 100%), ( 100% - (${T}*${g-1}) ) / ${g})`;_.push(`grid-template-columns: repeat(${b}, minmax(${B}, 1fr))`)}else x&&g?_.push(`grid-template-columns: repeat(${g}, minmax(0, 1fr))`):x&&_.push(`grid-template-columns: repeat(${b}, minmax(min(${p||"12rem"}, 100%), 1fr))`);if(x){let T=!o?.columnCount||o?.columnCount&&o?.minimumColumnWidth;(!g||p)&&(!u||!T)&&_.push("container-type: inline-size")}return w&&_.push(`grid-template-rows: repeat(${m}, minmax(1rem, auto))`),_.length&&(S=`${ts(t)} { ${_.join("; ")}; }`),s&&k&&y&&(S+=Qf(t,l,"grid",y)),S},getOrientation(){return"horizontal"},getAlignments(){return[]}};function BNe({layout:e,onChange:t}){let{minimumColumnWidth:o,columnCount:r,isManualPlacement:n}=e,s=o||(n||r?null:"12rem"),[a,l="rem"]=(0,Lt.__experimentalParseQuantityAndUnitFromRawValue)(s),u=f=>{t({...e,minimumColumnWidth:[f,l].join("")})},d=f=>{let p;["em","rem"].includes(f)&&l==="px"?p=(a/16).toFixed(2)+f:["em","rem"].includes(l)&&f==="px"&&(p=Math.round(a*16)+f),t({...e,minimumColumnWidth:p})};return(0,Bt.jsxs)("fieldset",{className:"block-editor-hooks__grid-layout-minimum-width-control",children:[(0,Bt.jsx)(Lt.BaseControl.VisualLabel,{as:"legend",children:(0,Er.__)("Min. column width")}),(0,Bt.jsxs)(Lt.Flex,{gap:4,children:[(0,Bt.jsx)(Lt.FlexItem,{isBlock:!0,children:(0,Bt.jsx)(Lt.__experimentalUnitControl,{onChange:f=>{t({...e,minimumColumnWidth:f===""?void 0:f})},onUnitChange:d,value:s,units:RNe,min:0,label:(0,Er.__)("Minimum column width"),hideLabelFromVision:!0})}),(0,Bt.jsx)(Lt.FlexItem,{isBlock:!0,children:(0,Bt.jsx)(Lt.RangeControl,{onChange:u,value:a||0,min:0,max:TNe[l]||600,withInputField:!1,label:(0,Er.__)("Minimum column width"),hideLabelFromVision:!0})})]}),(0,Bt.jsx)("p",{className:"components-base-control__help",children:(0,Er.__)("Columns will wrap to fewer per row when they can no longer maintain the minimum width.")})]})}function PNe({layout:e,onChange:t,allowSizingOnChildren:o}){let{columnCount:n=void 0,rowCount:i,isManualPlacement:s}=e;return(0,Bt.jsx)(Bt.Fragment,{children:(0,Bt.jsxs)("fieldset",{className:"block-editor-hooks__grid-layout-columns-and-rows-controls",children:[!s&&(0,Bt.jsx)(Lt.BaseControl.VisualLabel,{as:"legend",children:(0,Er.__)("Max. columns")}),(0,Bt.jsxs)(Lt.Flex,{gap:4,children:[(0,Bt.jsx)(Lt.FlexItem,{isBlock:!0,children:(0,Bt.jsx)(Lt.__experimentalNumberControl,{onChange:a=>{let u=a===""||a==="0"?s?1:void 0:parseInt(a,10);t({...e,columnCount:u})},value:n??"",min:1,label:(0,Er.__)("Columns"),hideLabelFromVision:!s})}),(0,Bt.jsx)(Lt.FlexItem,{isBlock:!0,children:o&&s?(0,Bt.jsx)(Lt.__experimentalNumberControl,{onChange:a=>{let l=a===""||a==="0"?1:parseInt(a,10);t({...e,rowCount:l})},value:i,min:1,label:(0,Er.__)("Rows")}):(0,Bt.jsx)(Lt.RangeControl,{value:n??1,onChange:a=>t({...e,columnCount:a===""||a==="0"?1:a}),min:1,max:16,withInputField:!1,label:(0,Er.__)("Columns"),hideLabelFromVision:!0})})]})]})})}function INe({layout:e,onChange:t}){let{autoFit:o=!1}=e;return(0,Bt.jsx)(Lt.ToggleControl,{label:(0,Er.__)("Fill available space"),help:(0,Er.__)("Stretch columns to fill the available space, instead of leaving gaps when there are too few items to fill a row."),checked:o,onChange:r=>t({...e,autoFit:r})})}function ONe({layout:e,onChange:t}){let{columnCount:o,rowCount:r,minimumColumnWidth:n,isManualPlacement:i}=e,[s,a]=(0,RB.useState)(o||3),[l,u]=(0,RB.useState)(r),[d,f]=(0,RB.useState)(n||"12rem"),p=i?"manual":"auto",g=h=>{h==="manual"?f(n||"12rem"):(a(o||3),u(r)),t({...e,columnCount:s,rowCount:h==="manual"?l:void 0,isManualPlacement:h==="manual"?!0:void 0,minimumColumnWidth:h==="auto"?d:null})},m=p==="manual"?(0,Er.__)("Grid items can be manually placed in any position on the grid."):(0,Er.__)("Grid items are placed automatically depending on their order.");return(0,Bt.jsxs)(Lt.__experimentalToggleGroupControl,{label:(0,Er.__)("Grid item position"),value:p,onChange:g,isBlock:!0,help:m,children:[(0,Bt.jsx)(Lt.__experimentalToggleGroupControlOption,{value:"auto",label:(0,Er.__)("Auto")},"auto"),(0,Bt.jsx)(Lt.__experimentalToggleGroupControlOption,{value:"manual",label:(0,Er.__)("Manual")},"manual")]})}var iX=[tX,QZ,rX,nX];function Sa(e="default"){return iX.find(t=>t.name===e)}function sX(){return iX}var G6=c(E(),1),W6={type:"default"},$6=(0,BB.createContext)(W6);$6.displayName="BlockLayoutContext";var PB=$6.Provider;function $g(){return(0,BB.useContext)($6)}function aX({layout:e={},css:t,...o}){let r=Sa(e.type),[n]=Me("spacing.blockGap"),i=n!==null;if(r){if(t)return(0,G6.jsx)("style",{children:t});let s=r.getLayoutStyle?.({hasBlockGapSupport:i,layout:e,...o});if(s)return(0,G6.jsx)("style",{children:s})}return null}var IB=[],lX=["none","left","center","right","wide","full"],ANe=["wide","full"];function lw(e=lX){e.includes("none")||(e=["none",...e]);let t=e.length===1&&e[0]==="none",[o,r,n]=(0,cX.useSelect)(l=>{if(t)return[!1,!1,!1];let u=l(C).getSettings();return[u.alignWide??!1,u.supportsLayout,u.__unstableIsBlockBasedTheme]},[t]),i=$g();if(t)return IB;let s=Sa(i?.type);if(r){let u=s.getAlignments(i,n).filter(d=>e.includes(d.name));return u.length===1&&u[0].name==="none"?IB:u}if(s.name!=="default"&&s.name!=="constrained")return IB;let a=e.filter(l=>i.alignments?i.alignments.includes(l):!o&&ANe.includes(l)?!1:lX.includes(l)).map(l=>({name:l}));return a.length===1&&a[0].name==="none"?IB:a}var ep=c(G(),1);var cw={none:{icon:Eg,title:(0,ep._x)("None","Alignment option")},left:{icon:o4,title:(0,ep.__)("Align left")},center:{icon:e4,title:(0,ep.__)("Align center")},right:{icon:n4,title:(0,ep.__)("Align right")},wide:{icon:Fg,title:(0,ep.__)("Wide width")},full:{icon:Nx,title:(0,ep.__)("Full width")}},uX="none";var Kg=c(E(),1);function LNe({value:e,onChange:t,controls:o,isToolbar:r,isCollapsed:n=!0}){let i=lw(o);if(!!!i.length)return null;function a(g){t([e,"none"].includes(g)?void 0:g)}let l=cw[e],u=cw[uX],d=r?tp.ToolbarGroup:tp.ToolbarDropdownMenu,f={icon:l?l.icon:u.icon,label:(0,K6.__)("Align")},p=r?{isCollapsed:n,controls:i.map(({name:g})=>({...cw[g],isActive:e===g||!e&&g==="none",role:n?"menuitemradio":void 0,onClick:()=>a(g)}))}:{toggleProps:{description:(0,K6.__)("Change alignment")},children:({onClose:g})=>(0,Kg.jsx)(Kg.Fragment,{children:(0,Kg.jsx)(tp.MenuGroup,{className:"block-editor-block-alignment-control__menu-group",children:i.map(({name:m,info:h})=>{let{icon:b,title:v}=cw[m],y=m===e||!e&&m==="none";return(0,Kg.jsx)(tp.MenuItem,{icon:b,iconPosition:"left",className:W("components-dropdown-menu__menu-item",{"is-active":y}),isSelected:y,onClick:()=>{a(m),g()},role:"menuitemradio",info:h,children:v},m)})})})};return(0,Kg.jsx)(d,{...f,...p})}var Y6=LNe;var q6=c(E(),1),OB=e=>(0,q6.jsx)(Y6,{...e,isToolbar:!1}),dX=e=>(0,q6.jsx)(Y6,{...e,isToolbar:!0});var hX=c(wg(),1),NB=c(G(),1),DB=c(ce(),1),Tl=c(H(),1),Q6=c(Z(),1),bX=c(F(),1),yX=c(fe(),1);var X6=c(wg(),1),fX=c(ce(),1),pX=c(H(),1),mX=c(Z(),1),LB=c(F(),1),gX=c(fe(),1);var AB=c(Z(),1);function Z6(e){return!e||Object.keys(e).length===0}function Ju(e){let{clientId:t}=ht(),o=e||t,{updateBlockAttributes:r}=(0,AB.useDispatch)(C),{getBlockAttributes:n}=(0,AB.useRegistry)().select(C);return{updateBlockBindings:a=>{let{metadata:{bindings:l,...u}={}}=n(o),d={...l};Object.entries(a).forEach(([p,g])=>{if(!g&&d[p]){delete d[p];return}d[p]=g});let f={...u,bindings:d};Z6(f.bindings)&&delete f.bindings,r(o,{metadata:Z6(f)?void 0:f})},removeAllBlockBindings:()=>{let{metadata:{bindings:a,...l}={}}=n(o);r(o,{metadata:Z6(l)?void 0:l})}}}var El=c(E(),1),{Menu:op}=U(pX.privateApis);function MNe({args:e,attribute:t,field:o,source:r,sourceKey:n}){let i=(0,LB.useMemo)(()=>({source:n,args:o.args||{key:o.key}}),[o.args,o.key,n]),s=(0,LB.useContext)(Kn),a=(0,mX.useSelect)(u=>r.getValues({select:u,context:s,bindings:{[t]:i}}),[t,s,i,r]),{updateBlockBindings:l}=Ju();return(0,El.jsxs)(op.CheckboxItem,{onChange:()=>{let u=(0,X6.default)(e,o.args)??o.key===e?.key;l(u?{[t]:void 0}:{[t]:i})},name:t+"-binding",value:a[t],checked:(0,X6.default)(e,o.args)??o.key===e?.key,children:[(0,El.jsx)(op.ItemLabel,{children:o.label}),(0,El.jsx)(op.ItemHelpText,{children:a[t]})]})}function uw({args:e,attribute:t,sourceKey:o,fields:r}){let n=(0,gX.useViewportMatch)("medium","<");if(!r||r.length===0)return null;let i=(0,fX.getBlockBindingsSource)(o);return(0,El.jsxs)(op,{placement:n?"bottom-start":"left-start",children:[(0,El.jsx)(op.SubmenuTriggerItem,{children:(0,El.jsx)(op.ItemLabel,{children:i.label})}),(0,El.jsx)(op.Popover,{gutter:8,children:(0,El.jsx)(op.Group,{children:r.map(s=>(0,El.jsx)(MNe,{args:e,attribute:t,field:s,source:i,sourceKey:o},o+JSON.stringify(s.args)||s.key))})})]},o)}var ka=c(E(),1),{Menu:MB}=U(Tl.privateApis);function dw({attribute:e,binding:t,blockName:o}){let{updateBlockBindings:r}=Ju(),n=(0,yX.useViewportMatch)("medium","<"),i=(0,bX.useContext)(Kn),s=(0,Q6.useSelect)(h=>{let{getAllBlockBindingsSources:b,getBlockBindingsSourceFieldsList:v,getBlockType:y}=U(h(DB.store)),k=y(o).attributes?.[e];if(k?.enum)return{};let S=k?.type==="rich-text"?"string":k?.type,_={};return Object.entries(b()).forEach(([x,w])=>{let T=v(w,i);if(!T?.length)return;let B=T.filter(R=>R.type===S);B.length&&(_[x]=B)}),_},[e,o,i]),{canUpdateBlockBindings:a}=(0,Q6.useSelect)(h=>({canUpdateBlockBindings:h(C).getSettings().canUpdateBlockBindings})),l=Object.keys(s).length>0,u=!a||!l,{source:d,args:f}=t||{},p=(0,DB.getBlockBindingsSource)(d),g,m=!0;return t===void 0?(l?g=(0,NB.__)("Not connected"):g=(0,NB.__)("No sources available"),m=!0):p?g=s?.[d]?.find(h=>(0,hX.default)(h.args,f))?.label||p?.label||d:(m=!1,g=(0,NB.__)("Source not registered")),(0,ka.jsx)(Tl.__experimentalToolsPanelItem,{hasValue:()=>!!t,label:e,onDeselect:!!l&&(()=>{r({[e]:void 0})}),children:(0,ka.jsxs)(MB,{placement:n?"bottom-start":"left-start",children:[(0,ka.jsx)(MB.TriggerButton,{render:(0,ka.jsx)(Tl.__experimentalItem,{}),disabled:!l,children:(0,ka.jsxs)(Tl.__experimentalVStack,{className:"block-editor-bindings__item",spacing:0,children:[(0,ka.jsx)(Tl.__experimentalText,{truncate:!0,children:e}),(0,ka.jsx)(Tl.__experimentalText,{truncate:!0,variant:m?"muted":void 0,isDestructive:!m,children:g})]})}),!u&&(0,ka.jsx)(MB.Popover,{gutter:n?8:36,children:(0,ka.jsx)(MB,{placement:n?"bottom-start":"left-start",children:Object.entries(s).map(([h,b])=>(0,ka.jsx)(uw,{args:t?.args,attribute:e,sourceKey:h,fields:b},h))})})]})})}var vX=c(G(),1),SX=c(H(),1);var kX=c(E(),1);function NNe({isActive:e,label:t=(0,vX.__)("Full height"),onToggle:o,isDisabled:r}){return(0,kX.jsx)(SX.ToolbarButton,{isActive:e,icon:o3,label:t,onClick:()=>o(!e),disabled:r})}var _X=NNe;var wX=c(G(),1),CX=c(oo(),1),Yg=c(H(),1),fw=c(E(),1),DNe=()=>{};function VNe(e){let{label:t=(0,wX.__)("Change matrix alignment"),onChange:o=DNe,value:r="center",isDisabled:n}=e,i=(0,fw.jsx)(Yg.AlignmentMatrixControl.Icon,{value:r});return(0,fw.jsx)(Yg.Dropdown,{popoverProps:{placement:"bottom-start"},renderToggle:({onToggle:s,isOpen:a})=>(0,fw.jsx)(Yg.ToolbarButton,{onClick:s,"aria-haspopup":"true","aria-expanded":a,onKeyDown:u=>{!a&&u.keyCode===CX.DOWN&&(u.preventDefault(),s())},label:t,icon:i,showTooltip:!0,disabled:n}),renderContent:()=>(0,fw.jsx)(Yg.AlignmentMatrixControl,{onChange:o,value:r})})}var EX=VNe;var tz=c(H(),1),zB=c(Z(),1),jB=c(G(),1);var AX=c(F(),1);var TX=c(Z(),1),VB=c(ce(),1);function On({clientId:e,maximumLength:t,context:o}){let r=(0,TX.useSelect)(n=>{if(!e)return null;let{getBlockName:i,getBlockAttributes:s,getBlock:a}=n(C),{getBlockType:l,getActiveBlockVariation:u}=n(VB.store),d=i(e),f=l(d);if(!f)return null;let p=s(e),g=(0,VB.__experimentalGetBlockLabel)(f,p,o);return g!==f.title?g:u(d,p,void 0,a?.(e)?.innerContent)?.title||f.title},[e,o]);return r?t&&t>0&&r.length>t?r.slice(0,t-3)+"...":r:null}function pw({clientId:e,maximumLength:t,context:o}){return On({clientId:e,maximumLength:t,context:o})}var qg=c(F(),1),PX=c(fe(),1);var FB=c(F(),1),J6=c(fe(),1),RX=c(E(),1),mw=(0,FB.createContext)({refsMap:(0,J6.observableMap)()});mw.displayName="BlockRefsContext";function BX({children:e}){let t=(0,FB.useMemo)(()=>({refsMap:(0,J6.observableMap)()}),[]);return(0,RX.jsx)(mw.Provider,{value:t,children:e})}function IX(e){let{refsMap:t}=(0,qg.useContext)(mw);return(0,PX.useRefEffect)(o=>(t.set(e,o),()=>t.delete(e)),[e])}function ez(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function Zg(e,t){let{refsMap:o}=(0,qg.useContext)(mw);(0,qg.useLayoutEffect)(()=>{ez(t,o.get(e));let r=o.subscribe(e,()=>ez(t,o.get(e)));return()=>{r(),ez(t,null)}},[o,e,t])}function Mt(e){let[t,o]=(0,qg.useState)(null);return Zg(e,o),t}function OX(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 Fs=c(E(),1);function FNe({rootLabelText:e}){let{selectBlock:t,clearSelectedBlock:o}=(0,zB.useDispatch)(C),{clientId:r,parents:n,hasSelection:i}=(0,zB.useSelect)(l=>{let{getSelectionStart:u,getSelectedBlockClientId:d,getEnabledBlockParents:f}=U(l(C)),p=d();return{parents:f(p),clientId:p,hasSelection:!!u().clientId}},[]),s=e||(0,jB._x)("Document","noun, breadcrumb"),a=(0,AX.useRef)();return Zg(r,a),(0,Fs.jsxs)("ul",{className:"block-editor-block-breadcrumb",role:"list","aria-label":(0,jB.__)("Block breadcrumb"),children:[(0,Fs.jsxs)("li",{className:i?void 0:"block-editor-block-breadcrumb__current","aria-current":i?void 0:"true",children:[i&&(0,Fs.jsx)(tz.Button,{size:"small",className:"block-editor-block-breadcrumb__button",onClick:()=>{let l=a.current?.closest(".editor-styles-wrapper");o(),OX(l)?.focus()},children:s}),!i&&(0,Fs.jsx)("span",{children:s}),!!r&&(0,Fs.jsx)(ft,{icon:Df,className:"block-editor-block-breadcrumb__separator"})]}),n.map(l=>(0,Fs.jsxs)("li",{children:[(0,Fs.jsx)(tz.Button,{size:"small",className:"block-editor-block-breadcrumb__button",onClick:()=>t(l),children:(0,Fs.jsx)(pw,{clientId:l,maximumLength:35,context:"breadcrumb"})}),(0,Fs.jsx)(ft,{icon:Df,className:"block-editor-block-breadcrumb__separator"})]},l)),!!r&&(0,Fs.jsx)("li",{className:"block-editor-block-breadcrumb__current","aria-current":"true",children:(0,Fs.jsx)(pw,{clientId:r,maximumLength:35,context:"breadcrumb"})})]})}var LX=FNe;var MX=c(Z(),1);function NX(e){return(0,MX.useSelect)(t=>{let{__unstableHasActiveBlockOverlayActive:o}=t(C);return o(e)},[e])}var ML=c(fe(),1),cbe=c(F(),1),ube=c(Z(),1),dbe=c(H(),1);var Ha=c(Z(),1),p2=c(fe(),1),Xp=c(F(),1),Ipe=c(ce(),1);var mp=c(F(),1),zt=c(ce(),1),aee=c(H(),1),MP=c(Z(),1),NP=c(fe(),1),lee=c(Et(),1);var rp=c(G(),1),UB=c(H(),1),Xg=c(F(),1),hw=c(ce(),1),GB=c(Z(),1);var gw=class{diff(t,o,r={}){let n;typeof r=="function"?(n=r,r={}):"callback"in r&&(n=r.callback);let i=this.castInput(t,r),s=this.castInput(o,r),a=this.removeEmpty(this.tokenize(i,r)),l=this.removeEmpty(this.tokenize(s,r));return this.diffWithOptionsObj(a,l,r,n)}diffWithOptionsObj(t,o,r,n){var i;let s=y=>{if(y=this.postProcess(y,r),n){setTimeout(function(){n(y)},0);return}else return y},a=o.length,l=t.length,u=1,d=a+l;r.maxEditLength!=null&&(d=Math.min(d,r.maxEditLength));let f=(i=r.timeout)!==null&&i!==void 0?i:1/0,p=Date.now()+f,g=[{oldPos:-1,lastComponent:void 0}],m=this.extractCommon(g[0],o,t,0,r);if(g[0].oldPos+1>=l&&m+1>=a)return s(this.buildValues(g[0].lastComponent,o,t));let h=-1/0,b=1/0,v=()=>{for(let y=Math.max(h,-u);y<=Math.min(b,u);y+=2){let k,S=g[y-1],_=g[y+1];S&&(g[y-1]=void 0);let x=!1;if(_){let T=_.oldPos-y;x=_&&0<=T&&T<a}let w=S&&S.oldPos+1<l;if(!x&&!w){g[y]=void 0;continue}if(!w||x&&S.oldPos<_.oldPos?k=this.addToPath(_,!0,!1,0,r):k=this.addToPath(S,!1,!0,1,r),m=this.extractCommon(k,o,t,y,r),k.oldPos+1>=l&&m+1>=a)return s(this.buildValues(k.lastComponent,o,t))||!0;g[y]=k,k.oldPos+1>=l&&(b=Math.min(b,y-1)),m+1>=a&&(h=Math.max(h,y+1))}u++};if(n)(function y(){setTimeout(function(){if(u>d||Date.now()>p)return n(void 0);v()||y()},0)})();else for(;u<=d&&Date.now()<=p;){let y=v();if(y)return y}}addToPath(t,o,r,n,i){let s=t.lastComponent;return s&&!i.oneChangePerToken&&s.added===o&&s.removed===r?{oldPos:t.oldPos+n,lastComponent:{count:s.count+1,added:o,removed:r,previousComponent:s.previousComponent}}:{oldPos:t.oldPos+n,lastComponent:{count:1,added:o,removed:r,previousComponent:s}}}extractCommon(t,o,r,n,i){let s=o.length,a=r.length,l=t.oldPos,u=l-n,d=0;for(;u+1<s&&l+1<a&&this.equals(r[l+1],o[u+1],i);)u++,l++,d++,i.oneChangePerToken&&(t.lastComponent={count:1,previousComponent:t.lastComponent,added:!1,removed:!1});return d&&!i.oneChangePerToken&&(t.lastComponent={count:d,previousComponent:t.lastComponent,added:!1,removed:!1}),t.oldPos=l,u}equals(t,o,r){return r.comparator?r.comparator(t,o):t===o||!!r.ignoreCase&&t.toLowerCase()===o.toLowerCase()}removeEmpty(t){let o=[];for(let r=0;r<t.length;r++)t[r]&&o.push(t[r]);return o}castInput(t,o){return t}tokenize(t,o){return Array.from(t)}join(t){return t.join("")}postProcess(t,o){return t}get useLongestToken(){return!1}buildValues(t,o,r){let n=[],i;for(;t;)n.push(t),i=t.previousComponent,delete t.previousComponent,t=i;n.reverse();let s=n.length,a=0,l=0,u=0;for(;a<s;a++){let d=n[a];if(d.removed)d.value=this.join(r.slice(u,u+d.count)),u+=d.count;else{if(!d.added&&this.useLongestToken){let f=o.slice(l,l+d.count);f=f.map(function(p,g){let m=r[u+g];return m.length>p.length?m:p}),d.value=this.join(f)}else d.value=this.join(o.slice(l,l+d.count));l+=d.count,d.added||(u+=d.count)}}return n}};var oz=class extends gw{},VX=new oz;function rz(e,t,o){return VX.diff(e,t,o)}var HB=c(G(),1),HX=c(ce(),1);var FX=c(H(),1),zX=c(F(),1),jX=c(Et(),1),Ac=c(E(),1);function nz({title:e,rawContent:t,renderedContent:o,action:r,actionText:n,className:i}){return(0,Ac.jsxs)("div",{className:i,children:[(0,Ac.jsxs)("div",{className:"block-editor-block-compare__content",children:[(0,Ac.jsx)("h2",{className:"block-editor-block-compare__heading",children:e}),(0,Ac.jsx)("div",{className:"block-editor-block-compare__html",children:t}),(0,Ac.jsx)("div",{className:"block-editor-block-compare__preview edit-post-visual-editor",children:(0,Ac.jsx)(zX.RawHTML,{children:(0,jX.safeHTML)(o)})})]}),(0,Ac.jsx)("div",{className:"block-editor-block-compare__action",children:(0,Ac.jsx)(FX.Button,{__next40pxDefaultSize:!0,variant:"secondary",tabIndex:"0",onClick:r,children:n})})]})}var Yy=c(E(),1);function zNe({block:e,onKeep:t,onConvert:o,convertor:r,convertButtonText:n}){function i(u,d){return rz(u,d).map((p,g)=>{let m=W({"block-editor-block-compare__added":p.added,"block-editor-block-compare__removed":p.removed});return(0,Yy.jsx)("span",{className:m,children:p.value},g)})}function s(u){return(Array.isArray(u)?u:[u]).map(p=>(0,HX.getSaveContent)(p.name,p.attributes,p.innerBlocks)).join("")}let a=s(r(e)),l=i(e.originalContent,a);return(0,Yy.jsxs)("div",{className:"block-editor-block-compare__wrapper",children:[(0,Yy.jsx)(nz,{title:(0,HB.__)("Current"),className:"block-editor-block-compare__current",action:t,actionText:(0,HB.__)("Convert to HTML"),rawContent:e.originalContent,renderedContent:e.originalContent}),(0,Yy.jsx)(nz,{title:(0,HB.__)("After Conversion"),className:"block-editor-block-compare__converted",action:o,actionText:n,rawContent:l,renderedContent:a})]})}var UX=zNe;var ed=c(E(),1),GX=e=>(0,hw.rawHandler)({HTML:e.originalContent});function WX({clientId:e}){let{block:t,canInsertHTMLBlock:o}=(0,GB.useSelect)(u=>{let{canInsertBlockType:d,getBlock:f,getBlockRootClientId:p}=u(C),g=p(e);return{block:f(e),canInsertHTMLBlock:d("core/html",g)}},[e]),{replaceBlock:r}=(0,GB.useDispatch)(C),[n,i]=(0,Xg.useState)(!1),s=(0,Xg.useCallback)(()=>i(!1),[]),a=(0,Xg.useMemo)(()=>({toHTML(){let u=(0,hw.createBlock)("core/html",{},[],[t.originalContent]);return r(t.clientId,u)},toBlocks(){let u=GX(t);return r(t.clientId,u)},toRecoveredBlock(){let u=(0,hw.createBlock)(t.name,t.attributes,t.innerBlocks);return r(t.clientId,u)}}),[t,r]),l=(0,Xg.useMemo)(()=>[{title:(0,rp._x)("Resolve","imperative verb"),onClick:()=>i(!0)},o&&{title:(0,rp.__)("Convert to HTML"),onClick:a.toHTML}].filter(Boolean),[o,a]);return(0,ed.jsxs)(ed.Fragment,{children:[(0,ed.jsx)($f,{actions:[(0,ed.jsx)(UB.Button,{__next40pxDefaultSize:!0,onClick:a.toRecoveredBlock,variant:"primary",children:(0,rp.__)("Attempt recovery")},"recover")],secondaryActions:l,children:(0,rp.__)("Block contains unexpected or invalid content.")}),n&&(0,ed.jsx)(UB.Modal,{title:(0,rp.__)("Resolve Block"),onRequestClose:s,className:"block-editor-block-compare",children:(0,ed.jsx)(UX,{block:t,onKeep:a.toHTML,onConvert:a.toBlocks,convertor:GX,convertButtonText:(0,rp.__)("Convert to Blocks")})})]})}var $X=c(G(),1);var KX=c(E(),1),jNe=(0,KX.jsx)($f,{className:"block-editor-block-list__block-crash-warning",children:(0,$X.__)("This block has encountered an error and cannot be previewed.")});function YX(){return jNe}var qX=c(F(),1),HNe=class extends qX.Component{constructor(){super(...arguments),this.state={hasError:!1}}componentDidCatch(){this.setState({hasError:!0})}render(){return this.state.hasError?this.props.fallback:this.props.children}},ZX=HNe;var gQ=c(az(),1),qy=c(F(),1),YB=c(Z(),1),Lc=c(ce(),1);var hQ=c(E(),1);function JNe({clientId:e}){let[t,o]=(0,qy.useState)(""),r=(0,YB.useSelect)(a=>a(C).getBlock(e),[e]),{updateBlock:n}=(0,YB.useDispatch)(C),i=(0,qy.useMemo)(()=>r?(0,Lc.getBlockContent)(r):"",[r]),s=()=>{let a=(0,Lc.getBlockType)(r.name);if(!a)return;let l=(0,Lc.getBlockAttributes)(a,t,r.attributes),u=t||(0,Lc.getSaveContent)(a,l),[d]=t?(0,Lc.validateBlock)({...r,attributes:l,originalContent:u}):[!0];n(e,{attributes:l,originalContent:u,isValid:d}),t||o(u)};return(0,qy.useEffect)(()=>{o(i)},[i]),(0,hQ.jsx)(gQ.default,{className:"block-editor-block-list__block-html-textarea",value:t,onBlur:s,onChange:a=>o(a.target.value)})}var bQ=JNe;var nee=c(F(),1),AP=c(G(),1),iee=c(ce(),1),uv=c(fe(),1),see=c(yw(),1);var cz=Sw(),rt=e=>vw(e,cz),uz=Sw();rt.write=e=>vw(e,uz);var qB=Sw();rt.onStart=e=>vw(e,qB);var dz=Sw();rt.onFrame=e=>vw(e,dz);var fz=Sw();rt.onFinish=e=>vw(e,fz);var Zy=[];rt.setTimeout=(e,t)=>{let o=rt.now()+t,r=()=>{let i=Zy.findIndex(s=>s.cancel==r);~i&&Zy.splice(i,1),ip-=~i?1:0},n={time:o,handler:e,cancel:r};return Zy.splice(vQ(o),0,n),ip+=1,SQ(),n};var vQ=e=>~(~Zy.findIndex(t=>t.time>e)||~Zy.length);rt.cancel=e=>{qB.delete(e),dz.delete(e),fz.delete(e),cz.delete(e),uz.delete(e)};rt.sync=e=>{lz=!0,rt.batchedUpdates(e),lz=!1};rt.throttle=e=>{let t;function o(){try{e(...t)}finally{t=null}}function r(...n){t=n,rt.onStart(o)}return r.handler=e,r.cancel=()=>{qB.delete(o),t=null},r};var pz=typeof window<"u"?window.requestAnimationFrame:()=>{};rt.use=e=>pz=e;rt.now=typeof performance<"u"?()=>performance.now():Date.now;rt.batchedUpdates=e=>e();rt.catch=console.error;rt.frameLoop="always";rt.advance=()=>{rt.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):_Q()};var np=-1,ip=0,lz=!1;function vw(e,t){lz?(t.delete(e),e(0)):(t.add(e),SQ())}function SQ(){np<0&&(np=0,rt.frameLoop!=="demand"&&pz(kQ))}function eDe(){np=-1}function kQ(){~np&&(pz(kQ),rt.batchedUpdates(_Q))}function _Q(){let e=np;np=rt.now();let t=vQ(np);if(t&&(xQ(Zy.splice(0,t),o=>o.handler()),ip-=t),!ip){eDe();return}qB.flush(),cz.flush(e?Math.min(64,np-e):16.667),dz.flush(),uz.flush(),fz.flush()}function Sw(){let e=new Set,t=e;return{add(o){ip+=t==e&&!e.has(o)?1:0,e.add(o)},delete(o){return ip-=t==e&&e.has(o)?1:0,e.delete(o)},flush(o){t.size&&(e=new Set,ip-=t.size,xQ(t,r=>r(o)&&e.add(r)),ip+=e.size,t=e)}}}function xQ(e,t){e.forEach(o=>{try{t(o)}catch(r){rt.catch(r)}})}var xa=c(le());function eP(){}var BQ=(e,t,o)=>Object.defineProperty(e,t,{value:o,writable:!0,configurable:!0}),Ce={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 Mc(e,t){if(Ce.arr(e)){if(!Ce.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 vo=(e,t)=>e.forEach(t);function wa(e,t,o){if(Ce.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 os=e=>Ce.und(e)?[]:Ce.arr(e)?e:[e];function ev(e,t){if(e.size){let o=Array.from(e);e.clear(),vo(o,t)}}var tv=(e,...t)=>ev(e,o=>o(...t)),vz=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),Sz,PQ,sp=null,IQ=!1,kz=eP,tDe=e=>{e.to&&(PQ=e.to),e.now&&(rt.now=e.now),e.colors!==void 0&&(sp=e.colors),e.skipAnimation!=null&&(IQ=e.skipAnimation),e.createStringInterpolator&&(Sz=e.createStringInterpolator),e.requestAnimationFrame&&rt.use(e.requestAnimationFrame),e.batchedUpdates&&(rt.batchedUpdates=e.batchedUpdates),e.willAdvance&&(kz=e.willAdvance),e.frameLoop&&(rt.frameLoop=e.frameLoop)},zs=Object.freeze({__proto__:null,get createStringInterpolator(){return Sz},get to(){return PQ},get colors(){return sp},get skipAnimation(){return IQ},get willAdvance(){return kz},assign:tDe}),kw=new Set,_a=[],mz=[],QB=0,ov={get idle(){return!kw.size&&!_a.length},start(e){QB>e.priority?(kw.add(e),rt.onStart(oDe)):(OQ(e),rt(bz))},advance:bz,sort(e){if(QB)rt.onFrame(()=>ov.sort(e));else{let t=_a.indexOf(e);~t&&(_a.splice(t,1),AQ(e))}},clear(){_a=[],kw.clear()}};function oDe(){kw.forEach(OQ),kw.clear(),rt(bz)}function OQ(e){_a.includes(e)||AQ(e)}function AQ(e){_a.splice(rDe(_a,t=>t.priority>e.priority),0,e)}function bz(e){let t=mz;for(let o=0;o<_a.length;o++){let r=_a[o];QB=r.priority,r.idle||(kz(r),r.advance(e),r.idle||t.push(r))}return QB=0,mz=_a,mz.length=0,_a=t,_a.length>0}function rDe(e,t){let o=e.findIndex(t);return o<0?e.length:o}var LQ={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},Rl="[-+]?\\d*\\.?\\d+",JB=Rl+"%";function tP(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var nDe=new RegExp("rgb"+tP(Rl,Rl,Rl)),iDe=new RegExp("rgba"+tP(Rl,Rl,Rl,Rl)),sDe=new RegExp("hsl"+tP(Rl,JB,JB)),aDe=new RegExp("hsla"+tP(Rl,JB,JB,Rl)),lDe=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,cDe=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,uDe=/^#([0-9a-fA-F]{6})$/,dDe=/^#([0-9a-fA-F]{8})$/;function fDe(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=uDe.exec(e))?parseInt(t[1]+"ff",16)>>>0:sp&&sp[e]!==void 0?sp[e]:(t=nDe.exec(e))?(Xy(t[1])<<24|Xy(t[2])<<16|Xy(t[3])<<8|255)>>>0:(t=iDe.exec(e))?(Xy(t[1])<<24|Xy(t[2])<<16|Xy(t[3])<<8|EQ(t[4]))>>>0:(t=lDe.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=dDe.exec(e))?parseInt(t[1],16)>>>0:(t=cDe.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=sDe.exec(e))?(wQ(CQ(t[1]),ZB(t[2]),ZB(t[3]))|255)>>>0:(t=aDe.exec(e))?(wQ(CQ(t[1]),ZB(t[2]),ZB(t[3]))|EQ(t[4]))>>>0:null}function gz(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 wQ(e,t,o){let r=o<.5?o*(1+t):o+t-o*t,n=2*o-r,i=gz(n,r,e+1/3),s=gz(n,r,e),a=gz(n,r,e-1/3);return Math.round(i*255)<<24|Math.round(s*255)<<16|Math.round(a*255)<<8}function Xy(e){let t=parseInt(e,10);return t<0?0:t>255?255:t}function CQ(e){return(parseFloat(e)%360+360)%360/360}function EQ(e){let t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function ZB(e){let t=parseFloat(e);return t<0?0:t>100?1:t/100}function TQ(e){let t=fDe(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 ap=(e,t,o)=>{if(Ce.fun(e))return e;if(Ce.arr(e))return ap({range:e,output:t,extrapolate:o});if(Ce.str(e.output[0]))return Sz(e);let r=e,n=r.output,i=r.range||[0,1],s=r.extrapolateLeft||r.extrapolate||"extend",a=r.extrapolateRight||r.extrapolate||"extend",l=r.easing||(u=>u);return u=>{let d=mDe(u,i);return pDe(u,i[d],i[d+1],n[d],n[d+1],l,s,a,r.map)}};function pDe(e,t,o,r,n,i,s,a,l){let u=l?l(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 mDe(e,t){for(var o=1;o<t.length-1&&!(t[o]>=e);++o);return o-1}function yz(){return yz=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},yz.apply(this,arguments)}var Qy=Symbol.for("FluidValue.get"),Qg=Symbol.for("FluidValue.observers"),ki=e=>!!(e&&e[Qy]),An=e=>e&&e[Qy]?e[Qy]():e,_z=e=>e[Qg]||null;function gDe(e,t){e.eventObserved?e.eventObserved(t):e(t)}function Jg(e,t){let o=e[Qg];o&&o.forEach(r=>{gDe(r,t)})}var Jy=class{constructor(t){if(this[Qy]=void 0,this[Qg]=void 0,!t&&!(t=this.get))throw Error("Unknown getter");hDe(this,t)}},hDe=(e,t)=>MQ(e,Qy,t);function lp(e,t){if(e[Qy]){let o=e[Qg];o||MQ(e,Qg,o=new Set),o.has(t)||(o.add(t),e.observerAdded&&e.observerAdded(o.size,t))}return t}function cp(e,t){let o=e[Qg];if(o&&o.has(t)){let r=o.size-1;r?o.delete(t):e[Qg]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var MQ=(e,t,o)=>Object.defineProperty(e,t,{value:o,writable:!0,configurable:!0}),XB=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,bDe=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,RQ=new RegExp(`(${XB.source})(%|[a-z]+)`,"i"),yDe=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,oP=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,NQ=e=>{let[t,o]=vDe(e);if(!t||vz())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&&oP.test(o))return NQ(o);if(o)return o}return e},vDe=e=>{let t=oP.exec(e);if(!t)return[,];let[,o,r]=t;return[o,r]},hz,SDe=(e,t,o,r,n)=>`rgba(${Math.round(t)}, ${Math.round(o)}, ${Math.round(r)}, ${n})`,rP=e=>{hz||(hz=sp?new RegExp(`(${Object.keys(sp).join("|")})(?!\\w)`,"g"):/^\b$/);let t=e.output.map(i=>An(i).replace(oP,NQ).replace(bDe,TQ).replace(hz,TQ)),o=t.map(i=>i.match(XB).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=>ap(yz({},e,{output:i})));return i=>{var s;let a=!RQ.test(t[0])&&((s=t.find(u=>RQ.test(u)))==null?void 0:s.replace(XB,"")),l=0;return t[0].replace(XB,()=>`${n[l++](i)}${a||""}`).replace(yDe,SDe)}},DQ="react-spring: ",VQ=e=>{let t=e,o=!1;if(typeof t!="function")throw new TypeError(`${DQ}once requires a function parameter`);return(...r)=>{o||(t(...r),o=!0)}},kDe=VQ(console.warn);function FQ(){kDe(`${DQ}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var xct=VQ(console.warn);function rv(e){return Ce.str(e)&&(e[0]=="#"||/\d/.test(e)||!vz()&&oP.test(e)||e in(sp||{}))}var _w=vz()?xa.useEffect:xa.useLayoutEffect,_De=()=>{let e=(0,xa.useRef)(!1);return _w(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function xz(){let e=(0,xa.useState)()[1],t=_De();return()=>{t.current&&e(Math.random())}}function zQ(e,t){let[o]=(0,xa.useState)(()=>({inputs:t,result:e()})),r=(0,xa.useRef)(),n=r.current,i=n;return i?t&&i.inputs&&xDe(t,i.inputs)||(i={inputs:t,result:e()}):i=o,(0,xa.useEffect)(()=>{r.current=i,n==o&&(o.inputs=o.result=void 0)},[i]),i.result}function xDe(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 wz=e=>(0,xa.useEffect)(e,wDe),wDe=[];var Ow=c(le()),Aw=c(le());var GQ=c(le()),od=c(le()),xw=Symbol.for("Animated:node"),CDe=e=>!!e&&e[xw]===e,Bl=e=>e&&e[xw],aP=(e,t)=>BQ(e,xw,t),ww=e=>e&&e[xw]&&e[xw].getPayload(),nP=class{constructor(){this.payload=void 0,aP(this,this)}getPayload(){return this.payload||[]}},eh=class e extends nP{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,Ce.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 Ce.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,Ce.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,t&&(this.lastVelocity=null),this.v0=null)}},th=class e extends eh{constructor(t){super(0),this._string=null,this._toString=void 0,this._toString=ap({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(Ce.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=ap({output:[this.getValue(),t]})),this._value=0,super.reset()}},iP={dependencies:null},oh=class extends nP{constructor(t){super(),this.source=t,this.setValue(t)}getValue(t){let o={};return wa(this.source,(r,n)=>{CDe(r)?o[n]=r.getValue(t):ki(r)?o[n]=An(r):t||(o[n]=r)}),o}setValue(t){this.source=t,this.payload=this._makePayload(t)}reset(){this.payload&&vo(this.payload,t=>t.reset())}_makePayload(t){if(t){let o=new Set;return wa(t,this._addToPayload,o),Array.from(o)}}_addToPayload(t){iP.dependencies&&ki(t)&&iP.dependencies.add(t);let o=ww(t);o&&vo(o,r=>this.add(r))}},Cz=class e extends oh{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(EDe)),!0)}};function EDe(e){return(rv(e)?th:eh).create(e)}function lP(e){let t=Bl(e);return t?t.constructor:Ce.arr(e)?Cz:rv(e)?th:eh}function sP(){return sP=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},sP.apply(this,arguments)}var jQ=(e,t)=>{let o=!Ce.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,od.forwardRef)((r,n)=>{let i=(0,od.useRef)(null),s=o&&(0,od.useCallback)(m=>{i.current=RDe(n,m)},[n]),[a,l]=TDe(r,t),u=xz(),d=()=>{let m=i.current;if(o&&!m)return;(m?t.applyAnimatedValues(m,a.getValue(!0)):!1)===!1&&u()},f=new Ez(d,l),p=(0,od.useRef)();_w(()=>(p.current=f,vo(l,m=>lp(m,f)),()=>{p.current&&(vo(p.current.deps,m=>cp(m,p.current)),rt.cancel(p.current.update))})),(0,od.useEffect)(d,[]),wz(()=>()=>{let m=p.current;vo(m.deps,h=>cp(h,m))});let g=t.getComponentProps(a.getValue());return GQ.createElement(e,sP({},g,{ref:s}))})},Ez=class{constructor(t,o){this.update=t,this.deps=o}eventObserved(t){t.type=="change"&&rt.write(this.update)}};function TDe(e,t){let o=new Set;return iP.dependencies=o,e.style&&(e=sP({},e,{style:t.createAnimatedStyle(e.style)})),e=new oh(e),iP.dependencies=null,[e,o]}function RDe(e,t){return e&&(Ce.fun(e)?e(t):e.current=t),t}var HQ=Symbol.for("AnimatedComponent"),WQ=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:o=n=>new oh(n),getComponentProps:r=n=>n}={})=>{let n={applyAnimatedValues:t,createAnimatedStyle:o,getComponentProps:r},i=s=>{let a=UQ(s)||"Anonymous";return Ce.str(s)?s=i[s]||(i[s]=jQ(s,n)):s=s[HQ]||(s[HQ]=jQ(s,n)),s.displayName=`Animated(${a})`,s};return wa(e,(s,a)=>{Ce.arr(e)&&(a=UQ(s)),i[a]=i(s)}),{animated:i}},UQ=e=>Ce.str(e)?e:e&&Ce.str(e.displayName)?e.displayName:Ce.fun(e)&&e.name||null;function _i(){return _i=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},_i.apply(this,arguments)}function rh(e,...t){return Ce.fun(e)?e(...t):e}var Rw=(e,t)=>e===!0||!!(t&&e&&(Ce.fun(e)?e(t):os(e).includes(t))),rJ=(e,t)=>Ce.obj(e)?t&&e[t]:e,nJ=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,BDe=e=>e,iJ=(e,t=BDe)=>{let o=PDe;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);Ce.und(i)||(r[n]=i)}return r},PDe=["config","onProps","onStart","onChange","onPause","onResume","onRest"],IDe={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 ODe(e){let t={},o=0;if(wa(e,(r,n)=>{IDe[n]||(t[n]=r,o++)}),o)return t}function sJ(e){let t=ODe(e);if(t){let o={to:t};return wa(e,(r,n)=>n in t||(o[n]=r)),o}return _i({},e)}function Bw(e){return e=An(e),Ce.arr(e)?e.map(Bw):rv(e)?zs.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function Bz(e){return Ce.fun(e)||Ce.arr(e)&&Ce.obj(e[0])}var ADe={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}},dP=1.70158,cP=dP*1.525,$Q=dP+1,KQ=2*Math.PI/3,YQ=2*Math.PI/4.5,uP=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,LDe={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=>$Q*e*e*e-dP*e*e,easeOutBack:e=>1+$Q*Math.pow(e-1,3)+dP*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((cP+1)*2*e-cP)/2:(Math.pow(2*e-2,2)*((cP+1)*(e*2-2)+cP)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*KQ),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*KQ)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*YQ))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*YQ)/2+1,easeInBounce:e=>1-uP(1-e),easeOutBounce:uP,easeInOutBounce:e=>e<.5?(1-uP(1-2*e))/2:(1+uP(2*e-1))/2},Pz=_i({},ADe.default,{mass:1,damping:1,easing:LDe.linear,clamp:!1}),Iz=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,Pz)}};function MDe(e,t,o){o&&(o=_i({},o),qQ(o,t),t=_i({},o,t)),qQ(e,t),Object.assign(e,t);for(let s in Pz)e[s]==null&&(e[s]=Pz[s]);let{mass:r,frequency:n,damping:i}=e;return Ce.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 qQ(e,t){if(!Ce.und(t.decay))e.duration=void 0;else{let o=!Ce.und(t.tension)||!Ce.und(t.friction);(o||!Ce.und(t.frequency)||!Ce.und(t.damping)||!Ce.und(t.mass))&&(e.duration=void 0,e.decay=void 0),o&&(e.frequency=void 0)}}var ZQ=[],Oz=class{constructor(){this.changed=!1,this.values=ZQ,this.toValues=null,this.fromValues=ZQ,this.to=void 0,this.from=void 0,this.config=new Iz,this.immediate=!1}};function aJ(e,{key:t,props:o,defaultProps:r,state:n,actions:i}){return new Promise((s,a)=>{var l;let u,d,f=Rw((l=o.cancel)!=null?l:r?.cancel,t);if(f)m();else{Ce.und(o.pause)||(n.paused=Rw(o.pause,t));let h=r?.pause;h!==!0&&(h=n.paused||Rw(h,t)),u=rh(o.delay||0,t),h?(n.resumeQueue.add(g),i.pause()):(i.resume(),g())}function p(){n.resumeQueue.add(g),n.timeouts.delete(d),d.cancel(),u=d.time-rt.now()}function g(){u>0&&!zs.skipAnimation?(n.delayed=!0,d=rt.setTimeout(m,u),n.pauseQueue.add(p),n.timeouts.add(d)):m()}function m(){n.delayed&&(n.delayed=!1),n.pauseQueue.delete(p),n.timeouts.delete(d),e<=(n.cancelId||0)&&(f=!0);try{i.start(_i({},o,{callId:e,cancel:f}),s)}catch(h){a(h)}}})}var Fz=(e,t)=>t.length==1?t[0]:t.some(o=>o.cancelled)?nv(e.get()):t.every(o=>o.noop)?lJ(e.get()):Pl(e.get(),t.every(o=>o.finished)),lJ=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),Pl=(e,t,o=!1)=>({value:e,finished:t,cancelled:o}),nv=e=>({value:e,cancelled:!0,finished:!1});function cJ(e,t,o,r){let{callId:n,parentId:i,onRest:s}=t,{asyncTo:a,promise:l}=o;return!i&&e===a&&!t.reset?l:o.promise=(async()=>{o.asyncId=n,o.asyncTo=e;let u=iJ(t,(b,v)=>v==="onRest"?void 0:b),d,f,p=new Promise((b,v)=>(d=b,f=v)),g=b=>{let v=n<=(o.cancelId||0)&&nv(r)||n!==o.asyncId&&Pl(r,!1);if(v)throw b.result=v,f(b),b},m=(b,v)=>{let y=new fP,k=new pP;return(async()=>{if(zs.skipAnimation)throw Pw(o),k.result=Pl(r,!1),f(k),k;g(y);let S=Ce.obj(b)?_i({},b):_i({},v,{to:b});S.parentId=n,wa(u,(x,w)=>{Ce.und(S[w])&&(S[w]=x)});let _=await r.start(S);return g(y),o.paused&&await new Promise(x=>{o.resumeQueue.add(x)}),_})()},h;if(zs.skipAnimation)return Pw(o),Pl(r,!1);try{let b;Ce.arr(e)?b=(async v=>{for(let y of v)await m(y)})(e):b=Promise.resolve(e(m,r.stop.bind(r))),await Promise.all([b.then(d),p]),h=Pl(r.get(),!0,!1)}catch(b){if(b instanceof fP)h=b.result;else if(b instanceof pP)h=b.result;else throw b}finally{n==o.asyncId&&(o.asyncId=i,o.asyncTo=i?a:void 0,o.promise=i?l:void 0)}return Ce.fun(s)&&rt.batchedUpdates(()=>{s(h,r,r.item)}),h})()}function Pw(e,t){ev(e.timeouts,o=>o.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var fP=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}},pP=class extends Error{constructor(){super("SkipAnimationSignal"),this.result=void 0}},Az=e=>e instanceof Iw,NDe=1,Iw=class extends Jy{constructor(...t){super(...t),this.id=NDe++,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=Bl(this);return t&&t.getValue()}to(...t){return zs.to(this,t)}interpolate(...t){return FQ(),zs.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){Jg(this,{type:"change",parent:this,value:t,idle:o})}_onPriorityChange(t){this.idle||ov.sort(this),Jg(this,{type:"priority",parent:this,priority:t})}},nh=Symbol.for("SpringPhase"),uJ=1,Lz=2,Mz=4,Tz=e=>(e[nh]&uJ)>0,up=e=>(e[nh]&Lz)>0,Cw=e=>(e[nh]&Mz)>0,XQ=(e,t)=>t?e[nh]|=Lz|uJ:e[nh]&=~Lz,QQ=(e,t)=>t?e[nh]|=Mz:e[nh]&=~Mz,Nz=class extends Iw{constructor(t,o){if(super(),this.key=void 0,this.animation=new Oz,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,!Ce.und(t)||!Ce.und(o)){let r=Ce.obj(t)?_i({},t):_i({},o,{from:t});Ce.und(r.default)&&(r.default=!0),this.start(r)}}get idle(){return!(up(this)||this._state.asyncTo)||Cw(this)}get goal(){return An(this.animation.to)}get velocity(){let t=Bl(this);return t instanceof eh?t.lastVelocity||0:t.getPayload().map(o=>o.lastVelocity||0)}get hasAnimated(){return Tz(this)}get isAnimating(){return up(this)}get isPaused(){return Cw(this)}get isDelayed(){return this._state.delayed}advance(t){let o=!0,r=!1,n=this.animation,{config:i,toValues:s}=n,a=ww(n.to);!a&&ki(n.to)&&(s=os(An(n.to))),n.values.forEach((d,f)=>{if(d.done)return;let p=d.constructor==th?1:a?a[f].lastPosition:s[f],g=n.immediate,m=p;if(!g){if(m=d.lastPosition,i.tension<=0){d.done=!0;return}let h=d.elapsedTime+=t,b=n.fromValues[f],v=d.v0!=null?d.v0:d.v0=Ce.arr(i.velocity)?i.velocity[f]:i.velocity,y,k=i.precision||(b==p?.005:Math.min(1,Math.abs(p-b)*.001));if(Ce.und(i.duration))if(i.decay){let S=i.decay===!0?.998:i.decay,_=Math.exp(-(1-S)*h);m=b+v/(1-S)*(1-_),g=Math.abs(d.lastPosition-m)<=k,y=v*_}else{y=d.lastVelocity==null?v:d.lastVelocity;let S=i.restVelocity||k/10,_=i.clamp?0:i.bounce,x=!Ce.und(_),w=b==p?d.v0>0:b<p,T,B=!1,R=1,A=Math.ceil(t/R);for(let O=0;O<A&&(T=Math.abs(y)>S,!(!T&&(g=Math.abs(p-m)<=k,g)));++O){x&&(B=m==p||m>p==w,B&&(y=-y*_,m=p));let P=-i.tension*1e-6*(m-p),L=-i.friction*.001*y,M=(P+L)/i.mass;y=y+M*R,m=m+y*R}}else{let S=1;i.duration>0&&(this._memoizedDuration!==i.duration&&(this._memoizedDuration=i.duration,d.durationProgress>0&&(d.elapsedTime=i.duration*d.durationProgress,h=d.elapsedTime+=t)),S=(i.progress||0)+h/this._memoizedDuration,S=S>1?1:S<0?0:S,d.durationProgress=S),m=b+i.easing(S)*(p-b),y=(m-d.lastPosition)/t,g=S==1}d.lastVelocity=y,Number.isNaN(m)&&(console.warn("Got NaN while animating:",this),g=!0)}a&&!a[f].done&&(g=!1),g?d.done=!0:o=!1,d.setValue(m,i.round)&&(r=!0)});let l=Bl(this),u=l.getValue();if(o){let d=An(n.to);(u!==d||r)&&!i.decay?(l.setValue(d),this._onChange(d)):r&&i.decay&&this._onChange(u),this._stop()}else r&&this._onChange(u)}set(t){return rt.batchedUpdates(()=>{this._stop(),this._focus(t),this._set(t)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(up(this)){let{to:t,config:o}=this.animation;rt.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 Ce.und(t)?(r=this.queue||[],this.queue=[]):r=[Ce.obj(t)?t:_i({},o,{to:t})],Promise.all(r.map(n=>this._update(n))).then(n=>Fz(this,n))}stop(t){let{to:o}=this.animation;return this._focus(this.get()),Pw(this._state,t&&this._lastCallId),rt.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=Ce.obj(r)?r[o]:r,(r==null||Bz(r))&&(r=void 0),n=Ce.obj(n)?n[o]:n,n==null&&(n=void 0);let i={to:r,from:n};return Tz(this)||(t.reverse&&([r,n]=[n,r]),n=An(n),Ce.und(n)?Bl(this)||this._set(r):this._set(n)),i}_update(t,o){let r=_i({},t),{key:n,defaultProps:i}=this;r.default&&Object.assign(i,iJ(r,(l,u)=>/^on/.test(u)?rJ(l,n):l)),eJ(this,r,"onProps"),Tw(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 aJ(++this._lastCallId,{key:n,props:r,defaultProps:i,state:a,actions:{pause:()=>{Cw(this)||(QQ(this,!0),tv(a.pauseQueue),Tw(this,"onPause",Pl(this,Ew(this,this.animation.to)),this))},resume:()=>{Cw(this)&&(QQ(this,!1),up(this)&&this._resume(),tv(a.resumeQueue),Tw(this,"onResume",Pl(this,Ew(this,this.animation.to)),this))},start:this._merge.bind(this,s)}}).then(l=>{if(r.loop&&l.finished&&!(o&&l.noop)){let u=dJ(r);if(u)return this._update(u,!0)}return l})}_merge(t,o,r){if(o.cancel)return this.stop(!0),r(nv(this));let n=!Ce.und(t.to),i=!Ce.und(t.from);if(n||i)if(o.callId>this._lastToId)this._lastToId=o.callId;else return r(nv(this));let{key:s,defaultProps:a,animation:l}=this,{to:u,from:d}=l,{to:f=u,from:p=d}=t;i&&!n&&(!o.default||Ce.und(f))&&(f=p),o.reverse&&([f,p]=[p,f]);let g=!Mc(p,d);g&&(l.from=p),p=An(p);let m=!Mc(f,u);m&&this._focus(f);let h=Bz(o.to),{config:b}=l,{decay:v,velocity:y}=b;(n||i)&&(b.velocity=0),o.config&&!h&&MDe(b,rh(o.config,s),o.config!==a.config?rh(a.config,s):void 0);let k=Bl(this);if(!k||Ce.und(f))return r(Pl(this,!0));let S=Ce.und(o.reset)?i&&!o.default:!Ce.und(p)&&Rw(o.reset,s),_=S?p:this.get(),x=Bw(f),w=Ce.num(x)||Ce.arr(x)||rv(x),T=!h&&(!w||Rw(a.immediate||o.immediate,s));if(m){let O=lP(f);if(O!==k.constructor)if(T)k=this._set(x);else throw Error(`Cannot animate between ${k.constructor.name} and ${O.name}, as the "to" prop suggests`)}let B=k.constructor,R=ki(f),A=!1;if(!R){let O=S||!Tz(this)&&g;(m||O)&&(A=Mc(Bw(_),x),R=!A),(!Mc(l.immediate,T)&&!T||!Mc(b.decay,v)||!Mc(b.velocity,y))&&(R=!0)}if(A&&up(this)&&(l.changed&&!S?R=!0:R||this._stop(u)),!h&&((R||ki(u))&&(l.values=k.getPayload(),l.toValues=ki(f)?null:B==th?[1]:os(x)),l.immediate!=T&&(l.immediate=T,!T&&!S&&this._set(u)),R)){let{onRest:O}=l;vo(DDe,L=>eJ(this,o,L));let P=Pl(this,Ew(this,u));tv(this._pendingCalls,P),this._pendingCalls.add(r),l.changed&&rt.batchedUpdates(()=>{l.changed=!S,O?.(P,this),S?rh(a.onRest,P):l.onStart==null||l.onStart(P,this)})}S&&this._set(_),h?r(cJ(o.to,o,this._state,this)):R?this._start():up(this)&&!m?this._pendingCalls.add(r):r(lJ(_))}_focus(t){let o=this.animation;t!==o.to&&(_z(this)&&this._detach(),o.to=t,_z(this)&&this._attach())}_attach(){let t=0,{to:o}=this.animation;ki(o)&&(lp(o,this),Az(o)&&(t=o.priority+1)),this.priority=t}_detach(){let{to:t}=this.animation;ki(t)&&cp(t,this)}_set(t,o=!0){let r=An(t);if(!Ce.und(r)){let n=Bl(this);if(!n||!Mc(r,n.getValue())){let i=lP(r);!n||n.constructor!=i?aP(this,i.create(r)):n.setValue(r),n&&rt.batchedUpdates(()=>{this._onChange(r,o)})}}return Bl(this)}_onStart(){let t=this.animation;t.changed||(t.changed=!0,Tw(this,"onStart",Pl(this,Ew(this,t.to)),this))}_onChange(t,o){o||(this._onStart(),rh(this.animation.onChange,t,this)),rh(this.defaultProps.onChange,t,this),super._onChange(t,o)}_start(){let t=this.animation;Bl(this).reset(An(t.to)),t.immediate||(t.fromValues=t.values.map(o=>o.lastPosition)),up(this)||(XQ(this,!0),Cw(this)||this._resume())}_resume(){zs.skipAnimation?this.finish():ov.start(this)}_stop(t,o){if(up(this)){XQ(this,!1);let r=this.animation;vo(r.values,i=>{i.done=!0}),r.toValues&&(r.onChange=r.onPause=r.onResume=void 0),Jg(this,{type:"idle",parent:this});let n=o?nv(this.get()):Pl(this.get(),Ew(this,t??r.to));tv(this._pendingCalls,n),r.changed&&(r.changed=!1,Tw(this,"onRest",n,this))}}};function Ew(e,t){let o=Bw(t),r=Bw(e.get());return Mc(r,o)}function dJ(e,t=e.loop,o=e.to){let r=rh(t);if(r){let n=r!==!0&&sJ(r),i=(n||e).reverse,s=!n||n.reset;return Dz(_i({},e,{loop:t,default:!1,pause:void 0,to:!i||Bz(o)?o:void 0,from:s?e.from:void 0,reset:s},n))}}function Dz(e){let{to:t,from:o}=e=sJ(e),r=new Set;return Ce.obj(t)&&JQ(t,r),Ce.obj(o)&&JQ(o,r),e.keys=r.size?Array.from(r):null,e}function JQ(e,t){wa(e,(o,r)=>o!=null&&t.add(r))}var DDe=["onStart","onRest","onChange","onPause","onResume"];function eJ(e,t,o){e.animation[o]=t[o]!==nJ(t,o)?rJ(t[o],e.key):void 0}function Tw(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 VDe=["onStart","onChange","onRest"],FDe=1,mP=class{constructor(t,o){this.id=FDe++,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(_i({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];Ce.und(r)||this.springs[o].set(r)}}update(t){return t&&this.queue.push(Dz(t)),this}start(t){let{queue:o}=this;return t?o=os(t).map(Dz):this.queue=[],this._flush?this._flush(this,o):(pJ(this,o),zDe(this,o))}stop(t,o){if(t!==!!t&&(o=t),o){let r=this.springs;vo(os(o),n=>r[n].stop(!!t))}else Pw(this._state,this._lastAsyncId),this.each(r=>r.stop(!!t));return this}pause(t){if(Ce.und(t))this.start({pause:!0});else{let o=this.springs;vo(os(t),r=>o[r].pause())}return this}resume(t){if(Ce.und(t))this.start({pause:!1});else{let o=this.springs;vo(os(t),r=>o[r].resume())}return this}each(t){wa(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,ev(t,([l,u])=>{u.value=this.get(),l(u,this,this._item)}));let s=!n&&this._started,a=i||s&&r.size?this.get():null;i&&o.size&&ev(o,([l,u])=>{u.value=a,l(u,this,this._item)}),s&&(this._started=!1,ev(r,([l,u])=>{u.value=a,l(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;rt.onFrame(this._onFrame)}};function zDe(e,t){return Promise.all(t.map(o=>fJ(e,o))).then(o=>Fz(e,o))}async function fJ(e,t,o){let{keys:r,to:n,from:i,loop:s,onRest:a,onResolve:l}=t,u=Ce.obj(t.default)&&t.default;s&&(t.loop=!1),n===!1&&(t.to=null),i===!1&&(t.from=null);let d=Ce.arr(n)||Ce.fun(n)?n:void 0;d?(t.to=void 0,t.onRest=void 0,u&&(u.onRest=void 0)):vo(VDe,h=>{let b=t[h];if(Ce.fun(b)){let v=e._events[h];t[h]=({finished:y,cancelled:k})=>{let S=v.get(b);S?(y||(S.finished=!1),k&&(S.cancelled=!0)):v.set(b,{value:null,finished:y||!1,cancelled:k||!1})},u&&(u[h]=t[h])}});let f=e._state;t.pause===!f.paused?(f.paused=t.pause,tv(t.pause?f.pauseQueue:f.resumeQueue)):f.paused&&(t.pause=!0);let p=(r||Object.keys(e.springs)).map(h=>e.springs[h].start(t)),g=t.cancel===!0||nJ(t,"cancel")===!0;(d||g&&f.asyncId)&&p.push(aJ(++e._lastAsyncId,{props:t,state:f,actions:{pause:eP,resume:eP,start(h,b){g?(Pw(f,e._lastAsyncId),b(nv(e))):(h.onRest=a,b(cJ(d,h,f,e)))}}})),f.paused&&await new Promise(h=>{f.resumeQueue.add(h)});let m=Fz(e,await Promise.all(p));if(s&&m.finished&&!(o&&m.noop)){let h=dJ(t,s,n);if(h)return pJ(e,[h]),fJ(e,h,!0)}return l&&rt.batchedUpdates(()=>l(m,e,e.item)),m}function jDe(e,t){let o=new Nz;return o.key=e,t&&lp(o,t),o}function HDe(e,t,o){t.keys&&vo(t.keys,r=>{(e[r]||(e[r]=o(r)))._prepareNode(t)})}function pJ(e,t){vo(t,o=>{HDe(e.springs,o,r=>jDe(r,e))})}function UDe(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 GDe=["children"],zz=e=>{let{children:t}=e,o=UDe(e,GDe),r=(0,Aw.useContext)(gP),n=o.pause||!!r.pause,i=o.immediate||!!r.immediate;o=zQ(()=>({pause:n,immediate:i}),[n,i]);let{Provider:s}=gP;return Ow.createElement(s,{value:o},t)},gP=WDe(zz,{});zz.Provider=gP.Provider;zz.Consumer=gP.Consumer;function WDe(e,t){return Object.assign(e,Ow.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var tJ;(function(e){e.MOUNT="mount",e.ENTER="enter",e.UPDATE="update",e.LEAVE="leave"})(tJ||(tJ={}));var Vz=class extends Iw{constructor(t,o){super(),this.key=void 0,this.idle=!0,this.calc=void 0,this._active=new Set,this.source=t,this.calc=ap(...o);let r=this._get(),n=lP(r);aP(this,n.create(r))}advance(t){let o=this._get(),r=this.get();Mc(o,r)||(Bl(this).setValue(o),this._onChange(o,this.idle)),!this.idle&&oJ(this._active)&&Rz(this)}_get(){let t=Ce.arr(this.source)?this.source.map(An):os(An(this.source));return this.calc(...t)}_start(){this.idle&&!oJ(this._active)&&(this.idle=!1,vo(ww(this),t=>{t.done=!1}),zs.skipAnimation?(rt.batchedUpdates(()=>this.advance()),Rz(this)):ov.start(this))}_attach(){let t=1;vo(os(this.source),o=>{ki(o)&&lp(o,this),Az(o)&&(o.idle||this._active.add(o),t=Math.max(t,o.priority+1))}),this.priority=t,this._start()}_detach(){vo(os(this.source),t=>{ki(t)&&cp(t,this)}),this._active.clear(),Rz(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=os(this.source).reduce((o,r)=>Math.max(o,(Az(r)?r.priority:0)+1),0))}};function $De(e){return e.idle!==!1}function oJ(e){return!e.size||Array.from(e).every($De)}function Rz(e){e.idle||(e.idle=!0,vo(ww(e),t=>{t.done=!0}),Jg(e,{type:"idle",parent:e}))}zs.assign({createStringInterpolator:rP,to:(e,t)=>new Vz(e,t)});var Act=ov.advance;var hJ=c(rd());function Gz(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 KDe=["style","children","scrollTop","scrollLeft"],bJ=/^--/;function YDe(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!bJ.test(e)&&!(Lw.hasOwnProperty(e)&&Lw[e])?t+"px":(""+t).trim()}var gJ={};function qDe(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,l=Gz(r,KDe),u=Object.values(l),d=Object.keys(l).map(f=>o||e.hasAttribute(f)?f:gJ[f]||(gJ[f]=f.replace(/([A-Z])/g,p=>"-"+p.toLowerCase())));i!==void 0&&(e.textContent=i);for(let f in n)if(n.hasOwnProperty(f)){let p=YDe(f,n[f]);bJ.test(f)?e.style.setProperty(f,p):e.style[f]=p}d.forEach((f,p)=>{e.setAttribute(f,u[p])}),s!==void 0&&(e.scrollTop=s),a!==void 0&&(e.scrollLeft=a)}var Lw={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},ZDe=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),XDe=["Webkit","Ms","Moz","O"];Lw=Object.keys(Lw).reduce((e,t)=>(XDe.forEach(o=>e[ZDe(o,t)]=e[t]),e),Lw);var QDe=["x","y","z"],JDe=/^(matrix|translate|scale|rotate|skew)/,eVe=/^(translate)/,tVe=/^(rotate|skew)/,jz=(e,t)=>Ce.num(e)&&e!==0?e+t:e,hP=(e,t)=>Ce.arr(e)?e.every(o=>hP(o,t)):Ce.num(e)?e===t:parseFloat(e)===t,Hz=class extends oh{constructor(t){let{x:o,y:r,z:n}=t,i=Gz(t,QDe),s=[],a=[];(o||r||n)&&(s.push([o||0,r||0,n||0]),a.push(l=>[`translate3d(${l.map(u=>jz(u,"px")).join(",")})`,hP(l,0)])),wa(i,(l,u)=>{if(u==="transform")s.push([l||""]),a.push(d=>[d,d===""]);else if(JDe.test(u)){if(delete i[u],Ce.und(l))return;let d=eVe.test(u)?"px":tVe.test(u)?"deg":"";s.push(os(l)),a.push(u==="rotate3d"?([f,p,g,m])=>[`rotate3d(${f},${p},${g},${jz(m,d)})`,hP(m,0)]:f=>[`${u}(${f.map(p=>jz(p,d)).join(",")})`,hP(f,u.startsWith("scale")?1:0)])}}),s.length&&(i.transform=new Uz(s,a)),super(i)}},Uz=class extends Jy{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 vo(this.inputs,(r,n)=>{let i=An(r[0]),[s,a]=this.transforms[n](Ce.arr(i)?i:r.map(An));t+=" "+s,o=o&&a}),o?"none":t}observerAdded(t){t==1&&vo(this.inputs,o=>vo(o,r=>ki(r)&&lp(r,this)))}observerRemoved(t){t==0&&vo(this.inputs,o=>vo(o,r=>ki(r)&&cp(r,this)))}eventObserved(t){t.type=="change"&&(this._value=null),Jg(this,t)}},oVe=["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"],rVe=["scrollTop","scrollLeft"];zs.assign({batchedUpdates:hJ.unstable_batchedUpdates,createStringInterpolator:rP,colors:LQ});var nVe=WQ(oVe,{applyAnimatedValues:qDe,createAnimatedStyle:e=>new Hz(e),getComponentProps:e=>Gz(e,rVe)}),yJ=nVe.animated;var iv=c(F(),1),SJ=c(Et(),1),kJ=c(Z(),1);var iVe=200;function vJ(e){return{top:e.offsetTop,left:e.offsetLeft}}function sVe({triggerAnimationOnChange:e,clientId:t}){let o=(0,iv.useRef)(),{isTyping:r,getGlobalBlockCount:n,isBlockSelected:i,isFirstMultiSelectedBlock:s,isBlockMultiSelected:a,isAncestorMultiSelected:l,isDraggingBlocks:u}=(0,kJ.useSelect)(C),{previous:d,prevRect:f}=(0,iv.useMemo)(()=>({previous:o.current&&vJ(o.current),prevRect:o.current&&o.current.getBoundingClientRect()}),[e]);return(0,iv.useLayoutEffect)(()=>{if(!d||!o.current)return;let p=(0,SJ.getScrollContainer)(o.current),g=i(t),m=g||s(t),h=u();function b(){if(!h&&m&&f){let B=o.current.getBoundingClientRect().top-f.top;B&&(p.scrollTop+=B)}}if(window.matchMedia("(prefers-reduced-motion: reduce)").matches||r()||n()>iVe){b();return}let y=g||a(t)||l(t);if(y&&h)return;let k=y?"1":"",S=new mP({x:0,y:0,config:{mass:5,tension:2e3,friction:200},onChange({value:T}){if(!o.current)return;let{x:B,y:R}=T;B=Math.round(B),R=Math.round(R);let A=B===0&&R===0;o.current.style.transformOrigin="center center",o.current.style.transform=A?null:`translate3d(${B}px,${R}px,0)`,o.current.style.zIndex=k,b()}});o.current.style.transform=void 0;let _=vJ(o.current),x=Math.round(d.left-_.left),w=Math.round(d.top-_.top);return S.start({x:0,y:0,from:{x,y:w}}),()=>{S.stop(),S.set({x:0,y:0})}},[d,f,t,r,n,i,s,a,l,u]),o}var bP=sVe;var vP=c(F(),1),nd=c(Et(),1),xJ=c(Z(),1);var yP=".block-editor-block-list__block",aVe=".block-list-appender",lVe=".block-editor-button-block-appender";function _J(e,t){return e.closest(yP)===t.closest(yP)}function Nc(e,t){return t.closest([yP,aVe,lVe].join(","))===e}function Dc(e,t){let{anchorNode:o,focusNode:r}=e;if(!o||!r)return;let i=(o.nodeType===o.ELEMENT_NODE?o:o.parentElement)?.closest('[contenteditable="true"]');if(!(!i||i===t||!i.contains(r)))return i}function Yr(e){for(;e&&e.nodeType!==e.ELEMENT_NODE;)e=e.parentNode;if(!e)return;let o=e.closest(yP);if(o)return o.id.slice(6)}function Wz(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 cVe(e){let t=e.ownerDocument.defaultView;if(!t||e.hasAttribute("data-visually-hidden"))return!1;let o=e.getBoundingClientRect();if(o.width===0||o.height===0)return!1;if(e.checkVisibility)return e.checkVisibility?.({opacityProperty:!0,contentVisibilityAuto:!0,visibilityProperty:!0});let r=t.getComputedStyle(e);return!(r.display==="none"||r.visibility==="hidden"||r.opacity==="0")}function uVe(e){let t=window.getComputedStyle(e);return t.overflowX==="auto"||t.overflowX==="scroll"||t.overflowY==="auto"||t.overflowY==="scroll"}var dVe=["core/navigation"];function sv(e){let t=e.ownerDocument.defaultView;if(!t)return new window.DOMRectReadOnly;let o=e.getBoundingClientRect(),r=e.getAttribute("data-type");if(r&&dVe.includes(r)){let s=[e],a;for(;a=s.pop();)if(!uVe(a)){for(let l of a.children)if(cVe(l)){let u=l.getBoundingClientRect();o=Wz(o,u),s.push(l)}}}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 wJ({clientId:e,initialPosition:t}){let o=(0,vP.useRef)(),{isBlockSelected:r,isMultiSelecting:n,isZoomOut:i,getSelectionStart:s}=U((0,xJ.useSelect)(C));return(0,vP.useEffect)(()=>{if(!r(e)||n()||i()||t==null||!o.current)return;let{ownerDocument:a}=o.current;if(Nc(o.current,a.activeElement))return;let l=nd.focus.tabbable.find(o.current).filter(v=>(0,nd.isTextField)(v)),u=t===-1,d=l[u?l.length-1:0]||o.current;if(!Nc(o.current,d)){o.current.focus();return}if(!o.current.getAttribute("contenteditable")){let v=nd.focus.tabbable.findNext(o.current);if(v&&Nc(o.current,v)&&(0,nd.isFormElement)(v)){v.focus();return}}let{activeElement:f}=a,p=a.defaultView.getSelection(),{clientId:g,offset:m}=s();f?.isContentEditable&&f.contains(d)&&p.anchorNode&&d.contains(p.anchorNode)&&(t===0||m!==void 0&&g===e)||(0,nd.placeCaretAtHorizontalEdge)(d,u)},[t,e]),o}var SP=c(fe(),1);var{subscribeDelegatedListener:CJ}=U(SP.privateApis);function EJ({isEnabled:e=!0}={}){return(0,SP.useRefEffect)(t=>{if(!e)return;function o(i){i.defaultPrevented||(i.preventDefault(),t.classList.toggle("is-hovered",i.type==="mouseover"))}let r=CJ(t,"mouseout",o),n=CJ(t,"mouseover",o);return()=>{r(),n(),t.classList.remove("is-hovered")}},[e])}var xP=c(Z(),1),wP=c(fe(),1);var RJ=c(G(),1),BJ=c(Et(),1),Ca=c(ce(),1);var TJ=c(Et(),1);function fVe(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 pVe(e){let t="<meta charset='utf-8'>";return e.startsWith(t)?e.slice(t.length):e}function av({clipboardData:e}){let t="",o="";try{t=e.getData("text/plain"),o=e.getData("text/html")}catch{return}o=fVe(o),o=pVe(o);let r=(0,TJ.getFilesFromDataTransfer)(e);return r.length&&!mVe(r,o)?{files:r}:{html:o,plainText:t,files:[]}}function mVe(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 $z=Symbol("requiresWrapperOnCopy");function kP(e,t,o){let r=t,[n]=t;if(n&&o.select(Ca.store).getBlockType(n.name)[$z]){let{getBlockRootClientId:a,getBlockName:l,getBlockAttributes:u}=o.select(C),d=a(n.clientId),f=l(d);f&&(r=(0,Ca.createBlock)(f,u(d),r))}let i=(0,Ca.serialize)(r);e.clipboardData.setData("text/plain",gVe(i)),e.clipboardData.setData("text/html",i)}function PJ(e,t){let{plainText:o,html:r,files:n}=av(e),i=[];if(n.length){let s=(0,Ca.getBlockTransforms)("from");i=n.reduce((a,l)=>{let u=(0,Ca.findTransform)(s,d=>d.type==="files"&&d.isMatch([l]));return u&&a.push(u.transform([l])),a},[]).flat()}else i=(0,Ca.pasteHandler)({HTML:r,plainText:o,mode:"BLOCKS",canUserUseUnfilteredHTML:t});return i}function gVe(e){return e=e.replace(/<br>/g,`
`),(0,BJ.__unstableStripHTML)(e).trim().replace(/\n\n+/g,`
`)}var IJ=!1;function _P(e){IJ=e}function OJ(){return IJ}function er(e,t,{focus:o=!0}={}){return e.contentEditable===String(t)?t:(e.contentEditable=t,t?e.isContentEditable?(e.setAttribute("role","textbox"),e.setAttribute("aria-multiline","true"),e.setAttribute("aria-label",(0,RJ.__)("Editor canvas")),o&&e.focus(),!0):(e.removeAttribute("contenteditable"),!1):(e.removeAttribute("role"),e.removeAttribute("aria-multiline"),e.removeAttribute("aria-label"),!1))}var{subscribeDelegatedListener:hVe}=U(wP.privateApis);function AJ(e){let{isBlockSelected:t,isBlockMultiSelected:o}=(0,xP.useSelect)(C),{selectBlock:r,selectionChange:n}=(0,xP.useDispatch)(C);return(0,wP.useRefEffect)(i=>{function s(a){if(t(e)){a.target.isContentEditable||n(e);return}if(!OJ()&&!o(e)&&Nc(i,a.target)){if(a.target.isContentEditable){r(e,null);return}r(e)}}return hVe(i,"focusin",s)},[t,r])}var lv=c(ce(),1),MJ=c(Et(),1),dp=c(oo(),1),CP=c(Z(),1),NJ=c(fe(),1);function LJ(e){return!e||e==="transparent"||e==="rgba(0, 0, 0, 0)"}function DJ({clientId:e,isSelected:t}){let{getBlockRootClientId:o,isZoomOut:r,hasMultiSelection:n,isSectionBlock:i,editedContentOnlySection:s,getBlock:a}=U((0,CP.useSelect)(C)),{insertAfterBlock:l,removeBlock:u,resetZoomLevel:d,startDraggingBlocks:f,stopDraggingBlocks:p,editContentOnlySection:g}=U((0,CP.useDispatch)(C));return(0,NJ.useRefEffect)(m=>{if(!t)return;function h(y){let{keyCode:k,target:S}=y;k!==dp.ENTER&&k!==dp.BACKSPACE&&k!==dp.DELETE||S!==m||(0,MJ.isTextField)(S)||(y.preventDefault(),k===dp.ENTER&&r()?d():k===dp.ENTER?l(e):u(e))}function b(y){if(m!==y.target||m.isContentEditable||m.ownerDocument.activeElement!==m||n()){y.preventDefault();return}let k=JSON.stringify({type:"block",srcClientIds:[e],srcRootClientId:o(e)});y.dataTransfer.effectAllowed="move",y.dataTransfer.clearData(),y.dataTransfer.setData("wp-blocks",k);let{ownerDocument:S}=m,{defaultView:_}=S;_.getSelection().removeAllRanges();let w=S.createElement("div");w.style.width="1px",w.style.height="1px",w.style.position="fixed",w.style.visibility="hidden",S.body.appendChild(w),y.dataTransfer.setDragImage(w,0,0);let T=m.getBoundingClientRect(),B=m.id,R=m.cloneNode();R.style.display="none",m.id=null,m.after(R);let A=1;{let q=m;for(;q=q.parentElement;){let{scale:K}=_.getComputedStyle(q);if(K&&K!=="none"){A=parseFloat(K);break}}}let O=1/A,P={};for(let q of["transform","transformOrigin","transition","zIndex","position","top","left","pointerEvents","opacity","backgroundColor"])P[q]=m.style[q];let L=_.scrollY,M=_.scrollX,z=y.clientX,V=y.clientY;m.style.position="relative",m.style.top="0px",m.style.left="0px";let I=y.clientX-T.left,N=y.clientY-T.top,D=T.height>200?200/T.height:1;if(m.style.zIndex="1000",m.style.transformOrigin=`${I*O}px ${N*O}px`,m.style.transition="transform 0.2s ease-out",m.style.transform=`scale(${D})`,m.style.opacity="0.9",LJ(_.getComputedStyle(m).backgroundColor)){let q="transparent",K=m;for(;K=K.parentElement;){let{backgroundColor:Q}=_.getComputedStyle(K);if(!LJ(Q)){q=Q;break}}m.style.backgroundColor=q}let j=!1,Y=z,X=V;function ee(q){q.clientX===Y&&q.clientY===X||(Y=q.clientX,X=q.clientY,J())}function J(){j||(j=!0,m.style.pointerEvents="none");let q=X-V,K=Y-z,Q=_.scrollY,re=_.scrollX,se=Q-L,te=re-M,ne=q+se,de=K+te;m.style.top=`${ne*O}px`,m.style.left=`${de*O}px`}function $(){S.removeEventListener("dragover",ee),S.removeEventListener("dragend",$),S.removeEventListener("drop",$),S.removeEventListener("scroll",J);for(let[q,K]of Object.entries(P))m.style[q]=K;R.remove(),m.id=B,w.remove(),p(),document.body.classList.remove("is-dragging-components-draggable"),S.documentElement.classList.remove("is-dragging")}S.addEventListener("dragover",ee),S.addEventListener("dragend",$),S.addEventListener("drop",$),S.addEventListener("scroll",J),f([e]),document.body.classList.add("is-dragging-components-draggable"),S.documentElement.classList.add("is-dragging")}m.addEventListener("keydown",h),m.addEventListener("dragstart",b);function v(y){let k=i(e),S=a(e),_=(0,lv.isReusableBlock)(S),x=(0,lv.isTemplatePart)(S);!k||s===e||_||x||(y.preventDefault(),g(e))}return m.addEventListener("dblclick",v),()=>{m.removeEventListener("keydown",h),m.removeEventListener("dragstart",b),m.removeEventListener("dblclick",v)}},[e,t,o,a,lv.isReusableBlock,lv.isTemplatePart,l,u,r,d,n,f,p,i,s,g])}var VJ=c(fe(),1),FJ=c(F(),1);function zJ(){let e=(0,FJ.useContext)(EP);return(0,VJ.useRefEffect)(t=>{if(e)return e.observe(t),()=>{e.unobserve(t)}},[e])}var TP=c(fe(),1);function jJ({isSelected:e}){let t=(0,TP.useReducedMotion)();return(0,TP.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 HJ=c(fe(),1),UJ=c(Z(),1);function RP({clientId:e="",isEnabled:t=!0}={}){let{getEnabledClientIdsTree:o}=U((0,UJ.useSelect)(C));return(0,HJ.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 GJ=c(fe(),1),Mw=new Map;function bVe(e,t){let o=Mw.get(e);o||(o=new Set,Mw.set(e,o),e.addEventListener("pointerdown",$J)),o.add(t)}function yVe(e,t){let o=Mw.get(e);o&&(o.delete(t),WJ(t),o.size===0&&(Mw.delete(e),e.removeEventListener("pointerdown",$J)))}function WJ(e){let t=e.getAttribute("data-draggable");t&&(e.removeAttribute("data-draggable"),t==="true"&&!e.getAttribute("draggable")&&e.setAttribute("draggable","true"))}function $J(e){let{target:t}=e,{ownerDocument:o,isContentEditable:r,tagName:n}=t,i=["INPUT","TEXTAREA"].includes(n),s=Mw.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)WJ(a)}function KJ(){return(0,GJ.useRefEffect)(e=>(bVe(e.ownerDocument,e),()=>{yVe(e.ownerDocument,e)}),[])}var Tr=c(G(),1),xi=c(F(),1),wi=c(H(),1),ih=c(Z(),1),XJ=c(Il(),1),QJ=c(es(),1);var Nw=c(G(),1);var{getViewportBreakpoints:vVe}=U(Yn);function Kz(e){let t=vVe(e);return s6.filter(([o])=>(o!==to.tablet.key||t.tablet!==void 0)&&(o!==to.mobile.key||t.mobile!==void 0))}function SVe(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"||!s6.some(([,{key:n}])=>n===t)?!1:r[t]===!1}function qJ(e,t){if(!e?.length)return!1;let o=e.filter(r=>SVe(r,t)).length;return o===0?!1:o===e.length?!0:null}function ZJ(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 Yz(e,t){if(!e&&e!==!1)return null;if(e===!1)return(0,Nw.__)("Block is hidden");if(e?.viewport){let o=Kz(t).filter(([r])=>e.viewport?.[r]===!1).map(([,r])=>r.label);if(o.length>0)return(0,Nw.sprintf)((0,Nw.__)("Block is hidden on %s"),o.join(", "))}return null}var dr=c(E(),1),kVe={[to.mobile.key]:!1,[to.tablet.key]:!1,[to.desktop.key]:!1},_Ve=[];function qz({clientIds:e,onClose:t}){let{createSuccessNotice:o}=(0,ih.useDispatch)(QJ.store),{updateBlockAttributes:r}=(0,ih.useDispatch)(C),n=(0,ih.useSelect)(S=>S(C).getBlocksByClientId(e)??_Ve,[e]),i=(0,ih.useSelect)(S=>S(XJ.store).getShortcutRepresentation("core/editor/toggle-list-view"),[]),s=(0,ih.useSelect)(S=>S(C).getSettings().__experimentalFeatures?.viewport,[]),a=(0,xi.useMemo)(()=>Kz(s),[s]),l=(0,xi.useMemo)(()=>{if(n?.length===0)return{hideEverywhere:!1,viewportChecked:{}};let S={};return a.forEach(([,{key:_}])=>{S[_]=qJ(n,_)}),{hideEverywhere:ZJ(n),viewportChecked:S}},[n,a]),[u,d]=(0,xi.useState)(l?.viewportChecked??{}),[f,p]=(0,xi.useState)(l?.hideEverywhere??!1),g=(0,xi.useCallback)((S,_)=>{d({...u,[S]:_})},[u]),m=(0,xi.useMemo)(()=>{if(!f)return(0,Tr.sprintf)((0,Tr.__)("Block visibility settings updated. You can access them via the List View (%s)."),i);let S=n?.length>1?(0,Tr.__)("Blocks hidden. You can access them via the List View (%s)."):(0,Tr.__)("Block hidden. You can access it via the List View (%s).");return(0,Tr.sprintf)(S,i)},[f,n?.length,i]),h=(0,xi.useMemo)(()=>Object.values(u).some(S=>S===!0||S===null),[u]),b=(0,xi.useMemo)(()=>f!==l.hideEverywhere?!0:a.some(([,{key:S}])=>u[S]!==l.viewportChecked[S]),[f,u,l,a]),v=(0,xi.useMemo)(()=>f===null?!0:Object.values(u).some(S=>S===null),[f,u]),y=(0,xi.useCallback)(S=>{S.preventDefault();let _=f?!1:{viewport:a.reduce((w,[,{key:T}])=>(u[T]&&(w[T]=!1),w),{})},x=Object.fromEntries(n.map(({clientId:w,attributes:T})=>[w,{metadata:Ge({...T?.metadata,blockVisibility:_})}]));r(e,x,{uniqueByBlock:!0}),o(m,{id:f?"block-visibility-hidden":"block-visibility-viewports-updated",type:"snackbar"}),t()},[n,e,o,f,m,t,r,a,u]),k=n?.length>1;return(0,dr.jsx)(wi.Modal,{title:e?.length>1?(0,Tr.__)("Hide blocks"):(0,Tr.__)("Hide block"),onRequestClose:t,overlayClassName:"block-editor-block-visibility-modal",size:"small",children:(0,dr.jsxs)("form",{onSubmit:y,children:[(0,dr.jsxs)("fieldset",{children:[(0,dr.jsx)("legend",{children:k?(0,Tr.__)("Select the viewport sizes for which you want to hide the blocks. Changes will apply to all selected blocks."):(0,Tr.__)("Select the viewport size for which you want to hide the block.")}),(0,dr.jsx)("ul",{className:"block-editor-block-visibility-modal__options",children:(0,dr.jsxs)("li",{className:"block-editor-block-visibility-modal__options-item block-editor-block-visibility-modal__options-item--everywhere",children:[(0,dr.jsx)(wi.CheckboxControl,{className:"block-editor-block-visibility-modal__options-checkbox--everywhere",label:(0,Tr.__)("Omit from published content"),checked:f===!0,indeterminate:f===null,onChange:S=>{p(S),d(kVe)}}),f!==!0&&(0,dr.jsx)("ul",{className:"block-editor-block-visibility-modal__sub-options",children:a.map(([,{label:S,icon:_,key:x}])=>(0,dr.jsxs)("li",{className:"block-editor-block-visibility-modal__options-item",children:[(0,dr.jsx)(wi.CheckboxControl,{label:(0,Tr.sprintf)((0,Tr.__)("Hide on %s"),S),checked:u[x]??!1,indeterminate:u[x]===null,onChange:w=>g(x,w)}),(0,dr.jsx)(wi.Icon,{icon:_,className:W({"block-editor-block-visibility-modal__options-icon--checked":u[x]})})]},x))})]})}),k&&v&&(0,dr.jsx)("p",{className:"block-editor-block-visibility-modal__description",children:(0,Tr.__)("Selected blocks have different visibility settings. The checkboxes show an indeterminate state when settings differ.")}),!k&&f===!0&&(0,dr.jsx)("p",{className:"block-editor-block-visibility-modal__description",children:(0,Tr.sprintf)((0,Tr.__)("Block will be hidden in the editor, and omitted from the published markup on the frontend. You can configure it again by selecting it in the List View (%s)."),i)}),!k&&!f&&h&&(0,dr.jsx)("p",{className:"block-editor-block-visibility-modal__description",children:(0,xi.createInterpolateElement)((0,Tr.sprintf)((0,Tr.__)("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,dr.jsx)("strong",{})})})]}),(0,dr.jsxs)(wi.Flex,{className:"block-editor-block-visibility-modal__actions",justify:"flex-end",expanded:!1,children:[(0,dr.jsx)(wi.FlexItem,{children:(0,dr.jsx)(wi.Button,{variant:"tertiary",onClick:t,__next40pxDefaultSize:!0,children:(0,Tr.__)("Cancel")})}),(0,dr.jsx)(wi.FlexItem,{children:(0,dr.jsx)(wi.Button,{variant:"primary",type:"submit",disabled:!b,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,Tr.__)("Apply")})})]})]})})}var Zz=c(fe(),1);var{getViewportBreakpoints:xVe}=U(Yn);function Ea(e={}){let{blockVisibility:t=void 0,deviceType:o=to.desktop.key,viewportSettings:r,view:n=window}=e,i=xVe(r),s=i.mobile?`(width <= ${i.mobile})`:void 0,a=(0,Zz.useMediaQuery)(s,n),l;i.tablet&&(l=i.mobile?`(${i.mobile} < width <= ${i.tablet})`:`(width <= ${i.tablet})`);let u=(0,Zz.useMediaQuery)(l,n),d;return o===to.mobile.key&&i.mobile?d=to.mobile.key:o===to.tablet.key&&i.tablet?d=to.tablet.key:a?d=to.mobile.key:u&&i.tablet?d=to.tablet.key:d=to.desktop.key,{isBlockCurrentlyHidden:t===!1||t?.viewport?.[d]===!1,currentViewport:d}}var Xz=c(G(),1),BP=c(H(),1),PP=c(F(),1);var JJ=c(ce(),1),IP=c(Z(),1);var Qz=c(E(),1);function Jz({clientIds:e}){let t=(0,PP.useRef)(!1),[o]=Me("blockVisibility.allowEditing"),{canToggleBlockVisibility:r,areBlocksHiddenAnywhere:n}=(0,IP.useSelect)(a=>{let{getBlocksByClientId:l,getBlockName:u,isBlockHiddenAnywhere:d}=U(a(C));return{canToggleBlockVisibility:l(e).every(({clientId:p})=>(0,JJ.hasBlockSupport)(u(p),"visibility",!0)),areBlocksHiddenAnywhere:e?.every(p=>d(p))}},[e]),i=(0,IP.useDispatch)(C);if((0,PP.useEffect)(()=>{n&&(t.current=!0)},[n]),o===!1||!n&&!t.current)return null;let{showViewportModal:s}=U(i);return(0,Qz.jsx)(BP.ToolbarGroup,{className:"block-editor-block-visibility-toolbar",children:(0,Qz.jsx)(BP.ToolbarButton,{disabled:!r,icon:n?vl:Vg,label:n?(0,Xz.__)("Hidden"):(0,Xz.__)("Visible"),onClick:()=>s(e),"aria-haspopup":"dialog"})})}var ej=c(G(),1),eee=c(H(),1),OP=c(Z(),1),tee=c(Il(),1);var oee=c(E(),1);function tj({clientIds:e}){let[t]=Me("blockVisibility.allowEditing"),{areBlocksHiddenAnywhere:o,shortcut:r}=(0,OP.useSelect)(s=>{let{isBlockHiddenAnywhere:a}=U(s(C));return{areBlocksHiddenAnywhere:e?.every(l=>a(l)),shortcut:s(tee.store).getShortcutRepresentation("core/block-editor/toggle-block-visibility")}},[e]),n=(0,OP.useDispatch)(C);if(t===!1)return null;let{showViewportModal:i}=U(n);return(0,oee.jsx)(eee.MenuItem,{onClick:()=>i(e),shortcut:r,children:o?(0,ej.__)("Show"):(0,ej.__)("Hide")})}var pp=c(H(),1),oj=c(Z(),1),fp=c(G(),1);var cv=c(E(),1),{Badge:wVe}=U(pp.privateApis),CVe={currentBlockVisibility:void 0,hasParentHiddenEverywhere:!1,selectedDeviceType:to.desktop.key};function ree({clientId:e}){let{currentBlockVisibility:t,selectedDeviceType:o,viewportSettings:r,hasParentHiddenEverywhere:n}=(0,oj.useSelect)(p=>{if(!e)return CVe;let{getBlockAttributes:g,isBlockParentHiddenEverywhere:m,getSettings:h}=U(p(C)),b=h();return{currentBlockVisibility:g(e)?.metadata?.blockVisibility,selectedDeviceType:b?.[ga]?.toLowerCase()||to.desktop.key,viewportSettings:b?.__experimentalFeatures?.viewport,hasParentHiddenEverywhere:m(e)}},[e]),s=Mt(e)?.ownerDocument?.defaultView,a=s===null?void 0:s,{isBlockCurrentlyHidden:l,currentViewport:u}=Ea({blockVisibility:t,deviceType:o,viewportSettings:r,view:a}),d=(0,oj.useSelect)(p=>!e||!u?!1:U(p(C)).isBlockParentHiddenAtViewport(e,u),[e,u]);if(!(l||n||d))return null;let f;if(l)if(t===!1)f=(0,fp.__)("Block is hidden");else{let p=to[u]?.label||u;f=(0,fp.sprintf)((0,fp.__)("Block is hidden on %s"),p)}if(n)f=(0,fp.__)("Parent block is hidden");else if(d){let p=to[u]?.label||u;f=(0,fp.sprintf)((0,fp.__)("Parent block is hidden on %s"),p)}return(0,cv.jsx)(wVe,{className:"block-editor-block-visibility-info",children:(0,cv.jsxs)(pp.__experimentalHStack,{spacing:2,justify:"start",children:[(0,cv.jsx)(pp.Icon,{icon:vl}),(0,cv.jsx)(pp.__experimentalText,{children:f})]})})}function Dw(e={},{__unstableIsHtml:t}={}){let{clientId:o,className:r,wrapperProps:n={},isAligned:i,index:s,mode:a,name:l,blockApiVersion:u,blockTitle:d,isSelected:f,isSubtreeDisabled:p,hasOverlay:g,initialPosition:m,blockEditingMode:h,isHighlighted:b,isMultiSelected:v,isPartiallySelected:y,isReusable:k,isDragging:S,hasChildSelected:_,isEditingDisabled:x,hasEditableOutline:w,isEditingContentOnlySection:T,defaultClassName:B,isSectionBlock:R,isWithinSectionBlock:A,canMove:O,blockVisibility:P,deviceType:L,viewportSettings:M}=(0,nee.useContext)(Rn),z=(0,uv.useRefEffect)(q=>{if(q){let{ownerDocument:K}=q,{defaultView:Q}=K;z.current=Q}},[]),V=(0,AP.sprintf)((0,AP.__)("Block: %s"),d),I=a==="html"&&!t?"-visual":"",N=KJ(),D=!A,j=(0,uv.useMergeRefs)([e.ref,z,wJ({clientId:o,initialPosition:m}),IX(o),AJ(o),DJ({clientId:o,isSelected:f}),EJ({isEnabled:D}),zJ(),bP({triggerAnimationOnChange:s,clientId:o}),(0,uv.useDisabled)({isDisabled:!g}),RP({clientId:o,isEnabled:R}),jJ({isSelected:f}),O?N:void 0]),Y=ht(),ee=!!Y[fy]?{"--wp-admin-theme-color":"var(--wp-block-synced-color)","--wp-admin-theme-color--rgb":"var(--wp-block-synced-color--rgb)"}:{},{isBlockCurrentlyHidden:J}=Ea({blockVisibility:P,deviceType:L,viewportSettings:M,view:z.current});u<2&&o===Y.clientId&&(0,see.default)(`Block type "${l}" must support API version 2 or higher to work correctly with "useBlockProps" method.`);let $=!1;return(n?.style?.marginTop?.charAt(0)==="-"||n?.style?.marginBottom?.charAt(0)==="-"||n?.style?.marginLeft?.charAt(0)==="-"||n?.style?.marginRight?.charAt(0)==="-")&&($=!0),{tabIndex:h==="disabled"?-1:0,draggable:O&&!_?!0:void 0,...n,...e,ref:j,id:`block-${o}${I}`,role:"document","aria-label":V,"data-block":o,"data-type":l,"data-title":d,inert:p?"true":void 0,className:W("block-editor-block-list__block",{"wp-block":!i,"has-block-overlay":g,"is-selected":f,"is-highlighted":b,"is-multi-selected":v,"is-partially-selected":y,"is-reusable":k,"is-dragging":S,"has-child-selected":_,"is-editing-disabled":x,"has-editable-outline":w,"has-negative-margin":$,"is-editing-content-only-section":T,"is-block-hidden":J},r,e.className,n.className,B),style:{...n.style,...e.style,...ee}}}Dw.save=iee.__unstableGetBlockProps;var Rr=c(E(),1);function EVe(e,t){let o={...e,...t};return e?.hasOwnProperty("className")&&t?.hasOwnProperty("className")&&(o.className=W(e.className,t.className)),e?.hasOwnProperty("style")&&t?.hasOwnProperty("style")&&(o.style={...e.style,...t.style}),o}function LP({children:e,isHtml:t,...o}){return(0,Rr.jsx)("div",{...Dw(o,{__unstableIsHtml:t}),children:e})}function rj({block:{__unstableBlockSource:e},mode:t,isLocked:o,canRemove:r,clientId:n,isSelected:i,isSelectionEnabled:s,className:a,__unstableLayoutClassNames:l,name:u,isValid:d,attributes:f,wrapperProps:p,setAttributes:g,onReplace:m,onRemove:h,onInsertBlocksAfter:b,onMerge:v,toggleSelection:y}){let{mayDisplayControls:k,mayDisplayParentControls:S,isSelectionWithinCurrentSection:_,themeSupportsLayout:x,...w}=(0,mp.useContext)(Rn),T=$g()||{},B=(0,Rr.jsx)(aB,{name:u,isSelected:i,attributes:f,setAttributes:g,insertBlocksAfter:o?void 0:b,onReplace:r?m:void 0,onRemove:r?h:void 0,mergeBlocks:r?v:void 0,clientId:n,isSelectionEnabled:s,toggleSelection:y,__unstableLayoutClassNames:l,__unstableParentLayout:Object.keys(T).length?T:void 0,mayDisplayControls:k,mayDisplayParentControls:S,mayDisplayPatternEditingControls:_,blockEditingMode:w.blockEditingMode,isPreviewMode:w.isPreviewMode}),R=(0,zt.getBlockType)(u);R?.getEditWrapperProps&&(p=EVe(p,R.getEditWrapperProps(f)));let A=p&&!!p["data-align"]&&!x,O=a?.includes("is-position-sticky");A&&(B=(0,Rr.jsx)("div",{className:W("wp-block",O&&a),"data-align":p["data-align"],children:B}));let P;if(d)t==="html"?P=(0,Rr.jsxs)(Rr.Fragment,{children:[(0,Rr.jsx)("div",{style:{display:"none"},children:B}),(0,Rr.jsx)(LP,{isHtml:!0,children:(0,Rr.jsx)(bQ,{clientId:n})})]}):R?.apiVersion>1?P=B:P=(0,Rr.jsx)(LP,{children:B});else{let V=e?(0,zt.serializeRawBlock)(e):(0,zt.getSaveContent)(R,f);P=(0,Rr.jsxs)(LP,{className:"has-warning",children:[(0,Rr.jsx)(WX,{clientId:n}),(0,Rr.jsx)(mp.RawHTML,{children:(0,lee.safeHTML)(V)})]})}let{"data-align":L,...M}=p??{},z={...M,className:W(M.className,L&&x&&`align${L}`,!(L&&O)&&a)};return(0,Rr.jsx)(Rn.Provider,{value:{wrapperProps:z,isAligned:A,isSelectionWithinCurrentSection:_,...w},children:(0,Rr.jsx)(ZX,{fallback:(0,Rr.jsx)(LP,{className:"has-warning",children:(0,Rr.jsx)(YX,{})}),children:P})})}var TVe=(0,MP.withDispatch)((e,t,o)=>{let{updateBlockAttributes:r,insertBlocks:n,mergeBlocks:i,replaceBlocks:s,toggleSelection:a,__unstableMarkLastChangeAsPersistent:l,moveBlocksToPosition:u,removeBlock:d,selectBlock:f}=e(C);return{setAttributes(p){let{getMultiSelectedBlockClientIds:g}=o.select(C),m=g(),{clientId:h,attributes:b}=t,v=m.length?m:[h],y=typeof p=="function"?p(b):p;r(v,y)},onInsertBlocks(p,g){let{rootClientId:m}=t;n(p,g,m)},onInsertBlocksAfter(p){let{clientId:g,rootClientId:m}=t,{getBlockIndex:h}=o.select(C),b=h(g);n(p,b+1,m)},onMerge(p){let{clientId:g,rootClientId:m}=t,{getPreviousBlockClientId:h,getNextBlockClientId:b,getBlock:v,getBlockAttributes:y,getBlockName:k,getBlockOrder:S,getBlockIndex:_,getBlockRootClientId:x,canInsertBlockType:w}=o.select(C);function T(){let R=v(g),A=(0,zt.getDefaultBlockName)(),O=(0,zt.getBlockType)(A);if(k(g)!==A){let P=(0,zt.switchToBlockType)(R,A);P&&P.length&&s(g,P)}else if((0,zt.isUnmodifiedDefaultBlock)(R)){let P=b(g);P&&o.batch(()=>{d(g),f(P)})}else if(O.merge){let P=O.merge({},R.attributes);s([g],[(0,zt.createBlock)(A,P)])}}function B(R,A=!0){let O=k(R),L=(0,zt.getBlockType)(O).category==="text",M=x(R),z=S(R),[V]=z;z.length===1&&(0,zt.isUnmodifiedBlock)(v(V))?d(R):L?o.batch(()=>{if(w(k(V),M))u([V],R,M,_(R));else{let I=(0,zt.switchToBlockType)(v(V),(0,zt.getDefaultBlockName)());I&&I.length&&I.every(N=>w(N.name,M))?(n(I,_(R),M,A),d(V,!1)):T()}!S(R).length&&(0,zt.isUnmodifiedBlock)(v(R))&&d(R,!1)}):T()}if(p){if(m){let A=b(m);if(A)if(k(m)===k(A)){let O=y(m),P=y(A);if(Object.keys(O).every(L=>O[L]===P[L])){o.batch(()=>{u(S(A),A,m),d(A,!1)});return}}else{i(m,A);return}}let R=b(g);if(!R)return;S(R).length?B(R,!1):i(g,R)}else{let R=h(g);if(R)i(R,g);else if(m){let A=h(m);if(A&&k(m)===k(A)){let O=y(m),P=y(A);if(Object.keys(O).every(L=>O[L]===P[L])){o.batch(()=>{u(S(m),m,A),d(m,!1)});return}}B(m)}else T()}},onReplace(p,g,m){p.length&&!(0,zt.isUnmodifiedDefaultBlock)(p[p.length-1])&&l();let h=p?.length===1&&Array.isArray(p[0])?p[0]:p;s([t.clientId],h,g,m)},onRemove(){d(t.clientId)},toggleSelection(p){a(p)}}});rj=(0,NP.compose)(TVe,(0,aee.withFilters)("editor.BlockListBlock"))(rj);function RVe(e){let{clientId:t,rootClientId:o}=e,r=(0,MP.useSelect)(te=>{let{isBlockSelected:ne,getBlockMode:de,isSelectionEnabled:Se,getTemplateLock:Ee,isSectionBlock:ve,getParentSectionBlock:be,getBlockWithoutAttributes:ge,getBlockAttributes:he,canRemoveBlock:ye,canMoveBlock:_e,getSettings:we,getEditedContentOnlySection:ie,getBlockEditingMode:oe,getBlockName:Ae,isFirstMultiSelectedBlock:me,getMultiSelectedBlockClientIds:xe,hasSelectedInnerBlock:nt,getBlocksByName:ut,getBlockIndex:it,isBlockMultiSelected:xt,isBlockSubtreeDisabled:tt,isBlockHighlighted:$t,__unstableIsFullySelected:dt,__unstableSelectionHasUnmergeableBlock:co,isBlockBeingDragged:at,isDragging:Be,__unstableHasActiveBlockOverlayActive:Te,getSelectedBlocksInitialCaretPosition:Ne}=U(te(C)),$e=ge(t);if(!$e)return;let{hasBlockSupport:ot,getActiveBlockVariation:Ot}=te(zt.store),At=he(t),{name:gt,isValid:Zo}=$e,Kt=(0,zt.getBlockType)(gt),De=we(),{supportsLayout:wt,isPreviewMode:Fo,__experimentalBlockBindingsSupportedAttributes:qi}=De,Ze=qi?.[gt],ho=At?.metadata?.blockVisibility,Ke=De?.[ga]?.toLowerCase()||"desktop",St=De?.__experimentalFeatures?.viewport,bo=Kt?.apiVersion>1,Xo=xt(t),wr=oe(t),fn={isPreviewMode:Fo,blockWithoutAttributes:$e,name:gt,attributes:At,isValid:Zo,themeSupportsLayout:wt,index:it(t),isReusable:(0,zt.isReusableBlock)(Kt),className:bo?At.className:void 0,defaultClassName:bo?(0,zt.getBlockDefaultClassName)(gt):void 0,blockTitle:Kt?.title,bindableAttributes:Ze,blockVisibility:ho,deviceType:Ke,viewportSettings:St,isMultiSelected:Xo,blockEditingMode:wr,isEditingDisabled:wr==="disabled"};if(Fo)return fn;let tn=ne(t),xc=ye(t),q_=_e(t),Le=Ot(gt,At),zo=!0,st=nt(t,zo),yo=ve(t)?t:be(t),Gr=(0,zt.hasBlockSupport)(gt,"multiple",!0)?[]:ut(gt),bl=Gr.length&&Gr[0]!==t;return{...fn,mode:de(t),isSelectionEnabled:Se(),isLocked:!!Ee(o),isSectionBlock:ve(t),isWithinSectionBlock:!!yo,isSelectionWithinCurrentSection:ne(yo)||nt(yo,zo),blockType:Kt,canRemove:xc,canMove:q_,isSelected:tn,isEditingContentOnlySection:ie()===t,blockEditingMode:wr,mayDisplayControls:tn||me(t)&&xe().every(L5=>Ae(L5)===gt),mayDisplayParentControls:ot(Ae(t),"__experimentalExposeControlsToChildren",!1)&&nt(t),blockApiVersion:Kt?.apiVersion||1,blockTitle:Le?.title||Kt?.title,isSubtreeDisabled:wr==="disabled"&&tt(t),hasOverlay:Te(t)&&!Be(),initialPosition:tn?Ne():void 0,isHighlighted:$t(t),isMultiSelected:Xo,isPartiallySelected:Xo&&!dt()&&!co(),isDragging:at(t),hasChildSelected:st,isEditingDisabled:wr==="disabled",hasEditableOutline:wr!=="disabled"&&oe(o)==="disabled",originalBlockClientId:bl?Gr[0]:!1,blockVisibility:ho,deviceType:Ke,viewportSettings:St}},[t,o]),n=(0,NP.useRefEffect)(te=>{if(te){let{ownerDocument:ne}=te,{defaultView:de}=ne;n.current=de}},[]),{isBlockCurrentlyHidden:i}=Ea({blockVisibility:r?.blockVisibility,deviceType:r?.deviceType,viewportSettings:r?.viewportSettings,view:n.current}),s=(0,mp.useMemo)(()=>({...r?.blockWithoutAttributes,attributes:r?.attributes}),[r?.blockWithoutAttributes,r?.attributes]);if(!r)return null;let{isPreviewMode:a,mode:l="visual",isSelectionEnabled:u=!1,isLocked:d=!1,canRemove:f=!1,canMove:p=!1,name:g,attributes:m,isValid:h,isSelected:b=!1,themeSupportsLayout:v,isEditingContentOnlySection:y,blockEditingMode:k,mayDisplayControls:S,mayDisplayParentControls:_,index:x,blockApiVersion:w,blockType:T,blockTitle:B,isSubtreeDisabled:R,hasOverlay:A,initialPosition:O,isHighlighted:P,isMultiSelected:L,isPartiallySelected:M,isReusable:z,isDragging:V,hasChildSelected:I,isSectionBlock:N,isWithinSectionBlock:D,isSelectionWithinCurrentSection:j,isEditingDisabled:Y,hasEditableOutline:X,className:ee,defaultClassName:J,originalBlockClientId:$,bindableAttributes:q,blockVisibility:K,deviceType:Q,viewportSettings:re}=r,se={isPreviewMode:a,clientId:t,className:ee,index:x,mode:l,name:g,blockApiVersion:w,blockType:T,blockTitle:B,isSelected:b,isSubtreeDisabled:R,hasOverlay:A,initialPosition:O,blockEditingMode:k,isHighlighted:P,isMultiSelected:L,isPartiallySelected:M,isReusable:z,isDragging:V,hasChildSelected:I,isSectionBlock:N,isWithinSectionBlock:D,isSelectionWithinCurrentSection:j,isEditingDisabled:Y,hasEditableOutline:X,isEditingContentOnlySection:y,defaultClassName:J,mayDisplayControls:S,mayDisplayParentControls:_,originalBlockClientId:$,themeSupportsLayout:v,canMove:p,isBlockCurrentlyHidden:i,bindableAttributes:q,blockVisibility:K,deviceType:Q,viewportSettings:re};return i&&!b&&!L&&!I?null:(0,Rr.jsx)(Rn.Provider,{value:se,children:(0,Rr.jsx)(rj,{...e,mode:l,isSelectionEnabled:u,isLocked:d,canRemove:f,canMove:p,block:s,name:g,attributes:m,isValid:h,isSelected:b})})}var DP=(0,mp.memo)(RVe);var SU=c(Z(),1),Mfe=c(ce(),1);var yU=c(G(),1),Pfe=c(uee(),1),qA=c(Z(),1),ZA=c(oo(),1);var Bfe=c(Kr(),1),_d=c(G(),1),YA=c(H(),1),OS=c(Z(),1),$h=c(ce(),1),bU=c(F(),1);var Zt=c(F(),1),GA=c(H(),1);var xie=c(F(),1);var sh=c(le(),1);function ah({controlled:e,default:t,name:o,state:r="value"}){let{current:n}=sh.useRef(e!==void 0),[i,s]=sh.useState(t),a=n?e:i,l=sh.useCallback(u=>{n||s(u)},[]);return[a,l]}var BVe=c(le(),1),Vw={...BVe};var fee=c(le(),1),dee={};function io(e,t){let o=fee.useRef(dee);return o.current===dee&&(o.current=e(t)),o}var nj=Vw.useInsertionEffect,PVe=nj&&nj!==Vw.useLayoutEffect?nj:e=>e();function pe(e){let t=io(IVe).current;return t.next=e,PVe(t.effect),t.trampoline}function IVe(){let e={next:void 0,callback:OVe,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function OVe(){}var pee=c(le(),1),AVe=()=>{},ae=typeof document<"u"?pee.useLayoutEffect:AVe;var gp=c(le(),1);var VP=c(le(),1),ij=VP.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function mee(){return VP.useContext(ij)}var gee=c(E(),1);function hee(e){let{children:t,elementsRef:o,labelsRef:r,onMapChange:n}=e,i=pe(n),s=gp.useRef(0),a=io(MVe).current,l=io(LVe).current,[u,d]=gp.useState(0),f=gp.useRef(u),p=pe((v,y)=>{l.set(v,y??null),f.current+=1,d(f.current)}),g=pe(v=>{l.delete(v),f.current+=1,d(f.current)}),m=gp.useMemo(()=>{let v=new Map;return Array.from(l.keys()).filter(k=>k.isConnected).sort(NVe).forEach((k,S)=>{let _=l.get(k)??{};v.set(k,{..._,index:S})}),v},[l,u]);ae(()=>{if(typeof MutationObserver!="function"||m.size===0)return;let v=new MutationObserver(y=>{let k=new Set,S=_=>k.has(_)?k.delete(_):k.add(_);y.forEach(_=>{_.removedNodes.forEach(S),_.addedNodes.forEach(S)}),k.size===0&&(f.current+=1,d(f.current))});return m.forEach((y,k)=>{k.parentElement&&v.observe(k.parentElement,{childList:!0})}),()=>{v.disconnect()}},[m]),ae(()=>{f.current===u&&(o.current.length!==m.size&&(o.current.length=m.size),r&&r.current.length!==m.size&&(r.current.length=m.size),s.current=m.size),i(m)},[i,m,o,r,u]),ae(()=>()=>{o.current=[]},[o]),ae(()=>()=>{r&&(r.current=[])},[r]);let h=pe(v=>(a.add(v),()=>{a.delete(v)}));ae(()=>{a.forEach(v=>v(m))},[a,m]);let b=gp.useMemo(()=>({register:p,unregister:g,subscribeMapChange:h,elementsRef:o,labelsRef:r,nextIndexRef:s}),[p,g,h,o,r,s]);return(0,gee.jsx)(ij.Provider,{value:b,children:t})}function LVe(){return new Map}function MVe(){return new Set}function NVe(e,t){let o=e.compareDocumentPosition(t);return o&Node.DOCUMENT_POSITION_FOLLOWING||o&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:o&Node.DOCUMENT_POSITION_PRECEDING||o&Node.DOCUMENT_POSITION_CONTAINS?1:0}var FP=c(le(),1),DVe=FP.createContext(void 0);function hp(){return FP.useContext(DVe)?.direction??"ltr"}function VVe(e,t){return function(r,...n){let i=new URL(e);return i.searchParams.set("code",r.toString()),n.forEach(s=>i.searchParams.append("args[]",s)),`${t} error #${r}; visit ${i} for the full message.`}}var FVe=VVe("https://base-ui.com/production-error","Base UI"),Pt=FVe;var lh=c(le(),1);function Vc(e,t,o,r){let n=io(yee).current;return zVe(n,e,t,o,r)&&vee(n,[e,t,o,r]),n.callback}function bee(e){let t=io(yee).current;return jVe(t,e)&&vee(t,e),t.callback}function yee(){return{callback:null,cleanup:null,refs:[]}}function zVe(e,t,o,r,n){return e.refs[0]!==t||e.refs[1]!==o||e.refs[2]!==r||e.refs[3]!==n}function jVe(e,t){return e.refs.length!==t.length||e.refs.some((o,r)=>o!==t[r])}function vee(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 kee=c(le(),1);var See=c(le(),1),HVe=parseInt(See.version,10);function dv(e){return HVe>=e}function sj(e){if(!kee.isValidElement(e))return null;let t=e,o=t.props;return(dv(19)?o?.ref:t.ref)??null}function Fw(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function Dt(){}var zw=Object.freeze([]),qt=Object.freeze({});function _ee(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 xee(e,t){return typeof e=="function"?e(t):e}function zP(e,t){return typeof e=="function"?e(t):e}var aj={};function Vt(e,t,o,r,n){if(!o&&!r&&!n&&!e)return jP(t);let i=jP(e);return t&&(i=jw(i,t)),o&&(i=jw(i,o)),r&&(i=jw(i,r)),n&&(i=jw(i,n)),i}function wee(e){if(e.length===0)return aj;if(e.length===1)return jP(e[0]);let t=jP(e[0]);for(let o=1;o<e.length;o+=1)t=jw(t,e[o]);return t}function jP(e){return lj(e)?{...Eee(e,aj)}:UVe(e)}function jw(e,t){return lj(t)?Eee(t,e):GVe(e,t)}function UVe(e){let t={...e};for(let o in t){let r=t[o];Cee(o,r)&&(t[o]=Tee(r))}return t}function GVe(e,t){if(!t)return e;for(let o in t){let r=t[o];switch(o){case"style":{e[o]=Fw(e.style,r);break}case"className":{e[o]=cj(e.className,r);break}default:Cee(o,r)?e[o]=WVe(e[o],r):e[o]=r}}return e}function Cee(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 lj(e){return typeof e=="function"}function Eee(e,t){return lj(e)?e(t):e??aj}function WVe(e,t){return t?e?(...o)=>{let r=o[0];if(Ree(r)){let i=r;Hw(i);let s=t(...o);return i.baseUIHandlerPrevented||e?.(...o),s}let n=t(...o);return e?.(...o),n}:Tee(t):e}function Tee(e){return e&&((...t)=>{let o=t[0];return Ree(o)&&Hw(o),e(...t)})}function Hw(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function cj(e,t){return t?e?t+" "+e:t:e}function Ree(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}var uj=c(le(),1);function We(e,t,o={}){let r=t.render,n=$Ve(t,o);if(o.enabled===!1)return null;let i=o.state??qt;return qVe(e,r,n,i)}function $Ve(e,t={}){let{className:o,style:r,render:n}=e,{state:i=qt,ref:s,props:a,stateAttributesMapping:l,enabled:u=!0}=t,d=u?xee(o,i):void 0,f=u?zP(r,i):void 0,p=u?_ee(i,l):qt,g=u&&a?KVe(a):void 0,m=u?Fw(p,g)??{}:qt;return typeof document<"u"&&(u?Array.isArray(s)?m.ref=bee([m.ref,sj(n),...s]):m.ref=Vc(m.ref,sj(n),s):Vc(null,null)),u?(d!==void 0&&(m.className=cj(m.className,d)),f!==void 0&&(m.style=Fw(m.style,f)),m):qt}function KVe(e){return Array.isArray(e)?wee(e):Vt(void 0,e)}var YVe=Symbol.for("react.lazy");function qVe(e,t,o,r){if(t){if(typeof t=="function")return t(o,r);let n=Vt(o,t.props);n.ref=o.ref;let i=t;return i?.$$typeof===YVe&&(i=lh.Children.toArray(t)[0]),lh.cloneElement(i,n)}if(e&&typeof e=="string")return ZVe(e,o);throw new Error(Pt(8))}function ZVe(e,t){return e==="button"?(0,uj.createElement)("button",{type:"button",...t,key:t.key}):e==="img"?(0,uj.createElement)("img",{alt:"",...t,key:t.key}):lh.createElement(e,t)}var HP=c(le(),1);var Bee=0;function XVe(e,t="mui"){let[o,r]=HP.useState(e),n=e||o;return HP.useEffect(()=>{o==null&&(Bee+=1,r(`${t}-${Bee}`))},[o,t]),n}var Pee=Vw.useId;function bp(e,t){if(Pee!==void 0){let o=Pee();return e??(t?`${t}-${o}`:o)}return XVe(e,t)}function Zn(e){return bp(e,"base-ui")}var WP=c(le(),1);var Re={};Cr(Re,{cancelOpen:()=>C5e,chipRemovePress:()=>a5e,clearPress:()=>s5e,closePress:()=>n5e,closeWatcher:()=>y5e,decrementPress:()=>u5e,disabled:()=>T5e,drag:()=>_5e,escapeKey:()=>b5e,focusOut:()=>h5e,imperativeAction:()=>P5e,incrementPress:()=>c5e,initial:()=>B5e,inputBlur:()=>p5e,inputChange:()=>d5e,inputClear:()=>f5e,inputPaste:()=>m5e,inputPress:()=>g5e,itemPress:()=>r5e,keyboard:()=>S5e,linkPress:()=>i5e,listNavigation:()=>v5e,missing:()=>R5e,none:()=>QVe,outsidePress:()=>o5e,pointer:()=>k5e,scrub:()=>w5e,siblingOpen:()=>E5e,swipe:()=>I5e,trackPress:()=>l5e,triggerFocus:()=>t5e,triggerHover:()=>e5e,triggerPress:()=>JVe,wheel:()=>x5e,windowResize:()=>O5e});var QVe="none",JVe="trigger-press",e5e="trigger-hover",t5e="trigger-focus",o5e="outside-press",r5e="item-press",n5e="close-press",i5e="link-press",s5e="clear-press",a5e="chip-remove-press",l5e="track-press",c5e="increment-press",u5e="decrement-press",d5e="input-change",f5e="input-clear",p5e="input-blur",m5e="input-paste",g5e="input-press",h5e="focus-out",b5e="escape-key",y5e="close-watcher",v5e="list-navigation",S5e="keyboard",k5e="pointer",_5e="drag",x5e="wheel",w5e="scrub",C5e="cancel-open",E5e="sibling-open",T5e="disabled",R5e="missing",B5e="initial",P5e="imperative-action",I5e="swipe",O5e="window-resize";function Ue(e,t,o,r){let n=!1,i=!1,s=r??qt;return{reason:e,event:t??new Event("base-ui"),cancel(){n=!0},allowPropagation(){i=!0},get isCanceled(){return n},get isPropagationAllowed(){return i},trigger:o,...s}}var fj=c(le(),1);var Iee=c(le(),1),A5e=[];function fv(e){Iee.useEffect(e,A5e)}var UP=null,Eft=globalThis.requestAnimationFrame,dj=class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=t=>{this.isScheduled=!1;let o=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let n=0;n<o.length;n+=1)o[n]?.(t)};request(t){let o=this.nextId;return this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1,!this.isScheduled&&(requestAnimationFrame(this.tick),this.isScheduled=!0),o}cancel(t){let o=t-this.startId;o<0||o>=this.callbacks.length||(this.callbacks[o]=null,this.callbacksCount-=1)}},GP=new dj,Ln=class e{static create(){return new e}static request(t){return GP.request(t)}static cancel(t){return GP.cancel(t)}currentId=UP;request(t){this.cancel(),this.currentId=GP.request(()=>{this.currentId=UP,t()})}cancel=()=>{this.currentId!==UP&&(GP.cancel(this.currentId),this.currentId=UP)};disposeEffect=()=>this.cancel};function Ci(){let e=io(Ln.create).current;return fv(e.disposeEffect),e}function rs(e,t=!1,o=!1){let[r,n]=fj.useState(e&&t?"idle":void 0),[i,s]=fj.useState(e);return e&&!i&&(s(!0),n("starting")),!e&&i&&r!=="ending"&&!o&&n("ending"),!e&&!i&&r==="ending"&&n(void 0),ae(()=>{if(!e&&i&&r!=="ending"&&o){let a=Ln.request(()=>{n("ending")});return()=>{Ln.cancel(a)}}},[e,i,r,o]),ae(()=>{if(!e||t)return;let a=Ln.request(()=>{n(void 0)});return()=>{Ln.cancel(a)}},[t,e]),ae(()=>{if(!e||!t)return;e&&i&&r!=="idle"&&n("starting");let a=Ln.request(()=>{n("idle")});return()=>{Ln.cancel(a)}},[t,e,i,r]),{mounted:i,setMounted:s,transitionStatus:r}}function Oee(e){let{open:t,defaultOpen:o,onOpenChange:r,disabled:n}=e,[i,s]=ah({controlled:t,default:o,name:"Collapsible",state:"open"}),{mounted:a,setMounted:l,transitionStatus:u}=rs(i,!0,!0),d=Zn(),[f,p]=WP.useState(),g=f??d,m=pe(h=>{let b=!i,v=Ue(Re.triggerPress,h.nativeEvent);r(b,v),!v.isCanceled&&s(b)});return WP.useMemo(()=>({disabled:n,handleTrigger:m,mounted:a,open:i,panelId:g,setMounted:l,setOpen:s,setPanelIdState:p,transitionStatus:u}),[n,m,a,i,g,l,s,p,u])}var $P=c(le(),1),pj=$P.createContext(void 0);function KP(){let e=$P.useContext(pj);if(e===void 0)throw new Error(Pt(15));return e}var ch=c(le(),1);var mj=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function Aee(e={}){let{label:t,metadata:o,textRef:r,indexGuessBehavior:n,index:i}=e,{register:s,unregister:a,subscribeMapChange:l,elementsRef:u,labelsRef:d,nextIndexRef:f}=mee(),p=ch.useRef(-1),[g,m]=ch.useState(i??(n===mj.GuessFromOrder?()=>{if(p.current===-1){let v=f.current;f.current+=1,p.current=v}return p.current}:-1)),h=ch.useRef(null),b=ch.useCallback(v=>{if(h.current=v,g!==-1&&v!==null&&(u.current[g]=v,d)){let y=t!==void 0;d.current[g]=y?t:r?.current?.textContent??v.textContent}},[g,u,d,t,r]);return ae(()=>{if(i!=null)return;let v=h.current;if(v)return s(v,o),()=>{a(v)}},[i,s,a,o]),ae(()=>{if(i==null)return l(v=>{let y=h.current?v.get(h.current)?.index:null;y!=null&&m(y)})},[i,l,m]),{ref:b,index:g}}var Fc=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({}),L5e={[Fc.startingStyle]:""},M5e={[Fc.endingStyle]:""},gn={transitionStatus(e){return e==="starting"?L5e:e==="ending"?M5e:null}};var Uw=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Fc.startingStyle]="startingStyle",e[e.endingStyle=Fc.endingStyle]="endingStyle",e})({});var Lee=(function(e){return e.panelOpen="data-panel-open",e})({});var N5e={[Uw.open]:""},D5e={[Uw.closed]:""},Mee={open(e){return e?{[Lee.panelOpen]:""}:null}},Nee={open(e){return e?N5e:D5e}};var pv=c(le(),1);function YP(){return typeof window<"u"}function Br(e){return qP(e)?(e.nodeName||"").toLowerCase():"#document"}function kt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Al(e){var t;return(t=(qP(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function qP(e){return YP()?e instanceof Node||e instanceof kt(e).Node:!1}function qe(e){return YP()?e instanceof Element||e instanceof kt(e).Element:!1}function _t(e){return YP()?e instanceof HTMLElement||e instanceof kt(e).HTMLElement:!1}function zc(e){return!YP()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof kt(e).ShadowRoot}function jc(e){let{overflow:t,overflowX:o,overflowY:r,display:n}=qr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+o)&&n!=="inline"&&n!=="contents"}function Dee(e){return/^(table|td|th)$/.test(Br(e))}function Gw(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var V5e=/transform|translate|scale|rotate|perspective|filter/,F5e=/paint|layout|strict|content/,uh=e=>!!e&&e!=="none",gj;function ZP(e){let t=qe(e)?qr(e):e;return uh(t.transform)||uh(t.translate)||uh(t.scale)||uh(t.rotate)||uh(t.perspective)||!XP()&&(uh(t.backdropFilter)||uh(t.filter))||V5e.test(t.willChange||"")||F5e.test(t.contain||"")}function Vee(e){let t=Ol(e);for(;_t(t)&&!Ll(t);){if(ZP(t))return t;if(Gw(t))return null;t=Ol(t)}return null}function XP(){return gj==null&&(gj=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),gj}function Ll(e){return/^(html|body|#document)$/.test(Br(e))}function qr(e){return kt(e).getComputedStyle(e)}function Ww(e){return qe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ol(e){if(Br(e)==="html")return e;let t=e.assignedSlot||e.parentNode||zc(e)&&e.host||Al(e);return zc(t)?t.host:t}function Fee(e){let t=Ol(e);return Ll(t)?e.ownerDocument?e.ownerDocument.body:e.body:_t(t)&&jc(t)?t:Fee(t)}function yp(e,t,o){var r;t===void 0&&(t=[]),o===void 0&&(o=!0);let n=Fee(e),i=n===((r=e.ownerDocument)==null?void 0:r.body),s=kt(n);if(i){let a=QP(s);return t.concat(s,s.visualViewport||[],jc(n)?n:[],a&&o?yp(a):[])}else return t.concat(n,yp(n,[],o))}function QP(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var JP=c(le(),1),z5e=JP.createContext(void 0);function zee(e=!1){let t=JP.useContext(z5e);if(t===void 0&&!e)throw new Error(Pt(16));return t}var jee=c(le(),1);function Hee(e){let{focusableWhenDisabled:t,disabled:o,composite:r=!1,tabIndex:n=0,isNativeButton:i}=e,s=r&&t!==!1,a=r&&t===!1;return{props:jee.useMemo(()=>{let u={onKeyDown(d){o&&t&&d.key!=="Tab"&&d.preventDefault()}};return r||(u.tabIndex=n,!i&&o&&(u.tabIndex=t?n:-1)),(i&&(t||s)||!i&&o)&&(u["aria-disabled"]=o),i&&(!t||a)&&(u.disabled=o),u},[r,o,t,s,a,i,n])}}function dh(e={}){let{disabled:t=!1,focusableWhenDisabled:o,tabIndex:r=0,native:n=!0,composite:i}=e,s=pv.useRef(null),a=zee(!0),l=i??a!==void 0,{props:u}=Hee({focusableWhenDisabled:o,disabled:t,composite:l,tabIndex:r,isNativeButton:n}),d=pv.useCallback(()=>{let g=s.current;hj(g)&&l&&t&&u.disabled===void 0&&g.disabled&&(g.disabled=!1)},[t,u.disabled,l]);ae(d,[d]);let f=pv.useCallback((g={})=>{let{onClick:m,onMouseDown:h,onKeyUp:b,onKeyDown:v,onPointerDown:y,...k}=g;return Vt({onClick(S){if(t){S.preventDefault();return}m?.(S)},onMouseDown(S){t||h?.(S)},onKeyDown(S){if(t||(Hw(S),v?.(S),S.baseUIHandlerPrevented))return;let _=S.target===S.currentTarget,x=S.currentTarget,w=hj(x),T=!n&&j5e(x),B=_&&(n?w:!T),R=S.key==="Enter",A=S.key===" ",O=x.getAttribute("role"),P=O?.startsWith("menuitem")||O==="option"||O==="gridcell";if(_&&l&&A){if(S.defaultPrevented&&P)return;S.preventDefault(),T||n&&w?(x.click(),S.preventBaseUIHandler()):B&&(m?.(S),S.preventBaseUIHandler());return}B&&(!n&&(A||R)&&S.preventDefault(),!n&&R&&m?.(S))},onKeyUp(S){if(!t){if(Hw(S),b?.(S),S.target===S.currentTarget&&n&&l&&hj(S.currentTarget)&&S.key===" "){S.preventDefault();return}S.baseUIHandlerPrevented||S.target===S.currentTarget&&!n&&!l&&S.key===" "&&m?.(S)}},onPointerDown(S){if(t){S.preventDefault();return}y?.(S)}},n?{type:"button"}:{role:"button"},u,k)},[t,u,l,n]),p=pe(g=>{s.current=g,d()});return{getButtonProps:f,buttonRef:p}}function hj(e){return _t(e)&&e.tagName==="BUTTON"}function j5e(e){return!!(e?.tagName==="A"&&e?.href)}var Ei=c(le(),1);function Je(e,t,o,r){return e.addEventListener(t,o,r),()=>{e.removeEventListener(t,o,r)}}function jt(e){let t=io(H5e,e).current;return t.next=e,ae(t.effect),t}function H5e(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}function Ye(e){return e?.ownerDocument||document}var Gee=c(le(),1);var Uee=c(rd(),1);function Ml(e){return e==null?e:"current"in e?e.current:e}function vp(e,t=!1,o=!0){let r=Ci();return pe((n,i=null)=>{r.cancel();let s=Ml(e);if(s==null)return;let a=s,l=()=>{Uee.flushSync(n)};if(typeof a.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED){n();return}function u(){Promise.all(a.getAnimations().map(d=>d.finished)).then(()=>{i?.aborted||l()}).catch(()=>{if(o){i?.aborted||l();return}let d=a.getAnimations();!i?.aborted&&d.length>0&&d.some(f=>f.pending||f.playState!=="finished")&&u()})}if(t){let d=Fc.startingStyle;if(!a.hasAttribute(d)){r.request(u);return}let f=new MutationObserver(()=>{a.hasAttribute(d)||(f.disconnect(),u())});f.observe(a,{attributes:!0,attributeFilter:[d]}),i?.addEventListener("abort",()=>f.disconnect(),{once:!0});return}r.request(u)})}function Xn(e){let{enabled:t=!0,open:o,ref:r,onComplete:n}=e,i=pe(n),s=vp(r,o,!1);Gee.useEffect(()=>{if(!t)return;let a=new AbortController;return s(i,a.signal),()=>{a.abort()}},[t,o,i,s])}var $w={height:void 0,width:void 0};function $ee(e){let{externalRef:t,hiddenUntilFound:o,id:r,keepMounted:n,mounted:i,onOpenChange:s,open:a,setMounted:l,setOpen:u,transitionStatus:d}=e,f=Ei.useRef(null),p=Ei.useRef(null),[g,m]=Ei.useState($w),h=Ei.useRef($w),b=Ei.useRef(!1),v=Ei.useRef(a),y=Ei.useRef(!1),[k,S]=Ei.useState(!1),_=Ei.useRef(null),x=Vc(t,f),w=jt({mounted:i,open:a}),T=vp(f,!1,!1),B=!a&&!i,R=k?"idle":d,A=a&&(v.current||y.current),O=!a&&i&&p.current==="css-animation"&&g.height===void 0&&g.width===void 0?h.current:g,P=o&&B&&p.current!=="css-animation",L=pe((N,D=!0)=>{D&&(h.current=N),m(N)}),M=pe(()=>{_.current?.(),_.current=null}),z=pe(N=>{M(),_.current=()=>{_.current=null,N()}}),V=pe(()=>{a&&i&&p.current==="css-animation"&&(y.current=!0)});ae(()=>{!k||d==="starting"||S(!1)},[k,d]),Ei.useEffect(()=>()=>{V(),M()},[V,M]),ae(()=>{let N=f.current;if(!N)return;!a&&_.current&&M();let D=U5e(N,A);if(p.current=D,a&&d==="idle"&&v.current&&D==="css-animation"){h.current=mv(N);return}if(a&&d==="starting"){let X=b.current;if(b.current=!1,D==="none"){L(mv(N)),S(!0);return}if(D==="css-transition"){let ee=G5e(N);if(L(mv(N)),!X)return ee;let J=Kw(N,"transition-duration","0s");return z(J),S(!0),ee}if(D==="css-animation"){if(L(mv(N)),!X){Kw(N,"animation-name","none")();return}let ee=Kw(N,"animation-name","none"),J=Kw(N,"animation-duration","0s");ee(),z(J),S(!0);return}}if(!a&&i&&(d==="idle"||d==="starting")){if(v.current=!1,y.current=!1,D==="none"){L($w,!1),l(!1);return}L(mv(N));return}if(d!=="ending")return;if(D==="none"){l(!1);return}let j=mv(N);if(!((j.height??0)>0||(j.width??0)>0)){l(!1);return}L(j),D==="css-animation"&&Kw(N,"animation-name","none")()},[i,a,M,L,l,z,A,d]),Xn({enabled:a&&i&&R==="idle",open:!0,ref:f,onComplete(){a&&L($w,!1)}}),Ei.useEffect(()=>{if(a||!i||R!=="ending"||!f.current)return;let D=new AbortController,j=-1;function Y(){w.current.open||(l(!1),L($w,!1))}return j=Ln.request(()=>{D.signal.aborted||T(Y,D.signal)}),()=>{Ln.cancel(j),D.abort()}},[w,i,a,R,T,L,l]),ae(()=>{let N=f.current;!N||!o||!B||N.setAttribute("hidden","until-found")},[B,o]),Ei.useEffect(function(){let D=f.current;if(!D)return;function j(Y){let X=Ue(Re.none,Y);s(!0,X),!X.isCanceled&&(b.current=!0,u(!0))}return Je(D,"beforematch",j)},[s,u]);let I=n||o||i||a;return{height:O.height,props:{...P?{[Uw.startingStyle]:""}:void 0,hidden:B,id:r},ref:x,shouldPreventOpenAnimation:A,shouldRender:I,transitionStatus:R,width:O.width}}function mv(e){return{height:e.scrollHeight,width:e.scrollWidth}}function U5e(e,t=!1){let o=kt(e).getComputedStyle(e),r=(o.animationName.split(",").map(i=>i.trim()).some(i=>i!==""&&i!=="none")||t)&&Wee(o.animationDuration),n=Wee(o.transitionDuration);return r&&n||n?"css-transition":r?"css-animation":"none"}function Wee(e){return e.split(",").map(t=>t.trim()).some(t=>t!==""&&Number.parseFloat(t)>0)}function Kw(e,t,o){let r=e.style.getPropertyValue(t),n=e.style.getPropertyPriority(t);return e.style.setProperty(t,o),()=>{if(r===""){e.style.removeProperty(t);return}e.style.setProperty(t,r,n)}}function G5e(e){let t={"justify-content":e.style.justifyContent,"align-items":e.style.alignItems,"align-content":e.style.alignContent,"justify-items":e.style.justifyItems};Object.keys(t).forEach(n=>{e.style.setProperty(n,"initial","important")});function o(){Object.entries(t).forEach(([n,i])=>{if(i===""){e.style.removeProperty(n);return}e.style.setProperty(n,i)})}let r=Ln.request(o);return()=>{Ln.cancel(r),o()}}var Kee=c(le(),1);function eI(e){let t=Kee.useRef(!0);t.current&&(t.current=!1,e())}var so={};Cr(so,{engine:()=>kj,env:()=>xj,os:()=>vj,screenReader:()=>_j});var vj={};Cr(vj,{android:()=>Zee,apple:()=>yj,ios:()=>bj,linux:()=>q5e,mac:()=>Xee,windows:()=>Y5e});function W5e(){return typeof navigator>"u"?{userAgent:"",platform:"",maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??0}}var{userAgent:$5e,platform:K5e,maxTouchPoints:Yee}=W5e(),fh=$5e.toLowerCase(),ph=K5e.toLowerCase();var bj=/^i(os$|p)/.test(ph)||ph==="macintel"&&Yee>1,qee="android",Zee=ph===qee||fh.includes(qee),Xee=!bj&&ph.startsWith("mac"),Y5e=ph.startsWith("win"),q5e=!Zee&&/^(linux|chrome os)/.test(ph),yj=Xee||bj;var kj={};Cr(kj,{blink:()=>X5e,gecko:()=>Z5e,webkit:()=>Sj});var Sj=typeof CSS<"u"&&!!CSS.supports?.("-webkit-backdrop-filter:none"),Z5e=!Sj&&fh.includes("firefox"),X5e=!Sj&&fh.includes("chrom");var _j={};Cr(_j,{voiceOver:()=>Q5e});var Q5e=yj;var xj={};Cr(xj,{jsdom:()=>J5e});var J5e=/jsdom|happydom/.test(fh);var Yw=0,Qn=class e{static create(){return new e}currentId=Yw;start(t,o){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Yw,o()},t)}isStarted(){return this.currentId!==Yw}clear=()=>{this.currentId!==Yw&&(clearTimeout(this.currentId),this.currentId=Yw)};disposeEffect=()=>this.clear};function So(){let e=io(Qn.create).current;return fv(e.disposeEffect),e}var Qee={},Jee={},ete="";function eFe(e){if(typeof document>"u")return!1;let t=Ye(e);return kt(t).innerWidth-t.documentElement.clientWidth>0}function tFe(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;let o=Ye(e),r=o.documentElement,n=o.body,i=jc(r)?r:n,s=i.style.overflowY,a=r.style.scrollbarGutter;r.style.scrollbarGutter="stable",i.style.overflowY="scroll";let l=i.offsetWidth;i.style.overflowY="hidden";let u=i.offsetWidth;return i.style.overflowY=s,r.style.scrollbarGutter=a,l===u}function oFe(e){let t=Ye(e),o=t.documentElement,r=t.body,n=jc(o)?o:r,i={overflowY:n.style.overflowY,overflowX:n.style.overflowX};return Object.assign(n.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(n.style,i)}}function rFe(e){let t=Ye(e),o=t.documentElement,r=t.body,n=kt(o),i=0,s=0,a=!1,l=Ln.create();if(so.engine.webkit&&(n.visualViewport?.scale??1)!==1)return()=>{};function u(){let g=n.getComputedStyle(o),m=n.getComputedStyle(r),v=(g.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";i=o.scrollTop,s=o.scrollLeft,Qee={scrollbarGutter:o.style.scrollbarGutter,overflowY:o.style.overflowY,overflowX:o.style.overflowX},ete=o.style.scrollBehavior,Jee={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};let y=o.scrollHeight>o.clientHeight,k=o.scrollWidth>o.clientWidth,S=g.overflowY==="scroll"||m.overflowY==="scroll",_=g.overflowX==="scroll"||m.overflowX==="scroll",x=Math.max(0,n.innerWidth-r.clientWidth),w=Math.max(0,n.innerHeight-r.clientHeight),T=parseFloat(m.marginTop)+parseFloat(m.marginBottom),B=parseFloat(m.marginLeft)+parseFloat(m.marginRight),R=jc(o)?o:r;if(a=tFe(e),a){o.style.scrollbarGutter=v,R.style.overflowY="hidden",R.style.overflowX="hidden";return}Object.assign(o.style,{scrollbarGutter:v,overflowY:"hidden",overflowX:"hidden"}),(y||S)&&(o.style.overflowY="scroll"),(k||_)&&(o.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:T||w?`calc(100dvh - ${T+w}px)`:"100dvh",width:B||x?`calc(100vw - ${B+x}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),r.scrollTop=i,r.scrollLeft=s,o.setAttribute("data-base-ui-scroll-locked",""),o.style.scrollBehavior="unset"}function d(){Object.assign(o.style,Qee),Object.assign(r.style,Jee),a||(o.scrollTop=i,o.scrollLeft=s,o.removeAttribute("data-base-ui-scroll-locked"),o.style.scrollBehavior=ete)}function f(){d(),l.request(u)}u();let p=Je(n,"resize",f);return()=>{l.cancel(),d(),typeof n.removeEventListener=="function"&&p()}}var wj=class{lockCount=0;restore=null;timeoutLock=Qn.create();timeoutUnlock=Qn.create();acquire(t){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(t)),this.release}release=()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(t){if(this.lockCount===0||this.restore!==null)return;let r=Ye(t).documentElement,n=kt(r).getComputedStyle(r).overflowY;if(n==="hidden"||n==="clip"){this.restore=Dt;return}let i=so.os.ios||!eFe(t);this.restore=i?oFe(t):rFe(t)}},nFe=new wj;function tte(e=!0,t=null){ae(()=>{if(e)return nFe.acquire(t)},[e,t])}var Jn=c(le(),1);function js(e){e.preventDefault(),e.stopPropagation()}function ote(e){return"nativeEvent"in e}function gv(e){return e.pointerType===""&&e.isTrusted?!0:so.os.android&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function tI(e){return so.env.jsdom?!1:!so.os.android&&e.width===0&&e.height===0||so.os.android&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function Ta(e,t){let o=["mouse","pen"];return t||o.push("",void 0),o.includes(e)}function rte(e){let t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}var qw="data-base-ui-focusable";var Cj="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",Zw="ArrowLeft",Xw="ArrowRight",Ej="ArrowUp",oI="ArrowDown";function Pr(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function je(e,t){if(!e||!t)return!1;let o=t.getRootNode?.();if(e.contains(t))return!0;if(o&&zc(o)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function ko(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Sp(e,t){if(!qe(e))return!1;let o=e;if(t.hasElement(o))return!o.hasAttribute("data-trigger-disabled");for(let[,r]of t.entries())if(je(r,o))return!r.hasAttribute("data-trigger-disabled");return!1}function rI(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);let o=e;return o.target!=null&&t.contains(o.target)}function nte(e){return e.matches("html,body")}function mh(e){return _t(e)&&e.matches(Cj)}function Tj(e){return e?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${Cj}`)!=null}function Qw(e){return e?e.getAttribute("role")==="combobox"&&mh(e):!1}function ite(e){if(!e||so.env.jsdom)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function gh(e){return e?e.hasAttribute(qw)?e:e.querySelector(`[${qw}]`)||e:null}function iFe(e,t){return t!=null&&!Ta(t)?0:typeof e=="function"?e():e}function id(e,t,o){let r=iFe(e,o);return typeof r=="number"?r:r?.[t]}function Rj(e){return typeof e=="function"?e():e}function nI(e,t){return t||e==="click"||e==="mousedown"}function ste(e){return e?.includes("mouse")&&e!=="mousedown"}var ate=c(E(),1),lte=Jn.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new Qn,currentIdRef:{current:null},currentContextRef:{current:null}});function sFe(e,t){e.current=t.current}function Bj(e){let{children:t,delay:o,timeoutMs:r=0}=e,n=Jn.useRef(o),i=Jn.useRef(o),s=Jn.useRef(null),a=Jn.useRef(null),l=So();return ae(()=>{if(i.current=o,!s.current){n.current=o;return}n.current={open:id(n.current,"open"),close:id(o,"close")}},[o,s,n,i]),(0,ate.jsx)(lte.Provider,{value:Jn.useMemo(()=>({hasProvider:!0,delayRef:n,initialDelayRef:i,currentIdRef:s,timeoutMs:r,currentContextRef:a,timeout:l}),[r,l]),children:t})}function Pj(e,t={open:!1}){let{open:o}=t,r="rootStore"in e?e.rootStore:e,n=r.useState("floatingId"),i=Jn.useContext(lte),{currentIdRef:s,delayRef:a,timeoutMs:l,initialDelayRef:u,currentContextRef:d,hasProvider:f,timeout:p}=i,[g,m]=Jn.useState(!1),h=Jn.useRef(o),b=Jn.useRef(!1);return ae(()=>{h.current=o},[o]),ae(()=>()=>{b.current=!0},[]),ae(()=>{function v(){b.current||m(!1),d.current?.setIsInstantPhase(!1),s.current=null,d.current=null,a.current=u.current,p.clear()}if(s.current&&!o&&s.current===n){if(m(!1),l){let y=n;return p.start(l,()=>{r.select("open")||s.current&&s.current!==y||v()}),()=>{(h.current||s.current!==y)&&p.clear()}}v()}},[o,n,s,a,l,u,d,p,r]),ae(()=>{if(!o)return;let v=d.current,y=s.current;p.clear(),d.current={onOpenChange:r.setOpen,setIsInstantPhase:m},s.current=n,a.current={open:0,close:id(u.current,"close")},y!==null&&y!==n?(m(!0),v?.setIsInstantPhase(!0),v?.onOpenChange(!1,Ue(Re.none))):(m(!1),v?.setIsInstantPhase(!1))},[o,n,r,s,a,u,d,p]),ae(()=>()=>{if(s.current===n){if(d.current=null,!h.current)return;s.current=null,sFe(a,u),p.clear()}},[d,s,a,n,u,p]),Jn.useMemo(()=>({hasProvider:f,delayRef:a,isInstantPhase:g}),[f,a,g])}var ti=c(le(),1);function ei(...e){return()=>{for(let t=0;t<e.length;t+=1){let o=e[t];o&&o()}}}var sI=c(le(),1);var cte={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},iI={...cte,position:"fixed",top:0,left:0},ute={...cte,position:"absolute"};var dte=c(E(),1),hv=sI.forwardRef(function(t,o){let[r,n]=sI.useState();return ae(()=>{so.screenReader.voiceOver&&so.engine.webkit&&n("button")},[]),(0,dte.jsx)("span",{...t,ref:o,style:iI,"aria-hidden":r?void 0:!0,...{tabIndex:0,role:r},"data-base-ui-focus-guard":""})});var mte=["top","right","bottom","left"];var kp=Math.min,Ti=Math.max,_p=Math.round,e0=Math.floor,Nl=e=>({x:e,y:e}),aFe={left:"right",right:"left",bottom:"top",top:"bottom"};function t0(e,t,o){return Ti(e,kp(t,o))}function Dl(e,t){return typeof e=="function"?e(t):e}function Mn(e){return e.split("-")[0]}function Vl(e){return e.split("-")[1]}function lI(e){return e==="x"?"y":"x"}function o0(e){return e==="y"?"height":"width"}function ns(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function r0(e){return lI(ns(e))}function gte(e,t,o){o===void 0&&(o=!1);let r=Vl(e),n=r0(e),i=o0(n),s=n==="x"?r===(o?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Jw(s)),[s,Jw(s)]}function hte(e){let t=Jw(e);return[aI(e),t,aI(t)]}function aI(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var fte=["left","right"],pte=["right","left"],lFe=["top","bottom"],cFe=["bottom","top"];function uFe(e,t,o){switch(e){case"top":case"bottom":return o?t?pte:fte:t?fte:pte;case"left":case"right":return t?lFe:cFe;default:return[]}}function bte(e,t,o,r){let n=Vl(e),i=uFe(Mn(e),o==="start",r);return n&&(i=i.map(s=>s+"-"+n),t&&(i=i.concat(i.map(aI)))),i}function Jw(e){let t=Mn(e);return aFe[t]+e.slice(t.length)}function dFe(e){return{top:0,right:0,bottom:0,left:0,...e}}function cI(e){return typeof e!="number"?dFe(e):{top:e,right:e,bottom:e,left:e}}function sd(e){let{x:t,y:o,width:r,height:n}=e;return{width:r,height:n,top:o,left:t,right:t+r,bottom:o+n,x:t,y:o}}function Ij(e,t){return t<0||t>=e.length}function uI(e,t){return hh(e.current,{disabledIndices:t})}function Oj(e,t){return hh(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function hh(e,{startingIndex:t=-1,decrement:o=!1,disabledIndices:r,amount:n=1}={}){let i=t;do i+=o?-n:n;while(i>=0&&i<=e.length-1&&Aj(e,i,r));return i}function Aj(e,t,o){if(typeof o=="function"?o(t):o?.includes(t)??!1)return!0;let n=e[t];return n?bh(n)?!o&&(n.hasAttribute("disabled")||n.getAttribute("aria-disabled")==="true"):!0:!1}function fFe(e){return e.visibility==="hidden"||e.visibility==="collapse"}function bh(e,t=e?qr(e):null){return!e||!e.isConnected||!t||fFe(t)?!1:typeof e.checkVisibility=="function"?e.checkVisibility():t.display!=="none"&&t.display!=="contents"}var pFe='a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';function mFe(e){let t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;let o=e.getRootNode();return zc(o)?o.host:null}function Mj(e){for(let t of Array.from(e.children))if(Br(t)==="summary")return t;return null}function gFe(e,t){let o=Mj(t);return!!o&&(e===o||je(o,e))}function yte(e){let t=e?Br(e):"";return e!=null&&e.matches(pFe)&&(t!=="summary"||e.parentElement!=null&&Br(e.parentElement)==="details"&&Mj(e.parentElement)===e)&&(t!=="details"||Mj(e)==null)&&(t!=="input"||e.type!=="hidden")}function vte(e){if(!yte(e)||!e.isConnected||e.matches(":disabled"))return!1;for(let t=e;t;t=mFe(t)){let o=t!==e,r=Br(t)==="slot";if(t.hasAttribute("inert")||o&&Br(t)==="details"&&!t.open&&!gFe(e,t)||t.hasAttribute("hidden")||!r&&!hFe(t,o))return!1}return!0}function hFe(e,t){let o=qr(e);return t?o.display!=="none":bh(e,o)}function Ste(e){let t=e.tabIndex;if(t<0){let o=Br(e);if(o==="details"||o==="audio"||o==="video"||_t(e)&&e.isContentEditable)return 0}return t}function Lj(e){if(Br(e)!=="input")return null;let t=e;return t.type==="radio"&&t.name!==""?t:null}function bFe(e,t){let o=Lj(e);if(!o)return!0;let r=t.find(n=>{let i=Lj(n);return i?.name===o.name&&i.form===o.form&&i.checked});return r?r===o:t.find(n=>{let i=Lj(n);return i?.name===o.name&&i.form===o.form})===o}function kte(e){if(_t(e)&&Br(e)==="slot"){let t=e.assignedElements({flatten:!0});if(t.length>0)return t}return _t(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function _te(e,t){kte(e).forEach(o=>{yte(o)&&t.push(o),_te(o,t)})}function xte(e,t,o){kte(e).forEach(r=>{_t(r)&&r.matches(t)&&o.push(r),xte(r,t,o)})}function dI(e){return vte(e)&&Ste(e)>=0}function Nj(e){let t=[];return _te(e,t),t.filter(vte)}function n0(e){let t=Nj(e);return t.filter(o=>Ste(o)>=0&&bFe(o,t))}function wte(e,t){let o=n0(e),r=o.length;if(r===0)return;let n=Pr(Ye(e)),i=o.indexOf(n),s=i===-1?t===1?0:r-1:i+t;return o[s]}function fI(e){return wte(Ye(e).body,1)||e}function pI(e){return wte(Ye(e).body,-1)||e}function yh(e,t){let o=t||e.currentTarget,r=e.relatedTarget;return!r||!je(o,r)}function Cte(e){n0(e).forEach(o=>{o.dataset.tabindex=o.getAttribute("tabindex")||"",o.setAttribute("tabindex","-1")})}function Dj(e){let t=[];xte(e,"[data-tabindex]",t),t.forEach(o=>{let r=o.dataset.tabindex;delete o.dataset.tabindex,r?o.setAttribute("tabindex",r):o.removeAttribute("tabindex")})}function Ra(e,t,o=!0){return e.filter(n=>n.parentId===t).flatMap(n=>[...!o||n.context?.open?[n]:[],...Ra(e,n.id,o)])}function Vj(e,t){let o=[],r=e.find(n=>n.id===t)?.parentId;for(;r;){let n=e.find(i=>i.id===r);r=n?.parentId,n&&(o=o.concat(n))}return o}function ad(e){return`data-base-ui-${e}`}var mI=0;function bv(e,t={}){let{preventScroll:o=!1,sync:r=!1,shouldFocus:n}=t;cancelAnimationFrame(mI);function i(){n&&!n()||e?.focus({preventScroll:o})}if(r)return i(),Dt;let s=requestAnimationFrame(i);return mI=s,()=>{mI===s&&(cancelAnimationFrame(s),mI=0)}}var Fj={inert:new WeakMap,"aria-hidden":new WeakMap},Ete="data-base-ui-inert",jj={inert:new WeakSet,"aria-hidden":new WeakSet},i0=new WeakMap,zj=0;function yFe(e){return jj[e]}function Pte(e){return e?zc(e)?e.host:Pte(e.parentNode):null}var Tte=(e,t)=>t.map(o=>{if(e.contains(o))return o;let r=Pte(o);return e.contains(r)?r:null}).filter(o=>o!=null),Rte=e=>{let t=new Set;return e.forEach(o=>{let r=o;for(;r&&!t.has(r);)t.add(r),r=r.parentNode}),t},Bte=(e,t,o)=>{let r=[],n=i=>{!i||o.has(i)||Array.from(i.children).forEach(s=>{Br(s)!=="script"&&(t.has(s)?n(s):r.push(s))})};return n(e),r};function vFe(e,t,o,r,{mark:n=!0}){let i=null;r?i="inert":o&&(i="aria-hidden");let s=null,a=null,l=Tte(t,e),u=n?Bte(t,Rte(l),new Set(l)):[],d=[],f=[];if(i){let p=Fj[i],g=yFe(i);a=g,s=p;let m=Tte(t,Array.from(t.querySelectorAll("[aria-live]"))),h=l.concat(m);Bte(t,Rte(h),new Set(h)).forEach(v=>{let y=v.getAttribute(i),k=y!==null&&y!=="false",S=(p.get(v)||0)+1;p.set(v,S),d.push(v),S===1&&k&&g.add(v),k||v.setAttribute(i,i==="inert"?"":"true")})}return n&&u.forEach(p=>{let g=(i0.get(p)||0)+1;i0.set(p,g),f.push(p),g===1&&p.setAttribute(Ete,"")}),zj+=1,()=>{s&&d.forEach(p=>{let m=(s.get(p)||0)-1;s.set(p,m),m||(!a?.has(p)&&i&&p.removeAttribute(i),a?.delete(p))}),n&&f.forEach(p=>{let g=(i0.get(p)||0)-1;i0.set(p,g),g||p.removeAttribute(Ete)}),zj-=1,zj||(Fj.inert=new WeakMap,Fj["aria-hidden"]=new WeakMap,jj.inert=new WeakSet,jj["aria-hidden"]=new WeakSet,i0=new WeakMap)}}function Hj(e,t={}){let{ariaHidden:o=!1,inert:r=!1,mark:n=!0}=t,i=Ye(e[0]).body;return vFe(e,i,o,r,{mark:n})}var tr=c(le(),1),Uj=c(rd(),1);var Ite={style:{transition:"none"}},Ote="data-base-ui-click-trigger",SFe="data-base-ui-swipe-ignore",kFe="data-swipe-ignore",Hmt=`[${SFe}]`,Umt=`[${kFe}]`,Ate={fallbackAxisSide:"none"},Lte={fallbackAxisSide:"end"},Mte={clipPath:"inset(50%)",position:"fixed",top:0,left:0};var vh=c(E(),1),Nte=tr.createContext(null),Gj=()=>tr.useContext(Nte),_Fe=ad("portal");function gI(e={}){let{ref:t,container:o,componentProps:r=qt,elementProps:n}=e,i=bp(),a=Gj()?.portalNode,[l,u]=tr.useState(null),[d,f]=tr.useState(null),p=pe(b=>{b!==null&&f(b)}),g=tr.useRef(null);ae(()=>{if(o===null){g.current&&(g.current=null,f(null),u(null));return}if(i==null)return;let b=(o&&(qP(o)?o:o.current))??a??document.body;if(b==null){g.current&&(g.current=null,f(null),u(null));return}g.current!==b&&(g.current=b,f(null),u(b))},[o,a,i]);let m=We("div",r,{ref:[t,p],props:[{id:i,[_Fe]:""},n]});return{portalNode:d,portalSubtree:l&&m?Uj.createPortal(m,l):null}}var Wj=tr.forwardRef(function(t,o){let{render:r,className:n,style:i,children:s,container:a,renderGuards:l,...u}=t,{portalNode:d,portalSubtree:f}=gI({container:a,ref:o,componentProps:t,elementProps:u}),p=tr.useRef(null),g=tr.useRef(null),m=tr.useRef(null),h=tr.useRef(null),[b,v]=tr.useState(null),y=tr.useRef(!1),k=b?.modal,S=b?.open,_=typeof l=="boolean"?l:!!b&&!b.modal&&b.open&&!!d;tr.useEffect(()=>{if(!d||k)return;function w(T){d&&T.relatedTarget&&yh(T)&&(T.type==="focusin"?y.current&&(Dj(d),y.current=!1):(Cte(d),y.current=!0))}return ei(Je(d,"focusin",w,!0),Je(d,"focusout",w,!0))},[d,k]),ae(()=>{!d||S!==!0||!y.current||(Dj(d),y.current=!1)},[S,d]);let x=tr.useMemo(()=>({beforeOutsideRef:p,afterOutsideRef:g,beforeInsideRef:m,afterInsideRef:h,portalNode:d,setFocusManagerState:v}),[d]);return(0,vh.jsxs)(tr.Fragment,{children:[f,(0,vh.jsxs)(Nte.Provider,{value:x,children:[_&&d&&(0,vh.jsx)(hv,{"data-type":"outside",ref:p,onFocus:w=>{if(yh(w,d))m.current?.focus();else{let T=b?b.domReference:null;pI(T)?.focus()}}}),_&&d&&(0,vh.jsx)("span",{"aria-owns":d.id,style:Mte}),d&&Uj.createPortal(s,d),_&&d&&(0,vh.jsx)(hv,{"data-type":"outside",ref:g,onFocus:w=>{if(yh(w,d))h.current?.focus();else{let T=b?b.domReference:null;fI(T)?.focus(),b?.closeOnFocusOut&&b?.onOpenChange(!1,Ue(Re.focusOut,w.nativeEvent))}}})]})]})});var Sh=c(le(),1);function Dte(){let e=new Map;return{emit(t,o){e.get(t)?.forEach(r=>r(o))},on(t,o){e.has(t)||e.set(t,new Set),e.get(t).add(o)},off(t,o){e.get(t)?.delete(o)}}}var xFe=c(E(),1),wFe=Sh.createContext(null),CFe=Sh.createContext(null),xp=()=>Sh.useContext(wFe)?.id||null,Ba=e=>{let t=Sh.useContext(CFe);return e??t};var s0=c(E(),1);function EFe(e,t){let o=kt(ko(e));return e instanceof o.KeyboardEvent?"keyboard":e instanceof o.FocusEvent?t||"keyboard":"pointerType"in e?e.pointerType||"keyboard":"touches"in e?"touch":e instanceof o.MouseEvent?t||(e.detail===0?"keyboard":"mouse"):""}var Vte=20,wp=[];function $j(){wp=wp.filter(e=>e.deref()?.isConnected)}function Fte(e){$j(),e&&Br(e)!=="body"&&(wp.push(new WeakRef(e)),wp.length>Vte&&(wp=wp.slice(-Vte)))}function zte(){return $j(),wp[wp.length-1]?.deref()}function TFe(e){return e?dI(e)?e:n0(e)[0]||e:null}function jte(e){if(e.hasAttribute("tabindex")&&!e.hasAttribute("data-tabindex")||!e.getAttribute("role")?.includes("dialog"))return;let o=Nj(e).filter(n=>{let i=n.getAttribute("data-tabindex")||"";return dI(n)||n.hasAttribute("data-tabindex")&&!i.startsWith("-")}),r=e.getAttribute("tabindex");o.length===0?r!=="0"&&(e.setAttribute("tabindex","0"),e.setAttribute("data-tabindex","0")):(r!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function Kj(e){let{context:t,children:o,disabled:r=!1,initialFocus:n=!0,returnFocus:i=!0,restoreFocus:s=!1,modal:a=!0,closeOnFocusOut:l=!0,openInteractionType:u="",nextFocusableElement:d,previousFocusableElement:f,beforeContentFocusGuardRef:p,externalTree:g,getInsideElements:m}=e,h="rootStore"in t?t.rootStore:t,b=h.useState("open"),v=h.useState("domReferenceElement"),y=h.useState("floatingElement"),{events:k,dataRef:S}=h.context,_=pe(()=>S.current.floatingContext?.nodeId),x=n===!1,w=Qw(v)&&x,T=jt(n),B=jt(i),R=jt(u),A=jt(b),O=Ba(g),P=Gj(),L=ti.useRef(!1),M=ti.useRef(!1),z=ti.useRef(!1),V=ti.useRef(null),I=ti.useRef(""),N=ti.useRef(""),D=ti.useRef(null),j=ti.useRef(null),Y=Vc(D,p,P?.beforeInsideRef),X=Vc(j,P?.afterInsideRef),ee=So(),J=So(),$=Ci(),q=P!=null,K=gh(y),Q=pe((te=K)=>te?n0(te):[]),re=pe(()=>m?.().filter(te=>te!=null)??[]);ti.useEffect(()=>{if(r||!a)return;function te(de){de.key==="Tab"&&je(K,Pr(Ye(K)))&&Q().length===0&&!w&&js(de)}let ne=Ye(K);return Je(ne,"keydown",te)},[r,K,a,w,Q]),ti.useEffect(()=>{if(r||!b)return;let te=Ye(K);function ne(){z.current=!1}function de(Ee){let ve=ko(Ee),be=re(),ge=je(y,ve)||je(v,ve)||je(P?.portalNode,ve)||be.some(he=>he===ve||je(he,ve));z.current=!ge,N.current=Ee.pointerType||"keyboard",ve?.closest(`[${Ote}]`)&&(M.current=!0,J.start(0,()=>{M.current=!1}))}function Se(){N.current="keyboard"}return ei(Je(te,"pointerdown",de,!0),Je(te,"pointerup",ne,!0),Je(te,"pointercancel",ne,!0),Je(te,"keydown",Se,!0),ne)},[r,y,v,K,b,P,J,re]),ti.useEffect(()=>{if(r||!l)return;let te=Ye(K);function ne(){M.current=!0,J.start(0,()=>{M.current=!1})}function de(be){let ge=ko(be);dI(ge)&&(V.current=ge)}function Se(be){let ge=be.relatedTarget,he=be.currentTarget,ye=ko(be);a&&ge==null&&ye!=null&&je(y,ye)&&Fte(ye),queueMicrotask(()=>{let _e=_(),we=h.context.triggerElements,ie=re(),oe=ge?.hasAttribute(ad("focus-guard"))&&[D.current,j.current,P?.beforeInsideRef.current,P?.afterInsideRef.current,P?.beforeOutsideRef.current,P?.afterOutsideRef.current,Ml(f),Ml(d)].includes(ge),Ae=!(je(v,ge)||je(y,ge)||je(ge,y)||je(P?.portalNode,ge)||ie.some(me=>me===ge||je(me,ge))||ge!=null&&we.hasElement(ge)||we.hasMatchingElement(me=>je(me,ge))||oe||O&&(Ra(O.nodesRef.current,_e).find(me=>je(me.context?.elements.floating,ge)||je(me.context?.elements.domReference,ge))||Vj(O.nodesRef.current,_e).find(me=>[me.context?.elements.floating,gh(me.context?.elements.floating)].includes(ge)||me.context?.elements.domReference===ge)));if(he===v&&K&&jte(K),s&&he!==v&&!bh(ye)&&Pr(te)===te.body){if(_t(K)&&(K.focus(),s==="popup")){$.request(()=>{K.focus()});return}let me=Q(),xe=V.current,nt=(xe&&me.includes(xe)?xe:null)||me[me.length-1]||K;_t(nt)&&nt.focus()}if(S.current.insideReactTree){S.current.insideReactTree=!1;return}(w||!a)&&ge&&Ae&&!M.current&&(w||ge!==zte())&&(L.current=!0,h.setOpen(!1,Ue(Re.focusOut,be)))})}function Ee(){z.current||(S.current.insideReactTree=!0,ee.start(0,()=>{S.current.insideReactTree=!1}))}let ve=_t(v)?v:null;if(!(!y&&!ve))return ei(ve&&Je(ve,"focusout",Se),ve&&Je(ve,"pointerdown",ne),y&&Je(y,"focusin",de),y&&Je(y,"focusout",Se),y&&P&&Je(y,"focusout",Ee,!0))},[r,v,y,K,a,O,P,h,l,s,Q,w,_,S,ee,J,$,d,f,re]),ti.useEffect(()=>{if(r||!y||!b)return;let te=Array.from(P?.portalNode?.querySelectorAll(`[${ad("portal")}]`)||[]),de=(O?Vj(O.nodesRef.current,_()):[]).find(he=>Qw(he.context?.elements.domReference||null))?.context?.elements.domReference,Ee=[...[y,...te,D.current,j.current,P?.beforeOutsideRef.current,P?.afterOutsideRef.current,...re()],de,Ml(f),Ml(d),w?v:null].filter(he=>he!=null),ve=Hj(Ee,{ariaHidden:a||w,mark:!1}),be=[y,...te].filter(he=>he!=null),ge=Hj(be);return()=>{ge(),ve()}},[b,r,v,y,a,P,w,O,_,d,f,re]),ae(()=>{if(!b||r||!_t(K))return;let te=Ye(K),ne=Pr(te);queueMicrotask(()=>{let de=T.current,Se=typeof de=="function"?de(R.current||""):de;if(Se===void 0||Se===!1||je(K,ne))return;let ve=null,be=()=>(ve==null&&(ve=Q(K)),ve[0]||K),ge;Se===!0||Se===null?ge=be():ge=Ml(Se),ge=ge||be();let he=je(K,Pr(te));bv(ge,{preventScroll:ge===K,shouldFocus(){if(!A.current)return!1;if(he)return!0;let ye=Pr(te);return!(ye!==ge&&je(K,ye))}})})},[r,b,K,Q,T,R,A]),ae(()=>{if(r||!K)return;let te=Ye(K),ne=Pr(te),de=R.current==null;Fte(ne);function Se(ve){if(ve.open||(I.current=EFe(ve.nativeEvent,N.current)),ve.reason===Re.triggerHover&&ve.nativeEvent.type==="mouseleave"&&(L.current=!0),ve.reason===Re.outsidePress)if(ve.nested)L.current=!1;else if(gv(ve.nativeEvent)||tI(ve.nativeEvent))L.current=!1;else{let be=!1;Ye(K).createElement("div").focus({get preventScroll(){return be=!0,!1}}),be?L.current=!1:L.current=!0}}k.on("openchange",Se);function Ee(){let ve=B.current,be=typeof ve=="function"?ve(I.current):ve;if(be===void 0||be===!1)return null;be===null&&(be=!0);let ge=v?.isConnected?v:null,he=ne?.isConnected&&Br(ne)!=="body"?ne:null,ye=de?he||ge:ge||he;return ye||(ye=zte()||null),typeof be=="boolean"?ye:Ml(be)||ye||null}return()=>{k.off("openchange",Se);let ve=Pr(te),be=re(),ge=je(y,ve)||be.some(_e=>_e===ve||je(_e,ve))||O&&Ra(O.nodesRef.current,_(),!1).some(_e=>je(_e.context?.elements.floating,ve)),he=B.current,ye=Ee();queueMicrotask(()=>{let _e=TFe(ye),we=typeof he!="boolean";he&&!L.current&&_t(_e)&&(!(!we&&_e!==ve&&ve!==te.body)||ge)&&_e.focus({preventScroll:!0}),L.current=!1})}},[r,y,K,B,R,k,O,v,_,re]),ae(()=>{if(!so.engine.webkit||b||!y)return;let te=Pr(Ye(y));!_t(te)||!mh(te)||je(y,te)&&te.blur()},[b,y]),ae(()=>{if(!(r||!P))return P.setFocusManagerState({modal:a,closeOnFocusOut:l,open:b,onOpenChange:h.setOpen,domReference:v}),()=>{P.setFocusManagerState(null)}},[r,P,a,b,h,l,v]),ae(()=>{if(!(r||!K))return jte(K),()=>{queueMicrotask($j)}},[r,K]);let se=!r&&(a?!w:!0)&&(q||a);return(0,s0.jsxs)(ti.Fragment,{children:[se&&(0,s0.jsx)(hv,{"data-type":"inside",ref:Y,onFocus:te=>{if(a){let ne=Q();bv(ne[ne.length-1])}else P?.portalNode&&(L.current=!1,yh(te,P.portalNode)?fI(v)?.focus():Ml(f??P.beforeOutsideRef)?.focus())}}),o,se&&(0,s0.jsx)(hv,{"data-type":"inside",ref:X,onFocus:te=>{a?bv(Q()[0]):P?.portalNode&&(l&&(L.current=!0),yh(te,P.portalNode)?pI(v)?.focus():Ml(d??P.afterOutsideRef)?.focus())}})]})}var a0=c(le(),1);function Yj(e,t={}){let{enabled:o=!0,event:r="click",toggle:n=!0,ignoreMouse:i=!1,stickIfOpen:s=!0,touchOpenDelay:a=0,reason:l=Re.triggerPress}=t,u="rootStore"in e?e.rootStore:e,d=u.context.dataRef,f=a0.useRef(void 0),p=Ci(),g=So(),m=a0.useMemo(()=>{function h(v,y,k,S){let _=Ue(l,y,k);v&&S==="touch"&&a>0?g.start(a,()=>{u.setOpen(!0,_)}):u.setOpen(v,_)}function b(v,y,k){let S=d.current.openEvent,_=u.select("domReferenceElement")!==y;return v&&_||!v||!n?!0:S&&s?!k(S.type):!1}return{onPointerDown(v){f.current=v.pointerType},onMouseDown(v){let y=f.current,k=v.nativeEvent,S=u.select("open");if(v.button!==0||r==="click"||Ta(y,!0)&&i)return;let _=b(S,v.currentTarget,T=>T==="click"||T==="mousedown"),x=ko(k);if(mh(x)){h(_,k,x,y);return}let w=v.currentTarget;p.request(()=>{h(_,k,w,y)})},onClick(v){if(r==="mousedown-only")return;let y=f.current;if(r==="mousedown"&&y){f.current=void 0;return}if(Ta(y,!0)&&i)return;let k=u.select("open"),S=b(k,v.currentTarget,_=>_==="click"||_==="mousedown"||_==="keydown"||_==="keyup");h(S,v.nativeEvent,v.currentTarget,y)},onKeyDown(){f.current=void 0}}},[d,r,i,l,u,s,n,p,g,a]);return a0.useMemo(()=>o?{reference:m}:qt,[o,m])}var is=c(le(),1);function RFe(e,t){let o=null,r=null,n=!1;return{contextElement:e||void 0,getBoundingClientRect(){let i=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},s=t.axis==="x"||t.axis==="both",a=t.axis==="y"||t.axis==="both",l=["mouseenter","mousemove"].includes(t.dataRef.current.openEvent?.type||"")&&t.pointerType!=="touch",u=i.width,d=i.height,f=i.x,p=i.y;return o==null&&t.x&&s&&(o=i.x-t.x),r==null&&t.y&&a&&(r=i.y-t.y),f-=o||0,p-=r||0,u=0,d=0,!n||l?(u=t.axis==="y"?i.width:0,d=t.axis==="x"?i.height:0,f=s&&t.x!=null?t.x:f,p=a&&t.y!=null?t.y:p):n&&!l&&(d=t.axis==="x"?i.height:d,u=t.axis==="y"?i.width:u),n=!0,{width:u,height:d,x:f,y:p,top:p,right:f+u,bottom:p+d,left:f}}}}function Hte(e){return e!=null&&e.clientX!=null}function qj(e,t={}){let{enabled:o=!0,axis:r="both"}=t,n="rootStore"in e?e.rootStore:e,i=n.useState("open"),s=n.useState("floatingElement"),a=n.useState("domReferenceElement"),l=n.context.dataRef,u=is.useRef(!1),d=is.useRef(null),[f,p]=is.useState(),[g,m]=is.useState([]),h=pe(S=>{n.set("positionReference",S)}),b=pe((S,_,x)=>{u.current||l.current.openEvent&&!Hte(l.current.openEvent)||n.set("positionReference",RFe(x??a,{x:S,y:_,axis:r,dataRef:l,pointerType:f}))}),v=pe(S=>{i?d.current||(b(S.clientX,S.clientY,S.currentTarget),m([])):b(S.clientX,S.clientY,S.currentTarget)}),y=Ta(f)?s:i;is.useEffect(()=>{if(!o){h(a);return}if(!y)return;function S(){d.current?.(),d.current=null}let _=kt(s);function x(w){let T=ko(w);je(s,T)?S():b(w.clientX,w.clientY)}return!l.current.openEvent||Hte(l.current.openEvent)?d.current=Je(_,"mousemove",x):h(a),S},[y,o,s,l,a,n,b,h,g]),is.useEffect(()=>()=>{n.set("positionReference",null)},[n]),is.useEffect(()=>{o&&!s&&(u.current=!1)},[o,s]),is.useEffect(()=>{!o&&i&&(u.current=!0)},[o,i]);let k=is.useMemo(()=>{function S(_){p(_.pointerType)}return{onPointerDown:S,onPointerEnter:S,onMouseMove:v,onMouseEnter:v}},[v]);return is.useMemo(()=>o?{reference:k,trigger:k}:{},[o,k])}var ss=c(le(),1);function BFe(){return!1}function PFe(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function l0(e,t={}){let{enabled:o=!0,escapeKey:r=!0,outsidePress:n=!0,outsidePressEvent:i="sloppy",referencePress:s=BFe,bubbles:a,externalTree:l}=t,u="rootStore"in e?e.rootStore:e,d=u.useState("open"),f=u.useState("floatingElement"),{dataRef:p}=u.context,g=Ba(l),m=pe(typeof n=="function"?n:()=>!1),h=typeof n=="function"?m:n,b=h!==!1,v=pe(()=>i),{escapeKey:y,outsidePress:k}=PFe(a),S=ss.useRef(!1),_=ss.useRef(!1),x=ss.useRef(!1),w=ss.useRef(!1),T=ss.useRef(""),B=ss.useRef(null),R=So(),A=So(),O=pe(()=>{A.clear(),p.current.insideReactTree=!1}),P=pe(Y=>{let X=p.current.floatingContext?.nodeId;return(g?Ra(g.nodesRef.current,X):[]).some(J=>J.context?.open&&!J.context.dataRef.current[Y])}),L=pe(Y=>rI(Y,u.select("floatingElement"))||rI(Y,u.select("domReferenceElement"))),M=pe(Y=>{s()&&u.setOpen(!1,Ue(Re.triggerPress,Y.nativeEvent))}),z=pe(Y=>{if(!d||!o||!r||Y.key!=="Escape"||w.current||!y&&P("__escapeKeyBubbles"))return;let X=ote(Y)?Y.nativeEvent:Y,ee=Ue(Re.escapeKey,X);u.setOpen(!1,ee),ee.isCanceled||Y.preventDefault(),!y&&!ee.isPropagationAllowed&&Y.stopPropagation()}),V=pe(()=>{p.current.insideReactTree=!0,A.start(0,O)}),I=pe(Y=>{if(!d||!o||Y.button!==0)return;let X=ko(Y.nativeEvent);je(u.select("floatingElement"),X)&&(S.current||(S.current=!0,_.current=!1))}),N=pe(Y=>{!d||!o||(Y.defaultPrevented||Y.nativeEvent.defaultPrevented)&&S.current&&(_.current=!0)});ss.useEffect(()=>{if(!d||!o)return;p.current.__escapeKeyBubbles=y,p.current.__outsidePressBubbles=k;let Y=new Qn,X=new Qn;function ee(){Y.clear(),w.current=!0}function J(){Y.start(so.engine.webkit?5:0,()=>{w.current=!1})}function $(){x.current=!0,X.start(0,()=>{x.current=!1})}function q(){S.current=!1,_.current=!1}function K(){let ie=T.current,oe=ie==="pen"||!ie?"mouse":ie,Ae=v(),me=typeof Ae=="function"?Ae():Ae;return typeof me=="string"?me:me[oe]}function Q(ie){let oe=K();return oe==="intentional"&&ie.type!=="click"||oe==="sloppy"&&ie.type==="click"}function re(ie){let oe=p.current.floatingContext?.nodeId,Ae=g&&Ra(g.nodesRef.current,oe).some(me=>rI(ie,me.context?.elements.floating));return L(ie)||Ae}function se(ie){if(Q(ie)){ie.type!=="click"&&!L(ie)&&(X.clear(),x.current=!1),O();return}if(p.current.insideReactTree){O();return}let oe=ko(ie),Ae=`[${ad("inert")}]`,me=qe(oe)?oe.getRootNode():null,xe=Array.from((zc(me)?me:Ye(u.select("floatingElement"))).querySelectorAll(Ae)),nt=u.context.triggerElements;if(oe&&(nt.hasElement(oe)||nt.hasMatchingElement(it=>je(it,oe))))return;let ut=qe(oe)?oe:null;for(;ut&&!Ll(ut);){let it=Ol(ut);if(Ll(it)||!qe(it))break;ut=it}if(!(xe.length&&qe(oe)&&!nte(oe)&&!je(oe,u.select("floatingElement"))&&xe.every(it=>!je(ut,it)))){if(_t(oe)&&!("touches"in ie)){let it=Ll(oe),xt=qr(oe),tt=/auto|scroll/,$t=it||tt.test(xt.overflowX),dt=it||tt.test(xt.overflowY),co=$t&&oe.clientWidth>0&&oe.scrollWidth>oe.clientWidth,at=dt&&oe.clientHeight>0&&oe.scrollHeight>oe.clientHeight,Be=xt.direction==="rtl",Te=at&&(Be?ie.offsetX<=oe.offsetWidth-oe.clientWidth:ie.offsetX>oe.clientWidth),Ne=co&&ie.offsetY>oe.clientHeight;if(Te||Ne)return}if(!re(ie)){if(K()==="intentional"&&x.current){X.clear(),x.current=!1;return}typeof h=="function"&&!h(ie)||P("__outsidePressBubbles")||(u.setOpen(!1,Ue(Re.outsidePress,ie)),O())}}}function te(ie){K()!=="sloppy"||ie.pointerType==="touch"||!u.select("open")||!o||L(ie)||se(ie)}function ne(ie){if(K()!=="sloppy"||!u.select("open")||!o||L(ie))return;let oe=ie.touches[0];oe&&(B.current={startTime:Date.now(),startX:oe.clientX,startY:oe.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},R.start(1e3,()=>{B.current&&(B.current.dismissOnTouchEnd=!1,B.current.dismissOnMouseDown=!1)}))}function de(ie,oe){let Ae=ko(ie);if(!Ae)return;let me=Je(Ae,ie.type,()=>{oe(ie),me()})}function Se(ie){T.current="touch",de(ie,ne)}function Ee(ie){R.clear(),ie.type==="pointerdown"&&(T.current=ie.pointerType),!(ie.type==="mousedown"&&B.current&&!B.current.dismissOnMouseDown)&&de(ie,oe=>{oe.type==="pointerdown"?te(oe):se(oe)})}function ve(ie){if(!S.current)return;let oe=_.current;if(q(),K()==="intentional"){if(ie.type==="pointercancel"){oe&&$();return}if(!re(ie)){if(oe){$();return}typeof h=="function"&&!h(ie)||(X.clear(),x.current=!0,O())}}}function be(ie){if(K()!=="sloppy"||!B.current||L(ie))return;let oe=ie.touches[0];if(!oe)return;let Ae=Math.abs(oe.clientX-B.current.startX),me=Math.abs(oe.clientY-B.current.startY),xe=Math.sqrt(Ae*Ae+me*me);xe>5&&(B.current.dismissOnTouchEnd=!0),xe>10&&(se(ie),R.clear(),B.current=null)}function ge(ie){de(ie,be)}function he(ie){K()!=="sloppy"||!B.current||L(ie)||(B.current.dismissOnTouchEnd&&se(ie),R.clear(),B.current=null)}function ye(ie){de(ie,he)}let _e=Ye(f),we=ei(r&&ei(Je(_e,"keydown",z),Je(_e,"compositionstart",ee),Je(_e,"compositionend",J)),b&&ei(Je(_e,"click",Ee,!0),Je(_e,"pointerdown",Ee,!0),Je(_e,"pointerup",ve,!0),Je(_e,"pointercancel",ve,!0),Je(_e,"mousedown",Ee,!0),Je(_e,"mouseup",ve,!0),Je(_e,"touchstart",Se,!0),Je(_e,"touchmove",ge,!0),Je(_e,"touchend",ye,!0)));return()=>{we(),Y.clear(),X.clear(),q(),x.current=!1}},[p,f,r,b,h,d,o,y,k,z,O,v,P,L,g,u,R]),ss.useEffect(O,[h,O]);let D=ss.useMemo(()=>({onKeyDown:z,onPointerDown:M,onClick:M}),[z,M]),j=ss.useMemo(()=>({onKeyDown:z,onPointerDown:N,onMouseDown:N,onClickCapture:V,onMouseDownCapture(Y){V(),I(Y)},onPointerDownCapture(Y){V(),I(Y)},onMouseUpCapture:V,onTouchEndCapture:V,onTouchMoveCapture:V}),[z,V,I,N]);return ss.useMemo(()=>o?{reference:D,floating:j,trigger:D}:{},[o,D,j])}var oi=c(le(),1);function Ute(e,t,o){let{reference:r,floating:n}=e,i=ns(t),s=r0(t),a=o0(s),l=Mn(t),u=i==="y",d=r.x+r.width/2-n.width/2,f=r.y+r.height/2-n.height/2,p=r[a]/2-n[a]/2,g;switch(l){case"top":g={x:d,y:r.y-n.height};break;case"bottom":g={x:d,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:f};break;case"left":g={x:r.x-n.width,y:f};break;default:g={x:r.x,y:r.y}}switch(Vl(t)){case"start":g[s]-=p*(o&&u?-1:1);break;case"end":g[s]+=p*(o&&u?-1:1);break}return g}async function $te(e,t){var o;t===void 0&&(t={});let{x:r,y:n,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:p=!1,padding:g=0}=Dl(t,e),m=cI(g),b=a[p?f==="floating"?"reference":"floating":f],v=sd(await i.getClippingRect({element:(o=await(i.isElement==null?void 0:i.isElement(b)))==null||o?b:b.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:u,rootBoundary:d,strategy:l})),y=f==="floating"?{x:r,y:n,width:s.floating.width,height:s.floating.height}:s.reference,k=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),S=await(i.isElement==null?void 0:i.isElement(k))?await(i.getScale==null?void 0:i.getScale(k))||{x:1,y:1}:{x:1,y:1},_=sd(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:k,strategy:l}):y);return{top:(v.top-_.top+m.top)/S.y,bottom:(_.bottom-v.bottom+m.bottom)/S.y,left:(v.left-_.left+m.left)/S.x,right:(_.right-v.right+m.right)/S.x}}var IFe=50,Kte=async(e,t,o)=>{let{placement:r="bottom",strategy:n="absolute",middleware:i=[],platform:s}=o,a=s.detectOverflow?s:{...s,detectOverflow:$te},l=await(s.isRTL==null?void 0:s.isRTL(t)),u=await s.getElementRects({reference:e,floating:t,strategy:n}),{x:d,y:f}=Ute(u,r,l),p=r,g=0,m={};for(let h=0;h<i.length;h++){let b=i[h];if(!b)continue;let{name:v,fn:y}=b,{x:k,y:S,data:_,reset:x}=await y({x:d,y:f,initialPlacement:r,placement:p,strategy:n,middlewareData:m,rects:u,platform:a,elements:{reference:e,floating:t}});d=k??d,f=S??f,m[v]={...m[v],..._},x&&g<IFe&&(g++,typeof x=="object"&&(x.placement&&(p=x.placement),x.rects&&(u=x.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:n}):x.rects),{x:d,y:f}=Ute(u,p,l)),h=-1)}return{x:d,y:f,placement:p,strategy:n,middlewareData:m}};var Yte=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var o,r;let{placement:n,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:h=!0,...b}=Dl(e,t);if((o=i.arrow)!=null&&o.alignmentOffset)return{};let v=Mn(n),y=ns(a),k=Mn(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(u.floating)),_=p||(k||!h?[Jw(a)]:hte(a)),x=m!=="none";!p&&x&&_.push(...bte(a,h,m,S));let w=[a,..._],T=await l.detectOverflow(t,b),B=[],R=((r=i.flip)==null?void 0:r.overflows)||[];if(d&&B.push(T[v]),f){let L=gte(n,s,S);B.push(T[L[0]],T[L[1]])}if(R=[...R,{placement:n,overflows:B}],!B.every(L=>L<=0)){var A,O;let L=(((A=i.flip)==null?void 0:A.index)||0)+1,M=w[L];if(M&&(!(f==="alignment"?y!==ns(M):!1)||R.every(I=>ns(I.placement)===y?I.overflows[0]>0:!0)))return{data:{index:L,overflows:R},reset:{placement:M}};let z=(O=R.filter(V=>V.overflows[0]<=0).sort((V,I)=>V.overflows[1]-I.overflows[1])[0])==null?void 0:O.placement;if(!z)switch(g){case"bestFit":{var P;let V=(P=R.filter(I=>{if(x){let N=ns(I.placement);return N===y||N==="y"}return!0}).map(I=>[I.placement,I.overflows.filter(N=>N>0).reduce((N,D)=>N+D,0)]).sort((I,N)=>I[1]-N[1])[0])==null?void 0:P[0];V&&(z=V);break}case"initialPlacement":z=a;break}if(n!==z)return{reset:{placement:z}}}return{}}}};function Gte(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Wte(e){return mte.some(t=>e[t]>=0)}var qte=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:o,platform:r}=t,{strategy:n="referenceHidden",...i}=Dl(e,t);switch(n){case"referenceHidden":{let s=await r.detectOverflow(t,{...i,elementContext:"reference"}),a=Gte(s,o.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Wte(a)}}}case"escaped":{let s=await r.detectOverflow(t,{...i,altBoundary:!0}),a=Gte(s,o.floating);return{data:{escapedOffsets:a,escaped:Wte(a)}}}default:return{}}}}};var Zte=new Set(["left","top"]);async function OFe(e,t){let{placement:o,platform:r,elements:n}=e,i=await(r.isRTL==null?void 0:r.isRTL(n.floating)),s=Mn(o),a=Vl(o),l=ns(o)==="y",u=Zte.has(s)?-1:1,d=i&&l?-1:1,f=Dl(t,e),{mainAxis:p,crossAxis:g,alignmentAxis:m}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof m=="number"&&(g=a==="end"?m*-1:m),l?{x:g*d,y:p*u}:{x:p*u,y:g*d}}var Xte=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var o,r;let{x:n,y:i,placement:s,middlewareData:a}=t,l=await OFe(t,e);return s===((o=a.offset)==null?void 0:o.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:n+l.x,y:i+l.y,data:{...l,placement:s}}}}},Qte=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:o,y:r,placement:n,platform:i}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:v=>{let{x:y,y:k}=v;return{x:y,y:k}}},...u}=Dl(e,t),d={x:o,y:r},f=await i.detectOverflow(t,u),p=ns(Mn(n)),g=lI(p),m=d[g],h=d[p];if(s){let v=g==="y"?"top":"left",y=g==="y"?"bottom":"right",k=m+f[v],S=m-f[y];m=t0(k,m,S)}if(a){let v=p==="y"?"top":"left",y=p==="y"?"bottom":"right",k=h+f[v],S=h-f[y];h=t0(k,h,S)}let b=l.fn({...t,[g]:m,[p]:h});return{...b,data:{x:b.x-o,y:b.y-r,enabled:{[g]:s,[p]:a}}}}}},Jte=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:o,y:r,placement:n,rects:i,middlewareData:s}=t,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=Dl(e,t),d={x:o,y:r},f=ns(n),p=lI(f),g=d[p],m=d[f],h=Dl(a,t),b=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(l){let k=p==="y"?"height":"width",S=i.reference[p]-i.floating[k]+b.mainAxis,_=i.reference[p]+i.reference[k]-b.mainAxis;g<S?g=S:g>_&&(g=_)}if(u){var v,y;let k=p==="y"?"width":"height",S=Zte.has(Mn(n)),_=i.reference[f]-i.floating[k]+(S&&((v=s.offset)==null?void 0:v[f])||0)+(S?0:b.crossAxis),x=i.reference[f]+i.reference[k]+(S?0:((y=s.offset)==null?void 0:y[f])||0)-(S?b.crossAxis:0);m<_?m=_:m>x&&(m=x)}return{[p]:g,[f]:m}}}},eoe=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var o,r;let{placement:n,rects:i,platform:s,elements:a}=t,{apply:l=()=>{},...u}=Dl(e,t),d=await s.detectOverflow(t,u),f=Mn(n),p=Vl(n),g=ns(n)==="y",{width:m,height:h}=i.floating,b,v;f==="top"||f==="bottom"?(b=f,v=p===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(v=f,b=p==="end"?"top":"bottom");let y=h-d.top-d.bottom,k=m-d.left-d.right,S=kp(h-d[b],y),_=kp(m-d[v],k),x=!t.middlewareData.shift,w=S,T=_;if((o=t.middlewareData.shift)!=null&&o.enabled.x&&(T=k),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(w=y),x&&!p){let R=Ti(d.left,0),A=Ti(d.right,0),O=Ti(d.top,0),P=Ti(d.bottom,0);g?T=m-2*(R!==0||A!==0?R+A:Ti(d.left,d.right)):w=h-2*(O!==0||P!==0?O+P:Ti(d.top,d.bottom))}await l({...t,availableWidth:T,availableHeight:w});let B=await s.getDimensions(a.floating);return m!==B.width||h!==B.height?{reset:{rects:!0}}:{}}}};function noe(e){let t=qr(e),o=parseFloat(t.width)||0,r=parseFloat(t.height)||0,n=_t(e),i=n?e.offsetWidth:o,s=n?e.offsetHeight:r,a=_p(o)!==i||_p(r)!==s;return a&&(o=i,r=s),{width:o,height:r,$:a}}function Xj(e){return qe(e)?e:e.contextElement}function yv(e){let t=Xj(e);if(!_t(t))return Nl(1);let o=t.getBoundingClientRect(),{width:r,height:n,$:i}=noe(t),s=(i?_p(o.width):o.width)/r,a=(i?_p(o.height):o.height)/n;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}var AFe=Nl(0);function ioe(e){let t=kt(e);return!XP()||!t.visualViewport?AFe:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function LFe(e,t,o){return t===void 0&&(t=!1),!o||t&&o!==kt(e)?!1:t}function kh(e,t,o,r){t===void 0&&(t=!1),o===void 0&&(o=!1);let n=e.getBoundingClientRect(),i=Xj(e),s=Nl(1);t&&(r?qe(r)&&(s=yv(r)):s=yv(e));let a=LFe(i,o,r)?ioe(i):Nl(0),l=(n.left+a.x)/s.x,u=(n.top+a.y)/s.y,d=n.width/s.x,f=n.height/s.y;if(i){let p=kt(i),g=r&&qe(r)?kt(r):r,m=p,h=QP(m);for(;h&&r&&g!==m;){let b=yv(h),v=h.getBoundingClientRect(),y=qr(h),k=v.left+(h.clientLeft+parseFloat(y.paddingLeft))*b.x,S=v.top+(h.clientTop+parseFloat(y.paddingTop))*b.y;l*=b.x,u*=b.y,d*=b.x,f*=b.y,l+=k,u+=S,m=kt(h),h=QP(m)}}return sd({width:d,height:f,x:l,y:u})}function hI(e,t){let o=Ww(e).scrollLeft;return t?t.left+o:kh(Al(e)).left+o}function soe(e,t){let o=e.getBoundingClientRect(),r=o.left+t.scrollLeft-hI(e,o),n=o.top+t.scrollTop;return{x:r,y:n}}function MFe(e){let{elements:t,rect:o,offsetParent:r,strategy:n}=e,i=n==="fixed",s=Al(r),a=t?Gw(t.floating):!1;if(r===s||a&&i)return o;let l={scrollLeft:0,scrollTop:0},u=Nl(1),d=Nl(0),f=_t(r);if((f||!f&&!i)&&((Br(r)!=="body"||jc(s))&&(l=Ww(r)),f)){let g=kh(r);u=yv(r),d.x=g.x+r.clientLeft,d.y=g.y+r.clientTop}let p=s&&!f&&!i?soe(s,l):Nl(0);return{width:o.width*u.x,height:o.height*u.y,x:o.x*u.x-l.scrollLeft*u.x+d.x+p.x,y:o.y*u.y-l.scrollTop*u.y+d.y+p.y}}function NFe(e){return Array.from(e.getClientRects())}function DFe(e){let t=Al(e),o=Ww(e),r=e.ownerDocument.body,n=Ti(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Ti(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),s=-o.scrollLeft+hI(e),a=-o.scrollTop;return qr(r).direction==="rtl"&&(s+=Ti(t.clientWidth,r.clientWidth)-n),{width:n,height:i,x:s,y:a}}var toe=25;function VFe(e,t){let o=kt(e),r=Al(e),n=o.visualViewport,i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(n){i=n.width,s=n.height;let d=XP();(!d||d&&t==="fixed")&&(a=n.offsetLeft,l=n.offsetTop)}let u=hI(r);if(u<=0){let d=r.ownerDocument,f=d.body,p=getComputedStyle(f),g=d.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,m=Math.abs(r.clientWidth-f.clientWidth-g);m<=toe&&(i-=m)}else u<=toe&&(i+=u);return{width:i,height:s,x:a,y:l}}function FFe(e,t){let o=kh(e,!0,t==="fixed"),r=o.top+e.clientTop,n=o.left+e.clientLeft,i=_t(e)?yv(e):Nl(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=n*i.x,u=r*i.y;return{width:s,height:a,x:l,y:u}}function ooe(e,t,o){let r;if(t==="viewport")r=VFe(e,o);else if(t==="document")r=DFe(Al(e));else if(qe(t))r=FFe(t,o);else{let n=ioe(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return sd(r)}function aoe(e,t){let o=Ol(e);return o===t||!qe(o)||Ll(o)?!1:qr(o).position==="fixed"||aoe(o,t)}function zFe(e,t){let o=t.get(e);if(o)return o;let r=yp(e,[],!1).filter(a=>qe(a)&&Br(a)!=="body"),n=null,i=qr(e).position==="fixed",s=i?Ol(e):e;for(;qe(s)&&!Ll(s);){let a=qr(s),l=ZP(s);!l&&a.position==="fixed"&&(n=null),(i?!l&&!n:!l&&a.position==="static"&&!!n&&(n.position==="absolute"||n.position==="fixed")||jc(s)&&!l&&aoe(e,s))?r=r.filter(d=>d!==s):n=a,s=Ol(s)}return t.set(e,r),r}function jFe(e){let{element:t,boundary:o,rootBoundary:r,strategy:n}=e,s=[...o==="clippingAncestors"?Gw(t)?[]:zFe(t,this._c):[].concat(o),r],a=ooe(t,s[0],n),l=a.top,u=a.right,d=a.bottom,f=a.left;for(let p=1;p<s.length;p++){let g=ooe(t,s[p],n);l=Ti(g.top,l),u=kp(g.right,u),d=kp(g.bottom,d),f=Ti(g.left,f)}return{width:u-f,height:d-l,x:f,y:l}}function HFe(e){let{width:t,height:o}=noe(e);return{width:t,height:o}}function UFe(e,t,o){let r=_t(t),n=Al(t),i=o==="fixed",s=kh(e,!0,i,t),a={scrollLeft:0,scrollTop:0},l=Nl(0);function u(){l.x=hI(n)}if(r||!r&&!i)if((Br(t)!=="body"||jc(n))&&(a=Ww(t)),r){let g=kh(t,!0,i,t);l.x=g.x+t.clientLeft,l.y=g.y+t.clientTop}else n&&u();i&&!r&&n&&u();let d=n&&!r&&!i?soe(n,a):Nl(0),f=s.left+a.scrollLeft-l.x-d.x,p=s.top+a.scrollTop-l.y-d.y;return{x:f,y:p,width:s.width,height:s.height}}function Zj(e){return qr(e).position==="static"}function roe(e,t){if(!_t(e)||qr(e).position==="fixed")return null;if(t)return t(e);let o=e.offsetParent;return Al(e)===o&&(o=o.ownerDocument.body),o}function loe(e,t){let o=kt(e);if(Gw(e))return o;if(!_t(e)){let n=Ol(e);for(;n&&!Ll(n);){if(qe(n)&&!Zj(n))return n;n=Ol(n)}return o}let r=roe(e,t);for(;r&&Dee(r)&&Zj(r);)r=roe(r,t);return r&&Ll(r)&&Zj(r)&&!ZP(r)?o:r||Vee(e)||o}var GFe=async function(e){let t=this.getOffsetParent||loe,o=this.getDimensions,r=await o(e.floating);return{reference:UFe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function WFe(e){return qr(e).direction==="rtl"}var c0={convertOffsetParentRelativeRectToViewportRelativeRect:MFe,getDocumentElement:Al,getClippingRect:jFe,getOffsetParent:loe,getElementRects:GFe,getClientRects:NFe,getDimensions:HFe,getScale:yv,isElement:qe,isRTL:WFe};function coe(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function $Fe(e,t){let o=null,r,n=Al(e);function i(){var a;clearTimeout(r),(a=o)==null||a.disconnect(),o=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();let u=e.getBoundingClientRect(),{left:d,top:f,width:p,height:g}=u;if(a||t(),!p||!g)return;let m=e0(f),h=e0(n.clientWidth-(d+p)),b=e0(n.clientHeight-(f+g)),v=e0(d),k={rootMargin:-m+"px "+-h+"px "+-b+"px "+-v+"px",threshold:Ti(0,kp(1,l))||1},S=!0;function _(x){let w=x[0].intersectionRatio;if(w!==l){if(!S)return s();w?s(!1,w):r=setTimeout(()=>{s(!1,1e-7)},1e3)}w===1&&!coe(u,e.getBoundingClientRect())&&s(),S=!1}try{o=new IntersectionObserver(_,{...k,root:n.ownerDocument})}catch{o=new IntersectionObserver(_,k)}o.observe(e)}return s(!0),i}function u0(e,t,o,r){r===void 0&&(r={});let{ancestorScroll:n=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=Xj(e),d=n||i?[...u?yp(u):[],...t?yp(t):[]]:[];d.forEach(v=>{n&&v.addEventListener("scroll",o,{passive:!0}),i&&v.addEventListener("resize",o)});let f=u&&a?$Fe(u,o):null,p=-1,g=null;s&&(g=new ResizeObserver(v=>{let[y]=v;y&&y.target===u&&g&&t&&(g.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var k;(k=g)==null||k.observe(t)})),o()}),u&&!l&&g.observe(u),t&&g.observe(t));let m,h=l?kh(e):null;l&&b();function b(){let v=kh(e);h&&!coe(h,v)&&o(),h=v,m=requestAnimationFrame(b)}return o(),()=>{var v;d.forEach(y=>{n&&y.removeEventListener("scroll",o),i&&y.removeEventListener("resize",o)}),f?.(),(v=g)==null||v.disconnect(),g=null,l&&cancelAnimationFrame(m)}}var uoe=Xte;var doe=Qte,foe=Yte,poe=eoe,moe=qte;var goe=Jte,bI=(e,t,o)=>{let r=new Map,n={platform:c0,...o},i={...n.platform,_c:r};return Kte(e,t,{...n,platform:i})};var Zr=c(le(),1),boe=c(le(),1),yoe=c(rd(),1),YFe=typeof document<"u",qFe=function(){},yI=YFe?boe.useLayoutEffect:qFe;function vI(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let o,r,n;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(o=e.length,o!==t.length)return!1;for(r=o;r--!==0;)if(!vI(e[r],t[r]))return!1;return!0}if(n=Object.keys(e),o=n.length,o!==Object.keys(t).length)return!1;for(r=o;r--!==0;)if(!{}.hasOwnProperty.call(t,n[r]))return!1;for(r=o;r--!==0;){let i=n[r];if(!(i==="_owner"&&e.$$typeof)&&!vI(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function voe(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function hoe(e,t){let o=voe(e);return Math.round(t*o)/o}function Qj(e){let t=Zr.useRef(e);return yI(()=>{t.current=e}),t}function Soe(e){e===void 0&&(e={});let{placement:t="bottom",strategy:o="absolute",middleware:r=[],platform:n,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[d,f]=Zr.useState({x:0,y:0,strategy:o,placement:t,middlewareData:{},isPositioned:!1}),[p,g]=Zr.useState(r);vI(p,r)||g(r);let[m,h]=Zr.useState(null),[b,v]=Zr.useState(null),y=Zr.useCallback(I=>{I!==x.current&&(x.current=I,h(I))},[]),k=Zr.useCallback(I=>{I!==w.current&&(w.current=I,v(I))},[]),S=i||m,_=s||b,x=Zr.useRef(null),w=Zr.useRef(null),T=Zr.useRef(d),B=l!=null,R=Qj(l),A=Qj(n),O=Qj(u),P=Zr.useCallback(()=>{if(!x.current||!w.current)return;let I={placement:t,strategy:o,middleware:p};A.current&&(I.platform=A.current),bI(x.current,w.current,I).then(N=>{let D={...N,isPositioned:O.current!==!1};L.current&&!vI(T.current,D)&&(T.current=D,yoe.flushSync(()=>{f(D)}))})},[p,t,o,A,O]);yI(()=>{u===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,f(I=>({...I,isPositioned:!1})))},[u]);let L=Zr.useRef(!1);yI(()=>(L.current=!0,()=>{L.current=!1}),[]),yI(()=>{if(S&&(x.current=S),_&&(w.current=_),S&&_){if(R.current)return R.current(S,_,P);P()}},[S,_,P,R,B]);let M=Zr.useMemo(()=>({reference:x,floating:w,setReference:y,setFloating:k}),[y,k]),z=Zr.useMemo(()=>({reference:S,floating:_}),[S,_]),V=Zr.useMemo(()=>{let I={position:o,left:0,top:0};if(!z.floating)return I;let N=hoe(z.floating,d.x),D=hoe(z.floating,d.y);return a?{...I,transform:"translate("+N+"px, "+D+"px)",...voe(z.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:N,top:D}},[o,a,z.floating,d.x,d.y]);return Zr.useMemo(()=>({...d,update:P,refs:M,elements:z,floatingStyles:V}),[d,P,M,z,V])}var Jj=(e,t)=>{let o=uoe(e);return{name:o.name,fn:o.fn,options:[e,t]}},e8=(e,t)=>{let o=doe(e);return{name:o.name,fn:o.fn,options:[e,t]}},t8=(e,t)=>({fn:goe(e).fn,options:[e,t]}),o8=(e,t)=>{let o=foe(e);return{name:o.name,fn:o.fn,options:[e,t]}},r8=(e,t)=>{let o=poe(e);return{name:o.name,fn:o.fn,options:[e,t]}};var n8=(e,t)=>{let o=moe(e);return{name:o.name,fn:o.fn,options:[e,t]}};var _v=c(le(),1),Noe=c(rd(),1);var Loe=c(le(),1);var Fe=(e,t,o,r,n,i,...s)=>{if(s.length>0)throw new Error(Pt(1));let a;if(e&&t&&o&&r&&n&&i)a=(l,u,d,f)=>{let p=e(l,u,d,f),g=t(l,u,d,f),m=o(l,u,d,f),h=r(l,u,d,f),b=n(l,u,d,f);return i(p,g,m,h,b,u,d,f)};else if(e&&t&&o&&r&&n)a=(l,u,d,f)=>{let p=e(l,u,d,f),g=t(l,u,d,f),m=o(l,u,d,f),h=r(l,u,d,f);return n(p,g,m,h,u,d,f)};else if(e&&t&&o&&r)a=(l,u,d,f)=>{let p=e(l,u,d,f),g=t(l,u,d,f),m=o(l,u,d,f);return r(p,g,m,u,d,f)};else if(e&&t&&o)a=(l,u,d,f)=>{let p=e(l,u,d,f),g=t(l,u,d,f);return o(p,g,u,d,f)};else if(e&&t)a=(l,u,d,f)=>{let p=e(l,u,d,f);return t(p,u,d,f)};else if(e)a=e;else throw new Error("Missing arguments");return a};var Ooe=c(le(),1),u8=c(s8(),1),Aoe=c(Toe(),1);var Roe=c(le(),1);var a8=[],l8;function Boe(){return l8}function Poe(e){a8.push(e)}function c8(e){let t=(o,r)=>{let n=io(p3e).current,i;try{l8=n;for(let s of a8)s.before(n);i=e(o,r);for(let s of a8)s.after(n);n.didInitialize=!0}finally{l8=void 0}return i};return t.displayName=e.displayName||e.name,t}function Ioe(e){return Roe.forwardRef(c8(e))}function p3e(){return{didInitialize:!1}}var m3e=dv(19),g3e=m3e?b3e:y3e;function Pe(e,t,o,r,n){return g3e(e,t,o,r,n)}function h3e(e,t,o,r,n){let i=Ooe.useCallback(()=>t(e.getSnapshot(),o,r,n),[e,t,o,r,n]);return(0,u8.useSyncExternalStore)(e.subscribe,i,i)}Poe({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let o=0;o<e.syncHooks.length;o+=1){let r=e.syncHooks[o],n=r.selector(r.store.state,r.a1,r.a2,r.a3);Object.is(r.value,n)||(t=!0,r.value=n)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let o=new Set;for(let n of e.syncHooks)o.add(n.store);let r=[];for(let n of o)r.push(n.subscribe(t));return()=>{for(let n of r)n()}}),(0,u8.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function b3e(e,t,o,r,n){let i=Boe();if(!i)return h3e(e,t,o,r,n);let s=i.syncIndex;i.syncIndex+=1;let a;return i.didInitialize?(a=i.syncHooks[s],(a.store!==e||a.selector!==t||!Object.is(a.a1,o)||!Object.is(a.a2,r)||!Object.is(a.a3,n))&&(a.store!==e&&(i.didChangeStore=!0),a.store=e,a.selector=t,a.a1=o,a.a2=r,a.a3=n,a.value=t(e.getSnapshot(),o,r,n))):(a={store:e,selector:t,a1:o,a2:r,a3:n,value:t(e.getSnapshot(),o,r,n)},i.syncHooks.push(a)),a.value}function y3e(e,t,o,r,n){return(0,Aoe.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,i=>t(i,o,r,n))}var Sv=class{constructor(t){this.state=t,this.listeners=new Set,this.updateTick=0}subscribe=t=>(this.listeners.add(t),()=>{this.listeners.delete(t)});getSnapshot=()=>this.state;setState(t){if(this.state===t)return;this.state=t,this.updateTick+=1;let o=this.updateTick;for(let r of this.listeners){if(o!==this.updateTick)return;r(t)}}update(t){for(let o in t)if(!Object.is(this.state[o],t[o])){this.setState({...this.state,...t});return}}set(t,o){Object.is(this.state[t],o)||this.setState({...this.state,[t]:o})}notifyAll(){let t={...this.state};this.setState(t)}use(t,o,r,n){return Pe(this,t,o,r,n)}};var _h=c(le(),1);var kv=class extends Sv{constructor(t,o={},r){super(t),this.context=o,this.selectors=r}useSyncedValue(t,o){_h.useDebugValue(t);let r=this;ae(()=>{r.state[t]!==o&&r.set(t,o)},[r,t,o])}useSyncedValueWithCleanup(t,o){let r=this;ae(()=>(r.state[t]!==o&&r.set(t,o),()=>{r.set(t,void 0)}),[r,t,o])}useSyncedValues(t){let o=this,r=Object.values(t);ae(()=>{o.update(t)},[o,...r])}useControlledProp(t,o){_h.useDebugValue(t);let r=this,n=o!==void 0;ae(()=>{n&&!Object.is(r.state[t],o)&&r.setState({...r.state,[t]:o})},[r,t,o,n])}select(t,o,r,n){let i=this.selectors[t];return i(this.state,o,r,n)}useState(t,o,r,n){return _h.useDebugValue(t),Pe(this,this.selectors[t],o,r,n)}useContextCallback(t,o){_h.useDebugValue(t);let r=pe(o??Dt);this.context[t]=r}useStateSetter(t){let o=_h.useRef(void 0);return o.current===void 0&&(o.current=r=>{this.set(t,r)}),o.current}observe(t,o){let r;typeof t=="function"?r=t:r=this.selectors[t];let n=r(this.state);return o(n,n,this),this.subscribe(i=>{let s=r(i);if(!Object.is(n,s)){let a=n;n=s,o(s,a,this)}})}};var v3e={open:Fe(e=>e.open),transitionStatus:Fe(e=>e.transitionStatus),domReferenceElement:Fe(e=>e.domReferenceElement),referenceElement:Fe(e=>e.positionReference??e.referenceElement),floatingElement:Fe(e=>e.floatingElement),floatingId:Fe(e=>e.floatingId)},Hc=class extends kv{constructor(t){let{syncOnly:o,nested:r,onOpenChange:n,triggerElements:i,...s}=t;super({...s,positionReference:s.referenceElement,domReferenceElement:s.referenceElement},{onOpenChange:n,dataRef:{current:{}},events:Dte(),nested:r,triggerElements:i},v3e),this.syncOnly=o}syncOpenEvent=(t,o)=>{(!t||!this.state.open||o!=null&&rte(o))&&(this.context.dataRef.current.openEvent=t?o:void 0)};dispatchOpenChange=(t,o)=>{this.syncOpenEvent(t,o.event);let r={open:t,reason:o.reason,nativeEvent:o.event,nested:this.context.nested,triggerElement:o.trigger};this.context.events.emit("openchange",r)};setOpen=(t,o)=>{if(this.syncOnly){this.context.onOpenChange?.(t,o);return}this.dispatchOpenChange(t,o),this.context.onOpenChange?.(t,o)}};function Moe(e){let{popupStore:t,treatPopupAsFloatingElement:o=!1,floatingRootContext:r,floatingId:n,nested:i,onOpenChange:s}=e,a=t.useState("open"),l=t.useState("activeTriggerElement"),u=t.useState(o?"popupElement":"positionerElement"),d=t.context.triggerElements,f=s,p=Loe.useRef(null);r===void 0&&p.current===null&&(p.current=new Hc({open:a,transitionStatus:void 0,referenceElement:l,floatingElement:u,triggerElements:d,onOpenChange:f,floatingId:n,syncOnly:!0,nested:i}));let g=r??p.current;return t.useSyncedValue("floatingId",n),ae(()=>{let m={open:a,floatingId:n,referenceElement:l,floatingElement:u};qe(l)&&(m.domReferenceElement=l),g.state.positionReference===g.state.referenceElement&&(m.positionReference=l),g.update(m)},[a,n,l,u,g]),g.context.onOpenChange=f,g.context.nested=i,g}var kI={tabIndex:-1,[qw]:""};function Doe(e,t,o=!1){let r=bp(),n=xp()!=null,i=_v.useRef(null);e===void 0&&i.current===null&&(i.current=t(r,n));let s=e??i.current;return Moe({popupStore:s,treatPopupAsFloatingElement:o,floatingRootContext:s.state.floatingRootContext,floatingId:r,nested:n,onOpenChange:s.setOpen}),{store:s,internalStore:i.current}}function S3e(e,t){let o=_v.useRef(null),r=_v.useRef(null);return _v.useCallback(n=>{if(e===void 0)return;let i=!1;if(o.current!==null){let s=o.current,a=r.current,l=t.context.triggerElements.getById(s);a&&l===a&&(t.context.triggerElements.delete(s),i=!0),o.current=null,r.current=null}if(n!==null&&(o.current=e,r.current=n,t.context.triggerElements.add(e,n),i=!0),i){let s=t.context.triggerElements.size;t.select("open")&&t.state.triggerCount!==s&&t.set("triggerCount",s)}},[t,e])}function k3e(e,t,o,r=!1){t?e.preventUnmountingOnClose=!1:r&&(e.preventUnmountingOnClose=!0);let n=o?.id??null;(n||t)&&(e.activeTriggerId=n,e.activeTriggerElement=o??null)}function _3e(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function Voe(e,t,o,r={}){let n=o.reason,i=n===Re.triggerHover,s=t&&n===Re.triggerFocus,a=!t&&(n===Re.triggerPress||n===Re.escapeKey),l=_3e(o);if(e.context.onOpenChange?.(t,o),o.isCanceled)return;r.onBeforeDispatch?.(),e.state.floatingRootContext.dispatchOpenChange(t,o);let u=()=>{let d={...r.extraState,open:t};s?d.instantType="focus":a?d.instantType="dismiss":i&&(d.instantType=void 0),k3e(d,t,o.trigger,l()),e.update(d)};i?Noe.flushSync(u):u()}function Foe(e,t,o,r){eI(()=>{t===void 0&&e.state.open===!1&&o&&(e.state={...e.state,open:!0,activeTriggerId:r,preventUnmountingOnClose:!1})})}function zoe(e,t,o,r){let n=o.useState("isMountedByTrigger",e),i=S3e(e,o),s=pe(a=>{if(i(a),!a)return;let l=o.select("open"),u=o.select("activeTriggerId");if(u===e){o.update({activeTriggerElement:a,...l?r:null});return}u==null&&l&&o.update({activeTriggerId:e,activeTriggerElement:a,...r})});return ae(()=>{n&&o.update({activeTriggerElement:t.current,...r})},[n,o,t,...Object.values(r)]),{registerTrigger:s,isMountedByThisTrigger:n}}function joe(e,t={}){let{closeOnActiveTriggerUnmount:o=!1}=t,r=e.useState("open"),n=e.useState("triggerCount");ae(()=>{if(!r){e.state.triggerCount!==0&&e.set("triggerCount",0);return}let i=e.context.triggerElements.size,s={};e.state.triggerCount!==i&&(s.triggerCount=i);let a=e.select("activeTriggerId"),l=null;if(a){let u=e.context.triggerElements.getById(a);u?u!==e.state.activeTriggerElement&&(s.activeTriggerElement=u):l=a}if(!l&&!a&&i===1){let u=e.context.triggerElements.entries().next();if(!u.done){let[d,f]=u.value;s.activeTriggerId=d,s.activeTriggerElement=f}}(s.triggerCount!==void 0||s.activeTriggerId!==void 0||s.activeTriggerElement!==void 0)&&e.update(s),l&&o&&queueMicrotask(()=>{if(e.select("open")&&e.select("activeTriggerId")===l&&!e.context.triggerElements.getById(l)){let u=Ue(Re.none);e.setOpen(!1,u),u.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[r,e,n,o])}function Hoe(e,t,o){let{mounted:r,setMounted:n,transitionStatus:i}=rs(e),s=t.useState("preventUnmountingOnClose"),a=e?!1:s;t.useSyncedValues({mounted:r,transitionStatus:i,preventUnmountingOnClose:a});let l=pe(()=>{n(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),o?.(),t.context.onOpenChangeComplete?.(!1)});return Xn({enabled:r&&!e&&!a,open:e,ref:t.context.popupRef,onComplete(){e||l()}}),{forceUnmount:l,transitionStatus:i}}function Uoe(e,t){e.useSyncedValues(t),ae(()=>()=>{e.update({activeTriggerProps:qt,inactiveTriggerProps:qt,popupProps:qt})},[e])}var Cp=class{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(t,o){let r=this.idMap.get(t);r!==o&&(r!==void 0&&this.elementsSet.delete(r),this.elementsSet.add(o),this.idMap.set(t,o))}delete(t){let o=this.idMap.get(t);o&&(this.elementsSet.delete(o),this.idMap.delete(t))}hasElement(t){return this.elementsSet.has(t)}hasMatchingElement(t){for(let o of this.elementsSet)if(t(o))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}};function Goe(){return new Hc({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:new Cp,floatingId:void 0,syncOnly:!1,nested:!1,onOpenChange:void 0})}function $oe(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:Goe(),floatingId:void 0,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:qt,inactiveTriggerProps:qt,popupProps:qt}}function Koe(e,t,o=!1){return new Hc({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:o,onOpenChange:void 0})}var d0=Fe(e=>e.triggerIdProp??e.activeTriggerId),d8=Fe(e=>e.openProp??e.open),Woe=Fe(e=>(e.popupElement?.id??e.floatingId)||void 0);function Yoe(e,t){return t!==void 0&&d8(e)&&d0(e)===t}function x3e(e,t){return Yoe(e,t)?!0:t!==void 0&&d8(e)&&d0(e)==null&&e.triggerCount===1}var qoe={open:d8,mounted:Fe(e=>e.mounted),transitionStatus:Fe(e=>e.transitionStatus),floatingRootContext:Fe(e=>e.floatingRootContext),triggerCount:Fe(e=>e.triggerCount),preventUnmountingOnClose:Fe(e=>e.preventUnmountingOnClose),payload:Fe(e=>e.payload),activeTriggerId:d0,activeTriggerElement:Fe(e=>e.mounted?e.activeTriggerElement:null),popupId:Woe,isTriggerActive:Fe((e,t)=>t!==void 0&&d0(e)===t),isOpenedByTrigger:Fe((e,t)=>Yoe(e,t)),isMountedByTrigger:Fe((e,t)=>t!==void 0&&d0(e)===t&&e.mounted),triggerProps:Fe((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),triggerPopupId:Fe((e,t)=>x3e(e,t)?Woe(e):void 0),popupProps:Fe(e=>e.popupProps),popupElement:Fe(e=>e.popupElement),positionerElement:Fe(e=>e.positionerElement)};function f0(e){let{open:t=!1,onOpenChange:o,elements:r={}}=e,n=bp(),i=xp()!=null,s=io(()=>new Hc({open:t,transitionStatus:void 0,onOpenChange:o,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new Cp,floatingId:n,syncOnly:!1,nested:i})).current;return ae(()=>{let a={open:t,floatingId:n};r.reference!==void 0&&(a.referenceElement=r.reference,a.domReferenceElement=qe(r.reference)?r.reference:null),r.floating!==void 0&&(a.floatingElement=r.floating),s.update(a)},[t,n,r.reference,r.floating,s]),s.context.onOpenChange=o,s.context.nested=i,s}function f8(e={}){let{nodeId:t,externalTree:o}=e,r=f0(e),n=e.rootContext||r,i=n.useState("referenceElement"),s=n.useState("floatingElement"),a=n.useState("domReferenceElement"),l=n.useState("open"),u=n.useState("floatingId"),[d,f]=oi.useState(null),[p,g]=oi.useState(void 0),[m,h]=oi.useState(void 0),b=oi.useRef(null),v=Ba(o),y=oi.useMemo(()=>({reference:i,floating:s,domReference:a}),[i,s,a]),k=Soe({...e,elements:{...y,...d&&{reference:d}}}),S=qe(p)?p:null,_=m===void 0?n.state.floatingElement:m;n.useSyncedValue("referenceElement",p??null),n.useSyncedValue("domReferenceElement",p===void 0?a:S),n.useSyncedValue("floatingElement",_);let x=oi.useCallback(O=>{let P=qe(O)?{getBoundingClientRect:()=>O.getBoundingClientRect(),getClientRects:()=>O.getClientRects(),contextElement:O}:O;f(P),k.refs.setReference(P)},[k.refs]),w=oi.useCallback(O=>{(qe(O)||O===null)&&(b.current=O,g(O)),(qe(k.refs.reference.current)||k.refs.reference.current===null||O!==null&&!qe(O))&&k.refs.setReference(O)},[k.refs,g]),T=oi.useCallback(O=>{h(O),k.refs.setFloating(O)},[k.refs]),B=oi.useMemo(()=>({...k.refs,setReference:w,setFloating:T,setPositionReference:x,domReference:b}),[k.refs,w,T,x]),R=oi.useMemo(()=>({...k.elements,domReference:a}),[k.elements,a]),A=oi.useMemo(()=>({...k,dataRef:n.context.dataRef,open:l,onOpenChange:n.setOpen,events:n.context.events,floatingId:u,refs:B,elements:R,nodeId:t,rootStore:n}),[k,B,R,t,n,l,u]);return ae(()=>{a&&(b.current=a)},[a]),ae(()=>{n.context.dataRef.current.floatingContext=A;let O=v?.nodesRef.current.find(P=>P.id===t);O&&(O.context=A)}),oi.useMemo(()=>({...k,context:A,refs:B,elements:R,rootStore:n}),[k,B,R,A,n])}var Uc=c(le(),1);var p8=so.os.mac&&so.engine.webkit;function m8(e,t={}){let{enabled:o=!0,delay:r}=t,n="rootStore"in e?e.rootStore:e,{events:i,dataRef:s}=n.context,a=Uc.useRef(!1),l=Uc.useRef(null),u=Uc.useRef(!0),d=So();Uc.useEffect(()=>{let p=n.select("domReferenceElement");if(!o)return;let g=kt(p);function m(){let v=n.select("domReferenceElement");!n.select("open")&&_t(v)&&v===Pr(Ye(v))&&(a.current=!0)}function h(){u.current=!0}function b(){u.current=!1}return ei(Je(g,"blur",m),p8&&Je(g,"keydown",h,!0),p8&&Je(g,"pointerdown",b,!0))},[n,o]),Uc.useEffect(()=>{if(!o)return;function p(g){if(g.reason===Re.triggerPress||g.reason===Re.escapeKey){let m=n.select("domReferenceElement");qe(m)&&(l.current=m,a.current=!0)}}return i.on("openchange",p),()=>{i.off("openchange",p)}},[i,o,n]);let f=Uc.useMemo(()=>{function p(){a.current=!1,l.current=null}return{onMouseLeave(){p()},onFocus(g){let m=g.currentTarget;if(a.current){if(l.current===m)return;p()}let h=ko(g.nativeEvent);if(qe(h)){if(p8&&!g.relatedTarget){if(!u.current&&!mh(h))return}else if(!ite(h))return}let b=Sp(g.relatedTarget,n.context.triggerElements),{nativeEvent:v,currentTarget:y}=g,k=typeof r=="function"?r():r;if(n.select("open")&&b||k===0||k===void 0){n.setOpen(!0,Ue(Re.triggerFocus,v,y));return}d.start(k,()=>{a.current||n.setOpen(!0,Ue(Re.triggerFocus,v,y))})},onBlur(g){p();let m=g.relatedTarget,h=g.nativeEvent,b=qe(m)&&m.hasAttribute(ad("focus-guard"))&&m.getAttribute("data-type")==="outside";d.start(0,()=>{let v=n.select("domReferenceElement"),y=Pr(Ye(v));!m&&y===v||je(s.current.floatingContext?.refs.floating.current,y)||je(v,y)||b||Sp(m??y,n.context.triggerElements)||n.setOpen(!1,Ue(Re.triggerFocus,h))})}}},[s,r,n,d]);return Uc.useMemo(()=>o?{reference:f,trigger:f}:{},[o,f])}var h8=c(le(),1);var g8=class e{constructor(){this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new Qn,this.restTimeout=new Qn,this.handleCloseOptions=void 0}static create(){return new e}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose},_I=new WeakMap;function xv(e){if(!e.performedPointerEventsMutation)return;let t=e.pointerEventsScopeElement;t&&_I.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty("pointer-events"),e.pointerEventsReferenceElement?.style.removeProperty("pointer-events"),e.pointerEventsFloatingElement?.style.removeProperty("pointer-events"),_I.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function xI(e,t){let{scopeElement:o,referenceElement:r,floatingElement:n}=t,i=_I.get(o);i&&i!==e&&xv(i),xv(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=o,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=n,_I.set(o,e),o.style.pointerEvents="none",r.style.pointerEvents="auto",n.style.pointerEvents="auto"}function wv(e){let t=e.context.dataRef.current,o=io(()=>t.hoverInteractionState??g8.create()).current;return t.hoverInteractionState||(t.hoverInteractionState=o),fv(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function b8(e,t={}){let{enabled:o=!0,closeDelay:r=0,nodeId:n}=t,i="rootStore"in e?e.rootStore:e,s=i.useState("open"),a=i.useState("floatingElement"),l=i.useState("domReferenceElement"),{dataRef:u}=i.context,d=Ba(),f=xp(),p=wv(i),g=So(),m=pe(()=>nI(u.current.openEvent?.type,p.interactedInside)),h=pe(()=>ste(u.current.openEvent?.type)),b=pe(()=>{xv(p)});ae(()=>{s||(p.pointerType=void 0,p.restTimeoutPending=!1,p.interactedInside=!1,b())},[s,p,b]),h8.useEffect(()=>b,[b]),ae(()=>{if(o&&s&&p.handleCloseOptions?.blockPointerEvents&&h()&&qe(l)&&a){let v=l,y=a,k=Ye(a),S=d?.nodesRef.current.find(T=>T.id===f)?.context?.elements.floating;S&&(S.style.pointerEvents="");let _=p.pointerEventsScopeElement!==y?p.pointerEventsScopeElement:null,x=S!==y?S:null,w=p.handleCloseOptions?.getScope?.()??_??x??v.closest("[data-rootownerid]")??k.body;return xI(p,{scopeElement:w,referenceElement:v,floatingElement:y}),()=>{b()}}},[o,s,l,a,p,h,d,f,b]),h8.useEffect(()=>{if(!o)return;function v(){return!!(d&&f&&Ra(d.nodesRef.current,f).length>0)}function y(T){let B=id(r,"close",p.pointerType),R=()=>{i.setOpen(!1,Ue(Re.triggerHover,T)),d?.events.emit("floating.closed",T)};B?p.openChangeTimeout.start(B,R):(p.openChangeTimeout.clear(),R())}function k(T){let B=ko(T);if(!Tj(B)){p.interactedInside=!1;return}p.interactedInside=B?.closest("[aria-haspopup]")!=null}function S(){p.openChangeTimeout.clear(),g.clear(),d?.events.off("floating.closed",x),b()}function _(T){if(v()&&d){d.events.on("floating.closed",x);return}if(Sp(T.relatedTarget,i.context.triggerElements))return;let B=u.current.floatingContext?.nodeId??n,R=T.relatedTarget;if(!(d&&B&&qe(R)&&Ra(d.nodesRef.current,B,!1).some(O=>je(O.context?.elements.floating,R)))){if(p.handler){p.handler(T);return}b(),h()&&!m()&&y(T)}}function x(T){!d||!f||v()||g.start(0,()=>{d.events.off("floating.closed",x),i.setOpen(!1,Ue(Re.triggerHover,T)),d.events.emit("floating.closed",T)})}let w=a;return ei(w&&Je(w,"mouseenter",S),w&&Je(w,"mouseleave",_),w&&Je(w,"pointerdown",k,!0),()=>{d?.events.off("floating.closed",x)})},[o,a,i,u,r,n,h,m,b,p,d,f,g])}var Ep=c(le(),1),Zoe=c(rd(),1);var w3e={current:null};function y8(e,t={}){let{enabled:o=!0,delay:r=0,handleClose:n=null,mouseOnly:i=!1,restMs:s=0,move:a=!0,triggerElementRef:l=w3e,externalTree:u,isActiveTrigger:d=!0,getHandleCloseContext:f,isClosing:p,shouldOpen:g}=t,m="rootStore"in e?e.rootStore:e,{dataRef:h,events:b}=m.context,v=Ba(u),y=wv(m),k=Ep.useRef(!1),S=jt(n),_=jt(r),x=jt(s),w=jt(o),T=jt(g),B=jt(p),R=pe(()=>nI(h.current.openEvent?.type,y.interactedInside)),A=pe(()=>T.current?.()!==!1),O=pe((M,z,V)=>{let I=m.context.triggerElements;if(I.hasElement(z))return!M||!je(M,z);if(!qe(V))return!1;let N=V;return I.hasMatchingElement(D=>je(D,N))&&(!M||!je(M,N))}),P=pe(()=>{if(!y.handler)return;Ye(m.select("domReferenceElement")).removeEventListener("mousemove",y.handler),y.handler=void 0}),L=pe(()=>{xv(y)});return d&&(y.handleCloseOptions=S.current?.__options),Ep.useEffect(()=>P,[P]),Ep.useEffect(()=>{if(!o)return;function M(z){z.open?k.current=!1:(k.current=z.reason===Re.triggerHover,P(),y.openChangeTimeout.clear(),y.restTimeout.clear(),y.blockMouseMove=!0,y.restTimeoutPending=!1)}return b.on("openchange",M),()=>{b.off("openchange",M)}},[o,b,y,P]),Ep.useEffect(()=>{if(!o)return;function M(N,D=!0){let j=id(_.current,"close",y.pointerType);j?y.openChangeTimeout.start(j,()=>{m.setOpen(!1,Ue(Re.triggerHover,N)),v?.events.emit("floating.closed",N)}):D&&(y.openChangeTimeout.clear(),m.setOpen(!1,Ue(Re.triggerHover,N)),v?.events.emit("floating.closed",N))}let z=l.current??(d?m.select("domReferenceElement"):null);if(!qe(z))return;function V(N){if(y.openChangeTimeout.clear(),y.blockMouseMove=!1,i&&!Ta(y.pointerType))return;let D=Rj(x.current),j=id(_.current,"open",y.pointerType),Y=ko(N),X=N.currentTarget??null,ee=m.select("domReferenceElement"),J=X;if(qe(Y)&&!m.context.triggerElements.hasElement(Y)){for(let de of m.context.triggerElements.elements())if(je(de,Y)){J=de;break}}qe(X)&&qe(ee)&&!m.context.triggerElements.hasElement(X)&&je(X,ee)&&(J=ee);let $=J==null?!1:O(ee,J,Y),q=m.select("open"),K=B.current?.()??m.select("transitionStatus")==="ending",Q=!q&&K&&k.current,re=!$&&qe(J)&&qe(ee)&&je(ee,J)&&Q,se=D>0&&!j,te=$&&(q||Q)||re,ne=!q||$;if(te){A()&&m.setOpen(!0,Ue(Re.triggerHover,N,J));return}se||(j?y.openChangeTimeout.start(j,()=>{ne&&A()&&m.setOpen(!0,Ue(Re.triggerHover,N,J))}):ne&&A()&&m.setOpen(!0,Ue(Re.triggerHover,N,J)))}function I(N){if(R()){L();return}P();let D=m.select("domReferenceElement"),j=Ye(D);y.restTimeout.clear(),y.restTimeoutPending=!1;let Y=h.current.floatingContext??f?.();if(Sp(N.relatedTarget,m.context.triggerElements))return;if(S.current&&Y){m.select("open")||y.openChangeTimeout.clear();let ee=l.current;y.handler=S.current({...Y,tree:v,x:N.clientX,y:N.clientY,onClose(){L(),P(),w.current&&!R()&&ee===m.select("domReferenceElement")&&M(N,!0)}}),j.addEventListener("mousemove",y.handler),y.handler(N);return}(y.pointerType!=="touch"||!je(m.select("floatingElement"),N.relatedTarget))&&M(N)}return a?ei(Je(z,"mousemove",V,{once:!0}),Je(z,"mouseenter",V),Je(z,"mouseleave",I)):ei(Je(z,"mouseenter",V),Je(z,"mouseleave",I))},[P,L,h,_,m,o,S,y,d,O,R,i,a,x,l,v,w,f,B,A]),Ep.useMemo(()=>{if(!o)return;function M(z){y.pointerType=z.pointerType}return{onPointerDown:M,onPointerEnter:M,onMouseMove(z){let{nativeEvent:V}=z,I=z.currentTarget,N=m.select("domReferenceElement"),D=m.select("open"),j=O(N,I,z.target);if(i&&!Ta(y.pointerType))return;if(D&&j&&y.handleCloseOptions?.blockPointerEvents){let ee=m.select("floatingElement");if(ee){let J=y.handleCloseOptions?.getScope?.()??I.ownerDocument.body;xI(y,{scopeElement:J,referenceElement:I,floatingElement:ee})}}let Y=Rj(x.current);if(D&&!j||Y===0||!j&&y.restTimeoutPending&&z.movementX**2+z.movementY**2<2)return;y.restTimeout.clear();function X(){if(y.restTimeoutPending=!1,R())return;let ee=m.select("open");!y.blockMouseMove&&(!ee||j)&&A()&&m.setOpen(!0,Ue(Re.triggerHover,V,I))}y.pointerType==="touch"?Zoe.flushSync(()=>{X()}):j&&D?X():(y.restTimeoutPending=!0,y.restTimeout.start(Y,X))}}},[o,y,R,O,i,m,x,A])}var Nn=c(le(),1);var C3e="Escape";function CI(e,t,o){switch(e){case"vertical":return t;case"horizontal":return o;default:return t||o}}function wI(e,t){return CI(t,e===Ej||e===oI,e===Zw||e===Xw)}function v8(e,t,o){return CI(t,e===oI,o?e===Zw:e===Xw)||e==="Enter"||e===" "||e===""}function E3e(e,t,o){return CI(t,o?e===Zw:e===Xw,e===oI)}function T3e(e,t,o,r){let n=o?e===Xw:e===Zw,i=e===Ej;return t==="both"||t==="horizontal"&&r?e===C3e:CI(t,n,i)}function S8(e,t){let{listRef:o,activeIndex:r,onNavigate:n=()=>{},enabled:i=!0,selectedIndex:s=null,allowEscape:a=!1,loopFocus:l=!1,nested:u=!1,rtl:d=!1,virtual:f=!1,focusItemOnOpen:p="auto",focusItemOnHover:g=!0,openOnArrowKeyDown:m=!0,disabledIndices:h=void 0,orientation:b="vertical",parentOrientation:v,id:y,resetOnPointerLeave:k=!0,externalTree:S,grid:_}=t,x=_!=null,w="rootStore"in e?e.rootStore:e,T=w.useState("open"),B=w.useState("floatingElement"),R=w.useState("domReferenceElement"),A=w.context.dataRef,O=gh(B),P=Qw(R),L=jt(O),M=xp(),z=Ba(S),V=Nn.useRef(p),I=Nn.useRef(s??-1),N=Nn.useRef(null),D=Nn.useRef(!0),j=pe(ie=>{n(I.current===-1?null:I.current,ie)}),Y=Nn.useRef(!!B),X=Nn.useRef(T),ee=Nn.useRef(!1),J=Nn.useRef(!1),$=Nn.useRef(null),q=jt(h),K=jt(T),Q=jt(s),re=jt(k),se=Ci(),te=Ci(),ne=pe(()=>{function ie(xe){f?z?.events.emit("virtualfocus",xe):$.current=bv(xe,{sync:ee.current,preventScroll:!0})}let oe=o.current[I.current],Ae=J.current;oe&&ie(oe),(ee.current?xe=>xe():xe=>se.request(xe))(()=>{let xe=o.current[I.current]||oe;if(!xe)return;oe||ie(xe),ge&&(Ae||!D.current)&&xe.scrollIntoView?.({block:"nearest",inline:"nearest"})})});ae(()=>{A.current.orientation=b},[A,b]),ae(()=>{i&&(T&&B?(I.current=s??-1,V.current&&s!=null&&(J.current=!0,j())):Y.current&&(I.current=-1,j()))},[i,T,B,s,j]),ae(()=>{if(i){if(!T){ee.current=!1;return}if(B)if(r==null){if(ee.current=!1,Q.current!=null)return;if(Y.current&&(I.current=-1,ne()),(!X.current||!Y.current)&&V.current&&(N.current!=null||V.current===!0&&N.current==null)){let ie=0,oe=()=>{o.current[0]==null?(ie<2&&(ie?me=>te.request(me):queueMicrotask)(oe),ie+=1):(I.current=N.current==null||v8(N.current,b,d)||u?uI(o):Oj(o),N.current=null,j())};oe()}}else Ij(o.current,r)||(I.current=r,ne(),J.current=!1)}},[i,T,B,r,Q,u,o,b,d,j,ne,te]),ae(()=>{if(!i||B||!z||f||!Y.current)return;let ie=z.nodesRef.current,oe=ie.find(xe=>xe.id===M)?.context?.elements.floating,Ae=Pr(Ye(R??oe??null)),me=ie.some(xe=>xe.context&&je(xe.context.elements.floating,Ae));oe&&!me&&D.current&&oe.focus({preventScroll:!0})},[i,B,R,z,M,f]),ae(()=>{X.current=T,Y.current=!!B}),ae(()=>{T||(N.current=null,V.current=p)},[T,p]);let de=r!=null,Se=pe(ie=>{if(!K.current)return;let oe=o.current.indexOf(ie.currentTarget);oe!==-1&&(I.current!==oe||r!==oe)&&(I.current=oe,j(ie))}),Ee=pe(()=>v??z?.nodesRef.current.find(ie=>ie.id===M)?.context?.dataRef?.current.orientation),ve=pe(()=>uI(o,q.current)),be=pe(ie=>{if(D.current=!1,ee.current=!0,ie.which===229||!K.current&&ie.currentTarget===L.current)return;if(u&&T3e(ie.key,b,d,x)){wI(ie.key,Ee())||js(ie),w.setOpen(!1,Ue(Re.listNavigation,ie.nativeEvent)),_t(R)&&(f?z?.events.emit("virtualfocus",R):R.focus());return}let oe=I.current,Ae=uI(o,h),me=Oj(o,h);if(P||(ie.key==="Home"&&(js(ie),I.current=Ae,j(ie)),ie.key==="End"&&(js(ie),I.current=me,j(ie))),_!=null){let xe=_(ie,I.current,o,b,l,d,h,Ae,me);if(xe!=null&&(I.current=xe,j(ie)),b==="both")return}if(wI(ie.key,b)){if(js(ie),T&&!f&&Pr(ie.currentTarget.ownerDocument)===ie.currentTarget){I.current=v8(ie.key,b,d)?Ae:me,j(ie);return}v8(ie.key,b,d)?l?oe>=me?a&&oe!==o.current.length?I.current=-1:(ee.current=!1,I.current=Ae):I.current=hh(o.current,{startingIndex:oe,disabledIndices:h}):I.current=Math.min(me,hh(o.current,{startingIndex:oe,disabledIndices:h})):l?oe<=Ae?a&&oe!==-1?I.current=o.current.length:(ee.current=!1,I.current=me):I.current=hh(o.current,{startingIndex:oe,decrement:!0,disabledIndices:h}):I.current=Math.max(Ae,hh(o.current,{startingIndex:oe,decrement:!0,disabledIndices:h})),Ij(o.current,I.current)&&(I.current=-1),j(ie)}}),ge=Nn.useMemo(()=>({onFocus(oe){ee.current=!0,Se(oe)},onClick:({currentTarget:oe})=>oe.focus({preventScroll:!0}),onMouseMove(oe){ee.current=!0,J.current=!1,g&&Se(oe)},onPointerLeave(oe){if(!K.current||!D.current||oe.pointerType==="touch")return;ee.current=!0;let Ae=oe.relatedTarget;if(!(!g||o.current.includes(Ae))&&re.current&&($.current?.(),$.current=null,I.current=-1,j(oe),!f)){let me=L.current,xe=Pr(Ye(me));me&&je(me,xe)&&me.focus({preventScroll:!0})}}}),[Se,K,L,g,o,j,re,f]),he=Nn.useMemo(()=>f&&T&&de&&{"aria-activedescendant":`${y}-${r}`},[f,T,de,y,r]),ye=Nn.useMemo(()=>({"aria-orientation":b==="both"?void 0:b,...P?{}:he,onKeyDown(ie){if(ie.key==="Tab"&&ie.shiftKey&&T&&!f){let oe=ko(ie.nativeEvent);if(oe&&!je(L.current,oe))return;js(ie),w.setOpen(!1,Ue(Re.focusOut,ie.nativeEvent)),_t(R)&&R.focus();return}be(ie)},onPointerMove(){D.current=!0}}),[he,be,L,b,P,w,T,f,R]),_e=Nn.useMemo(()=>{function ie(me){w.setOpen(!0,Ue(Re.listNavigation,me.nativeEvent,me.currentTarget))}function oe(me){p==="auto"&&gv(me.nativeEvent)&&(V.current=!f)}function Ae(me){V.current=p,p==="auto"&&tI(me.nativeEvent)&&(V.current=!0)}return{onKeyDown(me){let xe=w.select("open");D.current=!1;let nt=me.key.startsWith("Arrow"),ut=E3e(me.key,Ee(),d),it=wI(me.key,b),xt=(u?ut:it)||me.key==="Enter"||me.key.trim()==="";if(f&&xe)return be(me);if(!(!xe&&!m&&nt)){if(xt){let tt=wI(me.key,Ee());N.current=u&&tt?null:me.key}if(u){ut&&(js(me),xe?(I.current=ve(),j(me)):ie(me));return}it&&(Q.current!=null&&(I.current=Q.current),js(me),!xe&&m?ie(me):be(me),xe&&j(me))}},onFocus(me){w.select("open")&&!f&&(I.current=-1,j(me))},onPointerDown:Ae,onPointerEnter:Ae,onMouseDown:oe,onClick:oe}},[be,p,ve,u,j,w,m,b,Ee,d,Q,f]),we=Nn.useMemo(()=>({...he,..._e}),[he,_e]);return Nn.useMemo(()=>i?{reference:we,floating:ye,item:ge,trigger:_e}:{},[i,we,ye,_e,ge])}var xh=c(le(),1);function k8(e,t){let{listRef:o,elementsRef:r,activeIndex:n,onMatch:i,disabledIndices:s,onTyping:a,enabled:l=!0,resetMs:u=750,selectedIndex:d=null}=t,f="rootStore"in e?e.rootStore:e,p=f.useState("open"),g=So(),m=xh.useRef(""),h=xh.useRef(d??n??-1),b=xh.useRef(null),v=pe(S=>{function _(L){let M=r?.current[L];return!M||bh(M)}function x(L){return _(L)?s==null||!Aj(zw,L,s):!1}function w(L,M,z=0){if(L.length===0)return-1;let V=(z%L.length+L.length)%L.length,I=M.toLowerCase();for(let N=0;N<L.length;N+=1){let D=(V+N)%L.length;if(!(!L[D]?.toLowerCase().startsWith(I)||!x(D)))return D}return-1}let T=o.current;if(m.current.length>0&&S.key===" "&&(js(S),a?.(!0)),m.current.length>0&&m.current[0]!==" "&&w(T,m.current)===-1&&S.key!==" "&&a?.(!1),T==null||S.key.length!==1||S.ctrlKey||S.metaKey||S.altKey)return;p&&S.key!==" "&&(js(S),a?.(!0));let B=m.current==="";B&&(h.current=d??n??-1),T.every((L,M)=>L&&x(M)?L[0]?.toLowerCase()!==L[1]?.toLowerCase():!0)&&m.current===S.key&&(m.current="",h.current=b.current),m.current+=S.key,g.start(u,()=>{m.current="",h.current=b.current,a?.(!1)});let O=((B?d??n??-1:h.current)??0)+1,P=w(T,m.current,O);P!==-1?(i?.(P),b.current=P):S.key!==" "&&(m.current="",a?.(!1))}),y=pe(S=>{let _=S.relatedTarget,x=f.select("domReferenceElement"),w=f.select("floatingElement");je(x,_)||je(w,_)||(g.clear(),m.current="",h.current=b.current,a?.(!1))});ae(()=>{!p&&d!==null||(g.clear(),b.current=null,m.current!==""&&(m.current=""))},[p,d,g]),ae(()=>{p&&m.current===""&&(h.current=d??n??-1)},[p,d,n]);let k=xh.useMemo(()=>({onKeyDown:v,onBlur:y}),[v,y]);return xh.useMemo(()=>l?{reference:k,floating:k}:{},[l,k])}var Xoe=.1,R3e=Xoe*Xoe,ao=.5;function EI(e,t,o,r,n,i){return r>=t!=i>=t&&e<=(n-o)*(t-r)/(i-r)+o}function TI(e,t,o,r,n,i,s,a,l,u){let d=!1;return EI(e,t,o,r,n,i)&&(d=!d),EI(e,t,n,i,s,a)&&(d=!d),EI(e,t,s,a,l,u)&&(d=!d),EI(e,t,l,u,o,r)&&(d=!d),d}function B3e(e,t,o){return e>=o.x&&e<=o.x+o.width&&t>=o.y&&t<=o.y+o.height}function RI(e,t,o,r,n,i){let s=Math.min(o,n),a=Math.max(o,n),l=Math.min(r,i),u=Math.max(r,i);return e>=s&&e<=a&&t>=l&&t<=u}function _8(e={}){let{blockPointerEvents:t=!1}=e,o=new Qn,r=({x:n,y:i,placement:s,elements:a,onClose:l,nodeId:u,tree:d})=>{let f=s?.split("-")[0],p=!1,g=null,m=null,h=typeof performance<"u"?performance.now():0;function b(y,k){let S=performance.now(),_=S-h;if(g===null||m===null||_===0)return g=y,m=k,h=S,!1;let x=y-g,w=k-m,T=x*x+w*w,B=_*_*R3e;return g=y,m=k,h=S,T<B}function v(){o.clear(),l()}return function(k){o.clear();let S=a.domReference,_=a.floating;if(!S||!_||f==null||n==null||i==null)return;let{clientX:x,clientY:w}=k,T=ko(k),B=k.type==="mouseleave",R=je(_,T),A=je(S,T);if(R&&(p=!0,!B))return;if(A&&(p=!1,!B)){p=!0;return}if(B&&qe(k.relatedTarget)&&je(_,k.relatedTarget))return;function O(){return!!(d&&Ra(d.nodesRef.current,u).length>0)}function P(){O()||v()}if(O())return;let L=S.getBoundingClientRect(),M=_.getBoundingClientRect(),z=n>M.right-M.width/2,V=i>M.bottom-M.height/2,I=M.width>L.width,N=M.height>L.height,D=(I?L:M).left,j=(I?L:M).right,Y=(N?L:M).top,X=(N?L:M).bottom;if(f==="top"&&i>=L.bottom-1||f==="bottom"&&i<=L.top+1||f==="left"&&n>=L.right-1||f==="right"&&n<=L.left+1){P();return}let ee=!1;switch(f){case"top":ee=RI(x,w,D,L.top+1,j,M.bottom-1);break;case"bottom":ee=RI(x,w,D,M.top+1,j,L.bottom-1);break;case"left":ee=RI(x,w,M.right-1,X,L.left+1,Y);break;case"right":ee=RI(x,w,L.right-1,X,M.left+1,Y);break;default:}if(ee)return;if(p&&!B3e(x,w,L)){P();return}if(!B&&b(x,w)){P();return}let J=!1;switch(f){case"top":{let $=I?ao/2:ao*4,q=I||z?n+$:n-$,K=I?n-$:z?n+$:n-$,Q=i+ao+1,re=z||I?M.bottom-ao:M.top,se=z?I?M.bottom-ao:M.top:M.bottom-ao;J=TI(x,w,q,Q,K,Q,M.left,re,M.right,se);break}case"bottom":{let $=I?ao/2:ao*4,q=I||z?n+$:n-$,K=I?n-$:z?n+$:n-$,Q=i-ao,re=z||I?M.top+ao:M.bottom,se=z?I?M.top+ao:M.bottom:M.top+ao;J=TI(x,w,q,Q,K,Q,M.left,re,M.right,se);break}case"left":{let $=N?ao/2:ao*4,q=N||V?i+$:i-$,K=N?i-$:V?i+$:i-$,Q=n+ao+1,re=V||N?M.right-ao:M.left,se=V?N?M.right-ao:M.left:M.right-ao;J=TI(x,w,re,M.top,se,M.bottom,Q,q,Q,K);break}case"right":{let $=N?ao/2:ao*4,q=N||V?i+$:i-$,K=N?i-$:V?i+$:i-$,Q=n-ao,re=V||N?M.left+ao:M.right,se=V?N?M.left+ao:M.right:M.left+ao;J=TI(x,w,Q,q,Q,K,re,M.top,se,M.bottom);break}default:}J?p||o.start(40,P):P()}};return r.__options={...e,blockPointerEvents:t},r}var x8=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Fc.startingStyle]="startingStyle",e[e.endingStyle=Fc.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e})({}),p0=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({}),P3e={[p0.popupOpen]:""},I3e={[p0.popupOpen]:"",[p0.pressed]:""},O3e={[x8.open]:""},A3e={[x8.closed]:""},L3e={[x8.anchorHidden]:""},BI={open(e){return e?P3e:null}},Qoe={open(e){return e?I3e:null}},Pa={open(e){return e?O3e:A3e},anchorHidden(e){return e?L3e:null}};var M3e="ArrowUp",N3e="ArrowDown",D3e="ArrowLeft",V3e="ArrowRight",F3e="Home",z3e="End";var j3e=new Set([D3e,V3e]);var H3e=new Set([M3e,N3e]);var U3e=new Set([...j3e,...H3e]),Joe=new Set([...U3e,F3e,z3e]);function PI(e){return dv(19)?e:e?"true":void 0}var ere=c(le(),1),tre=c(E(),1),ore=ere.forwardRef(function(t,o){let{cutout:r,...n}=t,i;if(r){let s=r.getBoundingClientRect();i=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${s.left}px ${s.top}px,${s.left}px ${s.bottom}px,${s.right}px ${s.bottom}px,${s.right}px ${s.top}px,${s.left}px ${s.top}px)`}return(0,tre.jsx)("div",{ref:o,role:"presentation","data-base-ui-inert":"",...n,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:i}})});var g0=c(le(),1);var m0=c(le(),1);function rre(e){let t=m0.useRef(""),o=m0.useCallback(n=>{n.defaultPrevented||(t.current=n.pointerType,e(n,n.pointerType))},[e]);return{onClick:m0.useCallback(n=>{if(n.detail===0){e(n,"keyboard");return}"pointerType"in n?e(n,n.pointerType):e(n,t.current),t.current=""},[e]),onPointerDown:o}}var nre=c(le(),1);function II(e,t){let o=nre.useRef(e),r=pe(t);ae(()=>{o.current!==e&&r(o.current)},[e,r]),ae(()=>{o.current=e},[e])}function G3e(e,t){let o=pe((i,s)=>{(typeof e=="function"?e():e)||t(s||(so.os.ios?"touch":""))}),{onClick:r,onPointerDown:n}=rre(o);return g0.useMemo(()=>({onClick:r,onPointerDown:n}),[r,n])}function ire(e){let[t,o]=g0.useState(null),r=G3e(e,o);return II(e,n=>{n&&!e&&o(null)}),g0.useMemo(()=>({openMethod:t,triggerProps:r}),[t,r])}var sre=(e,t)=>Object.is(e,t);function Gc(e,t,o){return e==null||t==null?Object.is(e,t):o(e,t)}function are(e,t,o){return!e||e.length===0?!1:e.some(r=>r===void 0?!1:Gc(t,r,o))}function wh(e,t,o){return!e||e.length===0?-1:e.findIndex(r=>r===void 0?!1:Gc(r,t,o))}function lre(e,t,o){return e.filter(r=>!Gc(t,r,o))}var cre=c(le(),1);function OI(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}var ure=c(E(),1);function dre(e){return e!=null&&e.length>0&&typeof e[0]=="object"&&e[0]!=null&&"items"in e[0]}function fre(e){if(!Array.isArray(e))return e!=null&&"null"in e;let t=e;if(dre(t)){for(let o of t)for(let r of o.items)if(r&&r.value==null&&r.label!=null)return!0;return!1}for(let o of t)if(o&&o.value==null&&o.label!=null)return!0;return!1}function w8(e,t){if(t&&e!=null)return t(e)??"";if(e&&typeof e=="object"){if("label"in e&&e.label!=null)return String(e.label);if("value"in e)return String(e.value)}return OI(e)}function ld(e,t){return t&&e!=null?t(e)??"":e&&typeof e=="object"&&"value"in e&&"label"in e?OI(e.value):OI(e)}function C8(e,t,o){function r(){return w8(e,o)}if(o&&e!=null)return o(e);if(e&&typeof e=="object"&&"label"in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return t[e]??r();if(Array.isArray(t)){let n=t,i=dre(n)?n.flatMap(s=>s.items):n;if(e==null||typeof e!="object"){let s=i.find(a=>a.value===e);return s&&s.label!=null?s.label:r()}if("value"in e){let s=i.find(a=>a&&a.value===e.value);if(s&&s.label!=null)return s.label}}return r()}function pre(e,t,o){return e.reduce((r,n,i)=>(i>0&&r.push(", "),r.push((0,ure.jsx)(cre.Fragment,{children:C8(n,t,o)},i)),r),[])}var AI=c(le(),1);var E8=(function(e){return e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});var Ch={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},Cv={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},mre={disabled:!1,...Cv},ri={valid(e){return e===null?null:e?{[E8.valid]:""}:{[E8.invalid]:""}}};var W3e={invalid:void 0,name:void 0,validityData:{state:Ch,errors:[],error:"",value:"",initialValue:null},setValidityData:Dt,disabled:void 0,touched:Cv.touched,setTouched:Dt,dirty:Cv.dirty,setDirty:Dt,filled:Cv.filled,setFilled:Dt,focused:Cv.focused,setFocused:Dt,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:mre,markedDirtyRef:{current:!1},registerFieldControl:Dt,validation:{getValidationProps:(e,t=qt)=>t,inputRef:{current:null},registerInput:Dt,commit:async()=>{},change:Dt}},T8=AI.createContext(W3e);function Xr(e=!0){let t=AI.useContext(T8);if(t.setValidityData===Dt&&!e)throw new Error(Pt(28));return t}var gre=c(le(),1);function LI(e,t,o,r,n=!0,i){let{registerFieldControl:s}=Xr(),a=gre.useRef(null);a.current||(a.current=Symbol()),ae(()=>{let l=a.current;return!l||!n?void 0:(s(l,{controlRef:e,getValue:r,id:t,name:i,value:o}),()=>{s(l,void 0)})},[e,n,r,t,i,s,o])}var MI=c(le(),1);var $3e=MI.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:Dt,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});function Ia(){return MI.useContext($3e)}var h0=c(le(),1);var NI=c(le(),1);var R8=NI.createContext({controlId:void 0,registerControlId:Dt,labelId:void 0,setLabelId:Dt,messageIds:[],setMessageIds:Dt,getDescriptionProps:e=>e});function hn(){return NI.useContext(R8)}function Ev(e={}){let{id:t,implicit:o=!1,controlRef:r}=e,{controlId:n,registerControlId:i}=hn(),s=Zn(t),a=o?n:void 0,l=io(()=>Symbol("labelable-control")),u=h0.useRef(!1),d=h0.useRef(t!=null),f=pe(()=>{!u.current||i===Dt||(u.current=!1,i(l.current,void 0))});return ae(()=>{if(i===Dt)return;let p;if(o){let g=r?.current;qe(g)&&g.closest("label")!=null?p=t??null:p=a??s}else if(t!=null)d.current=!0,p=t;else if(d.current)p=s;else{f();return}if(p===void 0){f();return}u.current=!0,i(l.current,p)},[t,r,a,i,o,s,l,f]),h0.useEffect(()=>f,[f]),n??s}function hre(e,t,o=(r,n)=>r===n){return e.length===t.length&&e.every((r,n)=>o(r,t[n]))}function bre(e){let t=e.getBoundingClientRect(),o=kt(e);if(so.env.jsdom)return t;let r=o.getComputedStyle(e,"::before"),n=o.getComputedStyle(e,"::after");if(!(r.content!=="none"||n.content!=="none"))return t;let s=parseFloat(r.width)||0,a=parseFloat(r.height)||0,l=parseFloat(n.width)||0,u=parseFloat(n.height)||0,d=Math.max(t.width,s,l),f=Math.max(t.height,a,u),p=d-t.width,g=f-t.height;return{left:t.left-p/2,right:t.right+p/2,top:t.top-g/2,bottom:t.bottom+g/2}}function yre(e){return e==null?void 0:`${e}-label`}function vre(e,t){return e??t}var Hs=c(le(),1);var K3e=e=>({name:"arrow",options:e,async fn(t){let{x:o,y:r,placement:n,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:u,padding:d=0,offsetParent:f="real"}=Dl(e,t)||{};if(u==null)return{};let p=cI(d),g={x:o,y:r},m=r0(n),h=o0(m),b=await s.getDimensions(u),v=m==="y",y=v?"top":"left",k=v?"bottom":"right",S=v?"clientHeight":"clientWidth",_=i.reference[h]+i.reference[m]-g[m]-i.floating[h],x=g[m]-i.reference[m],w=f==="real"?await s.getOffsetParent?.(u):a.floating,T=a.floating[S]||i.floating[h];(!T||!await s.isElement?.(w))&&(T=a.floating[S]||i.floating[h]);let B=_/2-x/2,R=T/2-b[h]/2-1,A=Math.min(p[y],R),O=Math.min(p[k],R),P=A,L=T-b[h]-O,M=T/2-b[h]/2+B,z=t0(P,M,L),V=!l.arrow&&Vl(n)!=null&&M!==z&&i.reference[h]/2-(M<P?A:O)-b[h]/2<0,I=V?M<P?M-P:M-L:0;return{[m]:g[m]+I,data:{[m]:z,centerOffset:M-z-I,...V&&{alignmentOffset:I}},reset:V}}}),Sre=(e,t)=>({...K3e(e),options:[e,t]});var Y3e=n8().fn,kre={name:"hide",async fn(e){let{width:t,height:o,x:r,y:n}=e.rects.reference,i=t===0&&o===0&&r===0&&n===0;return{data:{referenceHidden:(await Y3e(e)).data?.referenceHidden||i}}}};var b0={sideX:"left",sideY:"top"},_re={name:"adaptiveOrigin",async fn(e){let{x:t,y:o,rects:{floating:r},elements:{floating:n},platform:i,strategy:s,placement:a}=e,l=kt(n),u=l.getComputedStyle(n);if(!(u.transitionDuration!=="0s"&&u.transitionDuration!==""))return{x:t,y:o,data:b0};let f=await i.getOffsetParent?.(n),p={width:0,height:0};if(s==="fixed"&&l?.visualViewport)p={width:l.visualViewport.width,height:l.visualViewport.height};else if(f===l){let y=Ye(n);p={width:y.documentElement.clientWidth,height:y.documentElement.clientHeight}}else await i.isElement?.(f)&&(p=await i.getDimensions(f));let g=Mn(a),m=t,h=o;g==="left"&&(m=p.width-(t+r.width)),g==="top"&&(h=p.height-(o+r.height));let b=g==="left"?"right":b0.sideX,v=g==="top"?"bottom":b0.sideY;return{x:m,y:h,data:{sideX:b,sideY:v}}}};function Cre(e,t,o){let r=e==="inline-start"||e==="inline-end";return{top:"top",right:r?o?"inline-start":"inline-end":"right",bottom:"bottom",left:r?o?"inline-end":"inline-start":"left"}[t]}function xre(e,t,o){let{rects:r,placement:n}=e;return{side:Cre(t,Mn(n),o),align:Vl(n)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function DI(e){let{anchor:t,positionMethod:o="absolute",side:r="bottom",sideOffset:n=0,align:i="center",alignOffset:s=0,collisionBoundary:a,collisionPadding:l=5,sticky:u=!1,arrowPadding:d=5,disableAnchorTracking:f=!1,inline:p,keepMounted:g=!1,floatingRootContext:m,mounted:h,collisionAvoidance:b,shiftCrossAxis:v=!1,nodeId:y,adaptiveOrigin:k,lazyFlip:S=!1,externalTree:_}=e,[x,w]=Hs.useState(null);!h&&x!==null&&w(null);let T=b.side||"flip",B=b.align||"flip",R=b.fallbackAxisSide||"end",A=typeof t=="function"?t:void 0,O=pe(A),P=A?O:t,L=jt(t),M=jt(h),V=hp()==="rtl",I=x||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":V?"left":"right","inline-start":V?"right":"left"}[r],N=i==="center"?I:`${I}-${i}`,D=l,j=1,Y=r==="bottom"?j:0,X=r==="top"?j:0,ee=r==="right"?j:0,J=r==="left"?j:0;typeof D=="number"?D={top:D+Y,right:D+J,bottom:D+X,left:D+ee}:D&&(D={top:(D.top||0)+Y,right:(D.right||0)+J,bottom:(D.bottom||0)+X,left:(D.left||0)+ee});let $={boundary:a==="clipping-ancestors"?"clippingAncestors":a,padding:D},q=Hs.useRef(null),K=jt(n),Q=jt(s),re=typeof n!="function"?n:0,se=typeof s!="function"?s:0,te=[];p&&te.push(p),te.push(Jj(Te=>{let Ne=xre(Te,r,V),$e=typeof K.current=="function"?K.current(Ne):K.current,ot=typeof Q.current=="function"?Q.current(Ne):Q.current;return{mainAxis:$e,crossAxis:ot,alignmentAxis:ot}},[re,se,V,r]));let ne=B==="none"&&T!=="shift",de=!ne&&(u||v||T==="shift"),Se=T==="none"?null:o8({...$,padding:{top:D.top+j,right:D.right+j,bottom:D.bottom+j,left:D.left+j},mainAxis:!v&&T==="flip",crossAxis:B==="flip"?"alignment":!1,fallbackAxisSideDirection:R}),Ee=ne?null:e8(Te=>{let Ne=Ye(Te.elements.floating).documentElement;return{...$,rootBoundary:v?{x:0,y:0,width:Ne.clientWidth,height:Ne.clientHeight}:void 0,mainAxis:B!=="none",crossAxis:de,limiter:u||v?void 0:t8($e=>{if(!q.current)return{};let{width:ot,height:Ot}=q.current.getBoundingClientRect(),At=ns(Mn($e.placement)),gt=At==="y"?ot:Ot,Zo=At==="y"?D.left+D.right:D.top+D.bottom;return{offset:gt/2+Zo/2}})}},[$,u,v,D,B]);T==="shift"||B==="shift"||i==="center"?te.push(Ee,Se):te.push(Se,Ee),te.push(r8({...$,apply({elements:{floating:Te},availableWidth:Ne,availableHeight:$e,rects:ot}){if(!M.current)return;let Ot=Te.style;Ot.setProperty("--available-width",`${Ne}px`),Ot.setProperty("--available-height",`${$e}px`);let At=kt(Te).devicePixelRatio||1,{x:gt,y:Zo,width:Kt,height:De}=ot.reference,wt=(Math.round((gt+Kt)*At)-Math.round(gt*At))/At,Fo=(Math.round((Zo+De)*At)-Math.round(Zo*At))/At;Ot.setProperty("--anchor-width",`${wt}px`),Ot.setProperty("--anchor-height",`${Fo}px`)}}),Sre(Te=>({element:q.current||Ye(Te.elements.floating).createElement("div"),padding:d,offsetParent:"floating"}),[d]),{name:"transformOrigin",fn(Te){let{elements:Ne,middlewareData:$e,placement:ot,rects:Ot,y:At}=Te,gt=Mn(ot),Zo=ns(gt),Kt=q.current,De=$e.arrow?.x||0,wt=$e.arrow?.y||0,Fo=Kt?.clientWidth||0,qi=Kt?.clientHeight||0,Ze=De+Fo/2,ho=wt+qi/2,Ke=Math.abs($e.shift?.y||0),St=Ot.reference.height/2,bo=typeof n=="function"?n(xre(Te,r,V)):n,Xo=Ke>bo,wr={top:`${Ze}px calc(100% + ${bo}px)`,bottom:`${Ze}px ${-bo}px`,left:`calc(100% + ${bo}px) ${ho}px`,right:`${-bo}px ${ho}px`}[gt],fn=`${Ze}px ${Ot.reference.y+St-At}px`;return Ne.floating.style.setProperty("--transform-origin",de&&Zo==="y"&&Xo?fn:wr),{}}},kre,k),ae(()=>{!h&&m&&m.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[h,m]);let ve=Hs.useMemo(()=>({elementResize:!f&&typeof ResizeObserver<"u",layoutShift:!f&&typeof IntersectionObserver<"u"}),[f]),{refs:be,elements:ge,x:he,y:ye,middlewareData:_e,update:we,placement:ie,context:oe,isPositioned:Ae,floatingStyles:me}=f8({rootContext:m,open:g?h:void 0,placement:N,middleware:te,strategy:o,whileElementsMounted:g?void 0:(...Te)=>u0(...Te,ve),nodeId:y,externalTree:_}),{sideX:xe,sideY:nt}=_e.adaptiveOrigin||b0,ut=Ae?o:"fixed",it=Hs.useMemo(()=>{let Te=k?{position:ut,[xe]:he,[nt]:ye}:{position:ut,...me};return Ae||(Te.opacity=0),Te},[k,ut,xe,he,nt,ye,me,Ae]),xt=Hs.useRef(null);ae(()=>{if(!h)return;let Te=L.current,Ne=typeof Te=="function"?Te():Te,ot=(wre(Ne)?Ne.current:Ne)||null||null;ot!==xt.current&&(be.setPositionReference(ot),xt.current=ot)},[h,be,P,L]),Hs.useEffect(()=>{if(!h)return;let Te=L.current;typeof Te!="function"&&wre(Te)&&Te.current!==xt.current&&(be.setPositionReference(Te.current),xt.current=Te.current)},[h,be,P,L]),Hs.useEffect(()=>{if(g&&h&&ge.reference&&ge.floating)return u0(ge.reference,ge.floating,we,ve)},[g,h,ge,we,ve]);let tt=Mn(ie),$t=Cre(r,tt,V),dt=Vl(ie)||"center",co=!!_e.hide?.referenceHidden;ae(()=>{S&&h&&Ae&&w(tt)},[S,h,Ae,tt]);let at=Hs.useMemo(()=>({position:"absolute",top:_e.arrow?.y,left:_e.arrow?.x}),[_e.arrow]),Be=_e.arrow?.centerOffset!==0;return Hs.useMemo(()=>({positionerStyles:it,arrowStyles:at,arrowRef:q,arrowUncentered:Be,side:$t,align:dt,physicalSide:tt,anchorHidden:co,refs:be,context:oe,isPositioned:Ae,update:we}),[it,at,q,Be,$t,dt,tt,co,be,oe,Ae,we])}function wre(e){return e!=null&&"current"in e}function Tv(e){return e==="starting"?Ite:qt}function VI(e,t,{styles:o,transitionStatus:r,props:n,refs:i,hidden:s,inert:a=!1}){let l={...o};return a&&(l.pointerEvents="none"),We("div",e,{state:t,ref:i,props:[{role:"presentation",hidden:s,style:l},Tv(r),n],stateAttributesMapping:Pa})}var Ere=c(le(),1);var q3e=20;function Tre(e,t,o,r){let[n,i]=Ere.useState(!1);ae(()=>{if(!e||!t||o==null){i(!1);return}let s=Ye(o).documentElement.clientWidth,a=o.offsetWidth;i(s>0&&a>0&&a>=s-q3e)},[e,t,o]),tte(e&&(!t||n),r)}var Rre=c(le(),1);var Bre=Rre.forwardRef(function(t,o){let{className:r,render:n,orientation:i="horizontal",style:s,...a}=t;return We("div",t,{state:{orientation:i},ref:o,props:[{role:"separator","aria-orientation":i},a]})});var FI=c(le(),1),B8=FI.createContext({disabled:!1});function zI(){return FI.useContext(B8)}var jI=c(le(),1),Z3e=jI.createContext(void 0);function Pre(e=!0){let t=jI.useContext(Z3e);if(t===void 0&&!e)throw new Error(Pt(3));return t}var Tp={};Cr(Tp,{Panel:()=>Nre,Root:()=>Ore,Trigger:()=>Lre});var y0=c(le(),1);var HI={...Nee,...gn};var Ire=c(E(),1),Ore=y0.forwardRef(function(t,o){let{render:r,className:n,defaultOpen:i=!1,disabled:s=!1,onOpenChange:a,open:l,style:u,...d}=t,f=pe(a),p=Oee({open:l,defaultOpen:i,onOpenChange:f,disabled:s}),g=y0.useMemo(()=>({open:p.open,disabled:p.disabled,transitionStatus:p.transitionStatus}),[p.open,p.disabled,p.transitionStatus]),m=y0.useMemo(()=>({...p,onOpenChange:f,state:g}),[p,f,g]),h=We("div",t,{state:g,ref:o,props:d,stateAttributesMapping:HI});return(0,Ire.jsx)(pj.Provider,{value:m,children:h})});var Are=c(le(),1);var X3e={...Mee,...gn},Lre=Are.forwardRef(function(t,o){let{panelId:r,open:n,handleTrigger:i,state:s,disabled:a}=KP(),{className:l,disabled:u=a,render:d,nativeButton:f=!0,style:p,...g}=t,{getButtonProps:m,buttonRef:h}=dh({disabled:u,focusableWhenDisabled:!0,native:f});return We("button",t,{state:s,ref:[o,h],props:[{"aria-controls":n?r:void 0,"aria-expanded":n,onClick:i},g,m],stateAttributesMapping:X3e})});var Mre=c(le(),1);var P8=(function(e){return e.collapsiblePanelHeight="--collapsible-panel-height",e.collapsiblePanelWidth="--collapsible-panel-width",e})({});var Nre=Mre.forwardRef(function(t,o){let{className:r,hiddenUntilFound:n,keepMounted:i,render:s,id:a,style:l,...u}=t,{mounted:d,onOpenChange:f,open:p,panelId:g,setMounted:m,setPanelIdState:h,setOpen:b,state:v,transitionStatus:y}=KP(),k=n??!1,S=i??!1;ae(()=>{if(a)return h(a),()=>{h(void 0)}},[a,h]);let{height:_,props:x,ref:w,shouldPreventOpenAnimation:T,shouldRender:B,transitionStatus:R,width:A}=$ee({externalRef:o,hiddenUntilFound:k,id:g,keepMounted:S,mounted:d,onOpenChange:f,open:p,setMounted:m,setOpen:b,transitionStatus:y}),O={...v,transitionStatus:R},P=zP(l,O),L=We("div",{...t,style:void 0},{state:O,ref:w,props:[x,{style:{[P8.collapsiblePanelHeight]:_===void 0?"auto":`${_}px`,[P8.collapsiblePanelWidth]:A===void 0?"auto":`${A}px`}},u,P?{style:P}:void 0,T?{style:{animationName:"none"}}:void 0],stateAttributesMapping:HI});return B?L:null});function Dre(e,t){let o=Zn(e);return ae(()=>(t(o),()=>{t(void 0)}),[o,t]),o}function UI(e={}){let{id:t,fallbackControlId:o,native:r=!1,setLabelId:n,focusControl:i}=e,{controlId:s,setLabelId:a}=hn(),l=pe(g=>{a(g),n?.(g)}),u=Dre(t,l),d=s??o;function f(g){if(i){i(g,d);return}if(!d)return;let m=Ye(g.currentTarget).getElementById(d);_t(m)&&Q3e(m)}function p(g){ko(g.nativeEvent)?.closest("button,input,select,textarea")||(!g.defaultPrevented&&g.detail>1&&g.preventDefault(),!r&&f(g))}return r?{id:u,htmlFor:d??void 0,onMouseDown:p}:{id:u,onClick:p,onPointerDown(g){g.preventDefault()}}}function Q3e(e){e.focus({focusVisible:!0})}var GI=c(le(),1),J3e=GI.createContext(void 0);function Vre(e){let t=GI.useContext(J3e);if(t===void 0&&!e)throw new Error(Pt(69));return t}var ni=c(le(),1),Ure=c(rd(),1);var Fre=c(le(),1);function WI(e){let[t,o]=Fre.useState({current:e,previous:null});return e!==t.current&&o({current:e,previous:t.current}),t.previous}var Rv=c(le(),1);function I8(e){let t=qr(e),o=parseFloat(t.width)||0,r=parseFloat(t.height)||0,n=_t(e),i=n?e.offsetWidth:o,s=n?e.offsetHeight:r;return(_p(o)!==i||_p(r)!==s)&&(o=i,r=s),{width:o,height:r}}function jre(e){let{popupElement:t,positionerElement:o,content:r,mounted:n,onMeasureLayout:i,onMeasureLayoutComplete:s,side:a,direction:l}=e,u=vp(t,!0,!1),d=Ci(),f=Rv.useRef(null),p=Rv.useRef(!0),g=Rv.useRef(Dt),m=pe(i),h=pe(s),b=Rv.useMemo(()=>{let v=a==="top",y=a==="left";return l==="rtl"?(v=v||a==="inline-end",y=y||a==="inline-end"):(v=v||a==="inline-start",y=y||a==="inline-start"),v?{position:"absolute",[a==="top"?"bottom":"top"]:"0",[y?"right":"left"]:"0"}:qt},[a,l]);ae(()=>{if(!n){g.current=Dt,p.current=!0,f.current=null;return}if(!t||!o)return;g.current=zre(t,b),O8(t,"auto");let v=KI(t,"position","static"),y=KI(t,"transform","none"),k=KI(t,"scale","1"),S=zre(o,{"--available-width":"max-content","--available-height":"max-content"});function _(){v(),y(),S()}function x(){_(),k()}if(m?.(),p.current||f.current===null){$I(o,"max-content");let R=I8(t);return f.current=R,$I(o,R),x(),h?.(null,R),p.current=!1,()=>{g.current(),g.current=Dt}}$I(o,"max-content");let w=f.current,T=I8(t);f.current=T,O8(t,w),x(),h?.(w,T),$I(o,T);let B=new AbortController;return d.request(()=>{O8(t,T),u(()=>{t.style.setProperty("--popup-width","auto"),t.style.setProperty("--popup-height","auto")},B.signal)}),()=>{B.abort(),d.cancel(),g.current(),g.current=Dt}},[r,t,o,u,d,n,m,h,b])}function KI(e,t,o){let r=e.style.getPropertyValue(t);return e.style.setProperty(t,o),()=>{e.style.setProperty(t,r)}}function zre(e,t){let o=[];for(let[r,n]of Object.entries(t))o.push(KI(e,r,n));return o.length?()=>{o.forEach(r=>r())}:Dt}function O8(e,t){let o=t==="auto"?"auto":`${t.width}px`,r=t==="auto"?"auto":`${t.height}px`;e.style.setProperty("--popup-width",o),e.style.setProperty("--popup-height",r)}function $I(e,t){let o=t==="max-content"?"max-content":`${t.width}px`,r=t==="max-content"?"max-content":`${t.height}px`;e.style.setProperty("--positioner-width",o),e.style.setProperty("--positioner-height",r)}var Bv=c(E(),1);function Gre(e){let{store:t,side:o,cssVars:r,children:n}=e,i=hp(),s=t.useState("activeTriggerElement"),a=t.useState("activeTriggerId"),l=t.useState("open"),u=t.useState("payload"),d=t.useState("mounted"),f=t.useState("popupElement"),p=t.useState("positionerElement"),g=WI(l?s:null),m=o4e(a,u),h=ni.useRef(null),[b,v]=ni.useState(null),[y,k]=ni.useState(null),S=ni.useRef(null),_=ni.useRef(null),x=vp(S,!0,!1),w=Ci(),[T,B]=ni.useState(null),[R,A]=ni.useState(!1);ae(()=>(t.set("hasViewport",!0),()=>{t.set("hasViewport",!1)}),[t]);let O=pe(()=>{S.current?.style.setProperty("animation","none"),S.current?.style.setProperty("transition","none"),_.current?.style.setProperty("display","none")}),P=pe(I=>{S.current?.style.removeProperty("animation"),S.current?.style.removeProperty("transition"),_.current?.style.removeProperty("display"),I&&B(I)}),L=ni.useRef(null);ae(()=>{(!l||!d)&&(L.current=null)},[l,d]),ae(()=>{if(s&&g&&s!==g&&L.current!==s&&h.current){v(h.current),A(!0);let I=t4e(g,s);k(I),w.request(()=>{Ure.flushSync(()=>{A(!1)}),x(()=>{v(null),B(null),h.current=null})}),L.current=s}},[s,g,b,x,w]),ae(()=>{let I=S.current;if(!I)return;let N=Ye(I).createElement("div");for(let D of Array.from(I.childNodes))N.appendChild(D.cloneNode(!0));h.current=N});let M=b!=null,z;M?z=(0,Bv.jsxs)(ni.Fragment,{children:[(0,Bv.jsx)("div",{"data-previous":!0,inert:PI(!0),ref:_,style:{...T?{[r.popupWidth]:`${T.width}px`,[r.popupHeight]:`${T.height}px`}:null,position:"absolute"},"data-ending-style":R?void 0:""},"previous"),(0,Bv.jsx)("div",{"data-current":!0,ref:S,"data-starting-style":R?"":void 0,children:n},m)]}):z=(0,Bv.jsx)("div",{"data-current":!0,ref:S,children:n},m),ae(()=>{let I=_.current;!I||!b||I.replaceChildren(...Array.from(b.childNodes))},[b]),jre({popupElement:f,positionerElement:p,mounted:d,content:u,onMeasureLayout:O,onMeasureLayoutComplete:P,side:o,direction:i});let V={activationDirection:e4e(y),transitioning:M};return{children:z,state:V}}function e4e(e){if(e)return`${Hre(e.horizontal,5,"right","left")} ${Hre(e.vertical,5,"down","up")}`}function Hre(e,t,o,r){return e>t?o:e<-t?r:""}function t4e(e,t){let o=e.getBoundingClientRect(),r=t.getBoundingClientRect(),n={x:o.left+o.width/2,y:o.top+o.height/2},i={x:r.left+r.width/2,y:r.top+r.height/2};return{horizontal:i.x-n.x,vertical:i.y-n.y}}function o4e(e,t){let[o,r]=ni.useState(0),n=ni.useRef(e),i=ni.useRef(t),s=ni.useRef(!1);return ae(()=>{let a=n.current,l=i.current,u=e!==a,d=t!==l;u?(r(f=>f+1),s.current=!d):s.current&&d&&(r(f=>f+1),s.current=!1),n.current=e,i.current=t},[e,t]),`${e??"current"}-${o}`}function Wre(e){return e==null||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true"}var YI=c(le(),1),r4e=YI.createContext(void 0),n4e={disableStyleElements:!1};function $re(){return YI.useContext(r4e)??n4e}function Eh(e,t=Number.MIN_SAFE_INTEGER,o=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,o))}var as={};Cr(as,{Control:()=>rne,Description:()=>one,Error:()=>ene,Item:()=>sne,Label:()=>Jre,Root:()=>Qre,Validity:()=>ine});var Ir=c(le(),1);var qI=c(le(),1),i4e=qI.createContext(void 0);function Kre(e=!1){let t=qI.useContext(i4e);if(!t&&!e)throw new Error(Pt(86));return t}var Rp=c(le(),1);var Yre=c(E(),1),ZI=function(t){let o=Zn(),r=t.controlId===void 0?o:t.controlId,[n,i]=Rp.useState(r),[s,a]=Rp.useState(t.labelId),[l,u]=Rp.useState([]),d=io(()=>new Map),{messageIds:f}=hn(),p=pe((h,b)=>{let v=d.current;if(b===void 0){v.delete(h);return}v.set(h,b),i(y=>{if(v.size===0)return;let k;for(let S of v.values()){if(y!==void 0&&S===y)return y;k===void 0&&(k=S)}return k})}),g=Rp.useCallback(h=>{let b=h["aria-describedby"]?h["aria-describedby"].split(" "):[];return b.push(...f,...l),{...h,"aria-describedby":Array.from(new Set(b)).join(" ")||void 0}},[f,l]),m=Rp.useMemo(()=>({controlId:n,registerControlId:p,labelId:s,setLabelId:a,messageIds:l,setMessageIds:u,getDescriptionProps:g}),[n,p,s,a,l,u,g]);return(0,Yre.jsx)(R8.Provider,{value:m,children:t.children})};var Bp=c(le(),1);function Th(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}var XI=Object.keys(Ch);function s4e(e){if(!e||e.valid||!e.valueMissing)return!1;let t=!1;for(let o of XI)o!=="valid"&&(o==="valueMissing"?t=e[o]:e[o]&&(t=!1));return t}function a4e(e){let t=null;for(let o of e)if(!o.disabled){if(!o.validity.valid)return o;t??=o}return t}function qre(e,t){let o=!1;for(let r of t)r.setCustomValidity(""),o||=r===e;o||e.setCustomValidity("")}function Zre(e){let{formRef:t}=Ia(),{setValidityData:o,validate:r,validityData:n,validationDebounceTime:i,invalid:s,markedDirtyRef:a,state:l,shouldValidateOnChange:u,getRegisteredFieldId:d}=e,{controlId:f,getDescriptionProps:p}=hn(),g=So(),m=Bp.useRef(null),h=io(()=>new Set).current,b=Bp.useRef(0),v=Bp.useCallback(_=>{if(_)return h.add(_),()=>{h.delete(_)}},[h]),y=pe(async(_,x=!1)=>{let w=a4e(h)??m.current;if(!w)return;b.current+=1;let T=b.current;function B(V,I=s){let N=d()??f;if(N==null)return;let D=t.current.fields.get(N);if(!D)return;let j=Th(V,I);t.current.fields.set(N,{...D,validityData:j})}if(x){if(l.valid!==!1)return;let V=w.validity;if(!V.valueMissing){let N={value:_,state:{...Ch,valid:!0},error:"",errors:[],initialValue:n.initialValue};qre(w,h),B(N,!1),o(N);return}let I=XI.reduce((N,D)=>(N[D]=V[D],N),{});if(!I.valid&&!s4e(I))return}function R(V){let I=XI.reduce((D,j)=>(D[j]=V.validity[j],D),{}),N=!1;for(let D of XI)if(D!=="valid"){if(D==="valueMissing"&&I[D])N=!0;else if(I[D])return I}return N&&!a.current&&(I.valid=!0,I.valueMissing=!1),I}g.clear();let A=null,O=[],P=R(w),L,M=u();if(w.validationMessage&&!M)L=w.validationMessage,O=[w.validationMessage];else{let V=Array.from(t.current.fields.values()).reduce((N,D)=>(D.name&&(N[D.name]=D.getValue()),N),{}),I=r(_,V);if(typeof I=="object"&&I!==null&&"then"in I){if(A=await I,T!==b.current)return}else A=I;A!==null?(P.valid=!1,P.customError=!0,Array.isArray(A)?(O=A,w.setCustomValidity(A.join(`
`))):A&&(O=[A],w.setCustomValidity(A))):M&&(qre(w,h),P.customError=!1,w.validationMessage?(L=w.validationMessage,O=[w.validationMessage]):w.validity.valid&&!P.valid&&(P.valid=!0))}let z={value:_,state:P,error:L??(Array.isArray(A)?A[0]:A??""),errors:O,initialValue:n.initialValue};B(z),o(z)}),k=pe(_=>{g.clear();let x=u();x&&_!==""&&i?(b.current+=1,g.start(i,()=>{y(_)})):y(_,!x)}),S=Bp.useCallback((_,x={})=>Vt(p(x),l.valid===!1&&!l.disabled&&!_?{"aria-invalid":!0}:qt),[p,l.disabled,l.valid]);return Bp.useMemo(()=>({getValidationProps:S,inputRef:m,registerInput:v,commit:y,change:k}),[S,v,y,k])}var QI=c(le(),1);function Xre(e){let{commit:t,invalid:o,markedDirtyRef:r,name:n,setRegisteredFieldName:i,setRegisteredFieldId:s,setValidityData:a,validityData:l}=e,{formRef:u}=Ia(),d=QI.useRef(null),f=QI.useRef(null),p=QI.useRef(null),g=pe(()=>{let S=f.current;if(S)return S.getValue?S.getValue():S.value});function m(S){return S.value===void 0?g():S.value}let h=pe(()=>{let S=f.current;if(r.current=!0,!S){t(l.value);return}t(m(S))});function b(){let S=f.current;!S||!S.id||u.current.fields.set(S.id,{getValue:g,name:n??S.name,controlRef:S.controlRef??p,validityData:Th(l,o),validate:h})}function v(S=f.current?.id){S&&u.current.fields.delete(S)}function y(){let S=f.current;if(!S)return;let _=m(S);l.initialValue===null&&_!==null&&a(x=>({...x,initialValue:_}))}ae(()=>{let S=f.current;!S||!S.id||(i(n?void 0:S.name),u.current.fields.set(S.id,{getValue:g,name:n??S.name,controlRef:S.controlRef??p,validityData:Th(l,o),validate:h}))},[u,g,o,n,i,h,l]),ae(()=>{let S=u.current.fields;return()=>{let _=f.current?.id;_&&S.delete(_)}},[u]);let k=pe((S,_)=>{if(!_){d.current===S&&(d.current=null,v(),f.current=null,i(void 0),s(void 0));return}let x=f.current?.id;d.current=S,f.current=_,n||i(_.name),s(_.id),x&&x!==_.id&&v(x),y(),b()});return[h,k]}var JI=c(E(),1),l4e=Ir.forwardRef(function(t,o){let{errors:r,validationMode:n,submitAttemptedRef:i}=Ia(),{render:s,className:a,validate:l,validationDebounceTime:u=0,validationMode:d=n,name:f,disabled:p=!1,invalid:g,dirty:m,touched:h,actionsRef:b,style:v,...y}=t,k=Kre(!0)?.disabled,S=pe(l||(()=>null)),_=k||p,[x,w]=Ir.useState(!1),[T,B]=Ir.useState(!1),[R,A]=Ir.useState(!1),[O,P]=Ir.useState(!1),L=m??T,M=h??x,z=Ir.useRef(L),V=Ir.useRef(void 0),[I,N]=Ir.useState(),D=f??I;ae(()=>{m!==void 0&&(z.current=m)},[m]);let j=Ir.useCallback(()=>V.current,[]),Y=Ir.useCallback(be=>{V.current=be},[]),X=pe(be=>{m===void 0&&(be&&(z.current=!0),B(be))}),ee=pe(be=>{h===void 0&&w(be)}),J=pe(()=>d==="onChange"||d==="onSubmit"&&i.current),$=D&&Object.hasOwn(r,D)?r[D]:null,q=!!(Array.isArray($)?$.length:$),K=g===!0||q,[Q,re]=Ir.useState({state:Ch,error:"",errors:[],value:null,initialValue:null}),se=_?null:!K&&Q.state.valid,te=Ir.useMemo(()=>({disabled:_,touched:M,dirty:L,valid:se,filled:R,focused:O}),[_,M,L,se,R,O]),ne=Zre({setValidityData:re,validate:S,validityData:Q,validationDebounceTime:u,invalid:K,markedDirtyRef:z,state:te,shouldValidateOnChange:J,getRegisteredFieldId:j}),[de,Se]=Xre({commit:ne.commit,invalid:K,markedDirtyRef:z,name:f,setRegisteredFieldName:N,setRegisteredFieldId:Y,setValidityData:re,validityData:Q});Ir.useImperativeHandle(b,()=>({validate:de}),[de]);let Ee=Ir.useMemo(()=>({invalid:K,name:D,validityData:Q,setValidityData:re,disabled:_,touched:M,setTouched:ee,dirty:L,setDirty:X,filled:R,setFilled:A,focused:O,setFocused:P,validate:S,validationMode:d,validationDebounceTime:u,shouldValidateOnChange:J,state:te,markedDirtyRef:z,registerFieldControl:Se,validation:ne}),[K,D,Q,_,M,ee,L,X,R,A,O,P,S,d,u,J,te,Se,ne]),ve=We("div",t,{ref:o,state:te,props:y,stateAttributesMapping:ri});return(0,JI.jsx)(T8.Provider,{value:Ee,children:ve})}),Qre=Ir.forwardRef(function(t,o){return(0,JI.jsx)(ZI,{children:(0,JI.jsx)(l4e,{...t,ref:o})})});var v0=c(le(),1);var Jre=v0.forwardRef(function(t,o){let{render:r,className:n,style:i,id:s,nativeLabel:a=!0,...l}=t,u=Xr(!1),d=zI(),{labelId:f}=hn(),p={...u.state,disabled:u.disabled||d.disabled},g=v0.useRef(null),m=UI({id:f??s,native:a});return We("label",t,{ref:[o,g],state:p,props:[m,l],stateAttributesMapping:ri})});var Rh=c(le(),1);var A8=c(E(),1),c4e={...ri,...gn},ene=Rh.forwardRef(function(t,o){let{render:r,id:n,className:i,match:s,style:a,...l}=t,u=Zn(n),{validityData:d,state:f,name:p}=Xr(!1),{setMessageIds:g}=hn(),{errors:m}=Ia(),h=p&&Object.hasOwn(m,p)?m[p]:null,b=!!(Array.isArray(h)?h.length:h),v=typeof s=="string",y=!1;s===!0?y=!0:f.disabled?y=!1:v?y=!!d.state[s]:y=b||d.state.valid===!1;let{mounted:k,transitionStatus:S,setMounted:_}=rs(y);ae(()=>{if(!(!y||!u))return g(z=>z.concat(u)),()=>{g(z=>z.filter(V=>V!==u))}},[y,u,g]);let x=Rh.useRef(null),[w,T]=Rh.useState(null),[B,R]=Rh.useState(null),A=d.error;!v&&b?A=h:d.errors.length>1&&(A=d.errors);let O=A??"";Array.isArray(A)&&(O=A.length>1?(0,A8.jsx)("ul",{children:A.map(z=>(0,A8.jsx)("li",{children:z},z))}):A[0]??"");let P=Array.isArray(A)?JSON.stringify(A):A;y&&P!==B&&(R(P),T(O)),Xn({open:y,ref:x,onComplete(){y||_(!1)}});let L={...f,transitionStatus:S},M=We("div",t,{ref:[o,x],state:L,props:[{id:u,children:y?O:w},l],stateAttributesMapping:c4e,enabled:k});return k?M:null});var tne=c(le(),1);var one=tne.forwardRef(function(t,o){let{render:r,id:n,className:i,style:s,...a}=t,l=Zn(n),u=Xr(!1),d=zI(),{setMessageIds:f}=hn(),p={...u.state,disabled:u.disabled||d.disabled};return ae(()=>{if(l)return f(m=>m.concat(l)),()=>{f(m=>m.filter(h=>h!==l))}},[l,f]),We("p",t,{ref:o,state:p,props:[{id:l},a],stateAttributesMapping:ri})});var eO=c(le(),1);var rne=eO.forwardRef(function(t,o){let{render:r,className:n,id:i,name:s,value:a,disabled:l=!1,onValueChange:u,defaultValue:d,autoFocus:f=!1,style:p,...g}=t,{state:m,name:h,disabled:b,setTouched:v,setDirty:y,validityData:k,setFocused:S,setFilled:_,validationMode:x,validation:w}=Xr(),{clearErrors:T}=Ia(),B=b||l,R=h??s,A={...m,disabled:B},{labelId:O}=hn(),P=Ev({id:i});ae(()=>{let D=a!=null;w.inputRef.current?.value||D&&a!==""?_(!0):D&&a===""&&_(!1)},[w.inputRef,_,a]);let L=eO.useRef(null);ae(()=>{f&&L.current===Pr(Ye(L.current))&&S(!0)},[f,S]);let[M]=ah({controlled:a,default:d,name:"FieldControl",state:"value"}),z=a!==void 0,V=z?M:void 0,I=pe(()=>w.inputRef.current?.value);return LI(w.inputRef,P,V,I,!B,s),We("input",t,{ref:[o,L],state:A,props:[{id:P,disabled:B,name:R,ref:w.inputRef,"aria-labelledby":O,autoFocus:f,...z?{value:V}:{defaultValue:d},onChange(D){let j=D.currentTarget.value;u?.(j,Ue(Re.none,D.nativeEvent)),y(j!==k.initialValue),_(j!==""),D.nativeEvent.defaultPrevented||(T(R),w.change(j))},onFocus(){S(!0)},onBlur(D){v(!0),S(!1),x==="onBlur"&&w.commit(D.currentTarget.value)},onKeyDown(D){D.currentTarget.tagName==="INPUT"&&D.key==="Enter"&&(v(!0),w.commit(D.currentTarget.value))}},g,D=>w.getValidationProps(B,D)],stateAttributesMapping:ri})});var S0=c(le(),1);var nne=c(E(),1),ine=function(t){let{children:o}=t,{validityData:r,invalid:n}=Xr(!1),i=S0.useMemo(()=>Th(r,n),[r,n]),s=i.state.valid===!1,{transitionStatus:a}=rs(s),l=S0.useMemo(()=>({...i,validity:i.state,transitionStatus:a}),[i,a]);return(0,nne.jsx)(S0.Fragment,{children:o(l)})};var tO=c(le(),1);var L8=c(E(),1),sne=tO.forwardRef(function(t,o){let{render:r,className:n,style:i,disabled:s=!1,...a}=t,{state:l,disabled:u}=Xr(!1),d=u||s,f={...l,disabled:d},p=Pre(),m=p?.allValues!==void 0?p?.parent.id:void 0,h=tO.useMemo(()=>({disabled:d}),[d]),b=We("div",t,{ref:o,state:f,props:a,stateAttributesMapping:ri});return(0,L8.jsx)(ZI,{controlId:m,children:(0,L8.jsx)(B8.Provider,{value:h,children:b})})});var oO=c(le(),1),ane=c(rd(),1);var lne=c(E(),1),cne=oO.forwardRef(function(t,o){let{children:r,container:n,className:i,render:s,style:a,...l}=t,{portalNode:u,portalSubtree:d}=gI({container:n,ref:o,componentProps:t,elementProps:l});return!d&&!u?null:(0,lne.jsxs)(oO.Fragment,{children:[d,u&&ane.createPortal(r,u)]})});var une=c(E(),1),rO="base-ui-disable-scrollbar",k0={className:rO,getElement(e){return(0,une.jsx)("style",{nonce:e,href:rO,precedence:"base-ui:low",children:`.${rO}{scrollbar-width:none}.${rO}::-webkit-scrollbar{display:none}`})}};var Us=1;function Pv(e,t){return Math.max(0,e-t)}function Iv(e,t){if(t<=0)return 0;let o=Eh(e,0,t),r=o,n=t-o,i=r<=Us,s=n<=Us;return i&&s?r<=n?0:t:i?0:s?t:o}var Dn={};Cr(Dn,{Arrow:()=>Dne,Backdrop:()=>xne,Group:()=>Kne,GroupLabel:()=>qne,Icon:()=>yne,Item:()=>One,ItemIndicator:()=>Lne,ItemText:()=>Mne,Label:()=>pne,List:()=>Pne,Popup:()=>Rne,Portal:()=>kne,Positioner:()=>wne,Root:()=>dne,ScrollDownArrow:()=>jne,ScrollUpArrow:()=>Gne,Separator:()=>Bre,Trigger:()=>mne,Value:()=>hne});var or=c(le(),1);var Ov=c(le(),1),M8=Ov.createContext(null),N8=Ov.createContext(null);function _o(){let e=Ov.useContext(M8);if(e===null)throw new Error(Pt(60));return e}function nO(){let e=Ov.useContext(N8);if(e===null)throw new Error(Pt(61));return e}var Ie={id:Fe(e=>e.id),labelId:Fe(e=>e.labelId),modal:Fe(e=>e.modal),multiple:Fe(e=>e.multiple),items:Fe(e=>e.items),itemToStringLabel:Fe(e=>e.itemToStringLabel),itemToStringValue:Fe(e=>e.itemToStringValue),isItemEqualToValue:Fe(e=>e.isItemEqualToValue),value:Fe(e=>e.value),hasSelectedValue:Fe(e=>{let{value:t,multiple:o,itemToStringValue:r}=e;return t==null?!1:o&&Array.isArray(t)?t.length>0:ld(t,r)!==""}),hasNullItemLabel:Fe((e,t)=>t?fre(e.items):!1),open:Fe(e=>e.open),mounted:Fe(e=>e.mounted),forceMount:Fe(e=>e.forceMount),transitionStatus:Fe(e=>e.transitionStatus),openMethod:Fe(e=>e.openMethod),activeIndex:Fe(e=>e.activeIndex),selectedIndex:Fe(e=>e.selectedIndex),isActive:Fe((e,t)=>e.activeIndex===t),isSelected:Fe((e,t)=>{let o=e.isItemEqualToValue,r=e.value;return e.multiple?Array.isArray(r)&&r.some(n=>Gc(t,n,o)):Gc(t,r,o)}),isSelectedByFocus:Fe((e,t)=>e.selectedIndex===t),popupProps:Fe(e=>e.popupProps),triggerProps:Fe(e=>e.triggerProps),triggerElement:Fe(e=>e.triggerElement),positionerElement:Fe(e=>e.positionerElement),listElement:Fe(e=>e.listElement),popupSide:Fe(e=>e.popupSide),scrollUpArrowVisible:Fe(e=>e.scrollUpArrowVisible),scrollDownArrowVisible:Fe(e=>e.scrollDownArrowVisible),hasScrollArrows:Fe(e=>e.hasScrollArrows)};var Av=c(E(),1);function dne(e){let{id:t,value:o,defaultValue:r=null,onValueChange:n,open:i,defaultOpen:s=!1,onOpenChange:a,name:l,form:u,autoComplete:d,disabled:f=!1,readOnly:p=!1,required:g=!1,modal:m=!0,actionsRef:h,inputRef:b,onOpenChangeComplete:v,items:y,multiple:k=!1,itemToStringLabel:S,itemToStringValue:_,isItemEqualToValue:x=sre,highlightItemOnHover:w=!0,children:T}=e,{clearErrors:B}=Ia(),{setDirty:R,setTouched:A,setFocused:O,validityData:P,setFilled:L,name:M,disabled:z,validation:V,validationMode:I}=Xr(),N=Ev({id:t}),D=z||f,j=M??l,[Y,X]=ah({controlled:o,default:k?r??zw:r,name:"Select",state:"value"}),[ee,J]=ah({controlled:i,default:s,name:"Select",state:"open"}),$=or.useRef([]),q=or.useRef([]),K=or.useRef(null),Q=or.useRef(null),re=or.useRef(0),se=or.useRef(null),te=or.useRef([]),ne=or.useRef(!1),de=or.useRef(null),Se=or.useRef(null),Ee=or.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),ve=or.useRef(!1),{mounted:be,setMounted:ge,transitionStatus:he}=rs(ee),{openMethod:ye,triggerProps:_e}=ire(ee),we=io(()=>new Sv({id:N,labelId:void 0,modal:m,multiple:k,itemToStringLabel:S,itemToStringValue:_,isItemEqualToValue:x,value:Y,open:ee,mounted:be,transitionStatus:he,items:y,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,popupSide:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,ie=Pe(we,Ie.activeIndex),oe=Pe(we,Ie.selectedIndex),Ae=Pe(we,Ie.triggerElement),me=Pe(we,Ie.positionerElement),xe=WI(ye),nt=ye??xe??null,ut=or.useMemo(()=>k?"":ld(Y,_),[k,Y,_]),it=or.useMemo(()=>k&&Array.isArray(Y)?Y.map(Ke=>ld(Ke,_)):ld(Y,_),[k,Y,_]),xt=jt(we.state.triggerElement),tt=pe(()=>it);LI(xt,N,Y,tt,!D,l);let $t=or.useRef(Y),dt=k?Array.isArray(Y)&&Y.length>0:Y!=null&&ld(Y,_)!=="";ae(()=>{Y!==$t.current&&we.set("forceMount",!0)},[we,Y]),ae(()=>{L(dt)},[dt,L]),ae(function(){let St=te.current,bo;if(k){let Xo=Array.isArray(Y)?Y:[];if(Xo.length===0)bo=null;else{let wr=Xo[Xo.length-1],fn=wh(St,wr,x);bo=fn===-1?null:fn}}else{let Xo=wh(St,Y,x);bo=Xo===-1?null:Xo}bo===null&&(Se.current=null),!ee&&we.set("selectedIndex",bo)},[dt,k,ee,Y,te,x,we,Se]);function co(Ke){let St=P.initialValue;return Array.isArray(Ke)&&Array.isArray(St)?!hre(Ke,St,(bo,Xo)=>Gc(bo,Xo,x)):Ke!==St}II(Y,()=>{B(j),R(co(Y)),V.change(Y)});let at=pe((Ke,St)=>{a?.(Ke,St),!St.isCanceled&&(J(Ke),!Ke&&(St.reason===Re.focusOut||St.reason===Re.outsidePress)&&(A(!0),O(!1),I==="onBlur"&&V.commit(Y)))}),Be=pe(()=>{ge(!1),we.update({activeIndex:null,openMethod:null}),v?.(!1)});Xn({enabled:!h,open:ee,ref:K,onComplete(){ee||Be()}}),or.useImperativeHandle(h,()=>({unmount:Be}),[Be]);let Te=pe((Ke,St)=>{n?.(Ke,St),!St.isCanceled&&X(Ke)}),Ne=pe(()=>{let Ke=we.state.listElement||K.current;if(!Ke)return;let St=Pv(Ke.scrollHeight,Ke.clientHeight),bo=Iv(Ke.scrollTop,St),Xo=bo>0,wr=bo<St;we.state.scrollUpArrowVisible!==Xo&&we.set("scrollUpArrowVisible",Xo),we.state.scrollDownArrowVisible!==wr&&we.set("scrollDownArrowVisible",wr)}),$e=f0({open:ee,onOpenChange:at,elements:{reference:Ae,floating:me}}),ot=Yj($e,{enabled:!p&&!D,event:"mousedown"}),Ot=l0($e),At=S8($e,{enabled:!p&&!D,listRef:$,activeIndex:ie,selectedIndex:oe,disabledIndices:zw,onNavigate(Ke){Ke===null&&!ee||we.set("activeIndex",Ke)},focusItemOnHover:w}),gt=k8($e,{enabled:!p&&!D&&(ee||!k),listRef:q,activeIndex:ie,selectedIndex:oe,disabledIndices:Ke=>Wre($.current[Ke]),onMatch(Ke){ee?we.set("activeIndex",Ke):Te(te.current[Ke],Ue("none"))},onTyping(Ke){ne.current=Ke}}),Zo=or.useMemo(()=>{let Ke=Vt(gt.reference,At.reference,Ot.reference,ot.reference,_e);return N&&(Ke.id=N),Ke},[ot.reference,gt.reference,At.reference,Ot.reference,_e,N]),Kt=or.useMemo(()=>Vt(kI,gt.floating,At.floating,Ot.floating),[gt.floating,At.floating,Ot.floating]),De=At.item??qt;eI(()=>{we.update({popupProps:Kt,triggerProps:Zo})}),ae(()=>{we.update({id:N,modal:m,multiple:k,value:Y,open:ee,mounted:be,transitionStatus:he,popupProps:Kt,triggerProps:Zo,items:y,itemToStringLabel:S,itemToStringValue:_,isItemEqualToValue:x,openMethod:nt})},[we,N,m,k,Y,ee,be,he,Kt,Zo,y,S,_,x,nt]);let wt=or.useMemo(()=>({store:we,name:j,required:g,disabled:D,readOnly:p,multiple:k,highlightItemOnHover:w,setValue:Te,setOpen:at,listRef:$,popupRef:K,scrollHandlerRef:Q,handleScrollArrowVisibility:Ne,scrollArrowsMountedCountRef:re,itemProps:De,valueRef:se,valuesRef:te,labelsRef:q,typingRef:ne,selectionRef:Ee,firstItemTextRef:de,selectedItemTextRef:Se,validation:V,onOpenChangeComplete:v,alignItemWithTriggerActiveRef:ve,initialValueRef:$t}),[we,j,g,D,p,k,w,Te,at,De,V,v,Ne]),Fo=Vc(b,V.inputRef),qi=k&&Array.isArray(Y)&&Y.length>0,Ze=k?void 0:j,ho=or.useMemo(()=>!k||!Array.isArray(Y)||!j?null:Y.map(Ke=>{let St=ld(Ke,_);return(0,Av.jsx)("input",{type:"hidden",form:u,name:j,value:St,disabled:D},St)}),[k,Y,u,j,_,D]);return(0,Av.jsx)(M8.Provider,{value:wt,children:(0,Av.jsxs)(N8.Provider,{value:$e,children:[T,(0,Av.jsx)("input",{...V.getValidationProps(D,{onFocus(){we.state.triggerElement?.focus({focusVisible:!0})},onChange(Ke){if(Ke.nativeEvent.defaultPrevented||D||p)return;let St=Ke.currentTarget.value,bo=Ue(Re.none,Ke.nativeEvent);function Xo(){if(k)return;let wr=St.toLowerCase(),fn=te.current.findIndex(xc=>ld(xc,_).toLowerCase()===wr||w8(xc,S).toLowerCase()===wr);fn===-1&&(fn=te.current.findIndex((xc,q_)=>{let Le=q.current[q_];return Le!=null&&Le.toLowerCase()===wr}));let tn=fn===-1?void 0:te.current[fn];tn!=null&&Te(tn,bo)}we.set("forceMount",!0),queueMicrotask(Xo)}}),id:N&&Ze==null?`${N}-hidden-input`:void 0,form:u,name:Ze,autoComplete:d,value:ut,disabled:D,required:g&&!qi,readOnly:p,ref:Fo,style:j?ute:iI,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),ho]})})}var fne=c(le(),1);var pne=fne.forwardRef(function(t,o){let{render:r,className:n,style:i,...s}=t,a=s;delete a.id;let l=Xr(),{store:u}=_o(),d=Pe(u,Ie.triggerElement),f=Pe(u,Ie.id),p=yre(f),g=UI({id:p,fallbackControlId:d?.id??f,setLabelId(m){u.set("labelId",m)}});return We("div",t,{ref:o,state:l.state,props:[g,s],stateAttributesMapping:ri})});var Lv=c(le(),1);var iO=2,u4e=400,d4e={...Qoe,...ri,popupSide:e=>e?{"data-popup-side":e}:null,value:()=>null},mne=Lv.forwardRef(function(t,o){let{render:r,className:n,id:i,disabled:s=!1,nativeButton:a=!0,style:l,...u}=t,{setTouched:d,setFocused:f,validationMode:p,state:g,disabled:m}=Xr(),{labelId:h}=hn(),{store:b,setOpen:v,selectionRef:y,validation:k,readOnly:S,required:_,alignItemWithTriggerActiveRef:x,disabled:w}=_o(),T=m||w||s,B=Pe(b,Ie.open),R=Pe(b,Ie.mounted),A=Pe(b,Ie.value),O=Pe(b,Ie.triggerProps),P=Pe(b,Ie.positionerElement),L=Pe(b,Ie.listElement),M=Pe(b,Ie.popupSide),z=Pe(b,Ie.id),V=Pe(b,Ie.labelId),I=Pe(b,Ie.hasSelectedValue),N=R&&P?M:null,D=i??z,j=vre(h,V);Ev({id:D});let Y=jt(P),X=Lv.useRef(null),{getButtonProps:ee,buttonRef:J}=dh({disabled:T,native:a}),$=pe(ne=>{b.set("triggerElement",ne)}),q=So(),K=So(),Q=So();Lv.useEffect(()=>{if(B)return Q.start(u4e,()=>{y.current.allowUnselectedMouseUp=!0,y.current.allowSelectedMouseUp=!0}),()=>{Q.clear()};y.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0},K.clear()},[B,y,K,Q]);let re=Vt(O,{id:D,role:"combobox","aria-expanded":B?"true":"false","aria-haspopup":"listbox","aria-controls":B?L?.id??gh(P)?.id:void 0,"aria-labelledby":j,"aria-readonly":S||void 0,"aria-required":_||void 0,tabIndex:T?-1:0,onFocus(ne){f(!0),B&&x.current&&v(!1,Ue(Re.none,ne.nativeEvent)),q.start(0,()=>{b.set("forceMount",!0)})},onBlur(ne){je(P,ne.relatedTarget)||(d(!0),f(!1),p==="onBlur"&&k.commit(A))},onMouseDown(ne){if(B)return;let de=Ye(ne.currentTarget);function Se(Ee){if(!X.current)return;let ve=Ee.target;if(je(X.current,ve)||je(Y.current,ve))return;let be=bre(X.current);Ee.clientX>=be.left-iO&&Ee.clientX<=be.right+iO&&Ee.clientY>=be.top-iO&&Ee.clientY<=be.bottom+iO||v(!1,Ue(Re.cancelOpen,Ee))}K.start(0,()=>{de.addEventListener("mouseup",Se,{once:!0})})}},u,ee),se=k.getValidationProps(T,re);se.role="combobox";let te={...g,open:B,disabled:T,value:A,readOnly:S,popupSide:N,placeholder:!I};return We("button",t,{ref:[o,X,J,$],state:te,stateAttributesMapping:d4e,props:se})});var gne=c(le(),1);var f4e={value:()=>null},hne=gne.forwardRef(function(t,o){let{className:r,render:n,children:i,placeholder:s,style:a,...l}=t,{store:u,valueRef:d}=_o(),f=Pe(u,Ie.value),p=Pe(u,Ie.items),g=Pe(u,Ie.itemToStringLabel),m=Pe(u,Ie.hasSelectedValue),h=!m&&s!=null&&i==null,b=Pe(u,Ie.hasNullItemLabel,h),v={value:f,placeholder:!m},y=null;return typeof i=="function"?y=i(f):i!=null?y=i:!m&&s!=null&&!b?y=s:Array.isArray(f)?y=pre(f,p,g):y=C8(f,p,g),We("span",t,{state:v,ref:[o,d],props:[{children:y},l],stateAttributesMapping:f4e})});var bne=c(le(),1);var yne=bne.forwardRef(function(t,o){let{render:r,className:n,style:i,...s}=t,{store:a}=_o(),u={open:Pe(a,Ie.open)};return We("span",t,{state:u,ref:o,props:[{"aria-hidden":!0,children:"\u25BC"},s],stateAttributesMapping:BI})});var Sne=c(le(),1);var D8=c(le(),1),vne=D8.createContext(void 0);var V8=c(E(),1),kne=Sne.forwardRef(function(t,o){let{store:r}=_o(),n=Pe(r,Ie.mounted),i=Pe(r,Ie.forceMount);return n||i?(0,V8.jsx)(vne.Provider,{value:!0,children:(0,V8.jsx)(Wj,{ref:o,...t})}):null});var _ne=c(le(),1);var p4e={...Pa,...gn},xne=_ne.forwardRef(function(t,o){let{render:r,className:n,style:i,...s}=t,{store:a}=_o(),l=Pe(a,Ie.open),u=Pe(a,Ie.mounted),d=Pe(a,Ie.transitionStatus);return We("div",t,{state:{open:l,transitionStatus:d},ref:o,props:[{role:"presentation",hidden:!u,style:{userSelect:"none",WebkitUserSelect:"none"}},s],stateAttributesMapping:p4e})});var Oa=c(le(),1);var sO=c(le(),1),F8=sO.createContext(void 0);function Pp(){let e=sO.useContext(F8);if(!e)throw new Error(Pt(59));return e}function Mv(e,t){e&&Object.assign(e.style,t)}var aO={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"};var _0=c(E(),1),m4e={position:"fixed"},wne=Oa.forwardRef(function(t,o){let{anchor:r,positionMethod:n="absolute",className:i,render:s,side:a="bottom",align:l="center",sideOffset:u=0,alignOffset:d=0,collisionBoundary:f="clipping-ancestors",collisionPadding:p,arrowPadding:g=5,sticky:m=!1,disableAnchorTracking:h,alignItemWithTrigger:b=!0,collisionAvoidance:v=Ate,style:y,...k}=t,{store:S,listRef:_,labelsRef:x,alignItemWithTriggerActiveRef:w,selectedItemTextRef:T,valuesRef:B,initialValueRef:R,popupRef:A,setValue:O}=_o(),P=nO(),L=Pe(S,Ie.open),M=Pe(S,Ie.mounted),z=Pe(S,Ie.modal),V=Pe(S,Ie.value),I=Pe(S,Ie.openMethod),N=Pe(S,Ie.positionerElement),D=Pe(S,Ie.triggerElement),j=Pe(S,Ie.isItemEqualToValue),Y=Pe(S,Ie.transitionStatus),X=Oa.useRef(null),ee=Oa.useRef(null),[J,$]=Oa.useState(b),q=M&&J&&I!=="touch";!M&&J!==b&&$(b),ae(()=>{M||(Ie.scrollUpArrowVisible(S.state)&&S.set("scrollUpArrowVisible",!1),Ie.scrollDownArrowVisible(S.state)&&S.set("scrollDownArrowVisible",!1))},[S,M]),Oa.useImperativeHandle(w,()=>q),Tre((q||z)&&L,I==="touch",N,D);let K=DI({anchor:r,floatingRootContext:P,positionMethod:n,mounted:M,side:a,sideOffset:u,align:l,alignOffset:d,arrowPadding:g,collisionBoundary:f,collisionPadding:p,sticky:m,disableAnchorTracking:h??q,collisionAvoidance:v,keepMounted:!0}),Q=q?"none":K.side,re=q?m4e:K.positionerStyles,se={open:L,side:Q,align:K.align,anchorHidden:K.anchorHidden};ae(()=>{S.set("popupSide",K.side)},[S,K.side]);let te=pe(ve=>{S.set("positionerElement",ve)}),ne=VI(t,se,{styles:re,transitionStatus:Y,props:k,refs:[o,te],hidden:!M,inert:!L}),de=Oa.useRef(0),Se=pe(ve=>{if(ve.size===0&&de.current===0||B.current.length===0)return;let be=de.current;if(de.current=ve.size,ve.size===be)return;let ge=Ue(Re.none);if(be!==0&&!S.state.multiple&&V!==null&&wh(B.current,V,j)===-1){let ye=R.current,we=ye!=null&&wh(B.current,ye,j)!==-1?ye:null;O(we,ge),we===null&&(S.set("selectedIndex",null),T.current=null)}if(be!==0&&S.state.multiple&&Array.isArray(V)){let he=_e=>wh(B.current,_e,j)!==-1,ye=V.filter(_e=>he(_e));(ye.length!==V.length||ye.some(_e=>!are(V,_e,j)))&&(O(ye,ge),ye.length===0&&(S.set("selectedIndex",null),T.current=null))}if(L&&q){S.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});let he={height:""};Mv(N,he),Mv(A.current,he)}}),Ee=Oa.useMemo(()=>({...K,side:Q,alignItemWithTriggerActive:q,setControlledAlignItemWithTrigger:$,scrollUpArrowRef:X,scrollDownArrowRef:ee}),[K,Q,q,$]);return(0,_0.jsx)(hee,{elementsRef:_,labelsRef:x,onMapChange:Se,children:(0,_0.jsxs)(F8.Provider,{value:Ee,children:[M&&z&&(0,_0.jsx)(ore,{inert:PI(!L),cutout:D}),ne]})})});var Aa=c(le(),1);var uO=c(E(),1),g4e={...Pa,...gn},Rne=Aa.forwardRef(function(t,o){let{render:r,className:n,style:i,finalFocus:s,...a}=t,{store:l,popupRef:u,onOpenChangeComplete:d,setOpen:f,valueRef:p,firstItemTextRef:g,selectedItemTextRef:m,multiple:h,handleScrollArrowVisibility:b,scrollHandlerRef:v,listRef:y,highlightItemOnHover:k}=_o(),{side:S,align:_,alignItemWithTriggerActive:x,isPositioned:w,setControlledAlignItemWithTrigger:T}=Pp(),B=Vre(!0)!=null,R=nO(),A=hp(),{nonce:O,disableStyleElements:P}=$re(),L=Pe(l,Ie.id),M=Pe(l,Ie.open),z=Pe(l,Ie.openMethod),V=Pe(l,Ie.mounted),I=Pe(l,Ie.popupProps),N=Pe(l,Ie.transitionStatus),D=Pe(l,Ie.triggerElement),j=Pe(l,Ie.positionerElement),Y=Pe(l,Ie.listElement),X=Aa.useRef(!1),ee=Aa.useRef(!1),J=Aa.useRef({}),$=Ci(),q=pe(se=>{if(!j||!u.current||!ee.current)return;if(X.current||!x){b();return}let te=j.style.top==="0px",ne=j.style.bottom==="0px";if(!te&&!ne){b();return}let de=Ene(j),Se=x0(j.getBoundingClientRect().height,"y",de),Ee=Ye(j),ve=kt(j),be=ve.getComputedStyle(j),ge=parseFloat(be.marginTop),he=parseFloat(be.marginBottom),ye=Cne(ve.getComputedStyle(u.current)),_e=Math.min(Ee.documentElement.clientHeight-ge-he,ye),we=se.scrollTop,ie=lO(se),oe=0,Ae=null,me=!1,xe=!1,nt=tt=>{j.style.height=`${tt}px`},ut=(tt,$t)=>{let dt=Eh(tt,0,_e-Se);dt>0&&nt(Se+dt),se.scrollTop=$t,_e-(Se+dt)<=Us&&(X.current=!0),b()},it=te?ie-we:we,xt=Math.min(Se+it,_e);if(oe=xt,it<=Us){ut(it,te?ie:0);return}if(_e-xt>Us)te?xe=!0:Ae=0;else if(me=!0,ne&&we<ie){let tt=Se+it-_e;Ae=we-(it-tt)}if(oe=Math.ceil(oe),oe!==0&&nt(oe),xe||Ae!=null){let tt=lO(se),$t=xe?tt:Eh(Ae,0,tt);Math.abs(se.scrollTop-$t)>Us&&(se.scrollTop=$t)}(me||oe>=_e-Us)&&(X.current=!0),b()});Aa.useImperativeHandle(v,()=>q,[q]),Xn({open:M,ref:u,onComplete(){M&&d?.(!0)}});let K={open:M,transitionStatus:N,side:S,align:_};ae(()=>{!j||!u.current||Object.keys(J.current).length||(J.current={top:j.style.top||"0",left:j.style.left||"0",right:j.style.right,height:j.style.height,bottom:j.style.bottom,minHeight:j.style.minHeight,maxHeight:j.style.maxHeight,marginTop:j.style.marginTop,marginBottom:j.style.marginBottom})},[u,j]),ae(()=>{M||x||(ee.current=!1,X.current=!1,Mv(j,J.current))},[M,x,j,u]),ae(()=>{let se=u.current;if(!M||!D||!j||!se||x&&!w||l.state.transitionStatus==="ending")return;if(!x){ee.current=!0,$.request(b),se.style.removeProperty("--transform-origin");return}let te=h4e(se);se.style.removeProperty("--transform-origin");try{let ne=m.current;ne?.isConnected||(ne=!Ie.hasSelectedValue(l.state)&&g.current?.isConnected?g.current:null);let de=p.current,Se=kt(j),Ee=Se.getComputedStyle(j),ve=Se.getComputedStyle(se),be=Ye(D),ge=Ene(D),he=cO(D.getBoundingClientRect(),ge),ye=cO(j.getBoundingClientRect(),ge),_e=he.height,we=Y||se,ie=we.scrollHeight,oe=parseFloat(ve.borderBottomWidth),Ae=parseFloat(Ee.marginTop)||10,me=parseFloat(Ee.marginBottom)||10,xe=parseFloat(Ee.minHeight)||100,nt=Cne(ve),ut=5,it=5,xt=20,tt=be.documentElement.clientHeight-Ae-me,$t=be.documentElement.clientWidth,dt=tt-he.bottom+_e,co,at=A==="rtl"?he.right-ye.width:he.left,Be=0;if(ne&&de){let wt=cO(de.getBoundingClientRect(),ge);co=cO(ne.getBoundingClientRect(),ge),at=ye.left+(A==="rtl"?wt.right-co.right:wt.left-co.left);let Fo=wt.top-he.top+wt.height/2;Be=co.top-ye.top+co.height/2-Fo}let Te=dt+Be+me+oe,Ne=Math.min(tt,Te),$e=tt-Ae-me,ot=Te-Ne,Ot=$t-it;j.style.left=`${Eh(at,ut,Ot-ye.width)}px`,j.style.height=`${Ne}px`,j.style.maxHeight="none",j.style.marginTop=`${Ae}px`,j.style.marginBottom=`${me}px`,se.style.height="100%";let At=lO(we),gt=ot>=At-Us;gt&&(Ne=Math.min(tt,ye.height)-(ot-At));let Zo=he.top<xt||he.bottom>tt-xt||Math.ceil(Ne)+Us<Math.min(ie,xe),Kt=(Se.visualViewport?.scale??1)!==1&&so.engine.webkit;if(Zo||Kt){ee.current=!0,Mv(j,J.current),T(!1);return}let De=Math.max(xe,Ne);if(gt){let wt=Math.max(0,tt-Te);j.style.top=ye.height>=$e?"0":`${wt}px`,j.style.height=`${Ne}px`,we.scrollTop=lO(we)}else j.style.bottom="0",we.scrollTop=ot;if(co){let wt=ye.top,Fo=ye.height,qi=co.top+co.height/2,Ze=Fo>0?(qi-wt)/Fo*100:50,ho=Eh(Ze,0,100);se.style.setProperty("--transform-origin",`50% ${ho}%`)}(De===tt||Ne>=nt)&&(X.current=!0),b(),k&&l.state.selectedIndex===null&&l.state.activeIndex===null&&y.current[0]!=null&&l.set("activeIndex",0),ee.current=!0}finally{te()}},[l,M,j,D,p,g,m,u,b,x,T,$,Y,y,k,A,w]),Aa.useEffect(()=>{if(!x||!j||!M)return;let se=kt(j);function te(ne){f(!1,Ue(Re.windowResize,ne))}return Je(se,"resize",te)},[f,x,j,M]);let Q={...Y?{role:"presentation","aria-orientation":void 0}:{role:"listbox","aria-multiselectable":h||void 0,id:`${L}-list`},onKeyDown(se){B&&Joe.has(se.key)&&se.stopPropagation()},onScroll(se){Y||q(se.currentTarget)},...x&&{style:Y?{height:"100%"}:aO}},re=We("div",t,{ref:[o,u],state:K,stateAttributesMapping:g4e,props:[I,Q,Tv(N),{className:!Y&&x?k0.className:void 0},a]});return(0,uO.jsxs)(Aa.Fragment,{children:[!P&&k0.getElement(O),(0,uO.jsx)(Kj,{context:R,modal:!1,disabled:!V,openInteractionType:z,returnFocus:s,restoreFocus:!0,children:re})]})});function Cne(e){let t=e.maxHeight||"";return t.endsWith("px")&&parseFloat(t)||1/0}function lO(e){return Pv(e.scrollHeight,e.clientHeight)}function Ene(e){return c0.getScale(e)}function x0(e,t,o){return e/o[t]}function cO(e,t){return sd({x:x0(e.x,"x",t),y:x0(e.y,"y",t),width:x0(e.width,"x",t),height:x0(e.height,"y",t)})}var Tne=[["transform","none"],["scale","1"],["translate","0 0"]];function h4e(e){let{style:t}=e,o={};for(let[r,n]of Tne)o[r]=t.getPropertyValue(r),t.setProperty(r,n,"important");return()=>{for(let[r]of Tne){let n=o[r];n?t.setProperty(r,n):t.removeProperty(r)}}}var Bne=c(le(),1);var Pne=Bne.forwardRef(function(t,o){let{render:r,className:n,style:i,...s}=t,{store:a,scrollHandlerRef:l}=_o(),{alignItemWithTriggerActive:u}=Pp(),d=Pe(a,Ie.hasScrollArrows),f=Pe(a,Ie.openMethod),p=Pe(a,Ie.multiple),m={id:`${Pe(a,Ie.id)}-list`,role:"listbox","aria-multiselectable":p||void 0,onScroll(b){l.current?.(b.currentTarget)},...u&&{style:aO},className:d&&f!=="touch"?k0.className:void 0},h=pe(b=>{a.set("listElement",b)});return We("div",t,{ref:[o,h],props:[m,s]})});var La=c(le(),1);var dO=c(le(),1),z8=dO.createContext(void 0);function w0(){let e=dO.useContext(z8);if(!e)throw new Error(Pt(57));return e}var Ine=c(E(),1),One=La.memo(La.forwardRef(function(t,o){let{render:r,className:n,style:i,value:s=null,label:a,disabled:l=!1,nativeButton:u=!1,...d}=t,f=La.useRef(null),p=Aee({label:a,textRef:f,indexGuessBehavior:mj.GuessFromOrder}),{store:g,itemProps:m,setOpen:h,setValue:b,selectionRef:v,typingRef:y,valuesRef:k,multiple:S,selectedItemTextRef:_,disabled:x,readOnly:w}=_o(),T=Pe(g,Ie.isActive,p.index),B=Pe(g,Ie.open),R=Pe(g,Ie.isSelected,s),A=Pe(g,Ie.isSelectedByFocus,p.index),O=Pe(g,Ie.isItemEqualToValue),P=p.index,L=P!==-1,M=La.useRef(null);ae(()=>{if(!L)return;let q=k.current;return q[P]=s,()=>{delete q[P]}},[L,P,s,k]),ae(()=>{if(!L)return;let q=g.state.value,K=q;S&&Array.isArray(q)&&(K=q.length>0?q[q.length-1]:void 0),K!==void 0&&Gc(s,K,O)&&(g.set("selectedIndex",P),f.current&&(_.current=f.current))},[L,P,S,O,g,s,_]);let z=La.useRef(null),V=La.useRef("mouse"),I=La.useRef(!1),{getButtonProps:N,buttonRef:D}=dh({disabled:l,focusableWhenDisabled:!0,native:u,composite:!0}),j={disabled:l,selected:R,highlighted:T};function Y(q){if(x||w)return;let K=g.state.value;if(S){let Q=Array.isArray(K)?K:[],re=R?lre(Q,s,O):[...Q,s];b(re,Ue(Re.itemPress,q))}else b(s,Ue(Re.itemPress,q)),h(!1,Ue(Re.itemPress,q))}function X(){v.current.dragY=0}let ee={role:"option","aria-selected":R,tabIndex:B&&T?0:-1,onKeyDown(q){z.current=q.key,g.set("activeIndex",P),q.key===" "&&y.current&&q.preventDefault()},onClick(q){let K=q.type==="click"&&V.current!=="touch",Q=q.nativeEvent.pointerType,re=K&&gv(q.nativeEvent)&&(Q!==void 0||T),se=K&&!re&&!I.current;I.current=!1,!(q.type==="keydown"&&z.current===null)&&(l||q.type==="keydown"&&z.current===" "&&y.current||se||(z.current=null,Y(q.nativeEvent)))},onPointerEnter(q){V.current=q.pointerType},onPointerMove(q){if(q.pointerType==="mouse"&&q.buttons===1){let K=v.current;K.dragY+=q.movementY,K.dragY**2>=64&&(K.allowUnselectedMouseUp=!0)}},onPointerDown(q){V.current=q.pointerType,I.current=!0,X()},onMouseUp(){if(X(),l||V.current==="touch"||I.current)return;let q=!v.current.allowSelectedMouseUp&&R,K=!v.current.allowUnselectedMouseUp&&!R;q||K||(I.current=!0,M.current?.click(),I.current=!1)}},J=We("div",t,{ref:[D,o,p.ref,M],state:j,props:[m,ee,d,N]}),$=La.useMemo(()=>({selected:R,index:P,textRef:f,selectedByFocus:A,hasRegistered:L}),[R,P,f,A,L]);return(0,Ine.jsx)(z8.Provider,{value:$,children:J})}));var Bh=c(le(),1);var Ane=c(E(),1),Lne=Bh.forwardRef(function(t,o){let r=t.keepMounted??!1,{selected:n}=w0();return r||n?(0,Ane.jsx)(b4e,{...t,ref:o}):null}),b4e=Bh.memo(Bh.forwardRef((e,t)=>{let{render:o,className:r,style:n,keepMounted:i,...s}=e,{selected:a}=w0(),l=Bh.useRef(null),{transitionStatus:u,setMounted:d}=rs(a),p=We("span",e,{ref:[t,l],state:{selected:a,transitionStatus:u},props:[{"aria-hidden":!0,children:"\u2714\uFE0F"},s],stateAttributesMapping:gn});return Xn({open:a,ref:l,onComplete(){a||d(!1)}}),p}));var Nv=c(le(),1);var Mne=Nv.memo(Nv.forwardRef(function(t,o){let{index:r,textRef:n,selectedByFocus:i,hasRegistered:s}=w0(),{firstItemTextRef:a,selectedItemTextRef:l}=_o(),{render:u,className:d,style:f,...p}=t,g=Nv.useCallback(h=>{h&&(s&&r===0&&(a.current=h),s&&i&&(l.current=h))},[a,l,r,i,s]);return We("div",t,{ref:[g,o,n],props:p})}));var Nne=c(le(),1);var y4e={...Pa,...gn},Dne=Nne.forwardRef(function(t,o){let{render:r,className:n,style:i,...s}=t,{store:a}=_o(),{side:l,align:u,arrowRef:d,arrowStyles:f,arrowUncentered:p,alignItemWithTriggerActive:g}=Pp(),h={open:Pe(a,Ie.open),side:l,align:u,uncentered:p},b=We("div",t,{state:h,ref:[d,o],props:[{style:f,"aria-hidden":!0},s],stateAttributesMapping:y4e});return g?null:b});var Fne=c(le(),1);var Vne=c(le(),1);var fO=Vne.forwardRef(function(t,o){let{render:r,className:n,style:i,direction:s,keepMounted:a=!1,...l}=t,u=s==="up",{store:d,popupRef:f,listRef:p,handleScrollArrowVisibility:g,scrollArrowsMountedCountRef:m}=_o(),{side:h,scrollDownArrowRef:b,scrollUpArrowRef:v}=Pp(),y=u?Ie.scrollUpArrowVisible:Ie.scrollDownArrowVisible,k=Pe(d,y),S=Pe(d,Ie.openMethod),_=k&&S!=="touch",x=So(),w=u?v:b,{mounted:T,transitionStatus:B,setMounted:R}=rs(_);ae(()=>(m.current+=1,d.state.hasScrollArrows||d.set("hasScrollArrows",!0),()=>{m.current=Math.max(0,m.current-1),m.current===0&&d.state.hasScrollArrows&&d.set("hasScrollArrows",!1)}),[d,m]),Xn({open:_,ref:w,onComplete(){_||R(!1)}});let P=We("div",t,{ref:[o,w],state:{direction:s,visible:_,side:h,transitionStatus:B},props:[{"aria-hidden":!0,children:u?"\u25B2":"\u25BC",style:{position:"absolute"},onMouseMove(M){if(M.movementX===0&&M.movementY===0||x.isStarted())return;d.set("activeIndex",null);function z(){let V=d.state.listElement??f.current;if(!V)return;d.set("activeIndex",null),g();let I=Pv(V.scrollHeight,V.clientHeight),N=Iv(V.scrollTop,I),D=N===(u?0:I),j=p.current;if(N!==V.scrollTop&&(V.scrollTop=N),j.length===0&&d.set(u?"scrollUpArrowVisible":"scrollDownArrowVisible",!D),D){x.clear();return}if(j.length>0){let Y=w.current?.offsetHeight||0;V.scrollTop=v4e(j,u,N,V.clientHeight,Y,I)}x.start(40,z)}x.start(40,z)},onMouseLeave(){x.clear()}},l],stateAttributesMapping:gn});return T||a?P:null});function v4e(e,t,o,r,n,i){if(t){let d=0,f=o+n-Us;for(let m=0;m<e.length;m+=1){let h=e[m];if(h&&h.offsetTop>=f){d=m;break}}let p=Math.max(0,d-1),g=e[p];return p<d&&g?Iv(g.offsetTop-n,i):0}let s=e.length-1,a=o+r-n+Us;for(let d=0;d<e.length;d+=1){let f=e[d];if(f&&f.offsetTop+f.offsetHeight>a){s=Math.max(0,d-1);break}}let l=Math.min(e.length-1,s+1),u=e[l];return l>s&&u?Iv(u.offsetTop+u.offsetHeight-r+n,i):i}var zne=c(E(),1),jne=Fne.forwardRef(function(t,o){return(0,zne.jsx)(fO,{...t,ref:o,direction:"down"})});var Hne=c(le(),1);var Une=c(E(),1),Gne=Hne.forwardRef(function(t,o){return(0,Une.jsx)(fO,{...t,ref:o,direction:"up"})});var Dv=c(le(),1);var pO=c(le(),1),j8=pO.createContext(void 0);function Wne(){let e=pO.useContext(j8);if(e===void 0)throw new Error(Pt(56));return e}var $ne=c(E(),1),Kne=Dv.forwardRef(function(t,o){let{render:r,className:n,style:i,...s}=t,[a,l]=Dv.useState(),u=Dv.useMemo(()=>({labelId:a,setLabelId:l}),[a,l]),d=We("div",t,{ref:o,props:[{role:"group","aria-labelledby":a},s]});return(0,$ne.jsx)(j8.Provider,{value:u,children:d})});var Yne=c(le(),1);var qne=Yne.forwardRef(function(t,o){let{render:r,className:n,style:i,id:s,...a}=t,{setLabelId:l}=Wne(),u=Zn(s);return ae(()=>{l(u)},[u,l]),We("div",t,{ref:o,props:[{id:u},a]})});var ls={};Cr(ls,{Arrow:()=>die,Handle:()=>C0,Popup:()=>cie,Portal:()=>iie,Positioner:()=>aie,Provider:()=>fie,Root:()=>Xne,Trigger:()=>oie,Viewport:()=>gie,createHandle:()=>hie});var Wc=c(le(),1);var mO=c(le(),1),H8=mO.createContext(void 0);function Ma(e){let t=mO.useContext(H8);if(t===void 0&&!e)throw new Error(Pt(72));return t}var Zne=c(le(),1);var S4e={...qoe,disabled:Fe(e=>e.disabled),instantType:Fe(e=>e.instantType),isInstantPhase:Fe(e=>e.isInstantPhase),trackCursorAxis:Fe(e=>e.trackCursorAxis),disableHoverablePopup:Fe(e=>e.disableHoverablePopup),lastOpenChangeReason:Fe(e=>e.openChangeReason),closeOnClick:Fe(e=>e.closeOnClick),closeDelay:Fe(e=>e.closeDelay),hasViewport:Fe(e=>e.hasViewport)},Vv=class e extends kv{constructor(t,o,r=!1){let n=new Cp,i={...k4e(),...t};i.floatingRootContext=Koe(n,o,r),super(i,{popupRef:Zne.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:n},S4e)}setOpen=(t,o)=>{Voe(this,t,o,{extraState:{openChangeReason:o.reason}})};cancelPendingOpen(t){this.state.floatingRootContext.dispatchOpenChange(!1,Ue(Re.triggerPress,t))}static useStore(t,o){return Doe(t,(n,i)=>new e(o,n,i)).store}};function k4e(){return{...$oe(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,hasViewport:!1}}var gO=c(E(),1),Xne=c8(function(t){let{disabled:o=!1,defaultOpen:r=!1,open:n,disableHoverablePopup:i=!1,trackCursorAxis:s="none",actionsRef:a,onOpenChange:l,onOpenChangeComplete:u,handle:d,triggerId:f,defaultTriggerId:p=null,children:g}=t,m=Vv.useStore(d?.store,{open:r,openProp:n,activeTriggerId:p,triggerIdProp:f});Foe(m,n,r,p),m.useControlledProp("openProp",n),m.useControlledProp("triggerIdProp",f),m.useContextCallback("onOpenChange",l),m.useContextCallback("onOpenChangeComplete",u);let h=m.useState("open"),b=!o&&h,v=m.useState("activeTriggerId"),y=m.useState("mounted"),k=m.useState("payload");m.useSyncedValues({trackCursorAxis:s,disableHoverablePopup:i}),m.useSyncedValue("disabled",o),joe(m,{closeOnActiveTriggerUnmount:!0});let{forceUnmount:S,transitionStatus:_}=Hoe(b,m),x=m.useState("isInstantPhase"),w=m.useState("instantType"),T=m.useState("lastOpenChangeReason"),B=Wc.useRef(null);ae(()=>{h&&o&&m.setOpen(!1,Ue(Re.disabled))},[h,o,m]),ae(()=>{_==="ending"&&T===Re.none||_!=="ending"&&x?(w!=="delay"&&(B.current=w),m.set("instantType","delay")):B.current!==null&&(m.set("instantType",B.current),B.current=null)},[_,x,T,w,m]),ae(()=>{b&&v==null&&m.set("payload",void 0)},[m,v,b]);let R=Wc.useCallback(()=>{m.setOpen(!1,Ue(Re.imperativeAction))},[m]);Wc.useImperativeHandle(a,()=>({unmount:S,close:R}),[S,R]);let A=b||y||!o&&s!=="none";return(0,gO.jsxs)(H8.Provider,{value:m,children:[A&&(0,gO.jsx)(_4e,{store:m,disabled:o,trackCursorAxis:s}),typeof g=="function"?g({payload:k}):g]})});function _4e({store:e,disabled:t,trackCursorAxis:o}){let r=e.useState("floatingRootContext"),n=l0(r,{enabled:!t,referencePress:()=>e.select("closeOnClick")}),i=qj(r,{enabled:!t&&o!=="none",axis:o==="none"?void 0:o}),s=Wc.useMemo(()=>Vt(i.reference,n.reference),[i.reference,n.reference]),a=Wc.useMemo(()=>Vt(i.trigger,n.trigger),[i.trigger,n.trigger]),l=Wc.useMemo(()=>Vt(kI,i.floating,n.floating),[i.floating,n.floating]);return Uoe(e,{activeTriggerProps:s,inactiveTriggerProps:a,popupProps:l}),null}var bO=c(le(),1);var hO=c(le(),1),U8=hO.createContext(void 0);function Qne(){return hO.useContext(U8)}var Jne=(function(e){return e[e.popupOpen=p0.popupOpen]="popupOpen",e.triggerDisabled="data-trigger-disabled",e})({});var tie="data-base-ui-tooltip-trigger";function eie(e){if("composedPath"in e){let o=e.composedPath();for(let r=0;r<o.length;r+=1){let n=o[r];if(qe(n))return n}}let t=e.target;return qe(t)?t:null}function x4e(e){let t=e;for(;t;){if(t.hasAttribute(tie))return t;let o=t.parentElement;if(o){t=o;continue}let r=t.getRootNode();t="host"in r&&qe(r.host)?r.host:null}return null}var oie=Ioe(function(t,o){let{render:r,className:n,style:i,handle:s,payload:a,disabled:l,delay:u,closeOnClick:d=!0,closeDelay:f,id:p,...g}=t,m=Ma(!0),h=s?.store??m;if(!h)throw new Error(Pt(82));let b=Zn(p),v=h.useState("isTriggerActive",b),y=h.useState("isOpenedByTrigger",b),k=h.useState("floatingRootContext"),S=bO.useRef(null),_=u??600,x=f??0,{registerTrigger:w,isMountedByThisTrigger:T}=zoe(b,S,h,{payload:a,closeOnClick:d,closeDelay:x}),B=Qne(),{delayRef:R,isInstantPhase:A,hasProvider:O}=Pj(k,{open:y}),P=wv(k);h.useSyncedValue("isInstantPhase",A);let L=h.useState("disabled"),M=l??L,z=jt(M),V=h.useState("trackCursorAxis"),I=h.useState("disableHoverablePopup"),N=bO.useRef(!1),D=So(),j=bO.useRef(void 0);function Y(){let te=B?.delay,ne=typeof R.current=="object"?R.current.open:void 0,de=_;return O&&(ne!==0?de=u??te??_:de=0),de}function X(te){let ne=S.current;if(!ne||!te)return!1;let de=x4e(te);return de!==null&&de!==ne&&je(ne,de)}function ee(te){let ne=X(te);return N.current=ne,ne&&(P.openChangeTimeout.clear(),P.restTimeout.clear(),P.restTimeoutPending=!1,D.clear()),ne}let J=y8(k,{enabled:!M,mouseOnly:!0,move:!1,handleClose:!I&&V!=="both"?_8():null,restMs:Y,delay(){let te=typeof R.current=="object"?R.current.close:void 0,ne=x;return f==null&&O&&(ne=te),{close:ne}},triggerElementRef:S,isActiveTrigger:v,isClosing:()=>h.select("transitionStatus")==="ending",shouldOpen(){return!N.current}}),$=m8(k,{enabled:!M}).reference,q=te=>{let ne=N.current,de=eie(te),Se=ee(de),Ee=S.current,ve=Ee&&de&&je(Ee,de);if(Se&&h.select("open")&&h.select("lastOpenChangeReason")===Re.triggerHover){h.setOpen(!1,Ue(Re.triggerHover,te));return}if(ne&&!Se&&ve&&!z.current&&!h.select("open")&&Ee&&Ta(j.current)){let be=()=>{!N.current&&!z.current&&!h.select("open")&&h.setOpen(!0,Ue(Re.triggerHover,te,Ee))},ge=Y();ge===0?(D.clear(),be()):D.start(ge,be)}},K=h.useState("triggerProps",T);return We("button",t,{state:{open:y},ref:[o,w,S],props:[J,$,T||V!=="none"?K:void 0,{onMouseOver(te){q(te.nativeEvent)},onFocus(te){X(eie(te.nativeEvent))&&te.preventBaseUIHandler()},onMouseLeave(){N.current=!1,D.clear(),j.current=void 0},onPointerEnter(te){j.current=te.pointerType},onPointerDown(te){j.current=te.pointerType,h.set("closeOnClick",d),d&&!h.select("open")&&h.cancelPendingOpen(te.nativeEvent)},onClick(te){d&&!h.select("open")&&h.cancelPendingOpen(te.nativeEvent)},id:b,[Jne.triggerDisabled]:M?"":void 0,[tie]:M?void 0:""},g],stateAttributesMapping:BI})});var nie=c(le(),1);var yO=c(le(),1),G8=yO.createContext(void 0);function rie(){let e=yO.useContext(G8);if(e===void 0)throw new Error(Pt(70));return e}var W8=c(E(),1),iie=nie.forwardRef(function(t,o){let{keepMounted:r=!1,...n}=t;return Ma().useState("mounted")||r?(0,W8.jsx)(G8.Provider,{value:r,children:(0,W8.jsx)(cne,{ref:o,...n})}):null});var SO=c(le(),1);var vO=c(le(),1),$8=vO.createContext(void 0);function Fv(){let e=vO.useContext($8);if(e===void 0)throw new Error(Pt(71));return e}var sie=c(E(),1),aie=SO.forwardRef(function(t,o){let{render:r,className:n,anchor:i,positionMethod:s="absolute",side:a="top",align:l="center",sideOffset:u=0,alignOffset:d=0,collisionBoundary:f="clipping-ancestors",collisionPadding:p=5,arrowPadding:g=5,sticky:m=!1,disableAnchorTracking:h=!1,collisionAvoidance:b=Lte,style:v,...y}=t,k=Ma(),S=rie(),_=k.useState("open"),x=k.useState("mounted"),w=k.useState("trackCursorAxis"),T=k.useState("disableHoverablePopup"),B=k.useState("floatingRootContext"),R=k.useState("instantType"),A=k.useState("transitionStatus"),O=k.useState("hasViewport"),P=DI({anchor:i,positionMethod:s,floatingRootContext:B,mounted:x,side:a,sideOffset:u,align:l,alignOffset:d,collisionBoundary:f,collisionPadding:p,sticky:m,arrowPadding:g,disableAnchorTracking:h,keepMounted:S,collisionAvoidance:b,adaptiveOrigin:O?_re:void 0}),L=SO.useMemo(()=>({open:_,side:P.side,align:P.align,anchorHidden:P.anchorHidden,instant:w!=="none"?"tracking-cursor":R}),[_,P.side,P.align,P.anchorHidden,w,R]),M=VI(t,L,{styles:P.positionerStyles,transitionStatus:A,props:y,refs:[o,k.useStateSetter("positionerElement")],hidden:!x,inert:!_||w==="both"||T});return(0,sie.jsx)($8.Provider,{value:P,children:M})});var lie=c(le(),1);var w4e={...Pa,...gn},cie=lie.forwardRef(function(t,o){let{render:r,className:n,style:i,...s}=t,a=Ma(),{side:l,align:u}=Fv(),d=a.useState("open"),f=a.useState("instantType"),p=a.useState("transitionStatus"),g=a.useState("popupProps"),m=a.useState("floatingRootContext"),h=a.useState("disabled"),b=a.useState("closeDelay");Xn({open:d,ref:a.context.popupRef,onComplete(){d&&a.context.onOpenChangeComplete?.(!0)}}),b8(m,{enabled:!h,closeDelay:b});let v=a.useStateSetter("popupElement");return We("div",t,{state:{open:d,side:l,align:u,instant:f,transitionStatus:p},ref:[o,a.context.popupRef,v],props:[g,Tv(p),s],stateAttributesMapping:w4e})});var uie=c(le(),1);var die=uie.forwardRef(function(t,o){let{render:r,className:n,style:i,...s}=t,a=Ma(),{arrowRef:l,side:u,align:d,arrowUncentered:f,arrowStyles:p}=Fv(),g=a.useState("open"),m=a.useState("instantType");return We("div",t,{state:{open:g,side:u,align:d,uncentered:f,instant:m},ref:[o,l],props:[{style:p,"aria-hidden":!0},s],stateAttributesMapping:Pa})});var K8=c(le(),1);var Y8=c(E(),1),fie=function(t){let{delay:o,closeDelay:r,timeout:n=400}=t,i=K8.useMemo(()=>({delay:o,closeDelay:r}),[o,r]),s=K8.useMemo(()=>({open:o,close:r}),[o,r]);return(0,Y8.jsx)(U8.Provider,{value:i,children:(0,Y8.jsx)(Bj,{delay:s,timeoutMs:n,children:t.children})})};var mie=c(le(),1);var pie=(function(e){return e.popupWidth="--popup-width",e.popupHeight="--popup-height",e})({});var C4e={activationDirection:e=>e?{"data-activation-direction":e}:null},gie=mie.forwardRef(function(t,o){let{render:r,className:n,style:i,children:s,...a}=t,l=Ma(),u=Fv(),d=l.useState("instantType"),{children:f,state:p}=Gre({store:l,side:u.side,cssVars:pie,children:s}),g={activationDirection:p.activationDirection,transitioning:p.transitioning,instant:d};return We("div",t,{state:g,ref:o,props:[a,{children:f}],stateAttributesMapping:C4e})});var C0=class{constructor(){this.store=new Vv}open(t){let o=t?this.store.context.triggerElements.getById(t):void 0;if(t&&!o)throw new Error(Pt(81,t));this.store.setOpen(!0,Ue(Re.imperativeAction,void 0,o))}close(){this.store.setOpen(!1,Ue(Re.imperativeAction,void 0,void 0))}get isOpen(){return this.store.select("open")}};function hie(){return new C0}function ii(e){return We(e.defaultTagName??"div",e,e)}var vie=c(F(),1),q8="data-wp-hash";function Z8(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&T4e(document)),e.__wpStyleRuntime}function E4e(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${q8}]`))if(o.getAttribute(q8)===t)return!0;return!1}function Sie(e,t,o){if(!e.head)return;let r=Z8(),n=r.injectedStyles.get(e);if(n||(n=new Set,r.injectedStyles.set(e,n)),n.has(t))return;if(E4e(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(q8,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),n.add(t)}function T4e(e){let t=Z8();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,r]of t.styles)Sie(e,o,r);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function kie(e,t){let o=Z8();o.styles.set(e,t);for(let r of o.documents.keys())Sie(r,e,t)}typeof process>"u",kie("a495f9d138",'@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._83ed8a8da5dd50ea__text{margin:0}._14437cfb77831647__heading-2xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-2xl,32px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-2xl,32px);--_gcd-p-line-height:var(--wpds-typography-line-height-2xl,40px);font-size:var(--wpds-typography-font-size-2xl,32px);line-height:var(--wpds-typography-line-height-2xl,40px)}._14437cfb77831647__heading-2xl,._3c78b7fa9b4072dd__heading-xl{font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-emphasis,600)}._3c78b7fa9b4072dd__heading-xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-p-line-height:var(--wpds-typography-line-height-md,24px);font-size:var(--wpds-typography-font-size-xl,20px);line-height:var(--wpds-typography-line-height-md,24px)}.aa58f227716bcde2__heading-lg{--_gcd-heading-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-lg,15px)}.aa58f227716bcde2__heading-lg,.fc4da56d8dfe52c4__heading-md{font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-emphasis,600);line-height:var(--wpds-typography-line-height-sm,20px)}.fc4da56d8dfe52c4__heading-md{--_gcd-heading-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-md,13px)}.a9b78c7c82e8dff7__heading-sm{--_gcd-heading-font-size:var(--wpds-typography-font-size-xs,11px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-xs,11px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-xs,11px);font-weight:var(--wpds-typography-font-weight-emphasis,600);line-height:var(--wpds-typography-line-height-xs,16px);text-transform:uppercase}._305ff559e52180d5__body-xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-default,400);--_gcd-p-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-p-line-height:var(--wpds-typography-line-height-xl,32px);font-size:var(--wpds-typography-font-size-xl,20px);line-height:var(--wpds-typography-line-height-xl,32px)}._305ff559e52180d5__body-xl,.ca1aa3fc2029e958__body-lg{font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-default,400)}.ca1aa3fc2029e958__body-lg{--_gcd-heading-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-default,400);--_gcd-p-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-p-line-height:var(--wpds-typography-line-height-md,24px);font-size:var(--wpds-typography-font-size-lg,15px);line-height:var(--wpds-typography-line-height-md,24px)}._131101940be12424__body-md{--_gcd-heading-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-default,400);--_gcd-p-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-md,13px);line-height:var(--wpds-typography-line-height-sm,20px)}._0e8d87a42c1f75fa__body-sm,._131101940be12424__body-md{font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-default,400)}._0e8d87a42c1f75fa__body-sm{--_gcd-heading-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-default,400);--_gcd-p-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);font-size:var(--wpds-typography-font-size-sm,12px);line-height:var(--wpds-typography-line-height-xs,16px)}}}');var bie={text:"_83ed8a8da5dd50ea__text","heading-2xl":"_14437cfb77831647__heading-2xl","heading-xl":"_3c78b7fa9b4072dd__heading-xl","heading-lg":"aa58f227716bcde2__heading-lg","heading-md":"fc4da56d8dfe52c4__heading-md","heading-sm":"a9b78c7c82e8dff7__heading-sm","body-xl":"_305ff559e52180d5__body-xl","body-lg":"ca1aa3fc2029e958__body-lg","body-md":"_131101940be12424__body-md","body-sm":"_0e8d87a42c1f75fa__body-sm"};typeof process>"u",kie("af6d9984a6","._6defc79820e382c6__button{box-sizing:var(--_gcd-button-box-sizing,border-box);font-family:var(--_gcd-button-font-family,inherit);font-size:var(--_gcd-button-font-size,inherit);font-weight:var(--_gcd-button-font-weight,inherit)}.d2cff2e5dea83bd1__input{box-sizing:var(--_gcd-input-box-sizing,border-box);font-family:var(--_gcd-input-font-family,inherit);font-size:var(--_gcd-input-font-size,inherit);font-weight:var(--_gcd-input-font-weight,inherit);margin:var(--_gcd-input-margin,0);&:is(textarea,[type=text],[type=password],[type=color],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){background-color:var(--_gcd-input-background-color,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-interactive-neutral,#1e1e1e));&:focus{border-color:var(--_gcd-input-border-color-focus,var(--wp-admin-theme-color));box-shadow:var(--_gcd-input-box-shadow-focus,none);outline:var(--_gcd-input-outline-focus,none)}&:disabled{background:var(--_gcd-input-background-disabled,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}}&:is(textarea,[type=text],[type=password],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){line-height:var(--_gcd-input-line-height,inherit);min-height:var(--_gcd-input-min-height,auto);padding:var(--_gcd-input-padding,0)}}._547d86373d02e108__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._8c15fd0ed9f28ba4__div{outline:var(--_gcd-div-outline,0 solid transparent)}p._43cec3e1eec1066d__p{font-size:var(--_gcd-p-font-size,13px);line-height:var(--_gcd-p-line-height,1.5);margin:var(--_gcd-p-margin,0)}:is(h1,h2,h3,h4,h5,h6).e97669c6d9a38497__heading{color:var(--_gcd-heading-color,var(--wpds-color-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-emphasis,600));margin:var(--_gcd-heading-margin,0)}._2c0831b0499dbd6e__a,._2c0831b0499dbd6e__a:is(:hover,:focus,:active){border-radius:var(--_gcd-a-border-radius,0);box-shadow:var(--_gcd-a-box-shadow,none);color:var(--_gcd-a-color,inherit);outline:var(--_gcd-a-outline,0 solid transparent);transition:var(--_gcd-a-transition,none)}");var yie={button:"_6defc79820e382c6__button",input:"d2cff2e5dea83bd1__input",textarea:"_547d86373d02e108__textarea",div:"_8c15fd0ed9f28ba4__div",p:"_43cec3e1eec1066d__p",heading:"e97669c6d9a38497__heading",a:"_2c0831b0499dbd6e__a"},cd=(0,vie.forwardRef)(function({variant:t="body-md",render:o,className:r,...n},i){return ii({render:o,defaultTagName:"span",ref:i,props:Vt(n,{className:W(bie.text,yie.heading,yie.p,bie[t],r)})})});var Cie=c(E(),1),X8="data-wp-hash";function Q8(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&B4e(document)),e.__wpStyleRuntime}function R4e(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${X8}]`))if(o.getAttribute(X8)===t)return!0;return!1}function wie(e,t,o){if(!e.head)return;let r=Q8(),n=r.injectedStyles.get(e);if(n||(n=new Set,r.injectedStyles.set(e,n)),n.has(t))return;if(R4e(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(X8,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),n.add(t)}function B4e(e){let t=Q8();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,r]of t.styles)wie(e,o,r);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function P4e(e,t){let o=Q8();o.styles.set(e,t);for(let r of o.documents.keys())wie(r,e,t)}typeof process>"u",P4e("9db2873e7f","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._96e6251aad1a6136__badge{border-radius:var(--wpds-border-radius-lg,8px);padding-block:var(--wpds-dimension-padding-xs,4px);padding-inline:var(--wpds-dimension-padding-sm,8px)}._99f7158cb520f750__is-high-intent{background-color:var(--wpds-color-background-surface-error,#f6e6e3);color:var(--wpds-color-foreground-content-error,#470000)}.c20ebef2365bc8b7__is-medium-intent{background-color:var(--wpds-color-background-surface-warning,#fde6be);color:var(--wpds-color-foreground-content-warning,#2e1900)}._365e1626c6202e52__is-low-intent{background-color:var(--wpds-color-background-surface-caution,#fee995);color:var(--wpds-color-foreground-content-caution,#281d00)}._33f8198127ddf4ef__is-stable-intent{background-color:var(--wpds-color-background-surface-success,#c6f7cd);color:var(--wpds-color-foreground-content-success,#002900)}._04c1aca8fc449412__is-informational-intent{background-color:var(--wpds-color-background-surface-info,#deebfa);color:var(--wpds-color-foreground-content-info,#001b4f)}._90726e69d495ec19__is-draft-intent{background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);color:var(--wpds-color-foreground-content-neutral,#1e1e1e)}._898f4a544993bd39__is-none-intent{background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral,#dbdbdb);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);padding-block:calc(var(--wpds-dimension-padding-xs, 4px) - var(--wpds-border-width-xs, 1px));padding-inline:calc(var(--wpds-dimension-padding-sm, 8px) - var(--wpds-border-width-xs, 1px))}}}");var _ie={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"},J8=(0,xie.forwardRef)(function({intent:t="none",className:o,...r},n){return(0,Cie.jsx)(cd,{ref:n,className:W(_ie.badge,_ie[`is-${t}-intent`],o),...r,variant:"body-sm"})});var Eie=c(F(),1),Tie=c(ue(),1),Rie=c(E(),1),Ph=(0,Eie.forwardRef)(function({icon:t,size:o=24,...r},n){return(0,Rie.jsx)(Tie.SVG,{ref:n,...t.props,...r,width:o,height:o})});var $c={};Cr($c,{Content:()=>xO,FullBleed:()=>Vie,Header:()=>_O,Root:()=>kO,Title:()=>zie});var Bie=c(F(),1),eH="data-wp-hash";function tH(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&O4e(document)),e.__wpStyleRuntime}function I4e(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${eH}]`))if(o.getAttribute(eH)===t)return!0;return!1}function Pie(e,t,o){if(!e.head)return;let r=tH(),n=r.injectedStyles.get(e);if(n||(n=new Set,r.injectedStyles.set(e,n)),n.has(t))return;if(I4e(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(eH,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),n.add(t)}function O4e(e){let t=tH();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,r]of t.styles)Pie(e,o,r);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function Iie(e,t){let o=tH();o.styles.set(e,t);for(let r of o.documents.keys())Pie(r,e,t)}typeof process>"u",Iie("10f3806643","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");var A4e={"box-sizing":"_336cd3e4e743482f__box-sizing"};typeof process>"u",Iie("5d38cbdd27","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._02872bf298eadc43__root{--wp-ui-card-padding:var(--wpds-dimension-padding-2xl,24px);--wp-ui-card-header-content-gap:var(--wpds-dimension-gap-xl,24px);--wp-ui-card-header-content-margin:calc(var(--wp-ui-card-header-content-gap) - var(--wp-ui-card-padding));background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);border-radius:var(--wpds-border-radius-lg,8px);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);display:flex;flex-direction:column;overflow:clip}._5dffdaf2a6e669ac__content,.bbccc92e6ba5662d__header{padding:var(--wp-ui-card-padding);&:not(:first-child):not(:last-child){padding-block-end:0}}.bbccc92e6ba5662d__header+._5dffdaf2a6e669ac__content{margin-block-start:var(--wp-ui-card-header-content-margin);padding-block-start:0}.c1fa192587e1b4a6__fullbleed{margin-inline:calc(var(--wp-ui-card-padding)*-1);width:calc(100% + var(--wp-ui-card-padding)*2)}._02872bf298eadc43__root>:is(.bbccc92e6ba5662d__header,._5dffdaf2a6e669ac__content):first-child>.c1fa192587e1b4a6__fullbleed:first-child{margin-block-start:calc(var(--wp-ui-card-padding)*-1)}:is(.bbccc92e6ba5662d__header,._5dffdaf2a6e669ac__content):last-child>.c1fa192587e1b4a6__fullbleed:last-child{margin-block-end:calc(var(--wp-ui-card-padding)*-1)}}}");var L4e={root:"_02872bf298eadc43__root",header:"bbccc92e6ba5662d__header",content:"_5dffdaf2a6e669ac__content",fullbleed:"c1fa192587e1b4a6__fullbleed"},kO=(0,Bie.forwardRef)(function({render:t,...o},r){let n=W(L4e.root,A4e["box-sizing"]);return ii({defaultTagName:"div",render:t,ref:r,props:Vt({className:n},o)})});var Oie=c(F(),1),oH="data-wp-hash";function rH(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&N4e(document)),e.__wpStyleRuntime}function M4e(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${oH}]`))if(o.getAttribute(oH)===t)return!0;return!1}function Aie(e,t,o){if(!e.head)return;let r=rH(),n=r.injectedStyles.get(e);if(n||(n=new Set,r.injectedStyles.set(e,n)),n.has(t))return;if(M4e(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(oH,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),n.add(t)}function N4e(e){let t=rH();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,r]of t.styles)Aie(e,o,r);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function D4e(e,t){let o=rH();o.styles.set(e,t);for(let r of o.documents.keys())Aie(r,e,t)}typeof process>"u",D4e("5d38cbdd27","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._02872bf298eadc43__root{--wp-ui-card-padding:var(--wpds-dimension-padding-2xl,24px);--wp-ui-card-header-content-gap:var(--wpds-dimension-gap-xl,24px);--wp-ui-card-header-content-margin:calc(var(--wp-ui-card-header-content-gap) - var(--wp-ui-card-padding));background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);border-radius:var(--wpds-border-radius-lg,8px);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);display:flex;flex-direction:column;overflow:clip}._5dffdaf2a6e669ac__content,.bbccc92e6ba5662d__header{padding:var(--wp-ui-card-padding);&:not(:first-child):not(:last-child){padding-block-end:0}}.bbccc92e6ba5662d__header+._5dffdaf2a6e669ac__content{margin-block-start:var(--wp-ui-card-header-content-margin);padding-block-start:0}.c1fa192587e1b4a6__fullbleed{margin-inline:calc(var(--wp-ui-card-padding)*-1);width:calc(100% + var(--wp-ui-card-padding)*2)}._02872bf298eadc43__root>:is(.bbccc92e6ba5662d__header,._5dffdaf2a6e669ac__content):first-child>.c1fa192587e1b4a6__fullbleed:first-child{margin-block-start:calc(var(--wp-ui-card-padding)*-1)}:is(.bbccc92e6ba5662d__header,._5dffdaf2a6e669ac__content):last-child>.c1fa192587e1b4a6__fullbleed:last-child{margin-block-end:calc(var(--wp-ui-card-padding)*-1)}}}");var V4e={root:"_02872bf298eadc43__root",header:"bbccc92e6ba5662d__header",content:"_5dffdaf2a6e669ac__content",fullbleed:"c1fa192587e1b4a6__fullbleed"},_O=(0,Oie.forwardRef)(function({render:t,...o},r){return ii({defaultTagName:"div",render:t,ref:r,props:Vt({className:V4e.header},o)})});var Lie=c(F(),1),nH="data-wp-hash";function iH(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&z4e(document)),e.__wpStyleRuntime}function F4e(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${nH}]`))if(o.getAttribute(nH)===t)return!0;return!1}function Mie(e,t,o){if(!e.head)return;let r=iH(),n=r.injectedStyles.get(e);if(n||(n=new Set,r.injectedStyles.set(e,n)),n.has(t))return;if(F4e(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(nH,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),n.add(t)}function z4e(e){let t=iH();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,r]of t.styles)Mie(e,o,r);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function j4e(e,t){let o=iH();o.styles.set(e,t);for(let r of o.documents.keys())Mie(r,e,t)}typeof process>"u",j4e("5d38cbdd27","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._02872bf298eadc43__root{--wp-ui-card-padding:var(--wpds-dimension-padding-2xl,24px);--wp-ui-card-header-content-gap:var(--wpds-dimension-gap-xl,24px);--wp-ui-card-header-content-margin:calc(var(--wp-ui-card-header-content-gap) - var(--wp-ui-card-padding));background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);border-radius:var(--wpds-border-radius-lg,8px);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);display:flex;flex-direction:column;overflow:clip}._5dffdaf2a6e669ac__content,.bbccc92e6ba5662d__header{padding:var(--wp-ui-card-padding);&:not(:first-child):not(:last-child){padding-block-end:0}}.bbccc92e6ba5662d__header+._5dffdaf2a6e669ac__content{margin-block-start:var(--wp-ui-card-header-content-margin);padding-block-start:0}.c1fa192587e1b4a6__fullbleed{margin-inline:calc(var(--wp-ui-card-padding)*-1);width:calc(100% + var(--wp-ui-card-padding)*2)}._02872bf298eadc43__root>:is(.bbccc92e6ba5662d__header,._5dffdaf2a6e669ac__content):first-child>.c1fa192587e1b4a6__fullbleed:first-child{margin-block-start:calc(var(--wp-ui-card-padding)*-1)}:is(.bbccc92e6ba5662d__header,._5dffdaf2a6e669ac__content):last-child>.c1fa192587e1b4a6__fullbleed:last-child{margin-block-end:calc(var(--wp-ui-card-padding)*-1)}}}");var H4e={root:"_02872bf298eadc43__root",header:"bbccc92e6ba5662d__header",content:"_5dffdaf2a6e669ac__content",fullbleed:"c1fa192587e1b4a6__fullbleed"},xO=(0,Lie.forwardRef)(function({render:t,...o},r){return ii({defaultTagName:"div",render:t,ref:r,props:Vt({className:H4e.content},o)})});var Nie=c(F(),1),sH="data-wp-hash";function aH(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&G4e(document)),e.__wpStyleRuntime}function U4e(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${sH}]`))if(o.getAttribute(sH)===t)return!0;return!1}function Die(e,t,o){if(!e.head)return;let r=aH(),n=r.injectedStyles.get(e);if(n||(n=new Set,r.injectedStyles.set(e,n)),n.has(t))return;if(U4e(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(sH,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),n.add(t)}function G4e(e){let t=aH();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,r]of t.styles)Die(e,o,r);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function W4e(e,t){let o=aH();o.styles.set(e,t);for(let r of o.documents.keys())Die(r,e,t)}typeof process>"u",W4e("5d38cbdd27","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._02872bf298eadc43__root{--wp-ui-card-padding:var(--wpds-dimension-padding-2xl,24px);--wp-ui-card-header-content-gap:var(--wpds-dimension-gap-xl,24px);--wp-ui-card-header-content-margin:calc(var(--wp-ui-card-header-content-gap) - var(--wp-ui-card-padding));background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);border-radius:var(--wpds-border-radius-lg,8px);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);display:flex;flex-direction:column;overflow:clip}._5dffdaf2a6e669ac__content,.bbccc92e6ba5662d__header{padding:var(--wp-ui-card-padding);&:not(:first-child):not(:last-child){padding-block-end:0}}.bbccc92e6ba5662d__header+._5dffdaf2a6e669ac__content{margin-block-start:var(--wp-ui-card-header-content-margin);padding-block-start:0}.c1fa192587e1b4a6__fullbleed{margin-inline:calc(var(--wp-ui-card-padding)*-1);width:calc(100% + var(--wp-ui-card-padding)*2)}._02872bf298eadc43__root>:is(.bbccc92e6ba5662d__header,._5dffdaf2a6e669ac__content):first-child>.c1fa192587e1b4a6__fullbleed:first-child{margin-block-start:calc(var(--wp-ui-card-padding)*-1)}:is(.bbccc92e6ba5662d__header,._5dffdaf2a6e669ac__content):last-child>.c1fa192587e1b4a6__fullbleed:last-child{margin-block-end:calc(var(--wp-ui-card-padding)*-1)}}}");var $4e={root:"_02872bf298eadc43__root",header:"bbccc92e6ba5662d__header",content:"_5dffdaf2a6e669ac__content",fullbleed:"c1fa192587e1b4a6__fullbleed"},Vie=(0,Nie.forwardRef)(function({render:t,...o},r){return ii({defaultTagName:"div",render:t,ref:r,props:Vt({className:$4e.fullbleed},o)})});var Fie=c(F(),1);var lH=c(E(),1),K4e=(0,lH.jsx)("div",{}),zie=(0,Fie.forwardRef)(function({render:t=K4e,children:o,...r},n){return(0,lH.jsx)(cd,{ref:n,variant:"heading-lg",render:t,...r,children:o})});var jie=c(F(),1),Hie=c(E(),1),cH=(0,jie.forwardRef)(function(t,o){return(0,Hie.jsx)(Tp.Panel,{ref:o,...t})});var Uie=c(F(),1),Gie=c(E(),1),uH=(0,Uie.forwardRef)(function(t,o){return(0,Gie.jsx)(Tp.Root,{ref:o,...t})});var Wie=c(F(),1),$ie=c(E(),1),dH=(0,Wie.forwardRef)(function(t,o){return(0,$ie.jsx)(Tp.Trigger,{ref:o,...t})});var Ih={};Cr(Ih,{Content:()=>rse,Header:()=>Qie,HeaderDescription:()=>ese,Root:()=>Yie});var Kie=c(F(),1);var pH=c(E(),1),Yie=(0,Kie.forwardRef)(function({render:t,...o},r){return(0,pH.jsx)(uH,{ref:r,render:(0,pH.jsx)(kO,{render:t}),...o})});var jv=c(F(),1);var qie=c(F(),1),wO=(0,qie.createContext)({setDescriptionId:()=>{}});var ud=c(E(),1),mH="data-wp-hash";function gH(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&q4e(document)),e.__wpStyleRuntime}function Y4e(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${mH}]`))if(o.getAttribute(mH)===t)return!0;return!1}function Xie(e,t,o){if(!e.head)return;let r=gH(),n=r.injectedStyles.get(e);if(n||(n=new Set,r.injectedStyles.set(e,n)),n.has(t))return;if(Y4e(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(mH,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),n.add(t)}function q4e(e){let t=gH();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,r]of t.styles)Xie(e,o,r);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function hH(e,t){let o=gH();o.styles.set(e,t);for(let r of o.documents.keys())Xie(r,e,t)}typeof process>"u",hH("78199613cf","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._626190151275d6d3__heading-wrapper{--_gcd-heading-color:inherit;--_gcd-heading-font-size:inherit;--_gcd-heading-font-weight:inherit;--_gcd-heading-margin:0;font-family:inherit;line-height:inherit}.cab17c7a373cb60d__header-content{flex:1;min-width:0}.dd89d27c4f15912d__header-trigger-positioner{align-self:center;flex-shrink:0;max-height:0;overflow:visible}.bcfab5f2448bafef__header-trigger-wrapper{border-radius:var(--wpds-border-radius-sm,2px);display:flex;translate:0 -50%}._3106f8d2b0330faa__header-trigger{@media not (prefers-reduced-motion){transition:rotate .15s ease-out}}._5d2dfcb4085c6d0f__header[data-panel-open] ._3106f8d2b0330faa__header-trigger{rotate:180deg}._5d2dfcb4085c6d0f__header[data-disabled] ._3106f8d2b0330faa__header-trigger{color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d)}.e34cf37ccd0d81e0__content{height:var(--collapsible-panel-height);margin-block-start:var(--wp-ui-card-header-content-margin);overflow:hidden;&._03cfdbcd710393c9__overflow-visible{overflow:visible}&[hidden]:not([hidden=until-found]){display:none}&[data-ending-style],&[data-starting-style]{height:0}@media not (prefers-reduced-motion){transition:all .15s ease-out}}}@layer compositions{._41bfdbf7b6c087c2__content-inner{padding-block-start:0}._5d2dfcb4085c6d0f__header{align-items:stretch;display:flex;flex-direction:row;gap:var(--wpds-dimension-gap-sm,8px);outline:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}}}}");var zv={"heading-wrapper":"_626190151275d6d3__heading-wrapper","header-content":"cab17c7a373cb60d__header-content","header-trigger-positioner":"dd89d27c4f15912d__header-trigger-positioner","header-trigger-wrapper":"bcfab5f2448bafef__header-trigger-wrapper","header-trigger":"_3106f8d2b0330faa__header-trigger",header:"_5d2dfcb4085c6d0f__header",content:"e34cf37ccd0d81e0__content","overflow-visible":"_03cfdbcd710393c9__overflow-visible","content-inner":"_41bfdbf7b6c087c2__content-inner"};typeof process>"u",hH("af6d9984a6","._6defc79820e382c6__button{box-sizing:var(--_gcd-button-box-sizing,border-box);font-family:var(--_gcd-button-font-family,inherit);font-size:var(--_gcd-button-font-size,inherit);font-weight:var(--_gcd-button-font-weight,inherit)}.d2cff2e5dea83bd1__input{box-sizing:var(--_gcd-input-box-sizing,border-box);font-family:var(--_gcd-input-font-family,inherit);font-size:var(--_gcd-input-font-size,inherit);font-weight:var(--_gcd-input-font-weight,inherit);margin:var(--_gcd-input-margin,0);&:is(textarea,[type=text],[type=password],[type=color],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){background-color:var(--_gcd-input-background-color,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-interactive-neutral,#1e1e1e));&:focus{border-color:var(--_gcd-input-border-color-focus,var(--wp-admin-theme-color));box-shadow:var(--_gcd-input-box-shadow-focus,none);outline:var(--_gcd-input-outline-focus,none)}&:disabled{background:var(--_gcd-input-background-disabled,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}}&:is(textarea,[type=text],[type=password],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){line-height:var(--_gcd-input-line-height,inherit);min-height:var(--_gcd-input-min-height,auto);padding:var(--_gcd-input-padding,0)}}._547d86373d02e108__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._8c15fd0ed9f28ba4__div{outline:var(--_gcd-div-outline,0 solid transparent)}p._43cec3e1eec1066d__p{font-size:var(--_gcd-p-font-size,13px);line-height:var(--_gcd-p-line-height,1.5);margin:var(--_gcd-p-margin,0)}:is(h1,h2,h3,h4,h5,h6).e97669c6d9a38497__heading{color:var(--_gcd-heading-color,var(--wpds-color-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-emphasis,600));margin:var(--_gcd-heading-margin,0)}._2c0831b0499dbd6e__a,._2c0831b0499dbd6e__a:is(:hover,:focus,:active){border-radius:var(--_gcd-a-border-radius,0);box-shadow:var(--_gcd-a-box-shadow,none);color:var(--_gcd-a-color,inherit);outline:var(--_gcd-a-outline,0 solid transparent);transition:var(--_gcd-a-transition,none)}");var Zie={button:"_6defc79820e382c6__button",input:"d2cff2e5dea83bd1__input",textarea:"_547d86373d02e108__textarea",div:"_8c15fd0ed9f28ba4__div",p:"_43cec3e1eec1066d__p",heading:"e97669c6d9a38497__heading",a:"_2c0831b0499dbd6e__a"};typeof process>"u",hH("5f8e7aa0bc","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._08e8a2e44959f892__outset-ring--focus:focus,._970d04df7376df67__outset-ring--focus-within-except-active:focus-within:not(:has(:active)),.c5cb3ee4bddaa8e4__outset-ring--focus-within-visible:focus-within:has(:focus-visible),.cd83dfc2126a0846__outset-ring--focus-within:focus-within,.d0541bc9dd9dc7b6__outset-ring--focus-visible:focus-visible,.e25b2bdd7aa21721__outset-ring--focus-except-active:focus:not(:active),:focus-visible .ecadb9e080e2dfa5__outset-ring--focus-parent-visible{--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}}");var Z4e={"outset-ring--focus":"_08e8a2e44959f892__outset-ring--focus","outset-ring--focus-except-active":"e25b2bdd7aa21721__outset-ring--focus-except-active","outset-ring--focus-visible":"d0541bc9dd9dc7b6__outset-ring--focus-visible","outset-ring--focus-within":"cd83dfc2126a0846__outset-ring--focus-within","outset-ring--focus-within-except-active":"_970d04df7376df67__outset-ring--focus-within-except-active","outset-ring--focus-within-visible":"c5cb3ee4bddaa8e4__outset-ring--focus-within-visible","outset-ring--focus-parent-visible":"ecadb9e080e2dfa5__outset-ring--focus-parent-visible"},Qie=(0,jv.forwardRef)(function({children:t,className:o,render:r,...n},i){let[s,a]=(0,jv.useState)(),l=(0,jv.useMemo)(()=>({setDescriptionId:a}),[a]);return ii({defaultTagName:"div",render:r,ref:i,props:Vt(n,{className:W(Zie.heading,zv["heading-wrapper"],o),children:(0,ud.jsx)(wO.Provider,{value:l,children:(0,ud.jsxs)(dH,{className:zv.header,render:(0,ud.jsx)(_O,{}),nativeButton:!1,"aria-describedby":s,children:[(0,ud.jsx)("div",{className:zv["header-content"],children:t}),(0,ud.jsx)("div",{className:W(zv["header-trigger-positioner"]),children:(0,ud.jsx)("div",{className:W(zv["header-trigger-wrapper"],Zie.div,Z4e["outset-ring--focus-parent-visible"]),children:(0,ud.jsx)(Ph,{icon:on,className:zv["header-trigger"]})})})]})})})})});var Ip=c(F(),1);var Jie=c(E(),1),ese=(0,Ip.forwardRef)(function({children:t,className:o,...r},n){let i=(0,Ip.useId)(),{setDescriptionId:s}=(0,Ip.useContext)(wO);return(0,Ip.useEffect)(()=>(s(i),()=>s(void 0)),[i,s]),(0,Jie.jsx)("div",{ref:n,id:i,"aria-hidden":"true",className:o,...r,children:t})});var tse=c(F(),1);var vH=c(E(),1),yH="data-wp-hash";function SH(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&Q4e(document)),e.__wpStyleRuntime}function X4e(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${yH}]`))if(o.getAttribute(yH)===t)return!0;return!1}function ose(e,t,o){if(!e.head)return;let r=SH(),n=r.injectedStyles.get(e);if(n||(n=new Set,r.injectedStyles.set(e,n)),n.has(t))return;if(X4e(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(yH,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),n.add(t)}function Q4e(e){let t=SH();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,r]of t.styles)ose(e,o,r);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function J4e(e,t){let o=SH();o.styles.set(e,t);for(let r of o.documents.keys())ose(r,e,t)}typeof process>"u",J4e("78199613cf","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._626190151275d6d3__heading-wrapper{--_gcd-heading-color:inherit;--_gcd-heading-font-size:inherit;--_gcd-heading-font-weight:inherit;--_gcd-heading-margin:0;font-family:inherit;line-height:inherit}.cab17c7a373cb60d__header-content{flex:1;min-width:0}.dd89d27c4f15912d__header-trigger-positioner{align-self:center;flex-shrink:0;max-height:0;overflow:visible}.bcfab5f2448bafef__header-trigger-wrapper{border-radius:var(--wpds-border-radius-sm,2px);display:flex;translate:0 -50%}._3106f8d2b0330faa__header-trigger{@media not (prefers-reduced-motion){transition:rotate .15s ease-out}}._5d2dfcb4085c6d0f__header[data-panel-open] ._3106f8d2b0330faa__header-trigger{rotate:180deg}._5d2dfcb4085c6d0f__header[data-disabled] ._3106f8d2b0330faa__header-trigger{color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d)}.e34cf37ccd0d81e0__content{height:var(--collapsible-panel-height);margin-block-start:var(--wp-ui-card-header-content-margin);overflow:hidden;&._03cfdbcd710393c9__overflow-visible{overflow:visible}&[hidden]:not([hidden=until-found]){display:none}&[data-ending-style],&[data-starting-style]{height:0}@media not (prefers-reduced-motion){transition:all .15s ease-out}}}@layer compositions{._41bfdbf7b6c087c2__content-inner{padding-block-start:0}._5d2dfcb4085c6d0f__header{align-items:stretch;display:flex;flex-direction:row;gap:var(--wpds-dimension-gap-sm,8px);outline:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}}}}");var bH={"heading-wrapper":"_626190151275d6d3__heading-wrapper","header-content":"cab17c7a373cb60d__header-content","header-trigger-positioner":"dd89d27c4f15912d__header-trigger-positioner","header-trigger-wrapper":"bcfab5f2448bafef__header-trigger-wrapper","header-trigger":"_3106f8d2b0330faa__header-trigger",header:"_5d2dfcb4085c6d0f__header",content:"e34cf37ccd0d81e0__content","overflow-visible":"_03cfdbcd710393c9__overflow-visible","content-inner":"_41bfdbf7b6c087c2__content-inner"},rse=(0,tse.forwardRef)(function({className:t,render:o,children:r,hiddenUntilFound:n=!0,...i},s){return(0,vH.jsx)(cH,{ref:s,className:a=>W(bH.content,a.open&&a.transitionStatus==="idle"&&bH["overflow-visible"],t),hiddenUntilFound:n,...i,children:(0,vH.jsx)(xO,{className:bH["content-inner"],render:o,children:r})})});var nse=c(F(),1);function Hv(e,t,o){return(0,nse.cloneElement)(e??t,{children:o})}var e6e=c(sse(),1);var ase=c(Q_(),1),{lock:aBt,unlock:lse}=(0,ase.__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/ui");function t6e(){let e=e6e;if(e.ThemeProvider)return e.ThemeProvider;if(!e.privateApis)throw new Error("@wordpress/ui: @wordpress/theme must expose `ThemeProvider` or `privateApis.ThemeProvider`.");return lse(e.privateApis).ThemeProvider}var CO=t6e();var cse=c(F(),1),kH="data-wp-hash";function _H(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&r6e(document)),e.__wpStyleRuntime}function o6e(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${kH}]`))if(o.getAttribute(kH)===t)return!0;return!1}function use(e,t,o){if(!e.head)return;let r=_H(),n=r.injectedStyles.get(e);if(n||(n=new Set,r.injectedStyles.set(e,n)),n.has(t))return;if(o6e(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(kH,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),n.add(t)}function r6e(e){let t=_H();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,r]of t.styles)use(e,o,r);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function n6e(e,t){let o=_H();o.styles.set(e,t);for(let r of o.documents.keys())use(r,e,t)}typeof process>"u",n6e("32aba35fe1","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._19ce0419607e1896__stack{display:flex}}}");var i6e={stack:"_19ce0419607e1896__stack"},s6e={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)"},Xe=(0,cse.forwardRef)(function({direction:t,gap:o,align:r,justify:n,wrap:i,render:s,...a},l){let u={gap:o&&s6e[o],alignItems:r,justifyContent:n,flexDirection:t,flexWrap:i};return ii({render:s,ref:l,props:Vt(a,{style:u,className:i6e.stack})})});var vt={};Cr(vt,{Popup:()=>_se,Portal:()=>TO,Positioner:()=>RO,Provider:()=>Bse,Root:()=>Tse,Trigger:()=>Cse});var Sse=c(F(),1);var mse=c(F(),1);var xH="data-wp-hash";function wH(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&l6e(document)),e.__wpStyleRuntime}function a6e(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${xH}]`))if(o.getAttribute(xH)===t)return!0;return!1}function fse(e,t,o){if(!e.head)return;let r=wH(),n=r.injectedStyles.get(e);if(n||(n=new Set,r.injectedStyles.set(e,n)),n.has(t))return;if(a6e(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(xH,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),n.add(t)}function l6e(e){let t=wH();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,r]of t.styles)fse(e,o,r);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function c6e(e,t){let o=wH();o.styles.set(e,t);for(let r of o.documents.keys())fse(r,e,t)}typeof process>"u",c6e("be37f31c1e","._11fc52b637ff8a7e__slot{inset:0;isolation:isolate;pointer-events:none;position:fixed;z-index:1000000003}@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._11fc52b637ff8a7e__slot>*{pointer-events:auto}}}");var dse={slot:"_11fc52b637ff8a7e__slot"},pse="data-wp-compat-overlay-slot";function u6e(){return typeof document>"u"?null:document}function d6e(){let e;try{e=window.top?.wp}catch{}let t=e??window.wp;return typeof t?.components=="object"&&t.components!==null}var dd=null;function f6e(e){let t=e.createElement("div");return t.setAttribute(pse,""),dse.slot&&t.classList.add(dse.slot),e.body.appendChild(t),t}function EO(){if(typeof window>"u"||!d6e()&&window.__wpUiCompatOverlaySlotEnabled!==!0)return;let e=u6e();if(!e||!e.body)return;if(dd&&dd.ownerDocument===e&&dd.isConnected)return dd;let t=e.querySelector(`[${pse}]`);return t instanceof HTMLDivElement?(dd=t,t):(dd?.isConnected&&dd.remove(),dd=f6e(e),dd)}var gse=c(E(),1),TO=(0,mse.forwardRef)(function({container:t,...o},r){return(0,gse.jsx)(ls.Portal,{container:t??EO(),...o,ref:r})});var hse=c(F(),1),vse=c(E(),1),CH="data-wp-hash";function EH(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&m6e(document)),e.__wpStyleRuntime}function p6e(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${CH}]`))if(o.getAttribute(CH)===t)return!0;return!1}function bse(e,t,o){if(!e.head)return;let r=EH(),n=r.injectedStyles.get(e);if(n||(n=new Set,r.injectedStyles.set(e,n)),n.has(t))return;if(p6e(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(CH,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),n.add(t)}function m6e(e){let t=EH();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,r]of t.styles)bse(e,o,r);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function yse(e,t){let o=EH();o.styles.set(e,t);for(let r of o.documents.keys())bse(r,e,t)}typeof process>"u",yse("10f3806643","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");var g6e={"box-sizing":"_336cd3e4e743482f__box-sizing"};typeof process>"u",yse("19fcc06039",'@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._480b748dd3510e64__positioner{z-index:var(--wp-ui-tooltip-z-index,initial)}._50096b232db7709d__popup{--_wp-ui-elevation-sm:0 1px 2px rgba(0,0,0,.05),0 2px 3px rgba(0,0,0,.04),0 6px 6px rgba(0,0,0,.03),0 8px 8px rgba(0,0,0,.02);background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border-radius:var(--wpds-border-radius-md,4px);box-shadow:var(--_wp-ui-elevation-sm);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-sm,12px);line-height:1.4;padding:var(--wpds-dimension-padding-xs,4px) var(--wpds-dimension-padding-sm,8px);@media (forced-colors:active){border-bottom-color:CanvasText;border-bottom-style:solid;border-bottom-width:1px;border-left-color:CanvasText;border-left-style:solid;border-left-width:1px;border-right-color:CanvasText;border-right-style:solid;border-right-width:1px;border-top-color:CanvasText;border-top-style:solid;border-top-width:1px}}}}');var h6e={positioner:"_480b748dd3510e64__positioner",popup:"_50096b232db7709d__popup"},RO=(0,hse.forwardRef)(function({align:t="center",className:o,side:r="top",sideOffset:n=4,...i},s){return(0,vse.jsx)(ls.Positioner,{ref:s,align:t,side:r,sideOffset:n,...i,className:W(g6e["box-sizing"],h6e.positioner,o)})});var E0=c(E(),1),TH="data-wp-hash";function RH(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&y6e(document)),e.__wpStyleRuntime}function b6e(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${TH}]`))if(o.getAttribute(TH)===t)return!0;return!1}function kse(e,t,o){if(!e.head)return;let r=RH(),n=r.injectedStyles.get(e);if(n||(n=new Set,r.injectedStyles.set(e,n)),n.has(t))return;if(b6e(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(TH,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),n.add(t)}function y6e(e){let t=RH();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,r]of t.styles)kse(e,o,r);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function v6e(e,t){let o=RH();o.styles.set(e,t);for(let r of o.documents.keys())kse(r,e,t)}typeof process>"u",v6e("19fcc06039",'@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._480b748dd3510e64__positioner{z-index:var(--wp-ui-tooltip-z-index,initial)}._50096b232db7709d__popup{--_wp-ui-elevation-sm:0 1px 2px rgba(0,0,0,.05),0 2px 3px rgba(0,0,0,.04),0 6px 6px rgba(0,0,0,.03),0 8px 8px rgba(0,0,0,.02);background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border-radius:var(--wpds-border-radius-md,4px);box-shadow:var(--_wp-ui-elevation-sm);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-sm,12px);line-height:1.4;padding:var(--wpds-dimension-padding-xs,4px) var(--wpds-dimension-padding-sm,8px);@media (forced-colors:active){border-bottom-color:CanvasText;border-bottom-style:solid;border-bottom-width:1px;border-left-color:CanvasText;border-left-style:solid;border-left-width:1px;border-right-color:CanvasText;border-right-style:solid;border-right-width:1px;border-top-color:CanvasText;border-top-style:solid;border-top-width:1px}}}}');var S6e={positioner:"_480b748dd3510e64__positioner",popup:"_50096b232db7709d__popup"},k6e={background:"#1e1e1e"},_se=(0,Sse.forwardRef)(function({portal:t,positioner:o,children:r,className:n,...i},s){let a=(0,E0.jsx)(CO,{color:k6e,children:(0,E0.jsx)(ls.Popup,{ref:s,className:W(S6e.popup,n),...i,children:r})}),l=Hv(o,(0,E0.jsx)(RO,{}),a);return Hv(t,(0,E0.jsx)(TO,{}),l)});var xse=c(F(),1),wse=c(E(),1),Cse=(0,xse.forwardRef)(function(t,o){return(0,wse.jsx)(ls.Trigger,{ref:o,...t})});var Ese=c(E(),1);function Tse(e){return(0,Ese.jsx)(ls.Root,{...e})}var Rse=c(E(),1);function Bse({...e}){return(0,Rse.jsx)(ls.Provider,{...e})}var T0=c(F(),1),R0=c(E(),1),BH="data-wp-hash";function PH(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&x6e(document)),e.__wpStyleRuntime}function _6e(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${BH}]`))if(o.getAttribute(BH)===t)return!0;return!1}function Pse(e,t,o){if(!e.head)return;let r=PH(),n=r.injectedStyles.get(e);if(n||(n=new Set,r.injectedStyles.set(e,n)),n.has(t))return;if(_6e(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(BH,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),n.add(t)}function x6e(e){let t=PH();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,r]of t.styles)Pse(e,o,r);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function IH(e,t){let o=PH();o.styles.set(e,t);for(let r of o.documents.keys())Pse(r,e,t)}typeof process>"u",IH("af6d9984a6","._6defc79820e382c6__button{box-sizing:var(--_gcd-button-box-sizing,border-box);font-family:var(--_gcd-button-font-family,inherit);font-size:var(--_gcd-button-font-size,inherit);font-weight:var(--_gcd-button-font-weight,inherit)}.d2cff2e5dea83bd1__input{box-sizing:var(--_gcd-input-box-sizing,border-box);font-family:var(--_gcd-input-font-family,inherit);font-size:var(--_gcd-input-font-size,inherit);font-weight:var(--_gcd-input-font-weight,inherit);margin:var(--_gcd-input-margin,0);&:is(textarea,[type=text],[type=password],[type=color],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){background-color:var(--_gcd-input-background-color,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-interactive-neutral,#1e1e1e));&:focus{border-color:var(--_gcd-input-border-color-focus,var(--wp-admin-theme-color));box-shadow:var(--_gcd-input-box-shadow-focus,none);outline:var(--_gcd-input-outline-focus,none)}&:disabled{background:var(--_gcd-input-background-disabled,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}}&:is(textarea,[type=text],[type=password],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){line-height:var(--_gcd-input-line-height,inherit);min-height:var(--_gcd-input-min-height,auto);padding:var(--_gcd-input-padding,0)}}._547d86373d02e108__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._8c15fd0ed9f28ba4__div{outline:var(--_gcd-div-outline,0 solid transparent)}p._43cec3e1eec1066d__p{font-size:var(--_gcd-p-font-size,13px);line-height:var(--_gcd-p-line-height,1.5);margin:var(--_gcd-p-margin,0)}:is(h1,h2,h3,h4,h5,h6).e97669c6d9a38497__heading{color:var(--_gcd-heading-color,var(--wpds-color-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-emphasis,600));margin:var(--_gcd-heading-margin,0)}._2c0831b0499dbd6e__a,._2c0831b0499dbd6e__a:is(:hover,:focus,:active){border-radius:var(--_gcd-a-border-radius,0);box-shadow:var(--_gcd-a-box-shadow,none);color:var(--_gcd-a-color,inherit);outline:var(--_gcd-a-outline,0 solid transparent);transition:var(--_gcd-a-transition,none)}");var w6e={button:"_6defc79820e382c6__button",input:"d2cff2e5dea83bd1__input",textarea:"_547d86373d02e108__textarea",div:"_8c15fd0ed9f28ba4__div",p:"_43cec3e1eec1066d__p",heading:"e97669c6d9a38497__heading",a:"_2c0831b0499dbd6e__a"};typeof process>"u",IH("10f3806643","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");var C6e={"box-sizing":"_336cd3e4e743482f__box-sizing"};typeof process>"u",IH("bc14d8e61b",'@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.cb2baafdc08746bb__input-layout{--wp-ui-input-layout-padding-inline:var(--wpds-dimension-padding-md,12px);background-color:var(--wpds-color-background-interactive-neutral-weak,#0000);border-color:var(--wpds-color-stroke-interactive-neutral,#8d8d8d);border-radius:var(--wpds-border-radius-sm,2px);border-style:solid;border-width:var(--wpds-border-width-xs,1px);color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);display:flex;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:max(var(--wpds-typography-font-size-md,13px),16px);height:var(--wpds-dimension-size-lg,40px);line-height:1;@media (min-width:600px){font-size:var(--wpds-typography-font-size-md,13px)}&._0c807a84cbb94e0c__is-size-compact{height:var(--wpds-dimension-size-md,32px)}&._0c807a84cbb94e0c__is-size-compact,&.ed67cda122dc1e7b__is-size-small{--wp-ui-input-layout-padding-inline:var(--wpds-dimension-padding-sm,8px)}&.ed67cda122dc1e7b__is-size-small{height:var(--wpds-dimension-size-sm,24px)}&._6fb7104732387680__is-disabled,&:has([data-can-disable-input-layout][data-disabled]){background-color:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000);border-color:var(--wpds-color-stroke-interactive-neutral-disabled,#dbdbdb);color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);@media (forced-colors:active){border-bottom-color:GrayText;border-left-color:GrayText;border-right-color:GrayText;border-top-color:GrayText;color:GrayText}}&._8097270636ca6100__is-borderless{border-color:transparent}&:has(._0d7afad74a057888__input-layout-slot:focus-within){outline:none}&:hover:not(._6fb7104732387680__is-disabled,:has([data-can-disable-input-layout][data-disabled]),._8097270636ca6100__is-borderless){border-color:var(--wpds-color-stroke-interactive-neutral-active,#6e6e6e)}}.c192b41a12b4387b__slot-wrapper{display:contents}._0d7afad74a057888__input-layout-slot{align-items:center;display:flex;&._0c952682762ca288__is-padding-minimal{--wp-ui-input-layout-prefix-padding-start:calc(var(--wp-ui-input-layout-padding-inline) - var(--wpds-dimension-padding-xs, 4px));--wp-ui-input-layout-suffix-padding-end:calc(var(--wp-ui-input-layout-padding-inline) - var(--wpds-dimension-padding-xs, 4px))}[data-slot-type=prefix] &{padding-inline-start:var(--wp-ui-input-layout-prefix-padding-start,var(--wp-ui-input-layout-padding-inline))}[data-slot-type=suffix] &{padding-inline-end:var(--wp-ui-input-layout-suffix-padding-end,var(--wp-ui-input-layout-padding-inline))}}}}');var Uv={"input-layout":"cb2baafdc08746bb__input-layout","is-size-compact":"_0c807a84cbb94e0c__is-size-compact","is-size-small":"ed67cda122dc1e7b__is-size-small","is-disabled":"_6fb7104732387680__is-disabled","is-borderless":"_8097270636ca6100__is-borderless","input-layout-slot":"_0d7afad74a057888__input-layout-slot","slot-wrapper":"c192b41a12b4387b__slot-wrapper","is-padding-minimal":"_0c952682762ca288__is-padding-minimal"},Ise=(0,T0.forwardRef)(function({className:t,children:o,visuallyDisabled:r,size:n="default",isBorderless:i,prefix:s,suffix:a,...l},u){return(0,R0.jsxs)("div",{ref:u,className:W(w6e.div,C6e["box-sizing"],Uv["input-layout"],Uv[`is-size-${n}`],r&&Uv["is-disabled"],i&&Uv["is-borderless"],t),...l,children:[T0.Children.count(s)>0&&(0,R0.jsx)("div",{className:Uv["slot-wrapper"],"data-slot-type":"prefix",children:s}),o,T0.Children.count(a)>0&&(0,R0.jsx)("div",{className:Uv["slot-wrapper"],"data-slot-type":"suffix",children:a})]})});var Ase=c(F(),1),Mse=c(E(),1),OH="data-wp-hash";function AH(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&T6e(document)),e.__wpStyleRuntime}function E6e(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${OH}]`))if(o.getAttribute(OH)===t)return!0;return!1}function Lse(e,t,o){if(!e.head)return;let r=AH(),n=r.injectedStyles.get(e);if(n||(n=new Set,r.injectedStyles.set(e,n)),n.has(t))return;if(E6e(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(OH,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),n.add(t)}function T6e(e){let t=AH();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,r]of t.styles)Lse(e,o,r);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function R6e(e,t){let o=AH();o.styles.set(e,t);for(let r of o.documents.keys())Lse(r,e,t)}typeof process>"u",R6e("bc14d8e61b",'@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.cb2baafdc08746bb__input-layout{--wp-ui-input-layout-padding-inline:var(--wpds-dimension-padding-md,12px);background-color:var(--wpds-color-background-interactive-neutral-weak,#0000);border-color:var(--wpds-color-stroke-interactive-neutral,#8d8d8d);border-radius:var(--wpds-border-radius-sm,2px);border-style:solid;border-width:var(--wpds-border-width-xs,1px);color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);display:flex;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:max(var(--wpds-typography-font-size-md,13px),16px);height:var(--wpds-dimension-size-lg,40px);line-height:1;@media (min-width:600px){font-size:var(--wpds-typography-font-size-md,13px)}&._0c807a84cbb94e0c__is-size-compact{height:var(--wpds-dimension-size-md,32px)}&._0c807a84cbb94e0c__is-size-compact,&.ed67cda122dc1e7b__is-size-small{--wp-ui-input-layout-padding-inline:var(--wpds-dimension-padding-sm,8px)}&.ed67cda122dc1e7b__is-size-small{height:var(--wpds-dimension-size-sm,24px)}&._6fb7104732387680__is-disabled,&:has([data-can-disable-input-layout][data-disabled]){background-color:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000);border-color:var(--wpds-color-stroke-interactive-neutral-disabled,#dbdbdb);color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);@media (forced-colors:active){border-bottom-color:GrayText;border-left-color:GrayText;border-right-color:GrayText;border-top-color:GrayText;color:GrayText}}&._8097270636ca6100__is-borderless{border-color:transparent}&:has(._0d7afad74a057888__input-layout-slot:focus-within){outline:none}&:hover:not(._6fb7104732387680__is-disabled,:has([data-can-disable-input-layout][data-disabled]),._8097270636ca6100__is-borderless){border-color:var(--wpds-color-stroke-interactive-neutral-active,#6e6e6e)}}.c192b41a12b4387b__slot-wrapper{display:contents}._0d7afad74a057888__input-layout-slot{align-items:center;display:flex;&._0c952682762ca288__is-padding-minimal{--wp-ui-input-layout-prefix-padding-start:calc(var(--wp-ui-input-layout-padding-inline) - var(--wpds-dimension-padding-xs, 4px));--wp-ui-input-layout-suffix-padding-end:calc(var(--wp-ui-input-layout-padding-inline) - var(--wpds-dimension-padding-xs, 4px))}[data-slot-type=prefix] &{padding-inline-start:var(--wp-ui-input-layout-prefix-padding-start,var(--wp-ui-input-layout-padding-inline))}[data-slot-type=suffix] &{padding-inline-end:var(--wp-ui-input-layout-suffix-padding-end,var(--wp-ui-input-layout-padding-inline))}}}}');var Ose={"input-layout":"cb2baafdc08746bb__input-layout","is-size-compact":"_0c807a84cbb94e0c__is-size-compact","is-size-small":"ed67cda122dc1e7b__is-size-small","is-disabled":"_6fb7104732387680__is-disabled","is-borderless":"_8097270636ca6100__is-borderless","input-layout-slot":"_0d7afad74a057888__input-layout-slot","slot-wrapper":"c192b41a12b4387b__slot-wrapper","is-padding-minimal":"_0c952682762ca288__is-padding-minimal"},LH=(0,Ase.forwardRef)(function({padding:t="default",className:o,...r},n){return(0,Mse.jsx)("div",{ref:n,className:W(Ose["input-layout-slot"],Ose[`is-padding-${t}`],o),...r})});LH.displayName="InputLayout.Slot";var Nse=Object.assign(Ise,{Slot:LH});var Dse={align:"start",sideOffset:8,collisionPadding:12};var Oh={};Cr(Oh,{Control:()=>aae,Description:()=>eae,Details:()=>nae,Item:()=>Use,Label:()=>qse,Root:()=>zse});var Vse=c(F(),1);var DH=c(E(),1),MH="data-wp-hash";function NH(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&P6e(document)),e.__wpStyleRuntime}function B6e(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${MH}]`))if(o.getAttribute(MH)===t)return!0;return!1}function Fse(e,t,o){if(!e.head)return;let r=NH(),n=r.injectedStyles.get(e);if(n||(n=new Set,r.injectedStyles.set(e,n)),n.has(t))return;if(B6e(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(MH,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),n.add(t)}function P6e(e){let t=NH();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,r]of t.styles)Fse(e,o,r);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function I6e(e,t){let o=NH();o.styles.set(e,t);for(let r of o.documents.keys())Fse(r,e,t)}typeof process>"u",I6e("10f3806643","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");var O6e={"box-sizing":"_336cd3e4e743482f__box-sizing"},A6e=e=>(0,DH.jsx)(Xe,{...e,direction:"column",gap:"sm"}),zse=(0,Vse.forwardRef)(function({className:t,render:o=A6e,...r},n){return(0,DH.jsx)(as.Root,{ref:n,className:W(O6e["box-sizing"],t),render:o,...r})});var jse=c(F(),1),Hse=c(E(),1),Use=(0,jse.forwardRef)(function(t,o){return(0,Hse.jsx)(as.Item,{ref:o,...t})});var Kse=c(F(),1);var Gse=c(F(),1),VH="data-wp-hash";function FH(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&M6e(document)),e.__wpStyleRuntime}function L6e(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${VH}]`))if(o.getAttribute(VH)===t)return!0;return!1}function Wse(e,t,o){if(!e.head)return;let r=FH(),n=r.injectedStyles.get(e);if(n||(n=new Set,r.injectedStyles.set(e,n)),n.has(t))return;if(L6e(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(VH,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),n.add(t)}function M6e(e){let t=FH();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,r]of t.styles)Wse(e,o,r);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function N6e(e,t){let o=FH();o.styles.set(e,t);for(let r of o.documents.keys())Wse(r,e,t)}typeof process>"u",N6e("fa606a57ae","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.f37b9e2e191ebd66__visually-hidden{word-wrap:normal;border:0;clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-break:normal}}}");var D6e={"visually-hidden":"f37b9e2e191ebd66__visually-hidden"},pt=(0,Gse.forwardRef)(function({render:t,...o},r){return ii({render:t,ref:r,props:Vt({className:D6e["visually-hidden"]},o,{"data-visually-hidden":""})})});var jH=c(E(),1),zH="data-wp-hash";function HH(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&F6e(document)),e.__wpStyleRuntime}function V6e(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${zH}]`))if(o.getAttribute(zH)===t)return!0;return!1}function Yse(e,t,o){if(!e.head)return;let r=HH(),n=r.injectedStyles.get(e);if(n||(n=new Set,r.injectedStyles.set(e,n)),n.has(t))return;if(V6e(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(zH,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),n.add(t)}function F6e(e){let t=HH();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,r]of t.styles)Yse(e,o,r);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function z6e(e,t){let o=HH();o.styles.set(e,t);for(let r of o.documents.keys())Yse(r,e,t)}typeof process>"u",z6e("e08ffbfdae",'@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._2d5ad850b2f90964__label{--wp-ui-field-label-line-height:var(--wpds-typography-line-height-xs,16px);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-xs,11px);font-weight:var(--wpds-typography-font-weight-emphasis,600);line-height:var(--wp-ui-field-label-line-height);text-transform:uppercase;&._17c4214649230bea__is-plain{font-size:var(--wpds-typography-font-size-md,13px);text-transform:none}}._08a3750500e0233f__description{--_gcd-p-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);--_gcd-p-margin:0;text-wrap:pretty;color:var(--wpds-color-foreground-content-neutral-weak,#707070);font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-sm,12px);line-height:var(--wpds-typography-line-height-xs,16px)}}}');var $se={label:"_2d5ad850b2f90964__label","is-plain":"_17c4214649230bea__is-plain",description:"_08a3750500e0233f__description"},qse=(0,Kse.forwardRef)(function({className:t,hideFromVision:o,variant:r,...n},i){let s=(0,jH.jsx)(as.Label,{ref:i,className:W($se.label,r&&$se[`is-${r}`],t),...n});return o?(0,jH.jsx)(pt,{render:s}):s});var Zse=c(F(),1),Jse=c(E(),1),UH="data-wp-hash";function GH(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&H6e(document)),e.__wpStyleRuntime}function j6e(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${UH}]`))if(o.getAttribute(UH)===t)return!0;return!1}function Xse(e,t,o){if(!e.head)return;let r=GH(),n=r.injectedStyles.get(e);if(n||(n=new Set,r.injectedStyles.set(e,n)),n.has(t))return;if(j6e(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(UH,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),n.add(t)}function H6e(e){let t=GH();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,r]of t.styles)Xse(e,o,r);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function Qse(e,t){let o=GH();o.styles.set(e,t);for(let r of o.documents.keys())Xse(r,e,t)}typeof process>"u",Qse("af6d9984a6","._6defc79820e382c6__button{box-sizing:var(--_gcd-button-box-sizing,border-box);font-family:var(--_gcd-button-font-family,inherit);font-size:var(--_gcd-button-font-size,inherit);font-weight:var(--_gcd-button-font-weight,inherit)}.d2cff2e5dea83bd1__input{box-sizing:var(--_gcd-input-box-sizing,border-box);font-family:var(--_gcd-input-font-family,inherit);font-size:var(--_gcd-input-font-size,inherit);font-weight:var(--_gcd-input-font-weight,inherit);margin:var(--_gcd-input-margin,0);&:is(textarea,[type=text],[type=password],[type=color],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){background-color:var(--_gcd-input-background-color,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-interactive-neutral,#1e1e1e));&:focus{border-color:var(--_gcd-input-border-color-focus,var(--wp-admin-theme-color));box-shadow:var(--_gcd-input-box-shadow-focus,none);outline:var(--_gcd-input-outline-focus,none)}&:disabled{background:var(--_gcd-input-background-disabled,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}}&:is(textarea,[type=text],[type=password],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){line-height:var(--_gcd-input-line-height,inherit);min-height:var(--_gcd-input-min-height,auto);padding:var(--_gcd-input-padding,0)}}._547d86373d02e108__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._8c15fd0ed9f28ba4__div{outline:var(--_gcd-div-outline,0 solid transparent)}p._43cec3e1eec1066d__p{font-size:var(--_gcd-p-font-size,13px);line-height:var(--_gcd-p-line-height,1.5);margin:var(--_gcd-p-margin,0)}:is(h1,h2,h3,h4,h5,h6).e97669c6d9a38497__heading{color:var(--_gcd-heading-color,var(--wpds-color-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-emphasis,600));margin:var(--_gcd-heading-margin,0)}._2c0831b0499dbd6e__a,._2c0831b0499dbd6e__a:is(:hover,:focus,:active){border-radius:var(--_gcd-a-border-radius,0);box-shadow:var(--_gcd-a-box-shadow,none);color:var(--_gcd-a-color,inherit);outline:var(--_gcd-a-outline,0 solid transparent);transition:var(--_gcd-a-transition,none)}");var U6e={button:"_6defc79820e382c6__button",input:"d2cff2e5dea83bd1__input",textarea:"_547d86373d02e108__textarea",div:"_8c15fd0ed9f28ba4__div",p:"_43cec3e1eec1066d__p",heading:"e97669c6d9a38497__heading",a:"_2c0831b0499dbd6e__a"};typeof process>"u",Qse("e08ffbfdae",'@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._2d5ad850b2f90964__label{--wp-ui-field-label-line-height:var(--wpds-typography-line-height-xs,16px);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-xs,11px);font-weight:var(--wpds-typography-font-weight-emphasis,600);line-height:var(--wp-ui-field-label-line-height);text-transform:uppercase;&._17c4214649230bea__is-plain{font-size:var(--wpds-typography-font-size-md,13px);text-transform:none}}._08a3750500e0233f__description{--_gcd-p-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);--_gcd-p-margin:0;text-wrap:pretty;color:var(--wpds-color-foreground-content-neutral-weak,#707070);font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-sm,12px);line-height:var(--wpds-typography-line-height-xs,16px)}}}');var G6e={label:"_2d5ad850b2f90964__label","is-plain":"_17c4214649230bea__is-plain",description:"_08a3750500e0233f__description"},eae=(0,Zse.forwardRef)(function({className:t,...o},r){return(0,Jse.jsx)(as.Description,{ref:r,className:W(U6e.p,G6e.description,t),...o})});var tae=c(F(),1),oae=c(G(),1);var Op=c(E(),1),WH="data-wp-hash";function $H(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&$6e(document)),e.__wpStyleRuntime}function W6e(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${WH}]`))if(o.getAttribute(WH)===t)return!0;return!1}function rae(e,t,o){if(!e.head)return;let r=$H(),n=r.injectedStyles.get(e);if(n||(n=new Set,r.injectedStyles.set(e,n)),n.has(t))return;if(W6e(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(WH,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),n.add(t)}function $6e(e){let t=$H();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,r]of t.styles)rae(e,o,r);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function K6e(e,t){let o=$H();o.styles.set(e,t);for(let r of o.documents.keys())rae(r,e,t)}typeof process>"u",K6e("e08ffbfdae",'@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._2d5ad850b2f90964__label{--wp-ui-field-label-line-height:var(--wpds-typography-line-height-xs,16px);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-xs,11px);font-weight:var(--wpds-typography-font-weight-emphasis,600);line-height:var(--wp-ui-field-label-line-height);text-transform:uppercase;&._17c4214649230bea__is-plain{font-size:var(--wpds-typography-font-size-md,13px);text-transform:none}}._08a3750500e0233f__description{--_gcd-p-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);--_gcd-p-margin:0;text-wrap:pretty;color:var(--wpds-color-foreground-content-neutral-weak,#707070);font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-sm,12px);line-height:var(--wpds-typography-line-height-xs,16px)}}}');var Y6e={label:"_2d5ad850b2f90964__label","is-plain":"_17c4214649230bea__is-plain",description:"_08a3750500e0233f__description"},nae=(0,tae.forwardRef)(function({className:t,...o},r){return(0,Op.jsxs)(Op.Fragment,{children:[(0,Op.jsx)(pt,{render:(0,Op.jsx)(as.Description,{}),children:(0,oae.__)("More details follow the field.")}),(0,Op.jsx)("div",{ref:r,className:W(Y6e.description,t),...o})]})});var iae=c(F(),1),sae=c(E(),1),aae=(0,iae.forwardRef)(function(t,o){return(0,sae.jsx)(as.Control,{ref:o,...t})});var Ap={};Cr(Ap,{Item:()=>dae,Popup:()=>Sae,Portal:()=>PO,Positioner:()=>IO,Root:()=>_ae,Trigger:()=>Tae});var lae=c(F(),1);var B0=c(E(),1),KH="data-wp-hash";function YH(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&Z6e(document)),e.__wpStyleRuntime}function q6e(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${KH}]`))if(o.getAttribute(KH)===t)return!0;return!1}function cae(e,t,o){if(!e.head)return;let r=YH(),n=r.injectedStyles.get(e);if(n||(n=new Set,r.injectedStyles.set(e,n)),n.has(t))return;if(q6e(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(KH,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),n.add(t)}function Z6e(e){let t=YH();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,r]of t.styles)cae(e,o,r);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function uae(e,t){let o=YH();o.styles.set(e,t);for(let r of o.documents.keys())cae(r,e,t)}typeof process>"u",uae("5705fc490f",'@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._380b81b8f79fb10f__dropdown-motion{--wp-ui-dropdown-slide-distance:4px;--wp-ui-dropdown-slide-duration:var(--wpds-motion-duration-md,200ms);--wp-ui-dropdown-slide-easing:var(--wpds-motion-easing-expressive,cubic-bezier(0.25,0,0,1));--wp-ui-dropdown-fade-duration:var(--wpds-motion-duration-sm,100ms);--wp-ui-dropdown-fade-easing:linear;@media not (prefers-reduced-motion){transition-duration:var(--wp-ui-dropdown-slide-duration),var(--wp-ui-dropdown-fade-duration);transition-property:transform,opacity;transition-timing-function:var(--wp-ui-dropdown-slide-easing),var(--wp-ui-dropdown-fade-easing);will-change:transform,opacity}opacity:1;transform:translate(0);&[data-instant]{transition:none}&[data-ending-style],&[data-starting-style]{opacity:0}&[data-side=bottom][data-ending-style],&[data-side=bottom][data-starting-style]{transform:translateY(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&[data-side=top][data-ending-style],&[data-side=top][data-starting-style]{transform:translateY(var(--wp-ui-dropdown-slide-distance))}&[data-side=left][data-ending-style],&[data-side=left][data-starting-style]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}&[data-side=right][data-ending-style],&[data-side=right][data-starting-style]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}}}}@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._234b520016b4e56f__popup{--wp-ui-popup-padding:var(--wpds-dimension-padding-xs,4px);--_wp-ui-elevation-md:0 2px 3px rgba(0,0,0,.05),0 4px 5px rgba(0,0,0,.04),0 12px 12px rgba(0,0,0,.03),0 16px 16px rgba(0,0,0,.02);background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral,#dbdbdb);border-radius:var(--wpds-border-radius-md,4px);box-shadow:var(--_wp-ui-elevation-md);display:grid;grid-template-areas:"header" "main";grid-template-rows:auto minmax(0,1fr);max-height:min(var(--available-height),480px,60dvh);max-width:var(--available-width);min-width:var(--anchor-width)}.f43dc7c768d7b622__list{color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);display:grid;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-md,13px);grid-area:main;grid-template-areas:"scrollable" "footer";grid-template-rows:minmax(0,1fr) auto;line-height:var(--wpds-typography-line-height-sm,20px)}._233cd60cdb84a2ef__list-scrollable-container{grid-area:scrollable;overflow-block:auto;overscroll-behavior:contain;scroll-padding-block:var(--wp-ui-popup-padding);&:not(:empty){padding-block:var(--wp-ui-popup-padding)}}.ec4db6f0122263e7__list-footer{grid-area:footer;padding-block:var(--wp-ui-popup-padding);._233cd60cdb84a2ef__list-scrollable-container:not(:empty)+&{border-block-start:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral,#dbdbdb)}}.b3c0d7f103fb10a2__group:not(:first-child){margin-block-start:var(--wpds-dimension-gap-sm,8px)}._21b59380477c306c__group-label{align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;min-height:var(--wpds-dimension-size-md,32px);padding-inline:var(--wpds-dimension-padding-md,12px)}._684ccb7988365b4f__item{--wp-ui-popup-item-height:var(--wpds-dimension-size-lg,40px);--wp-ui-popup-item-padding-inline:var(--wpds-dimension-padding-md,12px);--wp-ui-popup-item-padding-block:var(--wpds-dimension-padding-xs,4px);align-items:center;border-radius:var(--wpds-border-radius-sm,2px);display:flex;gap:var(--wpds-dimension-gap-xs,4px);justify-content:flex-start;margin-inline:var(--wp-ui-popup-padding);min-height:var(--wp-ui-popup-item-height);padding-block:var(--wp-ui-popup-item-padding-block);padding-inline-end:var(--wp-ui-popup-item-padding-inline);padding-inline-start:calc(var(--wp-ui-popup-item-padding-inline) - var(--wpds-dimension-padding-xs, 4px));user-select:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}&.f181b98b0d33282a__is-size-compact{--wp-ui-popup-item-height:var(--wpds-dimension-size-md,32px);--wp-ui-popup-item-padding-inline:var(--wpds-dimension-padding-sm,8px)}&._38f7faff93c61958__is-size-small{--wp-ui-popup-item-height:var(--wpds-dimension-size-sm,24px);--wp-ui-popup-item-padding-inline:var(--wpds-dimension-padding-sm,8px);--wp-ui-popup-item-padding-block:2px}&:not([data-selected]){._92fbe4765dfad5ee__item-indicator-icon{opacity:0}}&[data-highlighted]:not([aria-disabled=true]){background-color:var(--wpds-color-background-interactive-brand-weak-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 12%,#fff));color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);outline:none;@media (forced-colors:active){outline:1px solid Highlight}}&[aria-disabled=true]{background-color:var(--wpds-color-background-interactive-brand-weak-disabled,#0000);color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);@media (forced-colors:active){color:GrayText}}}.a3adcfd0b73ffd40__item-icon{flex-shrink:0}._06c7ff39d2f685b9__empty:not(:empty){--wp-ui-popup-empty-min-height:var(--wpds-dimension-size-lg,40px);--wp-ui-popup-empty-padding-inline:var(--wpds-dimension-padding-md,12px);align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-md,13px);grid-area:main;line-height:var(--wpds-typography-line-height-sm,20px);min-height:var(--wp-ui-popup-empty-min-height);padding-inline:var(--wp-ui-popup-empty-padding-inline)}}}');var BO={popup:"_234b520016b4e56f__popup _380b81b8f79fb10f__dropdown-motion",list:"f43dc7c768d7b622__list","list-scrollable-container":"_233cd60cdb84a2ef__list-scrollable-container","list-footer":"ec4db6f0122263e7__list-footer",group:"b3c0d7f103fb10a2__group","group-label":"_21b59380477c306c__group-label",item:"_684ccb7988365b4f__item","is-size-compact":"f181b98b0d33282a__is-size-compact","is-size-small":"_38f7faff93c61958__is-size-small","item-indicator-icon":"_92fbe4765dfad5ee__item-indicator-icon","item-icon":"a3adcfd0b73ffd40__item-icon",empty:"_06c7ff39d2f685b9__empty"};typeof process>"u",uae("10f3806643","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");var X6e={"box-sizing":"_336cd3e4e743482f__box-sizing"},dae=(0,lae.forwardRef)(function({className:t,value:o,size:r="default",children:n,...i},s){return(0,B0.jsxs)(Dn.Item,{className:W(X6e["box-sizing"],BO.item,BO[`is-size-${r}`],t),value:o,ref:s,...i,children:[(0,B0.jsx)(Ph,{icon:Xi,className:W(BO["item-icon"],BO["item-indicator-icon"]),size:r==="small"?20:24}),(0,B0.jsx)(Dn.ItemText,{children:n})]})});var yae=c(F(),1);var fae=c(F(),1);var pae=c(E(),1),PO=(0,fae.forwardRef)(function({container:t,...o},r){return(0,pae.jsx)(Dn.Portal,{container:t??EO(),...o,ref:r})});var mae=c(F(),1);var bae=c(E(),1),qH="data-wp-hash";function ZH(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&J6e(document)),e.__wpStyleRuntime}function Q6e(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${qH}]`))if(o.getAttribute(qH)===t)return!0;return!1}function gae(e,t,o){if(!e.head)return;let r=ZH(),n=r.injectedStyles.get(e);if(n||(n=new Set,r.injectedStyles.set(e,n)),n.has(t))return;if(Q6e(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(qH,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),n.add(t)}function J6e(e){let t=ZH();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,r]of t.styles)gae(e,o,r);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function hae(e,t){let o=ZH();o.styles.set(e,t);for(let r of o.documents.keys())gae(r,e,t)}typeof process>"u",hae("10f3806643","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");var eze={"box-sizing":"_336cd3e4e743482f__box-sizing"};typeof process>"u",hae("8c70612dd7","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._0ab863136fb95530__positioner{z-index:var(--wp-ui-select-z-index,initial)}}}");var tze={positioner:"_0ab863136fb95530__positioner"},IO=(0,mae.forwardRef)(function({className:t,...o},r){return(0,bae.jsx)(Dn.Positioner,{...Dse,alignItemWithTrigger:!1,...o,ref:r,className:W(eze["box-sizing"],tze.positioner,t)})});var Ah=c(E(),1),QH="data-wp-hash";function JH(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&rze(document)),e.__wpStyleRuntime}function oze(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${QH}]`))if(o.getAttribute(QH)===t)return!0;return!1}function vae(e,t,o){if(!e.head)return;let r=JH(),n=r.injectedStyles.get(e);if(n||(n=new Set,r.injectedStyles.set(e,n)),n.has(t))return;if(oze(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(QH,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),n.add(t)}function rze(e){let t=JH();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,r]of t.styles)vae(e,o,r);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function nze(e,t){let o=JH();o.styles.set(e,t);for(let r of o.documents.keys())vae(r,e,t)}typeof process>"u",nze("5705fc490f",'@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._380b81b8f79fb10f__dropdown-motion{--wp-ui-dropdown-slide-distance:4px;--wp-ui-dropdown-slide-duration:var(--wpds-motion-duration-md,200ms);--wp-ui-dropdown-slide-easing:var(--wpds-motion-easing-expressive,cubic-bezier(0.25,0,0,1));--wp-ui-dropdown-fade-duration:var(--wpds-motion-duration-sm,100ms);--wp-ui-dropdown-fade-easing:linear;@media not (prefers-reduced-motion){transition-duration:var(--wp-ui-dropdown-slide-duration),var(--wp-ui-dropdown-fade-duration);transition-property:transform,opacity;transition-timing-function:var(--wp-ui-dropdown-slide-easing),var(--wp-ui-dropdown-fade-easing);will-change:transform,opacity}opacity:1;transform:translate(0);&[data-instant]{transition:none}&[data-ending-style],&[data-starting-style]{opacity:0}&[data-side=bottom][data-ending-style],&[data-side=bottom][data-starting-style]{transform:translateY(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&[data-side=top][data-ending-style],&[data-side=top][data-starting-style]{transform:translateY(var(--wp-ui-dropdown-slide-distance))}&[data-side=left][data-ending-style],&[data-side=left][data-starting-style]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}&[data-side=right][data-ending-style],&[data-side=right][data-starting-style]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}}}}@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._234b520016b4e56f__popup{--wp-ui-popup-padding:var(--wpds-dimension-padding-xs,4px);--_wp-ui-elevation-md:0 2px 3px rgba(0,0,0,.05),0 4px 5px rgba(0,0,0,.04),0 12px 12px rgba(0,0,0,.03),0 16px 16px rgba(0,0,0,.02);background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral,#dbdbdb);border-radius:var(--wpds-border-radius-md,4px);box-shadow:var(--_wp-ui-elevation-md);display:grid;grid-template-areas:"header" "main";grid-template-rows:auto minmax(0,1fr);max-height:min(var(--available-height),480px,60dvh);max-width:var(--available-width);min-width:var(--anchor-width)}.f43dc7c768d7b622__list{color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);display:grid;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-md,13px);grid-area:main;grid-template-areas:"scrollable" "footer";grid-template-rows:minmax(0,1fr) auto;line-height:var(--wpds-typography-line-height-sm,20px)}._233cd60cdb84a2ef__list-scrollable-container{grid-area:scrollable;overflow-block:auto;overscroll-behavior:contain;scroll-padding-block:var(--wp-ui-popup-padding);&:not(:empty){padding-block:var(--wp-ui-popup-padding)}}.ec4db6f0122263e7__list-footer{grid-area:footer;padding-block:var(--wp-ui-popup-padding);._233cd60cdb84a2ef__list-scrollable-container:not(:empty)+&{border-block-start:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral,#dbdbdb)}}.b3c0d7f103fb10a2__group:not(:first-child){margin-block-start:var(--wpds-dimension-gap-sm,8px)}._21b59380477c306c__group-label{align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;min-height:var(--wpds-dimension-size-md,32px);padding-inline:var(--wpds-dimension-padding-md,12px)}._684ccb7988365b4f__item{--wp-ui-popup-item-height:var(--wpds-dimension-size-lg,40px);--wp-ui-popup-item-padding-inline:var(--wpds-dimension-padding-md,12px);--wp-ui-popup-item-padding-block:var(--wpds-dimension-padding-xs,4px);align-items:center;border-radius:var(--wpds-border-radius-sm,2px);display:flex;gap:var(--wpds-dimension-gap-xs,4px);justify-content:flex-start;margin-inline:var(--wp-ui-popup-padding);min-height:var(--wp-ui-popup-item-height);padding-block:var(--wp-ui-popup-item-padding-block);padding-inline-end:var(--wp-ui-popup-item-padding-inline);padding-inline-start:calc(var(--wp-ui-popup-item-padding-inline) - var(--wpds-dimension-padding-xs, 4px));user-select:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}&.f181b98b0d33282a__is-size-compact{--wp-ui-popup-item-height:var(--wpds-dimension-size-md,32px);--wp-ui-popup-item-padding-inline:var(--wpds-dimension-padding-sm,8px)}&._38f7faff93c61958__is-size-small{--wp-ui-popup-item-height:var(--wpds-dimension-size-sm,24px);--wp-ui-popup-item-padding-inline:var(--wpds-dimension-padding-sm,8px);--wp-ui-popup-item-padding-block:2px}&:not([data-selected]){._92fbe4765dfad5ee__item-indicator-icon{opacity:0}}&[data-highlighted]:not([aria-disabled=true]){background-color:var(--wpds-color-background-interactive-brand-weak-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 12%,#fff));color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);outline:none;@media (forced-colors:active){outline:1px solid Highlight}}&[aria-disabled=true]{background-color:var(--wpds-color-background-interactive-brand-weak-disabled,#0000);color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);@media (forced-colors:active){color:GrayText}}}.a3adcfd0b73ffd40__item-icon{flex-shrink:0}._06c7ff39d2f685b9__empty:not(:empty){--wp-ui-popup-empty-min-height:var(--wpds-dimension-size-lg,40px);--wp-ui-popup-empty-padding-inline:var(--wpds-dimension-padding-md,12px);align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-md,13px);grid-area:main;line-height:var(--wpds-typography-line-height-sm,20px);min-height:var(--wp-ui-popup-empty-min-height);padding-inline:var(--wp-ui-popup-empty-padding-inline)}}}');var XH={popup:"_234b520016b4e56f__popup _380b81b8f79fb10f__dropdown-motion",list:"f43dc7c768d7b622__list","list-scrollable-container":"_233cd60cdb84a2ef__list-scrollable-container","list-footer":"ec4db6f0122263e7__list-footer",group:"b3c0d7f103fb10a2__group","group-label":"_21b59380477c306c__group-label",item:"_684ccb7988365b4f__item","is-size-compact":"f181b98b0d33282a__is-size-compact","is-size-small":"_38f7faff93c61958__is-size-small","item-indicator-icon":"_92fbe4765dfad5ee__item-indicator-icon","item-icon":"a3adcfd0b73ffd40__item-icon",empty:"_06c7ff39d2f685b9__empty"},Sae=(0,yae.forwardRef)(function({className:t,portal:o,positioner:r,children:n,...i},s){let a=(0,Ah.jsx)(CO,{children:(0,Ah.jsx)(Dn.Popup,{ref:s,className:W(XH.popup,t),...i,children:(0,Ah.jsx)(Dn.List,{className:XH.list,children:(0,Ah.jsx)("div",{className:XH["list-scrollable-container"],children:n})})})}),l=Hv(r,(0,Ah.jsx)(IO,{}),a);return Hv(o,(0,Ah.jsx)(PO,{}),l)});var kae=c(E(),1);function _ae(e){return(0,kae.jsx)(Dn.Root,{...e})}var xae=c(F(),1);var wae=c(G(),1);var Wv=c(E(),1),e7="data-wp-hash";function t7(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&sze(document)),e.__wpStyleRuntime}function ize(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${e7}]`))if(o.getAttribute(e7)===t)return!0;return!1}function Cae(e,t,o){if(!e.head)return;let r=t7(),n=r.injectedStyles.get(e);if(n||(n=new Set,r.injectedStyles.set(e,n)),n.has(t))return;if(ize(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(e7,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),n.add(t)}function sze(e){let t=t7();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,r]of t.styles)Cae(e,o,r);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function Eae(e,t){let o=t7();o.styles.set(e,t);for(let r of o.documents.keys())Cae(r,e,t)}typeof process>"u",Eae("5f8e7aa0bc","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._08e8a2e44959f892__outset-ring--focus:focus,._970d04df7376df67__outset-ring--focus-within-except-active:focus-within:not(:has(:active)),.c5cb3ee4bddaa8e4__outset-ring--focus-within-visible:focus-within:has(:focus-visible),.cd83dfc2126a0846__outset-ring--focus-within:focus-within,.d0541bc9dd9dc7b6__outset-ring--focus-visible:focus-visible,.e25b2bdd7aa21721__outset-ring--focus-except-active:focus:not(:active),:focus-visible .ecadb9e080e2dfa5__outset-ring--focus-parent-visible{--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}}");var aze={"outset-ring--focus":"_08e8a2e44959f892__outset-ring--focus","outset-ring--focus-except-active":"e25b2bdd7aa21721__outset-ring--focus-except-active","outset-ring--focus-visible":"d0541bc9dd9dc7b6__outset-ring--focus-visible","outset-ring--focus-within":"cd83dfc2126a0846__outset-ring--focus-within","outset-ring--focus-within-except-active":"_970d04df7376df67__outset-ring--focus-within-except-active","outset-ring--focus-within-visible":"c5cb3ee4bddaa8e4__outset-ring--focus-within-visible","outset-ring--focus-parent-visible":"ecadb9e080e2dfa5__outset-ring--focus-parent-visible"};typeof process>"u",Eae("7b4a0ac519","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._6e4e0445ef20426b__trigger-wrapper{&.fa98c865fb77e675__is-minimal{width:fit-content}}._7893295e3f6d1af7__trigger{align-items:center;background-color:transparent;border:none;color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);display:flex;font-family:inherit;font-size:inherit;gap:var(--wpds-dimension-gap-xs,4px);justify-content:space-between;line-height:1.4;padding-block:4px;padding-inline-end:calc(var(--wp-ui-input-layout-padding-inline) - 4px);padding-inline-start:var(--wp-ui-input-layout-padding-inline);text-align:start;user-select:none;width:100%;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}&.fa98c865fb77e675__is-minimal{width:auto}&:focus{outline:none}&[data-disabled]{background-color:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000);color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d)}}.e760c9339965ce84__trigger-value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;._7893295e3f6d1af7__trigger[data-placeholder] &{color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d)}}._308bc63e43681f99__trigger-caret{flex:0 0 auto}}}");var Gv={"trigger-wrapper":"_6e4e0445ef20426b__trigger-wrapper","is-minimal":"fa98c865fb77e675__is-minimal",trigger:"_7893295e3f6d1af7__trigger","trigger-value":"e760c9339965ce84__trigger-value","trigger-caret":"_308bc63e43681f99__trigger-caret"},Tae=(0,xae.forwardRef)(function({className:t,size:o,variant:r,children:n,placeholder:i=(0,wae.__)("Select"),...s},a){return(0,Wv.jsx)(Nse,{className:W(aze["outset-ring--focus-within-except-active"],Gv["trigger-wrapper"],r==="minimal"&&Gv["is-minimal"],t),size:o,isBorderless:r==="minimal",children:(0,Wv.jsxs)(Dn.Trigger,{...s,className:W(Gv.trigger,r==="minimal"&&Gv["is-minimal"]),"data-can-disable-input-layout":!0,ref:a,children:[(0,Wv.jsx)(Dn.Value,{placeholder:i,className:Gv["trigger-value"],children:n}),(0,Wv.jsx)(Ph,{className:Gv["trigger-caret"],icon:on,size:18})]})})});var Iae=c(F(),1);var OO=c(F(),1),o7=(0,OO.createContext)(void 0),Rae=()=>(0,OO.useContext)(o7);var Bae=c(F(),1);var Pae=c(E(),1),P0=(0,Bae.forwardRef)(function({size:t,...o},r){let n=Rae(),i=t??n;return(0,Pae.jsx)(Ap.Item,{size:i,ref:r,...o})});var Fl=c(E(),1),Oae=(0,Iae.forwardRef)(function({className:t,children:o,items:r,label:n,description:i,details:s,hideLabelFromVision:a,placeholder:l,size:u="default",triggerContent:d,...f},p){return(0,Fl.jsxs)(Oh.Root,{className:t,children:[(0,Fl.jsx)(Oh.Label,{hideFromVision:a,children:n}),(0,Fl.jsxs)(Ap.Root,{items:r,...f,children:[(0,Fl.jsx)(Ap.Trigger,{ref:p,placeholder:l,size:u,children:d}),(0,Fl.jsx)(Ap.Popup,{children:(0,Fl.jsx)(o7.Provider,{value:u,children:o!==void 0?o:r?.map(g=>(0,Fl.jsx)(P0,{value:g,label:g.label,disabled:g.disabled,children:g.label},g.value??"null"))})})]}),i&&(0,Fl.jsx)(Oh.Description,{children:i}),s&&(0,Fl.jsx)(Oh.Details,{children:s})]})});P0.displayName="SelectControl.Item";var r7=Object.assign(Oae,{Item:P0});var Kp=c(G(),1),lC=c(fe(),1),wfe=c(Z(),1);var $v=c(G(),1),Kv=c(F(),1),Lae=c(H(),1),I0=c(E(),1),Aae=[(0,Kv.createInterpolateElement)((0,$v.__)("While writing, you can press <kbd>/</kbd> to quickly insert new blocks."),{kbd:(0,I0.jsx)("kbd",{})}),(0,Kv.createInterpolateElement)((0,$v.__)("Indent a list by pressing <kbd>space</kbd> at the beginning of a line."),{kbd:(0,I0.jsx)("kbd",{})}),(0,Kv.createInterpolateElement)((0,$v.__)("Outdent a list by pressing <kbd>backspace</kbd> at the beginning of a line."),{kbd:(0,I0.jsx)("kbd",{})}),(0,$v.__)("Drag files into the editor to automatically insert media blocks."),(0,$v.__)("Change a block's type by pressing the block icon on the toolbar.")];function lze(){let[e]=(0,Kv.useState)(()=>Math.floor(Math.random()*Aae.length));return(0,I0.jsx)(Lae.Tip,{children:Aae[e]})}var Mae=lze;var pS=c(ce(),1),rde=c(F(),1),nde=c(G(),1);var Lh=c(H(),1);var AO=c(Z(),1),Nae=c(Tt(),1),Lp=c(G(),1);var Dae=c(ce(),1);var Vn=c(E(),1),{Badge:cze}=U(Lh.privateApis);function uze({children:e,onClick:t}){return t?(0,Vn.jsx)(Lh.Button,{__next40pxDefaultSize:!0,className:"block-editor-block-card__parent-select-button",onClick:t,children:e}):e}function dze({title:e,icon:t,description:o,blockType:r,className:n,name:i,allowParentNavigation:s,parentClientId:a,isChild:l,children:u,clientId:d,controls:f}){r&&((0,Nae.default)("`blockType` property in `BlockCard component`",{since:"5.7",alternative:"`title, icon and description` properties"}),{title:e,icon:t,description:o}=r);let{parentBlockClientId:p,parentBlockName:g}=(0,AO.useSelect)(b=>{if(a||l||!s)return{};let{getBlockParents:v,getBlockName:y,shouldRenderBlockListView:k}=U(b(C)),_=v(d,!1).find(x=>k(x));return{parentBlockClientId:_,parentBlockName:_?y(_):null}},[d,s,l,a]),{selectBlock:m}=(0,AO.useDispatch)(C),h=a?"div":"h2";return(0,Vn.jsx)("div",{className:W("block-editor-block-card",{"is-parent":a,"is-child":l},n),children:(0,Vn.jsxs)(Xe,{direction:"column",gap:"sm",children:[(0,Vn.jsxs)(Xe,{direction:"row",align:"center",justify:"space-between",children:[(0,Vn.jsxs)(Xe,{direction:"row",align:"center",justify:"flex-start",children:[p&&(0,Vn.jsx)(Lh.Button,{onClick:()=>m(p),label:g?(0,Lp.sprintf)((0,Lp.__)('Go to "%s" block'),(0,Dae.getBlockType)(g)?.title):(0,Lp.__)("Go to parent block"),style:{minWidth:24,padding:0},icon:(0,Lp.isRTL)()?rn:yi,size:"small"}),l&&(0,Vn.jsx)("span",{className:"block-editor-block-card__child-indicator-icon",children:(0,Vn.jsx)(Lh.Icon,{icon:(0,Lp.isRTL)()?sx:ax})}),(0,Vn.jsxs)(uze,{onClick:a?()=>{m(a)}:void 0,children:[(0,Vn.jsx)(Ct,{icon:t,showColors:!0}),(0,Vn.jsxs)(Xe,{direction:"column",gap:"xs",children:[(0,Vn.jsxs)(h,{className:"block-editor-block-card__title",children:[(0,Vn.jsx)("span",{className:"block-editor-block-card__name",children:i?.length?i:e}),!a&&!l&&!!i?.length&&(0,Vn.jsx)(cze,{children:e})]}),u]})]})]}),f]}),!a&&!l&&o&&(0,Vn.jsx)(cd,{className:"block-editor-block-card__description",children:o})]})})}var O0=dze;var bA=c(fe(),1),Z7=c(Z(),1),Fh=c(F(),1),q7=c(Tt(),1);var nle=c(Z(),1),Mp=c(F(),1),ile=c(H(),1),zl=c(Fae(),1);var zae=c(F(),1),Yv=c(Z(),1),jae=c(fe(),1);var LO=c(E(),1);function fze(e,t,o){if(!o)return t;let r=e.get(t);return r||(r=(0,Yv.createRegistry)({},t),r.registerStore(Qo,Vy),e.set(t,r)),r}var pze=(0,jae.createHigherOrderComponent)(e=>function({useSubRegistry:o=!0,...r}){let n=(0,Yv.useRegistry)(),[i]=(0,zae.useState)(()=>new WeakMap),s=fze(i,n,o);return s===n?(0,LO.jsx)(e,{registry:n,...r}):(0,LO.jsx)(Yv.RegistryProvider,{value:s,children:(0,LO.jsx)(e,{registry:s,...r})})},"withRegistryProvider"),Hae=pze;var Ri=c(F(),1),$ae=c(Z(),1),Kae=c(ce(),1);var Uae=c(F(),1),mze=()=>{},MO=(0,Uae.createContext)({getSelection:()=>{},onChangeSelection:mze});var Gae=()=>{};function Yae(e,t){let o=(0,Kae.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=>Yae(r,t))),o}function qae(e,t){return e.map(o=>{let r=t.internalToExternal.get(o.clientId);return{...o,clientId:r??o.clientId,innerBlocks:qae(o.innerBlocks,t)}})}function Wae(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 NO({clientId:e=null,value:t,onChange:o=Gae,onInput:r=Gae}){let n=(0,$ae.useRegistry)(),{getSelection:i,onChangeSelection:s}=(0,Ri.useContext)(MO),{resetBlocks:a,resetSelection:l,replaceInnerBlocks:u,setHasControlledInnerBlocks:d,__unstableMarkNextChangeAsNotPersistent:f}=n.dispatch(C),{getBlockName:p,getBlocks:g,getSelectionStart:m,getSelectionEnd:h}=n.select(C),b=(0,Ri.useRef)({incoming:null,outgoing:[]}),v=(0,Ri.useRef)(!1),y=(0,Ri.useRef)({externalToInternal:new Map,internalToExternal:new Map}),k=(0,Ri.useRef)(null),S=(0,Ri.useRef)(!1),_=()=>{let R=i();if(!R?.selectionStart?.clientId||R===k.current)return;let A=R.selectionStart.clientId;if(e?y.current.externalToInternal.has(A):!!p(A)){k.current=R;let P=L=>!L?.clientId||!e?L:{...L,clientId:y.current.externalToInternal.get(L.clientId)??L.clientId};S.current=!0,l(P(R.selectionStart),P(R.selectionEnd),R.initialPosition),S.current=!1}},x=()=>{t&&(e?n.batch(()=>{y.current.externalToInternal.clear(),y.current.internalToExternal.clear();let R=t.map(A=>Yae(A,y.current));f(),d(e,!0),v.current&&(b.current.incoming=R),f(),u(e,R),k.current=null}):(v.current&&(b.current.incoming=t),f(),a(t)))},w=()=>{e?(f(),d(e,!1),f(),u(e,[])):(f(),a([]))},T=(0,Ri.useRef)(r),B=(0,Ri.useRef)(o);(0,Ri.useEffect)(()=>{T.current=r,B.current=o},[r,o]),(0,Ri.useEffect)(()=>{let R=b.current.outgoing.includes(t),A=g(e)===t;R?b.current.outgoing[b.current.outgoing.length-1]===t&&(b.current.outgoing=[]):A||(b.current.outgoing=[],x(),_())},[t,e]),(0,Ri.useEffect)(()=>{let{getSelectedBlocksInitialCaretPosition:R,isLastBlockChangePersistent:A,__unstableGetLastBlockChangeHistoryMode:O,__unstableIsLastBlockChangeIgnored:P,areInnerBlocksControlled:L,getBlockParents:M}=n.select(C),z=g(e),V=A(),I=O(),N=!1,D=m(),j=h();v.current=!0;let Y=n.subscribe(()=>{if(e!==null&&p(e)===null)return;let X=A(),ee=O(),J=g(e),$=J!==z;if(z=J,$&&(b.current.incoming||P())){b.current.incoming=null,V=X,I=ee;return}let K=$||N&&!$&&X&&!V,Q=m(),re=h(),se=Q!==D||re!==j;se&&(D=Q,j=re),(K||se)&&n.batch(()=>{if(K){V=X,I=ee;let te=e?qae(z,y.current):z,ne={selectionStart:Q,selectionEnd:re,initialPosition:R()},de=e?Wae(ne,y.current):ne;b.current.outgoing.push(te);let Se=V?B.current:T.current,Ee={selection:de};I==="ignore"&&(Ee.undoIgnore=!0),Se(te,Ee)}if(se&&!K&&Q?.clientId&&!S.current&&(e?y.current.internalToExternal.has(Q.clientId):!M(Q.clientId).some(ne=>L(ne)))){let ne={selectionStart:Q,selectionEnd:re,initialPosition:R()};s(e?Wae(ne,y.current):ne)}}),N=$},C);return()=>{v.current=!1,Y()}},[n,e]),(0,Ri.useEffect)(()=>()=>{w()},[])}var Zae=c(F(),1),Xae=c(Z(),1),Qae=c(Il(),1),Or=c(G(),1);function Jae(){return null}function gze(){let{registerShortcut:e,unregisterShortcut:t}=(0,Xae.useDispatch)(Qae.store),[o]=Me("blockVisibility.allowEditing");return(0,Zae.useEffect)(()=>{e({name:"core/block-editor/copy",category:"block",description:(0,Or.__)("Copy the selected block(s)."),keyCombination:{modifier:"primary",character:"c"}}),e({name:"core/block-editor/cut",category:"block",description:(0,Or.__)("Cut the selected block(s)."),keyCombination:{modifier:"primary",character:"x"}}),e({name:"core/block-editor/paste",category:"block",description:(0,Or.__)("Paste the selected block(s)."),keyCombination:{modifier:"primary",character:"v"}}),e({name:"core/block-editor/duplicate",category:"block",description:(0,Or.__)("Duplicate the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"d"}}),e({name:"core/block-editor/remove",category:"block",description:(0,Or.__)("Remove the selected block(s)."),keyCombination:{modifier:"access",character:"z"}}),e({name:"core/block-editor/paste-styles",category:"block",description:(0,Or.__)("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,Or.__)("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,Or.__)("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,Or.__)("Delete selection."),keyCombination:{character:"del"},aliases:[{character:"backspace"}]}),e({name:"core/block-editor/stop-editing-as-blocks",category:"block",description:(0,Or.__)("Finish editing a design."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/select-all",category:"selection",description:(0,Or.__)("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,Or.__)("Clear selection."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/multi-text-selection",category:"selection",description:(0,Or.__)("Select text across multiple blocks."),keyCombination:{modifier:"shift",character:"arrow"}}),e({name:"core/block-editor/focus-toolbar",category:"global",description:(0,Or.__)("Navigate to the nearest toolbar."),keyCombination:{modifier:"alt",character:"F10"}}),e({name:"core/block-editor/move-up",category:"block",description:(0,Or.__)("Move the selected block(s) up."),keyCombination:{modifier:"secondary",character:"t"}}),e({name:"core/block-editor/move-down",category:"block",description:(0,Or.__)("Move the selected block(s) down."),keyCombination:{modifier:"secondary",character:"y"}}),e({name:"core/block-editor/collapse-list-view",category:"list-view",description:(0,Or.__)("Collapse all other items."),keyCombination:{modifier:"alt",character:"l"}}),e({name:"core/block-editor/group",category:"block",description:(0,Or.__)("Create a group block from the selected multiple blocks."),keyCombination:{modifier:"primary",character:"g"}}),o===!1?t("core/block-editor/toggle-block-visibility"):e({name:"core/block-editor/toggle-block-visibility",category:"block",description:(0,Or.__)("Show or hide the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"h"}}),e({name:"core/block-editor/rename",category:"block",description:(0,Or.__)("Rename the selected block."),keyCombination:{modifier:"primaryAlt",character:"r"}})},[e,t,o]),null}Jae.Register=gze;var DO=Jae;var ele=c(F(),1);function hze(e={}){return(0,ele.useMemo)(()=>({mediaUpload:e.mediaUpload,mediaSideload:e.mediaSideload,mediaFinalize:e.mediaFinalize,mediaDelete:e.mediaDelete,maxUploadFileSize:e.maxUploadFileSize,allowedMimeTypes:e.allowedMimeTypes,allImageSizes:e.allImageSizes,bigImageSizeThreshold:e.bigImageSizeThreshold}),[e])}var tle=hze;var fd=c(E(),1),VO=()=>{},ole=!1,qv=null,Zv=null,rle=["image/heic","image/heif"];function sle(){if(qv!==null)return qv;if(!window.__clientSideMediaProcessing||typeof zl.detectClientSideMediaSupport!="function")return qv=!1,!1;let e=(0,zl.detectClientSideMediaSupport)();return!e||!e.supported?(ole||(console.info(`Client-side media processing unavailable: ${e.reason}. Using server-side processing.`),ole=!0),qv=!1,!1):(qv=!0,!0)}function bze(){return Zv!==null?Zv:sle()||!window.__heicUploadSupport||typeof zl.isHeicCanvasSupported!="function"||!(0,zl.isHeicCanvasSupported)()?(Zv=!1,!1):(Zv=!0,!0)}function yze(e,t,{allowedTypes:o,additionalData:r={},filesList:n,onError:i=VO,onFileChange:s,onSuccess:a,onBatchSuccess:l}){e.dispatch(zl.store).addItems({files:Array.from(n),onChange:s,onSuccess:u=>{t?.[ox]?.(u),a?.(u)},onBatchSuccess:l,onError:u=>i(typeof u=="string"?u:u?.message??""),additionalData:r,allowedTypes:o})}function vze(e,t,{allowedTypes:o,additionalData:r={},filesList:n,onError:i=VO,onFileChange:s,onSuccess:a,onBatchSuccess:l}){let u=Array.from(n),d=u.filter(h=>rle.includes(h.type)),f=u.filter(h=>!rle.includes(h.type)),p=d.length>0&&f.length>0&&t?.mediaUpload,g=p?2:1,m=p?()=>{g--,g<=0&&l?.()}:l;d.length>0&&e.dispatch(zl.store).addItems({files:d,onChange:s,onSuccess:h=>{t?.[ox]?.(h),a?.(h)},onBatchSuccess:m,onError:h=>i(typeof h=="string"?h:h?.message??""),additionalData:r,allowedTypes:o}),f.length>0&&t?.mediaUpload&&t.mediaUpload({allowedTypes:o,additionalData:r,filesList:f,onError:i,onFileChange:s,onSuccess:a,onBatchSuccess:m})}function Sze(e){return NO(e),null}var Xv=Hae(e=>{let{settings:t,registry:o,stripExperimentalSettings:r=!1}=e,n=tle(t),i=sle(),s=bze(),a=i||s,l=!!t?.mediaUpload?.__isMediaUploadInterceptor,u=(0,Mp.useMemo)(()=>{if(a&&t?.mediaUpload&&!l){let v=(i?yze:vze).bind(null,o,t);return v.__isMediaUploadInterceptor=!0,{...t,mediaUpload:v}}return t},[t,o,a,i,l]),{__experimentalUpdateSettings:d}=U((0,nle.useDispatch)(C));(0,Mp.useEffect)(()=>{d({...u,__internalIsInitialized:!0},{stripExperimentalSettings:r,reset:!0})},[u,r,d]);let f=(0,Mp.useRef)(e.selection);f.current=e.selection;let p=(0,Mp.useRef)(e.onChangeSelection??VO);p.current=e.onChangeSelection??VO;let g=(0,Mp.useMemo)(()=>({getSelection:()=>f.current,onChangeSelection:(...b)=>p.current(...b)}),[]),m=(0,fd.jsxs)(ile.SlotFillProvider,{passthrough:!0,children:[!u?.isPreviewMode&&(0,fd.jsx)(DO.Register,{}),(0,fd.jsx)(BX,{children:e.children})]}),h=(0,fd.jsxs)(MO.Provider,{value:g,children:[(0,fd.jsx)(Sze,{clientId:e.clientId,value:e.value,onChange:e.onChange,onInput:e.onInput}),m]});return a&&!l?(0,fd.jsx)(zl.MediaUploadProvider,{settings:n,useSubRegistry:!1,children:h}):h}),kze=e=>(0,fd.jsx)(Xv,{...e,stripExperimentalSettings:!0,children:e.children}),ale=kze;var Q0=c(fe(),1),Kue=c(Z(),1),hA=c(F(),1),Yue=c(H(),1);var Yle=c(le(),1),Mh=c(F(),1),qle=c(G(),1),md=c(fe(),1),Zle=c(H(),1),d7=c(Z(),1);var Hle=c(Z(),1),c7=c(G(),1),V0=c(fe(),1),Ule=c(F(),1);var A0=c(Z(),1),lle=c(fe(),1),cle=c(ce(),1);function n7(e,t){let{getBlockName:o,getBlockEditingMode:r,getBlockMode:n,getBlockRootClientId:i,getBlockOrder:s}=e;if(!t||r(t)!=="default"||n(t)!=="visual"||!(0,cle.hasBlockSupport)(o(t),"editableRoot",!1))return!1;let a=s(i(t));return a.length>1&&a.every(l=>r(l)==="default")}function i7(){return(0,A0.useSelect)(e=>{let t=e(C);return n7(t,t.getSelectedBlockClientId())},[])}function ule(){let e=(0,A0.useRegistry)(),t=(0,A0.useSelect)(r=>U(r(C)).isZoomOut(),[]),o=i7()&&!t;return(0,lle.useRefEffect)(r=>{if(!o)return;let{getSelectedBlockClientId:n,hasMultiSelection:i,isMultiSelecting:s}=e.select(C);if(!er(r,!0,{focus:!1}))return;let{activeElement:a}=r.ownerDocument,l=r.ownerDocument.defaultView.getSelection();return a!==r&&a?.isContentEditable&&r.contains(a)&&Yr(a)===n()&&l.anchorNode&&a.contains(l.anchorNode)&&r.focus(),()=>{if(!(i()||s())&&(er(r,!1),r.ownerDocument.activeElement===r)){let u=Dc(r.ownerDocument.defaultView.getSelection(),r);u&&Yr(u)===n()&&u.focus()}}},[o,e])}var L0=c(oo(),1),dle=c(Z(),1),fle=c(fe(),1);function ple(){let{hasMultiSelection:e}=(0,dle.useSelect)(C);return(0,fle.useRefEffect)(t=>{function o(r){if(r.defaultPrevented||r.keyCode!==L0.HOME&&r.keyCode!==L0.END||r.metaKey||r.ctrlKey||r.altKey||t.contentEditable!=="true"||t.ownerDocument.activeElement!==t||e())return;let n=t.ownerDocument.defaultView.getSelection();Dc(n,t)&&(r.preventDefault(),n.modify(r.shiftKey?"extend":"move",r.keyCode===L0.HOME?"backward":"forward","lineboundary"))}return t.addEventListener("keydown",o),()=>{t.removeEventListener("keydown",o)}},[])}var mle=c(fe(),1),gle=c(Z(),1);function _ze(e){let{isMultiSelecting:t,getMultiSelectedBlockClientIds:o,hasMultiSelection:r,getSelectedBlockClientId:n,getSelectedBlocksInitialCaretPosition:i,__unstableIsFullySelected:s}=e(C);return{isMultiSelecting:t(),multiSelectedBlockClientIds:o(),hasMultiSelection:r(),selectedBlockClientId:n(),initialPosition:i(),isFullSelection:s()}}function hle(){let{initialPosition:e,isMultiSelecting:t,multiSelectedBlockClientIds:o,hasMultiSelection:r,selectedBlockClientId:n,isFullSelection:i}=(0,gle.useSelect)(_ze,[]);return(0,mle.useRefEffect)(s=>{let{ownerDocument:a}=s,{defaultView:l}=a;if(e==null||!r||t)return;let{length:u}=o;u<2||i&&(er(s,!0),l.getSelection().removeAllRanges())},[r,t,o,n,e,i])}var Qv=c(Et(),1),s7=c(oo(),1),FO=c(Z(),1),zO=c(fe(),1),M0=c(F(),1);var a7=c(E(),1);function ble(){let e=(0,M0.useRef)(),t=(0,M0.useRef)(),o=(0,M0.useRef)(),{hasMultiSelection:r,getSelectedBlockClientId:n,getBlockCount:i,getBlockOrder:s,getLastFocus:a,getSectionRootClientId:l,isZoomOut:u}=U((0,FO.useSelect)(C)),{setLastFocus:d}=U((0,FO.useDispatch)(C)),f=(0,M0.useRef)();function p(v){let y=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 k=l(),S=s(k);S.length?e.current.querySelector(`[data-block="${S[0]}"]`).focus():k?e.current.querySelector(`[data-block="${k}"]`).focus():y.focus()}else{let k=v.target.compareDocumentPosition(y)&v.target.DOCUMENT_POSITION_FOLLOWING,S=Qv.focus.tabbable.find(e.current);S.length&&(k?S[0]:S[S.length-1]).focus()}}let g=(0,a7.jsx)("div",{ref:t,tabIndex:"0",onFocus:p}),m=(0,a7.jsx)("div",{ref:o,tabIndex:"0",onFocus:p}),h=(0,zO.useRefEffect)(v=>{function y(w){if(w.defaultPrevented||w.keyCode!==s7.TAB||!o.current||!t.current)return;let{target:T,shiftKey:B}=w,R=B?"findPrevious":"findNext",A=Qv.focus.tabbable[R](T),O=T.closest("[data-block]"),P=O&&A&&(_J(O,A)||Nc(O,A));if((0,Qv.isFormElement)(A)&&P)return;let L=B?t:o;f.current=!0,L.current.focus({preventScroll:!0})}function k(w){d({...a(),current:w.target});let{ownerDocument:T}=v;!w.relatedTarget&&w.target.hasAttribute("data-block")&&T.activeElement===T.body&&i()===0&&v.focus()}function S(w){if(w.keyCode!==s7.TAB||w.target?.getAttribute("role")==="region"||e.current===w.target)return;let B=w.shiftKey?"findPrevious":"findNext",R=Qv.focus.tabbable[B](w.target);(R===t.current||R===o.current)&&(w.preventDefault(),R.focus({preventScroll:!0}))}let{ownerDocument:_}=v,{defaultView:x}=_;return x.addEventListener("keydown",S),v.addEventListener("keydown",y),v.addEventListener("focusout",k),()=>{x.removeEventListener("keydown",S),v.removeEventListener("keydown",y),v.removeEventListener("focusout",k)}},[]),b=(0,zO.useMergeRefs)([e,h]);return[g,b,m]}var Ar=c(Et(),1),Kc=c(oo(),1),jO=c(Z(),1),yle=c(fe(),1);function xze(e,t,o){let r=t===Kc.UP||t===Kc.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 l7(e,t,o,r){let n=Ar.focus.focusable.find(o);t&&n.reverse(),n=n.slice(n.indexOf(e)+1);let i;r&&(i=e.getBoundingClientRect());function s(a){if(a.contentEditable!=="true"&&Yr(a)&&Ar.focus.focusable.find(a).filter(l=>!(0,Ar.isFormElement)(l)).length!==0||!Ar.focus.tabbable.isTabbableIndex(a)||a.isContentEditable&&a.contentEditable!=="true"&&Yr(a.closest('[contenteditable="true"]')))return!1;if(r){let l=a.getBoundingClientRect();if(l.left>=i.right||l.right<=i.left)return!1}return!0}return n.find(s)}function vle(){let{getMultiSelectedBlocksStartClientId:e,getMultiSelectedBlocksEndClientId:t,getSettings:o,hasMultiSelection:r,__unstableIsFullySelected:n}=(0,jO.useSelect)(C),{selectBlock:i}=(0,jO.useDispatch)(C);return(0,yle.useRefEffect)(s=>{let a;function l(){a=null}function u(f,p){let g=l7(f,p,s);return g&&Yr(g)}function d(f){if(f.defaultPrevented)return;let{keyCode:p,shiftKey:g,ctrlKey:m,altKey:h,metaKey:b}=f,v=f.target===s&&Dc(s.ownerDocument.defaultView.getSelection(),s)||f.target,y=p===Kc.UP,k=p===Kc.DOWN,S=p===Kc.LEFT,_=p===Kc.RIGHT,x=y||S,w=S||_,T=y||k,B=w||T,R=g||m||h||b,A=T?Ar.isVerticalEdge:Ar.isHorizontalEdge,{ownerDocument:O}=s,{defaultView:P}=O;if(!B||o().isPreviewMode)return;if(r()){if(g||!n())return;f.preventDefault(),x?i(e()):i(t(),-1);return}if(!xze(v,p,R))return;T?a||(a=(0,Ar.computeCaretRect)(P)):a=null;let L=(0,Ar.isRTL)(v)?!x:x,{keepCaretInsideBlock:M}=o();if(g)A(v,x)&&(u(v,x)?er(s,!0):s.contentEditable==="true"&&(P.getSelection().extend(v,x?0:v.childNodes.length),f.preventDefault()));else if(T&&(0,Ar.isVerticalEdge)(v,x)&&(!h||(0,Ar.isHorizontalEdge)(v,L))&&!M){let z=l7(v,x,s,!0);z&&((0,Ar.placeCaretAtVerticalEdge)(z,h?!x:x,h?void 0:a),f.preventDefault())}else if(w&&P.getSelection().isCollapsed&&(0,Ar.isHorizontalEdge)(v,L)&&!M){let z=l7(v,L,s);(0,Ar.placeCaretAtHorizontalEdge)(z,x),f.preventDefault()}}return s.addEventListener("mousedown",l),s.addEventListener("keydown",d),()=>{s.removeEventListener("mousedown",l),s.removeEventListener("keydown",d)}},[])}var Sle=c(fe(),1),kle=c(Z(),1),Yc=c(oo(),1);function _le(){let e=(0,kle.useSelect)(t=>t(C).getSettings().isPreviewMode,[]);return(0,Sle.useRefEffect)(t=>{if(!e)return;function o(r){let{keyCode:n,shiftKey:i,target:s}=r,a=n===Yc.TAB,l=n===Yc.UP,u=n===Yc.DOWN,d=n===Yc.LEFT;if(!a&&!(l||u||d||n===Yc.RIGHT))return;let g=a?i:l||d,m=Array.from(t.querySelectorAll("[data-block]"));if(!m.length)return;let h=s.closest("[data-block]"),b=h?m.indexOf(h):-1;if(b===-1||a&&(g&&b===0||!g&&b===m.length-1))return;let v;g?v=b<=0?m.length-1:b-1:v=b===-1||b>=m.length-1?0:b+1,r.preventDefault(),m[v].focus()}return t.addEventListener("keydown",o),()=>{t.removeEventListener("keydown",o)}},[e])}var xle=c(Et(),1),HO=c(Z(),1),wle=c(Il(),1),Cle=c(fe(),1);function Ele(){let{getBlockOrder:e,getSelectedBlockClientIds:t,getBlockRootClientId:o}=(0,HO.useSelect)(C),{multiSelect:r,selectBlock:n}=(0,HO.useDispatch)(C),i=(0,wle.__unstableUseShortcutEventMatch)();return(0,Cle.useRefEffect)(s=>{function a(l){if(!i("core/block-editor/select-all",l))return;let u=t(),{ownerDocument:d}=s,f=d.defaultView.getSelection(),p=l.target===s&&Dc(f,s)||l.target;if(u.length<2&&!(0,xle.isEntirelySelected)(p)){if(l.target===s&&p!==s){l.preventDefault();let v=d.createRange();v.selectNodeContents(p),f.removeAllRanges(),f.addRange(v),d.dispatchEvent(new Event("selectionchange"))}return}l.preventDefault();let[g]=u,m=Yr(d.activeElement);if(m&&m!==g&&!Nc(d.getElementById("block-"+g),d.activeElement)){n(m);return}let h=o(g),b=e(h);if(u.length===b.length){h&&(s.ownerDocument.defaultView.getSelection().removeAllRanges(),n(h));return}r(b[0],b[b.length-1])}return s.addEventListener("keydown",a),()=>{s.removeEventListener("keydown",a)}},[])}var UO=c(Z(),1),Tle=c(fe(),1);function Rle(){let{startMultiSelect:e,stopMultiSelect:t}=(0,UO.useDispatch)(C),{getSettings:o,isSelectionEnabled:r,hasSelectedBlock:n,isDraggingBlocks:i,isMultiSelecting:s}=(0,UO.useSelect)(C);return(0,Tle.useRefEffect)(a=>{let{ownerDocument:l}=a,{defaultView:u}=l,d,f;function p(){t(),u.removeEventListener("mouseup",p),f=u.requestAnimationFrame(()=>{if(!n())return;er(a,!1);let b=u.getSelection();if(b.rangeCount){let v=b.getRangeAt(0),{commonAncestorContainer:y}=v,k=v.cloneRange();d.contains(y)&&(d.focus(),b.removeAllRanges(),b.addRange(k))}})}let g;function m({target:b}){g=b}function h({buttons:b,target:v,relatedTarget:y}){v.contains(g)&&(v.contains(y)||i()||b===1&&(s()||a!==v&&(v.getAttribute("contenteditable")!=="true"&&!o().isPreviewMode||r()&&(d=v,e(),u.addEventListener("mouseup",p),er(a,!0)))))}return a.addEventListener("mouseout",h),a.addEventListener("mousedown",m),()=>{a.removeEventListener("mouseout",h),u.removeEventListener("mouseup",p),u.cancelAnimationFrame(f)}},[e,t,r,n])}var WO=c(Z(),1),Ile=c(fe(),1),Jv=c(jo(),1),Ole=c(Et(),1);var{ownsSelection:wze}=U(Jv.privateApis);function Ble(e){let{anchorNode:t,anchorOffset:o}=e;return t.nodeType===t.TEXT_NODE||o===0?t:t.childNodes[o-1]}function Ple(e,t){let{focusNode:o,focusOffset:r}=e;return o.nodeType===o.TEXT_NODE||r===o.childNodes.length?o:r===0&&(0,Ole.isSelectionForward)(e)&&t?o.previousSibling??o.parentElement:o.childNodes[r]}function Cze(e,t){let o=0;for(;e[o]===t[o];)o++;return o}function GO(e){return(e.nodeType===e.ELEMENT_NODE?e:e.parentElement)?.closest("[data-wp-block-attribute-key]")}function Ale(){let{multiSelect:e,selectBlock:t,selectionChange:o}=(0,WO.useDispatch)(C),r=(0,WO.useSelect)(C),{getBlockParents:n,getBlockSelectionStart:i,isMultiSelecting:s,getSelectionStart:a,getSelectionEnd:l,getSelectedBlockClientId:u}=r;return(0,Ile.useRefEffect)(d=>{let{ownerDocument:f}=d,{defaultView:p}=f,g=!1;function m(k){g=k.detail===3,_P(k.shiftKey)}function h(){g=!1,_P(!1)}function b(k){let S=p.getSelection();if(!S.rangeCount)return;let _=Ble(S),x=Ple(S,g);if(!d.contains(_)||!d.contains(x))return;let w=k.shiftKey&&k.type==="mouseup";if(S.isCollapsed&&!w){let A=Yr(_);if(!s()&&A&&A===u()&&n7(r,A)){er(d,!0);let{activeElement:O}=f;O!==d&&O?.isContentEditable&&d.contains(O)&&Yr(O)===A&&d.focus();return}if(d.contentEditable==="true"&&!s()){er(d,!1);let O=_.nodeType===_.ELEMENT_NODE?_:_.parentElement;O=O?.closest("[contenteditable]"),O?.focus()}return}let T=Yr(_),B=Yr(x);if(w){let A=i(),O=Yr(k.target),P=O!==B;(T===B&&S.isCollapsed||!B||P)&&(B=O),T!==A&&(T=A)}if(T===void 0&&B===void 0){er(d,!1);return}if(k.type==="mouseup"&&!k.shiftKey&&!s()&&T===B){let A=Yr(k.target);if(A&&A!==T){S.removeAllRanges();return}}if(T===B)if(s())e(T,T);else{let A=!S.isCollapsed&&(GO(_)||GO(x));if(A&&(A.contentEditable!=="true"||f.activeElement!==A&&!wze(A))){let O=S.getRangeAt(0),P=(0,Jv.create)({element:A,range:O,__unstableIsEditableTree:!0}),L={start:{clientId:T,attributeKey:A.dataset.wpBlockAttributeKey,offset:P.start??0},end:{clientId:T,attributeKey:A.dataset.wpBlockAttributeKey,offset:P.end??P.text.length}},{start:M,end:z}=L,V=a(),I=l();(V.clientId!==M.clientId||I.clientId!==z.clientId||V.attributeKey!==M.attributeKey||V.offset!==M.offset||I.offset!==z.offset)&&o(L)}else t(T)}else{let A=[...n(T),T],O=[...n(B),B],P=Cze(A,O);if(A[P]!==T||O[P]!==B){e(A[P],O[P]);return}let L=GO(_),M=GO(x);if(L&&M){let z=S.getRangeAt(0),V=(0,Jv.create)({element:L,range:z,__unstableIsEditableTree:!0}),I=(0,Jv.create)({element:M,range:z,__unstableIsEditableTree:!0}),N=V.start??V.end,D=I.start??I.end;o({start:{clientId:T,attributeKey:L.dataset.wpBlockAttributeKey,offset:N},end:{clientId:B,attributeKey:M.dataset.wpBlockAttributeKey,offset:D}})}else e(T,B)}}function v(k){let S=p.getSelection();if(!S.rangeCount||S.isCollapsed)return;let _=Yr(Ble(S)),x=Yr(Ple(S,g));_!==x&&b(k)}f.addEventListener("selectionchange",b);function y(k){b(k),_P(!1)}return p.addEventListener("mouseup",y),d.addEventListener("mousedown",m),d.addEventListener("keydown",h),f.addEventListener("copy",v,!0),f.addEventListener("cut",v,!0),f.addEventListener("paste",v,!0),()=>{f.removeEventListener("selectionchange",b),p.removeEventListener("mouseup",y),d.removeEventListener("mousedown",m),d.removeEventListener("keydown",h),f.removeEventListener("copy",v,!0),f.removeEventListener("cut",v,!0),f.removeEventListener("paste",v,!0)}},[e,t,o,n])}var $O=c(Z(),1),Lle=c(fe(),1);function Mle(){let{selectBlock:e}=(0,$O.useDispatch)(C),{isSelectionEnabled:t,getBlockSelectionStart:o,hasMultiSelection:r}=(0,$O.useSelect)(C);return(0,Lle.useRefEffect)(n=>{function i(s){if(!t()||s.button!==0)return;let a=o(),l=Yr(s.target);s.shiftKey?a&&a!==l&&er(n,!0):r()&&e(l)}return n.addEventListener("mousedown",i),()=>{n.removeEventListener("mousedown",i)}},[e,t,o,r])}var KO=c(Z(),1),Nle=c(fe(),1),pd=c(oo(),1),jl=c(ce(),1);function Dle(){let{__unstableIsFullySelected:e,getSelectedBlockClientIds:t,getSelectedBlockClientId:o,__unstableIsSelectionMergeable:r,hasMultiSelection:n,getBlockName:i,canInsertBlockType:s,getBlockRootClientId:a,getSelectionStart:l,getSelectionEnd:u,getBlockAttributes:d}=(0,KO.useSelect)(C),{replaceBlocks:f,__unstableSplitSelection:p,removeBlocks:g,__unstableDeleteSelection:m,__unstableExpandSelection:h,__unstableMarkAutomaticChange:b}=(0,KO.useDispatch)(C);return(0,Nle.useRefEffect)(v=>{function y(_){if(v.contentEditable!=="true")return;if(n()){_.preventDefault();return}let x=v.ownerDocument.defaultView.getSelection();Dc(x,v)||_.preventDefault()}function k(_){if(!_.defaultPrevented){if(!n()){if(_.keyCode===pd.ENTER){if(_.shiftKey||e())return;let x=o(),w=i(x),T=l(),B=u();if(T.attributeKey===B.attributeKey){let R=d(x)[T.attributeKey],A=(0,jl.getBlockTransforms)("from").filter(({type:P})=>P==="enter"),O=(0,jl.findTransform)(A,P=>P.regExp.test(R));if(O){f(x,O.transform({content:R})),b();return}}if(!(0,jl.hasBlockSupport)(w,"splitting",!1)&&!_.__deprecatedOnSplit)return;(s((0,jl.getDefaultBlockName)(),a(x))||s(w,a(x)))&&(p(),_.preventDefault())}return}_.keyCode===pd.ENTER?(er(v,!1),_.preventDefault(),e()?f(t(),(0,jl.createBlock)((0,jl.getDefaultBlockName)())):p()):_.keyCode===pd.BACKSPACE||_.keyCode===pd.DELETE?(er(v,!1),_.preventDefault(),e()?g(t()):r()?m(_.keyCode===pd.DELETE):h()):_.key.length===1&&!(_.metaKey||_.ctrlKey)&&(er(v,!1),r()?m(_.keyCode===pd.DELETE):(_.preventDefault(),v.ownerDocument.defaultView.getSelection().removeAllRanges()))}}function S(_){n()&&(er(v,!1),r()?m():(_.preventDefault(),v.ownerDocument.defaultView.getSelection().removeAllRanges()))}return v.addEventListener("beforeinput",y),v.addEventListener("keydown",k),v.addEventListener("compositionstart",S),()=>{v.removeEventListener("beforeinput",y),v.removeEventListener("keydown",k),v.removeEventListener("compositionstart",S)}},[])}var qc=c(ce(),1),YO=c(Et(),1),tS=c(Z(),1),jle=c(fe(),1);var Vle=c(F(),1),Fle=c(ce(),1),N0=c(Z(),1),Na=c(G(),1),zle=c(es(),1);function eS(){let{getBlockName:e}=(0,N0.useSelect)(C),{getBlockType:t}=(0,N0.useSelect)(Fle.store),{createSuccessNotice:o}=(0,N0.useDispatch)(zle.store);return(0,Vle.useCallback)((r,n)=>{let i="";if(r==="copyStyles")i=(0,Na.__)("Styles copied to clipboard.");else if(n.length===1){let s=n[0],a=t(e(s))?.title;r==="copy"?i=(0,Na.sprintf)((0,Na.__)('Copied "%s" to clipboard.'),a):i=(0,Na.sprintf)((0,Na.__)('Moved "%s" to clipboard.'),a)}else r==="copy"?i=(0,Na.sprintf)((0,Na._n)("Copied %d block to clipboard.","Copied %d blocks to clipboard.",n.length),n.length):i=(0,Na.sprintf)((0,Na._n)("Moved %d block to clipboard.","Moved %d blocks to clipboard.",n.length),n.length);o(i,{type:"snackbar"})},[o,e,t])}function D0(){let e=(0,tS.useRegistry)(),{getBlocksByClientId:t,getSelectedBlockClientIds:o,hasMultiSelection:r,getSettings:n,getBlockName:i,__unstableIsFullySelected:s,__unstableIsSelectionCollapsed:a,__unstableIsSelectionMergeable:l,__unstableGetSelectedBlocksWithPartialSelection:u,canInsertBlockType:d,getBlockRootClientId:f}=(0,tS.useSelect)(C),{flashBlock:p,removeBlocks:g,replaceBlocks:m,__unstableDeleteSelection:h,__unstableExpandSelection:b,__unstableSplitSelection:v}=(0,tS.useDispatch)(C),y=eS();return(0,jle.useRefEffect)(k=>{function S(_){if(_.defaultPrevented)return;let x=o();if(x.length===0)return;if(!r()){let{target:A}=_,{ownerDocument:O}=A;if(_.type==="copy"||_.type==="cut"?(0,YO.documentHasUncollapsedSelection)(O):(0,YO.documentHasSelection)(O)&&!O.activeElement.isContentEditable)return}let{activeElement:w}=_.target.ownerDocument;if(!k.contains(w))return;let T=l(),B=a()||s(),R=!B&&!T;if(_.type==="copy"||_.type==="cut")if(_.preventDefault(),x.length===1&&p(x[0]),R)b();else{y(_.type,x);let A;if(B)A=t(x);else{let[O,P]=u(),L=t(x.slice(1,x.length-1));A=[O,...L,P]}kP(_,A,e)}if(_.type==="cut")B&&!R?g(x):(er(_.target.ownerDocument.activeElement,!1),h());else if(_.type==="paste"){let{__experimentalCanUserUseUnfilteredHTML:A,mediaUpload:O}=n();if(_.clipboardData.getData("rich-text")==="true")return;let{plainText:L,html:M,files:z}=av(_),V=s(),I=[];if(z.length){if(!O){_.preventDefault();return}let Y=(0,qc.getBlockTransforms)("from");I=z.reduce((X,ee)=>{let J=(0,qc.findTransform)(Y,$=>$.type==="files"&&$.isMatch([ee]));return J&&X.push(J.transform([ee])),X},[]).flat()}else I=(0,qc.pasteHandler)({HTML:M,plainText:L,mode:V?"BLOCKS":"AUTO",canUserUseUnfilteredHTML:A});if(typeof I=="string")return;if(V){m(x,I,I.length-1,-1),_.preventDefault();return}if(!r()&&!(0,qc.hasBlockSupport)(i(x[0]),"splitting",!1)&&!_.__deprecatedOnSplit)return;let[N]=x,D=f(N),j=[];for(let Y of I)if(d(Y.name,D))j.push(Y);else{let X=i(D),ee=Y.name!==X?(0,qc.switchToBlockType)(Y,X):[Y];if(!ee)return;for(let J of ee)for(let $ of J.innerBlocks)j.push($)}v(j),_.preventDefault()}}return k.ownerDocument.addEventListener("copy",S),k.ownerDocument.addEventListener("cut",S),k.ownerDocument.addEventListener("paste",S),()=>{k.ownerDocument.removeEventListener("copy",S),k.ownerDocument.removeEventListener("cut",S),k.ownerDocument.removeEventListener("paste",S)}},[])}var oS=c(E(),1);function u7(){let[e,t,o]=ble(),r=(0,Hle.useSelect)(n=>n(C).hasMultiSelection(),[]);return[e,(0,V0.useMergeRefs)([t,D0(),Dle(),ule(),ple(),Rle(),Ale(),Mle(),hle(),Ele(),vle(),_le(),(0,V0.useRefEffect)(n=>(n.tabIndex=0,n.dataset.hasMultiSelection=r,r?(n.setAttribute("aria-label",(0,c7.__)("Multiple selected blocks")),()=>{delete n.dataset.hasMultiSelection,n.contentEditable==="true"?n.setAttribute("aria-label",(0,c7.__)("Editor canvas")):n.removeAttribute("aria-label")}):()=>{delete n.dataset.hasMultiSelection}),[r])]),o]}function Eze({children:e,...t},o){let[r,n,i]=u7();return(0,oS.jsxs)(oS.Fragment,{children:[r,(0,oS.jsx)("div",{...t,ref:(0,V0.useMergeRefs)([n,o]),className:W(t.className,"block-editor-writing-flow"),children:e}),i]})}var qO=(0,Ule.forwardRef)(Eze);var ZO=null;function Gle(){return ZO||(ZO=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:l})=>a?n(l):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},[]),ZO)}var cs=c(F(),1),F0=c(fe(),1);function Wle({frameSize:e,containerWidth:t,maxContainerWidth:o,scaleContainerWidth:r}){return(Math.min(t,o)-e*2)/r}function Tze(e,t){let{scaleValue:o,scrollHeight:r}=e,{frameSize:n,scaleValue:i}=t;return r*(i/o)+n*2}function Rze(e,t){let{containerHeight:o,frameSize:r,scaleValue:n,scrollTop:i}=e,{containerHeight:s,frameSize:a,scaleValue:l,scrollHeight:u}=t,d=i;d=(d+o/2-r)/n-o/2,d=(d+s/2)*l+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 Bze(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 $le({frameSize:e,iframeDocument:t,maxContainerWidth:o=750,scale:r}){let[n,{height:i}]=(0,F0.useResizeObserver)(),[s,{width:a,height:l}]=(0,F0.useResizeObserver)(),u=(0,cs.useRef)(0),d=r!==1,f=(0,F0.useReducedMotion)(),p=r==="auto-scaled",g=(0,cs.useRef)(!1),m=(0,cs.useRef)(null);(0,cs.useEffect)(()=>{d||(u.current=a)},[a,d]);let h=Math.max(u.current,a),b=p?Wle({frameSize:e,containerWidth:a,maxContainerWidth:o,scaleContainerWidth:h}):r,v=(0,cs.useRef)({scaleValue:b,frameSize:e,containerHeight:0,scrollTop:0,scrollHeight:0}),y=(0,cs.useRef)({scaleValue:b,frameSize:e,containerHeight:0,scrollTop:0,scrollHeight:0}),k=(0,cs.useCallback)(()=>{let{scrollTop:x}=v.current,{scrollTop:w}=y.current;return t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scroll-top",`${x}px`),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scroll-top-next",`${w}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(Bze(v.current,y.current),{easing:"cubic-bezier(0.46, 0.03, 0.52, 0.96)",duration:400})},[t]),S=(0,cs.useCallback)(()=>{g.current=!1,m.current=null,t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scale",y.current.scaleValue),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-frame-size",`${y.current.frameSize}px`),t.documentElement.classList.remove("zoom-out-animation"),t.documentElement.scrollTop=y.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=y.current},[t]),_=(0,cs.useRef)(!1);return(0,cs.useEffect)(()=>{if(!t)return;let x=_.current!==d;if(_.current=d,!!x&&(g.current=!0,!!d))return t.documentElement.classList.add("is-zoomed-out"),()=>{t.documentElement.classList.remove("is-zoomed-out")}},[t,d]),(0,cs.useEffect)(()=>{if(t&&(p&&v.current.scaleValue!==1&&(v.current.scaleValue=Wle({frameSize:v.current.frameSize,containerWidth:a,maxContainerWidth:o,scaleContainerWidth:a})),b<1&&(g.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",`${l}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",`${h}px`)),g.current))if(g.current=!1,m.current){m.current.reverse();let x=v.current,w=y.current;v.current=w,y.current=x}else v.current.scrollTop=t.documentElement.scrollTop,v.current.scrollHeight=t.documentElement.scrollHeight,v.current.containerHeight=l,y.current={scaleValue:b,frameSize:e,containerHeight:t.documentElement.clientHeight},y.current.scrollHeight=Tze(v.current,y.current),y.current.scrollTop=Rze(v.current,y.current),m.current=k(),f?S():m.current.onfinish=S},[k,S,f,p,b,e,t,i,a,l,o,h]),{isZoomedOut:d,scaleContainerWidth:h,contentResizeListener:n,containerResizeListener:s}}var Hl=c(E(),1);function Xle(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 Pze(e){return(0,md.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];Xle(a,d,o)},r.addEventListener(s,i[s]);return()=>{for(let s of n)r.removeEventListener(s,i[s])}})}var Kle=new WeakMap,Ize=globalThis.FinalizationRegistry?new globalThis.FinalizationRegistry(e=>URL.revokeObjectURL(e)):void 0;function Oze(e){let t=Kle.get(e);if(t)return t;let o="";Yle.version.split(".")[0]==="18"&&(o="<body><script>document.currentScript.parentElement.remove()<\/script></body>");let r=`<!doctype html>
<html>
<head>
<meta charset="utf-8">
<base href="${window.location.href}">
<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>
${o}
</html>`;return t=URL.createObjectURL(new Blob([r],{type:"text/html"})),Kle.set(e,t),Ize?.register(e,t),t}function Aze({contentRef:e,children:t,tabIndex:o=0,scale:r=1,frameSize:n=0,readonly:i,forwardedRef:s,title:a=(0,qle.__)("Editor canvas"),...l}){let{resolvedAssets:u,isPreviewMode:d}=(0,d7.useSelect)(P=>{let L=P(C).getSettings();return{resolvedAssets:L.__unstableResolvedAssets,isPreviewMode:L.isPreviewMode}},[]),[f,p]=(0,Mh.useState)(),[g,m]=(0,Mh.useState)([]),[h,b,v]=u7(),y=(0,md.useRefEffect)(P=>{let L;function M(N){N.preventDefault()}function z(N){N.target.tagName==="A"&&N.target.getAttribute("href")?.startsWith("#")&&(N.preventDefault(),L.defaultView.location.hash=N.target.getAttribute("href").slice(1))}let{ownerDocument:V}=P;m(Array.from(V.body.classList).filter(N=>N.startsWith("admin-color-")||N.startsWith("post-type-")||N==="wp-embed-responsive"));function I(){let{contentDocument:N}=P,{documentElement:D}=N;L=N,p(N),D.classList.add("block-editor-iframe__html"),N.dir=V.dir;for(let j of Gle())N.getElementById(j.id)||(N.head.appendChild(j.cloneNode(!0)),d||console.warn(`${j.id} was added to the iframe incorrectly. Please use block.json or enqueue_block_assets to add styles to the iframe.`,j));L.addEventListener("dragover",M,!1),L.addEventListener("drop",M,!1),L.addEventListener("click",z)}return P.addEventListener("load",I),()=>{p(void 0),P.removeEventListener("load",I),L?.removeEventListener("dragover",M),L?.removeEventListener("drop",M),L?.removeEventListener("click",z)}},[]),{contentResizeListener:k,containerResizeListener:S,isZoomedOut:_,scaleContainerWidth:x}=$le({scale:r,frameSize:parseInt(n),iframeDocument:f}),w=(0,md.useDisabled)({isDisabled:!i}),T=(0,md.useMergeRefs)([Pze(f),e,b,w]),B=(0,md.useRefEffect)(P=>P.ownerDocument.defaultView?(T(P),()=>T(null)):()=>{},[T]),R=Oze(u),A=o>=0&&!d,O=(0,Hl.jsxs)(Hl.Fragment,{children:[A&&h,(0,Hl.jsx)("iframe",{...l,style:{...l.style,height:l.style?.height,border:0},ref:(0,md.useMergeRefs)([s,y]),tabIndex:o,src:R,title:a,onKeyDown:P=>{if(l.onKeyDown&&l.onKeyDown(P),P.currentTarget.ownerDocument!==P.target.ownerDocument){let{stopPropagation:L}=P.nativeEvent;P.nativeEvent.stopPropagation=()=>{},P.stopPropagation(),P.nativeEvent.stopPropagation=L,Xle(P,window.KeyboardEvent,P.currentTarget)}},children:f&&(0,Mh.createPortal)((0,Hl.jsxs)("body",{ref:B,className:W("block-editor-iframe__body","editor-styles-wrapper",...g),children:[k,(0,Hl.jsx)(Zle.__experimentalStyleProvider,{document:f,children:t})]}),f.documentElement)}),A&&v]});return(0,Hl.jsxs)("div",{className:"block-editor-iframe__container",children:[S,(0,Hl.jsx)("div",{className:W("block-editor-iframe__scale-container",_&&"is-zoomed-out"),style:{"--wp-block-editor-iframe-zoom-out-scale-container-width":_&&`${x}px`},children:O})]})}function Lze(e,t){return(0,d7.useSelect)(r=>r(C).getSettings().__internalIsInitialized,[])?(0,Hl.jsx)(Aze,{...e,forwardedRef:t}):null}var rS=(0,Mh.forwardRef)(Lze);var Wue=c(H(),1),uS=c(F(),1),$ue=c(Z(),1);var QO={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},Mze=new Set(["combinator","comma"]);var Nze=e=>{switch(e){case"pseudo-element":case"pseudo-class":return new RegExp(QO[e].source.replace("(?<argument>\xB6*)","(?<argument>.*)"),"gu");default:return QO[e]}};function Dze(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 Vze(e,t=QO){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 l=i.exec(a);if(!l)continue;let u=l.index-1,d=[],f=l[0],p=a.slice(0,u+1);p&&d.push(p),d.push({...l.groups,type:n,content:f});let g=a.slice(u+f.length+1);g&&d.push(g),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],Mze.has(n.type)&&(n.content=n.content.trim()||" ");break}return o}var Fze=/(['"])([^\\\n]+?)\1/g,zze=/\\./g;function f7(e,t=QO){if(e=e.trim(),e==="")return[];let o=[];e=e.replace(zze,(i,s)=>(o.push({value:i,offset:s}),"\uE000".repeat(i.length))),e=e.replace(Fze,(i,s,a,l)=>(o.push({value:i,offset:l}),`${s}${"\uE001".repeat(a.length)}${s}`));{let i=0,s;for(;(s=e.indexOf("(",i))>-1;){let a=Dze(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=Vze(e,t),n=new Set;for(let i of o.reverse())for(let s of r){let{offset:a,value:l}=i;if(!(s.pos[0]<=a&&a+l.length<=s.pos[1]))continue;let{content:u}=s,d=a-s.pos[0];s.content=u.slice(0,d)+l+u.slice(d+l.length),s.content!==u&&n.add(s)}for(let i of n){let s=Nze(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*XO(e,t){switch(e.type){case"list":for(let o of e.list)yield*XO(o,e);break;case"complex":yield*XO(e.left,e),yield*XO(e.right,e);break;case"compound":yield*e.list.map(o=>[o,e]);break;default:yield[e,t]}}function Qle(e){let t;return Array.isArray(e)?t=e:t=[...XO(e)].map(([o])=>o),t.map(o=>o.content).join("")}var zue=c(vue(),1),jue=c(JO(),1),Hue=c(_ue(),1),Uue=c(Vue(),1),Fue=new Map,Gue=[{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 e8e(e,t){let o=f7(t),r=o.findLastIndex(({content:s,type:a})=>Gue.some(l=>s===l.content&&a===l.type)),n=-1;for(let s=r+1;s<o.length;s++)if(o[s].type==="combinator"){n=s;break}let i=f7(e);return o.splice(n===-1?o.length:n,0,{type:"combinator",content:" ",pos:[0,0]},...i),Qle(o)}function t8e({css:e,ignoredSelectors:t=[],baseURL:o},r="",n){if(!r&&!o)return e;try{let i=[...t,...n?.ignoredSelectors??[],r];return new zue.default([r&&(0,Hue.default)({prefix:r,transform(s,a,l){return i.some(d=>d instanceof RegExp?a.match(d):a.includes(d))?a:Gue.some(d=>a.startsWith(d.content))?e8e(s,a):l}}),o&&(0,Uue.default)({rootUrl:o})].filter(Boolean)).process(e,{}).css}catch(i){return i instanceof jue.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 o8e=(e,t="",o)=>{let r=Fue.get(t);return r||(r=new WeakMap,Fue.set(t,r)),e.map(n=>{let i=r.get(n);return i||(i=t8e(n,t,o),r.set(n,i)),i})},cS=o8e;var zp=c(E(),1);Rf([Bf,py]);function r8e(e,t){return(0,uS.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 l=Bo(a);l.luminance()>.5||l.alpha()===0?i.classList.remove("is-dark-theme"):i.classList.add("is-dark-theme")},[e,t])}function n8e({styles:e,scope:t,transformOptions:o}){let r=(0,$ue.useSelect)(s=>U(s(C)).getStyleOverrides(),[]),[n,i]=(0,uS.useMemo)(()=>{let s=Object.values(e??[]);for(let[a,l]of r){let u=s.findIndex(({id:f})=>a===f),d={...l,id:a};u===-1?s.push(d):s[u]=d}return[cS(s.filter(a=>a?.css),t,o),s.filter(a=>a.__unstableType==="svgs").map(a=>a.assets).join("")]},[e,r,t,o]);return(0,zp.jsxs)(zp.Fragment,{children:[(0,zp.jsx)("style",{ref:r8e(n,t)}),n.map((s,a)=>(0,zp.jsx)("style",{children:s},a)),(0,zp.jsx)(Wue.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 gd=(0,uS.memo)(n8e);var Da=c(E(),1),i8e=(0,hA.memo)(dS),Y7=2e3,s8e=[];function a8e({viewportWidth:e,containerWidth:t,minHeight:o,additionalStyles:r=s8e}){e||(e=t);let[n,{height:i}]=(0,Q0.useResizeObserver)(),{styles:s}=(0,Kue.useSelect)(d=>({styles:d(C).getSettings().styles}),[]),a=(0,hA.useMemo)(()=>s&&[...s,{css:"body{height:auto;overflow:hidden;border:none;padding:0;}",__unstableType:"presets"},...r],[s,r]),l=t/e,u=i?t/(i*l):0;return(0,Da.jsx)(Yue.Disabled,{className:"block-editor-block-preview__content",style:{transform:`scale(${l})`,aspectRatio:u,maxHeight:i>Y7?Y7*l:void 0,minHeight:o},children:(0,Da.jsxs)(rS,{contentRef:(0,Q0.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:Y7,minHeight:l!==0&&l<1&&o?o/l:o},children:[(0,Da.jsx)(gd,{styles:a}),n,(0,Da.jsx)(i8e,{renderAppender:!1})]})})}function que(e){let[t,{width:o}]=(0,Q0.useResizeObserver)();return(0,Da.jsxs)(Da.Fragment,{children:[(0,Da.jsx)("div",{style:{position:"relative",width:"100%",height:0},children:t}),(0,Da.jsx)("div",{className:"block-editor-block-preview__container",children:!!o&&(0,Da.jsx)(a8e,{...e,containerWidth:o})})]})}var fS=c(F(),1),Jue=c(Xue(),1),Que=(0,Jue.createQueue)();function ede({children:e,placeholder:t}){let[o,r]=(0,fS.useState)(!1);return(0,fS.useEffect)(()=>{let n={};return Que.add(n,()=>{(0,fS.flushSync)(()=>{r(!0)})}),()=>{Que.cancel(n)}},[]),o?e:t}var zh=c(E(),1),l8e=[];function c8e({blocks:e,viewportWidth:t=1200,minHeight:o,additionalStyles:r=l8e,__experimentalMinHeight:n,__experimentalPadding:i}){n&&(o=n,(0,q7.default)("The __experimentalMinHeight prop",{since:"6.2",version:"6.4",alternative:"minHeight"})),i&&(r=[...r,{css:`body { padding: ${i}px; }`}],(0,q7.default)("The __experimentalPadding prop of BlockPreview",{since:"6.2",version:"6.4",alternative:"additionalStyles"}));let s=(0,Z7.useSelect)(u=>u(C).getSettings(),[]),a=(0,Fh.useMemo)(()=>({...s,focusMode:!1,isPreviewMode:!0}),[s]),l=(0,Fh.useMemo)(()=>Array.isArray(e)?e:[e],[e]);return!e||e.length===0?null:(0,zh.jsx)(Xv,{value:l,settings:a,children:(0,zh.jsx)(que,{viewportWidth:t,minHeight:o,additionalStyles:r})})}var tde=(0,Fh.memo)(c8e);tde.Async=ede;var us=tde;function ode({blocks:e,props:t={},layout:o}){let r=(0,Z7.useSelect)(u=>u(C).getSettings(),[]),n=(0,Fh.useMemo)(()=>({...r,styles:void 0,focusMode:!1,isPreviewMode:!0}),[r]),i=(0,bA.useDisabled)(),s=(0,bA.useMergeRefs)([t.ref,i]),a=(0,Fh.useMemo)(()=>Array.isArray(e)?e:[e],[e]),l=(0,zh.jsxs)(Xv,{value:a,settings:n,children:[(0,zh.jsx)(gd,{}),(0,zh.jsx)(J0,{renderAppender:!1,layout:o})]});return{...t,ref:s,className:W(t.className,"block-editor-block-preview__live-content","components-disabled"),children:e?.length?l:null}}var jp=c(E(),1);function u8e({item:e}){let{name:t,title:o,icon:r,description:n,initialAttributes:i,example:s}=e,a=(0,pS.isReusableBlock)(e),l=(0,rde.useMemo)(()=>s?(0,pS.getBlockFromExample)(t,{attributes:{...s.attributes,...i},innerBlocks:s.innerBlocks,innerContent:s.innerContent}):(0,pS.createBlock)(t,i),[t,s,i]),u=144,d=280,f=s?.viewportWidth??500,p=d/f,g=p!==0&&p<1&&u?u/p:u;return(0,jp.jsxs)("div",{className:"block-editor-inserter__preview-container",children:[(0,jp.jsx)("div",{className:"block-editor-inserter__preview",children:a||s?(0,jp.jsx)("div",{className:"block-editor-inserter__preview-content",children:(0,jp.jsx)(us,{blocks:l,viewportWidth:f,minHeight:u,additionalStyles:[{css:`
body {
padding: 24px;
min-height:${Math.round(g)}px;
display:flex;
align-items:center;
}
.is-root-container { width: 100%; }
`}]})}):(0,jp.jsx)("div",{className:"block-editor-inserter__preview-content-missing",children:(0,nde.__)("No preview available.")})}),!a&&(0,jp.jsx)(O0,{title:o,icon:r,description:n})]})}var ide=u8e;var SS=c(G(),1),yd=c(F(),1),rU=c(fe(),1);var vde=c(ce(),1),Sde=c(fe(),1);var vS=c(F(),1),Hp=c(ce(),1),bde=c(H(),1),eC=c(oo(),1);var pde=c(H(),1),mde=c(F(),1);var mS=c(F(),1),sde=c(G(),1),ade=c(Kr(),1),lde=c(E(),1);function d8e(e,t){let[o,r]=(0,mS.useState)(!1);return(0,mS.useEffect)(()=>{o&&(0,ade.speak)((0,sde.__)("Use left and right arrow keys to move through blocks"))},[o]),(0,lde.jsx)("div",{ref:t,role:"listbox","aria-orientation":"horizontal",onFocus:()=>{r(!0)},onBlur:n=>{!n.currentTarget.contains(n.relatedTarget)&&r(!1)},...e})}var X7=(0,mS.forwardRef)(d8e);var cde=c(F(),1),ude=c(H(),1),dde=c(E(),1);function f8e(e,t){return(0,dde.jsx)(ude.Composite.Group,{role:"presentation",ref:t,...e})}var Q7=(0,cde.forwardRef)(f8e);var vA=c(H(),1),fde=c(F(),1),yA=c(E(),1);function p8e({isFirst:e,as:t,children:o,...r},n){return(0,yA.jsx)(vA.Composite.Item,{ref:n,role:"option",accessibleWhenDisabled:!0,...r,render:i=>{let s={...i,tabIndex:e?0:i.tabIndex};return t?(0,yA.jsx)(t,{...s,children:o}):typeof o=="function"?o(s):(0,yA.jsx)(vA.Button,{__next40pxDefaultSize:!0,...s,children:o})}})}var J7=(0,fde.forwardRef)(p8e);var eU=c(E(),1);function m8e({key:e,children:t}){return(0,eU.jsx)(mde.Fragment,{children:t},e)}function g8e({children:e}){return(0,eU.jsx)(pde.Composite,{focusShift:!0,focusWrap:"horizontal",render:m8e,children:e})}var gS=g8e;var gde=c(H(),1),kA=c(ce(),1),_A=c(Z(),1),hde=c(F(),1);var bS=c(G(),1),hS=c(H(),1);var Gl=c(E(),1);function SA({count:e,icon:t,isPattern:o,fadeWhenDisabled:r}){let n=o&&(0,bS.__)("Pattern");return(0,Gl.jsx)("div",{className:"block-editor-block-draggable-chip-wrapper",children:(0,Gl.jsx)("div",{className:"block-editor-block-draggable-chip","data-testid":"block-draggable-chip",children:(0,Gl.jsxs)(hS.Flex,{justify:"center",className:"block-editor-block-draggable-chip__content",children:[(0,Gl.jsx)(hS.FlexItem,{children:t?(0,Gl.jsx)(Ct,{icon:t}):n||(0,bS.sprintf)((0,bS._n)("%d block","%d blocks",e),e)}),(0,Gl.jsx)(hS.FlexItem,{children:(0,Gl.jsx)(Ct,{icon:ux})}),r&&(0,Gl.jsx)(hS.FlexItem,{className:"block-editor-block-draggable-chip__disabled",children:(0,Gl.jsx)("span",{className:"block-editor-block-draggable-chip__disabled-icon"})})]})})})}var tU=c(E(),1),h8e=({isEnabled:e,blocks:t,icon:o,children:r,pattern:n})=>{let i=t.length===1?t[0].name:void 0,s=(0,_A.useSelect)(f=>i&&f(kA.store).getBlockType(i)?.icon,[i]),{startDragging:a,stopDragging:l}=U((0,_A.useDispatch)(C)),u=(0,hde.useMemo)(()=>n?.type===Ho.user&&n?.syncStatus!=="unsynced"?[(0,kA.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,tU.jsx)(gde.Draggable,{__experimentalTransferDataType:"wp-blocks",transferData:{type:"inserter",blocks:d},onDragStart:f=>{a();let p=new Set;for(let g of d){let m=`wp-block:${g.name}`;p.has(m)||(f.dataTransfer.items.add("",m),p.add(m))}},onDragEnd:()=>{l()},__experimentalDragComponent:(0,tU.jsx)(SA,{count:t.length,icon:o||!n&&s,isPattern:!!n}),children:({onDraggableStart:f,onDraggableEnd:p})=>r({draggable:!0,onDragStart:f,onDragEnd:p})})},yS=h8e;var hd=c(E(),1);function b8e({className:e,isFirst:t,item:o,onSelect:r,onHover:n,isDraggable:i,...s}){let a=(0,vS.useRef)(!1),l=o.icon?{backgroundColor:o.icon.background,color:o.icon.foreground}:{},u=(0,vS.useMemo)(()=>[(0,Hp.createBlock)(o.name,o.initialAttributes,(0,Hp.createBlocksFromInnerBlocksTemplate)(o.innerBlocks),o.innerContent)],[o.name,o.initialAttributes,o.innerBlocks,o.innerContent]),d=(0,Hp.isReusableBlock)(o)&&o.syncStatus!=="unsynced"||(0,Hp.isTemplatePart)(o);return(0,hd.jsx)(yS,{isEnabled:i&&!o.isDisabled,blocks:u,icon:o.icon,children:({draggable:f,onDragStart:p,onDragEnd:g})=>(0,hd.jsx)("div",{className:W("block-editor-block-types-list__list-item",{"is-synced":d}),draggable:f,onDragStart:m=>{a.current=!0,p&&(n(null),p(m))},onDragEnd:m=>{a.current=!1,g&&g(m)},children:(0,hd.jsxs)(J7,{isFirst:t,className:W("block-editor-block-types-list__item",e),disabled:o.isDisabled,onClick:m=>{m.preventDefault(),r(o,(0,eC.isAppleOS)()?m.metaKey:m.ctrlKey),n(null)},onKeyDown:m=>{let{keyCode:h}=m;h===eC.ENTER&&(m.preventDefault(),r(o,(0,eC.isAppleOS)()?m.metaKey:m.ctrlKey),n(null))},onMouseEnter:()=>{a.current||n(o)},onMouseLeave:()=>n(null),...s,children:[(0,hd.jsx)("span",{className:"block-editor-block-types-list__item-icon",style:l,children:(0,hd.jsx)(Ct,{icon:o.icon,showColors:!0})}),(0,hd.jsx)("span",{className:"block-editor-block-types-list__item-title",children:(0,hd.jsx)(bde.__experimentalTruncate,{numberOfLines:3,children:o.title})})]})})})}var yde=(0,vS.memo)(b8e);var tC=c(E(),1);function y8e(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 kde({items:e=[],onSelect:t,onHover:o=()=>{},children:r,label:n,isDraggable:i=!0}){let s="block-editor-block-types-list",a=(0,Sde.useInstanceId)(kde,s);return(0,tC.jsxs)(X7,{className:s,"aria-label":n,children:[y8e(e,3).map((l,u)=>(0,tC.jsx)(Q7,{children:l.map((d,f)=>(0,tC.jsx)(yde,{item:d,className:(0,vde.getBlockMenuDefaultClassName)(d.id),onSelect:t,onHover:o,isDraggable:i&&!d.isDisabled,isFirst:u===0&&f===0,rowId:`${a}-${u}`},d.id))},u)),r]})}var jh=kde;var _de=c(H(),1),bd=c(E(),1);function v8e({title:e,icon:t,children:o}){return(0,bd.jsxs)(bd.Fragment,{children:[(0,bd.jsxs)("div",{className:"block-editor-inserter__panel-header",children:[(0,bd.jsx)("h2",{className:"block-editor-inserter__panel-title",children:e}),(0,bd.jsx)(_de.Icon,{icon:t})]}),(0,bd.jsx)("div",{className:"block-editor-inserter__panel-content",children:o})]})}var Up=v8e;var xde=c(G(),1),oU=c(E(),1);function S8e({children:e=(0,xde.__)("No results found.")}){return(0,oU.jsx)("div",{className:"block-editor-inserter__no-results",children:(0,oU.jsx)("p",{children:e})})}var Wl=S8e;var sn=c(E(),1),k8e=e=>e.name.split("/")[0],_8e=6,x8e=[];function wde({items:e,collections:t,categories:o,onSelectItem:r,onHover:n,showMostUsedBlocks:i,className:s}){let a=(0,yd.useMemo)(()=>Pc(e,"frecency","desc").slice(0,_8e),[e]),l=(0,yd.useMemo)(()=>e.filter(m=>!m.category),[e]),u=(0,yd.useMemo)(()=>{let m={...t};return Object.keys(t).forEach(h=>{m[h]=e.filter(b=>k8e(b)===h),m[h].length===0&&delete m[h]}),m},[e,t]);(0,yd.useEffect)(()=>()=>n(null),[]);let d=(0,rU.useAsyncList)(o),f=o.length===d.length,p=(0,yd.useMemo)(()=>Object.entries(t),[t]),g=(0,rU.useAsyncList)(f?p:x8e);return(0,sn.jsxs)("div",{className:s,children:[i&&e.length>3&&!!a.length&&(0,sn.jsx)(Up,{title:(0,SS._x)("Most used","blocks"),children:(0,sn.jsx)(jh,{items:a,onSelect:r,onHover:n,label:(0,SS._x)("Most used","blocks")})}),d.map(m=>{let h=e.filter(b=>b.category===m.slug);return!h||!h.length?null:(0,sn.jsx)(Up,{title:m.title,icon:m.icon,children:(0,sn.jsx)(jh,{items:h,onSelect:r,onHover:n,label:m.title})},m.slug)}),f&&l.length>0&&(0,sn.jsx)(Up,{className:"block-editor-inserter__uncategorized-blocks-panel",title:(0,SS.__)("Uncategorized"),children:(0,sn.jsx)(jh,{items:l,onSelect:r,onHover:n,label:(0,SS.__)("Uncategorized")})}),g.map(([m,h])=>{let b=u[m];return!b||!b.length?null:(0,sn.jsx)(Up,{title:h.title,icon:h.icon,children:(0,sn.jsx)(jh,{items:b,onSelect:r,onHover:n,label:h.title})},m)})]})}function w8e({rootClientId:e,onInsert:t,onHover:o,showMostUsedBlocks:r},n){let[i,s,a,l]=Zf(e,t);if(!i.length)return(0,sn.jsx)(Wl,{});let u=[],d=[];for(let f of i)f.category!=="reusable"&&(f.isSearchOnly||(f.isAllowedInCurrentRoot?u.push(f):d.push(f)));return(0,sn.jsx)(gS,{children:(0,sn.jsxs)("div",{ref:n,children:[!!u.length&&(0,sn.jsx)(sn.Fragment,{children:(0,sn.jsx)(wde,{items:u,categories:s,collections:a,onSelectItem:l,onHover:o,showMostUsedBlocks:r,className:"block-editor-inserter__insertable-blocks-at-selection"})}),(0,sn.jsx)(wde,{items:d,categories:s,collections:a,onSelectItem:l,onHover:o,showMostUsedBlocks:r,className:"block-editor-inserter__all-blocks"})]})})}var Cde=(0,yd.forwardRef)(w8e);var $de=c(F(),1),Kde=c(fe(),1),Yde=c(H(),1),qde=c(G(),1);var zde=c(H(),1),cU=c(F(),1),jde=c(G(),1);var xA=c(H(),1),nU=c(G(),1),vd=c(E(),1);function C8e({selectedCategory:e,patternCategories:t,onClickCategory:o}){let r="block-editor-block-patterns-explorer__sidebar";return(0,vd.jsx)("div",{className:`${r}__categories-list`,children:t.map(({name:n,label:i})=>(0,vd.jsx)(xA.Button,{__next40pxDefaultSize:!0,label:i,className:`${r}__categories-list__item`,isPressed:e===n,onClick:()=>{o(n)},children:i},n))})}function E8e({searchValue:e,setSearchValue:t}){return(0,vd.jsx)("div",{className:"block-editor-block-patterns-explorer__search",children:(0,vd.jsx)(xA.SearchControl,{onChange:t,value:e,label:(0,nU.__)("Search"),placeholder:(0,nU.__)("Search")})})}function T8e({selectedCategory:e,patternCategories:t,onClickCategory:o,searchValue:r,setSearchValue:n}){return(0,vd.jsxs)("div",{className:"block-editor-block-patterns-explorer__sidebar",children:[(0,vd.jsx)(E8e,{searchValue:r,setSearchValue:n}),!r&&(0,vd.jsx)(C8e,{selectedCategory:e,patternCategories:t,onClickCategory:o})]})}var Ede=T8e;var Sd=c(F(),1),CS=c(G(),1),Mde=c(fe(),1),Nde=c(H(),1),Dde=c(Kr(),1);var Tde=c(ce(),1),Qc=c(F(),1),oC=c(H(),1);var Rde=c(fe(),1),Bde=c(G(),1);var ds=c(H(),1),Va=c(G(),1),si=c(E(),1);function kS({currentPage:e,numPages:t,changePage:o,totalItems:r}){return(0,si.jsxs)(ds.__experimentalVStack,{className:"block-editor-patterns__grid-pagination-wrapper",children:[(0,si.jsx)(ds.__experimentalText,{variant:"muted",children:(0,Va.sprintf)((0,Va._n)("%s item","%s items",r),r)}),t>1&&(0,si.jsxs)(ds.__experimentalHStack,{expanded:!1,spacing:3,justify:"flex-start",className:"block-editor-patterns__grid-pagination",children:[(0,si.jsxs)(ds.__experimentalHStack,{expanded:!1,spacing:1,className:"block-editor-patterns__grid-pagination-previous",children:[(0,si.jsx)(ds.Button,{variant:"tertiary",onClick:()=>o(1),disabled:e===1,"aria-label":(0,Va.__)("First page"),size:"compact",accessibleWhenDisabled:!0,className:"block-editor-patterns__grid-pagination-button",children:(0,si.jsx)("span",{children:"\xAB"})}),(0,si.jsx)(ds.Button,{variant:"tertiary",onClick:()=>o(e-1),disabled:e===1,"aria-label":(0,Va.__)("Previous page"),size:"compact",accessibleWhenDisabled:!0,className:"block-editor-patterns__grid-pagination-button",children:(0,si.jsx)("span",{children:"\u2039"})})]}),(0,si.jsx)(ds.__experimentalText,{variant:"muted",children:(0,Va.sprintf)((0,Va._x)("%1$s of %2$s","paging"),e,t)}),(0,si.jsxs)(ds.__experimentalHStack,{expanded:!1,spacing:1,className:"block-editor-patterns__grid-pagination-next",children:[(0,si.jsx)(ds.Button,{variant:"tertiary",onClick:()=>o(e+1),disabled:e===t,"aria-label":(0,Va.__)("Next page"),size:"compact",accessibleWhenDisabled:!0,className:"block-editor-patterns__grid-pagination-button",children:(0,si.jsx)("span",{children:"\u203A"})}),(0,si.jsx)(ds.Button,{variant:"tertiary",onClick:()=>o(t),disabled:e===t,"aria-label":(0,Va.__)("Last page"),size:"compact",accessibleWhenDisabled:!0,className:"block-editor-patterns__grid-pagination-button",children:(0,si.jsx)("span",{children:"\xBB"})})]})]})]})}var xo=c(E(),1),R8e=({showTooltip:e,title:t,children:o})=>e?(0,xo.jsxs)(vt.Root,{children:[(0,xo.jsx)(vt.Trigger,{render:o}),(0,xo.jsx)(vt.Popup,{children:t})]}):(0,xo.jsx)(xo.Fragment,{children:o});function Pde({id:e,isDraggable:t,pattern:o,onClick:r,onHover:n,showTitlesAsTooltip:i,category:s,isSelected:a}){let[l,u]=(0,Qc.useState)(!1),{blocks:d,viewportWidth:f}=o,g=`block-editor-block-patterns-list__item-description-${(0,Rde.useInstanceId)(Pde)}`,m=o.type===Ho.user,h=(0,Qc.useMemo)(()=>!s||!t?d:(d??[]).map(b=>{let v=(0,Tde.cloneBlock)(b);return v.attributes.metadata?.categories?.includes(s)&&(v.attributes.metadata.categories=[s]),v}),[d,t,s]);return(0,xo.jsx)(yS,{isEnabled:t,blocks:h,pattern:o,children:({draggable:b,onDragStart:v,onDragEnd:y})=>(0,xo.jsx)("div",{className:"block-editor-block-patterns-list__list-item",draggable:b,onDragStart:k=>{u(!0),v&&(n?.(null),v(k))},onDragEnd:k=>{u(!1),y&&y(k)},children:(0,xo.jsx)(R8e,{showTooltip:i&&!m,title:o.title,children:(0,xo.jsxs)(oC.Composite.Item,{render:(0,xo.jsx)("div",{role:"option","aria-label":o.title,"aria-describedby":o.description?g:void 0,className:W("block-editor-block-patterns-list__item",{"block-editor-block-patterns-list__list-item-synced":o.type===Ho.user&&!o.syncStatus,"is-selected":a})}),id:e,onClick:()=>{r(o,d),n?.(null)},onMouseEnter:()=>{l||n?.(o)},onMouseLeave:()=>n?.(null),children:[(0,xo.jsx)(us.Async,{placeholder:(0,xo.jsx)(B8e,{}),children:(0,xo.jsx)(us,{blocks:d,viewportWidth:f})}),(!i||m)&&(0,xo.jsxs)(oC.__experimentalHStack,{className:"block-editor-patterns__pattern-details",spacing:2,children:[m&&!o.syncStatus&&(0,xo.jsx)("div",{className:"block-editor-patterns__pattern-icon-wrapper",children:(0,xo.jsx)(ft,{className:"block-editor-patterns__pattern-icon",icon:Cc})}),(0,xo.jsx)(cd,{render:(0,xo.jsx)("div",{}),className:"block-editor-block-patterns-list__item-title",variant:"body-sm",children:o.title})]}),!!o.description&&(0,xo.jsx)(pt,{id:g,children:o.description})]})})})})}function B8e(){return(0,xo.jsx)("div",{className:"block-editor-block-patterns-list__item is-placeholder"})}function P8e({isDraggable:e,blockPatterns:t,onHover:o,onClickPattern:r,orientation:n,category:i,label:s=(0,Bde.__)("Patterns"),showTitlesAsTooltip:a,pagingProps:l},u){let[d,f]=(0,Qc.useState)(void 0),[p,g]=(0,Qc.useState)(null);(0,Qc.useEffect)(()=>{let h=t[0]?.name;f(h)},[t]);let m=(h,b)=>{g(h.name),r(h,b)};return(0,xo.jsxs)(oC.Composite,{orientation:n,activeId:d,setActiveId:f,role:"listbox",className:"block-editor-block-patterns-list","aria-label":s,ref:u,children:[t.map(h=>(0,xo.jsx)(Pde,{id:h.name,pattern:h,onClick:m,onHover:o,isDraggable:e,showTitlesAsTooltip:a,category:i,isSelected:!!p&&p===h.name},h.name)),l&&(0,xo.jsx)(kS,{...l})]})}var Jc=(0,Qc.forwardRef)(P8e);var Hh=c(Z(),1),Ode=c(ce(),1),wA=c(G(),1),Ade=c(Kr(),1),iU=c(F(),1);function Ide({destinationRootClientId:e,destinationIndex:t,rootClientId:o,registry:r}){if(o===e)return t;let n=["",...r.select(C).getBlockParents(e),e],i=n.indexOf(o);return i!==-1?r.select(C).getBlockIndex(n[i+1])+1:r.select(C).getBlockOrder(o).length}function I8e({rootClientId:e="",insertionIndex:t,clientId:o,isAppender:r,onSelect:n,shouldFocusBlock:i=!0,selectBlockOnInsert:s=!0}){let a=(0,Hh.useRegistry)(),{getSelectedBlock:l,getClosestAllowedInsertionPoint:u,isBlockInsertionPointVisible:d}=U((0,Hh.useSelect)(C)),{destinationRootClientId:f,destinationIndex:p}=(0,Hh.useSelect)(S=>{let{getSelectedBlockClientId:_,getBlockRootClientId:x,getBlockIndex:w,getBlockOrder:T,getInsertionPoint:B}=U(S(C)),R=_(),A=e,O,P=B();return t!==void 0?O=t:P&&P.hasOwnProperty("index")?(A=P?.rootClientId?P.rootClientId:e,O=P.index):o?O=w(o):!r&&R?(A=x(R),O=w(R)+1):O=T(A).length,{destinationRootClientId:A,destinationIndex:O}},[e,t,o,r]),{replaceBlocks:g,insertBlocks:m,showInsertionPoint:h,hideInsertionPoint:b,setLastFocus:v}=U((0,Hh.useDispatch)(C)),y=(0,iU.useCallback)((S,_,x=!1,w)=>{(x||i||s)&&v(null);let T=l();!r&&T&&(0,Ode.isUnmodifiedDefaultBlock)(T,"content")?g(T.clientId,S,null,i||x?0:null,_):m(S,r||w===void 0?p:Ide({destinationRootClientId:f,destinationIndex:p,rootClientId:w,registry:a}),r||w===void 0?f:w,s,i||x?0:null,_);let B=Array.isArray(S)?S.length:1,R=(0,wA.sprintf)((0,wA._n)("%d block added.","%d blocks added.",B),B);(0,Ade.speak)(R),n&&n(S)},[r,l,g,m,f,p,n,i,s,v,a]),k=(0,iU.useCallback)(S=>{if(S&&!d()){let _=u(S.name,f);_!==null&&h(_,Ide({destinationRootClientId:f,destinationIndex:p,rootClientId:_,registry:a}))}else b()},[u,d,h,b,f,p,a]);return[f,y,k]}var Gp=I8e;var _S=c(F(),1),CA=c(ce(),1),xS=c(Z(),1),EA=c(G(),1),Lde=c(es(),1);var O8e=(e,t,o,r)=>{let n=(0,_S.useMemo)(()=>({[Uf]:!!r}),[r]),i=(0,xS.useSelect)(m=>{let{getSettings:h}=U(m(C));return h()[M1]??!1},[]),{patternCategories:s,patterns:a,userPatternCategories:l}=(0,xS.useSelect)(m=>{let{getSettings:h,__experimentalGetAllowedPatterns:b}=U(m(C)),v=h(),y=v[ju];return{patterns:b(t,n),userPatternCategories:y?y(m):v.__experimentalUserPatternCategories,patternCategories:v.__experimentalBlockPatternCategories}},[t,n]),u=(0,_S.useMemo)(()=>a.filter(m=>!(m.categories?.includes("navigation")&&!i)),[a,i]),{getClosestAllowedInsertionPointForPattern:d}=U((0,xS.useSelect)(C)),f=(0,_S.useMemo)(()=>{let m=[...s];return l?.forEach(h=>{m.find(b=>b.name===h.name)||m.push(h)}),m},[s,l]),{createSuccessNotice:p}=(0,xS.useDispatch)(Lde.store),g=(0,_S.useCallback)((m,h)=>{let b=r?t:d(m,t);if(b===null)return;let v=m.type===Ho.user&&m.syncStatus!=="unsynced"?[(0,CA.createBlock)("core/block",{ref:m.id})]:h;e((v??[]).map(y=>{let k=(0,CA.cloneBlock)(y);return k.attributes.metadata?.categories?.includes(o)&&(k.attributes.metadata.categories=[o]),k}),m.name,!1,b),p((0,EA.sprintf)((0,EA.__)('Pattern "%s" inserted.'),m.title),{type:"snackbar",id:"inserter-notice"})},[p,e,o,t,d,r]);return[u,f,g]},Wp=O8e;var wS=c(F(),1),sU=c(fe(),1),aU=c(Et(),1),TA=20;function RA(e,t,o,r=""){let[n,i]=(0,wS.useState)(1),s=(0,sU.usePrevious)(t),a=(0,sU.usePrevious)(r);(s!==t||a!==r)&&n!==1&&i(1);let l=e.length,u=n-1,d=(0,wS.useMemo)(()=>e.slice(u*TA,u*TA+TA),[u,e]),f=Math.ceil(e.length/TA),p=g=>{(0,aU.getScrollContainer)(o?.current)?.scrollTo(0,0),i(g)};return(0,wS.useEffect)(function(){(0,aU.getScrollContainer)(o?.current)?.scrollTo(0,0)},[t,o]),{totalItems:l,categoryPatterns:d,numPages:f,changePage:p,currentPage:n}}var $l=c(E(),1);function A8e({filterValue:e,filteredBlockPatternsLength:t}){return e?(0,$l.jsx)(Nde.__experimentalHeading,{level:2,lineHeight:"48px",className:"block-editor-block-patterns-explorer__search-results-count",children:(0,CS.sprintf)((0,CS._n)("%d pattern found","%d patterns found",t),t)}):null}function L8e({searchValue:e,selectedCategory:t,patternCategories:o,rootClientId:r,onModalClose:n}){let i=(0,Sd.useRef)(),s=(0,Mde.useDebounce)(Dde.speak,500),[a,l]=Gp({rootClientId:r,shouldFocusBlock:!0}),[u,,d]=Wp(l,a,t),f=(0,Sd.useMemo)(()=>o.map(v=>v.name),[o]),p=(0,Sd.useMemo)(()=>{let v=u.filter(y=>{if(t===Ug.name||t===Ku.name&&y.type===Ho.user||t===Ay.name&&y.blockTypes?.includes("core/post-content"))return!0;if(t==="uncategorized"){let k=y.categories?.some(S=>f.includes(S))??!1;return!y.categories?.length||!k}return y.categories?.includes(t)});return e?sw(v,e):v},[e,u,t,f]);(0,Sd.useEffect)(()=>{if(!e)return;let v=p.length,y=(0,CS.sprintf)((0,CS._n)("%d result found.","%d results found.",v),v);s(y)},[e,s,p.length]);let g=RA(p,t,i),[m,h]=(0,Sd.useState)(e);e!==m&&(h(e),g.changePage(1));let b=!!p?.length;return(0,$l.jsxs)("div",{className:"block-editor-block-patterns-explorer__list",ref:i,children:[(0,$l.jsx)(A8e,{filterValue:e,filteredBlockPatternsLength:p.length}),(0,$l.jsx)(gS,{children:b&&(0,$l.jsxs)($l.Fragment,{children:[(0,$l.jsx)(Jc,{blockPatterns:g.categoryPatterns,onClickPattern:(v,y)=>{d(v,y),n()},isDraggable:!1}),(0,$l.jsx)(kS,{...g})]})})]})}var Vde=L8e;var lU=c(F(),1),ES=c(G(),1),Fde=c(Kr(),1);function M8e(e,t){return!e.categories||!e.categories.length?!1:e.categories.some(o=>t.some(r=>r.name===o))}function TS(e,t="all"){let[o,r]=Wp(void 0,e),n=(0,lU.useMemo)(()=>t==="all"?o:o.filter(s=>!qR(s,t)),[t,o]);return(0,lU.useMemo)(()=>{let s=r.filter(a=>n.some(l=>l.categories?.includes(a.name))).sort((a,l)=>a.label.localeCompare(l.label));return n.some(a=>!M8e(a,r))&&!s.find(a=>a.name==="uncategorized")&&s.push({name:"uncategorized",label:(0,ES._x)("Uncategorized")}),n.some(a=>a.blockTypes?.includes("core/post-content"))&&s.unshift(Ay),n.some(a=>a.type===Ho.user)&&s.unshift(Ku),n.length>0&&s.unshift({name:Ug.name,label:Ug.label}),(0,Fde.speak)((0,ES.sprintf)((0,ES._n)("%d category button displayed.","%d category buttons displayed.",s.length),s.length)),s},[r,n])}var Uh=c(E(),1);function N8e({initialCategory:e,rootClientId:t,onModalClose:o}){let[r,n]=(0,cU.useState)(""),[i,s]=(0,cU.useState)(e?.name),a=TS(t);return(0,Uh.jsxs)("div",{className:"block-editor-block-patterns-explorer",children:[(0,Uh.jsx)(Ede,{selectedCategory:i,patternCategories:a,onClickCategory:s,searchValue:r,setSearchValue:n}),(0,Uh.jsx)(Vde,{searchValue:r,selectedCategory:i,patternCategories:a,rootClientId:t,onModalClose:o})]})}function D8e({onModalClose:e,...t}){return(0,Uh.jsx)(zde.Modal,{title:(0,jde.__)("Patterns"),onRequestClose:e,isFullScreen:!0,children:(0,Uh.jsx)(N8e,{onModalClose:e,...t})})}var Hde=D8e;var RS=c(G(),1),Uo=c(H(),1);var bn=c(E(),1);function V8e({title:e}){return(0,bn.jsx)(Uo.__experimentalVStack,{spacing:0,children:(0,bn.jsx)(Uo.__experimentalView,{children:(0,bn.jsx)(Uo.__experimentalSpacer,{marginBottom:0,paddingX:4,paddingY:3,children:(0,bn.jsxs)(Uo.__experimentalHStack,{spacing:2,children:[(0,bn.jsx)(Uo.Navigator.BackButton,{style:{minWidth:24,padding:0},icon:(0,RS.isRTL)()?rn:yi,size:"small",label:(0,RS.__)("Back")}),(0,bn.jsx)(Uo.__experimentalSpacer,{children:(0,bn.jsx)(Uo.__experimentalHeading,{level:5,children:e})})]})})})})}function BA({categories:e,children:t,screenClassName:o}){return(0,bn.jsxs)(Uo.Navigator,{initialPath:"/",className:"block-editor-inserter__mobile-tab-navigation",children:[(0,bn.jsx)(Uo.Navigator.Screen,{path:"/",children:(0,bn.jsx)(Uo.__experimentalItemGroup,{children:e.map(r=>(0,bn.jsx)(Uo.Navigator.Button,{path:`/category/${r.name}`,as:Uo.__experimentalItem,isAction:!0,children:(0,bn.jsxs)(Uo.__experimentalHStack,{children:[(0,bn.jsx)(Uo.FlexBlock,{children:r.label}),(0,bn.jsx)(ft,{icon:(0,RS.isRTL)()?yi:rn})]})},r.name))})}),e.map(r=>(0,bn.jsxs)(Uo.Navigator.Screen,{className:o,path:`/category/${r.name}`,children:[(0,bn.jsx)(V8e,{title:(0,RS.__)("Back")}),t(r)]},r.name))]})}var Fa=c(F(),1),uU=c(G(),1),Kl=c(H(),1);var ps=c(H(),1),fs=c(G(),1);var PA=c(F(),1);var Fn=c(E(),1),Ude=e=>e!=="all"&&e!=="user",F8e=e=>e.name===Ku.name,z8e=[{value:"all",label:(0,fs._x)("All","patterns")},{value:Ho.directory,label:(0,fs.__)("Pattern Directory")},{value:Ho.theme,label:(0,fs.__)("Theme & Plugins")},{value:Ho.user,label:(0,fs.__)("User")}];function Gde({setPatternSyncFilter:e,setPatternSourceFilter:t,patternSyncFilter:o,patternSourceFilter:r,scrollContainerRef:n,category:i}){let s=i.name===Ku.name?Ho.user:r,a=Ude(s),l=F8e(i),u=(0,PA.useMemo)(()=>[{value:"all",label:(0,fs._x)("All","patterns")},{value:Yx.full,label:(0,fs._x)("Synced","patterns"),disabled:a},{value:Yx.unsynced,label:(0,fs._x)("Not synced","patterns"),disabled:a}],[a]);function d(f){t(f),Ude(f)&&e("all")}return(0,Fn.jsx)(Fn.Fragment,{children:(0,Fn.jsx)(ps.DropdownMenu,{popoverProps:{placement:"right-end"},label:(0,fs.__)("Filter patterns"),toggleProps:{size:"compact"},icon:(0,Fn.jsx)(ft,{icon:(0,Fn.jsx)(ps.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,Fn.jsx)(ps.Path,{d:"M10 17.5H14V16H10V17.5ZM6 6V7.5H18V6H6ZM8 12.5H16V11H8V12.5Z",fill:"currentColor"})})}),children:()=>(0,Fn.jsxs)(Fn.Fragment,{children:[!l&&(0,Fn.jsx)(ps.MenuGroup,{label:(0,fs.__)("Source"),children:(0,Fn.jsx)(ps.MenuItemsChoice,{choices:z8e,onSelect:f=>{d(f),n.current?.scrollTo(0,0)},value:s})}),(0,Fn.jsx)(ps.MenuGroup,{label:(0,fs.__)("Type"),children:(0,Fn.jsx)(ps.MenuItemsChoice,{choices:u,onSelect:f=>{e(f),n.current?.scrollTo(0,0)},value:o})}),(0,Fn.jsx)("div",{className:"block-editor-inserter__patterns-filter-help",children:(0,PA.createInterpolateElement)((0,fs.__)("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,Fn.jsx)(ps.ExternalLink,{href:(0,fs.__)("https://wordpress.org/patterns/")})})})]})})})}var Bi=c(E(),1),j8e=()=>{};function IA({rootClientId:e,onInsert:t,onHover:o=j8e,category:r,showTitlesAsTooltip:n}){let[i,,s]=Wp(t,e,r?.name),[a,l]=(0,Fa.useState)("all"),[u,d]=(0,Fa.useState)("all"),f=TS(e,u),p=(0,Fa.useRef)(),g=(0,Fa.useMemo)(()=>i.filter(y=>qR(y,u,a)?!1:r.name===Ug.name||r.name===Ku.name&&y.type===Ho.user||r.name===Ay.name&&y.blockTypes?.includes("core/post-content")?!0:r.name==="uncategorized"?y.categories?!y.categories.some(k=>f.some(S=>S.name===k)):!0:y.categories?.includes(r.name)),[i,f,r.name,u,a]),m=RA(g,r,p),{changePage:h}=m;(0,Fa.useEffect)(()=>()=>o(null),[]);let b=(0,Fa.useCallback)(y=>{l(y),h(1)},[l,h]),v=(0,Fa.useCallback)(y=>{d(y),h(1)},[d,h]);return(0,Bi.jsxs)(Bi.Fragment,{children:[(0,Bi.jsxs)(Kl.__experimentalVStack,{spacing:2,className:"block-editor-inserter__patterns-category-panel-header",children:[(0,Bi.jsxs)(Kl.__experimentalHStack,{children:[(0,Bi.jsx)(Kl.FlexBlock,{children:(0,Bi.jsx)(Kl.__experimentalHeading,{className:"block-editor-inserter__patterns-category-panel-title",size:13,level:4,as:"div",children:r.label})}),(0,Bi.jsx)(Gde,{patternSyncFilter:a,patternSourceFilter:u,setPatternSyncFilter:b,setPatternSourceFilter:v,scrollContainerRef:p,category:r})]}),!g.length&&(0,Bi.jsx)(Kl.__experimentalText,{variant:"muted",className:"block-editor-inserter__patterns-category-no-results",children:(0,uU.__)("No results found")})]}),g.length>0&&(0,Bi.jsxs)(Bi.Fragment,{children:[(0,Bi.jsx)(Kl.__experimentalText,{size:"12",as:"p",className:"block-editor-inserter__help-text",children:(0,uU.__)("Drag and drop patterns into the canvas.")}),(0,Bi.jsx)(Jc,{ref:p,blockPatterns:m.categoryPatterns,onClickPattern:s,onHover:o,label:r.label,orientation:"vertical",category:r.name,isDraggable:!0,showTitlesAsTooltip:n,patternFilter:u,pagingProps:m})]})]})}var AA=c(fe(),1),LA=c(H(),1),Wde=c(F(),1);var Gh=c(E(),1),{Tabs:OA}=U(LA.privateApis);function H8e({categories:e,selectedCategory:t,onSelectCategory:o,children:r}){let s={type:"tween",duration:(0,AA.useReducedMotion)()?0:.25,ease:[.6,0,.4,1]},a=(0,AA.usePrevious)(t),l=t?t.name:null,[u,d]=(0,Wde.useState)(),f=e?.[0]?.name;return l===null&&!u&&f&&d(f),(0,Gh.jsxs)(OA,{selectOnMove:!1,selectedTabId:l,orientation:"vertical",onSelect:p=>{o(e.find(g=>g.name===p))},activeTabId:u,onActiveTabIdChange:d,children:[(0,Gh.jsx)(OA.TabList,{className:"block-editor-inserter__category-tablist",children:e.map(p=>(0,Gh.jsx)(OA.Tab,{tabId:p.name,"aria-current":p===t?"true":void 0,children:p.label},p.name))}),e.map(p=>(0,Gh.jsx)(OA.TabPanel,{tabId:p.name,focusable:!1,children:(0,Gh.jsx)(LA.__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})},p.name))]})}var MA=H8e;var Gs=c(E(),1);function U8e({onSelectCategory:e,selectedCategory:t,onInsert:o,rootClientId:r,children:n}){let[i,s]=(0,$de.useState)(!1),a=TS(r),l=(0,Kde.useViewportMatch)("medium","<");return a.length?(0,Gs.jsxs)(Gs.Fragment,{children:[!l&&(0,Gs.jsxs)("div",{className:"block-editor-inserter__block-patterns-tabs-container",children:[(0,Gs.jsx)(MA,{categories:a,selectedCategory:t,onSelectCategory:e,children:n}),(0,Gs.jsx)(Yde.Button,{__next40pxDefaultSize:!0,className:"block-editor-inserter__patterns-explore-button",onClick:()=>s(!0),variant:"secondary",children:(0,qde.__)("Explore all patterns")})]}),l&&(0,Gs.jsx)(BA,{categories:a,children:u=>(0,Gs.jsx)("div",{className:"block-editor-inserter__category-panel",children:(0,Gs.jsx)(IA,{onInsert:o,rootClientId:r,category:u},u.name)})}),i&&(0,Gs.jsx)(Hde,{initialCategory:t||a[0],patternCategories:a,onModalClose:()=>s(!1),rootClientId:r})]}):(0,Gs.jsx)(Wl,{})}var Zde=U8e;var hfe=c(G(),1),bfe=c(fe(),1),yfe=c(H(),1),BS=c(F(),1);var ou=c(H(),1),nr=c(G(),1),li=c(F(),1),nC=c(fe(),1),pfe=c(Z(),1),mfe=c(Et(),1),gfe=c(es(),1);var nfe=c(H(),1),ife=c(G(),1);var rr=c(H(),1),ai=c(G(),1),eu=c(F(),1),fU=c(ce(),1);var rC=c(Z(),1),efe=c(es(),1),tfe=c(dU(),1),ofe=c(As(),1);var Qde=c(ce(),1),Jde=c(E(),1),G8e={image:"img",video:"video",audio:"audio"};function NA(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=G8e[t],s=(0,Jde.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,Qde.createBlock)(`core/${t}`,o),s]}var Ht=c(E(),1),W8e=["image"],$8e={placement:"bottom-end",className:"block-editor-inserter__media-list__item-preview-options__popover"};function K8e({category:e,media:t,onDetach:o}){if(!e.getReportUrl&&!o)return null;let r=e.getReportUrl?.(t);return(0,Ht.jsx)(rr.DropdownMenu,{className:"block-editor-inserter__media-list__item-preview-options",label:(0,ai.__)("Options"),popoverProps:$8e,icon:Ls,children:()=>(0,Ht.jsxs)(rr.MenuGroup,{children:[r&&(0,Ht.jsx)(rr.MenuItem,{onClick:()=>window.open(r,"_blank").focus(),icon:zF,children:(0,ai.sprintf)((0,ai.__)("Report %s"),e.mediaType)}),o&&(0,Ht.jsx)(rr.MenuItem,{onClick:()=>o(t),icon:Qi,children:e.postTypeLabel?(0,ai.sprintf)((0,ai.__)("Detach from %s"),e.postTypeLabel):(0,ai.__)("Detach from post")})]})})}function Y8e({onClose:e,onSubmit:t}){return(0,Ht.jsxs)(rr.Modal,{title:(0,ai.__)("Insert external image"),onRequestClose:e,className:"block-editor-inserter-media-tab-media-preview-inserter-external-image-modal",children:[(0,Ht.jsxs)(rr.__experimentalVStack,{spacing:3,children:[(0,Ht.jsx)("p",{children:(0,ai.__)("This image cannot be uploaded to your Media Library, but it can still be inserted as an external image.")}),(0,Ht.jsx)("p",{children:(0,ai.__)("External images can be removed by the external provider without warning and could even have legal compliance issues related to privacy legislation.")})]}),(0,Ht.jsxs)(rr.Flex,{className:"block-editor-block-lock-modal__actions",justify:"flex-end",expanded:!1,children:[(0,Ht.jsx)(rr.FlexItem,{children:(0,Ht.jsx)(rr.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:e,children:(0,ai.__)("Cancel")})}),(0,Ht.jsx)(rr.FlexItem,{children:(0,Ht.jsx)(rr.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:t,children:(0,ai.__)("Insert")})})]})]})}function rfe({media:e,onClick:t,onDetach:o,category:r}){let[n,i]=(0,eu.useState)(!1),[s,a]=(0,eu.useState)(!1),[l,u]=(0,eu.useState)(!1),[d,f]=(0,eu.useMemo)(()=>NA(e,r.mediaType),[e,r.mediaType]),{createErrorNotice:p,createSuccessNotice:g}=(0,rC.useDispatch)(efe.store),{getSettings:m,getBlock:h}=(0,rC.useSelect)(C),{updateBlockAttributes:b}=(0,rC.useDispatch)(C),v=(0,eu.useCallback)(_=>{if(l)return;let x=m(),w=(0,fU.cloneBlock)(_),{id:T,url:B,caption:R}=w.attributes;if(!T&&!x.mediaUpload){i(!0);return}if(T){t(w);return}u(!0),window.fetch(B).then(A=>A.blob()).then(A=>{let O=(0,ofe.getFilename)(B)||"image.jpg",P=new File([A],O,{type:A.type});x.mediaUpload({filesList:[P],additionalData:{caption:R},onFileChange([L]){(0,tfe.isBlobURL)(L.url)||(h(w.clientId)?b(w.clientId,{...w.attributes,id:L.id,url:L.url}):(t({...w,attributes:{...w.attributes,id:L.id,url:L.url}}),g((0,ai.__)("Image uploaded and inserted."),{type:"snackbar",id:"inserter-notice"})),u(!1))},allowedTypes:W8e,onError(L){p(L,{type:"snackbar",id:"inserter-notice"}),u(!1)}})}).catch(()=>{i(!0),u(!1)})},[l,m,t,g,b,p,h]),y=typeof e.title=="string"?e.title:e.title?.rendered||(0,ai.__)("no title"),k=(0,eu.useCallback)(()=>a(!0),[]),S=(0,eu.useCallback)(()=>a(!1),[]);return(0,Ht.jsxs)(Ht.Fragment,{children:[(0,Ht.jsx)(yS,{isEnabled:!0,blocks:[d],children:({draggable:_,onDragStart:x,onDragEnd:w})=>(0,Ht.jsx)("div",{className:W("block-editor-inserter__media-list__list-item",{"is-hovered":s}),draggable:_,onDragStart:x,onDragEnd:w,children:(0,Ht.jsxs)("div",{onMouseEnter:k,onMouseLeave:S,children:[(0,Ht.jsxs)(vt.Root,{children:[(0,Ht.jsx)(vt.Trigger,{render:(0,Ht.jsx)(rr.Composite.Item,{render:(0,Ht.jsx)("div",{"aria-label":y,role:"option",className:"block-editor-inserter__media-list__item"}),onClick:()=>v(d),children:(0,Ht.jsxs)("div",{className:"block-editor-inserter__media-list__item-preview",children:[f,l&&(0,Ht.jsx)("div",{className:"block-editor-inserter__media-list__item-preview-spinner",children:(0,Ht.jsx)(rr.Spinner,{})})]})})}),(0,Ht.jsx)(vt.Popup,{children:y})]}),!l&&(0,Ht.jsx)(K8e,{category:r,media:e,onDetach:o})]})})}),n&&(0,Ht.jsx)(Y8e,{onClose:()=>i(!1),onSubmit:()=>{t((0,fU.cloneBlock)(d)),g((0,ai.__)("Image inserted."),{type:"snackbar",id:"inserter-notice"}),i(!1)}})]})}var pU=c(E(),1);function q8e({mediaList:e,category:t,onClick:o,onDetach:r,label:n=(0,ife.__)("Media List")}){return(0,pU.jsx)(nfe.Composite,{role:"listbox",className:"block-editor-inserter__media-list","aria-label":n,children:e.map((i,s)=>(0,pU.jsx)(rfe,{media:i,category:t,onClick:o,onDetach:r},i.id||i.sourceId||s))})}var sfe=q8e;var afe=c(H(),1),Z8e=()=>null,tu=(0,afe.withFilters)("editor.MediaUpload")(Z8e);var lfe=c(Z(),1);function X8e({fallback:e=null,children:t}){return(0,lfe.useSelect)(r=>{let{getSettings:n}=r(C);return!!n().mediaUpload},[])?t:e}var Ws=X8e;var Pi=c(F(),1),mU=c(Z(),1);function cfe(e){return Array.isArray(e)?{mediaItems:e}:{mediaItems:e?.mediaItems??[],totalItems:e?.totalItems,totalPages:e?.totalPages}}function ufe(e,t={},o){let[r,n]=(0,Pi.useState)(),[i,s]=(0,Pi.useState)({}),[a,l]=(0,Pi.useState)(!1),u=(0,Pi.useRef)(),d=(0,Pi.useRef)(),f=(0,Pi.useRef)(),p=(0,Pi.useRef)();return(0,Pi.useEffect)(()=>{(async()=>{let g=JSON.stringify({category:e.name,...t}),m={};u.current=m,l(!0),(d.current!==g||f.current!==e.fetch)&&n([]),(p.current!==e.name||f.current!==e.fetch)&&s({}),d.current=g,f.current=e.fetch,p.current=e.name;let{page:h,...b}=t,v=h>1?t:b,{mediaItems:y,totalItems:k,totalPages:S}=cfe(await e.fetch?.(v));m===u.current&&(n(y),s({totalItems:k,totalPages:S}),l(!1))})()},[e.name,e.fetch,...Object.values(t),o]),{mediaList:r,isLoading:a,totalItems:i.totalItems,totalPages:i.totalPages}}function dfe(e,t=400){let[o,r]=(0,Pi.useState)(!1);return(0,Pi.useEffect)(()=>{if(!e)return;let n=setTimeout(()=>r(!0),t);return()=>{clearTimeout(n),r(!1)}},[e,t]),o}function ffe(e){let[t,o]=(0,Pi.useState)([]),r=(0,mU.useSelect)(a=>U(a(C)).getInserterMediaCategories(),[]),{canInsertImage:n,canInsertVideo:i,canInsertAudio:s}=(0,mU.useSelect)(a=>{let{canInsertBlockType:l}=a(C);return{canInsertImage:l("core/image",e),canInsertVideo:l("core/video",e),canInsertAudio:l("core/audio",e)}},[e]);return(0,Pi.useEffect)(()=>{(async()=>{let a=[];if(!r)return;let l=new Map(await Promise.all(r.map(async d=>{if(d.isExternalResource)return[d.name,!0];let f=[];try{let{mediaItems:p}=cfe(await d.fetch({per_page:1}));f=p}catch{}return[d.name,!!f.length]}))),u={image:n,video:i,audio:s};r.forEach(d=>{u[d.mediaType]&&(l.get(d.name)||d.emptyMessage)&&a.push(d)}),a.length&&o(a)})()},[n,i,s,r]),t}var Qr=c(E(),1),Q8e=20,J8e=["image"];function eHe({onSelect:e}){return(0,Qr.jsx)(Ws,{children:(0,Qr.jsx)(tu,{multiple:"add",onSelect:e,allowedTypes:J8e,title:(0,nr.__)("Attach images"),render:({open:t})=>(0,Qr.jsx)(ou.Button,{__next40pxDefaultSize:!0,className:"block-editor-inserter__media-panel-attach","data-unstable-ignore-focus-outside-for-relatedtarget":".media-modal",onClick:o=>{o.target.focus(),t()},variant:"secondary",children:(0,nr.__)("Attach images")})})})}function iC({rootClientId:e,onInsert:t,category:o}){let[r,n,i]=(0,nC.useDebouncedInput)(),[s,a]=(0,li.useState)(1),l=(0,nC.usePrevious)(o.name),u=(0,nC.usePrevious)(i);(l!==o.name||u!==i)&&s!==1&&a(1);let d=(0,li.useMemo)(()=>({per_page:Q8e,page:s,search:i}),[s,i]),[f,p]=(0,li.useState)(0),{mediaList:g,isLoading:m,totalItems:h,totalPages:b}=ufe(o,d,f),v=b||1;typeof b=="number"&&s>v&&a(v);let y=!o.isExternalResource,k=y?o.attach:void 0,S=y?o.detach:void 0,_=y?o.subscribe:void 0,x=v>1,w=x||!!k,T=(0,li.useRef)(),B=(0,li.useCallback)(Y=>{(0,mfe.getScrollContainer)(T.current)?.scrollTo(0,0),a(Y)},[]),{createErrorNotice:R,createSuccessNotice:A,createWarningNotice:O}=(0,pfe.useDispatch)(gfe.store),P=dfe(m),L=(0,li.useCallback)(()=>{y&&o.invalidate?.(d),p(Y=>Y+1)},[o,d,y]);(0,li.useEffect)(()=>{if(_)return _(()=>p(Y=>Y+1),d)},[_,d]);let M=(0,li.useCallback)(async Y=>{try{let X=await k(Y);if(!X){O((0,nr.__)("No images were attached."),{type:"snackbar",id:"inserter-notice"});return}L(),A(o.postTypeLabel?(0,nr.sprintf)((0,nr._n)("%1$d image attached to %2$s.","%1$d images attached to %2$s.",X),X,o.postTypeLabel):(0,nr.sprintf)((0,nr._n)("%d image attached to post.","%d images attached to post.",X),X),{type:"snackbar",id:"inserter-notice"})}catch{R((0,nr.__)("Could not attach images."),{type:"snackbar",id:"inserter-notice"})}},[k,o,L,R,A,O]),z=(0,li.useCallback)(async Y=>{try{await S(Y),L(),A(o.postTypeLabel?(0,nr.sprintf)((0,nr.__)("Image detached from %s."),o.postTypeLabel):(0,nr.__)("Image detached from post."),{type:"snackbar",id:"inserter-notice"})}catch{R((0,nr.__)("Could not detach image."),{type:"snackbar",id:"inserter-notice"})}},[S,o,L,R,A]),[V,I]=(0,li.useState)(),N=(0,li.useCallback)(()=>{let Y=V;I(void 0),z(Y)},[z,V]),D="block-editor-inserter__media-panel",j=o.labels.search_items||(0,nr.__)("Search");return(0,Qr.jsxs)("div",{ref:T,className:W(D,{"has-footer":w}),children:[(0,Qr.jsx)(ou.SearchControl,{className:`${D}-search`,onChange:n,value:r,label:j,placeholder:j}),m&&!g?.length&&(0,Qr.jsx)("div",{className:`${D}-spinner`,children:(0,Qr.jsx)(ou.Spinner,{})}),!m&&!g?.length&&(0,Qr.jsx)(Wl,{children:o.emptyMessage&&!i?o.emptyMessage:(0,nr.__)("No results found.")}),!!g?.length&&(0,Qr.jsx)("div",{className:W(`${D}-results`,{"is-loading":P}),"aria-busy":P,children:(0,Qr.jsx)(sfe,{rootClientId:e,onClick:t,onDetach:S?I:void 0,mediaList:g,category:o})}),w&&(0,Qr.jsxs)(Xe,{direction:"column",gap:"sm",className:`${D}-footer`,children:[x&&(0,Qr.jsx)(kS,{currentPage:s,numPages:v,changePage:B,totalItems:h}),k&&(0,Qr.jsx)(eHe,{onSelect:M})]}),V&&(0,Qr.jsxs)(ou.Modal,{title:(0,nr.__)("Detach image"),onRequestClose:()=>I(void 0),overlayClassName:`${D}-detach-modal`,children:[(0,Qr.jsx)("p",{children:o.postTypeLabel?(0,nr.sprintf)((0,nr.__)("Detach this image from the current %s? The image will remain in the Media Library."),o.postTypeLabel):(0,nr.__)("Detach this image from the current post? The image will remain in the Media Library.")}),(0,Qr.jsxs)("div",{className:`${D}-detach-actions`,children:[(0,Qr.jsx)(ou.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>I(void 0),children:(0,nr.__)("Cancel")}),(0,Qr.jsx)(ou.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:N,children:(0,nr.__)("Detach")})]})]})]})}var $s=c(E(),1),tHe=["image","video","audio"];function oHe({rootClientId:e,selectedCategory:t,onSelectCategory:o,onInsert:r,children:n}){let i=ffe(e),s=(0,bfe.useViewportMatch)("medium","<"),a="block-editor-inserter__media-tabs",l=(0,BS.useCallback)(d=>{if(!d?.url)return;let f=window.__experimentalDataViewsMediaModal&&d.mime_type?d.mime_type.split("/")[0]:d.type,[p]=NA(d,f);r(p)},[r]),u=(0,BS.useMemo)(()=>i.map(d=>({...d,label:d.labels.name})),[i]);return(0,BS.useEffect)(()=>{if(!t)return;let d=u.find(f=>f.name===t.name);d&&d!==t?o(d):d||o(null)},[u,o,t]),u.length?(0,$s.jsxs)($s.Fragment,{children:[!s&&(0,$s.jsxs)("div",{className:`${a}-container`,children:[(0,$s.jsx)(MA,{categories:u,selectedCategory:t,onSelectCategory:o,children:n}),(0,$s.jsx)(Ws,{children:(0,$s.jsx)(tu,{multiple:!1,onSelect:l,allowedTypes:tHe,render:({open:d})=>(0,$s.jsx)(yfe.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,hfe.__)("Open Media Library")})})})]}),s&&(0,$s.jsx)(BA,{categories:u,screenClassName:"block-editor-inserter__media-mobile-screen",children:d=>(0,$s.jsx)(iC,{onInsert:r,rootClientId:e,category:d})})]}):(0,$s.jsx)(Wl,{})}var gU=oHe;var sC=c(F(),1),$p=c(G(),1);var VA=c(fe(),1),kfe=c(Kr(),1),_fe=c(Z(),1);var vfe=c(H(),1),{Fill:Sfe,Slot:rHe}=(0,vfe.createSlotFill)("__unstableInserterMenuExtension");Sfe.Slot=rHe;var DA=Sfe;var ms=c(E(),1),nHe=9,iHe=[];function sHe({filterValue:e,onSelect:t,onHover:o,onHoverPattern:r,rootClientId:n,clientId:i,isAppender:s,__experimentalInsertionIndex:a,maxBlockPatterns:l,maxBlockTypes:u,showBlockDirectory:d=!1,isDraggable:f=!0,shouldFocusBlock:p=!0,prioritizePatterns:g,selectBlockOnInsert:m,isQuick:h}){let b=(0,VA.useDebounce)(kfe.speak,500),{prioritizedBlocks:v}=(0,_fe.useSelect)(V=>({prioritizedBlocks:V(C).getBlockListSettings(n)?.prioritizedInserterBlocks||iHe}),[n]),[y,k]=Gp({onSelect:t,rootClientId:n,clientId:i,isAppender:s,insertionIndex:a,shouldFocusBlock:p,selectBlockOnInsert:m}),[S,_,x,w]=Zf(y,k,h),[T,,B]=Wp(k,y,void 0,h),R=(0,sC.useMemo)(()=>{if(l===0)return[];let V=sw(T,e);return l!==void 0?V.slice(0,l):V},[e,T,l]),A=u;g&&R.length>2&&(A=0);let O=(0,sC.useMemo)(()=>{if(A===0)return[];let V=S.filter(D=>D.name!=="core/block"),I=Pc(V,"frecency","desc");!e&&v.length&&(I=SB(I,v));let N=bB(I,_,x,e);return A!==void 0?N.slice(0,A):N},[e,S,_,x,A,v]);(0,sC.useEffect)(()=>{if(!e)return;let V=O.length+R.length,I=(0,$p.sprintf)((0,$p._n)("%d result found.","%d results found.",V),V);b(I)},[e,b,O,R]);let P=(0,VA.useAsyncList)(O,{step:nHe}),L=O.length>0||R.length>0,M=!!O.length&&(0,ms.jsx)(Up,{title:(0,ms.jsx)(pt,{children:(0,$p.__)("Blocks")}),children:(0,ms.jsx)(jh,{items:P,onSelect:w,onHover:o,label:(0,$p.__)("Blocks"),isDraggable:f})}),z=!!R.length&&(0,ms.jsx)(Up,{title:(0,ms.jsx)(pt,{children:(0,$p.__)("Patterns")}),children:(0,ms.jsx)("div",{className:"block-editor-inserter__quick-inserter-patterns",children:(0,ms.jsx)(Jc,{blockPatterns:R,onClickPattern:B,onHover:r,isDraggable:f})})});return(0,ms.jsxs)(gS,{children:[!d&&!L&&(0,ms.jsx)(Wl,{}),g?z:M,!!O.length&&!!R.length&&(0,ms.jsx)("div",{className:"block-editor-inserter__quick-inserter-separator"}),g?M:z,d&&(0,ms.jsx)(DA.Slot,{fillProps:{onSelect:w,onHover:o,filterValue:e,hasItems:L,rootClientId:y},children:V=>V.length?V:L?null:(0,ms.jsx)(Wl,{})})]})}var FA=sHe;var jA=c(H(),1),xfe=c(F(),1);var kd=c(E(),1),{Tabs:zA}=U(jA.privateApis);function aHe({defaultTabId:e,onClose:t,onSelect:o,selectedTab:r,tabs:n,closeButtonLabel:i},s){return(0,kd.jsx)("div",{className:"block-editor-tabbed-sidebar",children:(0,kd.jsxs)(zA,{selectOnMove:!1,defaultTabId:e,onSelect:o,selectedTabId:r,children:[(0,kd.jsxs)("div",{className:"block-editor-tabbed-sidebar__tablist-and-close-button",children:[(0,kd.jsx)(jA.Button,{className:"block-editor-tabbed-sidebar__close-button",icon:Rg,label:i,onClick:()=>t(),size:"compact"}),(0,kd.jsx)(zA.TabList,{className:"block-editor-tabbed-sidebar__tablist",ref:s,children:n.map(a=>(0,kd.jsx)(zA.Tab,{tabId:a.name,className:"block-editor-tabbed-sidebar__tab",children:a.title},a.name))})]}),n.map(a=>(0,kd.jsx)(zA.TabPanel,{tabId:a.name,focusable:!1,className:"block-editor-tabbed-sidebar__tabpanel",ref:a.panelRef,children:a.panel},a.name))]})})}var HA=(0,xfe.forwardRef)(aHe);var UA=c(Z(),1),PS=c(F(),1);function aC(e=!0){let{setZoomLevel:t,resetZoomLevel:o}=U((0,UA.useDispatch)(C)),{isZoomedOut:r,isZoomOut:n}=(0,UA.useSelect)(a=>{let{isZoomOut:l}=U(a(C));return{isZoomedOut:l(),isZoomOut:l}},[]),i=(0,PS.useRef)(!1),s=(0,PS.useRef)(e);(0,PS.useEffect)(()=>{r!==s.current&&(i.current=!1)},[r]),(0,PS.useEffect)(()=>(s.current=e,e!==n()&&(i.current=!0,e?t("auto-scaled"):o()),()=>{i.current&&n()&&o()}),[e,n,o,t])}var Ut=c(E(),1),Cfe=()=>{};function lHe({rootClientId:e,clientId:t,isAppender:o,__experimentalInsertionIndex:r,onSelect:n,showInserterHelpPanel:i,showMostUsedBlocks:s,__experimentalFilterValue:a="",shouldFocusBlock:l=!0,onPatternCategorySelection:u,onClose:d,__experimentalInitialTab:f,__experimentalInitialCategory:p},g){let{isZoomOutMode:m,hasSectionRootClientId:h}=(0,wfe.useSelect)(ge=>{let{isZoomOut:he,getSectionRootClientId:ye}=U(ge(C));return{isZoomOutMode:he(),hasSectionRootClientId:!!ye()}},[]),[b,v,y]=(0,lC.useDebouncedInput)(a),[k,S]=(0,Zt.useState)(null),[_,x]=(0,Zt.useState)(p),[w,T]=(0,Zt.useState)("all"),[B,R]=(0,Zt.useState)(null),A=(0,lC.useViewportMatch)("large"),P=(0,lC.useViewportMatch)("medium","<")?d:Cfe;function L(){return f||(m?"patterns":"blocks")}let[M,z]=(0,Zt.useState)(L());aC(h&&(M==="patterns"||M==="media")&&A);let[I,N,D]=Gp({rootClientId:e,clientId:t,isAppender:o,insertionIndex:r,shouldFocusBlock:l}),j=(0,Zt.useRef)(),Y=(0,Zt.useCallback)((ge,he,ye,_e)=>{N(ge,he,ye,_e),n(ge),P(),window.requestAnimationFrame(()=>{!l&&!j.current?.contains(g.current.ownerDocument.activeElement)&&j.current?.querySelector("button").focus()})},[N,P,n,g,l]),X=(0,Zt.useCallback)((ge,he,...ye)=>{D(!1),N(ge,{patternName:he},...ye),n(),P()},[N,P,n,D]),ee=(0,Zt.useCallback)(ge=>{D(ge),S(ge)},[D,S]),J=(0,Zt.useCallback)((ge,he)=>{x(ge),T(he),u?.()},[x,u]),$=M==="patterns"&&!y&&!!_,q=M==="media"&&!!B,[K,Q]=(0,Zt.useState)(!1),re=(0,Zt.useRef)(null),se=(0,Zt.useRef)(null),te=(0,Zt.useRef)(null);(0,Zt.useEffect)(()=>{let ge=ye=>{Q(ye.currentTarget.scrollTop>0)},he=[re.current,se.current,te.current].filter(Boolean);return he.forEach(ye=>ye.addEventListener("scroll",ge)),()=>{he.forEach(ye=>ye.removeEventListener("scroll",ge))}},[]);let ne=(0,Zt.useMemo)(()=>M==="media"?null:(0,Ut.jsxs)(Ut.Fragment,{children:[(0,Ut.jsx)(GA.SearchControl,{className:W("block-editor-inserter__search",{"is-scrolled":K}),onChange:ge=>{k&&S(null),v(ge)},value:b,label:(0,Kp.__)("Search"),placeholder:(0,Kp.__)("Search")}),!!y&&(0,Ut.jsx)(FA,{filterValue:y,onSelect:n,onHover:ee,rootClientId:e,clientId:t,isAppender:o,__experimentalInsertionIndex:r,showBlockDirectory:!0,shouldFocusBlock:l,prioritizePatterns:M==="patterns"})]}),[M,k,S,v,b,y,n,ee,l,t,e,r,o,K]),de=(0,Zt.useMemo)(()=>(0,Ut.jsxs)(Ut.Fragment,{children:[(0,Ut.jsx)("div",{className:"block-editor-inserter__block-list",children:(0,Ut.jsx)(Cde,{ref:j,rootClientId:I,onInsert:Y,onHover:ee,showMostUsedBlocks:s})}),i&&(0,Ut.jsxs)("div",{className:"block-editor-inserter__tips",children:[(0,Ut.jsx)(pt,{render:(0,Ut.jsx)("h2",{}),children:(0,Kp.__)("A tip for using the block editor")}),(0,Ut.jsx)(Mae,{})]})]}),[I,Y,ee,s,i]),Se=(0,Zt.useMemo)(()=>(0,Ut.jsx)(Zde,{rootClientId:I,onInsert:X,onSelectCategory:J,selectedCategory:_,children:$&&(0,Ut.jsx)(IA,{rootClientId:I,onInsert:X,category:_,patternFilter:w,showTitlesAsTooltip:!0})}),[I,X,J,w,_,$]),Ee=(0,Zt.useMemo)(()=>(0,Ut.jsx)(gU,{rootClientId:I,selectedCategory:B,onSelectCategory:R,onInsert:Y,children:q&&(0,Ut.jsx)(iC,{rootClientId:I,onInsert:Y,category:B})}),[I,Y,B,R,q]),ve=ge=>{ge!=="patterns"&&x(null),z(ge)},be=(0,Zt.useRef)();return(0,Zt.useLayoutEffect)(()=>{be.current&&window.requestAnimationFrame(()=>{be.current.querySelector('[role="tab"][aria-selected="true"]')?.focus()})},[]),(0,Ut.jsxs)("div",{className:W("block-editor-inserter__menu",{"show-panel":$||q,"is-zoom-out":m}),ref:g,children:[(0,Ut.jsx)("div",{className:"block-editor-inserter__main-area",children:(0,Ut.jsx)(HA,{ref:be,onSelect:ve,onClose:d,selectedTab:M,closeButtonLabel:(0,Kp.__)("Close Block Inserter"),tabs:[{name:"blocks",title:(0,Kp.__)("Blocks"),panelRef:re,panel:(0,Ut.jsxs)(Ut.Fragment,{children:[ne,M==="blocks"&&!y&&de]})},{name:"patterns",title:(0,Kp.__)("Patterns"),panelRef:se,panel:(0,Ut.jsxs)(Ut.Fragment,{children:[ne,M==="patterns"&&!y&&Se]})},{name:"media",title:(0,Kp.__)("Media"),panelRef:te,panel:(0,Ut.jsxs)(Ut.Fragment,{children:[ne,Ee]})}]})}),i&&k&&(0,Ut.jsx)(GA.Popover,{className:"block-editor-inserter__preview-container__popover",placement:"right-start",offset:16,focusOnMount:!1,animate:!1,children:(0,Ut.jsx)(ide,{item:k})})]})}var hU=(0,Zt.forwardRef)(lHe);function cHe(e,t){return(0,Ut.jsx)(hU,{...e,onPatternCategorySelection:Cfe,ref:t})}var Efe=(0,Zt.forwardRef)(cHe);var WA=c(F(),1),cC=c(G(),1),$A=c(H(),1),Tfe=c(Z(),1);var Wh=c(E(),1),uHe=6,dHe=6,fHe=2;function KA({onSelect:e,rootClientId:t,clientId:o,isAppender:r,selectBlockOnInsert:n,hasSearch:i=!0}){let[s,a]=(0,WA.useState)(""),[l,u]=Gp({onSelect:e,rootClientId:t,clientId:o,isAppender:r,selectBlockOnInsert:n}),[d]=Zf(l,u,!0),{setInserterIsOpened:f,insertionIndex:p}=(0,Tfe.useSelect)(h=>{let{getSettings:b,getBlockIndex:v,getBlockCount:y}=h(C),k=b(),S=v(o),_=y();return{setInserterIsOpened:k.__experimentalSetIsInserterOpened,insertionIndex:S===-1?_:S}},[o]),g=i&&d.length>uHe;(0,WA.useEffect)(()=>{f&&f(!1)},[f]);let m=()=>{f({filterValue:s,onSelect:e,rootClientId:t,insertionIndex:p})};return(0,Wh.jsxs)("div",{className:W("block-editor-inserter__quick-inserter",{"has-search":g,"has-expand":f}),children:[g&&(0,Wh.jsx)($A.SearchControl,{className:"block-editor-inserter__search",value:s,onChange:h=>{a(h)},label:(0,cC.__)("Search"),placeholder:(0,cC.__)("Search")}),(0,Wh.jsx)("div",{className:"block-editor-inserter__quick-inserter-results",children:(0,Wh.jsx)(FA,{filterValue:s,onSelect:e,rootClientId:t,clientId:o,isAppender:r,maxBlockPatterns:s?fHe:0,maxBlockTypes:dHe,isDraggable:!1,selectBlockOnInsert:n,isQuick:!0})}),f&&(0,Wh.jsx)($A.Button,{__next40pxDefaultSize:!0,className:"block-editor-inserter__quick-inserter-expand",onClick:m,"aria-label":(0,cC.__)("Browse all. This will open the main inserter panel in the editor toolbar."),children:(0,cC.__)("Browse all")})]})}var pHe=50;function Rfe(e,t){if(!e||!e.attributes||!t?.__experimentalLabel)return null;let o=t.__experimentalLabel(e.attributes,{context:"appender"});return typeof o=="string"&&o.length<pHe&&o.length>0?o:null}var IS=c(E(),1),mHe=({onToggle:e,disabled:t,isOpen:o,blockTitle:r,hasSingleBlockType:n,appenderLabel:i,toggleProps:s={}},a)=>{let{as:l=YA.Button,label:u,onClick:d,...f}=s,p=u;!p&&i?p=i:!p&&n?p=(0,_d.sprintf)((0,_d._x)("Add %s","directly add the only allowed block"),r.toLowerCase()):p||(p=(0,_d._x)("Add block","Generic label for block inserter button"));function g(m){e&&e(m),d&&d(m)}return(0,IS.jsx)(l,{ref:a,__next40pxDefaultSize:s.as?void 0:!0,icon:ha,label:p,tooltipPosition:"bottom",onClick:g,className:"block-editor-inserter__toggle","aria-haspopup":n?!1:"true","aria-expanded":n?!1:o,isPressed:!n&&o,disabled:t,...f})},gHe=(0,bU.forwardRef)(mHe),hHe=({clientId:e,rootClientId:t,disabled:o,isAppender:r,position:n,selectBlockOnInsert:i,shouldDirectInsert:s=!0,showInserterHelpPanel:a,__experimentalIsQuick:l,onSelectOrClose:u,onToggle:d,renderToggle:f,toggleProps:p},g)=>{let{hasItems:m,hasSingleBlockType:h,blockTitle:b,allowedBlockType:v,blockToInsert:y,appenderLabel:k,targetRootClientId:S}=(0,OS.useSelect)(V=>{let{getBlockRootClientId:I,hasInserterItems:N,getAllowedBlocks:D,getDirectInsertBlock:j,getBlockListSettings:Y}=V(C),{getBlockVariations:X,getBlockType:ee}=V($h.store),J=t||I(e)||void 0,$=D(J),q=s&&j(J),{defaultBlock:K}=Y(J)??{},Q=$?.length===1&&X($[0].name,"inserter")?.length===0,re=Q?$[0]:null,se=q||null;!se&&Q&&K?.name===re.name&&(se=K);let te=q?ee(q.name):null;return{hasItems:N(J),hasSingleBlockType:Q,blockTitle:re?re.title:"",allowedBlockType:re,blockToInsert:se,appenderLabel:Rfe(q,te),targetRootClientId:J}},[t,e,s]),{insertBlock:_}=(0,OS.useDispatch)(C),{getBlock:x,getBlockIndex:w,getBlockOrder:T,getBlockRootClientId:B,getBlockSelectionEnd:R,getPreviousBlockClientId:A}=(0,OS.useSelect)(C),{getActiveBlockVariation:O,getBlockType:P}=(0,OS.useSelect)($h.store);if(!m&&(r||S||e))return null;function L(){let V=y?.name??v.name;function I(ee){if(!ee?.length)return{};let J;if(e){let $=x(e),q=x(A(e));$?.name===q?.name&&(J=q?.attributes)}else if(S){let $=x(S)?.innerBlocks?.at(-1);$?.name===V&&(J=$.attributes)}return J?Object.fromEntries(ee.filter($=>$ in J).map($=>[$,J[$]])):{}}function N(){if(e)return w(e);let ee=R();return!r&&ee&&B(ee)===S?w(ee)+1:T(S).length}let D=I(y?.attributesToCopy),j=(0,$h.createBlock)(V,{...y?.attributes,...D});_(j,N(),S,i),u?.(j);let Y=P(V),X;if(Y&&(X=(0,$h.__experimentalGetBlockLabel)(Y,j.attributes),X===Y.title&&(X=O(V,j.attributes)?.title||X)),X){let ee=(0,_d.sprintf)((0,_d.__)("%s block added"),X);(0,Bfe.speak)(ee)}}function M({onToggle:V,isOpen:I}){let N={onToggle:V,isOpen:I,disabled:o||!m,blockTitle:b,hasSingleBlockType:h,appenderLabel:k,toggleProps:p};return f?f(N):(0,IS.jsx)(gHe,{ref:g,...N})}function z({onClose:V}){return l?(0,IS.jsx)(KA,{onSelect:I=>{let N=Array.isArray(I)&&I?.length?I[0]:I;u&&typeof u=="function"&&u(N),V()},rootClientId:S,clientId:e,isAppender:r,selectBlockOnInsert:i}):(0,IS.jsx)(Efe,{onSelect:()=>{V()},onClose:V,rootClientId:S,clientId:e,isAppender:r,showInserterHelpPanel:a})}return h||y?M({onToggle:L}):(0,IS.jsx)(YA.Dropdown,{className:"block-editor-inserter",contentClassName:W("block-editor-inserter__popover",{"is-quick":l}),popoverProps:{position:n,shift:!0},onToggle:d,expandOnMobile:!0,headerTitle:(0,_d.__)("Add a block"),renderToggle:M,renderContent:z,onClose:u})},bHe=(0,bU.forwardRef)(hHe),za=bHe;var uC=c(E(),1),yHe="\uFEFF";function AS({rootClientId:e}){let{showPrompt:t,isLocked:o,placeholder:r,isManualGrid:n}=(0,qA.useSelect)(u=>{let{getBlockCount:d,getSettings:f,getTemplateLock:p,getBlockAttributes:g}=u(C),m=!d(e),{bodyPlaceholder:h}=f();return{showPrompt:m,isLocked:!!p(e),placeholder:h,isManualGrid:g(e)?.layout?.isManualPlacement}},[e]),{insertDefaultBlock:i,startTyping:s}=(0,qA.useDispatch)(C);if(o||n)return null;let a=(0,Pfe.decodeEntities)(r)||(0,yU.__)("Type / to choose a block"),l=()=>{i(void 0,e),s()};return(0,uC.jsxs)("div",{"data-root-client-id":e||"",className:W("block-editor-default-block-appender",{"has-visible-prompt":t}),children:[(0,uC.jsx)("p",{tabIndex:"0",role:"button","aria-label":(0,yU.__)("Add default block"),className:"block-editor-default-block-appender__content",onKeyDown:u=>{(ZA.ENTER===u.keyCode||ZA.SPACE===u.keyCode)&&l()},onClick:()=>l(),onFocus:()=>{t&&l()},children:t?a:yHe}),(0,uC.jsx)(za,{rootClientId:e,position:"bottom right",isAppender:!0,__experimentalIsQuick:!0})]})}var Ife=c(H(),1),vU=c(F(),1),dC=c(G(),1);var Ofe=c(Tt(),1);var XA=c(E(),1);function Afe({rootClientId:e,className:t,onFocus:o,tabIndex:r,onSelect:n},i){return(0,XA.jsx)(za,{position:"bottom center",rootClientId:e,__experimentalIsQuick:!0,onSelectOrClose:(...s)=>{n&&typeof n=="function"&&n(...s)},renderToggle:({onToggle:s,disabled:a,isOpen:l,blockTitle:u,hasSingleBlockType:d,appenderLabel:f})=>{let p=!d,g;return f?g=f:d?g=(0,dC.sprintf)((0,dC._x)("Add %s","directly add the only allowed block"),u.toLowerCase()):g=(0,dC._x)("Add block","Generic label for block inserter button"),(0,XA.jsx)(Ife.Button,{__next40pxDefaultSize:!0,ref:i,onFocus:o,tabIndex:r,className:W(t,"block-editor-button-block-appender"),onClick:s,"aria-haspopup":p?"true":void 0,"aria-expanded":p?l:void 0,disabled:a,label:g,showTooltip:!0,children:(0,XA.jsx)(ft,{icon:ha})})},isAppender:!0})}var Lfe=(0,vU.forwardRef)((e,t)=>((0,Ofe.default)("wp.blockEditor.ButtonBlockerAppender",{alternative:"wp.blockEditor.ButtonBlockAppender",since:"5.9"}),Afe(e,t))),Yp=(0,vU.forwardRef)(Afe);var LS=c(E(),1);function vHe({rootClientId:e}){return(0,SU.useSelect)(o=>o(C).canInsertBlockType((0,Mfe.getDefaultBlockName)(),e))?(0,LS.jsx)(AS,{rootClientId:e}):(0,LS.jsx)(Yp,{rootClientId:e,className:"block-list-appender__toggle"})}function Nfe({rootClientId:e,CustomAppender:t,className:o,tagName:r="div"}){let n=(0,SU.useSelect)(i=>{let{getBlockInsertionPoint:s,isBlockInsertionPointVisible:a,getBlockCount:l}=i(C),u=s();return a()&&e===u?.rootClientId&&l(e)===0},[e]);return(0,LS.jsx)(r,{tabIndex:-1,className:W("block-list-appender wp-block",o,{"is-drag-over":n}),contentEditable:!1,"data-block":!0,children:t?(0,LS.jsx)(t,{}):(0,LS.jsx)(vHe,{rootClientId:e})})}var Xfe=c(fe(),1),pC=c(Z(),1),Qfe=c(F(),1),Jfe=c(G(),1);var MS=c(Z(),1),Zp=c(F(),1),e2=c(H(),1),qfe=c(fe(),1);var Ffe=c(Z(),1),qp=c(F(),1),zfe=c(H(),1),jfe=c(G(),1);var Vfe=c(fe(),1),kU=c(Et(),1),Dfe=new WeakMap;function SHe(e){let t=(0,Vfe.useRefEffect)(o=>{function r(i){let{deltaX:s,deltaY:a,target:l}=i,u=e.current,d=Dfe.get(u);d||(d=(0,kU.getScrollContainer)(u),Dfe.set(u,d));let f=(0,kU.getScrollContainer)(l);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 Kh=SHe;var _U=c(E(),1),kHe=Number.MAX_SAFE_INTEGER;function _He({previousClientId:e,nextClientId:t,children:o,__unstablePopoverSlot:r,__unstableContentRef:n,operation:i="insert",nearestSide:s="right",...a}){let[l,u]=(0,qp.useReducer)(y=>(y+1)%kHe,0),{orientation:d,rootClientId:f,isVisible:p}=(0,Ffe.useSelect)(y=>{let{getBlockListSettings:k,getBlockRootClientId:S,isBlockVisible:_}=y(C),x=S(e??t);return{orientation:k(x)?.orientation||"vertical",rootClientId:x,isVisible:_(e)&&_(t)}},[e,t]),g=Mt(e),m=Mt(t),h=d==="vertical",b=(0,qp.useMemo)(()=>l<0||!g&&!m||!p?void 0:{contextElement:i==="group"?m||g:g||m,getBoundingClientRect(){let k=g?g.getBoundingClientRect():null,S=m?m.getBoundingClientRect():null,_=0,x=0,w=0,T=0;if(i==="group"){let B=S||k;x=B.top,w=0,T=B.bottom-B.top,_=s==="left"?B.left-2:B.right-2}else h?(x=k?k.bottom:S.top,w=k?k.width:S.width,T=S&&k?S.top-k.bottom:0,_=k?k.left:S.left):(x=k?k.top:S.top,T=k?k.height:S.height,(0,jfe.isRTL)()?(_=S?S.right:k.left,w=k&&S?k.left-S.right:0):(_=k?k.right:S.left,w=k&&S?S.left-k.right:0),w=Math.max(w,0));return new window.DOMRect(_,x,w,T)}},[g,m,l,h,p,i,s]),v=Kh(n);return(0,qp.useLayoutEffect)(()=>{if(!g)return;let y=new window.MutationObserver(u);return y.observe(g,{attributes:!0}),()=>{y.disconnect()}},[g]),(0,qp.useLayoutEffect)(()=>{if(!m)return;let y=new window.MutationObserver(u);return y.observe(m,{attributes:!0}),()=>{y.disconnect()}},[m]),(0,qp.useLayoutEffect)(()=>{if(g)return g.ownerDocument.defaultView.addEventListener("resize",u),()=>{g.ownerDocument.defaultView?.removeEventListener("resize",u)}},[g]),!g&&!m||!p?null:(0,_U.jsx)(zfe.Popover,{ref:v,animate:!1,anchor:b,focusOnMount:!1,__unstableSlotName:r,inline:!r,...a,className:W("block-editor-block-popover","block-editor-block-popover__inbetween",a.className),resize:!1,flip:!1,placement:"overlay",variant:"unstyled",children:(0,_U.jsx)("div",{className:"block-editor-block-popover__inbetween-container",children:o})},t+"--"+f)}var QA=_He;var Wfe=c(Z(),1),$fe=c(fe(),1),Kfe=c(H(),1);var wd=c(F(),1);var Hfe=c(fe(),1),Ufe=c(H(),1),xd=c(F(),1);var xU=c(E(),1),xHe=Number.MAX_SAFE_INTEGER;function wHe({clientId:e,bottomClientId:t,children:o,__unstablePopoverSlot:r,__unstableContentRef:n,shift:i=!0,...s},a){let l=Mt(e),u=Mt(t??e),d=(0,Hfe.useMergeRefs)([a,Kh(n)]),[f,p]=(0,xd.useReducer)(m=>(m+1)%xHe,0);(0,xd.useLayoutEffect)(()=>{if(!l)return;let m,h=new window.MutationObserver(()=>{m||(m=window.requestAnimationFrame(()=>{m=null,p()}))});return h.observe(l,{attributes:!0}),()=>{h.disconnect(),m&&window.cancelAnimationFrame(m)}},[l]);let g=(0,xd.useMemo)(()=>{if(!(f<0||!l||t&&!u))return{getBoundingClientRect(){return u?Wz(sv(l),sv(u)):sv(l)},contextElement:l}},[f,l,t,u]);return!l||t&&!u?null:(0,xU.jsx)(Ufe.Popover,{ref:d,animate:!1,focusOnMount:!1,anchor:g,__unstableSlotName:r,inline:!r,placement:"top-start",resize:!1,flip:!1,shift:i,...s,className:W("block-editor-block-popover",s.className),variant:"unstyled",children:o})}var Yh=(0,xd.forwardRef)(wHe),CHe=({clientId:e,bottomClientId:t,children:o,...r},n)=>(0,xU.jsx)(Yh,{...r,bottomClientId:t,clientId:e,__unstableContentRef:void 0,__unstablePopoverSlot:void 0,ref:n,children:o}),Gfe=(0,xd.forwardRef)(CHe);var JA=c(E(),1);function EHe({clientId:e,bottomClientId:t,children:o,shift:r=!1,additionalStyles:n,...i},s){t??=e;let a=Mt(e);return(0,JA.jsx)(Yh,{ref:s,clientId:e,bottomClientId:t,shift:r,...i,children:a&&e===t?(0,JA.jsx)(THe,{selectedElement:a,additionalStyles:n,children:o}):o})}function THe({selectedElement:e,additionalStyles:t={},children:o}){let[r,n]=(0,wd.useState)(e.offsetWidth),[i,s]=(0,wd.useState)(e.offsetHeight);(0,wd.useEffect)(()=>{let l=new window.ResizeObserver(()=>{n(e.offsetWidth),s(e.offsetHeight)});return l.observe(e,{box:"border-box"}),()=>l.disconnect()},[e]);let a=(0,wd.useMemo)(()=>({position:"absolute",width:r,height:i,...t}),[r,i,t]);return(0,JA.jsx)("div",{style:a,children:o})}var ja=(0,wd.forwardRef)(EHe);var wU=c(E(),1),fC={hide:{opacity:0,scaleY:.75},show:{opacity:1,scaleY:1},exit:{opacity:0,scaleY:.9}};function RHe({__unstablePopoverSlot:e,__unstableContentRef:t}){let{clientId:o}=(0,Wfe.useSelect)(n=>{let{getBlockOrder:i,getBlockInsertionPoint:s}=n(C),a=s(),l=i(a.rootClientId);return l.length?{clientId:l[a.index]}:{}},[]),r=(0,$fe.useReducedMotion)();return(0,wU.jsx)(ja,{clientId:o,__unstablePopoverSlot:e,__unstableContentRef:t,className:"block-editor-block-popover__drop-zone",children:(0,wU.jsx)(Kfe.__unstableMotion.div,{"data-testid":"block-popover-drop-zone",initial:r?fC.show:fC.hide,animate:fC.show,exit:r?fC.show:fC.exit,className:"block-editor-block-popover__drop-zone-foreground"})})}var Yfe=RHe;var Cd=c(E(),1),NS=(0,Zp.createContext)();NS.displayName="InsertionPointOpenRefContext";function BHe({__unstablePopoverSlot:e,__unstableContentRef:t,operation:o="insert",nearestSide:r="right"}){let{selectBlock:n,hideInsertionPoint:i}=(0,MS.useDispatch)(C),s=(0,Zp.useContext)(NS),a=(0,Zp.useRef)(),{orientation:l,previousClientId:u,nextClientId:d,rootClientId:f,isInserterShown:p,isDistractionFree:g,isZoomOutMode:m}=(0,MS.useSelect)(B=>{let{getBlockOrder:R,getBlockListSettings:A,getBlockInsertionPoint:O,isBlockBeingDragged:P,getPreviousBlockClientId:L,getNextBlockClientId:M,getSettings:z,isZoomOut:V}=U(B(C)),I=O(),N=R(I.rootClientId);if(!N.length)return{};let D=N[I.index-1],j=N[I.index];for(;P(D);)D=L(D);for(;P(j);)j=M(j);let Y=z();return{previousClientId:D,nextClientId:j,orientation:A(I.rootClientId)?.orientation||"vertical",rootClientId:I.rootClientId,isDistractionFree:Y.isDistractionFree,isInserterShown:I?.__unstableWithInserter,isZoomOutMode:V()}},[]),{getBlockEditingMode:h}=(0,MS.useSelect)(C),b=(0,qfe.useReducedMotion)();function v(B){B.target===a.current&&d&&h(d)!=="disabled"&&n(d,-1)}function y(B){B.target===a.current&&!s.current&&i()}function k(B){B.target!==a.current&&(s.current=!0)}let S=(0,Zp.useCallback)(B=>{!B&&s.current&&(s.current=!1)},[s]),_={start:{opacity:0,scale:0},rest:{opacity:1,scale:1,transition:{delay:p?.5:0,type:"tween"}},hover:{opacity:1,scale:1,transition:{delay:.5,type:"tween"}}},x={start:{scale:b?1:0},rest:{scale:1,transition:{delay:.4,type:"tween"}}};if(g||m&&o!=="insert")return null;let T=W("block-editor-block-list__insertion-point",l==="horizontal"||o==="group"?"is-horizontal":"is-vertical");return(0,Cd.jsx)(QA,{previousClientId:u,nextClientId:d,__unstablePopoverSlot:e,__unstableContentRef:t,operation:o,nearestSide:r,children:(0,Cd.jsxs)(e2.__unstableMotion.div,{layout:!b,initial:b?"rest":"start",animate:"rest",whileHover:"hover",whileTap:"pressed",exit:"start",ref:a,tabIndex:-1,onClick:v,onFocus:k,className:W(T,{"is-with-inserter":p}),onHoverEnd:y,children:[(0,Cd.jsx)(e2.__unstableMotion.div,{variants:_,className:"block-editor-block-list__insertion-point-indicator","data-testid":"block-list-insertion-point-indicator"}),p&&(0,Cd.jsx)(e2.__unstableMotion.div,{variants:x,className:W("block-editor-block-list__insertion-point-inserter"),children:(0,Cd.jsx)(za,{ref:S,position:"bottom center",clientId:d,rootClientId:f,__experimentalIsQuick:!0,onToggle:B=>{s.current=B},onSelectOrClose:()=>{s.current=!1}})})]})})}function Zfe(e){let{insertionPoint:t,isVisible:o,isBlockListEmpty:r}=(0,MS.useSelect)(n=>{let{getBlockInsertionPoint:i,isBlockInsertionPointVisible:s,getBlockCount:a}=n(C),l=i();return{insertionPoint:l,isVisible:s(),isBlockListEmpty:a(l?.rootClientId)===0}},[]);return!o||r?null:t.operation==="replace"?(0,Cd.jsx)(Yfe,{...e},`${t.rootClientId}-${t.index}`):(0,Cd.jsx)(BHe,{operation:t.operation,nearestSide:t.nearestSide,...e})}function epe(){let e=(0,Qfe.useContext)(NS),t=(0,pC.useSelect)(h=>{let b=h(C).getSettings();return b.isDistractionFree||b.isPreviewMode||U(h(C)).isZoomOut()},[]),{getBlockListSettings:o,getBlockIndex:r,isMultiSelecting:n,getSelectedBlockClientIds:i,getSettings:s,getTemplateLock:a,__unstableIsWithinBlockOverlay:l,getBlockEditingMode:u,getBlockName:d,getBlockAttributes:f,getParentSectionBlock:p}=U((0,pC.useSelect)(C)),{showInsertionPoint:g,hideInsertionPoint:m}=(0,pC.useDispatch)(C);return(0,Xfe.useRefEffect)(h=>{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")){m();return}let y;if(v.target.classList.contains("is-root-container")||(y=(v.target.getAttribute("data-block")?v.target:v.target.closest("[data-block]")).getAttribute("data-block")),a(y)||u(y)==="disabled"||d(y)==="core/block"||y&&f(y).layout?.isManualPlacement)return;let k=o(y),S=k?.orientation||"vertical",_=!!k?.__experimentalCaptureToolbars,x=v.clientY,w=v.clientX,B=Array.from(v.target.children).find(P=>{let L=P.getBoundingClientRect();return P.classList.contains("wp-block")&&S==="vertical"&&L.top>x||P.classList.contains("wp-block")&&S==="horizontal"&&((0,Jfe.isRTL)()?L.right<w:L.left>w)});if(!B){m();return}if(!B.id&&(B=B.firstElementChild,!B)){m();return}let R=B.id.slice(6);if(!R||l(R)||p(R)||i().includes(R)&&S==="vertical"&&!_&&!s().hasFixedToolbar)return;let A=B.getBoundingClientRect();if(S==="horizontal"&&(v.clientY>A.bottom||v.clientY<A.top)||S==="vertical"&&(v.clientX>A.right||v.clientX<A.left)){m();return}let O=r(R);if(O===0){m();return}g(y,O,{__unstableWithInserter:!0})}return h.addEventListener("mousemove",b),()=>{h.removeEventListener("mousemove",b)}},[e,o,r,n,g,m,i,t])}var t2=c(Z(),1),tpe=c(fe(),1);var ope=c(E(),1);function qh(){let{getSettings:e,hasSelectedBlock:t,hasMultiSelection:o}=(0,t2.useSelect)(C),{clearSelectedBlock:r}=(0,t2.useDispatch)(C),{clearBlockSelection:n}=e();return(0,tpe.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 rpe(e){return(0,ope.jsx)("div",{ref:qh(),...e})}var wpe=c(fe(),1),VS=c(F(),1),Cpe=c(Z(),1),Jh=c(ce(),1);var npe=c(E(),1);function ipe({showSeparator:e,isFloating:t,onAddBlock:o,isToggle:r}){let{clientId:n}=ht();return(0,npe.jsx)(Yp,{className:W({"block-list-appender__toggle":r}),rootClientId:n,showSeparator:e,isFloating:t,onAddBlock:o})}var spe=c(E(),1);function ape(){let{clientId:e}=ht();return(0,spe.jsx)(AS,{rootClientId:e})}var r2=c(F(),1),upe=c(Z(),1),o2=c(Tt(),1),dpe=c(mC(),1);var gC=new WeakMap;function PHe(){let e;return t=>((e===void 0||!(0,dpe.isShallowEqual)(e,t))&&(e=t),e)}function cpe(e){let[t]=(0,r2.useState)(PHe);return t(e)}function fpe(e,t,o,r,n,i,s,a,l,u,d,f){let p=(0,upe.useRegistry)(),g=cpe(o),m=cpe(r),h=l===void 0||t==="contentOnly"?t:l;(0,r2.useLayoutEffect)(()=>{let b={allowedBlocks:g,prioritizedInserterBlocks:m,templateLock:h};if(u!==void 0&&(b.__experimentalCaptureToolbars=u),d!==void 0)b.orientation=d;else{let v=Sa(f?.type);b.orientation=v.getOrientation(f)}s!==void 0&&((0,o2.default)("__experimentalDefaultBlock",{alternative:"defaultBlock",since:"6.3",version:"6.4"}),b.defaultBlock=s),n!==void 0&&(b.defaultBlock=n),a!==void 0&&((0,o2.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,o2.default)("Using `Function` as a `directInsert` argument",{alternative:"`boolean` values",since:"6.5"}),gC.get(p)||gC.set(p,{}),gC.get(p)[e]=b,window.queueMicrotask(()=>{let v=gC.get(p);if(Object.keys(v).length){let{updateBlockListSettings:y}=p.dispatch(C);y(v),gC.set(p,{})}})},[e,g,m,h,n,i,s,a,u,d,f,p])}var CU=c(wg(),1),n2=c(F(),1),ppe=c(Z(),1),mpe=c(ce(),1);function gpe(e,t,o,r){let n=(0,ppe.useRegistry)(),i=(0,n2.useRef)(null);(0,n2.useLayoutEffect)(()=>{let s=!1,{getBlocks:a,getSelectedBlocksInitialCaretPosition:l,isBlockSelected:u}=n.select(C),{replaceInnerBlocks:d,__unstableMarkNextChangeAsNotPersistent:f}=n.dispatch(C);return window.queueMicrotask(()=>{if(s)return;let p=a(e),g=p.length===0||o==="all"||o==="contentOnly",m=!(0,CU.default)(t,i.current);if(!g||!m)return;i.current=t;let h=(0,mpe.synchronizeBlocksWithTemplate)(p,t);(0,CU.default)(h,p)||(f({history:"ignore"}),d(e,h,p.length===0&&r&&h.length!==0&&u(e),l()))}),()=>{s=!0}},[t,o,e,n,r])}var hpe=c(ce(),1),bpe=c(Z(),1);function ype(e){return(0,bpe.useSelect)(t=>{let o=t(C).getBlock(e);if(!o)return;let r=t(hpe.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 Qh=c(Z(),1),a2=c(F(),1),l2=c(fe(),1),_pe=c(G(),1),DS=c(ce(),1);var EU=c(F(),1),gs=c(ce(),1),Zh=c(Z(),1),vpe=c(Et(),1);function TU(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 IHe(e,t,o,r,n,i,s,a,l){return u=>{let{srcRootClientId:d,srcClientIds:f,type:p,blocks:g}=TU(u);if(p==="inserter"){s();let m=g.map(h=>(0,gs.cloneBlock)(h));i(m,!0,null)}if(p==="block"){let m=o(f[0]);if(d===e&&m===t||f.includes(e)||r(f).some(y=>y===e))return;if(a==="group"){let y=f.map(k=>l(k));i(y,!0,null,f);return}let h=d===e,b=f.length,v=h&&m<t?t-b:t;n(f,d,v)}}}function OHe(e,t,o,r,n){return i=>{if(!t().mediaUpload)return;let s=(0,gs.findTransform)((0,gs.getBlockTransforms)("from"),a=>a.type==="files"&&r(a.blockName,e)&&a.isMatch(i));if(s){let a=s.transform(i,o);n(a)}}}function AHe(e){return t=>{let o=(0,gs.pasteHandler)({HTML:t,mode:"BLOCKS"});o.length&&e(o)}}function i2(e,t,o={}){let{operation:r="insert",nearestSide:n="right"}=o,{canInsertBlockType:i,getBlockIndex:s,getClientIdsOfDescendants:a,getBlockOrder:l,getBlocksByClientId:u,getSettings:d,getBlock:f}=(0,Zh.useSelect)(C),{getGroupingBlockName:p}=(0,Zh.useSelect)(gs.store),{insertBlocks:g,moveBlocksToPosition:m,updateBlockAttributes:h,clearSelectedBlock:b,replaceBlocks:v,removeBlocks:y}=(0,Zh.useDispatch)(C),k=(0,Zh.useRegistry)(),S=(0,EU.useCallback)((B,R=!0,A=0,O=[])=>{Array.isArray(B)||(B=[B]);let L=l(e)[t];if(r==="replace")v(L,B,void 0,A);else if(r==="group"){let M=f(L);n==="left"?B.push(M):B.unshift(M);let z=B.map(D=>(0,gs.cloneSanitizedBlock)(D)),V=B.every(D=>D.name==="core/image"),I=i("core/gallery",e),N=(0,gs.createBlock)(V&&I?"core/gallery":p(),{layout:{type:"flex",flexWrap:V&&I?null:"nowrap"}},z);v([L,...O],N,void 0,A)}else g(B,t,e,R,A)},[l,e,t,r,v,f,n,i,p,g]),_=(0,EU.useCallback)((B,R,A)=>{if(r==="replace"){let O=u(B),L=l(e)[t];k.batch(()=>{y(B,!1),v(L,O,void 0,0)})}else m(B,R,e,A)},[r,l,u,m,k,y,v,t,e]),x=IHe(e,t,s,a,_,S,b,r,f),w=OHe(e,d,h,i,S),T=AHe(S);return B=>{let R=(0,vpe.getFilesFromDataTransfer)(B.dataTransfer),A=B.dataTransfer.getData("text/html");A?T(A):R.length?w(R):x(B)}}function LHe(e,t,o){let r=o==="top"||o==="bottom",{x:n,y:i}=e,s=r?n:i,a=r?i:n,l=r?t.left:t.top,u=r?t.right:t.bottom,d=t[o],f;return s>=l&&s<=u?f=s:s<u?f=l:f=u,Math.sqrt((s-f)**2+(a-d)**2)}function Xh(e,t,o=["top","bottom","left","right"]){let r,n;return o.forEach(i=>{let s=LHe(e,t,i);(r===void 0||s<r)&&(r=s,n=i)}),[r,n]}function s2(e,t){return t.left<=e.x&&t.right>=e.x&&t.top<=e.y&&t.bottom>=e.y}function Spe(e,t){return t.top<=e.y&&t.bottom>=e.y}var RU=30,MHe=120,NHe=120;function DHe(e,t,o="vertical",r={}){let n=o==="horizontal"?["left","right"]:["top","bottom"],i=0,s="before",a=1/0,l=null,u="right",{dropZoneElement:d,parentBlockOrientation:f,rootBlockIndex:p=0}=r;if(d&&f!=="horizontal"){let v=d.getBoundingClientRect(),[y,k]=Xh(t,v,["top","bottom"]);if(v.height>MHe&&y<RU){if(k==="top")return[p,"before"];if(k==="bottom")return[p+1,"after"]}}let g=(0,_pe.isRTL)();if(d&&f==="horizontal"){let v=d.getBoundingClientRect(),[y,k]=Xh(t,v,["left","right"]);if(v.width>NHe&&y<RU){if(g&&k==="right"||!g&&k==="left")return[p,"before"];if(g&&k==="left"||!g&&k==="right")return[p+1,"after"]}}e.forEach(({isUnmodifiedDefaultBlock:v,getBoundingClientRect:y,blockIndex:k,blockOrientation:S})=>{let _=y();if(!_)return;let[x,w]=Xh(t,_,n),[T,B]=Xh(t,_,["left","right"]),R=s2(t,_);v&&R?x=0:o==="vertical"&&S!=="horizontal"&&(R&&T<RU||!R&&Spe(t,_))&&(l=k,u=B),x<a&&(s=w==="bottom"||!g&&w==="right"||g&&w==="left"?"after":"before",a=x,i=k)});let m=i+(s==="after"?1:-1),h=!!e[i]?.isUnmodifiedDefaultBlock,b=!!e[m]?.isUnmodifiedDefaultBlock;return l!==null?[l,"group",u]:!h&&!b?[s==="after"?i+1:i,"insert"]:[h?i:m,"replace"]}function c2(e,t,o,r){let n=!0;if(t){let a=t?.map(({name:l})=>l);n=o.every(l=>a?.includes(l))}let s=o.map(a=>e(a)).every(a=>{let[l]=a?.parent||[];return l?l===r:!0});return n&&s}function kpe(e,t){let{defaultView:o}=t;return!!(o&&e instanceof o.HTMLElement&&e.closest("[data-is-insertion-point]"))}function xpe({dropZoneElement:e,rootClientId:t="",parentClientId:o="",isDisabled:r=!1}={}){let n=(0,Qh.useRegistry)(),[i,s]=(0,a2.useState)({index:null,operation:"insert"}),{getBlockType:a,getBlockVariations:l,getGroupingBlockName:u}=(0,Qh.useSelect)(DS.store),{canInsertBlockType:d,getBlockListSettings:f,getBlocks:p,getBlockIndex:g,getDraggedBlockClientIds:m,getBlockNamesByClientId:h,getAllowedBlocks:b,isDragging:v,isGroupable:y,isZoomOut:k,getSectionRootClientId:S,getBlockParents:_}=U((0,Qh.useSelect)(C)),{showInsertionPoint:x,hideInsertionPoint:w,startDragging:T,stopDragging:B}=U((0,Qh.useDispatch)(C)),R=i2(i.operation==="before"||i.operation==="after"?o:t,i.index,{operation:i.operation,nearestSide:i.nearestSide}),A=(0,l2.useThrottle)((0,a2.useCallback)((O,P)=>{v()||T();let L=m(),M=[t,..._(t,!0)];if(L.some(Q=>M.includes(Q)))return;let V=b(t),I=h([t])[0],N=h(L);if(!c2(a,V,N,I))return;let j=S();if(k()&&j!==t)return;let Y=p(t).filter(Q=>!((0,DS.hasBlockSupport)(Q.name,"visibility",!0)&&Q.attributes?.metadata?.blockVisibility===!1));if(Y.length===0){n.batch(()=>{s({index:0,operation:"insert"}),x(t,0,{operation:"insert"})});return}let X=Y.map(Q=>{let re=Q.clientId;return{isUnmodifiedDefaultBlock:(0,DS.isUnmodifiedDefaultBlock)(Q),getBoundingClientRect:()=>{let se=P.getElementById(`block-${re}`);return se?se.getBoundingClientRect():null},blockIndex:g(re),blockOrientation:f(re)?.orientation}}),ee=DHe(X,{x:O.clientX,y:O.clientY},f(t)?.orientation,{dropZoneElement:e,parentBlockClientId:o,parentBlockOrientation:o?f(o)?.orientation:void 0,rootBlockIndex:g(t)}),[J,$,q]=ee,K=X[J]?.isUnmodifiedDefaultBlock;if(!(k()&&!K&&$!=="insert")){if($==="group"){let Q=Y[J],re=[Q.name,...N].every(Se=>Se==="core/image"),se=d("core/gallery",t),te=y([Q.clientId,m()]),ne=l(u(),"block"),de=ne&&ne.find(({name:Se})=>Se==="group-row");if(re&&!se&&(!te||!de)||!re&&(!te||!de))return}n.batch(()=>{s({index:J,operation:$,nearestSide:q});let Q=["before","after"].includes($)?o:t;x(Q,J,{operation:$,nearestSide:q})})}},[v,b,t,h,m,a,S,k,p,f,e,o,g,n,T,x,d,y,l,u]),200);return(0,l2.__experimentalUseDropZone)({dropZoneElement:e,isDisabled:r,onDrop:R,onDragOver(O){A(O,O.currentTarget.ownerDocument)},onDragLeave(O){let{ownerDocument:P}=O.currentTarget;kpe(O.relatedTarget,P)||kpe(O.target,P)||(A.cancel(),w())},onDragEnd(){A.cancel(),B(),w()}})}var Ed=c(E(),1),VHe={};function FHe({children:e,clientId:t}){let o=ype(t);return(0,Ed.jsx)(E1,{value:o,children:e})}var zHe=(0,VS.memo)(J0);function Epe(e){let{clientId:t,allowedBlocks:o,prioritizedInserterBlocks:r,defaultBlock:n,directInsert:i,__experimentalDefaultBlock:s,__experimentalDirectInsert:a,template:l,templateLock:u,wrapperRef:d,templateInsertUpdatesSelection:f,__experimentalCaptureToolbars:p,__experimentalAppenderTagName:g,renderAppender:m,orientation:h,placeholder:b,layout:v,name:y,blockType:k,parentLock:S,defaultLayout:_}=e;fpe(t,S,o,r,n,i,s,a,u,p,h,v),gpe(t,l,u,f);let x=(0,Jh.getBlockSupport)(y,"layout")||(0,Jh.getBlockSupport)(y,"__experimentalLayout")||VHe,{allowSizingOnChildren:w=!1}=x,T=v||x,B=(0,VS.useMemo)(()=>({..._,...T,...w&&{allowSizingOnChildren:!0}}),[_,T,w]),R=(0,Ed.jsx)(zHe,{rootClientId:t,renderAppender:m,__experimentalAppenderTagName:g,layout:B,wrapperRef:d,placeholder:b});return!k?.providesContext||Object.keys(k.providesContext).length===0?R:(0,Ed.jsx)(FHe,{clientId:t,children:R})}function jHe(e){return NO(e),(0,Ed.jsx)(Epe,{...e})}var u2=(0,VS.forwardRef)((e,t)=>{let o=eb({ref:t},e);return(0,Ed.jsx)("div",{className:"block-editor-inner-blocks",children:(0,Ed.jsx)("div",{...o})})});function eb(e={},t={}){let{__unstableDisableLayoutClassNames:o,__unstableDisableDropZone:r,dropZoneElement:n}=t,{clientId:i,layout:s=null,__unstableLayoutClassNames:a=""}=ht(),l=(0,Cpe.useSelect)(S=>{let{getBlockName:_,isZoomOut:x,getTemplateLock:w,getBlockRootClientId:T,getBlockEditingMode:B,getBlockSettings:R,getSectionRootClientId:A}=U(S(C));if(!i){let N=A();return{isDropZoneDisabled:x()&&N!==""}}let{hasBlockSupport:O,getBlockType:P}=S(Jh.store),L=_(i),M=B(i),z=T(i),[V]=R(i,"layout"),I=M==="disabled";if(x()){let N=A();I=i!==N}return{__experimentalCaptureToolbars:O(L,"__experimentalExposeControlsToChildren",!1),name:L,blockType:P(L),parentLock:w(z),parentClientId:z,isDropZoneDisabled:I,defaultLayout:V}},[i]),{__experimentalCaptureToolbars:u,name:d,blockType:f,parentLock:p,parentClientId:g,isDropZoneDisabled:m,defaultLayout:h}=l,b=xpe({dropZoneElement:n,rootClientId:i,parentClientId:g}),v=(0,wpe.useMergeRefs)([e.ref,r||m||s?.isManualPlacement&&window.__experimentalEnableGridInteractivity?null:b]),y={__experimentalCaptureToolbars:u,layout:s,name:d,blockType:f,parentLock:p,defaultLayout:h,...t},k=y.value&&y.onChange?jHe:Epe;return{...e,ref:v,className:W(e.className,"block-editor-block-list__layout",o?"":a),children:i?(0,Ed.jsx)(k,{...y,clientId:i}):(0,Ed.jsx)(J0,{...t})}}eb.save=Jh.__unstableGetInnerBlocksProps;u2.DefaultBlockAppender=ape;u2.ButtonBlockAppender=ipe;u2.Content=()=>eb.save().children;var hC=u2;var bC=c(H(),1),Tpe=c(fe(),1),Rpe=c(Z(),1),Bpe=c(F(),1),Ppe=c(G(),1);var d2=c(E(),1);function BU({clientId:e,rootClientId:t="",position:o="top"}){let[r,n]=(0,Bpe.useState)(!1),{sectionRootClientId:i,sectionClientIds:s,insertionPoint:a,blockInsertionPointVisible:l,blockInsertionPoint:u,blocksBeingDragged:d}=(0,Rpe.useSelect)(_=>{let{getInsertionPoint:x,getBlockOrder:w,getSectionRootClientId:T,isBlockInsertionPointVisible:B,getBlockInsertionPoint:R,getDraggedBlockClientIds:A}=U(_(C)),O=T(),P=w(O);return{sectionRootClientId:O,sectionClientIds:P,insertionPoint:x(),blockInsertionPoint:R(),blockInsertionPointVisible:B(),blocksBeingDragged:A()}},[]),f=(0,Tpe.useReducedMotion)();if(!e)return;let p=!1;if(!(t===i&&s&&s.includes(e)))return null;let m=a?.index===0&&e===s[a.index],h=a&&a.hasOwnProperty("index")&&e===s[a.index-1];o==="top"&&(p=m||l&&u.index===0&&e===s[u.index]),o==="bottom"&&(p=h||l&&e===s[u.index-1]);let b=d[0],v=d.includes(e),y=s.indexOf(b),S=(y>0?s[y-1]:null)===e;return(v||S)&&(p=!1),(0,d2.jsx)(bC.__unstableAnimatePresence,{children:p&&(0,d2.jsx)(bC.__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:W("block-editor-block-list__zoom-out-separator",{"is-dragged-over":r}),"data-is-insertion-point":"true",onDragOver:()=>n(!0),onDragLeave:()=>n(!1),children:(0,d2.jsx)(bC.__unstableMotion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0,transition:{delay:-.125}},transition:{ease:"linear",duration:.1,delay:.125},children:(0,Ppe.__)("Drop pattern.")})})})}var Ii=c(E(),1),EP=(0,Xp.createContext)();EP.displayName="IntersectionObserverContext";var f2=new WeakMap,HHe={trailing:!0};function UHe({className:e,...t}){let{isOutlineMode:o,isFocusMode:r,isPreviewMode:n,editedContentOnlySection:i}=(0,Ha.useSelect)(f=>{let{getSettings:p,isTyping:g,hasBlockSpotlight:m,getEditedContentOnlySection:h}=U(f(C)),{outlineMode:b,focusMode:v,isPreviewMode:y}=p();return{isOutlineMode:b&&!g(),isFocusMode:v||m(),isPreviewMode:y,editedContentOnlySection:h()}},[]),s=(0,Ha.useRegistry)(),{setBlockVisibility:a}=(0,Ha.useDispatch)(C),l=(0,p2.useDebounce)((0,Xp.useCallback)(()=>{let f={};f2.get(s).forEach(([p,g])=>{f[p]=g}),a(f)},[s]),300,HHe),u=(0,Xp.useMemo)(()=>{let{IntersectionObserver:f}=window;if(f)return new f(p=>{f2.get(s)||f2.set(s,[]);for(let g of p){let m=g.target.getAttribute("data-block");f2.get(s).push([m,g.isIntersecting])}l()})},[]),d=eb({ref:(0,p2.useMergeRefs)([qh(),epe()]),className:W("is-root-container",e,{"is-outline-mode":o,"is-focus-mode":r,"is-preview-mode":n})},t);return(0,Ii.jsxs)(EP.Provider,{value:u,children:[(0,Ii.jsx)("div",{...d}),!!i&&(0,Ii.jsx)(GHe,{clientId:i})]})}function GHe({clientId:e}){let{stopEditingContentOnlySection:t}=U((0,Ha.useDispatch)(C)),o=(0,Ha.useSelect)(r=>{let{isBlockSelected:n,hasSelectedInnerBlock:i,getBlockSelectionStart:s}=r(C);return!s()||n(e)||i(e,!0)},[e]);return(0,Xp.useEffect)(()=>{o||t()},[o,t]),null}function dS(e){return(0,Ii.jsx)(_1,{value:M5,children:(0,Ii.jsx)(UHe,{...e})})}var WHe=[],$He=new Set;function KHe({placeholder:e,rootClientId:t,renderAppender:o,__experimentalAppenderTagName:r,layout:n=W6}){let i=o!==!1,s=!!o,{order:a,isZoomOut:l,selectedBlocks:u,visibleBlocks:d,shouldRenderAppender:f}=(0,Ha.useSelect)(p=>{let{getSettings:g,getBlockOrder:m,getSelectedBlockClientIds:h,__unstableGetVisibleBlocks:b,getTemplateLock:v,getBlockEditingMode:y,isSectionBlock:k,isContainerInsertableToInContentOnlyMode:S,getBlockName:_,isZoomOut:x,canInsertBlockType:w}=U(p(C)),T=m(t);if(g().isPreviewMode)return{order:T,selectedBlocks:WHe,visibleBlocks:$He};let B=h(),R=B[0],A=!t&&!R&&(!T.length||!w((0,Ipe.getDefaultBlockName)(),t)),O=!!(t&&R&&t===R),P=v(t);return{order:T,selectedBlocks:B,visibleBlocks:b(),isZoomOut:x(),shouldRenderAppender:(!k(t)||S(_(R),t))&&y(t)!=="disabled"&&(!P||P==="contentOnly")&&i&&!x()&&(s||O||A)}},[t,i,s]);return(0,Ii.jsxs)(PB,{value:n,children:[a.map(p=>(0,Ii.jsxs)(Ha.AsyncModeProvider,{value:!d.has(p)&&!u.includes(p),children:[l&&(0,Ii.jsx)(BU,{clientId:p,rootClientId:t,position:"top"}),(0,Ii.jsx)(DP,{rootClientId:t,clientId:p}),l&&(0,Ii.jsx)(BU,{clientId:p,rootClientId:t,position:"bottom"})]},p)),a.length<1&&e,f&&(0,Ii.jsx)(Nfe,{tagName:r,rootClientId:t,CustomAppender:o})]})}function J0(e){return(0,Ii.jsx)(Ha.AsyncModeProvider,{value:!1,children:(0,Ii.jsx)(KHe,{...e})})}var sk=c(Z(),1),v9=c(Et(),1),S9=c(H(),1),rbe=c(Il(),1),OL=c(F(),1),ak=c(ce(),1),k9=c(Kr(),1),lk=c(G(),1);var lme=c(fe(),1),cme=c(Z(),1),ume=c(Et(),1),ru=c(F(),1);var ql=c(G(),1),ob=c(ce(),1),ome=c(fe(),1),rme=c(Z(),1),x2=c(F(),1);var SC=c(H(),1),Fpe=c(yw(),1),zpe=c(Tt(),1),zS=c(F(),1);var yn=c(H(),1),Ope=(0,yn.createSlotFill)("InspectorControls"),YHe=(0,yn.createSlotFill)("InspectorAdvancedControls"),qHe=(0,yn.createSlotFill)("InspectorControlsBindings"),ZHe=(0,yn.createSlotFill)("InspectorControlsBackground"),XHe=(0,yn.createSlotFill)("InspectorControlsBorder"),QHe=(0,yn.createSlotFill)("InspectorControlsColor"),JHe=(0,yn.createSlotFill)("InspectorControlsFilter"),e7e=(0,yn.createSlotFill)("InspectorControlsDimensions"),t7e=(0,yn.createSlotFill)("InspectorControlsLayout"),o7e=(0,yn.createSlotFill)("InspectorControlsElements"),r7e=(0,yn.createSlotFill)("InspectorControlsPosition"),n7e=(0,yn.createSlotFill)("InspectorControlsTypography"),i7e=(0,yn.createSlotFill)("InspectorControlsListView"),s7e=(0,yn.createSlotFill)("InspectorControlsStyles"),a7e=(0,yn.createSlotFill)("InspectorControlsEffects"),l7e=(0,yn.createSlotFill)("InspectorControlsContent"),c7e={default:Ope,advanced:YHe,background:ZHe,bindings:qHe,border:XHe,color:QHe,content:l7e,dimensions:e7e,effects:a7e,elements:o7e,filter:JHe,layout:t7e,list:i7e,position:r7e,settings:Ope,styles:s7e,typography:n7e},Yl=c7e,yC=(0,yn.createSlotFill)(Symbol("PrivateInspectorControlsAllowedBlocks"));var m2=c(F(),1);var vC="default",Ks={viewport:vC,pseudo:vC},Ape=(0,m2.createContext)(Ks),g2=Ape.Provider;function Ua(){return(0,m2.useContext)(Ape)}function Oi(e){return!!e?.viewport&&e.viewport!==vC}function Ys(e){return!!e?.pseudo&&e.pseudo!==vC}function vn(e){return!Oi(e)&&!Ys(e)}function Lpe(e){return vn(e)?[]:[e.viewport,e.pseudo].filter(t=>t&&t!==vC)}function Io(e,t){let o=Lpe(t);return o.length?kl(e,o):e}function Sn(e,t,o){let r=Lpe(t);return r.length?Ge(Ve(e,r,o)):Ge(o)}function Mpe(e,t){return!t||vn(e)?t:o=>{let r=Io(o?.style,e)||{},n=t({style:r}),i=n&&typeof n=="object"&&!Array.isArray(n)&&Object.prototype.hasOwnProperty.call(n,"style")?n.style:n;return{style:Sn(o?.style,e,i)}}}var FS=c(H(),1),b2=c(F(),1),Npe=c(fe(),1),y2=c(Z(),1);var h2=c(E(),1),Dpe=Symbol("ListViewContentPopover"),{Fill:Vpe,Slot:u7e}=(0,FS.createSlotFill)(Dpe);function d7e(){return(0,Npe.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:35,resize:!1}}}function v2({listViewRef:e}){let{popoverProps:t}=d7e(),o=(0,FS.__experimentalUseSlotFills)(Dpe),r=!!(o&&o.length),{selectedClientId:n,isOpen:i}=(0,y2.useSelect)(u=>{let{getSelectedBlockClientId:d}=u(C),f=U(u(C));return{selectedClientId:d(),isOpen:f.isListViewContentPanelOpen()}},[]),[s,a]=(0,b2.useState)(null);(0,b2.useLayoutEffect)(()=>{if(!n||!e?.current){a(null);return}let u=e.current.querySelector(`[data-block="${n}"]`);a(u)},[n,e]);let{closeListViewContentPanel:l}=U((0,y2.useDispatch)(C));return!i||!r||!s?null:(0,h2.jsx)(FS.Popover,{...t??{},className:"block-editor-inspector-list-view-content-popover",anchor:s,onClose:l,children:(0,h2.jsx)("div",{style:{width:"280px"},children:(0,h2.jsx)(u7e,{})})})}var Qp=c(E(),1),f7e=["content","list"];function tb({children:e,group:t="default",__experimentalGroup:o,resetAllFilter:r}){o&&((0,zpe.default)("`__experimentalGroup` property in `InspectorControlsFill`",{since:"6.2",version:"6.4",alternative:"`group`"}),t=o);let n=ht(),i=Yl[t]?.Fill;if(!i)return(0,Fpe.default)(`Unknown InspectorControls group "${t}" provided.`),null;if(n[Tf]){let s=n.name==="core/template-part",a=f7e.includes(t);if(!(s||a))return null}return!n[Tf]&&!n[yl]?null:t==="content"&&n[Z_]&&n[Tf]?n[yl]?(0,Qp.jsx)(SC.__experimentalStyleProvider,{document,children:(0,Qp.jsx)(Vpe,{children:e})}):null:(0,Qp.jsx)(SC.__experimentalStyleProvider,{document,children:(0,Qp.jsx)(i,{children:s=>(0,Qp.jsx)(m7e,{fillProps:s,children:e,resetAllFilter:r})})})}function p7e({resetAllFilter:e,children:t}){let{registerResetAllFilter:o,deregisterResetAllFilter:r}=(0,zS.useContext)(SC.__experimentalToolsPanelContext),n=Ua(),i=(0,zS.useMemo)(()=>Mpe(n,e),[e,n]);return(0,zS.useEffect)(()=>{if(i&&o&&r)return o(i),()=>{r(i)}},[i,o,r]),t}function m7e({children:e,resetAllFilter:t,fillProps:o}){let{forwardedContext:r=[]}=o,n=(0,Qp.jsx)(p7e,{resetAllFilter:t,children:e});return r.reduce((i,[s,a])=>(0,Qp.jsx)(s,{...a,children:i}),n)}var Ype=c(H(),1),qpe=c(F(),1),Zpe=c(yw(),1),Xpe=c(Tt(),1);var Hpe=c(H(),1),S2=c(Z(),1),Upe=c(F(),1);var jpe=c(fe(),1);function fr(){return(0,jpe.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}}}function jS(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 Gpe=c(E(),1);function Wpe({children:e,group:t,label:o}){let{updateBlockAttributes:r}=(0,S2.useDispatch)(C),{getBlockAttributes:n,getBlockName:i,getMultiSelectedBlockClientIds:s,getSelectedBlockClientId:a,hasMultiSelection:l}=(0,S2.useSelect)(C),u=fr(),d=a(),f=(0,Upe.useCallback)((p=[])=>{let g={},m=l()?s():[d];m.forEach(h=>{let b=n(h)||{},{style:v}=b,y={style:v},k={attributes:b,clientId:h,name:i(h)};p.forEach(S=>{y={...y,...S(y,k)}}),y={...y,style:Ge(y.style)},g[h]=y}),r(m,g,!0)},[n,i,s,l,d,r]);return(0,Gpe.jsx)(Hpe.__experimentalToolsPanel,{className:`${t}-block-support-panel`,label:o,resetAll:f,panelId:d,hasInnerWrapper:!0,shouldRenderPlaceholderItems:!0,__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last",dropdownMenuProps:u,children:e},d)}var PU=c(H(),1),k2=c(F(),1),$pe=c(E(),1);function Kpe({Slot:e,fillProps:t,...o}){let r=(0,k2.useContext)(PU.__experimentalToolsPanelContext),n=(0,k2.useMemo)(()=>({...t??{},forwardedContext:[...t?.forwardedContext??[],[PU.__experimentalToolsPanelContext.Provider,{value:r}]]}),[r,t]);return(0,$pe.jsx)(e,{...o,fillProps:n,bubblesVirtually:!0})}var _2=c(E(),1);function g7e({__experimentalGroup:e,group:t="default",label:o,fillProps:r,...n},i){e&&((0,Xpe.default)("`__experimentalGroup` property in `InspectorControlsSlot`",{since:"6.2",version:"6.4",alternative:"`group`"}),t=e);let s=Yl[t],a=(0,Ype.__experimentalUseSlotFills)(s?.name);if(!s)return(0,Zpe.default)(`Unknown InspectorControls group "${t}" provided.`),null;if(!a?.length)return null;let{Slot:l}=s;return o?(0,_2.jsx)(Wpe,{group:t,label:o,children:(0,_2.jsx)(Kpe,{...n,fillProps:r,Slot:l})}):(0,_2.jsx)(l,{...n,ref:i,fillProps:r,bubblesVirtually:!0})}var IU=(0,qpe.forwardRef)(g7e);var OU=c(E(),1),Qpe=tb;Qpe.Slot=IU;var Jp=e=>(0,OU.jsx)(tb,{...e,group:"advanced"});Jp.Slot=function(t){return(0,OU.jsx)(IU,{...t,group:"advanced"})};Jp.slotName="InspectorAdvancedControls";var Oe=Qpe;var eme=c(Z(),1),em=c(ce(),1),kC=c(G(),1);function Jpe(e){let t=e?.style?.position?.type;return t==="sticky"?(0,kC.__)("Sticky"):t==="fixed"?(0,kC.__)("Fixed"):null}function Oo(e){return(0,eme.useSelect)(t=>{if(!e)return null;let o=t(C),{getBlockName:r,getBlockAttributes:n,getBlock:i,__experimentalGetParsedPattern:s}=o,{getBlockType:a,getActiveBlockVariation:l}=t(em.store),u=r(e),d=a(u);if(!d)return null;let f=n(e),{isSectionBlock:p}=U(o),g=f?.metadata?.patternName;if(g&&p(e)){let S=s(g),_=Jpe(f);return{isSynced:!1,title:(0,kC.__)("Pattern"),icon:Cc,description:S?.description||(0,kC.__)("A block pattern."),anchor:f?.anchor,positionLabel:_,positionType:f?.style?.position?.type,name:S?.title||f?.metadata?.name}}let m=l(u,f,void 0,i?.(e)?.innerContent),h=(0,em.isReusableBlock)(d)||(0,em.isTemplatePart)(d),v=(h?(0,em.__experimentalGetBlockLabel)(d,f):void 0)||d.title,y=Jpe(f),k={isSynced:h,title:v,icon:d.icon,description:d.description,anchor:f?.anchor,positionLabel:y,positionType:f?.style?.position?.type,name:f?.metadata?.name};return m?{isSynced:h,title:m.title||d.title,icon:m.icon||d.icon,description:m.description||d.description,anchor:f?.anchor,positionLabel:y,positionType:f?.style?.position?.type,name:f?.metadata?.name}:k},[e])}var tm=c(E(),1),_C="position",AU={key:"default",value:"",label:(0,ql.__)("Default")},LU={key:"sticky",value:"sticky",label:(0,ql._x)("Sticky","Name for the value of the CSS position property"),hint:(0,ql.__)("The block will stick to the top of the window instead of scrolling.")},tme={key:"fixed",value:"fixed",label:(0,ql._x)("Fixed","Name for the value of the CSS position property"),hint:(0,ql.__)("The block will not move when the page is scrolled.")},h7e=["top","right","bottom","left"],b7e=["sticky","fixed"];function y7e({selector:e,style:t}){let o="",{type:r}=t?.position||{};return b7e.includes(r)&&(o+=`${e} {`,o+=`position: ${r};`,h7e.forEach(n=>{t?.position?.[n]!==void 0&&(o+=`${n}: ${t.position[n]};`)}),(r==="sticky"||r==="fixed")&&(o+="z-index: 10"),o+="}"),o}function v7e(e){let t=(0,ob.getBlockSupport)(e,_C);return!!(t===!0||t?.sticky)}function S7e(e){let t=(0,ob.getBlockSupport)(e,_C);return!!(t===!0||t?.fixed)}function k7e(e){return!!(0,ob.getBlockSupport)(e,_C)}function nme(e){let t=e?.style?.position?.type;return t==="sticky"||t==="fixed"}function ime({name:e}={}){let[t,o]=Me("position.fixed","position.sticky"),r=!t&&!o;return!k7e(e)||r}function _7e({style:e={},clientId:t,name:o,setAttributes:r}){let n=S7e(o),i=v7e(o),s=e?.position?.type,{firstParentClientId:a}=(0,rme.useSelect)(m=>{let{getBlockParents:h}=m(C),b=h(t);return{firstParentClientId:b[b.length-1]}},[t]),l=Oo(a),u=i&&s===LU.value&&l?(0,ql.sprintf)((0,ql.__)("The block will stick to the scrollable area of the parent %s block."),l.title):null,d=(0,x2.useMemo)(()=>{let m=[AU];return(i||s===LU.value)&&m.push(LU),(n||s===tme.value)&&m.push(tme),m},[n,i,s]),f=m=>{let b={...e,position:{...e?.position,type:m,top:m==="sticky"||m==="fixed"?"0px":void 0}};r({style:Ge(b)})},p=s&&d.find(m=>m.value===s)||AU,g=(0,x2.useId)();return d.length>1?(0,tm.jsx)(Oe,{group:"position",children:(0,tm.jsx)(r7,{label:(0,ql.__)("Position"),hideLabelFromVision:!0,description:u,items:d,value:p,onValueChange:m=>{f(m.value)},children:d.map(m=>{let h=m.hint?`${g}-${m.key}`:void 0;return(0,tm.jsxs)(r7.Item,{value:m,label:m.label,className:"block-editor-hooks__position-control-item","aria-describedby":h,children:[(0,tm.jsx)("div",{children:m.label}),m.hint&&(0,tm.jsx)("div",{id:h,className:"block-editor-hooks__position-control-item-hint","aria-hidden":"true",children:m.hint})]},m.key)})})}):null}var MU={edit:function(t){return ime(t)?null:(0,tm.jsx)(_7e,{...t})},useBlockProps:w7e,attributeKeys:["style"],hasSupport(e){return(0,ob.hasBlockSupport)(e,_C)}},x7e={};function w7e({name:e,style:t}){let o=(0,ob.hasBlockSupport)(e,_C),r=ime({name:e}),n=o&&!r,i=(0,ome.useInstanceId)(x7e),s=`.wp-container-${i}.wp-container-${i}`,a;n&&(a=y7e({selector:s,style:t})||"");let l=W({[`wp-container-${i}`]:n&&!!a,[`is-position-${t?.position?.type}`]:n&&!!a&&!!t?.position?.type});return hs({css:a}),{className:l}}var dme={placement:"top-start"},sme={...dme,flip:!1,shift:!0},C7e={...dme,flip:!0,shift:!1};function ame(e,t,o,r,n){if(!e||!t)return sme;let i=o?.scrollTop||0,s=sv(t),a=e.getBoundingClientRect(),l=i+a.top,u=e.ownerDocument.documentElement.clientHeight,d=l+r,f=s.top>d,p=s.height>u-r;return!n&&(f||p)?sme:C7e}function w2({contentElement:e,clientId:t}){let o=Mt(t),[r,n]=(0,ru.useState)(0),{blockIndex:i,isSticky:s}=(0,cme.useSelect)(p=>{let{getBlockIndex:g,getBlockAttributes:m}=p(C);return{blockIndex:g(t),isSticky:nme(m(t))}},[t]),a=(0,ru.useMemo)(()=>{if(e)return(0,ume.getScrollContainer)(e)},[e]),[l,u]=(0,ru.useState)(()=>ame(e,o,a,r,s)),d=(0,lme.useRefEffect)(p=>{n(p.offsetHeight)},[]),f=(0,ru.useCallback)(()=>u(ame(e,o,a,r,s)),[e,o,a,r,s]);return(0,ru.useLayoutEffect)(f,[i,f]),(0,ru.useLayoutEffect)(()=>{if(!e||!o)return;let p=e?.ownerDocument?.defaultView;p?.addEventListener?.("resize",f);let g,m=o?.ownerDocument?.defaultView;return m?.ResizeObserver&&(g=new m.ResizeObserver(f),g.observe(o)),()=>{p?.removeEventListener?.("resize",f),g&&g.disconnect()}},[f,e,o]),{...l,ref:d}}var fme=c(Z(),1);function C2(e){return(0,fme.useSelect)(o=>{let{getBlockRootClientId:r,getBlockParents:n,__experimentalGetBlockListSettingsForBlocks:i,isBlockInsertionPointVisible:s,getBlockInsertionPoint:a,getBlockOrder:l,hasMultiSelection:u,getLastMultiSelectedBlockClientId:d}=o(C),f=n(e),p=i(f),g=f.find(h=>p[h]?.__experimentalCaptureToolbars),m=!1;if(s()){let h=a();m=l(h.rootClientId)[h.index]===e}return{capturingClientId:g,isInsertionPointVisible:m,lastClientId:u()?d():null,rootClientId:r(e)}},[e])}var E2=c(E(),1);function pme({clientId:e,__unstableContentRef:t}){let{capturingClientId:o,isInsertionPointVisible:r,lastClientId:n,rootClientId:i}=C2(e),s=w2({contentElement:t?.current,clientId:e});return(0,E2.jsx)(ja,{clientId:o||e,bottomClientId:n,className:W("block-editor-block-list__block-side-inserter-popover",{"is-insertion-point-visible":r}),__unstableContentRef:t,...s,children:(0,E2.jsx)("div",{className:"block-editor-block-list__empty-block-inserter",children:(0,E2.jsx)(za,{position:"bottom right",rootClientId:i,clientId:e,__experimentalIsQuick:!0})})})}var $he=c(Z(),1),ik=c(F(),1),Khe=c(Il(),1);var jhe=c(G(),1),Hhe=c(Z(),1),g9=c(F(),1),Uhe=c(fe(),1),Dd=c(ce(),1),Ghe=c(H(),1);var rb=c(H(),1),wme=c(Z(),1),Cme=c(G(),1);var yme=c(ce(),1),vme=c(H(),1),xC=c(Z(),1),wC=c(F(),1),Sme=c(fe(),1);var gme=c(Et(),1),nu=c(F(),1),T2=50,hme=25,E7e=1e3,mme=E7e*(hme/1e3);function bme(){let e=(0,nu.useRef)(null),t=(0,nu.useRef)(null),o=(0,nu.useRef)(null),r=(0,nu.useRef)(null);(0,nu.useEffect)(()=>()=>{r.current&&(clearInterval(r.current),r.current=null)},[]);let n=(0,nu.useCallback)(a=>{e.current=a.clientY,o.current=(0,gme.getScrollContainer)(a.target),r.current=setInterval(()=>{if(o.current&&t.current){let l=o.current.scrollTop+t.current;o.current.scroll({top:l})}},hme)},[]),i=(0,nu.useCallback)(a=>{if(!o.current)return;let l=o.current.offsetHeight,u=e.current-o.current.offsetTop,d=a.clientY-o.current.offsetTop;if(a.clientY>u){let f=Math.max(l-u-T2,0),p=Math.max(d-u-T2,0),g=f===0||p===0?0:p/f;t.current=mme*g}else if(a.clientY<u){let f=Math.max(u-T2,0),p=Math.max(u-d-T2,0),g=f===0||p===0?0:p/f;t.current=-mme*g}else t.current=0},[]);return[n,i,()=>{e.current=null,o.current=null,r.current&&(clearInterval(r.current),r.current=null)}]}var NU=c(E(),1),T7e=({appendToOwnerDocument:e,children:t,clientIds:o,cloneClassname:r,elementId:n,onDragStart:i,onDragEnd:s,fadeWhenDisabled:a=!1,dragComponent:l})=>{let{srcRootClientId:u,isDraggable:d,icon:f,visibleInserter:p,getBlockType:g}=(0,xC.useSelect)(R=>{let{canMoveBlocks:A,getBlockRootClientId:O,getBlockName:P,getBlockAttributes:L,isBlockInsertionPointVisible:M}=R(C),{getBlockType:z,getActiveBlockVariation:V}=R(yme.store),I=O(o[0]),N=P(o[0]),D=V(N,L(o[0]));return{srcRootClientId:I,isDraggable:A(o),icon:D?.icon||z(N)?.icon,visibleInserter:M(),getBlockType:z}},[o]),m=(0,wC.useRef)(!1),[h,b,v]=bme(),{getAllowedBlocks:y,getBlockNamesByClientId:k,getBlockRootClientId:S}=(0,xC.useSelect)(C),{startDraggingBlocks:_,stopDraggingBlocks:x}=(0,xC.useDispatch)(C);(0,wC.useEffect)(()=>()=>{m.current&&x()},[]);let T=Mt(o[0])?.closest("body");return(0,wC.useEffect)(()=>{if(!T||!a)return;let A=(0,Sme.throttle)(O=>{if(!O.target.closest("[data-block]"))return;let P=k(o),L=O.target.closest("[data-block]").getAttribute("data-block"),M=y(L),z=k([L])[0],V;if(M?.length===0){let I=S(L),N=k([I])[0],D=y(I);V=c2(g,D,P,N)}else V=c2(g,M,P,z);!V&&!p?window?.document?.body?.classList?.add("block-draggable-invalid-drag-token"):window?.document?.body?.classList?.remove("block-draggable-invalid-drag-token")},200);return T.addEventListener("dragover",A),()=>{T.removeEventListener("dragover",A)}},[o,T,a,y,k,S,g,p]),d?(0,NU.jsx)(vme.Draggable,{appendToOwnerDocument:e,cloneClassname:r,__experimentalTransferDataType:"wp-blocks",transferData:{type:"block",srcClientIds:o,srcRootClientId:u},onDragStart:R=>{window.requestAnimationFrame(()=>{_(o),m.current=!0,h(R),i&&i()})},onDragOver:b,onDragEnd:()=>{x(),m.current=!1,v(),s&&s()},__experimentalDragComponent:l!==void 0?l:(0,NU.jsx)(SA,{count:o.length,icon:f,fadeWhenDisabled:!0}),elementId:n,children:({onDraggableStart:R,onDraggableEnd:A})=>t({draggable:!0,onDragStart:R,onDragEnd:A})}):t({draggable:!1})},R2=T7e;var _me=c(ce(),1),xme=c(H(),1);var B2=c(fe(),1),P2=c(Z(),1),HS=c(F(),1),Ga=c(G(),1),DU=c(oo(),1);var et=c(G(),1),om=(e,t)=>e==="up"?t==="horizontal"?(0,et.isRTL)()?"right":"left":"up":e==="down"?t==="horizontal"?(0,et.isRTL)()?"left":"right":"down":null;function kme(e,t,o,r,n,i,s){let a=o+1;if(e>1)return R7e(e,o,r,n,i,s);if(r&&n)return(0,et.sprintf)((0,et.__)("Block %s is the only block, and cannot be moved"),t);if(i>0&&!n){let l=om("down",s);if(l==="down")return(0,et.sprintf)((0,et.__)("Move %1$s block from position %2$d down to position %3$d"),t,a,a+1);if(l==="left")return(0,et.sprintf)((0,et.__)("Move %1$s block from position %2$d left to position %3$d"),t,a,a+1);if(l==="right")return(0,et.sprintf)((0,et.__)("Move %1$s block from position %2$d right to position %3$d"),t,a,a+1)}if(i>0&&n){let l=om("down",s);if(l==="down")return(0,et.sprintf)((0,et.__)("Block %1$s is at the end of the content and can\u2019t be moved down"),t);if(l==="left")return(0,et.sprintf)((0,et.__)("Block %1$s is at the end of the content and can\u2019t be moved left"),t);if(l==="right")return(0,et.sprintf)((0,et.__)("Block %1$s is at the end of the content and can\u2019t be moved right"),t)}if(i<0&&!r){let l=om("up",s);if(l==="up")return(0,et.sprintf)((0,et.__)("Move %1$s block from position %2$d up to position %3$d"),t,a,a-1);if(l==="left")return(0,et.sprintf)((0,et.__)("Move %1$s block from position %2$d left to position %3$d"),t,a,a-1);if(l==="right")return(0,et.sprintf)((0,et.__)("Move %1$s block from position %2$d right to position %3$d"),t,a,a-1)}if(i<0&&r){let l=om("up",s);if(l==="up")return(0,et.sprintf)((0,et.__)("Block %1$s is at the beginning of the content and can\u2019t be moved up"),t);if(l==="left")return(0,et.sprintf)((0,et.__)("Block %1$s is at the beginning of the content and can\u2019t be moved left"),t);if(l==="right")return(0,et.sprintf)((0,et.__)("Block %1$s is at the beginning of the content and can\u2019t be moved right"),t)}}function R7e(e,t,o,r,n,i){let s=t+1;if(o&&r)return(0,et.__)("All blocks are selected, and cannot be moved");if(n>0&&!r){let a=om("down",i);if(a==="down")return(0,et.sprintf)((0,et.__)("Move %1$d blocks from position %2$d down by one place"),e,s);if(a==="left")return(0,et.sprintf)((0,et.__)("Move %1$d blocks from position %2$d left by one place"),e,s);if(a==="right")return(0,et.sprintf)((0,et.__)("Move %1$d blocks from position %2$d right by one place"),e,s)}if(n>0&&r){let a=om("down",i);if(a==="down")return(0,et.__)("Blocks cannot be moved down as they are already at the bottom");if(a==="left")return(0,et.__)("Blocks cannot be moved left as they are already are at the leftmost position");if(a==="right")return(0,et.__)("Blocks cannot be moved right as they are already are at the rightmost position")}if(n<0&&!o){let a=om("up",i);if(a==="up")return(0,et.sprintf)((0,et.__)("Move %1$d blocks from position %2$d up by one place"),e,s);if(a==="left")return(0,et.sprintf)((0,et.__)("Move %1$d blocks from position %2$d left by one place"),e,s);if(a==="right")return(0,et.sprintf)((0,et.__)("Move %1$d blocks from position %2$d right by one place"),e,s)}if(n<0&&o){let a=om("up",i);if(a==="up")return(0,et.__)("Blocks cannot be moved up as they are already at the top");if(a==="left")return(0,et.__)("Blocks cannot be moved left as they are already are at the leftmost position");if(a==="right")return(0,et.__)("Blocks cannot be moved right as they are already are at the rightmost position")}}var Td=c(E(),1),B7e=(e,t)=>e==="up"?t==="horizontal"?(0,Ga.isRTL)()?rn:yi:Tg:e==="down"?t==="horizontal"?(0,Ga.isRTL)()?yi:rn:on:null,P7e=(e,t)=>e==="up"?t==="horizontal"?(0,Ga.isRTL)()?(0,Ga.__)("Move right"):(0,Ga.__)("Move left"):(0,Ga.__)("Move up"):e==="down"?t==="horizontal"?(0,Ga.isRTL)()?(0,Ga.__)("Move left"):(0,Ga.__)("Move right"):(0,Ga.__)("Move down"):null,VU=(0,HS.forwardRef)(({clientIds:e,direction:t,orientation:o,...r},n)=>{let i=(0,B2.useInstanceId)(VU),s=(0,HS.useMemo)(()=>Array.isArray(e)?e:[e],[e]),a=s.length,l=(0,B2.useViewportMatch)("small","<"),{blockType:u,isDisabled:d,rootClientId:f,isFirst:p,isLast:g,firstIndex:m,orientation:h="vertical"}=(0,P2.useSelect)(_=>{let{getBlockIndex:x,getBlockRootClientId:w,getBlockOrder:T,getBlock:B,getBlockListSettings:R}=_(C),A=s[0],O=w(A),P=x(A),L=x(s[s.length-1]),M=T(O),z=B(A),V=P===0,I=L===M.length-1,{orientation:N}=R(O)||{};return{blockType:z?(0,_me.getBlockType)(z.name):null,isDisabled:t==="up"?V:I,rootClientId:O,firstIndex:P,isFirst:V,isLast:I,orientation:o||N}},[t,o,s]),{moveBlocksDown:b,moveBlocksUp:v}=(0,P2.useDispatch)(C),y=t==="up"?v:b,k=_=>{y(e,f),r.onClick&&r.onClick(_)},S=`block-editor-block-mover-button__description-${i}`;return(0,Td.jsxs)(Td.Fragment,{children:[(0,Td.jsx)(xme.Button,{__next40pxDefaultSize:!0,ref:n,className:W("block-editor-block-mover-button",`is-${t}-button`),icon:B7e(t,h),label:P7e(t,h),tooltipPosition:!l&&t==="down"&&h==="vertical"?"bottom":"top","aria-describedby":S,...r,onClick:d?null:k,disabled:d,accessibleWhenDisabled:!0,shortcut:t==="up"?DU.displayShortcut.secondary("t"):DU.displayShortcut.secondary("y")}),(0,Td.jsx)(pt,{id:S,children:kme(a,u&&u.title,m,p,g,t==="up"?-1:1,h)})]})}),I2=(0,HS.forwardRef)((e,t)=>(0,Td.jsx)(VU,{direction:"up",ref:t,...e})),O2=(0,HS.forwardRef)((e,t)=>(0,Td.jsx)(VU,{direction:"down",ref:t,...e}));var iu=c(E(),1);function I7e({clientIds:e,hideDragHandle:t}){let{canMove:o,rootClientId:r,isFirst:n,isLast:i,orientation:s,isManualGrid:a}=(0,wme.useSelect)(l=>{let{getBlockIndex:u,getBlockListSettings:d,canMoveBlocks:f,getBlockOrder:p,getBlockRootClientId:g,getBlockAttributes:m}=l(C),h=Array.isArray(e)?e:[e],b=h[0],v=g(b),y=u(b),k=u(h[h.length-1]),S=p(v),{layout:_={}}=m(v)??{};return{canMove:f(e),rootClientId:v,isFirst:y===0,isLast:k===S.length-1,orientation:d(v)?.orientation,isManualGrid:_.type==="grid"&&_.isManualPlacement&&window.__experimentalEnableGridInteractivity}},[e]);return!o||n&&i&&!r||t&&a?null:(0,iu.jsxs)(rb.ToolbarGroup,{className:W("block-editor-block-mover",{"is-horizontal":s==="horizontal"}),children:[!t&&(0,iu.jsx)(R2,{clientIds:e,fadeWhenDisabled:!0,children:l=>(0,iu.jsx)(rb.Button,{__next40pxDefaultSize:!0,icon:ux,className:"block-editor-block-mover__drag-handle",label:(0,Cme.__)("Drag"),tabIndex:"-1",...l})}),!a&&(0,iu.jsxs)("div",{className:"block-editor-block-mover__move-button-container",children:[(0,iu.jsx)(rb.ToolbarItem,{children:l=>(0,iu.jsx)(I2,{clientIds:e,...l})}),(0,iu.jsx)(rb.ToolbarItem,{children:l=>(0,iu.jsx)(O2,{clientIds:e,...l})})]})]})}var A2=I7e;var Rme=c(H(),1),M2=c(Z(),1),N2=c(G(),1),Bme=c(F(),1);var CC=c(Z(),1),rm=c(F(),1);var{clearTimeout:Eme,setTimeout:O7e}=window,Tme=200;function A7e({ref:e,isFocused:t,highlightParent:o,debounceTimeout:r=Tme}){let{getSelectedBlockClientId:n,getBlockRootClientId:i}=(0,CC.useSelect)(C),{toggleBlockHighlight:s}=(0,CC.useDispatch)(C),a=(0,rm.useRef)(),l=(0,CC.useSelect)(h=>h(C).getSettings().isDistractionFree,[]),u=h=>{if(h&&l)return;let b=n(),v=o?i(b):b;s(v,h)},d=()=>e?.current&&e.current.matches(":hover"),f=()=>{let h=d();return!t&&!h},p=()=>{let h=a.current;h&&Eme&&Eme(h)},g=h=>{h&&h.stopPropagation(),p(),u(!0)},m=h=>{h&&h.stopPropagation(),p(),a.current=O7e(()=>{f()&&u(!1)},r)};return(0,rm.useEffect)(()=>()=>{u(!1),p()},[]),{debouncedShowGestures:g,debouncedHideGestures:m}}function US({ref:e,highlightParent:t=!1,debounceTimeout:o=Tme}){let[r,n]=(0,rm.useState)(!1),{debouncedShowGestures:i,debouncedHideGestures:s}=A7e({ref:e,debounceTimeout:o,isFocused:r,highlightParent:t}),a=(0,rm.useRef)(!1),l=()=>e?.current&&e.current.contains(e.current.ownerDocument.activeElement);return(0,rm.useEffect)(()=>{let u=e.current,d=()=>{l()&&(n(!0),i())},f=()=>{l()||(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 L2=c(E(),1);function Pme(){let{selectBlock:e}=(0,M2.useDispatch)(C),{parentClientId:t}=(0,M2.useSelect)(i=>{let{getBlockParents:s,getSelectedBlockClientId:a,getParentSectionBlock:l}=U(i(C)),u=a(),d=l(u),f=s(u);return{parentClientId:d??f[f.length-1]}},[]),o=Oo(t),r=(0,Bme.useRef)(),n=US({ref:r,highlightParent:!0});return(0,L2.jsx)("div",{className:"block-editor-block-parent-selector",ref:r,...n,children:(0,L2.jsx)(Rme.ToolbarButton,{className:"block-editor-block-parent-selector__button",onClick:()=>e(t),label:(0,N2.sprintf)((0,N2.__)("Select parent block: %s"),o?.title),showTooltip:!0,icon:(0,L2.jsx)(Ct,{icon:o?.icon})})},t)}var D2=c(H(),1);var nb=c(H(),1),L7e=(0,nb.createSlotFill)("BlockControls"),M7e=(0,nb.createSlotFill)("BlockControlsBlock"),N7e=(0,nb.createSlotFill)("BlockFormatControls"),D7e=(0,nb.createSlotFill)("BlockControlsOther"),V7e=(0,nb.createSlotFill)("BlockControlsParent"),F7e=(0,nb.createSlotFill)("BlockControlsStyleState"),z7e={default:L7e,block:M7e,inline:N7e,other:D7e,parent:V7e,"style-state":F7e},EC=z7e;function Ime(e,t){let o=ht();return o[yl]?EC[e]?.Fill:o[dy]&&t?EC.parent.Fill:null}var Rd=c(E(),1);function FU({group:e="default",controls:t,children:o,__experimentalShareWithChildBlocks:r=!1}){let n=Ime(e,r);if(!n)return null;let i=(0,Rd.jsxs)(Rd.Fragment,{children:[e==="default"&&(0,Rd.jsx)(D2.ToolbarGroup,{controls:t}),o]});return(0,Rd.jsx)(D2.__experimentalStyleProvider,{document,children:(0,Rd.jsx)(n,{children:s=>{let{forwardedContext:a=[]}=s;return a.reduce((l,[u,d])=>(0,Rd.jsx)(u,{...d,children:l}),i)}})})}var TC=c(F(),1),Bd=c(H(),1),Ame=c(yw(),1);var zU=c(E(),1),{ComponentsContext:Ome}=U(Bd.privateApis);function jU({group:e="default",...t}){let o=(0,TC.useContext)(Bd.__experimentalToolbarContext),r=(0,TC.useContext)(Ome),n=(0,TC.useMemo)(()=>({forwardedContext:[[Bd.__experimentalToolbarContext.Provider,{value:o}],[Ome.Provider,{value:r}]]}),[o,r]),i=EC[e],s=(0,Bd.__experimentalUseSlotFills)(i.name);if(!i)return(0,Ame.default)(`Unknown BlockControls group "${e}" provided.`),null;if(!s?.length)return null;let{Slot:a}=i,l=(0,zU.jsx)(a,{...t,bubblesVirtually:!0,fillProps:n});return e==="default"?l:(0,zU.jsx)(Bd.ToolbarGroup,{children:l})}var HU=c(E(),1),Lme=FU;Lme.Slot=jU;var UU=e=>(0,HU.jsx)(FU,{group:"inline",...e});UU.Slot=function(t){return(0,HU.jsx)(jU,{group:"inline",...t})};var Po=Lme;var Mme=c(H(),1),{Fill:Nme,Slot:j7e}=(0,Mme.createSlotFill)("__unstableBlockToolbarLastItem");Nme.Slot=j7e;var V2=Nme;var nL=c(H(),1);var YS=c(ce(),1),Ai=c(H(),1),sm=c(Z(),1);var oL=c(F(),1),$a=c(G(),1),Dge=c(Il(),1),Od=c(fe(),1);var WS=c(Z(),1),nm=c(ce(),1);var Qme=c(F(),1),BC=c(ce(),1),RC=c(Z(),1),Jme=c(es(),1),Pd=c(G(),1);var qs=c(ce(),1),H7e="align";var Dme="__experimentalBorder",F2="color",U7e="customClassName",Vme="typography.__experimentalFontFamily",Fme="typography.fontSize",G7e="typography.lineHeight",W7e="typography.__experimentalFontStyle",$7e="typography.__experimentalFontWeight",zme="typography.textAlign",K7e="typography.textColumns",Y7e="typography.__experimentalTextDecoration",q7e="typography.__experimentalWritingMode",Z7e="typography.__experimentalTextTransform",X7e="typography.__experimentalLetterSpacing",Q7e="layout",J7e=[G7e,Fme,W7e,$7e,Vme,zme,K7e,Y7e,Z7e,q7e,X7e],eUe=["shadow"],tUe="spacing",oUe=[...eUe,...J7e,Dme,F2,tUe],jme=e=>(0,qs.hasBlockSupport)(e,H7e);function Hme(e,t="any"){let o=(0,qs.getBlockSupport)(e,Dme);return o===!0?!0:t==="any"?!!(o?.color||o?.radius||o?.width||o?.style):!!o?.[t]}var Ume=e=>{let t=(0,qs.getBlockSupport)(e,F2);return t!==null&&typeof t=="object"&&!!t.gradients},Gme=e=>{let t=(0,qs.getBlockSupport)(e,F2);return t&&t.background!==!1},Wme=e=>(0,qs.hasBlockSupport)(e,zme);var $me=e=>{let t=(0,qs.getBlockSupport)(e,F2);return t&&t.text!==!1};var Kme=e=>(0,qs.hasBlockSupport)(e,U7e,!0);var Yme=e=>(0,qs.hasBlockSupport)(e,Vme);var qme=e=>(0,qs.hasBlockSupport)(e,Fme);var Zme=e=>(0,qs.hasBlockSupport)(e,Q7e);var Xme=e=>oUe.some(t=>(0,qs.hasBlockSupport)(e,t));function rUe(e){try{let t=(0,BC.parse)(e,{__unstableSkipMigrationLogs:!0,__unstableSkipAutop:!0});return!(t.length===1&&t[0].name==="core/freeform")}catch{return!1}}var nUe={align:jme,borderColor:e=>Hme(e,"color"),backgroundColor:Gme,textAlign:Wme,textColor:$me,gradient:Ume,className:Kme,fontFamily:Yme,fontSize:qme,layout:Zme,style:Xme};function iUe(e,t){return Object.entries(nUe).reduce((o,[r,n])=>(n(e.name)&&n(t.name)&&(o[r]=e.attributes[r]),o),{})}function GU(e,t,o){for(let r=0;r<Math.min(t.length,e.length);r+=1)o(e[r].clientId,iUe(t[r],e[r])),GU(e[r].innerBlocks,t[r].innerBlocks,o)}function GS(){let e=(0,RC.useRegistry)(),{updateBlockAttributes:t}=(0,RC.useDispatch)(C),{createSuccessNotice:o,createWarningNotice:r,createErrorNotice:n}=(0,RC.useDispatch)(Jme.store);return(0,Qme.useCallback)(async i=>{let s="";try{if(!window.navigator.clipboard){n((0,Pd.__)("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,Pd.__)("Unable to paste styles. Please allow browser clipboard permissions before continuing."),{type:"snackbar"});return}if(!s||!rUe(s)){r((0,Pd.__)("Unable to paste styles. Block styles couldn't be found within the copied content."),{type:"snackbar"});return}let a=(0,BC.parse)(s);if(a.length===1?e.batch(()=>{GU(i,i.map(()=>a[0]),t)}):e.batch(()=>{GU(i,a,t)}),i.length===1){let l=(0,BC.getBlockType)(i[0].name)?.title;o((0,Pd.sprintf)((0,Pd.__)("Pasted styles to %s."),l),{type:"snackbar"})}else o((0,Pd.sprintf)((0,Pd.__)("Pasted styles to %d blocks."),i.length),{type:"snackbar"})},[e.batch,t,o,r,n])}function ege({clientIds:e,children:t,__experimentalUpdateSelection:o}){let{getDefaultBlockName:r,getGroupingBlockName:n}=(0,WS.useSelect)(nm.store),i=(0,WS.useSelect)(k=>{let{canInsertBlockType:S,getBlockRootClientId:_,getBlocksByClientId:x,getDirectInsertBlock:w,canRemoveBlocks:T}=k(C),B=x(e),R=_(e[0]),A=S(r(),R),O=R?w(R):null;return{canRemove:T(e),canInsertBlock:B.every(P=>(A||!!O)&&S(P.name,R)),canCopyStyles:B.every(P=>!!P&&((0,nm.hasBlockSupport)(P.name,"color")||(0,nm.hasBlockSupport)(P.name,"typography"))),canDuplicate:B.every(P=>!!P&&(0,nm.hasBlockSupport)(P.name,"multiple",!0)&&S(P.name,R))}},[e,r]),{getBlocksByClientId:s,getBlocks:a}=(0,WS.useSelect)(C),{canRemove:l,canInsertBlock:u,canCopyStyles:d,canDuplicate:f}=i,{removeBlocks:p,replaceBlocks:g,duplicateBlocks:m,insertAfterBlock:h,insertBeforeBlock:b,flashBlock:v}=(0,WS.useDispatch)(C),y=GS();return t({canCopyStyles:d,canDuplicate:f,canInsertBlock:u,canRemove:l,onDuplicate(){return m(e,o)},onRemove(){return p(e,o)},onInsertBefore(){b(e[0])},onInsertAfter(){h(e[e.length-1])},onGroup(){if(!e.length)return;let k=n(),S=(0,nm.switchToBlockType)(s(e),k);S&&g(e,S)},onUngroup(){if(!e.length)return;let k=a(e[0]);k.length&&g(e,k)},onCopy(){e.length===1&&v(e[0])},async onPasteStyles(){await y(s(e))}})}var tge=c(H(),1),sUe=(0,tge.createSlotFill)(Symbol("NoteIconSlotFill")),z2=sUe;var oge=c(G(),1),rge=c(H(),1),j2=c(ce(),1),H2=c(Z(),1);var nge=c(E(),1);function aUe({clientId:e}){let t=(0,H2.useSelect)(r=>r(C).getBlock(e),[e]),{replaceBlocks:o}=(0,H2.useDispatch)(C);return!t||t.name!=="core/html"?null:(0,nge.jsx)(rge.MenuItem,{onClick:()=>o(e,(0,j2.rawHandler)({HTML:(0,j2.getBlockContent)(t)})),children:(0,oge.__)("Convert to Blocks")})}var ige=aUe;var sge=c(H(),1),{Fill:age,Slot:lUe}=(0,sge.createSlotFill)("__unstableBlockSettingsMenuFirstItem");age.Slot=lUe;var U2=age;var KS=c(H(),1),Bge=c(ce(),1),Pge=c(Z(),1);var $U=c(H(),1),KU=c(G(),1),uge=c(ce(),1),$2=c(Z(),1),dge=c(oo(),1);var lge=c(ce(),1),cge=c(Z(),1);function PC(e){return(0,cge.useSelect)(t=>{let{getBlocksByClientId:o,getSelectedBlockClientIds:r,isUngroupable:n,isGroupable:i}=t(C),{getGroupingBlockName:s,getBlockType:a}=t(lge.store),l=e?.length?e:r(),u=o(l),[d]=u,f=l.length===1&&n(l[0]);return{clientIds:l,isGroupable:i(l),isUngroupable:f,blocksSelection:u,groupingBlockName:s(),onUngroup:f&&a(d.name)?.transforms?.ungroup}},[e])}var G2=c(Z(),1),W2=c(ce(),1),ib=c(H(),1);var IC=c(G(),1);var sb=c(E(),1),cUe={group:{type:"constrained"},row:{type:"flex",flexWrap:"nowrap"},stack:{type:"flex",orientation:"vertical"},grid:{type:"grid"}};function uUe(){let{blocksSelection:e,clientIds:t,groupingBlockName:o,isGroupable:r}=PC(),{replaceBlocks:n}=(0,G2.useDispatch)(C),{canRemove:i,variations:s}=(0,G2.useSelect)(m=>{let{canRemoveBlocks:h}=m(C),{getBlockVariations:b}=m(W2.store);return{canRemove:h(t),variations:b(o,"transform")}},[t,o]),a=m=>{let h=(0,W2.switchToBlockType)(e,o);typeof m!="string"&&(m="group"),h&&h.length>0&&(h[0].attributes.layout=cUe[m],n(t,h))},l=()=>a("row"),u=()=>a("stack"),d=()=>a("grid");if(!r||!i)return null;let f=!!s.find(({name:m})=>m==="group-row"),p=!!s.find(({name:m})=>m==="group-stack"),g=!!s.find(({name:m})=>m==="group-grid");return(0,sb.jsxs)(ib.ToolbarGroup,{children:[(0,sb.jsx)(ib.ToolbarButton,{icon:px,label:(0,IC._x)("Group","action: convert blocks to group"),onClick:a}),f&&(0,sb.jsx)(ib.ToolbarButton,{icon:p4,label:(0,IC._x)("Row","action: convert blocks to row"),onClick:l}),p&&(0,sb.jsx)(ib.ToolbarButton,{icon:R4,label:(0,IC._x)("Stack","action: convert blocks to stack"),onClick:u}),g&&(0,sb.jsx)(ib.ToolbarButton,{icon:fx,label:(0,IC._x)("Grid","action: convert blocks to grid"),onClick:d})]})}var WU=uUe;var ab=c(E(),1);function fge({clientIds:e,isGroupable:t,isUngroupable:o,onUngroup:r,blocksSelection:n,groupingBlockName:i,onClose:s=()=>{}}){let{getSelectedBlockClientIds:a}=(0,$2.useSelect)(C),{replaceBlocks:l}=(0,$2.useDispatch)(C),u=()=>{let p=(0,uge.switchToBlockType)(n,i);p&&l(e,p)},d=()=>{let p=n[0].innerBlocks;p.length&&(r&&(p=r(n[0].attributes,n[0].innerBlocks)),l(e,p))};if(!t&&!o)return null;let f=a();return(0,ab.jsxs)(ab.Fragment,{children:[t&&(0,ab.jsx)($U.MenuItem,{shortcut:f.length>1?dge.displayShortcut.primary("g"):void 0,onClick:()=>{u(),s()},children:(0,KU._x)("Group","verb")}),o&&(0,ab.jsx)($U.MenuItem,{onClick:()=>{d(),s()},children:(0,KU._x)("Ungroup","Ungrouping blocks from within a grouping block back into individual blocks within the Editor")})]})}var YU=c(G(),1),gge=c(F(),1),hge=c(H(),1);var pge=c(Z(),1);function Zs(e){return(0,pge.useSelect)(t=>{let{canLockBlockType:o,getBlockName:r,isEditLockedBlock:n,isMoveLockedBlock:i,isRemoveLockedBlock:s,isLockedBlock:a}=U(t(C));return{isEditLocked:n(e),isMoveLocked:i(e),isRemoveLocked:s(e),canLock:o(r(e)),isLocked:a(e)}},[e])}var Wa=c(G(),1),OC=c(F(),1),Lr=c(H(),1);var K2=c(Z(),1),mge=c(ce(),1);var Ao=c(E(),1),dUe=["core/navigation"];function fUe(e){return e.remove&&e.move?"all":e.remove&&!e.move?"insert":!1}function Y2({clientId:e,onClose:t}){let[o,r]=(0,OC.useState)({move:!1,remove:!1}),{isEditLocked:n,isMoveLocked:i,isRemoveLocked:s}=Zs(e),{allowsEditLocking:a,templateLock:l,hasTemplateLock:u}=(0,K2.useSelect)(v=>{let{getBlockName:y,getBlockAttributes:k}=v(C),S=y(e),_=(0,mge.getBlockType)(S);return{allowsEditLocking:dUe.includes(S),templateLock:k(e)?.templateLock,hasTemplateLock:!!_?.attributes?.templateLock}},[e]),[d,f]=(0,OC.useState)(!!l),{updateBlockAttributes:p}=(0,K2.useDispatch)(C),g=Oo(e);(0,OC.useEffect)(()=>{r({move:i,remove:s,...a?{edit:n}:{}})},[n,i,s,a]);let m=Object.values(o).every(Boolean),h=Object.values(o).some(Boolean)&&!m,b=o.move!==i||o.remove!==s||a&&o.edit!==n||u&&d!==!!l;return(0,Ao.jsx)(Lr.Modal,{title:(0,Wa.sprintf)((0,Wa.__)("Lock %s"),g.title),overlayClassName:"block-editor-block-lock-modal",onRequestClose:t,size:"small",children:(0,Ao.jsxs)("form",{onSubmit:v=>{v.preventDefault(),b&&(p([e],{lock:o,templateLock:d?fUe(o):void 0}),t())},children:[(0,Ao.jsxs)("fieldset",{className:"block-editor-block-lock-modal__options",children:[(0,Ao.jsx)("legend",{children:(0,Wa.__)("Select the features you want to lock")}),(0,Ao.jsx)("ul",{role:"list",className:"block-editor-block-lock-modal__checklist",children:(0,Ao.jsxs)("li",{children:[(0,Ao.jsx)(Lr.CheckboxControl,{className:"block-editor-block-lock-modal__options-all",label:(0,Wa.__)("Lock all"),checked:m,indeterminate:h,onChange:v=>r({move:v,remove:v,...a?{edit:v}:{}})}),(0,Ao.jsxs)("ul",{role:"list",className:"block-editor-block-lock-modal__checklist",children:[a&&(0,Ao.jsxs)("li",{className:"block-editor-block-lock-modal__checklist-item",children:[(0,Ao.jsx)(Lr.CheckboxControl,{label:(0,Wa.__)("Lock editing"),checked:!!o.edit,onChange:v=>r(y=>({...y,edit:v}))}),(0,Ao.jsx)(Lr.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:o.edit?Mg:Uu})]}),(0,Ao.jsxs)("li",{className:"block-editor-block-lock-modal__checklist-item",children:[(0,Ao.jsx)(Lr.CheckboxControl,{label:(0,Wa.__)("Lock movement"),checked:o.move,onChange:v=>r(y=>({...y,move:v}))}),(0,Ao.jsx)(Lr.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:o.move?Mg:Uu})]}),(0,Ao.jsxs)("li",{className:"block-editor-block-lock-modal__checklist-item",children:[(0,Ao.jsx)(Lr.CheckboxControl,{label:(0,Wa.__)("Lock removal"),checked:o.remove,onChange:v=>r(y=>({...y,remove:v}))}),(0,Ao.jsx)(Lr.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:o.remove?Mg:Uu})]})]})]})}),u&&(0,Ao.jsx)(Lr.ToggleControl,{className:"block-editor-block-lock-modal__template-lock",label:(0,Wa.__)("Apply to all blocks inside"),checked:d,disabled:o.move&&!o.remove,onChange:()=>f(!d)})]}),(0,Ao.jsxs)(Lr.Flex,{className:"block-editor-block-lock-modal__actions",justify:"flex-end",expanded:!1,children:[(0,Ao.jsx)(Lr.FlexItem,{children:(0,Ao.jsx)(Lr.Button,{variant:"tertiary",onClick:t,__next40pxDefaultSize:!0,children:(0,Wa.__)("Cancel")})}),(0,Ao.jsx)(Lr.FlexItem,{children:(0,Ao.jsx)(Lr.Button,{variant:"primary",type:"submit",disabled:!b,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,Wa.__)("Apply")})})]})]})})}var lb=c(E(),1);function qU({clientId:e}){let{canLock:t,isLocked:o}=Zs(e),[r,n]=(0,gge.useReducer)(s=>!s,!1);if(!t)return null;let i=o?(0,YU.__)("Unlock"):(0,YU.__)("Lock");return(0,lb.jsxs)(lb.Fragment,{children:[(0,lb.jsx)(hge.MenuItem,{icon:o?Uu:j3,onClick:n,"aria-expanded":r,"aria-haspopup":"dialog",children:i}),r&&(0,lb.jsx)(Y2,{clientId:e,onClose:n})]})}var q2=c(G(),1),Z2=c(H(),1),$S=c(F(),1);var im=c(E(),1);function ZU({clientId:e}){let{canLock:t,isLocked:o}=Zs(e),[r,n]=(0,$S.useReducer)(a=>!a,!1),i=(0,$S.useRef)(!1);if((0,$S.useEffect)(()=>{o&&(i.current=!0)},[o]),!o&&!i.current)return null;let s=o?(0,q2.__)("Unlock"):(0,q2.__)("Lock");return!t&&o&&(s=(0,q2.__)("Locked")),(0,im.jsxs)(im.Fragment,{children:[(0,im.jsx)(Z2.ToolbarGroup,{className:"block-editor-block-lock-toolbar",children:(0,im.jsx)(Z2.ToolbarButton,{disabled:!t,icon:o?Mg:Uu,label:s,onClick:n,"aria-expanded":r,"aria-haspopup":"dialog"})}),r&&(0,im.jsx)(Y2,{clientId:e,onClose:n})]})}var XU=c(G(),1),bge=c(H(),1),X2=c(ce(),1),Q2=c(Z(),1);var yge=c(E(),1),pUe=()=>{};function vge({clientId:e,onToggle:t=pUe}){let{blockType:o,mode:r,enabled:n}=(0,Q2.useSelect)(a=>{let{getBlock:l,getBlockMode:u,getSettings:d}=a(C),f=l(e);return{mode:u(e),blockType:f?(0,X2.getBlockType)(f.name):null,enabled:d().codeEditingEnabled&&!!f?.isValid}},[e]),{toggleBlockMode:i}=(0,Q2.useDispatch)(C);if(!o||!(0,X2.hasBlockSupport)(o,"html",!0)||!n)return null;let s=r==="visual"?(0,XU.__)("Edit as HTML"):(0,XU.__)("Edit visually");return(0,yge.jsx)(bge.MenuItem,{onClick:()=>{i(e),t()},children:s})}var xge=c(H(),1),wge=c(G(),1),Cge=c(F(),1),Ege=c(Z(),1),Tge=c(Il(),1);var Xl=c(H(),1),Zl=c(G(),1),kge=c(F(),1),_ge=c(Kr(),1),J2=c(Z(),1);function Sge(e){return e?.trim()?.length===0}var Id=c(E(),1);function cb({clientId:e,onClose:t}){let[o,r]=(0,kge.useState)(),n=Oo(e),{metadata:i}=(0,J2.useSelect)(b=>{let{getBlockAttributes:v}=b(C);return{metadata:v(e)?.metadata}},[e]),{updateBlockAttributes:s}=(0,J2.useDispatch)(C),a=i?.name||"",l=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===l,p=Sge(o),g=d||f,m=b=>b.target.select(),h=()=>{let b=f||p?void 0:o,v=f||p?(0,Zl.sprintf)((0,Zl.__)('Block name reset to: "%s".'),o):(0,Zl.sprintf)((0,Zl.__)('Block name changed to: "%s".'),o);(0,_ge.speak)(v,"assertive"),s([e],{metadata:Ge({...i,name:b})}),t()};return(0,Id.jsx)(Xl.Modal,{title:(0,Zl.__)("Rename"),onRequestClose:t,overlayClassName:"block-editor-block-rename-modal",focusOnMount:"firstContentElement",size:"small",children:(0,Id.jsx)("form",{onSubmit:b=>{b.preventDefault(),g&&h()},children:(0,Id.jsxs)(Xl.__experimentalVStack,{spacing:"3",children:[(0,Id.jsx)(Xl.TextControl,{value:o??a,label:(0,Zl.__)("Name"),help:u?(0,Zl.__)("This block allows overrides. Changing the name can cause problems with content entered into instances of this pattern."):void 0,placeholder:l,onChange:r,onFocus:m}),(0,Id.jsxs)(Xl.__experimentalHStack,{justify:"right",children:[(0,Id.jsx)(Xl.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,children:(0,Zl.__)("Cancel")}),(0,Id.jsx)(Xl.Button,{__next40pxDefaultSize:!0,accessibleWhenDisabled:!0,disabled:!g,variant:"primary",type:"submit",children:(0,Zl.__)("Save")})]})]})})})}var ub=c(E(),1);function QU({clientId:e}){let[t,o]=(0,Cge.useState)(!1),r=(0,Ege.useSelect)(n=>n(Tge.store).getShortcutRepresentation("core/block-editor/rename"),[]);return(0,ub.jsxs)(ub.Fragment,{children:[(0,ub.jsx)(xge.MenuItem,{onClick:()=>{o(!0)},"aria-expanded":t,"aria-haspopup":"dialog",shortcut:r,children:(0,wge.__)("Rename")}),t&&(0,ub.jsx)(cb,{clientId:e,onClose:()=>o(!1)})]})}var Rge=c(ce(),1);function db(e){return{canRename:!!e&&(0,Rge.getBlockSupport)(e,"renaming",!0)}}var Ql=c(E(),1),{Fill:mUe,Slot:gUe}=(0,KS.createSlotFill)("BlockSettingsMenuControls"),hUe=({fillProps:e,clientIds:t=null})=>{let{selectedBlocks:o,selectedClientIds:r,isContentOnly:n,canToggleSelectedBlocksVisibility:i,canEdit:s}=(0,Pge.useSelect)(b=>{let{getBlocksByClientId:v,getBlockNamesByClientId:y,getSelectedBlockClientIds:k,getBlockEditingMode:S,canEditBlock:_}=b(C),x=t!==null?t:k();return{selectedBlocks:y(x),selectedClientIds:x,isContentOnly:S(x[0])==="contentOnly",canToggleSelectedBlocksVisibility:v(x).every(w=>(0,Bge.hasBlockSupport)(w.name,"visibility",!0)),canEdit:_(x[0])}},[t]),{canLock:a}=Zs(r[0]),{canRename:l}=db(o[0]),u=r.length===1&&a&&!n,d=r.length===1&&l&&!n,f=i&&!n,p=PC(r),{isGroupable:g,isUngroupable:m}=p,h=(g||m)&&!n;return(0,Ql.jsx)(gUe,{fillProps:{...e,canEdit:s,selectedBlocks:o,selectedClientIds:r},children:b=>!b?.length>0&&!h&&!u?null:(0,Ql.jsxs)(KS.MenuGroup,{children:[h&&(0,Ql.jsx)(fge,{...p,onClose:e?.onClose}),s&&u&&(0,Ql.jsx)(qU,{clientId:r[0]}),s&&d&&(0,Ql.jsx)(QU,{clientId:r[0]}),s&&f&&(0,Ql.jsx)(tj,{clientIds:r}),b,s&&e?.count===1&&!n&&(0,Ql.jsx)(vge,{clientId:e?.firstBlockClientId,onToggle:e?.onClose})]})})};function Ige({...e}){return(0,Ql.jsx)(KS.__experimentalStyleProvider,{document,children:(0,Ql.jsx)(mUe,{...e})})}Ige.Slot=hUe;var eL=Ige;var Oge=c(F(),1),Age=c(H(),1),Lge=c(fe(),1),Mge=c(Z(),1),tL=c(G(),1);var JU=c(E(),1);function Nge({parentClientId:e,parentBlockType:t}){let o=(0,Lge.useViewportMatch)("medium","<"),{selectBlock:r}=(0,Mge.useDispatch)(C),n=(0,Oge.useRef)(),i=US({ref:n,highlightParent:!0});return o?(0,JU.jsx)(Age.MenuItem,{...i,ref:n,icon:(0,JU.jsx)(Ct,{icon:t.icon}),onClick:()=>r(e),children:(0,tL.sprintf)((0,tL.__)("Select parent block (%s)"),t.title)}):null}var Xt=c(E(),1),bUe={className:"block-editor-block-settings-menu__popover",placement:"bottom-start"};function e9({clientIds:e,onCopy:t,label:o,shortcut:r,eventType:n="copy",__experimentalUpdateSelection:i=!1}){let{getBlocksByClientId:s}=(0,sm.useSelect)(C),{removeBlocks:a}=(0,sm.useDispatch)(C),l=eS(),u=(0,Od.useCopyToClipboard)(()=>(0,YS.serialize)(s(e)),()=>{switch(n){case"copy":case"copyStyles":t(),l(n,e);break;case"cut":l(n,e),a(e,i);break;default:break}}),d=o||(0,$a.__)("Copy");return(0,Xt.jsx)(Ai.MenuItem,{ref:u,shortcut:r,children:d})}function t9({block:e,clientIds:t,children:o,__experimentalSelectBlock:r,isContentOnlyListView:n,...i}){let s=t.length,a=t[0],{firstParentClientId:l,parentBlockType:u,previousBlockClientId:d,selectedBlockClientIds:f,isContentOnly:p,isZoomOut:g,canEdit:m,canMove:h,isFirst:b,isLast:v}=(0,sm.useSelect)(O=>{let{getBlockName:P,getBlockRootClientId:L,getPreviousBlockClientId:M,getSelectedBlockClientIds:z,getBlockAttributes:V,getBlockEditingMode:I,isZoomOut:N,canEditBlock:D,canMoveBlocks:j,getBlockIndex:Y,getBlockCount:X}=U(O(C)),{getActiveBlockVariation:ee}=O(YS.store),J=L(a),$=J&&P(J);return{firstParentClientId:J,parentBlockType:J&&(ee($,V(J))||(0,YS.getBlockType)($)),previousBlockClientId:M(a),selectedBlockClientIds:z(),isContentOnly:I(a)==="contentOnly",isZoomOut:N(),canEdit:D(a),canMove:j(t),isFirst:Y(a)===0,isLast:Y(a)===X(J)-1}},[a,t]),{getBlockOrder:y,getSelectedBlockClientIds:k}=(0,sm.useSelect)(C),{moveBlocksDown:S,moveBlocksUp:_}=(0,sm.useDispatch)(C),x=(0,sm.useSelect)(O=>{let{getShortcutRepresentation:P}=O(Dge.store);return{copy:P("core/block-editor/copy"),cut:P("core/block-editor/cut"),duplicate:P("core/block-editor/duplicate"),remove:P("core/block-editor/remove"),insertAfter:P("core/block-editor/insert-after"),insertBefore:P("core/block-editor/insert-before")}},[]),w=f.length>0;async function T(O){if(!r)return;let P=await O;P&&P[0]&&r(P[0],!1)}function B(){if(!r)return;let O=d||l;O||(O=y()[0]);let P=w&&k().length===0;r(O,P)}let A=!f?.includes(l)&&!!l;return(0,Xt.jsx)(ege,{clientIds:t,__experimentalUpdateSelection:!r,children:({canCopyStyles:O,canDuplicate:P,canInsertBlock:L,canRemove:M,onDuplicate:z,onInsertAfter:V,onInsertBefore:I,onRemove:N,onCopy:D,onPasteStyles:j})=>!M&&!P&&!L&&p?null:(0,Xt.jsx)(Ai.DropdownMenu,{icon:Ls,label:(0,$a.__)("Options"),className:"block-editor-block-settings-menu",popoverProps:bUe,noIcons:!0,...i,children:({onClose:X})=>(0,Xt.jsxs)(Xt.Fragment,{children:[(0,Xt.jsxs)(Ai.MenuGroup,{children:[(0,Xt.jsx)(U2.Slot,{fillProps:{onClose:X}}),A&&(0,Xt.jsx)(Nge,{parentClientId:l,parentBlockType:u}),h&&n&&(0,Xt.jsxs)(Xt.Fragment,{children:[(0,Xt.jsx)(Ai.MenuItem,{icon:Tg,disabled:b,accessibleWhenDisabled:!0,onClick:(0,Od.pipe)(X,()=>{_(t,l)}),children:(0,$a.__)("Move up")}),(0,Xt.jsx)(Ai.MenuItem,{icon:on,disabled:v,accessibleWhenDisabled:!0,onClick:(0,Od.pipe)(X,()=>{S(t,l)}),children:(0,$a.__)("Move down")})]}),m&&s===1&&(0,Xt.jsx)(ige,{clientId:a}),!p&&(0,Xt.jsx)(e9,{clientIds:t,onCopy:D,shortcut:x.copy}),M&&!p&&(0,Xt.jsx)(e9,{clientIds:t,label:(0,$a.__)("Cut"),eventType:"cut",shortcut:x.cut,__experimentalUpdateSelection:!r}),P&&(0,Xt.jsx)(Ai.MenuItem,{onClick:(0,Od.pipe)(X,z,T),shortcut:x.duplicate,children:(0,$a.__)("Duplicate")}),L&&!g&&(0,Xt.jsxs)(Xt.Fragment,{children:[(0,Xt.jsx)(Ai.MenuItem,{onClick:(0,Od.pipe)(X,I),shortcut:x.insertBefore,children:(0,$a.__)("Add before")}),(0,Xt.jsx)(Ai.MenuItem,{onClick:(0,Od.pipe)(X,V),shortcut:x.insertAfter,children:(0,$a.__)("Add after")})]}),m&&s===1&&(0,Xt.jsx)(z2.Slot,{fillProps:{clientId:a,onClose:X}})]}),O&&!p&&(0,Xt.jsxs)(Ai.MenuGroup,{children:[(0,Xt.jsx)(e9,{clientIds:t,onCopy:D,label:(0,$a.__)("Copy styles"),eventType:"copyStyles"}),m&&(0,Xt.jsx)(Ai.MenuItem,{onClick:j,children:(0,$a.__)("Paste styles")})]}),!p&&(0,Xt.jsx)(eL.Slot,{fillProps:{onClose:X,count:s,firstBlockClientId:a},clientIds:t}),typeof o=="function"?o({onClose:X}):oL.Children.map(ee=>(0,oL.cloneElement)(ee,{onClose:X})),M&&(0,Xt.jsx)(Ai.MenuGroup,{children:(0,Xt.jsx)(Ai.MenuItem,{onClick:(0,Od.pipe)(X,N,B),shortcut:x.remove,children:(0,$a.__)("Delete")})})]})})})}var Vge=t9;var Fge=c(H(),1),yUe=(0,Fge.createSlotFill)(Symbol("NoteIconToolbarSlotFill")),rL=yUe;var qS=c(E(),1);function vUe({clientIds:e,...t}){return(0,qS.jsxs)(nL.ToolbarGroup,{children:[(0,qS.jsx)(rL.Slot,{}),(0,qS.jsx)(nL.ToolbarItem,{children:o=>(0,qS.jsx)(Vge,{clientIds:e,toggleProps:o,...t})})]})}var iL=vUe;var sL=c(H(),1),zge=c(G(),1),aL=c(Z(),1);var o9=c(E(),1);function jge({clientIds:e}){let t=e.length===1?e[0]:void 0,o=(0,aL.useSelect)(n=>!!t&&n(C).getBlockMode(t)==="html",[t]),{toggleBlockMode:r}=(0,aL.useDispatch)(C);return o?(0,o9.jsx)(sL.ToolbarGroup,{children:(0,o9.jsx)(sL.ToolbarButton,{onClick:()=>{r(t)},children:(0,zge.__)("Edit visually")})}):null}var lL=c(H(),1),Li=c(F(),1),Gge=c(Z(),1),Wge=c(Tt(),1),n9=c(Et(),1),$ge=c(Il(),1),Kge=c(oo(),1);var r9=c(E(),1);function SUe(e){let t="toolbarItem";return!e.some(o=>!(t in o.dataset))}function Hge(e){return Array.from(e.querySelectorAll("[data-toolbar-item]:not([disabled])"))}function Uge(e){return e.contains(e.ownerDocument.activeElement)}function kUe(e){let[t]=n9.focus.tabbable.find(e);t&&t.focus({preventScroll:!0})}function _Ue(e){let[o,r]=(0,Li.useState)(!0),n=(0,Li.useCallback)(()=>{let i=n9.focus.tabbable.find(e.current),s=SUe(i);s||(0,Wge.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,Li.useLayoutEffect)(()=>{let i=new window.MutationObserver(n);return i.observe(e.current,{childList:!0,subtree:!0}),()=>i.disconnect()},[n,o,e]),o}function xUe({toolbarRef:e,focusOnMount:t,isAccessibleToolbar:o,defaultIndex:r,onIndexChange:n,shouldUseKeyboardFocusShortcut:i,focusEditorOnEscape:s}){let[a]=(0,Li.useState)(t),[l]=(0,Li.useState)(r),u=(0,Li.useCallback)(()=>{kUe(e.current)},[e]);(0,$ge.useShortcut)("core/block-editor/focus-toolbar",()=>{i&&u()}),(0,Li.useEffect)(()=>{a&&u()},[o,a,u]),(0,Li.useEffect)(()=>{let p=e.current,g=0;return!a&&!Uge(p)&&(g=window.requestAnimationFrame(()=>{let m=Hge(p),h=l||0;m[h]&&Uge(p)&&m[h].focus({preventScroll:!0})})),()=>{if(window.cancelAnimationFrame(g),!n||!p)return;let h=Hge(p).findIndex(b=>b.tabIndex===0);n(h)}},[l,a,n,e]);let{getLastFocus:f}=U((0,Gge.useSelect)(C));(0,Li.useEffect)(()=>{let p=e.current;if(s){let g=m=>{let h=f();m.keyCode===Kge.ESCAPE&&h?.current&&(m.preventDefault(),h.current.focus())};return p.addEventListener("keydown",g),()=>{p.removeEventListener("keydown",g)}}},[s,f,e])}function ZS({children:e,focusOnMount:t,focusEditorOnEscape:o=!1,shouldUseKeyboardFocusShortcut:r=!0,__experimentalInitialIndex:n,__experimentalOnIndexChange:i,orientation:s="horizontal",...a}){let l=(0,Li.useRef)(),u=_Ue(l);return xUe({toolbarRef:l,focusOnMount:t,defaultIndex:n,onIndexChange:i,isAccessibleToolbar:u,shouldUseKeyboardFocusShortcut:r,focusEditorOnEscape:o}),u?(0,r9.jsx)(lL.Toolbar,{label:a["aria-label"],ref:l,orientation:s,...a,children:e}):(0,r9.jsx)(lL.NavigableMenu,{orientation:s,role:"toolbar",ref:l,...a,children:e})}var Yge=c(Z(),1),cL=c(ce(),1);function uL(){return(0,Yge.useSelect)(t=>{let{getBlockEditingMode:o,getBlockName:r,getBlockSelectionStart:n}=t(C),i=n(),s=i&&(0,cL.getBlockType)(r(i));return s&&(0,cL.hasBlockSupport)(s,"__experimentalToolbar",!0)&&o(i)!=="disabled"},[])}var am=c(H(),1),qge=c(G(),1),Zge=c(ce(),1),Xge=c(F(),1),dL=c(Z(),1);var XS=c(E(),1),i9=[],wUe=6,CUe={placement:"bottom-start"};function Qge({clientId:e}){let{categories:t,currentPatternName:o,patterns:r}=(0,dL.useSelect)(a=>{let{getBlockAttributes:l,getBlockRootClientId:u,__experimentalGetAllowedPatterns:d}=a(C),f=l(e),p=f?.metadata?.categories||i9,g=u(e),m=p.length>0?d(g):i9;return{categories:p,currentPatternName:f?.metadata?.patternName,patterns:m}},[e]),{replaceBlocks:n}=(0,dL.useDispatch)(C),i=(0,Xge.useMemo)(()=>t.length===0||!r||r.length===0?i9:r.filter(a=>{let l=a.source==="core"||a.source?.startsWith("pattern-directory")&&a.source!=="pattern-directory/theme";return a.blocks.length===1&&!l&&o!==a.name&&a.categories?.some(u=>t.includes(u))&&(a.syncStatus==="unsynced"||!a.id)}).slice(0,wUe),[t,o,r]);if(i.length<2)return null;let s=a=>{let l=(a.blocks??[]).map(u=>(0,Zge.cloneBlock)(u));l[0].attributes.metadata={...l[0].attributes.metadata,categories:t},n(e,l)};return(0,XS.jsx)(am.Dropdown,{popoverProps:CUe,renderToggle:({onToggle:a,isOpen:l})=>(0,XS.jsx)(am.ToolbarGroup,{children:(0,XS.jsx)(am.ToolbarButton,{onClick:()=>a(!l),"aria-expanded":l,children:(0,qge.__)("Change design")})}),renderContent:()=>(0,XS.jsx)(am.__experimentalDropdownContentWrapper,{className:"block-editor-block-toolbar-change-design-content-wrapper",paddingSize:"none",children:(0,XS.jsx)(Jc,{blockPatterns:i,onClickPattern:s,showTitlesAsTooltip:!0})})})}var Jl=c(H(),1),she=c(G(),1),hL=c(Z(),1);var mL=c(Z(),1),cm=c(ce(),1),rhe=c(F(),1);var s9=c(fL(),1),ehe=c(G(),1);function the(e,t){for(let o of new s9.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 pL(e)}function lm(e,t,o){let r=new s9.default(e);return t&&r.remove("is-style-"+t.name),r.add("is-style-"+o.name),r.value}function ohe(e){return!e||e.length===0?[]:pL(e)?e:[{name:"default",label:(0,ehe._x)("Default","block style"),isDefault:!0},...e]}function pL(e){return e?.find(t=>t.isDefault)}function EUe(e,t){return(0,rhe.useMemo)(()=>{let o=t?.example,r=t?.name;if(o&&r)return(0,cm.getBlockFromExample)(r,{attributes:o.attributes,innerBlocks:o.innerBlocks,innerContent:o.innerContent});if(e)return(0,cm.cloneBlock)(e)},[e,t?.example,t?.name])}function QS({clientId:e,onSwitch:t}){let o=p=>{let{getBlock:g}=p(C),m=g(e);if(!m)return{};let h=(0,cm.getBlockType)(m.name),{getBlockStyles:b}=p(cm.store);return{block:h?.example?null:m,blockType:h,styles:b(m.name),className:m.attributes.className||""}},{styles:r,block:n,blockType:i,className:s}=(0,mL.useSelect)(o,[e]),{updateBlockAttributes:a}=(0,mL.useDispatch)(C),l=ohe(r),u=the(l,s),d=EUe(n,i);return{onSelect:p=>{let g=lm(s,u,p);a(e,{className:g}),t()},stylesToRender:l,activeStyle:u,genericPreviewBlock:d,className:s}}var MC=c(ce(),1),AC=c(Z(),1),gL=c(F(),1);var LC=c(E(),1),a9="is-style-";function nhe(e){return e?e.split(/\s+/).reduce((t,o)=>{if(o.startsWith(a9)){let r=o.slice(a9.length);r!=="default"&&t.push(r)}return t},[]):[]}function l9(e,t=[]){let o=nhe(e);if(!o)return null;for(let r of o)if(t.some(n=>n.name===r))return r;return null}function TUe({override:e}){Ad(e)}function c9({config:e}){let{overrides:t}=(0,AC.useSelect)(n=>({overrides:U(n(C)).getStyleOverrides()}),[]),{getBlockName:o}=(0,AC.useSelect)(C),r=(0,gL.useMemo)(()=>{if(!t?.length)return;let n=[],i=[];for(let[,s]of t)if(s?.variation&&s?.clientId&&!i.includes(s.clientId)){let a=o(s.clientId),l=e?.styles?.blocks?.[a]?.variations?.[s.variation];if(l){let u={settings:e?.settings,styles:{blocks:{[a]:{variations:{[`${s.variation}-${s.clientId}`]:l}}}}},d=UR((0,MC.getBlockTypes)(),s.clientId),h=HR(u,d,!1,!0,!0,!0,{blockGap:!1,blockStyles:!0,layoutStyles:!1,marginReset:!1,presets:!1,rootPadding:!1,variationStyles:!0});n.push({id:`${s.variation}-${s.clientId}`,css:h,__unstableType:"variation",variation:s.variation,clientId:s.clientId}),i.push(s.clientId)}}return n},[e,t,o]);return!r||!r.length?null:(0,LC.jsx)(LC.Fragment,{children:r.map(n=>(0,LC.jsx)(TUe,{override:n},n.id))})}function u9(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 l=kl(e,a.ref);l?i[s]=l: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 RUe(e,t,o){let{globalSettings:r,globalStyles:n}=(0,AC.useSelect)(i=>{let s=i(C).getSettings();return{globalSettings:s.__experimentalFeatures,globalStyles:s[Zi]}},[]);return(0,gL.useMemo)(()=>{let i=u9({settings:r,styles:n},e,t);return{settings:r,styles:{blocks:{[e]:{variations:{[`${t}-${o}`]:i}}}}}},[r,n,t,o,e])}function BUe({name:e,className:t,clientId:o}){let{getBlockStyles:r}=(0,AC.useSelect)(MC.store),n=r(e),i=l9(t,n),s=`${a9}${i}-${o}`,{settings:a,styles:l}=RUe(e,i,o),u=(0,gL.useMemo)(()=>{if(!i)return;let d={settings:a,styles:l},f=UR((0,MC.getBlockTypes)(),o);return HR(d,f,!1,!0,!0,!0,{blockGap:!1,blockStyles:!0,layoutStyles:!1,marginReset:!1,presets:!1,rootPadding:!1,variationStyles:!0})},[i,a,l,o]);return Ad({id:`variation-${o}`,css:u,__unstableType:"variation",variation:i,clientId:o}),i?{className:s}:{}}var ihe={hasSupport:()=>!0,attributeKeys:["className"],isMatch:({className:e})=>nhe(e).length>0,useBlockProps:BUe};var um=c(E(),1),PUe=(0,um.jsxs)(Jl.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24","aria-hidden":"true",focusable:"false",children:[(0,um.jsx)(Jl.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,um.jsx)(Jl.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 IUe({clientId:e}){let{stylesToRender:t,activeStyle:o,className:r}=QS({clientId:e}),{updateBlockAttributes:n}=(0,hL.useDispatch)(C),{globalSettings:i,globalStyles:s,blockName:a}=(0,hL.useSelect)(d=>{let f=d(C).getSettings();return{globalSettings:f.__experimentalFeatures,globalStyles:f[Zi],blockName:d(C).getBlockName(e)}},[e]),l=o?.name?u9({settings:i,styles:s},a,o.name)?.color?.background:void 0;return!t||t.length===0?null:(0,um.jsx)(Jl.ToolbarGroup,{children:(0,um.jsx)(Jl.ToolbarButton,{onClick:()=>{let f=(t.findIndex(m=>m.name===o.name)+1)%t.length,p=t[f],g=lm(r,o,p);n(e,{className:g})},label:(0,she.__)("Shuffle styles"),children:(0,um.jsx)(Jl.Icon,{icon:PUe,style:{fill:l||"transparent"}})})})}var ahe=IUe;var vL=c(H(),1),d9=c(G(),1),lhe=c(Z(),1),SL=c(ce(),1);var bL=c(Z(),1);function yL(e){let{isSectionBlock:t,isWithinSection:o,isWithinEditedSection:r,isEditingContentOnlySection:n,editedContentOnlySection:i}=(0,bL.useSelect)(u=>{let{isSectionBlock:d,getParentSectionBlock:f,getEditedContentOnlySection:p,isWithinEditedContentOnlySection:g}=U(u(C)),m=p();return{isSectionBlock:d(e),isWithinSection:d(e)||!!f(e),isWithinEditedSection:g(e),isEditingContentOnlySection:m===e,editedContentOnlySection:m}},[e]),s=(0,bL.useDispatch)(C),{editContentOnlySection:a,stopEditingContentOnlySection:l}=U(s);return{isSectionBlock:t,isWithinSection:o,isWithinEditedSection:r,isEditingContentOnlySection:n,editedContentOnlySection:i,editContentOnlySection:a,stopEditingContentOnlySection:l}}var f9=c(E(),1);function che({clientId:e}){let{isSectionBlock:t,isEditingContentOnlySection:o,editContentOnlySection:r,stopEditingContentOnlySection:n}=yL(e),i=(0,lhe.useSelect)(l=>{if(!e)return null;let{getBlockName:u}=l(C),d=u(e);return d?{name:d}:null},[e]);if(!e||!t&&!o||(0,SL.isReusableBlock)(i)||(0,SL.isTemplatePart)(i))return null;let s=o;return(0,f9.jsx)(vL.ToolbarGroup,{children:(0,f9.jsx)(vL.ToolbarButton,{onClick:()=>{s?n():r(e)},children:s?(0,d9.__)("Exit pattern"):(0,d9.__)("Edit pattern")})})}var Nhe=c(H(),1),Dhe=c(G(),1),Vhe=c(Z(),1);var zC=c(ce(),1),Fhe=c(Ny(),1);var su=c(G(),1),au=c(H(),1),fm=c(ce(),1),RL=c(Z(),1);var hhe=c(G(),1),DC=c(H(),1),_L=c(ce(),1),xL=c(F(),1);var uhe=c(H(),1),dhe=c(fe(),1);var NC=c(E(),1);function dm({blocks:e,placement:t="right-start",offset:o=16,anchor:r}){return(0,dhe.useViewportMatch)("medium","<")?null:(0,NC.jsx)("div",{className:"block-editor-block-switcher__popover-preview-container",children:(0,NC.jsx)(uhe.Popover,{className:"block-editor-block-switcher__popover-preview",placement:t,focusOnMount:!1,offset:o,anchor:r,children:(0,NC.jsx)("div",{className:"block-editor-block-switcher__preview",children:(0,NC.jsx)(us,{viewportWidth:601,blocks:e})})})})}var fhe=c(H(),1),JS=c(ce(),1),phe=c(Z(),1),kL=c(F(),1);var Ld=c(E(),1),OUe={};function mhe({clientIds:e,blocks:t}){let{activeBlockVariation:o,blockVariationTransformations:r}=(0,phe.useSelect)(i=>{let{getBlockAttributes:s,canRemoveBlocks:a}=i(C),{getActiveBlockVariation:l,getBlockVariations:u}=i(JS.store),d=a(e);if(t.length!==1||!d)return OUe;let[f]=t;return{blockVariationTransformations:u(f.name,"transform"),activeBlockVariation:l(f.name,s(f.clientId))}},[e,t]);return(0,kL.useMemo)(()=>r?.filter(({name:i})=>i!==o?.name),[r,o])}var AUe=({transformations:e,onSelect:t,blocks:o})=>{let[r,n]=(0,kL.useState)();return(0,Ld.jsxs)(Ld.Fragment,{children:[r&&(0,Ld.jsx)(dm,{blocks:(0,JS.cloneBlock)(o[0],e.find(({name:i})=>i===r).attributes)}),e?.map(i=>(0,Ld.jsx)(LUe,{item:i,onSelect:t,setHoveredTransformItemName:n},i.name))]})};function LUe({item:e,onSelect:t,setHoveredTransformItemName:o}){let{name:r,icon:n,title:i}=e;return(0,Ld.jsxs)(fhe.MenuItem,{className:(0,JS.getBlockMenuDefaultClassName)(r),onClick:s=>{s.preventDefault(),t(r)},onMouseLeave:()=>o(null),onMouseEnter:()=>o(r),onFocus:()=>o(r),onBlur:()=>o(null),children:[(0,Ld.jsx)(Ct,{icon:n,showColors:!0}),i]})}var ghe=AUe;var bs=c(E(),1);function MUe(e){let t={"core/paragraph":1,"core/heading":2,"core/list":3,"core/quote":4},o=(0,xL.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 NUe=({className:e,possibleBlockTransformations:t,possibleBlockVariationTransformations:o,onSelect:r,onSelectVariation:n,blocks:i})=>{let[s,a]=(0,xL.useState)(),{priorityTextTransformations:l,restTransformations:u}=MUe(t),d=l.length&&u.length,f=!!u.length&&(0,bs.jsx)(DUe,{restTransformations:u,onSelect:r,setHoveredTransformItem:a});return(0,bs.jsxs)(bs.Fragment,{children:[(0,bs.jsxs)(DC.MenuGroup,{label:(0,hhe.__)("Transform to"),className:e,children:[s&&(0,bs.jsx)(dm,{blocks:(0,_L.switchToBlockType)(i,s.name,s.variationName)}),!!o?.length&&(0,bs.jsx)(ghe,{transformations:o,blocks:i,onSelect:n}),l.map(p=>(0,bs.jsx)(bhe,{item:p,onSelect:r,setHoveredTransformItem:a},p.id||p.name)),!d&&f]}),!!d&&(0,bs.jsx)(DC.MenuGroup,{className:e,children:f})]})};function DUe({restTransformations:e,onSelect:t,setHoveredTransformItem:o}){return e.map(r=>(0,bs.jsx)(bhe,{item:r,onSelect:t,setHoveredTransformItem:o},r.id||r.name))}function bhe({item:e,onSelect:t,setHoveredTransformItem:o}){let{name:r,icon:n,title:i,isDisabled:s}=e;return(0,bs.jsxs)(DC.MenuItem,{className:(0,_L.getBlockMenuDefaultClassName)(r),onClick:a=>{a.preventDefault(),t(r,e.variationName)},disabled:s,onMouseLeave:()=>o(null),onMouseEnter:()=>o(e),onFocus:()=>o(e),onBlur:()=>o(null),children:[(0,bs.jsx)(Ct,{icon:n,showColors:!0}),i]})}var yhe=NUe;var khe=c(G(),1),_he=c(H(),1),CL=c(F(),1);var wL=c(H(),1);var ek=c(E(),1),vhe=()=>{};function She({stylesToRender:e,activeStyle:t,onSelect:o=vhe,onHoverStyle:r=vhe}){return!e||e.length===0?null:(0,ek.jsx)(ek.Fragment,{children:e.map(n=>{let i=n.label||n.name;return(0,ek.jsx)(wL.MenuItem,{icon:t.name===n.name?Xi:null,onClick:()=>o(n),onFocus:()=>r(n),onBlur:()=>r(null),onMouseEnter:()=>r(n),onMouseLeave:()=>r(null),children:(0,ek.jsx)(wL.__experimentalText,{as:"span",limit:18,ellipsizeMode:"tail",truncate:!0,children:i})},n.name)})})}var VC=c(E(),1);function EL({hoveredBlock:e,onSwitch:t}){let{clientId:o}=e,[r,n]=(0,CL.useState)(null),{onSelect:i,stylesToRender:s,activeStyle:a,genericPreviewBlock:l,className:u}=QS({clientId:o,onSwitch:t}),d=(0,CL.useMemo)(()=>{if(!r||!l)return null;let f=lm(u,a,r);return[{...l,attributes:{...l.attributes||{},className:f}}]},[r,l,u,a]);return!s||s.length===0?null:(0,VC.jsxs)(_he.MenuGroup,{label:(0,khe.__)("Styles"),className:"block-editor-block-switcher__styles__menugroup",children:[d&&(0,VC.jsx)(dm,{blocks:d}),(0,VC.jsx)(She,{stylesToRender:s,activeStyle:a,onSelect:i,onHoverStyle:n})]})}var m9=c(G(),1),Rhe=c(F(),1),TL=c(fe(),1);var Md=c(H(),1);var Che=c(F(),1),Ehe=c(ce(),1);var xhe=c(ce(),1),p9=(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=p9(s,t,o);if(a)return a}}},whe=(e,t)=>{let o=(0,xhe.getBlockAttributesNamesByRole)(e,"content");return o?.length?o.reduce((r,n)=>(t[n]&&(r[n]=t[n]),r),{}):t};var VUe=(e,t)=>{let o=whe(t.name,t.attributes);e.attributes={...e.attributes,...o}},FUe=(e,t)=>{let o=t.map(n=>(0,Ehe.cloneBlock)(n)),r=new Set;for(let n of e){let i=!1;for(let s of o){let a=p9(s,n.name,r);if(a){i=!0,r.add(a.clientId),VUe(a,n);break}}if(!i)return}return o},zUe=(e,t)=>(0,Che.useMemo)(()=>e.reduce((o,r)=>{let n=FUe(t,r.blocks);return n&&o.push({...r,transformedBlocks:n}),o},[]),[e,t]),The=zUe;var zn=c(E(),1);function jUe({blocks:e,patterns:t,onSelect:o}){let[r,n]=(0,Rhe.useState)(!1),i=The(t,e);return i.length?(0,zn.jsxs)(Md.MenuGroup,{className:"block-editor-block-switcher__pattern__transforms__menugroup",children:[r&&(0,zn.jsx)(HUe,{patterns:i,onSelect:o}),(0,zn.jsx)(Md.MenuItem,{onClick:s=>{s.preventDefault(),n(!r)},icon:rn,children:(0,m9.__)("Patterns")})]}):null}function HUe({patterns:e,onSelect:t}){let o=(0,TL.useViewportMatch)("medium","<");return(0,zn.jsx)("div",{className:"block-editor-block-switcher__popover-preview-container",children:(0,zn.jsx)(Md.Popover,{className:"block-editor-block-switcher__popover-preview",placement:o?"bottom":"right-start",offset:16,children:(0,zn.jsx)("div",{className:"block-editor-block-switcher__preview is-pattern-list-preview",children:(0,zn.jsx)(UUe,{patterns:e,onSelect:t})})})})}function UUe({patterns:e,onSelect:t}){return(0,zn.jsx)(Md.Composite,{role:"listbox",className:"block-editor-block-switcher__preview-patterns-container","aria-label":(0,m9.__)("Patterns list"),children:e.map(o=>(0,zn.jsx)(Bhe,{pattern:o,onSelect:t},o.name))})}function Bhe({pattern:e,onSelect:t}){let o="block-editor-block-switcher__preview-patterns-container",r=(0,TL.useInstanceId)(Bhe,`${o}-list__item-description`);return(0,zn.jsxs)("div",{className:`${o}-list__list-item`,children:[(0,zn.jsxs)(Md.Composite.Item,{render:(0,zn.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,zn.jsx)(us,{blocks:e.transformedBlocks,viewportWidth:e.viewportWidth||500}),(0,zn.jsx)("div",{className:`${o}-list__item-title`,children:e.title})]}),!!e.description&&(0,zn.jsx)(pt,{id:r,children:e.description})]})}var Phe=jUe;var Xs=c(E(),1);function GUe({onClose:e,clientIds:t}){let{replaceBlocks:o,multiSelect:r,updateBlockAttributes:n}=(0,RL.useDispatch)(C),{possibleBlockTransformations:i,patterns:s,blocks:a,isUsingBindings:l,canRemove:u,hasBlockStyles:d}=(0,RL.useSelect)(T=>{let{getBlockAttributes:B,getBlocksByClientId:R,getBlockRootClientId:A,getBlockTransformItems:O,__experimentalGetPatternTransformItems:P,canRemoveBlocks:L,getBlockName:M}=T(C),{getBlockStyles:z}=T(fm.store),V=A(t[0]),I=R(t),N=t.length===1,D=N&&M(t[0]),j=N&&!!z(D)?.length;return{blocks:I,possibleBlockTransformations:O(I,V),patterns:P(I,V),isUsingBindings:t.every(Y=>!!B(Y)?.metadata?.bindings),canRemove:L(t),hasBlockStyles:j}},[t]),f=mhe({clientIds:t,blocks:a});function p(T){T.length>1&&r(T[0].clientId,T[T.length-1].clientId)}function g(T,B){let R=(0,fm.switchToBlockType)(a,T,B);o(t,R),p(R)}function m(T){n(a[0].clientId,{...f.find(({name:B})=>B===T).attributes})}function h(T){o(t,T),p(T)}let b=a.length===1,v=b&&((0,fm.isTemplatePart)(a[0])||(0,fm.isReusableBlock)(a[0])),y=!!i?.length&&u&&!v,k=!!f?.length,S=!!s?.length&&u,_=y||k;if(!(d||_||S))return(0,Xs.jsx)("p",{className:"block-editor-block-switcher__no-transforms",children:(0,su.__)("No transforms.")});let w=b?(0,su._x)("This block is connected.","block toolbar button label and description"):(0,su._x)("These blocks are connected.","block toolbar button label and description");return(0,Xs.jsxs)("div",{className:"block-editor-block-switcher__container",children:[S&&(0,Xs.jsx)(Phe,{blocks:a,patterns:s,onSelect:T=>{h(T),e()}}),_&&(0,Xs.jsx)(yhe,{className:"block-editor-block-switcher__transforms__menugroup",possibleBlockTransformations:i,possibleBlockVariationTransformations:f,blocks:a,onSelect:(T,B)=>{g(T,B),e()},onSelectVariation:T=>{m(T),e()}}),d&&(0,Xs.jsx)(EL,{hoveredBlock:a[0],onSwitch:e}),l&&(0,Xs.jsx)(au.MenuGroup,{children:(0,Xs.jsx)(au.__experimentalText,{className:"block-editor-block-switcher__binding-indicator",children:w})})]})}var WUe=({children:e,clientIds:t,label:o,text:r})=>{let i=t.length===1?(0,su.__)("Change block type or style"):(0,su.sprintf)((0,su._n)("Change type of %d block","Change type of %d blocks",t.length),t.length);return(0,Xs.jsx)(au.ToolbarGroup,{children:(0,Xs.jsx)(au.ToolbarItem,{children:s=>(0,Xs.jsx)(au.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,Xs.jsx)(GUe,{onClose:a,clientIds:t})})})})},Ihe=WUe;var Ohe=c(G(),1),ok=c(H(),1);var tk=c(E(),1);function Ahe({clientIds:e,children:t,label:o,text:r}){return(0,tk.jsx)(ok.ToolbarGroup,{children:(0,tk.jsx)(ok.ToolbarItem,{children:n=>(0,tk.jsx)(ok.DropdownMenu,{className:"block-editor-block-switcher",label:o,popoverProps:{placement:"bottom-start",className:"block-editor-block-switcher__popover"},icon:t,text:r,toggleProps:{description:(0,Ohe.__)("Change block style"),...n},menuProps:{orientation:"both"},children:({onClose:i})=>(0,tk.jsx)("div",{className:"block-editor-block-switcher__container",children:(0,tk.jsx)(EL,{hoveredBlock:{clientId:e[0]},onSwitch:i})})})})})}var rk=c(H(),1),FC=c(G(),1),BL=c(F(),1),Lhe=c(Z(),1);var Nd=c(E(),1);function $Ue({clientIds:e,blockTitle:t}){let o=(0,Lhe.useSelect)(i=>{let{getBlockAttributes:s}=i(C);return s(e?.[0])?.metadata?.name},[e]),r=e.length===1,n;return r&&o?n=(0,FC.sprintf)((0,FC.__)('This %1$s is editable using the "%2$s" override.'),t.toLowerCase(),o):n=(0,FC.__)("These blocks are editable using overrides."),(0,Nd.jsx)(rk.__experimentalText,{children:n})}function Mhe({icon:e,clientIds:t,blockTitle:o,label:r}){let[n,i]=(0,BL.useState)(!1),s=(0,BL.useRef)();return(0,Nd.jsxs)(Nd.Fragment,{children:[(0,Nd.jsx)(rk.ToolbarButton,{ref:s,className:"block-editor-block-toolbar__pattern-overrides-indicator",icon:e,label:r,onClick:()=>i(!n),"aria-expanded":n}),n&&(0,Nd.jsx)(rk.Popover,{anchor:s.current,onClose:()=>i(!1),placement:"bottom-start",offset:16,className:"block-editor-block-toolbar__pattern-overrides-popover",children:(0,Nd.jsx)($Ue,{clientIds:t,blockTitle:o})})]})}var nk=c(E(),1);function KUe({select:e,clientIds:t}){let{getBlockName:o,getBlockAttributes:r,getBlockParentsByBlockName:n,canRemoveBlocks:i,getTemplateLock:s,getBlockEditingMode:a,canEditBlock:l,isSectionBlock:u}=U(e(C)),{getBlockStyles:d}=e(zC.store),f=t.some(R=>s(R)==="contentOnly"),p=t.length===1,g=p&&o(t[0]),m=p&&!!d(g)?.length,h=t.some(R=>!!r(R)?.metadata?.patternName&&u(R)),b=t.every(R=>J_(r(R)?.metadata?.bindings)),v=t.every(R=>n(R,"core/block",!0).length>0),y=i(t),k=t.every(R=>l(R)),S=a(t[0]),_=S==="default",x=S==="contentOnly",T=!h&&_&&(m||y)&&!f&&k,B=b&&v;return T?"switcher":x&&m&&!b&&k?"styles-only":B?"pattern-overrides":"default"}function YUe({select:e,clientIds:t}){let{getBlockName:o,getBlockAttributes:r,getBlock:n,isSectionBlock:i}=U(e(C)),s=t.length===1,a=t[0],l=r(a);if(s&&l?.metadata?.patternName&&i(a))return Cc;let u=o(a),d=(0,zC.getBlockType)(u);if(s){let{getActiveBlockVariation:g}=e(zC.store);return g(u,l,void 0,n?.(a)?.innerContent)?.icon||d?.icon}let f=t.map(g=>o(g));return new Set(f).size===1?d?.icon:Bg}function zhe({clientIds:e,isSynced:t}){let{icon:o,showIconLabels:r,variant:n}=(0,Vhe.useSelect)(f=>({icon:YUe({select:f,clientIds:e}),showIconLabels:f(Fhe.store).get("core","showIconLabels"),variant:KUe({select:f,clientIds:e})}),[e]),i=On({clientId:e?.[0],maximumLength:35}),s=e.length===1,a=s&&t&&!r,l=s?i:(0,Dhe.__)("Multiple blocks selected"),u=a&&i?i:void 0,d=(0,nk.jsx)(Ct,{className:"block-editor-block-toolbar__block-icon",icon:o});return n==="switcher"?(0,nk.jsx)(Ihe,{clientIds:e,label:l,text:u,children:d}):n==="styles-only"?(0,nk.jsx)(Ahe,{clientIds:e,label:l,text:u,children:d}):n==="pattern-overrides"?(0,nk.jsx)(Mhe,{icon:d,clientIds:e,blockTitle:i,label:l}):(0,nk.jsx)(Nhe.ToolbarButton,{disabled:!0,className:"block-editor-block-toolbar__block-icon-button",title:l,icon:d,text:u})}var It=c(E(),1);function h9({hideDragHandle:e,focusOnMount:t,__experimentalInitialIndex:o,__experimentalOnIndexChange:r,variant:n="unstyled"}){let{blockClientId:i,blockClientIds:s,isDefaultEditingMode:a,blockType:l,toolbarKey:u,shouldShowVisualToolbar:d,showParentSelector:f,isUsingBindings:p,isSectionContainer:g,hasContentOnlyLocking:m,showShuffleButton:h,showSlots:b,showGroupButtons:v,showLockButtons:y,showBlockVisibilityButton:k,showSwitchSectionStyleButton:S,areSelectedBlocksHiddenOnViewport:_,showStyleStateSlot:x,canEdit:w}=(0,Hhe.useSelect)(V=>{let{canEditBlock:I}=V(C),{getBlockName:N,getBlockMode:D,getBlockParents:j,getSelectedBlockClientIds:Y,isBlockValid:X,getBlockEditingMode:ee,getBlockAttributes:J,getSettings:$,getTemplateLock:q,getParentSectionBlock:K,isZoomOut:Q,isSectionBlock:re,isBlockHiddenAtViewport:se,getSelectedBlockStyleState:te,isResponsiveEditing:ne}=U(V(C)),de=Y(),Se=de[0],Ee=j(Se),be=K(Se)??Ee[Ee.length-1],ge=N(be),he=(0,Dd.getBlockType)(ge),ye=ee(Se),_e=ye==="default",we=N(Se),ie=de.every(dt=>X(dt)),oe=de.every(dt=>D(dt)==="visual"),Ae=de.every(dt=>!!J(dt)?.metadata?.bindings),me=de.some(dt=>q(dt)==="contentOnly"),xe=Q(),nt=re(Se),ut=I(Se),it=ut&&(xe||nt),xt=$()?.[ga]?.toLowerCase()||"desktop",tt=de.length>0&&de.every(dt=>se(dt,xt)),$t=ne()&&Oi(te(Se));return{blockClientId:Se,blockClientIds:de,isDefaultEditingMode:_e,blockType:Se&&(0,Dd.getBlockType)(we),shouldShowVisualToolbar:ie&&oe,toolbarKey:`${Se}${be}`,showParentSelector:!xe&&he&&ye!=="contentOnly"&&ee(be)!=="disabled"&&(0,Dd.hasBlockSupport)(he,"__experimentalParentSelector",!0)&&de.length===1,isUsingBindings:Ae,isSectionContainer:nt,hasContentOnlyLocking:me,showShuffleButton:xe,showSlots:!xe&&!$t,showStyleStateSlot:!xe&&$t,showGroupButtons:!xe,showLockButtons:!xe,showBlockVisibilityButton:!xe,showSwitchSectionStyleButton:it,areSelectedBlocksHiddenOnViewport:tt,canEdit:ut}},[]),T=(0,g9.useRef)(null),B=(0,g9.useRef)(),R=US({ref:B}),A=!(0,Uhe.useViewportMatch)("medium","<");if(!uL())return null;let P=s.length>1,L=(0,Dd.isReusableBlock)(l)||(0,Dd.isTemplatePart)(l),M=W("block-editor-block-contextual-toolbar",{"has-parent":f}),z=W("block-editor-block-toolbar",{"is-synced":L,"is-connected":p});return(0,It.jsx)(ZS,{focusEditorOnEscape:!0,className:M,"aria-label":(0,jhe.__)("Block tools"),variant:n==="toolbar"?void 0:n,focusOnMount:t,__experimentalInitialIndex:o,__experimentalOnIndexChange:r,children:(0,It.jsxs)("div",{ref:T,className:z,children:[f&&!P&&A&&(0,It.jsx)(Pme,{}),(d||P)&&(0,It.jsx)("div",{ref:B,...R,children:(0,It.jsxs)(Ghe.ToolbarGroup,{className:"block-editor-block-toolbar__block-controls",children:[(0,It.jsx)(zhe,{clientIds:s,isSynced:L}),a&&k&&(0,It.jsx)(Jz,{clientIds:s}),!P&&a&&y&&(0,It.jsx)(ZU,{clientId:i}),(0,It.jsx)(A2,{clientIds:s,hideDragHandle:e})]})}),!_&&!m&&d&&P&&v&&(0,It.jsx)(WU,{}),!P&&w&&(0,It.jsx)(che,{clientId:s[0]}),!_&&h&&(0,It.jsx)(Qge,{clientId:s[0]}),!_&&S&&(0,It.jsx)(ahe,{clientId:s[0]}),!_&&d&&(0,It.jsxs)(It.Fragment,{children:[!g&&(0,It.jsxs)(It.Fragment,{children:[b&&(0,It.jsxs)(It.Fragment,{children:[(0,It.jsx)(Po.Slot,{group:"parent",className:"block-editor-block-toolbar__slot"}),(0,It.jsx)(Po.Slot,{group:"block",className:"block-editor-block-toolbar__slot"}),(0,It.jsx)(Po.Slot,{className:"block-editor-block-toolbar__slot"}),(0,It.jsx)(Po.Slot,{group:"inline",className:"block-editor-block-toolbar__slot"})]}),x&&(0,It.jsx)(Po.Slot,{group:"style-state",className:"block-editor-block-toolbar__slot"})]}),b&&(0,It.jsxs)(It.Fragment,{children:[(0,It.jsx)(Po.Slot,{group:"other",className:"block-editor-block-toolbar__slot"}),(0,It.jsx)(V2.Slot,{})]})]}),(0,It.jsx)(jge,{clientIds:s}),(0,It.jsx)(iL,{clientIds:s})]})},u)}function Whe({hideDragHandle:e,variant:t}){return(0,It.jsx)(h9,{hideDragHandle:e,variant:t,focusOnMount:void 0,__experimentalInitialIndex:void 0,__experimentalOnIndexChange:void 0})}var b9=c(E(),1);function Yhe({clientId:e,isTyping:t,__unstableContentRef:o}){let{capturingClientId:r,isInsertionPointVisible:n,lastClientId:i}=C2(e),s=(0,ik.useRef)();(0,ik.useEffect)(()=>{s.current=void 0},[e]);let{stopTyping:a}=(0,$he.useDispatch)(C),l=(0,ik.useRef)(!1);(0,Khe.useShortcut)("core/block-editor/focus-toolbar",()=>{l.current=!0,a(!0)}),(0,ik.useEffect)(()=>{l.current=!1});let u=r||e,d=w2({contentElement:o?.current,clientId:u});return!t&&(0,b9.jsx)(Yh,{clientId:u,bottomClientId:i,className:W("block-editor-block-list__block-popover",{"is-insertion-point-visible":n}),resize:!1,...d,__unstableContentRef:o,children:(0,b9.jsx)(h9,{focusOnMount:l.current,__experimentalInitialIndex:s.current,__experimentalOnIndexChange:f=>{s.current=f},variant:"toolbar"})})}var PL=c(Z(),1),IL=c(F(),1);var qhe=c(H(),1);var Zhe=c(G(),1),Xhe=c(E(),1);function qUe({onClick:e}){return(0,Xhe.jsx)(qhe.Button,{variant:"primary",icon:ha,size:"compact",className:W("block-editor-button-pattern-inserter__button","block-editor-block-tools__zoom-out-mode-inserter-button"),onClick:e,label:(0,Zhe._x)("Add pattern","Generic label for pattern inserter button")})}var Qhe=qUe;var y9=c(E(),1);function ZUe(){let[e,t]=(0,IL.useState)(!1),{hasSelection:o,blockOrder:r,setInserterIsOpened:n,sectionRootClientId:i,selectedBlockClientId:s,blockInsertionPoint:a,insertionPointVisible:l}=(0,PL.useSelect)(m=>{let{getSettings:h,getBlockOrder:b,getSelectionStart:v,getSelectedBlockClientId:y,getSectionRootClientId:k,getBlockInsertionPoint:S,isBlockInsertionPointVisible:_}=U(m(C)),x=k();return{hasSelection:!!v().clientId,blockOrder:b(x),sectionRootClientId:x,setInserterIsOpened:h().__experimentalSetIsInserterOpened,selectedBlockClientId:y(),blockInsertionPoint:S(),insertionPointVisible:_()}},[]),{showInsertionPoint:u}=U((0,PL.useDispatch)(C));if((0,IL.useEffect)(()=>{let m=setTimeout(()=>{t(!0)},500);return()=>{clearTimeout(m)}},[]),!e||!o)return null;let d=s,p=r.findIndex(m=>s===m)+1,g=r[p];return l&&a?.index===p?null:(0,y9.jsx)(QA,{previousClientId:d,nextClientId:g,children:(0,y9.jsx)(Qhe,{onClick:()=>{n({rootClientId:i,insertionIndex:p,tab:"patterns",category:"all"}),u(i,p,{operation:"insert"})}})})}var Jhe=ZUe;var ebe=c(Z(),1),tbe=c(ce(),1);function obe(){return(0,ebe.useSelect)(e=>{let{getSelectedBlockClientId:t,getFirstMultiSelectedBlockClientId:o,getBlock:r,getBlockMode:n,getSettings:i,isTyping:s,isBlockInterfaceHidden:a}=U(e(C)),l=t()||o(),u=r(l),d=!!l&&!!u,f=d&&(0,tbe.isUnmodifiedDefaultBlock)(u,"content")&&n(l)!=="html",p=l&&!s()&&f,g=!a()&&!i().hasFixedToolbar&&!p&&d&&!f;return{showEmptyBlockSideInserter:p,showBlockToolbarPopover:g}},[])}var Ka=c(E(),1);function XUe(e){let{getSelectedBlockClientId:t,getFirstMultiSelectedBlockClientId:o,getSettings:r,isTyping:n,isDragging:i,isZoomOut:s,getViewportModalClientIds:a}=U(e(C));return{clientId:t()||o(),hasFixedToolbar:r().hasFixedToolbar,isTyping:n(),isZoomOutMode:s(),isDragging:i(),viewportModalClientIds:a(),blockVisibilitySetting:e(C).getSettings().__experimentalFeatures?.blockVisibility?.allowEditing}}function jC({children:e,__unstableContentRef:t,...o}){let{clientId:r,hasFixedToolbar:n,isTyping:i,isZoomOutMode:s,isDragging:a,viewportModalClientIds:l,blockVisibilitySetting:u}=(0,sk.useSelect)(XUe,[]),d=(0,rbe.__unstableUseShortcutEventMatch)(),{getBlocksByClientId:f,getSelectedBlockClientIds:p,getBlockRootClientId:g,getBlockEditingMode:m,getBlockName:h,isGroupable:b,getEditedContentOnlySection:v,canEditBlock:y}=U((0,sk.useSelect)(C)),{getGroupingBlockName:k}=(0,sk.useSelect)(ak.store),{showEmptyBlockSideInserter:S,showBlockToolbarPopover:_}=obe(),x=GS(),[w,T]=(0,OL.useState)(null),{canRename:B}=db(h(p()[0])),{duplicateBlocks:R,removeBlocks:A,replaceBlocks:O,insertAfterBlock:P,insertBeforeBlock:L,selectBlock:M,moveBlocksUp:z,moveBlocksDown:V,expandBlock:I,stopEditingContentOnlySection:N,showViewportModal:D,hideViewportModal:j}=U((0,sk.useDispatch)(C));function Y(J){if(!J.defaultPrevented){if(d("core/block-editor/move-up",J)||d("core/block-editor/move-down",J)){let $=p();if($.length){J.preventDefault();let q=g($[0]);(d("core/block-editor/move-up",J)?"up":"down")==="up"?z($,q):V($,q);let Q=Array.isArray($)?$.length:1,re=(0,lk.sprintf)((0,lk._n)("%d block moved.","%d blocks moved.",$.length),Q);(0,k9.speak)(re)}}else if(d("core/block-editor/duplicate",J)){let $=p();$.length&&(J.preventDefault(),R($))}else if(d("core/block-editor/remove",J)){let $=p();$.length&&(J.preventDefault(),A($))}else if(d("core/block-editor/paste-styles",J)){let $=p();if($.length){J.preventDefault();let q=f($);x(q)}}else if(d("core/block-editor/insert-after",J)){let $=p();$.length&&(J.preventDefault(),P($[$.length-1]))}else if(d("core/block-editor/insert-before",J)){let $=p();$.length&&(J.preventDefault(),L($[0]))}else if(d("core/block-editor/unselect",J)){if(J.target.closest("[role=toolbar]"))return;let $=p();$.length>1&&(J.preventDefault(),M($[0]))}else if(d("core/block-editor/collapse-list-view",J)){if((0,v9.isTextField)(J.target)||(0,v9.isTextField)(J.target?.contentWindow?.document?.activeElement))return;J.preventDefault(),I(r)}else if(d("core/block-editor/group",J)){let $=p();if($.length>1&&b($)){J.preventDefault();let q=f($),K=k(),Q=(0,ak.switchToBlockType)(q,K);O($,Q),(0,k9.speak)((0,lk.__)("Selected blocks are grouped."))}}else if(d("core/block-editor/rename",J)){let $=p();if($.length===1){let q=m($[0])==="contentOnly";B&&!q&&y($[0])&&(J.preventDefault(),T($[0]))}}else if(d("core/block-editor/toggle-block-visibility",J)){if(u===!1)return;let $=p();if($.length){if(J.preventDefault(),!f($).every(Q=>(0,ak.hasBlockSupport)(Q.name,"visibility",!0))||$.some(Q=>m(Q)!=="default"||!y(Q)))return;D($)}}d("core/block-editor/stop-editing-as-blocks",J)&&v()&&N()}}let X=Kh(t),ee=Kh(t);return(0,Ka.jsxs)("div",{...o,onKeyDown:Y,className:W(o.className,{"block-editor-block-tools--is-dragging":a}),children:[(0,Ka.jsxs)(NS.Provider,{value:(0,OL.useRef)(!1),children:[!i&&!s&&(0,Ka.jsx)(Zfe,{__unstableContentRef:t}),S&&(0,Ka.jsx)(pme,{__unstableContentRef:t,clientId:r}),_&&(0,Ka.jsx)(Yhe,{__unstableContentRef:t,clientId:r,isTyping:i}),!s&&!n&&(0,Ka.jsx)(S9.Popover.Slot,{name:"block-toolbar",ref:X}),e,(0,Ka.jsx)(S9.Popover.Slot,{name:"__unstable-block-tools-after",ref:ee}),s&&!a&&(0,Ka.jsx)(Jhe,{__unstableContentRef:t})]}),w&&(0,Ka.jsx)(cb,{clientId:w,onClose:()=>T(null)}),l&&(0,Ka.jsx)(qz,{clientIds:l,onClose:j})]})}var HC=c(fe(),1),ck=c(Z(),1),_9=c(Et(),1),ci=c(oo(),1);var nbe=c(E(),1),QUe=new Set([ci.UP,ci.RIGHT,ci.DOWN,ci.LEFT,ci.ENTER,ci.BACKSPACE]);function JUe(e){let{keyCode:t,shiftKey:o}=e;return!o&&QUe.has(t)}function UC(){let e=(0,ck.useSelect)(o=>o(C).isTyping(),[]),{stopTyping:t}=(0,ck.useDispatch)(C);return(0,HC.useRefEffect)(o=>{if(!e)return;let{ownerDocument:r}=o,n,i;function s(a){let{clientX:l,clientY:u}=a;n&&i&&(n!==l||i!==u)&&t(),n=l,i=u}return r.addEventListener("mousemove",s),()=>{r.removeEventListener("mousemove",s)}},[e,t])}function GC(){let e=(0,ck.useSelect)(i=>i(C).isTyping(),[]),{startTyping:t,stopTyping:o}=(0,ck.useDispatch)(C),r=UC(),n=(0,HC.useRefEffect)(i=>{if(e){let d=function(h){let{target:b}=h;g=m.setTimeout(()=>{(0,_9.isTextField)(b)||o()})},f=function(h){let{keyCode:b}=h;(b===ci.ESCAPE||b===ci.TAB)&&o()},p=function(){m.getSelection().isCollapsed||o()};var s=d,a=f,l=p;let g,{defaultView:m}=i.ownerDocument;return i.addEventListener("focus",d),i.addEventListener("keydown",f),i.ownerDocument.addEventListener("selectionchange",p),()=>{m.clearTimeout(g),i.removeEventListener("focus",d),i.removeEventListener("keydown",f),i.ownerDocument.removeEventListener("selectionchange",p)}}function u(d){let{type:f,target:p}=d;!(0,_9.isTextField)(p)||!i.contains(p)||f==="keydown"&&!JUe(d)||t()}return i.addEventListener("keypress",u),i.addEventListener("keydown",u),()=>{i.removeEventListener("keypress",u),i.removeEventListener("keydown",u)}},[e,t,o]);return(0,HC.useMergeRefs)([r,n])}function e9e({children:e}){return(0,nbe.jsx)("div",{ref:GC(),children:e})}var ibe=e9e;var Ya=c(G(),1),lu=c(ce(),1),Vd=c(Z(),1),x9=c(abe(),1);var t9e=()=>function(){let{replaceBlocks:t,multiSelect:o}=(0,Vd.useDispatch)(C),{blocks:r,clientIds:n,canRemove:i,possibleBlockTransformations:s,invalidSelection:a}=(0,Vd.useSelect)(g=>{let{getBlockRootClientId:m,getBlockTransformItems:h,getSelectedBlockClientIds:b,getBlocksByClientId:v,canRemoveBlocks:y}=g(C),k=b(),S=v(k);if(S.filter(x=>!x).length>0)return{invalidSelection:!0};let _=m(k[0]);return{blocks:S,clientIds:k,possibleBlockTransformations:h(S,_),canRemove:y(k),invalidSelection:!1}},[]);if(a)return{isLoading:!1,commands:[]};let l=r.length===1&&(0,lu.isTemplatePart)(r[0]);function u(g){g.length>1&&o(g[0].clientId,g[g.length-1].clientId)}function d(g,m){let h=(0,lu.switchToBlockType)(r,g,m);t(n,h),u(h)}let f=!!s.length&&i&&!l;return!n||n.length<1||!f?{isLoading:!1,commands:[]}:{isLoading:!1,commands:s.map(g=>{let{id:m,name:h,title:b,icon:v,variationName:y}=g,k=!v?.src||v?.src==="block-default"?{src:lx}:v;return{name:"core/block-editor/transform-to-"+(m||h).replace(/\//g,"-"),label:(0,Ya.sprintf)((0,Ya.__)("Transform to %s"),b),icon:k?.src,category:"command",callback:({close:S})=>{d(h,y),S()}}})}},o9e=()=>function(){let{clientIds:t,isUngroupable:o,isGroupable:r,blockVisibilitySetting:n}=(0,Vd.useSelect)(L=>{let{getSelectedBlockClientIds:M,getSettings:z,isUngroupable:V,isGroupable:I}=L(C);return{clientIds:M(),isUngroupable:V(),isGroupable:I(),blockVisibilitySetting:z().__experimentalFeatures?.blockVisibility?.allowEditing}},[]),{canInsertBlockType:i,getBlockRootClientId:s,getBlocksByClientId:a,canRemoveBlocks:l,isBlockHiddenAnywhere:u}=U((0,Vd.useSelect)(C)),{getBlockEditingMode:d}=(0,Vd.useSelect)(C),{getDefaultBlockName:f,getGroupingBlockName:p}=(0,Vd.useSelect)(lu.store),g=a(t),m=(0,Vd.useDispatch)(C),{removeBlocks:h,replaceBlocks:b,duplicateBlocks:v,insertAfterBlock:y,insertBeforeBlock:k}=m,S=()=>{if(!g.length)return;let L=p(),M=(0,lu.switchToBlockType)(g,L);M&&b(t,M)},_=()=>{if(!g.length)return;let L=g[0].innerBlocks;L.length&&b(t,L)};if(!t||t.length<1)return{isLoading:!1,commands:[]};let{showViewportModal:x}=U(m),w=s(t[0]),T=i(f(),w),B=g.every(L=>!!L&&(0,lu.hasBlockSupport)(L.name,"multiple",!0)&&i(L.name,w)),R=l(t),A=[];B&&A.push({name:"duplicate",label:(0,Ya.__)("Duplicate"),callback:()=>v(t,!0),icon:Bg}),T&&A.push({name:"add-before",label:(0,Ya.__)("Add before"),callback:()=>{let L=Array.isArray(t)?t[0]:L;k(L)},icon:ha},{name:"add-after",label:(0,Ya.__)("Add after"),callback:()=>{let L=Array.isArray(t)?t[t.length-1]:L;y(L)},icon:ha}),r&&A.push({name:"Group",label:(0,Ya.__)("Group"),callback:S,icon:px}),o&&A.push({name:"ungroup",label:(0,Ya.__)("Ungroup"),callback:_,icon:W4}),R&&A.push({name:"remove",label:(0,Ya.__)("Delete"),callback:()=>h(t,!0),icon:U4});let O=g.every(L=>!!L&&(0,lu.hasBlockSupport)(L.name,"visibility",!0)),P=t.every(L=>d(L)==="default");if(O&&P&&n!==!1){let L=t.some(M=>u(M));A.push({name:"toggle-visibility",label:L?(0,Ya.__)("Show"):(0,Ya.__)("Hide"),callback:()=>x(t),icon:L?Vg:vl})}return{isLoading:!1,commands:A.map(L=>({...L,name:"core/block-editor/action-"+L.name,category:"command",callback:({close:M})=>{L.callback(),M()}}))}},AL=()=>{(0,x9.useCommandLoader)({name:"core/block-editor/blockTransforms",hook:t9e()}),(0,x9.useCommandLoader)({name:"core/block-editor/blockQuickActions",hook:o9e(),context:"block-selection-edit"})};var Mi=c(E(),1),LL=(0,dbe.createSlotFill)(Symbol("BlockCanvasCover"));function lbe({children:e}){return(0,Mi.jsx)("div",{className:"block-canvas-cover",style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",pointerEvents:"none"},children:e})}var r9e={ignoredSelectors:[/\.editor-styles-wrapper/gi]};function w9({shouldIframe:e=!0,height:t="300px",children:o=(0,Mi.jsx)(dS,{}),styles:r,contentRef:n,iframeProps:i}){AL();let s=(0,ML.useViewportMatch)("medium","<"),a=UC(),l=qh(),u=(0,cbe.useRef)(),d=(0,ML.useMergeRefs)([n,l,u,GC()]),f=(0,ube.useSelect)(g=>U(g(C)).getZoomLevel(),[]),p=f!==100&&!s?{scale:f,frameSize:"40px"}:{};return e?(0,Mi.jsx)(jC,{__unstableContentRef:u,style:{height:t,display:"flex"},children:(0,Mi.jsxs)(rS,{...i,...p,ref:a,contentRef:d,style:{...i?.style},name:"editor-canvas",children:[(0,Mi.jsx)(LL.Slot,{fillProps:{containerRef:u},children:g=>g.map((m,h)=>(0,Mi.jsx)(lbe,{children:m},h))}),(0,Mi.jsx)(gd,{styles:r}),o]})}):(0,Mi.jsxs)(jC,{__unstableContentRef:u,style:{height:t,display:"flex"},children:[(0,Mi.jsx)(LL.Slot,{fillProps:{containerRef:u},children:g=>g.map((m,h)=>(0,Mi.jsx)(lbe,{children:m},h))}),(0,Mi.jsx)(gd,{styles:r,scope:":where(.editor-styles-wrapper)",transformOptions:r9e}),(0,Mi.jsx)(qO,{ref:d,className:"editor-styles-wrapper",tabIndex:-1,style:{height:"100%",width:"100%",overflow:"auto"},children:o})]})}function n9e({children:e,height:t,styles:o}){return(0,Mi.jsx)(w9,{height:t,styles:o,children:e})}var fbe=n9e;var cu=c(H(),1),pbe=c(G(),1),mbe=c(oo(),1),gbe=c(Tt(),1),qa=c(E(),1),i9e=()=>(0,qa.jsx)(cu.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:(0,qa.jsx)(cu.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"})}),s9e=({style:e,className:t})=>(0,qa.jsx)("div",{className:"block-library-colors-selector__icon-container",children:(0,qa.jsx)("div",{className:`${t} block-library-colors-selector__state-selection`,style:e,children:(0,qa.jsx)(i9e,{})})}),a9e=({TextColor:e,BackgroundColor:t})=>function({onToggle:r,isOpen:n}){let i=s=>{!n&&s.keyCode===mbe.DOWN&&(s.preventDefault(),r())};return(0,qa.jsx)(cu.ToolbarGroup,{children:(0,qa.jsx)(cu.ToolbarButton,{className:"components-toolbar__control block-library-colors-selector__toggle",label:(0,pbe.__)("Open Colors Selector"),onClick:r,onKeyDown:i,icon:(0,qa.jsx)(t,{children:(0,qa.jsx)(e,{children:(0,qa.jsx)(s9e,{})})})})})},l9e=({children:e,...t})=>((0,gbe.default)("wp.blockEditor.BlockColorsStyleSelector",{alternative:"block supports API",since:"6.1",version:"6.3"}),(0,qa.jsx)(cu.Dropdown,{popoverProps:{placement:"bottom-start"},className:"block-library-colors-selector",contentClassName:"block-library-colors-selector__popover",renderToggle:a9e(t),renderContent:()=>e})),hbe=l9e;var _ye=c(Tt(),1),XL=c(H(),1),P9=c(G(),1),xye=c(Z(),1),wye=c(F(),1);var bk=c(fe(),1),vye=c(H(),1);var KC=c(Z(),1),Sye=c(Tt(),1),Dr=c(F(),1),B9=c(G(),1);var WL=c(H(),1),$L=c(F(),1),KL=c(Z(),1);var ybe=c(fe(),1),vbe=c(Kr(),1),Sbe=c(Z(),1),zL=c(F(),1),uk=c(G(),1);var NL=c(F(),1),DL=(0,NL.createContext)({});DL.displayName="ListViewContext";var pm=()=>(0,NL.useContext)(DL);var VL=c(F(),1),bbe=c(E(),1);function FL({children:e,...t}){let o=(0,VL.useRef)();return(0,VL.useEffect)(()=>{o.current&&(o.current.textContent=o.current.textContent)},[e]),(0,bbe.jsx)("div",{hidden:!0,...t,ref:o,children:e})}var WC=c(E(),1),C9=(0,zL.forwardRef)(({nestingLevel:e,blockCount:t,clientId:o,...r},n)=>{let{insertedBlock:i,setInsertedBlock:s}=pm(),a=(0,ybe.useInstanceId)(C9),{directInsert:l,hideInserter:u}=(0,Sbe.useSelect)(m=>{let{getBlockListSettings:h,getTemplateLock:b,isZoomOut:v}=U(m(C)),k=h(o)?.directInsert||!1,S=!!b(o)||v();return{directInsert:k,hideInserter:S}},[o]),d=On({clientId:o,context:"list-view"}),f=On({clientId:i?.clientId,context:"list-view"});if((0,zL.useEffect)(()=>{f?.length&&(0,vbe.speak)((0,uk.sprintf)((0,uk.__)("%s block inserted"),f),"assertive")},[f]),u)return null;let p=`list-view-appender__${a}`,g=(0,uk.sprintf)((0,uk.__)("Append to %1$s block at position %2$d, Level %3$d"),d,t+1,e);return(0,WC.jsxs)("div",{className:"list-view-appender",children:[(0,WC.jsx)(za,{ref:n,rootClientId:o,position:"bottom right",isAppender:!0,selectBlockOnInsert:!1,shouldDirectInsert:l,__experimentalIsQuick:!0,...r,toggleProps:{"aria-describedby":p},onSelectOrClose:m=>{m?.clientId&&s(m)}}),(0,WC.jsx)(FL,{id:p,children:g})]})});var gm=c(ce(),1),pb=c(H(),1),UL=c(fe(),1);var Nr=c(F(),1),pk=c(Z(),1),T9=c(G(),1),GL=c(oo(),1),Gbe=c(mC(),1),Wbe=c(Il(),1),$be=c(Kr(),1);var kbe=c(H(),1),_be=c(fe(),1),xbe=c(F(),1);var wbe=c(E(),1),c9e=yJ(kbe.__experimentalTreeGridRow),u9e=(0,xbe.forwardRef)(({isDragged:e,isSelected:t,position:o,level:r,rowCount:n,children:i,className:s,path:a,...l},u)=>{let d=bP({clientId:l["data-block"],enableAnimation:!0,triggerAnimationOnChange:a}),f=(0,_be.useMergeRefs)([u,d]);return(0,wbe.jsx)(c9e,{ref:f,className:W("block-editor-list-view-leaf",s),level:r,positionInSet:o,setSize:n,isExpanded:void 0,...l,children:i})}),Cbe=u9e;var Ebe=c(Et(),1),Tbe=c(F(),1);function Rbe({isSelected:e,selectedClientIds:t,rowItemRef:o}){let r=t.length===1;(0,Tbe.useLayoutEffect)(()=>{if(!e||!r||!o.current)return;let n=(0,Ebe.getScrollContainer)(o.current),{ownerDocument:i}=o.current;if(n===i.body||n===i.documentElement||!n)return;let a=o.current.getBoundingClientRect(),l=n.getBoundingClientRect();(a.top<l.top||a.bottom>l.bottom)&&o.current.scrollIntoView()},[e,r,o])}var Nbe=c(F(),1);var dk=c(H(),1),Lbe=c(F(),1);var HL=c(oo(),1);var Bbe=c(G(),1),E9=c(E(),1);function jL({onClick:e}){return(0,E9.jsx)("span",{className:"block-editor-list-view__expander",onClick:e?t=>e(t,{forceToggle:!0}):void 0,"aria-hidden":"true","data-testid":"list-view-expander",children:(0,E9.jsx)(ft,{icon:(0,Bbe.isRTL)()?cx:Df})})}var Pbe=c(F(),1),Ibe=c(Z(),1);var d9e=3,Obe={"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?Obe[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>=d9e)return t}return t}};function f9e(e,t){let o=Obe[e.name],r=o?o(e):void 0;return r?Array.isArray(r)?t?[]:r:[r]:[]}function Abe({clientId:e,isExpanded:t}){let{block:o}=(0,Ibe.useSelect)(n=>({block:n(C).getBlock(e)}),[e]);return(0,Pbe.useMemo)(()=>f9e(o,t),[o,t])}var Mr=c(E(),1),{Badge:p9e}=U(dk.privateApis);function m9e({className:e,block:{clientId:t},onClick:o,onContextMenu:r,onMouseDown:n,onToggleExpanded:i,tabIndex:s,onFocus:a,onDragStart:l,onDragEnd:u,draggable:d,isExpanded:f,ariaDescribedBy:p,visibilityLabel:g,isDisabled:m=!1},h){let b=Oo(t),v=On({clientId:t,context:"list-view"}),{isLocked:y}=Zs(t),k=y,S=b?.positionType==="sticky",_=Abe({clientId:t,isExpanded:f}),x=T=>{T.dataTransfer.clearData(),l?.(T)};function w(T){(T.keyCode===HL.ENTER||T.keyCode===HL.SPACE)&&o(T)}return(0,Mr.jsxs)("a",{className:W("block-editor-list-view-block-select-button",e),onClick:o,onContextMenu:r,onKeyDown:w,onMouseDown:n,ref:h,tabIndex:s,onFocus:a,onDragStart:x,onDragEnd:u,draggable:d,href:m?void 0:`#block-${t}`,"aria-disabled":m?!0:void 0,"aria-describedby":p,"aria-expanded":f,children:[(0,Mr.jsx)(jL,{onClick:i}),(0,Mr.jsx)(Ct,{icon:b?.icon,showColors:!0,context:"list-view"}),(0,Mr.jsxs)(dk.__experimentalHStack,{alignment:"center",className:"block-editor-list-view-block-select-button__label-wrapper",justify:"flex-start",spacing:1,children:[(0,Mr.jsx)("span",{className:"block-editor-list-view-block-select-button__title",children:(0,Mr.jsx)(dk.__experimentalTruncate,{ellipsizeMode:"auto",children:v})}),b?.anchor&&(0,Mr.jsx)("span",{className:"block-editor-list-view-block-select-button__anchor-wrapper",children:(0,Mr.jsx)(p9e,{className:"block-editor-list-view-block-select-button__anchor",children:b.anchor})}),S&&(0,Mr.jsx)("span",{className:"block-editor-list-view-block-select-button__sticky",children:(0,Mr.jsx)(ft,{icon:X3})}),_.length?(0,Mr.jsx)("span",{className:"block-editor-list-view-block-select-button__images","aria-hidden":!0,children:_.map((T,B)=>(0,Mr.jsx)("span",{className:"block-editor-list-view-block-select-button__image",style:{backgroundImage:`url(${T.url})`,zIndex:_.length-B}},T.clientId))}):null,!!g&&(0,Mr.jsxs)(vt.Root,{children:[(0,Mr.jsx)(vt.Trigger,{render:(0,Mr.jsx)("span",{className:"block-editor-list-view-block-select-button__block-visibility","aria-hidden":"true",children:(0,Mr.jsx)(ft,{icon:vl})})}),(0,Mr.jsx)(vt.Popup,{children:g})]}),k&&(0,Mr.jsx)("span",{className:"block-editor-list-view-block-select-button__lock",children:(0,Mr.jsx)(ft,{icon:U3})})]})]})}var Mbe=(0,Lbe.forwardRef)(m9e);var mm=c(E(),1),g9e=(0,Nbe.forwardRef)(({onClick:e,onToggleExpanded:t,block:o,isSelected:r,position:n,siblingBlockCount:i,level:s,isExpanded:a,selectedClientIds:l,...u},d)=>{let{clientId:f}=o,{AdditionalBlockContent:p,insertedBlock:g,setInsertedBlock:m}=pm(),h=l.includes(f)?l:[f];return(0,mm.jsxs)(mm.Fragment,{children:[p&&(0,mm.jsx)(p,{block:o,insertedBlock:g,setInsertedBlock:m}),(0,mm.jsx)(R2,{appendToOwnerDocument:!0,clientIds:h,cloneClassname:"block-editor-list-view-draggable-chip",children:({draggable:b,onDragStart:v,onDragEnd:y})=>(0,mm.jsx)(Mbe,{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:y,isExpanded:a,...u})})]})}),Dbe=g9e;var fb=c(G(),1),Vbe=c(Et(),1),Fbe=(e,t,o)=>(0,fb.sprintf)((0,fb.__)("Block %1$d of %2$d, Level %3$d."),e,t,o),zbe=(e,t)=>[e?.positionLabel?`${(0,fb.sprintf)((0,fb.__)("Position: %s"),e.positionLabel)}.`:void 0,t?(0,fb.__)("This block is locked."):void 0].filter(Boolean).join(" "),jbe=(e,t)=>Array.isArray(t)&&t.length?t.indexOf(e)!==-1:t===e;function Hbe(e,t,o,r){let n=[...o,e],i=[...r,t],s=Math.min(n.length,i.length)-1,a=n[s],l=i[s];return{start:a,end:l}}function fk(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&&Vbe.focus.focusable.find(r)?.[0]?.focus()})}function Ube({blockIndexes:e,blockDropTargetIndex:t,blockDropPosition:o,clientId:r,firstDraggedBlockIndex:n,isDragged:i}){let s,a,l;if(!i){a=!1;let u=e[r];l=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:l}}var kn=c(E(),1);function Kbe({block:{clientId:e},displacement:t,isAfterDraggedBlocks:o,isDragged:r,isNesting:n,isSelected:i,isBranchSelected:s,selectBlock:a,position:l,level:u,rowCount:d,siblingBlockCount:f,showBlockMovers:p,path:g,isExpanded:m,selectedClientIds:h,isSyncedBranch:b}){let v=(0,Nr.useRef)(null),y=(0,Nr.useRef)(null),k=(0,Nr.useRef)(null),[S,_]=(0,Nr.useState)(!1),[x,w]=(0,Nr.useState)(),[T,B]=(0,Nr.useState)(!1),{isLocked:R}=Zs(e),A=i&&h[0]===e,O=i&&h[h.length-1]===e,{toggleBlockHighlight:P,duplicateBlocks:L,multiSelect:M,replaceBlocks:z,removeBlocks:V,insertAfterBlock:I,insertBeforeBlock:N,showViewportModal:D,stopEditingContentOnlySection:j}=U((0,pk.useDispatch)(C)),Y=(0,UL.useDebounce)(P,50),{canInsertBlockType:X,getSelectedBlockClientIds:ee,getPreviousBlockClientId:J,getBlockRootClientId:$,getBlockOrder:q,getBlockParents:K,getBlockEditingMode:Q,getBlocksByClientId:re,canEditBlock:se,canMoveBlock:te,canRemoveBlocks:ne,isGroupable:de}=(0,pk.useSelect)(C),{getGroupingBlockName:Se}=(0,pk.useSelect)(gm.store),Ee=Oo(e),ve=GS(),{block:be,blockName:ge,blockEditingMode:he,allowRightClickOverrides:ye,editedSection:_e,viewportSettings:we,blockVisibilitySetting:ie}=(0,pk.useSelect)(Le=>{let{getBlock:zo,getBlockName:st,getBlockEditingMode:yo,getSettings:bi,getEditedContentOnlySection:Gr}=U(Le(C)),bl=bi();return{block:zo(e),blockName:st(e),blockEditingMode:yo(e),allowRightClickOverrides:bl.allowRightClickOverrides,editedSection:Gr(),viewportSettings:bl.__experimentalFeatures?.viewport,blockVisibilitySetting:bl.__experimentalFeatures?.blockVisibility?.allowEditing}},[e]),oe=he==="disabled",{canRename:Ae}=db(ge),me=(0,gm.hasBlockSupport)(ge,"__experimentalToolbar",!0),nt=`list-view-block-select-button__description-${(0,UL.useInstanceId)(Kbe)}`,{expand:ut,collapse:it,collapseAll:xt,BlockSettingsMenu:tt,listViewInstanceId:$t,expandedState:dt,setInsertedBlock:co,treeGridElementRef:at,rootClientId:Be}=pm(),Te=(0,Wbe.__unstableUseShortcutEventMatch)();function Ne(){let Le=ee(),zo=Le.includes(e),st=zo?Le[0]:e,yo=$(st);return{blocksToUpdate:zo?Le:[e],firstBlockClientId:st,firstBlockRootClientId:yo,selectedBlockClientIds:Le}}async function $e(Le){if(Le.defaultPrevented||Le.target.closest("[role=dialog]"))return;if(_e&&Te("core/block-editor/unselect",Le)){Le.stopPropagation(),Le.preventDefault(),j();return}let zo=[GL.BACKSPACE,GL.DELETE].includes(Le.keyCode);if(Te("core/block-editor/unselect",Le)&&h.length>0)Le.stopPropagation(),Le.preventDefault(),a(Le,void 0);else if(zo||Te("core/block-editor/remove",Le)){let{blocksToUpdate:st,firstBlockClientId:yo,firstBlockRootClientId:bi,selectedBlockClientIds:Gr}=Ne();if(!ne(st))return;let bl=J(yo)??bi;V(st,!1);let L5=Gr.length>0&&ee().length===0;bl||(bl=q()[0]),gt(bl,L5)}else if(Te("core/block-editor/paste-styles",Le)){Le.preventDefault();let{blocksToUpdate:st}=Ne(),yo=re(st);ve(yo)}else if(Te("core/block-editor/duplicate",Le)){Le.preventDefault();let{blocksToUpdate:st,firstBlockRootClientId:yo}=Ne();if(re(st).every(Gr=>!!Gr&&(0,gm.hasBlockSupport)(Gr.name,"multiple",!0)&&X(Gr.name,yo))){let Gr=await L(st,!1);Gr?.length&>(Gr[0],!1)}}else if(Te("core/block-editor/insert-before",Le)){Le.preventDefault();let{blocksToUpdate:st}=Ne();await N(st[0]);let yo=ee();gt(yo[0],!1)}else if(Te("core/block-editor/insert-after",Le)){Le.preventDefault();let{blocksToUpdate:st}=Ne();await I(st.at(-1));let yo=ee();gt(yo[0],!1)}else if(Te("core/block-editor/select-all",Le)){Le.preventDefault();let{firstBlockRootClientId:st,selectedBlockClientIds:yo}=Ne(),bi=q(st);if(!bi.length)return;if((0,Gbe.isShallowEqual)(yo,bi)&&st&&st!==Be){gt(st,!0);return}M(bi[0],bi[bi.length-1],null)}else if(Te("core/block-editor/collapse-list-view",Le)){Le.preventDefault();let{firstBlockClientId:st}=Ne(),yo=K(st,!1);xt(),ut(yo)}else if(Te("core/block-editor/group",Le)){let{blocksToUpdate:st}=Ne();if(st.length>1&&de(st)){Le.preventDefault();let yo=re(st),bi=Se(),Gr=(0,gm.switchToBlockType)(yo,bi);z(st,Gr),(0,$be.speak)((0,T9.__)("Selected blocks are grouped."));let bl=ee();gt(bl[0],!1)}}else if(Te("core/block-editor/toggle-block-visibility",Le)){if(ie===!1)return;Le.preventDefault();let{blocksToUpdate:st}=Ne();if(!re(st).every(Gr=>(0,gm.hasBlockSupport)(Gr.name,"visibility",!0))||st.some(Gr=>Q(Gr)!=="default"))return;D(st)}else if(Te("core/block-editor/rename",Le)){let{blocksToUpdate:st}=Ne(),yo=Q(st[0])==="contentOnly";st.length===1&&Ae&&!yo&&(Le.preventDefault(),B(!0))}}let ot=(0,Nr.useCallback)(()=>{_(!0),Y(e,!0)},[e,_,Y]),Ot=(0,Nr.useCallback)(()=>{_(!1),Y(e,!1)},[e,_,Y]),At=(0,Nr.useCallback)(Le=>{let zo=Le?.detail===0;a(Le,e,zo?-1:null),Le.preventDefault()},[e,a]),gt=(0,Nr.useCallback)((Le,zo)=>{zo&&a(void 0,Le,null,null),fk(Le,at?.current)},[a,at]),Zo=(0,Nr.useCallback)(Le=>{Le.preventDefault(),Le.stopPropagation(),m===!0?it(e):m===!1&&ut(e)},[e,ut,it,m]),Kt=(0,Nr.useCallback)(Le=>{let{ownerDocument:zo}=k?.current||{};!zo||!zo.hasFocus()||me&&ye&&(k.current?.click(),w(new window.DOMRect(Le.clientX,Le.clientY,0,0)),Le.preventDefault())},[ye,k,me]),De=(0,Nr.useCallback)(Le=>{ye&&Le.button===2&&Le.preventDefault()},[ye]),wt=(0,Nr.useMemo)(()=>{let{ownerDocument:Le}=y?.current||{};if(!(!x||!Le))return{ownerDocument:Le,getBoundingClientRect(){return x}}},[x]),Fo=(0,Nr.useCallback)(()=>{w(void 0)},[w]);if(Rbe({isSelected:i,rowItemRef:y,selectedClientIds:h}),!be)return null;let qi=Fbe(l,f,u),Ze=zbe(Ee,R),ho=Yz(be?.attributes?.metadata?.blockVisibility,we),Ke=f>0,St=me&&!oe,bo=p&&Ke&&!oe,Xo=W("block-editor-list-view-block__mover-cell",{"is-visible":S||i}),wr=W("block-editor-list-view-block__menu-cell",{"is-visible":S||A}),fn;bo?fn=2:St||(fn=3);let tn=W({"is-selected":i,"is-first-selected":A,"is-last-selected":O,"is-branch-selected":s,"is-synced-branch":b,"is-dragging":r,"has-single-cell":!me,"is-synced":Ee?.isSynced,"is-draggable":te&&!oe,"is-displacement-normal":t==="normal","is-displacement-up":t==="up","is-displacement-down":t==="down","is-after-dragged-blocks":o,"is-nesting":n,"is-disabled":oe}),xc=h.includes(e)?h:[e],q_=Le=>oe?-1:i&&h.length===1?0:Le;return(0,kn.jsxs)(Cbe,{className:tn,isDragged:r,onKeyDown:$e,onMouseEnter:oe?void 0:ot,onMouseLeave:oe?void 0:Ot,onFocus:oe?void 0:ot,onBlur:oe?void 0:Ot,level:u,position:l,rowCount:d,path:g,id:`list-view-${$t}-block-${e}`,"data-block":e,"data-expanded":se?m:void 0,ref:y,children:[(0,kn.jsx)(pb.__experimentalTreeGridCell,{className:"block-editor-list-view-block__contents-cell",colSpan:fn,ref:v,"aria-selected":!!i,children:({ref:Le,tabIndex:zo,onFocus:st})=>(0,kn.jsxs)("div",{className:"block-editor-list-view-block__contents-container",children:[(0,kn.jsx)(Dbe,{block:be,onClick:At,onContextMenu:oe?void 0:Kt,onMouseDown:De,onToggleExpanded:oe?void 0:Zo,isSelected:i,position:l,siblingBlockCount:f,level:u,ref:Le,tabIndex:q_(zo),onFocus:st,isExpanded:se?m:void 0,selectedClientIds:h,ariaDescribedBy:nt,visibilityLabel:ho,isDisabled:oe}),(0,kn.jsx)(FL,{id:nt,children:[qi,Ze,ho].filter(Boolean).join(" ")})]})}),bo&&(0,kn.jsx)(kn.Fragment,{children:(0,kn.jsxs)(pb.__experimentalTreeGridCell,{className:Xo,withoutGridItem:!0,children:[(0,kn.jsx)(pb.__experimentalTreeGridItem,{children:({ref:Le,tabIndex:zo,onFocus:st})=>(0,kn.jsx)(I2,{orientation:"vertical",clientIds:[e],ref:Le,tabIndex:zo,onFocus:st})}),(0,kn.jsx)(pb.__experimentalTreeGridItem,{children:({ref:Le,tabIndex:zo,onFocus:st})=>(0,kn.jsx)(O2,{orientation:"vertical",clientIds:[e],ref:Le,tabIndex:zo,onFocus:st})})]})}),St&&tt&&(0,kn.jsx)(pb.__experimentalTreeGridCell,{className:wr,"aria-selected":!!i,ref:k,children:({ref:Le,tabIndex:zo,onFocus:st})=>(0,kn.jsx)(tt,{clientIds:xc,block:be,icon:Ls,label:(0,T9.__)("Options"),popoverProps:{anchor:wt},toggleProps:{ref:Le,className:"block-editor-list-view-block__menu",tabIndex:zo,onClick:Fo,onFocus:st,size:"small"},disableOpenOnArrowDown:!0,expand:ut,expandedState:dt,setInsertedBlock:co,__experimentalSelectBlock:gt,isContentOnlyListView:!!Be&&Q(Be)==="contentOnly"})}),T&&(0,kn.jsx)(cb,{clientId:e,onClose:()=>B(!1)})]})}var Ybe=(0,Nr.memo)(Kbe);var Qs=c(E(),1);function qbe(e,t,o,r){return o?.includes(e.clientId)?0:t[e.clientId]??r?1+e.innerBlocks.reduce(h9e(t,o,r),0):1}var h9e=(e,t,o)=>(r,n)=>t?.includes(n.clientId)?r:(e[n.clientId]??o)&&n.innerBlocks.length>0?r+qbe(n,e,t,o):r+1,b9e=()=>{};function Zbe(e){let{blocks:t,selectBlock:o=b9e,showBlockMovers:r,selectedClientIds:n,level:i=1,path:s="",isBranchSelected:a=!1,listPosition:l=0,fixedListWindow:u,isExpanded:d,parentId:f,shouldShowInnerBlocks:p=!0,isSyncedBranch:g=!1,showAppender:m=!0}=e,h=Oo(f),b=g||!!h?.isSynced,v=(0,KL.useSelect)(P=>f?P(C).canEditBlock(f):!0,[f]),{blockDropPosition:y,blockDropTargetIndex:k,firstDraggedBlockIndex:S,blockIndexes:_,expandedState:x,draggedClientIds:w}=pm(),T=(0,$L.useRef)();if(!v)return null;let B=m&&i===1,R=t.filter(Boolean),A=R.length,O=B?A+1:A;return T.current=l,(0,Qs.jsxs)(Qs.Fragment,{children:[R.map((P,L)=>{let{clientId:M,innerBlocks:z}=P;L>0&&(T.current+=qbe(R[L-1],x,w,d));let V=!!w?.includes(M),{displacement:I,isAfterDraggedBlocks:N,isNesting:D}=Ube({blockIndexes:_,blockDropTargetIndex:k,blockDropPosition:y,clientId:M,firstDraggedBlockIndex:S,isDragged:V}),{itemInView:j}=u,Y=j(T.current),X=L+1,ee=s.length>0?`${s}_${X}`:`${X}`,J=!!z?.length,$=J&&p?x[M]??d:void 0,q=jbe(M,n),K=a||q&&J,Q=V||Y||q&&M===n[0]||L===0||L===A-1;return(0,Qs.jsxs)(KL.AsyncModeProvider,{value:!q,children:[Q&&(0,Qs.jsx)(Ybe,{block:P,selectBlock:o,isSelected:q,isBranchSelected:K,isDragged:V,level:i,position:X,rowCount:O,siblingBlockCount:A,showBlockMovers:r,path:ee,isExpanded:V?!1:$,listPosition:T.current,selectedClientIds:n,isSyncedBranch:b,displacement:I,isAfterDraggedBlocks:N,isNesting:D}),!Q&&(0,Qs.jsx)("tr",{children:(0,Qs.jsx)("td",{className:"block-editor-list-view-placeholder"})}),J&&$&&!V&&(0,Qs.jsx)(Zbe,{parentId:M,blocks:z,selectBlock:o,showBlockMovers:r,level:i+1,path:ee,listPosition:T.current+1,fixedListWindow:u,isBranchSelected:K,selectedClientIds:n,isExpanded:d,isSyncedBranch:b})]},M)}),B&&(0,Qs.jsx)(WL.__experimentalTreeGridRow,{level:i,setSize:O,positionInSet:O,isExpanded:!0,children:(0,Qs.jsx)(WL.__experimentalTreeGridCell,{children:P=>(0,Qs.jsx)(C9,{clientId:f,nestingLevel:i,blockCount:A,...P})})})]})}var Xbe=(0,$L.memo)(Zbe);var mk=c(H(),1),YL=c(Et(),1),Fd=c(F(),1),R9=c(G(),1);var Za=c(E(),1);function Qbe({draggedBlockClientId:e,listViewRef:t,blockDropTarget:o}){let r=Oo(e),n=On({clientId:e,context:"list-view"}),{rootClientId:i,clientId:s,dropPosition:a}=o||{},[l,u]=(0,Fd.useMemo)(()=>{if(!t.current)return[];let y=i?t.current.querySelector(`[data-block="${i}"]`):void 0,k=s?t.current.querySelector(`[data-block="${s}"]`):void 0;return[y,k]},[t,i,s]),d=u||l,f=(0,R9.isRTL)(),p=(0,Fd.useCallback)((y,k)=>{if(!d)return 0;let S=d.offsetWidth,_=(0,YL.getScrollContainer)(d,"horizontal"),x=d.ownerDocument,w=_===x.body||_===x.documentElement;if(_&&!w){let T=_.getBoundingClientRect(),B=(0,R9.isRTL)()?T.right-y.right:y.left-T.left,R=_.clientWidth;if(R<S+B&&(S=R-B),!f&&y.left+k<T.left)return S-=T.left-y.left,S;if(f&&y.right-k>T.right)return S-=y.right-T.right,S}return S-k},[f,d]),g=(0,Fd.useMemo)(()=>{if(!d)return{};let y=d.getBoundingClientRect();return{width:p(y,0)}},[p,d]),m=(0,Fd.useMemo)(()=>{if(!d)return{};let y=(0,YL.getScrollContainer)(d),k=d.ownerDocument,S=y===k.body||y===k.documentElement;if(y&&!S){let _=y.getBoundingClientRect(),x=d.getBoundingClientRect(),w=f?_.right-x.right:x.left-_.left;if(!f&&_.left>x.left)return{transform:`translateX( ${w}px )`};if(f&&_.right<x.right)return{transform:`translateX( ${w*-1}px )`}}return{}},[f,d]),h=(0,Fd.useMemo)(()=>{if(!l)return 1;let y=parseInt(l.getAttribute("aria-level"),10);return y?y+1:1},[l]),b=(0,Fd.useMemo)(()=>d?d.classList.contains("is-branch-selected"):!1,[d]),v=(0,Fd.useMemo)(()=>{if(!(!d||!(a==="top"||a==="bottom"||a==="inside")))return{contextElement:d,getBoundingClientRect(){let k=d.getBoundingClientRect(),S=k.left,_=0,x=(0,YL.getScrollContainer)(d,"horizontal"),w=d.ownerDocument,T=x===w.body||x===w.documentElement;if(x&&!T){let A=x.getBoundingClientRect(),O=f?x.offsetWidth-x.clientWidth:0;S<A.left+O&&(S=A.left+O)}a==="top"?_=k.top-k.height*2:_=k.top;let B=p(k,0),R=k.height;return new window.DOMRect(S,_,B,R)}}},[d,a,p,f]);return d?(0,Za.jsx)(mk.Popover,{animate:!1,anchor:v,focusOnMount:!1,className:"block-editor-list-view-drop-indicator--preview",variant:"unstyled",flip:!1,resize:!0,children:(0,Za.jsx)("div",{style:g,className:W("block-editor-list-view-drop-indicator__line",{"block-editor-list-view-drop-indicator__line--darker":b}),children:(0,Za.jsxs)("div",{className:"block-editor-list-view-leaf","aria-level":h,children:[(0,Za.jsxs)("div",{className:W("block-editor-list-view-block-select-button","block-editor-list-view-block-contents"),style:m,children:[(0,Za.jsx)(jL,{onClick:()=>{}}),(0,Za.jsx)(Ct,{icon:r?.icon,showColors:!0,context:"list-view"}),(0,Za.jsx)(mk.__experimentalHStack,{alignment:"center",className:"block-editor-list-view-block-select-button__label-wrapper",justify:"flex-start",spacing:1,children:(0,Za.jsx)("span",{className:"block-editor-list-view-block-select-button__title",children:(0,Za.jsx)(mk.__experimentalTruncate,{ellipsizeMode:"auto",children:n})})})]}),(0,Za.jsx)("div",{className:"block-editor-list-view-block__menu-cell"})]})})}):null}var Jbe=c(Kr(),1),gk=c(G(),1),$C=c(Z(),1),eye=c(F(),1),Js=c(oo(),1),tye=c(ce(),1);function oye(){let{clearSelectedBlock:e,multiSelect:t,selectBlock:o}=(0,$C.useDispatch)(C),{getBlockName:r,getBlockParents:n,getBlockSelectionStart:i,getSelectedBlockClientIds:s,hasMultiSelection:a,hasSelectedBlock:l}=(0,$C.useSelect)(C),{getBlockType:u}=(0,$C.useSelect)(tye.store);return{updateBlockSelection:(0,eye.useCallback)(async(f,p,g,m)=>{if(!f?.shiftKey&&f?.keyCode!==Js.ESCAPE){o(p,m);return}f.preventDefault();let h=f.type==="keydown"&&f.keyCode===Js.ESCAPE,b=f.type==="keydown"&&(f.keyCode===Js.UP||f.keyCode===Js.DOWN||f.keyCode===Js.HOME||f.keyCode===Js.END);if(!b&&!l()&&!a()){o(p,null);return}let v=s(),y=[...n(p),p];if((h||b&&!v.some(x=>y.includes(x)))&&await e(),!h){let x=i(),w=p;b&&(!l()&&!a()&&(x=p),g&&(w=g));let T=n(x),B=n(w),{start:R,end:A}=Hbe(x,w,T,B);await t(R,A,null)}let k=s();if((f.keyCode===Js.HOME||f.keyCode===Js.END)&&k.length>1)return;let S=v.filter(x=>!k.includes(x)),_;if(S.length===1){let x=u(r(S[0]))?.title;x&&(_=(0,gk.sprintf)((0,gk.__)("%s deselected."),x))}else S.length>1&&(_=(0,gk.sprintf)((0,gk.__)("%s blocks deselected."),S.length));_&&(0,Jbe.speak)(_,"assertive")},[e,r,u,n,i,s,a,l,t,o])}}var rye=c(F(),1);function nye(e){return(0,rye.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 iye=c(Z(),1);function sye({blocks:e,rootClientId:t}){return(0,iye.useSelect)(o=>{let{getDraggedBlockClientIds:r,getSelectedBlockClientIds:n,getListViewClientIdsTree:i}=U(o(C));return{selectedClientIds:n(),draggedClientIds:r(),clientIdsTree:e??i(t)}},[e,t])}var aye=c(F(),1),lye=c(Z(),1);function cye({collapseAll:e,expand:t}){let{expandedBlock:o,getBlockParents:r}=(0,lye.useSelect)(n=>{let{getBlockParents:i,getExpandedBlock:s}=U(n(C));return{expandedBlock:s(),getBlockParents:i}},[]);(0,aye.useEffect)(()=>{if(o){let n=r(o,!1);e(),t(n)}},[e,t,o,r])}var uye=c(Z(),1),mb=c(F(),1),gb=c(fe(),1),dye=c(G(),1);var zd=24;function y9e(e,t,o=1,r=!1){let n=r?t.right-o*zd:t.left+o*zd;return r?e.x>n:e.x<n}function v9e(e,t,o=1,r=!1){let n=r?t.right-o*zd:t.left+o*zd,i=r?n-e.x:e.x-n,s=Math.round(i/zd);return Math.abs(s)}function S9e(e,t){let o=[],r=e;for(;r;)o.push({...r}),r=t.find(n=>n.clientId===r.rootClientId);return o}function fye(e,t){let o=e[t+1];return o&&o.isDraggedBlock?fye(e,t+1):o}function k9e(e,t,o=1,r=!1){let n=r?t.right-o*zd:t.left+o*zd;return(r?e.x<n-zd:e.x>n+zd)&&e.y<t.bottom}var _9e=["top","bottom"];function x9e(e,t,o=!1){let r,n,i,s,a;for(let f=0;f<e.length;f++){let p=e[f];if(p.isDraggedBlock)continue;let g=p.element.getBoundingClientRect(),[m,h]=Xh(t,g,_9e),b=s2(t,g);if(i===void 0||m<i||b){i=m;let v=e.indexOf(p),y=e[v-1];if(h==="top"&&y&&y.rootClientId===p.rootClientId&&!y.isDraggedBlock?(n=y,r="bottom",s=y.element.getBoundingClientRect(),a=v-1):(n=p,r=h,s=g,a=v),b)break}}if(!n)return;let l=S9e(n,e),u=r==="bottom";if(u&&n.canInsertDraggedBlocksAsChild&&(n.innerBlockCount>0&&n.isExpanded||k9e(t,s,l.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&&y9e(t,s,l.length,o)){let f=fye(e,a),p=n.nestingLevel,g=f?f.nestingLevel:1;if(p&&g){let m=v9e(t,s,l.length,o),h=Math.max(Math.min(m,p-g),0);if(l[h]){let b=n.blockIndex;if(l[h].nestingLevel===f?.nestingLevel)b=f?.blockIndex;else for(let v=a;v>=0;v--){let y=e[v];if(y.rootClientId===l[h].rootClientId){b=y.blockIndex+1;break}}return{rootClientId:l[h].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 w9e={leading:!1,trailing:!0};function pye({dropZoneElement:e,expandedState:t,setExpandedState:o}){let{getBlockRootClientId:r,getBlockIndex:n,getBlockCount:i,getDraggedBlockClientIds:s,canInsertBlocks:a}=(0,uye.useSelect)(C),[l,u]=(0,mb.useState)(),{rootClientId:d,blockIndex:f}=l||{},p=i2(d,f),g=(0,dye.isRTL)(),m=(0,gb.usePrevious)(d),h=(0,mb.useCallback)((S,_)=>{let{rootClientId:x}=_||{};x&&_?.dropPosition==="inside"&&!S[x]&&o({type:"expand",clientIds:[x]})},[o]),b=(0,gb.useThrottle)(h,500,w9e);(0,mb.useEffect)(()=>{if(l?.dropPosition!=="inside"||m!==l?.rootClientId){b.cancel();return}b(t,l)},[t,m,l,b]);let v=s(),y=(0,gb.useThrottle)((0,mb.useCallback)((S,_)=>{let x={x:S.clientX,y:S.clientY},w=!!v?.length,B=Array.from(_.querySelectorAll("[data-block]")).map(A=>{let O=A.dataset.block,P=A.dataset.expanded==="true",L=A.classList.contains("is-dragging"),M=parseInt(A.getAttribute("aria-level"),10),z=r(O);return{clientId:O,isExpanded:P,rootClientId:z,blockIndex:n(O),element:A,nestingLevel:M||void 0,isDraggedBlock:w?L:!1,innerBlockCount:i(O),canInsertDraggedBlocksAsSibling:w?a(v,z):!0,canInsertDraggedBlocksAsChild:w?a(v,O):!0}}),R=x9e(B,x,g);R&&u(R)},[a,v,i,n,r,g]),50);return{ref:(0,gb.__experimentalUseDropZone)({dropZoneElement:e,onDrop(S){y.cancel(),l&&p(S),u(void 0)},onDragLeave(){y.cancel(),u(null)},onDragOver(S){y(S,S.currentTarget)},onDragEnd(){y.cancel(),u(void 0)}}),target:l}}var qL=c(F(),1),mye=c(Z(),1);function gye({firstSelectedBlockClientId:e,setExpandedState:t}){let[o,r]=(0,qL.useState)(null),{selectedBlockParentClientIds:n}=(0,mye.useSelect)(i=>{let{getBlockParents:s}=i(C);return{selectedBlockParentClientIds:s(e,!1)}},[e]);return(0,qL.useEffect)(()=>{o!==e&&n?.length&&t({type:"expand",clientIds:n})},[e,n,o,t]),{setSelectedTreeId:r}}var hk=c(Z(),1),hye=c(fe(),1);function bye({selectBlock:e}){let t=(0,hk.useRegistry)(),{getBlockOrder:o,getBlockRootClientId:r,getBlocksByClientId:n,getPreviousBlockClientId:i,getSelectedBlockClientIds:s,getSettings:a,canInsertBlockType:l,canRemoveBlocks:u}=(0,hk.useSelect)(C),{flashBlock:d,removeBlocks:f,replaceBlocks:p,insertBlocks:g}=(0,hk.useDispatch)(C),m=eS();return(0,hye.useRefEffect)(h=>{function b(k,S){S&&e(void 0,k,null,null),fk(k,h)}function v(k){let S=s(),_=S.includes(k),x=_?S[0]:k,w=r(x);return{blocksToUpdate:_?S:[k],firstBlockClientId:x,firstBlockRootClientId:w,originallySelectedBlockClientIds:S}}function y(k){if(k.defaultPrevented||!h.contains(k.target.ownerDocument.activeElement))return;let _=k.target.ownerDocument.activeElement?.closest("[role=row]")?.dataset?.block;if(!_)return;let{blocksToUpdate:x,firstBlockClientId:w,firstBlockRootClientId:T,originallySelectedBlockClientIds:B}=v(_);if(x.length!==0){if(k.preventDefault(),k.type==="copy"||k.type==="cut"){x.length===1&&d(x[0]),m(k.type,x);let R=n(x);kP(k,R,t)}if(k.type==="cut"){if(!u(x))return;let R=i(w)??T;f(x,!1);let A=B.length>0&&s().length===0;R||(R=o()[0]),b(R,A)}else if(k.type==="paste"){let{__experimentalCanUserUseUnfilteredHTML:R}=a(),A=PJ(k,R);if(x.length===1){let[O]=x;if(A.every(P=>l(P.name,O))){g(A,void 0,O),b(A[0]?.clientId,!1);return}}p(x,A,A.length-1,-1),b(A[0]?.clientId,!1)}}}return h.ownerDocument.addEventListener("copy",y),h.ownerDocument.addEventListener("cut",y),h.ownerDocument.addEventListener("paste",y),()=>{h.ownerDocument.removeEventListener("copy",y),h.ownerDocument.removeEventListener("cut",y),h.ownerDocument.removeEventListener("paste",y)}},[])}var jd=c(E(),1),C9e=(e,t)=>t.type==="clear"?{}:Array.isArray(t.clientIds)?{...e,...t.clientIds.reduce((o,r)=>({...o,[r]:t.type==="expand"}),{})}:e,yye=32;function kye({id:e,blocks:t,dropZoneElement:o,showBlockMovers:r=!1,isExpanded:n=!1,showAppender:i=!1,blockSettingsMenu:s=t9,rootClientId:a,description:l,onSelect:u,additionalBlockContent:d},f){t&&(0,Sye.default)("`blocks` property in `wp.blockEditor.__experimentalListView`",{since:"6.3",alternative:"`rootClientId` property"});let p=(0,bk.useInstanceId)(kye),{clientIdsTree:g,draggedClientIds:m,selectedClientIds:h}=sye({blocks:t,rootClientId:a}),b=nye(g),{getBlock:v,getSelectedBlockClientIds:y}=(0,KC.useSelect)(C),{visibleBlockCount:k}=(0,KC.useSelect)(re=>{let{getGlobalBlockCount:se,getClientIdsOfDescendants:te}=re(C),ne=m?.length>0?te(m).length+1:0;return{visibleBlockCount:se()-ne}},[m]),{updateBlockSelection:S}=oye(),[_,x]=(0,Dr.useReducer)(C9e,{}),[w,T]=(0,Dr.useState)(null),{setSelectedTreeId:B}=gye({firstSelectedBlockClientId:h[0],setExpandedState:x}),R=(0,Dr.useCallback)((re,se,te)=>{S(re,se,null,te),B(se),u&&u(v(se))},[B,S,u,v]),{ref:A,target:O}=pye({dropZoneElement:o,expandedState:_,setExpandedState:x}),P=(0,Dr.useRef)(),L=bye({selectBlock:R}),M=(0,Dr.useCallback)(re=>{let[se]=y();se&&re&&fk(se,re)},[y]),z=(0,bk.useMergeRefs)([L,M,P,A,f]),V=(0,Dr.useCallback)(re=>{if(!re)return;let se=Array.isArray(re)?re:[re];x({type:"expand",clientIds:se})},[x]),I=(0,Dr.useCallback)(re=>{re&&x({type:"collapse",clientIds:[re]})},[x]),N=(0,Dr.useCallback)(()=>{x({type:"clear"})},[x]),D=(0,Dr.useCallback)(re=>{V(re?.dataset?.block)},[V]),j=(0,Dr.useCallback)(re=>{I(re?.dataset?.block)},[I]),Y=(0,Dr.useCallback)((re,se,te)=>{re.shiftKey&&S(re,se?.dataset?.block,te?.dataset?.block)},[S]);cye({collapseAll:N,expand:V});let X=m?.[0],{blockDropTargetIndex:ee,blockDropPosition:J,firstDraggedBlockIndex:$}=(0,Dr.useMemo)(()=>{let re,se;if(O?.clientId){let te=b[O.clientId];re=te===void 0||O?.dropPosition==="top"?te:te+1}else O===null&&(re=null);if(X){let te=b[X];se=te===void 0||O?.dropPosition==="top"?te:te+1}return{blockDropTargetIndex:re,blockDropPosition:O?.dropPosition,firstDraggedBlockIndex:se}},[O,b,X]),q=(0,Dr.useMemo)(()=>({blockDropPosition:J,blockDropTargetIndex:ee,blockIndexes:b,draggedClientIds:m,expandedState:_,expand:V,firstDraggedBlockIndex:$,collapse:I,collapseAll:N,BlockSettingsMenu:s,listViewInstanceId:p,AdditionalBlockContent:d,insertedBlock:w,setInsertedBlock:T,treeGridElementRef:P,rootClientId:a}),[J,ee,b,m,_,V,$,I,N,s,p,d,w,T,a]),[K]=(0,bk.__experimentalUseFixedWindowList)(P,yye,k,{expandedState:_,useWindowing:!0,windowOverscan:40});if(!g.length&&!i)return null;let Q=l&&`block-editor-list-view-description-${p}`;return(0,jd.jsxs)(KC.AsyncModeProvider,{value:!0,children:[(0,jd.jsx)(Qbe,{draggedBlockClientId:X,listViewRef:P,blockDropTarget:O}),l&&(0,jd.jsx)(pt,{id:Q,children:l}),(0,jd.jsx)(vye.__experimentalTreeGrid,{id:e,className:W("block-editor-list-view-tree",{"is-dragging":m?.length>0&&ee!==void 0}),"aria-label":(0,B9.__)("Block navigation structure"),ref:z,onCollapseRow:j,onExpandRow:D,onFocusRow:Y,applicationAriaLabel:(0,B9.__)("Block navigation structure"),"aria-describedby":Q,style:{"--wp-admin--list-view-dragged-items-height":m?.length?`${yye*(m.length-1)}px`:null},children:(0,jd.jsx)(DL.Provider,{value:q,children:(0,jd.jsx)(Xbe,{blocks:g,parentId:a,selectBlock:R,showBlockMovers:r,fixedListWindow:K,selectedClientIds:h,isExpanded:n,showAppender:i})})})]})}var YC=(0,Dr.forwardRef)(kye),ZL=(0,Dr.forwardRef)((e,t)=>(0,jd.jsx)(YC,{ref:t,...e,showAppender:!1,rootClientId:null,onSelect:null,additionalBlockContent:null,blockSettingsMenu:void 0}));var hm=c(E(),1);function E9e({isEnabled:e,onToggle:t,isOpen:o,innerRef:r,...n}){return(0,hm.jsx)(XL.Button,{__next40pxDefaultSize:!0,...n,ref:r,icon:Sx,"aria-expanded":o,"aria-haspopup":"true",onClick:e?t:void 0,label:(0,P9.__)("List view"),className:"block-editor-block-navigation","aria-disabled":!e})}function T9e({isDisabled:e,...t},o){(0,_ye.default)("wp.blockEditor.BlockNavigationDropdown",{since:"6.1",alternative:"wp.components.Dropdown and wp.blockEditor.ListView"});let n=(0,xye.useSelect)(i=>!!i(C).getBlockCount(),[])&&!e;return(0,hm.jsx)(XL.Dropdown,{contentClassName:"block-editor-block-navigation__popover",popoverProps:{placement:"bottom-start"},renderToggle:({isOpen:i,onToggle:s})=>(0,hm.jsx)(E9e,{...t,innerRef:o,isOpen:i,onToggle:s,isEnabled:n}),renderContent:()=>(0,hm.jsxs)("div",{className:"block-editor-block-navigation__container",children:[(0,hm.jsx)("p",{className:"block-editor-block-navigation__label",children:(0,P9.__)("List view")}),(0,hm.jsx)(ZL,{})]})})}var Cye=(0,wye.forwardRef)(T9e);var qC=c(F(),1),Tye=c(Z(),1),Rye=c(fe(),1),bm=c(H(),1),I9=c(G(),1);var Hd=c(E(),1),Eye=()=>{};function R9e({clientId:e,onSwitch:t=Eye,onHoverClassName:o=Eye}){let r=(0,Tye.useSelect)(_=>_(C).canEditBlock(e),[e]),{onSelect:n,stylesToRender:i,activeStyle:s,genericPreviewBlock:a,className:l}=QS({clientId:e,onSwitch:t}),[u,d]=(0,qC.useState)(null),[f,p]=(0,qC.useState)(null),g=fr(),m=(0,qC.useMemo)(()=>{if(!u||!a)return null;let _=lm(l,s,u);return[{...a,attributes:{...a.attributes||{},className:_}}]},[u,a,l,s]);if(!r||!i||i.length===0)return null;let h=(0,Rye.debounce)(d,250),b=_=>{n(_),o(null),d(null),h.cancel()},v=_=>{if(u===_){h.cancel();return}h(_),o(_?.name??null)},y=pL(i),k=()=>s?.name!==y?.name,S=()=>{b(y)};return(0,Hd.jsx)(bm.__experimentalToolsPanel,{label:(0,I9.__)("Styles"),resetAll:S,panelId:e,hasInnerWrapper:!0,dropdownMenuProps:g,children:(0,Hd.jsx)(bm.__experimentalToolsPanelItem,{hasValue:k,label:(0,I9.__)("Variation"),onDeselect:S,isShownByDefault:!0,panelId:e,children:(0,Hd.jsxs)("div",{ref:p,className:"block-editor-block-styles",children:[(0,Hd.jsx)("div",{className:"block-editor-block-styles__variants",children:i.map(_=>{let x=_.label||_.name;return(0,Hd.jsx)(bm.Button,{__next40pxDefaultSize:!0,className:W("block-editor-block-styles__item",{"is-active":s.name===_.name}),variant:"secondary",label:x,onMouseEnter:()=>v(_),onFocus:()=>v(_),onMouseLeave:()=>v(null),onBlur:()=>v(null),onClick:()=>b(_),"aria-current":s.name===_.name,children:(0,Hd.jsx)(bm.__experimentalTruncate,{numberOfLines:1,className:"block-editor-block-styles__item-text",children:x})},_.name)})}),m&&(0,Hd.jsx)(dm,{blocks:m,placement:"left-start",offset:34,anchor:f})]})})})}var yk=R9e;var Aye=c(H(),1),vk=c(G(),1);var Pye=c(H(),1),Iye=c(E(),1),Bye={0:Y3,1:l3,2:u3,3:f3,4:m3,5:h3,6:y3};function O9({level:e}){return Bye[e]?(0,Iye.jsx)(Pye.Icon,{icon:Bye[e]}):null}var QL=c(E(),1),Oye=[1,2,3,4,5,6],B9e={className:"block-library-heading-level-dropdown"};function Lye({options:e=Oye,value:t,onChange:o}){let r=e.filter(n=>n===0||Oye.includes(n)).sort((n,i)=>n-i);return(0,QL.jsx)(Aye.ToolbarDropdownMenu,{popoverProps:B9e,icon:(0,QL.jsx)(O9,{level:t}),label:(0,vk.__)("Change level"),controls:r.map(n=>{let i=n===t;return{icon:(0,QL.jsx)(O9,{level:n}),title:n===0?(0,vk.__)("Paragraph"):(0,vk.sprintf)((0,vk.__)("Heading %d"),n),isActive:i,onClick(){o(n)},role:"menuitemradio"}})})}var ZC=c(G(),1),XC=c(H(),1);var Ud=c(E(),1);function P9e({icon:e=N3,label:t=(0,ZC.__)("Choose variation"),instructions:o=(0,ZC.__)("Select a variation to start with:"),variations:r,onSelect:n,allowSkip:i}){let s=W("block-editor-block-variation-picker",{"has-many-variations":r.length>4});return(0,Ud.jsxs)(XC.Placeholder,{icon:e,label:t,instructions:o,className:s,children:[(0,Ud.jsx)("ul",{className:"block-editor-block-variation-picker__variations",role:"list","aria-label":(0,ZC.__)("Block variations"),children:r.map(a=>(0,Ud.jsxs)("li",{children:[(0,Ud.jsx)(XC.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,Ud.jsx)("span",{className:"block-editor-block-variation-picker__variation-label",children:a.title})]},a.name))}),i&&(0,Ud.jsx)("div",{className:"block-editor-block-variation-picker__skip",children:(0,Ud.jsx)(XC.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:()=>n(),children:(0,ZC.__)("Skip")})})]})}var Mye=P9e;var Fye=c(Z(),1),zye=c(ce(),1),L9=c(H(),1);var A9=c(F(),1),M9=c(fe(),1),jye=c(G(),1);var Gd=c(G(),1),Sk=c(H(),1);var ym={carousel:"carousel",grid:"grid"};var ea=c(E(),1),I9e=({onBlockPatternSelect:e})=>(0,ea.jsx)("div",{className:"block-editor-block-pattern-setup__actions",children:(0,ea.jsx)(Sk.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:e,children:(0,Gd.__)("Choose")})}),O9e=({handlePrevious:e,handleNext:t,activeSlide:o,totalSlides:r})=>(0,ea.jsxs)("div",{className:"block-editor-block-pattern-setup__navigation",children:[(0,ea.jsx)(Sk.Button,{size:"compact",icon:(0,Gd.isRTL)()?rn:yi,label:(0,Gd.__)("Previous pattern"),onClick:e,disabled:o===0,accessibleWhenDisabled:!0}),(0,ea.jsx)(Sk.Button,{size:"compact",icon:(0,Gd.isRTL)()?yi:rn,label:(0,Gd.__)("Next pattern"),onClick:t,disabled:o===r-1,accessibleWhenDisabled:!0})]}),A9e=({viewMode:e,setViewMode:t,handlePrevious:o,handleNext:r,activeSlide:n,totalSlides:i,onBlockPatternSelect:s})=>{let a=e===ym.carousel,l=(0,ea.jsxs)("div",{className:"block-editor-block-pattern-setup__display-controls",children:[(0,ea.jsx)(Sk.Button,{size:"compact",icon:Nx,label:(0,Gd.__)("Carousel view"),onClick:()=>t(ym.carousel),isPressed:a}),(0,ea.jsx)(Sk.Button,{size:"compact",icon:fx,label:(0,Gd.__)("Grid view"),onClick:()=>t(ym.grid),isPressed:e===ym.grid})]});return(0,ea.jsxs)("div",{className:"block-editor-block-pattern-setup__toolbar",children:[a&&(0,ea.jsx)(O9e,{handlePrevious:o,handleNext:r,activeSlide:n,totalSlides:i}),l,a&&(0,ea.jsx)(I9e,{onBlockPatternSelect:s})]})},Nye=A9e;var Dye=c(Z(),1);function L9e(e,t,o){return(0,Dye.useSelect)(r=>{let{getBlockRootClientId:n,getPatternsByBlockTypes:i,__experimentalGetAllowedPatterns:s}=r(C),a=n(e);return o?s(a).filter(o):i(t,a)},[e,t,o])}var Vye=L9e;var Go=c(E(),1),M9e=({viewMode:e,activeSlide:t,patterns:o,onBlockPatternSelect:r,showTitles:n})=>{let i="block-editor-block-pattern-setup__container";if(e===ym.carousel){let s=new Map([[t,"active-slide"],[t-1,"previous-slide"],[t+1,"next-slide"]]);return(0,Go.jsx)("div",{className:"block-editor-block-pattern-setup__carousel",children:(0,Go.jsx)("div",{className:i,children:(0,Go.jsx)("div",{className:"carousel-container",children:o.map((a,l)=>(0,Go.jsx)(Uye,{active:l===t,className:s.get(l)||"",pattern:a},a.name))})})})}return(0,Go.jsx)("div",{className:"block-editor-block-pattern-setup__grid",children:(0,Go.jsx)(L9.Composite,{role:"listbox",className:i,"aria-label":(0,jye.__)("Patterns list"),children:o.map(s=>(0,Go.jsx)(Hye,{pattern:s,onSelect:r,showTitles:n},s.name))})})};function Hye({pattern:e,onSelect:t,showTitles:o}){let r="block-editor-block-pattern-setup-list",{blocks:n,description:i,viewportWidth:s=700}=e,a=(0,M9.useInstanceId)(Hye,`${r}__item-description`);return(0,Go.jsx)("div",{className:`${r}__list-item`,children:(0,Go.jsxs)(L9.Composite.Item,{render:(0,Go.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,Go.jsx)(us,{blocks:n,viewportWidth:s}),o&&(0,Go.jsx)("div",{className:`${r}__item-title`,children:e.title}),!!i&&(0,Go.jsx)(pt,{id:a,children:i})]})})}function Uye({active:e,className:t,pattern:o,minHeight:r}){let{blocks:n,title:i,description:s}=o,a=(0,M9.useInstanceId)(Uye,"block-editor-block-pattern-setup-list__item-description");return(0,Go.jsxs)("div",{"aria-hidden":!e,role:"img",className:`pattern-slide ${t}`,"aria-label":i,"aria-describedby":s?a:void 0,children:[(0,Go.jsx)(us,{blocks:n,minHeight:r}),!!s&&(0,Go.jsx)(pt,{id:a,children:s})]})}var N9e=({clientId:e,blockName:t,filterPatternsFn:o,onBlockPatternSelect:r,initialViewMode:n=ym.carousel,showTitles:i=!1})=>{let[s,a]=(0,A9.useState)(n),[l,u]=(0,A9.useState)(0),{replaceBlock:d}=(0,Fye.useDispatch)(C),f=Vye(e,t,o);if(!f?.length)return null;let g=r||(m=>{let h=m.map(b=>(0,zye.cloneBlock)(b));d(e,h)});return(0,Go.jsx)(Go.Fragment,{children:(0,Go.jsxs)("div",{className:`block-editor-block-pattern-setup view-mode-${s}`,children:[(0,Go.jsx)(M9e,{viewMode:s,activeSlide:l,patterns:f,onBlockPatternSelect:g,showTitles:i}),(0,Go.jsx)(Nye,{viewMode:s,setViewMode:a,activeSlide:l,totalSlides:f.length,handleNext:()=>{u(m=>Math.min(m+1,f.length-1))},handlePrevious:()=>{u(m=>Math.max(m-1,0))},onBlockPatternSelect:()=>{g(f[l].blocks)}})]})})},Gye=N9e;var N9=c(ce(),1),Wd=c(G(),1),$d=c(H(),1);var JL=c(Z(),1),Wye=c(F(),1);var Vr=c(E(),1),{Menu:hb}=U($d.privateApis);function D9e({className:e,onSelectVariation:t,selectedValue:o,variations:r}){return(0,Vr.jsxs)("fieldset",{className:e,children:[(0,Vr.jsx)(pt,{render:(0,Vr.jsx)("legend",{}),children:(0,Wd.__)("Transform to variation")}),r.map(n=>(0,Vr.jsx)($d.Button,{__next40pxDefaultSize:!0,size:"compact",icon:(0,Vr.jsx)(Ct,{icon:n.icon,showColors:!0}),isPressed:o===n.name,label:o===n.name?n.title:(0,Wd.sprintf)((0,Wd.__)("Transform to %s"),n.title),onClick:()=>t(n.name),"aria-label":n.title,showTooltip:!0},n.name))]})}function V9e({className:e,onSelectVariation:t,selectedValue:o,variations:r}){return(0,Vr.jsx)("div",{className:e,children:(0,Vr.jsxs)(hb,{children:[(0,Vr.jsx)(hb.TriggerButton,{render:(0,Vr.jsx)($d.Button,{className:"block-editor-block-variation-transforms__button",__next40pxDefaultSize:!0,variant:"secondary",children:(0,Wd.__)("Transform to variation")})}),(0,Vr.jsx)(hb.Popover,{position:"bottom",children:(0,Vr.jsx)(hb.Group,{children:r.map(n=>(0,Vr.jsxs)(hb.RadioItem,{value:n.name,checked:o===n.name,onChange:()=>t(n.name),children:[(0,Vr.jsx)(hb.ItemLabel,{children:n.title}),n.description&&(0,Vr.jsx)(hb.ItemHelpText,{children:n.description})]},n.name))})})]})})}function F9e({className:e,onSelectVariation:t,selectedValue:o,variations:r}){return(0,Vr.jsx)("div",{className:e,children:(0,Vr.jsx)($d.__experimentalToggleGroupControl,{label:(0,Wd.__)("Transform to variation"),value:o,hideLabelFromVision:!0,onChange:t,children:r.map(n=>(0,Vr.jsx)($d.__experimentalToggleGroupControlOptionIcon,{icon:(0,Vr.jsx)(Ct,{icon:n.icon,showColors:!0}),value:n.name,label:o===n.name?n.title:(0,Wd.sprintf)((0,Wd.__)("Transform to %s"),n.title)},n.name))})})}function z9e({blockClientId:e}){let{updateBlockAttributes:t}=(0,JL.useDispatch)(C),{activeBlockVariation:o,variations:r,canEdit:n,isContentOnly:i,isSection:s}=(0,JL.useSelect)(m=>{let{getActiveBlockVariation:h,getBlockVariations:b}=m(N9.store),{getBlockName:v,getBlockAttributes:y,getBlockEditingMode:k,isSectionBlock:S}=U(m(C)),{canEditBlock:_}=m(C),x=e&&v(e),{hasContentRoleAttribute:w}=U(m(N9.store)),T=w(x);return{activeBlockVariation:h(x,y(e),"transform"),variations:x&&b(x,"transform"),canEdit:_(e),isContentOnly:k(e)==="contentOnly"&&!T,isSection:S(e)}},[e]),a=o?.name,l=(0,Wye.useMemo)(()=>{let m=new Set;return r?(r.forEach(h=>{h.icon&&m.add(h.icon?.src||h.icon)}),m.size===r.length):!1},[r]),u=m=>{t(e,{...r.find(({name:h})=>h===m).attributes})};if(!r?.length||!n||i||s)return null;let d="block-editor-block-variation-transforms",p=r.length>6?D9e:F9e;return(0,Vr.jsx)(l?p:V9e,{className:d,onSelectVariation:u,selectedValue:a,variations:r})}var eM=z9e;var bb=c(G(),1),tM=c(H(),1);var $ye=c(E(),1),D9={top:{icon:vx,title:(0,bb._x)("Align top","Block vertical alignment setting")},center:{icon:hx,title:(0,bb._x)("Align middle","Block vertical alignment setting")},bottom:{icon:gx,title:(0,bb._x)("Align bottom","Block vertical alignment setting")},stretch:{icon:yx,title:(0,bb._x)("Stretch to fill","Block vertical alignment setting")},"space-between":{icon:bx,title:(0,bb._x)("Space between","Block vertical alignment setting")}},j9e=["top","center","bottom"],H9e="top";function U9e({value:e,onChange:t,controls:o=j9e,isCollapsed:r=!0,isToolbar:n}){function i(d){return()=>t(e===d?void 0:d)}let s=D9[e],a=D9[H9e],l=n?tM.ToolbarGroup:tM.ToolbarDropdownMenu,u=n?{isCollapsed:r}:{};return(0,$ye.jsx)(l,{icon:s?s.icon:a.icon,label:(0,bb._x)("Change vertical alignment","Block vertical alignment setting label"),controls:o.map(d=>({...D9[d],isActive:e===d,role:r?"menuitemradio":void 0,onClick:i(d)})),...u})}var V9=U9e;var F9=c(E(),1),TB=e=>(0,F9.jsx)(V9,{...e,isToolbar:!1}),Kye=e=>(0,F9.jsx)(V9,{...e,isToolbar:!0});var ys=c(H(),1),QC=c(F(),1),iM=c(G(),1);var Yye=c(H(),1);var z9=c(G(),1),qye=c(E(),1);function Zye({isLinked:e,...t}){let o=e?(0,z9.__)("Unlink radii"):(0,z9.__)("Link radii");return(0,qye.jsx)(Yye.Button,{...t,className:"components-border-radius-control__linked-button",size:"small",icon:e?Ji:Qi,iconSize:24,label:o})}var Xye=c(H(),1);function G9e(e){return[...e].sort((o,r)=>e.filter(n=>n===r).length-e.filter(n=>n===o).length).shift()}function Qye(e={}){if(typeof e=="string")return e;let t=Object.values(e).map(a=>{let l=(0,Xye.__experimentalParseQuantityAndUnitFromRawValue)(a);return typeof a=="string"&&l[0]===void 0?[a,""]:l}),o=t.map(a=>a[0]??""),r=t.map(a=>a[1]),n=o.every(a=>a===o[0])?o[0]:"",i=G9e(r);return n===0||n?`${n}${i||""}`:void 0}function Jye(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 eve(e){return e?typeof e=="string"?!0:!!Object.values(e).filter(o=>!!o||o===0).length:!1}var Xa=c(H(),1),sve=c(fe(),1),Sm=c(G(),1);var yb=c(F(),1);var j9=24,tve=8,oM={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 vm=(e,t)=>e?.includes?e==="0"||e.includes(`var:preset|${t}|`):!1;function ove(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 rve(e,t,o){if(e===void 0)return 0;let r=parseFloat(e,10)===0?"0":ove(e,o),n=t.findIndex(i=>String(i.slug)===r);return n!==-1?n:NaN}function H9(e,t,o){if(!vm(e,o))return e;let r=parseFloat(e,10)===0?"0":ove(e,o);return t.find(i=>String(i.slug)===r)?.size}function nve(e,t,o){if(!e||vm(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 rM=c(H(),1);var ec=c(E(),1);function ive({allowNegativeOnDrag:e,ariaLabel:t,allPlaceholder:o,minValue:r,parsedQuantity:n,computedUnit:i,units:s,isMixed:a,step:l,max:u,showTooltip:d,value:f,minimumCustomValue:p,onCustomValueChange:g,onCustomValueSliderChange:m,onUnitChange:h,onMouseOut:b,onMouseOver:v,setMinValue:y}){let k=(0,ec.jsx)(rM.__experimentalUnitControl,{className:"preset-input-control__unit-control",disableUnits:a,hideLabelFromVision:!0,label:t,min:r,onChange:g,onUnitChange:h,onBlur:b,onFocus:v,onMouseOut:b,onMouseOver:v,units:s,value:[n,i].join(""),placeholder:o,onDragStart:()=>{e&&f?.charAt(0)==="-"&&y(0)},onDrag:()=>{e&&f?.charAt(0)==="-"&&y(0)},onDragEnd:()=>{e&&y(p)}}),S=d?(0,ec.jsxs)(vt.Root,{children:[(0,ec.jsx)(vt.Trigger,{render:(0,ec.jsx)("div",{className:"preset-input-control__tooltip-wrapper",children:k})}),(0,ec.jsx)(vt.Popup,{children:t})]}):k;return(0,ec.jsxs)(ec.Fragment,{children:[S,(0,ec.jsx)(rM.RangeControl,{className:"preset-input-control__custom-value-range",hideLabelFromVision:!0,initialPosition:0,label:t,max:u,min:0,onBlur:b,onChange:m,onFocus:v,onMouseOut:b,onMouseOver:v,step:l,value:n,withInputField:!1})]})}var km=c(E(),1);function vb({allowNegativeOnDrag:e=!1,ariaLabel:t,className:o,customValueSettings:r=oM,disableCustomValues:n,icon:i,isMixed:s,value:a,minimumCustomValue:l,onChange:u,onMouseOut:d,onMouseOver:f,onUnitChange:p,presets:g=[],presetType:m,selectedUnit:h,showTooltip:b,units:v}){let y=(0,yb.useMemo)(()=>nve(a,g,m),[a,g,m]),k=o??"preset-input-control",S=g.slice(1,g.length-1).map((K,Q)=>({value:Q+1,label:void 0})),_=S.length>0,x=g.length<=tve,w=s?(0,Sm.__)("Mixed"):null,[T,B]=(0,yb.useState)(l),[R,A]=(0,yb.useState)(!n&&y!==void 0&&!vm(y,m)),O=null,P=(0,sve.usePrevious)(y);(0,yb.useEffect)(()=>{y&&P!==y&&!vm(y,m)&&R!==!0&&A(!0)},[y,P,m,R]);let L=!x&&!R&&y!==void 0&&(!vm(y,m)||vm(y,m)&&s),M=g;L?(M=[...g,{name:s?(0,Sm.__)("Mixed"):(0,Sm.sprintf)((0,Sm.__)("Custom (%s)"),y),slug:"custom",size:y}],O=M.length-1):s||(O=R?H9(y,g,m):rve(y,g,m));let z=M.map((K,Q)=>({key:Q,name:K.name})),V=vm(y,m)?H9(y,g,m):y,[I,N]=(0,Xa.__experimentalParseQuantityAndUnitFromRawValue)(V),D=N||h||"px",j=v?.find(K=>K.value===D),Y=j?.step??r[D]?.steps??.1,X=j?.max??r[D]?.max??10,ee=K=>{if(K===void 0||K===""){u(void 0);return}isNaN(parseFloat(K))||u(K)},J=K=>{u([K,D].join(""))},$=K=>y===void 0?void 0:g[K]?.name,q=(K,Q)=>{let re=parseInt(K,10);if(Q==="selectList"){if(re===0&&g[0]?.slug==="0")return"0";if(re===0)return}else if(re===0)return"0";return`var:preset|${m}|${g[K]?.slug}`};return(0,km.jsxs)(Xa.__experimentalHStack,{className:`preset-input-control__wrapper ${k}__wrapper`,children:[i&&(0,km.jsx)(Xa.Icon,{className:"preset-input-control__icon",icon:i,size:j9}),(!_||R)&&(0,km.jsx)(ive,{allowNegativeOnDrag:e,ariaLabel:t,allPlaceholder:w,minValue:T,parsedQuantity:I,computedUnit:D,units:v,isMixed:s,step:Y,max:X,showTooltip:b,value:y,minimumCustomValue:l,onCustomValueChange:ee,onCustomValueSliderChange:J,onUnitChange:p,onMouseOut:d,onMouseOver:f,setMinValue:B}),_&&x&&!R&&(0,km.jsx)(Xa.RangeControl,{"aria-valuenow":O,"aria-valuetext":g[O]?.name,className:"preset-input-control__preset-range",hideLabelFromVision:!0,initialPosition:0,label:t,max:g.length-1,marks:S,min:0,onBlur:d,onChange:K=>u(q(K)),onFocus:f,onMouseDown:K=>{K?.nativeEvent?.offsetX<35&&y===void 0&&u("0")},onMouseOut:d,onMouseOver:f,renderTooltipContent:$,step:1,value:O,withInputField:!1}),_&&!x&&!R&&(0,km.jsx)(Xa.CustomSelectControl,{className:"preset-input-control__custom-select-control",hideLabelFromVision:!0,label:t,onBlur:d,onChange:K=>{L&&K.selectedItem.key===z.length-1?A(!0):u(q(K.selectedItem.key,"selectList"))},onFocus:f,onMouseOut:d,onMouseOver:f,options:z,value:z.find(K=>K.key===O)||""}),_&&!n&&(0,km.jsx)(Xa.Button,{className:"preset-input-control__custom-toggle",icon:b4,iconSize:j9,isPressed:R,label:R?(0,Sm.__)("Use preset"):(0,Sm.__)("Set custom value"),onClick:()=>{A(!R)},size:"small"})]})}var kk=c(G(),1);var ave=8,nM=[],U9={all:(0,kk.__)("Border radius"),topLeft:(0,kk.__)("Top left"),topRight:(0,kk.__)("Top right"),bottomLeft:(0,kk.__)("Bottom left"),bottomRight:(0,kk.__)("Bottom right")},G9={all:RF,topLeft:IF,topRight:OF,bottomLeft:BF,bottomRight:PF},W9=0;var Kd=c(E(),1);function W9e(e){let t=e?.default??nM,o=e?.custom??nM,r=e?.theme??nM;return(0,QC.useMemo)(()=>{let n=[{name:(0,iM.__)("None"),slug:"0",size:0},...o,...r,...t];return n.length>ave?[{name:(0,iM.__)("Default"),slug:"default",size:void 0},...n]:n},[o,r,t])}function lve(e,t){return t==="all"?Qye(e):typeof e=="string"?e:e?.[t]}function cve(e,t){return t==="all"?e.flat:e[t]}function uve(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 dve(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 sM({onChange:e,values:t,presets:o}){let[r,n]=(0,QC.useState)(!eve(t)||!Jye(t)),i=W9e(o),[s,a]=(0,QC.useState)({flat:typeof t=="string"?(0,ys.__experimentalParseQuantityAndUnitFromRawValue)(t)[1]:void 0,topLeft:(0,ys.__experimentalParseQuantityAndUnitFromRawValue)(t?.topLeft)[1],topRight:(0,ys.__experimentalParseQuantityAndUnitFromRawValue)(t?.topRight)[1],bottomLeft:(0,ys.__experimentalParseQuantityAndUnitFromRawValue)(t?.bottomLeft)[1],bottomRight:(0,ys.__experimentalParseQuantityAndUnitFromRawValue)(t?.bottomRight)[1]}),[l]=Me("spacing.units"),u=(0,ys.__experimentalUseCustomUnits)({availableUnits:l||["px","em","rem"]}),d=()=>n(!r);return(0,Kd.jsxs)("fieldset",{className:"components-border-radius-control",children:[(0,Kd.jsxs)(ys.__experimentalHStack,{className:"components-border-radius-control__header",children:[(0,Kd.jsx)(ys.BaseControl.VisualLabel,{as:"legend",children:(0,iM.__)("Radius")}),(0,Kd.jsx)(Zye,{onClick:d,isLinked:r})]}),r?(0,Kd.jsx)(vb,{ariaLabel:U9.all,className:"components-border-radius-control",icon:G9.all,minimumCustomValue:W9,onChange:uve("all",t,e),onUnitChange:dve("all",s,a),presets:i,presetType:"border-radius",selectedUnit:cve(s,"all"),showTooltip:!0,units:u,value:lve(t,"all")}):(0,Kd.jsx)(ys.__experimentalVStack,{children:["topLeft","topRight","bottomLeft","bottomRight"].map(f=>(0,Kd.jsx)(vb,{ariaLabel:U9[f],className:"components-border-radius-control",icon:G9[f],minimumCustomValue:W9,onChange:uve(f,t,e),onUnitChange:dve(f,s,a),presets:i,presetType:"border-radius",selectedUnit:cve(s,f),showTooltip:!0,units:u,value:lve(t,f)},f))})]})}var mve=c(H(),1);var fve=c(fe(),1);var pve=c(E(),1),aM=(0,fve.createHigherOrderComponent)(e=>function(o){let[r,n,i,s,a]=Me("color.palette.default","color.palette.theme","color.palette.custom","color.custom","color.defaultPalette"),l=a?[...n||[],...r||[],...i||[]]:[...n||[],...i||[]],{colors:u=l,disableCustomColors:d=!s}=o,f=u&&u.length>0||!d;return(0,pve.jsx)(e,{...o,colors:u,disableCustomColors:d,hasColorsToChoose:f})},"withColorContext");var gve=aM(mve.ColorPalette);var $9=c(G(),1),ta=c(H(),1);var Lo=c(E(),1),{Tabs:_k}=U(ta.privateApis),$9e=["colors","disableCustomColors","gradients","disableCustomGradients"],uu={color:"color",gradient:"gradient"};function hve({colors:e,gradients:t,disableCustomColors:o,disableCustomGradients:r,__experimentalIsRenderedInSidebar:n,className:i,label:s,onColorChange:a,onGradientChange:l,colorValue:u,colorSlug:d,gradientValue:f,clearable:p,showTitle:g=!0,enableAlpha:m,headingLevel:h,noticeProps:b}){let v=a&&(e&&e.length>0||!o),y=l&&(t&&t.length>0||!r);if(!v&&!y)return null;let S=(0,Lo.jsx)(ta.ColorPalette,{value:u,selectedSlug:d,onChange:y?(w,T,B)=>{a(w,B),l()}:(w,T,B)=>a(w,B),colors:e,disableCustomColors:o,__experimentalIsRenderedInSidebar:n,clearable:p,enableAlpha:m,headingLevel:h}),_={[uu.color]:(0,Lo.jsxs)(Lo.Fragment,{children:[S,b&&(0,Lo.jsx)(ta.Notice,{isDismissible:!1,...b})]}),[uu.gradient]:(0,Lo.jsx)(ta.GradientPicker,{value:f,onChange:v?w=>{l(w),a()}:l,gradients:t,disableCustomGradients:r,__experimentalIsRenderedInSidebar:n,clearable:p,headingLevel:h})},x=w=>(0,Lo.jsx)("div",{className:"block-editor-color-gradient-control__panel",children:_[w]});return(0,Lo.jsx)(ta.BaseControl,{className:W("block-editor-color-gradient-control",i),children:(0,Lo.jsx)("fieldset",{className:"block-editor-color-gradient-control__fieldset",children:(0,Lo.jsxs)(ta.__experimentalVStack,{spacing:1,children:[g&&(0,Lo.jsx)("legend",{children:(0,Lo.jsx)("div",{className:"block-editor-color-gradient-control__color-indicator",children:(0,Lo.jsx)(ta.BaseControl.VisualLabel,{children:s})})}),v&&y&&(0,Lo.jsx)("div",{children:(0,Lo.jsxs)(_k,{defaultTabId:f?uu.gradient:!!v&&uu.color,children:[(0,Lo.jsxs)(_k.TabList,{children:[(0,Lo.jsx)(_k.Tab,{tabId:uu.color,children:(0,$9.__)("Color")}),(0,Lo.jsx)(_k.Tab,{tabId:uu.gradient,children:(0,$9.__)("Gradient")})]}),(0,Lo.jsx)(_k.TabPanel,{tabId:uu.color,className:"block-editor-color-gradient-control__panel",focusable:!1,children:_.color}),(0,Lo.jsx)(_k.TabPanel,{tabId:uu.gradient,className:"block-editor-color-gradient-control__panel",focusable:!1,children:_.gradient})]})}),!y&&x(uu.color),!v&&x(uu.gradient)]})})})}function K9e(e){let[t,o,r,n]=Me("color.palette","color.gradients","color.custom","color.customGradient");return(0,Lo.jsx)(hve,{colors:t,gradients:o,disableCustomColors:!r,disableCustomGradients:!n,...e})}function Y9e(e){return $9e.every(t=>e.hasOwnProperty(t))?(0,Lo.jsx)(hve,{...e}):(0,Lo.jsx)(K9e,{...e})}var _m=Y9e;var bve=c(E(),1);function yve({onChange:e,value:t,...o}){return(0,bve.jsx)(_m,{...o,onColorChange:e,colorValue:t,gradients:[],disableCustomGradients:!0})}var tc=c(G(),1),vve=c(H(),1),Sve=c(Kr(),1),K9=c(E(),1);Rf([Bf,py]);function Y9({backgroundColor:e,fallbackBackgroundColor:t,fallbackTextColor:o,fallbackLinkColor:r,fontSize:n,isLargeText:i,textColor:s,linkColor:a,messageOverride:l,enableAlphaChecker:u=!1}){let d=e||t;if(!d)return null;let f=s||o,p=a||r;if(!f&&!p)return null;let g=[{color:f,description:(0,tc.__)("text color")},{color:p,description:(0,tc.__)("link color")}],m=Bo(d),h=m.alpha()<1,b=m.brightness(),v={level:"AA",size:i||i!==!1&&n>=24?"large":"small"},y="",k="";for(let S of g){if(!S.color)continue;let _=Bo(S.color),x=_.isReadable(m,v),w=_.alpha()<1;if(!x){if(h||w)continue;if(l){y=l,k=l;break}y=b<_.brightness()?(0,tc.sprintf)((0,tc.__)("This color combination may be hard for people to read. Try using a darker background color and/or a brighter %s."),S.description):(0,tc.sprintf)((0,tc.__)("This color combination may be hard for people to read. Try using a brighter background color and/or a darker %s."),S.description),k=(0,tc.__)("This color combination may be hard for people to read.");break}w&&u&&(y=(0,tc.__)("Transparent text may be hard for people to read."),k=(0,tc.__)("Transparent text may be hard for people to read."))}return y?{message:y,speakMessage:k}:null}function q9e(e){let t=Y9(e);return t?((0,Sve.speak)(t.speakMessage),(0,K9.jsx)("div",{className:"block-editor-contrast-checker",children:(0,K9.jsx)(vve.Notice,{spokenMessage:null,status:"warning",isDismissible:!1,children:t.message})})):null}var kve=q9e;var jn=c(G(),1),JC=c(du(),1),lM=c(F(),1),rc=c(H(),1);var oc=c(E(),1),xm=new Date;xm.setDate(20);xm.setMonth(xm.getMonth()-3);xm.getMonth()===4&&xm.setMonth(3);function xve({format:e,defaultFormat:t,onChange:o}){return(0,oc.jsxs)(rc.__experimentalVStack,{as:"fieldset",spacing:4,className:"block-editor-date-format-picker",children:[(0,oc.jsx)(pt,{render:(0,oc.jsx)("legend",{}),children:(0,jn.__)("Date format")}),(0,oc.jsx)(rc.ToggleControl,{label:(0,jn.__)("Default format"),help:`${(0,jn.__)("Example:")} ${(0,JC.dateI18n)(t,xm)}`,checked:!e,onChange:r=>o(r?null:t)}),e&&(0,oc.jsx)(Z9e,{format:e,onChange:o})]})}function Z9e({format:e,onChange:t}){let r=[...[...new Set(["Y-m-d",(0,jn._x)("n/j/Y","short date format"),(0,jn._x)("n/j/Y g:i A","short date format with time"),(0,jn._x)("M j, Y","medium date format"),(0,jn._x)("M j, Y g:i A","medium date format with time"),(0,jn._x)("F j, Y","long date format"),(0,jn._x)("M j","short date format without the year")])].map((a,l)=>({key:`suggested-${l}`,name:(0,JC.dateI18n)(a,xm),format:a})),{key:"human-diff",name:(0,JC.humanTimeDiff)(xm),format:"human-diff"}],n={key:"custom",name:(0,jn.__)("Custom"),className:"block-editor-date-format-picker__custom-format-select-control__custom-option",hint:(0,jn.__)("Enter your own date format")},[i,s]=(0,lM.useState)(()=>!!e&&!r.some(a=>a.format===e));return(0,oc.jsxs)(rc.__experimentalVStack,{children:[(0,oc.jsx)(rc.CustomSelectControl,{label:(0,jn.__)("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,oc.jsx)(rc.TextControl,{label:(0,jn.__)("Custom format"),hideLabelFromVision:!0,help:(0,lM.createInterpolateElement)((0,jn.__)("Enter a date or time <Link>format string</Link>."),{Link:(0,oc.jsx)(rc.ExternalLink,{href:(0,jn.__)("https://wordpress.org/documentation/article/customize-date-and-time-format/")})}),value:e,onChange:a=>t(a)})]})}var Qa=c(H(),1),eE=c(G(),1),wve=c(oo(),1);var Cve=c(fe(),1),fu=c(E(),1);function Eve({id:e,colorPalette:t,duotonePalette:o,disableCustomColors:r,disableCustomDuotone:n,value:i,onChange:s}){let a;i==="unset"?a=(0,fu.jsx)(Qa.ColorIndicator,{className:"block-editor-duotone-control__unset-indicator"}):i?a=(0,fu.jsx)(Qa.DuotoneSwatch,{values:i}):a=(0,fu.jsx)(ft,{icon:GF});let l=(0,eE.__)("Apply duotone filter"),d=`${(0,Cve.useInstanceId)(Eve,"duotone-control",e)}__description`;return(0,fu.jsx)(Qa.Dropdown,{popoverProps:{className:"block-editor-duotone-control__popover",headerTitle:(0,eE.__)("Duotone")},renderToggle:({isOpen:f,onToggle:p})=>(0,fu.jsx)(Qa.ToolbarButton,{showTooltip:!0,onClick:p,"aria-haspopup":"true","aria-expanded":f,onKeyDown:m=>{!f&&m.keyCode===wve.DOWN&&(m.preventDefault(),p())},label:l,icon:a}),renderContent:()=>(0,fu.jsxs)(Qa.MenuGroup,{label:(0,eE.__)("Duotone"),children:[(0,fu.jsx)("p",{children:(0,eE.__)("Create a two-tone color effect without losing your original image.")}),(0,fu.jsx)(Qa.DuotonePicker,{"aria-label":l,"aria-describedby":d,colorPalette:t,duotonePalette:o,disableCustomColors:r,disableCustomDuotone:n,value:i,onChange:s})]})})}var cM=Eve;var Pve=c(H(),1),Ive=c(F(),1),oa=c(G(),1);var _n=c(G(),1);var uM=c(G(),1);function Tve(e){if(!e)return{};if(typeof e=="object")return e;let t;switch(e){case"normal":t=(0,uM._x)("Regular","font style");break;case"italic":t=(0,uM._x)("Italic","font style");break;case"oblique":t=(0,uM._x)("Oblique","font style");break;default:t=e;break}return{name:t,value:e}}var nc=c(G(),1);function q9(e){if(!e)return{};if(typeof e=="object")return e;let t;switch(e){case"normal":case"400":t=(0,nc._x)("Regular","font weight");break;case"bold":case"700":t=(0,nc._x)("Bold","font weight");break;case"100":t=(0,nc._x)("Thin","font weight");break;case"200":t=(0,nc._x)("Extra Light","font weight");break;case"300":t=(0,nc._x)("Light","font weight");break;case"500":t=(0,nc._x)("Medium","font weight");break;case"600":t=(0,nc._x)("Semi Bold","font weight");break;case"800":t=(0,nc._x)("Extra Bold","font weight");break;case"900":t=(0,nc._x)("Black","font weight");break;case"1000":t=(0,nc._x)("Extra Black","font weight");break;default:t=e;break}return{name:t,value:e}}var Rve=[{name:(0,_n._x)("Regular","font style"),value:"normal"},{name:(0,_n._x)("Italic","font style"),value:"italic"}],Bve=[{name:(0,_n._x)("Thin","font weight"),value:"100"},{name:(0,_n._x)("Extra Light","font weight"),value:"200"},{name:(0,_n._x)("Light","font weight"),value:"300"},{name:(0,_n._x)("Regular","font weight"),value:"400"},{name:(0,_n._x)("Medium","font weight"),value:"500"},{name:(0,_n._x)("Semi Bold","font weight"),value:"600"},{name:(0,_n._x)("Bold","font weight"),value:"700"},{name:(0,_n._x)("Extra Bold","font weight"),value:"800"},{name:(0,_n._x)("Black","font weight"),value:"900"},{name:(0,_n._x)("Extra Black","font weight"),value:"1000"}];function xk(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(" "),f=parseInt(u.slice(0,1)),p=d==="1000"?10:parseInt(d.slice(0,1));for(let g=f;g<=p;g++){let m=`${g.toString()}00`;o.some(h=>h.value===m)||o.push(q9(m))}}let a=q9(typeof s.fontWeight=="number"?s.fontWeight.toString():s.fontWeight),l=Tve(s.fontStyle);l&&Object.keys(l).length&&(t.some(u=>u.value===l.value)||t.push(l)),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,_n._x)("Bold","font weight"),value:"700"}),t.some(s=>s.value==="italic")||t.push({name:(0,_n._x)("Italic","font style"),value:"italic"}),n&&(t=Rve,o=Bve),t=t.length===0?Rve:t,o=o.length===0?Bve:o,t.forEach(({name:s,value:a})=>{o.forEach(({name:l,value:u})=>{let d=a==="normal"?l:(0,_n.sprintf)((0,_n._x)("%1$s %2$s","font"),l??"",s??"");r.push({key:`${a}-${u}`,name:d??"",style:{fontStyle:a,fontWeight:u}})})}),{fontStyles:t,fontWeights:o,combinedStyleAndWeightOptions:r,isSystemFont:n,isVariableFont:i}}var Ove=c(E(),1),X9e=(e,t)=>e?t?(0,oa.__)("Appearance"):(0,oa.__)("Font style"):(0,oa.__)("Font weight");function dM(e){let{__next40pxDefaultSize:t,onChange:o,hasFontStyles:r=!0,hasFontWeights:n=!0,fontFamilyFaces:i,value:{fontStyle:s,fontWeight:a},...l}=e,u=r||n,d=X9e(r,n),f={key:"default",name:(0,oa.__)("Default"),style:{fontStyle:void 0,fontWeight:void 0}},{fontStyles:p,fontWeights:g,combinedStyleAndWeightOptions:m}=xk(i),h=()=>{let _=[f];return m&&_.push(...m),_},b=()=>{let _=[f];return p.forEach(({name:x,value:w})=>{_.push({key:w,name:x,style:{fontStyle:w,fontWeight:void 0}})}),_},v=()=>{let _=[f];return g.forEach(({name:x,value:w})=>{_.push({key:w,name:x,style:{fontStyle:void 0,fontWeight:w}})}),_},y=(0,Ive.useMemo)(()=>r&&n?h():r?b():v(),[e.options,p,g,m]),k=y.find(_=>_.style.fontStyle===s&&_.style.fontWeight===a)||y[0];return u&&(0,Ove.jsx)(Pve.CustomSelectControl,{...l,className:"components-font-appearance-control",label:d,describedBy:k?r?n?(0,oa.sprintf)((0,oa.__)("Currently selected font appearance: %s"),k.name):(0,oa.sprintf)((0,oa.__)("Currently selected font style: %s"),k.name):(0,oa.sprintf)((0,oa.__)("Currently selected font weight: %s"),k.name):(0,oa.__)("No selected font appearance"),options:y,value:k,onChange:({selectedItem:_})=>o(_.style)})}var Ave=c(H(),1),Z9=c(G(),1);var Lve=c(E(),1);function fM({__next40pxDefaultSize:e,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,Z9.__)("Default")},...r.map(({fontFamily:u,name:d})=>({key:u,name:d||u,style:{fontFamily:u}}))],l=a.find(u=>u.key===t)??"";return(0,Lve.jsx)(Ave.CustomSelectControl,{label:(0,Z9.__)("Font"),value:l,onChange:({selectedItem:u})=>o(u.key),options:a,className:W("block-editor-font-family-control",n),...i})}var pM=c(H(),1),Mve=c(G(),1);var Nve=c(E(),1);function mM({value:e,onChange:t,__unstableInputWidth:o="60px",...r}){let[n]=Me("spacing.units"),i=(0,pM.__experimentalUseCustomUnits)({availableUnits:n||["px","em","rem"],defaultValues:{px:2,em:.2,rem:.2}});return(0,Nve.jsx)(pM.__experimentalUnitControl,{...r,label:(0,Mve.__)("Letter spacing"),value:e,__unstableInputWidth:o,units:i,onChange:t})}var tE=c(G(),1),gM=c(H(),1),X9=c(E(),1),Q9e=[{label:(0,tE.__)("None"),value:"none",icon:Bn},{label:(0,tE.__)("Underline"),value:"underline",icon:QF},{label:(0,tE.__)("Strikethrough"),value:"line-through",icon:ZF}];function hM({value:e,onChange:t,className:o}){return(0,X9.jsx)(gM.__experimentalToggleGroupControl,{isDeselectable:!0,label:(0,tE.__)("Decoration"),className:W("block-editor-text-decoration-control",o),value:e,onChange:r=>{t(r===e?void 0:r)},children:Q9e.map(r=>(0,X9.jsx)(gM.__experimentalToggleGroupControlOptionIcon,{value:r.value,icon:r.icon,label:r.label},r.value))})}var wk=c(G(),1);var bM=c(H(),1),Q9=c(E(),1),J9e=[{label:(0,wk.__)("None"),value:"none",icon:Bn},{label:(0,wk.__)("Uppercase"),value:"uppercase",icon:e3},{label:(0,wk.__)("Lowercase"),value:"lowercase",icon:YF},{label:(0,wk.__)("Capitalize"),value:"capitalize",icon:$F}];function yM({className:e,value:t,onChange:o}){return(0,Q9.jsx)(bM.__experimentalToggleGroupControl,{isDeselectable:!0,label:(0,wk.__)("Letter case"),className:W("block-editor-text-transform-control",e),value:t,onChange:r=>{o(r===t?void 0:r)},children:J9e.map(r=>(0,Q9.jsx)(bM.__experimentalToggleGroupControlOptionIcon,{value:r.value,icon:r.icon,label:r.label},r.value))})}var Ck=c(G(),1);var vM=c(H(),1),J9=c(E(),1),eGe=[{label:(0,Ck.__)("Horizontal"),value:"horizontal-tb",icon:F4},{label:(0,Ck.__)("Vertical"),value:(0,Ck.isRTL)()?"vertical-lr":"vertical-rl",icon:j4}];function SM({className:e,value:t,onChange:o}){return(0,J9.jsx)(vM.__experimentalToggleGroupControl,{isDeselectable:!0,label:(0,Ck.__)("Orientation"),className:W("block-editor-writing-mode-control",e),value:t,onChange:r=>{o(r===t?void 0:r)},children:eGe.map(r=>(0,J9.jsx)(vM.__experimentalToggleGroupControlOptionIcon,{value:r.value,icon:r.icon,label:r.label},r.value))})}var Ni=c(H(),1),Dve=c(F(),1),Vve=c(G(),1);var an=c(E(),1),tGe=({setting:e,children:t,panelId:o,...r})=>{let n=()=>{e.colorValue?e.onColorChange():e.gradientValue&&e.onGradientChange()};return(0,an.jsx)(Ni.__experimentalToolsPanelItem,{hasValue:()=>!!e.colorValue||!!e.gradientValue,label:e.label,onDeselect:n,isShownByDefault:e.isShownByDefault!==void 0?e.isShownByDefault:!0,...r,className:W("block-editor-color-gradient-item","block-editor-tools-panel-color-gradient-settings__item"),panelId:o,resetAllFilter:e.resetAllFilter,children:t})},oGe=({colorValue:e,label:t})=>(0,an.jsxs)(Ni.__experimentalHStack,{justify:"flex-start",children:[(0,an.jsx)(Ni.ColorIndicator,{className:"block-editor-panel-color-gradient-settings__color-indicator",colorValue:e}),(0,an.jsx)(Ni.FlexItem,{className:"block-editor-panel-color-gradient-settings__color-name",title:t,children:t})]}),rGe=e=>function({onToggle:o,isOpen:r}){let{clearable:n,colorValue:i,gradientValue:s,onColorChange:a,onGradientChange:l,label:u}=e,d=(0,Dve.useRef)(void 0),f={onClick:o,className:W("block-editor-panel-color-gradient-settings__dropdown",{"is-open":r}),"aria-expanded":r,ref:d},p=()=>{i?a():s&&l()},g=i??s;return(0,an.jsxs)(an.Fragment,{children:[(0,an.jsx)(Ni.Button,{__next40pxDefaultSize:!0,...f,children:(0,an.jsx)(oGe,{colorValue:g,label:u})}),n&&g&&(0,an.jsx)(Ni.Button,{__next40pxDefaultSize:!0,label:(0,Vve.__)("Reset"),className:"block-editor-panel-color-gradient-settings__reset",size:"small",icon:Bn,onClick:()=>{p(),r&&o(),d.current?.focus()}})]})};function kM({colors:e,disableCustomColors:t,disableCustomGradients:o,enableAlpha:r,gradients:n,settings:i,__experimentalIsRenderedInSidebar:s,...a}){let l;return s&&(l={placement:"left-start",offset:36,shift:!0}),(0,an.jsx)(an.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},p={clearable:u.clearable,label:u.label,colorValue:u.colorValue,gradientValue:u.gradientValue,onColorChange:u.onColorChange,onGradientChange:u.onGradientChange};return u&&(0,an.jsx)(tGe,{setting:u,...a,children:(0,an.jsx)(Ni.Dropdown,{popoverProps:l,className:"block-editor-tools-panel-color-gradient-settings__dropdown",renderToggle:rGe(p),renderContent:()=>(0,an.jsx)(Ni.__experimentalDropdownContentWrapper,{paddingSize:"none",children:(0,an.jsx)("div",{className:"block-editor-panel-color-gradient-settings__dropdown-content",children:(0,an.jsx)(_m,{...f})})})})},d)})})}var _M=c(H(),1),Fve=c(Z(),1),zve=c(fe(),1);var eG=c(F(),1),Sb=c(G(),1);function wm(){let[e,t,o,r,n,i,s,a,l,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,eG.useMemo)(()=>{let f=[];return o&&o.length&&f.push({name:(0,Sb._x)("Theme","Indicates this palette comes from the theme."),slug:"theme",colors:o}),n&&r&&r.length&&f.push({name:(0,Sb._x)("Default","Indicates this palette comes from WordPress."),slug:"default",colors:r}),t&&t.length&&f.push({name:(0,Sb._x)("Custom","Indicates this palette is created by the user."),slug:"custom",colors:t}),f},[t,o,r,n]),d.gradients=(0,eG.useMemo)(()=>{let f=[];return a&&a.length&&f.push({name:(0,Sb._x)("Theme","Indicates this palette comes from the theme."),slug:"theme",gradients:a}),u&&l&&l.length&&f.push({name:(0,Sb._x)("Default","Indicates this palette comes from WordPress."),slug:"default",gradients:l}),s&&s.length&&f.push({name:(0,Sb._x)("Custom","Indicates this palette is created by the user."),slug:"custom",gradients:s}),f},[s,a,l,u]),d.hasColorsOrGradients=!!d.colors.length||!!d.gradients.length,d}var ic=c(E(),1),nGe=["colors","disableCustomColors","gradients","disableCustomGradients"],tG=({className:e,colors:t,gradients:o,disableCustomColors:r,disableCustomGradients:n,children:i,settings:s,title:a,showTitle:l=!0,__experimentalIsRenderedInSidebar:u,enableAlpha:d})=>{let f=(0,zve.useInstanceId)(tG),{batch:p}=(0,Fve.useRegistry)();return(!t||t.length===0)&&(!o||o.length===0)&&r&&n&&s?.every(g=>(!g.colors||g.colors.length===0)&&(!g.gradients||g.gradients.length===0)&&(g.disableCustomColors===void 0||g.disableCustomColors)&&(g.disableCustomGradients===void 0||g.disableCustomGradients))?null:(0,ic.jsxs)(_M.__experimentalToolsPanel,{className:W("block-editor-panel-color-gradient-settings",e),label:l?a:void 0,resetAll:()=>{p(()=>{s.forEach(({colorValue:g,gradientValue:m,onColorChange:h,onGradientChange:b})=>{g?h():m&&b()})})},panelId:f,__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last",children:[(0,ic.jsx)(kM,{settings:s,panelId:f,colors:t,gradients:o,disableCustomColors:r,disableCustomGradients:n,__experimentalIsRenderedInSidebar:u,enableAlpha:d}),!!i&&(0,ic.jsxs)(ic.Fragment,{children:[(0,ic.jsx)(_M.__experimentalSpacer,{marginY:4})," ",i]})]})},iGe=e=>{let t=wm();return(0,ic.jsx)(tG,{...t,...e})},sGe=e=>nGe.every(t=>e.hasOwnProperty(t))?(0,ic.jsx)(tG,{...e}):(0,ic.jsx)(iGe,{...e}),xM=sGe;var wM=c(F(),1),kb=c(H(),1),rG=c(G(),1);var oE=c(E(),1),oG=[],aGe={...oM,px:{max:1e3,steps:1},em:{max:50,steps:.1},rem:{max:50,steps:.1}};function lGe(e){let t=e?.default??oG,o=e?.custom??oG,r=e?.theme??oG;return(0,wM.useMemo)(()=>[{name:(0,rG.__)("None"),slug:"0",size:0},...o,...r,...t],[o,r,t])}function _b({label:e=(0,rG.__)("Dimension"),onChange:t,value:o,dimensionSizes:r}){let[n,i]=Me("dimensions.dimensionSizes","spacing.units"),s=r??n,a=(0,kb.__experimentalUseCustomUnits)({availableUnits:i||["%","px","em","rem","vh","vw"]}),l=lGe(s),[u,d]=(0,wM.useState)(()=>{let[,p]=(0,kb.__experimentalParseQuantityAndUnitFromRawValue)(o);return p||a[0]?.value||"px"}),f=p=>{let[g,m]=(0,kb.__experimentalParseQuantityAndUnitFromRawValue)(o);["em","rem"].includes(p)&&m==="px"?t((g/16).toFixed(2)+p):["em","rem"].includes(m)&&p==="px"?t(Math.round(g*16)+p):["%","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(p)&&g>100&&t(100+p),d(p)};return(0,oE.jsxs)("fieldset",{className:"block-editor-dimension-control",children:[(0,oE.jsx)(kb.BaseControl.VisualLabel,{as:"legend",children:e}),(0,oE.jsx)(vb,{ariaLabel:e,className:"block-editor-dimension-control",customValueSettings:aGe,minimumCustomValue:0,onChange:t,onUnitChange:f,presets:l,presetType:"dimension",selectedUnit:u,showTooltip:!0,units:a,value:o})]})}var Hve=c(F(),1),xn=c(H(),1),Uve=c(G(),1),Gve=c(Tt(),1);var pu=c(E(),1),jve={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 Wve({label:e=(0,Uve.__)("Height"),onChange:t,value:o}){(0,Gve.default)("wp.blockEditor.HeightControl",{since:"7.0",version:"7.2",alternative:"wp.blockEditor.DimensionControl"});let r=parseFloat(o),[n]=Me("spacing.units"),i=(0,xn.__experimentalUseCustomUnits)({availableUnits:n||["%","px","em","rem","vh","vw"]}),s=(0,Hve.useMemo)(()=>(0,xn.__experimentalParseQuantityAndUnitFromRawValue)(o),[o])[1]||i[0]?.value||"px",a=u=>{t([u,s].join(""))},l=u=>{let[d,f]=(0,xn.__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,pu.jsxs)("fieldset",{className:"block-editor-height-control",children:[(0,pu.jsx)(xn.BaseControl.VisualLabel,{as:"legend",children:e}),(0,pu.jsxs)(xn.Flex,{children:[(0,pu.jsx)(xn.FlexItem,{isBlock:!0,children:(0,pu.jsx)(xn.__experimentalUnitControl,{value:o,units:i,onChange:t,onUnitChange:l,min:0,label:e,hideLabelFromVision:!0})}),(0,pu.jsx)(xn.FlexItem,{isBlock:!0,children:(0,pu.jsx)(xn.__experimentalSpacer,{marginX:2,marginBottom:0,children:(0,pu.jsx)(xn.RangeControl,{value:r,min:0,max:jve[s]?.max??100,step:jve[s]?.step??.1,withInputField:!1,onChange:a,label:e,hideLabelFromVision:!0})})})]})]})}var sE=c(H(),1),YSe=c(Tt(),1);var Ja=c(le()),bSe=c(fSe());function pGe(e,t,o,r,n,i){i===void 0&&(i=0);var s=Ek(e,t,i),a=s.width,l=s.height,u=Math.min(a,o),d=Math.min(l,r);return u>d*n?{width:d*n,height:d}:{width:u,height:u/n}}function mGe(e){return e.width>e.height?e.width/e.naturalWidth:e.height/e.naturalHeight}function rE(e,t,o,r,n){n===void 0&&(n=0);var i=Ek(t.width,t.height,n),s=i.width,a=i.height;return{x:pSe(e.x,s,o.width,r),y:pSe(e.y,a,o.height,r)}}function pSe(e,t,o,r){var n=t*r/2-o/2;return PM(e,-n,n)}function mSe(e,t){return Math.sqrt(Math.pow(e.y-t.y,2)+Math.pow(e.x-t.x,2))}function gSe(e,t){return Math.atan2(t.y-e.y,t.x-e.x)*180/Math.PI}function gGe(e,t,o,r,n,i,s){i===void 0&&(i=0),s===void 0&&(s=!0);var a=s?hGe:bGe,l=Ek(t.width,t.height,i),u=Ek(t.naturalWidth,t.naturalHeight,i),d={x:a(100,((l.width-o.width/n)/2-e.x/n)/l.width*100),y:a(100,((l.height-o.height/n)/2-e.y/n)/l.height*100),width:a(100,o.width/l.width*100/n),height:a(100,o.height/l.height*100/n)},f=Math.round(a(u.width,d.width*u.width/100)),p=Math.round(a(u.height,d.height*u.height/100)),g=u.width>=u.height*r,m=g?{width:Math.round(p*r),height:p}:{width:f,height:Math.round(f/r)},h=nn(nn({},m),{x:Math.round(a(u.width-m.width,d.x*u.width/100)),y:Math.round(a(u.height-m.height,d.y*u.height/100))});return{croppedAreaPercentages:d,croppedAreaPixels:h}}function hGe(e,t){return Math.min(e,Math.max(0,t))}function bGe(e,t){return t}function yGe(e,t,o,r,n,i){var s=Ek(t.width,t.height,o),a=PM(r.width/s.width*(100/e.width),n,i),l={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:l,zoom:a}}function vGe(e,t,o){var r=mGe(t);return o.height>o.width?o.height/(e.height*r):o.width/(e.width*r)}function SGe(e,t,o,r,n,i){o===void 0&&(o=0);var s=Ek(t.naturalWidth,t.naturalHeight,o),a=PM(vGe(e,t,r),n,i),l=r.height>r.width?r.height/e.height:r.width/e.width,u={x:((s.width-e.width)/2-e.x)*l,y:((s.height-e.height)/2-e.y)*l};return{crop:u,zoom:a}}function hSe(e,t){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function kGe(e){return e*Math.PI/180}function Ek(e,t,o){var r=kGe(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 PM(e,t,o){return Math.min(Math.max(e,t),o)}function BM(){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 _Ge=`.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;
}
`,xGe=1,wGe=3,CGe=1,ySe=(function(e){BZ(t,e);function t(){var o=e!==null&&e.apply(this,arguments)||this;return o.cropperRef=Ja.createRef(),o.imageRef=Ja.createRef(),o.videoRef=Ja.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=yGe(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=SGe(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,l,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,p=((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,g=u.offsetWidth<f||u.offsetHeight<p,m=f/p,h=void 0;if(g)switch(o.state.mediaObjectFit){default:case"contain":h=d>m?{width:o.containerRect.height*m,height:o.containerRect.height}:{width:o.containerRect.width,height:o.containerRect.width/m};break;case"horizontal-cover":h={width:o.containerRect.width,height:o.containerRect.width/m};break;case"vertical-cover":h={width:o.containerRect.height*m,height:o.containerRect.height};break}else h={width:u.offsetWidth,height:u.offsetHeight};o.mediaSize=nn(nn({},h),{naturalWidth:f,naturalHeight:p}),o.props.setMediaSize&&o.props.setMediaSize(o.mediaSize);var b=o.props.cropSize?o.props.cropSize:pGe(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||((l=o.state.cropSize)===null||l===void 0?void 0:l.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=nn({},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,l={x:o.dragStartCrop.x+s,y:o.dragStartCrop.y+a},u=o.props.restrictPosition?rE(l,o.mediaSize,o.state.cropSize,o.props.zoom,o.props.rotation):l;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,bSe.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,l;return(l=(a=o.props).onInteractionStart)===null||l===void 0?void 0:l.call(a)}),o.wheelTimer&&clearTimeout(o.wheelTimer),o.wheelTimer=o.currentWindow.setTimeout(function(){return o.setState({hasWheelJustStarted:!1},function(){var a,l;return(l=(a=o.props).onInteractionEnd)===null||l===void 0?void 0:l.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,l=s.zoom;return{x:(n+a.x)/l,y:(i+a.y)/l}},o.setNewZoom=function(r,n,i){var s=i===void 0?{}:i,a=s.shouldUpdatePosition,l=a===void 0?!0:a;if(!(!o.state.cropSize||!o.props.onZoomChange)){var u=PM(r,o.props.minZoom,o.props.maxZoom);if(l){var d=o.getPointOnContainer(n,o.containerPosition),f=o.getPointOnMedia(d),p={x:f.x*u-d.x,y:f.y*u-d.y},g=o.props.restrictPosition?rE(p,o.mediaSize,o.state.cropSize,u,o.props.rotation):p;o.props.onCropChange(g)}o.props.onZoomChange(u)}},o.getCropData=function(){if(!o.state.cropSize)return null;var r=o.props.restrictPosition?rE(o.props.crop,o.mediaSize,o.state.cropSize,o.props.zoom,o.props.rotation):o.props.crop;return gGe(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?rE(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,l=s.onCropChange,u=s.keyboardStep,d=s.zoom,f=s.rotation,p=u;if(o.state.cropSize){r.shiftKey&&(p*=.2);var g=nn({},a);switch(r.key){case"ArrowUp":g.y-=p,r.preventDefault();break;case"ArrowDown":g.y+=p,r.preventDefault();break;case"ArrowLeft":g.x-=p,r.preventDefault();break;case"ArrowRight":g.x+=p,r.preventDefault();break;default:return}o.props.restrictPosition&&(g=rE(g,o.mediaSize,o.state.cropSize,d,f)),r.repeat||(i=(n=o.props).onInteractionStart)===null||i===void 0||i.call(n),l(g)}},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=_Ge,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,l,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)!==((l=this.props.crop)===null||l===void 0?void 0:l.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 p=this.getObjectFit();p!==this.state.mediaObjectFit&&this.setState({mediaObjectFit:p},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,l=((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=l/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=mSe(r,n),this.lastPinchRotation=gSe(r,n),this.onDragStart(hSe(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=hSe(n,i);this.onDrag(s),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame(function(){var a=mSe(n,i),l=r.props.zoom*(a/r.lastPinchDistance);r.setNewZoom(l,s,{shouldUpdatePosition:!1}),r.lastPinchDistance=a;var u=gSe(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,l=n.cropperProps,u=n.transform,d=n.crop,f=d.x,p=d.y,g=n.rotation,m=n.zoom,h=n.cropShape,b=n.showGrid,v=n.roundCropAreaPixels,y=n.style,k=y.containerStyle,S=y.cropAreaStyle,_=y.mediaStyle,x=n.classes,w=x.containerClassName,T=x.cropAreaClassName,B=x.mediaClassName,R=(r=this.state.mediaObjectFit)!==null&&r!==void 0?r:this.getObjectFit();return Ja.createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(O){return o.containerRef=O},"data-testid":"container",style:k,className:BM("reactEasyCrop_Container",w)},i?Ja.createElement("img",nn({alt:"",className:BM("reactEasyCrop_Image",R==="contain"&&"reactEasyCrop_Contain",R==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",R==="vertical-cover"&&"reactEasyCrop_Cover_Vertical",B)},a,{src:i,ref:this.imageRef,style:nn(nn({},_),{transform:u||"translate(".concat(f,"px, ").concat(p,"px) rotate(").concat(g,"deg) scale(").concat(m,")")}),onLoad:this.onMediaLoad})):s&&Ja.createElement("video",nn({autoPlay:!0,playsInline:!0,loop:!0,muted:!0,className:BM("reactEasyCrop_Video",R==="contain"&&"reactEasyCrop_Contain",R==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",R==="vertical-cover"&&"reactEasyCrop_Cover_Vertical",B)},a,{ref:this.videoRef,onLoadedMetadata:this.onMediaLoad,style:nn(nn({},_),{transform:u||"translate(".concat(f,"px, ").concat(p,"px) rotate(").concat(g,"deg) scale(").concat(m,")")}),controls:!1}),(Array.isArray(s)?s:[{src:s}]).map(function(A){return Ja.createElement("source",nn({key:A.src},A))})),this.state.cropSize&&Ja.createElement("div",nn({ref:this.cropperRef,style:nn(nn({},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:BM("reactEasyCrop_CropArea",h==="round"&&"reactEasyCrop_CropAreaRound",b&&"reactEasyCrop_CropAreaGrid",T)},l)))},t.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:wGe,minZoom:xGe,cropShape:"rect",objectFit:"contain",showGrid:!0,style:{},classes:{},mediaProps:{},cropperProps:{},zoomSpeed:1,restrictPosition:!0,zoomWithScroll:!0,keyboardStep:CGe},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})(Ja.Component);var TSe=c(F(),1);var Rk=c(F(),1);var vSe=Object.prototype.hasOwnProperty;function SSe(e,t,o){for(o of e.keys())if(wb(o,t))return o}function wb(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--&&wb(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=SSe(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=SSe(t,n),!n)||!wb(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(vSe.call(e,o)&&++r&&!vSe.call(t,o)||!(o in t)||!wb(e[o],t[o]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}var sc=c(F(),1);var Tk=1,kSe=5;var IM=e=>e>=0?e%360:(360+e%360)%360,EGe=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 _Se(e){return e*Math.PI/180}function TGe(e,t,o){let r=_Se(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 xSe(e,t,o=0,r={horizontal:!1,vertical:!1}){try{let n=await EGe(e),i=document.createElement("canvas"),s=i.getContext("2d");if(!s)return null;let a=_Se(o),{width:l,height:u}=TGe(n.width,n.height,o);i.width=l,i.height=u,s.translate(l/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(p=>{d.toBlob(g=>{g&&p(URL.createObjectURL(g))},"image/jpeg")})):null}catch{return null}}var Cb={crop:{x:0,y:0,width:100,height:100},zoom:Tk,rotation:0,aspectRatio:1,flip:{horizontal:!1,vertical:!1}},RGe={x:0,y:0},fG={crop:RGe,croppedArea:Cb.crop,croppedAreaPixels:null,zoom:Cb.zoom,rotation:Cb.rotation,flip:Cb.flip,aspectRatio:Cb.aspectRatio,mediaSize:null};function wSe(){let[e,t]=(0,sc.useState)(fG),[o,r]=(0,sc.useState)(null),n=(0,sc.useCallback)(u=>{t(d=>{let p={...typeof u=="function"?u(d):u};return"rotation"in p&&p.rotation!==void 0&&(p.rotation=IM(p.rotation)),{...d,...p}})},[]),i=(0,sc.useCallback)((u=null)=>{if(!u){r(null),n(fG);return}if(typeof u=="object"){let d={...Cb,...u};r(d),n(d)}},[n,r]),s=(0,sc.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({...fG})},[o,n]),a=(0,sc.useMemo)(()=>{if(o){let d={crop:e.croppedAreaPixels||e.croppedArea,zoom:e.zoom,rotation:IM(e.rotation),aspectRatio:e.aspectRatio,flip:e.flip};return wb(d,o)===!1}let u={crop:e.croppedArea,zoom:e.zoom,rotation:IM(e.rotation),aspectRatio:e.aspectRatio,flip:e.flip};return wb(u,Cb)===!1},[e,o]),l=(0,sc.useCallback)(async u=>e.croppedAreaPixels?xSe(u,e.croppedAreaPixels,e.rotation,e.flip):null,[e.croppedAreaPixels,e.rotation,e.flip]);return(0,sc.useMemo)(()=>({cropperState:e,setCropperState:n,resetState:o,setResetState:i,isDirty:a,reset:s,getCroppedImage:l}),[e,n,o,i,a,s,l])}var CSe=c(E(),1),ESe=(0,Rk.createContext)({cropperState:{crop:{x:0,y:0},croppedArea:{x:0,y:0,width:100,height:100},croppedAreaPixels:null,zoom:Tk,rotation:0,aspectRatio:1,flip:{horizontal:!1,vertical:!1},mediaSize:null},setCropperState:()=>{},resetState:null,setResetState:()=>{},isDirty:!1,reset:()=>{},getCroppedImage:()=>Promise.resolve(null)});function pG({children:e}){let t=wSe(),o=(0,Rk.useMemo)(()=>({...t}),[t]);return(0,CSe.jsx)(ESe.Provider,{value:o,children:e})}var nE=()=>{let e=(0,Rk.useContext)(ESe);if(!e)throw new Error("Missing ImageCropperContext");return e};var RSe=c(E(),1);function mG({src:e,onLoad:t,minZoom:o=Tk,maxZoom:r=kSe,...n}){let{cropperState:i,setCropperState:s}=nE(),{crop:a,zoom:l,rotation:u,aspectRatio:d,flip:f}=i,p=v=>s({crop:v}),g=v=>s({zoom:v}),m=v=>s({rotation:v}),h=v=>s({mediaSize:v}),b=(0,TSe.useCallback)((v,y)=>{s({croppedArea:v,croppedAreaPixels:y})},[s]);return(0,RSe.jsx)(ySe,{classes:{containerClassName:"image-cropper__container",cropAreaClassName:"image-cropper__crop-area",mediaClassName:"image-cropper__image"},minZoom:o,maxZoom:r,rotation:u,image:e,setMediaSize:h,crop:a,zoom:l,aspect:d,onCropChange:p,onZoomChange:g,onCropComplete:b,onMediaLoaded:v=>{t?.(v)},onRotationChange:m,transform:[`translate(${a.x}px, ${a.y}px)`,`rotateZ(${u}deg)`,`rotateY(${f.horizontal?180:0}deg)`,`rotateX(${f.vertical?180:0}deg)`,`scale(${l})`].join(" "),...n})}var Ik=c(H(),1),Pk=c(G(),1);var BSe=100,PSe=300,OM={placement:"bottom-start"};var Bk=c(F(),1);var AM=c(Z(),1),Eb=c(F(),1),Yd=c(G(),1),ISe=c(es(),1),OSe=c(Et(),1);var BGe={crop:(0,Yd.__)("Image cropped."),rotate:(0,Yd.__)("Image rotated."),cropAndRotate:(0,Yd.__)("Image cropped and rotated.")};function ASe({crop:e,rotation:t,url:o,id:r,onSaveImage:n,onFinishEditing:i}){let{createErrorNotice:s,createSuccessNotice:a}=(0,AM.useDispatch)(ISe.store),[l,u]=(0,Eb.useState)(!1),{editMediaEntity:d}=(0,AM.useSelect)(g=>({editMediaEntity:g(C).getSettings()?.[A1]}),[]),f=(0,Eb.useCallback)(()=>{u(!1),i()},[i]),p=(0,Eb.useCallback)(async()=>{if(!d){i(),s((0,Yd.__)("Sorry, you are not allowed to edit images on this site."),{id:"image-editing-error",type:"snackbar"});return}u(!0);let g=[];if(t>0&&g.push({type:"rotate",args:{angle:t}}),(e.width<99.9||e.height<99.9)&&g.push({type:"crop",args:{left:e.x,top:e.y,width:e.width,height:e.height}}),g.length===0){u(!1),i();return}let m=g.length===1?g[0].type:"cropAndRotate";try{let h=await d(r,{src:o,modifiers:g},{throwOnError:!0});h&&(n({id:h.id,url:h.source_url}),a(BGe[m],{type:"snackbar",actions:[{label:(0,Yd.__)("Undo"),onClick:()=>{n({id:r,url:o})}}]}))}catch(h){s((0,Yd.sprintf)((0,Yd.__)("Could not edit image. %s"),(0,OSe.__unstableStripHTML)(h.message)),{id:"image-editing-error",type:"snackbar"})}finally{u(!1),i()}},[e,t,r,o,n,s,a,i,d]);return(0,Eb.useMemo)(()=>({isInProgress:l,apply:p,cancel:f}),[l,p,f])}var ac=c(F(),1),LSe=c(uo(),1);function MSe({url:e,naturalWidth:t,naturalHeight:o}){let[r,n]=(0,ac.useState)(),{cropperState:i,setCropperState:s}=nE(),{zoom:a,aspectRatio:l,crop:u,croppedArea:d}=i,f=(0,ac.useCallback)(y=>{s({zoom:y})},[s]),p=(0,ac.useCallback)(y=>{s({aspectRatio:y})},[s]),g=t/o,m=o/t;(0,ac.useEffect)(()=>{p(g)},[]);let[h,b]=(0,ac.useState)(0),v=(0,ac.useCallback)(()=>{let y=(h+90)%360,k=g,_=a!==1||!(g===l||m===l);if(h%180===90&&(k=1/g),y===0){n(),b(y),s({aspectRatio:_?l:g,crop:{x:-(u.y*k),y:u.x*k}});return}function x(B){let R=document.createElement("canvas"),A=0,O=0;y%180?(R.width=B.target.height,R.height=B.target.width):(R.width=B.target.width,R.height=B.target.height),(y===90||y===180)&&(A=R.width),(y===270||y===180)&&(O=R.height);let P=R.getContext("2d");P.translate(A,O),P.rotate(y*Math.PI/180),P.drawImage(B.target,0,0),R.toBlob(L=>{n(URL.createObjectURL(L)),b(y);let M=_?l:R.width/R.height;s({aspectRatio:M,crop:{x:-(u.y*k),y:u.x*k}})})}let w=new window.Image;w.src=e,w.onload=x;let T=(0,LSe.applyFilters)("media.crossOrigin",void 0,e);typeof T=="string"&&(w.crossOrigin=T)},[h,g,e,s,u,a,l,m,b]);return(0,ac.useMemo)(()=>({editedUrl:r,setEditedUrl:n,crop:d,zoom:a,setZoom:f,rotation:h,rotateClockwise:v,aspect:l,setAspect:p,defaultAspect:g}),[r,d,a,f,h,v,l,p,g])}var NSe=c(E(),1),gG=(0,Bk.createContext)({});gG.displayName="ImageEditingContext";var mu=()=>(0,Bk.useContext)(gG);function DSe({id:e,url:t,naturalWidth:o,naturalHeight:r,onFinishEditing:n,onSaveImage:i,children:s}){let a=MSe({url:t,naturalWidth:o,naturalHeight:r}),l=ASe({id:e,url:t,onSaveImage:i,onFinishEditing:n,...a}),u=(0,Bk.useMemo)(()=>({...a,...l}),[a,l]);return(0,NSe.jsx)(gG.Provider,{value:u,children:s})}var el=c(E(),1);function LM({aspectRatios:e,isDisabled:t,label:o,onClick:r,value:n}){return(0,el.jsx)(Ik.MenuGroup,{label:o,children:e.map(({name:i,slug:s,ratio:a})=>(0,el.jsx)(Ik.MenuItem,{disabled:t,onClick:()=>{r(a)},role:"menuitemradio",isSelected:a===n,icon:a===n?Xi:void 0,children:i},s))})}function PGe(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 hG({ratio:e,...t}){return{ratio:PGe(e),...t}}function VSe({toggleProps:e}){let{isInProgress:t,aspect:o,setAspect:r,defaultAspect:n}=mu(),[i,s,a]=Me("dimensions.aspectRatios.default","dimensions.aspectRatios.theme","dimensions.defaultAspectRatios");return(0,el.jsx)(Ik.DropdownMenu,{icon:sF,label:(0,Pk.__)("Aspect Ratio"),popoverProps:OM,toggleProps:e,children:({onClose:l})=>(0,el.jsxs)(el.Fragment,{children:[(0,el.jsx)(LM,{isDisabled:t,onClick:u=>{r(u),l()},value:o,aspectRatios:[{slug:"original",name:(0,Pk.__)("Original"),ratio:n},...a?i.map(hG).filter(({ratio:u})=>u===1):[]]}),s?.length>0&&(0,el.jsx)(LM,{label:(0,Pk.__)("Theme"),isDisabled:t,onClick:u=>{r(u),l()},value:o,aspectRatios:s}),a&&(0,el.jsx)(LM,{label:(0,Pk.__)("Landscape"),isDisabled:t,onClick:u=>{r(u),l()},value:o,aspectRatios:i.map(hG).filter(({ratio:u})=>u>1)}),a&&(0,el.jsx)(LM,{label:(0,Pk.__)("Portrait"),isDisabled:t,onClick:u=>{r(u),l()},value:o,aspectRatios:i.map(hG).filter(({ratio:u})=>u<1)})]})})}var FSe=c(H(),1),zSe=c(fe(),1);var Cm=c(E(),1);function jSe({url:e,width:t,height:o,naturalHeight:r,naturalWidth:n,borderProps:i}){let{isInProgress:s,editedUrl:a,rotation:l}=mu(),[u,{width:d}]=(0,zSe.useResizeObserver)(),f=o||d*r/n;l%180===90&&(f=d*n/r);let p=(0,Cm.jsxs)("div",{className:W("wp-block-image__crop-area",i?.className,{"is-applying":s}),style:{...i?.style,width:t||d,height:f},children:[(0,Cm.jsx)(mG,{src:a||e}),s&&(0,Cm.jsx)(FSe.Spinner,{})]});return(0,Cm.jsxs)(Cm.Fragment,{children:[u,p]})}var Em=c(H(),1),bG=c(G(),1);var iE=c(E(),1);function HSe(){let{isInProgress:e,zoom:t,setZoom:o}=mu();return(0,iE.jsx)(Em.Dropdown,{contentClassName:"wp-block-image__zoom",popoverProps:OM,renderToggle:({isOpen:r,onToggle:n})=>(0,iE.jsx)(Em.ToolbarButton,{icon:g4,label:(0,bG.__)("Zoom"),onClick:n,"aria-expanded":r,disabled:e}),renderContent:()=>(0,iE.jsx)(Em.__experimentalDropdownContentWrapper,{paddingSize:"medium",children:(0,iE.jsx)(Em.RangeControl,{label:(0,bG.__)("Zoom"),min:BSe,max:PSe,value:Math.round(t*100),onChange:r=>o(r/100)})})})}var USe=c(H(),1),GSe=c(G(),1);var WSe=c(E(),1);function $Se(){let{isInProgress:e,rotateClockwise:t}=mu();return(0,WSe.jsx)(USe.ToolbarButton,{icon:d4,label:(0,GSe.__)("Rotate"),onClick:t,disabled:e})}var yG=c(H(),1),vG=c(G(),1);var Tb=c(E(),1);function KSe(){let{isInProgress:e,apply:t,cancel:o}=mu();return(0,Tb.jsxs)(Tb.Fragment,{children:[(0,Tb.jsx)(yG.ToolbarButton,{onClick:t,disabled:e,children:(0,vG.__)("Apply")}),(0,Tb.jsx)(yG.ToolbarButton,{onClick:o,children:(0,vG.__)("Cancel")})]})}var ra=c(E(),1);function qSe({id:e,url:t,width:o,height:r,naturalHeight:n,naturalWidth:i,onSaveImage:s,onFinishEditing:a,borderProps:l}){return(0,YSe.default)("wp.blockEditor.__experimentalImageEditor",{since:"7.1",hint:"The Media Editor modal is now the default crop experience for core blocks. This component will be removed in a future major release."}),(0,ra.jsx)(pG,{children:(0,ra.jsxs)(DSe,{id:e,url:t,naturalWidth:i,naturalHeight:n,onSaveImage:s,onFinishEditing:a,children:[(0,ra.jsx)(jSe,{borderProps:l,url:t,width:o,height:r,naturalHeight:n,naturalWidth:i}),(0,ra.jsxs)(Po,{children:[(0,ra.jsxs)(sE.ToolbarGroup,{children:[(0,ra.jsx)(HSe,{}),(0,ra.jsx)(sE.ToolbarItem,{children:u=>(0,ra.jsx)(VSe,{toggleProps:u})}),(0,ra.jsx)($Se,{})]}),(0,ra.jsx)(sE.ToolbarGroup,{children:(0,ra.jsx)(KSe,{})})]})]})})}var na=c(H(),1),Tm=c(G(),1);var Ok=c(F(),1);function ZSe(e,t,o,r,n){let[i,s]=(0,Ok.useState)(t??r??""),[a,l]=(0,Ok.useState)(e??o??"");return(0,Ok.useEffect)(()=>{t===void 0&&r!==void 0&&s(r),e===void 0&&o!==void 0&&l(o)},[r,o]),(0,Ok.useEffect)(()=>{t!==void 0&&Number.parseInt(t)!==Number.parseInt(i)&&s(t),e!==void 0&&Number.parseInt(e)!==Number.parseInt(a)&&l(e)},[t,e]),{currentHeight:a,currentWidth:i,updateDimension:(f,p)=>{let g=p===""?void 0:parseInt(p,10);f==="width"?s(g):l(g),n({[f]:g})},updateDimensions:(f,p)=>{l(f??o),s(p??r),n({height:f,width:p})}}}var tl=c(E(),1),XSe=[25,50,75,100],IGe=()=>{};function QSe(e,t,o){let r=Math.round(t*(e/100)),n=Math.round(o*(e/100));return{scaledWidth:r,scaledHeight:n}}function JSe({imageSizeHelp:e,imageWidth:t,imageHeight:o,imageSizeOptions:r=[],isResizable:n=!0,slug:i,width:s,height:a,onChange:l,onChangeImage:u=IGe}){let{currentHeight:d,currentWidth:f,updateDimension:p,updateDimensions:g}=ZSe(a,s,o,t,l),m=b=>{if(b===void 0){g();return}let{scaledWidth:v,scaledHeight:y}=QSe(b,t,o);g(y,v)},h=XSe.find(b=>{let{scaledWidth:v,scaledHeight:y}=QSe(b,t,o);return f===v&&d===y});return(0,tl.jsxs)(na.__experimentalVStack,{className:"block-editor-image-size-control",spacing:"4",children:[r&&r.length>0&&(0,tl.jsx)(na.SelectControl,{label:(0,Tm.__)("Resolution"),value:i,options:r,onChange:u,help:e}),n&&(0,tl.jsxs)(tl.Fragment,{children:[(0,tl.jsxs)(na.__experimentalHStack,{align:"baseline",spacing:"4",children:[(0,tl.jsx)(na.__experimentalNumberControl,{label:(0,Tm.__)("Width"),value:f,min:1,onChange:b=>p("width",b)}),(0,tl.jsx)(na.__experimentalNumberControl,{label:(0,Tm.__)("Height"),value:d,min:1,onChange:b=>p("height",b)})]}),(0,tl.jsx)(na.__experimentalToggleGroupControl,{label:(0,Tm.__)("Image size presets"),hideLabelFromVision:!0,onChange:m,value:h,isBlock:!0,children:XSe.map(b=>(0,tl.jsx)(na.__experimentalToggleGroupControlOption,{value:b,label:(0,Tm.sprintf)((0,Tm.__)("%d%%"),b)},b))})]})]})}var MM=c(H(),1);var Rb=c(G(),1),tke=c(E(),1),eke={left:Ff,center:Vf,right:zf,"space-between":Sy,stretch:ky};function OGe({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?eke[r]:eke.left,l=[{name:"left",icon:Ff,title:(0,Rb.__)("Justify items left"),isActive:r==="left",onClick:()=>s("left")},{name:"center",icon:Vf,title:(0,Rb.__)("Justify items center"),isActive:r==="center",onClick:()=>s("center")},{name:"right",icon:zf,title:(0,Rb.__)("Justify items right"),isActive:r==="right",onClick:()=>s("right")},{name:"space-between",icon:Sy,title:(0,Rb.__)("Space between items"),isActive:r==="space-between",onClick:()=>s("space-between")},{name:"stretch",icon:ky,title:(0,Rb.__)("Stretch items"),isActive:r==="stretch",onClick:()=>s("stretch")}],u=i?MM.ToolbarGroup:MM.ToolbarDropdownMenu,d=i?{isCollapsed:t}:{};return(0,tke.jsx)(u,{icon:a,popoverProps:n,label:(0,Rb.__)("Change items justification"),controls:l.filter(f=>e.includes(f.name)),...d})}var SG=OGe;var kG=c(E(),1),Ky=e=>(0,kG.jsx)(SG,{...e,isToolbar:!1}),oke=e=>(0,kG.jsx)(SG,{...e,isToolbar:!0});var Di=c(H(),1),lc=c(G(),1),pr=c(F(),1),Yke=c(fe(),1),qke=c(Et(),1),Zke=c(oo(),1),Xke=c(mC(),1),YM=c(Z(),1),PG=c(Ny(),1);var Qke=c(Tt(),1),qM=c(As(),1);var Ak=c(H(),1);var NM=c(fe(),1),DM=c(G(),1),rke=c(F(),1),qd=c(E(),1);function nke({children:e,settingsOpen:t,setSettingsOpen:o}){let r=(0,NM.useReducedMotion)(),n=r?rke.Fragment:Ak.__unstableAnimatePresence,i=r?"div":Ak.__unstableMotion.div,a=`link-control-settings-drawer-${(0,NM.useInstanceId)(nke)}`;return(0,qd.jsxs)(qd.Fragment,{children:[(0,qd.jsx)(Ak.Button,{__next40pxDefaultSize:!0,className:"block-editor-link-control__drawer-toggle","aria-expanded":t,onClick:()=>o(!t),icon:(0,DM.isRTL)()?cx:Df,"aria-controls":a,children:(0,DM._x)("Advanced","Additional link settings")}),(0,qd.jsx)(n,{children:t&&(0,qd.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,qd.jsx)("div",{className:"block-editor-link-control__drawer-inner",children:e})})})]})}var ike=nke;var UM=c(F(),1),RG=c(G(),1),wke=c(Tt(),1);var aE=c(G(),1),hke=c(H(),1);var VM=c(G(),1),ske=c(H(),1),ake=c(F(),1);var _G=c(E(),1),AGe=({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,ake.createInterpolateElement)((0,VM.sprintf)((0,VM.__)("Create: <mark>%s</mark>"),e),{mark:(0,_G.jsx)("mark",{})}),(0,_G.jsx)(ske.MenuItem,{...o,iconPosition:"left",icon:ha,className:"block-editor-link-control__search-item",onClick:t,children:n})},lke=AGe;var Zd=c(G(),1),zM=c(H(),1);var cke=c(Et(),1),Mk=c(As(),1),uke=c(fe(),1),dke=c(Tt(),1),Lk=c(E(),1),FM={post:{icon:l4,label:(0,Zd.__)("Post")},page:{icon:Ng,label:(0,Zd.__)("Page")},post_tag:{icon:D4,label:(0,Zd.__)("Tag")},category:{icon:dF,label:(0,Zd.__)("Category")},attachment:{icon:HF,label:(0,Zd.__)("Attachment")}};function LGe({isURL:e,suggestion:t}){let o=null;return e?o=dx:t.type in FM&&(o=FM[t.type].icon,t.type==="page"&&(t.isFrontPage&&(o=S3),t.isBlogHome&&(o=X4))),o?(0,Lk.jsx)(ft,{className:"block-editor-link-control__search-item-icon",icon:o}):null}function MGe(e){return e?.trim()?.length?e?.replace(/^\/?/,"/"):e}function NGe(e){return e?.trim()?.length?e?.replace(/\/$/,""):e}var DGe=(e,...t)=>(...o)=>e(...o,...t),VGe=e=>t=>t==null||t!==t?e:t;function FGe(e){return e&&(0,uke.pipe)(Mk.safeDecodeURI,Mk.getPath,VGe(""),DGe(Mk.filterURLForDisplay,24),NGe,MGe)(e)}var fke=({itemProps:e,suggestion:t,searchTerm:o,onClick:r,isURL:n=!1,shouldShowType:i=!1})=>{let s=n?(0,Zd.__)("Press ENTER to add this link"):FGe(t.url);return(0,Lk.jsx)(zM.MenuItem,{...e,info:s,iconPosition:"left",icon:(0,Lk.jsx)(LGe,{suggestion:t,isURL:n}),onClick:r,shortcut:i&&zGe(t),className:"block-editor-link-control__search-item",children:(0,Lk.jsx)(zM.TextHighlight,{text:(0,cke.__unstableStripHTML)(t.title),highlight:o})})};function zGe(e){return e.isFrontPage?(0,Zd.__)("Front page"):e.isBlogHome?(0,Zd.__)("Blog home"):e.type in FM?FM[e.type].label:e.type}var pke=fke,mke=e=>((0,dke.default)("wp.blockEditor.__experimentalLinkControlSearchItem",{since:"6.8"}),(0,Lk.jsx)(fke,{...e}));var gke=c(G(),1),Bb="__CREATE__",xG="tel",jM="link",wG="mailto",CG="internal",Nk=[jM,wG,xG,CG],EG=[{id:"opensInNewTab",title:(0,gke.__)("Open in new tab")}];var bke=c(Tt(),1),Pb=c(E(),1);function yke({withCreateSuggestion:e,currentInputValue:t,handleSuggestionClick:o,suggestionsListProps:r,buildSuggestionItemProps:n,suggestions:i,selectedSuggestion:s,isLoading:a,isInitialSuggestions:l,createSuggestionButtonText:u,suggestionsQuery:d}){let f=W("block-editor-link-control__search-results",{"is-loading":a}),p=i.length===1&&Nk.includes(i[0].type),g=e&&!p&&!l,m=!d?.type,h=l?(0,aE.__)("Suggestions"):(0,aE.sprintf)((0,aE.__)('Search results for "%s"'),t);return(0,Pb.jsx)("div",{className:"block-editor-link-control__search-results-wrapper",children:(0,Pb.jsx)("div",{...r,className:f,"aria-label":h,children:(0,Pb.jsx)(hke.MenuGroup,{children:i.map((b,v)=>g&&Bb===b.type?(0,Pb.jsx)(lke,{searchTerm:t,buttonText:u,onClick:()=>o(b),itemProps:n(b,v),isSelected:v===s},b.type):Bb===b.type?null:(0,Pb.jsx)(pke,{itemProps:n(b,v),suggestion:b,index:v,onClick:()=>{o(b)},isSelected:v===s,isURL:Nk.includes(b.type),searchTerm:t,shouldShowType:m,isFrontPage:b?.isFrontPage,isBlogHome:b?.isBlogHome},`${b.id}-${b.type}`))})})})}var vke=yke,Ske=e=>((0,bke.default)("wp.blockEditor.__experimentalLinkControlSearchResults",{since:"6.8"}),(0,Pb.jsx)(yke,{...e}));var kke=c(F(),1),_ke=c(Z(),1);var HM=c(As(),1);function lE(e){let t=e?.trim();if(!t)return{url:t,type:jM};let o=jM,r=(0,HM.getProtocol)(t)||"";return r.includes("mailto")?o=wG:r.includes("tel")?o=xG:t?.startsWith("#")&&(o=CG),Sg(t)||kg(t)||t.startsWith("?")||r?{url:t,type:o}:{url:(0,HM.prependHTTPS)(t),type:o}}var jGe=()=>Promise.resolve([]),HGe=e=>{let{url:t,type:o}=lE(e);return Promise.resolve([{id:e,title:e,url:t,type:o}])},UGe=async(e,t,o,r,n,i)=>{let{isInitialSuggestions:s}=t,a=await o(e,t);return a.map(l=>Number(l.id)===n?(l.isFrontPage=!0,l):(Number(l.id)===i&&(l.isBlogHome=!0),l)),s||_g(e)||!r?a:a.concat({title:e,url:e,type:Bb})};function xke(e,t,o){let{fetchSearchSuggestions:r,pageOnFront:n,pageForPosts:i}=(0,_ke.useSelect)(a=>{let{getSettings:l}=a(C);return{pageOnFront:l().pageOnFront,pageForPosts:l().pageForPosts,fetchSearchSuggestions:l().__experimentalFetchLinkSuggestions}},[]),s=t?HGe:jGe;return(0,kke.useCallback)((a,{isInitialSuggestions:l})=>_g(a)?s(a,{isInitialSuggestions:l}):UGe(a,{...e,isInitialSuggestions:l},r,o,n,i),[s,r,n,i,e,o])}var Dk=c(E(),1),GGe=()=>Promise.resolve([]),TG=()=>{},Cke=(0,UM.forwardRef)(({value:e,children:t,currentLink:o={},className:r=null,placeholder:n=null,withCreateSuggestion:i=!1,onCreateSuggestion:s=TG,onChange:a=TG,onSelect:l=TG,showSuggestions:u=!0,renderSuggestions:d=x=>(0,Dk.jsx)(vke,{...x}),fetchSuggestions:f=null,allowDirectEntry:p=!0,showInitialSuggestions:g=!1,suggestionsQuery:m={},withURLSuggestion:h=!0,createSuggestionButtonText:b,hideLabelFromVision:v=!1,suffix:y,isEntity:k=!1,customValidity:S},_)=>{let x=xke(m,p,i,h),w=u?f||x:GGe,[T,B]=(0,UM.useState)(),R=(M,z)=>{a(M),B(z)},A=M=>d({...M,withCreateSuggestion:i,createSuggestionButtonText:b,suggestionsQuery:m,handleSuggestionClick:z=>{M.handleSuggestionClick&&M.handleSuggestionClick(z),O(z)}}),O=async M=>{let z=M;if(Bb===M.type){try{z=await s(M.title),z?.url&&l(z)}catch{}return}if(p||z&&Object.keys(z).length>=1){let{id:V,url:I,kind:N,type:D,...j}=o??{};l({...j,...z},z)}},P=n??(0,RG.__)("Search or type URL"),L=v&&n!==""?P:(0,RG.__)("Link");return(0,Dk.jsxs)("div",{className:"block-editor-link-control__search-input-container",children:[(0,Dk.jsx)(Rm,{disableSuggestions:o?.url===e,label:L,hideLabelFromVision:v,className:r,value:e,onChange:R,placeholder:P,__experimentalRenderSuggestions:u?A:null,__experimentalFetchLinkSuggestions:w,__experimentalHandleURLSuggestions:!0,__experimentalShowInitialSuggestions:g,customValidity:S,required:!1,onSubmit:(M,z)=>{let V=M||T;!V&&!e?.trim()?.length?z.preventDefault():O(V||{url:e})},inputRef:_,suffix:y,disabled:k}),t]})}),Eke=Cke,Tke=e=>((0,wke.default)("wp.blockEditor.__experimentalLinkControlSearchInput",{since:"6.8"}),(0,Dk.jsx)(Cke,{...e}));var Bm=c(G(),1),Jr=c(H(),1),Oke=c(fe(),1),$M=c(As(),1);var Ake=c(Et(),1),KM=c(Z(),1),Lke=c(es(),1),Mke=c(Ny(),1);var Rke=c(H(),1),{Slot:Bke,Fill:Pke}=(0,Rke.createSlotFill)("BlockEditorLinkControlViewer");var Ike=c(Z(),1),GM=c(F(),1);function WGe(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 $Ge(e){let[t,o]=(0,GM.useReducer)(WGe,{richData:null,isFetching:!1}),{fetchRichUrlData:r}=(0,Ike.useSelect)(n=>{let{getSettings:i}=n(C);return{fetchRichUrlData:i().__experimentalFetchRichUrlData}},[]);return(0,GM.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 WM=$Ge;var wo=c(E(),1),{Badge:KGe}=U(Jr.privateApis);function Nke({value:e,onEditClick:t,hasRichPreviews:o=!1,hasUnlinkControl:r=!1,onRemove:n}){let i=(0,KM.useSelect)(b=>b(Mke.store).get("core","showIconLabels"),[]),s=o?e?.url:null,{richData:a,isFetching:l}=WM(s),u=a&&Object.keys(a).length,d=e&&(0,$M.filterURLForDisplay)((0,$M.safeDecodeURI)(e.url),24)||"",f=!e?.url?.length,p=!f&&(0,Ake.__unstableStripHTML)(e?.entityTitle||a?.title||e?.title||d),g;a?.icon?g=(0,wo.jsx)("img",{src:a?.icon,alt:""}):f?g=(0,wo.jsx)(ft,{icon:x3,size:32}):g=(0,wo.jsx)(ft,{icon:dx});let{createNotice:m}=(0,KM.useDispatch)(Lke.store),h=(0,Oke.useCopyToClipboard)(e.url,()=>{m("info",(0,Bm.__)("Link copied to clipboard."),{isDismissible:!0,type:"snackbar"})});return(0,wo.jsx)(Jr.Flex,{role:"group","aria-label":(0,Bm.__)("Manage link"),className:W("block-editor-link-control__preview",{"is-current":!0,"is-rich":u,"is-fetching":!!l,"is-preview":!0,"is-error":f,"is-url-title":p===d}),children:(0,wo.jsxs)(Jr.Flex,{gap:0,align:"flex-start",children:[(0,wo.jsxs)(Jr.Flex,{className:"block-editor-link-control__link-information",role:"figure","aria-label":(0,Bm.__)("Link information"),justify:"start",align:"flex-start",children:[e?.image?(0,wo.jsx)(Jr.Flex,{className:"block-editor-link-control__preview-image",justify:"center",children:(0,wo.jsx)("img",{src:e?.image,alt:""})}):(0,wo.jsx)(Jr.Flex,{className:W("block-editor-link-control__preview-icon",{"is-image":a?.icon}),justify:"center",children:g}),(0,wo.jsx)(Jr.Flex,{className:"block-editor-link-control__preview-details",direction:"column",gap:2,children:f?(0,wo.jsx)("span",{className:"block-editor-link-control__preview-error-notice",children:(0,Bm.__)("Link is empty")}):(0,wo.jsxs)(wo.Fragment,{children:[(0,wo.jsx)(Jr.ExternalLink,{className:"block-editor-link-control__preview-title",href:e.url,children:(0,wo.jsx)(Jr.__experimentalTruncate,{numberOfLines:1,children:p})}),(0,wo.jsx)("span",{className:"block-editor-link-control__preview-info",children:(0,wo.jsx)(Jr.__experimentalTruncate,{numberOfLines:1,children:d})}),e?.badges?.length>0&&(0,wo.jsx)(Jr.__experimentalHStack,{className:"block-editor-link-control__preview-badges",alignment:"left",gap:1,children:e.badges.map((b,v)=>(0,wo.jsx)(KGe,{intent:b.intent,children:b.label},`${b.label}|${b.intent}|${v}`))})]})})]}),(0,wo.jsx)(Jr.Button,{icon:Dg,label:(0,Bm.__)("Edit link"),onClick:t,size:"compact",showTooltip:!i}),r&&(0,wo.jsx)(Jr.Button,{icon:Qi,label:(0,Bm.__)("Remove link"),onClick:n,size:"compact",showTooltip:!i}),(0,wo.jsx)(Jr.Button,{icon:CF,label:(0,Bm.__)("Copy link"),ref:h,accessibleWhenDisabled:!0,disabled:f,size:"compact",showTooltip:!i}),(0,wo.jsx)(Bke,{fillProps:e})]})})}var Dke=c(G(),1),Vke=c(H(),1);var Ib=c(E(),1),YGe=()=>{},qGe=({value:e,onChange:t=YGe,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,Ib.jsx)("div",{className:"block-editor-link-control__setting",children:s},i.id)}return null}return(0,Ib.jsx)(Vke.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,Ib.jsxs)("fieldset",{className:"block-editor-link-control__settings",children:[(0,Ib.jsx)(pt,{render:(0,Ib.jsx)("legend",{}),children:(0,Dke.__)("Currently selected link settings")}),n]})},Fke=qGe;var zke=c(G(),1),Ob=c(F(),1);function jke(e){let t=(0,Ob.useRef)(),[o,r]=(0,Ob.useState)(!1),[n,i]=(0,Ob.useState)(null),s=async function(a){r(!0),i(null);try{return t.current=ZGe(Promise.resolve(e(a))),await t.current.promise}catch(l){if(l&&l.isCanceled)return;throw i(l.message||(0,zke.__)("An unknown error occurred during creation. Please try again.")),l}finally{r(!1)}};return(0,Ob.useEffect)(()=>()=>{t.current&&t.current.cancel()},[]),{createPage:s,isCreatingPage:o,errorMessage:n}}var ZGe=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 BG=c(F(),1),Gke=c(Uke(),1);function Wke(e){let[t,o]=(0,BG.useState)(e||{}),[r,n]=(0,BG.useState)(e);return(0,Gke.default)(e,r)||(n(e),o(e)),[t,o,l=>{o({...t,url:l})},l=>{o({...t,title:l})},l=>u=>{let d=Object.keys(u).reduce((f,p)=>(l.includes(p)&&(f[p]=u[p]),f),{});o({...t,...d})}]}var Mo=c(E(),1),IG=()=>{},$ke="core/block-editor",Kke="linkControlSettingsDrawer";function Ab({searchInputPlaceholder:e,value:t,settings:o=EG,onChange:r=IG,onInputChange:n,onRemove:i,onCancel:s,noDirectEntry:a=!1,showSuggestions:l=!0,showInitialSuggestions:u,forceIsEditingLink:d,createSuggestion:f,withCreateSuggestion:p,inputValue:g="",suggestionsQuery:m={},noURLSuggestion:h=!1,createSuggestionButtonText:b,hasRichPreviews:v=!1,hasTextControl:y=!1,renderControlBottom:k=null,handleEntities:S=!1}){p===void 0&&f&&(p=!0);let[_,x]=(0,pr.useState)(!1),[w,T]=(0,pr.useState)(void 0),{advancedSettingsPreference:B}=(0,YM.useSelect)(Be=>({advancedSettingsPreference:Be(PG.store).get($ke,Kke)??!1}),[]),{set:R}=(0,YM.useDispatch)(PG.store),A=Be=>{R&&R($ke,Kke,Be),x(Be)},O=B||_,P=(0,pr.useRef)(!0),L=(0,pr.useRef)(),M=(0,pr.useRef)(),z=(0,pr.useRef)(),V=(0,pr.useRef)(),I=o.map(({id:Be})=>Be),[N,D,j,Y,X]=Wke(t),ee=Be=>{j(Be),n?.(Be)},J=S&&!!N?.id,$=(0,Yke.useInstanceId)(Ab,"link-control"),q=J?`${$}__help`:null,K=t&&!(0,Xke.isShallowEqualObjects)(N,t),[Q,re]=(0,pr.useState)(d!==void 0?d:!t||!t.url),{createPage:se,isCreatingPage:te,errorMessage:ne}=jke(f);(0,pr.useEffect)(()=>{d!==void 0&&re(d)},[d]),(0,pr.useEffect)(()=>{if(P.current)return;(qke.focus.focusable.find(L.current)[0]||L.current).focus()},[Q,te]),(0,pr.useEffect)(()=>(P.current=!1,()=>{P.current=!0}),[]);let de=(0,pr.useRef)();(0,pr.useEffect)(()=>{if(de.current===void 0){de.current=g;return}de.current!==g&&(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."),de.current=g)},[g]),(0,pr.useEffect)(()=>{if(w?.type==="invalid"){let Be=z.current;Be&&typeof Be.reportValidity=="function"&&Be.reportValidity()}},[w]);let Se=t?.url?.trim()?.length>0,Ee=()=>{re(!1)},ve=Be=>{let Te={type:"invalid",message:(0,lc.__)("Please enter a valid URL.")},Ne={type:"valid"},$e=Be?.trim();if(!$e?.length||!_g($e))return Te;if(Sg($e)||kg($e))return Ne;let ot=(0,qM.prependHTTPS)($e);return(0,qM.isURL)(ot)?Ne:Te},be=Be=>{if(!(Be&&Be.id&&Be.type&&!Nk.includes(Be.type))){let $e=Be?.url||xe,ot=ve($e);if(ot.type==="invalid"){T(ot);return}let{url:Ot}=lE($e);Be={...Be,url:Ot}}Be?.kind==="taxonomy"&&Be?.url&&(V.current=Be.url);let Ne=Object.keys(Be).reduce(($e,ot)=>(I.includes(ot)||($e[ot]=Be[ot]),$e),{});r({...N,...Ne,title:N?.title||Be?.title}),T(void 0),Ee()},ge=()=>{if(nt)return!1;let Be=xe.trim(),Te=N&&N.id&&N.type&&!Nk.includes(N.type),Ne=t?.url===Be;if(Te&&Ne)return T(void 0),!0;let $e=ve(xe);return $e.type==="invalid"?(T($e),!1):(T(void 0),!0)},he=()=>{K&&r({...t,...N,url:lE(xe).url}),Ee(),T(void 0)},ye=()=>{ge()&&he()},_e=Be=>{let{keyCode:Te}=Be;Te===Zke.ENTER&&!nt&&(Be.preventDefault(),ye())},we=()=>{D(t)},ie=Be=>{Be.preventDefault(),Be.stopPropagation(),we(),T(void 0),Se?Ee():i?.(),s?.()},[oe,Ae]=(0,pr.useState)(!1),me=()=>{let{id:Be,kind:Te,type:Ne,...$e}=N;D({...$e,id:void 0,kind:void 0,type:void 0,url:void 0}),Ae(!0)};(0,pr.useEffect)(()=>{oe&&(z.current?.focus(),Ae(!1))},[oe]);let xe=N?.url!==void 0?N.url:g||"",nt=!xe?.trim()?.length;(0,pr.useEffect)(()=>{T(void 0)},[xe]);let ut=!w,it=i&&t&&!Q&&!te,xt=Q&&Se,tt=Se&&y,$t=(Q||!t)&&!te,dt=nt||!ut||t&&!K,co=!!o?.length&&Q&&Se,at=(0,pr.useMemo)(()=>t?.kind==="taxonomy"&&!t?.url&&V.current?{...t,url:V.current}:t,[t]);return(0,Mo.jsxs)("div",{tabIndex:-1,ref:L,className:"block-editor-link-control",children:[te&&(0,Mo.jsxs)("div",{className:"block-editor-link-control__loading",children:[(0,Mo.jsx)(Di.Spinner,{})," ",(0,lc.__)("Creating"),"\u2026"]}),$t&&(0,Mo.jsxs)(Mo.Fragment,{children:[(0,Mo.jsxs)("div",{className:W({"block-editor-link-control__search-input-wrapper":!0,"has-text-control":tt,"has-actions":xt}),children:[tt&&(0,Mo.jsx)(Di.TextControl,{ref:M,className:"block-editor-link-control__field block-editor-link-control__text-content",label:(0,lc.__)("Text"),value:N?.title,onChange:Y,onKeyDown:_e}),(0,Mo.jsx)(Eke,{ref:z,currentLink:t,className:"block-editor-link-control__field block-editor-link-control__search-input",placeholder:e,value:xe,withCreateSuggestion:p,onCreateSuggestion:se,onChange:ee,onSelect:be,showInitialSuggestions:u,allowDirectEntry:!a,showSuggestions:l,suggestionsQuery:m,withURLSuggestion:!h,createSuggestionButtonText:b,hideLabelFromVision:!tt,isEntity:J,customValidity:w,suffix:(0,Mo.jsx)(XGe,{isEntity:J,showActions:xt,isDisabled:dt,onUnlink:me,onSubmit:ye,helpTextId:q})}),J&&q&&(0,Mo.jsx)("p",{id:q,className:"block-editor-link-control__help",children:(0,lc.sprintf)((0,lc.__)("Synced with the selected %s."),N?.type||"item")})]}),ne&&(0,Mo.jsx)(Di.Notice,{className:"block-editor-link-control__search-error",status:"error",isDismissible:!1,children:ne})]}),t&&!Q&&!te&&(0,Mo.jsx)(Nke,{value:at,onEditClick:()=>re(!0),hasRichPreviews:v,hasUnlinkControl:it,onRemove:()=>{i(),re(!0)}},at?.url),co&&(0,Mo.jsx)("div",{className:"block-editor-link-control__tools",children:!nt&&(0,Mo.jsx)(ike,{settingsOpen:O,setSettingsOpen:A,children:(0,Mo.jsx)(Fke,{value:N,settings:o,onChange:X(I)})})}),xt&&(0,Mo.jsxs)(Di.__experimentalHStack,{justify:"right",className:"block-editor-link-control__search-actions",children:[(0,Mo.jsx)(Di.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:ie,children:(0,lc.__)("Cancel")}),(0,Mo.jsx)(Di.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:dt?IG:ye,className:"block-editor-link-control__search-submit","aria-disabled":dt,children:(0,lc.__)("Apply")})]}),!te&&k&&k()]})}function XGe({isEntity:e,showActions:t,isDisabled:o,onUnlink:r,onSubmit:n,helpTextId:i}){if(e)return(0,Mo.jsx)(Di.Button,{icon:Qi,onClick:r,"aria-describedby":i,showTooltip:!0,label:(0,lc.__)("Unsync and edit"),__next40pxDefaultSize:!0});if(!t)return(0,Mo.jsx)(Di.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,Mo.jsx)(Di.Button,{onClick:o?IG:n,label:(0,lc.__)("Submit"),icon:Hu,className:"block-editor-link-control__search-submit","aria-disabled":o,size:"small"})})}Ab.ViewerFill=Pke;Ab.DEFAULT_LINK_SETTINGS=EG;var ZM=e=>((0,Qke.default)("wp.blockEditor.__experimentalLinkControl",{since:"6.8",alternative:"wp.blockEditor.LinkControl"}),(0,Mo.jsx)(Ab,{...e}));ZM.ViewerFill=Ab.ViewerFill;ZM.DEFAULT_LINK_SETTINGS=Ab.DEFAULT_LINK_SETTINGS;var Pm=Ab;var e_e=c(G(),1),t_e=c(H(),1);var cE=1.5,OG=.01,AG=10,LG="";function Jke(e){return e!==void 0&&e!==LG}var MG=c(E(),1),QGe=({__next40pxDefaultSize:e,value:t,onChange:o,__unstableInputWidth:r="60px",...n})=>{let i=Jke(t),s=(d,f)=>{if(i)return d;let p=OG*AG;switch(`${d}`){case`${p}`:return cE+p;case"0":return f?d:cE-p;case"":return cE;default:return d}},a=(d,f)=>{let p=["insertText","insertFromPaste"].includes(f.payload.event.nativeEvent?.inputType),g=s(d.value,p);return{...d,value:g}},l=i?t:LG;return(0,MG.jsx)("div",{className:"block-editor-line-height-control",children:(0,MG.jsx)(t_e.__experimentalNumberControl,{...n,__unstableInputWidth:r,__unstableStateReducer:a,onChange:(d,{event:f})=>{if(d===""){o();return}if(f.type==="click"){o(s(`${d}`,!1));return}o(`${d}`)},label:(0,e_e.__)("Line height"),placeholder:cE,step:OG,spinFactor:AG,value:l,min:0,spinControls:"custom"})})},XM=QGe;var gu=c(G(),1),o_e=c(Kr(),1),Vi=c(H(),1),JM=c(Z(),1),r_e=c(oo(),1);var n_e=c(fe(),1),i_e=c(Et(),1),s_e=c(es(),1),a_e=c(F(),1);function QM(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 wn=c(E(),1),JGe=()=>{},eWe=0,tWe=({mediaURL:e,mediaId:t,mediaIds:o,allowedTypes:r,accept:n,onError:i,onSelect:s,onSelectURL:a,onReset:l,onToggleFeaturedImage:u,useFeaturedImage:d,onFilesUpload:f=JGe,name:p=(0,gu.__)("Replace"),createNotice:g,removeNotice:m,children:h,multiple:b=!1,addToGallery:v,handleUpload:y=!0,variant:k,popoverProps:S,renderToggle:_,className:x})=>{let{mediaUpload:w,allowedMimeTypes:T}=(0,JM.useSelect)(I=>{let{getSettings:N}=I(C),D=N();return{mediaUpload:D.mediaUpload,allowedMimeTypes:D.allowedMimeTypes}},[]),B=`block-editor/media-replace-flow/error-notice/${++eWe}`,R=(0,a_e.useMemo)(()=>QM(r,T,n),[r,T,n]),A=I=>{let N=(0,i_e.__unstableStripHTML)(I);if(i){i(N);return}setTimeout(()=>{g("error",N,{speak:!0,id:B,isDismissible:!0})},1e3)},O=(I,N)=>{d&&u&&u(),N(),s(I),(0,o_e.speak)((0,gu.__)("The media file has been replaced")),m(B)},P=(I,N)=>{let D=I.target.files;if(!y)return N(),s(D);f(D),w({allowedTypes:r,filesList:D,onFileChange:([j])=>{O(j,N)},onError:A})},L=I=>{I.keyCode===r_e.DOWN&&(I.preventDefault(),I.target.click())},z=b&&(!r||r.length===0?!1:r.every(I=>I==="image"||I.startsWith("image/"))),V={...S,variant:k};return(0,wn.jsx)(Vi.Dropdown,{popoverProps:V,className:x,contentClassName:W("block-editor-media-replace-flow__options",k&&`is-variant-${k}`),renderToggle:({isOpen:I,onToggle:N})=>_?_({"aria-expanded":I,"aria-haspopup":"true",onClick:N,onKeyDown:L,children:p}):(0,wn.jsx)(Vi.ToolbarButton,{"aria-expanded":I,"aria-haspopup":"true",onClick:N,onKeyDown:L,children:p}),renderContent:({onClose:I})=>(0,wn.jsxs)(wn.Fragment,{children:[(0,wn.jsxs)(Vi.NavigableMenu,{className:"block-editor-media-replace-flow__media-upload-menu",children:[(0,wn.jsxs)(Ws,{children:[(0,wn.jsx)(tu,{gallery:z,addToGallery:v,multiple:b,value:b?o:t,onSelect:N=>O(N,I),allowedTypes:r,render:({open:N})=>(0,wn.jsx)(Vi.MenuItem,{icon:_y,onClick:N,children:(0,gu.__)("Open Media Library")})}),(0,wn.jsx)(Vi.FormFileUpload,{onChange:N=>{P(N,I)},accept:R,multiple:!!b,render:({openFileDialog:N})=>(0,wn.jsx)(Vi.MenuItem,{icon:q4,onClick:()=>{N()},children:(0,gu._x)("Upload","verb")})})]}),u&&(0,wn.jsx)(Vi.MenuItem,{icon:s4,onClick:u,isPressed:d,children:(0,gu.__)("Use featured image")}),typeof h=="function"?h({onClose:I}):h,e&&l&&(0,wn.jsx)(Vi.MenuItem,{onClick:()=>{l(),I()},children:(0,gu.__)("Reset")})]}),a&&(0,wn.jsxs)("form",{className:"block-editor-media-flow__url-input",children:[(0,wn.jsx)("span",{className:"block-editor-media-replace-flow__image-url-label",children:(0,gu.__)("Current media URL:")}),(0,wn.jsx)(Pm,{value:{url:e},settings:[],showSuggestions:!1,onChange:({url:N})=>{a(N)},searchInputPlaceholder:(0,gu.__)("Paste or type URL")})]})]})})},Vk=(0,n_e.compose)([(0,JM.withDispatch)(e=>{let{createNotice:t,removeNotice:o}=e(s_e.store);return{createNotice:t,removeNotice:o}}),(0,Vi.withFilters)("editor.MediaReplaceFlow")])(tWe);var zr=c(H(),1),Fr=c(G(),1),Lm=c(F(),1),k_e=c(Z(),1);var __e=c(Tt(),1);var DG=c(G(),1),tN=c(F(),1),Fk=c(H(),1);var S_e=c(Tt(),1);var u_e=c(G(),1),d_e=c(H(),1);var l_e=c(H(),1),eN=c(As(),1),NG=c(E(),1);function c_e({url:e,urlLabel:t,className:o}){let r=W(o,"block-editor-url-popover__link-viewer-url");return e?(0,NG.jsx)(l_e.ExternalLink,{className:r,href:e,children:t||(0,eN.filterURLForDisplay)((0,eN.safeDecodeURI)(e))}):(0,NG.jsx)("span",{className:r})}var uE=c(E(),1);function f_e({className:e,linkClassName:t,onEditLinkClick:o,url:r,urlLabel:n,...i}){return(0,uE.jsxs)("div",{className:W("block-editor-url-popover__link-viewer",e),...i,children:[(0,uE.jsx)(c_e,{url:r,urlLabel:n,className:t}),o&&(0,uE.jsx)(d_e.Button,{icon:Dg,label:(0,u_e.__)("Edit"),onClick:o,size:"compact"})]})}var b_e=c(G(),1),y_e=c(H(),1);var Xd=c(G(),1),dE=c(F(),1),cc=c(oo(),1),Ss=c(H(),1),Im=c(fe(),1),p_e=c(Z(),1),m_e=c(As(),1);var hu=c(E(),1),g_e=c(le(),1),{ValidatedInputControl:oWe}=U(Ss.privateApis);function h_e(e){return typeof e=="function"}var rWe=class extends dE.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,dE.createRef)(),this.inputRef=e.inputRef||(0,dE.createRef)(),this.hasRenderedValidation={current:!1},this.updateSuggestions=(0,Im.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,m_e.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,Xd.sprintf)((0,Xd._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,Xd.__)("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 cc.UP:{e.target.selectionStart!==0&&(e.preventDefault(),e.target.setSelectionRange(0,0));break}case cc.DOWN:{this.props.value.length!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(this.props.value.length,this.props.value.length));break}case cc.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 cc.UP:{e.preventDefault();let s=o?o-1:r.length-1;this.setState({selectedSuggestion:s});break}case cc.DOWN:{e.preventDefault();let s=o===null||o===r.length-1?0:o+1;this.setState({selectedSuggestion:s});break}case cc.TAB:{this.state.selectedSuggestion!==null&&(this.selectLink(i),this.props.speak((0,Xd.__)("Link selected.")));break}case cc.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,hu.jsxs)(hu.Fragment,{children:[this.renderControl(),this.renderSuggestions()]})}renderControl(){let{label:e=null,className:t,isFullWidth:o,instanceId:r,placeholder:n=(0,Xd.__)("Paste URL or type to search"),__experimentalRenderControl:i,value:s="",hideLabelFromVision:a=!1,help:l=null,disabled:u=!1,customValidity:d,markWhenOptional:f}=this.props,{loading:p,showSuggestions:g,selectedSuggestion:m,suggestionsListboxId:h,suggestionOptionIdPrefix:b}=this.state,v=`url-input-control-${r}`,y={id:v,label:e,className:W("block-editor-url-input",t,{"is-full-width":o}),hideLabelFromVision:a},k={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,Xd.__)("URL"),"aria-expanded":g,"aria-autocomplete":"list","aria-owns":h,"aria-activedescendant":m!==null?`${b}-${m}`:void 0,ref:this.inputRef,disabled:u,suffix:this.props.suffix,help:l},S={customValidity:d,...f!==void 0&&{markWhenOptional:f}};if(i)return i(y,k,p);d!==void 0&&(this.hasRenderedValidation.current=!0);let _=this.hasRenderedValidation.current?oWe:Ss.__experimentalInputControl;return(0,hu.jsxs)(Ss.BaseControl,{...y,children:[(0,hu.jsx)(_,{...k,...this.hasRenderedValidation.current?S:{},__next40pxDefaultSize:!0}),p&&(0,hu.jsx)(Ss.Spinner,{})]})}renderSuggestions(){let{className:e,__experimentalRenderSuggestions:t}=this.props,{showSuggestions:o,suggestions:r,suggestionsValue:n,selectedSuggestion:i,suggestionsListboxId:s,suggestionOptionIdPrefix:a,loading:l}=this.state;if(!o||r.length===0)return null;let u={id:s,ref:this.autocompleteRef,role:"listbox"},d=(f,p)=>({role:"option",tabIndex:"-1",id:`${a}-${p}`,ref:this.bindSuggestionNode(p),"aria-selected":p===i?!0:void 0});return h_e(t)?t({suggestions:r,selectedSuggestion:i,suggestionsListProps:u,buildSuggestionItemProps:d,isLoading:l,handleSuggestionClick:this.handleOnClick,isInitialSuggestions:!n?.length,currentInputValue:n}):(0,hu.jsx)(Ss.Popover,{placement:"bottom",focusOnMount:!1,children:(0,hu.jsx)("div",{...u,className:W("block-editor-url-input__suggestions",{[`${e}__suggestions`]:e}),children:r.map((f,p)=>(0,g_e.createElement)(Ss.Button,{__next40pxDefaultSize:!0,...d(f,p),key:f.id,className:W("block-editor-url-input__suggestion",{"is-selected":p===i}),onClick:()=>this.handleOnClick(f)},f.title))})})}},Rm=(0,Im.compose)(Im.withSafeTimeout,Ss.withSpokenMessages,Im.withInstanceId,(0,p_e.withSelect)((e,t)=>{if(h_e(t.__experimentalFetchLinkSuggestions))return;let{getSettings:o}=e(C);return{__experimentalFetchLinkSuggestions:o().__experimentalFetchLinkSuggestions}}))(rWe);var fE=c(E(),1);function v_e({autocompleteRef:e,className:t,onChangeInputValue:o,value:r,...n}){return(0,fE.jsxs)("form",{className:W("block-editor-url-popover__link-editor",t),...n,children:[(0,fE.jsx)(Rm,{value:r,onChange:o,autocompleteRef:e}),(0,fE.jsx)(y_e.Button,{icon:Hu,label:(0,b_e.__)("Apply"),type:"submit",size:"compact"})]})}var Om=c(E(),1),{__experimentalPopoverLegacyPositionToPlacement:nWe}=U(Fk.privateApis),iWe="bottom",VG=(0,tN.forwardRef)(({additionalControls:e,children:t,renderSettings:o,placement:r,focusOnMount:n="firstElement",position:i,...s},a)=>{i!==void 0&&(0,S_e.default)("`position` prop in wp.blockEditor.URLPopover",{since:"6.2",alternative:"`placement` prop"});let l;r!==void 0?l=r:i!==void 0&&(l=nWe(i)),l=l||iWe;let[u,d]=(0,tN.useState)(!1),f=!!o&&u,p=()=>{d(!u)};return(0,Om.jsxs)(Fk.Popover,{ref:a,role:"dialog","aria-modal":"true","aria-label":(0,DG.__)("Edit URL"),className:"block-editor-url-popover",focusOnMount:n,placement:l,shift:!0,variant:"toolbar",...s,children:[(0,Om.jsx)("div",{className:"block-editor-url-popover__input-container",children:(0,Om.jsxs)("div",{className:"block-editor-url-popover__row",children:[t,!!o&&(0,Om.jsx)(Fk.Button,{className:"block-editor-url-popover__settings-toggle",icon:on,label:(0,DG.__)("Link settings"),onClick:p,"aria-expanded":u,size:"compact"})]})}),f&&(0,Om.jsx)("div",{className:"block-editor-url-popover__settings",children:o()}),e&&!f&&(0,Om.jsx)("div",{className:"block-editor-url-popover__additional-controls",children:e})]})});VG.LinkEditor=v_e;VG.LinkViewer=f_e;var Am=VG;var Gt=c(E(),1),sWe=()=>{},aWe=({src:e,onChange:t,onSubmit:o,onClose:r,popoverAnchor:n})=>(0,Gt.jsx)(Am,{anchor:n,onClose:r,children:(0,Gt.jsx)("form",{className:"block-editor-media-placeholder__url-input-form",onSubmit:o,children:(0,Gt.jsx)(zr.__experimentalInputControl,{label:(0,Fr.__)("URL"),type:"text",hideLabelFromVision:!0,placeholder:(0,Fr.__)("Paste or type URL"),onChange:t,value:e,suffix:(0,Gt.jsx)(zr.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,Gt.jsx)(zr.Button,{size:"small",icon:Hu,label:(0,Fr.__)("Apply"),type:"submit"})})})})}),lWe=({src:e,onChangeSrc:t,onSelectURL:o})=>{let[r,n]=(0,Lm.useState)(null),[i,s]=(0,Lm.useState)(!1),a=()=>{s(!0)},l=()=>{s(!1),r?.focus()},u=d=>{d.preventDefault(),e&&o&&(o(e),l())};return(0,Gt.jsxs)("div",{className:"block-editor-media-placeholder__url-input-container",children:[(0,Gt.jsx)(zr.Button,{__next40pxDefaultSize:!0,className:"block-editor-media-placeholder__button",onClick:a,isPressed:i,variant:"secondary","aria-haspopup":"dialog",ref:n,children:(0,Fr.__)("Insert from URL")}),i&&(0,Gt.jsx)(aWe,{src:e,onChange:t,onSubmit:u,onClose:l,popoverAnchor:r})]})};function cWe({value:e={},allowedTypes:t,className:o,icon:r,labels:n={},mediaPreview:i,notices:s,isAppender:a,accept:l,addToGallery:u,multiple:d=!1,handleUpload:f=!0,disableDropZone:p,disableMediaButtons:g,onError:m,onSelect:h,onCancel:b,onSelectURL:v,onToggleFeaturedImage:y,onDoubleClick:k,onFilesPreUpload:S=sWe,onHTMLDrop:_,children:x,mediaLibraryButton:w,placeholder:T,style:B}){_&&(0,__e.default)("wp.blockEditor.MediaPlaceholder onHTMLDrop prop",{since:"6.2",version:"6.4"});let{mediaUpload:R,allowedMimeTypes:A}=(0,k_e.useSelect)($=>{let{getSettings:q}=$(C),K=q();return{mediaUpload:K.mediaUpload,allowedMimeTypes:K.allowedMimeTypes}},[]),[O,P]=(0,Lm.useState)("");(0,Lm.useEffect)(()=>{P(e?.src??"")},[e?.src]);let L=(0,Lm.useMemo)(()=>QM(t,A,l),[t,A,l]),M=()=>!t||t.length===0?!1:t.every($=>$==="image"||$.startsWith("image/")),z=$=>{if(!f||typeof f=="function"&&!f($))return h($);S($);let q;if(d)if(u){let K=[];q=Q=>{let re=(e??[]).filter(se=>se.id?!K.some(({id:te})=>Number(te)===Number(se.id)):!K.some(({urlSlug:te})=>se.url.includes(te)));h(re.concat(Q)),K=Q.map(se=>{let te=se.url.lastIndexOf("."),ne=se.url.slice(0,te);return{id:se.id,urlSlug:ne}})}}else q=h;else q=([K])=>h(K);R({allowedTypes:t,filesList:$,onFileChange:q,onError:m,multiple:d})};async function V($){let{blocks:q}=TU($);if(!q?.length)return;let K=await Promise.all(q.map(Q=>{let re=Q.name.split("/")[1];return Q.attributes.id?(Q.attributes.type=re,Q.attributes):new Promise((se,te)=>{window.fetch(Q.attributes.url).then(ne=>ne.blob()).then(ne=>R({filesList:[ne],additionalData:{title:Q.attributes.title,alt_text:Q.attributes.alt,caption:Q.attributes.caption,type:re},onFileChange:([de])=>{de.id&&se(de)},allowedTypes:t,onError:te})).catch(()=>se(Q.attributes.url))})})).catch(Q=>m(Q));K?.length&&h(d?K:K[0])}let I=$=>{z($.target.files)},D=T??($=>{let{instructions:q,title:K}=n;if(!R&&!v&&(q=(0,Fr.__)("To edit this block, you need permission to upload media.")),q===void 0||K===void 0){let re=t??[],[se]=re,te=re.length===1,ne=te&&se==="audio",de=te&&se==="image",Se=te&&se==="video";q===void 0&&R&&(q=(0,Fr.__)("Drag and drop an image or video, upload, or choose from your library."),ne?q=(0,Fr.__)("Drag and drop an audio file, upload, or choose from your library."):de?q=(0,Fr.__)("Drag and drop an image, upload, or choose from your library."):Se&&(q=(0,Fr.__)("Drag and drop a video, upload, or choose from your library."))),K===void 0&&(K=(0,Fr.__)("Media"),ne?K=(0,Fr.__)("Audio"):de?K=(0,Fr.__)("Image"):Se&&(K=(0,Fr.__)("Video")))}let Q=W("block-editor-media-placeholder",o,{"is-appender":a});return(0,Gt.jsxs)(zr.Placeholder,{icon:r,label:K,instructions:q,className:Q,notices:s,onDoubleClick:k,preview:i,style:B,children:[$,x]})}),j=()=>p?null:(0,Gt.jsx)(zr.DropZone,{onFilesDrop:z,onDrop:V,isEligible:$=>{let q="wp-block:core/",K=[];for(let Q of $.types)Q.startsWith(q)&&K.push(Q.slice(q.length));return K.every(Q=>t.includes(Q))&&(d?!0:K.length===1)}}),Y=()=>b&&(0,Gt.jsx)(zr.Button,{__next40pxDefaultSize:!0,className:"block-editor-media-placeholder__cancel-button",title:(0,Fr.__)("Cancel"),variant:"link",onClick:b,children:(0,Fr.__)("Cancel")}),X=()=>v&&(0,Gt.jsx)(lWe,{src:O,onChangeSrc:P,onSelectURL:v}),ee=()=>y&&(0,Gt.jsx)("div",{className:"block-editor-media-placeholder__url-input-container",children:(0,Gt.jsx)(zr.Button,{__next40pxDefaultSize:!0,className:"block-editor-media-placeholder__button",onClick:y,variant:"secondary",children:(0,Fr.__)("Use featured image")})}),J=()=>{let q=w??(({open:Q})=>(0,Gt.jsx)(zr.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>{Q()},children:(0,Fr.__)("Media Library")})),K=(0,Gt.jsx)(tu,{addToGallery:u,gallery:d&&M(),multiple:d,onSelect:h,allowedTypes:t,mode:"browse",value:Array.isArray(e)?e.map(({id:Q})=>Q):e.id,render:q});if(R&&a)return(0,Gt.jsxs)(Gt.Fragment,{children:[j(),(0,Gt.jsx)(zr.FormFileUpload,{onChange:I,accept:L,multiple:!!d,render:({openFileDialog:Q})=>{let re=(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(zr.Button,{__next40pxDefaultSize:!0,variant:"primary",className:W("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onClick:Q,children:(0,Fr._x)("Upload","verb")}),K,X(),ee(),Y()]});return D(re)}})]});if(R){let Q=(0,Gt.jsxs)(Gt.Fragment,{children:[j(),(0,Gt.jsx)(zr.FormFileUpload,{render:({openFileDialog:re})=>(0,Gt.jsx)(zr.Button,{__next40pxDefaultSize:!0,onClick:re,variant:"primary",className:W("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),children:(0,Fr._x)("Upload","verb")}),onChange:I,accept:L,multiple:!!d}),K,X(),ee(),Y()]});return D(Q)}return D(K)};return g?(0,Gt.jsx)(Ws,{children:j()}):(0,Gt.jsx)(Ws,{fallback:D(X()),children:J()})}var x_e=(0,zr.withFilters)("editor.MediaPlaceholder")(cWe);var w_e=c(E(),1),uWe=({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,w_e.jsx)(xM,{settings:o,gradients:[],disableCustomGradients:!0,...t})},C_e=uWe;var Bxe=c(az(),1);var Pxe=c(F(),1);var Exe=c(F(),1);var vxe=c(wg(),1),Hn=c(F(),1),Jd=c(Z(),1),mN=c(fe(),1),Sxe=c(jo(),1),kxe=c(H(),1),_xe=c(ce(),1),xxe=c(Tt(),1),Kk=c(G(),1);var E_e=c(G(),1),oN=c(H(),1);var FG=c(G(),1),Lb=c(H(),1);var Qd=c(E(),1),dWe={placement:"bottom-start"},fWe=()=>(0,Qd.jsxs)(Qd.Fragment,{children:[["bold","italic","link","unknown"].map(e=>(0,Qd.jsx)(Lb.Slot,{name:`RichText.ToolbarControls.${e}`},e)),(0,Qd.jsx)(Lb.Slot,{name:"RichText.ToolbarControls",children:e=>{if(!e.length)return null;let o=e.map(([{props:r}])=>r).some(({isActive:r})=>r);return(0,Qd.jsx)(Lb.ToolbarItem,{children:r=>(0,Qd.jsx)(Lb.DropdownMenu,{icon:on,label:(0,FG.__)("More"),toggleProps:{...r,className:W(r.className,{"is-pressed":o}),description:(0,FG.__)("Displays more block tools")},controls:Pc(e.map(([{props:n}])=>n),"title"),popoverProps:dWe})})}})]}),zG=fWe;var Mm=c(E(),1);function pWe({popoverAnchor:e}){return(0,Mm.jsx)(oN.Popover,{placement:"top",focusOnMount:!1,anchor:e,className:"block-editor-rich-text__inline-format-toolbar",__unstableSlotName:"block-toolbar",children:(0,Mm.jsx)(ZS,{className:"block-editor-rich-text__inline-format-toolbar-group","aria-label":(0,E_e.__)("Format tools"),children:(0,Mm.jsx)(oN.ToolbarGroup,{children:(0,Mm.jsx)(zG,{})})})})}var mWe=({inline:e,editableContentElement:t})=>e?(0,Mm.jsx)(pWe,{popoverAnchor:t}):(0,Mm.jsx)(Po,{group:"inline",children:(0,Mm.jsx)(zG,{})}),T_e=mWe;var rN=c(F(),1),R_e=c(Z(),1);function B_e({html:e,value:t}){let o=(0,rN.useRef)(),r=!!t.activeFormats?.length,{__unstableMarkLastChangeAsPersistent:n}=(0,R_e.useDispatch)(C);(0,rN.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 Gk=c(F(),1),oxe=c(fe(),1);var Mb=c(jo(),1),P_e=c(uo(),1);var{subscribeOwnedListener:gWe}=U(Mb.privateApis),hWe=["`",'"',"'","\u201C\u201D","\u2018\u2019"],I_e=e=>t=>{function o(r){let{inputType:n,data:i}=r,{value:s,onChange:a,registry:l}=e.current;if(n!=="insertText"||(0,Mb.isCollapsed)(s))return;let u=(0,P_e.applyFilters)("blockEditor.wrapSelectionSettings",hWe).find(([_,x])=>_===i||x===i);if(!u)return;let[d,f=d]=u,p=s.start,g=s.end+d.length,m=(0,Mb.insert)(s,d,p,p);m=(0,Mb.insert)(m,f,g,g);let{__unstableMarkLastChangeAsPersistent:h,__unstableMarkAutomaticChange:b}=l.dispatch(C);h(),a(m),b();let v={};for(let _ in r)v[_]=r[_];v.data=f;let{ownerDocument:y}=t,{defaultView:k}=y,S=new k.InputEvent("input",v);window.queueMicrotask(()=>{t.dispatchEvent(S)}),r.preventDefault()}return gWe(t,"beforeinput",o,!0)};var jk=c(jo(),1),zk=c(ce(),1);var O_e=c(jo(),1);function A_e(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,O_e.insert)(e,o)}var{subscribeOwnedListener:L_e}=U(jk.privateApis);function M_e(e){let t=e.length;for(;t--;){let o=ew(e[t].attributes);if(o)return e[t].attributes[o]=e[t].attributes[o].toString().replace(Zu,""),[e[t].clientId,o,0,0];let r=M_e(e[t].innerBlocks);if(r)return r}return[]}var N_e=e=>t=>{function o(){let{getValue:s,onReplace:a,selectionChange:l,registry:u}=e.current;if(!a)return;let d=s(),{start:f,text:p}=d;if(p.slice(f-1,f)!==" ")return;let m=p.slice(0,f).trim(),h=(0,zk.getBlockTransforms)("from").filter(({type:k})=>k==="prefix"),b=(0,zk.findTransform)(h,({prefix:k})=>m===k);if(!b)return;let v=(0,jk.toHTMLString)({value:(0,jk.insert)(d,Zu,0,f)}),y=b.transform(v);return l(...M_e([y])),a([y]),u.dispatch(C).__unstableMarkAutomaticChange(),!0}function r(s){let{inputType:a,type:l}=s,{getValue:u,onChange:d,__unstableAllowPrefixTransformations:f,formatTypes:p,registry:g,onReplace:m}=e.current;if(a!=="insertText"&&l!=="compositionend"||f&&o())return;let h=u(),b=(0,zk.getBlockTransforms)("from").filter(_=>_.type==="input"),v=(0,zk.findTransform)(b,_=>_.regExp.test(h.text));if(v){m(v.transform()),g.dispatch(C).__unstableMarkAutomaticChange();return}let y=p.reduce((_,{__unstableInputRule:x})=>(x&&(_=x(_)),_),A_e(h)),{__unstableMarkLastChangeAsPersistent:k,__unstableMarkAutomaticChange:S}=g.dispatch(C);y!==h&&(k(),d({...y,activeFormats:h.activeFormats}),S())}let n=L_e(t,"input",r,!0),i=L_e(t,"compositionend",r,!0);return()=>{n(),i()}};var D_e=c(jo(),1);var{subscribeOwnedListener:bWe}=U(D_e.privateApis),V_e=e=>t=>{function o(r){if(r.inputType!=="insertReplacementText")return;let{registry:n}=e.current;n.dispatch(C).__unstableMarkLastChangeAsPersistent()}return bWe(t,"beforeinput",o)};var nN=c(oo(),1),F_e=c(jo(),1);var{subscribeOwnedListener:yWe}=U(F_e.privateApis),z_e=()=>e=>{function t(o){(nN.isKeyboardEvent.primary(o,"z")||nN.isKeyboardEvent.primary(o,"y")||nN.isKeyboardEvent.primaryShift(o,"z"))&&o.preventDefault()}return yWe(e,"keydown",t,!0)};var j_e=c(jo(),1);var{subscribeOwnedListener:vWe}=U(j_e.privateApis),H_e=e=>t=>{let{keyboardShortcuts:o}=e.current;function r(n){for(let i of o.current)i(n)}return vWe(t,"keydown",r,!0)};var U_e=c(jo(),1);var{subscribeOwnedListener:SWe}=U(U_e.privateApis),G_e=e=>t=>{let{inputEvents:o}=e.current;function r(n){for(let i of o.current)i(n)}return SWe(t,"input",r)};var iN=c(oo(),1),W_e=c(jo(),1);var{subscribeOwnedListener:kWe}=U(W_e.privateApis),$_e=e=>t=>{function o(r){let{keyCode:n}=r;if(r.defaultPrevented||n!==iN.BACKSPACE&&n!==iN.ESCAPE)return;let{registry:i}=e.current,{didAutomaticChange:s,getSettings:a}=i.select(C),{__experimentalUndo:l}=a();l&&s()&&(r.preventDefault(),l())}return kWe(t,"keydown",o)};var Y_e=c(ce(),1),ol=c(jo(),1),q_e=c(As(),1),Z_e=c(fe(),1);var _We=c(F(),1),xWe=c(ce(),1),wWe=c(E(),1);function K_e(e,t){if(t?.length){let o=e.formats.length;for(;o--;)e.formats[o]=[...t,...e.formats[o]||[]]}}function sN(e){if(!(e!==!0&&e!=="p"&&e!=="li"))return e===!0?"p":e}function Hk({allowedFormats:e,disableFormats:t}){return t?Hk.EMPTY_ARRAY:e}Hk.EMPTY_ARRAY=[];var{subscribeDelegatedListener:CWe}=U(Z_e.privateApis),{ownsSelection:EWe}=U(ol.privateApis),X_e=e=>t=>{function o(n){let{disableFormats:i,onChange:s,value:a,formatTypes:l,tagName:u,onReplace:d,__unstableEmbedURLOnPaste:f,preserveWhiteSpace:p,pastePlainText:g,registry:m}=e.current;if(!t.contains(n.target)&&!EWe(t)||n.defaultPrevented)return;let{plainText:h,html:b}=av(n);if(n.preventDefault(),window.console.log(`Received HTML (RichText):
`,b),window.console.log(`Received plain text (RichText):
`,h),i){s((0,ol.insert)(a,h));return}let v=n.clipboardData.getData("rich-text")==="true";function y(x){let w=l.reduce((T,{__unstablePasteRule:B})=>(B&&T===a&&(T=B(a,{html:b,plainText:h})),T),a);if(w!==a)s(w);else{let T=(0,ol.create)({html:x});K_e(T,a.activeFormats),s((0,ol.insert)(a,T))}}if(v){y(b);return}if(g){s((0,ol.insert)(a,(0,ol.create)({text:h})));return}let k="INLINE",S=h.trim();f&&(0,ol.isEmpty)(a)&&(0,q_e.isURL)(S)&&/^https?:/.test(S)&&(k="BLOCKS");let _=(0,Y_e.pasteHandler)({HTML:b,plainText:h,mode:k,tagName:u,preserveWhiteSpace:p});if(typeof _=="string"){y(_);return}!_.length||!d||!(0,ol.isEmpty)(a)||(k==="BLOCKS"&&(y(b),m.dispatch(C).__unstableMarkLastChangeAsPersistent()),d(_,_.length-1,-1))}let{defaultView:r}=t.ownerDocument;return CWe(r,"paste",o)};var pE=c(oo(),1),Uk=c(jo(),1);var{subscribeOwnedListener:TWe}=U(Uk.privateApis),Q_e=e=>t=>{function o(r){let{keyCode:n}=r;if(r.defaultPrevented)return;let{value:i,onMerge:s,onRemove:a}=e.current;if(n===pE.DELETE||n===pE.BACKSPACE){let{start:l,end:u,text:d}=i,f=n===pE.BACKSPACE,p=i.activeFormats&&!!i.activeFormats.length;if(!(0,Uk.isCollapsed)(i)||p||f&&l!==0||!f&&u!==d.length)return;s?s(!f):a&&(0,Uk.isEmpty)(i)&&f&&a(!f),r.preventDefault()}}return TWe(t,"keydown",o)};var jG=c(oo(),1),Nb=c(jo(),1),J_e=c(fe(),1);var{subscribeOwnedListener:RWe,ownsSelection:BWe}=U(Nb.privateApis),{subscribeDelegatedListener:PWe}=U(J_e.privateApis),exe=e=>t=>{function o(a){if(a.keyCode!==jG.ENTER)return;let{onReplace:l,onSplit:u}=e.current;l&&u&&(a.__deprecatedOnSplit=!0)}function r(a){if(a.defaultPrevented||a.target!==t&&!BWe(t)||a.keyCode!==jG.ENTER)return;let{value:l,onChange:u,disableLineBreaks:d,onSplitAtEnd:f,onSplitAtDoubleLineEnd:p,registry:g}=e.current;a.preventDefault();let{text:m,start:h,end:b}=l;a.shiftKey?d||u((0,Nb.insert)(l,`
`)):f&&h===b&&b===m.length?f():p&&h===b&&b===m.length&&m.slice(-2)===`
`?g.batch(()=>{let v={...l};v.start=v.end-2,u((0,Nb.remove)(v)),p()}):d||u((0,Nb.insert)(l,`
`))}let{defaultView:n}=t.ownerDocument,i=PWe(n,"keydown",r),s=RWe(t,"keydown",o,!0);return()=>{i(),s()}};var txe=e=>t=>{function o(){let{registry:r}=e.current;if(!r.select(C).isMultiSelecting())return;let n=t.parentElement.closest('[contenteditable="true"]');n&&n.focus()}return t.addEventListener("focus",o),()=>{t.removeEventListener("focus",o)}};var IWe=[I_e,N_e,V_e,z_e,H_e,G_e,$_e,X_e,Q_e,exe,txe];function aN(e){let t=(0,Gk.useRef)(e);(0,Gk.useInsertionEffect)(()=>{t.current=e});let o=(0,Gk.useMemo)(()=>IWe.map(r=>r(t)),[t]);return(0,oxe.useRefEffect)(r=>{if(!e.isSelected)return;let n=o.map(i=>i(r));return()=>{n.forEach(i=>i())}},[o,e.isSelected])}var lN=c(jo(),1),cN=c(F(),1);var rxe=c(E(),1),nxe=c(le(),1),OWe={},HG=Symbol("usesContext");function AWe({onChange:e,onFocus:t,value:o,forwardedRef:r,settings:n,isVisible:i}){let{name:s,edit:a,[HG]:l}=n,u=(0,cN.useContext)(Kn),d=(0,cN.useMemo)(()=>l?Object.fromEntries(Object.entries(u).filter(([h])=>l.includes(h))):OWe,[l,u]);if(!a)return null;let f=(0,lN.getActiveFormat)(o,s),p=f!==void 0,g=(0,lN.getActiveObject)(o),m=g!==void 0&&g.type===s;return(0,rxe.jsx)(a,{isActive:p,isVisible:i,activeAttributes:p?f.attributes||{}:{},isObjectActive:m,activeObjectAttributes:m?g.attributes||{}:{},value:o,onChange:e,onFocus:t,contentRef:r,context:d},s)}function uN({formatTypes:e,...t}){return e.map(o=>(0,nxe.createElement)(AWe,{settings:o,...t,key:o.name}))}var ixe=c(F(),1),sxe=c(ce(),1),axe=c(Tt(),1);var UG=c(E(),1);function GG(e,t){if(Wk.isEmpty(e)){let o=sN(t);return o?`<${o}></${o}>`:""}return Array.isArray(e)?((0,axe.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/"}),sxe.children.toHTML(e)):typeof e=="string"?e:e.toHTMLString()}function mE({value:e,tagName:t,multiline:o,format:r,...n}){return e=(0,UG.jsx)(ixe.RawHTML,{children:GG(e,o)}),t?(0,UG.jsx)(t,{...n,children:e}):e}var fxe=c(F(),1),$G=c(ce(),1),pxe=c(jo(),1),mxe=c(Tt(),1);var lxe=c(F(),1),cxe=c(Tt(),1),dN=c(Z(),1),uxe=c(oo(),1),$k=c(jo(),1);var WG=c(E(),1);function LWe({children:e,identifier:t,tagName:o="div",value:r="",onChange:n,multiline:i,...s},a){(0,cxe.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:l}=ht(),{getSelectionStart:u,getSelectionEnd:d}=(0,dN.useSelect)(C),{selectionChange:f}=(0,dN.useDispatch)(C),p=sN(i);r=r||`<${p}></${p}>`;let m=`</${p}>${r}<${p}>`.split(`</${p}><${p}>`);m.shift(),m.pop();function h(b){n(`<${p}>${b.join(`</${p}><${p}>`)}</${p}>`)}return(0,WG.jsx)(o,{ref:a,children:m.map((b,v)=>(0,WG.jsx)(fN,{identifier:`${t}-${v}`,tagName:p,value:b,onChange:y=>{let k=m.slice();k[v]=y,h(k)},isSelected:void 0,onKeyDown:y=>{if(y.keyCode!==uxe.ENTER)return;y.preventDefault();let{offset:k}=u(),{offset:S}=d();if(typeof k!="number"||typeof S!="number")return;let _=(0,$k.create)({html:b});_.start=k,_.end=S;let x=(0,$k.split)(_).map(T=>(0,$k.toHTMLString)({value:T})),w=m.slice();w.splice(v,1,...x),h(w),f(l,`${t}-${v+1}`,0,0)},onMerge:y=>{let k=m.slice(),S=0;if(y){if(!k[v+1])return;k.splice(v,2,k[v]+k[v+1]),S=k[v].length-1}else{if(!k[v-1])return;k.splice(v-1,2,k[v-1]+k[v]),S=k[v-1].length-1}h(k),f(l,`${t}-${v-(y?0:1)}`,S,S)},...s},v))})}var dxe=(0,lxe.forwardRef)(LWe);var gxe=c(E(),1);function hxe(e){return(0,fxe.forwardRef)((t,o)=>{let r=t.value,n=t.onChange;Array.isArray(r)&&((0,mxe.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=$G.children.toHTML(t.value),n=s=>t.onChange($G.children.fromDOM((0,pxe.__unstableCreateElement)(document,s).childNodes)));let i=t.multiline?dxe:e;return(0,gxe.jsx)(i,{...t,value:r,onChange:n,ref:o})})}var pN=c(H(),1),bxe=c(oo(),1),KG=c(E(),1);function YG({name:e,shortcutType:t,shortcutCharacter:o,...r}){let n,i="RichText.ToolbarControls";return e&&(i+=`.${e}`),t&&o&&(n=bxe.displayShortcut[t](o)),(0,KG.jsx)(pN.Fill,{name:i,children:(0,KG.jsx)(pN.ToolbarButton,{...r,shortcut:n})})}var ia=c(E(),1),{useRichText:MWe,KeyboardShortcutContext:NWe,InputEventContext:DWe,RichTextShortcut:wxe,RichTextInputEvent:Cxe}=U(Sxe.privateApis),yxe=Symbol("instanceId");function fN({children:e,tagName:t="div",value:o="",onChange:r,isSelected:n,multiline:i,inlineToolbar:s,wrapperClassName:a,autocompleters:l,onReplace:u,placeholder:d,allowedFormats:f,withoutInteractiveFormatting:p,onRemove:g,onMerge:m,onSplit:h,__unstableOnSplitAtEnd:b,__unstableOnSplitAtDoubleLineEnd:v,identifier:y,preserveWhiteSpace:k,__unstablePastePlainText:S,__unstableEmbedURLOnPaste:_,__unstableDisableFormats:x,disableLineBreaks:w,__unstableAllowPrefixTransformations:T,readOnly:B,...R},A){h&&(0,xxe.default)("wp.blockEditor.RichText onSplit prop",{since:"6.4",alternative:'block.json support key: "splitting"'});let O=(0,mN.useInstanceId)(fN),P=(0,Hn.useRef)(),[L,M]=(0,Hn.useState)(null),z=ht(),{clientId:V,isSelected:I,name:N}=z,D=z[fy],j=(0,Hn.useContext)(Kn),Y=(0,Jd.useRegistry)(),X=at=>{if(!I)return{isSelected:!1};let{getSelectionStart:Be,getSelectionEnd:Te}=at(C),Ne=Be(),$e=Te(),ot;return n===void 0?ot=Ne.clientId===V&&$e.clientId===V&&(y?Ne.attributeKey===y:Ne[yxe]===O):n&&(ot=Ne.clientId===V),{selectionStart:ot?Ne.offset:void 0,selectionEnd:ot?$e.offset:void 0,isSelected:ot}},{selectionStart:ee,selectionEnd:J,isSelected:$}=(0,Jd.useSelect)(X,[V,y,O,n,I]),{disableBoundBlock:q,bindingsPlaceholder:K,bindingsLabel:Q}=(0,Jd.useSelect)(at=>{if(!D?.[y])return{};let{__experimentalBlockBindingsSupportedAttributes:Be}=at(C).getSettings();if(!Be?.[N])return{};let Ne=D[y],$e=(0,_xe.getBlockBindingsSource)(Ne.source),ot={};if($e?.usesContext?.length)for(let Fo of $e.usesContext)ot[Fo]=j[Fo];let Ot=!$e?.canUserEditValue?.({select:at,context:ot,args:Ne.args});if(o.length>0)return{disableBoundBlock:Ot,bindingsPlaceholder:null,bindingsLabel:null};let{getBlockAttributes:At}=at(C),gt=At(V),Zo=null;$e?.getFieldsList&&(Zo=$e.getFieldsList({select:at,context:ot})?.find(qi=>(0,vxe.default)(qi.args,Ne?.args))?.label);let Kt=Zo??$e?.label,De=Ot?Kt:(0,Kk.sprintf)((0,Kk.__)("Add %s"),Kt),wt=Ot?Ne?.args?.key||$e?.label:(0,Kk.sprintf)((0,Kk.__)("Empty %s; start writing to edit its value"),Ne?.args?.key||$e?.label);return{disableBoundBlock:Ot,bindingsPlaceholder:gt?.placeholder||De,bindingsLabel:wt}},[D,y,N,o,V,j]),re=!!j?.["pattern/overrides"],se=D?.__default?.source==="core/pattern-overrides",ne=B||q||re&&!se,de=i7(),Se=(0,Jd.useSelect)(at=>at(C).getBlockEditingMode(V)==="default",[V]),{getSelectionStart:Ee,getSelectionEnd:ve,getBlockRootClientId:be}=(0,Jd.useSelect)(C),{selectionChange:ge}=(0,Jd.useDispatch)(C),he=Hk({allowedFormats:f,disableFormats:x}),ye=!he||he.length>0,_e=(0,Hn.useCallback)((at,Be)=>{let Te={},Ne=at===void 0&&Be===void 0,$e={clientId:V,[y?"attributeKey":yxe]:y||O};if(typeof at=="number"||Ne){if(Be===void 0&&be(V)!==be(ve().clientId))return;Te.start={...$e,offset:at}}if(typeof Be=="number"||Ne){if(at===void 0&&be(V)!==be(Ee().clientId))return;Te.end={...$e,offset:Be}}ge(Te)},[V,be,ve,Ee,y,O,ge]),{value:we,getValue:ie,onChange:oe,ref:Ae,formatTypes:me}=MWe({value:o,onChange:r,selectionStart:ee,selectionEnd:J,onSelectionChange:_e,placeholder:K||d,__unstableIsSelected:$,__unstableDisableFormats:x,preserveWhiteSpace:k,__unstableDependencies:[t],allowedFormats:he,withoutInteractiveFormatting:p,__unstableFormatTypeHandlerContext:(0,Hn.useMemo)(()=>({richTextIdentifier:y,blockClientId:V}),[y,V])}),xe=HZ({onReplace:u,completers:l,record:we,onChange:oe}),{"aria-autocomplete":nt,"aria-owns":ut,"aria-activedescendant":it}=xe;(0,Hn.useEffect)(()=>{if(!de||!$)return;let at=P.current?.parentElement?.closest('[contenteditable="true"]');if(!at)return;let Be={"aria-autocomplete":nt,"aria-owns":ut,"aria-activedescendant":it};for(let[Te,Ne]of Object.entries(Be))Ne===void 0?at.removeAttribute(Te):at.setAttribute(Te,Ne);return()=>{for(let Te of Object.keys(Be))at.removeAttribute(Te)}},[de,$,nt,ut,it]),B_e({html:o,value:we});let xt=(0,Hn.useRef)(new Set),tt=(0,Hn.useRef)(new Set);function $t(){P.current?.focus()}let dt=R.tabIndex;ne||(de&&Se&&I?dt=R.tabIndex??0:de&&R.tabIndex===0&&(dt=null));let co=t;return(0,ia.jsxs)(ia.Fragment,{children:[$&&(0,ia.jsx)(NWe.Provider,{value:xt,children:(0,ia.jsx)(DWe.Provider,{value:tt,children:(0,ia.jsxs)(kxe.Popover.__unstableSlotNameProvider,{value:"__unstable-block-tools-after",children:[e&&e({value:we,onChange:oe,onFocus:$t}),(0,ia.jsx)(uN,{value:we,onChange:oe,onFocus:$t,formatTypes:me,forwardedRef:P})]})})}),$&&ye&&(0,ia.jsx)(T_e,{inline:s,editableContentElement:L}),(0,ia.jsx)(co,{role:"textbox","aria-multiline":!w,"aria-readonly":ne,...R,draggable:void 0,"aria-label":Q||R["aria-label"]||d,...xe,ref:(0,mN.useMergeRefs)([Ae,A,xe.ref,R.ref,aN({registry:Y,getValue:ie,onChange:oe,__unstableAllowPrefixTransformations:T,formatTypes:me,onReplace:u,selectionChange:ge,isSelected:$,disableFormats:x,value:we,tagName:t,onSplit:h,__unstableEmbedURLOnPaste:_,pastePlainText:S,onMerge:m,onRemove:g,disableLineBreaks:w,onSplitAtEnd:b,onSplitAtDoubleLineEnd:v,keyboardShortcuts:xt,inputEvents:tt}),P,M]),contentEditable:!ne,suppressContentEditableWarning:!0,className:W("block-editor-rich-text__editable",R.className,"rich-text"),tabIndex:dt,"data-wp-block-attribute-key":y})]})}var gE=hxe((0,Hn.forwardRef)(fN));gE.Content=mE;gE.isEmpty=e=>!e||e.length===0;var qG=(0,Hn.forwardRef)((e,t)=>{if(ht()[k1]){let{children:n,tagName:i="div",value:s,onChange:a,isSelected:l,multiline:u,inlineToolbar:d,wrapperClassName:f,autocompleters:p,onReplace:g,placeholder:m,allowedFormats:h,withoutInteractiveFormatting:b,onRemove:v,onMerge:y,onSplit:k,__unstableOnSplitAtEnd:S,__unstableOnSplitAtDoubleLineEnd:_,identifier:x,preserveWhiteSpace:w,__unstablePastePlainText:T,__unstableEmbedURLOnPaste:B,__unstableDisableFormats:R,disableLineBreaks:A,__unstableAllowPrefixTransformations:O,readOnly:P,...L}=e;return(0,ia.jsx)(i,{ref:t,...L,dangerouslySetInnerHTML:{__html:GG(s,u)||"<br>"}})}return(0,ia.jsx)(gE,{ref:t,...e,readOnly:!1})});qG.Content=mE;qG.isEmpty=e=>!e||e.length===0;var Wk=qG;var ZG=c(E(),1),Txe=(0,Exe.forwardRef)((e,t)=>(0,ZG.jsx)(Wk,{ref:t,...e,__unstableDisableFormats:!0}));Txe.Content=function({value:t="",tagName:o="div",...r}){return(0,ZG.jsx)(o,{...r,children:t})};var Rxe=Txe;var XG=c(E(),1),VWe=(0,Pxe.forwardRef)(({__experimentalVersion:e,...t},o)=>{if(e===2)return(0,XG.jsx)(Rxe,{ref:o,...t});let{className:r,onChange:n,...i}=t;return(0,XG.jsx)(Bxe.default,{ref:o,className:W("block-editor-plain-text",r),onChange:s=>n(s.target.value),...i})}),Ixe=VWe;var bu=c(G(),1),Axe=c(F(),1),Lxe=c(H(),1);var Oxe=c(fe(),1);var gN=c(G(),1),Nm=c(E(),1);function hN({property:e,viewport:t,desc:o}){let r=(0,Oxe.useInstanceId)(hN),n=o||(0,gN.sprintf)((0,gN._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,Nm.jsxs)(Nm.Fragment,{children:[(0,Nm.jsx)("span",{"aria-describedby":`rbc-desc-${r}`,children:t.label}),(0,Nm.jsx)(pt,{id:`rbc-desc-${r}`,render:(0,Nm.jsx)("span",{}),children:n})]})}var yu=c(E(),1);function FWe(e){let{title:t,property:o,toggleLabel:r,onIsResponsiveChange:n,renderDefaultControl:i,renderResponsiveControls:s,isResponsive:a=!1,defaultLabel:l={id:"all",label:(0,bu._x)("All","screen sizes")},viewports:u=[{id:"small",label:(0,bu.__)("Small screens")},{id:"medium",label:(0,bu.__)("Medium screens")},{id:"large",label:(0,bu.__)("Large screens")}]}=e;if(!t||!o||!i)return null;let d=r||(0,bu.sprintf)((0,bu.__)("Use the same %s on all screen sizes."),o),f=(0,bu.__)("Choose whether to use the same value for all screen sizes or a unique value for each screen size."),p=i((0,yu.jsx)(hN,{property:o,viewport:l}),l),g=()=>u.map(m=>(0,yu.jsx)(Axe.Fragment,{children:i((0,yu.jsx)(hN,{property:o,viewport:m}),m)},m.id));return(0,yu.jsxs)("fieldset",{className:"block-editor-responsive-block-control",children:[(0,yu.jsx)("legend",{className:"block-editor-responsive-block-control__title",children:t}),(0,yu.jsxs)("div",{className:"block-editor-responsive-block-control__inner",children:[(0,yu.jsx)(Lxe.ToggleControl,{className:"block-editor-responsive-block-control__toggle",label:d,checked:!a,onChange:n,help:f}),(0,yu.jsxs)("div",{className:W("block-editor-responsive-block-control__group",{"is-responsive":a}),children:[!a&&p,a&&(s?s(u):g())]})]})]})}var Mxe=FWe;var bN=c(H(),1);var Nxe=c(E(),1);function Dxe({units:e,...t}){let[o]=Me("spacing.units"),r=(0,bN.__experimentalUseCustomUnits)({availableUnits:o||["%","px","em","rem","vw"],units:e});return(0,Nxe.jsx)(bN.__experimentalUnitControl,{units:r,...t})}var hE=c(G(),1),Vxe=c(F(),1),Yk=c(H(),1);var vu=c(E(),1);function zWe({url:e,onChange:t}){let[o,r]=(0,Vxe.useReducer)(i=>!i,!1),n=i=>{i.preventDefault(),r()};return(0,vu.jsxs)("div",{className:"block-editor-url-input__button",children:[(0,vu.jsx)(Yk.Button,{size:"compact",icon:Ji,label:e?(0,hE.__)("Edit link"):(0,hE.__)("Insert link"),onClick:r,className:"components-toolbar__control",isPressed:!!e}),o&&(0,vu.jsx)("form",{className:"block-editor-url-input__button-modal",onSubmit:n,children:(0,vu.jsxs)("div",{className:"block-editor-url-input__button-modal-line",children:[(0,vu.jsx)(Yk.Button,{__next40pxDefaultSize:!0,className:"block-editor-url-input__back",icon:sx,label:(0,hE.__)("Close"),onClick:r}),(0,vu.jsx)(Rm,{value:e||"",onChange:t,suffix:(0,vu.jsx)(Yk.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,vu.jsx)(Yk.Button,{size:"small",icon:Hu,label:(0,hE.__)("Submit"),type:"submit"})})})]})})]})}var Fxe=zWe;var ks=c(G(),1),rl=c(F(),1),Gxe=c(Et(),1),ln=c(H(),1);var Wxe=c(As(),1);var Co=c(E(),1),QG="none",zxe="custom",jxe="media",Hxe="attachment",Uxe=["noopener"],$xe=({linkDestination:e,onChangeUrl:t,url:o,mediaType:r="image",mediaUrl:n,mediaLink:i,linkTarget:s,linkClass:a,rel:l,showLightboxSetting:u,lightboxEnabled:d,onSetLightbox:f,resetLightbox:p})=>{let[g,m]=(0,rl.useState)(!1),[h,b]=(0,rl.useState)(null),v=()=>{m(!0)},[y,k]=(0,rl.useState)(!1),[S,_]=(0,rl.useState)(null),x=(0,rl.useRef)(null),w=(0,rl.useRef)();(0,rl.useEffect)(()=>{if(!w.current)return;(Gxe.focus.focusable.find(w.current)[0]||w.current).focus()},[y,o,d]);let T=()=>{(e===jxe||e===Hxe)&&_(""),k(!0)},B=()=>{k(!1)},R=()=>{_(null),B(),m(!1)},A=$=>{let q=$?"_blank":void 0,K;if(q){let Q=(l??"").split(" ");Uxe.forEach(re=>{Q.includes(re)||Q.push(re)}),K=Q.join(" ")}else{let Q=(l??"").split(" ").filter(re=>Uxe.includes(re)===!1);K=Q.length?Q.join(" "):void 0}return{linkTarget:q,rel:K}},O=()=>$=>{let q=x.current;q&&q.contains($.target)||(m(!1),_(null),B())},P=()=>$=>{if(S){let q=M().find(K=>K.url===S)?.linkDestination||zxe;t({href:(0,Wxe.prependHTTPS)(S),linkDestination:q,lightbox:{enabled:!1}})}B(),_(null),$.preventDefault()},L=()=>{t({linkDestination:QG,href:""})},M=()=>{let $=[{linkDestination:jxe,title:(0,ks.__)("Link to image file"),url:r==="image"?n:void 0,icon:mx}];return r==="image"&&i&&$.push({linkDestination:Hxe,title:(0,ks.__)("Link to attachment page"),url:r==="image"?i:void 0,icon:Ng}),$},z=$=>{let q=M(),K;$?K=(q.find(Q=>Q.url===$)||{linkDestination:zxe}).linkDestination:K=QG,t({linkDestination:K,href:$})},V=$=>{let q=A($);t(q)},I=$=>{t({rel:$})},N=$=>{t({linkClass:$})},D=(0,Co.jsxs)(ln.__experimentalVStack,{spacing:"3",children:[(0,Co.jsx)(ln.ToggleControl,{label:(0,ks.__)("Open in new tab"),onChange:V,checked:s==="_blank"}),(0,Co.jsx)(ln.TextControl,{label:(0,ks.__)("Link relation"),value:l??"",onChange:I,help:(0,rl.createInterpolateElement)((0,ks.__)("The <a>Link Relation</a> attribute defines the relationship between a linked resource and the current document."),{a:(0,Co.jsx)(ln.ExternalLink,{href:"https://developer.mozilla.org/docs/Web/HTML/Attributes/rel"})})}),(0,Co.jsx)(ln.TextControl,{label:(0,ks.__)("Link CSS class"),value:a||"",onChange:N})]}),j=S!==null?S:o,Y=!d||d&&!u,X=!j&&Y,ee=(M().find($=>$.linkDestination===e)||{}).title,J=()=>{if(d&&u&&!o&&!y)return(0,Co.jsxs)("div",{className:"block-editor-url-popover__expand-on-click",children:[(0,Co.jsx)(ft,{icon:wT}),(0,Co.jsxs)("div",{className:"text",children:[(0,Co.jsx)("p",{children:(0,ks.__)("Enlarge on click")}),(0,Co.jsx)("p",{className:"description",children:(0,ks.__)("Scales the image with a lightbox effect")})]}),(0,Co.jsx)(ln.Button,{icon:Qi,label:(0,ks.__)("Disable enlarge on click"),onClick:()=>{f?.(!1)},size:"compact"})]});if(!o||y)return(0,Co.jsx)(Am.LinkEditor,{className:"block-editor-format-toolbar__link-container-content",value:j,onChangeInputValue:_,onSubmit:P(),autocompleteRef:x});if(o&&!y)return(0,Co.jsxs)(Co.Fragment,{children:[(0,Co.jsx)(Am.LinkViewer,{className:"block-editor-format-toolbar__link-container-content",url:o,onEditLinkClick:T,urlLabel:ee}),(0,Co.jsx)(ln.Button,{icon:Qi,label:(0,ks.__)("Remove link"),onClick:()=>{L(),p?.()},size:"compact"})]})};return(0,Co.jsxs)(Co.Fragment,{children:[(0,Co.jsx)(ln.ToolbarButton,{icon:Ji,className:"components-toolbar__control",label:(0,ks.__)("Link"),"aria-expanded":g,onClick:v,ref:b,isActive:!!o||d&&u}),g&&(0,Co.jsx)(Am,{ref:w,anchor:h,onFocusOutside:O(),onClose:R,renderSettings:Y?()=>D:null,additionalControls:X&&(0,Co.jsxs)(ln.NavigableMenu,{children:[M().map($=>(0,Co.jsx)(ln.MenuItem,{icon:$.icon,iconPosition:"left",onClick:()=>{_(null),z($.url),B()},children:$.title},$.linkDestination)),u&&(0,Co.jsx)(ln.MenuItem,{className:"block-editor-url-popover__expand-on-click",icon:wT,info:(0,ks.__)("Scale the image with a lightbox effect."),iconPosition:"left",onClick:()=>{_(null),t({linkDestination:QG,href:""}),f?.(!0),B()},children:(0,ks.__)("Enlarge on click")},"expand-on-click")]}),offset:13,children:J()})]})};var Zk=c(H(),1),swe=c(F(),1),SN=c(G(),1);var Kxe=c(F(),1),eW=c(G(),1);var JG=[],jWe=new Intl.Collator("und",{numeric:!0}).compare;function yN(){let[e,t,o,r]=Me("spacing.spacingSizes.custom","spacing.spacingSizes.theme","spacing.spacingSizes.default","spacing.defaultSpacingSizes"),n=e??JG,i=t??JG,s=o&&r!==!1?o:JG;return(0,Kxe.useMemo)(()=>{let a=[{name:(0,eW.__)("None"),slug:"0",size:0},...n,...i,...s];return a.every(({slug:l})=>/^[0-9]/.test(l))&&a.sort((l,u)=>jWe(l.slug,u.slug)),a.length>GZ?[{name:(0,eW.__)("Default"),slug:"default",size:void 0},...a]:a},[n,i,s])}var Yxe=c(F(),1),qxe=c(Z(),1),vN=c(G(),1),Zxe=c(H(),1);var Xxe=c(E(),1),HWe={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 qk({icon:e,isMixed:t=!1,minimumCustomValue:o,onChange:r,onMouseOut:n,onMouseOver:i,showSideInLabel:s=!0,side:a,spacingSizes:l,type:u,value:d,...f}){let p=(0,qxe.useSelect)(S=>S(C).getSettings()?.disableCustomSpacingSizes),[g]=Me("spacing.units"),m=(0,Zxe.__experimentalUseCustomUnits)({availableUnits:g||["px","em","rem"]}),h=(0,Yxe.useMemo)(()=>l?.map(S=>({name:S.name,slug:S.slug,size:S.size}))||[],[l]),b=(Jf.includes(a)||["vertical","horizontal"].includes(a))&&s?Oc[a]:"",v=s?u?.toLowerCase():u,y=(0,vN.sprintf)((0,vN._x)("%1$s %2$s","spacing"),b,v).trim(),k=m[0]?.value||"px";return(0,Xxe.jsx)(vb,{allowNegativeOnDrag:o<0,ariaLabel:y,className:"spacing-sizes-control",customValueSettings:HWe,disableCustomValues:p,icon:e,isMixed:t,minimumCustomValue:o,onChange:r,onMouseOut:n,onMouseOver:i,presets:h,presetType:"spacing",selectedUnit:k,units:m,value:d,...f})}var bE=c(E(),1),Qxe=["vertical","horizontal"];function Jxe({minimumCustomValue:e,onChange:t,onMouseOut:o,onMouseOver:r,sides:n,spacingSizes:i,type:s,values:a}){let l=d=>f=>{if(!t)return;let p={...Object.keys(a).reduce((g,m)=>(g[m]=$y(a[m],i),g),{})};d==="vertical"&&(p.top=f,p.bottom=f),d==="horizontal"&&(p.left=f,p.right=f),t(p)},u=n?.length?Qxe.filter(d=>U6(n,d)):Qxe;return(0,bE.jsx)(bE.Fragment,{children:u.map(d=>{let f=d==="vertical"?a.top:a.left;return(0,bE.jsx)(qk,{icon:CB[d],label:Oc[d],minimumCustomValue:e,onChange:l(d),onMouseOut:o,onMouseOver:r,side:d,spacingSizes:i,type:s,value:f,withInputField:!1},`spacing-sizes-control-${d}`)})})}var yE=c(E(),1);function ewe({minimumCustomValue:e,onChange:t,onMouseOut:o,onMouseOver:r,sides:n,spacingSizes:i,type:s,values:a}){let l=n?.length?Jf.filter(d=>n.includes(d)):Jf,u=d=>f=>{let p={...Object.keys(a).reduce((g,m)=>(g[m]=$y(a[m],i),g),{})};p[d]=f,t(p)};return(0,yE.jsx)(yE.Fragment,{children:l.map(d=>(0,yE.jsx)(qk,{icon:CB[d],label:Oc[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 twe=c(E(),1);function owe({minimumCustomValue:e,onChange:t,onMouseOut:o,onMouseOver:r,showSideInLabel:n,side:i,spacingSizes:s,type:a,values:l}){let u=d=>f=>{let p={...Object.keys(l).reduce((g,m)=>(g[m]=$y(l[m],s),g),{})};p[d]=f,t(p)};return(0,twe.jsx)(qk,{label:Oc[i],minimumCustomValue:e,onChange:u(i),onMouseOut:o,onMouseOver:r,showSideInLabel:n,side:i,spacingSizes:s,type:a,value:l[i],withInputField:!1})}var rwe=c(H(),1);var tW=c(G(),1),nwe=c(E(),1);function iwe({isLinked:e,...t}){let o=e?(0,tW.__)("Unlink sides"):(0,tW.__)("Link sides");return(0,nwe.jsx)(rwe.Button,{...t,size:"small",icon:e?Ji:Qi,iconSize:24,label:o})}var Su=c(E(),1);function Xk({inputProps:e,label:t,minimumCustomValue:o=0,onChange:r,onMouseOut:n,onMouseOver:i,showSideInLabel:s=!0,sides:a=Jf,useSelect:l,values:u}){let d=yN(),f=u||WZ,p=a?.length===1,g=a?.includes("horizontal")&&a?.includes("vertical")&&a?.length===2,[m,h]=(0,swe.useState)(KZ(f,a)),b=()=>{h(m===Qu.axial?Qu.custom:Qu.axial)},y={...e,minimumCustomValue:o,onChange:x=>{let w={...u,...x};r(w)},onMouseOut:n,onMouseOver:i,sides:a,spacingSizes:d,type:t,useSelect:l,values:f},k=()=>m===Qu.axial?(0,Su.jsx)(Jxe,{...y}):m===Qu.custom?(0,Su.jsx)(ewe,{...y}):(0,Su.jsx)(owe,{side:m,...y,showSideInLabel:s}),S=Jf.includes(m)&&s?Oc[m]:"",_=(0,SN.sprintf)((0,SN._x)("%1$s %2$s","spacing"),t,S).trim();return(0,Su.jsxs)("fieldset",{className:"spacing-sizes-control",children:[(0,Su.jsxs)(Zk.__experimentalHStack,{className:"spacing-sizes-control__header",children:[(0,Su.jsx)(Zk.BaseControl.VisualLabel,{as:"legend",className:"spacing-sizes-control__label",children:_}),!p&&!g&&(0,Su.jsx)(iwe,{label:t,onClick:b,isLinked:m===Qu.axial})]}),(0,Su.jsx)(Zk.__experimentalVStack,{spacing:.5,children:k()})]})}var awe=c(Tt(),1);function lwe(){return(0,awe.default)("wp.blockEditor.PreviewOptions",{version:"6.5"}),null}var cwe=c(Tt(),1);function uwe(){(0,cwe.default)("wp.blockEditor.useResizeCanvas",{since:"7.1",hint:"Device preview is now handled by the editor canvas. This hook no longer does anything."})}var ji=c(G(),1),y_=c(ce(),1),v_=c(H(),1),DE=c(Z(),1),MCe=c(F(),1);var Qk=c(H(),1),kN=c(G(),1),_N=c(Z(),1),xN=c(ce(),1);var Db=c(E(),1);function UWe({block:e,onNavigateToEntityRecord:t,isSyncedPattern:o,isTemplatePartBlock:r}){let n=e?.attributes||{};return(0,Db.jsx)(Qk.__experimentalVStack,{className:"block-editor-block-inspector-edit-contents",expanded:!0,children:(0,Db.jsx)(Qk.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,l=s&&a?`${s}//${a}`:null;l&&t({postId:l,postType:"wp_template_part"})}},children:(0,kN.__)("Edit original")})})}function GWe({clientId:e,editedContentOnlySection:t,editContentOnlySection:o,stopEditingContentOnlySection:r}){let{selectBlock:n}=(0,_N.useDispatch)(C);return(0,Db.jsx)(Qk.__experimentalVStack,{className:"block-editor-block-inspector-edit-contents",expanded:!0,children:(0,Db.jsx)(Qk.Button,{className:"block-editor-block-inspector-edit-contents__button",__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>{t?(r(),n(e)):(o(e),n(e))},children:t?(0,kN.__)("Exit pattern"):(0,kN.__)("Edit pattern")})})}function dwe({clientId:e}){let{isWithinSection:t,isWithinEditedSection:o,editedContentOnlySection:r,editContentOnlySection:n,stopEditingContentOnlySection:i}=yL(e),{block:s,onNavigateToEntityRecord:a,canEdit:l}=(0,_N.useSelect)(p=>{let{getBlock:g,getSettings:m,canEditBlock:h}=p(C);return{block:g(e),onNavigateToEntityRecord:m().onNavigateToEntityRecord,canEdit:h(e)}},[e]);if(!l||!t&&!o)return null;let u=(0,xN.isReusableBlock)(s),d=(0,xN.isTemplatePart)(s);return(u||d)&&a?(0,Db.jsx)(UWe,{block:s,onNavigateToEntityRecord:a,isSyncedPattern:u,isTemplatePartBlock:d}):(0,Db.jsx)(GWe,{clientId:e,editedContentOnlySection:r,editContentOnlySection:n,stopEditingContentOnlySection:i})}var fwe=c(Z(),1),pwe=c(G(),1),mwe=c(H(),1),gwe=c(F(),1);var hwe=c(E(),1);function wN(){let e=(0,fwe.useSelect)(r=>r(C).getBlockSelectionStart(),[]),t=(0,gwe.useRef)();return Zg(e,t),e?(0,hwe.jsx)(mwe.Button,{__next40pxDefaultSize:!0,variant:"secondary",className:"block-editor-skip-to-selected-block",onClick:()=>{t.current?.focus()},children:(0,pwe.__)("Skip to the selected block")}):null}var CN=c(G(),1),bwe=c(Z(),1);var ywe=c(H(),1);var vE=c(E(),1);function oW(){let e=(0,bwe.useSelect)(t=>t(C).getSelectedBlockCount(),[]);return(0,vE.jsxs)(ywe.__experimentalHStack,{justify:"flex-start",spacing:2,className:"block-editor-multi-selection-inspector__card",children:[(0,vE.jsx)(Ct,{icon:Bg,showColors:!0}),(0,vE.jsx)("div",{className:"block-editor-multi-selection-inspector__card-title",children:(0,CN.sprintf)((0,CN._n)("%d Block","%d Blocks",e),e)})]})}var vwe=c(H(),1),WWe=Symbol("BlockInspectorPreTabs"),{Fill:kKt,Slot:Swe}=(0,vwe.createSlotFill)(WWe);var AD=c(H(),1),fc=c(F(),1),wCe=c(Ny(),1),b_=c(Z(),1);var SE=c(G(),1),EN={name:"settings",title:(0,SE.__)("Settings"),value:"settings",icon:xF},TN={name:"styles",title:(0,SE.__)("Styles"),value:"styles",icon:O4},RN={name:"content",title:(0,SE.__)("Content"),value:"content",icon:Ng},ef={name:"list",title:(0,SE.__)("List View"),value:"list-view",icon:Sx};var rW=c(H(),1);var kE=c(H(),1),kwe=c(G(),1);var _E=c(E(),1),$We=({initialOpen:e=!1})=>{let t=(0,kE.__experimentalUseSlotFills)(Jp.slotName),o=(0,kE.__experimentalUseSlotFills)(yC.name),r=!!(t&&t.length),n=!!(o&&o.length);return!r&&!n?null:(0,_E.jsxs)(kE.PanelBody,{className:"block-editor-block-inspector__advanced",title:(0,kwe.__)("Advanced"),initialOpen:e,children:[(0,_E.jsx)(Oe.Slot,{group:"advanced"}),(0,_E.jsx)(yC.Slot,{})]})},BN=$We;var tf=c(E(),1),KWe=({showAdvancedControls:e=!1})=>{let t=(0,rW.__experimentalUseSlotFills)(Yl.default.name),o=(0,rW.__experimentalUseSlotFills)(Yl.bindings.name),r=!!t?.length||!!o?.length;return(0,tf.jsxs)(tf.Fragment,{children:[(0,tf.jsx)(Oe.Slot,{}),(0,tf.jsx)(Oe.Slot,{group:"bindings"}),e&&(0,tf.jsx)("div",{children:(0,tf.jsx)(BN,{initialOpen:!r})})]})},_we=KWe;var jm=c(G(),1),BD=c(Z(),1),jW=c(F(),1);var Jk=c(H(),1),PN=c(Z(),1),nW=c(G(),1);var xE=c(E(),1),YWe=()=>{let{selectedClientIds:e,selectedBlocks:t,hasPositionAttribute:o}=(0,PN.useSelect)(s=>{let{getBlocksByClientId:a,getSelectedBlockClientIds:l}=s(C),u=l(),d=a(u);return{selectedClientIds:u,selectedBlocks:d,hasPositionAttribute:d?.some(({attributes:f})=>!!f?.style?.position?.type)}},[]),{updateBlockAttributes:r}=(0,PN.useDispatch)(C),n=fr();function i(){if(!e?.length||!t?.length)return;let s=Object.fromEntries(t?.map(({clientId:a,attributes:l})=>[a,{style:Ge({...l?.style,position:{...l?.style?.position,type:void 0,top:void 0,right:void 0,bottom:void 0,left:void 0}})}]));r(e,s,!0)}return(0,xE.jsx)(Jk.__experimentalToolsPanel,{className:"block-editor-block-inspector__position",label:(0,nW.__)("Position"),resetAll:i,dropdownMenuProps:n,children:(0,xE.jsx)(Jk.__experimentalToolsPanelItem,{isShownByDefault:o,label:(0,nW.__)("Position"),hasValue:()=>o,onDeselect:i,children:(0,xE.jsx)(Oe.Slot,{group:"position"})})})},qWe=()=>{let e=(0,Jk.__experimentalUseSlotFills)(Yl.position.name);return!(e&&e.length)?null:(0,xE.jsx)(YWe,{})},IN=qWe;var IE=c(ce(),1),kW=c(H(),1),fD=c(F(),1),A0e=c(uo(),1),L0e=c(Z(),1),dD=c(G(),1);var SW={};Cr(SW,{AdvancedPanel:()=>tD,BackgroundPanel:()=>aD,BorderPanel:()=>ZN,ColorPanel:()=>VN,DimensionsPanel:()=>$N,FiltersPanel:()=>QN,ImageSettingsPanel:()=>v0e,StateControl:()=>lD,StateControlBadges:()=>cD,TypographyPanel:()=>zN,useHasBackgroundPanel:()=>sD,useHasBorderPanel:()=>qN,useHasBorderPanelControls:()=>TE,useHasColorPanel:()=>DN,useHasDimensionsPanel:()=>WN,useHasFiltersPanel:()=>h0e,useHasImageSettingsPanel:()=>y0e,useHasTypographyPanel:()=>FN,useSettingsForBlockElement:()=>ON});var wE=c(F(),1),xwe=c(Z(),1),iW=c(ce(),1),Vb=c(G(),1);function ON(e,t,o){let{supportedStyles:r,supports:n}=(0,xwe.useSelect)(i=>({supportedStyles:U(i(iW.store)).getSupportedStyles(t,o),supports:i(iW.store).getBlockType(t)?.supports}),[t,o]);return(0,wE.useMemo)(()=>{let i={...e};return r.includes("fontSize")||(i.typography={...i.typography,fontSizes:{},customFontSize:!1,defaultFontSizes:!1}),r.includes("fontFamily")||(i.typography={...i.typography,fontFamilies:{}}),i.color={...i.color,text:i.color?.text&&r.includes("color"),background:i.color?.background&&(r.includes("background")||r.includes("backgroundColor")),button:i.color?.button&&r.includes("buttonColor"),heading:i.color?.heading&&r.includes("headingColor"),link:i.color?.link&&r.includes("linkColor"),caption:i.color?.caption&&r.includes("captionColor")},!r.includes("background")&&!r.includes("backgroundGradient")&&(i.color.gradients=[],i.color.customGradient=!1),r.includes("filter")||(i.color.defaultDuotone=!1,i.color.customDuotone=!1),["lineHeight","fontStyle","fontWeight","letterSpacing","textAlign","textTransform","textDecoration","textIndent","writingMode"].forEach(s=>{r.includes(s)||(i.typography={...i.typography,[s]:!1})}),r.includes("textIndent")&&(i.typography={...i.typography,textIndent:i.typography?.textIndent??"subsequent"}),r.includes("columnCount")||(i.typography={...i.typography,textColumns:!1}),["contentSize","wideSize"].forEach(s=>{r.includes(s)||(i.layout={...i.layout,[s]:!1})}),["padding","margin","blockGap"].forEach(s=>{r.includes(s)||(i.spacing={...i.spacing,[s]:!1});let a=Array.isArray(n?.spacing?.[s])?n?.spacing?.[s]:n?.spacing?.[s]?.sides;a?.length&&i.spacing?.[s]&&(i.spacing={...i.spacing,[s]:{...i.spacing?.[s],sides:a}})}),["aspectRatio","height","minHeight","minWidth","width"].forEach(s=>{r.includes(s)||(i.dimensions={...i.dimensions,[s]:!1})}),["radius","color","style","width"].forEach(s=>{r.includes("border"+s.charAt(0).toUpperCase()+s.slice(1))||(i.border={...i.border,[s]:!1})}),[["backgroundImage","backgroundImage"],["backgroundSize","backgroundSize"],["backgroundGradient","gradient"]].forEach(([s,a])=>{r.includes(s)||(i.background={...i.background,[a]:!1})}),i.shadow=r.includes("shadow")?i.shadow:!1,i},[e,r,n])}function ku(e){let t=e?.color?.palette?.custom,o=e?.color?.palette?.theme,r=e?.color?.palette?.default,n=e?.color?.defaultPalette;return(0,wE.useMemo)(()=>{let i=[];return o&&o.length&&i.push({name:(0,Vb._x)("Theme","Indicates this palette comes from the theme."),colors:o}),n&&r&&r.length&&i.push({name:(0,Vb._x)("Default","Indicates this palette comes from WordPress."),colors:r}),t&&t.length&&i.push({name:(0,Vb._x)("Custom","Indicates this palette is created by the user."),colors:t}),i},[t,o,r,n])}function CE(e){let t=e?.color?.gradients?.custom,o=e?.color?.gradients?.theme,r=e?.color?.gradients?.default,n=e?.color?.defaultGradients;return(0,wE.useMemo)(()=>{let i=[];return o&&o.length&&i.push({name:(0,Vb._x)("Theme","Indicates this palette comes from the theme."),gradients:o}),n&&r&&r.length&&i.push({name:(0,Vb._x)("Default","Indicates this palette comes from WordPress."),gradients:r}),t&&t.length&&i.push({name:(0,Vb._x)("Custom","Indicates this palette is created by the user."),gradients:t}),i},[t,o,r,n])}function e_(e){let t=ku(e),o=CE(e),r=e?.color?.custom,n=e?.color?.customGradient,i=(0,wE.useMemo)(()=>t.flatMap(({colors:l})=>l),[t]),s=l=>ba({settings:e},"",l),a=l=>{let d=o.flatMap(({gradients:f})=>f).find(({gradient:f})=>f===l);return d?"var:preset|gradient|"+d.slug:l};return{colors:t,gradients:o,allColors:i,areCustomSolidsEnabled:r,areCustomGradientsEnabled:n,hasSolidColors:t.length>0||r,hasGradientColors:o.length>0||n,decodeValue:s,encodeGradientValue:a}}var hr=c(H(),1),gr=c(G(),1),r_=c(F(),1);var t_=c(G(),1);var wwe=c(F(),1),AN=c(H(),1),sW=c(E(),1),ZWe=[{label:(0,t_.__)("Align text left"),value:"left",icon:Mf},{label:(0,t_.__)("Align text center"),value:"center",icon:Cg},{label:(0,t_.__)("Align text right"),value:"right",icon:Nf},{label:(0,t_.__)("Justify text"),value:"justify",icon:X5}],XWe=["left","center","right"];function LN({className:e,value:t,onChange:o,options:r=XWe}){let n=(0,wwe.useMemo)(()=>ZWe.filter(i=>r.includes(i.value)),[r]);return n.length?(0,sW.jsx)(AN.__experimentalToggleGroupControl,{isDeselectable:!0,label:(0,t_.__)("Text alignment"),className:W("block-editor-text-alignment-control",e),value:t,onChange:i=>{o(i===t?void 0:i)},children:n.map(i=>(0,sW.jsx)(AN.__experimentalToggleGroupControlOptionIcon,{value:i.value,icon:i.icon,label:i.label},i.value))}):null}var en=c(H(),1),EE=c(G(),1);var nl=c(E(),1);function Cwe({value:e,onChange:t,__unstableInputWidth:o="60px",withSlider:r=!1,hasBottomMargin:n=!1,help:i,...s}){let[a]=Me("spacing.units"),l=(0,en.__experimentalUseCustomUnits)({availableUnits:a||["px","em","rem","ch","%","vw","vh"],defaultValues:{px:16,em:2,rem:2,ch:2}}),[u,d]=(0,en.__experimentalParseQuantityAndUnitFromRawValue)(e,l),f=!!d&&["em","rem","%","ch","vw","vh"].includes(d);return r?(0,nl.jsxs)(en.__experimentalView,{style:n?{marginBottom:12}:void 0,children:[(0,nl.jsx)(en.BaseControl.VisualLabel,{children:(0,EE.__)("Line indent")}),(0,nl.jsxs)(en.Flex,{children:[(0,nl.jsx)(en.FlexItem,{isBlock:!0,children:(0,nl.jsx)(en.__experimentalUnitControl,{label:(0,EE.__)("Line indent"),labelPosition:"top",hideLabelFromVision:!0,value:e,onChange:t,units:l,__unstableInputWidth:o,min:0})}),r&&(0,nl.jsx)(en.FlexItem,{isBlock:!0,children:(0,nl.jsx)(en.__experimentalSpacer,{marginX:2,marginBottom:0,children:(0,nl.jsx)(en.RangeControl,{label:(0,EE.__)("Line indent"),hideLabelFromVision:!0,value:u,withInputField:!1,onChange:p=>{t?.(p===void 0?void 0:p+(d??"px"))},min:0,max:f?10:100,step:f?.1:1,initialPosition:0})})})]}),i&&(0,nl.jsx)("p",{className:"components-base-control__help",children:i})]}):(0,nl.jsx)(en.__experimentalUnitControl,{...s,label:(0,EE.__)("Line indent"),value:e,__unstableInputWidth:o,units:l,onChange:t,help:i})}var mr=c(H(),1),Twe=c(F(),1),aW=c(G(),1);var Eo=c(E(),1),{Tabs:MN}=U(mr.privateApis);function QWe({tabs:e,colorGradientControlSettings:t,contrastWarning:o}){let{key:r,...n}=e[0]??{},i=e.find(s=>s.userValue!==void 0)?.key;return(0,Eo.jsx)(mr.__experimentalDropdownContentWrapper,{paddingSize:"none",children:(0,Eo.jsxs)("div",{className:"block-editor-panel-color-gradient-settings__dropdown-content",children:[e.length===1&&(0,Eo.jsx)(Ewe,{...n,colorGradientControlSettings:t,contrastWarning:o},r),e.length>1&&(0,Eo.jsxs)(MN,{defaultTabId:i,children:[(0,Eo.jsx)(MN.TabList,{children:e.map(s=>(0,Eo.jsx)(MN.Tab,{tabId:s.key,children:s.label},s.key))}),e.map(s=>{let{key:a,...l}=s;return(0,Eo.jsx)(MN.TabPanel,{tabId:a,focusable:!1,children:(0,Eo.jsx)(Ewe,{...l,colorGradientControlSettings:t,contrastWarning:o},a)},a)})]})]})})}var JWe={placement:"left-start",offset:36,shift:!0},e$e=({indicators:e,label:t})=>(0,Eo.jsxs)(mr.__experimentalHStack,{justify:"flex-start",children:[(0,Eo.jsx)(mr.__experimentalZStack,{isLayered:!1,offset:-8,children:e.map((o,r)=>(0,Eo.jsx)(mr.Flex,{expanded:!1,children:(0,Eo.jsx)(mr.ColorIndicator,{colorValue:o})},r))}),(0,Eo.jsx)(mr.FlexItem,{className:"block-editor-panel-color-gradient-settings__color-name",children:t})]});function Ewe({isGradient:e,inheritedValue:t,inheritedSlug:o,userValue:r,setValue:n,colorGradientControlSettings:i,contrastWarning:s}){return(0,Eo.jsx)(_m,{...i,showTitle:!1,enableAlpha:!0,__experimentalIsRenderedInSidebar:!0,colorValue:e?void 0:t,colorSlug:e?void 0:o,gradientValue:e?t:void 0,onColorChange:e?void 0:n,onGradientChange:e?n:void 0,clearable:t===r,headingLevel:3,noticeProps:!e&&s?{children:s,status:"warning",spokenMessage:null,className:"block-editor-panel-color-gradient-settings__contrast-notice"}:void 0})}function Dm({label:e,hasValue:t,resetValue:o,isShownByDefault:r,indicators:n,tabs:i,colorGradientControlSettings:s,panelId:a,contrastWarning:l,className:u="block-editor-tools-panel-color-gradient-settings__item"}){let d=(0,Twe.useRef)(void 0);return(0,Eo.jsx)(mr.__experimentalToolsPanelItem,{className:W("block-editor-color-gradient-item",u),hasValue:t,label:e,onDeselect:o,isShownByDefault:r,panelId:a,children:(0,Eo.jsx)(mr.Dropdown,{popoverProps:JWe,className:"block-editor-tools-panel-color-gradient-settings__dropdown",renderToggle:({onToggle:f,isOpen:p})=>{let g={onClick:f,className:W("block-editor-panel-color-gradient-settings__dropdown",{"is-open":p,"has-contrast-warning":!!l}),"aria-expanded":p,ref:d};return(0,Eo.jsxs)(Eo.Fragment,{children:[(0,Eo.jsx)(mr.Button,{...g,__next40pxDefaultSize:!0,children:(0,Eo.jsx)(e$e,{indicators:n,label:e})}),t()&&(0,Eo.jsx)(mr.Button,{__next40pxDefaultSize:!0,label:(0,aW.__)("Reset"),className:"block-editor-panel-color-gradient-settings__reset",size:"small",icon:Bn,onClick:()=>{o(),p&&f(),d.current?.focus()}}),l&&(0,Eo.jsx)(mr.Button,{__next40pxDefaultSize:!0,size:"small",icon:pF,label:(0,aW.__)("Low contrast"),className:"block-editor-panel-color-gradient-settings__contrast-warning","aria-expanded":p,onClick:f})]})},renderContent:()=>(0,Eo.jsx)(QWe,{tabs:i,colorGradientControlSettings:s,contrastWarning:l})})})}var Rwe=c(H(),1),NN=c(F(),1),Un=c(G(),1);function Fi(e,t){if(typeof e!="string")return;let o=`var:preset|${t}|`;if(e.startsWith(o))return e.slice(o.length);let r=`--wp--preset--${t}--`;return e.match(new RegExp(`^var\\(${r}([^)]+)\\)$`))?.[1]}function of(e,t,o){if(o)return"var:preset|color|"+o;let r=e.find(({color:n})=>n===t);return r?"var:preset|color|"+r.slug:t}var o_=c(E(),1);function DN(e){let t=Bwe(e),o=Iwe(e),r=Owe(e),n=Pwe(e);return t||o||r||n}function lW(e){let t=ku(e);return e?.color?.text&&(t?.length>0||e?.color?.custom)}function Bwe(e){let t=ku(e);return e?.color?.link&&(t?.length>0||e?.color?.custom)}function Pwe(e){let t=ku(e);return e?.color?.caption&&(t?.length>0||e?.color?.custom)}function Iwe(e){let t=ku(e),o=CE(e);return e?.color?.heading&&(t?.length>0||e?.color?.custom||o?.length>0||e?.color?.customGradient)}function Owe(e){let t=ku(e),o=CE(e);return e?.color?.button&&(t?.length>0||e?.color?.custom||o?.length>0||e?.color?.customGradient)}function cW(e){let t=ku(e),o=CE(e);return e?.color?.background&&(t?.length>0||e?.color?.custom||o?.length>0||e?.color?.customGradient)}function uW({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n,label:i}){let s=fr(),a=()=>{let l=e(o);t(l)};return(0,o_.jsx)(Rwe.__experimentalToolsPanel,{label:i||(0,Un.__)("Elements"),resetAll:a,panelId:r,hasInnerWrapper:!0,headingLevel:3,className:"color-block-support-panel",__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last",dropdownMenuProps:s,children:(0,o_.jsx)("div",{className:"color-block-support-panel__inner-wrapper",children:n})})}var t$e={link:!0,heading:!0,button:!0,caption:!0};function VN({as:e=uW,value:t,onChange:o,inheritedValue:r=t,settings:n,panelId:i,defaultControls:s=t$e,label:a,children:l,contrastWarning:u}){let{colors:d,gradients:f,areCustomSolidsEnabled:p,areCustomGradientsEnabled:g,hasSolidColors:m,hasGradientColors:h,allColors:b,decodeValue:v,encodeGradientValue:y}=e_(n),k=Bwe(n),S=v(r?.elements?.link?.color?.text),_=v(t?.elements?.link?.color?.text),x=(I,N)=>{o(Ve(t,["elements","link","color","text"],of(b,I,N)))},w=v(r?.elements?.link?.[":hover"]?.color?.text),T=v(t?.elements?.link?.[":hover"]?.color?.text),B=(I,N)=>{o(Ve(t,["elements","link",":hover","color","text"],of(b,I,N)))},R=()=>!!_||!!T,A=()=>{let I=Ve(t,["elements","link",":hover","color","text"],void 0);I=Ve(I,["elements","link","color","text"],void 0),o(I)},O=Pwe(n),P=Owe(n),L=Iwe(n),M=(0,NN.useMemo)(()=>[{name:"caption",label:(0,Un.__)("Captions"),showPanel:O},{name:"button",label:(0,Un.__)("Button"),showPanel:P},{name:"heading",label:(0,Un.__)("Heading"),showPanel:L},{name:"h1",label:(0,Un.__)("H1"),showPanel:L},{name:"h2",label:(0,Un.__)("H2"),showPanel:L},{name:"h3",label:(0,Un.__)("H3"),showPanel:L},{name:"h4",label:(0,Un.__)("H4"),showPanel:L},{name:"h5",label:(0,Un.__)("H5"),showPanel:L},{name:"h6",label:(0,Un.__)("H6"),showPanel:L}],[O,P,L]),z=(0,NN.useCallback)(I=>({...I,elements:{...I?.elements,link:{...I?.elements?.link,color:void 0,":hover":{color:void 0}},...M.reduce((N,D)=>({...N,[D.name]:{...I?.elements?.[D.name],color:void 0}}),{})}}),[M]),V=[k&&{key:"link",label:(0,Un.__)("Link"),hasValue:R,resetValue:A,isShownByDefault:s.link,indicators:[S,w],contrastWarning:u,tabs:[{key:"link",label:(0,Un.__)("Default"),inheritedValue:S,inheritedSlug:Fi(r?.elements?.link?.color?.text,"color"),setValue:x,userValue:_},{key:"hover",label:(0,Un.__)("Hover"),inheritedValue:w,inheritedSlug:Fi(r?.elements?.link?.[":hover"]?.color?.text,"color"),setValue:B,userValue:T}]}].filter(Boolean);return M.forEach(({name:I,label:N,showPanel:D})=>{if(!D)return;let j=v(r?.elements?.[I]?.color?.background),Y=v(r?.elements?.[I]?.color?.gradient),X=v(r?.elements?.[I]?.color?.text),ee=v(t?.elements?.[I]?.color?.background),J=v(t?.elements?.[I]?.color?.gradient),$=v(t?.elements?.[I]?.color?.text),q=()=>!!($||ee||J),K=()=>{let ne=Ve(t,["elements",I,"color","background"],void 0);ne.elements[I].color.gradient=void 0,ne.elements[I].color.text=void 0,o(ne)},Q=(ne,de)=>{o(Ve(t,["elements",I,"color","text"],of(b,ne,de)))},re=(ne,de)=>{let Se=Ve(t,["elements",I,"color","background"],of(b,ne,de));Se.elements[I].color.gradient=void 0,o(Se)},se=ne=>{let de=Ve(t,["elements",I,"color","gradient"],y(ne));de.elements[I].color.background=void 0,o(de)},te=I!=="caption";V.push({key:I,label:N,hasValue:q,resetValue:K,isShownByDefault:s[I],indicators:te?[X,Y??j]:[X],tabs:[m&&{key:"text",label:(0,Un.__)("Text"),inheritedValue:X,inheritedSlug:Fi(r?.elements?.[I]?.color?.text,"color"),setValue:Q,userValue:$},m&&te&&{key:"background",label:(0,Un.__)("Background"),inheritedValue:j,inheritedSlug:Fi(r?.elements?.[I]?.color?.background,"color"),setValue:re,userValue:ee},h&&te&&{key:"gradient",label:(0,Un.__)("Gradient"),inheritedValue:Y,setValue:se,userValue:J,isGradient:!0}].filter(Boolean)})}),(0,o_.jsxs)(e,{resetAllFilter:z,value:t,onChange:o,panelId:i,label:a,children:[V.map(I=>{let{key:N,...D}=I;return(0,o_.jsx)(Dm,{...D,colorGradientControlSettings:{colors:d,disableCustomColors:!p,gradients:f,disableCustomGradients:!g},panelId:i},N)}),l]})}function Lwe(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 Awe(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 o$e(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 Mwe(e,t,o){let r=t,n=o,{fontStyles:i,fontWeights:s,combinedStyleAndWeightOptions:a}=xk(e),l=i?.some(({value:d})=>d===t),u=s?.some(({value:d})=>d?.toString()===o?.toString());return l||(r=t?o$e(i,t):a?.find(d=>d.style.fontWeight===Awe(s,o))?.style?.fontStyle),u||(n=o?Awe(s,o):a?.find(d=>d.style.fontStyle===(r||t))?.style?.fontWeight),{nearestFontStyle:r,nearestFontWeight:n}}var Qt=c(E(),1),r$e=1,n$e=6;function FN(e){let t=Dwe(e),o=Vwe(e),r=Fwe(e),n=zwe(e),i=Hwe(e),s=jwe(e),a=Uwe(e),l=$we(e),u=Gwe(e),d=Wwe(e),f=Nwe(e),p=lW(e);return t||o||r||n||i||s||f||a||l||u||d||p}function Nwe(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 Dwe(e){return["default","theme","custom"].some(t=>e?.typography?.fontFamilies?.[t]?.length)}function Vwe(e){return e?.typography?.lineHeight}function Fwe(e){return e?.typography?.fontStyle||e?.typography?.fontWeight}function i$e(e){return e?.typography?.fontStyle?e?.typography?.fontWeight?(0,gr.__)("Appearance"):(0,gr.__)("Font style"):(0,gr.__)("Font weight")}function zwe(e){return e?.typography?.letterSpacing}function jwe(e){return e?.typography?.textTransform}function Hwe(e){return e?.typography?.textAlign}function Uwe(e){return e?.typography?.textDecoration}function Gwe(e){return e?.typography?.writingMode}function Wwe(e){return e?.typography?.textColumns}function $we(e){return e?.typography?.textIndent}function s$e(e){let t=e?.typography?.fontSizes,o=!!e?.typography?.defaultFontSizes;return[...t?.custom??[],...t?.theme??[],...o?t?.default??[]:[]]}function dW({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n}){let i=fr(),s=()=>{let a=e(o);t(a)};return(0,Qt.jsx)(hr.__experimentalToolsPanel,{label:(0,gr.__)("Typography"),resetAll:s,panelId:r,__experimentalFirstVisibleItemClass:"first",dropdownMenuProps:i,children:n})}var a$e={textColor:!0,fontFamily:!0,fontSize:!0,fontAppearance:!0,lineHeight:!0,letterSpacing:!0,textAlign:!0,textTransform:!0,textDecoration:!0,textIndent:!0,writingMode:!0,textColumns:!0};function zN({as:e=dW,value:t,onChange:o,inheritedValue:r=t,settings:n,panelId:i,defaultControls:s=a$e,isGlobalStyles:a=!1,contrastWarning:l}){let{colors:u,allColors:d,areCustomSolidsEnabled:f,decodeValue:p}=e_(n),g=lW(n),m=p(r?.color?.text),h=p(t?.color?.text),b=()=>!!t?.color?.text,v=(Ze,ho)=>{let Ke=of(d,Ze,ho),St=Ve(t,["color","text"],Ke);r?.color?.text===r?.elements?.link?.color?.text&&(St=Ve(St,["elements","link","color","text"],Ke)),o(St)},y=()=>v(void 0),k=Dwe(n),S=p(r?.typography?.fontFamily),{fontFamilies:_,fontFamilyFaces:x}=(0,r_.useMemo)(()=>Lwe(n,S),[n,S]),w=Ze=>{let ho=_?.find(({fontFamily:tn})=>tn===Ze)?.slug,Ke=Ve(t,["typography","fontFamily"],ho?`var:preset|font-family|${ho}`:Ze||void 0),St=_?.find(({fontFamily:tn})=>tn===Ze)?.fontFace??[],{fontStyles:bo,fontWeights:Xo}=xk(St),wr=bo?.some(({value:tn})=>tn===Y),fn=Xo?.some(({value:tn})=>tn?.toString()===X?.toString());if(!wr||!fn){let{nearestFontStyle:tn,nearestFontWeight:xc}=Mwe(St,Y,X);tn||xc?Ke={...Ke,typography:{...Ke?.typography,fontStyle:tn||void 0,fontWeight:xc||void 0}}:(Y||X)&&(Ke={...Ke,typography:{...Ke?.typography,fontStyle:void 0,fontWeight:void 0}})}o(Ke)},T=()=>!!t?.typography?.fontFamily,B=()=>w(void 0),R=Nwe(n),A=!n?.typography?.customFontSize,O=s$e(n),P=p(r?.typography?.fontSize),L=(()=>{let Ze=r?.typography?.fontSize;if(!Ze||typeof Ze!="string")return;if(Ze.startsWith("var:preset|font-size|"))return Ze.replace("var:preset|font-size|","");let ho=Ze.match(/^var\(--wp--preset--font-size--([^)]+)\)$/);if(ho)return ho[1]})(),M=(Ze,ho)=>{let Ke=ho?.slug?`var:preset|font-size|${ho?.slug}`:Ze;o(Ve(t,["typography","fontSize"],Ke||void 0))},z=()=>!!t?.typography?.fontSize,V=()=>M(void 0),I=Fwe(n),N=i$e(n),D=n?.typography?.fontStyle,j=n?.typography?.fontWeight,Y=p(r?.typography?.fontStyle),X=p(r?.typography?.fontWeight),ee=(0,r_.useCallback)(({fontStyle:Ze,fontWeight:ho})=>{(Ze!==Y||ho!==X)&&o({...t,typography:{...t?.typography,fontStyle:Ze||void 0,fontWeight:ho||void 0}})},[Y,X,o,t]),J=()=>!!t?.typography?.fontStyle||!!t?.typography?.fontWeight,$=(0,r_.useCallback)(()=>{ee({})},[ee]),q=Vwe(n),K=p(r?.typography?.lineHeight),Q=Ze=>{o(Ve(t,["typography","lineHeight"],Ze||void 0))},re=()=>t?.typography?.lineHeight!==void 0,se=()=>Q(void 0),te=zwe(n),ne=p(r?.typography?.letterSpacing),de=Ze=>{o(Ve(t,["typography","letterSpacing"],Ze||void 0))},Se=()=>!!t?.typography?.letterSpacing,Ee=()=>de(void 0),ve=$we(n),be=p(r?.typography?.textIndent),he=(n?.typography?.textIndent??"subsequent")==="all",ye=Ze=>{o(Ve(t,["typography","textIndent"],Ze||void 0))},_e=Ze=>{o({...t,settings:{typography:{textIndent:Ze?"all":"subsequent"}}})},we=()=>!!t?.typography?.textIndent,ie=()=>{o(Ve(t,["typography","textIndent"],void 0))},oe=he?(0,gr.__)("Indents the first line of all paragraphs."):(0,gr.__)("Indents the first line of each paragraph after the first one."),Ae=Wwe(n),me=p(r?.typography?.textColumns),xe=Ze=>{o(Ve(t,["typography","textColumns"],Ze||void 0))},nt=()=>!!t?.typography?.textColumns,ut=()=>xe(void 0),it=jwe(n),xt=p(r?.typography?.textTransform),tt=Ze=>{o(Ve(t,["typography","textTransform"],Ze||void 0))},$t=()=>!!t?.typography?.textTransform,dt=()=>tt(void 0),co=Uwe(n),at=p(r?.typography?.textDecoration),Be=Ze=>{o(Ve(t,["typography","textDecoration"],Ze||void 0))},Te=()=>!!t?.typography?.textDecoration,Ne=()=>Be(void 0),$e=Gwe(n),ot=p(r?.typography?.writingMode),Ot=Ze=>{o(Ve(t,["typography","writingMode"],Ze||void 0))},At=()=>!!t?.typography?.writingMode,gt=()=>Ot(void 0),Zo=Hwe(n),Kt=p(r?.typography?.textAlign),De=Ze=>{o(Ve(t,["typography","textAlign"],Ze||void 0))},wt=()=>!!t?.typography?.textAlign,Fo=()=>De(void 0),qi=(0,r_.useCallback)(Ze=>g?{...Ze,typography:{},color:{...Ze?.color,text:void 0}}:{...Ze,typography:{}},[g]);return(0,Qt.jsxs)(e,{resetAllFilter:qi,value:t,onChange:o,panelId:i,children:[g&&(0,Qt.jsx)(Dm,{label:(0,gr.__)("Color"),hasValue:b,resetValue:y,isShownByDefault:s.textColor,indicators:[m],contrastWarning:l,tabs:[{key:"text",label:(0,gr.__)("Color"),inheritedValue:m,inheritedSlug:Fi(r?.color?.text,"color"),setValue:v,userValue:h}],colorGradientControlSettings:{colors:u,disableCustomColors:!f},panelId:i}),k&&(0,Qt.jsx)(hr.__experimentalToolsPanelItem,{label:(0,gr.__)("Font"),hasValue:T,onDeselect:B,isShownByDefault:s.fontFamily,panelId:i,children:(0,Qt.jsx)(fM,{fontFamilies:_,value:S,onChange:w})}),R&&(0,Qt.jsx)(hr.__experimentalToolsPanelItem,{label:(0,gr.__)("Size"),hasValue:z,onDeselect:V,isShownByDefault:s.fontSize,panelId:i,children:(0,Qt.jsx)(hr.FontSizePicker,{value:L||P,valueMode:L?"slug":"literal",onChange:M,fontSizes:O,disableCustomFontSizes:A,withReset:!1,withSlider:!0})}),I&&(0,Qt.jsx)(hr.__experimentalToolsPanelItem,{label:N,hasValue:J,onDeselect:$,isShownByDefault:s.fontAppearance,panelId:i,children:(0,Qt.jsx)(dM,{value:{fontStyle:Y,fontWeight:X},onChange:ee,hasFontStyles:D,hasFontWeights:j,fontFamilyFaces:x})}),q&&(0,Qt.jsx)(hr.__experimentalToolsPanelItem,{className:"single-column",label:(0,gr.__)("Line height"),hasValue:re,onDeselect:se,isShownByDefault:s.lineHeight,panelId:i,children:(0,Qt.jsx)(XM,{__unstableInputWidth:"auto",value:K,onChange:Q})}),te&&(0,Qt.jsx)(hr.__experimentalToolsPanelItem,{className:"single-column",label:(0,gr.__)("Letter spacing"),hasValue:Se,onDeselect:Ee,isShownByDefault:s.letterSpacing,panelId:i,children:(0,Qt.jsx)(mM,{value:ne,onChange:de,__unstableInputWidth:"auto"})}),ve&&(0,Qt.jsxs)(hr.__experimentalToolsPanelItem,{label:(0,gr.__)("Line indent"),hasValue:we,onDeselect:ie,isShownByDefault:s.textIndent,panelId:i,children:[(0,Qt.jsx)(Cwe,{value:be,onChange:ye,__unstableInputWidth:"auto",withSlider:!0,hasBottomMargin:a}),a&&(0,Qt.jsx)(hr.ToggleControl,{label:(0,gr.__)("Indent all paragraphs"),checked:he,onChange:_e,help:oe})]}),Ae&&(0,Qt.jsx)(hr.__experimentalToolsPanelItem,{className:"single-column",label:(0,gr.__)("Columns"),hasValue:nt,onDeselect:ut,isShownByDefault:s.textColumns,panelId:i,children:(0,Qt.jsx)(hr.__experimentalNumberControl,{label:(0,gr.__)("Columns"),max:n$e,min:r$e,onChange:xe,spinControls:"custom",value:me,initialPosition:1})}),co&&(0,Qt.jsx)(hr.__experimentalToolsPanelItem,{className:"single-column",label:(0,gr.__)("Decoration"),hasValue:Te,onDeselect:Ne,isShownByDefault:s.textDecoration,panelId:i,children:(0,Qt.jsx)(hM,{value:at,onChange:Be,size:"__unstable-large",__unstableInputWidth:"auto"})}),$e&&(0,Qt.jsx)(hr.__experimentalToolsPanelItem,{className:"single-column",label:(0,gr.__)("Orientation"),hasValue:At,onDeselect:gt,isShownByDefault:s.writingMode,panelId:i,children:(0,Qt.jsx)(SM,{value:ot,onChange:Ot,size:"__unstable-large"})}),it&&(0,Qt.jsx)(hr.__experimentalToolsPanelItem,{label:(0,gr.__)("Letter case"),hasValue:$t,onDeselect:dt,isShownByDefault:s.textTransform,panelId:i,children:(0,Qt.jsx)(yM,{value:xt,onChange:tt,showNone:!0,isBlock:!0,size:"__unstable-large"})}),Zo&&(0,Qt.jsxs)(hr.__experimentalToolsPanelItem,{label:(0,gr.__)("Text alignment"),hasValue:wt,onDeselect:Fo,isShownByDefault:s.textAlign,panelId:i,children:[(0,Qt.jsx)(LN,{value:Kt,onChange:De,options:["left","center","right","justify"],size:"__unstable-large"}),Kt==="justify"&&(0,Qt.jsx)("div",{children:(0,Qt.jsx)(hr.Notice,{status:"warning",isDismissible:!1,children:(0,gr.__)("Justified text can reduce readability. For better accessibility, use left-aligned text instead.")})})]})]})}var No=c(G(),1),Do=c(H(),1);var GN=c(F(),1);var Jt=c(H(),1),ir=c(G(),1),Ywe=c(F(),1),jN=c(Z(),1);var Kwe=c(Z(),1);function Fb(e,t){let{getBlockOrder:o,getBlockAttributes:r}=(0,Kwe.useSelect)(C);return(i,s)=>{let a=(s-1)*t+i-1,l=0;for(let u of o(e)){let{columnStart:d,rowStart:f}=r(u).style?.layout??{};(f-1)*t+d-1<a&&l++}return l}}var Wo=c(E(),1),Gn={fit:"fit",grow:"fill",max:"fixed",fixed:"fixedNoShrink"},l$e=[Gn.max,Gn.fixed];function fW(e){return l$e.includes(e)}function c$e(e){let{orientation:t="horizontal"}=e??{};return t==="horizontal"?(0,ir._x)("Max","Block with maximum width in flex layout"):(0,ir._x)("Max","Block with maximum height in flex layout")}function u$e(e,t){let{orientation:o="horizontal"}=t??{};return e===Gn.grow?(0,ir.__)("Stretch to fill available space."):e===Gn.max&&o==="horizontal"?(0,ir.__)("Specify a maximum width."):e===Gn.max?(0,ir.__)("Specify a maximum height."):e===Gn.fixed&&o==="horizontal"?(0,ir.__)("Specify a fixed width."):e===Gn.fixed?(0,ir.__)("Specify a fixed height."):(0,ir.__)("Fit contents.")}function qwe({value:e={},onChange:t,parentLayout:o,isShownByDefault:r,panelId:n,showGridSpanDefaults:i=!0}){let{type:s,default:{type:a="default"}={}}=o??{},l=s||a;return l==="flex"?(0,Wo.jsx)(d$e,{childLayout:e,onChange:t,parentLayout:o,isShownByDefault:r,panelId:n}):l==="grid"?(0,Wo.jsx)(p$e,{childLayout:e,onChange:t,parentLayout:o,isShownByDefault:r,panelId:n,showGridSpanDefaults:i}):null}function d$e({childLayout:e,onChange:t,parentLayout:o,isShownByDefault:r,panelId:n}){let{selfStretch:i,flexSize:s}=e,{orientation:a="horizontal"}=o??{},l=i||Gn.fit,u=fW(l),d=()=>!!i,f=a==="horizontal"?(0,ir.__)("Width"):(0,ir.__)("Height"),[p]=Me("spacing.units"),g=(0,Jt.__experimentalUseCustomUnits)({availableUnits:p||["%","px","em","rem","vh","vw"]}),m=()=>{t({selfStretch:void 0,flexSize:void 0})};return(0,Ywe.useEffect)(()=>{fW(i)&&!s&&t({...e,selfStretch:Gn.fit})},[]),(0,Wo.jsxs)(Jt.__experimentalVStack,{as:Jt.__experimentalToolsPanelItem,spacing:2,hasValue:d,label:f,onDeselect:m,isShownByDefault:r,panelId:n,children:[(0,Wo.jsxs)(Jt.__experimentalToggleGroupControl,{label:f$e(o),value:l,help:u$e(l,o),onChange:h=>{let b=fW(h)?s:null;t({selfStretch:h,flexSize:b})},isBlock:!0,children:[(0,Wo.jsx)(Jt.__experimentalToggleGroupControlOption,{value:Gn.fit,label:(0,ir._x)("Fit","Intrinsic block width in flex layout")},Gn.fit),(0,Wo.jsx)(Jt.__experimentalToggleGroupControlOption,{value:Gn.grow,label:(0,ir._x)("Grow","Block with expanding width in flex layout")},Gn.grow),(0,Wo.jsx)(Jt.__experimentalToggleGroupControlOption,{value:Gn.max,label:c$e(o)},Gn.max),(0,Wo.jsx)(Jt.__experimentalToggleGroupControlOption,{value:Gn.fixed,label:(0,ir._x)("Fixed","Block with fixed width in flex layout")},Gn.fixed)]}),u&&(0,Wo.jsx)(Jt.__experimentalUnitControl,{units:g,onChange:h=>{t({selfStretch:l,flexSize:h})},value:s,min:0,label:f,hideLabelFromVision:!0})]})}function f$e(e){let{orientation:t="horizontal"}=e??{};return t==="horizontal"?(0,ir.__)("Width"):(0,ir.__)("Height")}function p$e({childLayout:e,onChange:t,parentLayout:o,isShownByDefault:r,panelId:n,showGridSpanDefaults:i}){let{columnStart:s,rowStart:a,columnSpan:l,rowSpan:u}=e,{columnCount:d,rowCount:f}=o??{},p=(0,jN.useSelect)(T=>T(C).getBlockRootClientId(n)),{moveBlocksToPosition:g,__unstableMarkNextChangeAsNotPersistent:m}=(0,jN.useDispatch)(C),h=Fb(p,d||3),b=()=>!!s||!!a,v=()=>!!l||!!u,y=()=>{t({columnStart:void 0,rowStart:void 0})},k=()=>{t({columnSpan:void 0,rowSpan:void 0})},S=d?d-(s??1)+1:void 0,_=window.__experimentalEnableGridInteractivity&&f?f-(a??1)+1:void 0,x=l??(i?1:void 0),w=u??(i?1:void 0);return(0,Wo.jsxs)(Wo.Fragment,{children:[(0,Wo.jsxs)(Jt.Flex,{as:Jt.__experimentalToolsPanelItem,hasValue:v,label:(0,ir.__)("Grid span"),onDeselect:k,isShownByDefault:r,panelId:n,children:[(0,Wo.jsx)(Jt.FlexItem,{style:{width:"50%"},children:(0,Wo.jsx)(Jt.__experimentalInputControl,{label:(0,ir.__)("Column span"),type:"number",onChange:T=>{let B=T===""?1:parseInt(T,10),R=S?Math.min(B,S):B;t({columnStart:s,rowStart:a,rowSpan:u,columnSpan:R})},value:x,min:1,max:S})}),(0,Wo.jsx)(Jt.FlexItem,{style:{width:"50%"},children:(0,Wo.jsx)(Jt.__experimentalInputControl,{label:(0,ir.__)("Row span"),type:"number",onChange:T=>{let B=T===""?1:parseInt(T,10),R=_?Math.min(B,_):B;t({columnStart:s,rowStart:a,columnSpan:l,rowSpan:R})},value:w,min:1,max:_})})]}),window.__experimentalEnableGridInteractivity&&(0,Wo.jsxs)(Jt.Flex,{as:Jt.__experimentalToolsPanelItem,hasValue:b,label:(0,ir.__)("Grid placement"),onDeselect:y,isShownByDefault:!1,panelId:n,children:[(0,Wo.jsx)(Jt.FlexItem,{style:{width:"50%"},children:(0,Wo.jsx)(Jt.__experimentalInputControl,{label:(0,ir.__)("Column"),type:"number",onChange:T=>{let B=T===""?1:parseInt(T,10);t({columnStart:B,rowStart:a,columnSpan:l,rowSpan:u}),m(),g([n],p,p,h(B,a))},value:s??1,min:1,max:d?d-(l??1)+1:void 0})}),(0,Wo.jsx)(Jt.FlexItem,{style:{width:"50%"},children:(0,Wo.jsx)(Jt.__experimentalInputControl,{label:(0,ir.__)("Row"),type:"number",onChange:T=>{let B=T===""?1:parseInt(T,10);t({columnStart:s,rowStart:B,columnSpan:l,rowSpan:u}),m(),g([n],p,p,h(s,B))},value:a??1,min:1,max:f?f-(u??1)+1:void 0})})]})]})}var HN=c(H(),1),n_=c(G(),1);var pW=c(E(),1);function UN({panelId:e,value:t,onChange:o=()=>{},options:r,defaultValue:n="auto",hasValue:i,isShownByDefault:s=!0}){let a=t??"auto",[l,u,d]=Me("dimensions.aspectRatios.default","dimensions.aspectRatios.theme","dimensions.defaultAspectRatios"),f=u?.map(({name:m,ratio:h})=>({label:m,value:h})),p=l?.map(({name:m,ratio:h})=>({label:m,value:h})),g=[{label:(0,n_._x)("Original","Aspect ratio option for dimensions control"),value:"auto"},...d?p:[],...f||[],{label:(0,n_._x)("Custom","Aspect ratio option for dimensions control"),value:"custom",disabled:!0,hidden:!0}];return(0,pW.jsx)(HN.__experimentalToolsPanelItem,{hasValue:i||(()=>a!==n),label:(0,n_.__)("Aspect ratio"),onDeselect:()=>o(void 0),isShownByDefault:s,panelId:e,children:(0,pW.jsx)(HN.SelectControl,{label:(0,n_.__)("Aspect ratio"),value:a,options:r??g,onChange:o})})}var Nt=c(E(),1),mW=["horizontal","vertical"];function WN(e,t=Ks){return Qwe(e)||Jwe(e)||e0e(e)||t0e(e)||o0e(e)||r0e(e)||n0e(e)||i0e(e)||s0e(e)||a0e(e,t)||l0e(e,t)}function Qwe(e){return e?.layout?.contentSize}function Jwe(e){return e?.layout?.wideSize}function e0e(e){return e?.spacing?.padding}function t0e(e){return e?.spacing?.margin}function o0e(e){return e?.spacing?.blockGap}function r0e(e){return e?.dimensions?.height}function n0e(e){return e?.dimensions?.minHeight}function i0e(e){return e?.dimensions?.minWidth}function s0e(e){return e?.dimensions?.width}function a0e(e,t=Ks){return!Ys(t)&&e?.dimensions?.aspectRatio}function l0e(e,t=Ks){if(Ys(t))return!1;let{type:o="default",default:{type:r="default"}={},allowSizingOnChildren:n=!1}=e?.parentLayout??{},i=(r==="flex"||o==="flex"||r==="grid"||o==="grid")&&n;return!!e?.layout&&i}function m$e(e){let{defaultSpacingSizes:t,spacingSizes:o}=e?.spacing||{};return t!==!1&&o?.default?.length>0||o?.theme?.length>0||o?.custom?.length>0}function Zwe(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 Xwe(e){return e&&typeof e=="string"?{top:e,right:e,bottom:e,left:e}:e}function g$e(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 h$e({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n}){let i=fr(),s=()=>{let a=e(o);t(a)};return(0,Nt.jsx)(Do.__experimentalToolsPanel,{label:(0,No.__)("Dimensions"),resetAll:s,panelId:r,dropdownMenuProps:i,children:n})}var il={contentSize:!0,wideSize:!0,padding:!0,margin:!0,blockGap:!0,height:!0,minHeight:!0,minWidth:!0,width:!0,aspectRatio:!0,childLayout:!0};function $N({as:e=h$e,value:t,onChange:o,inheritedValue:r=t,settings:n,panelId:i,defaultControls:s=il,onVisualize:a=()=>{},includeLayoutControls:l=!1,styleState:u=Ks}){let{dimensions:d,spacing:f}=n,p=De=>De&&typeof De=="object"?Object.keys(De).reduce((wt,Fo)=>(wt[Fo]=ba({settings:{dimensions:d,spacing:f}},"",De[Fo]),wt),{}):ba({settings:{dimensions:d,spacing:f}},"",De),g=m$e(n),m=(0,Do.__experimentalUseCustomUnits)({availableUnits:n?.spacing?.units||["%","px","em","rem","vw"]}),h=-1/0,[b,v]=(0,GN.useState)(h),y=(0,GN.useCallback)(De=>({...De,layout:Ge({...De?.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:{...De?.spacing,padding:void 0,margin:void 0,blockGap:void 0},dimensions:{...De?.dimensions,height:void 0,minHeight:void 0,minWidth:void 0,aspectRatio:void 0,width:void 0}}),[]),k=Qwe(n)&&l,S=p(r?.layout?.contentSize),_=De=>{o(Ve(t,["layout","contentSize"],De||void 0))},x=()=>!!t?.layout?.contentSize,w=()=>_(void 0),T=Jwe(n)&&l,B=p(r?.layout?.wideSize),R=De=>{o(Ve(t,["layout","wideSize"],De||void 0))},A=()=>!!t?.layout?.wideSize,O=()=>R(void 0),P=e0e(n),L=p(r?.spacing?.padding),M=Xwe(L),z=Array.isArray(n?.spacing?.padding)?n?.spacing?.padding:n?.spacing?.padding?.sides,V=z&&z.some(De=>mW.includes(De)),I=De=>{let wt=Zwe(De,z);o(Ve(t,["spacing","padding"],wt))},N=()=>!!t?.spacing?.padding&&Object.keys(t?.spacing?.padding).length,D=()=>I(void 0),j=()=>a("padding"),Y=t0e(n),X=p(r?.spacing?.margin),ee=Xwe(X),J=Array.isArray(n?.spacing?.margin)?n?.spacing?.margin:n?.spacing?.margin?.sides,$=J&&J.some(De=>mW.includes(De)),q=De=>{let wt=Zwe(De,J);o(Ve(t,["spacing","margin"],wt))},K=()=>!!t?.spacing?.margin&&Object.keys(t?.spacing?.margin).length,Q=()=>q(void 0),re=()=>a("margin"),se=o0e(n),te=Array.isArray(n?.spacing?.blockGap)?n?.spacing?.blockGap:n?.spacing?.blockGap?.sides,ne=te&&te.some(De=>mW.includes(De)),de=p(r?.spacing?.blockGap),Se=g$e(de,ne),Ee=De=>{o(Ve(t,["spacing","blockGap"],De))},ve=De=>{De||Ee(null),!ne&&De?.hasOwnProperty("top")?Ee(De.top):Ee({top:De?.top,left:De?.left})},be=()=>Ee(void 0),ge=()=>!!t?.spacing?.blockGap,he=n0e(n),ye=p(r?.dimensions?.minHeight),_e=De=>{let wt=Ve(t,["dimensions","minHeight"],De);o(Ve(wt,["dimensions","aspectRatio"],void 0))},we=()=>{_e(void 0)},ie=()=>!!t?.dimensions?.minHeight,oe=r0e(n),Ae=p(r?.dimensions?.height),me=De=>{let wt=Ve(t,["dimensions","height"],De);o(Ve(wt,["dimensions","aspectRatio"],void 0))},xe=()=>{me(void 0)},nt=()=>!!t?.dimensions?.height,ut=i0e(n),it=p(r?.dimensions?.minWidth),xt=De=>{o(Ve(t,["dimensions","minWidth"],De))},tt=()=>{xt(void 0)},$t=()=>!!t?.dimensions?.minWidth,dt=s0e(n),co=p(r?.dimensions?.width),at=De=>{o(Ve(t,["dimensions","width"],De))},Be=()=>{at(void 0)},Te=()=>!!t?.dimensions?.width,Ne=a0e(n,u),$e=p(r?.dimensions?.aspectRatio),ot=De=>{let wt=Ve(t,["dimensions","aspectRatio"],De);o(Ve(wt,["dimensions","minHeight"],void 0))},Ot=()=>!!t?.dimensions?.aspectRatio,At=l0e(n,u),gt=r?.layout,Zo=De=>{o({...t,layout:{...t?.layout,...De}})},Kt=()=>a(!1);return(0,Nt.jsxs)(e,{resetAllFilter:y,value:t,onChange:o,panelId:i,children:[(k||T)&&(0,Nt.jsx)("span",{className:"span-columns",children:(0,No.__)("Set the width of the main content area.")}),k&&(0,Nt.jsx)(Do.__experimentalToolsPanelItem,{label:(0,No.__)("Content width"),hasValue:x,onDeselect:w,isShownByDefault:s.contentSize??il.contentSize,panelId:i,children:(0,Nt.jsx)(Do.__experimentalUnitControl,{label:(0,No.__)("Content width"),labelPosition:"top",value:S||"",onChange:De=>{_(De)},units:m,prefix:(0,Nt.jsx)(Do.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,Nt.jsx)(ft,{icon:Eg})})})}),T&&(0,Nt.jsx)(Do.__experimentalToolsPanelItem,{label:(0,No.__)("Wide width"),hasValue:A,onDeselect:O,isShownByDefault:s.wideSize??il.wideSize,panelId:i,children:(0,Nt.jsx)(Do.__experimentalUnitControl,{label:(0,No.__)("Wide width"),labelPosition:"top",value:B||"",onChange:De=>{R(De)},units:m,prefix:(0,Nt.jsx)(Do.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,Nt.jsx)(ft,{icon:Fg})})})}),P&&(0,Nt.jsxs)(Do.__experimentalToolsPanelItem,{hasValue:N,label:(0,No.__)("Padding"),onDeselect:D,isShownByDefault:s.padding??il.padding,className:W({"tools-panel-item-spacing":g}),panelId:i,children:[!g&&(0,Nt.jsx)(Do.BoxControl,{values:M,onChange:I,label:(0,No.__)("Padding"),sides:z,units:m,allowReset:!1,splitOnAxis:V,inputProps:{onMouseOver:j,onMouseOut:Kt}}),g&&(0,Nt.jsx)(Xk,{values:M,onChange:I,label:(0,No.__)("Padding"),sides:z,units:m,allowReset:!1,onMouseOver:j,onMouseOut:Kt})]}),Y&&(0,Nt.jsxs)(Do.__experimentalToolsPanelItem,{hasValue:K,label:(0,No.__)("Margin"),onDeselect:Q,isShownByDefault:s.margin??il.margin,className:W({"tools-panel-item-spacing":g}),panelId:i,children:[!g&&(0,Nt.jsx)(Do.BoxControl,{values:ee,onChange:q,inputProps:{min:b,onDragStart:()=>{v(0)},onDragEnd:()=>{v(h)},onMouseOver:re,onMouseOut:Kt},label:(0,No.__)("Margin"),sides:J,units:m,allowReset:!1,splitOnAxis:$}),g&&(0,Nt.jsx)(Xk,{values:ee,onChange:q,minimumCustomValue:-1/0,label:(0,No.__)("Margin"),sides:J,units:m,allowReset:!1,onMouseOver:re,onMouseOut:Kt})]}),se&&(0,Nt.jsxs)(Do.__experimentalToolsPanelItem,{hasValue:ge,label:(0,No.__)("Block spacing"),onDeselect:be,isShownByDefault:s.blockGap??il.blockGap,className:W({"tools-panel-item-spacing":g,"single-column":!g&&!ne}),panelId:i,children:[!g&&(ne?(0,Nt.jsx)(Do.BoxControl,{label:(0,No.__)("Block spacing"),min:0,onChange:ve,units:m,sides:te,values:Se,allowReset:!1,splitOnAxis:ne}):(0,Nt.jsx)(Do.__experimentalUnitControl,{label:(0,No.__)("Block spacing"),min:0,onChange:Ee,units:m,value:de})),g&&(0,Nt.jsx)(Xk,{label:(0,No.__)("Block spacing"),min:0,onChange:ve,showSideInLabel:!1,sides:ne?te:["top"],values:Se,allowReset:!1})]}),At&&(0,Nt.jsx)(qwe,{value:gt,onChange:Zo,parentLayout:n?.parentLayout,panelId:i,showGridSpanDefaults:!Oi(u),isShownByDefault:s.childLayout??il.childLayout}),he&&(0,Nt.jsx)(Do.__experimentalToolsPanelItem,{hasValue:ie,label:(0,No.__)("Minimum height"),onDeselect:we,isShownByDefault:s.minHeight??il.minHeight,panelId:i,children:(0,Nt.jsx)(_b,{label:(0,No.__)("Minimum height"),value:ye,onChange:_e,dimensionSizes:d?.dimensionSizes})}),ut&&(0,Nt.jsx)(Do.__experimentalToolsPanelItem,{hasValue:$t,label:(0,No.__)("Minimum width"),onDeselect:tt,isShownByDefault:s.minWidth??il.minWidth,panelId:i,children:(0,Nt.jsx)(_b,{label:(0,No.__)("Minimum width"),value:it,onChange:xt,dimensionSizes:d?.dimensionSizes})}),oe&&(0,Nt.jsx)(Do.__experimentalToolsPanelItem,{hasValue:nt,label:(0,No.__)("Height"),onDeselect:xe,isShownByDefault:s.height??il.height,panelId:i,children:(0,Nt.jsx)(_b,{label:(0,No.__)("Height"),value:Ae,onChange:me,dimensionSizes:d?.dimensionSizes})}),dt&&(0,Nt.jsx)(Do.__experimentalToolsPanelItem,{hasValue:Te,label:(0,No.__)("Width"),onDeselect:Be,isShownByDefault:s.width??il.width,panelId:i,children:(0,Nt.jsx)(_b,{label:(0,No.__)("Width"),value:co,onChange:at,dimensionSizes:d?.dimensionSizes})}),Ne&&(0,Nt.jsx)(UN,{hasValue:Ot,value:$e,onChange:ot,panelId:i,isShownByDefault:s.aspectRatio??il.aspectRatio})]})}var zi=c(H(),1),s_=c(F(),1),i_=c(G(),1);var zb=c(G(),1),cn=c(H(),1),YN=c(F(),1);var mo=c(E(),1),KN=[];function b$e({shadow:e,onShadowChange:t,settings:o}){let r=gW(o);return(0,mo.jsx)("div",{className:"block-editor-global-styles__shadow-popover-container",children:(0,mo.jsxs)(cn.__experimentalVStack,{spacing:4,children:[(0,mo.jsx)(cn.__experimentalHeading,{level:5,children:(0,zb.__)("Drop shadow")}),(0,mo.jsx)(y$e,{presets:r,activeShadow:e,onSelect:t}),(0,mo.jsx)("div",{className:"block-editor-global-styles__clear-shadow",children:(0,mo.jsx)(cn.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>t(void 0),disabled:!e,accessibleWhenDisabled:!0,children:(0,zb.__)("Clear")})})]})})}function y$e({presets:e,activeShadow:t,onSelect:o}){return e?(0,mo.jsx)(cn.Composite,{role:"listbox",className:"block-editor-global-styles__shadow__list","aria-label":(0,zb.__)("Drop shadows"),children:e.map(({name:r,slug:n,shadow:i})=>(0,mo.jsx)(v$e,{label:r,isActive:i===t,type:n==="unset"?"unset":"preset",onSelect:()=>o(i===t?void 0:i),shadow:i},n))}):null}function v$e({type:e,label:t,isActive:o,onSelect:r,shadow:n}){return(0,mo.jsxs)(vt.Root,{children:[(0,mo.jsx)(vt.Trigger,{render:(0,mo.jsx)(cn.Composite.Item,{role:"option","aria-label":t,"aria-selected":o,className:W("block-editor-global-styles__shadow__item",{"is-active":o}),render:(0,mo.jsx)("button",{className:W("block-editor-global-styles__shadow-indicator",{unset:e==="unset"}),onClick:r,style:{boxShadow:n},"aria-label":t,children:o&&(0,mo.jsx)(ft,{icon:Xi})})})}),(0,mo.jsx)(vt.Popup,{children:t})]})}function c0e({shadow:e,onShadowChange:t,settings:o}){return(0,mo.jsx)(cn.Dropdown,{popoverProps:{placement:"left-start",offset:36,shift:!0},className:"block-editor-global-styles__shadow-dropdown",renderToggle:S$e(e,t),renderContent:()=>(0,mo.jsx)(cn.__experimentalDropdownContentWrapper,{paddingSize:"medium",children:(0,mo.jsx)(b$e,{shadow:e,onShadowChange:t,settings:o})})})}function S$e(e,t){return function({onToggle:r,isOpen:n}){let i=(0,YN.useRef)(void 0),s={onClick:r,className:W("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:W("block-editor-global-styles__shadow-editor__remove-button",{"is-open":n}),label:(0,zb.__)("Remove")};return(0,mo.jsxs)(mo.Fragment,{children:[(0,mo.jsx)(cn.Button,{__next40pxDefaultSize:!0,...s,children:(0,mo.jsxs)(cn.__experimentalHStack,{justify:"flex-start",children:[(0,mo.jsx)(ft,{className:"block-editor-global-styles__toggle-icon",icon:v4,size:24}),(0,mo.jsx)(cn.FlexItem,{children:(0,zb.__)("Drop shadow")})]})}),!!e&&(0,mo.jsx)(cn.Button,{__next40pxDefaultSize:!0,size:"small",icon:Bn,...a})]})}}function gW(e){return(0,YN.useMemo)(()=>{if(!e?.shadow)return KN;let t=e?.shadow?.defaultPresets,{default:o,theme:r,custom:n}=e?.shadow?.presets??{},i={name:(0,zb.__)("Unset"),slug:"unset",shadow:"none"},s=[...t&&o||KN,...r||KN,...n||KN];return s.length&&s.unshift(i),s},[e])}var uc=c(E(),1);function qN(e){return Object.values(TE(e)).some(Boolean)}function TE(e){return{hasBorderColor:u0e(e),hasBorderRadius:d0e(e),hasBorderStyle:f0e(e),hasBorderWidth:p0e(e),hasShadow:m0e(e)}}function u0e(e){return e?.border?.color}function d0e(e){return e?.border?.radius}function f0e(e){return e?.border?.style}function p0e(e){return e?.border?.width}function m0e(e){let t=gW(e);return!!e?.shadow&&t.length>0}function k$e({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n,label:i}){let s=fr();return(0,uc.jsx)(zi.__experimentalToolsPanel,{label:i,resetAll:()=>{let l=e(o);t(l)},panelId:r,dropdownMenuProps:s,children:n})}var _$e={radius:!0,color:!0,width:!0,shadow:!0};function ZN({as:e=k$e,value:t,onChange:o,inheritedValue:r=t,settings:n,panelId:i,name:s,defaultControls:a=_$e}){let l=ku(n),u=n?.color?.custom,d=(0,s_.useCallback)(I=>ba({settings:n},"",I),[n]),f=I=>{let D=l.flatMap(({colors:j})=>j).find(({color:j})=>j===I);return D?"var:preset|color|"+D.slug:I},p=(0,s_.useMemo)(()=>{if((0,zi.__experimentalHasSplitBorders)(r?.border)){let I={...r?.border};return["top","right","bottom","left"].forEach(N=>{I[N]={...I[N],color:d(I[N]?.color)}}),I}return{...r?.border,color:r?.border?.color?d(r?.border?.color):void 0}},[r?.border,d]),g=I=>o({...t,border:I}),m=u0e(n),h=f0e(n),b=p0e(n),v=d0e(n),y=(0,s_.useMemo)(()=>typeof r?.border?.radius!="object"?d(r?.border?.radius):{topLeft:d(r?.border?.radius?.topLeft),topRight:d(r?.border?.radius?.topRight),bottomLeft:d(r?.border?.radius?.bottomLeft),bottomRight:d(r?.border?.radius?.bottomRight)},[r?.border?.radius,d]),k=I=>g({...p,radius:I}),S=()=>{let I=t?.border?.radius;return typeof I=="object"?Object.entries(I).some(Boolean):!!I},_=m0e(n),x=d(r?.shadow),w=n?.shadow?.presets??{},T=w.custom??w.theme??w.default??[],B=I=>{let N=T?.find(({shadow:D})=>D===I)?.slug;o(Ve(t,["shadow"],N?`var:preset|shadow|${N}`:I||void 0))},R=()=>!!t?.shadow,A=()=>B(void 0),O=()=>{if(S())return g({radius:t?.border?.radius});g(void 0)},P=I=>{let N={...I};(0,zi.__experimentalHasSplitBorders)(N)?["top","right","bottom","left"].forEach(D=>{N[D]&&(N[D]={...N[D],color:f(N[D]?.color)})}):N&&(N.color=f(N.color)),g({radius:p?.radius,...N})},L=(0,s_.useCallback)(I=>({...I,border:void 0,shadow:void 0}),[]),M=a?.color||a?.width,z=m||h||b||v,V=jb({blockName:s,hasShadowControl:_,hasBorderControl:z});return(0,uc.jsxs)(e,{resetAllFilter:L,value:t,onChange:o,panelId:i,label:V,children:[(b||m)&&(0,uc.jsx)(zi.__experimentalToolsPanelItem,{hasValue:()=>(0,zi.__experimentalIsDefinedBorder)(t?.border),label:(0,i_.__)("Border"),onDeselect:()=>O(),isShownByDefault:M,panelId:i,children:(0,uc.jsx)(zi.BorderBoxControl,{colors:l,disableCustomColors:!u,enableAlpha:!0,enableStyle:h,onChange:P,popoverOffset:40,popoverPlacement:"left-start",value:p,__experimentalIsRenderedInSidebar:!0,hideLabelFromVision:!_,label:(0,i_.__)("Border")})}),v&&(0,uc.jsx)(zi.__experimentalToolsPanelItem,{hasValue:S,label:(0,i_.__)("Radius"),onDeselect:()=>k(void 0),isShownByDefault:a.radius,panelId:i,children:(0,uc.jsx)(sM,{presets:n?.border?.radiusSizes,values:y,onChange:I=>{k(I||void 0)}})}),_&&(0,uc.jsxs)(zi.__experimentalToolsPanelItem,{label:(0,i_.__)("Shadow"),hasValue:R,onDeselect:A,isShownByDefault:a.shadow,panelId:i,children:[z?(0,uc.jsx)(zi.BaseControl.VisualLabel,{as:"legend",children:(0,i_.__)("Shadow")}):null,(0,uc.jsx)(c0e,{shadow:x,onShadowChange:B,settings:n})]})]})}var go=c(H(),1),rf=c(G(),1),a_=c(F(),1);var br=c(E(),1),XN=[];function g0e(e,{presetSetting:t,defaultSetting:o}){let r=!e?.color?.[o],n=e?.color?.[t]?.custom||XN,i=e?.color?.[t]?.theme||XN,s=e?.color?.[t]?.default||XN;return(0,a_.useMemo)(()=>[...n,...i,...r?XN:s],[r,n,i,s])}function h0e(e){return b0e(e)}function b0e(e){return e.color.customDuotone||e.color.defaultDuotone||e.color.duotone.length>0}function x$e({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n}){let i=fr(),s=()=>{let a=e(o);t(a)};return(0,br.jsx)(go.__experimentalToolsPanel,{label:(0,rf._x)("Filters","Name for applying graphical effects"),resetAll:s,panelId:r,dropdownMenuProps:i,children:n})}var w$e={duotone:!0},C$e={placement:"left-start",offset:36,shift:!0,className:"block-editor-duotone-control__popover",headerTitle:(0,rf.__)("Duotone")},E$e=({indicator:e,label:t})=>(0,br.jsxs)(go.__experimentalHStack,{justify:"flex-start",children:[(0,br.jsx)(go.__experimentalZStack,{isLayered:!1,offset:-8,children:(0,br.jsx)(go.Flex,{expanded:!1,children:e==="unset"||!e?(0,br.jsx)(go.ColorIndicator,{className:"block-editor-duotone-control__unset-indicator"}):(0,br.jsx)(go.DuotoneSwatch,{values:e})})}),(0,br.jsx)(go.FlexItem,{title:t,children:t})]}),T$e=(e,t)=>function({onToggle:r,isOpen:n}){let i=(0,a_.useRef)(void 0),s={onClick:r,className:W("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,rf.__)("Reset")};return(0,br.jsxs)(br.Fragment,{children:[(0,br.jsx)(go.Button,{__next40pxDefaultSize:!0,...s,children:(0,br.jsx)(E$e,{indicator:e,label:(0,rf.__)("Duotone")})}),e&&(0,br.jsx)(go.Button,{size:"small",icon:Bn,...a})]})};function QN({as:e=x$e,value:t,onChange:o,inheritedValue:r=t,settings:n,panelId:i,defaultControls:s=w$e}){let a=b=>ba({settings:n},"",b),l=b0e(n),u=g0e(n,{presetSetting:"duotone",defaultSetting:"defaultDuotone"}),d=g0e(n,{presetSetting:"palette",defaultSetting:"defaultPalette"}),f=a(r?.filter?.duotone),p=b=>{let v=u.find(({colors:k})=>k===b),y=v?`var:preset|duotone|${v.slug}`:b;o(Ve(t,["filter","duotone"],y))},g=()=>!!t?.filter?.duotone,m=()=>p(void 0),h=(0,a_.useCallback)(b=>({...b,filter:{...b.filter,duotone:void 0}}),[]);return(0,br.jsx)(e,{resetAllFilter:h,value:t,onChange:o,panelId:i,children:l&&(0,br.jsx)(go.__experimentalToolsPanelItem,{label:(0,rf.__)("Duotone"),hasValue:g,onDeselect:m,isShownByDefault:s.duotone,panelId:i,children:(0,br.jsx)(go.Dropdown,{popoverProps:C$e,className:"block-editor-global-styles-filters-panel__dropdown",renderToggle:T$e(f,m),renderContent:()=>(0,br.jsx)(go.__experimentalDropdownContentWrapper,{paddingSize:"small",children:(0,br.jsxs)(go.MenuGroup,{label:(0,rf.__)("Duotone"),children:[(0,br.jsx)("p",{children:(0,rf.__)("Create a two-tone color effect without losing your original image.")}),(0,br.jsx)(go.DuotonePicker,{colorPalette:d,duotonePalette:u,disableCustomColors:!0,disableCustomDuotone:!0,value:f,onChange:p})]})})})})})}var l_=c(H(),1),RE=c(G(),1);var Hb=c(E(),1);function y0e(e,t,o){return e==="core/image"&&o?.lightbox?.allowEditing||!!t?.lightbox}function v0e({onChange:e,value:t,inheritedValue:o,panelId:r}){let n=fr(),i=()=>{e(void 0)},s=l=>{e({enabled:l})},a=!1;return o?.lightbox?.enabled&&(a=o.lightbox.enabled),(0,Hb.jsx)(Hb.Fragment,{children:(0,Hb.jsx)(l_.__experimentalToolsPanel,{label:(0,RE._x)("Settings","Image settings"),resetAll:i,panelId:r,dropdownMenuProps:n,children:(0,Hb.jsx)(l_.__experimentalToolsPanelItem,{hasValue:()=>!!t?.lightbox,label:(0,RE.__)("Enlarge on click"),onDeselect:i,isShownByDefault:!0,panelId:r,children:(0,Hb.jsx)(l_.ToggleControl,{label:(0,RE.__)("Enlarge on click"),checked:a,onChange:s})})})})}var JN=c(H(),1);var k0e=c(F(),1),eD=c(G(),1);var BE=c(E(),1);function hW(e){return!(typeof e=="string"&&/<\/?\w/.test(e))}function _0e(e){return hW(e)?null:(0,eD.__)("The custom CSS is invalid. Do not use <> markup.")}function S0e(e){if(!e)return null;let t=_0e(e);if(t)return t;let[o]=cS([{css:e}],".for-validation-only");return o===null?(0,eD.__)("There is an error with your CSS structure."):null}function tD({value:e,onChange:t,inheritedValue:o=e,help:r}){let n=o?.css,[i,s]=(0,k0e.useState)(()=>S0e(n));function a(u){t({...e,css:u}),s(_0e(u))}function l(u){s(S0e(u?.target?.value))}return(0,BE.jsxs)(Xe,{direction:"column",gap:"md",className:"block-editor-global-styles-advanced-panel",children:[i&&(0,BE.jsx)(JN.Notice,{status:"error",onRemove:()=>s(null),children:i}),(0,BE.jsx)(JN.TextareaControl,{label:(0,eD.__)("Additional CSS"),value:n,onChange:u=>a(u),onBlur:l,className:"block-editor-global-styles-advanced-panel__custom-css-input",spellCheck:!1,help:r})]})}var iD=c(H(),1),P0e=c(F(),1),sf=c(G(),1);var mt=c(H(),1);var Vo=c(G(),1),w0e=c(es(),1),bW=c(As(),1),nf=c(F(),1),PE=c(Z(),1),C0e=c(Et(),1),E0e=c(dU(),1);var ct=c(E(),1),oD="image",R$e={placement:"left-start",offset:36,shift:!0,className:"block-editor-global-styles-background-panel__popover"},nD=()=>{},rD=e=>{window.requestAnimationFrame(()=>{let[t]=C0e.focus.tabbable.find(e?.current);t&&t.focus()})};function B$e(e){return e==="cover"||e===void 0?(0,Vo.__)("Image covers the space evenly."):e==="contain"?(0,Vo.__)("Image is contained without distortion."):(0,Vo.__)("Image has a fixed width.")}var P$e=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}%`},I$e=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 T0e({as:e="span",imgUrl:t,toggleProps:o={},filename:r,label:n,onToggleCallback:i=nD}){let{isOpen:s,...a}=o;(0,nf.useEffect)(()=>{typeof s<"u"&&i(s)},[s,i]);let l=()=>(0,ct.jsxs)(mt.__experimentalHStack,{className:"block-editor-global-styles-background-panel__inspector-preview-inner",children:[(0,ct.jsx)("span",{className:"block-editor-global-styles-background-panel__inspector-image-indicator",style:{backgroundImage:t?`url(${t})`:void 0}}),(0,ct.jsxs)(mt.FlexBlock,{children:[(0,ct.jsx)(mt.__experimentalTruncate,{numberOfLines:1,className:"block-editor-global-styles-background-panel__inspector-media-replace-title",children:n}),(0,ct.jsx)(pt,{render:(0,ct.jsx)("span",{}),children:t?(0,Vo.sprintf)((0,Vo.__)("Background image: %s"),r||n):(0,Vo.__)("No background image selected")})]})]});return e==="button"?(0,ct.jsx)(mt.Button,{__next40pxDefaultSize:!0,...a,children:l()}):l()}function O$e({label:e,filename:t,url:o,children:r,onToggle:n=nD,hasImageValue:i,onReset:s,containerRef:a}){if(!i)return;let l=e||(0,bW.getFilename)(o)||(0,Vo.__)("Image");return(0,ct.jsx)(mt.Dropdown,{popoverProps:R$e,renderToggle:({onToggle:u,isOpen:d})=>{let f={onClick:u,className:"block-editor-global-styles-background-panel__dropdown-toggle","aria-expanded":d,"aria-label":(0,Vo.__)("Background size, position and repeat options."),isOpen:d};return(0,ct.jsxs)(ct.Fragment,{children:[(0,ct.jsx)(T0e,{imgUrl:o,filename:t,label:l,toggleProps:f,as:"button",onToggleCallback:n}),s&&(0,ct.jsx)(mt.Button,{__next40pxDefaultSize:!0,label:(0,Vo.__)("Reset"),className:"block-editor-global-styles-background-panel__reset",size:"small",icon:Bn,onClick:()=>{s(),d&&u(),rD(a)}})]})},renderContent:()=>(0,ct.jsx)(mt.__experimentalDropdownContentWrapper,{className:"block-editor-global-styles-background-panel__dropdown-content-wrapper",paddingSize:"medium",children:r})})}function A$e(){return(0,ct.jsx)(mt.Placeholder,{className:"block-editor-global-styles-background-panel__loading",children:(0,ct.jsx)(mt.Spinner,{})})}function x0e({onChange:e,style:t,inheritedValue:o,onRemoveImage:r=nD,onResetImage:n=nD,displayInPanel:i,defaultValues:s,containerRef:a}){let[l,u]=(0,nf.useState)(!1),{getSettings:d}=(0,PE.useSelect)(C),{id:f,title:p,url:g}=t?.background?.backgroundImage||{...o?.background?.backgroundImage},{createErrorNotice:m}=(0,PE.useDispatch)(w0e.store),h=w=>{m(w,{type:"snackbar"}),u(!1)},b=()=>e(Ve(t,["background","backgroundImage"],void 0)),v=w=>{if(!w||!w.url){b(),u(!1);return}if((0,E0e.isBlobURL)(w.url)){u(!0);return}if(w.media_type&&w.media_type!==oD||!w.media_type&&w.type&&w.type!==oD){h((0,Vo.__)("Only images can be used as a background image."));return}let T=t?.background?.backgroundSize||s?.backgroundSize,B=t?.background?.backgroundPosition;e(Ve(t,["background"],{...t?.background,backgroundImage:{url:w.url,id:w.id,source:"file",title:w.title||void 0},backgroundPosition:!B&&(T==="auto"||!T)?"50% 0":B,backgroundSize:T})),u(!1),rD(a)},y=w=>{d().mediaUpload({allowedTypes:[oD],filesList:w,onFileChange([T]){v(T)},onError:h,multiple:!1})},k=Vm(t),S=()=>e(Ve(t,["background"],{backgroundImage:"none"})),_=!k&&Vm(o),x=p||(0,bW.getFilename)(g)||(0,Vo.__)("Image");return(0,ct.jsxs)("div",{className:"block-editor-global-styles-background-panel__image-tools-panel-item",children:[l&&(0,ct.jsx)(A$e,{}),(0,ct.jsx)(Vk,{mediaId:f,mediaURL:g,allowedTypes:[oD],accept:"image/*",onSelect:v,popoverProps:{className:W({"block-editor-global-styles-background-panel__media-replace-popover":i})},name:(0,ct.jsx)(T0e,{imgUrl:g,filename:p,label:x}),renderToggle:w=>(0,ct.jsx)(mt.Button,{...w,__next40pxDefaultSize:!0}),onError:h,onReset:()=>{rD(a),n()},children:_&&(0,ct.jsx)(mt.MenuItem,{onClick:()=>{rD(a),S(),r()},children:(0,Vo.__)("Remove")})}),(0,ct.jsx)(mt.DropZone,{onFilesDrop:y,label:(0,Vo.__)("Drop to upload")})]})}function L$e({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,l=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),p=v=>{let y=i,k=l;v==="contain"&&(y="no-repeat",k=void 0),v==="cover"&&(y=void 0,k=void 0),(d==="cover"||d==="contain")&&v==="auto"&&(y=void 0,t?.background?.backgroundImage?.id&&(k="50% 0")),!v&&d==="auto"&&(v="auto"),e(Ve(t,["background"],{...t?.background,backgroundPosition:k,backgroundRepeat:y,backgroundSize:v}))},g=v=>{e(Ve(t,["background","backgroundPosition"],P$e(v)))},m=()=>e(Ve(t,["background","backgroundRepeat"],f===!0?"no-repeat":"repeat")),h=()=>e(Ve(t,["background","backgroundAttachment"],u==="fixed"?"scroll":"fixed")),b=!l&&a&&n==="contain"?r?.backgroundPosition:l;return(0,ct.jsxs)(mt.__experimentalVStack,{spacing:3,className:"single-column",children:[(0,ct.jsx)(mt.FocalPointPicker,{label:(0,Vo.__)("Focal point"),url:s,value:I$e(b),onChange:g}),(0,ct.jsx)(mt.ToggleControl,{label:(0,Vo.__)("Fixed background"),checked:u==="fixed",onChange:h}),(0,ct.jsxs)(mt.__experimentalToggleGroupControl,{label:(0,Vo.__)("Size"),value:d,onChange:p,isBlock:!0,help:B$e(n||r?.backgroundSize),children:[(0,ct.jsx)(mt.__experimentalToggleGroupControlOption,{value:"cover",label:(0,Vo._x)("Cover","Size option for background image control")},"cover"),(0,ct.jsx)(mt.__experimentalToggleGroupControlOption,{value:"contain",label:(0,Vo._x)("Contain","Size option for background image control")},"contain"),(0,ct.jsx)(mt.__experimentalToggleGroupControlOption,{value:"auto",label:(0,Vo._x)("Tile","Size option for background image control")},"tile")]}),(0,ct.jsxs)(mt.__experimentalHStack,{justify:"flex-start",spacing:2,as:"span",children:[(0,ct.jsx)(mt.__experimentalUnitControl,{"aria-label":(0,Vo.__)("Background image width"),onChange:p,value:n,__unstableInputWidth:"100px",min:0,placeholder:(0,Vo.__)("Auto"),disabled:d!=="auto"||d===void 0}),(0,ct.jsx)(mt.ToggleControl,{label:(0,Vo.__)("Repeat"),checked:f,onChange:m,disabled:d==="cover"})]})]})}function R0e({value:e,onChange:t,inheritedValue:o=e,settings:r,defaultValues:n={}}){let{globalStyles:i,_links:s}=(0,PE.useSelect)(v=>{let{getSettings:y}=v(C),k=y();return{globalStyles:k[Zi],_links:k[I1]}},[]),a=(0,nf.useMemo)(()=>{let v={background:{}};return o?.background?(Object.entries(o?.background).forEach(([y,k])=>{v.background[y]=Ty(k,{styles:i,_links:s})}),v):o},[i,s,o]),l=()=>t(Ve(e,["background"],{})),{title:u,url:d}=e?.background?.backgroundImage||{...a?.background?.backgroundImage},f=Vm(e)||Vm(a),p=e?.background?.backgroundImage||o?.background?.backgroundImage,g=f&&p!=="none"&&(r?.background?.backgroundSize||r?.background?.backgroundPosition||r?.background?.backgroundRepeat),[m,h]=(0,nf.useState)(!1),b=(0,nf.useRef)();return(0,ct.jsx)("div",{ref:b,className:W("block-editor-global-styles-background-panel__inspector-media-replace-container",{"is-open":m}),children:g?(0,ct.jsx)(O$e,{label:u,filename:u,url:d,onToggle:h,hasImageValue:f,onReset:l,containerRef:b,children:(0,ct.jsxs)(mt.__experimentalVStack,{spacing:3,className:"single-column",children:[(0,ct.jsx)(x0e,{onChange:t,style:e,inheritedValue:a,displayInPanel:!0,onResetImage:()=>{h(!1),l()},onRemoveImage:()=>h(!1),defaultValues:n,containerRef:b}),(0,ct.jsx)(L$e,{onChange:t,style:e,defaultValues:n,inheritedValue:a})]})}):(0,ct.jsx)(x0e,{onChange:t,style:e,inheritedValue:a,defaultValues:n,onResetImage:()=>{h(!1),l()},onRemoveImage:()=>h(!1),containerRef:b})})}var _u=c(E(),1),M$e={backgroundImage:!0,backgroundColor:!0,gradient:!0};function B0e(e,t){return e?.background?.[t]}function sD(e){let t=cW(e),{backgroundImage:o,gradient:r}=e?.background||{};return o||r||t}function Vm(e){return!!e?.background?.backgroundImage?.id||typeof e?.background?.backgroundImage=="string"||!!e?.background?.backgroundImage?.url}function yW(e){return typeof e?.background?.gradient=="string"&&e?.background?.gradient!==""}function N$e(e){return!!e?.color?.background}function D$e(e){return!!e?.color?.gradient}function vW({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n,headerLabel:i}){let s=fr();return(0,_u.jsx)(iD.__experimentalToolsPanel,{label:i,resetAll:()=>{let l=e(o);t(l)},panelId:r,hasInnerWrapper:!0,className:"background-block-support-panel",__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last",dropdownMenuProps:s,children:(0,_u.jsx)("div",{className:"background-block-support-panel__inner-wrapper",children:n})})}function aD({as:e=vW,value:t,onChange:o,inheritedValue:r=t,settings:n,panelId:i,defaultControls:s=M$e,defaultValues:a={},headerLabel:l=(0,sf.__)("Background"),contrastWarning:u}){let{colors:d,gradients:f,allColors:p,areCustomSolidsEnabled:g,areCustomGradientsEnabled:m,hasSolidColors:h,hasGradientColors:b,decodeValue:v,encodeGradientValue:y}=e_(n),k=B0e(n,"gradient"),S=cW(n),_=S&&h,x=b&&k,w=S&&b&&!k,T=B0e(n,"backgroundImage"),B=(0,P0e.useCallback)(X=>{let ee=_,J=k||w;return!ee&&!J?{...X,background:{}}:{...X,background:{},color:{...X?.color,...ee&&{background:void 0},...J&&{gradient:void 0}}}},[k,_,w]);if(!T&&!_&&!x&&!w)return null;let R=()=>o(Ve(t,["background","backgroundImage"],void 0)),A=()=>{let X=Ve(t,["background","gradient"],void 0);X=Ve(X,["color","gradient"],void 0),o(X)},O=v(r?.color?.background),P=v(t?.color?.background),L=(X,ee)=>{let J=Ve(t,["color","background"],of(p,X,ee));w&&(J.color.gradient=void 0),o(J)},M=()=>{let X=Ve(t,["color","background"],void 0);w&&(X.color.gradient=void 0),o(X)},z=v(r?.color?.gradient),V=v(t?.color?.gradient),I=X=>{let ee=Ve(t,["color","gradient"],y(X));ee.color.background=void 0,o(ee)},N=()=>o(Ve(t,["color","gradient"],void 0)),D=v(t?.background?.gradient??t?.color?.gradient),j=v(r?.background?.gradient??r?.color?.gradient),Y=X=>{let ee=Ve(t,["background","gradient"],y(X));ee=Ve(ee,["color","gradient"],void 0),o(ee)};return(0,_u.jsxs)(e,{resetAllFilter:B,value:t,onChange:o,panelId:i,headerLabel:l,children:[T&&(0,_u.jsx)(iD.__experimentalToolsPanelItem,{className:"block-editor-color-gradient-item",hasValue:()=>Vm(t),label:(0,sf.__)("Image"),onDeselect:R,isShownByDefault:s.backgroundImage,panelId:i,children:(0,_u.jsx)(R0e,{value:t,onChange:o,settings:n,inheritedValue:r,defaultControls:s,defaultValues:a})}),_&&(0,_u.jsx)(Dm,{label:(0,sf.__)("Color"),hasValue:()=>N$e(t),resetValue:M,isShownByDefault:s.backgroundColor,indicators:[P??O],contrastWarning:u,tabs:[{key:"background",label:(0,sf.__)("Color"),inheritedValue:P??O,inheritedSlug:Fi(t?.color?.background,"color")??Fi(r?.color?.background,"color"),setValue:L,userValue:P}],colorGradientControlSettings:{colors:d,disableCustomColors:!g},panelId:i}),x&&(0,_u.jsx)(Dm,{label:(0,sf.__)("Gradient"),hasValue:()=>yW(t),resetValue:A,isShownByDefault:s.gradient,indicators:[D],tabs:[{key:"gradient",label:(0,sf.__)("Gradient"),inheritedValue:D??j,setValue:Y,userValue:D,isGradient:!0}],colorGradientControlSettings:{gradients:f,disableCustomGradients:!m},panelId:i}),w&&(0,_u.jsx)(Dm,{label:(0,sf.__)("Gradient"),hasValue:()=>D$e(t),resetValue:N,isShownByDefault:s.gradient,indicators:[V??z],tabs:[{key:"gradient",label:(0,sf.__)("Gradient"),inheritedValue:V??z,setValue:I,userValue:V,isGradient:!0}],colorGradientControlSettings:{gradients:f,disableCustomGradients:!m},panelId:i})]})}var xu=c(G(),1);var Fm=c(H(),1);var dc=c(E(),1);function lD({viewportStates:e=[],pseudoStates:t=[],viewportValue:o="default",pseudoStateValue:r="default",onChangeViewport:n,onChangePseudoState:i,showText:s=!0,popoverProps:a={}}){if(!e.length&&!t.length)return null;let l=[{label:(0,xu.__)("Default"),value:"default"},...e.map(v=>({label:v.label,value:v.value}))],u=[{label:(0,xu.__)("Default"),value:"default"},...t.map(v=>({label:v.label,value:v.value}))],d=e.length>0,f=t.length>0,p=(0,xu.__)("States"),g=[];if(d&&o!=="default"){let v=l.find(y=>y.value===o);v&&g.push({key:`viewport-${v.value}`,label:v.label})}if(f&&r!=="default"){let v=u.find(y=>y.value===r);v&&g.push({key:`pseudo-${v.value}`,label:v.label})}let m=g.length?g.map(v=>v.label).join(", "):(0,xu.__)("Default"),h=s?on:Ls,b=s?{size:"compact",variant:"tertiary",iconPosition:"right"}:{size:"compact",variant:"tertiary"};return(0,dc.jsx)(Xe,{direction:"column",gap:"sm",align:"flex-end",className:"block-editor-global-styles-state-control",children:(0,dc.jsx)(Fm.DropdownMenu,{icon:h,label:s?p:(0,xu.sprintf)((0,xu.__)("State: %s"),m),popoverProps:{placement:"right-start",...a},text:s?p:void 0,toggleProps:b,children:({onClose:v})=>(0,dc.jsxs)(dc.Fragment,{children:[d&&(0,dc.jsx)(Fm.MenuGroup,{label:(0,xu.__)("Viewport"),children:l.map(y=>(0,dc.jsx)(Fm.MenuItem,{onClick:()=>{n?.(y.value),f||v()},icon:o===y.value?Xi:null,children:y.label},`viewport-${y.value}`))}),f&&(0,dc.jsx)(Fm.MenuGroup,{label:(0,xu.__)("Pseudo state"),children:u.map(y=>(0,dc.jsx)(Fm.MenuItem,{onClick:()=>{i?.(y.value),d||v()},icon:r===y.value?Xi:null,children:y.label},`pseudo-${y.value}`))})]})})})}var I0e=c(H(),1),c_=c(G(),1);var wu=c(E(),1),{Badge:V$e}=U(I0e.privateApis);function cD({viewportStates:e=[],pseudoStates:t=[],viewportValue:o="default",pseudoStateValue:r="default",className:n="block-editor-global-styles-state-control__badges"}){let i=[],s=e.find(l=>l.value===o),a=t.find(l=>l.value===r);return s&&i.push({key:`viewport-${s.value}`,label:s.label,tooltipText:(0,c_.sprintf)((0,c_.__)("Style changes apply to the %s viewport."),s.label)}),a&&i.push({key:`pseudo-${a.value}`,label:a.label,tooltipText:(0,c_.sprintf)((0,c_.__)("Style changes apply to the %s state."),a.label)}),(0,wu.jsx)(Xe,{className:n,direction:"row",justify:"flex-start",gap:"xs",wrap:"wrap",children:i.map(l=>{let u=(0,wu.jsxs)(V$e,{className:"block-editor-global-styles-state-control__badge",intent:"info",children:[l.label,!!l.tooltipText&&(0,wu.jsx)(pt,{render:(0,wu.jsx)("span",{}),children:l.tooltipText})]},l.key);return l.tooltipText?(0,wu.jsxs)(vt.Root,{children:[(0,wu.jsx)(vt.Trigger,{render:(0,wu.jsx)("span",{className:"block-editor-global-styles-state-control__badge-tooltip-trigger",children:u})}),(0,wu.jsx)(vt.Popup,{children:l.tooltipText})]},l.key):u})})}var _W=c(E(),1),Gb="__experimentalBorder",OE="shadow",O0e=(e,t,o)=>{let r;return e.some(n=>n.colors.some(i=>i[t]===o?(r=i,!0):!1)),r},Ub=({colors:e,namedColor:t,customColor:o})=>{if(t){let n=O0e(e,"slug",t);if(n)return n}if(!o)return{color:void 0};let r=O0e(e,"color",o);return r||{color:o}};function uD(e){let t=/var:preset\|color\|(.+)/.exec(e);return t&&t[1]?t[1]:null}function M0e(e){if((0,kW.__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:Ge(r),borderColor:o}}function N0e(e){return(0,kW.__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 F$e({label:e,children:t,resetAllFilter:o}){let r=(0,fD.useCallback)(n=>{let i=N0e(n),s=o(i);return{...n,...M0e(s)}},[o]);return(0,_W.jsx)(Oe,{group:"border",resetAllFilter:r,label:e,children:t})}function D0e({clientId:e,name:t,setAttributes:o,settings:r}){let n=Ua(),i=qN(r),{style:s,borderColor:a}=(0,L0e.useSelect)(p=>{if(!i)return{};let{style:g,borderColor:m}=p(C).getBlockAttributes(e)||{};return{style:g,borderColor:m}},[e,i]),l=!vn(n),u=(0,fD.useMemo)(()=>l?Io(s,n):N0e({style:s,borderColor:a}),[l,n,s,a]),d=l?p=>{o({style:Sn(s,n,p)})}:p=>{o(M0e(p))};if(!i)return null;let f={...(0,IE.getBlockSupport)(t,[Gb,"__experimentalDefaultControls"]),...(0,IE.getBlockSupport)(t,[OE,"__experimentalDefaultControls"])};return(0,_W.jsx)(ZN,{as:F$e,panelId:e,settings:r,value:u,onChange:d,defaultControls:f})}function pD(e,t="any"){let o=(0,IE.getBlockSupport)(e,Gb);return o===!0?!0:t==="any"?!!(o?.color||o?.radius||o?.width||o?.style):!!o?.[t]}function jb({blockName:e,hasBorderControl:t,hasShadowControl:o}={}){let r=sl(e),n=TE(r);return!t&&!o&&e&&(t=n?.hasBorderColor||n?.hasBorderStyle||n?.hasBorderWidth||n?.hasBorderRadius,o=n?.hasShadow),t&&o?(0,dD.__)("Border & Shadow"):o?(0,dD.__)("Shadow"):(0,dD.__)("Border")}function z$e(e){return!pD(e,"color")||e.attributes.borderColor?e:{...e,attributes:{...e.attributes,borderColor:{type:"string"}}}}function V0e(e,t,o){if(!pD(t,"color")||Ft(t,Gb,"color"))return e;let r=xW(o),n=W(e.className,r);return e.className=n||void 0,e}function xW(e){let{borderColor:t,style:o}=e,r=ma("border-color",t);return W({"has-border-color":t||o?.border?.color,[r]:!!r})}function j$e({name:e,borderColor:t,style:o}){let{colors:r}=wm();if(!pD(e,"color")||Ft(e,Gb,"color"))return{};let{color:n}=Ub({colors:r,namedColor:t}),{color:i}=Ub({colors:r,namedColor:uD(o?.border?.top?.color)}),{color:s}=Ub({colors:r,namedColor:uD(o?.border?.right?.color)}),{color:a}=Ub({colors:r,namedColor:uD(o?.border?.bottom?.color)}),{color:l}=Ub({colors:r,namedColor:uD(o?.border?.left?.color)});return V0e({style:Ge({borderTopColor:i||n,borderRightColor:s||n,borderBottomColor:a||n,borderLeftColor:l||n})||{}},e,{borderColor:t,style:o})}var wW={useBlockProps:j$e,addSaveProps:V0e,attributeKeys:["borderColor","style"],hasSupport(e){return pD(e,"color")}};(0,A0e.addFilter)("blocks.registerBlockType","core/border/addAttributes",z$e);var PW=c(ce(),1),vD=c(F(),1),q0e=c(Z(),1),Z0e=c(G(),1);var TW=c(uo(),1),f_=c(ce(),1),K0e=c(F(),1);var d_=c(ce(),1),U0e=c(Z(),1),G0e=c(G(),1);var Wb=c(F(),1),z0e=c(Z(),1),j0e=c(ce(),1);var H0e=c(Kr(),1);function mD(e,t){return e.ownerDocument.defaultView.getComputedStyle(e).getPropertyValue(t)}function F0e(e,t){if(!e||!t)return{};let o=Ms(t,"color.text",{fallback:!0}),r=Ms(t,"color.background",{fallback:!0}),n=e.querySelector(o)||e,i=e.querySelector(r)||e,s=e.querySelector("a"),a=mD(n,"color"),l=s&&s.textContent?mD(s,"color"):void 0,u=i,d=mD(u,"background-color");for(;d==="rgba(0, 0, 0, 0)"&&u.parentNode&&u.parentNode.nodeType===u.parentNode.ELEMENT_NODE;)u=u.parentNode,d=mD(u,"background-color");return{textColor:a,backgroundColor:d,linkColor:l}}function H$e(e,t){return Object.keys(t).some(r=>e[r]!==t[r])?t:e}function u_({clientId:e,name:t,enabled:o=!0,checkTextColor:r=!0,checkLinkColor:n=!0,messageOverride:i}){let s=Mt(e),[a,l]=(0,Wb.useReducer)(H$e,{}),u=(0,z0e.useSelect)(p=>t&&o?p(j0e.store).getBlockType(t):void 0,[t,o]);(0,Wb.useLayoutEffect)(()=>{!o||!s||!u||window.requestAnimationFrame(()=>window.requestAnimationFrame(()=>l(F0e(s,u))))}),(0,Wb.useLayoutEffect)(()=>{if(!o||!s||!u)return;let p=new window.MutationObserver(()=>{l(F0e(s,u))});return p.observe(s,{attributes:!0,attributeFilter:["class","style"],subtree:!0}),()=>{p.disconnect()}},[o,s,u]);let d=o?Y9({backgroundColor:a.backgroundColor,textColor:r?a.textColor:void 0,linkColor:n?a.linkColor:void 0,messageOverride:i,enableAlphaChecker:!0}):null,f=d?.speakMessage;return(0,Wb.useEffect)(()=>{f&&(0,H0e.speak)(f)},[f]),d?.message}var EW=c(E(),1),$b="background",CW={backgroundSize:"cover",backgroundPosition:"50% 50%"};function AE(e,t="any"){let o=(0,d_.getBlockSupport)(e,$b);return o===!0?!0:t==="any"?!!o?.backgroundImage||!!o?.backgroundSize||!!o?.backgroundRepeat||!!o?.gradient:!!o?.[t]}function gD(e){if(!e||!e?.backgroundImage?.url)return;let t;return e?.backgroundSize||(t={backgroundSize:CW.backgroundSize}),e?.backgroundSize==="contain"&&!e?.backgroundPosition&&(t={backgroundPosition:CW.backgroundPosition}),t}function U$e({name:e,style:t}){if(!AE(e)||!t?.background?.backgroundImage)return;let o=gD(t?.background);if(o)return{style:{...o}}}function W0e(e){return Vm(e)||yW(e)?"has-background":""}function G$e(e){let t=e.className?.includes("has-background")?e.className.split(" ").filter(o=>o!=="has-background").join(" ")||void 0:e.className;return{...e,className:t,backgroundColor:void 0,gradient:void 0,style:Ge({...e.style,background:void 0,color:{...e.style?.color,background:void 0,gradient:void 0}})}}function W$e({children:e}){return(0,EW.jsx)(Oe,{group:"background",resetAllFilter:G$e,children:e})}function hD({clientId:e,name:t,setAttributes:o,settings:r,asWrapper:n}){let i=Ua(),{style:s,className:a,backgroundColor:l,gradient:u,inheritedValue:d}=(0,U0e.useSelect)(R=>{let{getBlockAttributes:A,getSettings:O}=R(C),P=O(),L=A(e);return{style:L?.style,className:L?.className,backgroundColor:L?.backgroundColor,gradient:L?.gradient,inheritedValue:P[Zi]?.blocks?.[t]}},[e,t]),f=AE(t,"gradient"),p=(0,d_.getBlockSupport)(t,"color"),g=p&&p.background!==!1,m=!!p?.gradients,h=!vn(i),b={...s,color:{...s?.color,background:l?"var:preset|color|"+l:s?.color?.background,gradient:!f&&u?"var:preset|gradient|"+u:s?.color?.gradient},...f&&{background:{...s?.background,gradient:u?"var:preset|gradient|"+u:s?.background?.gradient??s?.color?.gradient}}},v=h?Io(s,i):b,y=!v?.color?.gradient&&!v?.background?.gradient&&!!v?.color?.background&&(r?.color?.text||r?.color?.link)&&(0,d_.getBlockSupport)(t,["color","enableContrastChecker"])!==!1,k=u_({clientId:e,name:t,enabled:!!y,messageOverride:(0,G0e.__)("This color combination has poor contrast. Consider increasing contrast between background and foreground.")});if(!sD(r)||!AE(t)&&!g&&!m)return null;let S=R=>{if(h){o({style:Sn(s,i,R)});return}let A=R?.color?.background,O=Fi(A,"color"),P=f?R?.background?.gradient:R?.color?.gradient,L=Fi(P,"gradient"),M=L?void 0:R?.color?.gradient,z={...R,color:{...R?.color,background:O?void 0:A,gradient:f?void 0:M}};f&&(z.background={...z.background,gradient:R?.background?.gradient});let V=f&&!!s?.color?.gradient,I={style:Ge(z),backgroundColor:O,gradient:f?void 0:L},N=!!L||!!P;V&&N?I.className=W(a,"has-background"):!N&&a?.includes("has-background")&&(I.className=a.split(" ").filter(D=>D!=="has-background").join(" ")||void 0),o(I)},_={...r,background:{...r.background,backgroundSize:r?.background?.backgroundSize&&AE(t,"backgroundSize")}},x=(0,d_.getBlockSupport)(t,[$b,"__experimentalDefaultControls"]),w=(0,d_.getBlockSupport)(t,["color","__experimentalDefaultControls"]),T={...x,backgroundColor:w?.background,gradient:x?.gradient??w?.background};return(0,EW.jsx)(aD,{inheritedValue:d,as:n||W$e,panelId:e,defaultValues:CW,settings:_,onChange:S,defaultControls:T,value:v,contrastWarning:k})}var $0e={useBlockProps:U$e,attributeKeys:["style"],hasSupport:AE};var Cn="color",bD=e=>{let t=(0,f_.getBlockSupport)(e,Cn);return t&&(t.link===!0||t.gradient===!0||t.background!==!1||t.text!==!1)},$$e=e=>{let t=(0,f_.getBlockSupport)(e,Cn);return t!==null&&typeof t=="object"&&!!t.link},RW=e=>{let t=(0,f_.getBlockSupport)(e,Cn);return t!==null&&typeof t=="object"&&!!t.gradients},K$e=e=>{let t=(0,f_.getBlockSupport)(e,Cn);return t&&t.background!==!1},Y$e=e=>{let t=(0,f_.getBlockSupport)(e,Cn);return t&&t.text!==!1};function q$e(e){return bD(e)&&(e.attributes.backgroundColor||Object.assign(e.attributes,{backgroundColor:{type:"string"}}),e.attributes.textColor||Object.assign(e.attributes,{textColor:{type:"string"}}),RW(e)&&!e.attributes.gradient&&Object.assign(e.attributes,{gradient:{type:"string"}})),e}function Y0e(e,t,o){if(!bD(t)||Ft(t,Cn))return e;let r=RW(t),{backgroundColor:n,textColor:i,gradient:s,style:a}=o,l=h=>!Ft(t,Cn,h),u=l("text")?ma("color",i):void 0,d=l("gradients")?jy(s):void 0,f=l("background")?ma("background-color",n):void 0,p=l("background")||l("gradients"),g=n||a?.color?.background||r&&(s||a?.color?.gradient),m=W(e.className,u,d,{[f]:(!r||!a?.color?.gradient)&&!!f,"has-text-color":l("text")&&(i||a?.color?.text),"has-background":p&&g,"has-link-color":l("link")&&a?.elements?.link?.color});return e.className=m||void 0,e}function Z$e({name:e,backgroundColor:t,textColor:o,gradient:r,style:n}){let[i,s,a]=Me("color.palette.custom","color.palette.theme","color.palette.default"),l=(0,K0e.useMemo)(()=>[...i||[],...s||[],...a||[]],[i,s,a]);if(!bD(e)||Ft(e,Cn))return{};let u={};o&&!Ft(e,Cn,"text")&&(u.color=wc(l,o)?.color),t&&!Ft(e,Cn,"background")&&(u.backgroundColor=wc(l,t)?.color);let d=Y0e({style:u},e,{textColor:o,backgroundColor:t,gradient:r,style:n}),f=t||n?.color?.background||r||n?.color?.gradient;return{...d,className:W(d.className,!f&&W0e(n))}}var BW={useBlockProps:Z$e,addSaveProps:Y0e,attributeKeys:["backgroundColor","textColor","gradient","style"],hasSupport:bD},X$e={linkColor:[["style","elements","link","color","text"]],textColor:[["textColor"],["style","color","text"]],backgroundColor:[["backgroundColor"],["style","color","background"]],gradient:[["gradient"],["style","color","gradient"]]};function Q$e(e,t,o,r){let n=e.name,i={linkColor:$$e(n),textColor:Y$e(n),backgroundColor:K$e(n),gradient:RW(n)};return yD(i,X$e,e,t,o,r)}(0,TW.addFilter)("blocks.registerBlockType","core/color/addAttribute",q$e);(0,TW.addFilter)("blocks.switchToBlockType.transformedBlock","core/color/addTransforms",Q$e);var IW=c(E(),1);function J$e({children:e,resetAllFilter:t}){let o=(0,vD.useCallback)(r=>{let n=t(r.style);return{...r,style:Ge(n)}},[t]);return(0,IW.jsx)(Oe,{group:"elements",resetAllFilter:o,children:e})}function SD({clientId:e,name:t,setAttributes:o,settings:r,asWrapper:n,label:i,defaultControls:s}){let a=Ua(),l=DN(r),u=(0,q0e.useSelect)(b=>l?b(C).getBlockAttributes(e)?.style:void 0,[e,l]),d=!vn(a),f=(0,vD.useMemo)(()=>d?Io(u,a):u,[d,a,u]),p=d?b=>{o({style:Sn(u,a,b)})}:b=>{o({style:Ge(b)})},g=!!f?.elements?.link?.color?.text&&r?.color?.link&&(0,PW.getBlockSupport)(t,[Cn,"enableContrastChecker"])!==!1,m=u_({clientId:e,name:t,enabled:!!g,checkTextColor:!1,messageOverride:(0,Z0e.__)("This link color has poor contrast against the background. Consider increasing contrast.")});return l?(s=s||(0,PW.getBlockSupport)(t,[Cn,"__experimentalDefaultControls"]),(0,IW.jsx)(VN,{as:n||J$e,panelId:e,settings:r,value:f,onChange:p,defaultControls:s,label:i,contrastWarning:m})):null}var NE=c(ce(),1),TD=c(F(),1),gCe=c(Z(),1),hCe=c(G(),1);var eKe=c(ce(),1);var tKe=c(E(),1),X0e="typography.lineHeight";var Q0e=c(uo(),1),kD=c(ce(),1),J0e=c(fL(),1),eCe=c(H(),1);var LE="typography.__experimentalFontFamily",{kebabCase:oKe}=U(eCe.privateApis);function rKe(e){return(0,kD.hasBlockSupport)(e,LE)&&(e.attributes.fontFamily||Object.assign(e.attributes,{fontFamily:{type:"string"}})),e}function tCe(e,t,o){if(!(0,kD.hasBlockSupport)(t,LE)||Ft(t,al,"fontFamily")||!o?.fontFamily)return e;let r=new J0e.default(e.className);r.add(`has-${oKe(o?.fontFamily)}-font-family`);let n=r.value;return e.className=n||void 0,e}function nKe({name:e,fontFamily:t}){return tCe({},e,{fontFamily:t})}var OW={useBlockProps:nKe,addSaveProps:tCe,attributeKeys:["fontFamily"],hasSupport(e){return(0,kD.hasBlockSupport)(e,LE)}};(0,Q0e.addFilter)("blocks.registerBlockType","core/fontFamily/addAttribute",rKe);var AW=c(uo(),1),p_=c(ce(),1),oCe=c(fL(),1);var iKe=c(E(),1),Kb="typography.fontSize";function sKe(e){return(0,p_.hasBlockSupport)(e,Kb)&&(e.attributes.fontSize||Object.assign(e.attributes,{fontSize:{type:"string"}})),e}function rCe(e,t,o){if(!(0,p_.hasBlockSupport)(t,Kb)||Ft(t,al,"fontSize"))return e;let r=new oCe.default(e.className);r.add(Kf(o.fontSize));let n=r.value;return e.className=n||void 0,e}function aKe({name:e,fontSize:t,style:o}){let[r,n,i]=Me("typography.fontSizes","typography.fluid","layout");if(!(0,p_.hasBlockSupport)(e,Kb)||Ft(e,al,"fontSize")||!t&&!o?.typography?.fontSize)return;let s;if(o?.typography?.fontSize&&(s={style:{fontSize:Gu({size:o.typography.fontSize},{typography:{fluid:n},layout:i})}}),t&&(s={style:{fontSize:Hy(r,t,o?.typography?.fontSize).size}}),!!s)return rCe(s,e,{fontSize:t})}var LW={useBlockProps:aKe,addSaveProps:rCe,attributeKeys:["fontSize","style"],hasSupport(e){return(0,p_.hasBlockSupport)(e,Kb)}},lKe={fontSize:[["fontSize"],["style","typography","fontSize"]]};function cKe(e,t,o,r){let n=e.name,i={fontSize:(0,p_.hasBlockSupport)(n,Kb)};return yD(i,lKe,e,t,o,r)}(0,AW.addFilter)("blocks.registerBlockType","core/font/addAttribute",sKe);(0,AW.addFilter)("blocks.switchToBlockType.transformedBlock","core/font-size/addTransforms",cKe);var xD=c(G(),1),m_=c(ce(),1);var sCe=c(Z(),1);var _D=c(Z(),1),nCe=c(F(),1);function yr(e){let t=ht(),{clientId:o=""}=t,r=(0,_D.useRegistry)(),n=(0,_D.useSelect)(i=>o?null:i(C).getBlockEditingMode(),[o]);return(0,nCe.useEffect)(()=>{if(!e)return;let{setBlockEditingMode:i,unsetBlockEditingMode:s,__unstableMarkNextChangeAsNotPersistent:a}=r.dispatch(C);return a(),i(o,e),()=>{a(),s(o)}},[r,o,e]),o?t[S1]:n}var MW=c(E(),1),g_="typography.textAlign",uKe=[{icon:Mf,title:(0,xD.__)("Align text left"),align:"left"},{icon:Cg,title:(0,xD.__)("Align text center"),align:"center"},{icon:Nf,title:(0,xD.__)("Align text right"),align:"right"}],iCe=["left","center","right"],dKe=[];function NW(e){return Array.isArray(e)?iCe.filter(t=>e.includes(t)):e===!0?iCe:dKe}function fKe(e,t){return e&&Oi(t)?"style-state":"block"}function pKe({clientId:e,style:t,name:o,setAttributes:r}){let i=sl(o)?.typography?.textAlign,s=yr(),{selectedState:a,isResponsiveEditing:l}=(0,sCe.useSelect)(m=>{let{getSelectedBlockStyleState:h,isResponsiveEditing:b}=U(m(C));return{selectedState:h(e),isResponsiveEditing:b()}},[e]);if(!i||s!=="default")return null;let u=NW((0,m_.getBlockSupport)(o,g_));if(!u.length)return null;let d=uKe.filter(m=>u.includes(m.align)),f=Io(t,a),p=fKe(l,a),g=m=>{let h={...f,typography:{...f?.typography,textAlign:m}};r({style:Sn(t,a,h)})};return(0,MW.jsx)(Po,{group:p,children:(0,MW.jsx)(mB,{value:f?.typography?.textAlign,onChange:g,alignmentControls:d})})}var wD={edit:pKe,useBlockProps:mKe,addSaveProps:gKe,attributeKeys:["style"],hasSupport(e){return(0,m_.hasBlockSupport)(e,g_,!1)}};function mKe({name:e,style:t}){if(!t?.typography?.textAlign||!NW((0,m_.getBlockSupport)(e,g_)).length||Ft(e,al,"textAlign"))return null;let r=t.typography.textAlign;return{className:W({[`has-text-align-${r}`]:r})}}function gKe(e,t,o){if(!o?.style?.typography?.textAlign)return e;let{textAlign:r}=o.style.typography,n=(0,m_.getBlockSupport)(t,g_);return NW(n).includes(r)&&!Ft(t,al,"textAlign")&&(e.className=W(`has-text-align-${r}`,e.className)),e}var VW=c(uo(),1),zm=c(ce(),1),Yb=c(F(),1),FW=c(Z(),1),ME=c(G(),1),CD=c(H(),1),pCe=c(fe(),1);function hKe(e,t){let o=e.scrollHeight>e.clientHeight,r=0,n=2400,i=r,s=window.getComputedStyle(e),a=parseFloat(s.paddingLeft)||0,l=parseFloat(s.paddingRight)||0,u=document.createRange();u.selectNodeContents(e);let d=e,f=e.parentElement;if(f){let g=window.getComputedStyle(f);g?.display==="flex"&&(d=f,a+=parseFloat(g.paddingLeft)||0,l+=parseFloat(g.paddingRight)||0)}let p=d.clientHeight;for(;r<=n;){let g=Math.floor((r+n)/2);t(g);let h=u.getBoundingClientRect().width,b=e.scrollWidth<=d.clientWidth&&h<=d.clientWidth-a-l,v=o||e.scrollHeight<=d.clientHeight||e.scrollHeight<=p;d.clientHeight>p&&(p=d.clientHeight),b&&v?(i=g,r=g+1):n=g-1}return u.detach(),i}function aCe(e,t){if(!e)return;t(0);let o=hKe(e,t);return t(o),o}var lCe=c(F(),1),cCe=c(G(),1),uCe=c(H(),1),dCe=c(Kr(),1),DW=c(E(),1);function fCe(){let e=(0,cCe.__)("The text may be too small to read. Consider using a larger container or less text.");return(0,lCe.useEffect)(()=>{(0,dCe.speak)(e)},[e]),(0,DW.jsx)("div",{className:"block-editor-fit-text-size-warning",children:(0,DW.jsx)(uCe.Notice,{spokenMessage:null,status:"warning",isDismissible:!1,children:e})})}var _s=c(E(),1),bKe={},yKe=12,af="typography.fitText";function vKe(e){return!(0,zm.hasBlockSupport)(e,af)||e.attributes?.fitText?e:{...e,attributes:{...e.attributes,fitText:{type:"boolean"}}}}function SKe({fitText:e,name:t,clientId:o}){let[r,n]=(0,Yb.useState)(null),i=(0,zm.hasBlockSupport)(t,af),s=Mt(o),{blockAttributes:a,parentId:l,blockMode:u}=(0,FW.useSelect)(f=>{if(!o||!i||!e)return bKe;let p=f(C).getBlockMode(o);return p==="html"?{blockMode:p}:{blockAttributes:f(C).getBlockAttributes(o),parentId:f(C).getBlockRootClientId(o),blockMode:p}},[o,i,e]),d=(0,Yb.useCallback)(()=>{if(!s||!i||!e)return;let f=`fit-text-${o}`,p=s.ownerDocument.getElementById(f);p||(p=s.ownerDocument.createElement("style"),p.id=f,s.ownerDocument.head.appendChild(p));let g=`#block-${o}`,h=aCe(s,b=>{b===0?p.textContent="":p.textContent=`${g} { font-size: ${b}px !important; }`});n(h)},[s,o,i,e]);return(0,Yb.useEffect)(()=>{if(!e||!s||!o||!i||u==="html")return;let f=s,p=f.style.visibility,g=null,m=null,h=null;g=window.requestAnimationFrame(()=>{f.style.visibility="hidden",m=window.requestAnimationFrame(()=>{d(),h=setTimeout(()=>{f.style.visibility=p},10)})});let b;return window.ResizeObserver&&f.parentElement&&(b=new window.ResizeObserver(d),b.observe(f.parentElement),b.observe(f)),()=>{g!==null&&window.cancelAnimationFrame(g),m!==null&&window.cancelAnimationFrame(m),h!==null&&clearTimeout(h),b&&b.disconnect();let v=`fit-text-${o}`,y=f.ownerDocument.getElementById(v);y&&y.remove()}},[e,o,l,d,s,i,u]),(0,Yb.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 kKe({clientId:e,fitText:t=!1,setAttributes:o,name:r,fontSize:n,style:i}){let s=(0,FW.useSelect)(a=>{let{hasSelectedStyleState:l}=U(a(C));return l(e)},[e]);return!(0,zm.hasBlockSupport)(r,af)||s?null:(0,_s.jsx)(CD.__experimentalToolsPanelItem,{hasValue:()=>t,label:(0,ME.__)("Fit text"),onDeselect:()=>o({fitText:void 0}),resetAllFilter:()=>({fitText:void 0}),panelId:e,children:(0,_s.jsx)(CD.ToggleControl,{label:(0,ME.__)("Fit text"),checked:t,onChange:()=>{let a=!t||void 0,l={fitText:a};a&&(n&&(l.fontSize=void 0),i?.typography?.fontSize&&(l.style={...i,typography:{...i?.typography,fontSize:void 0}})),o(l)},help:t?(0,ME.__)("Text will resize to fit its container."):(0,ME.__)("The text will resize to fit its container, resetting other font size settings.")})})}function _Ke(e,t,o){if(!(0,zm.hasBlockSupport)(t,af))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 xKe({name:e,fitText:t}){return t&&(0,zm.hasBlockSupport)(e,af)?{className:"has-fit-text"}:{}}(0,VW.addFilter)("blocks.registerBlockType","core/fit-text/addAttribute",vKe);var wKe=e=>(0,zm.hasBlockSupport)(e,af);function CKe({fitText:e,name:t,clientId:o,isSelected:r}){let{fontSize:n}=SKe({fitText:e,name:t,clientId:o});return r&&n&&n<yKe?(0,_s.jsx)(Oe,{group:"typography",children:(0,_s.jsx)(fCe,{})}):null}var EKe=(0,pCe.createHigherOrderComponent)(e=>function(o){let{name:r,attributes:n,clientId:i,isSelected:s,setAttributes:a}=o,{fitText:l}=n;return(0,zm.hasBlockSupport)(r,af)?(0,_s.jsxs)(_s.Fragment,{children:[(0,_s.jsx)(e,{...o}),(0,_s.jsx)(Oe,{group:"typography",children:(0,_s.jsx)(kKe,{clientId:i,fitText:l,setAttributes:a,name:r,fontSize:n.fontSize,style:n.style})}),l&&(0,_s.jsx)(CKe,{fitText:l,name:r,clientId:i,isSelected:s})]}):(0,_s.jsx)(e,{...o})},"addFitTextControl");(0,VW.addFilter)("editor.BlockEdit","core/fit-text/add-fit-text-control",EKe);var ED={useBlockProps:xKe,addSaveProps:_Ke,attributeKeys:["fitText","fontSize","style"],hasSupport:wKe,edit:()=>null};var zW=c(E(),1);function mCe(e,t){return Object.fromEntries(Object.entries(e).filter(([o])=>!t.includes(o)))}var TKe="typography.__experimentalLetterSpacing",RKe="typography.__experimentalTextTransform",BKe="typography.__experimentalTextDecoration",PKe="typography.textIndent",IKe="typography.textColumns",OKe="typography.__experimentalFontStyle",AKe="typography.__experimentalFontWeight",LKe="typography.__experimentalWritingMode",al="typography",bCe=[X0e,Kb,OKe,AKe,LE,g_,IKe,BKe,PKe,LKe,RKe,TKe,af];function yCe(e){let t={...mCe(e,["fontFamily"])},o=e?.typography?.fontSize,r=e?.typography?.fontFamily,n=e?.color?.text,i=typeof o=="string"&&o?.startsWith("var:preset|font-size|")?o.substring(21):void 0,s=r?.startsWith("var:preset|font-family|")?r.substring(23):void 0,a=Fi(n,"color");return t.typography={...mCe(t.typography,["fontFamily"]),fontSize:i?void 0:o},t.color={...t.color,text:a?void 0:n},{style:Ge(t),fontFamily:s,fontSize:i,textColor:a}}function vCe(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},color:{...e.style?.color,text:e.textColor?"var:preset|color|"+e.textColor:e.style?.color?.text}}}function MKe({children:e,resetAllFilter:t}){let o=(0,TD.useCallback)(r=>{let n=vCe(r),i=t(n);return{...r,...yCe(i)}},[t]);return(0,zW.jsx)(Oe,{group:"typography",resetAllFilter:o,children:e})}function RD({clientId:e,name:t,setAttributes:o,settings:r,asWrapper:n}){let i=Ua(),s=FN(r),{style:a,fontFamily:l,fontSize:u,fitText:d,textColor:f}=(0,gCe.useSelect)(_=>{if(!s)return{};let{style:x,fontFamily:w,fontSize:T,fitText:B,textColor:R}=_(C).getBlockAttributes(e)||{};return{style:x,fontFamily:w,fontSize:T,fitText:B,textColor:R}},[e,s]),p=!vn(i),g=(0,TD.useMemo)(()=>p?Io(a,i):vCe({style:a,fontFamily:l,fontSize:u,textColor:f}),[p,i,a,u,l,f]),m=p?_=>{o({style:Sn(a,i,_)})}:_=>{let x=yCe(_);(x.fontSize||x.style?.typography?.fontSize)&&d&&(x.fitText=void 0),o(x)},h=!g?.color?.gradient&&!!g?.color?.text&&r?.color?.text&&(0,NE.getBlockSupport)(t,["color","enableContrastChecker"])!==!1,b=u_({clientId:e,name:t,enabled:!!h,checkLinkColor:!1,messageOverride:(0,hCe.__)("This color has poor contrast against the background. Consider increasing contrast.")});if(!s)return null;let v=(0,NE.getBlockSupport)(t,[al,"__experimentalDefaultControls"]),y=(0,NE.getBlockSupport)(t,["color","__experimentalDefaultControls"]),k={...v,textColor:y?.text};return(0,zW.jsx)(zN,{as:n||MKe,panelId:e,settings:r,value:g,onChange:m,defaultControls:k,contrastWarning:b})}var $o=c(E(),1);function HW({blockName:e,clientId:t,contentClientIds:o}){let r=sl(e),{updateBlockAttributes:n}=(0,BD.useDispatch)(C),{hasButtons:i,hasHeading:s}=(0,BD.useSelect)(d=>{let f=d(C).getBlockNamesByClientId(o);return{hasButtons:f.includes("core/buttons"),hasHeading:f.includes("core/heading")}},[o]),a=d=>{n(t,d)},l=(0,jW.useMemo)(()=>({...r,typography:{}}),[r]),u=(0,jW.useMemo)(()=>({...r,background:{...r.background,backgroundImage:!1,backgroundSize:!1}}),[r]);return(0,$o.jsxs)($o.Fragment,{children:[(0,$o.jsx)(RD,{clientId:t,name:e,settings:l,setAttributes:a,asWrapper:dW}),(0,$o.jsx)(hD,{clientId:t,name:e,settings:u,setAttributes:a,asWrapper:vW}),(0,$o.jsx)(SD,{clientId:t,name:e,settings:r,setAttributes:a,asWrapper:uW,label:(0,jm.__)("Elements"),defaultControls:{button:i,heading:s}})]})}var NKe=({blockName:e,clientId:t,hasBlockStyles:o,isSectionBlock:r,contentClientIds:n})=>{let i=jb({blockName:e});return(0,$o.jsxs)($o.Fragment,{children:[o&&(0,$o.jsx)(yk,{clientId:t}),r&&e!=="core/template-part"&&(0,$o.jsx)(HW,{blockName:e,clientId:t,contentClientIds:n}),(!r||e==="core/template-part")&&(0,$o.jsxs)($o.Fragment,{children:[(0,$o.jsx)(Oe.Slot,{group:"typography",label:(0,jm.__)("Typography")}),(0,$o.jsx)(Oe.Slot,{group:"color",label:(0,jm.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,$o.jsx)(Oe.Slot,{group:"background",label:(0,jm.__)("Background"),className:"background-block-support-panel__inner-wrapper"}),(0,$o.jsx)(Oe.Slot,{group:"filter"}),(0,$o.jsx)(Oe.Slot,{group:"layout",label:(0,jm.__)("Layout")}),(0,$o.jsx)(Oe.Slot,{group:"dimensions",label:(0,jm.__)("Dimensions")}),(0,$o.jsx)(Oe.Slot,{group:"border",label:i}),(0,$o.jsx)(Oe.Slot,{group:"elements",label:(0,jm.__)("Elements"),className:"elements-block-support-panel__inner-wrapper"}),(0,$o.jsx)(IN,{}),(0,$o.jsx)(Oe.Slot,{group:"styles"})]})]})},SCe=NKe;var _Ce=c(H(),1),xCe=c(G(),1);var kCe=c(ce(),1),PD=c(Z(),1),sa=c(H(),1);var ll=c(E(),1);function ID({clientIds:e,onSelect:t,onSwitchToListView:o,hasListViewTab:r}){return e.length?(0,ll.jsx)(sa.__experimentalVStack,{spacing:1,children:e.map(n=>(0,ll.jsx)(DKe,{onSelect:t,onSwitchToListView:o,hasListViewTab:r,clientId:n},n))}):null}function DKe({clientId:e,onSelect:t,onSwitchToListView:o,hasListViewTab:r}){let n=Oo(e),{isSelected:i,childBlocks:s,shouldRenderListView:a,blockName:l}=(0,PD.useSelect)(h=>{let{isBlockSelected:b,hasSelectedInnerBlock:v,getBlockOrder:y,getBlockName:k,shouldRenderBlockListView:S}=U(h(C)),_=k(e);return{isSelected:b(e)||v(e,!0),childBlocks:y(e),shouldRenderListView:S(e),blockName:_}},[e]),u=(0,kCe.getBlockType)(l),f=On({clientId:e,context:"list-view"})||u?.title||l,{selectBlock:p}=(0,PD.useDispatch)(C),m=s&&s.length>0&&r&&a;return(0,ll.jsx)(sa.Button,{__next40pxDefaultSize:!0,className:"block-editor-block-quick-navigation__item",isPressed:i,onClick:async()=>{await p(e),m&&o&&o(e),t&&t(e)},children:(0,ll.jsxs)(sa.Flex,{children:[(0,ll.jsx)(sa.FlexItem,{children:(0,ll.jsx)(Ct,{icon:n?.icon})}),(0,ll.jsx)(sa.FlexBlock,{style:{textAlign:"left"},children:(0,ll.jsx)(sa.__experimentalTruncate,{children:f})}),m&&(0,ll.jsx)(sa.FlexItem,{children:(0,ll.jsx)(ft,{icon:rn,size:24})})]})})}var h_=c(E(),1),VKe=({contentClientIds:e,onSwitchToListView:t,hasListViewTab:o})=>{if(!e||e.length===0)return null;let r=window?.__experimentalContentOnlyInspectorFields;return(0,h_.jsx)(h_.Fragment,{children:!r&&(0,h_.jsx)(_Ce.PanelBody,{title:(0,xCe.__)("Content"),children:(0,h_.jsx)(ID,{clientIds:e,onSwitchToListView:t,hasListViewTab:o})})})},OD=VKe;var jr=c(E(),1),{Tabs:Hm}=U(AD.privateApis);function UW({blockName:e,clientId:t,hasBlockStyles:o,tabs:r,isSectionBlock:n,contentClientIds:i}){let s=(0,fc.useRef)(null),a=(0,b_.useSelect)(S=>S(wCe.store).get("core","showIconLabels"),[]),{requestedTab:l}=(0,b_.useSelect)(S=>({requestedTab:U(S(C)).getRequestedInspectorTab()})),[u,d]=(0,fc.useState)(()=>l?.tabName??r[0]?.name),f=(0,fc.useRef)(!1),p=(0,fc.useRef)(!1),{__unstableSetOpenListViewPanel:g,__unstableIncrementListViewExpandRevision:m,__unstableSetAllListViewPanelsOpen:h}=(0,b_.useDispatch)(C),{clearRequestedInspectorTab:b}=U((0,b_.useDispatch)(C));(0,fc.useEffect)(()=>{f.current=!1},[t]),(0,fc.useEffect)(()=>{l&&(d(l.tabName),l.tabName===ef.name&&l.options?.openPanel&&(g(l.options.openPanel),m()),p.current=!0,f.current=!0,b())},[l,g,m,b]),(0,fc.useEffect)(()=>{u===ef.name&&!f.current&&(h(),m())},[t,u,h,m]),(0,fc.useEffect)(()=>{if(!r?.length||f.current&&r.some(_=>_.name===u))return;let S=r[0]?.name;u!==S&&d(S)},[r,u]);let v=S=>{d(S),f.current=!0,S===ef.name&&!p.current&&(h(),m()),p.current=!1},y=r.some(S=>S.name===ef.name),k=S=>{y&&(g(S),m(),p.current=!0,v(ef.name))};return(0,jr.jsx)("div",{className:"block-editor-block-inspector__tabs",children:(0,jr.jsxs)(Hm,{selectedTabId:u,onSelect:v,children:[(0,jr.jsx)(Hm.TabList,{children:r.map(S=>a?(0,jr.jsx)(Hm.Tab,{tabId:S.name,children:S.title},S.name):(0,jr.jsxs)(vt.Root,{children:[(0,jr.jsx)(Hm.Tab,{tabId:S.name,"aria-label":S.title,render:(0,jr.jsx)(vt.Trigger,{}),children:(0,jr.jsx)(AD.Icon,{icon:S.icon})}),(0,jr.jsx)(vt.Popup,{children:S.title})]},S.name))}),(0,jr.jsxs)(Hm.TabPanel,{tabId:RN.name,focusable:!1,children:[(0,jr.jsx)(OD,{contentClientIds:i,onSwitchToListView:k,hasListViewTab:y}),(0,jr.jsx)(Oe.Slot,{group:"content"})]}),(0,jr.jsxs)(Hm.TabPanel,{tabId:ef.name,focusable:!1,children:[(0,jr.jsx)(Oe.Slot,{group:"list",ref:s}),(0,jr.jsx)(v2,{listViewRef:s})]}),(0,jr.jsx)(Hm.TabPanel,{tabId:EN.name,focusable:!1,children:(0,jr.jsx)(_we,{showAdvancedControls:!!e})}),(0,jr.jsx)(Hm.TabPanel,{tabId:TN.name,focusable:!1,children:(0,jr.jsx)(SCe,{blockName:e,clientId:t,hasBlockStyles:o,isSectionBlock:n,contentClientIds:i})})]},t)})}var xs=c(H(),1),CCe=c(Z(),1);var FKe=[];function zKe(e,t={}){return t[e]!==void 0?t[e]:t.default!==void 0?t.default:!0}function ECe(e,t,o,r){let n=[],{bindings:i,border:s,color:a,content:l,default:u,layout:d,dimensions:f,list:p,position:g,styles:m,typography:h,effects:b}=Yl,v=(0,xs.__experimentalUseSlotFills)(p.name),y=!!v&&v.length,k=(0,xs.__experimentalUseSlotFills)(l.name),S=!!k&&k.length,x=[...(0,xs.__experimentalUseSlotFills)(s.name)||[],...(0,xs.__experimentalUseSlotFills)(a.name)||[],...(0,xs.__experimentalUseSlotFills)(d.name)||[],...(0,xs.__experimentalUseSlotFills)(g.name)||[],...(0,xs.__experimentalUseSlotFills)(f.name)||[],...(0,xs.__experimentalUseSlotFills)(m.name)||[],...(0,xs.__experimentalUseSlotFills)(h.name)||[],...(0,xs.__experimentalUseSlotFills)(b.name)||[]].length,w=[...(0,xs.__experimentalUseSlotFills)(Jp.slotName)||[],...(0,xs.__experimentalUseSlotFills)(i.name)||[]],T=[...(0,xs.__experimentalUseSlotFills)(u.name)||[],...y&&x>1?w:[]],B=window?.__experimentalContentOnlyInspectorFields,R=S||!B&&t?.length;R&&n.push(RN),y&&n.push(ef),(T.length||w.length&&(R||y))&&n.push(EN);let{tabSettings:A,isPreviewMode:O}=(0,CCe.useSelect)(L=>{let M=L(C).getSettings();return{tabSettings:M.blockInspectorTabs,isPreviewMode:M.isPreviewMode}},[]);return!O&&(r||x)&&n.push(TN),zKe(e,A)?n:FKe}var TCe=c(H(),1);var GW=c(E(),1),{Fill:jKe,Slot:HKe}=(0,TCe.createSlotFill)(Symbol("InspectorControlsLastItem")),RCe=e=>ht()[yl]?(0,GW.jsx)(jKe,{...e}):null;RCe.Slot=function(t){return(0,GW.jsx)(HKe,{...t})};var LD=RCe;var BCe=c(Z(),1);function PCe(e){return(0,BCe.useSelect)(t=>{if(e){let o=t(C).getSettings().blockInspectorAnimation,r=o?.animationParent,{getSelectedBlockClientId:n,getBlockParentsByBlockName:i}=t(C),s=n();return!i(s,r,!0)[0]&&e.name!==r?null:o?.[e.name]}return null},[e])}var MD=c(F(),1);var qb=c(G(),1);var $W=c(E(),1),{getViewportBreakpoints:UKe}=U(Yn),ICe={":hover":(0,qb.__)("Hover"),":focus":(0,qb.__)("Focus"),":focus-visible":(0,qb.__)("Focus-visible"),":active":(0,qb.__)("Active")},GKe={"@tablet":(0,qb.__)("Tablet"),"@mobile":(0,qb.__)("Mobile")};function WKe(e){let t=UKe(e);return Object.entries(GKe).filter(([o])=>(o!=="@tablet"||t.tablet!==void 0)&&(o!=="@mobile"||t.mobile!==void 0)).map(([o,r])=>({value:o,label:r}))}var ND={"core/button":[":hover",":focus",":focus-visible",":active"],"core/navigation-link":[":hover",":focus",":focus-visible",":active"]};function OCe(e){return(ND[e]??[]).filter(o=>ICe[o]).map(o=>({value:o,label:ICe[o]}))}var WW="default",$Ke=[];function ACe({name:e,value:t,onChange:o}){let r=(0,MD.useMemo)(()=>OCe(e),[e]),n=fr();return r.length?(0,$W.jsx)(lD,{pseudoStates:r,pseudoStateValue:t?.pseudo??WW,onChangePseudoState:i=>o({pseudo:i}),popoverProps:n.popoverProps,showText:!1}):null}function LCe({name:e,value:t,isResponsiveEditing:o}){let r=(0,MD.useMemo)(()=>OCe(e),[e]),[n]=Me("viewport"),i=(0,MD.useMemo)(()=>WKe(n),[n]);return!r.length&&!o?null:(0,$W.jsx)(cD,{viewportStates:o?i:$Ke,pseudoStates:r,viewportValue:t?.viewport??WW,pseudoStateValue:t?.pseudo??WW})}var ze=c(E(),1);function NCe({blockName:e,showAdvancedControls:t=!0,showPositionControls:o=!0,showBindingsControls:r=!0}){let n=jb({blockName:e});return(0,ze.jsxs)(ze.Fragment,{children:[(0,ze.jsx)(Oe.Slot,{}),(0,ze.jsx)(Oe.Slot,{group:"typography",label:(0,ji.__)("Typography")}),(0,ze.jsx)(Oe.Slot,{group:"color",label:(0,ji.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,ze.jsx)(Oe.Slot,{group:"background",label:(0,ji.__)("Background"),className:"background-block-support-panel__inner-wrapper"}),(0,ze.jsx)(Oe.Slot,{group:"layout",label:(0,ji.__)("Layout")}),(0,ze.jsx)(Oe.Slot,{group:"dimensions",label:(0,ji.__)("Dimensions")}),(0,ze.jsx)(Oe.Slot,{group:"border",label:n}),(0,ze.jsx)(Oe.Slot,{group:"elements",label:(0,ji.__)("Elements"),className:"elements-block-support-panel__inner-wrapper"}),o&&(0,ze.jsx)(IN,{}),(0,ze.jsx)(Oe.Slot,{group:"styles"}),r&&(0,ze.jsx)(Oe.Slot,{group:"bindings"}),t&&(0,ze.jsx)("div",{children:(0,ze.jsx)(BN,{})})]})}function KKe({blockName:e,clientId:t,contentClientIds:o,isSectionBlock:r,selectedBlockStyleState:n}){let i=jb({blockName:e}),s=Oi(n)&&!Ys(n),a=r&&e!=="core/template-part";return(0,ze.jsxs)(ze.Fragment,{children:[a&&(0,ze.jsx)(g2,{value:n,children:(0,ze.jsx)(HW,{blockName:e,clientId:t,contentClientIds:o})}),!a&&(0,ze.jsxs)(ze.Fragment,{children:[(0,ze.jsx)(Oe.Slot,{group:"typography",label:(0,ji.__)("Typography")}),(0,ze.jsx)(Oe.Slot,{group:"color",label:(0,ji.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,ze.jsx)(Oe.Slot,{group:"background",label:(0,ji.__)("Background"),className:"background-block-support-panel__inner-wrapper"}),s&&(0,ze.jsx)(Oe.Slot,{group:"layout",label:(0,ji.__)("Layout")}),(0,ze.jsx)(Oe.Slot,{group:"dimensions",label:(0,ji.__)("Dimensions")}),(0,ze.jsx)(Oe.Slot,{group:"border",label:i}),(0,ze.jsx)(Oe.Slot,{group:"elements",label:(0,ji.__)("Elements"),className:"elements-block-support-panel__inner-wrapper"})]})]})}function YKe(){let{selectedBlockCount:e,renderedBlockName:t,renderedBlockClientId:o,blockType:r,isSectionBlock:n,isSectionBlockInSelection:i,hasBlockStyles:s,editedContentOnlySection:a,blockEditingMode:l,selectedBlockStyleState:u,showStateOnCanvas:d,isResponsiveEditing:f}=(0,DE.useSelect)(S=>{let{getSelectedBlockClientId:_,getSelectedBlockClientIds:x,getSelectedBlockCount:w,getBlockName:T,getParentSectionBlock:B,isSectionBlock:R,getEditedContentOnlySection:A,isWithinEditedContentOnlySection:O,getBlockEditingMode:P,getSelectedBlockStyleState:L,isSelectedBlockStyleStateShownOnCanvas:M,isResponsiveEditing:z}=U(S(C)),{getBlockStyles:V}=S(y_.store),I=_(),D=O(I)?I:B(I)||I,j=D&&T(D),Y=j&&(0,y_.getBlockType)(j),ee=x().some(q=>R(q)),J=j&&V(j),$=J&&J.length>0;return{selectedBlockCount:w(),renderedBlockClientId:D,renderedBlockName:j,blockType:Y,isSectionBlockInSelection:ee,isSectionBlock:R(D),hasBlockStyles:$,editedContentOnlySection:A(),blockEditingMode:P(D),selectedBlockStyleState:L(D),showStateOnCanvas:M(D),isResponsiveEditing:z()}},[]),p=(0,DE.useSelect)(S=>{if(!n||!o)return[];let{getClientIdsOfDescendants:_,getBlockEditingMode:x,shouldRenderBlockListView:w}=U(S(C)),T=_(o),B=new Set;return T.forEach(R=>{w(R)&&_(R).forEach(O=>B.add(O))}),T.filter(R=>!B.has(R)&&x(R)==="contentOnly")},[n,o]),g=ECe(r?.name,p,n,s),m=g?.length>1,h=PCe(r),b=e>1,v=!vn(u);if(b&&!i)return(0,ze.jsxs)("div",{className:"block-editor-block-inspector",children:[(0,ze.jsx)(oW,{}),m?(0,ze.jsx)(UW,{tabs:g}):(0,ze.jsx)(NCe,{blockName:t,showAdvancedControls:!1,showPositionControls:!1,showBindingsControls:!1})]});if(b&&i)return(0,ze.jsx)("div",{className:"block-editor-block-inspector",children:(0,ze.jsx)(oW,{})});let y=t===(0,y_.getUnregisteredTypeHandlerName)();return!r||!o||y?(0,ze.jsx)("span",{className:"block-editor-block-inspector__no-blocks",children:(0,ji.__)("No block selected.")}):(0,ze.jsx)(qKe,{animate:h,wrapper:S=>(0,ze.jsx)(ZKe,{blockInspectorAnimationSettings:h,renderedBlockClientId:o,children:S}),children:(0,ze.jsx)(XKe,{renderedBlockClientId:o,blockName:r.name,isSectionBlock:n,availableTabs:g,contentClientIds:p,hasBlockStyles:s,editedContentOnlySection:a,blockEditingMode:l,selectedBlockStyleState:u,showStateOnCanvas:d,isResponsiveEditing:f,isBlockStyleStateSelected:v})})}var qKe=({animate:e,wrapper:t,children:o})=>e?t(o):o,ZKe=({blockInspectorAnimationSettings:e,renderedBlockClientId:t,children:o})=>{let r=e&&e.enterDirection==="leftToRight"?-50:50;return(0,ze.jsx)(v_.__unstableMotion.div,{animate:{x:0,opacity:1,transition:{ease:"easeInOut",duration:.14}},initial:{x:r,opacity:0},children:o},t)},XKe=({renderedBlockClientId:e,blockName:t,isSectionBlock:o,availableTabs:r,contentClientIds:n,hasBlockStyles:i,editedContentOnlySection:s,blockEditingMode:a,selectedBlockStyleState:l,showStateOnCanvas:u,isResponsiveEditing:d})=>{let f=(0,MCe.useRef)(null),p=r?.length>1,g=Ys(l),m=Oi(l)&&d||Ys(l),h=s&&s!==e,b=Oo(s),v=Oo(e),y=v.isSynced,{setSelectedBlockStyleState:k,setSelectedBlockStyleStateCanvasPreview:S}=U((0,DE.useDispatch)(C)),_=w=>{k(e,w)},x=w=>{S(e,w)};return(0,ze.jsxs)("div",{className:"block-editor-block-inspector",children:[h&&(0,ze.jsx)(O0,{...b,className:b?.isSynced&&"is-synced",parentClientId:s}),(0,ze.jsx)(O0,{...v,allowParentNavigation:!0,className:y&&"is-synced",isChild:h,clientId:e,controls:a==="default"&&(0,ze.jsx)(ACe,{name:t,value:l,onChange:_})}),a==="default"&&m&&(0,ze.jsxs)(v_.__experimentalSpacer,{paddingX:4,paddingY:2,children:[g&&(0,ze.jsx)(v_.ToggleControl,{label:(0,ji.__)("Show state on canvas"),checked:u,onChange:x}),(0,ze.jsx)(LCe,{name:t,value:l,isResponsiveEditing:d})]}),(0,ze.jsx)(ree,{clientId:e}),(0,ze.jsx)(dwe,{clientId:e}),!m&&(0,ze.jsx)(eM,{blockClientId:e}),(0,ze.jsx)(Swe,{}),m&&(0,ze.jsx)(KKe,{blockName:t,clientId:e,contentClientIds:n,isSectionBlock:o,selectedBlockStyleState:l}),!m&&p&&(0,ze.jsx)(ze.Fragment,{children:(0,ze.jsx)(UW,{hasBlockStyles:i,clientId:e,blockName:t,tabs:r,isSectionBlock:o,contentClientIds:n})}),!m&&!p&&(0,ze.jsxs)(ze.Fragment,{children:[i&&(0,ze.jsx)(yk,{clientId:e}),(0,ze.jsx)(OD,{contentClientIds:n}),(0,ze.jsx)(Oe.Slot,{group:"content"}),(0,ze.jsx)(Oe.Slot,{group:"list",ref:f}),(0,ze.jsx)(v2,{listViewRef:f}),!o&&(0,ze.jsx)(NCe,{blockName:t})]}),!m&&(0,ze.jsx)(LD.Slot,{}),(0,ze.jsx)(wN,{},"back")]})},DCe=YKe;var KW=c(Tt(),1);var VCe=c(E(),1),FCe=()=>((0,KW.default)("__unstableUseClipboardHandler",{alternative:"BlockCanvas or WritingFlow",since:"6.4",version:"6.7"}),D0());function zCe(e){return(0,KW.default)("CopyHandler",{alternative:"BlockCanvas or WritingFlow",since:"6.4",version:"6.7"}),(0,VCe.jsx)("div",{...e,ref:D0()})}var jCe=c(Z(),1),YW=c(F(),1);var qW=c(E(),1),QKe=()=>{};function JKe({rootClientId:e,clientId:t,isAppender:o,showInserterHelpPanel:r,showMostUsedBlocks:n=!1,__experimentalInsertionIndex:i,__experimentalInitialTab:s,__experimentalInitialCategory:a,__experimentalFilterValue:l,onPatternCategorySelection:u,onSelect:d=QKe,shouldFocusBlock:f=!1,onClose:p},g){let{destinationRootClientId:m}=(0,jCe.useSelect)(h=>{let{getBlockRootClientId:b}=h(C);return{destinationRootClientId:e||b(t)||void 0}},[t,e]);return(0,qW.jsx)(hU,{onSelect:d,rootClientId:m,clientId:t,isAppender:o,showInserterHelpPanel:r,showMostUsedBlocks:n,__experimentalInsertionIndex:i,__experimentalFilterValue:l,onPatternCategorySelection:u,__experimentalInitialTab:s,__experimentalInitialCategory:a,shouldFocusBlock:f,ref:g,onClose:p})}var ZW=(0,YW.forwardRef)(JKe);function eYe(e,t){return(0,qW.jsx)(ZW,{...e,onPatternCategorySelection:void 0,ref:t})}var HCe=(0,YW.forwardRef)(eYe);var UCe=c(Tt(),1);function GCe(){return(0,UCe.default)("wp.blockEditor.MultiSelectScrollIntoView",{hint:"This behaviour is now built-in.",since:"5.8"}),null}var WCe=c(fe(),1),VE=c(Et(),1),Um=c(oo(),1),$Ce=c(E(),1),tYe=window.navigator.userAgent.indexOf("Trident")!==-1,oYe=new Set([Um.UP,Um.DOWN,Um.LEFT,Um.RIGHT]),rYe=.75;function XW(){return(0,WCe.useRefEffect)(e=>{let{ownerDocument:t}=e,{defaultView:o}=t,r,n,i;function s(){r||(r=o.requestAnimationFrame(()=>{f(),r=null}))}function a(h){n&&o.cancelAnimationFrame(n),n=o.requestAnimationFrame(()=>{l(h),n=null})}function l({keyCode:h}){if(!g())return;let b=(0,VE.computeCaretRect)(o);if(!b)return;if(!i){i=b;return}if(oYe.has(h)){i=b;return}let v=b.top-i.top;if(v===0)return;let y=(0,VE.getScrollContainer)(e);if(!y)return;let k=y===t.body||y===t.documentElement,S=k?o.scrollY:y.scrollTop,_=k?0:y.getBoundingClientRect().top,x=k?i.top/o.innerHeight:(i.top-_)/(o.innerHeight-_);if(S===0&&x<rYe&&m()){i=b;return}let w=k?o.innerHeight:y.clientHeight;if(i.top+i.height>_+w||i.top<_){i=b;return}k?o.scrollBy(0,v):y.scrollTop+=v}function u(){t.addEventListener("selectionchange",d)}function d(){t.removeEventListener("selectionchange",d),f()}function f(){g()&&(i=(0,VE.computeCaretRect)(o))}function p(){let{activeElement:h}=t;if(!h)return null;if(!h.isContentEditable||!h.contains(e))return h;let{anchorNode:b}=o.getSelection();return b?(b.nodeType===b.ELEMENT_NODE?b:b.parentElement)?.closest('[contenteditable="true"]')??null:null}function g(){let h=p();return!!h&&e.contains(h)&&h.isContentEditable}function m(){let h=e.querySelectorAll('[contenteditable="true"]');return h[h.length-1]===p()}return o.addEventListener("scroll",s,!0),o.addEventListener("resize",s,!0),e.addEventListener("keydown",a),e.addEventListener("keyup",l),e.addEventListener("mousedown",u),e.addEventListener("touchstart",u),()=>{o.removeEventListener("scroll",s,!0),o.removeEventListener("resize",s,!0),e.removeEventListener("keydown",a),e.removeEventListener("keyup",l),e.removeEventListener("mousedown",u),e.removeEventListener("touchstart",u),t.removeEventListener("selectionchange",d),o.cancelAnimationFrame(r),o.cancelAnimationFrame(n)}},[])}function nYe({children:e}){return(0,$Ce.jsx)("div",{ref:XW(),className:"block-editor__typewriter",children:e})}var iYe=tYe?e=>e.children:nYe,KCe=iYe;var Zb=c(F(),1),QW=c(Tt(),1);var JW=c(E(),1),DD=(0,Zb.createContext)({});DD.displayName="RenderedRefsContext";function sYe(e,t,o){let r={...e,[t]:e[t]?new Set(e[t]):new Set};return r[t].add(o),r}function e$({children:e,uniqueId:t,blockName:o=""}){let r=(0,Zb.useContext)(DD),{name:n}=ht();o=o||n;let i=(0,Zb.useMemo)(()=>sYe(r,o,t),[r,o,t]);return(0,JW.jsx)(DD.Provider,{value:i,children:e})}function t$(e,t=""){let o=(0,Zb.useContext)(DD),{name:r}=ht();return t=t||r,!!o[t]?.has(e)}var YCe=e=>((0,QW.default)("wp.blockEditor.__experimentalRecursionProvider",{since:"6.5",alternative:"wp.blockEditor.RecursionProvider"}),(0,JW.jsx)(e$,{...e})),qCe=(...e)=>((0,QW.default)("wp.blockEditor.__experimentalUseHasRecursion",{since:"6.5",alternative:"wp.blockEditor.useHasRecursion"}),t$(...e));var FD=c(H(),1),o$=c(G(),1),r$=c(F(),1),XCe=c(du(),1);var aa=c(H(),1);var ZCe=c(G(),1),lf=c(E(),1);function VD({title:e,help:t,actions:o=[],onClose:r}){return(0,lf.jsxs)(aa.__experimentalVStack,{className:"block-editor-inspector-popover-header",spacing:4,children:[(0,lf.jsxs)(aa.__experimentalHStack,{alignment:"center",children:[(0,lf.jsx)(aa.__experimentalHeading,{className:"block-editor-inspector-popover-header__heading",level:2,size:13,children:e}),(0,lf.jsx)(aa.__experimentalSpacer,{}),o.map(({label:n,icon:i,onClick:s})=>(0,lf.jsx)(aa.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,lf.jsx)(aa.Button,{size:"small",className:"block-editor-inspector-popover-header__action",label:(0,ZCe.__)("Close"),icon:Rg,onClick:r})]}),t&&(0,lf.jsx)(aa.__experimentalText,{children:t})]})}var S_=c(E(),1);function aYe({onClose:e,onChange:t,showPopoverHeaderActions:o,isCompact:r,currentDate:n,title:i,...s},a){let l={startOfWeek:(0,XCe.getSettings)().l10n.startOfWeek,onChange:t,currentDate:r?void 0:n,currentTime:r?n:void 0,...s},u=r?FD.TimePicker:FD.DateTimePicker;return(0,S_.jsxs)("div",{ref:a,className:"block-editor-publish-date-time-picker",children:[(0,S_.jsx)(VD,{title:i||(0,o$.__)("Publish"),actions:o?[{label:(0,o$.__)("Now"),onClick:()=>t?.(null)}]:void 0,onClose:e}),(0,S_.jsx)(u,{...l})]})}var n$=(0,r$.forwardRef)(aYe);function lYe(e,t){return(0,S_.jsx)(n$,{...e,showPopoverHeaderActions:!0,isCompact:!1,ref:t})}var QCe=(0,r$.forwardRef)(lYe);var JCe=c(Tt(),1),eEe=c(F(),1);function cYe(){return(0,JCe.default)("wp.blockEditor.ToolSelector",{since:"6.9",hint:"The ToolSelector component no longer renders anything."}),null}var tEe=(0,eEe.forwardRef)(cYe);var zE=c(E(),1),Ge=e=>{if(e===null||typeof e!="object"||Array.isArray(e))return e;let t=Object.entries(e).map(([o,r])=>[o,Ge(r)]).filter(([,o])=>o!==void 0);return t.length?Object.fromEntries(t):void 0};function yD(e,t,o,r,n,i){if(Object.values(e??{}).every(l=>!l)||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(([l,u])=>{u&&t[l].forEach(d=>{let f=kl(s,d);f&&(a={...a,attributes:Ve(a.attributes,d,f)})})}),a}function Ft(e,t,o){let n=(0,oEe.getBlockSupport)(e,t)?.__experimentalSkipSerialization;return Array.isArray(n)?n.includes(o):n}var cf=new WeakMap;function hs({id:e,css:t}){return Ad({id:e,css:t})}function Ad({id:e,css:t,assets:o,__unstableType:r,variation:n,clientId:i}={}){let{setStyleOverride:s,deleteStyleOverride:a}=U((0,zD.useDispatch)(C)),l=(0,zD.useRegistry)(),u=(0,cl.useId)();(0,cl.useEffect)(()=>{if(!t&&!o)return;let d=e||u,f={id:e,css:t,assets:o,__unstableType:r,variation:n,clientId:i};return cf.get(l)||cf.set(l,[]),cf.get(l).push([d,f]),window.queueMicrotask(()=>{cf.get(l)?.length&&l.batch(()=>{cf.get(l).forEach(p=>{s(...p)}),cf.set(l,[])})}),()=>{cf.get(l)?.find(([g])=>g===d)?cf.set(l,cf.get(l).filter(([g])=>g!==d)):a(d)}},[e,t,i,o,r,u,s,a,l,n])}function sl(e,t){let[o,r,n,i,s,a,l,u,d,f,p,g,m,h,b,v,y,k,S,_,x,w,T,B,R,A,O,P,L,M,z,V,I,N,D,j,Y,X,ee,J,$,q,K,Q,re,se,te,ne,de,Se,Ee,ve,be,ge,he,ye,_e,we,ie,oe,Ae,me,xe]=Me("background.backgroundImage","background.backgroundSize","background.gradient","typography.fontFamilies.custom","typography.fontFamilies.default","typography.fontFamilies.theme","typography.defaultFontSizes","typography.fontSizes.custom","typography.fontSizes.default","typography.fontSizes.theme","typography.customFontSize","typography.fontStyle","typography.fontWeight","typography.lineHeight","typography.textAlign","typography.textColumns","typography.textDecoration","typography.textIndent","typography.writingMode","typography.textTransform","typography.letterSpacing","spacing.padding","spacing.margin","spacing.blockGap","spacing.defaultSpacingSizes","spacing.customSpacingSize","spacing.spacingSizes.custom","spacing.spacingSizes.default","spacing.spacingSizes.theme","spacing.units","dimensions.aspectRatio","dimensions.height","dimensions.minHeight","dimensions.minWidth","dimensions.width","dimensions.dimensionSizes","layout","border.color","border.radius","border.style","border.width","border.radiusSizes","color.custom","color.palette.custom","color.customDuotone","color.palette.theme","color.palette.default","color.defaultPalette","color.defaultDuotone","color.duotone.custom","color.duotone.theme","color.duotone.default","color.gradients.custom","color.gradients.theme","color.gradients.default","color.defaultGradients","color.customGradient","color.background","color.link","color.text","color.heading","color.button","shadow"),nt=(0,cl.useMemo)(()=>({background:{backgroundImage:o,backgroundSize:r,gradient:n},color:{palette:{custom:Q,theme:se,default:te},gradients:{custom:be,theme:ge,default:he},duotone:{custom:Se,theme:Ee,default:ve},defaultGradients:ye,defaultPalette:ne,defaultDuotone:de,custom:K,customGradient:_e,customDuotone:re,background:we,link:ie,heading:Ae,button:me,text:oe},typography:{fontFamilies:{custom:i,default:s,theme:a},fontSizes:{custom:u,default:d,theme:f},customFontSize:p,defaultFontSizes:l,fontStyle:g,fontWeight:m,lineHeight:h,textAlign:b,textColumns:v,textDecoration:y,textIndent:k,textTransform:_,letterSpacing:x,writingMode:S},spacing:{spacingSizes:{custom:O,default:P,theme:L},customSpacingSize:A,defaultSpacingSizes:R,padding:w,margin:T,blockGap:B,units:M},border:{color:X,radius:ee,style:J,width:$,radiusSizes:q},dimensions:{aspectRatio:z,height:V,minHeight:I,minWidth:N,width:D,dimensionSizes:j},layout:Y,parentLayout:t,shadow:xe}),[o,r,n,i,s,a,l,u,d,f,p,g,m,h,b,v,y,k,_,x,S,w,T,B,R,A,O,P,L,M,z,V,I,N,D,j,Y,t,X,ee,J,$,q,K,Q,re,se,te,ne,de,Se,Ee,ve,be,ge,he,ye,_e,we,ie,oe,Ae,me,xe]);return ON(nt,e)}function rEe(e){e=e.map(o=>({...o,Edit:(0,cl.memo)(o.edit)}));let t=(0,i$.createHigherOrderComponent)(o=>function(n){let i=ht();return[...e.map((s,a)=>{let{Edit:l,hasSupport:u,attributeKeys:d=[],shareWithChildBlocks:f,supportsPatternEditing:p}=s;if(!(p&&i[Tf]||i[yl]||i[dy]&&f)||!u(n.name))return null;let m={};for(let h of d)n.attributes[h]&&(m[h]=n.attributes[h]);return(0,zE.jsx)(l,{name:n.name,isSelected:n.isSelected,clientId:n.clientId,setAttributes:n.setAttributes,__unstableParentLayout:n.__unstableParentLayout,...m},a)}),(0,zE.jsx)(o,{...n},"edit")]},"withBlockEditHooks");(0,FE.addFilter)("editor.BlockEdit","core/editor/hooks",t)}function uYe({index:e,useBlockProps:t,setAllWrapperProps:o,...r}){let n=t(r),i=s=>o(a=>{let l=[...a];return l[e]=s,l});return(0,cl.useEffect)(()=>(i(n),()=>{i(void 0)})),null}var dYe=(0,cl.memo)(uYe);function nEe(e){let t=(0,i$.createHigherOrderComponent)(o=>function(n){let[i,s]=(0,cl.useState)(Array(e.length).fill(void 0));return[...e.map((a,l)=>{let{hasSupport:u,attributeKeys:d=[],useBlockProps:f,isMatch:p}=a,g={};for(let m of d)n.attributes[m]&&(g[m]=n.attributes[m]);return!Object.keys(g).length||!u(n.name)||p&&!p(g)?null:(0,zE.jsx)(dYe,{index:l,useBlockProps:f,setAllWrapperProps:s,name:n.name,clientId:n.clientId,...g},l)}),(0,zE.jsx)(o,{...n,wrapperProps:i.filter(Boolean).reduce((a,l)=>({...a,...l,className:W(a.className,l.className),style:{...a.style,...l.style}}),n.wrapperProps||{})},"edit")]},"withBlockListBlockHooks");(0,FE.addFilter)("editor.BlockListBlock","core/editor/hooks",t)}function iEe(e){function t(o,r,n){return e.reduce((i,s)=>{let{hasSupport:a,attributeKeys:l=[],addSaveProps:u}=s,d={};for(let f of l)n[f]&&(d[f]=n[f]);return!Object.keys(d).length||!a(r)?i:u(i,r,d)},o)}(0,FE.addFilter)("blocks.getSaveContent.extraProps","core/editor/hooks",t,0),(0,FE.addFilter)("blocks.getSaveContent.extraProps","core/editor/hooks",o=>(o.hasOwnProperty("className")&&!o.className&&delete o.className,o))}var sEe=c(ce(),1),aEe=c(uo(),1);function fYe(e){let{apiVersion:t=1}=e;return t<2&&(0,sEe.hasBlockSupport)(e,"lightBlockWrapper",!1)&&(e.apiVersion=2),e}(0,aEe.addFilter)("blocks.registerBlockType","core/compat/migrateLightBlockWrapper",fYe);function lEe(e){e.hasAttribute("crossorigin")||e.setAttribute("crossorigin","anonymous")}if(window.crossOriginIsolated){let e=function(){document.body?t.observe(document.body,{childList:!0,attributes:!0,subtree:!0}):document.readyState==="loading"&&document.addEventListener("DOMContentLoaded",()=>{document.body&&t.observe(document.body,{childList:!0,attributes:!0,subtree:!0})})};pYe=e;let t=new window.MutationObserver(o=>{o.forEach(r=>{[r.addedNodes,r.target].forEach(n=>{(n instanceof window.NodeList?n:[n]).forEach(s=>{let a=s;a.querySelectorAll&&(a.querySelectorAll("source,script,video,link").forEach(l=>{lEe(l)}),["SOURCE","SCRIPT","VIDEO","LINK"].includes(a.nodeName)&&lEe(a))})})})});e()}var pYe;var cEe=c(uo(),1),ul=c(ce(),1);var s$=c(E(),1),a$=["left","center","right","wide","full"],mYe=["wide","full"];function l$(e,t=!0,o=!0){let r;return Array.isArray(e)?r=a$.filter(n=>e.includes(n)):e===!0?r=[...a$]:r=[],!o||e===!0&&!t?r.filter(n=>!mYe.includes(n)):r}function gYe(e){return"type"in(e.attributes?.align??{})||(0,ul.hasBlockSupport)(e,"align")&&(e.attributes={...e.attributes,align:{type:"string",enum:[...a$,""]}}),e}function hYe({name:e,align:t,setAttributes:o}){let r=l$((0,ul.getBlockSupport)(e,"align"),(0,ul.hasBlockSupport)(e,"alignWide",!0)),n=lw(r).map(({name:a})=>a),i=yr();return!n.length||i!=="default"?null:(0,s$.jsx)(Po,{group:"block",__experimentalShareWithChildBlocks:!0,children:(0,s$.jsx)(OB,{value:t,onChange:a=>{a||(0,ul.getBlockType)(e)?.attributes?.align?.default&&(a=""),o({align:a})},controls:n})})}var jD={shareWithChildBlocks:!0,edit:hYe,useBlockProps:bYe,addSaveProps:yYe,attributeKeys:["align"],hasSupport(e){return(0,ul.hasBlockSupport)(e,"align",!1)}};function bYe({name:e,align:t}){let o=l$((0,ul.getBlockSupport)(e,"align"),(0,ul.hasBlockSupport)(e,"alignWide",!0));return lw(o).some(n=>n.name===t)?{"data-align":t}:{}}function yYe(e,t,o){let{align:r}=o,n=(0,ul.getBlockSupport)(t,"align"),i=(0,ul.hasBlockSupport)(t,"alignWide",!0);return l$(n,i).includes(r)&&(e.className=W(`align${r}`,e.className)),e}(0,cEe.addFilter)("blocks.registerBlockType","core/editor/align/addAttribute",gYe);var uEe=c(uo(),1);function vYe(e){return"type"in(e.attributes?.lock??{})||(e.attributes={...e.attributes,lock:{type:"object"}}),e}(0,uEe.addFilter)("blocks.registerBlockType","core/lock/addAttribute",vYe);var p$=c(uo(),1),C_=c(ce(),1);var jE=c(H(),1),GD=c(G(),1),_Ee=c(F(),1),xEe=c(Z(),1),WD=c(ce(),1);var ws=c(H(),1),vEe=c(F(),1),w_=c(G(),1),SEe=c(Z(),1);var d$=c(ce(),1),hEe=c(Z(),1),x_=c(H(),1),pc=c(G(),1),HD=c(F(),1),bEe=c(fe(),1),yEe=c(Kr(),1);var c$=c(F(),1),pEe=c(fe(),1),mEe=c(H(),1);var dEe=c(H(),1);var k_=c(E(),1);function SYe({blockTypes:e,value:t,onItemChange:o}){return(0,k_.jsx)("ul",{className:"block-editor-block-manager__checklist",children:e.map(r=>(0,k_.jsxs)("li",{className:"block-editor-block-manager__checklist-item",children:[(0,k_.jsx)(dEe.CheckboxControl,{label:r.title,checked:t.includes(r.name),onChange:(...n)=>o(r,...n)}),(0,k_.jsx)(Ct,{icon:r.icon})]},r.name))})}var fEe=SYe;var __=c(E(),1);function gEe({title:e,blockTypes:t,selectedBlockTypes:o,onChange:r}){let n=(0,pEe.useInstanceId)(gEe),i=(0,c$.useCallback)((f,p)=>{r(p?[...o,f]:o.filter(({name:g})=>g!==f.name))},[o,r]),s=(0,c$.useCallback)(f=>{r(f?[...o,...t.filter(p=>!o.find(({name:g})=>g===p.name))]:o.filter(p=>!t.find(({name:g})=>g===p.name)))},[t,o,r]);if(!t.length)return null;let a=t.map(({name:f})=>f).filter(f=>(o??[]).some(p=>p.name===f)),l="block-editor-block-manager__category-title-"+n,u=a.length===t.length,d=!u&&a.length>0;return(0,__.jsxs)("div",{role:"group","aria-labelledby":l,className:"block-editor-block-manager__category",children:[(0,__.jsx)(mEe.CheckboxControl,{checked:u,onChange:s,className:"block-editor-block-manager__category-title",indeterminate:d,label:(0,__.jsx)("span",{id:l,children:e})}),(0,__.jsx)(fEe,{blockTypes:t,value:a,onItemChange:i})]})}var u$=gEe;var uf=c(E(),1);function UD({blockTypes:e,selectedBlockTypes:t,onChange:o,showSelectAll:r=!0}){let n=(0,bEe.useDebounce)(yEe.speak,500),[i,s]=(0,HD.useState)(""),{categories:a,isMatchingSearchTerm:l}=(0,hEe.useSelect)(p=>({categories:p(d$.store).getCategories(),isMatchingSearchTerm:p(d$.store).isMatchingSearchTerm}),[]),u=e.filter(p=>!i||l(p,i)),d=t.length>0&&t.length!==e.length,f=e.length>0&&t.length===e.length;return(0,HD.useEffect)(()=>{if(!i)return;let p=u.length,g=(0,pc.sprintf)((0,pc._n)("%d result found.","%d results found.",p),p);n(g)},[u?.length,i,n]),(0,uf.jsxs)(x_.__experimentalVStack,{className:"block-editor-block-manager__content",spacing:4,children:[(0,uf.jsx)(x_.SearchControl,{label:(0,pc.__)("Search for a block"),placeholder:(0,pc.__)("Search for a block"),value:i,onChange:p=>s(p),className:"block-editor-block-manager__search"}),r&&(0,uf.jsx)(x_.CheckboxControl,{className:"block-editor-block-manager__select-all",label:(0,pc.__)("Select all"),checked:f,onChange:()=>{o(f?[]:e)},indeterminate:d}),(0,uf.jsxs)("div",{tabIndex:"0",role:"region","aria-label":(0,pc.__)("Available block types"),className:"block-editor-block-manager__results",children:[u.length===0&&(0,uf.jsx)("p",{className:"block-editor-block-manager__no-results",children:(0,pc.__)("No blocks found.")}),a.map(p=>(0,uf.jsx)(u$,{title:p.title,blockTypes:u.filter(g=>g.category===p.slug),selectedBlockTypes:t,onChange:o},p.slug)),(0,uf.jsx)(u$,{title:(0,pc.__)("Uncategorized"),blockTypes:u.filter(({category:p})=>!p),selectedBlockTypes:t,onChange:o})]})]})}var mc=c(E(),1);function kEe({clientId:e,blockTypes:t,selectedBlockTypes:o,onClose:r}){let[n,i]=(0,vEe.useState)(o),{updateBlockAttributes:s}=(0,SEe.useDispatch)(C),a=()=>{let l=n.length===t.length,u=n.map(({name:d})=>d);s(e,{allowedBlocks:l?void 0:u}),r()};return(0,mc.jsx)(ws.Modal,{title:(0,w_._x)("Manage allowed blocks","modal title"),onRequestClose:r,overlayClassName:"block-editor-block-allowed-blocks-modal",focusOnMount:"firstContentElement",size:"medium",children:(0,mc.jsxs)(ws.__experimentalVStack,{as:"form",onSubmit:l=>{l.preventDefault(),a()},spacing:"4",children:[(0,mc.jsx)(ws.__experimentalText,{children:(0,w_.__)("Select which blocks can be added inside this container.")}),(0,mc.jsx)(UD,{blockTypes:t,selectedBlockTypes:n,onChange:l=>{i(l)}}),(0,mc.jsxs)(ws.Flex,{className:"block-editor-block-allowed-blocks-modal__actions",justify:"flex-end",expanded:!1,children:[(0,mc.jsx)(ws.FlexItem,{children:(0,mc.jsx)(ws.Button,{variant:"tertiary",onClick:r,__next40pxDefaultSize:!0,children:(0,w_.__)("Cancel")})}),(0,mc.jsx)(ws.FlexItem,{children:(0,mc.jsx)(ws.Button,{variant:"primary",type:"submit",__next40pxDefaultSize:!0,children:(0,w_.__)("Apply")})})]})]})})}var Xb=c(E(),1);function wEe({clientId:e}){let[t,o]=(0,_Ee.useState)(!1),{blockTypes:r,selectedBlockNames:n}=(0,xEe.useSelect)(a=>{let{getBlockAttributes:l}=a(C);return{blockTypes:a(WD.store).getBlockTypes(),selectedBlockNames:l(e)?.allowedBlocks}},[e]),i=r.filter(a=>(0,WD.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,Xb.jsxs)("div",{className:"block-editor-block-allowed-blocks-control",children:[(0,Xb.jsxs)(jE.BaseControl,{help:(0,GD.__)("Specify which blocks are allowed inside this container."),children:[(0,Xb.jsx)(jE.BaseControl.VisualLabel,{children:(0,GD.__)("Allowed Blocks")}),(0,Xb.jsx)(jE.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>{o(!0)},className:"block-editor-block-allowed-blocks-control__button",children:(0,GD.__)("Manage allowed blocks")})]}),t&&(0,Xb.jsx)(kEe,{clientId:e,blockTypes:i,selectedBlockTypes:s,onClose:()=>o(!1)})]})}var f$=c(E(),1);function kYe({clientId:e}){return yr()==="contentOnly"?null:(0,f$.jsx)(yC.Fill,{children:(0,f$.jsx)(wEe,{clientId:e})})}var CEe={edit:kYe,attributeKeys:["allowedBlocks"],hasSupport(e){return(0,C_.hasBlockSupport)(e,"allowedBlocks")}};function _Ye(e){return e?.attributes?.allowedBlocks?.type||(0,C_.hasBlockSupport)(e,"allowedBlocks")&&(e.attributes={...e.attributes,allowedBlocks:{type:"array"}}),e}(0,p$.addFilter)("blocks.registerBlockType","core/allowedBlocks/attribute",_Ye);function xYe(e,t,o,r){if(!(0,C_.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,C_.getBlockType)(e.name)?.allowedBlocks||[];if(!s.length)return{...e,attributes:{...e.attributes,allowedBlocks:n}};let a=n.filter(l=>s.includes(l));return{...e,attributes:{...e.attributes,allowedBlocks:a}}}(0,p$.addFilter)("blocks.switchToBlockType.transformedBlock","core/allowedBlocks/addTransforms",xYe);var EEe=c(uo(),1),$D=c(H(),1),HE=c(G(),1),KD=c(ce(),1);var Gm=c(E(),1),wYe=/[\s#]/g;function CYe(e){return"type"in(e.attributes?.anchor??{})||(0,KD.hasBlockSupport)(e,"anchor")&&(e.attributes={...e.attributes,anchor:{type:"string"}}),e}function EYe({anchor:e,setAttributes:t}){return yr()!=="default"?null:(0,Gm.jsx)(Oe,{group:"advanced",children:(0,Gm.jsx)($D.TextControl,{className:"html-anchor-control",label:(0,HE.__)("HTML anchor"),help:(0,Gm.jsxs)(Gm.Fragment,{children:[(0,HE.__)("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.")," ",(0,Gm.jsx)($D.ExternalLink,{href:(0,HE.__)("https://wordpress.org/documentation/article/page-jumps/"),children:(0,HE.__)("Learn more about anchors")})]}),value:e||"",placeholder:null,onChange:r=>{r=r.replace(wYe,"-"),t({anchor:r!==""?r:void 0})},autoCapitalize:"none",autoComplete:"off"})})}var m$={addSaveProps:TYe,edit:EYe,attributeKeys:["anchor"],hasSupport(e){return(0,KD.hasBlockSupport)(e,"anchor")}};function TYe(e,t,o){return(0,KD.hasBlockSupport)(t,"anchor")&&(e.id=o.anchor===""?null:o.anchor),e}(0,EEe.addFilter)("blocks.registerBlockType","core/anchor/attribute",CYe);var TEe=c(uo(),1),YD=c(ce(),1);function RYe(e){return e?.attributes?.ariaLabel?.type||(0,YD.hasBlockSupport)(e,"ariaLabel")&&(e.attributes={...e.attributes,ariaLabel:{type:"string"}}),e}function BYe(e,t,o){return(0,YD.hasBlockSupport)(t,"ariaLabel")&&!Ft(t,"ariaLabel","ariaLabel")&&(e["aria-label"]=o.ariaLabel===""?null:o.ariaLabel),e}var REe={addSaveProps:BYe,attributeKeys:["ariaLabel"],hasSupport(e){return(0,YD.hasBlockSupport)(e,"ariaLabel")}};(0,TEe.addFilter)("blocks.registerBlockType","core/ariaLabel/attribute",RYe);var V_=c(ce(),1),NRe=c(fe(),1),ZV=c(H(),1),XV=c(Z(),1);var g$=c(G(),1);var Ko="isAny",Yo="isNone",ui="isAll",di="isNotAll",Hi="between",Ui="inThePast",Cs="over",sr="is",ar="isNot",Wm="lessThan",$m="greaterThan",Km="lessThanOrEqual",Ym="greaterThanOrEqual",qm="before",Zm="after",Xm="beforeInc",Qm="afterInc",Cu="contains",Eu="notContains",Tu="startsWith",Jm="on",eg="notOn";var Uto={asc:(0,g$.__)("Sort ascending"),desc:(0,g$.__)("Sort descending")};var BEe=c(Q_(),1),{lock:Wto,unlock:ro}=(0,BEe.__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 UE=c(F(),1),PYe=[];function Es({elements:e,getElements:t}){let o=Array.isArray(e)&&e.length>0?e:PYe,[r,n]=(0,UE.useState)(o),[i,s]=(0,UE.useState)(!1);return(0,UE.useEffect)(()=>{if(!t){n(o);return}let a=!1;return s(!0),t().then(l=>{if(!a){let u=Array.isArray(l)&&l.length>0?l:o;n(u)}}).catch(()=>{a||n(o)}).finally(()=>{a||s(!1)}),()=>{a=!0}},[t,o]),{elements:r,isLoading:i}}var IYe=Math.pow(10,8)*24*60*60*1e3,Yto=-IYe,qD=6048e5,PEe=864e5;var OYe=3600;var IEe=OYe*24,qto=IEe*7,AYe=IEe*365.2425,LYe=AYe/12,Zto=LYe*3,h$=Symbol.for("constructDateFrom");function un(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&h$ in e?e[h$](t):e instanceof Date?new e.constructor(t):new Date(t)}function lo(e,t){return un(t||e,e)}function ZD(e,t,o){let r=lo(e,o?.in);return isNaN(t)?un(o?.in||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function XD(e,t,o){let r=lo(e,o?.in);if(isNaN(t))return un(o?.in||e,NaN);if(!t)return r;let n=r.getDate(),i=un(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 MYe={};function tg(){return MYe}function df(e,t){let o=tg(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??o.weekStartsOn??o.locale?.options?.weekStartsOn??0,n=lo(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 Qb(e,t){return df(e,{...t,weekStartsOn:1})}function QD(e,t){let o=lo(e,t?.in),r=o.getFullYear(),n=un(o,0);n.setFullYear(r+1,0,4),n.setHours(0,0,0,0);let i=Qb(n),s=un(o,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);let a=Qb(s);return o.getTime()>=i.getTime()?r+1:o.getTime()>=a.getTime()?r:r-1}function b$(e){let t=lo(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 OEe(e,...t){let o=un.bind(null,e||t.find(r=>typeof r=="object"));return t.map(o)}function y$(e,t){let o=lo(e,t?.in);return o.setHours(0,0,0,0),o}function AEe(e,t,o){let[r,n]=OEe(o?.in,e,t),i=y$(r),s=y$(n),a=+i-b$(i),l=+s-b$(s);return Math.round((a-l)/PEe)}function LEe(e,t){let o=QD(e,t),r=un(t?.in||e,0);return r.setFullYear(o,0,4),r.setHours(0,0,0,0),Qb(r)}function MEe(e,t,o){return ZD(e,t*7,o)}function NEe(e,t,o){return XD(e,t*12,o)}function DEe(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function ff(e){return!(!DEe(e)&&typeof e!="number"||isNaN(+lo(e)))}function VEe(e,t){let o=lo(e,t?.in);return o.setDate(1),o.setHours(0,0,0,0),o}function JD(e,t){let o=lo(e,t?.in);return o.setFullYear(o.getFullYear(),0,1),o.setHours(0,0,0,0),o}var NYe={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"}},FEe=(e,t,o)=>{let r,n=NYe[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 eV(e){return(t={})=>{let o=t.width?String(t.width):e.defaultWidth;return e.formats[o]||e.formats[e.defaultWidth]}}var DYe={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},VYe={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},FYe={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},zEe={date:eV({formats:DYe,defaultWidth:"full"}),time:eV({formats:VYe,defaultWidth:"full"}),dateTime:eV({formats:FYe,defaultWidth:"full"})};var zYe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},jEe=(e,t,o,r)=>zYe[e];function E_(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 jYe={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},HYe={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},UYe={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"]},GYe={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"]},WYe={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"}},$Ye={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"}},KYe=(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"},HEe={ordinalNumber:KYe,era:E_({values:jYe,defaultWidth:"wide"}),quarter:E_({values:HYe,defaultWidth:"wide",argumentCallback:e=>e-1}),month:E_({values:UYe,defaultWidth:"wide"}),day:E_({values:GYe,defaultWidth:"wide"}),dayPeriod:E_({values:WYe,defaultWidth:"wide",formattingValues:$Ye,defaultFormattingWidth:"wide"})};function T_(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],l=Array.isArray(a)?qYe(a,f=>f.test(s)):YYe(a,f=>f.test(s)),u;u=e.valueCallback?e.valueCallback(l):l,u=o.valueCallback?o.valueCallback(u):u;let d=t.slice(s.length);return{value:u,rest:d}}}function YYe(e,t){for(let o in e)if(Object.prototype.hasOwnProperty.call(e,o)&&t(e[o]))return o}function qYe(e,t){for(let o=0;o<e.length;o++)if(t(e[o]))return o}function UEe(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 ZYe=/^(\d+)(th|st|nd|rd)?/i,XYe=/\d+/i,QYe={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},JYe={any:[/^b/i,/^(a|c)/i]},eqe={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},tqe={any:[/1/i,/2/i,/3/i,/4/i]},oqe={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},rqe={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]},nqe={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},iqe={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]},sqe={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},aqe={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}},GEe={ordinalNumber:UEe({matchPattern:ZYe,parsePattern:XYe,valueCallback:e=>parseInt(e,10)}),era:T_({matchPatterns:QYe,defaultMatchWidth:"wide",parsePatterns:JYe,defaultParseWidth:"any"}),quarter:T_({matchPatterns:eqe,defaultMatchWidth:"wide",parsePatterns:tqe,defaultParseWidth:"any",valueCallback:e=>e+1}),month:T_({matchPatterns:oqe,defaultMatchWidth:"wide",parsePatterns:rqe,defaultParseWidth:"any"}),day:T_({matchPatterns:nqe,defaultMatchWidth:"wide",parsePatterns:iqe,defaultParseWidth:"any"}),dayPeriod:T_({matchPatterns:sqe,defaultMatchWidth:"any",parsePatterns:aqe,defaultParseWidth:"any"})};var v$={code:"en-US",formatDistance:FEe,formatLong:zEe,formatRelative:jEe,localize:HEe,match:GEe,options:{weekStartsOn:0,firstWeekContainsDate:1}};function WEe(e,t){let o=lo(e,t?.in);return AEe(o,JD(o))+1}function $Ee(e,t){let o=lo(e,t?.in),r=+Qb(o)-+LEe(o);return Math.round(r/qD)+1}function tV(e,t){let o=lo(e,t?.in),r=o.getFullYear(),n=tg(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,s=un(t?.in||e,0);s.setFullYear(r+1,0,i),s.setHours(0,0,0,0);let a=df(s,t),l=un(t?.in||e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);let u=df(l,t);return+o>=+a?r+1:+o>=+u?r:r-1}function KEe(e,t){let o=tg(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,n=tV(e,t),i=un(t?.in||e,0);return i.setFullYear(n,0,r),i.setHours(0,0,0,0),df(i,t)}function YEe(e,t){let o=lo(e,t?.in),r=+df(o,t)-+KEe(o,t);return Math.round(r/qD)+1}function Wt(e,t){let o=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return o+r}var pf={y(e,t){let o=e.getFullYear(),r=o>0?o:1-o;return Wt(t==="yy"?r%100:r,t.length)},M(e,t){let o=e.getMonth();return t==="M"?String(o+1):Wt(o+1,2)},d(e,t){return Wt(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 Wt(e.getHours()%12||12,t.length)},H(e,t){return Wt(e.getHours(),t.length)},m(e,t){return Wt(e.getMinutes(),t.length)},s(e,t){return Wt(e.getSeconds(),t.length)},S(e,t){let o=t.length,r=e.getMilliseconds(),n=Math.trunc(r*Math.pow(10,o-3));return Wt(n,t.length)}};var R_={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},S$={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 pf.y(e,t)},Y:function(e,t,o,r){let n=tV(e,r),i=n>0?n:1-n;if(t==="YY"){let s=i%100;return Wt(s,2)}return t==="Yo"?o.ordinalNumber(i,{unit:"year"}):Wt(i,t.length)},R:function(e,t){let o=QD(e);return Wt(o,t.length)},u:function(e,t){let o=e.getFullYear();return Wt(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 Wt(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 Wt(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 pf.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 Wt(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=YEe(e,r);return t==="wo"?o.ordinalNumber(n,{unit:"week"}):Wt(n,t.length)},I:function(e,t,o){let r=$Ee(e);return t==="Io"?o.ordinalNumber(r,{unit:"week"}):Wt(r,t.length)},d:function(e,t,o){return t==="do"?o.ordinalNumber(e.getDate(),{unit:"date"}):pf.d(e,t)},D:function(e,t,o){let r=WEe(e);return t==="Do"?o.ordinalNumber(r,{unit:"dayOfYear"}):Wt(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 Wt(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 Wt(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 Wt(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=R_.noon:r===0?n=R_.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=R_.evening:r>=12?n=R_.afternoon:r>=4?n=R_.morning:n=R_.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 pf.h(e,t)},H:function(e,t,o){return t==="Ho"?o.ordinalNumber(e.getHours(),{unit:"hour"}):pf.H(e,t)},K:function(e,t,o){let r=e.getHours()%12;return t==="Ko"?o.ordinalNumber(r,{unit:"hour"}):Wt(r,t.length)},k:function(e,t,o){let r=e.getHours();return r===0&&(r=24),t==="ko"?o.ordinalNumber(r,{unit:"hour"}):Wt(r,t.length)},m:function(e,t,o){return t==="mo"?o.ordinalNumber(e.getMinutes(),{unit:"minute"}):pf.m(e,t)},s:function(e,t,o){return t==="so"?o.ordinalNumber(e.getSeconds(),{unit:"second"}):pf.s(e,t)},S:function(e,t){return pf.S(e,t)},X:function(e,t,o){let r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return ZEe(r);case"XXXX":case"XX":return Jb(r);default:return Jb(r,":")}},x:function(e,t,o){let r=e.getTimezoneOffset();switch(t){case"x":return ZEe(r);case"xxxx":case"xx":return Jb(r);default:return Jb(r,":")}},O:function(e,t,o){let r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+qEe(r,":");default:return"GMT"+Jb(r,":")}},z:function(e,t,o){let r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+qEe(r,":");default:return"GMT"+Jb(r,":")}},t:function(e,t,o){let r=Math.trunc(+e/1e3);return Wt(r,t.length)},T:function(e,t,o){return Wt(+e,t.length)}};function qEe(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+Wt(i,2)}function ZEe(e,t){return e%60===0?(e>0?"-":"+")+Wt(Math.abs(e)/60,2):Jb(e,t)}function Jb(e,t=""){let o=e>0?"-":"+",r=Math.abs(e),n=Wt(Math.trunc(r/60),2),i=Wt(r%60,2);return o+n+t+i}var XEe=(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"})}},QEe=(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"})}},lqe=(e,t)=>{let o=e.match(/(P+)(p+)?/)||[],r=o[1],n=o[2];if(!n)return XEe(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}}",XEe(r,t)).replace("{{time}}",QEe(n,t))},JEe={p:QEe,P:lqe};var cqe=/^D+$/,uqe=/^Y+$/,dqe=["D","DD","YY","YYYY"];function e1e(e){return cqe.test(e)}function t1e(e){return uqe.test(e)}function o1e(e,t,o){let r=fqe(e,t,o);if(console.warn(r),dqe.includes(e))throw new RangeError(r)}function fqe(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 pqe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,mqe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,gqe=/^'([^]*?)'?$/,hqe=/''/g,bqe=/[a-zA-Z]/;function k$(e,t,o){let r=tg(),n=o?.locale??r.locale??v$,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=lo(e,o?.in);if(!ff(a))throw new RangeError("Invalid time value");let l=t.match(mqe).map(d=>{let f=d[0];if(f==="p"||f==="P"){let p=JEe[f];return p(d,n.formatLong)}return d}).join("").match(pqe).map(d=>{if(d==="''")return{isToken:!1,value:"'"};let f=d[0];if(f==="'")return{isToken:!1,value:yqe(d)};if(S$[f])return{isToken:!0,value:d};if(f.match(bqe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+f+"`");return{isToken:!1,value:d}});n.localize.preprocessor&&(l=n.localize.preprocessor(a,l));let u={firstWeekContainsDate:i,weekStartsOn:s,locale:n};return l.map(d=>{if(!d.isToken)return d.value;let f=d.value;(!o?.useAdditionalWeekYearTokens&&t1e(f)||!o?.useAdditionalDayOfYearTokens&&e1e(f))&&o1e(f,t,String(e));let p=S$[f[0]];return p(a,f,n.localize,u)}).join("")}function yqe(e){let t=e.match(gqe);return t?t[1].replace(hqe,"'"):e}function ey(e,t,o){return ZD(e,-t,o)}function oV(e,t,o){return XD(e,-t,o)}function r1e(e,t,o){return MEe(e,-t,o)}function rV(e,t,o){return NEe(e,-t,o)}var He=c(G(),1),vr=c(F(),1),Gi=c(du(),1);var _$=c(E(),1),Hr={Name:(0,_$.jsx)("span",{className:"dataviews-filters__summary-filter-text-name"}),Value:(0,_$.jsx)("span",{className:"dataviews-filters__summary-filter-text-value"})};function n1e(e,t){switch(t){case"days":return ey(new Date,e);case"weeks":return r1e(new Date,e);case"months":return oV(new Date,e);case"years":return rV(new Date,e);default:return new Date}}var i1e={label:(0,He.__)("Is none of"),filterText:(e,t)=>(0,vr.createInterpolateElement)((0,He.sprintf)((0,He.__)("<Name>%1$s is none of: </Name><Value>%2$s</Value>"),e.name,t.map(o=>o.label).join(", ")),Hr),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"},s1e=[{name:Ko,label:(0,He.__)("Includes"),filterText:(e,t)=>(0,vr.createInterpolateElement)((0,He.sprintf)((0,He.__)("<Name>%1$s includes: </Name><Value>%2$s</Value>"),e.name,t.map(o=>o.label).join(", ")),Hr),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:Yo,...i1e},{name:ui,label:(0,He.__)("Includes all"),filterText:(e,t)=>(0,vr.createInterpolateElement)((0,He.sprintf)((0,He.__)("<Name>%1$s includes all: </Name><Value>%2$s</Value>"),e.name,t.map(o=>o.label).join(", ")),Hr),filter(e,t,o){return o?.length?o.every(r=>t.getValue({item:e})?.includes(r)):!0},selection:"multi"},{name:di,...i1e},{name:Hi,label:(0,He.__)("Between (inc)"),filterText:(e,t)=>(0,vr.createInterpolateElement)((0,He.sprintf)((0,He.__)("<Name>%1$s between (inc): </Name><Value>%2$s and %3$s</Value>"),e.name,t[0].label[0],t[0].label[1]),Hr),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:Ui,label:(0,He.__)("In the past"),filterText:(e,t)=>(0,vr.createInterpolateElement)((0,He.sprintf)((0,He.__)("<Name>%1$s is in the past: </Name><Value>%2$s</Value>"),e.name,`${t[0].value.value} ${t[0].value.unit}`),Hr),filter(e,t,o){if(o?.value===void 0||o?.unit===void 0)return!0;let r=n1e(o.value,o.unit),n=(0,Gi.getDate)(t.getValue({item:e}));return n>=r&&n<=new Date},selection:"custom"},{name:Cs,label:(0,He.__)("Over"),filterText:(e,t)=>(0,vr.createInterpolateElement)((0,He.sprintf)((0,He.__)("<Name>%1$s is over: </Name><Value>%2$s</Value>"),e.name,`${t[0].value.value} ${t[0].value.unit}`),Hr),filter(e,t,o){if(o?.value===void 0||o?.unit===void 0)return!0;let r=n1e(o.value,o.unit);return(0,Gi.getDate)(t.getValue({item:e}))<r},selection:"custom"},{name:sr,label:(0,He.__)("Is"),filterText:(e,t)=>(0,vr.createInterpolateElement)((0,He.sprintf)((0,He.__)("<Name>%1$s is: </Name><Value>%2$s</Value>"),e.name,t[0].label),Hr),filter(e,t,o){return o===t.getValue({item:e})||o===void 0},selection:"single"},{name:ar,label:(0,He.__)("Is not"),filterText:(e,t)=>(0,vr.createInterpolateElement)((0,He.sprintf)((0,He.__)("<Name>%1$s is not: </Name><Value>%2$s</Value>"),e.name,t[0].label),Hr),filter(e,t,o){return o!==t.getValue({item:e})},selection:"single"},{name:Wm,label:(0,He.__)("Less than"),filterText:(e,t)=>(0,vr.createInterpolateElement)((0,He.sprintf)((0,He.__)("<Name>%1$s is less than: </Name><Value>%2$s</Value>"),e.name,t[0].label),Hr),filter(e,t,o){return o===void 0?!0:t.getValue({item:e})<o},selection:"single"},{name:$m,label:(0,He.__)("Greater than"),filterText:(e,t)=>(0,vr.createInterpolateElement)((0,He.sprintf)((0,He.__)("<Name>%1$s is greater than: </Name><Value>%2$s</Value>"),e.name,t[0].label),Hr),filter(e,t,o){return o===void 0?!0:t.getValue({item:e})>o},selection:"single"},{name:Km,label:(0,He.__)("Less than or equal"),filterText:(e,t)=>(0,vr.createInterpolateElement)((0,He.sprintf)((0,He.__)("<Name>%1$s is less than or equal to: </Name><Value>%2$s</Value>"),e.name,t[0].label),Hr),filter(e,t,o){return o===void 0?!0:t.getValue({item:e})<=o},selection:"single"},{name:Ym,label:(0,He.__)("Greater than or equal"),filterText:(e,t)=>(0,vr.createInterpolateElement)((0,He.sprintf)((0,He.__)("<Name>%1$s is greater than or equal to: </Name><Value>%2$s</Value>"),e.name,t[0].label),Hr),filter(e,t,o){return o===void 0?!0:t.getValue({item:e})>=o},selection:"single"},{name:qm,label:(0,He.__)("Before"),filterText:(e,t)=>(0,vr.createInterpolateElement)((0,He.sprintf)((0,He.__)("<Name>%1$s is before: </Name><Value>%2$s</Value>"),e.name,t[0].label),Hr),filter(e,t,o){if(o===void 0)return!0;let r=(0,Gi.getDate)(o);return(0,Gi.getDate)(t.getValue({item:e}))<r},selection:"single"},{name:Zm,label:(0,He.__)("After"),filterText:(e,t)=>(0,vr.createInterpolateElement)((0,He.sprintf)((0,He.__)("<Name>%1$s is after: </Name><Value>%2$s</Value>"),e.name,t[0].label),Hr),filter(e,t,o){if(o===void 0)return!0;let r=(0,Gi.getDate)(o);return(0,Gi.getDate)(t.getValue({item:e}))>r},selection:"single"},{name:Xm,label:(0,He.__)("Before (inc)"),filterText:(e,t)=>(0,vr.createInterpolateElement)((0,He.sprintf)((0,He.__)("<Name>%1$s is on or before: </Name><Value>%2$s</Value>"),e.name,t[0].label),Hr),filter(e,t,o){if(o===void 0)return!0;let r=(0,Gi.getDate)(o);return(0,Gi.getDate)(t.getValue({item:e}))<=r},selection:"single"},{name:Qm,label:(0,He.__)("After (inc)"),filterText:(e,t)=>(0,vr.createInterpolateElement)((0,He.sprintf)((0,He.__)("<Name>%1$s is on or after: </Name><Value>%2$s</Value>"),e.name,t[0].label),Hr),filter(e,t,o){if(o===void 0)return!0;let r=(0,Gi.getDate)(o);return(0,Gi.getDate)(t.getValue({item:e}))>=r},selection:"single"},{name:Cu,label:(0,He.__)("Contains"),filterText:(e,t)=>(0,vr.createInterpolateElement)((0,He.sprintf)((0,He.__)("<Name>%1$s contains: </Name><Value>%2$s</Value>"),e.name,t[0].label),Hr),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:Eu,label:(0,He.__)("Doesn't contain"),filterText:(e,t)=>(0,vr.createInterpolateElement)((0,He.sprintf)((0,He.__)("<Name>%1$s doesn't contain: </Name><Value>%2$s</Value>"),e.name,t[0].label),Hr),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:Tu,label:(0,He.__)("Starts with"),filterText:(e,t)=>(0,vr.createInterpolateElement)((0,He.sprintf)((0,He.__)("<Name>%1$s starts with: </Name><Value>%2$s</Value>"),e.name,t[0].label),Hr),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:Jm,label:(0,He.__)("On"),filterText:(e,t)=>(0,vr.createInterpolateElement)((0,He.sprintf)((0,He.__)("<Name>%1$s is: </Name><Value>%2$s</Value>"),e.name,t[0].label),Hr),filter(e,t,o){if(o===void 0)return!0;let r=(0,Gi.getDate)(o),n=(0,Gi.getDate)(t.getValue({item:e}));return r.getTime()===n.getTime()},selection:"single"},{name:eg,label:(0,He.__)("Not on"),filterText:(e,t)=>(0,vr.createInterpolateElement)((0,He.sprintf)((0,He.__)("<Name>%1$s is not: </Name><Value>%2$s</Value>"),e.name,t[0].label),Hr),filter(e,t,o){if(o===void 0)return!0;let r=(0,Gi.getDate)(o),n=(0,Gi.getDate)(t.getValue({item:e}));return r.getTime()!==n.getTime()},selection:"single"}],a1e=e=>s1e.find(t=>t.name===e),l1e=()=>s1e.map(e=>e.name);var c1e=c(H(),1),u1e=c(F(),1);function no(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 d1e=c(E(),1),{ValidatedCheckboxControl:vqe}=ro(c1e.privateApis);function f1e({field:e,onChange:t,data:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{getValue:s,setValue:a,label:l,description:u,isValid:d}=e,f=e.isDisabled({item:o,field:e}),p=(0,u1e.useCallback)(()=>{t(a({item:o,value:!s({item:o})}))},[o,s,t,a]);return(0,d1e.jsx)(vqe,{required:!!e.isValid?.required,markWhenOptional:n,customValidity:no(d,i),hidden:r,label:l,help:u,checked:s({item:o}),onChange:p,disabled:f})}var nV=c(H(),1),p1e=c(F(),1);var x$=c(E(),1),{ValidatedComboboxControl:Sqe}=ro(nV.privateApis);function iV({data:e,field:t,onChange:o,hideLabelFromVision:r,validity:n}){let{label:i,description:s,placeholder:a,getValue:l,setValue:u,isValid:d}=t,f=l({item:e})??"",p=(0,p1e.useCallback)(h=>o(u({item:e,value:h??""})),[e,o,u]),{elements:g,isLoading:m}=Es({elements:t.elements,getElements:t.getElements});return m?(0,x$.jsx)(nV.Spinner,{}):(0,x$.jsx)(Sqe,{required:!!t.isValid?.required,customValidity:no(d,n),label:i,value:f,help:s,placeholder:a,options:g,onChange:p,hideLabelFromVision:r,allowReset:!0,expandOnFocus:!0})}var lV=c(H(),1),dl=c(F(),1),aV=c(G(),1),la=c(du(),1);var P_=c(H(),1),w$=c(F(),1),Ru=c(G(),1);var B_=c(E(),1),kqe={[Ui]:[{value:"days",label:(0,Ru.__)("Days")},{value:"weeks",label:(0,Ru.__)("Weeks")},{value:"months",label:(0,Ru.__)("Months")},{value:"years",label:(0,Ru.__)("Years")}],[Cs]:[{value:"days",label:(0,Ru.__)("Days ago")},{value:"weeks",label:(0,Ru.__)("Weeks ago")},{value:"months",label:(0,Ru.__)("Months ago")},{value:"years",label:(0,Ru.__)("Years ago")}]};function sV({className:e,data:t,field:o,onChange:r,hideLabelFromVision:n,operator:i}){let s=kqe[i===Ui?"inThePast":"over"],{id:a,label:l,description:u,getValue:d,setValue:f}=o,p=o.isDisabled({item:t,field:o}),g=d({item:t}),{value:m="",unit:h=s[0].value}=g&&typeof g=="object"?g:{},b=(0,w$.useCallback)(y=>r(f({item:t,value:{value:Number(y),unit:h}})),[r,f,t,h]),v=(0,w$.useCallback)(y=>r(f({item:t,value:{value:m,unit:y}})),[r,f,t,m]);return(0,B_.jsx)(P_.BaseControl,{id:a,className:W(e,"dataviews-controls__relative-date"),label:l,hideLabelFromVision:n,help:u,children:(0,B_.jsxs)(Xe,{direction:"row",gap:"sm",children:[(0,B_.jsx)(P_.__experimentalNumberControl,{className:"dataviews-controls__relative-date-number",spinControls:"none",min:1,step:1,value:m,onChange:b,disabled:p}),(0,B_.jsx)(P_.SelectControl,{className:"dataviews-controls__relative-date-unit",label:(0,Ru.__)("Unit"),value:h,options:s,onChange:v,hideLabelFromVision:!0,disabled:p})]})})}var m1e=c(F(),1);function GE(e,t){let o=typeof e.min?.constraint=="string"?e.min.constraint:void 0,r=typeof e.max?.constraint=="string"?e.max.constraint:void 0,n=(0,m1e.useMemo)(()=>{let i=[];if(o){let s=t(o);s&&i.push({before:s})}if(r){let s=t(r);s&&i.push({after:s})}return i.length>0?i:void 0},[o,r,t]);return{minConstraint:o,maxConstraint:r,disabledMatchers:n}}var g1e=c(du(),1);function WE(e){if(!e)return null;let t=(0,g1e.getDate)(e);return t&&ff(t)?t:null}var og=c(E(),1),{DateCalendar:_qe,ValidatedInputControl:xqe}=ro(lV.privateApis),C$=e=>e?(0,la.dateI18n)("Y-m-d\\TH:i",(0,la.getDate)(e)):"";function wqe({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i,config:s}){let{compact:a}=s||{},{id:l,label:u,description:d,setValue:f,getValue:p,isValid:g}=t,m=t.isDisabled({item:e,field:t}),h=p({item:e}),b=typeof h=="string"?h:void 0,[v,y]=(0,dl.useState)(()=>WE(b)||new Date),k=(0,dl.useRef)(null),S=(0,dl.useRef)(void 0),_=(0,dl.useRef)(null),{minConstraint:x,maxConstraint:w,disabledMatchers:T}=GE(g,WE),B=(0,dl.useCallback)(z=>o(f({item:e,value:z})),[e,o,f]);(0,dl.useEffect)(()=>()=>{S.current&&clearTimeout(S.current)},[]);let R=(0,dl.useCallback)(z=>{let V;if(z){let I=(0,la.dateI18n)("Y-m-d",z),N;b?N=(0,la.dateI18n)("H:i",(0,la.getDate)(b)):N=(0,la.dateI18n)("H:i",z),V=(0,la.getDate)(`${I}T${N}`).toISOString(),B(V),S.current&&clearTimeout(S.current)}else B(void 0);_.current=k.current&&k.current.ownerDocument.activeElement,S.current=setTimeout(()=>{k.current&&(k.current.focus(),k.current.blur(),B(V),_.current&&_.current instanceof HTMLElement&&_.current.focus())},0)},[B,b]),A=(0,dl.useCallback)(z=>{if(z){let V=(0,la.getDate)(z);B(V.toISOString());let I=WE(V.toISOString());I&&y(I)}else B(void 0)},[B]),{format:O}=t,P=O.weekStartsOn??(0,la.getSettings)().l10n.startOfWeek,{timezone:{string:L}}=(0,la.getSettings)(),M=u;return g?.required&&!n&&!r?M=`${u} (${(0,aV.__)("Required")})`:!g?.required&&n&&!r&&(M=`${u} (${(0,aV.__)("Optional")})`),(0,og.jsx)(lV.BaseControl,{id:l,label:M,help:d,hideLabelFromVision:r,children:(0,og.jsxs)(Xe,{direction:"column",gap:"lg",children:[(0,og.jsx)(xqe,{ref:k,required:!!g?.required,customValidity:no(g,i),type:"datetime-local",label:(0,aV.__)("Date time"),hideLabelFromVision:!0,value:C$(b),onChange:A,disabled:m,min:x?C$(x):void 0,max:w?C$(w):void 0}),!a&&(0,og.jsx)(_qe,{style:{width:"100%"},selected:b&&WE(b)||void 0,onSelect:R,month:v,onMonthChange:y,timeZone:L||void 0,weekStartsOn:P,disabled:m||T})]})})}function h1e({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,operator:i,validity:s,config:a}){return i===Ui||i===Cs?(0,og.jsx)(sV,{className:"dataviews-controls__datetime",data:e,field:t,onChange:o,hideLabelFromVision:r,operator:i}):(0,og.jsx)(wqe,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:s,config:a})}var pi=c(H(),1),b1e=c(Kr(),1),eo=c(F(),1),dn=c(G(),1),fi=c(du(),1);var To=c(E(),1),{DateCalendar:Cqe,DateRangeCalendar:Eqe}=ro(pi.privateApis),Tqe=[{id:"today",label:(0,dn.__)("Today"),getValue:()=>(0,fi.getDate)(null)},{id:"yesterday",label:(0,dn.__)("Yesterday"),getValue:()=>{let e=(0,fi.getDate)(null);return ey(e,1)}},{id:"past-week",label:(0,dn.__)("Past week"),getValue:()=>{let e=(0,fi.getDate)(null);return ey(e,7)}},{id:"past-month",label:(0,dn.__)("Past month"),getValue:()=>{let e=(0,fi.getDate)(null);return oV(e,1)}}],Rqe=[{id:"last-7-days",label:(0,dn.__)("Last 7 days"),getValue:()=>{let e=(0,fi.getDate)(null);return[ey(e,7),e]}},{id:"last-30-days",label:(0,dn.__)("Last 30 days"),getValue:()=>{let e=(0,fi.getDate)(null);return[ey(e,30),e]}},{id:"month-to-date",label:(0,dn.__)("Month to date"),getValue:()=>{let e=(0,fi.getDate)(null);return[VEe(e),e]}},{id:"last-year",label:(0,dn.__)("Last year"),getValue:()=>{let e=(0,fi.getDate)(null);return[rV(e,1),e]}},{id:"year-to-date",label:(0,dn.__)("Year to date"),getValue:()=>{let e=(0,fi.getDate)(null);return[JD(e),e]}}],rg=e=>{if(!e)return null;let t=(0,fi.getDate)(e);return t&&ff(t)?t:null},E$=e=>e?typeof e=="string"?e:k$(e,"yyyy-MM-dd"):"";function y1e({field:e,validity:t,inputRefs:o,isTouched:r,setIsTouched:n,children:i}){let{isValid:s}=e,[a,l]=(0,eo.useState)(void 0),u=(0,eo.useCallback)(()=>{let f=Array.isArray(o)?o:[o];for(let p of f){let g=p.current;if(g&&!g.validity.valid){l({type:"invalid",message:g.validationMessage});return}}l(void 0)},[o]);return(0,eo.useEffect)(()=>{let f=Array.isArray(o)?o:[o],p=t?no(s,t):void 0;for(let g of f){let m=g.current;m&&m.setCustomValidity(p?.type==="invalid"&&p.message?p.message:"")}},[o,s,t]),(0,eo.useEffect)(()=>{let f=Array.isArray(o)?o:[o],p=g=>{g.preventDefault(),n(!0)};for(let g of f)g.current?.addEventListener("invalid",p);return()=>{for(let g of f)g.current?.removeEventListener("invalid",p)}},[o,n]),(0,eo.useEffect)(()=>{if(!r)return;let f=t?no(s,t):void 0;f?l(f):u()},[r,s,t,u]),(0,eo.useEffect)(()=>{r&&a?.message&&(0,b1e.speak)(a.message)},[r,a?.message]),(0,To.jsxs)("div",{onBlur:f=>{r||(!f.relatedTarget||!f.currentTarget.contains(f.relatedTarget))&&n(!0)},children:[i,a&&(0,To.jsxs)("p",{className:W("components-validated-control__indicator",a.type==="invalid"?"is-invalid":void 0),children:[(0,To.jsx)(pi.Icon,{className:"components-validated-control__indicator-icon",icon:Lg,size:16,fill:"currentColor"}),a.message]})]})}function Bqe({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{id:s,label:a,description:l,setValue:u,getValue:d,isValid:f,format:p}=t,g=t.isDisabled({item:e,field:t}),[m,h]=(0,eo.useState)(null),b=p.weekStartsOn??(0,fi.getSettings)().l10n.startOfWeek,v=d({item:e}),y=typeof v=="string"?v:void 0,[k,S]=(0,eo.useState)(()=>rg(y)||new Date),[_,x]=(0,eo.useState)(!1),w=(0,eo.useRef)(null),{minConstraint:T,maxConstraint:B,disabledMatchers:R}=GE(f,rg),A=(0,eo.useCallback)(V=>o(u({item:e,value:V})),[e,o,u]),O=(0,eo.useCallback)(V=>{let I=V?k$(V,"yyyy-MM-dd"):void 0;A(I),h(null),x(!0)},[A]),P=(0,eo.useCallback)(V=>{let I=V.getValue(),N=E$(I);S(I),A(N),h(V.id),x(!0)},[A]),L=(0,eo.useCallback)(V=>{if(A(V),V){let I=rg(V);I&&S(I)}h(null),x(!0)},[A]),{timezone:{string:M}}=(0,fi.getSettings)(),z=a;return f?.required&&!n?z=`${a} (${(0,dn.__)("Required")})`:!f?.required&&n&&(z=`${a} (${(0,dn.__)("Optional")})`),(0,To.jsx)(y1e,{field:t,validity:i,inputRefs:w,isTouched:_,setIsTouched:x,children:(0,To.jsx)(pi.BaseControl,{id:s,className:"dataviews-controls__date",label:z,help:l,hideLabelFromVision:r,children:(0,To.jsxs)(Xe,{direction:"column",gap:"lg",children:[(0,To.jsxs)(Xe,{direction:"row",gap:"sm",wrap:"wrap",justify:"flex-start",children:[Tqe.map(V=>{let I=m===V.id;return(0,To.jsx)(pi.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:I,size:"small",disabled:g,accessibleWhenDisabled:!0,onClick:()=>P(V),children:V.label},V.id)}),(0,To.jsx)(pi.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:!m,size:"small",disabled:!!m||g,accessibleWhenDisabled:!0,children:(0,dn.__)("Custom")})]}),(0,To.jsx)(pi.__experimentalInputControl,{ref:w,type:"date",label:(0,dn.__)("Date"),hideLabelFromVision:!0,value:y,onChange:L,required:!!t.isValid?.required,disabled:g,min:T,max:B}),(0,To.jsx)(Cqe,{style:{width:"100%"},selected:y&&rg(y)||void 0,onSelect:O,month:k,onMonthChange:S,timeZone:M||void 0,weekStartsOn:b,disabled:g||R,disableNavigation:g})]})})})}function Pqe({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{id:s,label:a,description:l,getValue:u,setValue:d,isValid:f,format:p}=t,g=t.isDisabled({item:e,field:t}),m,h=u({item:e});Array.isArray(h)&&h.length===2&&h.every(D=>typeof D=="string")&&(m=h);let b=p.weekStartsOn??(0,fi.getSettings)().l10n.startOfWeek,{minConstraint:v,maxConstraint:y,disabledMatchers:k}=GE(f,rg),S=(0,eo.useCallback)(D=>{o(d({item:e,value:D}))},[e,o,d]),[_,x]=(0,eo.useState)(null),w=(0,eo.useMemo)(()=>{if(!m)return{from:void 0,to:void 0};let[D,j]=m;return{from:rg(D)||void 0,to:rg(j)||void 0}},[m]),[T,B]=(0,eo.useState)(()=>w.from||new Date),[R,A]=(0,eo.useState)(!1),O=(0,eo.useRef)(null),P=(0,eo.useRef)(null),L=(0,eo.useCallback)((D,j)=>{D&&j?S([E$(D),E$(j)]):!D&&!j&&S(void 0)},[S]),M=(0,eo.useCallback)(D=>{L(D?.from,D?.to),x(null),A(!0)},[L]),z=(0,eo.useCallback)(D=>{let[j,Y]=D.getValue();B(j),L(j,Y),x(D.id),A(!0)},[L]),V=(0,eo.useCallback)((D,j)=>{let[Y,X]=m||[void 0,void 0];if(L(D==="from"?j:Y,D==="to"?j:X),j){let $=rg(j);$&&B($)}x(null),A(!0)},[m,L]),{timezone:I}=(0,fi.getSettings)(),N=a;return t.isValid?.required&&!n?N=`${a} (${(0,dn.__)("Required")})`:!t.isValid?.required&&n&&(N=`${a} (${(0,dn.__)("Optional")})`),(0,To.jsx)(y1e,{field:t,validity:i,inputRefs:[O,P],isTouched:R,setIsTouched:A,children:(0,To.jsx)(pi.BaseControl,{id:s,className:"dataviews-controls__date",label:N,help:l,hideLabelFromVision:r,children:(0,To.jsxs)(Xe,{direction:"column",gap:"lg",children:[(0,To.jsxs)(Xe,{direction:"row",gap:"sm",wrap:"wrap",justify:"flex-start",children:[Rqe.map(D=>{let j=_===D.id;return(0,To.jsx)(pi.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:j,size:"small",disabled:g,accessibleWhenDisabled:!0,onClick:()=>z(D),children:D.label},D.id)}),(0,To.jsx)(pi.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:!_,size:"small",accessibleWhenDisabled:!0,disabled:!!_||g,children:(0,dn.__)("Custom")})]}),(0,To.jsxs)(Xe,{direction:"row",gap:"sm",justify:"space-between",className:"dataviews-controls__date-range-inputs",children:[(0,To.jsx)(pi.__experimentalInputControl,{ref:O,type:"date",label:(0,dn.__)("From"),hideLabelFromVision:!0,value:m?.[0],onChange:D=>V("from",D),required:!!t.isValid?.required,disabled:g,min:v,max:y}),(0,To.jsx)(pi.__experimentalInputControl,{ref:P,type:"date",label:(0,dn.__)("To"),hideLabelFromVision:!0,value:m?.[1],onChange:D=>V("to",D),required:!!t.isValid?.required,disabled:g,min:v,max:y})]}),(0,To.jsx)(Eqe,{style:{width:"100%"},selected:w,onSelect:M,month:T,onMonthChange:B,timeZone:I.string||void 0,weekStartsOn:b,disabled:g||k})]})})})}function v1e({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,operator:i,validity:s}){return i===Ui||i===Cs?(0,To.jsx)(sV,{className:"dataviews-controls__date",data:e,field:t,onChange:o,hideLabelFromVision:r,operator:i}):i===Hi?(0,To.jsx)(Pqe,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:s}):(0,To.jsx)(Bqe,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:s})}var cV=c(H(),1),S1e=c(F(),1);var T$=c(E(),1),{ValidatedSelectControl:Iqe}=ro(cV.privateApis);function uV({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{type:s,label:a,description:l,getValue:u,setValue:d,isValid:f}=t,p=t.isDisabled({item:e,field:t}),g=s==="array",m=u({item:e})??(g?[]:""),h=(0,S1e.useCallback)(y=>o(d({item:e,value:y})),[e,o,d]),{elements:b,isLoading:v}=Es({elements:t.elements,getElements:t.getElements});return v?(0,T$.jsx)(cV.Spinner,{}):(0,T$.jsx)(Iqe,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:no(f,i),label:a,value:m,help:l,options:b,onChange:h,hideLabelFromVision:r,multiple:g,disabled:p})}var R$=c(E(),1),Oqe=10;function k1e(e){let{field:t}=e,{elements:o}=Es({elements:t.elements,getElements:t.getElements});return o.length>=Oqe?(0,R$.jsx)(iV,{...e}):(0,R$.jsx)(uV,{...e})}var fV=c(H(),1);var _1e=c(H(),1),x1e=c(F(),1);var w1e=c(E(),1),{ValidatedInputControl:Aqe}=ro(_1e.privateApis);function Bu({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,type:i,prefix:s,suffix:a,validity:l}){let{label:u,placeholder:d,description:f,getValue:p,setValue:g,isValid:m}=t,h=p({item:e}),b=t.isDisabled({item:e,field:t}),v=(0,x1e.useCallback)(y=>o(g({item:e,value:y})),[e,g,o]);return(0,w1e.jsx)(Aqe,{required:!!m.required,markWhenOptional:n,customValidity:no(m,l),label:u,placeholder:d,value:h??"",help:f,onChange:v,hideLabelFromVision:r,type:i,prefix:s,suffix:a,disabled:b,pattern:m.pattern?m.pattern.constraint:void 0,minLength:m.minLength?m.minLength.constraint:void 0,maxLength:m.maxLength?m.maxLength.constraint:void 0})}var dV=c(E(),1);function C1e({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){return(0,dV.jsx)(Bu,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i,type:"email",prefix:(0,dV.jsx)(fV.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,dV.jsx)(fV.Icon,{icon:DF})})})}var mV=c(H(),1);var pV=c(E(),1);function E1e({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){return(0,pV.jsx)(Bu,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i,type:"tel",prefix:(0,pV.jsx)(mV.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,pV.jsx)(mV.Icon,{icon:xx})})})}var hV=c(H(),1);var gV=c(E(),1);function T1e({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){return(0,gV.jsx)(Bu,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i,type:"url",prefix:(0,gV.jsx)(hV.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,gV.jsx)(hV.Icon,{icon:Ji})})})}var mf=c(H(),1),$E=c(F(),1),bV=c(G(),1);var ng=c(E(),1),{ValidatedNumberControl:Lqe}=ro(mf.privateApis);function R1e(e){if(e===""||e===void 0)return"";let t=Number(e);return Number.isFinite(t)?t:""}function Mqe({value:e,onChange:t,hideLabelFromVision:o,step:r}){let[n="",i=""]=e,s=(0,$E.useCallback)(l=>t([R1e(l),i]),[t,i]),a=(0,$E.useCallback)(l=>t([n,R1e(l)]),[t,n]);return(0,ng.jsx)(mf.BaseControl,{help:(0,bV.__)("The max. value must be greater than the min. value."),children:(0,ng.jsxs)(mf.Flex,{direction:"row",gap:4,children:[(0,ng.jsx)(mf.__experimentalNumberControl,{label:(0,bV.__)("Min."),value:n,max:i?Number(i)-r:void 0,onChange:s,hideLabelFromVision:o,step:r}),(0,ng.jsx)(mf.__experimentalNumberControl,{label:(0,bV.__)("Max."),value:i,min:n?Number(n)+r:void 0,onChange:a,hideLabelFromVision:o,step:r})]})})}function yV({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,operator:i,validity:s}){let a=t.format?.decimals??0,l=Math.pow(10,Math.abs(a)*-1),{label:u,description:d,getValue:f,setValue:p,isValid:g}=t,m=f({item:e})??"",h=t.isDisabled({item:e,field:t}),b=(0,$E.useCallback)(y=>{o(p({item:e,value:["",void 0].includes(y)?void 0:Number(y)}))},[e,o,p]),v=(0,$E.useCallback)(y=>{o(p({item:e,value:y}))},[e,o,p]);if(i===Hi){let y=["",""];return Array.isArray(m)&&m.length===2&&m.every(k=>typeof k=="number"||k==="")&&(y=m),(0,ng.jsx)(Mqe,{value:y,onChange:v,hideLabelFromVision:r,step:l})}return(0,ng.jsx)(Lqe,{required:!!g.required,markWhenOptional:n,customValidity:no(g,s),label:u,help:d,value:m,onChange:b,hideLabelFromVision:r,step:l,min:g.min?g.min.constraint:void 0,max:g.max?g.max.constraint:void 0,disabled:h})}var B1e=c(E(),1);function P1e(e){return(0,B1e.jsx)(yV,{...e})}var I1e=c(E(),1);function O1e(e){return(0,I1e.jsx)(yV,{...e})}var vV=c(H(),1),A1e=c(F(),1);var B$=c(E(),1),{ValidatedRadioControl:Nqe}=ro(vV.privateApis);function L1e({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{label:s,description:a,getValue:l,setValue:u,isValid:d}=t,f=t.isDisabled({item:e,field:t}),{elements:p,isLoading:g}=Es({elements:t.elements,getElements:t.getElements}),m=l({item:e}),h=(0,A1e.useCallback)(b=>o(u({item:e,value:b})),[e,o,u]);return g?(0,B$.jsx)(vV.Spinner,{}):(0,B$.jsx)(Nqe,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:no(d,i),label:s,help:a,onChange:h,options:p,selected:m,hideLabelFromVision:r,disabled:f})}var P$=c(F(),1);var M1e=c(E(),1);function N1e({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,config:i,validity:s}){let{prefix:a,suffix:l}=i||{};return(0,M1e.jsx)(Bu,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:s,prefix:a?(0,P$.createElement)(a):void 0,suffix:l?(0,P$.createElement)(l):void 0})}var D1e=c(H(),1),V1e=c(F(),1);var F1e=c(E(),1),{ValidatedToggleControl:Dqe}=ro(D1e.privateApis);function z1e({field:e,onChange:t,data:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{label:s,description:a,getValue:l,setValue:u,isValid:d}=e,f=e.isDisabled({item:o,field:e}),p=(0,V1e.useCallback)(()=>{t(u({item:o,value:!l({item:o})}))},[t,u,o,l]);return(0,F1e.jsx)(Dqe,{required:!!d.required,markWhenOptional:n,customValidity:no(d,i),hidden:r,label:s,help:a,checked:l({item:o}),onChange:p,disabled:f})}var j1e=c(H(),1),H1e=c(F(),1);var U1e=c(E(),1),{ValidatedTextareaControl:Vqe}=ro(j1e.privateApis);function G1e({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,config:i,validity:s}){let{rows:a=4}=i||{},l=t.isDisabled({item:e,field:t}),{label:u,placeholder:d,description:f,setValue:p,isValid:g}=t,m=t.getValue({item:e}),h=(0,H1e.useCallback)(b=>o(p({item:e,value:b})),[e,o,p]);return(0,U1e.jsx)(Vqe,{required:!!g.required,markWhenOptional:n,customValidity:no(g,s),label:u,placeholder:d,value:m??"",help:f,onChange:h,rows:a,disabled:l,minLength:g.minLength?g.minLength.constraint:void 0,maxLength:g.maxLength?g.maxLength.constraint:void 0,__next40pxDefaultSize:!0,hideLabelFromVision:r})}var Z1e=c(F(),1);var sg=c(H(),1),ty=c(fe(),1),Sr=c(F(),1),kV=c(jo(),1);var Fqe=[];function W1e({allowedFormats:e,disableFormats:t}){return t?Fqe:e}var SV=c(jo(),1),$1e=c(E(),1),K1e=c(le(),1),zqe={};function jqe({onChange:e,onFocus:t,value:o,forwardedRef:r,settings:n,isVisible:i}){let{name:s,edit:a}=n;if(!a)return null;let l=(0,SV.getActiveFormat)(o,s),u=l!==void 0,d=(0,SV.getActiveObject)(o),f=d!==void 0&&d.type===s;return(0,$1e.jsx)(a,{isActive:u,isVisible:i,activeAttributes:u?l.attributes||{}:{},isObjectActive:f,activeObjectAttributes:f?d.attributes||{}:{},value:o,onChange:e,onFocus:t,contentRef:r,context:zqe},s)}function Y1e({formatTypes:e,...t}){return e.map(o=>(0,K1e.createElement)(jqe,{settings:o,...t,key:o.name}))}var ig=c(E(),1),{ValidatedContentEditableControl:Hqe,withIgnoreIMEEvents:Uqe}=ro(sg.privateApis),{useRichText:Gqe,KeyboardShortcutContext:Wqe,InputEventContext:$qe,shortcutsListener:Kqe,inputEventsListener:Yqe}=ro(kV.privateApis),qqe=[];function q1e({label:e,value:t,onChange:o,placeholder:r,id:n,clientId:i,className:s,hideLabelFromVision:a,help:l,disabled:u,required:d,markWhenOptional:f,customValidity:p,allowedFormats:g,disableFormats:m,withoutInteractiveFormatting:h,preserveWhiteSpace:b,disableLineBreaks:v,focusOnMount:y,completers:k=qqe}){let[S,_]=(0,Sr.useState)({start:void 0,end:void 0}),[x,w]=(0,Sr.useState)(!1),T=(0,Sr.useRef)(void 0),B=(0,Sr.useRef)(new Set),R=(0,Sr.useRef)(new Set),A=(0,Sr.useRef)(null),[O,P]=(0,Sr.useState)(null),L=(0,ty.useRefEffect)(he=>{P(he.ownerDocument.body)},[]),M=(0,Sr.useRef)(),z=(0,Sr.useRef)(void 0);(0,Sr.useEffect)(()=>()=>{clearTimeout(M.current),z.current?.()},[]);function V(he){let ye=he.activeElement;return!!(ye&&(T.current?.contains(ye)||A.current?.contains(ye)))}function I(he){z.current?.();function ye(){clearTimeout(M.current),M.current=setTimeout(()=>{V(he)||(z.current?.(),w(!1))},0)}he.addEventListener("focusout",ye),z.current=()=>{he.removeEventListener("focusout",ye),z.current=void 0}}function N(){clearTimeout(M.current),z.current?.(),w(!0)}function D(he){clearTimeout(M.current);let{ownerDocument:ye}=he.currentTarget;M.current=setTimeout(()=>{if(V(ye)){I(ye);return}w(!1)},0)}let j=W1e({allowedFormats:g,disableFormats:m}),{value:Y,onChange:X,ref:ee,formatTypes:J,getValue:$}=Gqe({value:t,onChange:o,selectionStart:S.start,selectionEnd:S.end,onSelectionChange:(he,ye)=>_({start:he,end:ye}),__unstableIsSelected:x,preserveWhiteSpace:!!b,placeholder:r,__unstableDisableFormats:m,allowedFormats:j,withoutInteractiveFormatting:h,__unstableFormatTypeHandlerContext:(0,Sr.useMemo)(()=>({richTextIdentifier:n,blockClientId:i}),[n,i])});function q(){T.current?.focus()}let K=(0,Sr.useRef)({keyboardShortcuts:R,inputEvents:B}),Q=(0,Sr.useRef)({formatTypes:J,getValue:$,onChange:X});(0,Sr.useInsertionEffect)(()=>{Q.current={formatTypes:J,getValue:$,onChange:X}});let re=(0,ty.useRefEffect)(he=>{if(u)return;let ye=Uqe(_e=>{if(_e.key!=="Enter"||_e.defaultPrevented||_e.metaKey||_e.ctrlKey||(_e.preventDefault(),v))return;let{getValue:we,onChange:ie}=Q.current,oe=we();ie((0,kV.insert)(oe,`
`,oe.start??oe.text.length,oe.end??oe.text.length))});return he.addEventListener("keydown",ye),()=>he.removeEventListener("keydown",ye)},[v,u]),se=(0,ty.useRefEffect)(he=>{if(!x)return;let ye=Kqe(K)(he),_e=Yqe(K)(he);function we(ie){if(ie.inputType!=="insertText"&&ie.type!=="compositionend")return;let{formatTypes:oe,getValue:Ae,onChange:me}=Q.current,xe=Ae(),nt=oe.reduce((ut,{__unstableInputRule:it})=>it?it(ut):ut,xe);nt!==xe&&me({...nt,activeFormats:xe.activeFormats})}return he.addEventListener("input",we),he.addEventListener("compositionend",we),()=>{ye(),_e(),he.removeEventListener("input",we),he.removeEventListener("compositionend",we)}},[x]),te=(0,Sr.useRef)(null),{ref:ne,"aria-activedescendant":de,"aria-autocomplete":Se,...Ee}=(0,sg.__unstableUseAutocompleteProps)({completers:k,record:Y,onChange:X,onReplace:()=>{},contentRef:te}),ve={...Ee,"aria-activedescendant":de??void 0,"aria-autocomplete":Se},be=(0,ty.useRefEffect)(he=>{y&&!u&&he.focus()},[y,u]),ge=(0,ty.useMergeRefs)([ee,T,se,re,be,L,ne]);return(0,ig.jsxs)(sg.SlotFillProvider,{children:[(0,ig.jsx)(Hqe,{label:e,id:n,className:W("dataviews-controls__richtext",s),placeholder:r,hideLabelFromVision:a,help:l,disabled:u,required:d,markWhenOptional:f,customValidity:p,value:Y.text,"aria-multiline":!v,...ve,ref:ge,onFocus:N,onBlur:D}),x&&!u&&(0,ig.jsx)(Wqe.Provider,{value:R,children:(0,ig.jsx)($qe.Provider,{value:B,children:(0,ig.jsx)(Y1e,{value:Y,onChange:X,onFocus:q,formatTypes:J,forwardedRef:T,isVisible:!0})})}),O&&(0,Sr.createPortal)((0,ig.jsx)(sg.Popover.Slot,{ref:A}),O)]})}var X1e=c(E(),1);function Q1e({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,config:i,validity:s}){let{className:a,clientId:l,allowedFormats:u,disableFormats:d,withoutInteractiveFormatting:f,preserveWhiteSpace:p,disableLineBreaks:g}=i||{},m=t.isDisabled({item:e,field:t}),{label:h,placeholder:b,description:v,id:y,setValue:k,isValid:S}=t,_=t.getValue({item:e})??"",x=(0,Z1e.useCallback)(w=>o(k({item:e,value:w})),[e,o,k]);return(0,X1e.jsx)(q1e,{label:h,value:_,onChange:x,placeholder:b,id:y,hideLabelFromVision:r,help:v,disabled:m,required:!!S.required,markWhenOptional:n,customValidity:no(S,s),className:a,clientId:l,allowedFormats:u,disableFormats:d,withoutInteractiveFormatting:f,preserveWhiteSpace:p,disableLineBreaks:g})}var I_=c(H(),1),J1e=c(F(),1);var _V=c(E(),1),{ValidatedToggleGroupControl:Zqe}=ro(I_.privateApis);function eTe({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{getValue:s,setValue:a,isValid:l}=t,u=t.isDisabled({item:e,field:t}),d=s({item:e}),f=(0,J1e.useCallback)(h=>o(a({item:e,value:h})),[e,o,a]),{elements:p,isLoading:g}=Es({elements:t.elements,getElements:t.getElements});if(g)return(0,_V.jsx)(I_.Spinner,{});if(p.length===0)return null;let m=p.find(h=>h.value===d);return(0,_V.jsx)(Zqe,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:no(l,i),isBlock:!0,label:t.label,help:m?.description||t.description,onChange:f,value:d,hideLabelFromVision:r,children:p.map(h=>(0,_V.jsx)(I_.__experimentalToggleGroupControlOption,{label:h.label,value:h.value,disabled:u},h.value))})}var xV=c(H(),1),wV=c(F(),1);var KE=c(E(),1),{ValidatedFormTokenField:Xqe}=ro(xV.privateApis);function tTe({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{label:s,placeholder:a,description:l,getValue:u,setValue:d,isValid:f}=t,p=u({item:e}),g=t.isDisabled({item:e,field:t}),{elements:m,isLoading:h}=Es({elements:t.elements,getElements:t.getElements}),b=(0,wV.useMemo)(()=>Array.isArray(p)?p.map(y=>m?.find(S=>S.value===y)||{value:y,label:y}):[],[p,m]),v=(0,wV.useCallback)(y=>{let k=y.map(S=>typeof S=="object"&&"value"in S?S.value:S);o(d({item:e,value:k}))},[o,d,e]);return h?(0,KE.jsx)(xV.Spinner,{}):(0,KE.jsx)(Xqe,{required:!!f?.required,markWhenOptional:n,customValidity:no(f,i),label:r?void 0:s,value:b,onChange:v,placeholder:a,suggestions:m?.map(y=>y.value),disabled:g,__experimentalValidateInput:y=>t.isValid?.elements&&m?m.some(k=>k.value===y||k.label===y):!0,__experimentalExpandOnFocus:m&&m.length>0,help:l??(t.isValid?.elements?"":void 0),displayTransform:y=>typeof y=="object"&&"label"in y?y.label:typeof y=="string"&&m&&m.find(S=>S.value===y)?.label||y,__experimentalRenderItem:({item:y})=>{if(typeof y=="string"&&m){let k=m.find(S=>S.value===y);return(0,KE.jsx)("span",{children:k?.label||y})}return(0,KE.jsx)("span",{children:y})}})}var Ts=c(H(),1),I$=c(F(),1),oTe=c(G(),1);var gf=c(E(),1),{ValidatedInputControl:Qqe}=ro(Ts.privateApis),Jqe=({color:e,onColorChange:t,disabled:o})=>{let r=e&&Bo(e).isValid()?e:"#ffffff";return(0,gf.jsx)(Ts.Dropdown,{className:"dataviews-controls__color-picker-dropdown",popoverProps:{resize:!1},renderToggle:({onToggle:n})=>(0,gf.jsx)(Ts.Button,{onClick:n,"aria-label":(0,oTe.__)("Open color picker"),size:"small",disabled:o,accessibleWhenDisabled:!0,icon:()=>(0,gf.jsx)(Ts.ColorIndicator,{colorValue:r})}),renderContent:()=>(0,gf.jsx)(Ts.__experimentalDropdownContentWrapper,{paddingSize:"none",children:(0,gf.jsx)(Ts.ColorPicker,{color:r,onChange:t,enableAlpha:!0})})})};function rTe({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{label:s,placeholder:a,description:l,setValue:u,isValid:d}=t,f=t.isDisabled({item:e,field:t}),p=t.getValue({item:e})||"",g=(0,I$.useCallback)(h=>{o(u({item:e,value:h}))},[e,o,u]),m=(0,I$.useCallback)(h=>{o(u({item:e,value:h||""}))},[e,o,u]);return(0,gf.jsx)(Qqe,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:no(d,i),label:s,placeholder:a,value:p,help:l,onChange:m,hideLabelFromVision:r,type:"text",disabled:f,prefix:(0,gf.jsx)(Ts.__experimentalInputControlPrefixWrapper,{variant:"control",children:(0,gf.jsx)(Jqe,{color:p,onColorChange:g,disabled:f})})})}var EV=c(H(),1),TV=c(F(),1),O$=c(G(),1);var CV=c(E(),1);function nTe({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let[s,a]=(0,TV.useState)(!1),l=t.isDisabled({item:e,field:t}),u=(0,TV.useCallback)(()=>{a(d=>!d)},[]);return(0,CV.jsx)(Bu,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i,type:s?"text":"password",suffix:(0,CV.jsx)(EV.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,CV.jsx)(EV.Button,{icon:s?vl:Vg,onClick:u,size:"small",label:s?(0,O$.__)("Hide password"):(0,O$.__)("Show password"),disabled:l,accessibleWhenDisabled:!0})})})}function RV(e){return Array.isArray(e.elements)&&e.elements.length>0||typeof e.getElements=="function"}var sTe=c(E(),1),iTe={adaptiveSelect:k1e,array:tTe,checkbox:f1e,color:rTe,combobox:iV,datetime:h1e,date:v1e,email:C1e,telephone:E1e,url:T1e,integer:P1e,number:O1e,password:nTe,radio:L1e,select:uV,text:N1e,toggle:z1e,textarea:G1e,richtext:Q1e,toggleGroup:eTe};function eZe(e){return e&&typeof e=="object"&&typeof e.control=="string"}function tZe(e){let{control:t,...o}=e,r=BV(t);return r===null?null:function(i){return(0,sTe.jsx)(r,{...i,config:o})}}function aTe(e,t){return typeof e.Edit=="function"?e.Edit:typeof e.Edit=="string"?BV(e.Edit):eZe(e.Edit)?tZe(e.Edit):RV(e)&&e.type!=="array"?BV("adaptiveSelect"):t===null?null:BV(t)}function BV(e){return Object.keys(iTe).includes(e)?iTe[e]:null}function oZe(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 lTe=oZe;var rZe=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},cTe=rZe;var nZe=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},uTe=nZe;var fTe=c(G(),1);function PV({item:e,field:t}){let{elements:o,isLoading:r}=Es({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 dTe=c(E(),1);function kr({item:e,field:t}){return t.hasElements?(0,dTe.jsx)(PV,{item:e,field:t}):t.getValueFormatted({item:e,field:t})}var Pu=(e,t,o)=>o==="asc"?e.localeCompare(t):t.localeCompare(e);function _r(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)}function Iu(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 Ou(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 Au(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 Ro(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 iZe({item:e,field:t}){return t.getValue({item:e})}var Wi=iZe;var sZe=/^[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 aZe(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)&&!sZe.test(o)?(0,fTe.__)("Value must be a valid email address."):null}var pTe={type:"email",render:kr,Edit:"email",sort:Pu,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ko,Yo],validOperators:[sr,ar,Cu,Eu,Tu,Ko,Yo,ui,di],format:{},getValueFormatted:Wi,validate:{required:_r,pattern:Au,minLength:Iu,maxLength:Ou,elements:Ro,custom:aZe}};var mTe=c(G(),1);var O_=(e,t,o)=>o==="asc"?e-t:t-e;function IV(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 OV(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 gTe={separatorThousand:","};function lZe({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=gTe: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 cZe(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)&&!Number.isInteger(o)?(0,mTe.__)("Value must be an integer."):null}var hTe={type:"integer",render:kr,Edit:"integer",sort:O_,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[sr,ar,Wm,$m,Km,Ym,Hi],validOperators:[sr,ar,Wm,$m,Km,Ym,Hi,Ko,Yo,ui,di],format:gTe,getValueFormatted:lZe,validate:{required:_r,min:IV,max:OV,elements:Ro,custom:cZe}};var bTe=c(G(),1);var yTe={separatorThousand:",",separatorDecimal:".",decimals:2};function uZe({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=yTe:r=t.format;let{separatorThousand:n,separatorDecimal:i,decimals:s}=r,a=o.toFixed(s),[l,u]=a.split("."),d=n?l.replace(/\B(?=(\d{3})+(?!\d))/g,n):l;return s===0?d:d+i+u}function dZe(e){return e===""||e===void 0||e===null}function fZe(e,t){let o=t.getValue({item:e});return!dZe(o)&&!Number.isFinite(o)?(0,bTe.__)("Value must be a number."):null}var vTe={type:"number",render:kr,Edit:"number",sort:O_,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[sr,ar,Wm,$m,Km,Ym,Hi],validOperators:[sr,ar,Wm,$m,Km,Ym,Hi,Ko,Yo,ui,di],format:yTe,getValueFormatted:uZe,validate:{required:_r,min:IV,max:OV,elements:Ro,custom:fZe}};var STe={type:"text",render:kr,Edit:"text",sort:Pu,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ko,Yo],validOperators:[sr,ar,Cu,Eu,Tu,Ko,Yo,ui,di],format:{},getValueFormatted:Wi,validate:{required:_r,pattern:Au,minLength:Iu,maxLength:Ou,elements:Ro}};var oy=c(du(),1);var _Te=c(du(),1);function kTe(e){if(!e||!ff(new Date(e)))return null;let t=(0,_Te.getDate)(e);return t&&ff(t)?t:null}function xTe(e,t,o){let r=t.isValid[o]?.constraint;if(typeof r!="string")return!1;let n=t.getValue({item:e}),i=Array.isArray(n)?n[o==="min"?0:n.length-1]:n;if(i==null||i==="")return!0;let s=kTe(r),a=kTe(String(i));return!!s&&!!a&&(o==="min"?a.getTime()>=s.getTime():a.getTime()<=s.getTime())}function AV(e,t){return xTe(e,t,"min")}function LV(e,t){return xTe(e,t,"max")}var wTe={datetime:(0,oy.getSettings)().formats.datetime,weekStartsOn:(0,oy.getSettings)().l10n.startOfWeek};function pZe({item:e,field:t}){let o=t.getValue({item:e});if(["",void 0,null].includes(o))return"";let r;return t.type!=="datetime"?r=wTe:r=t.format,(0,oy.dateI18n)(r.datetime,(0,oy.getDate)(o))}var mZe=(e,t,o)=>{let r=new Date(e).getTime(),n=new Date(t).getTime();return o==="asc"?r-n:n-r},CTe={type:"datetime",render:kr,Edit:"datetime",sort:mZe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Jm,eg,qm,Zm,Xm,Qm,Ui,Cs],validOperators:[Jm,eg,qm,Zm,Xm,Qm,Ui,Cs],format:wTe,getValueFormatted:pZe,validate:{required:_r,elements:Ro,min:AV,max:LV}};var ry=c(du(),1);var ETe={date:(0,ry.getSettings)().formats.date,weekStartsOn:(0,ry.getSettings)().l10n.startOfWeek};function gZe({item:e,field:t}){let o=t.getValue({item:e});if(["",void 0,null].includes(o))return"";let r;return t.type!=="date"?r=ETe:r=t.format,(0,ry.dateI18n)(r.date,(0,ry.getDate)(o))}var hZe=(e,t,o)=>{let r=new Date(e).getTime(),n=new Date(t).getTime();return o==="asc"?r-n:n-r},TTe={type:"date",render:kr,Edit:"date",sort:hZe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Jm,eg,qm,Zm,Xm,Qm,Ui,Cs,Hi],validOperators:[Jm,eg,qm,Zm,Xm,Qm,Ui,Cs,Hi],format:ETe,getValueFormatted:gZe,validate:{required:_r,elements:Ro,min:AV,max:LV}};var MV=c(G(),1);function RTe(e,t){return t.getValue({item:e})===!0}function bZe({item:e,field:t}){let o=t.getValue({item:e});return o===!0?(0,MV.__)("True"):o===!1?(0,MV.__)("False"):""}function yZe(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)&&![!0,!1].includes(o)?(0,MV.__)("Value must be true, false, or undefined"):null}var vZe=(e,t,o)=>{let r=!!e;return r===!!t?0:o==="asc"?r?1:-1:r?-1:1},BTe={type:"boolean",render:kr,Edit:"checkbox",sort:vZe,validate:{required:RTe,elements:Ro,custom:yZe},enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[sr,ar],validOperators:[sr,ar],format:{},getValueFormatted:bZe};var PTe={type:"media",render:()=>null,Edit:null,sort:()=>0,enableSorting:!1,enableGlobalSearch:!1,defaultOperators:[],validOperators:[],format:{},getValueFormatted:Wi,validate:{}};var A$=c(G(),1);function ITe(e,t){let o=t.getValue({item:e});return Array.isArray(o)&&o.length>0&&o.every(r=>![void 0,"",null].includes(r))}function OTe({item:e,field:t}){let o=t.getValue({item:e});return(Array.isArray(o)?o:[]).join(", ")}function SZe({item:e,field:t}){return OTe({item:e,field:t})}function kZe(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)&&!Array.isArray(o)?(0,A$.__)("Value must be an array."):o.every(r=>typeof r=="string")?null:(0,A$.__)("Every value must be a string.")}var _Ze=(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)},ATe={type:"array",render:SZe,Edit:"array",sort:_Ze,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ko,Yo],validOperators:[Ko,Yo,ui,di],format:{},getValueFormatted:OTe,validate:{required:ITe,elements:Ro,custom:kZe}};function xZe({item:e,field:t}){return t.getValue({item:e})?"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022":""}var LTe={type:"password",render:kr,Edit:"password",sort:()=>0,enableSorting:!1,enableGlobalSearch:!1,defaultOperators:[],validOperators:[],format:{},getValueFormatted:xZe,validate:{required:_r,pattern:Au,minLength:Iu,maxLength:Ou,elements:Ro}};var MTe={type:"telephone",render:kr,Edit:"telephone",sort:Pu,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ko,Yo],validOperators:[sr,ar,Cu,Eu,Tu,Ko,Yo,ui,di],format:{},getValueFormatted:Wi,validate:{required:_r,pattern:Au,minLength:Iu,maxLength:Ou,elements:Ro}};var NTe=c(G(),1);var A_=c(E(),1);function wZe({item:e,field:t}){if(t.hasElements)return(0,A_.jsx)(PV,{item:e,field:t});let o=Wi({item:e,field:t});return!o||!Bo(o).isValid()?o:(0,A_.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,A_.jsx)("div",{style:{width:"16px",height:"16px",borderRadius:"50%",backgroundColor:o,border:"1px solid #ddd",flexShrink:0}}),(0,A_.jsx)("span",{children:o})]})}function CZe(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)&&!Bo(o).isValid()?(0,NTe.__)("Value must be a valid color."):null}var EZe=(e,t,o)=>{let r=Bo(e),n=Bo(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},DTe={type:"color",render:wZe,Edit:"color",sort:EZe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ko,Yo],validOperators:[sr,ar,Ko,Yo],format:{},getValueFormatted:Wi,validate:{required:_r,elements:Ro,custom:CZe}};var VTe={type:"url",render:kr,Edit:"url",sort:Pu,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ko,Yo],validOperators:[sr,ar,Cu,Eu,Tu,Ko,Yo,ui,di],format:{},getValueFormatted:Wi,validate:{required:_r,pattern:Au,minLength:Iu,maxLength:Ou,elements:Ro}};var TZe=(e,t,o)=>typeof e=="number"&&typeof t=="number"?O_(e,t,o):Pu(e,t,o),FTe={render:kr,Edit:null,sort:TZe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[sr,ar],validOperators:l1e(),format:{},getValueFormatted:Wi,validate:{required:_r,elements:Ro}};function RZe(e){return e==="integer"||e==="number"}function BZe(e){return e==="date"||e==="datetime"}function zTe(e,t,o){let r=t.validate[o];if(r&&(typeof e=="number"&&RZe(t.type)||typeof e=="string"&&BZe(t.type)))return{constraint:e,validate:r}}function jTe(e,t){let o=e.isValid,r;o?.required===!0&&t.validate.required!==void 0&&(r={constraint:!0,validate:t.validate.required});let n;(o?.elements===!0||o?.elements===void 0&&(e.elements||e.getElements))&&t.validate.elements!==void 0&&(n={constraint:!0,validate:t.validate.elements});let i=zTe(o?.min,t,"min"),s=zTe(o?.max,t,"max"),a=o?.minLength,l;typeof a=="number"&&t.validate.minLength!==void 0&&(l={constraint:a,validate:t.validate.minLength});let u=o?.maxLength,d;typeof u=="number"&&t.validate.maxLength!==void 0&&(d={constraint:u,validate:t.validate.maxLength});let f=o?.pattern,p;f!==void 0&&t.validate.pattern!==void 0&&(p={constraint:f,validate:t.validate.pattern});let g=o?.custom??t.validate.custom;return{required:r,elements:n,min:i,max:s,minLength:l,maxLength:d,pattern:p,custom:g}}function HTe(e){return e.validOperators.reduce((t,o)=>{let r=a1e(o);return r?.filter&&(t[o]=r.filter),t},{})}function PZe(e,t){return{...t.format,...e.format}}var UTe=PZe;function IZe(e){let t=[pTe,hTe,vTe,STe,CTe,TTe,BTe,PTe,ATe,LTe,MTe,DTe,VTe].find(o=>o?.type===e);return t||FTe}function YE(e){return e.map(t=>{let o=IZe(t.type),r=t.getValue||cTe(t.id),n=function(i,s,a){let l=r({item:i}),u=r({item:s});return t.sort?t.sort(l,u,a):o.sort(l,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||uTe(t.id),elements:t.elements,getElements:t.getElements,hasElements:RV(t),isVisible:t.isVisible,isDisabled:typeof t.isDisabled=="function"?t.isDisabled:()=>!!t.isDisabled,enableHiding:t.enableHiding??!0,readOnly:t.readOnly??!1,type:o.type,render:t.render??o.render,Edit:aTe(t,o.Edit),sort:n,enableSorting:t.enableSorting??o.enableSorting,enableGlobalSearch:t.enableGlobalSearch??o.enableGlobalSearch,isValid:jTe(t,o),filterBy:lTe(t,o.defaultOperators,o.validOperators),filter:HTe(o),format:UTe(t,o),getValueFormatted:t.getValueFormatted??o.getValueFormatted}})}var F$=c(F(),1);var GTe=c(F(),1),WTe=c(E(),1),L$=(0,GTe.createContext)({fields:[]});L$.displayName="DataFormContext";function $Te({fields:e,children:t}){return(0,WTe.jsx)(L$.Provider,{value:{fields:e},children:t})}var fl=L$;var WV=c(F(),1);var DV=c(F(),1),ZE=c(H(),1);var qE=c(G(),1),mi={type:"regular",labelPosition:"top"},OZe=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 KTe(e){let t=mi;if(e?.type==="regular")t={type:"regular",labelPosition:e?.labelPosition??"top"};else if(e?.type==="panel"){let o=e.summary??[],r=Array.isArray(o)?o:[o],n=e?.openAs,i;typeof n=="object"&&n.type==="modal"?i={type:"modal",applyLabel:n.applyLabel?.trim()||(0,qE.__)("Apply"),cancelLabel:n.cancelLabel?.trim()||(0,qE.__)("Cancel")}:n==="modal"?i={type:"modal",applyLabel:(0,qE.__)("Apply"),cancelLabel:(0,qE.__)("Cancel")}:i={type:"dropdown"},t={type:"panel",labelPosition:e?.labelPosition??"side",openAs:i,summary:r,editVisibility:e?.editVisibility??"on-hover"}}else if(e?.type==="card")if(e.withHeader===!1)t={type:"card",withHeader:!1,isOpened:!0,summary:[],isCollapsible:!1};else{let o=e.summary??[];t={type:"card",withHeader:!0,isOpened:typeof e.isOpened=="boolean"?e.isOpened:!0,summary:OZe(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 YTe(e){let t=KTe(e?.layout),o=(e.fields??[]).map(r=>{if(typeof r=="string")return{id:r,layout:t};let n=r.layout?KTe(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:YTe({fields:r.children,layout:mi}).fields}}});return{layout:t,fields:o}}var NV=YTe;var qo=c(E(),1);function AZe({title:e}){return(0,qo.jsx)(Xe,{direction:"column",className:"dataforms-layouts-regular__header",gap:"lg",children:(0,qo.jsx)(Xe,{direction:"row",align:"center",children:(0,qo.jsx)(ZE.__experimentalHeading,{level:2,size:13,children:e})})})}function qTe({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{fields:s}=(0,DV.useContext)(fl),a=t.layout,l=(0,DV.useMemo)(()=>({layout:mi,fields:t.children?t.children:[]}),[t]);if(t.children)return(0,qo.jsxs)(qo.Fragment,{children:[!r&&t.label&&(0,qo.jsx)(AZe,{title:t.label}),(0,qo.jsx)(Rs,{data:e,form:l,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,qo.jsxs)(Xe,{direction:"row",className:"dataforms-layouts-regular__field",gap:"sm",children:[(0,qo.jsx)("div",{className:W("dataforms-layouts-regular__field-label",`dataforms-layouts-regular__field-label--label-position-${u}`),children:(0,qo.jsx)(ZE.BaseControl.VisualLabel,{children:d.label})}),(0,qo.jsx)("div",{className:"dataforms-layouts-regular__field-control",children:d.readOnly===!0?(0,qo.jsx)(d.render,{item:e,field:d}):(0,qo.jsx)(d.Edit,{data:e,field:d,onChange:o,hideLabelFromVision:!0,markWhenOptional:n,validity:i},d.id)})]}):(0,qo.jsx)("div",{className:"dataforms-layouts-regular__field",children:d.readOnly===!0?(0,qo.jsx)(qo.Fragment,{children:(0,qo.jsxs)(qo.Fragment,{children:[!r&&u!=="none"&&(0,qo.jsx)(ZE.BaseControl.VisualLabel,{children:d.label}),(0,qo.jsx)(d.render,{item:e,field:d})]})}):(0,qo.jsx)(d.Edit,{data:e,field:d,onChange:o,hideLabelFromVision:u==="none"?!0:r,markWhenOptional:n,validity:i})})}var D$=c(VR(),1),ny=c(H(),1),gc=c(F(),1),jV=c(fe(),1);var VV=c(H(),1),L_=c(G(),1);var tRe=c(fe(),1);var M$=c(F(),1);function LZe(e,t){return W("dataforms-layouts-panel__field-label",`dataforms-layouts-panel__field-label--label-position-${e}`,{"has-error":t})}var ZTe=LZe;var XTe=c(H(),1);var ag=c(E(),1);function MZe(e,t,o){return e?(0,ag.jsxs)(vt.Root,{children:[(0,ag.jsx)(vt.Trigger,{render:(0,ag.jsxs)("span",{className:"dataforms-layouts-panel__field-label-error-content",children:[(0,ag.jsx)(XTe.Icon,{icon:Lg,size:16}),(0,ag.jsxs)(pt,{children:[t,": "]}),o]})}),(0,ag.jsx)(vt.Popup,{children:t})]}):o}var QTe=MZe;function JTe(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=JTe(o);if(r)return r}}var eRe=JTe;var $i=c(E(),1);function XE({data:e,field:t,fieldLabel:o,summaryFields:r,validity:n,touched:i,disabled:s,isOpen:a,onClick:l}){let{labelPosition:u,editVisibility:d}=t.layout,f=eRe(n),p=i&&!!f,g=ZTe(u,p),m=QTe(p,f,o),h=W("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,tRe.useInstanceId)(XE,"dataforms-layouts-panel__field-control"),v=p?(0,L_.sprintf)((0,L_._x)("Edit %s (has errors)","field"),o||""):(0,L_.sprintf)((0,L_._x)("Edit %s","field"),o||""),y=(0,M$.useRef)(null),k=(0,M$.useRef)(null);return(0,$i.jsxs)("div",{ref:y,className:h,onClick:s?void 0:x=>{!a&&x.detail<2&&!k.current?.contains(x.target)&&y.current?.ownerDocument.defaultView?.getSelection()?.toString()||l()},onKeyDown:s?void 0:x=>{x.target===x.currentTarget&&(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),l())},children:[u!=="none"&&(0,$i.jsx)("span",{className:g,children:m}),u==="none"&&p&&(0,$i.jsxs)(vt.Root,{children:[(0,$i.jsx)(vt.Trigger,{render:(0,$i.jsx)("span",{className:"dataforms-layouts-panel__field-label-error-content",role:"img","aria-label":f,children:(0,$i.jsx)(VV.Icon,{icon:Lg,size:16})})}),(0,$i.jsx)(vt.Popup,{children:f})]}),(0,$i.jsx)("span",{id:`${b}`,className:"dataforms-layouts-panel__field-control",children:r.length>1?(0,$i.jsx)("span",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",width:"100%",gap:"2px"},children:r.map(x=>(0,$i.jsx)("span",{style:{width:"100%"},children:(0,$i.jsx)(x.render,{item:e,field:x})},x.id))}):r.map(x=>(0,$i.jsx)(x.render,{item:e,field:x},x.id))}),!s&&(0,$i.jsx)(VV.Button,{ref:k,className:"dataforms-layouts-panel__field-trigger-icon",label:v,icon:Dg,size:"small","aria-expanded":a,"aria-haspopup":"dialog","aria-describedby":`${b}`})]})}var oRe=c(VR(),1),N$=c(wg(),1),Lu=c(F(),1),Ki=c(G(),1);function rRe(e){return e?Object.values(e).every(t=>Object.entries(t).every(([o,r])=>o==="children"&&r&&typeof r=="object"?rRe(r):r.type!=="invalid"&&r.type!=="validating")):!0}function NZe(e,t){let o=NV(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]=YE([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[l]=YE([a]);return{id:s.id,children:[],field:l}}return o.fields.map(n).filter(s=>s!==null)}function M_(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 nRe(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 l=t[a];if(!n[l])return e;n[l]={...n[l]},n=n[l]}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 DZe(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(l=>{if(a===r.current[t.id]){if(!Array.isArray(l)){n(u=>M_(u,{elements:{type:"invalid",message:(0,Ki.__)("Could not validate elements.")}},[...i,t.id]));return}t.field?.isValid.elements&&!t.field.isValid.elements.validate(s,{...t.field,elements:l})?n(u=>M_(u,{elements:{type:"invalid",message:(0,Ki.__)("Value must be one of the elements.")}},[...i,t.id])):n(u=>nRe(u,[...i,t.id],"elements"))}}).catch(l=>{if(a!==r.current[t.id])return;let u;l instanceof Error?u=l.message:u=String(l)||(0,Ki.__)("Unknown error when running elements validation asynchronously."),n(d=>M_(d,{elements:{type:"invalid",message:u}},[...i,t.id]))})}function VZe(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(l=>nRe(l,[...i,t.id],"custom"));return}if(typeof a=="string"){n(l=>M_(l,{custom:{type:"invalid",message:a}},[...i,t.id]));return}n(l=>M_(l,{custom:{type:"invalid",message:(0,Ki.__)("Validation could not be processed.")}},[...i,t.id]))}}).catch(a=>{if(s!==r.current[t.id])return;let l;a instanceof Error?l=a.message:l=String(a)||(0,Ki.__)("Unknown error when running custom validation asynchronously."),n(u=>M_(u,{custom:{type:"invalid",message:l}},[...i,t.id]))})}function iRe(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,Ki.__)("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,Ki.__)("Value is below the minimum.")}};if(t.field?.isValid.max&&!t.field.isValid.max.validate(e,t.field))return{max:{type:"invalid",message:(0,Ki.__)("Value is above the maximum.")}};if(t.field?.isValid.minLength&&!t.field.isValid.minLength.validate(e,t.field))return{minLength:{type:"invalid",message:(0,Ki.__)("Value is too short.")}};if(t.field?.isValid.maxLength&&!t.field.isValid.maxLength.validate(e,t.field))return{maxLength:{type:"invalid",message:(0,Ki.__)("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,Ki.__)("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,oRe.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,Ki.__)("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"&&(DZe(t.field.getElements(),t,o),n.elements={type:"validating",message:(0,Ki.__)("Validating\u2026")}),r instanceof Promise&&(VZe(r,t,o),n.custom={type:"validating",message:(0,Ki.__)("Validating\u2026")}),Object.keys(n).length>0)return n;if(t.children.length>0){let i={};t.children.forEach(a=>{i[a.id]=iRe(e,a,{...o,path:[...o.path,t.id,"children"]})});let s={};return Object.entries(i).forEach(([a,l])=>{l!==void 0&&(s[a]=l)}),Object.keys(s).length===0?void 0:{children:s}}}function sRe(e,t){let o=e?.field?.getValue({item:t});if(e.children.length===0)return o;let r=e.children.map(n=>sRe(n,t));return r?{value:o,children:r}:o}function FZe(e,t,o){let[r,n]=(0,Lu.useState)(),i=(0,Lu.useRef)({}),s=(0,Lu.useRef)({}),a=(0,Lu.useRef)({}),l=(0,Lu.useCallback)(()=>{let u={customCounterRef:i,elementsCounterRef:s,setFormValidity:n,path:[],item:e},d=NZe(o,t);if(d.length===0){n(void 0);return}let f={},p=[];d.forEach(g=>{let m=sRe(g,e);if(a.current.hasOwnProperty(g.id)&&(0,N$.default)(a.current[g.id],m)){p.push(g.id);return}a.current[g.id]=m;let h=iRe(e,g,u);h!==void 0&&(f[g.id]=h)}),n(g=>{let m={...g,...f},h=[...p,...Object.keys(f)];return Object.keys(m).forEach(v=>{m&&!h.includes(v)&&delete m[v]}),Object.keys(m).length===0&&(m=void 0),(0,N$.default)(g,m)?g:m})},[e,t,o]);return(0,Lu.useEffect)(()=>{l()},[l]),{validity:r,isValid:rRe(r)}}var aRe=FZe;var lRe=c(F(),1);function lg(e,t){(0,lRe.useEffect)(()=>{t&&e.current&&e.current.querySelectorAll("input, textarea, select").forEach(r=>{r.reportValidity()})},[t,e])}var cRe=c(F(),1);function zZe(e){return Array.isArray(e)?e.map(t=>typeof t=="string"?t:t.id):[]}var FV=(e,t)=>Array.isArray(e)&&e.length>0?zZe(e).map(r=>t.find(n=>n.id===r)).filter(r=>r!==void 0):[];var jZe=(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 HZe(e){let{fields:t}=(0,cRe.useContext)(fl),o=e.layout,r=FV(o.summary,t),n=jZe(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 zV=HZe;var Yi=c(E(),1);function UZe({data:e,field:t,onChange:o,fieldLabel:r,onClose:n,touched:i}){let{openAs:s}=t.layout,{applyLabel:a,cancelLabel:l}=s,{fields:u}=(0,gc.useContext)(fl),[d,f]=(0,gc.useState)({}),p=(0,gc.useMemo)(()=>(0,D$.default)(e,d,{arrayMerge:(_,x)=>x}),[e,d]),g=(0,gc.useMemo)(()=>({layout:mi,fields:t.children?t.children:[{id:t.id,layout:mi}]}),[t]),m=u.map(_=>({..._,Edit:_.Edit===null?void 0:_.Edit,isValid:{required:_.isValid.required?.constraint,elements:_.isValid.elements?.constraint,min:_.isValid.min?.constraint,max:_.isValid.max?.constraint,pattern:_.isValid.pattern?.constraint,minLength:_.isValid.minLength?.constraint,maxLength:_.isValid.maxLength?.constraint}})),{validity:h}=aRe(p,m,g),b=()=>{o(d),n()},v=_=>{f(x=>(0,D$.default)(x,_,{arrayMerge:(w,T)=>T}))},y=(0,jV.useFocusOnMount)("firstInputElement"),k=(0,gc.useRef)(null),S=(0,jV.useMergeRefs)([y,k]);return lg(k,i),(0,Yi.jsxs)(ny.Modal,{className:"dataforms-layouts-panel__modal",onRequestClose:n,isFullScreen:!1,title:r,size:"medium",children:[(0,Yi.jsx)("div",{ref:S,children:(0,Yi.jsx)(Rs,{data:p,form:g,onChange:v,validity:h,children:(_,x,w,T)=>(0,Yi.jsx)(_,{data:p,field:x,onChange:v,hideLabelFromVision:g.fields.length<2,markWhenOptional:T,validity:w},x.id)})}),(0,Yi.jsxs)(Xe,{direction:"row",className:"dataforms-layouts-panel__modal-footer",gap:"md",children:[(0,Yi.jsx)(ny.__experimentalSpacer,{style:{flex:1}}),(0,Yi.jsx)(ny.Button,{variant:"tertiary",onClick:n,__next40pxDefaultSize:!0,children:l}),(0,Yi.jsx)(ny.Button,{variant:"primary",onClick:b,__next40pxDefaultSize:!0,children:a})]})]})}function GZe({data:e,field:t,onChange:o,validity:r}){let[n,i]=(0,gc.useState)(!1),[s,a]=(0,gc.useState)(!1),{fieldDefinition:l,fieldLabel:u,summaryFields:d}=zV(t);if(!l)return null;let f=()=>{a(!1),i(!0)};return(0,Yi.jsxs)(Yi.Fragment,{children:[(0,Yi.jsx)(XE,{data:e,field:t,fieldLabel:u,summaryFields:d,validity:r,touched:n,disabled:l.readOnly===!0,onClick:()=>a(!0),isOpen:s}),s&&(0,Yi.jsx)(UZe,{data:e,field:t,onChange:o,fieldLabel:u??"",onClose:f,touched:n})]})}var uRe=GZe;var cg=c(H(),1),dRe=c(G(),1),hf=c(F(),1);var fRe=c(fe(),1);var gi=c(E(),1);function WZe({title:e,onClose:t}){return(0,gi.jsx)(Xe,{direction:"column",className:"dataforms-layouts-panel__dropdown-header",gap:"lg",children:(0,gi.jsxs)(Xe,{direction:"row",gap:"sm",align:"center",children:[e&&(0,gi.jsx)(cg.__experimentalHeading,{level:2,size:13,children:e}),(0,gi.jsx)(cg.__experimentalSpacer,{style:{flex:1}}),t&&(0,gi.jsx)(cg.Button,{label:(0,dRe.__)("Close"),icon:Rg,onClick:t,size:"small"})]})})}function $Ze({touched:e,children:t}){let o=(0,hf.useRef)(null);return lg(o,e),(0,gi.jsx)("div",{ref:o,children:t})}function KZe({data:e,field:t,onChange:o,validity:r}){let[n,i]=(0,hf.useState)(!1),[s,a]=(0,hf.useState)(null),l=(0,hf.useMemo)(()=>({anchor:s,placement:"left-start",offset:36,shift:!0}),[s]),[u,d]=(0,fRe.__experimentalUseDialog)({focusOnMount:"firstInputElement"}),f=(0,hf.useMemo)(()=>({layout:mi,fields:t.children?t.children:[{id:t.id,layout:mi}]}),[t]),p=(0,hf.useMemo)(()=>{if(r!==void 0)return t.children?r?.children:{[t.id]:r}},[r,t]),{fieldDefinition:g,fieldLabel:m,summaryFields:h}=zV(t);return g?(0,gi.jsx)("div",{ref:a,className:"dataforms-layouts-panel__field-dropdown-anchor",children:(0,gi.jsx)(cg.Dropdown,{contentClassName:"dataforms-layouts-panel__field-dropdown",popoverProps:l,focusOnMount:!1,onToggle:b=>{b||i(!0)},renderToggle:({isOpen:b,onToggle:v})=>(0,gi.jsx)(XE,{data:e,field:t,fieldLabel:m,summaryFields:h,validity:r,touched:n,disabled:g.readOnly===!0,isOpen:b,onClick:v}),renderContent:({onClose:b})=>(0,gi.jsx)($Ze,{touched:n,children:(0,gi.jsxs)("div",{ref:u,...d,children:[(0,gi.jsx)(WZe,{title:m,onClose:b}),(0,gi.jsx)(Rs,{data:e,form:f,onChange:o,validity:p,children:(v,y,k,S)=>(0,gi.jsx)(v,{data:e,field:y,onChange:o,hideLabelFromVision:(f?.fields??[]).length<2,markWhenOptional:S,validity:k},y.id)})]})})})}):null}var pRe=KZe;var V$=c(E(),1);function mRe({data:e,field:t,onChange:o,validity:r}){return t.layout.openAs.type==="modal"?(0,V$.jsx)(uRe,{data:e,field:t,onChange:o,validity:r}):(0,V$.jsx)(pRe,{data:e,field:t,onChange:o,validity:r})}var Bs=c(F(),1);var HV=c(G(),1),gRe=c(E(),1);function hRe(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+=hRe(r);return t}function UV({validity:e}){let t=hRe(e);return t===0?null:(0,gRe.jsx)(J8,{intent:"high",children:(0,HV.sprintf)((0,HV._n)("%d field needs attention","%d fields need attention",t),t)})}var xr=c(E(),1);function YZe(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 qZe({data:e,fields:t,label:o,layout:r,isOpen:n,touched:i,validity:s}){let l=FV(r.summary,t).filter(f=>YZe(f,r.summary,n)),u=i&&r.isCollapsible,d=l.length>0&&r.withHeader;return(0,xr.jsxs)(Xe,{align:"center",justify:"space-between",className:"dataforms-layouts-card__field-header-content",children:[(0,xr.jsx)($c.Title,{children:o}),(u||d)&&(0,xr.jsxs)(Ih.HeaderDescription,{className:"dataforms-layouts-card__field-header-content-description",children:[u&&(0,xr.jsx)(UV,{validity:s}),d&&(0,xr.jsx)("div",{className:"dataforms-layouts-card__field-summary",children:l.map(f=>(0,xr.jsx)(f.render,{item:e,field:f},f.id))})]})]})}function ZZe({data:e,field:t,form:o,onChange:r,hideLabelFromVision:n,markWhenOptional:i,validity:s,withHeader:a}){if(t.children)return(0,xr.jsxs)(xr.Fragment,{children:[t.description&&(0,xr.jsx)("div",{className:"dataforms-layouts-card__field-description",children:t.description}),(0,xr.jsx)(Rs,{data:e,form:o,onChange:r,validity:s?.children})]});let l=iy("regular")?.component;return l?(0,xr.jsx)(l,{data:e,field:t,onChange:r,hideLabelFromVision:n||a,markWhenOptional:i,validity:s}):null}function bRe({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{fields:s}=(0,Bs.useContext)(fl),a=t.layout,l=(0,Bs.useRef)(null),u=(0,Bs.useMemo)(()=>({layout:mi,fields:t.children??[]}),[t]),{isOpened:d,isCollapsible:f}=a,[p,g]=(0,Bs.useState)(d),[m,h]=(0,Bs.useState)(!1);(0,Bs.useEffect)(()=>{g(d)},[d]);let b=(0,Bs.useCallback)(x=>{x||h(!0),g(x)},[]),v=(0,Bs.useCallback)(()=>{h(!0)},[]);lg(l,(f?p:!0)&&m);let y=t.label,k;if(t.children)k=!!y&&a.withHeader;else{let x=s.find(w=>w.id===t.id);if(!x||!x.Edit)return null;y=x.label,k=!!y&&a.withHeader}let S=(0,xr.jsx)(ZZe,{data:e,field:t,form:u,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i,withHeader:k}),_=(0,xr.jsx)(qZe,{data:e,fields:s,label:y,layout:a,isOpen:f?!!p:!0,touched:m,validity:i});return k&&f?(0,xr.jsxs)(Ih.Root,{className:"dataforms-layouts-card__field",open:p,onOpenChange:b,children:[(0,xr.jsx)(Ih.Header,{children:_}),(0,xr.jsx)(Ih.Content,{ref:l,onBlur:v,children:S})]}):(0,xr.jsxs)($c.Root,{className:"dataforms-layouts-card__field",children:[k&&(0,xr.jsx)($c.Header,{children:_}),(0,xr.jsx)($c.Content,{ref:l,onBlur:v,children:S})]})}var yRe=c(H(),1);var En=c(E(),1);function XZe({title:e}){return(0,En.jsx)(Xe,{direction:"column",className:"dataforms-layouts-row__header",gap:"lg",children:(0,En.jsx)(Xe,{direction:"row",align:"center",children:(0,En.jsx)(yRe.__experimentalHeading,{level:2,size:13,children:e})})})}var QZe=({children:e})=>(0,En.jsx)(En.Fragment,{children:e});function vRe({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let s=t.layout;if(t.children){let l={layout:mi,fields:t.children};return(0,En.jsxs)("div",{className:"dataforms-layouts-row__field",children:[!r&&t.label&&(0,En.jsx)(XZe,{title:t.label}),(0,En.jsx)(Xe,{direction:"row",align:s.alignment,gap:"lg",children:(0,En.jsx)(Rs,{data:e,form:l,onChange:o,validity:i?.children,as:QZe,children:(u,d,f)=>(0,En.jsx)("div",{className:"dataforms-layouts-row__field-control",style:s.styles[d.id],children:(0,En.jsx)(u,{data:e,field:d,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:f})},d.id)})})]})}let a=iy("regular")?.component;return a?(0,En.jsx)(En.Fragment,{children:(0,En.jsx)("div",{className:"dataforms-layouts-row__field-control",children:(0,En.jsx)(a,{data:e,field:t,onChange:o,markWhenOptional:n,validity:i})})}):null}var Ps=c(F(),1),SRe=c(G(),1);var bf=c(E(),1);function kRe({data:e,field:t,onChange:o,validity:r}){let{fields:n}=(0,Ps.useContext)(fl),i=(0,Ps.useRef)(null),s=(0,Ps.useRef)(null),[a,l]=(0,Ps.useState)(!1),[u,d]=(0,Ps.useState)(!1),f=(0,Ps.useMemo)(()=>({layout:mi,fields:t.children??[]}),[t]);(0,Ps.useEffect)(()=>{let b=i.current;if(!b)return;let v=()=>{let y=b.open;y||l(!0),d(y)};return b.addEventListener("toggle",v),()=>{b.removeEventListener("toggle",v)}},[]),lg(s,u&&a);let p=(0,Ps.useCallback)(()=>{l(!0)},[]);if(!t.children)return null;let g=t.layout.summary??"",m=g?n.find(b=>b.id===g):void 0,h;return m&&m.render?h=(0,bf.jsx)(m.render,{item:e,field:m}):h=t.label||(0,SRe.__)("More details"),(0,bf.jsxs)("details",{ref:i,className:"dataforms-layouts-details__details",children:[(0,bf.jsx)("summary",{className:"dataforms-layouts-details__summary",children:(0,bf.jsxs)(Xe,{direction:"row",align:"center",gap:"md",className:"dataforms-layouts-details__summary-content",children:[h,a&&(0,bf.jsx)(UV,{validity:r})]})}),(0,bf.jsx)("div",{ref:s,className:"dataforms-layouts-details__content",onBlur:p,children:(0,bf.jsx)(Rs,{data:e,form:f,onChange:o,validity:r?.children})})]})}var sy=c(E(),1),JZe=[{type:"regular",component:qTe,wrapper:({children:e})=>(0,sy.jsx)(Xe,{direction:"column",className:"dataforms-layouts__wrapper",gap:"lg",children:e})},{type:"panel",component:mRe,wrapper:({children:e})=>(0,sy.jsx)(Xe,{direction:"column",className:"dataforms-layouts__wrapper",gap:"md",children:e})},{type:"card",component:bRe,wrapper:({children:e})=>(0,sy.jsx)(Xe,{direction:"column",className:"dataforms-layouts__wrapper",gap:"xl",children:e})},{type:"row",component:vRe,wrapper:({children:e,layout:t})=>(0,sy.jsx)(Xe,{direction:"column",className:"dataforms-layouts__wrapper",gap:"lg",children:(0,sy.jsx)("div",{className:"dataforms-layouts-row__field",children:(0,sy.jsx)(Xe,{direction:"row",gap:"lg",align:t.alignment,children:e})})})},{type:"details",component:kRe}];function iy(e){return JZe.find(t=>t.type===e)}var GV=c(E(),1),eXe=({children:e})=>(0,GV.jsx)(Xe,{direction:"column",className:"dataforms-layouts__wrapper",gap:"lg",children:e});function Rs({data:e,form:t,onChange:o,validity:r,children:n,as:i}){let{fields:s}=(0,WV.useContext)(fl),a=(0,WV.useMemo)(()=>{let d=s.filter(p=>!!p.isValid?.required).length,f=s.length-d;return d>f},[s]);function l(d){return s.find(f=>f.id===d.id)}let u=i??iy(t.layout.type)?.wrapper??eXe;return(0,GV.jsx)(u,{layout:t.layout,children:t.fields.map(d=>{let f=iy(d.layout.type)?.component;if(!f)return null;let p=d.children?void 0:l(d);return p&&p.isVisible&&!p.isVisible(e)?null:n?n(f,d,r?.[d.id],a):(0,GV.jsx)(f,{data:e,field:d,onChange:o,markWhenOptional:a,validity:r?.[d.id]},d.id)})})}var z$=c(E(),1);function QE({data:e,form:t,fields:o,onChange:r,validity:n}){let i=(0,F$.useMemo)(()=>NV(t),[t]),s=(0,F$.useMemo)(()=>YE(o),[o]);return t.fields?(0,z$.jsx)($Te,{fields:s,children:(0,z$.jsx)(Rs,{data:e,form:i,onChange:r,validity:n})}):null}var dg=c(F(),1),DRe=c(G(),1);var D_=c(H(),1);var j$=c(G(),1);var _Re=c(fe(),1);function N_({isControl:e}={isControl:!1}){return(0,_Re.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:e?35:259}}}var $V=c(E(),1);function xRe({fields:e,visibleFields:t,onToggleField:o}){let{popoverProps:r}=N_();return!e||e.length===0?null:(0,$V.jsx)(D_.DropdownMenu,{icon:Ls,label:(0,j$.__)("Options"),popoverProps:r,toggleProps:{size:"small"},children:({onClose:n})=>(0,$V.jsx)(D_.MenuGroup,{label:(0,j$.__)("Show / Hide"),children:e.map(i=>{let s=t.includes(i.id);return(0,$V.jsx)(D_.MenuItem,{isSelected:s,onClick:()=>{o(i.id),n()},role:"menuitemcheckbox",icon:s?Xi:null,children:i.label},i.id)})})})}var KV=c(H(),1),wRe=c(fe(),1),CRe=c(Z(),1),yf=c(F(),1),ERe=c(jo(),1);var hc=c(E(),1),{useRichText:tXe,KeyboardShortcutContext:oXe,InputEventContext:rXe}=U(ERe.privateApis);function TRe({data:e,field:t,hideLabelFromVision:o,onChange:r,config:n={}}){let i=(0,CRe.useRegistry)(),s=t.getValue({item:e}),a=t.config||{},{clientId:l}=n,[u,d]=(0,yf.useState)({start:void 0,end:void 0}),[f,p]=(0,yf.useState)(!1),g=(0,yf.useRef)(),m=(0,yf.useRef)(new Set),h=(0,yf.useRef)(new Set),b=Hk({allowedFormats:a?.allowedFormats,disableFormats:a?.disableFormats});function v(){g.current?.focus()}let{value:y,getValue:k,onChange:S,ref:_,formatTypes:x}=tXe({value:s,onChange(B){r(t.setValue({item:e,value:B}))},selectionStart:u.start,selectionEnd:u.end,onSelectionChange:(B,R)=>d({start:B,end:R}),__unstableIsSelected:f,preserveWhiteSpace:!!a?.preserveWhiteSpace,placeholder:a?.placeholder,__unstableDisableFormats:a?.disableFormats,allowedFormats:b,withoutInteractiveFormatting:a?.withoutInteractiveFormatting,__unstableFormatTypeHandlerContext:(0,yf.useMemo)(()=>({richTextIdentifier:t.id,blockClientId:l}),[t.id,l])}),{baseControlProps:w,controlProps:T}=(0,KV.useBaseControlProps)({hideLabelFromVision:o??t.hideLabelFromVision,label:t.label});return(0,hc.jsxs)(hc.Fragment,{children:[f&&(0,hc.jsx)(oXe.Provider,{value:h,children:(0,hc.jsx)(rXe.Provider,{value:m,children:(0,hc.jsx)("div",{children:(0,hc.jsx)(uN,{value:y,onChange:S,onFocus:v,formatTypes:x,forwardedRef:g,isVisible:!1})})})}),(0,hc.jsx)(KV.BaseControl,{...w,children:(0,hc.jsx)("div",{className:"block-editor-content-only-controls__rich-text",role:"textbox","aria-multiline":!a?.disableLineBreaks,ref:(0,wRe.useMergeRefs)([_,aN({registry:i,getValue:k,onChange:S,formatTypes:x,selectionChange:d,isSelected:f,disableFormats:a?.disableFormats,value:y,tagName:"div",disableLineBreaks:a?.disableLineBreaks,keyboardShortcuts:h,inputEvents:m}),g]),onFocus:()=>p(!0),onBlur:()=>p(!1),contentEditable:!0,...T})})]})}var ug=c(H(),1),RRe=c(Z(),1),BRe=c(Et(),1),PRe=c(F(),1),ay=c(G(),1);var lr=c(E(),1),nXe=e=>{window.requestAnimationFrame(()=>{let[t]=BRe.focus.tabbable.find(e?.current);t&&t.focus()})};function iXe({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,lr.jsx)("div",{className:"block-editor-content-only-controls__media-thumbnail",children:(0,lr.jsx)("img",{alt:"",width:20,height:20,src:o.media_type==="image"?o.source_url:o.poster})});if(n.length===1){let a=t.getValue({item:e})?.url;if(n[0]==="image"&&a)return(0,lr.jsx)("div",{className:"block-editor-content-only-controls__media-thumbnail",children:(0,lr.jsx)("img",{alt:"",width:20,height:20,src:a})});let l;if(n[0]==="image"?l=mx:n[0]==="video"?l=J4:n[0]==="audio"?l=lF:l=_y,l)return(0,lr.jsx)(ug.Icon,{icon:l,size:20})}return(0,lr.jsx)(ug.Icon,{icon:_y,size:20})}function IRe({data:e,field:t,onChange:o,config:r={}}){let{popoverProps:n}=N_({isControl:!0}),i=t.getValue({item:e}),{allowedTypes:s=[],multiple:a=!1,useFeaturedImage:l=!1}=r,u=i?.id,d=i?.url,f=(0,RRe.useSelect)(m=>{if(!u)return;let b=m(C).getSettings()[L1];if(b)return b(m,u)},[u]),p;if(s.length===1){let m=s[0];m==="image"?p=(0,ay.__)("Image"):m==="video"?p=(0,ay.__)("Video"):m==="application"?p=(0,ay.__)("File"):p=(0,ay.__)("Media")}else p=(0,ay.__)("Media");let g=(0,PRe.useRef)();return(0,lr.jsx)(Ws,{children:(0,lr.jsxs)("div",{ref:g,className:"block-editor-content-only-controls",children:[(0,lr.jsx)(Vk,{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:{}}))},...l&&{useFeaturedImage:!!i?.featuredImage,onToggleFeaturedImage:()=>{o(t.setValue({item:e,value:{featuredImage:!i?.featuredImage}}))}},onSelect:m=>{if(m.id&&m.url){let h={...m,mediaType:m.media_type};l&&(h.featuredImage=!1),o(t.setValue({item:e,value:h}))}},renderToggle:m=>(0,lr.jsx)(ug.Button,{__next40pxDefaultSize:!0,className:"block-editor-content-only-controls__media",...m,children:(0,lr.jsxs)(ug.__experimentalGrid,{rowGap:0,columnGap:8,templateColumns:"20px 1fr",className:"block-editor-content-only-controls__media-row",children:[d&&(0,lr.jsxs)(lr.Fragment,{children:[(0,lr.jsx)(iXe,{attachment:f,field:t,data:e,config:r}),(0,lr.jsx)("span",{className:"block-editor-content-only-controls__media-title",children:f?.title?.raw&&f?.title?.raw!==""?f?.title?.raw:d})]}),!d&&(0,lr.jsxs)(lr.Fragment,{children:[(0,lr.jsx)("span",{className:"block-editor-content-only-controls__media-placeholder",style:{width:"20px",height:"20px"}}),(0,lr.jsx)("span",{className:"block-editor-content-only-controls__media-title",children:p})]})]})})}),d&&(0,lr.jsx)(ug.Button,{label:(0,ay.__)("Reset"),className:"block-editor-content-only-controls__media-reset",size:"small",icon:Bn,onClick:()=>{o(t.setValue({item:e,value:{}})),nXe(g)}})]})})}var vf=c(H(),1),qV=c(F(),1),ORe=c(G(),1);var ARe=c(As(),1);var Wn=c(E(),1),H$="noopener",LRe="_blank",YV="nofollow";function sXe({rel:e="",url:t="",opensInNewTab:o,nofollow:r}){let n,i=e;if(o)n=LRe,i=i?.includes(H$)?i:i+` ${H$}`;else{let s=new RegExp(`\\b${H$}\\s*`,"g");i=i?.replace(s,"").trim()}if(r)i=i?.includes(YV)?i:(i+` ${YV}`).trim();else{let s=new RegExp(`\\b${YV}\\s*`,"g");i=i?.replace(s,"").trim()}return{url:(0,ARe.prependHTTP)(t),linkTarget:n,rel:i||void 0}}function MRe({data:e,field:t,onChange:o}){let[r,n]=(0,qV.useState)(!1),{popoverProps:i}=N_({isControl:!0}),s=t.getValue({item:e}),a=s?.url,l=s?.rel||"",d=s?.linkTarget===LRe,f=l===YV,p=(0,qV.useMemo)(()=>({url:a,opensInNewTab:d,nofollow:f}),[a,d,f]);return(0,Wn.jsxs)(Wn.Fragment,{children:[(0,Wn.jsx)(vf.Button,{__next40pxDefaultSize:!0,className:"block-editor-content-only-controls__link",onClick:()=>{n(!0)},children:(0,Wn.jsxs)(vf.__experimentalGrid,{rowGap:0,columnGap:8,templateColumns:"24px 1fr",className:"block-editor-content-only-controls__link-row",children:[a&&(0,Wn.jsxs)(Wn.Fragment,{children:[(0,Wn.jsx)(vf.Icon,{icon:Ji,size:24}),(0,Wn.jsx)("span",{className:"block-editor-content-only-controls__link-title",children:a})]}),!a&&(0,Wn.jsxs)(Wn.Fragment,{children:[(0,Wn.jsx)(vf.Icon,{icon:Ji,size:24,style:{opacity:.3}}),(0,Wn.jsx)("span",{className:"block-editor-content-only-controls__link-title",children:(0,ORe.__)("Link")})]})]})}),r&&(0,Wn.jsx)(vf.Popover,{onClose:()=>{n(!1)},...i??{},children:(0,Wn.jsx)(Pm,{value:p,onChange:g=>{let m=sXe({rel:l,...g});o(t.setValue({item:e,value:m}))},onRemove:()=>{o(t.setValue({item:e,value:{}}))}})})]})}var $n=c(E(),1),{fieldsKey:VRe,formKey:U$}=U(V_.privateApis);function G$(e,t={}){return function(r){return(0,$n.jsx)(e,{...r,config:t})}}function aXe({clientId:e,blockType:t,setAttributes:o,isMultiBlock:r=!1}){let n=On({clientId:e,context:"list-view"}),i=Oo(e),s=t?.[VRe],a=(0,dg.useContext)(Kn),l=(0,XV.useSelect)(v=>{let y=v(C).getBlockAttributes(e);if(!y?.metadata?.bindings)return y;let{__experimentalBlockBindingsSupportedAttributes:k}=v(C).getSettings(),S=k?.[t?.name],_=S?T1(y.metadata.bindings,S):y.metadata.bindings,{getBlockBindingsSource:x}=U(v(V_.store));return Object.entries(_).reduce((w,[T,B])=>{if(T==="__default")return w;let R=x(B.source);if(!R)return w;let A=R.getValues({select:v,clientId:e,context:a,bindings:{[T]:B}});return{...w,...A}},y)},[a,e,t?.name]),{selectBlock:u,toggleBlockHighlight:d}=(0,XV.useDispatch)(C),f=(0,NRe.useDebounce)(d,50),p=(0,dg.useMemo)(()=>r?{...t?.[U$],fields:[t?.[U$]?.fields?.[0]]}:t?.[U$],[t,r]),[g,m]=(0,dg.useState)(p),h=(0,dg.useMemo)(()=>s?.length?s.map(v=>{let y={...v};return typeof v.Edit=="string"&&v.Edit==="rich-text"?y.Edit=G$(TRe,{clientId:e}):typeof v.Edit=="string"&&v.Edit==="link"?y.Edit=G$(MRe):typeof v.Edit=="object"&&v.Edit.control==="media"&&(y.Edit=G$(IRe,{...v.Edit})),y}):[],[s,e]);if(!s?.length)return null;let b=v=>{m(y=>y.fields?.includes(v)?{...y,fields:y.fields.filter(k=>k!==v)}:{...y,fields:[...y.fields||[],v]})};return(0,$n.jsxs)("div",{className:"block-editor-block-fields__container",onMouseEnter:r?()=>f(e,!0):void 0,onMouseLeave:()=>r?f(e,!1):void 0,onFocus:r?()=>{u(e,null)}:void 0,children:[(0,$n.jsx)("div",{className:"block-editor-block-fields__header",children:(0,$n.jsxs)(ZV.__experimentalHStack,{spacing:1,children:[r&&(0,$n.jsxs)($n.Fragment,{children:[(0,$n.jsx)(Ct,{className:"block-editor-block-fields__header-icon",icon:i?.icon}),(0,$n.jsx)("h2",{className:"block-editor-block-fields__header-title",children:(0,$n.jsx)(ZV.__experimentalTruncate,{numberOfLines:1,children:n})}),(0,$n.jsx)(xRe,{fields:h,visibleFields:g.fields,onToggleField:b})]}),!r&&(0,$n.jsx)("h2",{className:"block-editor-block-fields__header-title",children:(0,DRe.__)("Content")})]})}),(0,$n.jsx)(QE,{data:l,fields:h,form:g,onChange:o})]})}function lXe(e){return!!(window?.__experimentalContentOnlyInspectorFields&&(0,V_.getBlockType)(e)?.[VRe])}function cXe(e){let{blockType:t,isSelectionWithinCurrentSection:o}=(0,dg.useContext)(Rn);return(0,$n.jsx)(tb,{group:"content",children:(0,$n.jsx)(aXe,{...e,blockType:t,isMultiBlock:o})})}var FRe={edit:cXe,hasSupport:lXe,attributeKeys:[],supportsPatternEditing:!0};var K$=c(uo(),1),zRe=c(H(),1),W$=c(G(),1),JE=c(ce(),1);var $$=c(E(),1);function uXe(e){return(0,JE.hasBlockSupport)(e,"customClassName",!0)&&(e.attributes={...e.attributes,className:{type:"string"}}),e}function dXe({className:e,setAttributes:t}){return yr()!=="default"?null:(0,$$.jsx)(Oe,{group:"advanced",children:(0,$$.jsx)(zRe.TextControl,{autoComplete:"off",label:(0,W$.__)("Additional CSS class(es)"),value:e||"",onChange:r=>{t({className:r!==""?r:void 0})},help:(0,W$.__)("Separate multiple classes with spaces.")})})}var Y$={edit:dXe,addSaveProps:fXe,attributeKeys:["className"],hasSupport(e){return(0,JE.hasBlockSupport)(e,"customClassName",!0)}};function fXe(e,t,o){return(0,JE.hasBlockSupport)(t,"customClassName",!0)&&o.className&&(e.className=W(e.className,o.className)),e}function pXe(e,t,o,r){if(!(0,JE.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,K$.addFilter)("blocks.registerBlockType","core/editor/custom-class-name/attribute",uXe);(0,K$.addFilter)("blocks.switchToBlockType.transformedBlock","core/customClassName/addTransforms",pXe);var jRe=c(uo(),1),e1=c(ce(),1);function mXe(e,t){return(0,e1.hasBlockSupport)(t,"className",!0)&&(typeof e.className=="string"?e.className=[...new Set([(0,e1.getBlockDefaultClassName)(t.name),...e.className.split(" ")])].join(" ").trim():e.className=(0,e1.getBlockDefaultClassName)(t.name)),e}(0,jRe.addFilter)("blocks.getSaveContent.extraProps","core/generated-class-name/save-props",mXe);var Q$=c(F(),1),QRe=c(uo(),1),JRe=c(Z(),1);var bc=c(ce(),1),eBe=c(fe(),1),Du=c(Dx(),1);var F_=c(F(),1),JV=c(Z(),1),QV=c(ce(),1),$Re=c(Tt(),1);var Mu=c(F(),1),HRe=c(mC(),1);var t1=c(E(),1);function URe({clientId:e,value:t,computeStyle:o,forceShow:r}){let n=Mt(e),[i,s]=(0,Mu.useReducer)(()=>o(n));(0,Mu.useEffect)(()=>{n&&r&&s()},[n,r]),(0,Mu.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,Mu.useRef)(t),[l,u]=(0,Mu.useState)(!1);return(0,Mu.useEffect)(()=>{if((0,HRe.isShallowEqual)(t,a.current)||r)return;u(!0),a.current=t;let d=setTimeout(()=>{u(!1)},400);return()=>{u(!1),clearTimeout(d)}},[t,r]),!l&&!r?null:(0,t1.jsx)(ja,{clientId:e,__unstablePopoverSlot:"block-toolbar",children:(0,t1.jsx)("div",{className:"block-editor__spacing-visualizer",style:i})})}function fg(e,t){return e.ownerDocument.defaultView.getComputedStyle(e).getPropertyValue(t)}function GRe({clientId:e,value:t,forceShow:o}){return(0,t1.jsx)(URe,{clientId:e,value:t?.spacing?.margin,computeStyle:r=>{let n=fg(r,"margin-top"),i=fg(r,"margin-right"),s=fg(r,"margin-bottom"),a=fg(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 WRe({clientId:e,value:t,forceShow:o}){return(0,t1.jsx)(URe,{clientId:e,value:t?.spacing?.padding,computeStyle:r=>({borderTopWidth:fg(r,"padding-top"),borderRightWidth:fg(r,"padding-right"),borderBottomWidth:fg(r,"padding-bottom"),borderLeftWidth:fg(r,"padding-left")}),forceShow:o})}var Sf=c(E(),1),Nu="dimensions",o1="spacing";function gXe(){let[e,t]=(0,F_.useState)(!1),{hideBlockInterface:o,showBlockInterface:r}=U((0,JV.useDispatch)(C));return(0,F_.useEffect)(()=>{e?o():r()},[e,r,o]),[e,t]}function hXe({children:e,resetAllFilter:t}){let o=(0,F_.useCallback)(r=>{let n=r.style,i=t(n);return{...r,style:i}},[t]);return(0,Sf.jsx)(Oe,{group:"dimensions",resetAllFilter:o,children:e})}function KRe({clientId:e,name:t,setAttributes:o,settings:r}){let n=Ua(),i=!vn(n),s=WN(r,n),a=(0,JV.useSelect)(h=>{if(s)return h(C).getBlockAttributes(e)?.style},[e,s]),[l,u]=gXe(),d=i?Io(a,n):a,f=i?h=>{o({style:Sn(a,n,h)})}:h=>{o({style:Ge(h)})};if(!s)return null;let p=(0,QV.getBlockSupport)(t,[Nu,"__experimentalDefaultControls"]),g=(0,QV.getBlockSupport)(t,[o1,"__experimentalDefaultControls"]),m={minHeight:!1,minWidth:!1,...p,...g};return(0,Sf.jsxs)(Sf.Fragment,{children:[(0,Sf.jsx)($N,{as:hXe,panelId:e,settings:r,value:d,onChange:f,defaultControls:m,styleState:n,onVisualize:i?void 0:u}),!i&&!!r?.spacing?.padding&&l==="padding"&&(0,Sf.jsx)(WRe,{forceShow:l==="padding",clientId:e,value:d}),!i&&!!r?.spacing?.margin&&l==="margin"&&(0,Sf.jsx)(GRe,{forceShow:l==="margin",clientId:e,value:d})]})}function YRe(e,t="any"){let o=(0,QV.getBlockSupport)(e,Nu);return o===!0?!0:t==="any"?!!(o?.aspectRatio||o?.height||o?.minHeight||o?.width||o?.minWidth):!!o?.[t]}function q$(e){return e?`${e}`.trim().toLowerCase()!=="auto":!1}var qRe={useBlockProps:bXe,attributeKeys:["height","minHeight","width","style"],hasSupport(e){return YRe(e)}};function bXe({name:e,height:t,minHeight:o,style:r}){if(!YRe(e,"aspectRatio")||Ft(e,Nu,"aspectRatio"))return{};let n=q$(r?.dimensions?.aspectRatio),i=W({"has-aspect-ratio":n}),s={};return n?(s.minHeight="unset",s.height="unset"):(o||r?.dimensions?.minHeight||t||r?.dimensions?.height)&&(s.aspectRatio="unset"),{className:i,style:s}}function Z$(){(0,$Re.default)("wp.blockEditor.__experimentalUseCustomSides",{since:"6.3",version:"6.4"})}var yXe=c(ce(),1);function ZRe(e,t,o=""){if(typeof t!="string"||!t)return Tc(e).map(i=>`${i.trim()}${o}`).join(", ");let r=Tc(e).filter(i=>i.trim()),n=Tc(t).filter(i=>i.trim());return n.length?n.map(i=>{i=i.trim();let s=i.match(/^([.#]?[-_a-zA-Z0-9]+|\[[^\]]+\])/);return s?r.map(a=>`${a.trim()}${i.slice(s[0].length)}${o}`).join(", "):r.map(a=>`${a.trim()}${o}`).join(", ")}).join(", "):r.map(i=>`${i.trim()}${o}`).join(", ")}var pg=c(E(),1),{getResponsiveMediaQueries:vXe}=U(Yn),SXe=["Top","Right","Bottom","Left"],kXe=[...bCe,Gb,Cn,Nu,$b,o1,OE],J$=e=>kXe.some(t=>(0,bc.hasBlockSupport)(e,t));function ca(e={}){let t={};return(0,Du.getCSSRules)(e).forEach(o=>{t[o.key]=o.value}),t}function _Xe(e){let t=e?.border;if(!t)return;let o=!!t.style,r=!!t.color,n=!!t.width,i={};return!o&&(r||n)&&(i.style="solid"),SXe.forEach(s=>{let a=s.toLowerCase(),l=t[a],u=!!l?.style,d=!!l?.color,f=!!l?.width;!o&&!u&&(d||f)&&(i[a]={style:"solid"})}),Ge({border:Ge(i)})}function xXe(e,t){if(!!!e?.color?.background)return;let r=!!e?.color?.gradient,n=!!e?.background?.gradient||!!e?.background?.backgroundImage;if(r||n)return;let i="background-image: unset !important";return t?`${t} { ${i}; }`:`${i};`}function wXe(e){let t=e?.dimensions;if(t){if(q$(t.aspectRatio))return{dimensions:{minHeight:"unset",height:"unset"}};if(t.minHeight||t.height)return{dimensions:{aspectRatio:"unset"}}}}function CXe(e,t){let o=e?.typography?.textAlign;if(typeof o!="string"||!o)return;let r=`text-align: ${(0,Du.getCSSValueFromRawStyle)(o)} !important`;return t?`${t} { ${r}; }`:`${r};`}function EXe(e,t){let o=wXe(e),r=o?eK(e,o):e,n=(0,Du.compileCSS)(r,{selector:t}),i=n?n.replace(/;/g," !important;"):void 0,s=_Xe(e),a=s?(0,Du.compileCSS)(s,{selector:t}):void 0,l=CXe(e,t),u=xXe(e,t);return[i,l,a,u].filter(Boolean).join(`
`)}function t5(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function eK(e={},t={}){let o={...e};return Object.entries(t).forEach(([r,n])=>{o[r]=t5(n)&&t5(o[r])?eK(o[r],n):n}),o}function e5(e,t,o){let r=t||"",n=e.get(r)||{selector:t,style:{}};e.set(r,{selector:t,style:eK(n.style,o)})}function TXe(e,t){let o=(0,bc.getBlockType)(t)?.selectors||{},r=new Map;return Object.entries(e||{}).forEach(([n,i])=>{let s=o[n];if(typeof s=="string"){e5(r,s,{[n]:i});return}if(t5(s)&&t5(i)){let a={...i};Object.entries(s).forEach(([l,u])=>{l==="root"||typeof u!="string"||!Object.hasOwn(i,l)||(e5(r,u,{[n]:{[l]:i[l]}}),delete a[l])}),Object.keys(a).length&&e5(r,s.root||o.root,{[n]:a});return}e5(r,o.root,{[n]:i})}),Array.from(r.values())}function tK(e,t){let{name:o,baseSelector:r,state:n=""}=t,i=TXe(e,o).map(({selector:s,style:a})=>EXe(a,ZRe(r,s,n))).filter(Boolean);return i.length?i.join(`
`):void 0}function RXe(e,t){if(!e)return e;let o={...e};return t.forEach(r=>{delete o[r]}),o}function tBe(e,t,o){let r=ND[t];if(!r)return[];let n=[];return r.forEach(i=>{let s=e?.[i];if(s){let a=tK(s,{name:t,baseSelector:o,state:i});a&&n.push(a)}}),n}function BXe(e,t,o,r){let n=[],s=["elements",...ND[t]??[]],a=vXe(r);return Object.entries(a).forEach(([l,u])=>{let d=Io(e,{viewport:l,pseudo:Ks.pseudo});if(!d)return;let f=[],p=tK(RXe(d,s),{name:t,baseSelector:o});p&&f.push(p);let g=nBe(d.elements,t,o);g&&f.push(g),f.push(...tBe(d,t,o)),f.length&&n.push(`${u}{${f.join("")}}`)}),n}function XRe(e,t){let o=Io(e,t);if(!Oi(t))return o;let r={...t,viewport:Ks.viewport},n=Io(e,r);return n&&o?FR(n,o):o||n}function PXe(e){return!J$(e)&&!(0,bc.hasBlockSupport)(e,"customCSS",!0)||e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e}var oBe={[`${Gb}.__experimentalSkipSerialization`]:["border"],[`${Cn}.__experimentalSkipSerialization`]:[Cn],[`${al}.__experimentalSkipSerialization`]:[al],[`${Nu}.__experimentalSkipSerialization`]:[Nu],[`${o1}.__experimentalSkipSerialization`]:[o1],[`${OE}.__experimentalSkipSerialization`]:[OE]},IXe={...oBe,[`${Nu}.aspectRatio`]:[`${Nu}.aspectRatio`],[`${$b}`]:[$b]},OXe={[`${Nu}.aspectRatio`]:!0,[`${$b}`]:!0},AXe={gradients:"gradient"};function X$(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;X$(r[i],[s],!0)}else n.length===1&&delete r[n[0]]}),r}function rBe(e,t,o,r=IXe){if(!J$(t))return e;let{style:n}=o;return Object.entries(r).forEach(([i,s])=>{let a=OXe[i]||(0,bc.getBlockSupport)(t,i);a===!0&&(n=X$(n,s)),Array.isArray(a)&&a.forEach(l=>{let u=AXe[l]||l;n=X$(n,[[...s,u]])})}),e.style={...ca(n),...e.style},e}function LXe({clientId:e,name:t,setAttributes:o,style:r,__unstableParentLayout:n}){let i=sl(t,n),s=yr(),{globalBlockStyles:a,selectedState:l,showStateOnCanvas:u}=(0,JRe.useSelect)(m=>{let h=m(C),{getSelectedBlockStyleState:b,isSelectedBlockStyleStateShownOnCanvas:v}=U(h);return{globalBlockStyles:h.getSettings()?.[Zi]?.blocks?.[t],selectedState:b(e),showStateOnCanvas:v(e)}},[e,t]),d=Ys(l),f=(0,Q$.useMemo)(()=>{if(!u||!d)return;let m=XRe(a,l),h=XRe(r,l),b;if(m&&h)b=FR(m,h);else if(h)b=h;else if(m)b=m;else return;return tK(b,{name:t,baseSelector:`[data-block="${e}"]`})},[u,d,a,r,l,e,t]);if(hs({css:f}),s!=="default")return null;let p={...i,typography:{...i.typography,textAlign:!1}},g={clientId:e,name:t,setAttributes:o,settings:p};return(0,pg.jsxs)(g2,{value:l,children:[(0,pg.jsx)(SD,{...g}),(0,pg.jsx)(hD,{...g}),(0,pg.jsx)(RD,{...g}),(0,pg.jsx)(D0e,{...g}),(0,pg.jsx)(KRe,{...g})]})}var o5={edit:LXe,hasSupport:J$,addSaveProps:rBe,attributeKeys:["style"],useBlockProps:DXe},MXe=[{elementType:"button"},{elementType:"link",pseudo:[":hover"]},{elementType:"heading",elements:["h1","h2","h3","h4","h5","h6"]}],NXe={};function nBe(e,t,o){if(!e)return;let r=[];return MXe.forEach(({elementType:n,pseudo:i,elements:s})=>{if(Ft(t,Cn,n))return;let l=e?.[n];if(l){let u=jS(o,bc.__EXPERIMENTAL_ELEMENTS[n]);r.push((0,Du.compileCSS)(l,{selector:u})),i&&i.forEach(d=>{l[d]&&r.push((0,Du.compileCSS)(l[d],{selector:jS(o,`${bc.__EXPERIMENTAL_ELEMENTS[n]}${d}`)}))})}s&&s.forEach(u=>{e[u]&&r.push((0,Du.compileCSS)(e[u],{selector:jS(o,bc.__EXPERIMENTAL_ELEMENTS[u])}))})}),r.length>0?r.join(""):void 0}function DXe({name:e,style:t}){let o=(0,eBe.useInstanceId)(NXe,"wp-elements"),r=`.${o}`,n=t?.elements,[i]=Me("viewport"),s=(0,Q$.useMemo)(()=>{let a=[],l=nBe(n,e,r);return l&&a.push(l),a.push(...tBe(t,e,r)),a.push(...BXe(t,e,r,i)),a.length>0?a.join(""):void 0},[r,n,e,t,i]);return hs({css:s}),rBe({className:o},e,{style:t},oBe)}(0,QRe.addFilter)("blocks.registerBlockType","core/style/addAttribute",PXe);var iBe=c(uo(),1),sBe=c(ce(),1),VXe=e=>(0,sBe.hasBlockSupport)(e,"__experimentalSettings",!1);function FXe(e){return VXe(e)&&(e?.attributes?.settings||(e.attributes={...e.attributes,settings:{type:"object"}})),e}(0,iBe.addFilter)("blocks.registerBlockType","core/settings/addAttribute",FXe);var mg=c(ce(),1),cBe=c(fe(),1),uBe=c(uo(),1),r1=c(F(),1);function zXe(e=[]){let t={r:[],g:[],b:[],a:[]};return e.forEach(o=>{let r=Bo(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 aBe(e){return`${e}{filter:none}`}function lBe(e,t){return`${e}{filter:url(#${t})}`}function r5(e,t){let o=zXe(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 kf=c(E(),1),oK=[],jXe=window?.navigator.userAgent&&window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome")&&!window.navigator.userAgent.includes("Chromium");Rf([Bf]);function rK({presetSetting:e,defaultSetting:t}){let[o,r,n,i]=Me(t,`${e}.custom`,`${e}.theme`,`${e}.default`);return(0,r1.useMemo)(()=>[...r||oK,...n||oK,...o&&i||oK],[o,r,n,i])}function dBe(e,t){if(!e)return;let o=t?.find(({slug:r})=>e===`var:preset|duotone|${r}`);return o?o.colors:void 0}function HXe(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 UXe({style:e,setAttributes:t,name:o}){let r=e?.color?.duotone,n=sl(o),i=yr(),s=rK({presetSetting:"color.duotone",defaultSetting:"color.defaultDuotone"}),a=rK({presetSetting:"color.palette",defaultSetting:"color.defaultPalette"}),[l,u]=Me("color.custom","color.customDuotone"),d=!l,f=!u||a?.length===0&&d;if(s?.length===0&&f||i!=="default")return null;let p=r==="unset"||Array.isArray(r)?r:dBe(r,s);return(0,kf.jsxs)(kf.Fragment,{children:[(0,kf.jsx)(Oe,{group:"filter",children:(0,kf.jsx)(QN,{value:{filter:{duotone:p}},onChange:g=>{let m={...e,color:{...g?.filter}};t({style:Ge(m)})},settings:n})}),(0,kf.jsx)(Po,{group:"block",__experimentalShareWithChildBlocks:!0,children:(0,kf.jsx)(cM,{duotonePalette:s,colorPalette:a,disableCustomDuotone:f,disableCustomColors:d,value:p,onChange:g=>{let m=HXe(g,s),h={...e,color:{...e?.color,duotone:m??g}};t({style:Ge(h)})},settings:n})})]})}var nK={shareWithChildBlocks:!0,edit:UXe,useBlockProps:KXe,attributeKeys:["style"],hasSupport(e){return(0,mg.hasBlockSupport)(e,"filter.duotone")}};function GXe(e){return(0,mg.hasBlockSupport)(e,"filter.duotone")&&(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}})),e}function WXe({clientId:e,id:t,selector:o,attribute:r}){let n=rK({presetSetting:"color.duotone",defaultSetting:"color.defaultDuotone"}),i=Array.isArray(r),s=i?void 0:dBe(r,n),a=typeof r=="string"&&s,l=typeof r=="string"&&!a,u=null;a?u=s:(l||i)&&(u=r);let p=o.split(",").map(h=>`.${t}${h.trim()}`).join(", "),g=Array.isArray(u)||u==="unset";Ad(g?{css:u!=="unset"?lBe(p,t):aBe(p),__unstableType:"presets"}:void 0),Ad(g?{assets:u!=="unset"?r5(t,u):"",__unstableType:"svgs"}:void 0);let m=Mt(e);(0,r1.useEffect)(()=>{if(g&&m&&jXe){let h=m.style.display;m.style.setProperty("display","inline-block"),m.offsetHeight,m.style.setProperty("display",h)}},[g,m,u])}var $Xe={};function KXe({clientId:e,name:t,style:o}){let r=(0,cBe.useInstanceId)($Xe),n=(0,r1.useMemo)(()=>{let l=(0,mg.getBlockType)(t);if(l){if(!(0,mg.getBlockSupport)(l,"filter.duotone",!1))return null;let d=(0,mg.getBlockSupport)(l,"color.__experimentalDuotone",!1);if(d){let f=Ms(l);return typeof d=="string"?jS(f,d):f}return Ms(l,"filter.duotone",{fallback:!0})}},[t]),i=o?.color?.duotone,s=`wp-duotone-${r}`,a=n&&i;return WXe({clientId:e,id:s,selector:n,attribute:i}),{className:a?s:""}}(0,uBe.addFilter)("blocks.registerBlockType","core/editor/duotone/add-attributes",GXe);var i5=c(F(),1),n1=c(Z(),1),fBe=c(fe(),1),i1=c(ce(),1),s1=c(G(),1);var pBe=c(es(),1);var n5=c(E(),1),YXe={},qXe={};function ZXe({blockName:e,setAttributes:t,style:o}){if(yr()!=="default")return null;let n=(0,i1.getBlockType)(e);function i(a){let l=a?.css?.trim()?a.css:void 0;t({style:Ge({...a,css:l})})}let s=(0,s1.sprintf)((0,s1.__)("Add your own CSS to customize the appearance of the %s block. You do not need to include a CSS selector, just add the property and value, e.g. color: red;."),n?.title);return(0,n5.jsx)(Oe,{group:"advanced",children:(0,n5.jsx)(tD,{value:o,onChange:i,inheritedValue:o,help:s})})}var XXe="custom-css-edit-warning";function QXe({clientId:e,name:t,setAttributes:o}){let{style:r,canEditCSS:n}=(0,n1.useSelect)(i=>{let{getBlockAttributes:s,getSettings:a}=i(C);return{style:s(e)?.style||qXe,canEditCSS:a().canEditCSS}},[e]);return n?(0,n5.jsx)(ZXe,{blockName:t,setAttributes:o,style:r}):null}function JXe({style:e}){let t=e?.css,o=typeof t=="string"&&t.trim().length>0&&hW(t),r=(0,n1.useSelect)(u=>u(C).getSettings().canEditCSS,[]),{createWarningNotice:n}=(0,n1.useDispatch)(pBe.store),i=!!t?.trim();(0,i5.useEffect)(()=>{!r&&i&&n((0,s1.__)("This post contains blocks with custom CSS. You do not have permission to edit CSS. If you save this post, the custom CSS will be removed."),{id:XXe,isDismissible:!0})},[r,i,n]);let s=(0,fBe.useInstanceId)(YXe,"wp-custom-css"),a=`.${s}`,l=(0,i5.useMemo)(()=>{if(o)return GR(t,a)},[t,a,o]);return hs({css:l}),o?{className:`has-custom-css ${s}`}:{}}function eQe(e,t,o){if(!(0,i1.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 s5={edit:QXe,useBlockProps:JXe,addSaveProps:eQe,attributeKeys:["style"],hasSupport(e){return(0,i1.hasBlockSupport)(e,"customCSS",!0)}};var l5=c(fe(),1),aK=c(uo(),1),gBe=c(F(),1),yc=c(ce(),1);var c5=c(Z(),1),vc=c(H(),1),ly=c(G(),1);var Tn=c(E(),1),tQe="is-style-",a5="layout",iK=["selfStretch","flexSize","columnStart","columnSpan","rowStart","rowSpan"],{kebabCase:sK}=U(vc.privateApis),{getResponsiveMediaQueries:oQe}=U(Yn);function rQe(e={},t){let o=e?.default;return t?.attributes?.layout??o}function mBe(e={},t){return Ge({...rQe(e,t)})}function nQe(e={},t={},o={}){let r={},n=Object.fromEntries(iK.filter(i=>Object.hasOwn(o||{},i)).map(i=>[i,o[i]]));return Object.entries(e||{}).forEach(([i,s])=>{let a=Object.hasOwn(t||{},i);!iK.includes(i)&&s!==t?.[i]&&(r[i]=s===void 0&&a?null:s)}),Ge({...n,...r})}function iQe(e={}){return Object.fromEntries(Object.entries(e||{}).filter(([t])=>!iK.includes(t)))}function lK(e){return(0,yc.hasBlockSupport)(e,"layout")||(0,yc.hasBlockSupport)(e,"__experimentalLayout")}function u5(e={},t=""){let{layout:o}=e,{default:r}=(0,yc.getBlockSupport)(t,a5)||{},n=o?.inherit||o?.contentSize||o?.wideSize?{...o,type:"constrained"}:o||r||{},i=[];if(Vs[n?.type||"default"]?.className){let a=Vs[n?.type||"default"]?.className,l=t.split("/"),d=`wp-block-${l[0]==="core"?l.pop():l.join("-")}-${a}`;i.push(a,d)}return(0,c5.useSelect)(a=>!n?.inherit&&!n?.contentSize&&n?.type!=="constrained"?!1:a(C).getSettings().__experimentalFeatures?.useRootPaddingAwareAlignments,[n?.contentSize,n?.inherit,n?.type])&&i.push("has-global-padding"),n?.orientation&&i.push(`is-${sK(n.orientation)}`),n?.justifyContent&&i.push(`is-content-justification-${sK(n.justifyContent)}`),n?.flexWrap&&n.flexWrap==="nowrap"&&i.push("is-nowrap"),i}function cK(e={},t,o){let{layout:r={},style:n={}}=e,i=r?.inherit||r?.contentSize||r?.wideSize?{...r,type:"constrained"}:r||{},s=Sa(i?.type||"default"),[a]=Me("spacing.blockGap"),l=a!==null;return s?.getLayoutStyle?.({blockName:t,selector:o,layout:r,style:n,hasBlockGapSupport:l})}function sQe({attributes:e={},blockName:t,selector:o,layout:r={},hasBlockGapSupport:n,globalBlockGapValue:i,viewportSettings:s}){return Object.entries(oQe(s)).map(([a,l])=>{let u=Io(e?.style,{viewport:a,pseudo:Ks.pseudo}),d=iQe(u?.layout),f=Object.keys(d).length>0,p=u?.spacing&&Object.hasOwn(u.spacing,"blockGap"),g=u?.spacing&&Object.hasOwn(u.spacing,"padding");if(!f&&!p&&!g)return"";let h=Sa(r?.type||"default")?.getLayoutStyle?.({blockName:t,selector:o,layout:r,viewportOverrides:d,style:u,hasBlockGapSupport:n,globalBlockGapValue:i});return h?`${l}{${h}}`:""}).filter(Boolean).join("")}function aQe({layout:e,style:t,setAttributes:o,name:r,clientId:n}){let i=sl(r),{layout:s}=i,{themeSupportsLayout:a,activeBlockVariation:l,selectedState:u,isResponsiveEditing:d}=(0,c5.useSelect)(K=>{let{getBlockAttributes:Q,getSettings:re,getSelectedBlockStyleState:se,isResponsiveEditing:te}=U(K(C));return{activeBlockVariation:K(yc.store).getActiveBlockVariation(r,Q(n)||{},"block"),themeSupportsLayout:re().supportsLayout,selectedState:se(n),isResponsiveEditing:te()}},[r,n]),f=yr(),p=Oi(u)&&!Ys(u),g=(0,gBe.useCallback)((...K)=>{let Q=K[0]||{},re=K[1]||{};if(p){let ne=Io(Q.style??t,u)||{},de=Ge({...ne,layout:void 0});return{style:Sn(Q.style??t,u,de)}}let se=re.name||r,te=(0,yc.getBlockSupport)(se,a5,{});return{layout:mBe(te,l)}},[r,l,p,u,t]);if(f!=="default")return null;let m=(0,yc.getBlockSupport)(r,a5,{}),h={...s,...m},{allowSwitching:b,allowEditing:v=!0,allowInheriting:y=!0,default:k}=h;if(!v)return null;let S=e||k||{},_=p?Io(t,u):void 0,x=_?.layout,w=p?Ge({...S,...x})||{}:S,T=p?S:mBe(m,l),B={...m,...w},{type:R,default:{type:A="default"}={}}=B,O=R||A,P=!!(y&&(!O||O==="default"||O==="constrained"||B.inherit)),{inherit:L=!1,contentSize:M=null}=w;if((O==="default"||O==="constrained")&&!a)return null;let z=Sa(O),V=Sa("constrained"),I=!w.type&&(M||L),N=!!L||!!M,D=vn(u)&&!L&&b,j=K=>{if(p){let Q=Ge({..._,layout:nQe(K,S,_?.layout)});o({style:Sn(t,u,Q)});return}o({layout:Ge(K)})},Y=K=>j({type:K}),X=()=>j(T),ee=()=>j({type:"default"}),J=()=>z?.name==="constrained"||N,$=()=>p?(w?.type??"default")!==(T?.type??"default"):e?.type==="constrained",q=()=>(w?.type??"default")!==(T?.type??"default");return(0,Tn.jsxs)(Tn.Fragment,{children:[(0,Tn.jsxs)(Oe,{group:"layout",resetAllFilter:g,children:[P&&(0,Tn.jsx)(vc.__experimentalToolsPanelItem,{label:(0,ly.__)("Use content width"),hasValue:$,onDeselect:ee,isShownByDefault:!0,panelId:n,children:(0,Tn.jsx)(vc.ToggleControl,{label:(0,ly.__)("Inner blocks use content width"),checked:J(),onChange:()=>j({type:J()?"default":"constrained"}),help:J()?(0,ly.__)("Nested blocks use content width with options for full and wide widths."):(0,ly.__)("Nested blocks will fill the width of this container.")})}),D&&(0,Tn.jsx)(vc.__experimentalToolsPanelItem,{label:(0,ly.__)("Layout type"),hasValue:q,onDeselect:X,isShownByDefault:!0,panelId:n,children:(0,Tn.jsx)(lQe,{type:O,onChange:Y})}),z&&z.name!=="default"&&(0,Tn.jsx)(z.inspectorControls,{layout:w,value:e,onChange:j,layoutBlockSupport:h,resetLayout:T,name:r,clientId:n}),V&&I&&(0,Tn.jsx)(V.inspectorControls,{layout:w,value:e,onChange:j,layoutBlockSupport:h,resetLayout:T,name:r,clientId:n})]}),!L&&z&&(0,Tn.jsx)(z.toolBarControls,{layout:w,onChange:j,layoutBlockSupport:m,controlsGroup:d&&Oi(u)&&!Ys(u)?"style-state":"block",name:r,clientId:n})]})}var hBe={shareWithChildBlocks:!0,edit:aQe,attributeKeys:["layout","style"],hasSupport(e){return lK(e)}};function lQe({type:e,onChange:t}){return(0,Tn.jsx)(vc.__experimentalToggleGroupControl,{isBlock:!0,label:(0,ly.__)("Layout type"),hideLabelFromVision:!0,isAdaptiveWidth:!0,value:e,onChange:t,children:sX().map(({name:o,label:r})=>(0,Tn.jsx)(vc.__experimentalToggleGroupControlOption,{value:o,label:r},o))})}function cQe(e){return"type"in(e.attributes?.layout??{})||lK(e)&&(e.attributes={...e.attributes,layout:{type:"object"}}),e}function uQe({block:e,props:t,blockGapSupport:o,globalBlockGapValue:r,viewportSettings:n,layoutClasses:i}){let{name:s,attributes:a}=t,l=(0,l5.useInstanceId)(e),{layout:u}=a,{default:d}=(0,yc.getBlockSupport)(s,a5)||{},f=u?.inherit||u?.contentSize||u?.wideSize?{...u,type:"constrained"}:u||d||{},p=`wp-container-${sK(s)}-is-layout-`,g=`.${p}${l}`,m=o!==null,b=Sa(f?.type||"default")?.getLayoutStyle?.({blockName:s,selector:g,layout:f,style:a?.style,hasBlockGapSupport:m,globalBlockGapValue:r}),v=sQe({attributes:a,blockName:s,selector:g,layout:f,hasBlockGapSupport:m,globalBlockGapValue:r,viewportSettings:n}),y=[b,v].filter(Boolean).join(""),k=W({[`${p}${l}`]:!!y},i);return hs({css:y}),(0,Tn.jsx)(e,{...t,__unstableLayoutClassNames:k})}var dQe=(0,l5.createHigherOrderComponent)(e=>function(o){let{clientId:r,name:n,attributes:i}=o,s=lK(n),a=u5(i,n),l=(0,c5.useSelect)(u=>{if(!s)return;let{getSettings:d,getBlockSettings:f}=U(u(C)),p=d(),{disableLayoutStyles:g}=p;if(g)return;let[m]=f(r,"spacing.blockGap"),h=p[Zi],b,v=i?.className;if(v?.includes(tQe)){let{getBlockStyles:k}=u(yc.store),S=k(n),_=l9(v,S);b=_?h?.blocks?.[n]?.variations?.[_]?.spacing?.blockGap:void 0}let y=b??h?.blocks?.[n]?.spacing?.blockGap??h?.spacing?.blockGap;return{blockGapSupport:m,globalBlockGapValue:y,viewportSettings:p?.__experimentalFeatures?.viewport}},[s,r,i?.className,n]);return l?(0,Tn.jsx)(uQe,{block:e,props:o,layoutClasses:a,...l}):(0,Tn.jsx)(e,{...o,__unstableLayoutClassNames:s?a:void 0})},"withLayoutStyles");(0,aK.addFilter)("blocks.registerBlockType","core/layout/addAttribute",cQe);(0,aK.addFilter)("editor.BlockListBlock","core/editor/layout/with-layout-styles",dQe);var CBe=c(fe(),1),g5=c(Z(),1),EBe=c(F(),1);var pl=c(F(),1),gg=c(Z(),1),yBe=c(fe(),1);function l1(e,t){return Array.from({length:t},(o,r)=>e+r)}var Sc=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 Ur(e,t){return e.ownerDocument.defaultView.getComputedStyle(e).getPropertyValue(t)}function a1(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 _f(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 fQe(e,t){let o=parseFloat(Ur(e,"column-gap")),r=parseFloat(Ur(e,"row-gap")),n=a1(Ur(e,"grid-template-columns"),o),i=a1(Ur(e,"grid-template-rows"),r),s=_f(n,t.left)+1,a=_f(i,t.top)+1,l=_f(n,t.right,"end")+1,u=_f(i,t.bottom,"end")+1;return new Sc({columnStart:s,columnEnd:l,rowStart:a,rowEnd:u})}function bBe(e){return fQe(e.parentElement,new window.DOMRect(e.offsetLeft,e.offsetTop,e.offsetWidth,e.offsetHeight))}function uK(e){let t=Ur(e,"grid-template-columns"),o=Ur(e,"grid-template-rows"),r=Ur(e,"border-top-width"),n=Ur(e,"border-right-width"),i=Ur(e,"border-bottom-width"),s=Ur(e,"border-left-width"),a=Ur(e,"padding-top"),l=Ur(e,"padding-right"),u=Ur(e,"padding-bottom"),d=Ur(e,"padding-left"),f=t.split(" ").length,p=o.split(" ").length,g=f*p;return{numColumns:f,numRows:p,numItems:g,currentColor:Ur(e,"color"),style:{gridTemplateColumns:t,gridTemplateRows:o,gap:Ur(e,"gap"),inset:`
calc(${a} + ${r})
calc(${l} + ${n})
calc(${u} + ${i})
calc(${d} + ${s})
`}}}var ua=c(E(),1);function c1({clientId:e,contentRef:t,parentLayout:o,childGridClientId:r}){let n=(0,gg.useSelect)(a=>a(C).getSettings().isDistractionFree,[]),i=Mt(e);if(n||!i)return null;let s=o?.isManualPlacement&&window.__experimentalEnableGridInteractivity;return(0,ua.jsx)(pQe,{gridClientId:e,gridElement:i,isManualGrid:s,ref:t,childGridClientId:r})}var pQe=(0,pl.forwardRef)(({gridClientId:e,gridElement:t,isManualGrid:o,childGridClientId:r},n)=>{let[i,s]=(0,pl.useState)(()=>uK(t)),[a,l]=(0,pl.useState)(!1),u=Mt(r),d=(0,pl.useMemo)(()=>u?bBe(u):null,[u]);return(0,pl.useEffect)(()=>{let f=()=>s(uK(t)),p=new window.ResizeObserver(f);p.observe(t,{box:"border-box"});let g=new window.ResizeObserver(f);g.observe(t);for(let m of t.children)g.observe(m);return()=>{p.disconnect(),g.disconnect()}},[t]),(0,pl.useEffect)(()=>{function f(){l(!0)}function p(){l(!1)}return document.addEventListener("drag",f),document.addEventListener("dragend",p),()=>{document.removeEventListener("drag",f),document.removeEventListener("dragend",p)}},[]),(0,ua.jsx)(ja,{className:W("block-editor-grid-visualizer",{"is-dropping-allowed":a}),clientId:e,__unstablePopoverSlot:"__unstable-block-tools-after",children:(0,ua.jsx)("div",{ref:n,className:"block-editor-grid-visualizer__grid",style:i.style,children:o?(0,ua.jsx)(gQe,{gridClientId:e,gridInfo:i,childGridRect:d}):(0,ua.jsx)(mQe,{gridInfo:i,childGridRect:d})})})});function mQe({gridInfo:e,childGridRect:t}){return l1(1,e.numRows).map(o=>l1(1,e.numColumns).map(r=>{let n=e.currentColor;return t?.contains(r,o)&&(n="transparent"),(0,ua.jsx)(vBe,{color:n},`${o}-${r}`)}))}function gQe({gridClientId:e,gridInfo:t,childGridRect:o}){let[r,n]=(0,pl.useState)(null),i=(0,gg.useSelect)(a=>{let{getBlockOrder:l,getBlockStyles:u}=U(a(C)),d=l(e);return u(d)},[e]),s=(0,pl.useMemo)(()=>{let a=[];for(let l of Object.values(i)){let{columnStart:u,rowStart:d,columnSpan:f=1,rowSpan:p=1}=l?.layout??{};!u||!d||a.push(new Sc({columnStart:u,rowStart:d,columnSpan:f,rowSpan:p}))}return a},[i]);return l1(1,t.numRows).map(a=>l1(1,t.numColumns).map(l=>{let u=o?.contains(l,a),d=t.currentColor;u&&(d="transparent");let f=s.some(g=>g.contains(l,a)),p=r?.contains(l,a)??!1;return(0,ua.jsx)(vBe,{color:d,className:p&&"is-highlighted",children:f&&!u?(0,ua.jsx)(hQe,{column:l,row:a,gridClientId:e,gridInfo:t,setHighlightedRect:n}):(0,ua.jsx)(bQe,{column:l,row:a,gridClientId:e,gridInfo:t,setHighlightedRect:n})},`${a}-${l}`)}))}function vBe({color:e,children:t,className:o}){return(0,ua.jsx)("div",{className:W("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 SBe(e,t,o,r,n){let{getBlockAttributes:i,getBlockRootClientId:s,canInsertBlockType:a,getBlockName:l}=(0,gg.useSelect)(C),{updateBlockAttributes:u,moveBlocksToPosition:d,__unstableMarkNextChangeAsNotPersistent:f}=(0,gg.useDispatch)(C),p=Fb(o,r.numColumns);return yQe({validateDrag(g){let m=l(g);if(!a(m,o))return!1;let h=i(g),b=new Sc({columnStart:e,rowStart:t,columnSpan:h.style?.layout?.columnSpan,rowSpan:h.style?.layout?.rowSpan});return new Sc({columnSpan:r.numColumns,rowSpan:r.numRows}).containsRect(b)},onDragEnter(g){let m=i(g);n(new Sc({columnStart:e,rowStart:t,columnSpan:m.style?.layout?.columnSpan,rowSpan:m.style?.layout?.rowSpan}))},onDragLeave(){n(g=>g?.columnStart===e&&g?.rowStart===t?null:g)},onDrop(g){n(null);let m=i(g);u(g,{style:{...m.style,layout:{...m.style?.layout,columnStart:e,rowStart:t}}}),f(),d([g],s(g),o,p(e,t))}})}function hQe({column:e,row:t,gridClientId:o,gridInfo:r,setHighlightedRect:n}){return(0,ua.jsx)("div",{className:"block-editor-grid-visualizer__drop-zone",ref:SBe(e,t,o,r,n)})}function bQe({column:e,row:t,gridClientId:o,gridInfo:r,setHighlightedRect:n}){let{updateBlockAttributes:i,moveBlocksToPosition:s,__unstableMarkNextChangeAsNotPersistent:a}=(0,gg.useDispatch)(C),l=Fb(o,r.numColumns);return(0,ua.jsx)(Yp,{rootClientId:o,className:"block-editor-grid-visualizer__appender",ref:SBe(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,l(e,t)))}})}function yQe({validateDrag:e,onDragEnter:t,onDragLeave:o,onDrop:r}){let{getDraggedBlockClientIds:n}=(0,gg.useSelect)(C);return(0,yBe.__experimentalUseDropZone)({onDragEnter(){let[i]=n();i&&e(i)&&t(i)},onDragLeave(){o()},onDrop(){let[i]=n();i&&e(i)&&r(i)}})}var kBe=c(H(),1),u1=c(F(),1);var d5=c(E(),1);function dK({clientId:e,bounds:t,onChange:o,parentLayout:r}){let n=Mt(e),i=n?.parentElement,{isManualPlacement:s}=r;return!n||!i?null:(0,d5.jsx)(vQe,{clientId:e,bounds:t,blockElement:n,rootBlockElement:i,onChange:o,isManualGrid:s&&window.__experimentalEnableGridInteractivity})}function vQe({clientId:e,bounds:t,blockElement:o,rootBlockElement:r,onChange:n,isManualGrid:i}){let[s,a]=(0,u1.useState)(null),[l,u]=(0,u1.useState)({top:!1,bottom:!1,left:!1,right:!1});(0,u1.useEffect)(()=>{let g=new window.ResizeObserver(()=>{let m=o.getBoundingClientRect(),h=r.getBoundingClientRect(),b=m.top>h.top,v=m.bottom<h.bottom,y=m.left>h.left,k=m.right<h.right;u({top:(i||!v)&&b,bottom:v,left:(i||!k)&&y,right:k})});return g.observe(o),()=>g.disconnect()},[o,r,i]);let d={right:"left",left:"right"},f={top:"flex-end",bottom:"flex-start"},p={display:"flex",justifyContent:"center",alignItems:"center",...d[s]&&{justifyContent:d[s]},...f[s]&&{alignItems:f[s]}};return(0,d5.jsx)(ja,{className:"block-editor-grid-item-resizer",clientId:e,__unstablePopoverSlot:"__unstable-block-tools-after",additionalStyles:p,children:(0,d5.jsx)(kBe.ResizableBox,{className:"block-editor-grid-item-resizer__box",size:{width:"100%",height:"100%"},enable:{bottom:l.bottom,bottomLeft:!1,bottomRight:!1,left:l.left,right:l.right,top:l.top,topLeft:!1,topRight:!1},bounds:t,boundsByDirection:!0,onPointerDown:({target:g,pointerId:m})=>{g.setPointerCapture(m)},onResizeStart:(g,m)=>{a(m)},onResizeStop:(g,m,h)=>{let b=parseFloat(Ur(r,"column-gap")),v=parseFloat(Ur(r,"row-gap")),y=a1(Ur(r,"grid-template-columns"),b),k=a1(Ur(r,"grid-template-rows"),v),S=new window.DOMRect(o.offsetLeft+h.offsetLeft,o.offsetTop+h.offsetTop,h.offsetWidth,h.offsetHeight),_=_f(y,S.left)+1,x=_f(k,S.top)+1,w=_f(y,S.right,"end")+1,T=_f(k,S.bottom,"end")+1;n({columnSpan:w-_+1,rowSpan:T-x+1,columnStart:i?_:void 0,rowStart:i?x:void 0})}})})}var ml=c(G(),1),f5=c(H(),1);var _Be=c(Z(),1),xBe=c(fe(),1);var hi=c(E(),1);function fK({layout:e,parentLayout:t,onChange:o,gridClientId:r,blockClientId:n}){let{moveBlocksToPosition:i,__unstableMarkNextChangeAsNotPersistent:s}=(0,_Be.useDispatch)(C),a=e?.columnStart??1,l=e?.rowStart??1,u=e?.columnSpan??1,d=e?.rowSpan??1,f=a+u-1,p=l+d-1,g=t?.columnCount,m=t?.rowCount,h=Fb(r,g);return(0,hi.jsx)(Po,{group:"parent",children:(0,hi.jsxs)(f5.ToolbarGroup,{className:"block-editor-grid-item-mover__move-button-container",children:[(0,hi.jsx)("div",{className:"block-editor-grid-item-mover__move-horizontal-button-container is-left",children:(0,hi.jsx)(d1,{icon:(0,ml.isRTL)()?rn:yi,label:(0,ml.__)("Move left"),description:(0,ml.__)("Move left"),isDisabled:a<=1,onClick:()=>{o({columnStart:a-1}),s(),i([n],r,r,h(a-1,l))}})}),(0,hi.jsxs)("div",{className:"block-editor-grid-item-mover__move-vertical-button-container",children:[(0,hi.jsx)(d1,{className:"is-up-button",icon:Tg,label:(0,ml.__)("Move up"),description:(0,ml.__)("Move up"),isDisabled:l<=1,onClick:()=>{o({rowStart:l-1}),s(),i([n],r,r,h(a,l-1))}}),(0,hi.jsx)(d1,{className:"is-down-button",icon:on,label:(0,ml.__)("Move down"),description:(0,ml.__)("Move down"),isDisabled:m&&p>=m,onClick:()=>{o({rowStart:l+1}),s(),i([n],r,r,h(a,l+1))}})]}),(0,hi.jsx)("div",{className:"block-editor-grid-item-mover__move-horizontal-button-container is-right",children:(0,hi.jsx)(d1,{icon:(0,ml.isRTL)()?yi:rn,label:(0,ml.__)("Move right"),description:(0,ml.__)("Move right"),isDisabled:g&&f>=g,onClick:()=>{o({columnStart:a+1}),s(),i([n],r,r,h(a+1,l))}})})]})})}function d1({className:e,icon:t,label:o,isDisabled:r,onClick:n,description:i}){let a=`block-editor-grid-item-mover-button__description-${(0,xBe.useInstanceId)(d1)}`;return(0,hi.jsxs)(hi.Fragment,{children:[(0,hi.jsx)(f5.ToolbarButton,{className:W("block-editor-grid-item-mover-button",e),icon:t,label:o,"aria-describedby":a,onClick:r?null:n,disabled:r,accessibleWhenDisabled:!0}),(0,hi.jsx)(pt,{id:a,children:i})]})}var f1=c(Z(),1),m5=c(F(),1),p5=c(fe(),1);function pK({clientId:e}){let{gridLayout:t,blockOrder:o,selectedBlockLayout:r}=(0,f1.useSelect)(p=>{let{getBlockAttributes:g,getBlockOrder:m}=p(C),h=p(C).getSelectedBlock();return{gridLayout:g(e).layout??{},blockOrder:m(e),selectedBlockLayout:h?.attributes.style?.layout}},[e]),{getBlockAttributes:n,getBlockRootClientId:i}=(0,f1.useSelect)(C),{updateBlockAttributes:s,__unstableMarkNextChangeAsNotPersistent:a}=(0,f1.useDispatch)(C),l=(0,m5.useMemo)(()=>r?new Sc(r):null,[r]),u=(0,p5.usePrevious)(l),d=(0,p5.usePrevious)(t.isManualPlacement),f=(0,p5.usePrevious)(o);(0,m5.useEffect)(()=>{let p={};if(t.isManualPlacement){let g=[];for(let h of o){let{columnStart:b,rowStart:v,columnSpan:y=1,rowSpan:k=1}=n(h).style?.layout??{};!b||!v||g.push(new Sc({columnStart:b,rowStart:v,columnSpan:y,rowSpan:k}))}for(let h of o){let b=n(h),{columnStart:v,rowStart:y,columnSpan:k=1,rowSpan:S=1}=b.style?.layout??{};if(v&&y)continue;let[_,x]=SQe(g,t.columnCount,k,S,u?.columnEnd,u?.rowEnd);g.push(new Sc({columnStart:_,rowStart:x,columnSpan:k,rowSpan:S})),p[h]={style:{...b.style,layout:{...b.style?.layout,columnStart:_,rowStart:x}}}}let m=Math.max(...g.map(h=>h.rowEnd));(!t.rowCount||t.rowCount<m)&&(p[e]={layout:{...t,rowCount:m}});for(let h of f??[])if(!o.includes(h)){let b=i(h);if(b===null||n(b)?.layout?.type==="grid")continue;let y=n(h),{columnStart:k,rowStart:S,columnSpan:_,rowSpan:x,...w}=y.style?.layout??{};if(k||S||_||x){let T=Object.keys(w).length===0;p[h]=Ve(y,["style","layout"],T?void 0:w)}}}else{if(d===!0)for(let g of o){let m=n(g),{columnStart:h,rowStart:b,...v}=m.style?.layout??{};if(h||b){let y=Object.keys(v).length===0;p[g]=Ve(m,["style","layout"],y?void 0:v)}}t.rowCount&&(p[e]={layout:{...t,rowCount:void 0}})}Object.keys(p).length&&(a(),s(Object.keys(p),p,!0))},[e,t,f,o,u,d,a,n,i,s])}function SQe(e,t,o,r,n=1,i=1){for(let s=i;;s++)for(let a=s===i?n:1;a<=t;a++){let l=new Sc({columnStart:a,rowStart:s,columnSpan:o,rowSpan:r});if(!e.some(u=>u.intersectsRect(l)))return[a,s]}}var xf=c(E(),1),{getResponsiveMediaQueries:kQe}=U(Yn),_Qe={},hg={fit:"fit",grow:"fill",max:"fixed",fixed:"fixedNoShrink"},xQe=[hg.max,hg.fixed];function wBe(e){return xQe.includes(e)}function TBe({selector:e,declarations:t}){return`${e} {
${Object.entries(t).map(([o,r])=>`${o}: ${r}`).join("; ")};
}`}function RBe({selector:e,layout:t={},viewportOverrides:o,parentLayout:r={},includeContainerQuery:n=!0}){let i=o!==void 0,s=i?{...t,...o}:t,a=k=>Object.hasOwn(o||{},k),{selfStretch:l,flexSize:u,columnStart:d,rowStart:f,columnSpan:p,rowSpan:g}=s,m=t.selfStretch,{columnCount:h,minimumColumnWidth:b}=r,v=[],y={};if((!i||a("selfStretch")||a("flexSize"))&&(i&&(l===hg.fit||l===hg.grow)&&wBe(m)&&t.flexSize&&(y["flex-basis"]="unset",m===hg.fixed&&(y["flex-shrink"]="unset")),wBe(l)&&u?(y["flex-basis"]=u,l===hg.fixed?y["flex-shrink"]="0":i&&m===hg.fixed&&(y["flex-shrink"]="unset"),y["box-sizing"]="border-box"):l===hg.grow&&(y["flex-grow"]="1")),(!i||a("columnStart")||a("columnSpan"))&&(d&&p?y["grid-column"]=`${d} / span ${p}`:d?y["grid-column"]=`${d}`:p&&(y["grid-column"]=`span ${p}`)),(!i||a("rowStart")||a("rowSpan"))&&(f&&g?y["grid-row"]=`${f} / span ${g}`:f?y["grid-row"]=`${f}`:g&&(y["grid-row"]=`span ${g}`)),Object.keys(y).length&&v.push({selector:e,declarations:y}),n&&!i&&(p||d)&&(b||!h)){let k=parseFloat(b);isNaN(k)&&(k=12);let S=b?.replace(k,"");["px","rem","em"].includes(S)||(S="rem");let _=2;p&&d?_=p+d-1:p?_=p:_=d;let x=S==="px"?24:1.5,w=_*k+(_-1)*x,T=k*2+x-1,B=p&&p>1?"1/-1":"auto";v.push({rulesGroup:`@container (max-width: ${Math.max(w,T)}${S})`,selector:e,declarations:{"grid-column":B,"grid-row":"auto"}})}return v}function wQe({selector:e,layout:t={},parentLayout:o={},includeContainerQuery:r=!0}){return RBe({selector:e,layout:t,parentLayout:o,includeContainerQuery:r}).map(n=>{let i=TBe(n);return n.rulesGroup?`${n.rulesGroup} {
${i}
}`:i}).join("")}function CQe({style:e={},selector:t,parentLayout:o={},viewportSettings:r}){let n=e?.layout??{};return Object.entries(kQe(r)).map(([i,s])=>{let a=Io(e,{viewport:i,pseudo:Ks.pseudo})?.layout;if(!a||!Object.keys(a).length)return"";let u=RBe({selector:t,layout:n,viewportOverrides:a,parentLayout:o,includeContainerQuery:!1}).map(TBe).join("");return u?`${s}{${u}}`:""}).filter(Boolean).join("")}function EQe({style:e}){let{shouldRenderChildLayoutStyles:t,viewportSettings:o}=(0,g5.useSelect)(p=>{let g=p(C).getSettings();return{shouldRenderChildLayoutStyles:!g.disableLayoutStyles,viewportSettings:g?.__experimentalFeatures?.viewport}}),r=e?.layout??{},{columnStart:n,rowStart:i,columnSpan:s,rowSpan:a}=r,l=$g()||{},u=(0,CBe.useInstanceId)(_Qe),d=`.wp-container-content-${u}`,f="";if(t&&(f=[wQe({selector:d,layout:r,parentLayout:l}),CQe({style:e,selector:d,parentLayout:l,viewportSettings:o})].join("")),hs({css:f}),!!f)return{className:`wp-container-content-${u}`}}function TQe({clientId:e,style:t,setAttributes:o}){let r=$g()||{},{type:n="default",allowSizingOnChildren:i=!1,isManualPlacement:s}=r;return n!=="grid"?null:(0,xf.jsx)(RQe,{clientId:e,style:t,setAttributes:o,allowSizingOnChildren:i,isManualPlacement:s,parentLayout:r})}function RQe({clientId:e,style:t,setAttributes:o,allowSizingOnChildren:r,isManualPlacement:n,parentLayout:i}){let{rootClientId:s,isVisible:a,parentBlockVisibility:l,blockBlockVisibility:u,deviceType:d,viewportSettings:f,isChildBlockAGrid:p}=(0,g5.useSelect)(B=>{let{getBlockRootClientId:R,getBlockEditingMode:A,getTemplateLock:O,getBlockAttributes:P,getSettings:L}=B(C),M=R(e);if(O(M)||A(M)!=="default")return{rootClientId:M,isVisible:!1};let z=P(M),V=P(e),I=L(),N=I?.[ga]?.toLowerCase()||to.desktop.key;return{rootClientId:M,isVisible:!0,parentBlockVisibility:z?.metadata?.blockVisibility,blockBlockVisibility:V?.metadata?.blockVisibility,deviceType:N,viewportSettings:I?.__experimentalFeatures?.viewport,isChildBlockAGrid:V?.layout?.type==="grid"}},[e]),m=Mt(e)?.ownerDocument?.defaultView,h=m===null?void 0:m,{isBlockCurrentlyHidden:b,currentViewport:v}=Ea({blockVisibility:l,deviceType:d,view:h,viewportSettings:f}),y=(0,g5.useSelect)(B=>{if(!s)return!1;let{isBlockParentHiddenAtViewport:R}=U(B(C));return R(s,v)},[s,v]),{isBlockCurrentlyHidden:k}=Ea({blockVisibility:u,deviceType:d,view:h,viewportSettings:f}),[S,_]=(0,EBe.useState)(),x=p?e:void 0;if(!a||b||y)return null;let w=r&&!k;function T(B){o({style:{...t,layout:{...t?.layout,...B}}})}return(0,xf.jsxs)(xf.Fragment,{children:[(0,xf.jsx)(c1,{clientId:s,contentRef:_,parentLayout:i,childGridClientId:x}),w&&(0,xf.jsx)(dK,{clientId:e,bounds:S,onChange:T,parentLayout:i}),n&&window.__experimentalEnableGridInteractivity&&(0,xf.jsx)(fK,{layout:t?.layout,parentLayout:i,onChange:T,gridClientId:s,blockClientId:e})]})}var mK={useBlockProps:EQe,edit:TQe,attributeKeys:["style"],hasSupport(){return!0}};var hK=c(uo(),1),gK=c(ce(),1),BBe="metadata";function BQe(e){return e?.attributes?.[BBe]?.type||(e.attributes={...e.attributes,[BBe]:{type:"object"}}),e}function PQe(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,gK.hasBlockSupport)(e.name,"renaming",!0)&&(i.name=n.name),n.blockVisibility!==void 0&&!e.attributes?.metadata?.blockVisibility&&(0,gK.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,hK.addFilter)("blocks.registerBlockType","core/metadata/addMetaAttribute",BQe);(0,hK.addFilter)("blocks.switchToBlockType.transformedBlock","core/metadata/addTransforms",PQe);var bK=c(G(),1),h5=c(F(),1),b5=c(H(),1),y5=c(ce(),1),z_=c(Z(),1);var bg=c(E(),1),IQe={};function OQe({name:e,clientId:t,metadata:{ignoredHookedBlocks:o=[]}={}}){let r=(0,z_.useSelect)(g=>g(y5.store).getBlockTypes(),[]),n=(0,h5.useMemo)(()=>r?.filter(({name:g,blockHooks:m})=>m&&e in m||o.includes(g)),[r,e,o]),i=(0,z_.useSelect)(g=>{let{getBlocks:m,getBlockRootClientId:h,getGlobalBlockCount:b}=g(C),v=h(t),y=n.reduce((k,S)=>{if(b(S.name)===0)return k;let _=S?.blockHooks?.[e],x;switch(_){case"before":case"after":x=m(v);break;case"first_child":case"last_child":x=m(t);break;case void 0:x=[...m(v),...m(t)];break}let w=x?.find(T=>T.name===S.name);return w?{...k,[S.name]:w.clientId}:k},{});return Object.values(y).length>0?y:IQe},[n,e,t]),{getBlockIndex:s,getBlockCount:a,getBlockRootClientId:l}=(0,z_.useSelect)(C),{insertBlock:u,removeBlock:d}=(0,z_.useDispatch)(C);if(!n.length)return null;let f=n.reduce((g,m)=>{let[h]=m.name.split("/");return g[h]||(g[h]=[]),g[h].push(m),g},{}),p=(g,m)=>{let h=s(t),b=a(t),v=l(t);switch(m){case"before":case"after":u(g,m==="after"?h+1:h,v,!1);break;case"first_child":case"last_child":u(g,m==="first_child"?0:b,t,!1);break;case void 0:u(g,h+1,v,!1);break}};return(0,bg.jsx)(Oe,{children:(0,bg.jsxs)(b5.PanelBody,{className:"block-editor-hooks__block-hooks",title:(0,bK.__)("Plugins"),initialOpen:!0,children:[(0,bg.jsx)("p",{className:"block-editor-hooks__block-hooks-helptext",children:(0,bK.__)("Manage the inclusion of blocks added automatically by plugins.")}),Object.keys(f).map(g=>(0,bg.jsxs)(h5.Fragment,{children:[(0,bg.jsx)("h3",{children:g}),f[g].map(m=>{let h=m.name in i;return(0,bg.jsx)(b5.ToggleControl,{checked:h,label:m.title,onChange:()=>{if(!h){let b=m.blockHooks[e];p((0,y5.createBlock)(m.name),b);return}d(i[m.name],!1)}},m.title)})]},g))]})})}var PBe={edit:OQe,attributeKeys:["metadata"],hasSupport(){return!0}};var yK=c(G(),1),IBe=c(ce(),1),j_=c(H(),1),OBe=c(Z(),1),ABe=c(F(),1),LBe=c(fe(),1);var yg=c(E(),1),AQe=()=>(0,LBe.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}},LQe=({name:e,metadata:t})=>{let o=(0,ABe.useContext)(Kn),{removeAllBlockBindings:r}=Ju(),n=AQe(),{bindableAttributes:i,hasCompatibleFields:s}=(0,OBe.useSelect)(l=>{let{__experimentalBlockBindingsSupportedAttributes:u}=l(C).getSettings(),{getAllBlockBindingsSources:d,getBlockBindingsSourceFieldsList:f}=U(l(IBe.store));return{bindableAttributes:u?.[e],hasCompatibleFields:Object.values(d()).some(p=>f(p,o)?.length>0)}},[e,o]);if(!i||i.length===0)return null;let{bindings:a}=t||{};return a===void 0&&!s?null:(0,yg.jsx)(Oe,{group:"bindings",children:(0,yg.jsxs)(j_.__experimentalToolsPanel,{label:(0,yK.__)("Attributes"),resetAll:()=>{r()},dropdownMenuProps:n,className:"block-editor-bindings__panel",children:[(0,yg.jsx)(j_.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:i.map(l=>(0,yg.jsx)(dw,{attribute:l,blockName:e,binding:a?.[l]},l))}),(0,yg.jsx)(j_.__experimentalText,{as:"div",variant:"muted",children:(0,yg.jsx)("p",{children:(0,yK.__)("Attributes connected to custom fields or other dynamic data.")})})]})})},MBe={edit:LQe,attributeKeys:["metadata"],hasSupport(e){return!["core/post-date","core/navigation-link","core/navigation-submenu"].includes(e)}};var NBe=c(G(),1),DBe=c(H(),1),k5=c(Z(),1),_5=c(ce(),1),VBe=c(F(),1);var v5=c(Z(),1);function S5(e){let{isOpened:t,expandRevision:o}=(0,v5.useSelect)(i=>{let{isListViewPanelOpened:s,getListViewExpandRevision:a}=U(i(C));return{isOpened:s(e),expandRevision:a()}},[e]),{__unstableToggleListViewPanel:r}=(0,v5.useDispatch)(C);return{isOpened:t,expandRevision:o,handleToggle:i=>{r(e,i)}}}var H_=c(E(),1),MQe="listView";function NQe(e){return(0,_5.hasBlockSupport)(e,MQe)}function DQe({clientId:e,name:t}){let{isSelectionWithinCurrentSection:o}=(0,VBe.useContext)(Rn),{isOpened:r,expandRevision:n,handleToggle:i}=S5(e),{openListViewContentPanel:s}=U((0,k5.useDispatch)(C)),{isEnabled:a,hasChildren:l,isNestedListView:u}=(0,k5.useSelect)(g=>{let{getBlockCount:m,getBlockParents:h,shouldRenderBlockListView:b}=U(g(C)),y=h(e,!1).find(k=>b(k));return{isEnabled:b(e),hasChildren:!!m(e),isNestedListView:y}},[e]),f=(0,_5.getBlockType)(t)?.title||t;return!a||u?null:(0,H_.jsx)(tb,{group:"list",children:(0,H_.jsxs)(DBe.PanelBody,{title:o?f:void 0,opened:r,onToggle:i,children:[!l&&(0,H_.jsx)("p",{className:"block-editor-block-inspector__no-blocks",children:(0,NBe.__)("No items yet.")}),(0,H_.jsx)(YC,{rootClientId:e,isExpanded:!0,description:f,showAppender:!0,onSelect:s},`${e}-${n}`)]})})}var FBe={edit:DQe,hasSupport:NQe,attributeKeys:[],supportsPatternEditing:!0};var zBe=c(uo(),1),jBe=c(ce(),1);function VQe(e){return e.__experimentalLabel||(0,jBe.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,zBe.addFilter)("blocks.registerBlockType","core/metadata/addLabelCallback",VQe);var HBe=c(fe(),1),UBe=c(uo(),1),vK=c(Z(),1);var gl=c(E(),1);function FQe(e){pK(e)}function zQe({clientId:e,layout:t}){let{isVisible:o,blockVisibility:r,deviceType:n,viewportSettings:i}=(0,vK.useSelect)(p=>{let{isBlockSelected:g,hasSelectedInnerBlock:m,isDraggingBlocks:h,getTemplateLock:b,getBlockEditingMode:v,getBlockAttributes:y,getSettings:k}=p(C);if(!h()&&!g(e)||b(e)||v(e)!=="default"||m(e))return{isVisible:!1};let S=y(e),_=k(),x=_?.[ga]?.toLowerCase()||to.desktop.key;return{isVisible:!0,blockVisibility:S?.metadata?.blockVisibility,deviceType:x,viewportSettings:_?.__experimentalFeatures?.viewport}},[e]),a=Mt(e)?.ownerDocument?.defaultView,l=a===null?void 0:a,{isBlockCurrentlyHidden:u,currentViewport:d}=Ea({blockVisibility:r,deviceType:n,view:l,viewportSettings:i}),f=(0,vK.useSelect)(p=>{if(!o)return!1;let{isBlockParentHiddenAtViewport:g}=U(p(C));return g(e,d)},[e,d,o]);return(0,gl.jsxs)(gl.Fragment,{children:[(0,gl.jsx)(FQe,{clientId:e}),o&&!u&&!f&&(0,gl.jsx)(c1,{clientId:e,parentLayout:t})]})}var jQe=(0,HBe.createHigherOrderComponent)(e=>function(o){return o.attributes.layout?.type!=="grid"?(0,gl.jsx)(e,{...o},"edit"):(0,gl.jsxs)(gl.Fragment,{children:[(0,gl.jsx)(zQe,{clientId:o.clientId,layout:o.attributes.layout}),(0,gl.jsx)(e,{...o},"edit")]})},"addGridVisualizerToBlockEdit");(0,UBe.addFilter)("editor.BlockEdit","core/editor/grid-visualizer",jQe);var p1=c(ce(),1),WBe=c(H(),1),$Be=c(Z(),1);var w5=c(F(),1),KBe=c(G(),1);function GBe(e){let t=[],o=[];return Object.entries(e).forEach(([r,n])=>{if(!n.autoGenerateControl)return;let i=HQe(r,n);i&&(t.push(i),o.push(r))}),{fields:t,form:{fields:o}}}function HQe(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 x5=c(E(),1);function UQe(e){return e?Object.values(e).some(t=>t?.autoGenerateControl):!1}function GQe({name:e,clientId:t,setAttributes:o}){let r=yr(),n=(0,w5.useContext)(Kn),i=(0,$Be.useSelect)(u=>{let d=u(C).getBlockAttributes(t);if(!d?.metadata?.bindings)return d;let{getBlockBindingsSource:f}=U(u(p1.store));return Object.entries(d.metadata.bindings).reduce((p,[g,m])=>{let h=f(m.source);if(!h)return p;let b=h.getValues({select:u,context:n,bindings:{[g]:m}});return{...p,...b}},d)},[n,t]),s=(0,p1.getBlockType)(e),{fields:a,form:l}=(0,w5.useMemo)(()=>s?.attributes?GBe(s.attributes):{fields:[],form:{fields:[]}},[s?.attributes]);return r!=="default"||!a||a.length===0?null:(0,x5.jsx)(Oe,{children:(0,x5.jsx)(WBe.PanelBody,{title:(0,KBe.__)("Settings"),children:(0,x5.jsx)(QE,{data:i,fields:a,form:l,onChange:o})})})}var YBe={edit:GQe,attributeKeys:[],hasSupport(e){let t=(0,p1.getBlockType)(e);return UQe(t?.attributes)}};function C5(e){let{style:t}=e,o=t?.dimensions||{},r=ca({dimensions:o});return{className:o.aspectRatio?"has-aspect-ratio":void 0,style:r}}function E5(e){let t=e.style?.border||{};return{className:xW(e)||void 0,style:ca({border:t})}}function SK(e){let{colors:t}=wm(),o=E5(e),{borderColor:r}=e;if(r){let n=Ub({colors:t,namedColor:r});o.style.borderColor=n.color}return o}function kK(e){let t=e.style?.shadow||"";return{style:ca({shadow:t})}}var _K=c(F(),1);function T5(e){let{backgroundColor:t,textColor:o,gradient:r,style:n}=e,i=ma("background-color",t),s=ma("color",o),a=jy(r),l=a||n?.color?.gradient,u=W(s,a,{[i]:!l&&!!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=ca({color:d});return{className:u||void 0,style:f}}function xK(e){let{backgroundColor:t,textColor:o,gradient:r}=e,[n,i,s,a,l,u]=Me("color.palette.custom","color.palette.theme","color.palette.default","color.gradients.custom","color.gradients.theme","color.gradients.default"),d=(0,_K.useMemo)(()=>[...n||[],...i||[],...s||[]],[n,i,s]),f=(0,_K.useMemo)(()=>[...a||[],...l||[],...u||[]],[a,l,u]),p=T5(e);if(t){let g=wc(d,t);p.style.backgroundColor=g.color}if(r&&(p.style.background=fB(f,r)),o){let g=wc(d,o);p.style.color=g.color}return p}function wK(e){let{style:t}=e,o=t?.spacing||{};return{style:ca({spacing:o})}}var qBe=c(H(),1);var{kebabCase:WQe}=U(qBe.privateApis);function CK(e,t){let o=e?.style?.typography||{};o={...o,fontSize:Gu({size:e?.style?.typography?.fontSize},t)};let r=ca({typography:o}),n=e?.fontFamily?`has-${WQe(e.fontFamily)}-font-family`:"",i=e?.style?.typography?.textAlign?`has-text-align-${e?.style?.typography?.textAlign}`:"";return{className:W(n,i,Kf(e?.fontSize)),style:r}}var R5=c(F(),1);function EK(e){let[t,o]=(0,R5.useState)(e);return(0,R5.useEffect)(()=>{e&&o(e)},[e]),t}rEe([jD,wD,m$,Y$,o5,s5,nK,ED,MU,hBe,PBe,MBe,mK,CEe,FRe,FBe,YBe].filter(Boolean));nEe([jD,wD,$0e,o5,BW,qRe,nK,OW,LW,ED,wW,s5,MU,ihe,mK]);iEe([jD,wD,m$,REe,Y$,wW,s5,ED,BW,o5,OW,LW]);var ZBe={button:"wp-element-button",caption:"wp-element-caption"},$Qe=e=>ZBe[e]?ZBe[e]:"";var XBe=()=>"";var U_=c(F(),1),m1=c(ce(),1),RK=c(jo(),1);var QBe=c(E(),1);function BK(e,t,o){if(e==null||e===!1)return;if(Array.isArray(e))return TK(e,t,o);switch(typeof e){case"string":case"number":return}let{type:r,props:n}=e;switch(r){case U_.StrictMode:case U_.Fragment:return TK(n.children,t,o);case U_.RawHTML:return;case hC.Content:return JBe(t,o);case mE:t.push(n.value);return}switch(typeof r){case"string":return typeof n.children<"u"?TK(n.children,t,o):void 0;case"function":let i=r.prototype&&typeof r.prototype.render=="function"?new r(n).render():r(n);return BK(i,t,o)}}function TK(e,...t){e=Array.isArray(e)?e:[e];for(let o=0;o<e.length;o++)BK(e[o],...t)}function JBe(e,t){for(let o=0;o<t.length;o++){let{name:r,attributes:n,innerBlocks:i}=t[o],s=(0,m1.getSaveElement)(r,n,(0,QBe.jsx)(hC.Content,{}));BK(s,e,i)}}function ePe(e=[]){m1.__unstableGetBlockProps.skipFilters=!0;let t=[];return JBe(t,e),m1.__unstableGetBlockProps.skipFilters=!1,t.map(o=>o instanceof RK.RichTextData?o:RK.RichTextData.fromHTMLString(o))}var tPe=c(H(),1);var PK=c(E(),1);function oPe({clientId:e,resizableBoxProps:t,...o}){return(0,PK.jsx)(ja,{clientId:e,__unstablePopoverSlot:"block-toolbar",...o,children:(0,PK.jsx)(tPe.ResizableBox,{...t})})}var h1=c(F(),1),B5=c(Z(),1),kc=c(H(),1),g1=c(G(),1);var hl=c(E(),1);function rPe({rules:e}){let[t,o]=(0,h1.useState)(!1),{clientIds:r,selectPrevious:n,message:i}=(0,B5.useSelect)(m=>U(m(C)).getRemovalPromptData()),{clearBlockRemovalPrompt:s,setBlockRemovalRules:a,privateRemoveBlocks:l}=U((0,B5.useDispatch)(C));if((0,h1.useEffect)(()=>(a(e),()=>{a()}),[e,a]),(0,h1.useEffect)(()=>{o(!1)},[r]),!i)return;let u=typeof i=="object"&&i!==null,d=u?i.description:i,f=u&&i.requireConfirmation,p=f&&!t,g=()=>{l(r,n,!0),s()};return(0,hl.jsx)(kc.Modal,{title:(0,g1.__)("Confirm deletion"),onRequestClose:s,size:"medium",children:(0,hl.jsxs)(kc.__experimentalVStack,{spacing:4,children:[(0,hl.jsxs)("div",{children:[(0,hl.jsx)("p",{children:d}),u&&(i.warning||i.subtext)&&(0,hl.jsxs)("p",{children:[i.warning&&(0,hl.jsx)("strong",{children:i.warning}),i.warning&&i.subtext&&" ",i.subtext]})]}),f&&(0,hl.jsx)(kc.CheckboxControl,{label:(0,g1.__)("I understand the consequences"),checked:t,onChange:o}),(0,hl.jsxs)(kc.__experimentalHStack,{justify:"right",children:[(0,hl.jsx)(kc.Button,{variant:"tertiary",onClick:s,__next40pxDefaultSize:!0,children:(0,g1.__)("Cancel")}),(0,hl.jsx)(kc.Button,{variant:"primary",onClick:g,disabled:p,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,g1.__)("Delete")})]})]})})}var IK=c(F(),1);var G_=c(H(),1),iPe=c(F(),1),Is=c(G(),1),P5=c(E(),1),nPe=[{value:"fill",label:(0,Is._x)("Fill","Scale option for dimensions control"),help:(0,Is.__)("Fill the space by stretching the content.")},{value:"contain",label:(0,Is._x)("Contain","Scale option for dimensions control"),help:(0,Is.__)("Fit the content to the space without clipping.")},{value:"cover",label:(0,Is._x)("Cover","Scale option for dimensions control"),help:(0,Is.__)("Fill the space by clipping what doesn't fit.")},{value:"none",label:(0,Is._x)("None","Scale option for dimensions control"),help:(0,Is.__)("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,Is._x)("Scale down","Scale option for dimensions control"),help:(0,Is.__)("Scale down the content to fit the space if it is too big. Content that is too small will have additional padding.")}];function sPe({panelId:e,value:t,onChange:o,options:r=nPe,defaultValue:n=nPe[0].value,isShownByDefault:i=!0}){let s=t??n,a=(0,iPe.useMemo)(()=>r.reduce((l,u)=>(l[u.value]=u.help,l),{}),[r]);return(0,P5.jsx)(G_.__experimentalToolsPanelItem,{label:(0,Is._x)("Scale","Image scaling options"),isShownByDefault:i,hasValue:()=>s!==n,onDeselect:()=>o(n),panelId:e,children:(0,P5.jsx)(G_.__experimentalToggleGroupControl,{label:(0,Is._x)("Scale","Image scaling options"),isBlock:!0,help:a[s],value:s,onChange:o,children:r.map(l=>(0,P5.jsx)(G_.__experimentalToggleGroupControlOption,{...l},l.value))})})}var W_=c(H(),1),cy=c(G(),1),wf=c(E(),1);function aPe({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=l=>u=>{let d={...t};u?d[l]=u:delete d[l],o(d)};return(0,wf.jsxs)(wf.Fragment,{children:[(0,wf.jsx)(W_.__experimentalToolsPanelItem,{style:{gridColumn:"span 1"},label:(0,cy.__)("Width"),isShownByDefault:n,hasValue:()=>i!=="",onDeselect:a("width"),panelId:e,children:(0,wf.jsx)(W_.__experimentalUnitControl,{label:(0,cy.__)("Width"),placeholder:(0,cy.__)("Auto"),labelPosition:"top",units:r,min:0,value:i,onChange:a("width")})}),(0,wf.jsx)(W_.__experimentalToolsPanelItem,{style:{gridColumn:"span 1"},label:(0,cy.__)("Height"),isShownByDefault:n,hasValue:()=>s!=="",onDeselect:a("height"),panelId:e,children:(0,wf.jsx)(W_.__experimentalUnitControl,{label:(0,cy.__)("Height"),placeholder:(0,cy.__)("Auto"),labelPosition:"top",units:r,min:0,value:s,onChange:a("height")})})]})}var vg=c(E(),1);function KQe({panelId:e,value:t={},onChange:o=()=>{},aspectRatioOptions:r,defaultAspectRatio:n="auto",scaleOptions:i,defaultScale:s="cover",unitsOptions:a,tools:l=["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,p=t.scale===void 0?null:t.scale,[g,m]=(0,IK.useState)(p),[h,b]=(0,IK.useState)(f),y=!!(u&&d)?"custom":f,k=f||u&&d;return(0,vg.jsxs)(vg.Fragment,{children:[l.includes("aspectRatio")&&(0,vg.jsx)(UN,{panelId:e,options:r,defaultValue:n,value:y,onChange:S=>{let _={...t};S=S==="auto"?null:S,b(S),S?_.aspectRatio=S:delete _.aspectRatio,S?g?_.scale=g:(_.scale=s,m(s)):delete _.scale,S!=="custom"&&u&&d&&delete _.height,o(_)}}),l.includes("widthHeight")&&(0,vg.jsx)(aPe,{panelId:e,units:a,value:{width:u,height:d},onChange:({width:S,height:_})=>{let x={...t};S=S==="auto"?null:S,_=_==="auto"?null:_,S?x.width=S:delete x.width,_?x.height=_:delete x.height,S&&_?delete x.aspectRatio:h&&(x.aspectRatio=h),!h&&!!S!=!!_?delete x.scale:g?x.scale=g:(x.scale=s,m(s)),o(x)}}),l.includes("scale")&&k&&(0,vg.jsx)(sPe,{panelId:e,options:i,defaultValue:s,value:g,onChange:S=>{let _={...t};m(S),S?_.scale=S:delete _.scale,o(_)}})]})}var lPe=KQe;var I5=c(H(),1),Cf=c(G(),1),OK=c(E(),1),cPe=[{label:(0,Cf._x)("Thumbnail","Image size option for resolution control"),value:"thumbnail"},{label:(0,Cf._x)("Medium","Image size option for resolution control"),value:"medium"},{label:(0,Cf._x)("Large","Image size option for resolution control"),value:"large"},{label:(0,Cf._x)("Full Size","Image size option for resolution control"),value:"full"}];function uPe({panelId:e,value:t,onChange:o,options:r=cPe,defaultValue:n=cPe[0].value,isShownByDefault:i=!0,resetAllFilter:s}){let a=t??n;return(0,OK.jsx)(I5.__experimentalToolsPanelItem,{hasValue:()=>a!==n,label:(0,Cf.__)("Resolution"),onDeselect:()=>o(n),isShownByDefault:i,panelId:e,resetAllFilter:s,children:(0,OK.jsx)(I5.SelectControl,{label:(0,Cf.__)("Resolution"),value:a,options:r,onChange:o,help:(0,Cf.__)("Select the size of the source image.")})})}var uy=c(G(),1),$_=c(H(),1),fPe=c(Z(),1);var _c=c(G(),1),dPe={a:(0,_c.__)("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,_c.__)("The <article> element should represent a self-contained, syndicatable portion of the document."),aside:(0,_c.__)("The <aside> element should represent a portion of a document whose content is only indirectly related to the document's main content."),button:(0,_c.__)("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,_c.__)("The <div> element should only be used if the block is a design element with no semantic meaning."),footer:(0,_c.__)("The <footer> element should represent a footer for its nearest sectioning element (e.g.: <section>, <article>, <main> etc.)."),header:(0,_c.__)("The <header> element should represent introductory content, typically a group of introductory or navigational aids."),main:(0,_c.__)("The <main> element should be used for the primary content of your document only."),nav:(0,_c.__)("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,_c.__)("The <section> element should represent a standalone portion of the document that can't be better represented by another element.")};var b1=c(E(),1);function pPe({tagName:e,onChange:t,clientId:o,options:r=[{label:(0,uy.__)("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,fPe.useSelect)(a=>{if(!n)return!1;let{getClientIdsWithDescendants:l,getBlockAttributes:u}=a(C);return l().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,uy.sprintf)((0,uy.__)("%s (Already in use)"),a.label)}:a);return(0,b1.jsxs)($_.__experimentalVStack,{spacing:2,className:"block-editor-html-element-control",children:[(0,b1.jsx)($_.SelectControl,{label:(0,uy.__)("HTML element"),options:s,value:e,onChange:t,help:dPe[e]}),e==="main"&&i&&(0,b1.jsx)($_.Notice,{status:"warning",isDismissible:!1,children:(0,uy.__)("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 Ef=c(H(),1);var K_=c(F(),1),O5=c(G(),1);var Os=c(H(),1);var mPe=c(Et(),1);var da=c(E(),1),{Badge:YQe}=U(Os.privateApis);function gPe({title:e,url:t,image:o,badges:r}){return(0,da.jsxs)(Os.__experimentalHStack,{justify:"space-between",alignment:"top",children:[(0,da.jsx)(Os.FlexItem,{className:"link-preview-button__content",children:(0,da.jsxs)(Os.__experimentalHStack,{alignment:"top",children:[o&&(0,da.jsx)(Os.FlexItem,{className:"link-preview-button__image-container",children:(0,da.jsx)("img",{className:"link-preview-button__image",src:o,alt:""})}),(0,da.jsxs)(Os.__experimentalVStack,{className:"link-preview-button__details",alignment:"topLeft",children:[(0,da.jsx)(Os.__experimentalTruncate,{numberOfLines:1,className:"link-preview-button__title",children:(0,mPe.__unstableStripHTML)(e)}),t&&(0,da.jsx)(Os.__experimentalTruncate,{numberOfLines:1,className:"link-preview-button__hint",children:t}),r&&r.length>0&&(0,da.jsx)(Os.__experimentalHStack,{className:"link-preview-button__badges",alignment:"left",children:r.map(n=>(0,da.jsx)(YQe,{intent:n.intent,children:n.label},`${n.label}|${n.intent}`))})]})]})}),(0,da.jsx)(ft,{icon:on,className:"link-preview-button__icon"})]})}var fa=c(E(),1);function AK({preview:e,onSelect:t,suggestionsQuery:o,label:r,help:n}){let[i,s]=(0,K_.useState)(!1),a=(0,K_.useId)(),l=`link-picker-title-${a}`,u=`link-picker-description-${a}`,d=(0,K_.useRef)(null),{baseControlProps:f,controlProps:p}=(0,Ef.useBaseControlProps)({help:n}),g=m=>{if(s(!1),m){let h={url:m.url,kind:m.kind,type:m.type,id:m.id,title:m.title};t(h)}};return(0,fa.jsxs)(Ef.BaseControl,{...f,children:[(0,fa.jsx)(Ef.BaseControl.VisualLabel,{children:r}),(0,fa.jsxs)(Ef.Button,{ref:d,onClick:()=>s(!i),"aria-haspopup":"dialog","aria-expanded":i,"aria-describedby":p["aria-describedby"],variant:"secondary",__next40pxDefaultSize:!0,className:"link-preview-button",children:[r&&(0,fa.jsxs)(pt,{children:[r,":"]}),(0,fa.jsx)(gPe,{title:e.title||(0,O5.__)("Add link"),url:e.url,image:e.image,badges:e.badges})]}),i&&(0,fa.jsx)(Ef.Popover,{anchor:d.current,onClose:()=>s(!1),placement:"left-start",offset:36,shift:!0,children:(0,fa.jsxs)("div",{role:"dialog","aria-labelledby":l,"aria-describedby":u,children:[(0,fa.jsxs)(pt,{children:[(0,fa.jsx)("h2",{id:l,children:(0,O5.__)("Select a link")}),(0,fa.jsx)("p",{id:u,children:(0,O5.__)("Search for and add a link to the navigation item.")})]}),(0,fa.jsx)(Pm,{value:null,onChange:g,suggestionsQuery:o,showInitialSuggestions:!0,forceIsEditingLink:!0,settings:[]})]})})]})}var Vu=c(F(),1),A5=c(Z(),1),hPe=c(Et(),1);var Y_=c(E(),1),LK="wp-inner-block-slot",qQe={type:"default",alignments:[]};function bPe({clientId:e}){let{innerContent:t,order:o,selectedClientIds:r}=(0,A5.useSelect)(l=>{let{getBlock:u,getBlockOrder:d,getSelectedBlockClientIds:f}=l(C);return{innerContent:u(e)?.innerContent,order:d(e),selectedClientIds:f()}},[e]),n=(0,Vu.useMemo)(()=>{let l=0;return(t??[]).map(u=>u===null?`<${LK} data-slot-index="${l++}" style="display: contents"></${LK}>`:u).join("")},[t]),i=(0,Vu.useRef)(),[s,a]=(0,Vu.useState)([]);return(0,Vu.useLayoutEffect)(()=>{let l=i.current;l.innerHTML=(0,hPe.safeHTML)(n),a(Array.from(l.querySelectorAll(LK)).sort((u,d)=>Number(u.dataset.slotIndex)-Number(d.dataset.slotIndex)))},[n]),(0,Y_.jsxs)(PB,{value:qQe,children:[(0,Y_.jsx)("div",{ref:i,className:"block-editor-inner-content",style:{display:"contents"}}),o.map((l,u)=>s[u]?(0,Vu.createPortal)((0,Y_.jsx)(A5.AsyncModeProvider,{value:!r.includes(l),children:(0,Y_.jsx)(DP,{rootClientId:e,clientId:l})}),s[u],l):null)]})}var MK={};oY(MK,{...SW,ExperimentalBlockCanvas:w9,BlockCanvasCover:LL,ExperimentalBlockEditorProvider:Xv,getDuotoneFilter:r5,getRichTextValues:ePe,PrivateQuickInserter:KA,extractWords:hB,getNormalizedSearchTerms:iw,normalizeString:nw,PrivateListView:YC,ResizableBoxPopover:oPe,InspectorControlsLastItem:LD,useHasBlockToolbar:uL,cleanEmptyObject:Ge,getStyleForState:Io,isDefaultBlockStyleState:vn,setStyleForState:Sn,usePrivateStyleOverride:Ad,BlockQuickNavigation:ID,LayoutStyle:aX,BlockManager:UD,BlockRemovalWarningModal:rPe,useLayoutClasses:u5,useLayoutStyles:cK,DimensionsTool:lPe,ResolutionTool:uPe,TabbedSidebar:HA,TextAlignmentControl:LN,usesContextKey:HG,useFlashEditableBlocks:RP,HTMLElementControl:pPe,useZoomOut:aC,globalStylesDataKey:Zi,globalStylesLinksDataKey:I1,selectBlockPatternsKey:Pf,requiresWrapperOnCopy:$z,PrivateRichText:gE,PrivateInserterLibrary:ZW,reusableBlocksSelectKey:O1,userPatternCategoriesSelectKey:ju,PrivateBlockPopover:Yh,PrivatePublishDateTimePicker:n$,useSpacingSizes:yN,useBlockDisplayTitle:On,BlockStyleVariationOverridesWithConfig:c9,setBackgroundStyleDefaults:gD,sectionRootClientIdKey:If,NoteIconSlotFill:z2,NoteIconToolbarSlotFill:rL,mediaEditKey:A1,getMediaSelectKey:L1,deviceTypeKey:ga,isIsolatedEditorKey:Of,isNavigationOverlayContextKey:M1,isNavigationPostEditorKey:yY,mediaUploadOnSuccessKey:ox,mediaSideloadFromUrlKey:vY,openMediaEditorModalKey:SY,useBlockElement:Mt,useBlockElementRef:Zg,LinkPicker:AK,useRemoteUrlData:WM,PrivateBlockContext:Rn,useListViewPanelState:S5,isHashLink:Sg,isRelativePath:kg,InnerContent:bPe});return xPe(ZQe);})();
/*! Bundled license information:
autosize/dist/autosize.js:
(*!
autosize 4.0.2
license: MIT
http://www.jacklmoore.com/autosize
*)
use-sync-external-store/cjs/use-sync-external-store-shim.production.js:
(**
* @license React
* use-sync-external-store-shim.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*)
use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js:
(**
* @license React
* use-sync-external-store-shim/with-selector.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*)
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
*)
is-plain-object/dist/is-plain-object.mjs:
(*!
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*)
*/