HEX
Server: nginx/1.28.1
System: Linux VM-0-12-opencloudos 6.6.117-45.oc9.x86_64 #1 SMP Thu Dec 4 10:26:39 CST 2025 x86_64
User: www (1000)
PHP: 7.4.33
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: /www/wwwroot/www.waciwang.com/wp-content/plugins/gutenberg/build/scripts/block-editor/index.min.js
"use strict";var wp;(wp||={}).blockEditor=(()=>{var lme=Object.create;var z_=Object.defineProperty;var cme=Object.getOwnPropertyDescriptor;var ume=Object.getOwnPropertyNames;var dme=Object.getPrototypeOf,fme=Object.prototype.hasOwnProperty;var te=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),$s=(e,t)=>{for(var o in t)z_(e,o,{get:t[o],enumerable:!0})},Tz=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of ume(t))!fme.call(e,n)&&n!==o&&z_(e,n,{get:()=>t[n],enumerable:!(r=cme(t,n))||r.enumerable});return e};var l=(e,t,o)=>(o=e!=null?lme(dme(e)):{},Tz(t||!e||!e.__esModule?z_(o,"default",{value:e,enumerable:!0}):o,e)),mme=e=>Tz(z_({},"__esModule",{value:!0}),e);var Z=te((VAe,Pz)=>{Pz.exports=window.wp.blocks});var I=te((FAe,Rz)=>{Rz.exports=window.wp.element});var M=te((zAe,Oz)=>{Oz.exports=window.wp.data});var Y=te((jAe,Az)=>{Az.exports=window.wp.compose});var Je=te((GAe,Lz)=>{Lz.exports=window.wp.hooks});var P=te(($Ae,Wz)=>{Wz.exports=window.wp.components});var Z_=te((YAe,Zz)=>{Zz.exports=window.wp.privateApis});var Re=te((tLe,qz)=>{qz.exports=window.wp.deprecated});var x=te((oLe,Qz)=>{Qz.exports=window.ReactJSXRuntime});var rn=te((nLe,ej)=>{ej.exports=window.wp.url});var L=te((hLe,aj)=>{aj.exports=window.wp.i18n});var ef=te((gLe,lj)=>{"use strict";lj.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 $=te((BLe,hj)=>{hj.exports=window.wp.primitives});var zo=te((W5e,gj)=>{gj.exports=window.wp.richText});var kj=te((Z5e,bj)=>{bj.exports=window.wp.blockSerializationDefaultParser});var jo=te((_Ve,Jj)=>{Jj.exports=window.wp.a11y});var On=te((xVe,i6)=>{i6.exports=window.wp.notices});var zp=te((wVe,s6)=>{s6.exports=window.wp.preferences});var H6=te((xFe,xw)=>{var z6={\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"},j6=Object.keys(z6).join("|"),ake=new RegExp(j6,"g"),lke=new RegExp(j6,"");function cke(e){return z6[e]}var G6=function(e){return e.replace(ake,cke)},uke=function(e){return!!e.match(lke)};xw.exports=G6;xw.exports.has=uke;xw.exports.remove=G6});var tG=te((WFe,eG)=>{eG.exports=window.wp.apiFetch});var jN=te((ZFe,oG)=>{oG.exports=window.wp.htmlEntities});var Bv=te((k4e,_G)=>{_G.exports=window.wp.styleEngine});var at=te((b3e,WG)=>{WG.exports=window.wp.keycodes});var je=te((M3e,iH)=>{iH.exports=window.wp.dom});var aH=te(tM=>{"use strict";Object.defineProperty(tM,"__esModule",{value:!0});tM.default=sH;function sH(){}sH.prototype={diff:function(t,o){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=r.callback;typeof r=="function"&&(n=r,r={}),this.options=r;var i=this;function s(g){return n?(setTimeout(function(){n(void 0,g)},0),!0):g}t=this.castInput(t),o=this.castInput(o),t=this.removeEmpty(this.tokenize(t)),o=this.removeEmpty(this.tokenize(o));var a=o.length,c=t.length,u=1,d=a+c,f=[{newPos:-1,components:[]}],m=this.extractCommon(f[0],o,t,0);if(f[0].newPos+1>=a&&m+1>=c)return s([{value:this.join(o),count:o.length}]);function p(){for(var g=-1*u;g<=u;g+=2){var b=void 0,k=f[g-1],v=f[g+1],y=(v?v.newPos:0)-g;k&&(f[g-1]=void 0);var _=k&&k.newPos+1<a,w=v&&0<=y&&y<c;if(!_&&!w){f[g]=void 0;continue}if(!_||w&&k.newPos<v.newPos?(b=rve(v),i.pushComponent(b.components,void 0,!0)):(b=k,b.newPos++,i.pushComponent(b.components,!0,void 0)),y=i.extractCommon(b,o,t,g),b.newPos+1>=a&&y+1>=c)return s(ove(i,b.components,o,t,i.useLongestToken));f[g]=b}u++}if(n)(function g(){setTimeout(function(){if(u>d)return n();p()||g()},0)})();else for(;u<=d;){var h=p();if(h)return h}},pushComponent:function(t,o,r){var n=t[t.length-1];n&&n.added===o&&n.removed===r?t[t.length-1]={count:n.count+1,added:o,removed:r}:t.push({count:1,added:o,removed:r})},extractCommon:function(t,o,r,n){for(var i=o.length,s=r.length,a=t.newPos,c=a-n,u=0;a+1<i&&c+1<s&&this.equals(o[a+1],r[c+1]);)a++,c++,u++;return u&&t.components.push({count:u}),t.newPos=a,c},equals:function(t,o){return this.options.comparator?this.options.comparator(t,o):t===o||this.options.ignoreCase&&t.toLowerCase()===o.toLowerCase()},removeEmpty:function(t){for(var o=[],r=0;r<t.length;r++)t[r]&&o.push(t[r]);return o},castInput:function(t){return t},tokenize:function(t){return t.split("")},join:function(t){return t.join("")}};function ove(e,t,o,r,n){for(var i=0,s=t.length,a=0,c=0;i<s;i++){var u=t[i];if(u.removed){if(u.value=e.join(r.slice(c,c+u.count)),c+=u.count,i&&t[i-1].added){var f=t[i-1];t[i-1]=t[i],t[i]=f}}else{if(!u.added&&n){var d=o.slice(a,a+u.count);d=d.map(function(p,h){var g=r[c+h];return g.length>p.length?g:p}),u.value=e.join(d)}else u.value=e.join(o.slice(a,a+u.count));a+=u.count,u.added||(c+=u.count)}}var m=t[s-1];return s>1&&typeof m.value=="string"&&(m.added||m.removed)&&e.equals("",m.value)&&(t[s-2].value+=m.value,t.pop()),t}function rve(e){return{newPos:e.newPos,components:e.components.slice(0)}}});var cH=te(Lv=>{"use strict";Object.defineProperty(Lv,"__esModule",{value:!0});Lv.diffChars=sve;Lv.characterDiff=void 0;var nve=ive(aH());function ive(e){return e&&e.__esModule?e:{default:e}}var lH=new nve.default;Lv.characterDiff=lH;function sve(e,t,o){return lH.diff(e,t,o)}});var Fr=te((q3e,xH)=>{xH.exports=window.React});var CH=te((Q3e,wH)=>{"use strict";var uve="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";wH.exports=uve});var IH=te((J3e,TH)=>{"use strict";var dve=CH();function BH(){}function EH(){}EH.resetWarningCache=BH;TH.exports=function(){function e(r,n,i,s,a,c){if(c!==dve){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:EH,resetWarningCache:BH};return o.PropTypes=o,o}});var RH=te((oze,PH)=>{PH.exports=IH()();var eze,tze});var AH=te((Qw,OH)=>{(function(e,t){if(typeof define=="function"&&define.amd)define(["module","exports"],t);else if(typeof Qw<"u")t(OH,Qw);else{var o={exports:{}};t(o,o.exports),e.autosize=o.exports}})(Qw,function(e,t){"use strict";var o=typeof Map=="function"?new Map:(function(){var c=[],u=[];return{has:function(f){return c.indexOf(f)>-1},get:function(f){return u[c.indexOf(f)]},set:function(f,m){c.indexOf(f)===-1&&(c.push(f),u.push(m))},delete:function(f){var m=c.indexOf(f);m>-1&&(c.splice(m,1),u.splice(m,1))}}})(),r=function(u){return new Event(u,{bubbles:!0})};try{new Event("test")}catch{r=function(d){var f=document.createEvent("Event");return f.initEvent(d,!0,!1),f}}function n(c){if(!c||!c.nodeName||c.nodeName!=="TEXTAREA"||o.has(c))return;var u=null,d=null,f=null;function m(){var y=window.getComputedStyle(c,null);y.resize==="vertical"?c.style.resize="none":y.resize==="both"&&(c.style.resize="horizontal"),y.boxSizing==="content-box"?u=-(parseFloat(y.paddingTop)+parseFloat(y.paddingBottom)):u=parseFloat(y.borderTopWidth)+parseFloat(y.borderBottomWidth),isNaN(u)&&(u=0),b()}function p(y){{var _=c.style.width;c.style.width="0px",c.offsetWidth,c.style.width=_}c.style.overflowY=y}function h(y){for(var _=[];y&&y.parentNode&&y.parentNode instanceof Element;)y.parentNode.scrollTop&&_.push({node:y.parentNode,scrollTop:y.parentNode.scrollTop}),y=y.parentNode;return _}function g(){if(c.scrollHeight!==0){var y=h(c),_=document.documentElement&&document.documentElement.scrollTop;c.style.height="",c.style.height=c.scrollHeight+u+"px",d=c.clientWidth,y.forEach(function(w){w.node.scrollTop=w.scrollTop}),_&&(document.documentElement.scrollTop=_)}}function b(){g();var y=Math.round(parseFloat(c.style.height)),_=window.getComputedStyle(c,null),w=_.boxSizing==="content-box"?Math.round(parseFloat(_.height)):c.offsetHeight;if(w<y?_.overflowY==="hidden"&&(p("scroll"),g(),w=_.boxSizing==="content-box"?Math.round(parseFloat(window.getComputedStyle(c,null).height)):c.offsetHeight):_.overflowY!=="hidden"&&(p("hidden"),g(),w=_.boxSizing==="content-box"?Math.round(parseFloat(window.getComputedStyle(c,null).height)):c.offsetHeight),f!==w){f=w;var C=r("autosize:resized");try{c.dispatchEvent(C)}catch{}}}var k=function(){c.clientWidth!==d&&b()},v=function(y){window.removeEventListener("resize",k,!1),c.removeEventListener("input",b,!1),c.removeEventListener("keyup",b,!1),c.removeEventListener("autosize:destroy",v,!1),c.removeEventListener("autosize:update",b,!1),Object.keys(y).forEach(function(_){c.style[_]=y[_]}),o.delete(c)}.bind(c,{height:c.style.height,resize:c.style.resize,overflowY:c.style.overflowY,overflowX:c.style.overflowX,wordWrap:c.style.wordWrap});c.addEventListener("autosize:destroy",v,!1),"onpropertychange"in c&&"oninput"in c&&c.addEventListener("keyup",b,!1),window.addEventListener("resize",k,!1),c.addEventListener("input",b,!1),c.addEventListener("autosize:update",b,!1),c.style.overflowX="hidden",c.style.wordWrap="break-word",o.set(c,{destroy:v,update:b}),m()}function i(c){var u=o.get(c);u&&u.destroy()}function s(c){var u=o.get(c);u&&u.update()}var a=null;typeof window>"u"||typeof window.getComputedStyle!="function"?(a=function(u){return u},a.destroy=function(c){return c},a.update=function(c){return c}):(a=function(u,d){return u&&Array.prototype.forEach.call(u.length?u:[u],function(f){return n(f,d)}),u},a.destroy=function(c){return c&&Array.prototype.forEach.call(c.length?c:[c],i),c},a.update=function(c){return c&&Array.prototype.forEach.call(c.length?c:[c],s),c}),t.default=a,e.exports=t.default})});var NH=te((rze,LH)=>{var fve=function(e,t,o){return o=window.getComputedStyle,(o?o(e):e.currentStyle)[t.replace(/-(\w)/gi,function(r,n){return n.toUpperCase()})]};LH.exports=fve});var DH=te((nze,MH)=>{var rM=NH();function mve(e){var t=rM(e,"line-height"),o=parseFloat(t,10);if(t===o+""){var r=e.style.lineHeight;e.style.lineHeight=t+"em",t=rM(e,"line-height"),o=parseFloat(t,10),r?e.style.lineHeight=r:delete e.style.lineHeight}if(t.indexOf("pt")!==-1?(o*=4,o/=3):t.indexOf("mm")!==-1?(o*=96,o/=25.4):t.indexOf("cm")!==-1?(o*=96,o/=2.54):t.indexOf("in")!==-1?o*=96:t.indexOf("pc")!==-1&&(o*=16),o=Math.round(o),t==="normal"){var n=e.nodeName,i=document.createElement(n);i.innerHTML="&nbsp;",n.toUpperCase()==="TEXTAREA"&&i.setAttribute("rows","1");var s=rM(e,"font-size");i.style.fontSize=s,i.style.padding="0px",i.style.border="0px";var a=document.body;a.appendChild(i);var c=i.offsetHeight;o=c,a.removeChild(i)}return o}MH.exports=mve});var FH=te(wl=>{"use strict";var pve=wl&&wl.__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)}})(),nM=wl&&wl.__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},hve=wl&&wl.__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};wl.__esModule=!0;var eC=Fr(),Nv=RH(),Jw=AH(),gve=DH(),bve=gve,VH="autosize:resized",kve=(function(e){pve(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:bve(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&&Jw(o.textarea)}):this.textarea&&Jw(this.textarea),this.textarea&&this.textarea.addEventListener(VH,this.onResize)},t.prototype.componentWillUnmount=function(){this.textarea&&(this.textarea.removeEventListener(VH,this.onResize),Jw.destroy(this.textarea))},t.prototype.render=function(){var o=this,r=this,n=r.props,i=n.onResize,s=n.maxRows,a=n.onChange,c=n.style,u=n.innerRef,d=n.children,f=hve(n,["onResize","maxRows","onChange","style","innerRef","children"]),m=r.state.lineHeight,p=s&&m?m*s:null;return eC.createElement("textarea",nM({},f,{onChange:this.onChange,style:p?nM({},c,{maxHeight:p}):c,ref:function(h){o.textarea=h,typeof o.props.innerRef=="function"?o.props.innerRef(h):o.props.innerRef&&(o.props.innerRef.current=h)}}),d)},t.prototype.componentDidUpdate=function(){this.textarea&&Jw.update(this.textarea)},t.defaultProps={rows:1,async:!1},t.propTypes={rows:Nv.number,maxRows:Nv.number,onResize:Nv.func,innerRef:Nv.any,async:Nv.bool},t})(eC.Component);wl.TextareaAutosize=eC.forwardRef(function(e,t){return eC.createElement(kve,nM({},e,{innerRef:t}))})});var iM=te((sze,zH)=>{"use strict";var vve=FH();zH.exports=vve.TextareaAutosize});var Mv=te((cze,UH)=>{UH.exports=window.wp.warning});var jU=te((Eze,zU)=>{zU.exports=window.ReactDOM});var ra=te((tje,h9)=>{h9.exports=window.wp.keyboardShortcuts});var qC=te((K6e,eW)=>{eW.exports=window.wp.blob});var y1=te(()=>{});var S1=te(()=>{});var uD=te(()=>{});var d7=te((FHe,u7)=>{var f_e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",m_e=(e,t=21)=>(o=t)=>{let r="",n=o|0;for(;n--;)r+=e[Math.random()*e.length|0];return r},p_e=(e=21)=>{let t="",o=e|0;for(;o--;)t+=f_e[Math.random()*64|0];return t};u7.exports={nanoid:p_e,customAlphabet:m_e}});var dD=te(()=>{});var m7=te((GHe,fD)=>{var we=String,f7=function(){return{isColorSupported:!1,reset:we,bold:we,dim:we,italic:we,underline:we,inverse:we,hidden:we,strikethrough:we,black:we,red:we,green:we,yellow:we,blue:we,magenta:we,cyan:we,white:we,gray:we,bgBlack:we,bgRed:we,bgGreen:we,bgYellow:we,bgBlue:we,bgMagenta:we,bgCyan:we,bgWhite:we,blackBright:we,redBright:we,greenBright:we,yellowBright:we,blueBright:we,magentaBright:we,cyanBright:we,whiteBright:we,bgBlackBright:we,bgRedBright:we,bgGreenBright:we,bgYellowBright:we,bgBlueBright:we,bgMagentaBright:we,bgCyanBright:we,bgWhiteBright:we}};fD.exports=f7();fD.exports.createColors=f7});var _1=te((HHe,g7)=>{"use strict";var p7=m7(),h7=dD(),dy=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=p7.isColorSupported),h7&&t&&(o=h7(o));let r=o.split(/\r?\n/),n=Math.max(this.line-3,0),i=Math.min(this.line+2,r.length),s=String(i).length,a,c;if(t){let{bold:u,gray:d,red:f}=p7.createColors(!0);a=m=>u(f(m)),c=m=>d(m)}else a=c=u=>u;return r.slice(n,i).map((u,d)=>{let f=n+1+d,m=" "+(" "+f).slice(-s)+" | ";if(f===this.line){let p=c(m.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return a(">")+c(m)+u+`
 `+p+a("^")}return" "+c(m)+u}).join(`
`)}toString(){let t=this.showSourceCode();return t&&(t=`

`+t+`
`),this.name+": "+this.message+t}};g7.exports=dy;dy.default=dy});var b7=te(()=>{});var S7=te((ZHe,y7)=>{"use strict";var{SourceMapConsumer:k7,SourceMapGenerator:v7}=y1(),{existsSync:h_e,readFileSync:g_e}=b7(),{dirname:mD,join:b_e}=S1();function k_e(e){return Buffer?Buffer.from(e,"base64").toString():window.atob(e)}var fy=class{constructor(t,o){if(o.map===!1)return;this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");let r=o.map?o.map.prev:void 0,n=this.loadMap(o.from,r);!this.mapFile&&o.from&&(this.mapFile=o.from),this.mapFile&&(this.root=mD(this.mapFile)),n&&(this.text=n)}consumer(){return this.consumerCache||(this.consumerCache=new k7(this.text)),this.consumerCache}decodeInline(t){let o=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,n=/^data:application\/json;charset=utf-?8,/,i=/^data:application\/json,/;if(n.test(t)||i.test(t))return decodeURIComponent(t.substr(RegExp.lastMatch.length));if(o.test(t)||r.test(t))return k_e(t.substr(RegExp.lastMatch.length));let s=t.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+s)}getAnnotationURL(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(t){return typeof t!="object"?!1:typeof t.mappings=="string"||typeof t._mappings=="string"||Array.isArray(t.sections)}loadAnnotation(t){let o=t.match(/\/\*\s*# sourceMappingURL=/gm);if(!o)return;let r=t.lastIndexOf(o.pop()),n=t.indexOf("*/",r);r>-1&&n>-1&&(this.annotation=this.getAnnotationURL(t.substring(r,n)))}loadFile(t){if(this.root=mD(t),h_e(t))return this.mapFile=t,g_e(t,"utf-8").toString().trim()}loadMap(t,o){if(o===!1)return!1;if(o){if(typeof o=="string")return o;if(typeof o=="function"){let r=o(t);if(r){let n=this.loadFile(r);if(!n)throw new Error("Unable to load previous source map: "+r.toString());return n}}else{if(o instanceof k7)return v7.fromSourceMap(o).toString();if(o instanceof v7)return o.toString();if(this.isMap(o))return JSON.stringify(o);throw new Error("Unsupported previous source map format: "+o.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;return t&&(r=b_e(mD(t),r)),this.loadFile(r)}}}startWith(t,o){return t?t.substr(0,o.length)===o:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};y7.exports=fy;fy.default=fy});var kD=te(($He,C7)=>{"use strict";var{SourceMapConsumer:v_e,SourceMapGenerator:y_e}=y1(),{fileURLToPath:_7,pathToFileURL:x1}=uD(),{isAbsolute:gD,resolve:bD}=S1(),{nanoid:S_e}=d7(),pD=dD(),x7=_1(),__e=S7(),hD=Symbol("fromOffsetCache"),x_e=!!(v_e&&y_e),w7=!!(bD&&gD),Th=class{constructor(t,o={}){if(t===null||typeof t>"u"||typeof t=="object"&&!t.toString)throw new Error(`PostCSS received ${t} instead of CSS string`);if(this.css=t.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,o.from&&(!w7||/^\w+:\/\//.test(o.from)||gD(o.from)?this.file=o.from:this.file=bD(o.from)),w7&&x_e){let r=new __e(this.css,o);if(r.text){this.map=r;let n=r.consumer().file;!this.file&&n&&(this.file=this.mapResolve(n))}}this.file||(this.id="<input css "+S_e(6)+">"),this.map&&(this.map.file=this.from)}error(t,o,r,n={}){let i,s,a;if(o&&typeof o=="object"){let u=o,d=r;if(typeof u.offset=="number"){let f=this.fromOffset(u.offset);o=f.line,r=f.col}else o=u.line,r=u.column;if(typeof d.offset=="number"){let f=this.fromOffset(d.offset);s=f.line,a=f.col}else s=d.line,a=d.column}else if(!r){let u=this.fromOffset(o);o=u.line,r=u.col}let c=this.origin(o,r,s,a);return c?i=new x7(t,c.endLine===void 0?c.line:{column:c.column,line:c.line},c.endLine===void 0?c.column:{column:c.endColumn,line:c.endLine},c.source,c.file,n.plugin):i=new x7(t,s===void 0?o:{column:r,line:o},s===void 0?r:{column:a,line:s},this.css,this.file,n.plugin),i.input={column:r,endColumn:a,endLine:s,line:o,source:this.css},this.file&&(x1&&(i.input.url=x1(this.file).toString()),i.input.file=this.file),i}fromOffset(t){let o,r;if(this[hD])r=this[hD];else{let i=this.css.split(`
`);r=new Array(i.length);let s=0;for(let a=0,c=i.length;a<c;a++)r[a]=s,s+=i[a].length+1;this[hD]=r}o=r[r.length-1];let n=0;if(t>=o)n=r.length-1;else{let i=r.length-2,s;for(;n<i;)if(s=n+(i-n>>1),t<r[s])i=s-1;else if(t>=r[s+1])n=s+1;else{n=s;break}}return{col:t-r[n]+1,line:n+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:bD(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,o,r,n){if(!this.map)return!1;let i=this.map.consumer(),s=i.originalPositionFor({column:o,line:t});if(!s.source)return!1;let a;typeof r=="number"&&(a=i.originalPositionFor({column:n,line:r}));let c;gD(s.source)?c=x1(s.source):c=new URL(s.source,this.map.consumer().sourceRoot||x1(this.map.mapFile));let u={column:s.column,endColumn:a&&a.column,endLine:a&&a.line,line:s.line,url:c.toString()};if(c.protocol==="file:")if(_7)u.file=_7(c);else throw new Error("file: protocol is not available in this PostCSS build");let d=i.sourceContentFor(s.source);return d&&(u.source=d),u}toJSON(){let t={};for(let o of["hasBOM","css","file","id"])this[o]!=null&&(t[o]=this[o]);return this.map&&(t.map={...this.map},t.map.consumerCache&&(t.map.consumerCache=void 0)),t}get from(){return this.file||this.id}};C7.exports=Th;Th.default=Th;pD&&pD.registerInput&&pD.registerInput(Th)});var yD=te((YHe,R7)=>{"use strict";var{SourceMapConsumer:E7,SourceMapGenerator:w1}=y1(),{dirname:C1,relative:T7,resolve:I7,sep:P7}=S1(),{pathToFileURL:B7}=uD(),w_e=kD(),C_e=!!(E7&&w1),B_e=!!(C1&&I7&&T7&&P7),vD=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||C1(t.file),n;this.mapOpts.sourcesContent===!1?(n=new E7(t.text),n.sourcesContent&&(n.sourcesContent=null)):n=t.consumer(),this.map.applySourceMap(n,o,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let t;for(let o=this.root.nodes.length-1;o>=0;o--)t=this.root.nodes[o],t.type==="comment"&&t.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(o)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),B_e&&C_e&&this.isMap())return this.generateMap();{let t="";return this.stringify(this.root,o=>{t+=o}),[t]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=w1.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new w1({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 w1({file:this.outputFile(),ignoreInvalidMapping:!0});let t=1,o=1,r="<no source>",n={generated:{column:0,line:0},original:{column:0,line:0},source:""},i,s;this.stringify(this.root,(a,c,u)=>{if(this.css+=a,c&&u!=="end"&&(n.generated.line=t,n.generated.column=o-1,c.source&&c.source.start?(n.source=this.sourcePath(c),n.original.line=c.source.start.line,n.original.column=c.source.start.column-1,this.map.addMapping(n)):(n.source=r,n.original.line=1,n.original.column=0,this.map.addMapping(n))),i=a.match(/\n/g),i?(t+=i.length,s=a.lastIndexOf(`
`),o=a.length-s):o+=a.length,c&&u!=="start"){let d=c.parent||{raws:{}};(!(c.type==="decl"||c.type==="atrule"&&!c.nodes)||c!==d.last||d.raws.semicolon)&&(c.source&&c.source.end?(n.source=this.sourcePath(c),n.original.line=c.source.end.line,n.original.column=c.source.end.column-1,n.generated.line=t,n.generated.column=o-2,this.map.addMapping(n)):(n.source=r,n.original.line=1,n.original.column=0,n.generated.line=t,n.generated.column=o-1,this.map.addMapping(n)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(t=>t.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let t=this.mapOpts.annotation;return typeof t<"u"&&t!==!0?!1:this.previous().length?this.previous().some(o=>o.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(t=>t.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(t){if(this.mapOpts.absolute||t.charCodeAt(0)===60||/^\w+:\/\//.test(t))return t;let o=this.memoizedPaths.get(t);if(o)return o;let r=this.opts.to?C1(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=C1(I7(r,this.mapOpts.annotation)));let n=T7(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 w_e(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}setSourcesContent(){let t={};if(this.root)this.root.walk(o=>{if(o.source){let r=o.source.input.from;if(r&&!t[r]){t[r]=!0;let n=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(n,o.source.input.css)}}});else if(this.css){let o=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(o,this.css)}}sourcePath(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){let o=this.memoizedFileURLs.get(t);if(o)return o;if(B7){let r=B7(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;P7==="\\"&&(t=t.replace(/\\/g,"/"));let r=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,r),r}};R7.exports=vD});var SD=te((KHe,A7)=>{"use strict";var O7={after:`
`,beforeClose:`
`,beforeComment:`
`,beforeDecl:`
`,beforeOpen:" ",beforeRule:`
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:"    ",semicolon:!1};function E_e(e){return e[0].toUpperCase()+e.slice(1)}var my=class{constructor(t){this.builder=t}atrule(t,o){let r="@"+t.name,n=t.params?this.rawValue(t,"params"):"";if(typeof t.raws.afterName<"u"?r+=t.raws.afterName:n&&(r+=" "),t.nodes)this.block(t,r+n);else{let i=(t.raws.between||"")+(o?";":"");this.builder(r+n+i,t)}}beforeAfter(t,o){let r;t.type==="decl"?r=this.raw(t,null,"beforeDecl"):t.type==="comment"?r=this.raw(t,null,"beforeComment"):o==="before"?r=this.raw(t,null,"beforeRule"):r=this.raw(t,null,"beforeClose");let n=t.parent,i=0;for(;n&&n.type!=="root";)i+=1,n=n.parent;if(r.includes(`
`)){let s=this.raw(t,null,"indent");if(s.length)for(let a=0;a<i;a++)r+=s}return r}block(t,o){let r=this.raw(t,"between","beforeOpen");this.builder(o+r+"{",t,"start");let n;t.nodes&&t.nodes.length?(this.body(t),n=this.raw(t,"after")):n=this.raw(t,"after","emptyBody"),n&&this.builder(n),this.builder("}",t,"end")}body(t){let o=t.nodes.length-1;for(;o>0&&t.nodes[o].type==="comment";)o-=1;let r=this.raw(t,"semicolon");for(let n=0;n<t.nodes.length;n++){let i=t.nodes[n],s=this.raw(i,"before");s&&this.builder(s),this.stringify(i,o!==n||r)}}comment(t){let o=this.raw(t,"left","commentLeft"),r=this.raw(t,"right","commentRight");this.builder("/*"+o+t.text+r+"*/",t)}decl(t,o){let r=this.raw(t,"between","colon"),n=t.prop+r+this.rawValue(t,"value");t.important&&(n+=t.raws.important||" !important"),o&&(n+=";"),this.builder(n,t)}document(t){this.body(t)}raw(t,o,r){let n;if(r||(r=o),o&&(n=t.raws[o],typeof n<"u"))return n;let i=t.parent;if(r==="before"&&(!i||i.type==="root"&&i.first===t||i&&i.type==="document"))return"";if(!i)return O7[r];let s=t.root();if(s.rawCache||(s.rawCache={}),typeof s.rawCache[r]<"u")return s.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(t,r);{let a="raw"+E_e(r);this[a]?n=this[a](s,t):s.walk(c=>{if(n=c.raws[o],typeof n<"u")return!1})}return typeof n>"u"&&(n=O7[r]),s.rawCache[r]=n,n}rawBeforeClose(t){let o;return t.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after<"u")return o=r.raws.after,o.includes(`
`)&&(o=o.replace(/[^\n]+$/,"")),!1}),o&&(o=o.replace(/\S/g,"")),o}rawBeforeComment(t,o){let r;return t.walkComments(n=>{if(typeof n.raws.before<"u")return r=n.raws.before,r.includes(`
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(o,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(t,o){let r;return t.walkDecls(n=>{if(typeof n.raws.before<"u")return r=n.raws.before,r.includes(`
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(o,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(t){let o;return t.walk(r=>{if(r.type!=="decl"&&(o=r.raws.between,typeof o<"u"))return!1}),o}rawBeforeRule(t){let o;return t.walk(r=>{if(r.nodes&&(r.parent!==t||t.first!==r)&&typeof r.raws.before<"u")return o=r.raws.before,o.includes(`
`)&&(o=o.replace(/[^\n]+$/,"")),!1}),o&&(o=o.replace(/\S/g,"")),o}rawColon(t){let o;return t.walkDecls(r=>{if(typeof r.raws.between<"u")return o=r.raws.between.replace(/[^\s:]/g,""),!1}),o}rawEmptyBody(t){let o;return t.walk(r=>{if(r.nodes&&r.nodes.length===0&&(o=r.raws.after,typeof o<"u"))return!1}),o}rawIndent(t){if(t.raws.indent)return t.raws.indent;let o;return t.walk(r=>{let n=r.parent;if(n&&n!==t&&n.parent&&n.parent===t&&typeof r.raws.before<"u"){let i=r.raws.before.split(`
`);return o=i[i.length-1],o=o.replace(/\S/g,""),!1}}),o}rawSemicolon(t){let o;return t.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(o=r.raws.semicolon,typeof o<"u"))return!1}),o}rawValue(t,o){let r=t[o],n=t.raws[o];return n&&n.value===r?n.raw:r}root(t){this.body(t),t.raws.after&&this.builder(t.raws.after)}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(t.raws.ownSemicolon,t,"end")}stringify(t,o){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,o)}};A7.exports=my;my.default=my});var B1=te((XHe,L7)=>{"use strict";var T_e=SD();function _D(e,t){new T_e(t).stringify(e)}L7.exports=_D;_D.default=_D});var xD=te((qHe,M7)=>{"use strict";var N7={};M7.exports=function(t){N7[t]||(N7[t]=!0,typeof console<"u"&&console.warn&&console.warn(t))}});var E1=te((QHe,wD)=>{"use strict";wD.exports.isClean=Symbol("isClean");wD.exports.my=Symbol("my")});var I1=te((JHe,D7)=>{"use strict";var{isClean:T1,my:I_e}=E1(),P_e=_1(),R_e=SD(),O_e=B1();function CD(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=>CD(s,o)):(i==="object"&&n!==null&&(n=CD(n)),o[r]=n)}return o}var py=class{constructor(t={}){this.raws={},this[T1]=!1,this[I_e]=!0;for(let o in t)if(o==="nodes"){this.nodes=[];for(let r of t[o])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[o]=t[o]}addToError(t){if(t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)){let o=this.source;t.stack=t.stack.replace(/\n\s{4}at /,`$&${o.input.from}:${o.start.line}:${o.start.column}$&`)}return t}after(t){return this.parent.insertAfter(this,t),this}assign(t={}){for(let o in t)this[o]=t[o];return this}before(t){return this.parent.insertBefore(this,t),this}cleanRaws(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between}clone(t={}){let o=CD(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 P_e(t)}getProxyProcessor(){return{get(t,o){return o==="proxyOf"?t:o==="root"?()=>t.root().toProxy():t[o]},set(t,o,r){return t[o]===r||(t[o]=r,(o==="prop"||o==="value"||o==="name"||o==="params"||o==="important"||o==="text")&&t.markDirty()),!0}}}markDirty(){if(this[T1]){this[T1]=!1;let t=this;for(;t=t.parent;)t[T1]=!1}}next(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t+1]}positionBy(t,o){let r=this.source.start;if(t.index)r=this.positionInside(t.index,o);else if(t.word){o=this.toString();let n=o.indexOf(t.word);n!==-1&&(r=this.positionInside(n,o))}return r}positionInside(t,o){let r=o||this.toString(),n=this.source.start.column,i=this.source.start.line;for(let s=0;s<t;s++)r[s]===`
`?(n=1,i+=1):n+=1;return{column:n,line:i}}prev(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t-1]}rangeBy(t){let o={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:o.column+1,line:o.line};if(t.word){let n=this.toString(),i=n.indexOf(t.word);i!==-1&&(o=this.positionInside(i,n),r=this.positionInside(i+t.word.length,n))}else t.start?o={column:t.start.column,line:t.start.line}:t.index&&(o=this.positionInside(t.index)),t.end?r={column:t.end.column,line:t.end.line}:typeof t.endIndex=="number"?r=this.positionInside(t.endIndex):t.index&&(r=this.positionInside(t.index+1));return(r.line<o.line||r.line===o.line&&r.column<=o.column)&&(r={column:o.column+1,line:o.line}),{end:r,start:o}}raw(t,o){return new R_e().raw(this,t,o)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...t){if(this.parent){let o=this,r=!1;for(let n of t)n===this?r=!0:r?(this.parent.insertAfter(o,n),o=n):this.parent.insertBefore(o,n);r||this.remove()}return this}root(){let t=this;for(;t.parent&&t.parent.type!=="document";)t=t.parent;return t}toJSON(t,o){let r={},n=o==null;o=o||new Map;let i=0;for(let s in this){if(!Object.prototype.hasOwnProperty.call(this,s)||s==="parent"||s==="proxyCache")continue;let a=this[s];if(Array.isArray(a))r[s]=a.map(c=>typeof c=="object"&&c.toJSON?c.toJSON(null,o):c);else if(typeof a=="object"&&a.toJSON)r[s]=a.toJSON(null,o);else if(s==="source"){let c=o.get(a.input);c==null&&(c=i,o.set(a.input,i),i++),r[s]={end:a.end,inputId:c,start:a.start}}else r[s]=a}return n&&(r.inputs=[...o.keys()].map(s=>s.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t=O_e){t.stringify&&(t=t.stringify);let o="";return t(this,r=>{o+=r}),o}warn(t,o,r){let n={node:this};for(let i in r)n[i]=r[i];return t.warn(o,n)}get proxyOf(){return this}};D7.exports=py;py.default=py});var BD=te((eUe,V7)=>{"use strict";var A_e=I1(),hy=class extends A_e{constructor(t){t&&typeof t.value<"u"&&typeof t.value!="string"&&(t={...t,value:String(t.value)}),super(t),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};V7.exports=hy;hy.default=hy});var ED=te((tUe,F7)=>{"use strict";var L_e=I1(),gy=class extends L_e{constructor(t){super(t),this.type="comment"}};F7.exports=gy;gy.default=gy});var Mf=te((oUe,Y7)=>{"use strict";var{isClean:z7,my:j7}=E1(),G7=BD(),H7=ED(),N_e=I1(),U7,TD,ID,W7;function Z7(e){return e.map(t=>(t.nodes&&(t.nodes=Z7(t.nodes)),delete t.source,t))}function $7(e){if(e[z7]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)$7(t)}var fs=class e extends N_e{append(...t){for(let o of t){let r=this.normalize(o,this.last);for(let n of r)this.proxyOf.nodes.push(n)}return this.markDirty(),this}cleanRaws(t){if(super.cleanRaws(t),this.nodes)for(let o of this.nodes)o.cleanRaws(t)}each(t){if(!this.proxyOf.nodes)return;let o=this.getIterator(),r,n;for(;this.indexes[o]<this.proxyOf.nodes.length&&(r=this.indexes[o],n=t(this.proxyOf.nodes[r],r),n!==!1);)this.indexes[o]+=1;return delete this.indexes[o],n}every(t){return this.nodes.every(t)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let t=this.lastEach;return this.indexes[t]=0,t}getProxyProcessor(){return{get(t,o){return o==="proxyOf"?t:t[o]?o==="each"||typeof o=="string"&&o.startsWith("walk")?(...r)=>t[o](...r.map(n=>typeof n=="function"?(i,s)=>n(i.toProxy(),s):n)):o==="every"||o==="some"?r=>t[o]((n,...i)=>r(n.toProxy(),...i)):o==="root"?()=>t.root().toProxy():o==="nodes"?t.nodes.map(r=>r.toProxy()):o==="first"||o==="last"?t[o].toProxy():t[o]:t[o]},set(t,o,r){return t[o]===r||(t[o]=r,(o==="name"||o==="params"||o==="selector")&&t.markDirty()),!0}}}index(t){return typeof t=="number"?t:(t.proxyOf&&(t=t.proxyOf),this.proxyOf.nodes.indexOf(t))}insertAfter(t,o){let r=this.index(t),n=this.normalize(o,this.proxyOf.nodes[r]).reverse();r=this.index(t);for(let s of n)this.proxyOf.nodes.splice(r+1,0,s);let i;for(let s in this.indexes)i=this.indexes[s],r<i&&(this.indexes[s]=i+n.length);return this.markDirty(),this}insertBefore(t,o){let r=this.index(t),n=r===0?"prepend":!1,i=this.normalize(o,this.proxyOf.nodes[r],n).reverse();r=this.index(t);for(let a of i)this.proxyOf.nodes.splice(r,0,a);let s;for(let a in this.indexes)s=this.indexes[a],r<=s&&(this.indexes[a]=s+i.length);return this.markDirty(),this}normalize(t,o){if(typeof t=="string")t=Z7(U7(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 G7(t)]}else if(t.selector)t=[new TD(t)];else if(t.name)t=[new ID(t)];else if(t.text)t=[new H7(t)];else throw new Error("Unknown node type in node creation");return t.map(n=>(n[j7]||e.rebuild(n),n=n.proxyOf,n.parent&&n.parent.removeChild(n),n[z7]&&$7(n),typeof n.raws.before>"u"&&o&&typeof o.raws.before<"u"&&(n.raws.before=o.raws.before.replace(/\S/g,"")),n.parent=this.proxyOf,n))}prepend(...t){t=t.reverse();for(let o of t){let r=this.normalize(o,this.first,"prepend").reverse();for(let n of r)this.proxyOf.nodes.unshift(n);for(let n in this.indexes)this.indexes[n]=this.indexes[n]+r.length}return this.markDirty(),this}push(t){return t.parent=this,this.proxyOf.nodes.push(t),this}removeAll(){for(let t of this.proxyOf.nodes)t.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(t){t=this.index(t),this.proxyOf.nodes[t].parent=void 0,this.proxyOf.nodes.splice(t,1);let o;for(let r in this.indexes)o=this.indexes[r],o>=t&&(this.indexes[r]=o-1);return this.markDirty(),this}replaceValues(t,o,r){return r||(r=o,o={}),this.walkDecls(n=>{o.props&&!o.props.includes(n.prop)||o.fast&&!n.value.includes(o.fast)||(n.value=n.value.replace(t,r))}),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(t){return this.each((o,r)=>{let n;try{n=t(o,r)}catch(i){throw o.addToError(i)}return n!==!1&&o.walk&&(n=o.walk(t)),n})}walkAtRules(t,o){return o?t instanceof RegExp?this.walk((r,n)=>{if(r.type==="atrule"&&t.test(r.name))return o(r,n)}):this.walk((r,n)=>{if(r.type==="atrule"&&r.name===t)return o(r,n)}):(o=t,this.walk((r,n)=>{if(r.type==="atrule")return o(r,n)}))}walkComments(t){return this.walk((o,r)=>{if(o.type==="comment")return t(o,r)})}walkDecls(t,o){return o?t instanceof RegExp?this.walk((r,n)=>{if(r.type==="decl"&&t.test(r.prop))return o(r,n)}):this.walk((r,n)=>{if(r.type==="decl"&&r.prop===t)return o(r,n)}):(o=t,this.walk((r,n)=>{if(r.type==="decl")return o(r,n)}))}walkRules(t,o){return o?t instanceof RegExp?this.walk((r,n)=>{if(r.type==="rule"&&t.test(r.selector))return o(r,n)}):this.walk((r,n)=>{if(r.type==="rule"&&r.selector===t)return o(r,n)}):(o=t,this.walk((r,n)=>{if(r.type==="rule")return o(r,n)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};fs.registerParse=e=>{U7=e};fs.registerRule=e=>{TD=e};fs.registerAtRule=e=>{ID=e};fs.registerRoot=e=>{W7=e};Y7.exports=fs;fs.default=fs;fs.rebuild=e=>{e.type==="atrule"?Object.setPrototypeOf(e,ID.prototype):e.type==="rule"?Object.setPrototypeOf(e,TD.prototype):e.type==="decl"?Object.setPrototypeOf(e,G7.prototype):e.type==="comment"?Object.setPrototypeOf(e,H7.prototype):e.type==="root"&&Object.setPrototypeOf(e,W7.prototype),e[j7]=!0,e.nodes&&e.nodes.forEach(t=>{fs.rebuild(t)})}});var q7=te((rUe,X7)=>{"use strict";var P1=/[\t\n\f\r "#'()/;[\\\]{}]/g,R1=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,M_e=/.[\r\n"'(/\\]/,K7=/[\da-f]/i;X7.exports=function(t,o={}){let r=t.css.valueOf(),n=o.ignoreErrors,i,s,a,c,u,d,f,m,p,h,g=r.length,b=0,k=[],v=[];function y(){return b}function _(R){throw t.error("Unclosed "+R,b)}function w(){return v.length===0&&b>=g}function C(R){if(v.length)return v.pop();if(b>=g)return;let O=R?R.ignoreUnclosed:!1;switch(i=r.charCodeAt(b),i){case 10:case 32:case 9:case 13:case 12:{s=b;do s+=1,i=r.charCodeAt(s);while(i===32||i===10||i===9||i===13||i===12);h=["space",r.slice(b,s)],b=s-1;break}case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let B=String.fromCharCode(i);h=[B,B,b];break}case 40:{if(m=k.length?k.pop()[1]:"",p=r.charCodeAt(b+1),m==="url"&&p!==39&&p!==34&&p!==32&&p!==10&&p!==9&&p!==12&&p!==13){s=b;do{if(d=!1,s=r.indexOf(")",s+1),s===-1)if(n||O){s=b;break}else _("bracket");for(f=s;r.charCodeAt(f-1)===92;)f-=1,d=!d}while(d);h=["brackets",r.slice(b,s+1),b,s],b=s}else s=r.indexOf(")",b+1),c=r.slice(b,s+1),s===-1||M_e.test(c)?h=["(","(",b]:(h=["brackets",c,b,s],b=s);break}case 39:case 34:{a=i===39?"'":'"',s=b;do{if(d=!1,s=r.indexOf(a,s+1),s===-1)if(n||O){s=b+1;break}else _("string");for(f=s;r.charCodeAt(f-1)===92;)f-=1,d=!d}while(d);h=["string",r.slice(b,s+1),b,s],b=s;break}case 64:{P1.lastIndex=b+1,P1.test(r),P1.lastIndex===0?s=r.length-1:s=P1.lastIndex-2,h=["at-word",r.slice(b,s+1),b,s],b=s;break}case 92:{for(s=b,u=!0;r.charCodeAt(s+1)===92;)s+=1,u=!u;if(i=r.charCodeAt(s+1),u&&i!==47&&i!==32&&i!==10&&i!==9&&i!==13&&i!==12&&(s+=1,K7.test(r.charAt(s)))){for(;K7.test(r.charAt(s+1));)s+=1;r.charCodeAt(s+1)===32&&(s+=1)}h=["word",r.slice(b,s+1),b,s],b=s;break}default:{i===47&&r.charCodeAt(b+1)===42?(s=r.indexOf("*/",b+2)+1,s===0&&(n||O?s=r.length:_("comment")),h=["comment",r.slice(b,s+1),b,s],b=s):(R1.lastIndex=b+1,R1.test(r),R1.lastIndex===0?s=r.length-1:s=R1.lastIndex-2,h=["word",r.slice(b,s+1),b,s],k.push(h),b=s);break}}return b++,h}function E(R){v.push(R)}return{back:E,endOfFile:w,nextToken:C,position:y}}});var e8=te((nUe,J7)=>{"use strict";var Q7=Mf(),Ih=class extends Q7{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)}};J7.exports=Ih;Ih.default=Ih;Q7.registerAtRule(Ih)});var O1=te((iUe,n8)=>{"use strict";var t8=Mf(),o8,r8,vu=class extends t8{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 o8(new r8,this,t).stringify()}};vu.registerLazyResult=e=>{o8=e};vu.registerProcessor=e=>{r8=e};n8.exports=vu;vu.default=vu;t8.registerRoot(vu)});var s8=te((sUe,i8)=>{"use strict";var by={comma(e){return by.split(e,[","],!0)},space(e){let t=[" ",`
`,"	"];return by.split(e,t)},split(e,t,o){let r=[],n="",i=!1,s=0,a=!1,c="",u=!1;for(let d of e)u?u=!1:d==="\\"?u=!0:a?d===c&&(a=!1):d==='"'||d==="'"?(a=!0,c=d):d==="("?s+=1:d===")"?s>0&&(s-=1):s===0&&t.includes(d)&&(i=!0),i?(n!==""&&r.push(n.trim()),n="",i=!1):n+=d;return(o||n!=="")&&r.push(n.trim()),r}};i8.exports=by;by.default=by});var c8=te((aUe,l8)=>{"use strict";var a8=Mf(),D_e=s8(),Ph=class extends a8{constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return D_e.comma(this.selector)}set selectors(t){let o=this.selector?this.selector.match(/,\s*/):null,r=o?o[0]:","+this.raw("between","beforeOpen");this.selector=t.join(r)}};l8.exports=Ph;Ph.default=Ph;a8.registerRule(Ph)});var m8=te((lUe,f8)=>{"use strict";var V_e=BD(),F_e=q7(),z_e=ED(),j_e=e8(),G_e=O1(),u8=c8(),d8={empty:!0,space:!0};function H_e(e){for(let t=e.length-1;t>=0;t--){let o=e[t],r=o[3]||o[2];if(r)return r}}var PD=class{constructor(t){this.input=t,this.root=new G_e,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(t){let o=new j_e;o.name=t[1].slice(1),o.name===""&&this.unnamedAtrule(o,t),this.init(o,t[2]);let r,n,i,s=!1,a=!1,c=[],u=[];for(;!this.tokenizer.endOfFile();){if(t=this.tokenizer.nextToken(),r=t[0],r==="("||r==="["?u.push(r==="("?")":"]"):r==="{"&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),u.length===0)if(r===";"){o.source.end=this.getPosition(t[2]),o.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){a=!0;break}else if(r==="}"){if(c.length>0){for(i=c.length-1,n=c[i];n&&n[0]==="space";)n=c[--i];n&&(o.source.end=this.getPosition(n[3]||n[2]),o.source.end.offset++)}this.end(t);break}else c.push(t);else c.push(t);if(this.tokenizer.endOfFile()){s=!0;break}}o.raws.between=this.spacesAndCommentsFromEnd(c),c.length?(o.raws.afterName=this.spacesAndCommentsFromStart(c),this.raw(o,"params",c),s&&(t=c[c.length-1],o.source.end=this.getPosition(t[3]||t[2]),o.source.end.offset++,this.spaces=o.raws.between,o.raws.between="")):(o.raws.afterName="",o.params=""),a&&(o.nodes=[],this.current=o)}checkMissedSemicolon(t){let o=this.colon(t);if(o===!1)return;let r=0,n;for(let i=o-1;i>=0&&(n=t[i],!(n[0]!=="space"&&(r+=1,r===2)));i--);throw this.input.error("Missed semicolon",n[0]==="word"?n[3]+1:n[2])}colon(t){let o=0,r,n,i;for(let[s,a]of t.entries()){if(r=a,n=r[0],n==="("&&(o+=1),n===")"&&(o-=1),o===0&&n===":")if(!i)this.doubleColon(r);else{if(i[0]==="word"&&i[1]==="progid")continue;return s}i=r}return!1}comment(t){let o=new z_e;this.init(o,t[2]),o.source.end=this.getPosition(t[3]||t[2]),o.source.end.offset++;let r=t[1].slice(2,-2);if(/^\s*$/.test(r))o.text="",o.raws.left=r,o.raws.right="";else{let n=r.match(/^(\s*)([^]*\S)(\s*)$/);o.text=n[2],o.raws.left=n[1],o.raws.right=n[3]}}createTokenizer(){this.tokenizer=F_e(this.input)}decl(t,o){let r=new V_e;this.init(r,t[0][2]);let n=t[t.length-1];for(n[0]===";"&&(this.semicolon=!0,t.pop()),r.source.end=this.getPosition(n[3]||n[2]||H_e(t)),r.source.end.offset++;t[0][0]!=="word";)t.length===1&&this.unknownWord(t),r.raws.before+=t.shift()[1];for(r.source.start=this.getPosition(t[0][2]),r.prop="";t.length;){let u=t[0][0];if(u===":"||u==="space"||u==="comment")break;r.prop+=t.shift()[1]}r.raws.between="";let i;for(;t.length;)if(i=t.shift(),i[0]===":"){r.raws.between+=i[1];break}else i[0]==="word"&&/\w/.test(i[1])&&this.unknownWord([i]),r.raws.between+=i[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let s=[],a;for(;t.length&&(a=t[0][0],!(a!=="space"&&a!=="comment"));)s.push(t.shift());this.precheckMissedSemicolon(t);for(let u=t.length-1;u>=0;u--){if(i=t[u],i[1].toLowerCase()==="!important"){r.important=!0;let d=this.stringFrom(t,u);d=this.spacesFromEnd(t)+d,d!==" !important"&&(r.raws.important=d);break}else if(i[1].toLowerCase()==="important"){let d=t.slice(0),f="";for(let m=u;m>0;m--){let p=d[m][0];if(f.trim().indexOf("!")===0&&p!=="space")break;f=d.pop()[1]+f}f.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=f,t=d)}if(i[0]!=="space"&&i[0]!=="comment")break}t.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(r.raws.between+=s.map(u=>u[1]).join(""),s=[]),this.raw(r,"value",s.concat(t),o),r.value.includes(":")&&!o&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){let o=new u8;this.init(o,t[2]),o.selector="",o.raws.between="",this.current=o}end(t){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(t){if(this.spaces+=t[1],this.current.nodes){let o=this.current.nodes[this.current.nodes.length-1];o&&o.type==="rule"&&!o.raws.ownSemicolon&&(o.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(t){let o=this.input.fromOffset(t);return{column:o.col,line:o.line,offset:t}}init(t,o){this.current.push(t),t.source={input:this.input,start:this.getPosition(o)},t.raws.before=this.spaces,this.spaces="",t.type!=="comment"&&(this.semicolon=!1)}other(t){let o=!1,r=null,n=!1,i=null,s=[],a=t[1].startsWith("--"),c=[],u=t;for(;u;){if(r=u[0],c.push(u),r==="("||r==="[")i||(i=u),s.push(r==="("?")":"]");else if(a&&n&&r==="{")i||(i=u),s.push("}");else if(s.length===0)if(r===";")if(n){this.decl(c,a);return}else break;else if(r==="{"){this.rule(c);return}else if(r==="}"){this.tokenizer.back(c.pop()),o=!0;break}else r===":"&&(n=!0);else r===s[s.length-1]&&(s.pop(),s.length===0&&(i=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(o=!0),s.length>0&&this.unclosedBracket(i),o&&n){if(!a)for(;c.length&&(u=c[c.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(c.pop());this.decl(c,a)}else this.unknownWord(c)}parse(){let t;for(;!this.tokenizer.endOfFile();)switch(t=this.tokenizer.nextToken(),t[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t);break}this.endFile()}precheckMissedSemicolon(){}raw(t,o,r,n){let i,s,a=r.length,c="",u=!0,d,f;for(let m=0;m<a;m+=1)i=r[m],s=i[0],s==="space"&&m===a-1&&!n?u=!1:s==="comment"?(f=r[m-1]?r[m-1][0]:"empty",d=r[m+1]?r[m+1][0]:"empty",!d8[f]&&!d8[d]?c.slice(-1)===","?u=!1:c+=i[1]:u=!1):c+=i[1];if(!u){let m=r.reduce((p,h)=>p+h[1],"");t.raws[o]={raw:m,value:c}}t[o]=c}rule(t){t.pop();let o=new u8;this.init(o,t[0][2]),o.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(o,"selector",t),this.current=o}spacesAndCommentsFromEnd(t){let o,r="";for(;t.length&&(o=t[t.length-1][0],!(o!=="space"&&o!=="comment"));)r=t.pop()[1]+r;return r}spacesAndCommentsFromStart(t){let o,r="";for(;t.length&&(o=t[0][0],!(o!=="space"&&o!=="comment"));)r+=t.shift()[1];return r}spacesFromEnd(t){let o,r="";for(;t.length&&(o=t[t.length-1][0],o==="space");)r=t.pop()[1]+r;return r}stringFrom(t,o){let r="";for(let n=o;n<t.length;n++)r+=t[n][1];return t.splice(o,t.length-o),r}unclosedBlock(){let t=this.current.source.start;throw this.input.error("Unclosed block",t.line,t.column)}unclosedBracket(t){throw this.input.error("Unclosed bracket",{offset:t[2]},{offset:t[2]+1})}unexpectedClose(t){throw this.input.error("Unexpected }",{offset:t[2]},{offset:t[2]+1})}unknownWord(t){throw this.input.error("Unknown word",{offset:t[0][2]},{offset:t[0][2]+t[0][1].length})}unnamedAtrule(t,o){throw this.input.error("At-rule without name",{offset:o[2]},{offset:o[2]+o[1].length})}};f8.exports=PD});var RD=te((cUe,p8)=>{"use strict";var U_e=Mf(),W_e=m8(),Z_e=kD();function A1(e,t){let o=new Z_e(e,t),r=new W_e(o);try{r.parse()}catch(n){throw n}return r.root}p8.exports=A1;A1.default=A1;U_e.registerParse(A1)});var g8=te((uUe,h8)=>{"use strict";var ky=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}};h8.exports=ky;ky.default=ky});var OD=te((dUe,b8)=>{"use strict";var $_e=g8(),vy=class{constructor(t,o,r){this.processor=t,this.messages=[],this.root=o,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(t,o={}){o.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(o.plugin=this.lastPlugin.postcssPlugin);let r=new $_e(t,o);return this.messages.push(r),r}warnings(){return this.messages.filter(t=>t.type==="warning")}get content(){return this.css}};b8.exports=vy;vy.default=vy});var v8=te((mUe,k8)=>{"use strict";var Y_e=yD(),K_e=B1(),fUe=xD(),X_e=RD(),q_e=OD(),yy=class{constructor(t,o,r){o=o.toString(),this.stringified=!1,this._processor=t,this._css=o,this._opts=r,this._map=void 0;let n,i=K_e;this.result=new q_e(this._processor,n,this._opts),this.result.css=o;let s=this;Object.defineProperty(this.result,"root",{get(){return s.root}});let a=new Y_e(i,n,this._opts,o);if(a.isMap()){let[c,u]=a.generate();c&&(this.result.css=c),u&&(this.result.map=u)}else a.clearAnnotation(),this.result.css=a.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,o){return this.async().then(t,o)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let t,o=X_e;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"}};k8.exports=yy;yy.default=yy});var AD=te((pUe,_8)=>{"use strict";var Q_e=Mf(),y8,S8,Df=class extends Q_e{constructor(t){super({type:"document",...t}),this.nodes||(this.nodes=[])}toResult(t={}){return new y8(new S8,this,t).stringify()}};Df.registerLazyResult=e=>{y8=e};Df.registerProcessor=e=>{S8=e};_8.exports=Df;Df.default=Df});var E8=te((gUe,B8)=>{"use strict";var{isClean:la,my:J_e}=E1(),e0e=yD(),t0e=B1(),o0e=Mf(),r0e=AD(),hUe=xD(),x8=OD(),n0e=RD(),i0e=O1(),s0e={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},a0e={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},l0e={Once:!0,postcssPlugin:!0,prepare:!0},Rh=0;function Sy(e){return typeof e=="object"&&typeof e.then=="function"}function C8(e){let t=!1,o=s0e[e.type];return e.type==="decl"?t=e.prop.toLowerCase():e.type==="atrule"&&(t=e.name.toLowerCase()),t&&e.append?[o,o+"-"+t,Rh,o+"Exit",o+"Exit-"+t]:t?[o,o+"-"+t,o+"Exit",o+"Exit-"+t]:e.append?[o,Rh,o+"Exit"]:[o,o+"Exit"]}function w8(e){let t;return e.type==="document"?t=["Document",Rh,"DocumentExit"]:e.type==="root"?t=["Root",Rh,"RootExit"]:t=C8(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function LD(e){return e[la]=!1,e.nodes&&e.nodes.forEach(t=>LD(t)),e}var ND={},yu=class e{constructor(t,o,r){this.stringified=!1,this.processed=!1;let n;if(typeof o=="object"&&o!==null&&(o.type==="root"||o.type==="document"))n=LD(o);else if(o instanceof e||o instanceof x8)n=LD(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=n0e;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[J_e]&&o0e.rebuild(n)}this.result=new x8(t,n,r),this.helpers={...ND,postcss:ND,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(!a0e[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${o.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!l0e[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(Sy(r))try{await r}catch(n){throw this.handleError(n)}}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[la];){t[la]=!0;let o=[w8(t)];for(;o.length>0;){let r=this.visitTick(o);if(Sy(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 Sy(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=t0e;t.syntax&&(o=t.syntax.stringify),t.stringifier&&(o=t.stringifier),o.stringify&&(o=o.stringify);let n=new e0e(o,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let t of this.plugins){let o=this.runOnRoot(t);if(Sy(o))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[la];)t[la]=!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(Sy(i))throw this.getAsyncError()}}visitTick(t){let o=t[t.length-1],{node:r,visitors:n}=o;if(r.type!=="root"&&r.type!=="document"&&!r.parent){t.pop();return}if(n.length>0&&o.visitorIndex<n.length){let[s,a]=n[o.visitorIndex];o.visitorIndex+=1,o.visitorIndex===n.length&&(o.visitors=[],o.visitorIndex=0),this.result.lastPlugin=s;try{return a(r.toProxy(),this.helpers)}catch(c){throw this.handleError(c,r)}}if(o.iterator!==0){let s=o.iterator,a;for(;a=r.nodes[r.indexes[s]];)if(r.indexes[s]+=1,!a[la]){a[la]=!0,t.push(w8(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===Rh){r.nodes&&r.nodes.length&&(r[la]=!0,o.iterator=r.getIterator());return}else if(this.listeners[s]){o.visitors=this.listeners[s];return}}t.pop()}walkSync(t){t[la]=!0;let o=C8(t);for(let r of o)if(r===Rh)t.nodes&&t.each(n=>{n[la]||this.walkSync(n)});else{let n=this.listeners[r];if(n&&this.visitSync(n,t.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};yu.registerPostcss=e=>{ND=e};B8.exports=yu;yu.default=yu;i0e.registerLazyResult(yu);r0e.registerLazyResult(yu)});var I8=te((bUe,T8)=>{"use strict";var c0e=v8(),u0e=E8(),d0e=AD(),f0e=O1(),Vf=class{constructor(t=[]){this.version="8.4.38",this.plugins=this.normalize(t)}normalize(t){let o=[];for(let r of t)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))o=o.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)o.push(r);else if(typeof r=="function")o.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return o}process(t,o={}){return!this.plugins.length&&!o.parser&&!o.stringifier&&!o.syntax?new c0e(this,t,o):new u0e(this,t,o)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}};T8.exports=Vf;Vf.default=Vf;f0e.registerProcessor(Vf);d0e.registerProcessor(Vf)});var O8=te((kUe,R8)=>{R8.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&&P8(s.source.input.file,n)||i.length&&s.source.input.file&&!P8(s.source.input.file,i)||s.walkRules(a=>{let c=["keyframes","-webkit-keyframes","-moz-keyframes","-o-keyframes","-ms-keyframes"];a.parent&&c.includes(a.parent.name)||(a.selectors=a.selectors.map(u=>t.exclude&&m0e(u,t.exclude)?u:t.transform?t.transform(o,u,r+u,s.source.input.file,a):r+u))})}};function P8(e,t){return t.some(o=>o instanceof RegExp?o.test(e):e.includes(o))}function m0e(e,t){return t.some(o=>o instanceof RegExp?o.test(e):e===o)}});var L8=te((vUe,A8)=>{var MD=40,DD=41,L1=39,VD=34,FD=92,Oh=47,zD=44,jD=58,N1=42,p0e=117,h0e=85,g0e=43,b0e=/^[a-f0-9?-]+$/i;A8.exports=function(e){for(var t=[],o=e,r,n,i,s,a,c,u,d,f=0,m=o.charCodeAt(f),p=o.length,h=[{nodes:t}],g=0,b,k="",v="",y="";f<p;)if(m<=32){r=f;do r+=1,m=o.charCodeAt(r);while(m<=32);s=o.slice(f,r),i=t[t.length-1],m===DD&&g?y=s:i&&i.type==="div"?(i.after=s,i.sourceEndIndex+=s.length):m===zD||m===jD||m===Oh&&o.charCodeAt(r+1)!==N1&&(!b||b&&b.type==="function"&&b.value!=="calc")?v=s:t.push({type:"space",sourceIndex:f,sourceEndIndex:r,value:s}),f=r}else if(m===L1||m===VD){r=f,n=m===L1?"'":'"',s={type:"string",sourceIndex:f,quote:n};do if(a=!1,r=o.indexOf(n,r+1),~r)for(c=r;o.charCodeAt(c-1)===FD;)c-=1,a=!a;else o+=n,r=o.length-1,s.unclosed=!0;while(a);s.value=o.slice(f+1,r),s.sourceEndIndex=s.unclosed?r:r+1,t.push(s),f=r+1,m=o.charCodeAt(f)}else if(m===Oh&&o.charCodeAt(f+1)===N1)r=o.indexOf("*/",f),s={type:"comment",sourceIndex:f,sourceEndIndex:r+2},r===-1&&(s.unclosed=!0,r=o.length,s.sourceEndIndex=r),s.value=o.slice(f+2,r),t.push(s),f=r+2,m=o.charCodeAt(f);else if((m===Oh||m===N1)&&b&&b.type==="function"&&b.value==="calc")s=o[f],t.push({type:"word",sourceIndex:f-v.length,sourceEndIndex:f+s.length,value:s}),f+=1,m=o.charCodeAt(f);else if(m===Oh||m===zD||m===jD)s=o[f],t.push({type:"div",sourceIndex:f-v.length,sourceEndIndex:f+s.length,value:s,before:v,after:""}),v="",f+=1,m=o.charCodeAt(f);else if(MD===m){r=f;do r+=1,m=o.charCodeAt(r);while(m<=32);if(d=f,s={type:"function",sourceIndex:f-k.length,value:k,before:o.slice(d+1,r)},f=r,k==="url"&&m!==L1&&m!==VD){r-=1;do if(a=!1,r=o.indexOf(")",r+1),~r)for(c=r;o.charCodeAt(c-1)===FD;)c-=1,a=!a;else o+=")",r=o.length-1,s.unclosed=!0;while(a);u=r;do u-=1,m=o.charCodeAt(u);while(m<=32);d<u?(f!==u+1?s.nodes=[{type:"word",sourceIndex:f,sourceEndIndex:u+1,value:o.slice(f,u+1)}]:s.nodes=[],s.unclosed&&u+1!==r?(s.after="",s.nodes.push({type:"space",sourceIndex:u+1,sourceEndIndex:r,value:o.slice(u+1,r)})):(s.after=o.slice(u+1,r),s.sourceEndIndex=r)):(s.after="",s.nodes=[]),f=r+1,s.sourceEndIndex=s.unclosed?r:f,m=o.charCodeAt(f),t.push(s)}else g+=1,s.after="",s.sourceEndIndex=f+1,t.push(s),h.push(s),t=s.nodes=[],b=s;k=""}else if(DD===m&&g)f+=1,m=o.charCodeAt(f),b.after=y,b.sourceEndIndex+=y.length,y="",g-=1,h[h.length-1].sourceEndIndex=f,h.pop(),b=h[g],t=b.nodes;else{r=f;do m===FD&&(r+=1),r+=1,m=o.charCodeAt(r);while(r<p&&!(m<=32||m===L1||m===VD||m===zD||m===jD||m===Oh||m===MD||m===N1&&b&&b.type==="function"&&b.value==="calc"||m===Oh&&b.type==="function"&&b.value==="calc"||m===DD&&g));s=o.slice(f,r),MD===m?k=s:(p0e===s.charCodeAt(0)||h0e===s.charCodeAt(0))&&g0e===s.charCodeAt(1)&&b0e.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=h.length-1;f;f-=1)h[f].unclosed=!0,h[f].sourceEndIndex=o.length;return h[0].nodes}});var M8=te((yUe,N8)=>{N8.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 z8=te((SUe,F8)=>{function D8(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=V8(e.nodes,t),o!=="function"?n:r+"("+(e.before||"")+n+(e.after||"")+(e.unclosed?"":")")):r}function V8(e,t){var o,r;if(Array.isArray(e)){for(o="",r=e.length-1;~r;r-=1)o=D8(e[r],t)+o;return o}return D8(e,t)}F8.exports=V8});var G8=te((_Ue,j8)=>{var M1=45,D1=43,GD=46,k0e=101,v0e=69;function y0e(e){var t=e.charCodeAt(0),o;if(t===D1||t===M1){if(o=e.charCodeAt(1),o>=48&&o<=57)return!0;var r=e.charCodeAt(2);return o===GD&&r>=48&&r<=57}return t===GD?(o=e.charCodeAt(1),o>=48&&o<=57):t>=48&&t<=57}j8.exports=function(e){var t=0,o=e.length,r,n,i;if(o===0||!y0e(e))return!1;for(r=e.charCodeAt(t),(r===D1||r===M1)&&t++;t<o&&(r=e.charCodeAt(t),!(r<48||r>57));)t+=1;if(r=e.charCodeAt(t),n=e.charCodeAt(t+1),r===GD&&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===k0e||r===v0e)&&(n>=48&&n<=57||(n===D1||n===M1)&&i>=48&&i<=57))for(t+=n===D1||n===M1?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 Z8=te((xUe,W8)=>{var S0e=L8(),H8=M8(),U8=z8();function Su(e){return this instanceof Su?(this.nodes=S0e(e),this):new Su(e)}Su.prototype.toString=function(){return Array.isArray(this.nodes)?U8(this.nodes):""};Su.prototype.walk=function(e,t){return H8(this.nodes,e,t),this};Su.unit=G8();Su.walk=H8;Su.stringify=U8;W8.exports=Su});var Y8=te((wUe,HD)=>{var $8=Z8();HD.exports=e=>{let o=Object.assign({skipHostRelativeUrls:!0},e);return{postcssPlugin:"rebaseUrl",Declaration(r){let n=$8(r.value),i=!1;n.walk(s=>{if(s.type!=="function"||s.value!=="url")return;let a=s.nodes[0].value,c=new URL(a,e.rootUrl);return c.pathname===a&&o.skipHostRelativeUrls||(s.nodes[0].value=c.toString(),i=!0),!1}),i&&(r.value=$8.stringify(n))}}};HD.exports.postcss=!0});var aZ=te((VUe,sZ)=>{sZ.exports=window.wp.priorityQueue});var zy=te((q8e,mY)=>{mY.exports=window.wp.isShallowEqual});var jE=te((pXe,aq)=>{aq.exports=window.wp.tokenList});var iV=te((BXe,Sq)=>{"use strict";var qCe=function(t){return QCe(t)&&!JCe(t)};function QCe(e){return!!e&&typeof e=="object"}function JCe(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||o1e(e)}var e1e=typeof Symbol=="function"&&Symbol.for,t1e=e1e?Symbol.for("react.element"):60103;function o1e(e){return e.$$typeof===t1e}function r1e(e){return Array.isArray(e)?[]:{}}function cS(e,t){return t.clone!==!1&&t.isMergeableObject(e)?vg(r1e(e),e,t):e}function n1e(e,t,o){return e.concat(t).map(function(r){return cS(r,o)})}function i1e(e,t){if(!t.customMerge)return vg;var o=t.customMerge(e);return typeof o=="function"?o:vg}function s1e(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function vq(e){return Object.keys(e).concat(s1e(e))}function yq(e,t){try{return t in e}catch{return!1}}function a1e(e,t){return yq(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function l1e(e,t,o){var r={};return o.isMergeableObject(e)&&vq(e).forEach(function(n){r[n]=cS(e[n],o)}),vq(t).forEach(function(n){a1e(e,n)||(yq(e,n)&&o.isMergeableObject(t[n])?r[n]=i1e(n,o)(e[n],t[n],o):r[n]=cS(t[n],o))}),r}function vg(e,t,o){o=o||{},o.arrayMerge=o.arrayMerge||n1e,o.isMergeableObject=o.isMergeableObject||qCe,o.cloneUnlessOtherwiseSpecified=cS;var r=Array.isArray(t),n=Array.isArray(e),i=r===n;return i?r?o.arrayMerge(e,t,o):l1e(e,t,o):cS(t,o)}vg.all=function(t,o){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,n){return vg(r,n,o)},{})};var c1e=vg;Sq.exports=c1e});var EQ=te((WQe,BQ)=>{BQ.exports=window.wp.commands});var rd=te((_ot,Hee)=>{Hee.exports=window.wp.date});var _te=te((crt,Ste)=>{var gte=!1,xm,JV,eF,tI,oI,bte,rI,tF,oF,rF,kte,nF,iF,vte,yte;function yn(){if(!gte){gte=!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(nF=/\b(iPhone|iP[ao]d)/.exec(e),iF=/\b(iP[ao]d)/.exec(e),rF=/Android/i.exec(e),vte=/FBAN\/\w+;/i.exec(e),yte=/Mobile/i.exec(e),kte=!!/Win64/.exec(e),t){xm=t[1]?parseFloat(t[1]):t[5]?parseFloat(t[5]):NaN,xm&&document&&document.documentMode&&(xm=document.documentMode);var r=/(?:Trident\/(\d+.\d+))/.exec(e);bte=r?parseFloat(r[1])+4:xm,JV=t[2]?parseFloat(t[2]):NaN,eF=t[3]?parseFloat(t[3]):NaN,tI=t[4]?parseFloat(t[4]):NaN,tI?(t=/(?:Chrome\/(\d+\.\d+))/.exec(e),oI=t&&t[1]?parseFloat(t[1]):NaN):oI=NaN}else xm=JV=eF=oI=tI=NaN;if(o){if(o[1]){var n=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);rI=n?parseFloat(n[1].replace("_",".")):!0}else rI=!1;tF=!!o[2],oF=!!o[3]}else rI=tF=oF=!1}}var sF={ie:function(){return yn()||xm},ieCompatibilityMode:function(){return yn()||bte>xm},ie64:function(){return sF.ie()&&kte},firefox:function(){return yn()||JV},opera:function(){return yn()||eF},webkit:function(){return yn()||tI},safari:function(){return sF.webkit()},chrome:function(){return yn()||oI},windows:function(){return yn()||tF},osx:function(){return yn()||rI},linux:function(){return yn()||oF},iphone:function(){return yn()||nF},mobile:function(){return yn()||nF||iF||rF||yte},nativeApp:function(){return yn()||vte},android:function(){return yn()||rF},ipad:function(){return yn()||iF}};Ste.exports=sF});var wte=te((urt,xte)=>{"use strict";var nI=!!(typeof window<"u"&&window.document&&window.document.createElement),eEe={canUseDOM:nI,canUseWorkers:typeof Worker<"u",canUseEventListeners:nI&&!!(window.addEventListener||window.attachEvent),canUseViewport:nI&&!!window.screen,isInWorker:!nI};xte.exports=eEe});var Tte=te((drt,Ete)=>{"use strict";var Cte=wte(),Bte;Cte.canUseDOM&&(Bte=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0);function tEe(e,t){if(!Cte.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&&Bte&&e==="wheel"&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}Ete.exports=tEe});var Lte=te((frt,Ate)=>{"use strict";var oEe=_te(),rEe=Tte(),Ite=10,Pte=40,Rte=800;function Ote(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*Ite,n=o*Ite,"deltaY"in e&&(n=e.deltaY),"deltaX"in e&&(r=e.deltaX),(r||n)&&e.deltaMode&&(e.deltaMode==1?(r*=Pte,n*=Pte):(r*=Rte,n*=Rte)),r&&!t&&(t=r<1?-1:1),n&&!o&&(o=n<1?-1:1),{spinX:t,spinY:o,pixelX:r,pixelY:n}}Ote.getEventType=function(){return oEe.firefox()?"DOMMouseScroll":rEe("wheel")?"wheel":"mousewheel"};Ate.exports=Ote});var Mte=te((mrt,Nte)=>{Nte.exports=Lte()});var dre=te((Jnt,ure)=>{"use strict";ure.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 LAe={};$s(LAe,{AlignmentControl:()=>_w,AlignmentToolbar:()=>F6,Autocomplete:()=>dG,BlockAlignmentControl:()=>Fw,BlockAlignmentToolbar:()=>AG,BlockBindingsAttributeControl:()=>Pv,BlockBindingsSourceFieldsList:()=>Iv,BlockBreadcrumb:()=>oH,BlockCanvas:()=>RQ,BlockColorsStyleSelector:()=>NQ,BlockContextProvider:()=>K_,BlockControls:()=>pt,BlockEdit:()=>hw,BlockEditorKeyboardShortcuts:()=>n1,BlockEditorProvider:()=>wW,BlockFormatControls:()=>V5,BlockIcon:()=>Ie,BlockInspector:()=>bae,BlockList:()=>Lh,BlockMover:()=>nE,BlockNavigationDropdown:()=>WJ,BlockPopover:()=>K$,BlockPreview:()=>fn,BlockSelectionClearer:()=>lY,BlockSettingsMenu:()=>LE,BlockSettingsMenuControls:()=>IE,BlockStyles:()=>Vg,BlockTitle:()=>Ov,BlockToolbar:()=>mQ,BlockTools:()=>bS,BlockVerticalAlignmentControl:()=>Nw,BlockVerticalAlignmentToolbar:()=>hee,ButtonBlockAppender:()=>Ou,ButtonBlockerAppender:()=>F$,ColorPalette:()=>Dee,ColorPaletteControl:()=>zee,ContrastChecker:()=>DT,CopyHandler:()=>yae,DefaultBlockAppender:()=>qh,DimensionControl:()=>Yg,FontSizePicker:()=>ON,HeadingLevelDropdown:()=>oee,HeightControl:()=>hte,InnerBlocks:()=>Gy,Inserter:()=>Ti,InspectorAdvancedControls:()=>Du,InspectorControls:()=>fe,JustifyContentControl:()=>qp,JustifyToolbar:()=>Coe,LineHeightControl:()=>BI,LinkControl:()=>dd,MediaPlaceholder:()=>Zre,MediaReplaceFlow:()=>ab,MediaUpload:()=>Iu,MediaUploadCheck:()=>bs,MultiSelectScrollIntoView:()=>wae,NavigableToolbar:()=>pg,ObserveTyping:()=>AY,PanelColorSettings:()=>Yre,PlainText:()=>Yne,RecursionProvider:()=>A4,RichText:()=>fb,RichTextShortcut:()=>UF,RichTextToolbarButton:()=>ZF,SETTINGS_DEFAULTS:()=>Pk,SkipToSelectedBlock:()=>r2,ToolSelector:()=>Dae,Typewriter:()=>Tae,URLInput:()=>cd,URLInputButton:()=>rie,URLPopover:()=>pd,Warning:()=>Zc,WritingFlow:()=>g1,__experimentalBlockAlignmentMatrixControl:()=>YG,__experimentalBlockFullHeightAligmentControl:()=>UG,__experimentalBlockPatternSetup:()=>fee,__experimentalBlockPatternsList:()=>ua,__experimentalBlockVariationPicker:()=>ree,__experimentalBlockVariationTransforms:()=>PT,__experimentalBorderRadiusControl:()=>NT,__experimentalColorGradientControl:()=>od,__experimentalColorGradientSettingsDropdown:()=>qT,__experimentalDateFormatPicker:()=>Uee,__experimentalDuotoneControl:()=>FT,__experimentalFontAppearanceControl:()=>jT,__experimentalFontFamilyControl:()=>GT,__experimentalGetBorderClassesAndStyles:()=>ER,__experimentalGetColorClassesAndStyles:()=>TR,__experimentalGetElementClassName:()=>RAe,__experimentalGetGapCSSValue:()=>Dr,__experimentalGetGradientClass:()=>Wp,__experimentalGetGradientObjectByGradientValue:()=>I6,__experimentalGetShadowClassesAndStyles:()=>pz,__experimentalGetSpacingClassesAndStyles:()=>bz,__experimentalImageEditor:()=>koe,__experimentalImageSizeControl:()=>_oe,__experimentalImageURLInputUI:()=>uie,__experimentalInspectorPopoverHeader:()=>eP,__experimentalLetterSpacingControl:()=>UT,__experimentalLibrary:()=>_ae,__experimentalLinkControl:()=>CI,__experimentalLinkControlSearchInput:()=>Xoe,__experimentalLinkControlSearchItem:()=>Doe,__experimentalLinkControlSearchResults:()=>Hoe,__experimentalListView:()=>CT,__experimentalPanelColorGradientSettings:()=>JT,__experimentalPreviewOptions:()=>Bie,__experimentalPublishDateTimePicker:()=>Aae,__experimentalRecursionProvider:()=>Iae,__experimentalResponsiveBlockControl:()=>Jne,__experimentalSpacingSizesControl:()=>_b,__experimentalTextDecorationControl:()=>ZT,__experimentalTextTransformControl:()=>YT,__experimentalUnitControl:()=>tie,__experimentalUseBlockOverlayActive:()=>nH,__experimentalUseBlockPreview:()=>fZ,__experimentalUseBorderProps:()=>mz,__experimentalUseColorProps:()=>gz,__experimentalUseCustomSides:()=>G3,__experimentalUseGradient:()=>Ybe,__experimentalUseHasRecursion:()=>Pae,__experimentalUseMultipleOriginColorsAndGradients:()=>id,__experimentalUseResizeCanvas:()=>Eie,__experimentalWritingModeControl:()=>XT,__unstableBlockSettingsMenuFirstItem:()=>pE,__unstableBlockToolbarLastItem:()=>cE,__unstableEditorStyles:()=>Il,__unstableIframe:()=>Eh,__unstableInserterMenuExtension:()=>cB,__unstableRichTextInputEvent:()=>$F,__unstableUseBlockSelectionClearer:()=>Kf,__unstableUseClipboardHandler:()=>vae,__unstableUseMouseMoveTypingReset:()=>Uy,__unstableUseTypewriter:()=>P4,__unstableUseTypingObserver:()=>Wy,createCustomColorsHOC:()=>E6,getColorClassName:()=>ui,getColorObjectByAttributeValues:()=>Ys,getColorObjectByColorValue:()=>$_,getComputedFluidTypographyValue:()=>O6,getCustomValueFromPreset:()=>pG,getFontSize:()=>Zp,getFontSizeClass:()=>$c,getFontSizeObjectByValue:()=>RN,getGradientSlugByValue:()=>P6,getGradientValueBySlug:()=>yw,getPxFromCssUnit:()=>jfe,getSpacingPresetCssVar:()=>Cv,getTypographyClassesAndStyles:()=>kz,isValueSpacingPreset:()=>Lw,privateApis:()=>Ez,store:()=>S,storeConfig:()=>Gp,transformStyles:()=>Ff,useBlockBindingsUtils:()=>Sl,useBlockCommands:()=>aT,useBlockDisplayInformation:()=>xt,useBlockEditContext:()=>Ne,useBlockEditingMode:()=>To,useBlockProps:()=>ty,useCachedTruthy:()=>vz,useHasRecursion:()=>L4,useInnerBlocksProps:()=>em,useSetting:()=>x6,useSettings:()=>pe,useStyleOverride:()=>ks,withColorContext:()=>MT,withColors:()=>T6,withFontSizes:()=>D6});function Iz(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=Iz(e[t]))&&(r&&(r+=" "),r+=o)}else for(o in e)e[o]&&(r&&(r+=" "),r+=o);return r}function pme(){for(var e,t,o=0,r="",n=arguments.length;o<n;o++)(e=arguments[o])&&(t=Iz(e))&&(r&&(r+=" "),r+=t);return r}var D=pme;var Vae=l(Z(),1),Wi=l(I(),1),rP=l(M(),1),V4=l(Y(),1),c_=l(Je(),1);var j_=l(I(),1),Tc=Symbol("mayDisplayControls"),hp=Symbol("mayDisplayParentControls"),gp=Symbol("mayDisplayPatternEditingControls"),G_=Symbol("blockEditingMode"),bp=Symbol("blockBindings"),H_=Symbol("isPreviewMode"),DR={name:"",isSelected:!1},VR=(0,j_.createContext)(DR);VR.displayName="BlockEditContext";var{Provider:U_}=VR;function Ne(){return(0,j_.useContext)(VR)}var hme={grad:.9,turn:360,rad:360/(2*Math.PI)},nl=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},Fo=function(e,t,o){return t===void 0&&(t=0),o===void 0&&(o=Math.pow(10,t)),Math.round(o*e)/o+0},ci=function(e,t,o){return t===void 0&&(t=0),o===void 0&&(o=1),e>o?o:e>t?e:t},Gz=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},Nz=function(e){return{r:ci(e.r,0,255),g:ci(e.g,0,255),b:ci(e.b,0,255),a:ci(e.a)}},FR=function(e){return{r:Fo(e.r),g:Fo(e.g),b:Fo(e.b),a:Fo(e.a,3)}},gme=/^#([0-9a-f]{3,8})$/i,W_=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Hz=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}},Uz=function(e){var t=e.h,o=e.s,r=e.v,n=e.a;t=t/360*6,o/=100,r/=100;var i=Math.floor(t),s=r*(1-o),a=r*(1-(t-i)*o),c=r*(1-(1-t+i)*o),u=i%6;return{r:255*[r,a,s,s,c,r][u],g:255*[c,r,r,a,s,s][u],b:255*[s,s,c,r,r,a][u],a:n}},Mz=function(e){return{h:Gz(e.h),s:ci(e.s,0,100),l:ci(e.l,0,100),a:ci(e.a)}},Dz=function(e){return{h:Fo(e.h),s:Fo(e.s),l:Fo(e.l),a:Fo(e.a,3)}},Vz=function(e){return Uz((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},Bk=function(e){return{h:(t=Hz(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},bme=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,kme=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,vme=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,yme=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,GR={string:[[function(e){var t=gme.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?Fo(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?Fo(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=vme.exec(e)||yme.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:Nz({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=bme.exec(e)||kme.exec(e);if(!t)return null;var o,r,n=Mz({h:(o=t[1],r=t[2],r===void 0&&(r="deg"),Number(o)*(hme[r]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return Vz(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 nl(t)&&nl(o)&&nl(r)?Nz({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(!nl(t)||!nl(o)||!nl(r))return null;var s=Mz({h:Number(t),s:Number(o),l:Number(r),a:Number(i)});return Vz(s)},"hsl"],[function(e){var t=e.h,o=e.s,r=e.v,n=e.a,i=n===void 0?1:n;if(!nl(t)||!nl(o)||!nl(r))return null;var s=(function(a){return{h:Gz(a.h),s:ci(a.s,0,100),v:ci(a.v,0,100),a:ci(a.a)}})({h:Number(t),s:Number(o),v:Number(r),a:Number(i)});return Uz(s)},"hsv"]]},Fz=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]},Sme=function(e){return typeof e=="string"?Fz(e.trim(),GR.string):typeof e=="object"&&e!==null?Fz(e,GR.object):[null,void 0]};var zR=function(e,t){var o=Bk(e);return{h:o.h,s:ci(o.s+100*t,0,100),l:o.l,a:o.a}},jR=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},zz=function(e,t){var o=Bk(e);return{h:o.h,s:o.s,l:ci(o.l+100*t,0,100),a:o.a}},HR=(function(){function e(t){this.parsed=Sme(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 Fo(jR(this.rgba),2)},e.prototype.isDark=function(){return jR(this.rgba)<.5},e.prototype.isLight=function(){return jR(this.rgba)>=.5},e.prototype.toHex=function(){return t=FR(this.rgba),o=t.r,r=t.g,n=t.b,s=(i=t.a)<1?W_(Fo(255*i)):"","#"+W_(o)+W_(r)+W_(n)+s;var t,o,r,n,i,s},e.prototype.toRgb=function(){return FR(this.rgba)},e.prototype.toRgbString=function(){return t=FR(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 Dz(Bk(this.rgba))},e.prototype.toHslString=function(){return t=Dz(Bk(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=Hz(this.rgba),{h:Fo(t.h),s:Fo(t.s),v:Fo(t.v),a:Fo(t.a,3)};var t},e.prototype.invert=function(){return mt({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),mt(zR(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),mt(zR(this.rgba,-t))},e.prototype.grayscale=function(){return mt(zR(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),mt(zz(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),mt(zz(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"?mt({r:(o=this.rgba).r,g:o.g,b:o.b,a:t}):Fo(this.rgba.a,3);var o},e.prototype.hue=function(t){var o=Bk(this.rgba);return typeof t=="number"?mt({h:t,s:o.s,l:o.l,a:o.a}):Fo(o.h)},e.prototype.isEqual=function(t){return this.toHex()===mt(t).toHex()},e})(),mt=function(e){return e instanceof HR?e:new HR(e)},jz=[],Ic=function(e){e.forEach(function(t){jz.indexOf(t)<0&&(t(HR,GR),jz.push(t))})};function Pc(e,t){var o={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},r={};for(var n in o)r[o[n]]=n;var i={};e.prototype.toName=function(s){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var a,c,u=r[this.toHex()];if(u)return u;if(s?.closest){var d=this.toRgb(),f=1/0,m="black";if(!i.length)for(var p in o)i[p]=new e(o[p]).toRgb();for(var h in o){var g=(a=d,c=i[h],Math.pow(a.r-c.r,2)+Math.pow(a.g-c.g,2)+Math.pow(a.b-c.b,2));g<f&&(f=g,m=h)}return m}},t.string.push([function(s){var a=s.toLowerCase(),c=a==="transparent"?"#0000":o[a];return c?new e(c).toRgb():null},"name"])}var UR=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},WR=function(e){return .2126*UR(e.r)+.7152*UR(e.g)+.0722*UR(e.b)};function kp(e){e.prototype.luminance=function(){return t=WR(this.rgba),(o=2)===void 0&&(o=0),r===void 0&&(r=Math.pow(10,o)),Math.round(r*t)/r+0;var t,o,r},e.prototype.contrast=function(t){t===void 0&&(t="#FFF");var o,r,n,i,s,a,c,u=t instanceof e?t:new e(t);return i=this.rgba,s=u.toRgb(),a=WR(i),c=WR(s),o=a>c?(a+.05)/(c+.05):(c+.05)/(a+.05),(r=2)===void 0&&(r=0),n===void 0&&(n=Math.pow(10,r)),Math.floor(n*o)/n+0},e.prototype.isReadable=function(t,o){return t===void 0&&(t="#FFF"),o===void 0&&(o={}),this.contrast(t)>=(a=(s=(r=o).size)===void 0?"normal":s,(i=(n=r.level)===void 0?"AA":n)==="AAA"&&a==="normal"?7:i==="AA"&&a==="large"?3:4.5);var r,n,i,s,a}}var Kz=l(P(),1);var $z=l(Z_(),1),{lock:Yz,unlock:F}=(0,$z.__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");Ic([Pc,kp]);var{kebabCase:_me}=F(Kz.privateApis),Ys=(e,t,o)=>{if(t){let r=e?.find(n=>n.slug===t);if(r)return r}return{color:o}},$_=(e,t)=>e?.find(o=>o.color===t);function ui(e,t){if(!(!e||!t))return`has-${_me(t)}-${e}`}function Xz(e,t){let o=mt(t),r=({color:i})=>o.contrast(i),n=Math.max(...e.map(r));return e.find(i=>r(i)===n).color}var gw=l(I(),1),kf=l(Y(),1),C6=l(P(),1);var S6=l(M(),1),_6=l(Re(),1);var pw=l(I(),1),PN=l(Z(),1);var il=l(Z(),1),ij=l(P(),1),Ik=l(M(),1),Jd=l(I(),1);var vp=l(I(),1),Jz=l(x(),1),Y_=(0,vp.createContext)({});Y_.displayName="BlockContext";function K_({value:e,children:t}){let o=(0,vp.useContext)(Y_),r=(0,vp.useMemo)(()=>({...o,...e}),[o,e]);return(0,Jz.jsx)(Y_.Provider,{value:r,children:t})}var di=Y_;var yp=l(rn(),1);function Ek(e){if(e.includes(" "))return!1;let o=(0,yp.getProtocol)(e),r=(0,yp.isValidProtocol)(o),n=xme(e),i=e?.startsWith("www."),s=e?.startsWith("#")&&(0,yp.isValidFragment)(e);return r||i||s||n}function xme(e,t=6){let o=e.split(/[?#]/)[0];return new RegExp(`(?<=\\S)\\.(?:[a-zA-Z_]{2,${t}})(?:\\/|$)`).test(o)}var wme="__default",tj="core/pattern-overrides";function Tk(e){return e?.[wme]?.source===tj}function oj(e,t){if(Tk(e)){let o={};for(let r of t){let n=e[r]?e[r]:{source:tj};o[r]=n}return o}return e}var rj=l(I(),1),Ar=(0,rj.createContext)({});Ar.displayName="PrivateBlockContext";var X_=l(x(),1),Cme={},Bme=e=>{let{name:t}=e,o=(0,il.getBlockType)(t);if(!o)return null;let r=o.edit||o.save;return(0,X_.jsx)(r,{...e})},nj=(0,ij.withFilters)("editor.BlockEdit")(Bme),Eme=e=>{let{name:t,clientId:o,attributes:r,setAttributes:n}=e,i=(0,Ik.useRegistry)(),s=(0,il.getBlockType)(t),a=(0,Jd.useContext)(di),c=(0,Ik.useSelect)(k=>F(k(il.store)).getAllBlockBindingsSources(),[]),{bindableAttributes:u}=(0,Jd.useContext)(Ar),{blockBindings:d,context:f,hasPatternOverrides:m}=(0,Jd.useMemo)(()=>{let k=s?.usesContext?Object.fromEntries(Object.entries(a).filter(([v])=>s.usesContext.includes(v))):Cme;return r?.metadata?.bindings&&Object.values(r?.metadata?.bindings||{}).forEach(v=>{c[v?.source]?.usesContext?.forEach(y=>{k[y]=a[y]})}),{blockBindings:oj(r?.metadata?.bindings,u),context:k,hasPatternOverrides:Tk(r?.metadata?.bindings)}},[s?.usesContext,a,r?.metadata?.bindings,u,c]),p=(0,Ik.useSelect)(k=>{if(!d)return r;let v={},y=new Map;for(let[_,w]of Object.entries(d)){let{source:C,args:E}=w,R=c[C];!R||!u?.includes(_)||y.set(R,{...y.get(R),[_]:{args:E}})}if(y.size)for(let[_,w]of y){let C={};_.getValues?C=_.getValues({select:k,context:f,clientId:o,bindings:w}):Object.keys(w).forEach(E=>{C[E]=_.label});for(let[E,R]of Object.entries(C))E==="url"&&(!R||!Ek(R))?v[E]=null:v[E]=R}return{...r,...v}},[r,u,d,o,f,c]),h=(0,Jd.useCallback)(k=>{if(!d){n(k);return}i.batch(()=>{let v={...k},y=new Map;for(let[w,C]of Object.entries(v)){if(!d[w]||!u?.includes(w))continue;let E=d[w],R=c[E?.source];R?.setValues&&(y.set(R,{...y.get(R),[w]:{args:E.args,newValue:C}}),delete v[w])}if(y.size)for(let[w,C]of y)w.setValues({select:i.select,dispatch:i.dispatch,context:f,clientId:o,bindings:C});let _=!!f["pattern/overrides"];!(m&&_)&&Object.keys(v).length&&(m&&delete v.href,n(v))})},[u,d,o,f,m,n,c,i]);if(!s)return null;if(s.apiVersion>1)return(0,X_.jsx)(nj,{...e,attributes:p,context:f,setAttributes:h});let g=(0,il.hasBlockSupport)(s,"className",!0)?(0,il.getBlockDefaultClassName)(t):null,b=D(g,r?.className,e.className);return(0,X_.jsx)(nj,{...e,attributes:p,className:b,context:f,setAttributes:h})},sj=Eme;var k6=l(Z(),1),IN=l(P(),1),v6=l(M(),1),mw=l(L(),1);var fw=l(M(),1);var Ak=l(ef(),1),XR=l(Y(),1),Lk=l(M(),1),dj=l(Re(),1),i0=l(Z(),1);var Me=l(L(),1),cj={insertUsage:{}},Pk={alignWide:!1,supportsLayout:!0,colors:[{name:(0,Me.__)("Black"),slug:"black",color:"#000000"},{name:(0,Me.__)("Cyan bluish gray"),slug:"cyan-bluish-gray",color:"#abb8c3"},{name:(0,Me.__)("White"),slug:"white",color:"#ffffff"},{name:(0,Me.__)("Pale pink"),slug:"pale-pink",color:"#f78da7"},{name:(0,Me.__)("Vivid red"),slug:"vivid-red",color:"#cf2e2e"},{name:(0,Me.__)("Luminous vivid orange"),slug:"luminous-vivid-orange",color:"#ff6900"},{name:(0,Me.__)("Luminous vivid amber"),slug:"luminous-vivid-amber",color:"#fcb900"},{name:(0,Me.__)("Light green cyan"),slug:"light-green-cyan",color:"#7bdcb5"},{name:(0,Me.__)("Vivid green cyan"),slug:"vivid-green-cyan",color:"#00d084"},{name:(0,Me.__)("Pale cyan blue"),slug:"pale-cyan-blue",color:"#8ed1fc"},{name:(0,Me.__)("Vivid cyan blue"),slug:"vivid-cyan-blue",color:"#0693e3"},{name:(0,Me.__)("Vivid purple"),slug:"vivid-purple",color:"#9b51e0"}],fontSizes:[{name:(0,Me._x)("Small","font size name"),size:13,slug:"small"},{name:(0,Me._x)("Normal","font size name"),size:16,slug:"normal"},{name:(0,Me._x)("Medium","font size name"),size:20,slug:"medium"},{name:(0,Me._x)("Large","font size name"),size:36,slug:"large"},{name:(0,Me._x)("Huge","font size name"),size:42,slug:"huge"}],imageDefaultSize:"large",imageSizes:[{slug:"thumbnail",name:(0,Me.__)("Thumbnail")},{slug:"medium",name:(0,Me.__)("Medium")},{slug:"large",name:(0,Me.__)("Large")},{slug:"full",name:(0,Me.__)("Full Size")}],imageEditing:!0,maxWidth:580,allowedBlockTypes:!0,maxUploadFileSize:0,allowedMimeTypes:null,canLockBlocks:!0,enableOpenverseMediaCategory:!0,clearBlockSelection:!0,__experimentalCanUserUseUnfilteredHTML:!1,__experimentalBlockDirectory:!1,__mobileEnablePageTemplates:!1,__experimentalBlockPatterns:[],__experimentalBlockPatternCategories:[],isPreviewMode:!1,blockInspectorAnimation:{animationParent:"core/navigation","core/navigation":{enterDirection:"leftToRight"},"core/navigation-submenu":{enterDirection:"rightToLeft"},"core/navigation-link":{enterDirection:"rightToLeft"},"core/search":{enterDirection:"rightToLeft"},"core/social-links":{enterDirection:"rightToLeft"},"core/page-list":{enterDirection:"rightToLeft"},"core/spacer":{enterDirection:"rightToLeft"},"core/home-link":{enterDirection:"rightToLeft"},"core/site-title":{enterDirection:"rightToLeft"},"core/site-logo":{enterDirection:"rightToLeft"}},generateAnchors:!1,gradients:[{name:(0,Me.__)("Vivid cyan blue to vivid purple"),gradient:"linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)",slug:"vivid-cyan-blue-to-vivid-purple"},{name:(0,Me.__)("Light green cyan to vivid green cyan"),gradient:"linear-gradient(135deg,rgb(122,220,180) 0%,rgb(0,208,130) 100%)",slug:"light-green-cyan-to-vivid-green-cyan"},{name:(0,Me.__)("Luminous vivid amber to luminous vivid orange"),gradient:"linear-gradient(135deg,rgba(252,185,0,1) 0%,rgba(255,105,0,1) 100%)",slug:"luminous-vivid-amber-to-luminous-vivid-orange"},{name:(0,Me.__)("Luminous vivid orange to vivid red"),gradient:"linear-gradient(135deg,rgba(255,105,0,1) 0%,rgb(207,46,46) 100%)",slug:"luminous-vivid-orange-to-vivid-red"},{name:(0,Me.__)("Very light gray to cyan bluish gray"),gradient:"linear-gradient(135deg,rgb(238,238,238) 0%,rgb(169,184,195) 100%)",slug:"very-light-gray-to-cyan-bluish-gray"},{name:(0,Me.__)("Cool to warm spectrum"),gradient:"linear-gradient(135deg,rgb(74,234,220) 0%,rgb(151,120,209) 20%,rgb(207,42,186) 40%,rgb(238,44,130) 60%,rgb(251,105,98) 80%,rgb(254,248,76) 100%)",slug:"cool-to-warm-spectrum"},{name:(0,Me.__)("Blush light purple"),gradient:"linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)",slug:"blush-light-purple"},{name:(0,Me.__)("Blush bordeaux"),gradient:"linear-gradient(135deg,rgb(254,205,165) 0%,rgb(254,45,45) 50%,rgb(107,0,62) 100%)",slug:"blush-bordeaux"},{name:(0,Me.__)("Luminous dusk"),gradient:"linear-gradient(135deg,rgb(255,203,112) 0%,rgb(199,81,192) 50%,rgb(65,88,208) 100%)",slug:"luminous-dusk"},{name:(0,Me.__)("Pale ocean"),gradient:"linear-gradient(135deg,rgb(255,245,203) 0%,rgb(182,227,212) 50%,rgb(51,167,181) 100%)",slug:"pale-ocean"},{name:(0,Me.__)("Electric grass"),gradient:"linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%)",slug:"electric-grass"},{name:(0,Me.__)("Midnight"),gradient:"linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%)",slug:"midnight"}],__unstableResolvedAssets:{styles:[],scripts:[]}};function q_(e,t,o){return[...e.slice(0,o),...Array.isArray(t)?t:[t],...e.slice(o)]}function Q_(e,t,o,r=1){let n=[...e];return n.splice(t,r),q_(n,e.slice(t,t+r),o)}var Ks=Symbol("globalStylesDataKey"),J_=Symbol("globalStylesLinks"),Rc=Symbol("selectBlockPatternsKey"),e0=Symbol("reusableBlocksSelect"),Oc=Symbol("sectionRootClientIdKey"),t0=Symbol("mediaEditKey"),o0=Symbol("getMediaSelect"),r0=Symbol("essentialFormat"),Sp=Symbol("isIsolatedEditor"),_p=Symbol("deviceTypeKey");var{isContentBlock:Tme}=F(i0.privateApis),Ime=e=>e;function Ok(e,t=""){let o=new Map,r=[];return o.set(t,r),e.forEach(n=>{let{clientId:i,innerBlocks:s}=n;r.push(i),Ok(s,i).forEach((a,c)=>{o.set(c,a)})}),o}function n0(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 fj(e,t=Ime){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 Pme(e){let t={},o=[...e];for(;o.length;){let{innerBlocks:r,...n}=o.shift();o.push(...r),t[n.clientId]=!0}return t}function ZR(e){return fj(e,t=>{let{attributes:o,...r}=t;return r})}function $R(e){return fj(e,t=>t.attributes)}function Rme(e,t){return(0,Ak.default)(Object.keys(e),Object.keys(t))}function Ome(e,t){return e.type==="UPDATE_BLOCK_ATTRIBUTES"&&t!==void 0&&t.type==="UPDATE_BLOCK_ATTRIBUTES"&&(0,Ak.default)(e.clientIds,t.clientIds)&&Rme(e.attributes,t.attributes)}function YR(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 sl(e,t,o=!1){let r=e.tree,n=new Set([]),i=new Set;for(let s of t){let a=o?s:e.parents.get(s);do if(e.controlledInnerBlocks[a]){i.add(a);break}else n.add(a),a=e.parents.get(a);while(a!==void 0)}for(let s of n)r.set(s,{...r.get(s)});for(let s of n)r.get(s).innerBlocks=(e.order.get(s)||[]).map(a=>r.get(a));for(let s of i)r.set("controlled||"+s,{innerBlocks:(e.order.get(s)||[]).map(a=>r.get(a))})}var Ame=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),YR(r,o.blocks),sl(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)}),sl(r,[o.clientId],!1);break;case"SYNC_DERIVED_BLOCK_ATTRIBUTES":case"UPDATE_BLOCK_ATTRIBUTES":{r.tree=new Map(r.tree),o.clientIds.forEach(i=>{r.tree.set(i,{...r.tree.get(i),attributes:r.attributes.get(i)})}),sl(r,o.clientIds,!1);break}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{let i=Pme(o.blocks);r.tree=new Map(r.tree),o.replacedClientIds.forEach(a=>{r.tree.delete(a),i[a]||r.tree.delete("controlled||"+a)}),YR(r,o.blocks),sl(r,o.blocks.map(a=>a.clientId),!1);let s=[];for(let a of o.clientIds){let c=t.parents.get(a);c!==void 0&&(c===""||r.byClientId.get(c))&&s.push(c)}sl(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)}),sl(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),sl(r,i,!0);break}case"MOVE_BLOCKS_UP":case"MOVE_BLOCKS_DOWN":{let i=[o.rootClientId?o.rootClientId:""];r.tree=new Map(r.tree),sl(r,i,!0);break}case"SAVE_REUSABLE_BLOCK_SUCCESS":{let i=[];r.attributes.forEach((s,a)=>{r.byClientId.get(a).name==="core/block"&&s.ref===o.updatedId&&i.push(a)}),r.tree=new Map(r.tree),i.forEach(s=>{r.tree.set(s,{...r.byClientId.get(s),attributes:r.attributes.get(s),innerBlocks:r.tree.get(s).innerBlocks})}),sl(r,i,!1)}}return r};function Lme(e){let t,o=!1,r;return(n,i)=>{let s=e(n,i),a;if(i.type==="SET_EXPLICIT_PERSISTENT"&&(r=i.isPersistentChange,a=n.isPersistentChange??!0),r!==void 0)return a=r,a===s.isPersistentChange?s:{...s,isPersistentChange:a};let c=i.type==="MARK_LAST_CHANGE_AS_PERSISTENT"||o;return n===s&&!c?(o=i.type==="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT",a=n?.isPersistentChange??!0,n.isPersistentChange===a?n:{...s,isPersistentChange:a}):(s={...s,isPersistentChange:c?!o:!Ome(i,t)},t=i,o=i.type==="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT",s)}}function Nme(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 Mme=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)},Dme=e=>(t,o)=>{if(o.type==="RESET_BLOCKS"){let r={...t,byClientId:new Map(ZR(o.blocks)),attributes:new Map($R(o.blocks)),order:Ok(o.blocks),parents:new Map(n0(o.blocks)),controlledInnerBlocks:{}};return r.tree=new Map(t?.tree),YR(r,o.blocks),r.tree.set("",{innerBlocks:o.blocks.map(n=>r.tree.get(n.clientId))}),r}return e(t,o)},Vme=e=>(t,o)=>{if(o.type!=="REPLACE_INNER_BLOCKS")return e(t,o);let r={};if(Object.keys(t.controlledInnerBlocks).length){let s=[...o.blocks];for(;s.length;){let{innerBlocks:a,...c}=s.shift();s.push(...a),t.controlledInnerBlocks[c.clientId]&&(r[c.clientId]=!0)}}let n=t;t.order.get(o.rootClientId)&&(n=e(n,{type:"REMOVE_BLOCKS",keepControlledInnerBlocks:r,clientIds:t.order.get(o.rootClientId)}));let i=n;if(o.blocks.length){i=e(i,{...o,type:"INSERT_BLOCKS",index:0});let s=new Map(i.order);Object.keys(r).forEach(a=>{t.order.get(a)&&s.set(a,t.order.get(a))}),i.order=s,i.tree=new Map(i.tree),Object.keys(r).forEach(a=>{let c=`controlled||${a}`;t.tree.has(c)&&i.tree.set(c,t.tree.get(c))})}return i},Fme=e=>(t,o)=>{if(t&&o.type==="SAVE_REUSABLE_BLOCK_SUCCESS"){let{id:r,updatedId:n}=o;if(r===n)return t;t={...t},t.attributes=new Map(t.attributes),t.attributes.forEach((i,s)=>{let{name:a}=t.byClientId.get(s);a==="core/block"&&i.ref===r&&t.attributes.set(s,{...i,ref:n})})}return e(t,o)},zme=e=>(t,o)=>{if(o.type==="SET_HAS_CONTROLLED_INNER_BLOCKS"){let r=e(t,{type:"REPLACE_INNER_BLOCKS",rootClientId:o.clientId,blocks:[]});return e(r,o)}return e(t,o)},jme=(0,XR.pipe)(Lk.combineReducers,Fme,Ame,Mme,Vme,Dme,Lme,Nme,zme)({byClientId(e=new Map,t){switch(t.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{let o=new Map(e);return ZR(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)}),ZR(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 $R(t.blocks).forEach(([r,n])=>{o.set(r,n)}),o}case"UPDATE_BLOCK":{if(!e.get(t.clientId)||!t.updates.attributes)return e;let o=new Map(e);return o.set(t.clientId,{...e.get(t.clientId),...t.updates.attributes}),o}case"SYNC_DERIVED_BLOCK_ATTRIBUTES":case"UPDATE_BLOCK_ATTRIBUTES":{if(t.clientIds.every(n=>!e.get(n)))return e;let o=!1,r=new Map(e);for(let n of t.clientIds){let i=Object.entries(t.options?.uniqueByBlock?t.attributes[n]:t.attributes??{});if(i.length===0)continue;let s=!1,a=e.get(n),c={};i.forEach(([u,d])=>{a[u]!==d&&(s=!0,c[u]=d)}),o=o||s,s&&r.set(n,{...a,...c})}return o?r:e}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{if(!t.blocks)return e;let o=new Map(e);return t.replacedClientIds.forEach(r=>{o.delete(r)}),$R(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=Ok(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=Ok(t.blocks,o),{index:i=r.length}=t,s=new Map(e);return n.forEach((a,c)=>{s.set(c,a)}),s.set(o,q_(r,n.get(o),i)),s}case"MOVE_BLOCKS_TO_POSITION":{let{fromRootClientId:o="",toRootClientId:r="",clientIds:n}=t,{index:i=e.get(r).length}=t;if(o===r){let c=e.get(r).indexOf(n[0]),u=new Map(e);return u.set(r,Q_(e.get(r),c,i,n.length)),u}let s=new Map(e);return s.set(o,e.get(o)?.filter(a=>!n.includes(a))??[]),s.set(r,q_(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,Q_(i,s,s-1,o.length)),a}case"MOVE_BLOCKS_DOWN":{let{clientIds:o,rootClientId:r=""}=t,n=o[0],i=o[o.length-1],s=e.get(r);if(!s.length||i===s[s.length-1])return e;let a=s.indexOf(n),c=new Map(e);return c.set(r,Q_(s,a,a+1,o.length)),c}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{let{clientIds:o}=t;if(!t.blocks)return e;let r=Ok(t.blocks),n=new Map(e);return t.replacedClientIds.forEach(i=>{n.delete(i)}),r.forEach((i,s)=>{s!==""&&n.set(s,i)}),n.forEach((i,s)=>{let a=Object.values(i).reduce((c,u)=>u===o[0]?[...c,...r.get("")]:(o.indexOf(u)===-1&&c.push(u),c),[]);n.set(s,a)}),n}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{let o=new Map(e);return t.removedClientIds.forEach(r=>{o.delete(r)}),o.forEach((r,n)=>{let i=r?.filter(s=>!t.removedClientIds.includes(s))??[];i.length!==r.length&&o.set(n,i)}),o}}return e},parents(e=new Map,t){switch(t.type){case"RECEIVE_BLOCKS":{let o=new Map(e);return n0(t.blocks).forEach(([r,n])=>{o.set(r,n)}),o}case"INSERT_BLOCKS":{let o=new Map(e);return n0(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)}),n0(t.blocks,e.get(t.clientIds[0])).forEach(([r,n])=>{o.set(r,n)}),o}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{let o=new Map(e);return t.removedClientIds.forEach(r=>{o.delete(r)}),o}}return e},controlledInnerBlocks(e={},{type:t,clientId:o,hasControlledInnerBlocks:r}){return t==="SET_HAS_CONTROLLED_INNER_BLOCKS"?{...e,[o]:r}:e}});function Gme(e=!1,t){switch(t.type){case"HIDE_BLOCK_INTERFACE":return!0;case"SHOW_BLOCK_INTERFACE":return!1}return e}function Hme(e=!1,t){switch(t.type){case"START_TYPING":return!0;case"STOP_TYPING":return!1}return e}function Ume(e=!1,t){switch(t.type){case"START_DRAGGING":return!0;case"STOP_DRAGGING":return!1}return e}function Wme(e=[],t){switch(t.type){case"START_DRAGGING_BLOCKS":return t.clientIds;case"STOP_DRAGGING_BLOCKS":return[]}return e}function Zme(e={},t){return t.type==="SET_BLOCK_VISIBILITY"?{...e,...t.updates}:e}function uj(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 $me(e={},t){switch(t.type){case"SELECTION_CHANGE":return t.clientId?{selectionStart:{clientId:t.clientId,attributeKey:t.attributeKey,offset:t.startOffset},selectionEnd:{clientId:t.clientId,attributeKey:t.attributeKey,offset:t.endOffset}}:{selectionStart:t.start||e.selectionStart,selectionEnd:t.end||e.selectionEnd};case"RESET_SELECTION":let{selectionStart:n,selectionEnd:i}=t;return{selectionStart:n,selectionEnd:i};case"MULTI_SELECT":let{start:s,end:a}=t;return s===e.selectionStart?.clientId&&a===e.selectionEnd?.clientId?e:{selectionStart:{clientId:s},selectionEnd:{clientId:a}};case"RESET_BLOCKS":let c=e?.selectionStart?.clientId,u=e?.selectionEnd?.clientId;if(!c&&!u)return e;if(!t.blocks.some(d=>d.clientId===c))return{selectionStart:{},selectionEnd:{}};if(!t.blocks.some(d=>d.clientId===u))return{...e,selectionEnd:e.selectionStart}}let o=uj(e.selectionStart,t),r=uj(e.selectionEnd,t);return o===e.selectionStart&&r===e.selectionEnd?e:{selectionStart:o,selectionEnd:r}}function Yme(e=!1,t){switch(t.type){case"START_MULTI_SELECT":return!0;case"STOP_MULTI_SELECT":return!1}return e}function Kme(e=!0,t){return t.type==="TOGGLE_SELECTION"?t.isSelectionEnabled:e}function Xme(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 qme(e=!1,t){return t.type==="SET_BLOCK_REMOVAL_RULES"?t.rules:e}function Qme(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 Jme(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 epe(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,Ak.default)(e,a)?e:a}case"HIDE_INSERTION_POINT":return null}return e}function tpe(e={isValid:!0},t){return t.type==="SET_TEMPLATE_VALIDITY"?{...e,isValid:t.isValid}:e}function ope(e=Pk,t){if(t.type==="UPDATE_SETTINGS"){let o=t.reset?{...Pk,...t.settings}:{...e,...t.settings};return Object.defineProperty(o,"__unstableIsPreviewMode",{get(){return(0,dj.default)("__unstableIsPreviewMode",{since:"6.8",alternative:"isPreviewMode"}),this.isPreviewMode}}),o}return e}function rpe(e=cj,t){switch(t.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":{let o=t.blocks.reduce((r,n)=>{let{attributes:i,name:s}=n,a=s,c=(0,Lk.select)(i0.store).getActiveBlockVariation(s,i);return c?.name&&(a+="/"+c.name),s==="core/block"&&(a+="/"+i.ref),{...r,[a]:{time:t.time,count:r[a]?r[a].count+1:1}}},e.insertUsage);return{...e,insertUsage:o}}}return e}var npe=(e={},t)=>{switch(t.type){case"REPLACE_BLOCKS":case"REMOVE_BLOCKS":return Object.fromEntries(Object.entries(e).filter(([o])=>!t.clientIds.includes(o)));case"UPDATE_BLOCK_LIST_SETTINGS":{let o=typeof t.clientId=="string"?{[t.clientId]:t.settings}:t.clientId;for(let n in o)o[n]?(0,Ak.default)(e[n],o[n])&&delete o[n]:e[n]||delete o[n];if(Object.keys(o).length===0)return e;let r={...e,...o};for(let n in o)o[n]||delete r[n];return r}}return e};function ipe(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 spe(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 ape(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 lpe(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 cpe(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 upe(e,t){return t.type==="EDIT_CONTENT_ONLY_SECTION"?t.clientId:e}function dpe(e=new Map,t){switch(t.type){case"SET_BLOCK_EDITING_MODE":return e.get(t.clientId)===t.mode?e:new Map(e).set(t.clientId,t.mode);case"UNSET_BLOCK_EDITING_MODE":{if(!e.has(t.clientId))return e;let o=new Map(e);return o.delete(t.clientId),o}case"RESET_BLOCKS":return e.has("")?new Map().set("",e.get("")):e}return e}function fpe(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 mpe(e=[],t){return t.type==="REGISTER_INSERTER_MEDIA_CATEGORY"?[...e,t.category]:e}function ppe(e=!1,t){return t.type==="LAST_FOCUS"?t.lastFocus:e}function hpe(e=100,t){switch(t.type){case"SET_ZOOM_LEVEL":return t.zoom;case"RESET_ZOOM_LEVEL":return 100}return e}function gpe(e=null,t){switch(t.type){case"SET_INSERTION_POINT":return t.value;case"SELECT_BLOCK":return null}return e}var bpe=(0,Lk.combineReducers)({blocks:jme,isDragging:Ume,isTyping:Hme,isBlockInterfaceHidden:Gme,draggedBlocks:Wme,selection:$me,isMultiSelecting:Yme,isSelectionEnabled:Kme,initialPosition:Qme,blocksMode:Jme,blockListSettings:npe,insertionPoint:gpe,insertionCue:epe,template:tpe,settings:ope,preferences:rpe,lastBlockAttributesChange:ipe,lastFocus:ppe,expandedBlock:lpe,highlightedBlock:spe,lastBlockInserted:cpe,editedContentOnlySection:upe,blockVisibility:Zme,blockEditingModes:dpe,styleOverrides:fpe,removalPromptData:Xme,blockRemovalRules:qme,registeredInserterMediaCategories:mpe,zoomLevel:hpe,hasBlockSpotlight:ape});function mj(e,t){if(t===""){let n=e.blocks.tree.get(t);return n?{clientId:"",...n}:void 0}if(!e.blocks.controlledInnerBlocks[t])return e.blocks.tree.get(t);let o=e.blocks.tree.get(`controlled||${t}`);return{...e.blocks.tree.get(t),innerBlocks:o?.innerBlocks}}function qR(e,t,o){let r=mj(e,t);if(r&&(o(r),!!r?.innerBlocks?.length))for(let n of r?.innerBlocks)qR(e,n.clientId,o)}function Rk(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 kpe(e){return e?.attributes?.metadata?.bindings&&Object.keys(e?.attributes?.metadata?.bindings).length}function KR(e,t=""){let o=e?.zoomLevel<100||e?.zoomLevel==="auto-scaled",r=new Map,n=e.settings?.[Oc],i=e.blocks.order.get(n),s=Array.from(e.blockEditingModes).some(([,p])=>p==="disabled"),a=[],c=[];Object.keys(e.blocks.controlledInnerBlocks).forEach(p=>{let h=e.blocks.byClientId?.get(p);h?.name==="core/template-part"&&a.push(p),h?.name==="core/block"&&c.push(p)});let u=Object.keys(e.blockListSettings).filter(p=>e.blockListSettings[p]?.templateLock==="contentOnly"),d=e.settings?.[Sp],f=window?.__experimentalContentOnlyPatternInsertion&&!d?Array.from(e.blocks.attributes.keys()).filter(p=>e.blocks.attributes.get(p)?.metadata?.patternName):[],m=[...u,...f,...window?.__experimentalContentOnlyPatternInsertion&&!d?a:[]];return qR(e,t,p=>{let{clientId:h,name:g}=p;if(e.editedContentOnlySection){if(e.editedContentOnlySection===h){r.set(h,"default");return}if(Rk(e,h,[e.editedContentOnlySection])){r.set(h,"default");return}if(window?.__experimentalContentOnlyPatternInsertion){r.set(h,"disabled");return}}if(!e.blockEditingModes.has(h)){if(s){let b,k=e.blocks.parents.get(h);for(;k!==void 0&&(e.blockEditingModes.has(k)&&(b=e.blockEditingModes.get(k)),!b);)k=e.blocks.parents.get(k);if(b==="disabled"){r.set(h,"disabled");return}}if(o){if(h===n){r.set(h,"contentOnly");return}if(!i?.length){r.set(h,"disabled");return}if(i.includes(h)){r.set(h,"contentOnly");return}r.set(h,"disabled");return}if(c.length){if(c.includes(h)){if(Rk(e,h,c)){r.set(h,"disabled");return}return}let b=Rk(e,h,c);if(b){if(Rk(e,b,c)){r.set(h,"disabled");return}if(kpe(p)){r.set(h,"contentOnly");return}r.set(h,"disabled")}}m.length&&Rk(e,h,m)&&(Tme(g)?r.set(h,"contentOnly"):r.set(h,"disabled"))}}),r}function Ac({prevState:e,nextState:t,addedBlocks:o,removedClientIds:r}){let n=e.derivedBlockEditingModes,i;return r?.forEach(s=>{qR(e,s,a=>{n.has(a.clientId)&&(i||(i=new Map(n)),i.delete(a.clientId))})}),o?.forEach(s=>{let a=KR(t,s.clientId);a.size&&(i?i=new Map([...i?.size?i:[],...a]):i=new Map([...n?.size?n:[],...a]))}),i}function vpe(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=Ac({prevState:t,nextState:r,removedClientIds:o.clientIds});if(n)return{...r,derivedBlockEditingModes:n??t.derivedBlockEditingModes};break}case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{let n=Ac({prevState:t,nextState:r,addedBlocks:o.blocks});if(n)return{...r,derivedBlockEditingModes:n??t.derivedBlockEditingModes};break}case"UPDATE_BLOCK_ATTRIBUTES":{let n=[],i=[];for(let a of o?.clientIds){let c=o.options?.uniqueByBlock?o.attributes[a]:o.attributes;if(!c)break;c.metadata?.patternName&&!t.blocks.attributes.get(a)?.metadata?.patternName?n.push(r.blocks.tree.get(a)):c.metadata&&!c.metadata?.patternName&&t.blocks.attributes.get(a)?.metadata?.patternName&&i.push(a)}if(!n?.length&&!i?.length)break;let s=Ac({prevState:t,nextState:r,addedBlocks:n,removedClientIds:i});if(s)return{...r,derivedBlockEditingModes:s??t.derivedBlockEditingModes};break}case"UPDATE_BLOCK_LIST_SETTINGS":{let n=[],i=[],s=typeof o.clientId=="string"?{[o.clientId]:o.settings}:o.clientId;for(let c in s){let u=t.blockListSettings[c]?.templateLock!=="contentOnly"&&r.blockListSettings[c]?.templateLock==="contentOnly",d=t.blockListSettings[c]?.templateLock==="contentOnly"&&r.blockListSettings[c]?.templateLock!=="contentOnly";u?n.push(r.blocks.tree.get(c)):d&&i.push(c)}if(!n.length&&!i.length)break;let a=Ac({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=mj(r,o.clientId);if(!n)break;let i=Ac({prevState:t,nextState:r,removedClientIds:[o.clientId],addedBlocks:[n]});if(i)return{...r,derivedBlockEditingModes:i??t.derivedBlockEditingModes};break}case"REPLACE_BLOCKS":{let n=Ac({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=Ac({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=Ac({prevState:t,nextState:r,addedBlocks:n,removedClientIds:o.clientIds});if(i)return{...r,derivedBlockEditingModes:i??t.derivedBlockEditingModes};break}case"UPDATE_SETTINGS":{if(t?.settings?.[Oc]!==r?.settings?.[Oc])return{...r,derivedBlockEditingModes:KR(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:KR(r)}}return r.derivedBlockEditingModes=t?.derivedBlockEditingModes??new Map,r}}function ype(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 pj=(0,XR.pipe)(vpe,ype)(bpe);var _N={};$s(_N,{__experimentalGetActiveBlockIdByBlockNames:()=>pge,__experimentalGetAllowedBlocks:()=>Qhe,__experimentalGetAllowedPatterns:()=>oge,__experimentalGetBlockListSettingsForBlocks:()=>age,__experimentalGetDirectInsertBlock:()=>Jhe,__experimentalGetGlobalBlocksByName:()=>che,__experimentalGetLastBlockAttributeChanges:()=>uge,__experimentalGetParsedPattern:()=>ege,__experimentalGetPatternTransformItems:()=>ige,__experimentalGetPatternsByBlockTypes:()=>nge,__experimentalGetReusableBlockTitle:()=>lge,__unstableGetBlockWithoutInnerBlocks:()=>she,__unstableGetClientIdWithClientIdsTree:()=>Mj,__unstableGetClientIdsTree:()=>Dj,__unstableGetContentLockingParent:()=>_ge,__unstableGetSelectedBlocksWithPartialSelection:()=>Rhe,__unstableGetTemporarilyEditingAsBlocks:()=>xge,__unstableGetVisibleBlocks:()=>kge,__unstableHasActiveBlockOverlayActive:()=>Qj,__unstableIsFullySelected:()=>Ehe,__unstableIsLastBlockChangeIgnored:()=>cge,__unstableIsSelectionCollapsed:()=>The,__unstableIsSelectionMergeable:()=>Phe,__unstableIsWithinBlockOverlay:()=>vge,__unstableSelectionHasUnmergeableBlock:()=>Ihe,areInnerBlocksControlled:()=>cw,canEditBlock:()=>Kj,canInsertBlockType:()=>hf,canInsertBlocks:()=>Whe,canLockBlockType:()=>$he,canMoveBlock:()=>Yj,canMoveBlocks:()=>Zhe,canRemoveBlock:()=>bN,canRemoveBlocks:()=>$j,didAutomaticChange:()=>fge,getAdjacentBlockClientId:()=>mN,getAllowedBlocks:()=>uN,getBlock:()=>bl,getBlockAttributes:()=>hi,getBlockCount:()=>dhe,getBlockEditingMode:()=>gi,getBlockHierarchyRootClientId:()=>bhe,getBlockIndex:()=>Gj,getBlockInsertionPoint:()=>jhe,getBlockListSettings:()=>SN,getBlockMode:()=>Mhe,getBlockName:()=>lo,getBlockNamesByClientId:()=>uhe,getBlockOrder:()=>sn,getBlockParents:()=>pl,getBlockParentsByBlockName:()=>fN,getBlockRootClientId:()=>xo,getBlockSelectionEnd:()=>mhe,getBlockSelectionStart:()=>fhe,getBlockTransformItems:()=>Xhe,getBlocks:()=>ahe,getBlocksByClientId:()=>lw,getBlocksByName:()=>Fj,getClientIdsOfDescendants:()=>Vj,getClientIdsWithDescendants:()=>Mp,getDirectInsertBlock:()=>qj,getDraggedBlockClientIds:()=>Vhe,getFirstMultiSelectedBlockClientId:()=>pN,getGlobalBlockCount:()=>lhe,getHoveredBlockClientId:()=>bge,getInserterItems:()=>Khe,getLastMultiSelectedBlockClientId:()=>zj,getLowestCommonAncestorWithSelectedBlock:()=>khe,getMultiSelectedBlockClientIds:()=>Hc,getMultiSelectedBlocks:()=>_he,getMultiSelectedBlocksEndClientId:()=>Bhe,getMultiSelectedBlocksStartClientId:()=>Che,getNextBlockClientId:()=>yhe,getPatternsByBlockTypes:()=>rge,getPreviousBlockClientId:()=>vhe,getSelectedBlock:()=>ghe,getSelectedBlockClientId:()=>Vp,getSelectedBlockClientIds:()=>Fp,getSelectedBlockCount:()=>phe,getSelectedBlocksInitialCaretPosition:()=>She,getSelectionEnd:()=>gv,getSelectionStart:()=>hv,getSettings:()=>fl,getTemplate:()=>Uhe,getTemplateLock:()=>Xs,hasBlockMovingClientId:()=>dge,hasDraggedInnerBlock:()=>Wj,hasInserterItems:()=>qhe,hasMultiSelection:()=>Ahe,hasSelectedBlock:()=>hhe,hasSelectedInnerBlock:()=>Uj,isAncestorBeingDragged:()=>Fhe,isAncestorMultiSelected:()=>whe,isBlockBeingDragged:()=>hN,isBlockHighlighted:()=>mge,isBlockInsertionPointVisible:()=>Ghe,isBlockMultiSelected:()=>jj,isBlockSelected:()=>Hj,isBlockValid:()=>ihe,isBlockVisible:()=>gge,isBlockWithinSelection:()=>Ohe,isCaretWithinFormattedText:()=>zhe,isDraggingBlocks:()=>Zj,isFirstMultiSelectedBlock:()=>xhe,isGroupable:()=>Sge,isLastBlockChangePersistent:()=>sge,isMultiSelecting:()=>Lhe,isSelectionEnabled:()=>Nhe,isTyping:()=>Dhe,isUngroupable:()=>yge,isValidTemplate:()=>Hhe,wasBlockJustInserted:()=>hge});var Ve=l(Z(),1),Aj=l(I(),1),Lj=l(Je(),1);var s0=l(I(),1),Ee=(0,s0.forwardRef)(({icon:e,size:t=24,...o},r)=>(0,s0.cloneElement)(e,{width:t,height:t,...o,ref:r}));var a0=l($(),1),QR=l(x(),1),tf=(0,QR.jsx)(a0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,QR.jsx)(a0.Path,{d:"M7.5 5.5h9V4h-9v1.5Zm-3.5 7h16V11H4v1.5Zm3.5 7h9V18h-9v1.5Z"})});var l0=l($(),1),JR=l(x(),1),eO=(0,JR.jsx)(l0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,JR.jsx)(l0.Path,{d:"M4 12.8h16v-1.5H4v1.5zm0 7h12.4v-1.5H4v1.5zM4 4.3v1.5h16V4.3H4z"})});var c0=l($(),1),tO=l(x(),1),Lc=(0,tO.jsx)(c0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,tO.jsx)(c0.Path,{d:"M13 5.5H4V4h9v1.5Zm7 7H4V11h16v1.5Zm-7 7H4V18h9v1.5Z"})});var u0=l($(),1),oO=l(x(),1),of=(0,oO.jsx)(u0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,oO.jsx)(u0.Path,{d:"M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM5 9h14v6H5V9Z"})});var d0=l($(),1),rO=l(x(),1),Nc=(0,rO.jsx)(d0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,rO.jsx)(d0.Path,{d:"M11.111 5.5H20V4h-8.889v1.5ZM4 12.5h16V11H4v1.5Zm7.111 7H20V18h-8.889v1.5Z"})});var f0=l($(),1),nO=l(x(),1),iO=(0,nO.jsx)(f0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,nO.jsx)(f0.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 m0=l($(),1),sO=l(x(),1),Nk=(0,sO.jsx)(m0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,sO.jsx)(m0.Path,{d:"M20 11.2H6.8l3.7-3.7-1-1L3.9 12l5.6 5.5 1-1-3.7-3.7H20z"})});var p0=l($(),1),aO=l(x(),1),Mk=(0,aO.jsx)(p0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,aO.jsx)(p0.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 h0=l($(),1),lO=l(x(),1),cO=(0,lO.jsx)(h0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,lO.jsx)(h0.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 g0=l($(),1),uO=l(x(),1),dO=(0,uO.jsx)(g0.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,uO.jsx)(g0.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 b0=l($(),1),fO=l(x(),1),mO=(0,fO.jsx)(b0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,fO.jsx)(b0.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 k0=l($(),1),pO=l(x(),1),hO=(0,pO.jsx)(k0.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,pO.jsx)(k0.Path,{d:"M6 5.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM4 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2V6zm11-.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5h-3a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM13 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2h-3a2 2 0 01-2-2V6zm5 8.5h-3a.5.5 0 00-.5.5v3a.5.5 0 00.5.5h3a.5.5 0 00.5-.5v-3a.5.5 0 00-.5-.5zM15 13a2 2 0 00-2 2v3a2 2 0 002 2h3a2 2 0 002-2v-3a2 2 0 00-2-2h-3zm-9 1.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5v-3a.5.5 0 01.5-.5zM4 15a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2v-3z",fillRule:"evenodd",clipRule:"evenodd"})});var v0=l($(),1),gO=l(x(),1),al=(0,gO.jsx)(v0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,gO.jsx)(v0.Path,{d:"M16.5 7.5 10 13.9l-2.5-2.4-1 1 3.5 3.6 7.5-7.6z"})});var y0=l($(),1),bO=l(x(),1),In=(0,bO.jsx)(y0.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,bO.jsx)(y0.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})});var S0=l($(),1),kO=l(x(),1),Dk=(0,kO.jsx)(S0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,kO.jsx)(S0.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"})});var _0=l($(),1),vO=l(x(),1),Lr=(0,vO.jsx)(_0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,vO.jsx)(_0.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})});var x0=l($(),1),yO=l(x(),1),Mc=(0,yO.jsx)(x0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,yO.jsx)(x0.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 w0=l($(),1),SO=l(x(),1),er=(0,SO.jsx)(w0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,SO.jsx)(w0.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})});var C0=l($(),1),_O=l(x(),1),rf=(0,_O.jsx)(C0.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,_O.jsx)(C0.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})});var B0=l($(),1),xO=l(x(),1),nf=(0,xO.jsx)(B0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,xO.jsx)(B0.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 E0=l($(),1),wO=l(x(),1),CO=(0,wO.jsx)(E0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wO.jsx)(E0.Path,{fillRule:"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",clipRule:"evenodd"})});var T0=l($(),1),BO=l(x(),1),EO=(0,BO.jsx)(T0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,BO.jsx)(T0.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 I0=l($(),1),TO=l(x(),1),sf=(0,TO.jsx)(I0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,TO.jsx)(I0.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 P0=l($(),1),IO=l(x(),1),PO=(0,IO.jsx)(P0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,IO.jsx)(P0.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 af=l($(),1),xp=l(x(),1),RO=(0,xp.jsxs)(af.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,xp.jsx)(af.G,{opacity:".25",children:(0,xp.jsx)(af.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,xp.jsx)(af.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 lf=l($(),1),wp=l(x(),1),OO=(0,wp.jsxs)(lf.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,wp.jsx)(lf.G,{opacity:".25",children:(0,wp.jsx)(lf.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,wp.jsx)(lf.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 cf=l($(),1),Cp=l(x(),1),AO=(0,Cp.jsxs)(cf.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Cp.jsx)(cf.G,{opacity:".25",children:(0,Cp.jsx)(cf.Path,{d:"M5.75 6A.25.25 0 0 1 6 5.75h3v-1.5H6A1.75 1.75 0 0 0 4.25 6v3h1.5V6ZM18 18.25h-3v1.5h3A1.75 1.75 0 0 0 19.75 18v-3h-1.5v3a.25.25 0 0 1-.25.25ZM18.25 9V6a.25.25 0 0 0-.25-.25h-3v-1.5h3c.966 0 1.75.784 1.75 1.75v3h-1.5ZM5.75 18v-3h-1.5v3c0 .966.784 1.75 1.75 1.75h3v-1.5H6a.25.25 0 0 1-.25-.25Z"})}),(0,Cp.jsx)(cf.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 uf=l($(),1),Bp=l(x(),1),LO=(0,Bp.jsxs)(uf.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Bp.jsx)(uf.G,{opacity:".25",children:(0,Bp.jsx)(uf.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,Bp.jsx)(uf.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 R0=l($(),1),NO=l(x(),1),MO=(0,NO.jsx)(R0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,NO.jsx)(R0.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 O0=l($(),1),DO=l(x(),1),Vk=(0,DO.jsx)(O0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,DO.jsx)(O0.Path,{d:"M8 7h2V5H8v2zm0 6h2v-2H8v2zm0 6h2v-2H8v2zm6-14v2h2V5h-2zm0 8h2v-2h-2v2zm0 6h2v-2h-2v2z"})});var A0=l($(),1),VO=l(x(),1),FO=(0,VO.jsx)(A0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,VO.jsx)(A0.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 L0=l($(),1),zO=l(x(),1),Ep=(0,zO.jsx)(L0.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,zO.jsx)(L0.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 N0=l($(),1),jO=l(x(),1),GO=(0,jO.jsx)(N0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,jO.jsx)(N0.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 M0=l($(),1),HO=l(x(),1),UO=(0,HO.jsx)(M0.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,HO.jsx)(M0.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 D0=l($(),1),WO=l(x(),1),ZO=(0,WO.jsx)(D0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,WO.jsx)(D0.Path,{d:"M12 4 4 19h16L12 4zm0 3.2 5.5 10.3H12V7.2z"})});var V0=l($(),1),$O=l(x(),1),YO=(0,$O.jsx)(V0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$O.jsx)(V0.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 F0=l($(),1),KO=l(x(),1),XO=(0,KO.jsx)(F0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,KO.jsx)(F0.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 z0=l($(),1),qO=l(x(),1),QO=(0,qO.jsx)(z0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,qO.jsx)(z0.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 j0=l($(),1),JO=l(x(),1),eA=(0,JO.jsx)(j0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,JO.jsx)(j0.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 G0=l($(),1),tA=l(x(),1),oA=(0,tA.jsx)(G0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,tA.jsx)(G0.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 H0=l($(),1),rA=l(x(),1),Tp=(0,rA.jsx)(H0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,rA.jsx)(H0.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 U0=l($(),1),nA=l(x(),1),Fk=(0,nA.jsx)(U0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,nA.jsx)(U0.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 W0=l($(),1),iA=l(x(),1),zk=(0,iA.jsx)(W0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,iA.jsx)(W0.Path,{d:"m3 5c0-1.10457.89543-2 2-2h13.5c1.1046 0 2 .89543 2 2v13.5c0 1.1046-.8954 2-2 2h-13.5c-1.10457 0-2-.8954-2-2zm2-.5h6v6.5h-6.5v-6c0-.27614.22386-.5.5-.5zm-.5 8v6c0 .2761.22386.5.5.5h6v-6.5zm8 0v6.5h6c.2761 0 .5-.2239.5-.5v-6zm0-8v6.5h6.5v-6c0-.27614-.2239-.5-.5-.5z",fillRule:"evenodd",clipRule:"evenodd"})});var Z0=l($(),1),sA=l(x(),1),jk=(0,sA.jsx)(Z0.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,sA.jsx)(Z0.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 $0=l($(),1),aA=l(x(),1),lA=(0,aA.jsx)($0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,aA.jsx)($0.Path,{d:"M17.6 7c-.6.9-1.5 1.7-2.6 2v1h2v7h2V7h-1.4zM11 11H7V7H5v10h2v-4h4v4h2V7h-2v4z"})});var Y0=l($(),1),cA=l(x(),1),uA=(0,cA.jsx)(Y0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,cA.jsx)(Y0.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 K0=l($(),1),dA=l(x(),1),fA=(0,dA.jsx)(K0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,dA.jsx)(K0.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 X0=l($(),1),mA=l(x(),1),pA=(0,mA.jsx)(X0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,mA.jsx)(X0.Path,{d:"M20 13V7h-3l-4 6v2h5v2h2v-2h1v-2h-1zm-2 0h-2.8L18 9v4zm-9-2H5V7H3v10h2v-4h4v4h2V7H9v4z"})});var q0=l($(),1),hA=l(x(),1),gA=(0,hA.jsx)(q0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,hA.jsx)(q0.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 Q0=l($(),1),bA=l(x(),1),kA=(0,bA.jsx)(Q0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,bA.jsx)(Q0.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 J0=l($(),1),vA=l(x(),1),yA=(0,vA.jsx)(J0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,vA.jsx)(J0.Path,{d:"M12 4L4 7.9V20h16V7.9L12 4zm6.5 14.5H14V13h-4v5.5H5.5V8.8L12 5.7l6.5 3.1v9.7z"})});var ex=l($(),1),SA=l(x(),1),Gk=(0,SA.jsx)(ex.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,SA.jsx)(ex.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 tx=l($(),1),_A=l(x(),1),xA=(0,_A.jsx)(tx.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,_A.jsx)(tx.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 ox=l($(),1),wA=l(x(),1),CA=(0,wA.jsx)(ox.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wA.jsx)(ox.Path,{d:"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"})});var rx=l($(),1),BA=l(x(),1),EA=(0,BA.jsx)(rx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,BA.jsx)(rx.Path,{d:"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"})});var nx=l($(),1),TA=l(x(),1),Dc=(0,TA.jsx)(nx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,TA.jsx)(nx.Path,{d:"M12.5 15v5H11v-5H4V9h7V4h1.5v5h7v6h-7Z"})});var ix=l($(),1),IA=l(x(),1),Vc=(0,IA.jsx)(ix.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,IA.jsx)(ix.Path,{d:"M9 9v6h11V9H9zM4 20h1.5V4H4v16z"})});var sx=l($(),1),PA=l(x(),1),Fc=(0,PA.jsx)(sx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,PA.jsx)(sx.Path,{d:"M4 15h11V9H4v6zM18.5 4v16H20V4h-1.5z"})});var ax=l($(),1),RA=l(x(),1),OA=(0,RA.jsx)(ax.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,RA.jsx)(ax.Path,{d:"M7 4H17V8L7 8V4ZM7 16L17 16V20L7 20V16ZM20 11.25H4V12.75H20V11.25Z"})});var lx=l($(),1),AA=l(x(),1),Ip=(0,AA.jsx)(lx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,AA.jsx)(lx.Path,{d:"M9 15h6V9H9v6zm-5 5h1.5V4H4v16zM18.5 4v16H20V4h-1.5z"})});var cx=l($(),1),LA=l(x(),1),NA=(0,LA.jsx)(cx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,LA.jsx)(cx.Path,{d:"M4 4L20 4L20 5.5L4 5.5L4 4ZM10 7L14 7L14 17L10 17L10 7ZM20 18.5L4 18.5L4 20L20 20L20 18.5Z"})});var ux=l($(),1),MA=l(x(),1),Pp=(0,MA.jsx)(ux.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,MA.jsx)(ux.Path,{d:"M4 4H5.5V20H4V4ZM7 10L17 10V14L7 14V10ZM20 4H18.5V20H20V4Z"})});var dx=l($(),1),DA=l(x(),1),VA=(0,DA.jsx)(dx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,DA.jsx)(dx.Path,{d:"M9 20h6V9H9v11zM4 4v1.5h16V4H4z"})});var fx=l($(),1),FA=l(x(),1),ll=(0,FA.jsx)(fx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,FA.jsx)(fx.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 mx=l($(),1),zA=l(x(),1),jA=(0,zA.jsx)(mx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,zA.jsx)(mx.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 px=l($(),1),GA=l(x(),1),fi=(0,GA.jsx)(px.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,GA.jsx)(px.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 hx=l($(),1),HA=l(x(),1),nn=(0,HA.jsx)(hx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,HA.jsx)(hx.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 gx=l($(),1),UA=l(x(),1),Hk=(0,UA.jsx)(gx.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,UA.jsx)(gx.Path,{d:"M3 6h11v1.5H3V6Zm3.5 5.5h11V13h-11v-1.5ZM21 17H10v1.5h11V17Z"})});var bx=l($(),1),WA=l(x(),1),ZA=(0,WA.jsx)(bx.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,WA.jsx)(bx.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 kx=l($(),1),$A=l(x(),1),YA=(0,$A.jsx)(kx.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,$A.jsx)(kx.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M15 11h-.2V9c0-1.5-1.2-2.8-2.8-2.8S9.2 7.5 9.2 9v2H9c-.6 0-1 .4-1 1v4c0 .6.4 1 1 1h6c.6 0 1-.4 1-1v-4c0-.6-.4-1-1-1zm-1.8 0h-2.5V9c0-.7.6-1.2 1.2-1.2s1.2.6 1.2 1.2v2z"})});var vx=l($(),1),KA=l(x(),1),df=(0,KA.jsx)(vx.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,KA.jsx)(vx.Path,{d:"M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1zm-2.8 0H9.8V7c0-1.2 1-2.2 2.2-2.2s2.2 1 2.2 2.2v3z"})});var Uk=l($(),1),Wk=l(x(),1),Rp=(0,Wk.jsxs)(Uk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Wk.jsx)(Uk.Path,{d:"m7 6.5 4 2.5-4 2.5z"}),(0,Wk.jsx)(Uk.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 yx=l($(),1),XA=l(x(),1),Zk=(0,XA.jsx)(yx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,XA.jsx)(yx.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 Sx=l($(),1),qA=l(x(),1),ts=(0,qA.jsx)(Sx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,qA.jsx)(Sx.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})});var $k=l($(),1),Yk=l(x(),1),cl=(0,Yk.jsxs)($k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Yk.jsx)($k.Path,{d:"M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z"}),(0,Yk.jsx)($k.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 _x=l($(),1),QA=l(x(),1),JA=(0,QA.jsx)(_x.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,QA.jsx)(_x.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 xx=l($(),1),eL=l(x(),1),Kk=(0,eL.jsx)(xx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,eL.jsx)(xx.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})});var wx=l($(),1),tL=l(x(),1),oL=(0,tL.jsx)(wx.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,tL.jsx)(wx.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 Cx=l($(),1),rL=l(x(),1),mi=(0,rL.jsx)(Cx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,rL.jsx)(Cx.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})});var Bx=l($(),1),nL=l(x(),1),iL=(0,nL.jsx)(Bx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,nL.jsx)(Bx.Path,{d:"M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM7 9h10v6H7V9Z"})});var Ex=l($(),1),sL=l(x(),1),aL=(0,sL.jsx)(Ex.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,sL.jsx)(Ex.Path,{d:"M5 5.5h8V4H5v1.5ZM5 20h8v-1.5H5V20ZM19 9H5v6h14V9Z"})});var Tx=l($(),1),lL=l(x(),1),cL=(0,lL.jsx)(Tx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,lL.jsx)(Tx.Path,{d:"M19 5.5h-8V4h8v1.5ZM19 20h-8v-1.5h8V20ZM5 9h14v6H5V9Z"})});var Ix=l($(),1),uL=l(x(),1),dL=(0,uL.jsx)(Ix.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,uL.jsx)(Ix.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 Px=l($(),1),fL=l(x(),1),mL=(0,fL.jsx)(Px.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,fL.jsx)(Px.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 Rx=l($(),1),pL=l(x(),1),hL=(0,pL.jsx)(Rx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,pL.jsx)(Rx.Path,{d:"m7.3 9.7 1.4 1.4c.2-.2.3-.3.4-.5 0 0 0-.1.1-.1.3-.5.4-1.1.3-1.6L12 7 9 4 7.2 6.5c-.6-.1-1.1 0-1.6.3 0 0-.1 0-.1.1-.3.1-.4.2-.6.4l1.4 1.4L4 11v1h1l2.3-2.3zM4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4z"})});var Ox=l($(),1),gL=l(x(),1),Nr=(0,gL.jsx)(Ox.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,gL.jsx)(Ox.Path,{d:"M7 11.5h10V13H7z"})});var Ax=l($(),1),bL=l(x(),1),kL=(0,bL.jsx)(Ax.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,bL.jsx)(Ax.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 Lx=l($(),1),vL=l(x(),1),yL=(0,vL.jsx)(Lx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,vL.jsx)(Lx.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 Nx=l($(),1),SL=l(x(),1),_L=(0,SL.jsx)(Nx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,SL.jsx)(Nx.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 Mx=l($(),1),xL=l(x(),1),Pn=(0,xL.jsx)(Mx.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,xL.jsx)(Mx.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 Xk=l($(),1),qk=l(x(),1),wL=(0,qk.jsxs)(Xk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,qk.jsx)(Xk.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,qk.jsx)(Xk.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 Dx=l($(),1),CL=l(x(),1),BL=(0,CL.jsx)(Dx.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,CL.jsx)(Dx.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 Vx=l($(),1),EL=l(x(),1),Fx=(0,EL.jsx)(Vx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,EL.jsx)(Vx.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z"})});var Qk=l($(),1),Jk=l(x(),1),TL=(0,Jk.jsxs)(Qk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Jk.jsx)(Qk.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,Jk.jsx)(Qk.Path,{d:"m16.5 19.5h-9v-1.5h9z"})]});var Op=l($(),1),Ap=l(x(),1),IL=(0,Ap.jsxs)(Op.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Ap.jsx)(Op.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,Ap.jsx)(Op.Path,{d:"m4.5 7.5v9h1.5v-9z"}),(0,Ap.jsx)(Op.Path,{d:"m18 7.5v9h1.5v-9z"})]});var ev=l($(),1),tv=l(x(),1),PL=(0,tv.jsxs)(ev.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,tv.jsx)(ev.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,tv.jsx)(ev.Path,{d:"m4.5 16.5v-9h1.5v9z"})]});var ov=l($(),1),rv=l(x(),1),RL=(0,rv.jsxs)(ov.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,rv.jsx)(ov.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,rv.jsx)(ov.Path,{d:"m18 16.5v-9h1.5v9z"})]});var nv=l($(),1),iv=l(x(),1),OL=(0,iv.jsxs)(nv.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,iv.jsx)(nv.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,iv.jsx)(nv.Path,{d:"m16.5 6h-9v-1.5h9z"})]});var Lp=l($(),1),Np=l(x(),1),AL=(0,Np.jsxs)(Lp.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Np.jsx)(Lp.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,Np.jsx)(Lp.Path,{d:"m7.5 6h9v-1.5h-9z"}),(0,Np.jsx)(Lp.Path,{d:"m7.5 19.5h9v-1.5h-9z"})]});var zx=l($(),1),LL=l(x(),1),NL=(0,LL.jsx)(zx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,LL.jsx)(zx.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 jx=l($(),1),ML=l(x(),1),sv=(0,ML.jsx)(jx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ML.jsx)(jx.Path,{d:"M5 4h14v11H5V4Zm11 16H8v-1.5h8V20Z"})});var Gx=l($(),1),DL=l(x(),1),ff=(0,DL.jsx)(Gx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,DL.jsx)(Gx.Path,{d:"M16 5.5H8V4h8v1.5ZM16 20H8v-1.5h8V20ZM5 9h14v6H5V9Z"})});var Hx=l($(),1),VL=l(x(),1),FL=(0,VL.jsx)(Hx.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,VL.jsx)(Hx.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 Ux=l($(),1),zL=l(x(),1),pi=(0,zL.jsx)(Ux.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,zL.jsx)(Ux.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 Wx=l($(),1),jL=l(x(),1),GL=(0,jL.jsx)(Wx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,jL.jsx)(Wx.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 Zx=l($(),1),HL=l(x(),1),UL=(0,HL.jsx)(Zx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,HL.jsx)(Zx.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 $x=l($(),1),WL=l(x(),1),ZL=(0,WL.jsx)($x.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,WL.jsx)($x.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 Yx=l($(),1),$L=l(x(),1),YL=(0,$L.jsx)(Yx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$L.jsx)(Yx.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 Kx=l($(),1),KL=l(x(),1),XL=(0,KL.jsx)(Kx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,KL.jsx)(Kx.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 Xx=l($(),1),qL=l(x(),1),QL=(0,qL.jsx)(Xx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,qL.jsx)(Xx.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 qx=l($(),1),JL=l(x(),1),ul=(0,JL.jsx)(qx.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,JL.jsx)(qx.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 Qx=l($(),1),eN=l(x(),1),tr=(0,eN.jsx)(Qx.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,eN.jsx)(Qx.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 Jx=l($(),1),tN=l(x(),1),oN=(0,tN.jsx)(Jx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,tN.jsx)(Jx.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 ew=l($(),1),rN=l(x(),1),nN=(0,rN.jsx)(ew.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,rN.jsx)(ew.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 tw=l($(),1),iN=l(x(),1),sN=(0,iN.jsx)(tw.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,iN.jsx)(tw.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 gl=l(zo(),1),Rn=l(Re(),1),Te=l(M(),1);var Pj=l(Z(),1),Rj=l(kj(),1);var zt="core/block-editor";var iw={};$s(iw,{areBlocksHidden:()=>Kpe,areBlocksHiddenAnywhere:()=>Xpe,getAllPatterns:()=>Vpe,getBlockRemovalRules:()=>Ope,getBlockSettings:()=>yj,getBlockStyles:()=>Wpe,getBlockWithoutAttributes:()=>Epe,getClosestAllowedInsertionPoint:()=>xj,getClosestAllowedInsertionPointForPattern:()=>$pe,getContentLockingParent:()=>aN,getEditedContentOnlySection:()=>lN,getEnabledBlockParents:()=>Ppe,getEnabledClientIdsTree:()=>Ipe,getExpandedBlock:()=>Hpe,getInserterMediaCategories:()=>Npe,getInsertionPoint:()=>Ype,getLastFocus:()=>jpe,getLastInsertedBlocksClientIds:()=>Bpe,getParentSectionBlock:()=>lv,getPatternBySlug:()=>Dpe,getRegisteredInserterMediaCategories:()=>Lpe,getRemovalPromptData:()=>Rpe,getReusableBlocks:()=>zpe,getSectionRootClientId:()=>pf,getStyleOverrides:()=>Ape,getZoomLevel:()=>Zpe,hasAllowedPatterns:()=>Mpe,hasBlockSpotlight:()=>qpe,isBlockHidden:()=>wj,isBlockInterfaceHidden:()=>Cpe,isBlockSubtreeDisabled:()=>Tpe,isContainerInsertableToInContentOnlyMode:()=>av,isDragging:()=>Gpe,isEditLockedBlock:()=>Cj,isLockedBlock:()=>Qpe,isMoveLockedBlock:()=>Bj,isRemoveLockedBlock:()=>Ej,isSectionBlock:()=>ml,isWithinEditedContentOnlySection:()=>Upe,isZoomOut:()=>cN});var Mr=l(M(),1),nw=l(Z(),1);var ow=l(L(),1);var br={desktop:{label:(0,ow.__)("Desktop"),icon:MO,key:"desktop"},tablet:{label:(0,ow.__)("Tablet"),icon:GL,key:"tablet"},mobile:{label:(0,ow.__)("Mobile"),icon:Zk,key:"mobile"}},zc=Object.entries(br);var rw=l(Z(),1),vj=l(Je(),1);function he(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 dl=(e,t,o)=>{let r=Array.isArray(t)?t:t.split("."),n=e;return r.forEach(i=>{n=n?.[i]}),n??o};var Spe=["color","border","dimensions","typography","spacing"],_pe={"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},xpe={"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"},wpe=e=>xpe[e]||e;function yj(e,t,...o){let r=lo(e,t),n=[];if(t){let i=t;do{let s=lo(e,i);(0,rw.hasBlockSupport)(s,"__experimentalSettings",!1)&&n.push(i)}while(i=e.blocks.parents.get(i))}return o.map(i=>{if(Spe.includes(i)){console.warn("Top level useSetting paths are disabled. Please use a subpath to query the information needed.");return}let s=(0,vj.applyFilters)("blockEditor.useSetting.before",void 0,i,t,r);if(s!==void 0)return s;let a=wpe(i);for(let d of n){let f=hi(e,d);if(s=dl(f.settings?.blocks?.[r],a)??dl(f.settings,a),s!==void 0)break}let c=fl(e);if(s===void 0&&r&&(s=dl(c.__experimentalFeatures?.blocks?.[r],a)),s===void 0&&(s=dl(c.__experimentalFeatures,a)),s!==void 0)return rw.__EXPERIMENTAL_PATHS_WITH_OVERRIDE[a]?s.custom??s.theme??s.default:s;let u=_pe[a]?.(c);return u!==void 0?u:a==="typography.dropCap"?!0:void 0})}var{isContentBlock:Sj}=F(nw.privateApis);function Cpe(e){return e.isBlockInterfaceHidden}function Bpe(e){return e?.lastBlockInserted?.clientIds}function Epe(e,t){return e.blocks.byClientId.get(t)}var Tpe=(e,t)=>{let o=r=>gi(e,r)==="disabled"&&sn(e,r).every(o);return sn(e,t).every(o)};function av(e,t,o){let r=Sj(t),n=lo(e,o),i=Sj(n);return pf(e)===o||i&&r}function _j(e,t){let o=sn(e,t),r=[];for(let n of o){let i=_j(e,n);gi(e,n)!=="disabled"?r.push({clientId:n,innerBlocks:i}):r.push(...i)}return r}var Ipe=(0,Mr.createRegistrySelector)(()=>(0,Mr.createSelector)(_j,e=>[e.blocks.order,e.derivedBlockEditingModes,e.blockEditingModes])),Ppe=(0,Mr.createSelector)((e,t,o=!1)=>pl(e,t,o).filter(r=>gi(e,r)!=="disabled"),e=>[e.blocks.parents,e.blockEditingModes,e.settings.templateLock,e.blockListSettings]);function Rpe(e){return e.removalPromptData}function Ope(e){return e.blockRemovalRules}var Ape=(0,Mr.createSelector)(e=>{let o=Mp(e).reduce((r,n,i)=>(r[n]=i,r),{});return[...e.styleOverrides].sort((r,n)=>{let[,{clientId:i}]=r,[,{clientId:s}]=n,a=o[i]??-1,c=o[s]??-1;return a-c})},e=>[e.blocks.order,e.styleOverrides]);function Lpe(e){return e.registeredInserterMediaCategories}var Npe=(0,Mr.createSelector)(e=>{let{settings:{inserterMediaCategories:t,allowedMimeTypes:o,enableOpenverseMediaCategory:r},registeredInserterMediaCategories:n}=e;if(!t&&!n.length||!o)return;let i=t?.map(({name:a})=>a)||[];return[...t||[],...(n||[]).filter(({name:a})=>!i.includes(a))].filter(a=>!r&&a.name==="openverse"?!1:Object.values(o).some(c=>c.startsWith(`${a.mediaType}/`)))},e=>[e.settings.inserterMediaCategories,e.settings.allowedMimeTypes,e.settings.enableOpenverseMediaCategory,e.registeredInserterMediaCategories]),Mpe=(0,Mr.createRegistrySelector)(e=>(0,Mr.createSelector)((t,o=null)=>{let{getAllPatterns:r}=F(e(zt)),n=r(),{allowedBlockTypes:i}=fl(t);return n.some(s=>{let{inserter:a=!0}=s;if(!a)return!1;let c=mf(s);return uv(c,i)&&c.every(({name:u})=>hf(t,u,o))})},(t,o)=>[...dv(e)(t),...jc(e)(t,o)])),Dpe=(0,Mr.createRegistrySelector)(e=>(0,Mr.createSelector)((t,o)=>{if(o?.startsWith("core/block/")){let r=parseInt(o.slice(11),10),n=F(e(zt)).getReusableBlocks().find(({id:i})=>i===r);return n?cv(n,t.settings.__experimentalUserPatternCategories):null}return[...t.settings.__experimentalBlockPatterns??[],...t.settings[Rc]?.(e)??[]].find(({name:r})=>r===o)},(t,o)=>o?.startsWith("core/block/")?[F(e(zt)).getReusableBlocks(),t.settings.__experimentalReusableBlocks]:[t.settings.__experimentalBlockPatterns,t.settings[Rc]?.(e)])),Vpe=(0,Mr.createRegistrySelector)(e=>(0,Mr.createSelector)(t=>[...F(e(zt)).getReusableBlocks().map(o=>cv(o,t.settings.__experimentalUserPatternCategories)),...t.settings.__experimentalBlockPatterns??[],...t.settings[Rc]?.(e)??[]].filter((o,r,n)=>r===n.findIndex(i=>o.name===i.name)),dv(e))),Fpe=[],zpe=(0,Mr.createRegistrySelector)(e=>t=>{let o=t.settings[e0];return(o?o(e):t.settings.__experimentalReusableBlocks)??Fpe});function jpe(e){return e.lastFocus}function Gpe(e){return e.isDragging}function Hpe(e){return e.expandedBlock}var aN=(e,t)=>{let o=t,r;for(;!r&&(o=e.blocks.parents.get(o));)Xs(e,o)==="contentOnly"&&(r=o);return r},lv=(e,t)=>{let o=t,r;for(;o=e.blocks.parents.get(o);)ml(e,o)&&(r=o);return r};function ml(e,t){if(t===e.editedContentOnlySection)return!1;let o=lo(e,t);if(o==="core/block")return!0;let r=hi(e,t),n=o==="core/template-part",i=e.settings?.[Sp];if((r?.metadata?.patternName||n)&&window?.__experimentalContentOnlyPatternInsertion&&!i)return!0;let s=Xs(e,t)==="contentOnly",a=xo(e,t),c=Xs(e,a)==="contentOnly";return!!(s&&!c)}function lN(e){return e.editedContentOnlySection}function Upe(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 Wpe=(0,Mr.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 pf(e){return e.settings?.[Oc]}function cN(e){return e.zoomLevel==="auto-scaled"||e.zoomLevel<100}function Zpe(e){return e.zoomLevel}function xj(e,t,o=""){let r=Array.isArray(t)?t:[t],n=s=>r.every(a=>hf(e,a,s));if(!o){if(n(o))return o;let s=pf(e);return s&&n(s)?s:null}let i=o;for(;i!==null&&!n(i);)i=xo(e,i);return i}function $pe(e,t,o){let{allowedBlockTypes:r}=fl(e);if(!uv(mf(t),r))return null;let i=mf(t).map(({blockName:s})=>s);return xj(e,i,o)}function Ype(e){return e.insertionPoint}var wj=(e,t)=>{let o=lo(e,t);if(!(0,nw.hasBlockSupport)(o,"visibility",!0))return!1;let n=e.blocks.attributes.get(t)?.metadata?.blockVisibility;if(n===!1)return!0;if(!window.__experimentalHideBlocksBasedOnScreenSize)return!1;if(typeof n=="object"&&n!==null){let a=(fl(e)[_p]??br.desktop.key).toLowerCase();return n?.[a]===!1}return!1},Kpe=(e,t)=>!t||t.length===0?!1:t.some(o=>wj(e,o)),Xpe=(e,t)=>t?.length?t.some(o=>{if(!o)return!1;let n=e.blocks.attributes.get(o)?.metadata?.blockVisibility;return typeof n=="boolean"?n===!1:typeof n!="object"?!1:zc.some(([,{key:i}])=>n?.[i]===!1)}):!1;function qpe(e){return!!e.hasBlockSpotlight||!!e.editedContentOnlySection}function Cj(e,t){return!!hi(e,t)?.lock?.edit}function Bj(e,t){let o=hi(e,t);if(o?.lock?.move!==void 0)return!!o?.lock?.move;let r=xo(e,t);return Xs(e,r)==="all"}function Ej(e,t){let o=hi(e,t);if(o?.lock?.remove!==void 0)return!!o?.lock?.remove;let r=xo(e,t),n=Xs(e,r);return n==="all"||n==="insert"}function Qpe(e,t){return Cj(e,t)||Bj(e,t)||Ej(e,t)}var mv=l(L(),1),It={user:"user",theme:"theme",directory:"directory"},fv={full:"fully",unsynced:"unsynced"},gf={name:"allPatterns",label:(0,mv._x)("All","patterns")},hl={name:"myPatterns",label:(0,mv.__)("My patterns")},Dp={name:"core/starter-content",label:(0,mv.__)("Starter content")};function sw(e,t,o){let r=e.name.startsWith("core/block"),n=e.source==="core"||e.source?.startsWith("pattern-directory");return!!(t===It.theme&&(r||n)||t===It.directory&&(r||!n)||t===It.user&&e.type!==It.user||o===fv.full&&e.syncStatus!==""||o===fv.unsynced&&e.syncStatus!=="unsynced"&&r)}var Gc=Symbol("isFiltered"),Tj=new WeakMap,Ij=new WeakMap;function cv(e,t=[]){return{name:`core/block/${e.id}`,id:e.id,type:It.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 Jpe(e){let t=(0,Pj.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 aw(e){let t=Tj.get(e);return t||(t=Jpe(e),Tj.set(e,t)),t}function mf(e){let t=Ij.get(e);return t||(t=(0,Rj.parse)(e.content),t=t.filter(o=>o.blockName!==null),Ij.set(e,t)),t}var bf=(e,t,o=null)=>typeof e=="boolean"?e:Array.isArray(e)?e.includes("core/post-content")&&t===null?!0:e.includes(t):o,uv=(e,t)=>{if(typeof t=="boolean")return t;let o=[...e];for(;o.length>0;){let r=o.shift();if(!bf(t,r.name||r.blockName,!0))return!1;r.innerBlocks?.forEach(i=>{o.push(i)})}return!0},dv=e=>t=>[t.settings.__experimentalBlockPatterns,t.settings.__experimentalUserPatternCategories,t.settings.__experimentalReusableBlocks,t.settings[Rc]?.(e),t.blockPatterns,F(e(zt)).getReusableBlocks()],jc=()=>(e,t)=>[e.blockListSettings[t],e.blocks.byClientId.get(t),e.settings.allowedBlockTypes,e.settings.templateLock,gi(e,t),pf(e),ml(e,t)];var ehe=(e,t,o)=>(r,n)=>{let i,s;if(typeof e=="function"?(i=e(r),s=e(n)):(i=r[e],s=n[e]),i>s)return o==="asc"?1:-1;if(s>i)return o==="asc"?-1:1;let a=t.findIndex(u=>u===r),c=t.findIndex(u=>u===n);return a>c?1:c>a?-1:0};function qs(e,t,o="asc"){return e.concat().sort(ehe(t,e,o))}var{isContentBlock:dN}=F(Ve.privateApis),the=3600*1e3,ohe=24*3600*1e3,rhe=168*3600*1e3,or=[],nhe=new Set,Nj={[Gc]:!0};function lo(e,t){let o=e.blocks.byClientId.get(t),r="core/social-link";if(Aj.Platform.OS!=="web"&&o?.name===r){let n=e.blocks.attributes.get(t),{service:i}=n??{};return i?`${r}-${i}`:r}return o?o.name:null}function ihe(e,t){let o=e.blocks.byClientId.get(t);return!!o&&o.isValid}function hi(e,t){return e.blocks.byClientId.get(t)?e.blocks.attributes.get(t):null}function bl(e,t){return e.blocks.byClientId.has(t)?e.blocks.tree.get(t):null}var she=(0,Te.createSelector)((e,t)=>{let o=e.blocks.byClientId.get(t);return o?{...o,attributes:hi(e,t)}:null},(e,t)=>[e.blocks.byClientId.get(t),e.blocks.attributes.get(t)]);function ahe(e,t){let o=!t||!cw(e,t)?t||"":"controlled||"+t;return e.blocks.tree.get(o)?.innerBlocks||or}var Mj=(0,Te.createSelector)((e,t)=>((0,Rn.default)("wp.data.select( 'core/block-editor' ).__unstableGetClientIdWithClientIdsTree",{since:"6.3",version:"6.5"}),{clientId:t,innerBlocks:Dj(e,t)}),e=>[e.blocks.order]),Dj=(0,Te.createSelector)((e,t="")=>((0,Rn.default)("wp.data.select( 'core/block-editor' ).__unstableGetClientIdsTree",{since:"6.3",version:"6.5"}),sn(e,t).map(o=>Mj(e,o))),e=>[e.blocks.order]),Vj=(0,Te.createSelector)((e,t)=>{t=Array.isArray(t)?[...t]:[t];let o=[];for(let n of t){let i=e.blocks.order.get(n);i&&o.push(...i)}let r=0;for(;r<o.length;){let n=o[r],i=e.blocks.order.get(n);i&&o.splice(r+1,0,...i),r++}return o},e=>[e.blocks.order]),Mp=e=>Vj(e,""),lhe=(0,Te.createSelector)((e,t)=>{let o=Mp(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]),Fj=(0,Te.createSelector)((e,t)=>{if(!t)return or;let o=Array.isArray(t)?t:[t],n=Mp(e).filter(i=>{let s=e.blocks.byClientId.get(i);return o.includes(s.name)});return n.length>0?n:or},e=>[e.blocks.order,e.blocks.byClientId]);function che(e,t){return(0,Rn.default)("wp.data.select( 'core/block-editor' ).__experimentalGetGlobalBlocksByName",{since:"6.5",alternative:"wp.data.select( 'core/block-editor' ).getBlocksByName"}),Fj(e,t)}var lw=(0,Te.createSelector)((e,t)=>(Array.isArray(t)?t:[t]).map(o=>bl(e,o)),(e,t)=>(Array.isArray(t)?t:[t]).map(o=>e.blocks.tree.get(o))),uhe=(0,Te.createSelector)((e,t)=>lw(e,t).filter(Boolean).map(o=>o.name),(e,t)=>lw(e,t));function dhe(e,t){return sn(e,t).length}function hv(e){return e.selection.selectionStart}function gv(e){return e.selection.selectionEnd}function fhe(e){return e.selection.selectionStart.clientId}function mhe(e){return e.selection.selectionEnd.clientId}function phe(e){let t=Hc(e).length;return t||(e.selection.selectionStart.clientId?1:0)}function hhe(e){let{selectionStart:t,selectionEnd:o}=e.selection;return!!t.clientId&&t.clientId===o.clientId}function Vp(e){let{selectionStart:t,selectionEnd:o}=e.selection,{clientId:r}=t;return!r||r!==o.clientId?null:r}function ghe(e){let t=Vp(e);return t?bl(e,t):null}function xo(e,t){return e.blocks.parents.get(t)??null}var pl=(0,Te.createSelector)((e,t,o=!1)=>{let r=[],n=t;for(;n=e.blocks.parents.get(n);)r.push(n);return r.length?o?r:r.reverse():or},e=>[e.blocks.parents]),fN=(0,Te.createSelector)((e,t,o,r=!1)=>{let n=pl(e,t,r),i=Array.isArray(o)?s=>o.includes(s):s=>o===s;return n.filter(s=>i(lo(e,s)))},e=>[e.blocks.parents]);function bhe(e,t){let o=t,r;do r=o,o=e.blocks.parents.get(o);while(o);return r}function khe(e,t){let o=Vp(e),r=[...pl(e,t),t],n=[...pl(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 mN(e,t,o=1){if(t===void 0&&(t=Vp(e)),t===void 0&&(o<0?t=pN(e):t=zj(e)),!t)return null;let r=xo(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 vhe(e,t){return mN(e,t,-1)}function yhe(e,t){return mN(e,t,1)}function She(e){return e.initialPosition}var Fp=(0,Te.createSelector)(e=>{let{selectionStart:t,selectionEnd:o}=e.selection;if(!t.clientId||!o.clientId)return or;if(t.clientId===o.clientId)return[t.clientId];let r=xo(e,t.clientId);if(r===null)return or;let n=sn(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 Hc(e){let{selectionStart:t,selectionEnd:o}=e.selection;return t.clientId===o.clientId?or:Fp(e)}var _he=(0,Te.createSelector)(e=>{let t=Hc(e);return t.length?t.map(o=>bl(e,o)):or},e=>[...Fp.getDependants(e),e.blocks.byClientId,e.blocks.order,e.blocks.attributes]);function pN(e){return Hc(e)[0]||null}function zj(e){let t=Hc(e);return t[t.length-1]||null}function xhe(e,t){return pN(e)===t}function jj(e,t){return Hc(e).indexOf(t)!==-1}var whe=(0,Te.createSelector)((e,t)=>{let o=t,r=!1;for(;o&&!r;)o=xo(e,o),r=jj(e,o);return r},e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]);function Che(e){let{selectionStart:t,selectionEnd:o}=e.selection;return t.clientId===o.clientId?null:t.clientId||null}function Bhe(e){let{selectionStart:t,selectionEnd:o}=e.selection;return t.clientId===o.clientId?null:o.clientId||null}function Ehe(e){let t=hv(e),o=gv(e);return!t.attributeKey&&!o.attributeKey&&typeof t.offset>"u"&&typeof o.offset>"u"}function The(e){let t=hv(e),o=gv(e);return!!t&&!!o&&t.clientId===o.clientId&&t.attributeKey===o.attributeKey&&t.offset===o.offset}function Ihe(e){return Fp(e).some(t=>{let o=lo(e,t);return!(0,Ve.getBlockType)(o).merge})}function Phe(e,t){let o=hv(e),r=gv(e);if(o.clientId===r.clientId||!o.attributeKey||!r.attributeKey||typeof o.offset>"u"||typeof r.offset>"u")return!1;let n=xo(e,o.clientId),i=xo(e,r.clientId);if(n!==i)return!1;let s=sn(e,n),a=s.indexOf(o.clientId),c=s.indexOf(r.clientId),u,d;a>c?(u=r,d=o):(u=o,d=r);let f=t?d.clientId:u.clientId,m=t?u.clientId:d.clientId,p=lo(e,f);if(!(0,Ve.getBlockType)(p).merge)return!1;let g=bl(e,m);if(g.name===p)return!0;let b=(0,Ve.switchToBlockType)(g,p);return b&&b.length}var Rhe=e=>{let t=hv(e),o=gv(e);if(t.clientId===o.clientId||!t.attributeKey||!o.attributeKey||typeof t.offset>"u"||typeof o.offset>"u")return or;let r=xo(e,t.clientId),n=xo(e,o.clientId);if(r!==n)return or;let i=sn(e,r),s=i.indexOf(t.clientId),a=i.indexOf(o.clientId),[c,u]=s>a?[o,t]:[t,o],d=bl(e,c.clientId),f=bl(e,u.clientId),m=d.attributes[c.attributeKey],p=f.attributes[u.attributeKey],h=(0,gl.create)({html:m}),g=(0,gl.create)({html:p});return h=(0,gl.remove)(h,0,c.offset),g=(0,gl.remove)(g,u.offset,g.text.length),[{...d,attributes:{...d.attributes,[c.attributeKey]:(0,gl.toHTMLString)({value:h})}},{...f,attributes:{...f.attributes,[u.attributeKey]:(0,gl.toHTMLString)({value:g})}}]};function sn(e,t){return e.blocks.order.get(t||"")||or}function Gj(e,t){let o=xo(e,t);return sn(e,o).indexOf(t)}function Hj(e,t){let{selectionStart:o,selectionEnd:r}=e.selection;return o.clientId!==r.clientId?!1:o.clientId===t}function Uj(e,t,o=!1){let r=Fp(e);return r.length?o?r.some(n=>pl(e,n,!0).includes(t)):r.some(n=>xo(e,n)===t):!1}function Wj(e,t,o=!1){return sn(e,t).some(r=>hN(e,r)||o&&Wj(e,r,o))}function Ohe(e,t){if(!t)return!1;let o=Hc(e),r=o.indexOf(t);return r>-1&&r<o.length-1}function Ahe(e){let{selectionStart:t,selectionEnd:o}=e.selection;return t.clientId!==o.clientId}function Lhe(e){return e.isMultiSelecting}function Nhe(e){return e.isSelectionEnabled}function Mhe(e,t){return e.blocksMode[t]||"visual"}function Dhe(e){return e.isTyping}function Zj(e){return!!e.draggedBlocks.length}function Vhe(e){return e.draggedBlocks}function hN(e,t){return e.draggedBlocks.includes(t)}function Fhe(e,t){return Zj(e)?pl(e,t).some(r=>hN(e,r)):!1}function zhe(){return(0,Rn.default)('wp.data.select( "core/block-editor" ).isCaretWithinFormattedText',{since:"6.1",version:"6.3"}),!1}var jhe=(0,Te.createSelector)(e=>{let t,o,{insertionCue:r,selection:{selectionEnd:n}}=e;if(r!==null)return r;let{clientId:i}=n;return i?(t=xo(e,i)||void 0,o=Gj(e,n.clientId)+1):o=sn(e).length,{rootClientId:t,index:o}},e=>[e.insertionCue,e.selection.selectionEnd.clientId,e.blocks.parents,e.blocks.order]);function Ghe(e){return e.insertionCue!==null}function Hhe(e){return e.template.isValid}function Uhe(e){return e.settings.template}function Xs(e,t){if(!t)return e.settings.templateLock??!1;let o=SN(e,t)?.templateLock;return o==="contentOnly"&&e.editedContentOnlySection===t?!1:o??!1}var gN=(e,t,o=null)=>{let r,n;if(t&&typeof t=="object"?(r=t,n=t.name):(r=(0,Ve.getBlockType)(t),n=t),!r)return!1;let{allowedBlockTypes:i}=fl(e);if(!bf(i,n,!0))return!1;let a=(Array.isArray(r.parent)?r.parent:[]).concat(Array.isArray(r.ancestor)?r.ancestor:[]);if(a.length>0){if(a.includes("core/post-content"))return!0;let c=o,u=!1;do{if(a.includes(lo(e,c))){u=!0;break}c=e.blocks.parents.get(c)}while(c);return u}return!0},bv=(e,t,o=null)=>{if(!gN(e,t,o))return!1;let r;t&&typeof t=="object"?(r=t,t=r.name):r=(0,Ve.getBlockType)(t);let n=Xs(e,o);if(n&&n!=="contentOnly")return!1;let i=gi(e,o??"");if(i==="disabled")return!1;let s=SN(e,o);if(o&&s===void 0)return!1;let a=dN(t),c=!!ml(e,o),u=!!lv(e,o);if((c||u)&&!a||(c||i==="contentOnly")&&!av(e,t,o))return!1;let d=lo(e,o),m=(0,Ve.getBlockType)(d)?.allowedBlocks,p=bf(m,t);if(p!==!1){let y=s?.allowedBlocks,_=bf(y,t);_!==null&&(p=_)}let h=r.parent,g=bf(h,d),b=!0,k=r.ancestor;k&&(b=[o,...pl(e,o)].some(_=>bf(k,lo(e,_))));let v=b&&(p===null&&g===null||p===!0||g===!0);return v&&(0,Lj.applyFilters)("blockEditor.__unstableCanInsertBlockType",v,r,o,{getBlock:bl.bind(null,e),getBlockParentsByBlockName:fN.bind(null,e)})},hf=(0,Te.createRegistrySelector)(e=>(0,Te.createSelector)(bv,(t,o,r)=>jc(e)(t,r)));function Whe(e,t,o=null){return t.every(r=>hf(e,lo(e,r),o))}function bN(e,t){let o=hi(e,t);if(o===null)return!0;if(o.lock?.remove!==void 0)return!o.lock.remove;let r=xo(e,t),n=Xs(e,r);if(n&&n!=="contentOnly")return!1;let i=!!lv(e,t),s=dN(lo(e,t));if(i&&!s)return!1;let a=!!ml(e,r),c=gi(e,r);return(a||c==="contentOnly")&&!av(e,lo(e,t),r)?!1:c!=="disabled"}function $j(e,t){return t.every(o=>bN(e,o))}function Yj(e,t){let o=hi(e,t);if(o===null)return!0;if(o.lock?.move!==void 0)return!o.lock.move;let r=xo(e,t);if(Xs(e,r)==="all")return!1;let i=!!lv(e,t),s=dN(lo(e,t));if(i&&!s)return!1;let a=!!ml(e,r),c=gi(e,r);return(a||c==="contentOnly")&&!av(e,lo(e,t),r)?!1:gi(e,r)!=="disabled"}function Zhe(e,t){return t.every(o=>Yj(e,o))}function Kj(e,t){let o=hi(e,t);if(o===null)return!0;let{lock:r}=o;return!r?.edit}function $he(e,t){return(0,Ve.hasBlockSupport)(t,"lock",!0)?!!e.settings?.canLockBlocks:!1}function kN(e,t){return e.preferences.insertUsage?.[t]??null}var pv=(e,t,o)=>(0,Ve.hasBlockSupport)(t,"inserter",!0)?bv(e,t.name,o):!1,Yhe=(e,t)=>o=>{let r=`${t.id}/${o.name}`,{time:n,count:i=0}=kN(e,r)||{};return{...t,id:r,icon:o.icon||t.icon,title:o.title||t.title,description:o.description||t.description,category:o.category||t.category,example:o.hasOwnProperty("example")?o.example:t.example,initialAttributes:{...t.initialAttributes,...o.attributes},innerBlocks:o.innerBlocks,keywords:o.keywords||t.keywords,frecency:vN(n,i),isSearchOnly:o.isSearchOnly}},vN=(e,t)=>{if(!e)return t;let o=Date.now()-e;switch(!0){case o<the:return t*4;case o<ohe:return t*2;case o<rhe:return t/2;default:return t/4}},Xj=(e,{buildScope:t="inserter"})=>o=>{let r=o.name,n=!1;(0,Ve.hasBlockSupport)(o.name,"multiple",!0)||(n=lw(e,Mp(e)).some(({name:f})=>f===o.name));let{time:i,count:s=0}=kN(e,r)||{},a={id:r,name:o.name,title:o.title,icon:o.icon,isDisabled:n,frecency:vN(i,s)};if(t==="transform")return a;let c=(0,Ve.getBlockVariations)(o.name,"inserter"),u=(0,Ve.getBlockVariations)(o.name,"block"),d=[...c,...u.filter(f=>o.name==="core/heading"&&["h1","h2","h3","h4","h5","h6"].includes(f.name)).map(f=>({...f,isSearchOnly:!0}))];return{...a,initialAttributes:{},description:o.description,category:o.category,keywords:o.keywords,parent:o.parent,ancestor:o.ancestor,variations:d,example:o.example,utility:1}},Khe=(0,Te.createRegistrySelector)(e=>(0,Te.createSelector)((t,o=null,r=Nj)=>{let n=p=>{let h=p.wp_pattern_sync_status?pi:{src:pi,foreground:"var(--wp-block-synced-color)"},g=cv(p),{time:b,count:k=0}=kN(t,g.name)||{},v=vN(b,k);return{id:g.name,name:"core/block",initialAttributes:{ref:p.id},title:g.title,icon:h,category:"reusable",keywords:["reusable"],isDisabled:!1,utility:1,frecency:v,content:g.content,get blocks(){return aw(g).blocks},syncStatus:g.syncStatus}},i=bv(t,"core/block",o)?F(e(zt)).getReusableBlocks().map(n):[],s=Xj(t,{buildScope:"inserter"}),a=(0,Ve.getBlockTypes)().filter(p=>(0,Ve.hasBlockSupport)(p,"inserter",!0)).map(s);if(r[Gc]!==!1)a=a.filter(p=>pv(t,p,o));else{let{getClosestAllowedInsertionPoint:p}=F(e(zt));a=a.filter(h=>gN(t,h,o)&&p(h.name,o)!==null).map(h=>({...h,isAllowedInCurrentRoot:pv(t,h,o)}))}let c=a.reduce((p,h)=>{let{variations:g=[]}=h;if(g.some(({isDefault:b})=>b)||p.push(h),g.length){let b=Yhe(t,h);p.push(...g.map(b))}return p},[]),u=(p,h)=>{let{core:g,noncore:b}=p;return(h.name.startsWith("core/")?g:b).push(h),p},{core:d,noncore:f}=c.reduce(u,{core:[],noncore:[]});return[...[...d,...f],...i]},(t,o)=>[(0,Ve.getBlockTypes)(),F(e(zt)).getReusableBlocks(),t.blocks.order,t.preferences.insertUsage,...jc(e)(t,o)])),Xhe=(0,Te.createRegistrySelector)(e=>(0,Te.createSelector)((t,o,r=null)=>{let n=Array.isArray(o)?o:[o],i=Xj(t,{buildScope:"transform"}),s=(0,Ve.getBlockTypes)().filter(u=>pv(t,u,r)).map(i),a=Object.fromEntries(Object.entries(s).map(([,u])=>[u.name,u])),c=(0,Ve.getPossibleBlockTransformations)(n).reduce((u,d)=>(a[d?.name]&&u.push(a[d.name]),u),[]);return qs(c,u=>a[u.name].frecency,"desc")},(t,o,r)=>[(0,Ve.getBlockTypes)(),t.preferences.insertUsage,...jc(e)(t,r)])),qhe=(e,t=null)=>(0,Ve.getBlockTypes)().some(n=>pv(e,n,t))?!0:bv(e,"core/block",t),uN=(0,Te.createRegistrySelector)(e=>(0,Te.createSelector)((t,o=null)=>{if(!o)return;let r=(0,Ve.getBlockTypes)().filter(i=>pv(t,i,o));return bv(t,"core/block",o)&&r.push("core/block"),r},(t,o)=>[(0,Ve.getBlockTypes)(),...jc(e)(t,o)])),Qhe=(0,Te.createSelector)((e,t=null)=>((0,Rn.default)('wp.data.select( "core/block-editor" ).__experimentalGetAllowedBlocks',{alternative:'wp.data.select( "core/block-editor" ).getAllowedBlocks',since:"6.2",version:"6.4"}),uN(e,t)),(e,t)=>uN.getDependants(e,t));function qj(e,t=null){if(!t)return;let{defaultBlock:o,directInsert:r}=e.blockListSettings[t]??{};if(!(!o||!r))return o}function Jhe(e,t=null){return(0,Rn.default)('wp.data.select( "core/block-editor" ).__experimentalGetDirectInsertBlock',{alternative:'wp.data.select( "core/block-editor" ).getDirectInsertBlock',since:"6.3",version:"6.4"}),qj(e,t)}var ege=(0,Te.createRegistrySelector)(e=>(t,o)=>{let r=F(e(zt)).getPatternBySlug(o);return r?aw(r):null}),yN=e=>(t,o)=>[...dv(e)(t),...jc(e)(t,o)],Oj=new WeakMap;function tge(e){let t=Oj.get(e);return t||(t={...e,get blocks(){return aw(e).blocks}},Oj.set(e,t)),t}var oge=(0,Te.createRegistrySelector)(e=>(0,Te.createSelector)((t,o=null,r=Nj)=>{let{getAllPatterns:n}=F(e(zt)),i=n(),{allowedBlockTypes:s}=fl(t);return i.filter(({inserter:d=!0})=>!!d).map(tge).filter(d=>uv(mf(d),s)).filter(d=>mf(d).every(({blockName:f})=>r[Gc]!==!1?hf(t,f,o):gN(t,f,o)))},yN(e))),rge=(0,Te.createRegistrySelector)(e=>(0,Te.createSelector)((t,o,r=null)=>{if(!o)return or;let n=e(zt).__experimentalGetAllowedPatterns(r),i=Array.isArray(o)?o:[o],s=n.filter(a=>a?.blockTypes?.some?.(c=>i.includes(c)));return s.length===0?or:s},(t,o,r)=>yN(e)(t,r))),nge=(0,Te.createRegistrySelector)(e=>((0,Rn.default)('wp.data.select( "core/block-editor" ).__experimentalGetPatternsByBlockTypes',{alternative:'wp.data.select( "core/block-editor" ).getPatternsByBlockTypes',since:"6.2",version:"6.4"}),e(zt).getPatternsByBlockTypes)),ige=(0,Te.createRegistrySelector)(e=>(0,Te.createSelector)((t,o,r=null)=>{if(!o||o.some(({clientId:i,innerBlocks:s})=>s.length||cw(t,i)))return or;let n=Array.from(new Set(o.map(({name:i})=>i)));return e(zt).getPatternsByBlockTypes(n,r)},(t,o,r)=>yN(e)(t,r)));function SN(e,t){return e.blockListSettings[t]}function fl(e){return e.settings}function sge(e){return e.blocks.isPersistentChange}var age=(0,Te.createSelector)((e,t=[])=>t.reduce((o,r)=>e.blockListSettings[r]?{...o,[r]:e.blockListSettings[r]}:o,{}),e=>[e.blockListSettings]),lge=(0,Te.createRegistrySelector)(e=>(0,Te.createSelector)((t,o)=>{(0,Rn.default)("wp.data.select( 'core/block-editor' ).__experimentalGetReusableBlockTitle",{since:"6.6",version:"6.8"});let r=F(e(zt)).getReusableBlocks().find(n=>n.id===o);return r?r.title?.raw:null},()=>[F(e(zt)).getReusableBlocks()]));function cge(e){return e.blocks.isIgnoredChange}function uge(e){return e.lastBlockAttributesChange}function dge(){return(0,Rn.default)('wp.data.select( "core/block-editor" ).hasBlockMovingClientId',{since:"6.7",hint:"Block moving mode feature has been removed"}),!1}function fge(e){return!!e.automaticChangeStatus}function mge(e,t){return e.highlightedBlock===t}function cw(e,t){return!!e.blocks.controlledInnerBlocks[t]}var pge=(0,Te.createSelector)((e,t)=>{if(!t.length)return null;let o=Vp(e);if(t.includes(lo(e,o)))return o;let r=Hc(e),n=fN(e,o||r[0],t);return n?n[n.length-1]:null},(e,t)=>[e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId,t]);function hge(e,t,o){let{lastBlockInserted:r}=e;return r.clientIds?.includes(t)&&r.source===o}function gge(e,t){return e.blockVisibility?.[t]??!0}function bge(){(0,Rn.default)("wp.data.select( 'core/block-editor' ).getHoveredBlockClientId",{since:"6.9",version:"7.1"})}var kge=(0,Te.createSelector)(e=>{let t=new Set(Object.keys(e.blockVisibility).filter(o=>e.blockVisibility[o]));return t.size===0?nhe:t},e=>[e.blockVisibility]);function Qj(e,t){if(gi(e,t)!=="default")return!1;if(!Kj(e,t))return!0;if(cN(e)){let n=pf(e);if(n){if(sn(e,n)?.includes(t))return!0}else if(t&&!xo(e,t))return!0}return((0,Ve.hasBlockSupport)(lo(e,t),"__experimentalDisableBlockOverlay",!1)?!1:cw(e,t))&&!Hj(e,t)&&!Uj(e,t,!0)}function vge(e,t){let o=e.blocks.parents.get(t);for(;o;){if(Qj(e,o))return!0;o=e.blocks.parents.get(o)}return!1}function gi(e,t=""){return t===null&&(t=""),e.derivedBlockEditingModes?.has(t)?e.derivedBlockEditingModes.get(t):e.blockEditingModes.has(t)?e.blockEditingModes.get(t):"default"}var yge=(0,Te.createRegistrySelector)(e=>(t,o="")=>{let r=o||Vp(t);if(!r||ml(t,r))return!1;let{getGroupingBlockName:n}=e(Ve.store),i=bl(t,r),s=n();return i&&(i.name===s||(0,Ve.getBlockType)(i.name)?.transforms?.ungroup)&&!!i.innerBlocks.length&&bN(t,r)}),Sge=(0,Te.createRegistrySelector)(e=>(t,o=or)=>{let{getGroupingBlockName:r}=e(Ve.store),n=r(),i=o?.length?o:Fp(t),s=i?.length?xo(t,i[0]):void 0;return hf(t,n,s)&&i.length&&$j(t,i)}),_ge=(e,t)=>((0,Rn.default)("wp.data.select( 'core/block-editor' ).__unstableGetContentLockingParent",{since:"6.1",version:"6.7"}),aN(e,t));function xge(e){return(0,Rn.default)("wp.data.select( 'core/block-editor' ).__unstableGetTemporarilyEditingAsBlocks",{since:"6.1",version:"6.7"}),lN(e)}var uw={};$s(uw,{__experimentalUpdateSettings:()=>xN,clearBlockRemovalPrompt:()=>Ige,deleteStyleOverride:()=>Oge,editContentOnlySection:()=>CN,ensureDefaultBlock:()=>n6,expandBlock:()=>Mge,hideBlockInterface:()=>Bge,privateRemoveBlocks:()=>wN,resetZoomLevel:()=>zge,setBlockRemovalRules:()=>Pge,setInsertionPoint:()=>Dge,setLastFocus:()=>Age,setStyleOverride:()=>Rge,setZoomLevel:()=>Fge,showBlockInterface:()=>Ege,startDragging:()=>Lge,stopDragging:()=>Nge,stopEditingContentOnlySection:()=>Vge,toggleBlockSpotlight:()=>jge});var e6=l(I(),1),t6=l(Re(),1),o6=l(jo(),1),r6=l(L(),1),wge=e=>Array.isArray(e)?e:[e],Cge=["inserterMediaCategories","blockInspectorAnimation","mediaSideload"];function xN(e,{stripExperimentalSettings:t=!1,reset:o=!1}={}){let r=e;Object.hasOwn(r,"__unstableIsPreviewMode")&&((0,t6.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&&e6.Platform.OS==="web"){n={};for(let i in r)Cge.includes(i)||(n[i]=r[i])}return{type:"UPDATE_SETTINGS",settings:n,reset:o}}function Bge(){return{type:"HIDE_BLOCK_INTERFACE"}}function Ege(){return{type:"SHOW_BLOCK_INTERFACE"}}var wN=(e,t=!0,o=!1)=>({select:r,dispatch:n,registry:i})=>{if(!e||!e.length||(e=wge(e),!r.canRemoveBlocks(e)))return;let a=!o&&r.getBlockRemovalRules();if(a){let u=function(p){let h=[],g=[...p];for(;g.length;){let{innerBlocks:b,...k}=g.shift();g.push(...b),h.push(k)}return h};var c=u;let d=e.map(r.getBlock),f=u(d),m;for(let p of a)if(m=p.callback(f),m){n(Tge(e,t,m));return}}t&&n.selectPreviousBlock(e[0],t),i.batch(()=>{n({type:"REMOVE_BLOCKS",clientIds:e}),n(n6())})},n6=()=>({select:e,dispatch:t})=>{if(e.getBlockCount()>0)return;let{__unstableHasCustomAppender:r}=e.getSettings();r||t.insertDefaultBlock()};function Tge(e,t,o){return{type:"DISPLAY_BLOCK_REMOVAL_PROMPT",clientIds:e,selectPrevious:t,message:o}}function Ige(){return{type:"CLEAR_BLOCK_REMOVAL_PROMPT"}}function Pge(e=!1){return{type:"SET_BLOCK_REMOVAL_RULES",rules:e}}function Rge(e,t){return{type:"SET_STYLE_OVERRIDE",id:e,style:t}}function Oge(e){return{type:"DELETE_STYLE_OVERRIDE",id:e}}function Age(e=null){return{type:"LAST_FOCUS",lastFocus:e}}function Lge(){return{type:"START_DRAGGING"}}function Nge(){return{type:"STOP_DRAGGING"}}function Mge(e){return{type:"SET_BLOCK_EXPANDED_IN_LIST_VIEW",clientId:e}}function Dge(e){return{type:"SET_INSERTION_POINT",value:e}}function CN(e){return{type:"EDIT_CONTENT_ONLY_SECTION",clientId:e}}function Vge(){return{type:"EDIT_CONTENT_ONLY_SECTION"}}var Fge=(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,o6.speak)((0,r6.__)("You are currently in zoom-out mode."))}}o({type:"SET_ZOOM_LEVEL",zoom:e})};function zge(){return{type:"RESET_ZOOM_LEVEL"}}function jge(e,t){return{type:"TOGGLE_BLOCK_SPOTLIGHT",clientId:e,hasBlockSpotlight:t}}var TN={};$s(TN,{__unstableDeleteSelection:()=>dbe,__unstableExpandSelection:()=>mbe,__unstableMarkAutomaticChange:()=>Rbe,__unstableMarkLastChangeAsPersistent:()=>Ibe,__unstableMarkNextChangeAsNotPersistent:()=>Pbe,__unstableSaveReusableBlock:()=>Tbe,__unstableSetEditorMode:()=>Obe,__unstableSetTemporarilyEditingAsBlocks:()=>zbe,__unstableSplitSelection:()=>fbe,clearSelectedBlock:()=>ebe,duplicateBlocks:()=>Lbe,enterFormattedText:()=>_be,exitFormattedText:()=>xbe,flashBlock:()=>Dbe,hideInsertionPoint:()=>lbe,hoverBlock:()=>Yge,insertAfterBlock:()=>Mbe,insertBeforeBlock:()=>Nbe,insertBlock:()=>sbe,insertBlocks:()=>p6,insertDefaultBlock:()=>Cbe,mergeBlocks:()=>pbe,moveBlockToPosition:()=>ibe,moveBlocksDown:()=>rbe,moveBlocksToPosition:()=>m6,moveBlocksUp:()=>nbe,multiSelect:()=>Jge,receiveBlocks:()=>Uge,registerInserterMediaCategory:()=>jbe,removeBlock:()=>hbe,removeBlocks:()=>h6,replaceBlock:()=>obe,replaceBlocks:()=>d6,replaceInnerBlocks:()=>gbe,resetBlocks:()=>Gge,resetSelection:()=>Hge,selectBlock:()=>$ge,selectNextBlock:()=>Xge,selectPreviousBlock:()=>Kge,selectionChange:()=>wbe,setBlockEditingMode:()=>Gbe,setBlockMovingClientId:()=>Abe,setBlockVisibility:()=>Fbe,setHasControlledInnerBlocks:()=>Vbe,setTemplateValidity:()=>cbe,showInsertionPoint:()=>abe,startDraggingBlocks:()=>ybe,startMultiSelect:()=>qge,startTyping:()=>kbe,stopDraggingBlocks:()=>Sbe,stopMultiSelect:()=>Qge,stopTyping:()=>vbe,synchronizeTemplate:()=>ube,toggleBlockHighlight:()=>EN,toggleBlockMode:()=>bbe,toggleSelection:()=>tbe,unsetBlockEditingMode:()=>Hbe,updateBlock:()=>Zge,updateBlockAttributes:()=>Wge,updateBlockListSettings:()=>Bbe,updateSettings:()=>Ebe,validateBlocksToTemplate:()=>u6});var be=l(Z(),1),dw=l(jo(),1),Uc=l(L(),1),l6=l(On(),1),st=l(zo(),1),Wc=l(Re(),1),c6=l(zp(),1);var a6=l(zo(),1),kl="\x86";function kv(e){if(e)return Object.keys(e).find(t=>{let o=e[t];return(typeof o=="string"||o instanceof a6.RichTextData)&&o.toString().indexOf(kl)!==-1})}function BN(e){for(let[t,o]of Object.entries(e.attributes))if(o.source==="rich-text"||o.source==="html")return t}var jp=e=>Array.isArray(e)?e:[e],Gge=e=>({dispatch:t})=>{t({type:"RESET_BLOCKS",blocks:e}),t(u6(e))},u6=e=>({select:t,dispatch:o})=>{let r=t.getTemplate(),n=t.getTemplateLock(),i=!r||n!=="all"||(0,be.doBlocksMatchTemplate)(e,r),s=t.isValidTemplate();if(i!==s)return o.setTemplateValidity(i),i};function Hge(e,t,o){return{type:"RESET_SELECTION",selectionStart:e,selectionEnd:t,initialPosition:o}}function Uge(e){return(0,Wc.default)('wp.data.dispatch( "core/block-editor" ).receiveBlocks',{since:"5.9",alternative:"resetBlocks or insertBlocks"}),{type:"RECEIVE_BLOCKS",blocks:e}}function Wge(e,t,o={uniqueByBlock:!1}){return typeof o=="boolean"&&(o={uniqueByBlock:o}),{type:"UPDATE_BLOCK_ATTRIBUTES",clientIds:jp(e),attributes:t,options:o}}function Zge(e,t){return{type:"UPDATE_BLOCK",clientId:e,updates:t}}function $ge(e,t=0){return{type:"SELECT_BLOCK",initialPosition:t,clientId:e}}function Yge(){return(0,Wc.default)('wp.data.dispatch( "core/block-editor" ).hoverBlock',{since:"6.9",version:"7.1"}),{type:"DO_NOTHING"}}var Kge=(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);i&&r.selectBlock(i,-1)}},Xge=e=>({select:t,dispatch:o})=>{let r=t.getNextBlockClientId(e);r&&o.selectBlock(r)};function qge(){return{type:"START_MULTI_SELECT"}}function Qge(){return{type:"STOP_MULTI_SELECT"}}var Jge=(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,dw.speak)((0,Uc.sprintf)((0,Uc._n)("%s block selected.","%s blocks selected.",a),a),"assertive")};function ebe(){return{type:"CLEAR_SELECTED_BLOCK"}}function tbe(e=!0){return{type:"TOGGLE_SELECTION",isSelectionEnabled:e}}var d6=(e,t,o,r=0,n)=>({select:i,dispatch:s,registry:a})=>{e=jp(e),t=jp(t);let c=i.getBlockRootClientId(e[0]);for(let u=0;u<t.length;u++){let d=t[u];if(!i.canInsertBlockType(d.name,c))return}a.batch(()=>{s({type:"REPLACE_BLOCKS",clientIds:e,blocks:t,time:Date.now(),indexToSelect:o,initialPosition:r,meta:n}),s.ensureDefaultBlock()})};function obe(e,t){return d6(e,t)}var f6=e=>(t,o)=>({select:r,dispatch:n})=>{r.canMoveBlocks(t)&&n({type:e,clientIds:jp(t),rootClientId:o})},rbe=f6("MOVE_BLOCKS_DOWN"),nbe=f6("MOVE_BLOCKS_UP"),m6=(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 ibe(e,t="",o="",r){return m6([e],t,o,r)}function sbe(e,t,o,r,n){return p6([e],t,o,r,0,n)}var p6=(e,t,o,r=!0,n=0,i)=>({select:s,dispatch:a})=>{n!==null&&typeof n=="object"&&(i=n,n=0,(0,Wc.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=jp(e);let c=[];for(let u of e)s.canInsertBlockType(u.name,o)&&c.push(u);c.length&&a({type:"INSERT_BLOCKS",blocks:c,index:t,rootClientId:o,time:Date.now(),updateSelection:r,initialPosition:r?n:null,meta:i})};function abe(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 lbe=()=>({select:e,dispatch:t})=>{e.isBlockInsertionPointVisible()&&t({type:"HIDE_INSERTION_POINT"})};function cbe(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}var ube=()=>({select:e,dispatch:t})=>{t({type:"SYNCHRONIZE_TEMPLATE"});let o=e.getBlocks(),r=e.getTemplate(),n=(0,be.synchronizeBlocksWithTemplate)(o,r);t.resetBlocks(n)},dbe=e=>({registry:t,select:o,dispatch:r})=>{let n=o.getSelectionStart(),i=o.getSelectionEnd();if(n.clientId===i.clientId)return;if(!n.attributeKey||!i.attributeKey||typeof n.offset>"u"||typeof i.offset>"u")return!1;let s=o.getBlockRootClientId(n.clientId),a=o.getBlockRootClientId(i.clientId);if(s!==a)return;let c=o.getBlockOrder(s),u=c.indexOf(n.clientId),d=c.indexOf(i.clientId),f,m;u>d?(f=i,m=n):(f=n,m=i);let p=e?m:f,h=o.getBlock(p.clientId),g=(0,be.getBlockType)(h.name);if(!g.merge)return;let b=f,k=m,v=o.getBlock(b.clientId),y=o.getBlock(k.clientId),_=v.attributes[b.attributeKey],w=y.attributes[k.attributeKey],C=(0,st.create)({html:_}),E=(0,st.create)({html:w});C=(0,st.remove)(C,b.offset,C.text.length),E=(0,st.insert)(E,kl,0,k.offset);let R=(0,be.cloneBlock)(v,{[b.attributeKey]:(0,st.toHTMLString)({value:C})}),O=(0,be.cloneBlock)(y,{[k.attributeKey]:(0,st.toHTMLString)({value:E})}),B=e?R:O,T=v.name===y.name?[B]:(0,be.switchToBlockType)(B,g.name);if(!T||!T.length)return;let A;if(e){let oe=T.pop();A=g.merge(oe.attributes,O.attributes)}else{let oe=T.shift();A=g.merge(R.attributes,oe.attributes)}let N=kv(A),z=A[N],U=(0,st.create)({html:z}),j=U.text.indexOf(kl),G=(0,st.remove)(U,j,j+1),V=(0,st.toHTMLString)({value:G});A[N]=V;let H=o.getSelectedBlockClientIds(),K=[...e?T:[],{...h,attributes:{...h.attributes,...A}},...e?[]:T];t.batch(()=>{r.selectionChange(h.clientId,N,j,j),r.replaceBlocks(H,K,0,o.getSelectedBlocksInitialCaretPosition())})},fbe=(e=[])=>({registry:t,select:o,dispatch:r})=>{let n=o.getSelectionStart(),i=o.getSelectionEnd(),s=o.getBlockRootClientId(n.clientId),a=o.getBlockRootClientId(i.clientId);if(s!==a)return;let c=o.getBlockOrder(s),u=c.indexOf(n.clientId),d=c.indexOf(i.clientId),f,m;u>d?(f=i,m=n):(f=n,m=i);let p=f,h=m,g=o.getBlock(p.clientId),b=o.getBlock(h.clientId),k=(0,be.getBlockType)(g.name),v=(0,be.getBlockType)(b.name),y=typeof p.attributeKey=="string"?p.attributeKey:BN(k),_=typeof h.attributeKey=="string"?h.attributeKey:BN(v),w=o.getBlockAttributes(p.clientId);if(w?.metadata?.bindings?.[y]){if(e.length){let{createWarningNotice:J}=t.dispatch(l6.store);J((0,Uc.__)("Blocks can't be inserted into other blocks with bindings"),{type:"snackbar"});return}r.insertAfterBlock(p.clientId);return}if(!y||!_||typeof n.offset>"u"||typeof i.offset>"u")return;if(p.clientId===h.clientId&&y===_&&p.offset===h.offset){if(e.length){if((0,be.isUnmodifiedDefaultBlock)(g,"content")){r.replaceBlocks([p.clientId],e,e.length-1,-1);return}}else if(!o.getBlockOrder(p.clientId).length){let J=function(){let de=(0,be.getDefaultBlockName)();return o.canInsertBlockType(de,s)?(0,be.createBlock)(de):(0,be.createBlock)(o.getBlockName(p.clientId))};var E=J;let ie=w[y].length;if(p.offset===0&&ie){r.insertBlocks([J()],o.getBlockIndex(p.clientId),s,!1);return}if(p.offset===ie){r.insertBlocks([J()],o.getBlockIndex(p.clientId)+1,s);return}}}let R=g.attributes[y],O=b.attributes[_],B=(0,st.create)({html:R}),T=(0,st.create)({html:O});B=(0,st.remove)(B,p.offset,B.text.length),T=(0,st.remove)(T,0,h.offset);let A={...g,innerBlocks:g.clientId===b.clientId?[]:g.innerBlocks,attributes:{...g.attributes,[y]:(0,st.toHTMLString)({value:B})}},N={...b,clientId:g.clientId===b.clientId?(0,be.createBlock)(b.name).clientId:b.clientId,attributes:{...b.attributes,[_]:(0,st.toHTMLString)({value:T})}},z=(0,be.getDefaultBlockName)();if(g.clientId===b.clientId&&z&&N.name!==z&&o.canInsertBlockType(z,s)){let J=(0,be.switchToBlockType)(N,z);J?.length===1&&(N=J[0])}if(!e.length){r.replaceBlocks(o.getSelectedBlockClientIds(),[A,N]);return}let U,j=[],G=[...e],V=G.shift(),H=(0,be.getBlockType)(A.name),K=H.merge&&V.name===H.name?[V]:(0,be.switchToBlockType)(V,H.name);if(K?.length){let J=K.shift();A={...A,attributes:{...A.attributes,...H.merge(A.attributes,J.attributes)}},j.push(A),U={clientId:A.clientId,attributeKey:y,offset:(0,st.create)({html:A.attributes[y]}).text.length},G.unshift(...K)}else(0,be.isUnmodifiedBlock)(A)||j.push(A),j.push(V);let oe=G.pop(),ee=(0,be.getBlockType)(N.name);if(G.length&&j.push(...G),oe){let J=ee.merge&&ee.name===oe.name?[oe]:(0,be.switchToBlockType)(oe,ee.name);if(J?.length){let ie=J.pop();j.push({...N,attributes:{...N.attributes,...ee.merge(ie.attributes,N.attributes)}}),j.push(...J),U={clientId:N.clientId,attributeKey:_,offset:(0,st.create)({html:ie.attributes[_]}).text.length}}else j.push(oe),(0,be.isUnmodifiedBlock)(N)||j.push(N)}else(0,be.isUnmodifiedBlock)(N)||j.push(N);t.batch(()=>{r.replaceBlocks(o.getSelectedBlockClientIds(),j,j.length-1,0),U&&r.selectionChange(U.clientId,U.attributeKey,U.offset,U.offset)})},mbe=()=>({select:e,dispatch:t})=>{let o=e.getSelectionStart(),r=e.getSelectionEnd();t.selectionChange({start:{clientId:o.clientId},end:{clientId:r.clientId}})},pbe=(e,t)=>({registry:o,select:r,dispatch:n})=>{let i=e,s=t,a=r.getBlock(i),c=(0,be.getBlockType)(a.name);if(!c||r.getBlockEditingMode(i)==="disabled"||r.getBlockEditingMode(s)==="disabled")return;let u=r.getBlock(s);if(!c.merge&&(0,be.getBlockSupport)(a.name,"__experimentalOnMerge")){let w=(0,be.switchToBlockType)(u,c.name);if(w?.length!==1){n.selectBlock(a.clientId);return}let[C]=w;if(C.innerBlocks.length<1){n.selectBlock(a.clientId);return}o.batch(()=>{n.insertBlocks(C.innerBlocks,void 0,i),n.removeBlock(s),n.selectBlock(C.innerBlocks[0].clientId);let E=r.getNextBlockClientId(i);if(E&&r.getBlockName(i)===r.getBlockName(E)){let R=r.getBlockAttributes(i),O=r.getBlockAttributes(E);Object.keys(R).every(B=>R[B]===O[B])&&(n.moveBlocksToPosition(r.getBlockOrder(E),E,i),n.removeBlock(E,!1))}});return}if((0,be.isUnmodifiedDefaultBlock)(a)){n.removeBlock(i,r.isBlockSelected(i));return}if((0,be.isUnmodifiedDefaultBlock)(u)){n.removeBlock(s,r.isBlockSelected(s));return}if(!c.merge){(0,be.isUnmodifiedBlock)(u,"content")?n.removeBlock(s,r.isBlockSelected(s)):n.selectBlock(a.clientId);return}let d=(0,be.getBlockType)(u.name),{clientId:f,attributeKey:m,offset:p}=r.getSelectionStart(),g=(f===i?c:d).attributes[m],b=(f===i||f===s)&&m!==void 0&&p!==void 0&&!!g;g||(typeof m=="number"?window.console.error(`RichText needs an identifier prop that is the block attribute key of the attribute it controls. Its type is expected to be a string, but was ${typeof m}`):window.console.error("The RichText identifier prop does not match any attributes defined by the block."));let k=(0,be.cloneBlock)(a),v=(0,be.cloneBlock)(u);if(b){let w=f===i?k:v,C=w.attributes[m],E=(0,st.insert)((0,st.create)({html:C}),kl,p,p);w.attributes[m]=(0,st.toHTMLString)({value:E})}let y=a.name===u.name?[v]:(0,be.switchToBlockType)(v,a.name);if(!y||!y.length)return;let _=c.merge(k.attributes,y[0].attributes);if(b){let w=kv(_),C=_[w],E=(0,st.create)({html:C}),R=E.text.indexOf(kl),O=(0,st.remove)(E,R,R+1),B=(0,st.toHTMLString)({value:O});_[w]=B,n.selectionChange(a.clientId,w,R,R)}n.replaceBlocks([a.clientId,u.clientId],[{...a,attributes:{...a.attributes,..._}},...y.slice(1)],0)},h6=(e,t=!0)=>wN(e,t);function hbe(e,t){return h6([e],t)}function gbe(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 bbe(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function kbe(){return{type:"START_TYPING"}}function vbe(){return{type:"STOP_TYPING"}}function ybe(e=[]){return{type:"START_DRAGGING_BLOCKS",clientIds:e}}function Sbe(){return{type:"STOP_DRAGGING_BLOCKS"}}function _be(){return(0,Wc.default)('wp.data.dispatch( "core/block-editor" ).enterFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function xbe(){return(0,Wc.default)('wp.data.dispatch( "core/block-editor" ).exitFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function wbe(e,t,o,r){return typeof e=="string"?{type:"SELECTION_CHANGE",clientId:e,attributeKey:t,startOffset:o,endOffset:r}:{type:"SELECTION_CHANGE",...e}}var Cbe=(e,t,o)=>({dispatch:r})=>{let n=(0,be.getDefaultBlockName)();if(!n)return;let i=(0,be.createBlock)(n,e);return r.insertBlock(i,o,t)};function Bbe(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function Ebe(e){return xN(e,{stripExperimentalSettings:!0})}function Tbe(e,t){return{type:"SAVE_REUSABLE_BLOCK_SUCCESS",id:e,updatedId:t}}function Ibe(){return{type:"MARK_LAST_CHANGE_AS_PERSISTENT"}}function Pbe(){return{type:"MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"}}var Rbe=()=>({dispatch:e})=>{e({type:"MARK_AUTOMATIC_CHANGE"});let{requestIdleCallback:t=o=>setTimeout(o,100)}=window;t(()=>{e({type:"MARK_AUTOMATIC_CHANGE_FINAL"})})},Obe=e=>({registry:t})=>{t.dispatch(c6.store).set("core","editorTool",e),e==="navigation"?(0,dw.speak)((0,Uc.__)("You are currently in Write mode.")):e==="edit"&&(0,dw.speak)((0,Uc.__)("You are currently in Design mode."))};function Abe(){return(0,Wc.default)('wp.data.dispatch( "core/block-editor" ).setBlockMovingClientId',{since:"6.7",hint:"Block moving mode feature has been removed"}),{type:"DO_NOTHING"}}var Lbe=(e,t=!0)=>({select:o,dispatch:r})=>{if(!e||!e.length)return;let n=o.getBlocksByClientId(e);if(n.some(d=>!d)||n.map(d=>d.name).some(d=>!(0,be.hasBlockSupport)(d,"multiple",!0)))return;let s=o.getBlockRootClientId(e[0]),a=jp(e),c=o.getBlockIndex(a[a.length-1]),u=n.map(d=>(0,be.__experimentalCloneSanitizedBlock)(d));return r.insertBlocks(u,c+1,s,t),u.length>1&&t&&r.multiSelect(u[0].clientId,u[u.length-1].clientId),u.map(d=>d.clientId)},Nbe=e=>({select:t,dispatch:o})=>{if(!e)return;let r=t.getBlockRootClientId(e);if(t.getTemplateLock(r))return;let i=t.getBlockIndex(e),s=r?t.getDirectInsertBlock(r):null;if(!s)return o.insertDefaultBlock({},r,i);let a={};if(s.attributesToCopy){let u=t.getBlockAttributes(e);s.attributesToCopy.forEach(d=>{u[d]&&(a[d]=u[d])})}let c=(0,be.createBlock)(s.name,{...s.attributes,...a});return o.insertBlock(c,i,r)},Mbe=e=>({select:t,dispatch:o})=>{if(!e)return;let r=t.getBlockRootClientId(e);if(t.getTemplateLock(r))return;let i=t.getBlockIndex(e),s=r?t.getDirectInsertBlock(r):null;if(!s)return o.insertDefaultBlock({},r,i+1);let a={};if(s.attributesToCopy){let u=t.getBlockAttributes(e);s.attributesToCopy.forEach(d=>{u[d]&&(a[d]=u[d])})}let c=(0,be.createBlock)(s.name,{...s.attributes,...a});return o.insertBlock(c,i+1,r)};function EN(e,t){return{type:"TOGGLE_BLOCK_HIGHLIGHT",clientId:e,isHighlighted:t}}var Dbe=(e,t=150)=>async({dispatch:o})=>{o(EN(e,!0)),await new Promise(r=>setTimeout(r,t)),o(EN(e,!1))};function Vbe(e,t){return{type:"SET_HAS_CONTROLLED_INNER_BLOCKS",hasControlledInnerBlocks:t,clientId:e}}function Fbe(e){return{type:"SET_BLOCK_VISIBILITY",updates:e}}function zbe(e){return(0,Wc.default)("wp.data.dispatch( 'core/block-editor' ).__unstableSetTemporarilyEditingAsBlocks",{since:"7.0"}),CN(e)}var jbe=e=>({select:t,dispatch:o})=>{if(!e||typeof e!="object"){console.error("Category should be an `InserterMediaCategory` object.");return}if(!e.name){console.error("Category should have a `name` that should be unique among all media categories.");return}if(!e.labels?.name){console.error("Category should have a `labels.name`.");return}if(!["image","audio","video"].includes(e.mediaType)){console.error("Category should have `mediaType` property that is one of `image|audio|video`.");return}if(!e.fetch||typeof e.fetch!="function"){console.error("Category should have a `fetch` function defined with the following signature `(InserterMediaRequest) => Promise<InserterMediaItem[]>`.");return}let r=t.getRegisteredInserterMediaCategories();if(r.some(({name:n})=>n===e.name)){console.error(`A category is already registered with the same name: "${e.name}".`);return}if(r.some(({labels:{name:n}={}})=>n===e.labels?.name)){console.error(`A category is already registered with the same labels.name: "${e.labels.name}".`);return}o({type:"REGISTER_INSERTER_MEDIA_CATEGORY",category:{...e,isExternalResource:!0}})};function Gbe(e="",t){return{type:"SET_BLOCK_EDITING_MODE",clientId:e,mode:t}}function Hbe(e=""){return{type:"UNSET_BLOCK_EDITING_MODE",clientId:e}}var Gp={reducer:pj,selectors:_N,actions:TN},S=(0,fw.createReduxStore)(zt,{...Gp,persist:["preferences"]}),g6=(0,fw.registerStore)(zt,{...Gp,persist:["preferences"]});F(g6).registerPrivateActions(uw);F(g6).registerPrivateSelectors(iw);F(S).registerPrivateActions(uw);F(S).registerPrivateSelectors(iw);var Hp=l(P(),1),b6=l(L(),1);var os=l(x(),1);function Ube({className:e,actions:t,children:o,secondaryActions:r}){return(0,os.jsx)("div",{style:{display:"contents",all:"initial"},children:(0,os.jsx)("div",{className:D(e,"block-editor-warning"),children:(0,os.jsxs)("div",{className:"block-editor-warning__contents",children:[(0,os.jsx)("p",{className:"block-editor-warning__message",children:o}),(t?.length>0||r)&&(0,os.jsxs)("div",{className:"block-editor-warning__actions",children:[t?.length>0&&t.map((n,i)=>(0,os.jsx)("span",{className:"block-editor-warning__action",children:n},i)),r&&(0,os.jsx)(Hp.DropdownMenu,{className:"block-editor-warning__secondary",icon:ts,label:(0,b6.__)("More options"),popoverProps:{placement:"bottom-end",className:"block-editor-warning__dropdown"},noIcons:!0,children:()=>(0,os.jsx)(Hp.MenuGroup,{children:r.map((n,i)=>(0,os.jsx)(Hp.MenuItem,{onClick:n.onClick,children:n.title},i))})})]})]})})})}var Zc=Ube;var Up=l(x(),1);function y6({originalBlockClientId:e,name:t,onReplace:o}){let{selectBlock:r}=(0,v6.useDispatch)(S),n=(0,k6.getBlockType)(t);return(0,Up.jsxs)(Zc,{actions:[(0,Up.jsx)(IN.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>r(e),children:(0,mw.__)("Find original")},"find-original"),(0,Up.jsx)(IN.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>o([]),children:(0,mw.__)("Remove")},"remove")],children:[(0,Up.jsxs)("strong",{children:[n?.title,": "]}),(0,mw.__)("This block can only be used once.")]})}var vv=l(x(),1);function hw({mayDisplayControls:e,mayDisplayParentControls:t,mayDisplayPatternEditingControls:o,blockEditingMode:r,isPreviewMode:n,...i}){let{name:s,isSelected:a,clientId:c,attributes:u={},__unstableLayoutClassNames:d}=i,{layout:f=null,metadata:m={}}=u,{bindings:p}=m,h=(0,PN.hasBlockSupport)(s,"layout",!1)||(0,PN.hasBlockSupport)(s,"__experimentalLayout",!1),{originalBlockClientId:g}=(0,pw.useContext)(Ar);return(0,vv.jsxs)(U_,{value:(0,pw.useMemo)(()=>({name:s,isSelected:a,clientId:c,layout:h?f:null,__unstableLayoutClassNames:d,[Tc]:e,[hp]:t,[gp]:o&&r!=="disabled",[G_]:r,[bp]:p,[H_]:n}),[s,a,c,h,f,d,e,t,o,r,p,n]),children:[(0,vv.jsx)(sj,{...i}),g&&(0,vv.jsx)(y6,{originalBlockClientId:g,name:s,onReplace:i.onReplace})]})}function pe(...e){let{clientId:t=null}=Ne();return(0,S6.useSelect)(o=>F(o(S)).getBlockSettings(t,...e),[t,...e])}function x6(e){(0,_6.default)("wp.blockEditor.useSetting",{since:"6.5",alternative:"wp.blockEditor.useSettings",note:"The new useSettings function can retrieve multiple settings at once, with better performance."});let[t]=pe(e);return t}var bw=l(x(),1),{kebabCase:Wbe}=F(C6.privateApis),w6=([e,...t])=>e.toUpperCase()+t.join(""),Zbe=e=>(0,kf.createHigherOrderComponent)(t=>o=>(0,bw.jsx)(t,{...o,colors:e}),"withCustomColorPalette"),$be=()=>(0,kf.createHigherOrderComponent)(e=>t=>{let[o,r,n]=pe("color.palette.custom","color.palette.theme","color.palette.default"),i=(0,gw.useMemo)(()=>[...o||[],...r||[],...n||[]],[o,r,n]);return(0,bw.jsx)(e,{...t,colors:i})},"withEditorColorPalette");function B6(e,t){let o=e.reduce((r,n)=>({...r,...typeof n=="string"?{[n]:Wbe(n)}:n}),{});return(0,kf.compose)([t,r=>class extends gw.Component{constructor(n){super(n),this.setters=this.createSetters(),this.colorUtils={getMostReadableColor:this.getMostReadableColor.bind(this)},this.state={}}getMostReadableColor(n){let{colors:i}=this.props;return Xz(i,n)}createSetters(){return Object.keys(o).reduce((n,i)=>{let s=w6(i),a=`custom${s}`;return n[`set${s}`]=this.createSetColor(i,a),n},{})}createSetColor(n,i){return s=>{let a=$_(this.props.colors,s);this.props.setAttributes({[n]:a&&a.slug?a.slug:void 0,[i]:a&&a.slug?void 0:s})}}static getDerivedStateFromProps({attributes:n,colors:i},s){return Object.entries(o).reduce((a,[c,u])=>{let d=Ys(i,n[c],n[`custom${w6(c)}`]),f=s[c];return f?.color===d.color&&f?a[c]=f:a[c]={...d,class:ui(u,d.slug)},a},{})}render(){return(0,bw.jsx)(r,{...this.props,colors:void 0,...this.state,...this.setters,colorUtils:this.colorUtils})}}])}function E6(e){return(...t)=>{let o=Zbe(e);return(0,kf.createHigherOrderComponent)(B6(t,o),"withCustomColors")}}function T6(...e){let t=$be();return(0,kf.createHigherOrderComponent)(B6(e,t),"withColors")}var kw=l(I(),1),vw=l(M(),1);function Wp(e){if(e)return`has-${e}-gradient-background`}function yw(e,t){let o=e?.find(r=>r.slug===t);return o&&o.gradient}function I6(e,t){return e?.find(r=>r.gradient===t)}function P6(e,t){let o=I6(e,t);return o&&o.slug}function Ybe({gradientAttribute:e="gradient",customGradientAttribute:t="customGradient"}={}){let{clientId:o}=Ne(),[r,n,i]=pe("color.gradients.custom","color.gradients.theme","color.gradients.default"),s=(0,kw.useMemo)(()=>[...r||[],...n||[],...i||[]],[r,n,i]),{gradient:a,customGradient:c}=(0,vw.useSelect)(p=>{let{getBlockAttributes:h}=p(S),g=h(o)||{};return{customGradient:g[t],gradient:g[e]}},[o,e,t]),{updateBlockAttributes:u}=(0,vw.useDispatch)(S),d=(0,kw.useCallback)(p=>{let h=P6(s,p);if(h){u(o,{[e]:h,[t]:void 0});return}u(o,{[e]:void 0,[t]:p})},[s,o,u]),f=Wp(a),m;return a?m=yw(s,a):m=c,{gradientClass:f,gradientValue:m,setGradient:d}}var R6=l(P(),1);var{kebabCase:Kbe}=F(R6.privateApis),Zp=(e,t,o)=>{if(t){let r=e?.find(({slug:n})=>n===t);if(r)return r}return{size:o}};function RN(e,t){let o=e?.find(({size:r})=>r===t);return o||{size:t}}function $c(e){if(e)return`has-${Kbe(e)}-font-size`}var Xbe="1600px",qbe="320px",Qbe=1,Jbe=.25,eke=.75,tke="14px";function O6({minimumFontSize:e,maximumFontSize:t,fontSize:o,minimumViewportWidth:r=qbe,maximumViewportWidth:n=Xbe,scaleFactor:i=Qbe,minimumFontSizeLimit:s}){if(s=Yc(s)?s:tke,o){let y=Yc(o);if(!y?.unit)return null;let _=Yc(s,{coerceTo:y.unit});if(_?.value&&!e&&!t&&y?.value<=_?.value)return null;if(t||(t=`${y.value}${y.unit}`),!e){let w=y.unit==="px"?y.value:y.value*16,C=Math.min(Math.max(1-.075*Math.log2(w),Jbe),eke),E=yv(y.value*C,3);_?.value&&E<_?.value?e=`${_.value}${_.unit}`:e=`${E}${y.unit}`}}let a=Yc(e),c=a?.unit||"rem",u=Yc(t,{coerceTo:c});if(!a||!u)return null;let d=Yc(e,{coerceTo:"rem"}),f=Yc(n,{coerceTo:c}),m=Yc(r,{coerceTo:c});if(!f||!m||!d)return null;let p=f.value-m.value;if(!p)return null;let h=yv(m.value/100,3),g=yv(h,3)+c,b=100*((u.value-a.value)/p),k=yv((b||1)*i,3),v=`${d.value}${d.unit} + ((1vw - ${g}) * ${k})`;return`clamp(${e}, ${v}, ${t})`}function Yc(e,t={}){if(typeof e!="string"&&typeof e!="number")return null;isFinite(e)&&(e=`${e}px`);let{coerceTo:o,rootSizeValue:r,acceptableUnits:n}={coerceTo:"",rootSizeValue:16,acceptableUnits:["rem","px","em"],...t},i=n?.join("|"),s=new RegExp(`^(\\d*\\.?\\d+)(${i}){1,1}$`),a=e.match(s);if(!a||a.length<3)return null;let[,c,u]=a,d=parseFloat(c);return o==="px"&&(u==="em"||u==="rem")&&(d=d*r,u=o),u==="px"&&(o==="em"||o==="rem")&&(d=d/r,u=o),(o==="em"||o==="rem")&&(u==="em"||u==="rem")&&(u=o),{value:yv(d,3),unit:u}}function yv(e,t=3){let o=Math.pow(10,t);return Number.isFinite(e)?parseFloat(Math.round(e*o)/o):void 0}var A6=l(P(),1);var L6=l(x(),1);function oke(e){let[t,o]=pe("typography.fontSizes","typography.customFontSize");return(0,L6.jsx)(A6.FontSizePicker,{...e,fontSizes:t,disableCustomFontSizes:!o,__next40pxDefaultSize:!0})}var ON=oke;var Sv=l(Y(),1),M6=l(I(),1);var AN=l(x(),1),rke=[],N6=([e,...t])=>e.toUpperCase()+t.join(""),D6=(...e)=>{let t=e.reduce((o,r)=>(o[r]=`custom${N6(r)}`,o),{});return(0,Sv.createHigherOrderComponent)((0,Sv.compose)([(0,Sv.createHigherOrderComponent)(o=>r=>{let[n]=pe("typography.fontSizes");return(0,AN.jsx)(o,{...r,fontSizes:n||rke})},"withFontSizes"),o=>class extends M6.Component{constructor(r){super(r),this.setters=this.createSetters(),this.state={}}createSetters(){return Object.entries(t).reduce((r,[n,i])=>{let s=N6(n);return r[`set${s}`]=this.createSetFontSize(n,i),r},{})}createSetFontSize(r,n){return i=>{let s=this.props.fontSizes?.find(({size:a})=>a===Number(i));this.props.setAttributes({[r]:s&&s.slug?s.slug:void 0,[n]:s&&s.slug?void 0:i})}}static getDerivedStateFromProps({attributes:r,fontSizes:n},i){let s=(c,u)=>i[u]?r[u]?r[u]!==i[u].slug:i[u].size!==r[c]:!0;if(!Object.values(t).some(s))return null;let a=Object.entries(t).filter(([c,u])=>s(u,c)).reduce((c,[u,d])=>{let f=r[u],m=Zp(n,f,r[d]);return c[u]={...m,class:$c(f)},c},{});return{...i,...a}}render(){return(0,AN.jsx)(o,{...this.props,fontSizes:void 0,...this.state,...this.setters})}}]),"withFontSizes")};var Kc=l(L(),1),Sw=l(P(),1);var V6=l(x(),1),nke=[{icon:Lc,title:(0,Kc.__)("Align text left"),align:"left"},{icon:tf,title:(0,Kc.__)("Align text center"),align:"center"},{icon:Nc,title:(0,Kc.__)("Align text right"),align:"right"}],ike={placement:"bottom-start"};function ske({value:e,onChange:t,alignmentControls:o=nke,label:r=(0,Kc.__)("Align text"),description:n=(0,Kc.__)("Change text alignment"),isCollapsed:i=!0,isToolbar:s}){function a(m){return()=>t(e===m?void 0:m)}let c=o.find(m=>m.align===e);function u(){return c?c.icon:(0,Kc.isRTL)()?Nc:Lc}let d=s?Sw.ToolbarGroup:Sw.ToolbarDropdownMenu,f=s?{isCollapsed:i}:{toggleProps:{description:n},popoverProps:ike};return(0,V6.jsx)(d,{icon:u(),label:r,controls:o.map(m=>{let{align:p}=m;return{...m,isActive:e===p,role:i?"menuitemradio":void 0,onClick:a(p)}}),...f})}var LN=ske;var NN=l(x(),1),_w=e=>(0,NN.jsx)(LN,{...e,isToolbar:!1}),F6=e=>(0,NN.jsx)(LN,{...e,isToolbar:!0});var Iw=l(Je(),1),Pw=l(P(),1),aG=l(I(),1),Rw=l(Z(),1);var Q6=l(M(),1),qc=l(Z(),1),zN=l(I(),1);var Y6=l(H6(),1);var MN=function(e,t){return MN=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])},MN(e,t)};function U6(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");MN(e,t);function o(){this.constructor=e}e.prototype=t===null?Object.create(t):(o.prototype=t.prototype,new o)}var Po=function(){return Po=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},Po.apply(this,arguments)};function W6(e){return e.toLowerCase()}var dke=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],fke=/[^A-Z0-9]+/gi;function $6(e,t){t===void 0&&(t={});for(var o=t.splitRegexp,r=o===void 0?dke:o,n=t.stripRegexp,i=n===void 0?fke:n,s=t.transform,a=s===void 0?W6:s,c=t.delimiter,u=c===void 0?" ":c,d=Z6(Z6(e,r,"$1\0$2"),i,"\0"),f=0,m=d.length;d.charAt(f)==="\0";)f++;for(;d.charAt(m-1)==="\0";)m--;return d.slice(f,m).split("\0").map(a).join(u)}function Z6(e,t,o){return t instanceof RegExp?e.replace(t,o):t.reduce(function(r,n){return r.replace(n,o)},e)}var mke=e=>e.name||"",pke=e=>e.title,hke=e=>e.description||"",gke=e=>e.keywords||[],bke=e=>e.category,kke=()=>null,vke=[/([\p{Ll}\p{Lo}\p{N}])([\p{Lu}\p{Lt}])/gu,/([\p{Lu}\p{Lt}])([\p{Lu}\p{Lt}][\p{Ll}\p{Lo}])/gu],yke=new RegExp("(\\p{C}|\\p{P}|\\p{S})+","giu"),DN=new Map,VN=new Map;function ww(e=""){if(DN.has(e))return DN.get(e);let t=$6(e,{splitRegexp:vke,stripRegexp:yke}).split(" ").filter(Boolean);return DN.set(e,t),t}function _v(e=""){if(VN.has(e))return VN.get(e);let t=(0,Y6.default)(e);return t=t.replace(/^\//,""),t=t.toLowerCase(),VN.set(e,t),t}var xv=(e="")=>ww(_v(e)),Ske=(e,t)=>e.filter(o=>!xv(t).some(r=>r.includes(o))),Cw=(e,t,o,r)=>xv(r).length===0?e:wv(e,r,{getCategory:s=>t.find(({slug:a})=>a===s.category)?.title,getCollection:s=>o[s.name.split("/")[0]]?.title}),wv=(e=[],t="",o={})=>{if(xv(t).length===0)return e;let n=e.map(i=>[i,_ke(i,t,o)]).filter(([,i])=>i>0);return n.sort(([,i],[,s])=>s-i),n.map(([i])=>i)};function _ke(e,t,o={}){let{getName:r=mke,getTitle:n=pke,getDescription:i=hke,getKeywords:s=gke,getCategory:a=bke,getCollection:c=kke}=o,u=r(e),d=n(e),f=i(e),m=s(e),p=a(e),h=c(e),g=_v(t),b=_v(d),k=0;if(g===b)k+=30;else if(b.startsWith(g))k+=20;else{let v=[u,d,f,...m,p,h].join(" "),y=ww(g);Ske(y,v).length===0&&(k+=10)}if(k!==0&&u.startsWith("core/")){let v=u!==e.id;k+=v?1:2}return k}var Qs=l(Z(),1),$p=l(M(),1),Bw=l(I(),1),K6=l(On(),1),Ew=l(L(),1);var xke=(e,t,o)=>{let r=(0,Bw.useMemo)(()=>({[Gc]:!!o}),[o]),[n]=(0,$p.useSelect)(d=>[d(S).getInserterItems(e,r)],[e,r]),{getClosestAllowedInsertionPoint:i}=F((0,$p.useSelect)(S)),{createErrorNotice:s}=(0,$p.useDispatch)(K6.store),[a,c]=(0,$p.useSelect)(d=>{let{getCategories:f,getCollections:m}=d(Qs.store);return[f(),m()]},[]),u=(0,Bw.useCallback)(({name:d,initialAttributes:f,innerBlocks:m,syncStatus:p,content:h},g)=>{let b=i(d,e);if(b===null){let v=(0,Qs.getBlockType)(d)?.title??d;s((0,Ew.sprintf)((0,Ew.__)(`Block "%s" can't be inserted.`),v),{type:"snackbar",id:"inserter-notice"});return}let k=p==="unsynced"?(0,Qs.parse)(h,{__unstableSkipMigrationLogs:!0}):(0,Qs.createBlock)(d,f,(0,Qs.createBlocksFromInnerBlocksTemplate)(m));t(k,void 0,g,b)},[i,e,t,s]);return[n,a,c,u]},Xc=xke;var X6=l(P(),1);var q6=l(I(),1),FN=l(x(),1);function wke({icon:e,showColors:t=!1,className:o,context:r}){e?.src==="block-default"&&(e={src:mO});let n=(0,FN.jsx)(X6.Icon,{icon:e&&e.src?e.src:e,context:r}),i=t?{backgroundColor:e&&e.background,color:e&&e.foreground}:{};return(0,FN.jsx)("span",{style:i,className:D("block-editor-block-icon",o,{"has-colors":t}),children:n})}var Ie=(0,q6.memo)(wke);var Tw=(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 Yp=l(x(),1),Cke=()=>{},Bke=9;function Eke(){return{name:"blocks",className:"block-editor-autocompleters__block",triggerPrefix:"/",useItems(e){let{rootClientId:t,selectedBlockId:o,prioritizedBlocks:r}=(0,Q6.useSelect)(u=>{let{getSelectedBlockClientId:d,getBlock:f,getBlockListSettings:m,getBlockRootClientId:p}=u(S),{getActiveBlockVariation:h}=u(qc.store),g=d(),{name:b,attributes:k}=f(g),v=h(b,k),y=p(g);return{selectedBlockId:v?`${b}/${v.name}`:b,rootClientId:y,prioritizedBlocks:m(y)?.prioritizedInserterBlocks}},[]),[n,i,s]=Xc(t,Cke,!0),a=(0,zN.useMemo)(()=>(e.trim()?Cw(n,i,s,e):Tw(qs(n,"frecency","desc"),r)).filter(d=>d.id!==o).slice(0,Bke),[e,o,n,i,s,r]);return[(0,zN.useMemo)(()=>a.map(u=>{let{title:d,icon:f,isDisabled:m}=u;return{key:`block-${u.id}`,value:u,label:(0,Yp.jsxs)(Yp.Fragment,{children:[(0,Yp.jsx)(Ie,{icon:f,showColors:!0},"icon"),d]}),isDisabled:m}}),[a])]},allowContext(e,t){return!(/\S/.test(e)||/\S/.test(t))},getOptionCompletion(e){let{name:t,initialAttributes:o,innerBlocks:r,syncStatus:n,blocks:i}=e;return{action:"replace",value:n==="unsynced"?(i??[]).map(s=>(0,qc.cloneBlock)(s)):(0,qc.createBlock)(t,o,(0,qc.createBlocksFromInnerBlocksTemplate)(r))}}}}var J6=Eke();var rG=l(tG(),1),nG=l(rn(),1);var iG=l(jN(),1),vf=l(x(),1),Tke=10;function Ike(){return{name:"links",className:"block-editor-autocompleters__link",triggerPrefix:"[[",options:async e=>{let t=await(0,rG.default)({path:(0,nG.addQueryArgs)("/wp/v2/search",{per_page:Tke,search:e,type:"post",order_by:"menu_order"})});return t=t.filter(o=>o.title!==""),t},getOptionKeywords(e){return[...e.title.split(/\s+/)]},getOptionLabel(e){return(0,vf.jsxs)(vf.Fragment,{children:[(0,vf.jsx)(Ee,{icon:e.subtype==="page"?cl:hL},"icon"),(0,iG.decodeEntities)(e.title)]})},getOptionCompletion(e){return(0,vf.jsx)("a",{href:e.url,children:e.title})}}}var sG=Ike();var lG=l(x(),1),Pke=[];function cG({completers:e=Pke}){let{name:t}=Ne();return(0,aG.useMemo)(()=>{let o=[...e,sG];return(t===(0,Rw.getDefaultBlockName)()||(0,Rw.getBlockSupport)(t,"__experimentalSlashInserter",!1))&&(o=[...o,J6]),(0,Iw.hasFilter)("editor.Autocomplete.completers")&&(o===e&&(o=o.map(r=>({...r}))),o=(0,Iw.applyFilters)("editor.Autocomplete.completers",o,t)),o},[e,t])}function uG(e){return(0,Pw.__unstableUseAutocompleteProps)({...e,completers:cG(e)})}function Rke(e){return(0,lG.jsx)(Pw.Autocomplete,{...e,completers:cG(e)})}var dG=Rke;var ZN=l(L(),1),tu=l(P(),1);var RG=l(M(),1);var Dw=l(I(),1);var bi=l(L(),1);var an=l(P(),1);var Kp=l(L(),1);var An={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 Ln(e,t=""){return e.split(",").map(o=>`${o}${t?` ${t}`:""}`).join(",")}function Qc(e,t=An,o,r){let n="";return t?.[o]?.spacingStyles?.length&&r&&t[o].spacingStyles.forEach(i=>{n+=`${Ln(e,i.selector.trim())} { `,n+=Object.entries(i.rules).map(([s,a])=>`${s}: ${a||r}`).join("; "),n+="; }"}),n}function Ow(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,Kp.sprintf)((0,Kp.__)("Max %s wide"),t)),i.test(o)&&(n.wide=(0,Kp.sprintf)((0,Kp.__)("Max %s wide"),o)),n}var rs=l(L(),1);var fG=8,Jc=["top","right","bottom","left"],mG={top:void 0,right:void 0,bottom:void 0,left:void 0},Aw={custom:Fx,axial:Fx,horizontal:IL,vertical:AL,top:OL,right:RL,bottom:TL,left:PL},Js={default:(0,rs.__)("Spacing control"),top:(0,rs.__)("Top"),bottom:(0,rs.__)("Bottom"),left:(0,rs.__)("Left"),right:(0,rs.__)("Right"),mixed:(0,rs.__)("Mixed"),vertical:(0,rs.__)("Vertical"),horizontal:(0,rs.__)("Horizontal"),axial:(0,rs.__)("Horizontal & vertical"),custom:(0,rs.__)("Custom")},vl={axial:"axial",top:"top",right:"right",bottom:"bottom",left:"left",custom:"custom"};function Lw(e){return e?.includes?e==="0"||e.includes("var:preset|spacing|"):!1}function pG(e,t){if(!Lw(e))return e;let o=Oke(e);return t.find(n=>String(n.slug)===o)?.size}function Xp(e,t){if(!e||Lw(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 Cv(e){if(!e)return;let t=e.match(/var:preset\|spacing\|(.+)/);return t?`var(--wp--preset--spacing--${t[1]})`:e}function Oke(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 GN(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 Ake(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 hG(e={},t){let{top:o,right:r,bottom:n,left:i}=e,s=[o,r,n,i].filter(Boolean),a=o===n&&i===r&&(!!o||!!i),c=!s.length&&Ake(t),u=t?.includes("horizontal")&&t?.includes("vertical")&&t?.length===2;if(GN(t)&&(a||c))return vl.axial;if(u&&s.length===1){let d;return Object.entries(e).some(([f,m])=>(d=f,m!==void 0)),d}return t?.length===1&&!s.length?t[0]:vl.custom}function Lke(e){if(!e)return null;let t=typeof e=="string";return{top:t?e:e?.top,left:t?e:e?.left}}function Dr(e,t="0"){let o=Lke(e);if(!o)return null;let r=Cv(o?.top)||t,n=Cv(o?.left)||t;return r===n?r:`${r} ${n}`}var Qt=l(x(),1),Nke={left:"flex-start",right:"flex-end",center:"center","space-between":"space-between"},gG={left:"flex-start",right:"flex-end",center:"center",stretch:"stretch"},Mke={top:"flex-start",center:"center",bottom:"flex-end",stretch:"stretch","space-between":"space-between"},bG={horizontal:"center",vertical:"top"},Dke=["wrap","nowrap"],vG={name:"flex",label:(0,bi.__)("Flex"),inspectorControls:function({layout:t={},onChange:o,layoutBlockSupport:r={}}){let{allowOrientation:n=!0,allowJustification:i=!0,allowWrap:s=!0}=r;return(0,Qt.jsxs)(Qt.Fragment,{children:[(0,Qt.jsxs)(an.Flex,{children:[i&&(0,Qt.jsx)(an.FlexItem,{children:(0,Qt.jsx)(kG,{layout:t,onChange:o})}),n&&(0,Qt.jsx)(an.FlexItem,{children:(0,Qt.jsx)(jke,{layout:t,onChange:o})})]}),s&&(0,Qt.jsx)(zke,{layout:t,onChange:o})]})},toolBarControls:function({layout:t={},onChange:o,layoutBlockSupport:r}){let{allowVerticalAlignment:n=!0,allowJustification:i=!0}=r;return!i&&!n?null:(0,Qt.jsxs)(pt,{group:"block",__experimentalShareWithChildBlocks:!0,children:[i&&(0,Qt.jsx)(kG,{layout:t,onChange:o,isToolbar:!0}),n&&(0,Qt.jsx)(Vke,{layout:t,onChange:o})]})},getLayoutStyle:function({selector:t,layout:o,style:r,blockName:n,hasBlockGapSupport:i,layoutDefinitions:s=An}){let{orientation:a="horizontal"}=o,c=r?.spacing?.blockGap&&!qe(n,"spacing","blockGap")?Dr(r?.spacing?.blockGap,"0.5em"):void 0,u=Nke[o.justifyContent],d=Dke.includes(o.flexWrap)?o.flexWrap:"wrap",f=Mke[o.verticalAlignment],m=gG[o.justifyContent]||gG.left,p="",h=[];return d&&d!=="wrap"&&h.push(`flex-wrap: ${d}`),a==="horizontal"?(f&&h.push(`align-items: ${f}`),u&&h.push(`justify-content: ${u}`)):(f&&h.push(`justify-content: ${f}`),h.push("flex-direction: column"),h.push(`align-items: ${m}`)),h.length&&(p=`${Ln(t)} {
				${h.join("; ")};
			}`),i&&c&&(p+=Qc(t,s,"flex",c)),p},getOrientation(e){let{orientation:t="horizontal"}=e;return t},getAlignments(){return[]}};function Vke({layout:e,onChange:t}){let{orientation:o="horizontal"}=e,r=o==="horizontal"?bG.horizontal:bG.vertical,{verticalAlignment:n=r}=e;return(0,Qt.jsx)(Nw,{onChange:s=>{t({...e,verticalAlignment:s})},value:n,controls:o==="horizontal"?["top","center","bottom","stretch"]:["top","center","bottom","space-between"]})}var Fke={placement:"bottom-start"};function kG({layout:e,onChange:t,isToolbar:o=!1}){let{justifyContent:r="left",orientation:n="horizontal"}=e,i=c=>{t({...e,justifyContent:c})},s=["left","center","right"];if(n==="horizontal"?s.push("space-between"):s.push("stretch"),o)return(0,Qt.jsx)(qp,{allowedControls:s,value:r,onChange:i,popoverProps:Fke});let a=[{value:"left",icon:Vc,label:(0,bi.__)("Justify items left")},{value:"center",icon:Dc,label:(0,bi.__)("Justify items center")},{value:"right",icon:Fc,label:(0,bi.__)("Justify items right")}];return n==="horizontal"?a.push({value:"space-between",icon:Ip,label:(0,bi.__)("Space between items")}):a.push({value:"stretch",icon:Pp,label:(0,bi.__)("Stretch items")}),(0,Qt.jsx)(an.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,label:(0,bi.__)("Justification"),value:r,onChange:i,className:"block-editor-hooks__flex-layout-justification-controls",children:a.map(({value:c,icon:u,label:d})=>(0,Qt.jsx)(an.__experimentalToggleGroupControlOptionIcon,{value:c,icon:u,label:d},c))})}function zke({layout:e,onChange:t}){let{flexWrap:o="wrap"}=e;return(0,Qt.jsx)(an.ToggleControl,{label:(0,bi.__)("Allow to wrap to multiple lines"),onChange:r=>{t({...e,flexWrap:r?"wrap":"nowrap"})},checked:o==="wrap"})}function jke({layout:e,onChange:t}){let{orientation:o="horizontal",verticalAlignment:r,justifyContent:n}=e;return(0,Qt.jsxs)(an.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,className:"block-editor-hooks__flex-layout-orientation-controls",label:(0,bi.__)("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,Qt.jsx)(an.__experimentalToggleGroupControlOptionIcon,{icon:Mk,value:"horizontal",label:(0,bi.__)("Horizontal")}),(0,Qt.jsx)(an.__experimentalToggleGroupControlOptionIcon,{icon:iO,value:"vertical",label:(0,bi.__)("Vertical")})]})}var yG=l(L(),1);var SG={name:"default",label:(0,yG.__)("Flow"),inspectorControls:function(){return null},toolBarControls:function(){return null},getLayoutStyle:function({selector:t,style:o,blockName:r,hasBlockGapSupport:n,layoutDefinitions:i=An}){let s=Dr(o?.spacing?.blockGap),a="";qe(r,"spacing","blockGap")||(s?.top?a=Dr(s?.top):typeof s=="string"&&(a=Dr(s)));let c="";return n&&a&&(c+=Qc(t,i,"default",a)),c},getOrientation(){return"vertical"},getAlignments(e,t){let o=Ow(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 ln=l(P(),1),yl=l(L(),1);var xG=l(Bv(),1);var Go=l(x(),1),wG={name:"constrained",label:(0,yl.__)("Constrained"),inspectorControls:function({layout:t,onChange:o,layoutBlockSupport:r={}}){let{wideSize:n,contentSize:i,justifyContent:s="center"}=t,{allowJustification:a=!0,allowCustomContentAndWideSize:c=!0}=r,u=p=>{o({...t,justifyContent:p})},d=[{value:"left",icon:Vc,label:(0,yl.__)("Justify items left")},{value:"center",icon:Dc,label:(0,yl.__)("Justify items center")},{value:"right",icon:Fc,label:(0,yl.__)("Justify items right")}],[f]=pe("spacing.units"),m=(0,ln.__experimentalUseCustomUnits)({availableUnits:f||["%","px","em","rem","vw"]});return(0,Go.jsxs)(ln.__experimentalVStack,{spacing:4,className:"block-editor-hooks__layout-constrained",children:[c&&(0,Go.jsxs)(Go.Fragment,{children:[(0,Go.jsx)(ln.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,yl.__)("Content width"),labelPosition:"top",value:i||n||"",onChange:p=>{p=0>parseFloat(p)?"0":p,o({...t,contentSize:p!==""?p:void 0})},units:m,prefix:(0,Go.jsx)(ln.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,Go.jsx)(Ee,{icon:of})})}),(0,Go.jsx)(ln.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,yl.__)("Wide width"),labelPosition:"top",value:n||i||"",onChange:p=>{p=0>parseFloat(p)?"0":p,o({...t,wideSize:p!==""?p:void 0})},units:m,prefix:(0,Go.jsx)(ln.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,Go.jsx)(Ee,{icon:ff})})}),(0,Go.jsx)("p",{className:"block-editor-hooks__layout-constrained-helptext",children:(0,yl.__)("Customize the width for all elements that are assigned to the center or wide columns.")})]}),a&&(0,Go.jsx)(ln.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,label:(0,yl.__)("Justification"),value:s,onChange:u,children:d.map(({value:p,icon:h,label:g})=>(0,Go.jsx)(ln.__experimentalToggleGroupControlOptionIcon,{value:p,icon:h,label:g},p))})]})},toolBarControls:function({layout:t={},onChange:o,layoutBlockSupport:r}){let{allowJustification:n=!0}=r;return n?(0,Go.jsx)(pt,{group:"block",__experimentalShareWithChildBlocks:!0,children:(0,Go.jsx)(Hke,{layout:t,onChange:o})}):null},getLayoutStyle:function({selector:t,layout:o={},style:r,blockName:n,hasBlockGapSupport:i,layoutDefinitions:s=An}){let{contentSize:a,wideSize:c,justifyContent:u}=o,d=Dr(r?.spacing?.blockGap),f="";qe(n,"spacing","blockGap")||(d?.top?f=Dr(d?.top):typeof d=="string"&&(f=Dr(d)));let m=u==="left"?"0 !important":"auto !important",p=u==="right"?"0 !important":"auto !important",h=a||c?`
					${Ln(t,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")} {
						max-width: ${a??c};
						margin-left: ${m};
						margin-right: ${p};
					}
					${Ln(t,"> .alignwide")}  {
						max-width: ${c??a};
					}
					${Ln(t,"> .alignfull")} {
						max-width: none;
					}
				`:"";return u==="left"?h+=`${Ln(t,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")}
			{ margin-left: ${m}; }`:u==="right"&&(h+=`${Ln(t,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")}
			{ margin-right: ${p}; }`),r?.spacing?.padding&&(0,xG.getCSSRules)(r).forEach(b=>{if(b.key==="paddingRight"){let k=b.value==="0"?"0px":b.value;h+=`
					${Ln(t,"> .alignfull")} {
						margin-right: calc(${k} * -1);
					}
					`}else if(b.key==="paddingLeft"){let k=b.value==="0"?"0px":b.value;h+=`
					${Ln(t,"> .alignfull")} {
						margin-left: calc(${k} * -1);
					}
					`}}),i&&f&&(h+=Qc(t,s,"constrained",f)),h},getOrientation(){return"vertical"},getAlignments(e){let t=Ow(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}},Gke={placement:"bottom-start"};function Hke({layout:e,onChange:t}){let{justifyContent:o="center"}=e;return(0,Go.jsx)(qp,{allowedControls:["left","center","right"],value:o,onChange:i=>{t({...e,justifyContent:i})},popoverProps:Gke})}var Vr=l(L(),1),et=l(P(),1),Mw=l(I(),1);var Ye=l(x(),1),Uke={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},Wke=[{value:"px",label:"px",default:0},{value:"rem",label:"rem",default:0},{value:"em",label:"em",default:0}],CG={name:"grid",label:(0,Vr.__)("Grid"),inspectorControls:function({layout:t={},onChange:o,layoutBlockSupport:r={}}){let{allowSizingOnChildren:n=!1}=r,i=!0,s=!t?.isManualPlacement||window.__experimentalEnableGridInteractivity;return(0,Ye.jsxs)(Ye.Fragment,{children:[window.__experimentalEnableGridInteractivity&&(0,Ye.jsx)(Yke,{layout:t,onChange:o}),(0,Ye.jsxs)(et.__experimentalVStack,{spacing:4,children:[i&&(0,Ye.jsx)($ke,{layout:t,onChange:o,allowSizingOnChildren:n}),s&&(0,Ye.jsx)(Zke,{layout:t,onChange:o})]})]})},toolBarControls:function(){return null},getLayoutStyle:function({selector:t,layout:o,style:r,blockName:n,hasBlockGapSupport:i,layoutDefinitions:s=An}){let{minimumColumnWidth:a=null,columnCount:c=null,rowCount:u=null}=o,d=r?.spacing?.blockGap&&!qe(n,"spacing","blockGap")?Dr(r?.spacing?.blockGap,"0.5em"):void 0,f="",m=[];if(a&&c>0){let p=`max(${a}, ( 100% - (${d||"1.2rem"}*${c-1}) ) / ${c})`;m.push(`grid-template-columns: repeat(auto-fill, minmax(${p}, 1fr))`,"container-type: inline-size"),u&&m.push(`grid-template-rows: repeat(${u}, minmax(1rem, auto))`)}else c?(m.push(`grid-template-columns: repeat(${c}, minmax(0, 1fr))`),u&&m.push(`grid-template-rows: repeat(${u}, minmax(1rem, auto))`)):m.push(`grid-template-columns: repeat(auto-fill, minmax(min(${a||"12rem"}, 100%), 1fr))`,"container-type: inline-size");return m.length&&(f=`${Ln(t)} { ${m.join("; ")}; }`),i&&d&&(f+=Qc(t,s,"grid",d)),f},getOrientation(){return"horizontal"},getAlignments(){return[]}};function Zke({layout:e,onChange:t}){let{minimumColumnWidth:o,columnCount:r,isManualPlacement:n}=e,s=o||(n||r?null:"12rem"),[a,c="rem"]=(0,et.__experimentalParseQuantityAndUnitFromRawValue)(s),u=f=>{t({...e,minimumColumnWidth:[f,c].join("")})},d=f=>{let m;["em","rem"].includes(f)&&c==="px"?m=(a/16).toFixed(2)+f:["em","rem"].includes(c)&&f==="px"&&(m=Math.round(a*16)+f),t({...e,minimumColumnWidth:m})};return(0,Ye.jsxs)("fieldset",{className:"block-editor-hooks__grid-layout-minimum-width-control",children:[(0,Ye.jsx)(et.BaseControl.VisualLabel,{as:"legend",children:(0,Vr.__)("Min. column width")}),(0,Ye.jsxs)(et.Flex,{gap:4,children:[(0,Ye.jsx)(et.FlexItem,{isBlock:!0,children:(0,Ye.jsx)(et.__experimentalUnitControl,{size:"__unstable-large",onChange:f=>{t({...e,minimumColumnWidth:f===""?void 0:f})},onUnitChange:d,value:s,units:Wke,min:0,label:(0,Vr.__)("Minimum column width"),hideLabelFromVision:!0})}),(0,Ye.jsx)(et.FlexItem,{isBlock:!0,children:(0,Ye.jsx)(et.RangeControl,{__next40pxDefaultSize:!0,onChange:u,value:a||0,min:0,max:Uke[c]||600,withInputField:!1,label:(0,Vr.__)("Minimum column width"),hideLabelFromVision:!0})})]}),(0,Ye.jsx)("p",{className:"components-base-control__help",children:(0,Vr.__)("Columns will wrap to fewer per row when they can no longer maintain the minimum width.")})]})}function $ke({layout:e,onChange:t,allowSizingOnChildren:o}){let{columnCount:n=void 0,rowCount:i,isManualPlacement:s}=e;return(0,Ye.jsx)(Ye.Fragment,{children:(0,Ye.jsxs)("fieldset",{className:"block-editor-hooks__grid-layout-columns-and-rows-controls",children:[!s&&(0,Ye.jsx)(et.BaseControl.VisualLabel,{as:"legend",children:(0,Vr.__)("Max. columns")}),(0,Ye.jsxs)(et.Flex,{gap:4,children:[(0,Ye.jsx)(et.FlexItem,{isBlock:!0,children:(0,Ye.jsx)(et.__experimentalNumberControl,{size:"__unstable-large",onChange:a=>{let u=a===""||a==="0"?s?1:void 0:parseInt(a,10);t({...e,columnCount:u})},value:n,min:1,label:(0,Vr.__)("Columns"),hideLabelFromVision:!s})}),(0,Ye.jsx)(et.FlexItem,{isBlock:!0,children:o&&s?(0,Ye.jsx)(et.__experimentalNumberControl,{size:"__unstable-large",onChange:a=>{let c=a===""||a==="0"?1:parseInt(a,10);t({...e,rowCount:c})},value:i,min:1,label:(0,Vr.__)("Rows")}):(0,Ye.jsx)(et.RangeControl,{__next40pxDefaultSize:!0,value:n??1,onChange:a=>t({...e,columnCount:a===""||a==="0"?1:a}),min:1,max:16,withInputField:!1,label:(0,Vr.__)("Columns"),hideLabelFromVision:!0})})]})]})})}function Yke({layout:e,onChange:t}){let{columnCount:o,rowCount:r,minimumColumnWidth:n,isManualPlacement:i}=e,[s,a]=(0,Mw.useState)(o||3),[c,u]=(0,Mw.useState)(r),[d,f]=(0,Mw.useState)(n||"12rem"),m=i?"manual":"auto",p=g=>{g==="manual"?f(n||"12rem"):(a(o||3),u(r)),t({...e,columnCount:s,rowCount:g==="manual"?c:void 0,isManualPlacement:g==="manual"?!0:void 0,minimumColumnWidth:g==="auto"?d:null})},h=m==="manual"?(0,Vr.__)("Grid items can be manually placed in any position on the grid."):(0,Vr.__)("Grid items are placed automatically depending on their order.");return(0,Ye.jsxs)(et.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,label:(0,Vr.__)("Grid item position"),value:m,onChange:p,isBlock:!0,help:h,children:[(0,Ye.jsx)(et.__experimentalToggleGroupControlOption,{value:"auto",label:(0,Vr.__)("Auto")},"auto"),(0,Ye.jsx)(et.__experimentalToggleGroupControlOption,{value:"manual",label:(0,Vr.__)("Manual")},"manual")]})}var BG=[SG,vG,wG,CG];function ns(e="default"){return BG.find(t=>t.name===e)}function EG(){return BG}var HN=l(x(),1),UN={type:"default"},WN=(0,Dw.createContext)(UN);WN.displayName="BlockLayoutContext";var TG=WN.Provider;function yf(){return(0,Dw.useContext)(WN)}function IG({layout:e={},css:t,...o}){let r=ns(e.type),[n]=pe("spacing.blockGap"),i=n!==null;if(r){if(t)return(0,HN.jsx)("style",{children:t});let s=r.getLayoutStyle?.({hasBlockGapSupport:i,layout:e,...o});if(s)return(0,HN.jsx)("style",{children:s})}return null}var Vw=[],PG=["none","left","center","right","wide","full"],Kke=["wide","full"];function Ev(e=PG){e.includes("none")||(e=["none",...e]);let t=e.length===1&&e[0]==="none",[o,r,n]=(0,RG.useSelect)(c=>{if(t)return[!1,!1,!1];let u=c(S).getSettings();return[u.alignWide??!1,u.supportsLayout,u.__unstableIsBlockBasedTheme]},[t]),i=yf();if(t)return Vw;let s=ns(i?.type);if(r){let u=s.getAlignments(i,n).filter(d=>e.includes(d.name));return u.length===1&&u[0].name==="none"?Vw:u}if(s.name!=="default"&&s.name!=="constrained")return Vw;let a=e.filter(c=>i.alignments?i.alignments.includes(c):!o&&Kke.includes(c)?!1:PG.includes(c)).map(c=>({name:c}));return a.length===1&&a[0].name==="none"?Vw:a}var eu=l(L(),1);var Tv={none:{icon:of,title:(0,eu._x)("None","Alignment option")},left:{icon:aL,title:(0,eu.__)("Align left")},center:{icon:iL,title:(0,eu.__)("Align center")},right:{icon:cL,title:(0,eu.__)("Align right")},wide:{icon:ff,title:(0,eu.__)("Wide width")},full:{icon:sv,title:(0,eu.__)("Full width")}},OG="none";var Sf=l(x(),1);function Xke({value:e,onChange:t,controls:o,isToolbar:r,isCollapsed:n=!0}){let i=Ev(o);if(!!!i.length)return null;function a(p){t([e,"none"].includes(p)?void 0:p)}let c=Tv[e],u=Tv[OG],d=r?tu.ToolbarGroup:tu.ToolbarDropdownMenu,f={icon:c?c.icon:u.icon,label:(0,ZN.__)("Align")},m=r?{isCollapsed:n,controls:i.map(({name:p})=>({...Tv[p],isActive:e===p||!e&&p==="none",role:n?"menuitemradio":void 0,onClick:()=>a(p)}))}:{toggleProps:{description:(0,ZN.__)("Change alignment")},children:({onClose:p})=>(0,Sf.jsx)(Sf.Fragment,{children:(0,Sf.jsx)(tu.MenuGroup,{className:"block-editor-block-alignment-control__menu-group",children:i.map(({name:h,info:g})=>{let{icon:b,title:k}=Tv[h],v=h===e||!e&&h==="none";return(0,Sf.jsx)(tu.MenuItem,{icon:b,iconPosition:"left",className:D("components-dropdown-menu__menu-item",{"is-active":v}),isSelected:v,onClick:()=>{a(h),p()},role:"menuitemradio",info:g,children:k},h)})})})};return(0,Sf.jsx)(d,{...f,...m})}var $N=Xke;var YN=l(x(),1),Fw=e=>(0,YN.jsx)($N,{...e,isToolbar:!1}),AG=e=>(0,YN.jsx)($N,{...e,isToolbar:!0});var VG=l(ef(),1),Hw=l(L(),1),Uw=l(Z(),1),ss=l(P(),1),qN=l(M(),1),FG=l(I(),1),zG=l(Y(),1);var XN=l(ef(),1),LG=l(Z(),1),NG=l(P(),1),MG=l(M(),1),jw=l(I(),1),DG=l(Y(),1);var zw=l(M(),1);function KN(e){return!e||Object.keys(e).length===0}function Sl(e){let{clientId:t}=Ne(),o=e||t,{updateBlockAttributes:r}=(0,zw.useDispatch)(S),{getBlockAttributes:n}=(0,zw.useRegistry)().select(S);return{updateBlockBindings:a=>{let{metadata:{bindings:c,...u}={}}=n(o),d={...c};Object.entries(a).forEach(([m,p])=>{if(!p&&d[m]){delete d[m];return}d[m]=p});let f={...u,bindings:d};KN(f.bindings)&&delete f.bindings,r(o,{metadata:KN(f)?void 0:f})},removeAllBlockBindings:()=>{let{metadata:{bindings:a,...c}={}}=n(o);r(o,{metadata:KN(c)?void 0:c})}}}var is=l(x(),1),{Menu:ou}=F(NG.privateApis);function qke({args:e,attribute:t,field:o,source:r,sourceKey:n}){let i=(0,jw.useMemo)(()=>({source:n,args:o.args||{key:o.key}}),[o.args,o.key,n]),s=(0,jw.useContext)(di),a=(0,MG.useSelect)(u=>r.getValues({select:u,context:s,bindings:{[t]:i}}),[t,s,i,r]),{updateBlockBindings:c}=Sl();return(0,is.jsxs)(ou.CheckboxItem,{onChange:()=>{let u=(0,XN.default)(e,o.args)??o.key===e?.key;c(u?{[t]:void 0}:{[t]:i})},name:t+"-binding",value:a[t],checked:(0,XN.default)(e,o.args)??o.key===e?.key,children:[(0,is.jsx)(ou.ItemLabel,{children:o.label}),(0,is.jsx)(ou.ItemHelpText,{children:a[t]})]})}function Iv({args:e,attribute:t,sourceKey:o,fields:r}){let n=(0,DG.useViewportMatch)("medium","<");if(!r||r.length===0)return null;let i=(0,LG.getBlockBindingsSource)(o);return(0,is.jsxs)(ou,{placement:n?"bottom-start":"left-start",children:[(0,is.jsx)(ou.SubmenuTriggerItem,{children:(0,is.jsx)(ou.ItemLabel,{children:i.label})}),(0,is.jsx)(ou.Popover,{gutter:8,children:(0,is.jsx)(ou.Group,{children:r.map(s=>(0,is.jsx)(qke,{args:e,attribute:t,field:s,source:i,sourceKey:o},o+JSON.stringify(s.args)||s.key))})})]},o)}var ki=l(x(),1),{Menu:Gw}=F(ss.privateApis);function Pv({attribute:e,binding:t,blockName:o}){let{updateBlockBindings:r}=Sl(),n=(0,zG.useViewportMatch)("medium","<"),i=(0,FG.useContext)(di),s=(0,qN.useSelect)(g=>{let{getAllBlockBindingsSources:b,getBlockBindingsSourceFieldsList:k,getBlockType:v}=F(g(Uw.store)),y=v(o).attributes?.[e]?.type,_=y==="rich-text"?"string":y,w={};return Object.entries(b()).forEach(([C,E])=>{let R=k(E,i);if(!R?.length)return;let O=R.filter(B=>B.type===_);O.length&&(w[C]=O)}),w},[e,o,i]),{canUpdateBlockBindings:a}=(0,qN.useSelect)(g=>({canUpdateBlockBindings:g(S).getSettings().canUpdateBlockBindings})),c=Object.keys(s).length>0,u=!a||!c,{source:d,args:f}=t||{},m=(0,Uw.getBlockBindingsSource)(d),p,h=!0;return t===void 0?(c?p=(0,Hw.__)("Not connected"):p=(0,Hw.__)("No sources available"),h=!0):m?p=s?.[d]?.find(g=>(0,VG.default)(g.args,f))?.label||m?.label||d:(h=!1,p=(0,Hw.__)("Source not registered")),(0,ki.jsx)(ss.__experimentalToolsPanelItem,{hasValue:()=>!!t,label:e,onDeselect:!!c&&(()=>{r({[e]:void 0})}),children:(0,ki.jsxs)(Gw,{placement:n?"bottom-start":"left-start",children:[(0,ki.jsx)(Gw.TriggerButton,{render:(0,ki.jsx)(ss.__experimentalItem,{}),disabled:!c,children:(0,ki.jsxs)(ss.__experimentalVStack,{className:"block-editor-bindings__item",spacing:0,children:[(0,ki.jsx)(ss.__experimentalText,{truncate:!0,children:e}),(0,ki.jsx)(ss.__experimentalText,{truncate:!0,variant:h?"muted":void 0,isDestructive:!h,children:p})]})}),!u&&(0,ki.jsx)(Gw.Popover,{gutter:n?8:36,children:(0,ki.jsx)(Gw,{placement:n?"bottom-start":"left-start",children:Object.entries(s).map(([g,b])=>(0,ki.jsx)(Iv,{args:t?.args,attribute:e,sourceKey:g,fields:b},g))})})]})})}var jG=l(L(),1),GG=l(P(),1);var HG=l(x(),1);function Qke({isActive:e,label:t=(0,jG.__)("Full height"),onToggle:o,isDisabled:r}){return(0,HG.jsx)(GG.ToolbarButton,{isActive:e,icon:Tp,label:t,onClick:()=>o(!e),disabled:r})}var UG=Qke;var ZG=l(L(),1),$G=l(at(),1),_f=l(P(),1),Rv=l(x(),1),Jke=()=>{};function eve(e){let{label:t=(0,ZG.__)("Change matrix alignment"),onChange:o=Jke,value:r="center",isDisabled:n}=e,i=(0,Rv.jsx)(_f.AlignmentMatrixControl.Icon,{value:r});return(0,Rv.jsx)(_f.Dropdown,{popoverProps:{placement:"bottom-start"},renderToggle:({onToggle:s,isOpen:a})=>(0,Rv.jsx)(_f.ToolbarButton,{onClick:s,"aria-haspopup":"true","aria-expanded":a,onKeyDown:u=>{!a&&u.keyCode===$G.DOWN&&(u.preventDefault(),s())},label:t,icon:i,showTooltip:!0,disabled:n}),renderContent:()=>(0,Rv.jsx)(_f.AlignmentMatrixControl,{onChange:o,value:r})})}var YG=eve;var eM=l(P(),1),$w=l(M(),1),Yw=l(L(),1);var tH=l(I(),1);var KG=l(M(),1),Ww=l(Z(),1);function rr({clientId:e,maximumLength:t,context:o}){let r=(0,KG.useSelect)(n=>{if(!e)return null;let{getBlockName:i,getBlockAttributes:s}=n(S),{getBlockType:a,getActiveBlockVariation:c}=n(Ww.store),u=i(e),d=a(u);if(!d)return null;let f=s(e),m=(0,Ww.__experimentalGetBlockLabel)(d,f,o);return m!==d.title?m:c(u,f)?.title||d.title},[e,o]);return r?t&&t>0&&r.length>t?r.slice(0,t-3)+"...":r:null}function Ov({clientId:e,maximumLength:t,context:o}){return rr({clientId:e,maximumLength:t,context:o})}var xf=l(I(),1),QG=l(Y(),1);var Zw=l(I(),1),QN=l(Y(),1),XG=l(x(),1),Av=(0,Zw.createContext)({refsMap:(0,QN.observableMap)()});Av.displayName="BlockRefsContext";function qG({children:e}){let t=(0,Zw.useMemo)(()=>({refsMap:(0,QN.observableMap)()}),[]);return(0,XG.jsx)(Av.Provider,{value:t,children:e})}function JG(e){let{refsMap:t}=(0,xf.useContext)(Av);return(0,QG.useRefEffect)(o=>(t.set(e,o),()=>t.delete(e)),[e])}function JN(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function wf(e,t){let{refsMap:o}=(0,xf.useContext)(Av);(0,xf.useLayoutEffect)(()=>{JN(t,o.get(e));let r=o.subscribe(e,()=>JN(t,o.get(e)));return()=>{r(),JN(t,null)}},[o,e,t])}function ht(e){let[t,o]=(0,xf.useState)(null);return wf(e,o),t}function eH(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 Nn=l(x(),1);function tve({rootLabelText:e}){let{selectBlock:t,clearSelectedBlock:o}=(0,$w.useDispatch)(S),{clientId:r,parents:n,hasSelection:i}=(0,$w.useSelect)(c=>{let{getSelectionStart:u,getSelectedBlockClientId:d,getEnabledBlockParents:f}=F(c(S)),m=d();return{parents:f(m),clientId:m,hasSelection:!!u().clientId}},[]),s=e||(0,Yw._x)("Document","noun, breadcrumb"),a=(0,tH.useRef)();return wf(r,a),(0,Nn.jsxs)("ul",{className:"block-editor-block-breadcrumb",role:"list","aria-label":(0,Yw.__)("Block breadcrumb"),children:[(0,Nn.jsxs)("li",{className:i?void 0:"block-editor-block-breadcrumb__current","aria-current":i?void 0:"true",children:[i&&(0,Nn.jsx)(eM.Button,{size:"small",className:"block-editor-block-breadcrumb__button",onClick:()=>{let c=a.current?.closest(".editor-styles-wrapper");o(),eH(c)?.focus()},children:s}),!i&&(0,Nn.jsx)("span",{children:s}),!!r&&(0,Nn.jsx)(Ee,{icon:Mc,className:"block-editor-block-breadcrumb__separator"})]}),n.map(c=>(0,Nn.jsxs)("li",{children:[(0,Nn.jsx)(eM.Button,{size:"small",className:"block-editor-block-breadcrumb__button",onClick:()=>t(c),children:(0,Nn.jsx)(Ov,{clientId:c,maximumLength:35})}),(0,Nn.jsx)(Ee,{icon:Mc,className:"block-editor-block-breadcrumb__separator"})]},c)),!!r&&(0,Nn.jsx)("li",{className:"block-editor-block-breadcrumb__current","aria-current":"true",children:(0,Nn.jsx)(Ov,{clientId:r,maximumLength:35})})]})}var oH=tve;var rH=l(M(),1);function nH(e){return(0,rH.useSelect)(t=>{let{__unstableHasActiveBlockOverlayActive:o}=t(S);return o(e)},[e])}var lT=l(Y(),1),IQ=l(I(),1),PQ=l(M(),1);var Pi=l(M(),1),zB=l(Y(),1),Nu=l(I(),1),VY=l(Z(),1);var hu=l(I(),1),Ue=l(Z(),1),z9=l(P(),1),GC=l(M(),1),j9=l(Y(),1),G9=l(je(),1);var _l=l(L(),1),Xw=l(P(),1),Cf=l(I(),1),Jp=l(Z(),1),qw=l(M(),1);var mH=l(cH(),1),Kw=l(L(),1),pH=l(Z(),1);var uH=l(P(),1),dH=l(I(),1),fH=l(je(),1),ea=l(x(),1);function oM({title:e,rawContent:t,renderedContent:o,action:r,actionText:n,className:i}){return(0,ea.jsxs)("div",{className:i,children:[(0,ea.jsxs)("div",{className:"block-editor-block-compare__content",children:[(0,ea.jsx)("h2",{className:"block-editor-block-compare__heading",children:e}),(0,ea.jsx)("div",{className:"block-editor-block-compare__html",children:t}),(0,ea.jsx)("div",{className:"block-editor-block-compare__preview edit-post-visual-editor",children:(0,ea.jsx)(dH.RawHTML,{children:(0,fH.safeHTML)(o)})})]}),(0,ea.jsx)("div",{className:"block-editor-block-compare__action",children:(0,ea.jsx)(uH.Button,{__next40pxDefaultSize:!0,variant:"secondary",tabIndex:"0",onClick:r,children:n})})]})}var Qp=l(x(),1);function ave({block:e,onKeep:t,onConvert:o,convertor:r,convertButtonText:n}){function i(u,d){return(0,mH.diffChars)(u,d).map((m,p)=>{let h=D({"block-editor-block-compare__added":m.added,"block-editor-block-compare__removed":m.removed});return(0,Qp.jsx)("span",{className:h,children:m.value},p)})}function s(u){return(Array.isArray(u)?u:[u]).map(m=>(0,pH.getSaveContent)(m.name,m.attributes,m.innerBlocks)).join("")}let a=s(r(e)),c=i(e.originalContent,a);return(0,Qp.jsxs)("div",{className:"block-editor-block-compare__wrapper",children:[(0,Qp.jsx)(oM,{title:(0,Kw.__)("Current"),className:"block-editor-block-compare__current",action:t,actionText:(0,Kw.__)("Convert to HTML"),rawContent:e.originalContent,renderedContent:e.originalContent}),(0,Qp.jsx)(oM,{title:(0,Kw.__)("After Conversion"),className:"block-editor-block-compare__converted",action:o,actionText:n,rawContent:c,renderedContent:a})]})}var hH=ave;var xl=l(x(),1),gH=e=>(0,Jp.rawHandler)({HTML:e.originalContent});function bH({clientId:e}){let{block:t,canInsertHTMLBlock:o,canInsertClassicBlock:r}=(0,qw.useSelect)(d=>{let{canInsertBlockType:f,getBlock:m,getBlockRootClientId:p}=d(S),h=p(e);return{block:m(e),canInsertHTMLBlock:f("core/html",h),canInsertClassicBlock:f("core/freeform",h)}},[e]),{replaceBlock:n}=(0,qw.useDispatch)(S),[i,s]=(0,Cf.useState)(!1),a=(0,Cf.useCallback)(()=>s(!1),[]),c=(0,Cf.useMemo)(()=>({toClassic(){let d=(0,Jp.createBlock)("core/freeform",{content:t.originalContent});return n(t.clientId,d)},toHTML(){let d=(0,Jp.createBlock)("core/html",{content:t.originalContent});return n(t.clientId,d)},toBlocks(){let d=gH(t);return n(t.clientId,d)},toRecoveredBlock(){let d=(0,Jp.createBlock)(t.name,t.attributes,t.innerBlocks);return n(t.clientId,d)}}),[t,n]),u=(0,Cf.useMemo)(()=>[{title:(0,_l._x)("Resolve","imperative verb"),onClick:()=>s(!0)},o&&{title:(0,_l.__)("Convert to HTML"),onClick:c.toHTML},r&&{title:(0,_l.__)("Convert to Classic Block"),onClick:c.toClassic}].filter(Boolean),[o,r,c]);return(0,xl.jsxs)(xl.Fragment,{children:[(0,xl.jsx)(Zc,{actions:[(0,xl.jsx)(Xw.Button,{__next40pxDefaultSize:!0,onClick:c.toRecoveredBlock,variant:"primary",children:(0,_l.__)("Attempt recovery")},"recover")],secondaryActions:u,children:(0,_l.__)("Block contains unexpected or invalid content.")}),i&&(0,xl.jsx)(Xw.Modal,{title:(0,_l.__)("Resolve Block"),onRequestClose:a,className:"block-editor-block-compare",children:(0,xl.jsx)(hH,{block:t,onKeep:c.toHTML,onConvert:c.toBlocks,convertor:gH,convertButtonText:(0,_l.__)("Convert to Blocks")})})]})}var kH=l(L(),1);var vH=l(x(),1),lve=(0,vH.jsx)(Zc,{className:"block-editor-block-list__block-crash-warning",children:(0,kH.__)("This block has encountered an error and cannot be previewed.")}),yH=()=>lve;var SH=l(I(),1),cve=class extends SH.Component{constructor(){super(...arguments),this.state={hasError:!1}}componentDidCatch(){this.setState({hasError:!0})}render(){return this.state.hasError?this.props.fallback:this.props.children}},_H=cve;var jH=l(iM(),1),tC=l(I(),1),oC=l(M(),1),ta=l(Z(),1);var GH=l(x(),1);function yve({clientId:e}){let[t,o]=(0,tC.useState)(""),r=(0,oC.useSelect)(s=>s(S).getBlock(e),[e]),{updateBlock:n}=(0,oC.useDispatch)(S),i=()=>{let s=(0,ta.getBlockType)(r.name);if(!s)return;let a=(0,ta.getBlockAttributes)(s,t,r.attributes),c=t||(0,ta.getSaveContent)(s,a),[u]=t?(0,ta.validateBlock)({...r,attributes:a,originalContent:c}):[!0];n(e,{attributes:a,originalContent:c,isValid:u}),t||o(c)};return(0,tC.useEffect)(()=>{o((0,ta.getBlockContent)(r))},[r]),(0,GH.jsx)(jH.default,{className:"block-editor-block-list__block-html-textarea",value:t,onBlur:i,onChange:s=>o(s.target.value)})}var HH=yve;var D9=l(I(),1),FC=l(L(),1),V9=l(Z(),1),zC=l(Y(),1),F9=l(Mv(),1);var aM=Vv(),ve=e=>Dv(e,aM),lM=Vv();ve.write=e=>Dv(e,lM);var rC=Vv();ve.onStart=e=>Dv(e,rC);var cM=Vv();ve.onFrame=e=>Dv(e,cM);var uM=Vv();ve.onFinish=e=>Dv(e,uM);var eh=[];ve.setTimeout=(e,t)=>{let o=ve.now()+t,r=()=>{let i=eh.findIndex(s=>s.cancel==r);~i&&eh.splice(i,1),nu-=~i?1:0},n={time:o,handler:e,cancel:r};return eh.splice(WH(o),0,n),nu+=1,ZH(),n};var WH=e=>~(~eh.findIndex(t=>t.time>e)||~eh.length);ve.cancel=e=>{rC.delete(e),cM.delete(e),uM.delete(e),aM.delete(e),lM.delete(e)};ve.sync=e=>{sM=!0,ve.batchedUpdates(e),sM=!1};ve.throttle=e=>{let t;function o(){try{e(...t)}finally{t=null}}function r(...n){t=n,ve.onStart(o)}return r.handler=e,r.cancel=()=>{rC.delete(o),t=null},r};var dM=typeof window<"u"?window.requestAnimationFrame:()=>{};ve.use=e=>dM=e;ve.now=typeof performance<"u"?()=>performance.now():Date.now;ve.batchedUpdates=e=>e();ve.catch=console.error;ve.frameLoop="always";ve.advance=()=>{ve.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):YH()};var ru=-1,nu=0,sM=!1;function Dv(e,t){sM?(t.delete(e),e(0)):(t.add(e),ZH())}function ZH(){ru<0&&(ru=0,ve.frameLoop!=="demand"&&dM($H))}function Sve(){ru=-1}function $H(){~ru&&(dM($H),ve.batchedUpdates(YH))}function YH(){let e=ru;ru=ve.now();let t=WH(ru);if(t&&(KH(eh.splice(0,t),o=>o.handler()),nu-=t),!nu){Sve();return}rC.flush(),aM.flush(e?Math.min(64,ru-e):16.667),cM.flush(),lM.flush(),uM.flush()}function Vv(){let e=new Set,t=e;return{add(o){nu+=t==e&&!e.has(o)?1:0,e.add(o)},delete(o){return nu-=t==e&&e.has(o)?1:0,e.delete(o)},flush(o){t.size&&(e=new Set,nu-=t.size,KH(t,r=>r(o)&&e.add(r)),nu+=e.size,t=e)}}}function KH(e,t){e.forEach(o=>{try{t(o)}catch(r){ve.catch(r)}})}var yi=l(Fr());function lC(){}var tU=(e,t,o)=>Object.defineProperty(e,t,{value:o,writable:!0,configurable:!0}),re={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 oa(e,t){if(re.arr(e)){if(!re.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 gt=(e,t)=>e.forEach(t);function Si(e,t,o){if(re.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 cn=e=>re.und(e)?[]:re.arr(e)?e:[e];function nh(e,t){if(e.size){let o=Array.from(e);e.clear(),gt(o,t)}}var ih=(e,...t)=>nh(e,o=>o(...t)),bM=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),kM,oU,iu=null,rU=!1,vM=lC,_ve=e=>{e.to&&(oU=e.to),e.now&&(ve.now=e.now),e.colors!==void 0&&(iu=e.colors),e.skipAnimation!=null&&(rU=e.skipAnimation),e.createStringInterpolator&&(kM=e.createStringInterpolator),e.requestAnimationFrame&&ve.use(e.requestAnimationFrame),e.batchedUpdates&&(ve.batchedUpdates=e.batchedUpdates),e.willAdvance&&(vM=e.willAdvance),e.frameLoop&&(ve.frameLoop=e.frameLoop)},Mn=Object.freeze({__proto__:null,get createStringInterpolator(){return kM},get to(){return oU},get colors(){return iu},get skipAnimation(){return rU},get willAdvance(){return vM},assign:_ve}),Fv=new Set,vi=[],fM=[],sC=0,sh={get idle(){return!Fv.size&&!vi.length},start(e){sC>e.priority?(Fv.add(e),ve.onStart(xve)):(nU(e),ve(hM))},advance:hM,sort(e){if(sC)ve.onFrame(()=>sh.sort(e));else{let t=vi.indexOf(e);~t&&(vi.splice(t,1),iU(e))}},clear(){vi=[],Fv.clear()}};function xve(){Fv.forEach(nU),Fv.clear(),ve(hM)}function nU(e){vi.includes(e)||iU(e)}function iU(e){vi.splice(wve(vi,t=>t.priority>e.priority),0,e)}function hM(e){let t=fM;for(let o=0;o<vi.length;o++){let r=vi[o];sC=r.priority,r.idle||(vM(r),r.advance(e),r.idle||t.push(r))}return sC=0,fM=vi,fM.length=0,vi=t,vi.length>0}function wve(e,t){let o=e.findIndex(t);return o<0?e.length:o}var sU={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},as="[-+]?\\d*\\.?\\d+",aC=as+"%";function cC(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var Cve=new RegExp("rgb"+cC(as,as,as)),Bve=new RegExp("rgba"+cC(as,as,as,as)),Eve=new RegExp("hsl"+cC(as,aC,aC)),Tve=new RegExp("hsla"+cC(as,aC,aC,as)),Ive=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Pve=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Rve=/^#([0-9a-fA-F]{6})$/,Ove=/^#([0-9a-fA-F]{8})$/;function Ave(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=Rve.exec(e))?parseInt(t[1]+"ff",16)>>>0:iu&&iu[e]!==void 0?iu[e]:(t=Cve.exec(e))?(th(t[1])<<24|th(t[2])<<16|th(t[3])<<8|255)>>>0:(t=Bve.exec(e))?(th(t[1])<<24|th(t[2])<<16|th(t[3])<<8|QH(t[4]))>>>0:(t=Ive.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=Ove.exec(e))?parseInt(t[1],16)>>>0:(t=Pve.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=Eve.exec(e))?(XH(qH(t[1]),nC(t[2]),nC(t[3]))|255)>>>0:(t=Tve.exec(e))?(XH(qH(t[1]),nC(t[2]),nC(t[3]))|QH(t[4]))>>>0:null}function mM(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 XH(e,t,o){let r=o<.5?o*(1+t):o+t-o*t,n=2*o-r,i=mM(n,r,e+1/3),s=mM(n,r,e),a=mM(n,r,e-1/3);return Math.round(i*255)<<24|Math.round(s*255)<<16|Math.round(a*255)<<8}function th(e){let t=parseInt(e,10);return t<0?0:t>255?255:t}function qH(e){return(parseFloat(e)%360+360)%360/360}function QH(e){let t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function nC(e){let t=parseFloat(e);return t<0?0:t>100?1:t/100}function JH(e){let t=Ave(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 su=(e,t,o)=>{if(re.fun(e))return e;if(re.arr(e))return su({range:e,output:t,extrapolate:o});if(re.str(e.output[0]))return kM(e);let r=e,n=r.output,i=r.range||[0,1],s=r.extrapolateLeft||r.extrapolate||"extend",a=r.extrapolateRight||r.extrapolate||"extend",c=r.easing||(u=>u);return u=>{let d=Nve(u,i);return Lve(u,i[d],i[d+1],n[d],n[d+1],c,s,a,r.map)}};function Lve(e,t,o,r,n,i,s,a,c){let u=c?c(e):e;if(u<t){if(s==="identity")return u;s==="clamp"&&(u=t)}if(u>o){if(a==="identity")return u;a==="clamp"&&(u=o)}return r===n?r:t===o?e<=t?r:n:(t===-1/0?u=-u:o===1/0?u=u-t:u=(u-t)/(o-t),u=i(u),r===-1/0?u=-u:n===1/0?u=u+r:u=u*(n-r)+r,u)}function Nve(e,t){for(var o=1;o<t.length-1&&!(t[o]>=e);++o);return o-1}function gM(){return gM=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r])}return e},gM.apply(this,arguments)}var oh=Symbol.for("FluidValue.get"),Bf=Symbol.for("FluidValue.observers"),zr=e=>!!(e&&e[oh]),nr=e=>e&&e[oh]?e[oh]():e,yM=e=>e[Bf]||null;function Mve(e,t){e.eventObserved?e.eventObserved(t):e(t)}function Ef(e,t){let o=e[Bf];o&&o.forEach(r=>{Mve(r,t)})}var rh=class{constructor(t){if(this[oh]=void 0,this[Bf]=void 0,!t&&!(t=this.get))throw Error("Unknown getter");Dve(this,t)}},Dve=(e,t)=>aU(e,oh,t);function au(e,t){if(e[oh]){let o=e[Bf];o||aU(e,Bf,o=new Set),o.has(t)||(o.add(t),e.observerAdded&&e.observerAdded(o.size,t))}return t}function lu(e,t){let o=e[Bf];if(o&&o.has(t)){let r=o.size-1;r?o.delete(t):e[Bf]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var aU=(e,t,o)=>Object.defineProperty(e,t,{value:o,writable:!0,configurable:!0}),iC=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Vve=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,eU=new RegExp(`(${iC.source})(%|[a-z]+)`,"i"),Fve=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,uC=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,lU=e=>{let[t,o]=zve(e);if(!t||bM())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&&uC.test(o))return lU(o);if(o)return o}return e},zve=e=>{let t=uC.exec(e);if(!t)return[,];let[,o,r]=t;return[o,r]},pM,jve=(e,t,o,r,n)=>`rgba(${Math.round(t)}, ${Math.round(o)}, ${Math.round(r)}, ${n})`,dC=e=>{pM||(pM=iu?new RegExp(`(${Object.keys(iu).join("|")})(?!\\w)`,"g"):/^\b$/);let t=e.output.map(i=>nr(i).replace(uC,lU).replace(Vve,JH).replace(pM,JH)),o=t.map(i=>i.match(iC).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=>su(gM({},e,{output:i})));return i=>{var s;let a=!eU.test(t[0])&&((s=t.find(u=>eU.test(u)))==null?void 0:s.replace(iC,"")),c=0;return t[0].replace(iC,()=>`${n[c++](i)}${a||""}`).replace(Fve,jve)}},cU="react-spring: ",uU=e=>{let t=e,o=!1;if(typeof t!="function")throw new TypeError(`${cU}once requires a function parameter`);return(...r)=>{o||(t(...r),o=!0)}},Gve=uU(console.warn);function dU(){Gve(`${cU}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var fze=uU(console.warn);function ah(e){return re.str(e)&&(e[0]=="#"||/\d/.test(e)||!bM()&&uC.test(e)||e in(iu||{}))}var zv=bM()?yi.useEffect:yi.useLayoutEffect,Hve=()=>{let e=(0,yi.useRef)(!1);return zv(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function SM(){let e=(0,yi.useState)()[1],t=Hve();return()=>{t.current&&e(Math.random())}}function fU(e,t){let[o]=(0,yi.useState)(()=>({inputs:t,result:e()})),r=(0,yi.useRef)(),n=r.current,i=n;return i?t&&i.inputs&&Uve(t,i.inputs)||(i={inputs:t,result:e()}):i=o,(0,yi.useEffect)(()=>{r.current=i,n==o&&(o.inputs=o.result=void 0)},[i]),i.result}function Uve(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 _M=e=>(0,yi.useEffect)(e,Wve),Wve=[];var Xv=l(Fr()),qv=l(Fr());var gU=l(Fr()),Cl=l(Fr()),jv=Symbol.for("Animated:node"),Zve=e=>!!e&&e[jv]===e,ls=e=>e&&e[jv],hC=(e,t)=>tU(e,jv,t),Gv=e=>e&&e[jv]&&e[jv].getPayload(),fC=class{constructor(){this.payload=void 0,hC(this,this)}getPayload(){return this.payload||[]}},Tf=class e extends fC{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,re.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 re.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,re.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,t&&(this.lastVelocity=null),this.v0=null)}},If=class e extends Tf{constructor(t){super(0),this._string=null,this._toString=void 0,this._toString=su({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(re.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=su({output:[this.getValue(),t]})),this._value=0,super.reset()}},mC={dependencies:null},Pf=class extends fC{constructor(t){super(),this.source=t,this.setValue(t)}getValue(t){let o={};return Si(this.source,(r,n)=>{Zve(r)?o[n]=r.getValue(t):zr(r)?o[n]=nr(r):t||(o[n]=r)}),o}setValue(t){this.source=t,this.payload=this._makePayload(t)}reset(){this.payload&&gt(this.payload,t=>t.reset())}_makePayload(t){if(t){let o=new Set;return Si(t,this._addToPayload,o),Array.from(o)}}_addToPayload(t){mC.dependencies&&zr(t)&&mC.dependencies.add(t);let o=Gv(t);o&&gt(o,r=>this.add(r))}},xM=class e extends Pf{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($ve)),!0)}};function $ve(e){return(ah(e)?If:Tf).create(e)}function gC(e){let t=ls(e);return t?t.constructor:re.arr(e)?xM:ah(e)?If:Tf}function pC(){return pC=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},pC.apply(this,arguments)}var mU=(e,t)=>{let o=!re.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,Cl.forwardRef)((r,n)=>{let i=(0,Cl.useRef)(null),s=o&&(0,Cl.useCallback)(h=>{i.current=Kve(n,h)},[n]),[a,c]=Yve(r,t),u=SM(),d=()=>{let h=i.current;if(o&&!h)return;(h?t.applyAnimatedValues(h,a.getValue(!0)):!1)===!1&&u()},f=new wM(d,c),m=(0,Cl.useRef)();zv(()=>(m.current=f,gt(c,h=>au(h,f)),()=>{m.current&&(gt(m.current.deps,h=>lu(h,m.current)),ve.cancel(m.current.update))})),(0,Cl.useEffect)(d,[]),_M(()=>()=>{let h=m.current;gt(h.deps,g=>lu(g,h))});let p=t.getComponentProps(a.getValue());return gU.createElement(e,pC({},p,{ref:s}))})},wM=class{constructor(t,o){this.update=t,this.deps=o}eventObserved(t){t.type=="change"&&ve.write(this.update)}};function Yve(e,t){let o=new Set;return mC.dependencies=o,e.style&&(e=pC({},e,{style:t.createAnimatedStyle(e.style)})),e=new Pf(e),mC.dependencies=null,[e,o]}function Kve(e,t){return e&&(re.fun(e)?e(t):e.current=t),t}var pU=Symbol.for("AnimatedComponent"),bU=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:o=n=>new Pf(n),getComponentProps:r=n=>n}={})=>{let n={applyAnimatedValues:t,createAnimatedStyle:o,getComponentProps:r},i=s=>{let a=hU(s)||"Anonymous";return re.str(s)?s=i[s]||(i[s]=mU(s,n)):s=s[pU]||(s[pU]=mU(s,n)),s.displayName=`Animated(${a})`,s};return Si(e,(s,a)=>{re.arr(e)&&(a=hU(s)),i[a]=i(s)}),{animated:i}},hU=e=>re.str(e)?e:e&&re.str(e.displayName)?e.displayName:re.fun(e)&&e.name||null;function jr(){return jr=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},jr.apply(this,arguments)}function Rf(e,...t){return re.fun(e)?e(...t):e}var Zv=(e,t)=>e===!0||!!(t&&e&&(re.fun(e)?e(t):cn(e).includes(t))),IU=(e,t)=>re.obj(e)?t&&e[t]:e,PU=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,Xve=e=>e,RU=(e,t=Xve)=>{let o=qve;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);re.und(i)||(r[n]=i)}return r},qve=["config","onProps","onStart","onChange","onPause","onResume","onRest"],Qve={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 Jve(e){let t={},o=0;if(Si(e,(r,n)=>{Qve[n]||(t[n]=r,o++)}),o)return t}function OU(e){let t=Jve(e);if(t){let o={to:t};return Si(e,(r,n)=>n in t||(o[n]=r)),o}return jr({},e)}function $v(e){return e=nr(e),re.arr(e)?e.map($v):ah(e)?Mn.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function EM(e){return re.fun(e)||re.arr(e)&&re.obj(e[0])}var eye={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},vC=1.70158,bC=vC*1.525,kU=vC+1,vU=2*Math.PI/3,yU=2*Math.PI/4.5,kC=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,tye={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=>kU*e*e*e-vC*e*e,easeOutBack:e=>1+kU*Math.pow(e-1,3)+vC*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((bC+1)*2*e-bC)/2:(Math.pow(2*e-2,2)*((bC+1)*(e*2-2)+bC)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*vU),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*vU)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*yU))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*yU)/2+1,easeInBounce:e=>1-kC(1-e),easeOutBounce:kC,easeInOutBounce:e=>e<.5?(1-kC(1-2*e))/2:(1+kC(2*e-1))/2},TM=jr({},eye.default,{mass:1,damping:1,easing:tye.linear,clamp:!1}),IM=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,TM)}};function oye(e,t,o){o&&(o=jr({},o),SU(o,t),t=jr({},o,t)),SU(e,t),Object.assign(e,t);for(let s in TM)e[s]==null&&(e[s]=TM[s]);let{mass:r,frequency:n,damping:i}=e;return re.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 SU(e,t){if(!re.und(t.decay))e.duration=void 0;else{let o=!re.und(t.tension)||!re.und(t.friction);(o||!re.und(t.frequency)||!re.und(t.damping)||!re.und(t.mass))&&(e.duration=void 0,e.decay=void 0),o&&(e.frequency=void 0)}}var _U=[],PM=class{constructor(){this.changed=!1,this.values=_U,this.toValues=null,this.fromValues=_U,this.to=void 0,this.from=void 0,this.config=new IM,this.immediate=!1}};function AU(e,{key:t,props:o,defaultProps:r,state:n,actions:i}){return new Promise((s,a)=>{var c;let u,d,f=Zv((c=o.cancel)!=null?c:r?.cancel,t);if(f)h();else{re.und(o.pause)||(n.paused=Zv(o.pause,t));let g=r?.pause;g!==!0&&(g=n.paused||Zv(g,t)),u=Rf(o.delay||0,t),g?(n.resumeQueue.add(p),i.pause()):(i.resume(),p())}function m(){n.resumeQueue.add(p),n.timeouts.delete(d),d.cancel(),u=d.time-ve.now()}function p(){u>0&&!Mn.skipAnimation?(n.delayed=!0,d=ve.setTimeout(h,u),n.pauseQueue.add(m),n.timeouts.add(d)):h()}function h(){n.delayed&&(n.delayed=!1),n.pauseQueue.delete(m),n.timeouts.delete(d),e<=(n.cancelId||0)&&(f=!0);try{i.start(jr({},o,{callId:e,cancel:f}),s)}catch(g){a(g)}}})}var DM=(e,t)=>t.length==1?t[0]:t.some(o=>o.cancelled)?lh(e.get()):t.every(o=>o.noop)?LU(e.get()):cs(e.get(),t.every(o=>o.finished)),LU=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),cs=(e,t,o=!1)=>({value:e,finished:t,cancelled:o}),lh=e=>({value:e,cancelled:!0,finished:!1});function NU(e,t,o,r){let{callId:n,parentId:i,onRest:s}=t,{asyncTo:a,promise:c}=o;return!i&&e===a&&!t.reset?c:o.promise=(async()=>{o.asyncId=n,o.asyncTo=e;let u=RU(t,(b,k)=>k==="onRest"?void 0:b),d,f,m=new Promise((b,k)=>(d=b,f=k)),p=b=>{let k=n<=(o.cancelId||0)&&lh(r)||n!==o.asyncId&&cs(r,!1);if(k)throw b.result=k,f(b),b},h=(b,k)=>{let v=new yC,y=new SC;return(async()=>{if(Mn.skipAnimation)throw Yv(o),y.result=cs(r,!1),f(y),y;p(v);let _=re.obj(b)?jr({},b):jr({},k,{to:b});_.parentId=n,Si(u,(C,E)=>{re.und(_[E])&&(_[E]=C)});let w=await r.start(_);return p(v),o.paused&&await new Promise(C=>{o.resumeQueue.add(C)}),w})()},g;if(Mn.skipAnimation)return Yv(o),cs(r,!1);try{let b;re.arr(e)?b=(async k=>{for(let v of k)await h(v)})(e):b=Promise.resolve(e(h,r.stop.bind(r))),await Promise.all([b.then(d),m]),g=cs(r.get(),!0,!1)}catch(b){if(b instanceof yC)g=b.result;else if(b instanceof SC)g=b.result;else throw b}finally{n==o.asyncId&&(o.asyncId=i,o.asyncTo=i?a:void 0,o.promise=i?c:void 0)}return re.fun(s)&&ve.batchedUpdates(()=>{s(g,r,r.item)}),g})()}function Yv(e,t){nh(e.timeouts,o=>o.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var yC=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}},SC=class extends Error{constructor(){super("SkipAnimationSignal"),this.result=void 0}},RM=e=>e instanceof Kv,rye=1,Kv=class extends rh{constructor(...t){super(...t),this.id=rye++,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=ls(this);return t&&t.getValue()}to(...t){return Mn.to(this,t)}interpolate(...t){return dU(),Mn.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){Ef(this,{type:"change",parent:this,value:t,idle:o})}_onPriorityChange(t){this.idle||sh.sort(this),Ef(this,{type:"priority",parent:this,priority:t})}},Of=Symbol.for("SpringPhase"),MU=1,OM=2,AM=4,CM=e=>(e[Of]&MU)>0,cu=e=>(e[Of]&OM)>0,Hv=e=>(e[Of]&AM)>0,xU=(e,t)=>t?e[Of]|=OM|MU:e[Of]&=~OM,wU=(e,t)=>t?e[Of]|=AM:e[Of]&=~AM,LM=class extends Kv{constructor(t,o){if(super(),this.key=void 0,this.animation=new PM,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,!re.und(t)||!re.und(o)){let r=re.obj(t)?jr({},t):jr({},o,{from:t});re.und(r.default)&&(r.default=!0),this.start(r)}}get idle(){return!(cu(this)||this._state.asyncTo)||Hv(this)}get goal(){return nr(this.animation.to)}get velocity(){let t=ls(this);return t instanceof Tf?t.lastVelocity||0:t.getPayload().map(o=>o.lastVelocity||0)}get hasAnimated(){return CM(this)}get isAnimating(){return cu(this)}get isPaused(){return Hv(this)}get isDelayed(){return this._state.delayed}advance(t){let o=!0,r=!1,n=this.animation,{config:i,toValues:s}=n,a=Gv(n.to);!a&&zr(n.to)&&(s=cn(nr(n.to))),n.values.forEach((d,f)=>{if(d.done)return;let m=d.constructor==If?1:a?a[f].lastPosition:s[f],p=n.immediate,h=m;if(!p){if(h=d.lastPosition,i.tension<=0){d.done=!0;return}let g=d.elapsedTime+=t,b=n.fromValues[f],k=d.v0!=null?d.v0:d.v0=re.arr(i.velocity)?i.velocity[f]:i.velocity,v,y=i.precision||(b==m?.005:Math.min(1,Math.abs(m-b)*.001));if(re.und(i.duration))if(i.decay){let _=i.decay===!0?.998:i.decay,w=Math.exp(-(1-_)*g);h=b+k/(1-_)*(1-w),p=Math.abs(d.lastPosition-h)<=y,v=k*w}else{v=d.lastVelocity==null?k:d.lastVelocity;let _=i.restVelocity||y/10,w=i.clamp?0:i.bounce,C=!re.und(w),E=b==m?d.v0>0:b<m,R,O=!1,B=1,T=Math.ceil(t/B);for(let A=0;A<T&&(R=Math.abs(v)>_,!(!R&&(p=Math.abs(m-h)<=y,p)));++A){C&&(O=h==m||h>m==E,O&&(v=-v*w,h=m));let N=-i.tension*1e-6*(h-m),z=-i.friction*.001*v,U=(N+z)/i.mass;v=v+U*B,h=h+v*B}}else{let _=1;i.duration>0&&(this._memoizedDuration!==i.duration&&(this._memoizedDuration=i.duration,d.durationProgress>0&&(d.elapsedTime=i.duration*d.durationProgress,g=d.elapsedTime+=t)),_=(i.progress||0)+g/this._memoizedDuration,_=_>1?1:_<0?0:_,d.durationProgress=_),h=b+i.easing(_)*(m-b),v=(h-d.lastPosition)/t,p=_==1}d.lastVelocity=v,Number.isNaN(h)&&(console.warn("Got NaN while animating:",this),p=!0)}a&&!a[f].done&&(p=!1),p?d.done=!0:o=!1,d.setValue(h,i.round)&&(r=!0)});let c=ls(this),u=c.getValue();if(o){let d=nr(n.to);(u!==d||r)&&!i.decay?(c.setValue(d),this._onChange(d)):r&&i.decay&&this._onChange(u),this._stop()}else r&&this._onChange(u)}set(t){return ve.batchedUpdates(()=>{this._stop(),this._focus(t),this._set(t)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(cu(this)){let{to:t,config:o}=this.animation;ve.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 re.und(t)?(r=this.queue||[],this.queue=[]):r=[re.obj(t)?t:jr({},o,{to:t})],Promise.all(r.map(n=>this._update(n))).then(n=>DM(this,n))}stop(t){let{to:o}=this.animation;return this._focus(this.get()),Yv(this._state,t&&this._lastCallId),ve.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=re.obj(r)?r[o]:r,(r==null||EM(r))&&(r=void 0),n=re.obj(n)?n[o]:n,n==null&&(n=void 0);let i={to:r,from:n};return CM(this)||(t.reverse&&([r,n]=[n,r]),n=nr(n),re.und(n)?ls(this)||this._set(r):this._set(n)),i}_update(t,o){let r=jr({},t),{key:n,defaultProps:i}=this;r.default&&Object.assign(i,RU(r,(c,u)=>/^on/.test(u)?IU(c,n):c)),BU(this,r,"onProps"),Wv(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 AU(++this._lastCallId,{key:n,props:r,defaultProps:i,state:a,actions:{pause:()=>{Hv(this)||(wU(this,!0),ih(a.pauseQueue),Wv(this,"onPause",cs(this,Uv(this,this.animation.to)),this))},resume:()=>{Hv(this)&&(wU(this,!1),cu(this)&&this._resume(),ih(a.resumeQueue),Wv(this,"onResume",cs(this,Uv(this,this.animation.to)),this))},start:this._merge.bind(this,s)}}).then(c=>{if(r.loop&&c.finished&&!(o&&c.noop)){let u=DU(r);if(u)return this._update(u,!0)}return c})}_merge(t,o,r){if(o.cancel)return this.stop(!0),r(lh(this));let n=!re.und(t.to),i=!re.und(t.from);if(n||i)if(o.callId>this._lastToId)this._lastToId=o.callId;else return r(lh(this));let{key:s,defaultProps:a,animation:c}=this,{to:u,from:d}=c,{to:f=u,from:m=d}=t;i&&!n&&(!o.default||re.und(f))&&(f=m),o.reverse&&([f,m]=[m,f]);let p=!oa(m,d);p&&(c.from=m),m=nr(m);let h=!oa(f,u);h&&this._focus(f);let g=EM(o.to),{config:b}=c,{decay:k,velocity:v}=b;(n||i)&&(b.velocity=0),o.config&&!g&&oye(b,Rf(o.config,s),o.config!==a.config?Rf(a.config,s):void 0);let y=ls(this);if(!y||re.und(f))return r(cs(this,!0));let _=re.und(o.reset)?i&&!o.default:!re.und(m)&&Zv(o.reset,s),w=_?m:this.get(),C=$v(f),E=re.num(C)||re.arr(C)||ah(C),R=!g&&(!E||Zv(a.immediate||o.immediate,s));if(h){let A=gC(f);if(A!==y.constructor)if(R)y=this._set(C);else throw Error(`Cannot animate between ${y.constructor.name} and ${A.name}, as the "to" prop suggests`)}let O=y.constructor,B=zr(f),T=!1;if(!B){let A=_||!CM(this)&&p;(h||A)&&(T=oa($v(w),C),B=!T),(!oa(c.immediate,R)&&!R||!oa(b.decay,k)||!oa(b.velocity,v))&&(B=!0)}if(T&&cu(this)&&(c.changed&&!_?B=!0:B||this._stop(u)),!g&&((B||zr(u))&&(c.values=y.getPayload(),c.toValues=zr(f)?null:O==If?[1]:cn(C)),c.immediate!=R&&(c.immediate=R,!R&&!_&&this._set(u)),B)){let{onRest:A}=c;gt(nye,z=>BU(this,o,z));let N=cs(this,Uv(this,u));ih(this._pendingCalls,N),this._pendingCalls.add(r),c.changed&&ve.batchedUpdates(()=>{c.changed=!_,A?.(N,this),_?Rf(a.onRest,N):c.onStart==null||c.onStart(N,this)})}_&&this._set(w),g?r(NU(o.to,o,this._state,this)):B?this._start():cu(this)&&!h?this._pendingCalls.add(r):r(LU(w))}_focus(t){let o=this.animation;t!==o.to&&(yM(this)&&this._detach(),o.to=t,yM(this)&&this._attach())}_attach(){let t=0,{to:o}=this.animation;zr(o)&&(au(o,this),RM(o)&&(t=o.priority+1)),this.priority=t}_detach(){let{to:t}=this.animation;zr(t)&&lu(t,this)}_set(t,o=!0){let r=nr(t);if(!re.und(r)){let n=ls(this);if(!n||!oa(r,n.getValue())){let i=gC(r);!n||n.constructor!=i?hC(this,i.create(r)):n.setValue(r),n&&ve.batchedUpdates(()=>{this._onChange(r,o)})}}return ls(this)}_onStart(){let t=this.animation;t.changed||(t.changed=!0,Wv(this,"onStart",cs(this,Uv(this,t.to)),this))}_onChange(t,o){o||(this._onStart(),Rf(this.animation.onChange,t,this)),Rf(this.defaultProps.onChange,t,this),super._onChange(t,o)}_start(){let t=this.animation;ls(this).reset(nr(t.to)),t.immediate||(t.fromValues=t.values.map(o=>o.lastPosition)),cu(this)||(xU(this,!0),Hv(this)||this._resume())}_resume(){Mn.skipAnimation?this.finish():sh.start(this)}_stop(t,o){if(cu(this)){xU(this,!1);let r=this.animation;gt(r.values,i=>{i.done=!0}),r.toValues&&(r.onChange=r.onPause=r.onResume=void 0),Ef(this,{type:"idle",parent:this});let n=o?lh(this.get()):cs(this.get(),Uv(this,t??r.to));ih(this._pendingCalls,n),r.changed&&(r.changed=!1,Wv(this,"onRest",n,this))}}};function Uv(e,t){let o=$v(t),r=$v(e.get());return oa(r,o)}function DU(e,t=e.loop,o=e.to){let r=Rf(t);if(r){let n=r!==!0&&OU(r),i=(n||e).reverse,s=!n||n.reset;return NM(jr({},e,{loop:t,default:!1,pause:void 0,to:!i||EM(o)?o:void 0,from:s?e.from:void 0,reset:s},n))}}function NM(e){let{to:t,from:o}=e=OU(e),r=new Set;return re.obj(t)&&CU(t,r),re.obj(o)&&CU(o,r),e.keys=r.size?Array.from(r):null,e}function CU(e,t){Si(e,(o,r)=>o!=null&&t.add(r))}var nye=["onStart","onRest","onChange","onPause","onResume"];function BU(e,t,o){e.animation[o]=t[o]!==PU(t,o)?IU(t[o],e.key):void 0}function Wv(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 iye=["onStart","onChange","onRest"],sye=1,_C=class{constructor(t,o){this.id=sye++,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(jr({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];re.und(r)||this.springs[o].set(r)}}update(t){return t&&this.queue.push(NM(t)),this}start(t){let{queue:o}=this;return t?o=cn(t).map(NM):this.queue=[],this._flush?this._flush(this,o):(FU(this,o),aye(this,o))}stop(t,o){if(t!==!!t&&(o=t),o){let r=this.springs;gt(cn(o),n=>r[n].stop(!!t))}else Yv(this._state,this._lastAsyncId),this.each(r=>r.stop(!!t));return this}pause(t){if(re.und(t))this.start({pause:!0});else{let o=this.springs;gt(cn(t),r=>o[r].pause())}return this}resume(t){if(re.und(t))this.start({pause:!1});else{let o=this.springs;gt(cn(t),r=>o[r].resume())}return this}each(t){Si(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,nh(t,([c,u])=>{u.value=this.get(),c(u,this,this._item)}));let s=!n&&this._started,a=i||s&&r.size?this.get():null;i&&o.size&&nh(o,([c,u])=>{u.value=a,c(u,this,this._item)}),s&&(this._started=!1,nh(r,([c,u])=>{u.value=a,c(u,this,this._item)}))}eventObserved(t){if(t.type=="change")this._changed.add(t.parent),t.idle||this._active.add(t.parent);else if(t.type=="idle")this._active.delete(t.parent);else return;ve.onFrame(this._onFrame)}};function aye(e,t){return Promise.all(t.map(o=>VU(e,o))).then(o=>DM(e,o))}async function VU(e,t,o){let{keys:r,to:n,from:i,loop:s,onRest:a,onResolve:c}=t,u=re.obj(t.default)&&t.default;s&&(t.loop=!1),n===!1&&(t.to=null),i===!1&&(t.from=null);let d=re.arr(n)||re.fun(n)?n:void 0;d?(t.to=void 0,t.onRest=void 0,u&&(u.onRest=void 0)):gt(iye,g=>{let b=t[g];if(re.fun(b)){let k=e._events[g];t[g]=({finished:v,cancelled:y})=>{let _=k.get(b);_?(v||(_.finished=!1),y&&(_.cancelled=!0)):k.set(b,{value:null,finished:v||!1,cancelled:y||!1})},u&&(u[g]=t[g])}});let f=e._state;t.pause===!f.paused?(f.paused=t.pause,ih(t.pause?f.pauseQueue:f.resumeQueue)):f.paused&&(t.pause=!0);let m=(r||Object.keys(e.springs)).map(g=>e.springs[g].start(t)),p=t.cancel===!0||PU(t,"cancel")===!0;(d||p&&f.asyncId)&&m.push(AU(++e._lastAsyncId,{props:t,state:f,actions:{pause:lC,resume:lC,start(g,b){p?(Yv(f,e._lastAsyncId),b(lh(e))):(g.onRest=a,b(NU(d,g,f,e)))}}})),f.paused&&await new Promise(g=>{f.resumeQueue.add(g)});let h=DM(e,await Promise.all(m));if(s&&h.finished&&!(o&&h.noop)){let g=DU(t,s,n);if(g)return FU(e,[g]),VU(e,g,!0)}return c&&ve.batchedUpdates(()=>c(h,e,e.item)),h}function lye(e,t){let o=new LM;return o.key=e,t&&au(o,t),o}function cye(e,t,o){t.keys&&gt(t.keys,r=>{(e[r]||(e[r]=o(r)))._prepareNode(t)})}function FU(e,t){gt(t,o=>{cye(e.springs,o,r=>lye(r,e))})}function uye(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 dye=["children"],VM=e=>{let{children:t}=e,o=uye(e,dye),r=(0,qv.useContext)(xC),n=o.pause||!!r.pause,i=o.immediate||!!r.immediate;o=fU(()=>({pause:n,immediate:i}),[n,i]);let{Provider:s}=xC;return Xv.createElement(s,{value:o},t)},xC=fye(VM,{});VM.Provider=xC.Provider;VM.Consumer=xC.Consumer;function fye(e,t){return Object.assign(e,Xv.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var EU;(function(e){e.MOUNT="mount",e.ENTER="enter",e.UPDATE="update",e.LEAVE="leave"})(EU||(EU={}));var MM=class extends Kv{constructor(t,o){super(),this.key=void 0,this.idle=!0,this.calc=void 0,this._active=new Set,this.source=t,this.calc=su(...o);let r=this._get(),n=gC(r);hC(this,n.create(r))}advance(t){let o=this._get(),r=this.get();oa(o,r)||(ls(this).setValue(o),this._onChange(o,this.idle)),!this.idle&&TU(this._active)&&BM(this)}_get(){let t=re.arr(this.source)?this.source.map(nr):cn(nr(this.source));return this.calc(...t)}_start(){this.idle&&!TU(this._active)&&(this.idle=!1,gt(Gv(this),t=>{t.done=!1}),Mn.skipAnimation?(ve.batchedUpdates(()=>this.advance()),BM(this)):sh.start(this))}_attach(){let t=1;gt(cn(this.source),o=>{zr(o)&&au(o,this),RM(o)&&(o.idle||this._active.add(o),t=Math.max(t,o.priority+1))}),this.priority=t,this._start()}_detach(){gt(cn(this.source),t=>{zr(t)&&lu(t,this)}),this._active.clear(),BM(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=cn(this.source).reduce((o,r)=>Math.max(o,(RM(r)?r.priority:0)+1),0))}};function mye(e){return e.idle!==!1}function TU(e){return!e.size||Array.from(e).every(mye)}function BM(e){e.idle||(e.idle=!0,gt(Gv(e),t=>{t.done=!0}),Ef(e,{type:"idle",parent:e}))}Mn.assign({createStringInterpolator:dC,to:(e,t)=>new MM(e,t)});var _ze=sh.advance;var HU=l(jU());function GM(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 pye=["style","children","scrollTop","scrollLeft"],UU=/^--/;function hye(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!UU.test(e)&&!(Qv.hasOwnProperty(e)&&Qv[e])?t+"px":(""+t).trim()}var GU={};function gye(e,t){if(!e.nodeType||!e.setAttribute)return!1;let o=e.nodeName==="filter"||e.parentNode&&e.parentNode.nodeName==="filter",r=t,{style:n,children:i,scrollTop:s,scrollLeft:a}=r,c=GM(r,pye),u=Object.values(c),d=Object.keys(c).map(f=>o||e.hasAttribute(f)?f:GU[f]||(GU[f]=f.replace(/([A-Z])/g,m=>"-"+m.toLowerCase())));i!==void 0&&(e.textContent=i);for(let f in n)if(n.hasOwnProperty(f)){let m=hye(f,n[f]);UU.test(f)?e.style.setProperty(f,m):e.style[f]=m}d.forEach((f,m)=>{e.setAttribute(f,u[m])}),s!==void 0&&(e.scrollTop=s),a!==void 0&&(e.scrollLeft=a)}var Qv={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},bye=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),kye=["Webkit","Ms","Moz","O"];Qv=Object.keys(Qv).reduce((e,t)=>(kye.forEach(o=>e[bye(o,t)]=e[t]),e),Qv);var vye=["x","y","z"],yye=/^(matrix|translate|scale|rotate|skew)/,Sye=/^(translate)/,_ye=/^(rotate|skew)/,FM=(e,t)=>re.num(e)&&e!==0?e+t:e,wC=(e,t)=>re.arr(e)?e.every(o=>wC(o,t)):re.num(e)?e===t:parseFloat(e)===t,zM=class extends Pf{constructor(t){let{x:o,y:r,z:n}=t,i=GM(t,vye),s=[],a=[];(o||r||n)&&(s.push([o||0,r||0,n||0]),a.push(c=>[`translate3d(${c.map(u=>FM(u,"px")).join(",")})`,wC(c,0)])),Si(i,(c,u)=>{if(u==="transform")s.push([c||""]),a.push(d=>[d,d===""]);else if(yye.test(u)){if(delete i[u],re.und(c))return;let d=Sye.test(u)?"px":_ye.test(u)?"deg":"";s.push(cn(c)),a.push(u==="rotate3d"?([f,m,p,h])=>[`rotate3d(${f},${m},${p},${FM(h,d)})`,wC(h,0)]:f=>[`${u}(${f.map(m=>FM(m,d)).join(",")})`,wC(f,u.startsWith("scale")?1:0)])}}),s.length&&(i.transform=new jM(s,a)),super(i)}},jM=class extends rh{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 gt(this.inputs,(r,n)=>{let i=nr(r[0]),[s,a]=this.transforms[n](re.arr(i)?i:r.map(nr));t+=" "+s,o=o&&a}),o?"none":t}observerAdded(t){t==1&&gt(this.inputs,o=>gt(o,r=>zr(r)&&au(r,this)))}observerRemoved(t){t==0&&gt(this.inputs,o=>gt(o,r=>zr(r)&&lu(r,this)))}eventObserved(t){t.type=="change"&&(this._value=null),Ef(this,t)}},xye=["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"],wye=["scrollTop","scrollLeft"];Mn.assign({batchedUpdates:HU.unstable_batchedUpdates,createStringInterpolator:dC,colors:sU});var Cye=bU(xye,{applyAnimatedValues:gye,createAnimatedStyle:e=>new zM(e),getComponentProps:e=>GM(e,wye)}),WU=Cye.animated;var ch=l(I(),1),$U=l(je(),1),YU=l(M(),1);var Bye=200;function ZU(e){return{top:e.offsetTop,left:e.offsetLeft}}function Eye({triggerAnimationOnChange:e,clientId:t}){let o=(0,ch.useRef)(),{isTyping:r,getGlobalBlockCount:n,isBlockSelected:i,isFirstMultiSelectedBlock:s,isBlockMultiSelected:a,isAncestorMultiSelected:c,isDraggingBlocks:u}=(0,YU.useSelect)(S),{previous:d,prevRect:f}=(0,ch.useMemo)(()=>({previous:o.current&&ZU(o.current),prevRect:o.current&&o.current.getBoundingClientRect()}),[e]);return(0,ch.useLayoutEffect)(()=>{if(!d||!o.current)return;let m=(0,$U.getScrollContainer)(o.current),p=i(t),h=p||s(t),g=u();function b(){if(!g&&h&&f){let O=o.current.getBoundingClientRect().top-f.top;O&&(m.scrollTop+=O)}}if(window.matchMedia("(prefers-reduced-motion: reduce)").matches||r()||n()>Bye){b();return}let v=p||a(t)||c(t);if(v&&g)return;let y=v?"1":"",_=new _C({x:0,y:0,config:{mass:5,tension:2e3,friction:200},onChange({value:R}){if(!o.current)return;let{x:O,y:B}=R;O=Math.round(O),B=Math.round(B);let T=O===0&&B===0;o.current.style.transformOrigin="center center",o.current.style.transform=T?null:`translate3d(${O}px,${B}px,0)`,o.current.style.zIndex=y,b()}});o.current.style.transform=void 0;let w=ZU(o.current),C=Math.round(d.left-w.left),E=Math.round(d.top-w.top);return _.start({x:0,y:0,from:{x:C,y:E}}),()=>{_.stop(),_.set({x:0,y:0})}},[d,f,t,r,n,i,s,a,c,u]),o}var CC=Eye;var TC=l(I(),1),Bl=l(je(),1),KU=l(M(),1);var BC=".block-editor-block-list__block",Tye=".block-list-appender",Iye=".block-editor-button-block-appender";function EC(e,t){return e.closest(BC)===t.closest(BC)}function uu(e,t){return t.closest([BC,Tye,Iye].join(","))===e}function du(e){for(;e&&e.nodeType!==e.ELEMENT_NODE;)e=e.parentNode;if(!e)return;let o=e.closest(BC);if(o)return o.id.slice(6)}function HM(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 Pye(e){let t=e.ownerDocument.defaultView;if(!t||e.classList.contains("components-visually-hidden"))return!1;let o=e.getBoundingClientRect();if(o.width===0||o.height===0)return!1;if(e.checkVisibility)return e.checkVisibility?.({opacityProperty:!0,contentVisibilityAuto:!0,visibilityProperty:!0});let r=t.getComputedStyle(e);return!(r.display==="none"||r.visibility==="hidden"||r.opacity==="0")}function Rye(e){let t=window.getComputedStyle(e);return t.overflowX==="auto"||t.overflowX==="scroll"||t.overflowY==="auto"||t.overflowY==="scroll"}var Oye=["core/navigation"];function uh(e){let t=e.ownerDocument.defaultView;if(!t)return new window.DOMRectReadOnly;let o=e.getBoundingClientRect(),r=e.getAttribute("data-type");if(r&&Oye.includes(r)){let s=[e],a;for(;a=s.pop();)if(!Rye(a)){for(let c of a.children)if(Pye(c)){let u=c.getBoundingClientRect();o=HM(o,u),s.push(c)}}}let n=Math.max(o.left,0),i=Math.min(o.right,t.innerWidth);return o=new window.DOMRectReadOnly(n,o.top,i-n,o.height),o}function XU({clientId:e,initialPosition:t}){let o=(0,TC.useRef)(),{isBlockSelected:r,isMultiSelecting:n,isZoomOut:i}=F((0,KU.useSelect)(S));return(0,TC.useEffect)(()=>{if(!r(e)||n()||i()||t==null||!o.current)return;let{ownerDocument:s}=o.current;if(uu(o.current,s.activeElement))return;let a=Bl.focus.tabbable.find(o.current).filter(d=>(0,Bl.isTextField)(d)),c=t===-1,u=a[c?a.length-1:0]||o.current;if(!uu(o.current,u)){o.current.focus();return}if(!o.current.getAttribute("contenteditable")){let d=Bl.focus.tabbable.findNext(o.current);if(d&&uu(o.current,d)&&(0,Bl.isFormElement)(d)){d.focus();return}}(0,Bl.placeCaretAtHorizontalEdge)(u,c)},[t,e]),o}var qU=l(Y(),1);function IC(e){e.defaultPrevented||(e.preventDefault(),e.currentTarget.classList.toggle("is-hovered",e.type==="mouseover"))}function QU({isEnabled:e=!0}={}){return(0,qU.useRefEffect)(t=>{if(e)return t.addEventListener("mouseout",IC),t.addEventListener("mouseover",IC),()=>{t.removeEventListener("mouseout",IC),t.removeEventListener("mouseover",IC),t.classList.remove("is-hovered")}},[e])}var PC=l(M(),1),JU=l(Y(),1);function e9(e){let{isBlockSelected:t}=(0,PC.useSelect)(S),{selectBlock:o,selectionChange:r}=(0,PC.useDispatch)(S);return(0,JU.useRefEffect)(n=>{function i(s){if(!n.parentElement.closest('[contenteditable="true"]')){if(t(e)){s.target.isContentEditable||r(e);return}uu(n,s.target)&&o(e)}}return n.addEventListener("focusin",i),()=>{n.removeEventListener("focusin",i)}},[t,o])}var o9=l(je(),1),fu=l(at(),1),RC=l(M(),1),r9=l(Y(),1);function t9(e){return!e||e==="transparent"||e==="rgba(0, 0, 0, 0)"}function n9({clientId:e,isSelected:t}){let{getBlockRootClientId:o,isZoomOut:r,hasMultiSelection:n,isSectionBlock:i,editedContentOnlySection:s}=F((0,RC.useSelect)(S)),{insertAfterBlock:a,removeBlock:c,resetZoomLevel:u,startDraggingBlocks:d,stopDraggingBlocks:f,editContentOnlySection:m}=F((0,RC.useDispatch)(S));return(0,r9.useRefEffect)(p=>{if(!t)return;function h(k){let{keyCode:v,target:y}=k;v!==fu.ENTER&&v!==fu.BACKSPACE&&v!==fu.DELETE||y!==p||(0,o9.isTextField)(y)||(k.preventDefault(),v===fu.ENTER&&r()?u():v===fu.ENTER?a(e):c(e))}function g(k){if(p!==k.target||p.isContentEditable||p.ownerDocument.activeElement!==p||n()){k.preventDefault();return}let v=JSON.stringify({type:"block",srcClientIds:[e],srcRootClientId:o(e)});k.dataTransfer.effectAllowed="move",k.dataTransfer.clearData(),k.dataTransfer.setData("wp-blocks",v);let{ownerDocument:y}=p,{defaultView:_}=y;_.getSelection().removeAllRanges();let C=y.createElement("div");C.style.width="1px",C.style.height="1px",C.style.position="fixed",C.style.visibility="hidden",y.body.appendChild(C),k.dataTransfer.setDragImage(C,0,0);let E=p.getBoundingClientRect(),R=p.cloneNode(!0);R.style.visibility="hidden",R.style.display="none";let O=p.id;p.id=null;let B=1;{let J=p;for(;J=J.parentElement;){let{scale:ie}=_.getComputedStyle(J);if(ie&&ie!=="none"){B=parseFloat(ie);break}}}let T=1/B;p.after(R);let A={};for(let J of["transform","transformOrigin","transition","zIndex","position","top","left","pointerEvents","opacity","backgroundColor"])A[J]=p.style[J];let N=_.scrollY,z=_.scrollX,U=k.clientX,j=k.clientY;p.style.position="relative",p.style.top="0px",p.style.left="0px";let G=k.clientX-E.left,V=k.clientY-E.top,H=E.height>200?200/E.height:1;if(p.style.zIndex="1000",p.style.transformOrigin=`${G*T}px ${V*T}px`,p.style.transition="transform 0.2s ease-out",p.style.transform=`scale(${H})`,p.style.opacity="0.9",t9(_.getComputedStyle(p).backgroundColor)){let J="transparent",ie=p;for(;ie=ie.parentElement;){let{backgroundColor:de}=_.getComputedStyle(ie);if(!t9(de)){J=de;break}}p.style.backgroundColor=J}let K=!1;function oe(J){K||(K=!0,p.style.pointerEvents="none");let ie=_.scrollY,de=_.scrollX;p.style.top=`${(J.clientY-j+ie-N)*T}px`,p.style.left=`${(J.clientX-U+de-z)*T}px`}function ee(){y.removeEventListener("dragover",oe),y.removeEventListener("dragend",ee),y.removeEventListener("drop",ee),y.removeEventListener("scroll",oe);for(let[J,ie]of Object.entries(A))p.style[J]=ie;R.remove(),p.id=O,C.remove(),f(),document.body.classList.remove("is-dragging-components-draggable"),y.documentElement.classList.remove("is-dragging")}y.addEventListener("dragover",oe),y.addEventListener("dragend",ee),y.addEventListener("drop",ee),y.addEventListener("scroll",oe),d([e]),document.body.classList.add("is-dragging-components-draggable"),y.documentElement.classList.add("is-dragging")}p.addEventListener("keydown",h),p.addEventListener("dragstart",g);function b(k){i(e)&&!(s===e)&&(k.preventDefault(),m(e))}return window?.__experimentalContentOnlyPatternInsertion&&p.addEventListener("dblclick",b),()=>{p.removeEventListener("keydown",h),p.removeEventListener("dragstart",g),window?.__experimentalContentOnlyPatternInsertion&&p.removeEventListener("dblclick",b)}},[e,t,o,a,c,r,u,n,d,f,i,s,m])}var i9=l(Y(),1),s9=l(I(),1);function a9(){let e=(0,s9.useContext)(OC);return(0,i9.useRefEffect)(t=>{if(e)return e.observe(t),()=>{e.unobserve(t)}},[e])}var AC=l(Y(),1);function l9({isSelected:e}){let t=(0,AC.useReducedMotion)();return(0,AC.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 c9=l(Y(),1),u9=l(M(),1);function LC({clientId:e="",isEnabled:t=!0}={}){let{getEnabledClientIdsTree:o}=F((0,u9.useSelect)(S));return(0,c9.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 d9=l(Y(),1),Jv=new Map;function Aye(e,t){let o=Jv.get(e);o||(o=new Set,Jv.set(e,o),e.addEventListener("pointerdown",m9)),o.add(t)}function Lye(e,t){let o=Jv.get(e);o&&(o.delete(t),f9(t),o.size===0&&(Jv.delete(e),e.removeEventListener("pointerdown",m9)))}function f9(e){let t=e.getAttribute("data-draggable");t&&(e.removeAttribute("data-draggable"),t==="true"&&!e.getAttribute("draggable")&&e.setAttribute("draggable","true"))}function m9(e){let{target:t}=e,{ownerDocument:o,isContentEditable:r,tagName:n}=t,i=["INPUT","TEXTAREA"].includes(n),s=Jv.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)f9(a)}function p9(){return(0,d9.useRefEffect)(e=>(Aye(e.ownerDocument,e),()=>{Lye(e.ownerDocument,e)}),[])}var co=l(L(),1),Dn=l(I(),1),Gr=l(P(),1),dh=l(M(),1),k9=l(ra(),1),v9=l(On(),1);function Nye(e,t){if(!e)return!1;let o=e.attributes?.metadata?.blockVisibility;return o===!0||typeof o!="object"||!zc.some(([,{key:r}])=>r===t)?!1:o[t]===!1}function g9(e,t){if(!e?.length)return!1;let o=e.filter(r=>Nye(r,t)).length;return o===0?!1:o===e.length?!0:null}function b9(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}var Jt=l(x(),1),Mye=`/**
 * SCSS Variables.
 *
 * Please use variables from this sheet to ensure consistency across the UI.
 * Don't add to this sheet unless you're pretty sure the value will be reused in many places.
 * For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
 */
/**
 * Colors
 */
/**
 * Fonts & basic variables.
 */
/**
 * Typography
 */
/**
 * Grid System.
 * https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
 */
/**
 * Radius scale.
 */
/**
 * Elevation scale.
 */
/**
 * Dimensions.
 */
/**
 * Mobile specific styles
 */
/**
 * Editor styles.
 */
/**
 * Block & Editor UI.
 */
/**
 * Block paddings.
 */
/**
 * React Native specific.
 * These variables do not appear to be used anywhere else.
 */
.block-editor-block-visibility-modal {
  z-index: 1000001;
}
.block-editor-block-visibility-modal__options {
  border: 0;
  padding: 0;
  list-style: none;
  margin: 24px 0;
}
.block-editor-block-visibility-modal__options-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 16px 0;
  gap: 24px;
}
.block-editor-block-visibility-modal__options-item:last-child {
  margin: 0;
}
.block-editor-block-visibility-modal__options-item--everywhere {
  flex-direction: column;
  align-items: start;
}
.block-editor-block-visibility-modal__options-checkbox--everywhere {
  font-weight: 600;
}
.block-editor-block-visibility-modal__options-icon--checked {
  fill: #ddd;
}
.block-editor-block-visibility-modal__sub-options {
  width: 100%;
  padding-inline-start: 12px;
}
.block-editor-block-visibility-modal__description {
  font-size: 12px;
  color: #757575;
}

.block-editor-block-visibility-info {
  padding-top: 4px;
  padding-bottom: 4px;
  margin: 0 16px 16px;
  display: flex;
  align-items: center;
  justify-content: start;
}
/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VSb290IjoiL2hvbWUvcnVubmVyL3dvcmsvZ3V0ZW5iZXJnL2d1dGVuYmVyZy9wYWNrYWdlcy9ibG9jay1lZGl0b3Ivc3JjL2NvbXBvbmVudHMvYmxvY2stdmlzaWJpbGl0eSIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vbm9kZV9tb2R1bGVzL0B3b3JkcHJlc3MvYmFzZS1zdHlsZXMvX3ZhcmlhYmxlcy5zY3NzIiwiLi4vLi4vLi4vLi4vLi4vbm9kZV9tb2R1bGVzL0B3b3JkcHJlc3MvYmFzZS1zdHlsZXMvX2NvbG9ycy5zY3NzIiwic3R5bGUuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQ0FBO0FBQUE7QUFBQTtBRFVBO0FBQUE7QUFBQTtBQU9BO0FBQUE7QUFBQTtBQTZCQTtBQUFBO0FBQUE7QUFBQTtBQWlCQTtBQUFBO0FBQUE7QUFXQTtBQUFBO0FBQUE7QUFnQkE7QUFBQTtBQUFBO0FBeUJBO0FBQUE7QUFBQTtBQUtBO0FBQUE7QUFBQTtBQWVBO0FBQUE7QUFBQTtBQW1CQTtBQUFBO0FBQUE7QUFTQTtBQUFBO0FBQUE7QUFBQTtBRS9KQTtFQUNDOztBQUVBO0VBQ0M7RUFDQTtFQUNBO0VBQ0E7O0FBRUE7RUFDQztFQUNBO0VBQ0E7RUFDQTtFQUNBLEtGc0NZOztBRW5DYjtFQUNDOztBQUdEO0VBQ0M7RUFDQTs7QUFHRDtFQUNDOztBQUdEO0VBQ0MsTUR4QlE7O0FDNEJWO0VBQ0M7RUFDQSxzQkZhYTs7QUVWZDtFQUNDLFdGdEJnQjtFRXVCaEIsT0R0Q1M7OztBQzBDWDtFQUNDLGFGQ2M7RUVBZDtFQUNBO0VBQ0E7RUFDQTtFQUNBIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBTQ1NTIFZhcmlhYmxlcy5cbiAqXG4gKiBQbGVhc2UgdXNlIHZhcmlhYmxlcyBmcm9tIHRoaXMgc2hlZXQgdG8gZW5zdXJlIGNvbnNpc3RlbmN5IGFjcm9zcyB0aGUgVUkuXG4gKiBEb24ndCBhZGQgdG8gdGhpcyBzaGVldCB1bmxlc3MgeW91J3JlIHByZXR0eSBzdXJlIHRoZSB2YWx1ZSB3aWxsIGJlIHJldXNlZCBpbiBtYW55IHBsYWNlcy5cbiAqIEZvciBleGFtcGxlLCBkb24ndCBhZGQgcnVsZXMgdG8gdGhpcyBzaGVldCB0aGF0IGFmZmVjdCBibG9jayB2aXN1YWxzLiBJdCdzIHB1cmVseSBmb3IgVUkuXG4gKi9cblxuQHVzZSBcIi4vY29sb3JzXCI7XG5cbi8qKlxuICogRm9udHMgJiBiYXNpYyB2YXJpYWJsZXMuXG4gKi9cblxuJGRlZmF1bHQtZm9udDogLWFwcGxlLXN5c3RlbSwgQmxpbmtNYWNTeXN0ZW1Gb250LFwiU2Vnb2UgVUlcIiwgUm9ib3RvLCBPeHlnZW4tU2FucywgVWJ1bnR1LCBDYW50YXJlbGwsXCJIZWx2ZXRpY2EgTmV1ZVwiLCBzYW5zLXNlcmlmOyAvLyBUb2RvOiBkZXByZWNhdGUgaW4gZmF2b3Igb2YgJGZhbWlseSB2YXJpYWJsZXNcbiRkZWZhdWx0LWxpbmUtaGVpZ2h0OiAxLjQ7IC8vIFRvZG86IGRlcHJlY2F0ZSBpbiBmYXZvciBvZiAkbGluZS1oZWlnaHQgdG9rZW5zXG5cbi8qKlxuICogVHlwb2dyYXBoeVxuICovXG5cbi8vIFNpemVzXG4kZm9udC1zaXplLXgtc21hbGw6IDExcHg7XG4kZm9udC1zaXplLXNtYWxsOiAxMnB4O1xuJGZvbnQtc2l6ZS1tZWRpdW06IDEzcHg7XG4kZm9udC1zaXplLWxhcmdlOiAxNXB4O1xuJGZvbnQtc2l6ZS14LWxhcmdlOiAyMHB4O1xuJGZvbnQtc2l6ZS0yeC1sYXJnZTogMzJweDtcblxuLy8gTGluZSBoZWlnaHRzXG4kZm9udC1saW5lLWhlaWdodC14LXNtYWxsOiAxNnB4O1xuJGZvbnQtbGluZS1oZWlnaHQtc21hbGw6IDIwcHg7XG4kZm9udC1saW5lLWhlaWdodC1tZWRpdW06IDI0cHg7XG4kZm9udC1saW5lLWhlaWdodC1sYXJnZTogMjhweDtcbiRmb250LWxpbmUtaGVpZ2h0LXgtbGFyZ2U6IDMycHg7XG4kZm9udC1saW5lLWhlaWdodC0yeC1sYXJnZTogNDBweDtcblxuLy8gV2VpZ2h0c1xuJGZvbnQtd2VpZ2h0LXJlZ3VsYXI6IDQwMDtcbiRmb250LXdlaWdodC1tZWRpdW06IDQ5OTsgLy8gZW5zdXJlcyBmYWxsYmFjayB0byA0MDAgKGluc3RlYWQgb2YgNjAwKVxuXG4vLyBGYW1pbGllc1xuJGZvbnQtZmFtaWx5LWhlYWRpbmdzOiAtYXBwbGUtc3lzdGVtLCBcInN5c3RlbS11aVwiLCBcIlNlZ29lIFVJXCIsIFJvYm90bywgT3h5Z2VuLVNhbnMsIFVidW50dSwgQ2FudGFyZWxsLCBcIkhlbHZldGljYSBOZXVlXCIsIHNhbnMtc2VyaWY7XG4kZm9udC1mYW1pbHktYm9keTogLWFwcGxlLXN5c3RlbSwgXCJzeXN0ZW0tdWlcIiwgXCJTZWdvZSBVSVwiLCBSb2JvdG8sIE94eWdlbi1TYW5zLCBVYnVudHUsIENhbnRhcmVsbCwgXCJIZWx2ZXRpY2EgTmV1ZVwiLCBzYW5zLXNlcmlmO1xuJGZvbnQtZmFtaWx5LW1vbm86IE1lbmxvLCBDb25zb2xhcywgbW9uYWNvLCBtb25vc3BhY2U7XG5cbi8qKlxuICogR3JpZCBTeXN0ZW0uXG4gKiBodHRwczovL21ha2Uud29yZHByZXNzLm9yZy9kZXNpZ24vMjAxOS8xMC8zMS9wcm9wb3NhbC1hLWNvbnNpc3RlbnQtc3BhY2luZy1zeXN0ZW0tZm9yLXdvcmRwcmVzcy9cbiAqL1xuXG4kZ3JpZC11bml0OiA4cHg7XG4kZ3JpZC11bml0LTA1OiAwLjUgKiAkZ3JpZC11bml0O1x0Ly8gNHB4XG4kZ3JpZC11bml0LTEwOiAxICogJGdyaWQtdW5pdDtcdFx0Ly8gOHB4XG4kZ3JpZC11bml0LTE1OiAxLjUgKiAkZ3JpZC11bml0O1x0Ly8gMTJweFxuJGdyaWQtdW5pdC0yMDogMiAqICRncmlkLXVuaXQ7XHRcdC8vIDE2cHhcbiRncmlkLXVuaXQtMzA6IDMgKiAkZ3JpZC11bml0O1x0XHQvLyAyNHB4XG4kZ3JpZC11bml0LTQwOiA0ICogJGdyaWQtdW5pdDtcdFx0Ly8gMzJweFxuJGdyaWQtdW5pdC01MDogNSAqICRncmlkLXVuaXQ7XHRcdC8vIDQwcHhcbiRncmlkLXVuaXQtNjA6IDYgKiAkZ3JpZC11bml0O1x0XHQvLyA0OHB4XG4kZ3JpZC11bml0LTcwOiA3ICogJGdyaWQtdW5pdDtcdFx0Ly8gNTZweFxuJGdyaWQtdW5pdC04MDogOCAqICRncmlkLXVuaXQ7XHRcdC8vIDY0cHhcblxuLyoqXG4gKiBSYWRpdXMgc2NhbGUuXG4gKi9cblxuJHJhZGl1cy14LXNtYWxsOiAxcHg7ICAgLy8gQXBwbGllZCB0byBlbGVtZW50cyBsaWtlIGJ1dHRvbnMgbmVzdGVkIHdpdGhpbiBwcmltaXRpdmVzIGxpa2UgaW5wdXRzLlxuJHJhZGl1cy1zbWFsbDogMnB4OyAgICAgLy8gQXBwbGllZCB0byBtb3N0IHByaW1pdGl2ZXMuXG4kcmFkaXVzLW1lZGl1bTogNHB4OyAgICAvLyBBcHBsaWVkIHRvIGNvbnRhaW5lcnMgd2l0aCBzbWFsbGVyIHBhZGRpbmcuXG4kcmFkaXVzLWxhcmdlOiA4cHg7ICAgICAvLyBBcHBsaWVkIHRvIGNvbnRhaW5lcnMgd2l0aCBsYXJnZXIgcGFkZGluZy5cbiRyYWRpdXMtZnVsbDogOTk5OXB4OyAgIC8vIEZvciBwaWxscy5cbiRyYWRpdXMtcm91bmQ6IDUwJTsgICAgIC8vIEZvciBjaXJjbGVzIGFuZCBvdmFscy5cblxuLyoqXG4gKiBFbGV2YXRpb24gc2NhbGUuXG4gKi9cblxuLy8gRm9yIHNlY3Rpb25zIGFuZCBjb250YWluZXJzIHRoYXQgZ3JvdXAgcmVsYXRlZCBjb250ZW50IGFuZCBjb250cm9scywgd2hpY2ggbWF5IG92ZXJsYXAgb3RoZXIgY29udGVudC4gRXhhbXBsZTogUHJldmlldyBGcmFtZS5cbiRlbGV2YXRpb24teC1zbWFsbDogMCAxcHggMXB4IHJnYmEoY29sb3JzLiRibGFjaywgMC4wMyksIDAgMXB4IDJweCByZ2JhKGNvbG9ycy4kYmxhY2ssIDAuMDIpLCAwIDNweCAzcHggcmdiYShjb2xvcnMuJGJsYWNrLCAwLjAyKSwgMCA0cHggNHB4IHJnYmEoY29sb3JzLiRibGFjaywgMC4wMSk7XG5cbi8vIEZvciBjb21wb25lbnRzIHRoYXQgcHJvdmlkZSBjb250ZXh0dWFsIGZlZWRiYWNrIHdpdGhvdXQgYmVpbmcgaW50cnVzaXZlLiBHZW5lcmFsbHkgbm9uLWludGVycnVwdGl2ZS4gRXhhbXBsZTogVG9vbHRpcHMsIFNuYWNrYmFyLlxuJGVsZXZhdGlvbi1zbWFsbDogMCAxcHggMnB4IHJnYmEoY29sb3JzLiRibGFjaywgMC4wNSksIDAgMnB4IDNweCByZ2JhKGNvbG9ycy4kYmxhY2ssIDAuMDQpLCAwIDZweCA2cHggcmdiYShjb2xvcnMuJGJsYWNrLCAwLjAzKSwgMCA4cHggOHB4IHJnYmEoY29sb3JzLiRibGFjaywgMC4wMik7XG5cbi8vIEZvciBjb21wb25lbnRzIHRoYXQgb2ZmZXIgYWRkaXRpb25hbCBhY3Rpb25zLiBFeGFtcGxlOiBNZW51cywgQ29tbWFuZCBQYWxldHRlXG4kZWxldmF0aW9uLW1lZGl1bTogMCAycHggM3B4IHJnYmEoY29sb3JzLiRibGFjaywgMC4wNSksIDAgNHB4IDVweCByZ2JhKGNvbG9ycy4kYmxhY2ssIDAuMDQpLCAwIDEycHggMTJweCByZ2JhKGNvbG9ycy4kYmxhY2ssIDAuMDMpLCAwIDE2cHggMTZweCByZ2JhKGNvbG9ycy4kYmxhY2ssIDAuMDIpO1xuXG4vLyBGb3IgY29tcG9uZW50cyB0aGF0IGNvbmZpcm0gZGVjaXNpb25zIG9yIGhhbmRsZSBuZWNlc3NhcnkgaW50ZXJydXB0aW9ucy4gRXhhbXBsZTogTW9kYWxzLlxuJGVsZXZhdGlvbi1sYXJnZTogMCA1cHggMTVweCByZ2JhKGNvbG9ycy4kYmxhY2ssIDAuMDgpLCAwIDE1cHggMjdweCByZ2JhKGNvbG9ycy4kYmxhY2ssIDAuMDcpLCAwIDMwcHggMzZweCByZ2JhKGNvbG9ycy4kYmxhY2ssIDAuMDQpLCAwIDUwcHggNDNweCByZ2JhKGNvbG9ycy4kYmxhY2ssIDAuMDIpO1xuXG4vKipcbiAqIERpbWVuc2lvbnMuXG4gKi9cblxuJGljb24tc2l6ZTogMjRweDtcbiRidXR0b24tc2l6ZTogMzZweDtcbiRidXR0b24tc2l6ZS1uZXh0LWRlZmF1bHQtNDBweDogNDBweDsgLy8gdHJhbnNpdGlvbmFyeSB2YXJpYWJsZSBmb3IgbmV4dCBkZWZhdWx0IGJ1dHRvbiBzaXplXG4kYnV0dG9uLXNpemUtc21hbGw6IDI0cHg7XG4kYnV0dG9uLXNpemUtY29tcGFjdDogMzJweDtcbiRoZWFkZXItaGVpZ2h0OiA2NHB4O1xuJHBhbmVsLWhlYWRlci1oZWlnaHQ6ICRncmlkLXVuaXQtNjA7XG4kbmF2LXNpZGViYXItd2lkdGg6IDMwMHB4O1xuJGFkbWluLWJhci1oZWlnaHQ6IDMycHg7XG4kYWRtaW4tYmFyLWhlaWdodC1iaWc6IDQ2cHg7XG4kYWRtaW4tc2lkZWJhci13aWR0aDogMTYwcHg7XG4kYWRtaW4tc2lkZWJhci13aWR0aC1iaWc6IDE5MHB4O1xuJGFkbWluLXNpZGViYXItd2lkdGgtY29sbGFwc2VkOiAzNnB4O1xuJG1vZGFsLW1pbi13aWR0aDogMzUwcHg7XG4kbW9kYWwtd2lkdGgtc21hbGw6IDM4NHB4O1xuJG1vZGFsLXdpZHRoLW1lZGl1bTogNTEycHg7XG4kbW9kYWwtd2lkdGgtbGFyZ2U6IDg0MHB4O1xuJHNwaW5uZXItc2l6ZTogMTZweDtcbiRjYW52YXMtcGFkZGluZzogJGdyaWQtdW5pdC0yMDtcbiRwYWxldHRlLW1heC1oZWlnaHQ6IDM2OHB4O1xuXG4vKipcbiAqIE1vYmlsZSBzcGVjaWZpYyBzdHlsZXNcbiAqL1xuJG1vYmlsZS10ZXh0LW1pbi1mb250LXNpemU6IDE2cHg7IC8vIEFueSBmb250IHNpemUgYmVsb3cgMTZweCB3aWxsIGNhdXNlIE1vYmlsZSBTYWZhcmkgdG8gXCJ6b29tIGluXCIuXG5cbi8qKlxuICogRWRpdG9yIHN0eWxlcy5cbiAqL1xuXG4kc2lkZWJhci13aWR0aDogMjgwcHg7XG4kY29udGVudC13aWR0aDogODQwcHg7XG4kd2lkZS1jb250ZW50LXdpZHRoOiAxMTAwcHg7XG4kd2lkZ2V0LWFyZWEtd2lkdGg6IDcwMHB4O1xuJHNlY29uZGFyeS1zaWRlYmFyLXdpZHRoOiAzNTBweDtcbiRlZGl0b3ItZm9udC1zaXplOiAxNnB4O1xuJGRlZmF1bHQtYmxvY2stbWFyZ2luOiAyOHB4OyAvLyBUaGlzIHZhbHVlIHByb3ZpZGVzIGEgY29uc2lzdGVudCwgY29udGlndW91cyBzcGFjaW5nIGJldHdlZW4gYmxvY2tzLlxuJHRleHQtZWRpdG9yLWZvbnQtc2l6ZTogMTVweDtcbiRlZGl0b3ItbGluZS1oZWlnaHQ6IDEuODtcbiRlZGl0b3ItaHRtbC1mb250OiAkZm9udC1mYW1pbHktbW9ubztcblxuLyoqXG4gKiBCbG9jayAmIEVkaXRvciBVSS5cbiAqL1xuXG4kYmxvY2stdG9vbGJhci1oZWlnaHQ6ICRncmlkLXVuaXQtNjA7XG4kYm9yZGVyLXdpZHRoOiAxcHg7XG4kYm9yZGVyLXdpZHRoLWZvY3VzLWZhbGxiYWNrOiAycHg7IC8vIFRoaXMgZXhpc3RzIGFzIGEgZmFsbGJhY2ssIGFuZCBpcyBpZGVhbGx5IG92ZXJyaWRkZW4gYnkgdmFyKC0td3AtYWRtaW4tYm9yZGVyLXdpZHRoLWZvY3VzKSB1bmxlc3MgaW4gc29tZSBTQVNTIG1hdGggY2FzZXMuXG4kYm9yZGVyLXdpZHRoLXRhYjogMS41cHg7XG4kaGVscHRleHQtZm9udC1zaXplOiAxMnB4O1xuJHJhZGlvLWlucHV0LXNpemU6IDE2cHg7XG4kcmFkaW8taW5wdXQtc2l6ZS1zbTogMjRweDsgLy8gV2lkdGggJiBoZWlnaHQgZm9yIHNtYWxsIHZpZXdwb3J0cy5cblxuLy8gRGVwcmVjYXRlZCwgcGxlYXNlIGF2b2lkIHVzaW5nIHRoZXNlLlxuJGJsb2NrLXBhZGRpbmc6IDE0cHg7IC8vIFVzZWQgdG8gZGVmaW5lIHNwYWNlIGJldHdlZW4gYmxvY2sgZm9vdHByaW50IGFuZCBzdXJyb3VuZGluZyBib3JkZXJzLlxuJHJhZGl1cy1ibG9jay11aTogJHJhZGl1cy1zbWFsbDtcbiRzaGFkb3ctcG9wb3ZlcjogJGVsZXZhdGlvbi14LXNtYWxsO1xuJHNoYWRvdy1tb2RhbDogJGVsZXZhdGlvbi1sYXJnZTtcbiRkZWZhdWx0LWZvbnQtc2l6ZTogJGZvbnQtc2l6ZS1tZWRpdW07XG5cbi8qKlxuICogQmxvY2sgcGFkZGluZ3MuXG4gKi9cblxuLy8gUGFkZGluZyBmb3IgYmxvY2tzIHdpdGggYSBiYWNrZ3JvdW5kIGNvbG9yIChlLmcuIHBhcmFncmFwaCBvciBncm91cCkuXG4kYmxvY2stYmctcGFkZGluZy0tdjogMS4yNWVtO1xuJGJsb2NrLWJnLXBhZGRpbmctLWg6IDIuMzc1ZW07XG5cblxuLyoqXG4gKiBSZWFjdCBOYXRpdmUgc3BlY2lmaWMuXG4gKiBUaGVzZSB2YXJpYWJsZXMgZG8gbm90IGFwcGVhciB0byBiZSB1c2VkIGFueXdoZXJlIGVsc2UuXG4gKi9cblxuLy8gRGltZW5zaW9ucy5cbiRtb2JpbGUtaGVhZGVyLXRvb2xiYXItaGVpZ2h0OiA0NHB4O1xuJG1vYmlsZS1oZWFkZXItdG9vbGJhci1leHBhbmRlZC1oZWlnaHQ6IDUycHg7XG4kbW9iaWxlLWZsb2F0aW5nLXRvb2xiYXItaGVpZ2h0OiA0NHB4O1xuJG1vYmlsZS1mbG9hdGluZy10b29sYmFyLW1hcmdpbjogOHB4O1xuJG1vYmlsZS1jb2xvci1zd2F0Y2g6IDQ4cHg7XG5cbi8vIEJsb2NrIFVJLlxuJG1vYmlsZS1ibG9jay10b29sYmFyLWhlaWdodDogNDRweDtcbiRkaW1tZWQtb3BhY2l0eTogMTtcbiRibG9jay1lZGdlLXRvLWNvbnRlbnQ6IDE2cHg7XG4kc29saWQtYm9yZGVyLXNwYWNlOiAxMnB4O1xuJGRhc2hlZC1ib3JkZXItc3BhY2U6IDZweDtcbiRibG9jay1zZWxlY3RlZC1tYXJnaW46IDNweDtcbiRibG9jay1zZWxlY3RlZC1ib3JkZXItd2lkdGg6IDFweDtcbiRibG9jay1zZWxlY3RlZC1wYWRkaW5nOiAwO1xuJGJsb2NrLXNlbGVjdGVkLWNoaWxkLW1hcmdpbjogNXB4O1xuJGJsb2NrLXNlbGVjdGVkLXRvLWNvbnRlbnQ6ICRibG9jay1lZGdlLXRvLWNvbnRlbnQgLSAkYmxvY2stc2VsZWN0ZWQtbWFyZ2luIC0gJGJsb2NrLXNlbGVjdGVkLWJvcmRlci13aWR0aDtcbiIsIi8qKlxuICogQ29sb3JzXG4gKi9cblxuLy8gV29yZFByZXNzIGdyYXlzLlxuJGJsYWNrOiAjMDAwO1x0XHRcdC8vIFVzZSBvbmx5IHdoZW4geW91IHRydWx5IG5lZWQgcHVyZSBibGFjay4gRm9yIFVJLCB1c2UgJGdyYXktOTAwLlxuJGdyYXktOTAwOiAjMWUxZTFlO1xuJGdyYXktODAwOiAjMmYyZjJmO1xuJGdyYXktNzAwOiAjNzU3NTc1O1x0XHQvLyBNZWV0cyA0LjY6MSAoNC41OjEgaXMgbWluaW11bSkgdGV4dCBjb250cmFzdCBhZ2FpbnN0IHdoaXRlLlxuJGdyYXktNjAwOiAjOTQ5NDk0O1x0XHQvLyBNZWV0cyAzOjEgVUkgb3IgbGFyZ2UgdGV4dCBjb250cmFzdCBhZ2FpbnN0IHdoaXRlLlxuJGdyYXktNDAwOiAjY2NjO1xuJGdyYXktMzAwOiAjZGRkO1x0XHQvLyBVc2VkIGZvciBtb3N0IGJvcmRlcnMuXG4kZ3JheS0yMDA6ICNlMGUwZTA7XHRcdC8vIFVzZWQgc3BhcmluZ2x5IGZvciBsaWdodCBib3JkZXJzLlxuJGdyYXktMTAwOiAjZjBmMGYwO1x0XHQvLyBVc2VkIGZvciBsaWdodCBncmF5IGJhY2tncm91bmRzLlxuJHdoaXRlOiAjZmZmO1xuXG4vLyBPcGFjaXRpZXMgJiBhZGRpdGlvbmFsIGNvbG9ycy5cbiRkYXJrLWdyYXktcGxhY2Vob2xkZXI6IHJnYmEoJGdyYXktOTAwLCAwLjYyKTtcbiRtZWRpdW0tZ3JheS1wbGFjZWhvbGRlcjogcmdiYSgkZ3JheS05MDAsIDAuNTUpO1xuJGxpZ2h0LWdyYXktcGxhY2Vob2xkZXI6IHJnYmEoJHdoaXRlLCAwLjY1KTtcblxuLy8gQWxlcnQgY29sb3JzLlxuJGFsZXJ0LXllbGxvdzogI2YwYjg0OTtcbiRhbGVydC1yZWQ6ICNjYzE4MTg7XG4kYWxlcnQtZ3JlZW46ICM0YWI4NjY7XG5cbi8vIERlcHJlY2F0ZWQsIHBsZWFzZSBhdm9pZCB1c2luZyB0aGVzZS5cbiRkYXJrLXRoZW1lLWZvY3VzOiAkd2hpdGU7XHQvLyBGb2N1cyBjb2xvciB3aGVuIHRoZSB0aGVtZSBpcyBkYXJrLlxuIiwiQHVzZSBcIkB3b3JkcHJlc3MvYmFzZS1zdHlsZXMvdmFyaWFibGVzXCIgYXMgKjtcbkB1c2UgXCJAd29yZHByZXNzL2Jhc2Utc3R5bGVzL2NvbG9yc1wiIGFzICo7XG5AdXNlIFwiQHdvcmRwcmVzcy9iYXNlLXN0eWxlcy96LWluZGV4XCIgYXMgKjtcblxuLmJsb2NrLWVkaXRvci1ibG9jay12aXNpYmlsaXR5LW1vZGFsIHtcblx0ei1pbmRleDogei1pbmRleChcIi5ibG9jay1lZGl0b3ItYmxvY2stdmlzaWJpbGl0eS1tb2RhbFwiKTtcblxuXHQmX19vcHRpb25zIHtcblx0XHRib3JkZXI6IDA7XG5cdFx0cGFkZGluZzogMDtcblx0XHRsaXN0LXN0eWxlOiBub25lO1xuXHRcdG1hcmdpbjogJGdyaWQtdW5pdC0zMCAwO1xuXG5cdFx0Ji1pdGVtIHtcblx0XHRcdGRpc3BsYXk6IGZsZXg7XG5cdFx0XHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRcdFx0anVzdGlmeS1jb250ZW50OiBzcGFjZS1iZXR3ZWVuO1xuXHRcdFx0bWFyZ2luOiAwIDAgJGdyaWQtdW5pdC0yMCAwO1xuXHRcdFx0Z2FwOiAkZ3JpZC11bml0LTMwO1xuXHRcdH1cblxuXHRcdCYtaXRlbTpsYXN0LWNoaWxkIHtcblx0XHRcdG1hcmdpbjogMDtcblx0XHR9XG5cblx0XHQmLWl0ZW0tLWV2ZXJ5d2hlcmUge1xuXHRcdFx0ZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcblx0XHRcdGFsaWduLWl0ZW1zOiBzdGFydDtcblx0XHR9XG5cblx0XHQmLWNoZWNrYm94LS1ldmVyeXdoZXJlIHtcblx0XHRcdGZvbnQtd2VpZ2h0OiA2MDA7XG5cdFx0fVxuXG5cdFx0Ji1pY29uLS1jaGVja2VkIHtcblx0XHRcdGZpbGw6ICRncmF5LTMwMDtcblx0XHR9XG5cdH1cblxuXHQmX19zdWItb3B0aW9ucyB7XG5cdFx0d2lkdGg6IDEwMCU7XG5cdFx0cGFkZGluZy1pbmxpbmUtc3RhcnQ6ICRncmlkLXVuaXQtMTU7XG5cdH1cblxuXHQmX19kZXNjcmlwdGlvbiB7XG5cdFx0Zm9udC1zaXplOiAkZm9udC1zaXplLXNtYWxsO1xuXHRcdGNvbG9yOiAkZ3JheS03MDA7XG5cdH1cbn1cblxuLmJsb2NrLWVkaXRvci1ibG9jay12aXNpYmlsaXR5LWluZm8ge1xuXHRwYWRkaW5nLXRvcDogJGdyaWQtdW5pdC0wNTtcblx0cGFkZGluZy1ib3R0b206ICRncmlkLXVuaXQtMDU7XG5cdG1hcmdpbjogMCAkZ3JpZC11bml0LTIwICRncmlkLXVuaXQtMjA7XG5cdGRpc3BsYXk6IGZsZXg7XG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdGp1c3RpZnktY29udGVudDogc3RhcnQ7XG59XG4iXX0= */`;document.head.appendChild(document.createElement("style")).appendChild(document.createTextNode(Mye));var Dye={[br.mobile.key]:!1,[br.tablet.key]:!1,[br.desktop.key]:!1},Vye=[];function El({clientIds:e,onClose:t}){let{createSuccessNotice:o}=(0,dh.useDispatch)(v9.store),{updateBlockAttributes:r}=(0,dh.useDispatch)(S),n=(0,dh.useSelect)(k=>k(S).getBlocksByClientId(e)??Vye,[e]),i=(0,dh.useSelect)(k=>k(k9.store).getShortcutRepresentation("core/editor/toggle-list-view"),[]),s=(0,Dn.useMemo)(()=>{if(n?.length===0)return{hideEverywhere:!1,viewportChecked:{}};let k={};return zc.forEach(([,{key:v}])=>{k[v]=g9(n,v)}),{hideEverywhere:b9(n),viewportChecked:k}},[n]),[a,c]=(0,Dn.useState)(s?.viewportChecked??{}),[u,d]=(0,Dn.useState)(s?.hideEverywhere??!1),f=(0,Dn.useCallback)((k,v)=>{c({...a,[k]:v})},[a]),m=(0,Dn.useMemo)(()=>{if(!u)return(0,co.sprintf)((0,co.__)("Block visibility settings saved. You can access them via the List View (%s)."),i);let k=n?.length>1?(0,co.__)("Blocks hidden. You can access them via the List View (%s)."):(0,co.__)("Block hidden. You can access it via the List View (%s).");return(0,co.sprintf)(k,i)},[u,n?.length,i]),p=(0,Dn.useMemo)(()=>Object.values(a).some(k=>k===!0||k===null),[a]),h=(0,Dn.useMemo)(()=>u===null?!0:Object.values(a).some(k=>k===null),[u,a]),g=(0,Dn.useCallback)(k=>{k.preventDefault();let v=u?!1:zc.reduce((_,[,{key:w}])=>(a[w]&&(_[w]=!1),_),{}),y=Object.fromEntries(n.map(({clientId:_,attributes:w})=>[_,{metadata:Se({...w?.metadata,blockVisibility:v})}]));r(e,y,{uniqueByBlock:!0}),o(m,{id:u?"block-visibility-hidden":"block-visibility-viewports-saved",type:"snackbar"}),t()},[n,e,o,u,m,t,r,a]),b=n?.length>1;return(0,Jt.jsx)(Gr.Modal,{title:e?.length>1?(0,co.__)("Hide blocks"):(0,co.__)("Hide block"),onRequestClose:t,overlayClassName:"block-editor-block-visibility-modal",size:"small",children:(0,Jt.jsxs)("form",{onSubmit:g,children:[(0,Jt.jsxs)("fieldset",{children:[(0,Jt.jsx)("legend",{children:b?(0,co.__)("Select the viewport sizes for which you want to hide the blocks. Changes will apply to all selected blocks."):(0,co.__)("Select the viewport size for which you want to hide the block.")}),(0,Jt.jsx)("ul",{className:"block-editor-block-visibility-modal__options",children:(0,Jt.jsxs)("li",{className:"block-editor-block-visibility-modal__options-item block-editor-block-visibility-modal__options-item--everywhere",children:[(0,Jt.jsx)(Gr.CheckboxControl,{className:"block-editor-block-visibility-modal__options-checkbox--everywhere",label:(0,co.__)("Omit from published content"),checked:u===!0,indeterminate:u===null,onChange:k=>{d(k),c(Dye)}}),u!==!0&&(0,Jt.jsx)("ul",{className:"block-editor-block-visibility-modal__sub-options",children:zc.map(([,{label:k,icon:v,key:y}])=>(0,Jt.jsxs)("li",{className:"block-editor-block-visibility-modal__options-item",children:[(0,Jt.jsx)(Gr.CheckboxControl,{label:(0,co.sprintf)((0,co.__)("Hide on %s"),k),checked:a[y]??!1,indeterminate:a[y]===null,onChange:_=>f(y,_)}),(0,Jt.jsx)(Gr.Icon,{icon:v,className:D({"block-editor-block-visibility-modal__options-icon--checked":a[y]})})]},y))})]})}),b&&h&&(0,Jt.jsx)("p",{className:"block-editor-block-visibility-modal__description",children:(0,co.__)("Selected blocks have different visibility settings. The checkboxes show an indeterminate state when settings differ.")}),!b&&u===!0&&(0,Jt.jsx)("p",{className:"block-editor-block-visibility-modal__description",children:(0,co.sprintf)((0,co.__)("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)}),!b&&!u&&p&&(0,Jt.jsx)("p",{className:"block-editor-block-visibility-modal__description",children:(0,Dn.createInterpolateElement)((0,co.sprintf)((0,co.__)("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,Jt.jsx)("strong",{})})})]}),(0,Jt.jsxs)(Gr.Flex,{className:"block-editor-block-visibility-modal__actions",justify:"flex-end",expanded:!1,children:[(0,Jt.jsx)(Gr.FlexItem,{children:(0,Jt.jsx)(Gr.Button,{variant:"tertiary",onClick:t,__next40pxDefaultSize:!0,children:(0,co.__)("Cancel")})}),(0,Jt.jsx)(Gr.FlexItem,{children:(0,Jt.jsx)(Gr.Button,{variant:"primary",type:"submit",__next40pxDefaultSize:!0,children:(0,co.__)("Apply")})})]})]})})}var UM=l(Y(),1),WM=l(I(),1);function ey(e={}){let{blockVisibility:t=void 0,deviceType:o=br.desktop.key}=e,r=(0,UM.useViewportMatch)("mobile",">="),n=(0,UM.useViewportMatch)("medium",">="),i=(0,WM.useMemo)(()=>o===br.mobile.key?br.mobile.key:o===br.tablet.key?br.tablet.key:r?r&&!n?br.tablet.key:br.desktop.key:br.mobile.key,[o,r,n]);return{isBlockCurrentlyHidden:(0,WM.useMemo)(()=>!!(t===!1||window.__experimentalHideBlocksBasedOnScreenSize&&t?.[i]===!1),[t,i]),currentViewport:i}}var ZM=l(L(),1),NC=l(P(),1),MC=l(I(),1);var DC=l(M(),1),y9=l(Z(),1);var fh=l(x(),1);function S9({clientIds:e}){let{blocks:t,canToggleBlockVisibility:o}=(0,DC.useSelect)(a=>{let{getBlockName:c,getBlocksByClientId:u}=a(S),d=u(e);return{blocks:d,canToggleBlockVisibility:d.every(({clientId:f})=>(0,y9.hasBlockSupport)(c(f),"visibility",!0))}},[e]),r=t.some(a=>a.attributes.metadata?.blockVisibility===!1),n=(0,MC.useRef)(!1),{updateBlockAttributes:i}=(0,DC.useDispatch)(S);if((0,MC.useEffect)(()=>{r&&(n.current=!0)},[r]),!r&&!n.current)return null;let s=()=>{let a=Object.fromEntries(t?.map(({clientId:c,attributes:u})=>[c,{metadata:Se({...u?.metadata,blockVisibility:r?void 0:!1})}]));i(e,a,{uniqueByBlock:!0})};return(0,fh.jsx)(fh.Fragment,{children:(0,fh.jsx)(NC.ToolbarGroup,{children:(0,fh.jsx)(NC.ToolbarButton,{disabled:!o,icon:r?tr:Pn,label:r?(0,ZM.__)("Hidden"):(0,ZM.__)("Visible"),onClick:s})})})}var $M=l(L(),1),VC=l(P(),1),mh=l(I(),1);var _9=l(Z(),1),x9=l(M(),1);var mu=l(x(),1);function w9({clientIds:e}){let t=(0,mh.useRef)(!1),[o,r]=(0,mh.useState)(!1),{canToggleBlockVisibility:n,areBlocksHiddenAnywhere:i}=(0,x9.useSelect)(s=>{let{getBlocksByClientId:a,getBlockName:c,areBlocksHiddenAnywhere:u}=F(s(S));return{canToggleBlockVisibility:a(e).every(({clientId:f})=>(0,_9.hasBlockSupport)(c(f),"visibility",!0)),areBlocksHiddenAnywhere:u(e)}},[e]);return(0,mh.useEffect)(()=>{i&&(t.current=!0)},[i]),!i&&!t.current?null:(0,mu.jsxs)(mu.Fragment,{children:[(0,mu.jsx)(VC.ToolbarGroup,{className:"block-editor-block-visibility-toolbar",children:(0,mu.jsx)(VC.ToolbarButton,{disabled:!n,icon:i?tr:Pn,label:i?(0,$M.__)("Hidden"):(0,$M.__)("Visible"),onClick:()=>r(!0),"aria-expanded":o,"aria-haspopup":o?void 0:"dialog"})}),o&&(0,mu.jsx)(El,{clientIds:e,onClose:()=>r(!1)})]})}var pu=l(L(),1),C9=l(P(),1);var ph=l(M(),1),B9=l(On(),1),E9=l(ra(),1);var T9=l(x(),1);function I9({clientIds:e}){let{updateBlockAttributes:t}=(0,ph.useDispatch)(S),{createSuccessNotice:o}=(0,ph.useDispatch)(B9.store),r=(0,ph.useSelect)(a=>a(S).getBlocksByClientId(e),[e]),n=(0,ph.useSelect)(a=>a(E9.store).getShortcutRepresentation("core/editor/toggle-list-view"),[]),i=r.some(a=>a.attributes.metadata?.blockVisibility===!1);return(0,T9.jsx)(C9.MenuItem,{icon:i?Pn:tr,onClick:()=>{let a=!i,c=Object.fromEntries(r?.map(({clientId:u,attributes:d})=>[u,{metadata:Se({...d?.metadata,blockVisibility:a?!1:void 0})}]));t(e,c,{uniqueByBlock:!0}),a&&(r.length>1?o((0,pu.sprintf)((0,pu.__)("Blocks hidden. You can access them via the List View (%s)."),n),{id:"block-visibility-hidden",type:"snackbar"}):o((0,pu.sprintf)((0,pu.__)("Block hidden. You can access it via the List View (%s)."),n),{id:"block-visibility-hidden",type:"snackbar"}))},children:i?(0,pu.__)("Show"):(0,pu.__)("Hide")})}var YM=l(L(),1),P9=l(P(),1);var R9=l(I(),1),O9=l(M(),1);var Af=l(x(),1);function A9({clientIds:e}){let[t,o]=(0,R9.useState)(!1),r=(0,O9.useSelect)(n=>F(n(S)).areBlocksHiddenAnywhere(e),[e]);return(0,Af.jsxs)(Af.Fragment,{children:[(0,Af.jsx)(P9.MenuItem,{icon:r?tr:Pn,onClick:()=>o(!0),children:r?(0,YM.__)("Show"):(0,YM.__)("Hide")}),t&&(0,Af.jsx)(El,{clientIds:e,onClose:()=>o(!1)})]})}var L9=typeof window<"u"&&window.__experimentalHideBlocksBasedOnScreenSize,N9=L9?A9:I9,M9=L9?w9:S9;function ty(e={},{__unstableIsHtml:t}={}){let{clientId:o,className:r,wrapperProps:n={},isAligned:i,index:s,mode:a,name:c,blockApiVersion:u,blockTitle:d,isSelected:f,isSubtreeDisabled:m,hasOverlay:p,initialPosition:h,blockEditingMode:g,isHighlighted:b,isMultiSelected:k,isPartiallySelected:v,isReusable:y,isDragging:_,hasChildSelected:w,isEditingDisabled:C,hasEditableOutline:E,isEditingContentOnlySection:R,defaultClassName:O,isSectionBlock:B,isWithinSectionBlock:T,canMove:A,blockVisibility:N,deviceType:z}=(0,D9.useContext)(Ar),U=(0,FC.sprintf)((0,FC.__)("Block: %s"),d),j=a==="html"&&!t?"-visual":"",G=p9(),V=!T,H=(0,zC.useMergeRefs)([e.ref,XU({clientId:o,initialPosition:h}),JG(o),e9(o),n9({clientId:o,isSelected:f}),QU({isEnabled:V}),a9(),CC({triggerAnimationOnChange:s,clientId:o}),(0,zC.useDisabled)({isDisabled:!p}),LC({clientId:o,isEnabled:B}),l9({isSelected:f}),A?G:void 0]),K=Ne(),ee=!!K[bp]?{"--wp-admin-theme-color":"var(--wp-block-synced-color)","--wp-admin-theme-color--rgb":"var(--wp-block-synced-color--rgb)"}:{},{isBlockCurrentlyHidden:J}=ey({blockVisibility:N,deviceType:z});u<2&&o===K.clientId&&(0,F9.default)(`Block type "${c}" must support API version 2 or higher to work correctly with "useBlockProps" method.`);let ie=!1;return(n?.style?.marginTop?.charAt(0)==="-"||n?.style?.marginBottom?.charAt(0)==="-"||n?.style?.marginLeft?.charAt(0)==="-"||n?.style?.marginRight?.charAt(0)==="-")&&(ie=!0),{tabIndex:g==="disabled"?-1:0,draggable:A&&!w?!0:void 0,...n,...e,ref:H,id:`block-${o}${j}`,role:"document","aria-label":U,"data-block":o,"data-type":c,"data-title":d,inert:m?"true":void 0,className:D("block-editor-block-list__block",{"wp-block":!i,"has-block-overlay":p,"is-selected":f,"is-highlighted":b,"is-multi-selected":k,"is-partially-selected":v,"is-reusable":y,"is-dragging":_,"has-child-selected":w,"is-editing-disabled":C,"has-editable-outline":E,"has-negative-margin":ie,"is-editing-content-only-section":R,"is-block-hidden":J},r,e.className,n.className,O),style:{...n.style,...e.style,...ee}}}ty.save=V9.__unstableGetBlockProps;var uo=l(x(),1);function Fye(e,t){let o={...e,...t};return e?.hasOwnProperty("className")&&t?.hasOwnProperty("className")&&(o.className=D(e.className,t.className)),e?.hasOwnProperty("style")&&t?.hasOwnProperty("style")&&(o.style={...e.style,...t.style}),o}function jC({children:e,isHtml:t,...o}){return(0,uo.jsx)("div",{...ty(o,{__unstableIsHtml:t}),children:e})}function KM({block:{__unstableBlockSource:e},mode:t,isLocked:o,canRemove:r,clientId:n,isSelected:i,isSelectionEnabled:s,className:a,__unstableLayoutClassNames:c,name:u,isValid:d,attributes:f,wrapperProps:m,setAttributes:p,onReplace:h,onRemove:g,onInsertBlocksAfter:b,onMerge:k,toggleSelection:v}){let{mayDisplayControls:y,mayDisplayParentControls:_,isSelectionWithinCurrentSection:w,themeSupportsLayout:C,...E}=(0,hu.useContext)(Ar),R=yf()||{},O=(0,uo.jsx)(hw,{name:u,isSelected:i,attributes:f,setAttributes:p,insertBlocksAfter:o?void 0:b,onReplace:r?h:void 0,onRemove:r?g:void 0,mergeBlocks:r?k:void 0,clientId:n,isSelectionEnabled:s,toggleSelection:v,__unstableLayoutClassNames:c,__unstableParentLayout:Object.keys(R).length?R:void 0,mayDisplayControls:y,mayDisplayParentControls:_,mayDisplayPatternEditingControls:w,blockEditingMode:E.blockEditingMode,isPreviewMode:E.isPreviewMode}),B=(0,Ue.getBlockType)(u);B?.getEditWrapperProps&&(m=Fye(m,B.getEditWrapperProps(f)));let T=m&&!!m["data-align"]&&!C,A=a?.includes("is-position-sticky");T&&(O=(0,uo.jsx)("div",{className:D("wp-block",A&&a),"data-align":m["data-align"],children:O}));let N;if(d)t==="html"?N=(0,uo.jsxs)(uo.Fragment,{children:[(0,uo.jsx)("div",{style:{display:"none"},children:O}),(0,uo.jsx)(jC,{isHtml:!0,children:(0,uo.jsx)(HH,{clientId:n})})]}):B?.apiVersion>1?N=O:N=(0,uo.jsx)(jC,{children:O});else{let G=e?(0,Ue.serializeRawBlock)(e):(0,Ue.getSaveContent)(B,f);N=(0,uo.jsxs)(jC,{className:"has-warning",children:[(0,uo.jsx)(bH,{clientId:n}),(0,uo.jsx)(hu.RawHTML,{children:(0,G9.safeHTML)(G)})]})}let{"data-align":z,...U}=m??{},j={...U,className:D(U.className,z&&C&&`align${z}`,!(z&&A)&&a)};return(0,uo.jsx)(Ar.Provider,{value:{wrapperProps:j,isAligned:T,isSelectionWithinCurrentSection:w,...E},children:(0,uo.jsx)(_H,{fallback:(0,uo.jsx)(jC,{className:"has-warning",children:(0,uo.jsx)(yH,{})}),children:N})})}var zye=(0,GC.withDispatch)((e,t,o)=>{let{updateBlockAttributes:r,insertBlocks:n,mergeBlocks:i,replaceBlocks:s,toggleSelection:a,__unstableMarkLastChangeAsPersistent:c,moveBlocksToPosition:u,removeBlock:d,selectBlock:f}=e(S);return{setAttributes(m){let{getMultiSelectedBlockClientIds:p}=o.select(S),h=p(),{clientId:g,attributes:b}=t,k=h.length?h:[g],v=typeof m=="function"?m(b):m;r(k,v)},onInsertBlocks(m,p){let{rootClientId:h}=t;n(m,p,h)},onInsertBlocksAfter(m){let{clientId:p,rootClientId:h}=t,{getBlockIndex:g}=o.select(S),b=g(p);n(m,b+1,h)},onMerge(m){let{clientId:p,rootClientId:h}=t,{getPreviousBlockClientId:g,getNextBlockClientId:b,getBlock:k,getBlockAttributes:v,getBlockName:y,getBlockOrder:_,getBlockIndex:w,getBlockRootClientId:C,canInsertBlockType:E}=o.select(S);function R(){let B=k(p),T=(0,Ue.getDefaultBlockName)(),A=(0,Ue.getBlockType)(T);if(y(p)!==T){let N=(0,Ue.switchToBlockType)(B,T);N&&N.length&&s(p,N)}else if((0,Ue.isUnmodifiedDefaultBlock)(B)){let N=b(p);N&&o.batch(()=>{d(p),f(N)})}else if(A.merge){let N=A.merge({},B.attributes);s([p],[(0,Ue.createBlock)(T,N)])}}function O(B,T=!0){let A=y(B),z=(0,Ue.getBlockType)(A).category==="text",U=C(B),j=_(B),[G]=j;j.length===1&&(0,Ue.isUnmodifiedBlock)(k(G))?d(B):z?o.batch(()=>{if(E(y(G),U))u([G],B,U,w(B));else{let V=(0,Ue.switchToBlockType)(k(G),(0,Ue.getDefaultBlockName)());V&&V.length&&V.every(H=>E(H.name,U))?(n(V,w(B),U,T),d(G,!1)):R()}!_(B).length&&(0,Ue.isUnmodifiedBlock)(k(B))&&d(B,!1)}):R()}if(m){if(h){let T=b(h);if(T)if(y(h)===y(T)){let A=v(h),N=v(T);if(Object.keys(A).every(z=>A[z]===N[z])){o.batch(()=>{u(_(T),T,h),d(T,!1)});return}}else{i(h,T);return}}let B=b(p);if(!B)return;_(B).length?O(B,!1):i(p,B)}else{let B=g(p);if(B)i(B,p);else if(h){let T=g(h);if(T&&y(h)===y(T)){let A=v(h),N=v(T);if(Object.keys(A).every(z=>A[z]===N[z])){o.batch(()=>{u(_(h),h,T),d(h,!1)});return}}O(h)}else R()}},onReplace(m,p,h){m.length&&!(0,Ue.isUnmodifiedDefaultBlock)(m[m.length-1])&&c();let g=m?.length===1&&Array.isArray(m[0])?m[0]:m;s([t.clientId],g,p,h)},onRemove(){d(t.clientId)},toggleSelection(m){a(m)}}});KM=(0,j9.compose)(zye,(0,z9.withFilters)("editor.BlockListBlock"))(KM);function jye(e){let{clientId:t,rootClientId:o}=e,r=(0,GC.useSelect)(se=>{let{isBlockSelected:ce,getBlockMode:_e,isSelectionEnabled:ge,getTemplateLock:Ae,isSectionBlock:Xe,getParentSectionBlock:dt,getBlockWithoutAttributes:St,getBlockAttributes:yo,canRemoveBlock:Ge,canMoveBlock:So,getSettings:so,getEditedContentOnlySection:Fe,getBlockEditingMode:Xt,getBlockName:ft,isFirstMultiSelectedBlock:qt,getMultiSelectedBlockClientIds:ai,hasSelectedInnerBlock:hr,getBlocksByName:He,getBlockIndex:ao,isBlockMultiSelected:Tn,isBlockSubtreeDisabled:me,isBlockHighlighted:it,__unstableIsFullySelected:Vo,__unstableSelectionHasUnmergeableBlock:li,isBlockBeingDragged:es,isDragging:Us,__unstableHasActiveBlockOverlayActive:Or,getSelectedBlocksInitialCaretPosition:ze}=F(se(S)),Le=St(t);if(!Le)return;let{hasBlockSupport:Tt,getActiveBlockVariation:le}=se(Ue.store),Pe=yo(t),{name:_o,isValid:on}=Le,Ws=(0,Ue.getBlockType)(_o),fp=so(),{supportsLayout:Kd,isPreviewMode:Xd,__experimentalBlockBindingsSupportedAttributes:Ck}=fp,qd=Ck?.[_o],Ec=Pe?.metadata?.blockVisibility,mp=fp?.[_p]?.toLowerCase()||"desktop",F_=Ws?.apiVersion>1,ue={isPreviewMode:Xd,blockWithoutAttributes:Le,name:_o,attributes:Pe,isValid:on,themeSupportsLayout:Kd,index:ao(t),isReusable:(0,Ue.isReusableBlock)(Ws),className:F_?Pe.className:void 0,defaultClassName:F_?(0,Ue.getBlockDefaultClassName)(_o):void 0,blockTitle:Ws?.title,bindableAttributes:qd,blockVisibility:Ec,deviceType:mp};if(Xd)return ue;let Ft=ce(t),xe=Ge(t),_t=So(t),gr=le(_o,Pe),Jo=Tn(t),Zs=!0,Qd=hr(t,Zs),pp=Xt(t),NR=Xe(t)?t:dt(t),MR=(0,Ue.hasBlockSupport)(_o,"multiple",!0)?[]:He(_o),sme=MR.length&&MR[0]!==t;return{...ue,mode:_e(t),isSelectionEnabled:ge(),isLocked:!!Ae(o),isSectionBlock:Xe(t),isWithinSectionBlock:!!NR,isSelectionWithinCurrentSection:ce(NR)||hr(NR,Zs),blockType:Ws,canRemove:xe,canMove:_t,isSelected:Ft,isEditingContentOnlySection:Fe()===t,blockEditingMode:pp,mayDisplayControls:Ft||qt(t)&&ai().every(ame=>ft(ame)===_o),mayDisplayParentControls:Tt(ft(t),"__experimentalExposeControlsToChildren",!1)&&hr(t),blockApiVersion:Ws?.apiVersion||1,blockTitle:gr?.title||Ws?.title,isSubtreeDisabled:pp==="disabled"&&me(t),hasOverlay:Or(t)&&!Us(),initialPosition:Ft?ze():void 0,isHighlighted:it(t),isMultiSelected:Jo,isPartiallySelected:Jo&&!Vo()&&!li(),isDragging:es(t),hasChildSelected:Qd,isEditingDisabled:pp==="disabled",hasEditableOutline:pp!=="disabled"&&Xt(o)==="disabled",originalBlockClientId:sme?MR[0]:!1,blockVisibility:Ec,deviceType:mp}},[t,o]),{isPreviewMode:n,mode:i="visual",isSelectionEnabled:s=!1,isLocked:a=!1,canRemove:c=!1,canMove:u=!1,blockWithoutAttributes:d,name:f,attributes:m,isValid:p,isSelected:h=!1,themeSupportsLayout:g,isEditingContentOnlySection:b,blockEditingMode:k,mayDisplayControls:v,mayDisplayParentControls:y,index:_,blockApiVersion:w,blockType:C,blockTitle:E,isSubtreeDisabled:R,hasOverlay:O,initialPosition:B,isHighlighted:T,isMultiSelected:A,isPartiallySelected:N,isReusable:z,isDragging:U,hasChildSelected:j,isSectionBlock:G,isWithinSectionBlock:V,isSelectionWithinCurrentSection:H,isEditingDisabled:K,hasEditableOutline:oe,className:ee,defaultClassName:J,originalBlockClientId:ie,bindableAttributes:de,blockVisibility:q,deviceType:ne}=r,{isBlockCurrentlyHidden:X}=ey({blockVisibility:q,deviceType:ne}),W=(0,hu.useMemo)(()=>({...d,attributes:m}),[d,m]);if(!r)return null;let Q={isPreviewMode:n,clientId:t,className:ee,index:_,mode:i,name:f,blockApiVersion:w,blockType:C,blockTitle:E,isSelected:h,isSubtreeDisabled:R,hasOverlay:O,initialPosition:B,blockEditingMode:k,isHighlighted:T,isMultiSelected:A,isPartiallySelected:N,isReusable:z,isDragging:U,hasChildSelected:j,isSectionBlock:G,isWithinSectionBlock:V,isSelectionWithinCurrentSection:H,isEditingDisabled:K,hasEditableOutline:oe,isEditingContentOnlySection:b,defaultClassName:J,mayDisplayControls:v,mayDisplayParentControls:y,originalBlockClientId:ie,themeSupportsLayout:g,canMove:u,isBlockCurrentlyHidden:X,bindableAttributes:de,blockVisibility:q,deviceType:ne};return X&&!h&&!A&&!j?null:(0,uo.jsx)(Ar.Provider,{value:Q,children:(0,uo.jsx)(KM,{...e,mode:i,isSelectionEnabled:s,isLocked:a,canRemove:c,canMove:u,block:W,name:f,attributes:m,isValid:p,isSelected:h})})}var H9=(0,hu.memo)(jye);var h5=l(M(),1),z$=l(Z(),1);var m5=l(L(),1),N$=l(jN(),1),_B=l(M(),1),xB=l(at(),1);var A$=l(jo(),1),Vl=l(L(),1),vB=l(P(),1),L$=l(I(),1),yB=l(M(),1),SB=l(Y(),1),Ny=l(Z(),1);var Ot=l(I(),1),Xh=l(P(),1),Ru=l(L(),1),Oy=l(Y(),1),I$=l(M(),1);var hh=l(L(),1),gh=l(I(),1),W9=l(P(),1),oy=l(x(),1),U9=[(0,gh.createInterpolateElement)((0,hh.__)("While writing, you can press <kbd>/</kbd> to quickly insert new blocks."),{kbd:(0,oy.jsx)("kbd",{})}),(0,gh.createInterpolateElement)((0,hh.__)("Indent a list by pressing <kbd>space</kbd> at the beginning of a line."),{kbd:(0,oy.jsx)("kbd",{})}),(0,gh.createInterpolateElement)((0,hh.__)("Outdent a list by pressing <kbd>backspace</kbd> at the beginning of a line."),{kbd:(0,oy.jsx)("kbd",{})}),(0,hh.__)("Drag files into the editor to automatically insert media blocks."),(0,hh.__)("Change a block's type by pressing the block icon on the toolbar.")];function Gye(){let[e]=(0,gh.useState)(Math.floor(Math.random()*U9.length));return(0,oy.jsx)(W9.Tip,{children:U9[e]})}var Z9=Gye;var Mh=l(Z(),1),mZ=l(I(),1),pZ=l(L(),1);var un=l(P(),1),HC=l(M(),1),$9=l(Re(),1),gu=l(L(),1);var UC=l(Z(),1);var kr=l(x(),1),{Badge:Hye}=F(un.privateApis);function Uye({children:e,onClick:t}){return t?(0,kr.jsx)(un.Button,{__next40pxDefaultSize:!0,className:"block-editor-block-card__parent-select-button",onClick:t,children:e}):e}function Wye({title:e,icon:t,description:o,blockType:r,className:n,name:i,allowParentNavigation:s,parentClientId:a,isChild:c,children:u,clientId:d}){r&&((0,$9.default)("`blockType` property in `BlockCard component`",{since:"5.7",alternative:"`title, icon and description` properties"}),{title:e,icon:t,description:o}=r);let{parentBlockClientId:f,parentBlockName:m}=(0,HC.useSelect)(g=>{if(a||c||!s)return{};let{getBlockParents:b,getBlockName:k}=g(S),y=b(d,!0).find(_=>{let w=k(_);return w==="core/navigation"||(0,UC.hasBlockSupport)(w,"listView")});return{parentBlockClientId:y,parentBlockName:y?k(y):null}},[d,s,c,a]),{selectBlock:p}=(0,HC.useDispatch)(S),h=a?"div":"h2";return(0,kr.jsx)("div",{className:D("block-editor-block-card",{"is-parent":a,"is-child":c},n),children:(0,kr.jsxs)(un.__experimentalVStack,{children:[(0,kr.jsxs)(un.__experimentalHStack,{justify:"flex-start",spacing:0,children:[f&&(0,kr.jsx)(un.Button,{onClick:()=>p(f),label:m?(0,gu.sprintf)((0,gu.__)('Go to "%s" block'),(0,UC.getBlockType)(m)?.title):(0,gu.__)("Go to parent block"),style:{minWidth:24,padding:0},icon:(0,gu.isRTL)()?er:Lr,size:"small"}),c&&(0,kr.jsx)("span",{className:"block-editor-block-card__child-indicator-icon",children:(0,kr.jsx)(un.Icon,{icon:(0,gu.isRTL)()?Nk:Mk})}),(0,kr.jsxs)(Uye,{onClick:a?()=>{p(a)}:void 0,children:[(0,kr.jsx)(Ie,{icon:t,showColors:!0}),(0,kr.jsxs)(un.__experimentalVStack,{spacing:1,children:[(0,kr.jsxs)(h,{className:"block-editor-block-card__title",children:[(0,kr.jsx)("span",{className:"block-editor-block-card__name",children:i?.length?i:e}),!a&&!c&&!!i?.length&&(0,kr.jsx)(Hye,{children:e})]}),u]})]})]}),!a&&!c&&o&&(0,kr.jsx)(un.__experimentalText,{className:"block-editor-block-card__description",children:o})]})})}var ry=Wye;var F1=l(Y(),1),ZD=l(M(),1),zf=l(I(),1),WD=l(Re(),1);var _W=l(M(),1),i1=l(I(),1),xW=l(P(),1);var QC=l(M(),1);var De=(e=>(e.Unknown="REDUX_UNKNOWN",e.Add="ADD_ITEM",e.Prepare="PREPARE_ITEM",e.Cancel="CANCEL_ITEM",e.Remove="REMOVE_ITEM",e.RetryItem="RETRY_ITEM",e.PauseItem="PAUSE_ITEM",e.ResumeItem="RESUME_ITEM",e.PauseQueue="PAUSE_QUEUE",e.ResumeQueue="RESUME_QUEUE",e.OperationStart="OPERATION_START",e.OperationFinish="OPERATION_FINISH",e.AddOperations="ADD_OPERATIONS",e.CacheBlobUrl="CACHE_BLOB_URL",e.RevokeBlobUrls="REVOKE_BLOB_URLS",e.UpdateProgress="UPDATE_PROGRESS",e.UpdateSettings="UPDATE_SETTINGS",e))(De||{}),na=(e=>(e.Queued="QUEUED",e.Processing="PROCESSING",e.Paused="PAUSED",e.Uploaded="UPLOADED",e.Error="ERROR",e))(na||{}),Vn=(e=>(e.Prepare="PREPARE",e.Upload="UPLOAD",e))(Vn||{});var WC="core/upload-media",Y9=5;var Zye=()=>{},$ye={queue:[],queueStatus:"active",blobUrls:{},settings:{mediaUpload:Zye,maxConcurrentUploads:Y9}};function Yye(e=$ye,t={type:De.Unknown}){switch(t.type){case De.PauseQueue:return{...e,queueStatus:"paused"};case De.ResumeQueue:return{...e,queueStatus:"active"};case De.PauseItem:return{...e,queue:e.queue.map(o=>o.id===t.id?{...o,status:na.Paused}:o)};case De.ResumeItem:return{...e,queue:e.queue.map(o=>o.id===t.id?{...o,status:na.Processing}:o)};case De.Add:return{...e,queue:[...e.queue,t.item]};case De.Cancel:return{...e,queue:e.queue.map(o=>o.id===t.id?{...o,error:t.error}:o)};case De.RetryItem:return{...e,queue:e.queue.map(o=>o.id===t.id?{...o,status:na.Processing,error:void 0,retryCount:(o.retryCount??0)+1}:o)};case De.Remove:return{...e,queue:e.queue.filter(o=>o.id!==t.id)};case De.OperationStart:return{...e,queue:e.queue.map(o=>o.id===t.id?{...o,currentOperation:t.operation}:o)};case De.AddOperations:return{...e,queue:e.queue.map(o=>o.id!==t.id?o:{...o,operations:[...o.operations||[],...t.operations]})};case De.OperationFinish:return{...e,queue:e.queue.map(o=>{if(o.id!==t.id)return o;let r=o.operations?o.operations.slice(1):[],n=o.attachment||t.item.attachment?{...o.attachment,...t.item.attachment}:void 0;return{...o,currentOperation:void 0,operations:r,...t.item,attachment:n,additionalData:{...o.additionalData,...t.item.additionalData}}})};case De.CacheBlobUrl:{let o=e.blobUrls[t.id]||[];return{...e,blobUrls:{...e.blobUrls,[t.id]:[...o,t.blobUrl]}}}case De.RevokeBlobUrls:{let o={...e.blobUrls};return delete o[t.id],{...e,blobUrls:o}}case De.UpdateProgress:return{...e,queue:e.queue.map(o=>o.id===t.id?{...o,progress:t.progress}:o)};case De.UpdateSettings:return{...e,settings:{...e.settings,...t.settings}}}return e}var XM=Yye;var ZC={};$s(ZC,{getItems:()=>Kye,getSettings:()=>Jye,isUploading:()=>Xye,isUploadingById:()=>Qye,isUploadingByUrl:()=>qye});function Kye(e){return e.queue}function Xye(e){return e.queue.length>=1}function qye(e,t){return e.queue.some(o=>o.attachment?.url===t||o.sourceUrl===t)}function Qye(e,t){return e.queue.some(o=>o.attachment?.id===t||o.sourceAttachmentId===t)}function Jye(e){return e.settings}var qM={};$s(qM,{getActiveUploadCount:()=>aSe,getAllItems:()=>eSe,getBlobUrls:()=>sSe,getFailedItems:()=>cSe,getItem:()=>tSe,getItemProgress:()=>uSe,getPausedUploadForPost:()=>nSe,getPendingUploads:()=>lSe,isBatchUploaded:()=>oSe,isPaused:()=>iSe,isUploadingToPost:()=>rSe});function eSe(e){return e.queue}function tSe(e,t){return e.queue.find(o=>o.id===t)}function oSe(e,t){return e.queue.filter(r=>t===r.batchId).length===0}function rSe(e,t){return e.queue.some(o=>o.currentOperation===Vn.Upload&&o.additionalData.post===t)}function nSe(e,t){return e.queue.find(o=>o.status===na.Paused&&o.additionalData.post===t)}function iSe(e){return e.queueStatus==="paused"}function sSe(e,t){return e.blobUrls[t]||[]}function aSe(e){return e.queue.filter(t=>t.currentOperation===Vn.Upload).length}function lSe(e){return e.queue.filter(t=>(Array.isArray(t.operations?.[0])?t.operations[0][0]:t.operations?.[0])===Vn.Upload&&t.currentOperation!==Vn.Upload)}function cSe(e){return e.queue.filter(t=>t.error!==void 0)}function uSe(e,t){return e.queue.find(r=>r.id===t)?.progress}var XC={};$s(XC,{addItems:()=>pSe,cancelItem:()=>hSe,retryItem:()=>gSe});var $C,dSe=new Uint8Array(16);function QM(){if(!$C&&($C=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!$C))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return $C(dSe)}var ir=[];for(let e=0;e<256;++e)ir.push((e+256).toString(16).slice(1));function K9(e,t=0){return ir[e[t+0]]+ir[e[t+1]]+ir[e[t+2]]+ir[e[t+3]]+"-"+ir[e[t+4]]+ir[e[t+5]]+"-"+ir[e[t+6]]+ir[e[t+7]]+"-"+ir[e[t+8]]+ir[e[t+9]]+"-"+ir[e[t+10]]+ir[e[t+11]]+ir[e[t+12]]+ir[e[t+13]]+ir[e[t+14]]+ir[e[t+15]]}var fSe=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),JM={randomUUID:fSe};function mSe(e,t,o){if(JM.randomUUID&&!t&&!e)return JM.randomUUID();e=e||{};let r=e.random||(e.rng||QM)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){o=o||0;for(let n=0;n<16;++n)t[o+n]=r[n];return t}return K9(r)}var ny=mSe;var YC=l(L(),1);var Lf=class extends Error{code;file;constructor({code:e,message:t,file:o,cause:r}){super(t,{cause:r}),Object.setPrototypeOf(this,new.target.prototype),this.code=e,this.file=o}};function X9(e,t){if(!t)return;let o=t.some(r=>r.includes("/")?r===e.type:e.type.startsWith(`${r}/`));if(e.type&&!o)throw new Lf({code:"MIME_TYPE_NOT_SUPPORTED",message:(0,YC.sprintf)((0,YC.__)("%s: Sorry, this file type is not supported here."),e.name),file:e})}var KC=l(L(),1);function q9(e){return e?Object.entries(e).flatMap(([t,o])=>{let[r]=o.split("/"),n=t.split("|");return[o,...n.map(i=>`${r}/${i}`)]}):null}function Q9(e,t){let o=q9(t);if(!o)return;let r=o.includes(e.type);if(e.type&&!r)throw new Lf({code:"MIME_TYPE_NOT_ALLOWED_FOR_USER",message:(0,KC.sprintf)((0,KC.__)("%s: Sorry, you are not allowed to upload this file type."),e.name),file:e})}var bh=l(L(),1);function J9(e,t){if(e.size<=0)throw new Lf({code:"EMPTY_FILE",message:(0,bh.sprintf)((0,bh.__)("%s: This file is empty."),e.name),file:e});if(t&&e.size>t)throw new Lf({code:"SIZE_ABOVE_LIMIT",message:(0,bh.sprintf)((0,bh.__)("%s: This file exceeds the maximum upload size for this site."),e.name),file:e})}function pSe({files:e,onChange:t,onSuccess:o,onError:r,onBatchSuccess:n,additionalData:i,allowedTypes:s}){return async({select:a,dispatch:c})=>{let u=ny();for(let d of e){try{X9(d,s),Q9(d,a.getSettings().allowedMimeTypes)}catch(f){r?.(f);continue}try{J9(d,a.getSettings().maxUploadFileSize)}catch(f){r?.(f);continue}c.addItem({file:d,batchId:u,onChange:t,onSuccess:o,onBatchSuccess:n,onError:r,additionalData:i})}}}function hSe(e,t,o=!1){return async({select:r,dispatch:n})=>{let i=r.getItem(e);if(i){if(i.abortController?.abort(),!o){let{onError:s}=i;s?.(t??new Error("Upload cancelled")),!s&&t&&console.error("Upload cancelled",t)}n({type:De.Cancel,id:e,error:t}),n.removeItem(e),n.revokeBlobUrls(e),i.batchId&&r.isBatchUploaded(i.batchId)&&i.onBatchSuccess?.()}}}function gSe(e){return async({select:t,dispatch:o})=>{let r=t.getItem(e);r&&r.error&&(o({type:De.RetryItem,id:e}),o.processItem(e))}}var eD={};$s(eD,{addItem:()=>ySe,finishOperation:()=>ESe,pauseItem:()=>wSe,pauseQueue:()=>_Se,prepareItem:()=>TSe,processItem:()=>SSe,removeItem:()=>BSe,resumeItem:()=>CSe,resumeQueue:()=>xSe,revokeBlobUrls:()=>PSe,updateItemProgress:()=>RSe,updateSettings:()=>OSe,uploadItem:()=>ISe});var kh=l(qC(),1);var bSe=l(rn(),1),kSe=l(L(),1);function tW(e){if(e instanceof File)return e;let t=e.type.split("/")[1],o=e.type==="application/pdf"?"document":e.type.split("/")[0];return new File([e],`${o}.${t}`,{type:e.type})}function vSe(e,t){return new File([e],t,{type:e.type,lastModified:e.lastModified})}function oW(e){return vSe(e,e.name)}var rW=class extends File{constructor(e="stub-file"){super([],e)}};function ySe({file:e,batchId:t,onChange:o,onSuccess:r,onBatchSuccess:n,onError:i,additionalData:s={},sourceUrl:a,sourceAttachmentId:c,abortController:u,operations:d}){return async({dispatch:f})=>{let m=ny(),p=tW(e),h;p instanceof rW||(h=(0,kh.createBlobURL)(p),f({type:De.CacheBlobUrl,id:m,blobUrl:h})),f({type:De.Add,item:{id:m,batchId:t,status:na.Processing,sourceFile:oW(p),file:p,attachment:{url:h},additionalData:{convert_format:!1,...s},onChange:o,onSuccess:r,onBatchSuccess:n,onError:i,sourceUrl:a,sourceAttachmentId:c,abortController:u||new AbortController,operations:Array.isArray(d)?d:[Vn.Prepare]}}),f.processItem(m)}}function SSe(e){return async({select:t,dispatch:o})=>{if(t.isPaused())return;let r=t.getItem(e),{attachment:n,onChange:i,onSuccess:s,onBatchSuccess:a,batchId:c}=r,u=Array.isArray(r.operations?.[0])?r.operations[0][0]:r.operations?.[0];if(u===Vn.Upload){let d=t.getSettings();if(t.getActiveUploadCount()>=d.maxConcurrentUploads)return}if(n&&i?.([n]),!u){n&&s?.([n]),o.revokeBlobUrls(e),c&&t.isBatchUploaded(c)&&a?.();return}if(u)switch(o({type:De.OperationStart,id:e,operation:u}),u){case Vn.Prepare:o.prepareItem(r.id);break;case Vn.Upload:o.uploadItem(e);break}}}function _Se(){return{type:De.PauseQueue}}function xSe(){return async({select:e,dispatch:t})=>{t({type:De.ResumeQueue});for(let o of e.getAllItems())t.processItem(o.id)}}function wSe(e){return async({dispatch:t})=>{t({type:De.PauseItem,id:e})}}function CSe(e){return async({select:t,dispatch:o})=>{let r=t.getItem(e);!r||r.status!==na.Paused||(o({type:De.ResumeItem,id:e}),o.processItem(e))}}function BSe(e){return async({select:t,dispatch:o})=>{t.getItem(e)&&o({type:De.Remove,id:e})}}function ESe(e,t){return async({select:o,dispatch:r})=>{let i=o.getItem(e)?.currentOperation;if(r({type:De.OperationFinish,id:e,item:t}),r.processItem(e),i===Vn.Upload){let s=o.getPendingUploads();for(let a of s)r.processItem(a.id)}}}function TSe(e){return async({dispatch:t})=>{let o=[Vn.Upload];t({type:De.AddOperations,id:e,operations:o}),t.finishOperation(e,{})}}function ISe(e){return async({select:t,dispatch:o})=>{let r=t.getItem(e);t.getSettings().mediaUpload({filesList:[r.file],additionalData:r.additionalData,signal:r.abortController?.signal,onFileChange:([n])=>{(0,kh.isBlobURL)(n.url)||o.finishOperation(e,{attachment:n})},onSuccess:([n])=>{o.finishOperation(e,{attachment:n})},onError:n=>{o.cancelItem(e,n)}})}}function PSe(e){return async({select:t,dispatch:o})=>{let r=t.getBlobUrls(e);for(let n of r)(0,kh.revokeBlobURL)(n);o({type:De.RevokeBlobUrls,id:e})}}function RSe(e,t){return async({dispatch:o})=>{o({type:De.UpdateProgress,id:e,progress:t})}}function OSe(e){return{type:De.UpdateSettings,settings:e}}var nW=l(Z_(),1),{lock:rGe,unlock:iy}=(0,nW.__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/upload-media");var iW={reducer:XM,selectors:ZC,actions:XC},bu=(0,QC.createReduxStore)(WC,{reducer:XM,selectors:ZC,actions:XC});(0,QC.register)(bu);iy(bu).registerPrivateActions(eD);iy(bu).registerPrivateSelectors(qM);var cW=l(I(),1),uW=l(M(),1);var sW=l(I(),1),vh=l(M(),1),aW=l(Y(),1);var JC=l(x(),1);function ASe(e,t,o){if(!o)return t;let r=e.get(t);return r||(r=(0,vh.createRegistry)({},t),r.registerStore(WC,iW),e.set(t,r)),r}var LSe=(0,aW.createHigherOrderComponent)(e=>({useSubRegistry:t=!0,...o})=>{let r=(0,vh.useRegistry)(),[n]=(0,sW.useState)(()=>new WeakMap),i=ASe(n,r,t);return i===r?(0,JC.jsx)(e,{registry:r,...o}):(0,JC.jsx)(vh.RegistryProvider,{value:i,children:(0,JC.jsx)(e,{registry:i,...o})})},"withRegistryProvider"),lW=LSe;var e1=l(x(),1),NSe=lW(e=>{let{children:t,settings:o}=e,{updateSettings:r}=iy((0,uW.useDispatch)(bu));return(0,cW.useEffect)(()=>{r(o)},[o,r]),(0,e1.jsx)(e1.Fragment,{children:t})}),tD=NSe;var dW=l(I(),1),yh=l(M(),1),fW=l(Y(),1);var t1=l(x(),1);function MSe(e,t,o){if(!o)return t;let r=e.get(t);return r||(r=(0,yh.createRegistry)({},t),r.registerStore(zt,Gp),e.set(t,r)),r}var DSe=(0,fW.createHigherOrderComponent)(e=>({useSubRegistry:t=!0,...o})=>{let r=(0,yh.useRegistry)(),[n]=(0,dW.useState)(()=>new WeakMap),i=MSe(n,r,t);return i===r?(0,t1.jsx)(e,{registry:r,...o}):(0,t1.jsx)(yh.RegistryProvider,{value:i,children:(0,t1.jsx)(e,{registry:i,...o})})},"withRegistryProvider"),mW=DSe;var _i=l(I(),1),o1=l(M(),1),hW=l(Z(),1);var pW=()=>{};function r1({clientId:e=null,value:t,selection:o,onChange:r=pW,onInput:n=pW}){let i=(0,o1.useRegistry)(),{resetBlocks:s,resetSelection:a,replaceInnerBlocks:c,setHasControlledInnerBlocks:u,__unstableMarkNextChangeAsNotPersistent:d}=i.dispatch(S),{getBlockName:f,getBlocks:m,getSelectionStart:p,getSelectionEnd:h}=i.select(S),g=(0,o1.useSelect)(E=>!e||E(S).areInnerBlocksControlled(e),[e]),b=(0,_i.useRef)({incoming:null,outgoing:[]}),k=(0,_i.useRef)(!1),v=()=>{t&&(d(),e?i.batch(()=>{u(e,!0);let E=t.map(R=>(0,hW.cloneBlock)(R));k.current&&(b.current.incoming=E),d(),c(e,E)}):(k.current&&(b.current.incoming=t),s(t)))},y=()=>{d(),e?(u(e,!1),d(),c(e,[])):s([])},_=(0,_i.useRef)(n),w=(0,_i.useRef)(r);(0,_i.useEffect)(()=>{_.current=n,w.current=r},[n,r]),(0,_i.useEffect)(()=>{b.current.outgoing.includes(t)?b.current.outgoing[b.current.outgoing.length-1]===t&&(b.current.outgoing=[]):m(e)!==t&&(b.current.outgoing=[],v(),o&&a(o.selectionStart,o.selectionEnd,o.initialPosition))},[t,e]);let C=(0,_i.useRef)(!1);(0,_i.useEffect)(()=>{if(!C.current){C.current=!0;return}g||(b.current.outgoing=[],v())},[g]),(0,_i.useEffect)(()=>{let{getSelectedBlocksInitialCaretPosition:E,isLastBlockChangePersistent:R,__unstableIsLastBlockChangeIgnored:O,areInnerBlocksControlled:B}=i.select(S),T=m(e),A=R(),N=!1;k.current=!0;let z=i.subscribe(()=>{if(e!==null&&f(e)===null||!(!e||B(e)))return;let j=R(),G=m(e),V=G!==T;if(T=G,V&&(b.current.incoming||O())){b.current.incoming=null,A=j;return}(V||N&&!V&&j&&!A)&&(A=j,b.current.outgoing.push(T),(A?w.current:_.current)(T,{selection:{selectionStart:p(),selectionEnd:h(),initialPosition:E()}})),N=V},S);return()=>{k.current=!1,z()}},[i,e]),(0,_i.useEffect)(()=>()=>{y()},[])}var gW=l(I(),1),bW=l(M(),1),kW=l(ra(),1),wo=l(L(),1);function vW(){return null}function VSe(){let{registerShortcut:e}=(0,bW.useDispatch)(kW.store);return(0,gW.useEffect)(()=>{e({name:"core/block-editor/copy",category:"block",description:(0,wo.__)("Copy the selected block(s)."),keyCombination:{modifier:"primary",character:"c"}}),e({name:"core/block-editor/cut",category:"block",description:(0,wo.__)("Cut the selected block(s)."),keyCombination:{modifier:"primary",character:"x"}}),e({name:"core/block-editor/paste",category:"block",description:(0,wo.__)("Paste the selected block(s)."),keyCombination:{modifier:"primary",character:"v"}}),e({name:"core/block-editor/duplicate",category:"block",description:(0,wo.__)("Duplicate the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"d"}}),e({name:"core/block-editor/remove",category:"block",description:(0,wo.__)("Remove the selected block(s)."),keyCombination:{modifier:"access",character:"z"}}),e({name:"core/block-editor/paste-styles",category:"block",description:(0,wo.__)("Paste the copied style to the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"v"}}),e({name:"core/block-editor/insert-before",category:"block",description:(0,wo.__)("Insert a new block before the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"t"}}),e({name:"core/block-editor/insert-after",category:"block",description:(0,wo.__)("Insert a new block after the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"y"}}),e({name:"core/block-editor/delete-multi-selection",category:"block",description:(0,wo.__)("Delete selection."),keyCombination:{character:"del"},aliases:[{character:"backspace"}]}),e({name:"core/block-editor/stop-editing-as-blocks",category:"block",description:(0,wo.__)("Finish editing a design."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/select-all",category:"selection",description:(0,wo.__)("Select all text when typing. Press again to select all blocks."),keyCombination:{modifier:"primary",character:"a"}}),e({name:"core/block-editor/unselect",category:"selection",description:(0,wo.__)("Clear selection."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/multi-text-selection",category:"selection",description:(0,wo.__)("Select text across multiple blocks."),keyCombination:{modifier:"shift",character:"arrow"}}),e({name:"core/block-editor/focus-toolbar",category:"global",description:(0,wo.__)("Navigate to the nearest toolbar."),keyCombination:{modifier:"alt",character:"F10"}}),e({name:"core/block-editor/move-up",category:"block",description:(0,wo.__)("Move the selected block(s) up."),keyCombination:{modifier:"secondary",character:"t"}}),e({name:"core/block-editor/move-down",category:"block",description:(0,wo.__)("Move the selected block(s) down."),keyCombination:{modifier:"secondary",character:"y"}}),e({name:"core/block-editor/collapse-list-view",category:"list-view",description:(0,wo.__)("Collapse all other items."),keyCombination:{modifier:"alt",character:"l"}}),e({name:"core/block-editor/group",category:"block",description:(0,wo.__)("Create a group block from the selected multiple blocks."),keyCombination:{modifier:"primary",character:"g"}}),e({name:"core/block-editor/toggle-block-visibility",category:"block",description:(0,wo.__)("Show or hide the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"h"}})},[e]),null}vW.Register=VSe;var n1=vW;var yW=l(I(),1);function FSe(e={}){return(0,yW.useMemo)(()=>({mediaUpload:e.mediaUpload,mediaSideload:e.mediaSideload,maxUploadFileSize:e.maxUploadFileSize,allowedMimeTypes:e.allowedMimeTypes}),[e])}var SW=FSe;var Nf=l(x(),1),zSe=()=>{};function jSe(e,{allowedTypes:t,additionalData:o={},filesList:r,onError:n=zSe,onFileChange:i,onSuccess:s,onBatchSuccess:a}){e.dispatch(bu).addItems({files:r,onChange:i,onSuccess:s,onBatchSuccess:a,onError:({message:c})=>n(c),additionalData:o,allowedTypes:t})}var Sh=mW(e=>{let{settings:t,registry:o,stripExperimentalSettings:r=!1}=e,n=SW(t),i=t;window.__experimentalMediaProcessing&&t.mediaUpload&&(i=(0,i1.useMemo)(()=>({...t,mediaUpload:jSe.bind(null,o)}),[t,o]));let{__experimentalUpdateSettings:s}=F((0,_W.useDispatch)(S));(0,i1.useEffect)(()=>{s({...i,__internalIsInitialized:!0},{stripExperimentalSettings:r,reset:!0})},[i,r,s]),r1(e);let a=(0,Nf.jsxs)(xW.SlotFillProvider,{passthrough:!0,children:[!i?.isPreviewMode&&(0,Nf.jsx)(n1.Register,{}),(0,Nf.jsx)(qG,{children:e.children})]});return window.__experimentalMediaProcessing?(0,Nf.jsx)(tD,{settings:n,useSubRegistry:!1,children:a}):a}),GSe=e=>(0,Nf.jsx)(Sh,{...e,stripExperimentalSettings:!0,children:e.children}),wW=GSe;var _y=l(Y(),1),rZ=l(M(),1),V1=l(I(),1),nZ=l(P(),1);var ds=l(I(),1),s7=l(L(),1),ku=l(Y(),1),a7=l(P(),1),lD=l(M(),1);var e7=l(M(),1),t7=l(L(),1),cy=l(Y(),1),o7=l(I(),1);var CW=l(Y(),1),BW=l(M(),1);function HSe(e){let{isMultiSelecting:t,getMultiSelectedBlockClientIds:o,hasMultiSelection:r,getSelectedBlockClientId:n,getSelectedBlocksInitialCaretPosition:i,__unstableIsFullySelected:s}=e(S);return{isMultiSelecting:t(),multiSelectedBlockClientIds:o(),hasMultiSelection:r(),selectedBlockClientId:n(),initialPosition:i(),isFullSelection:s()}}function EW(){let{initialPosition:e,isMultiSelecting:t,multiSelectedBlockClientIds:o,hasMultiSelection:r,selectedBlockClientId:n,isFullSelection:i}=(0,BW.useSelect)(HSe,[]);return(0,CW.useRefEffect)(s=>{let{ownerDocument:a}=s,{defaultView:c}=a;if(e==null||!r||t)return;let{length:u}=o;u<2||i&&(s.contentEditable=!0,s.focus(),c.getSelection().removeAllRanges())},[r,t,o,n,e,i])}var _h=l(je(),1),oD=l(at(),1),s1=l(M(),1),a1=l(Y(),1),sy=l(I(),1);var rD=l(x(),1);function TW(){let e=(0,sy.useRef)(),t=(0,sy.useRef)(),o=(0,sy.useRef)(),{hasMultiSelection:r,getSelectedBlockClientId:n,getBlockCount:i,getBlockOrder:s,getLastFocus:a,getSectionRootClientId:c,isZoomOut:u}=F((0,s1.useSelect)(S)),{setLastFocus:d}=F((0,s1.useDispatch)(S)),f=(0,sy.useRef)();function m(k){let v=e.current.ownerDocument===k.target.ownerDocument?e.current:e.current.ownerDocument.defaultView.frameElement;if(f.current)f.current=null;else if(r())e.current.focus();else if(n())a()?.current?a().current.focus():e.current.querySelector(`[data-block="${n()}"]`).focus();else if(u()){let y=c(),_=s(y);_.length?e.current.querySelector(`[data-block="${_[0]}"]`).focus():y?e.current.querySelector(`[data-block="${y}"]`).focus():v.focus()}else{let y=k.target.compareDocumentPosition(v)&k.target.DOCUMENT_POSITION_FOLLOWING,_=_h.focus.tabbable.find(e.current);_.length&&(y?_[0]:_[_.length-1]).focus()}}let p=(0,rD.jsx)("div",{ref:t,tabIndex:"0",onFocus:m}),h=(0,rD.jsx)("div",{ref:o,tabIndex:"0",onFocus:m}),g=(0,a1.useRefEffect)(k=>{function v(E){if(E.defaultPrevented||E.keyCode!==oD.TAB||!o.current||!t.current)return;let{target:R,shiftKey:O}=E,B=O?"findPrevious":"findNext",T=_h.focus.tabbable[B](R),A=R.closest("[data-block]"),N=A&&T&&(EC(A,T)||uu(A,T));if((0,_h.isFormElement)(T)&&N)return;let z=O?t:o;f.current=!0,z.current.focus({preventScroll:!0})}function y(E){d({...a(),current:E.target});let{ownerDocument:R}=k;!E.relatedTarget&&E.target.hasAttribute("data-block")&&R.activeElement===R.body&&i()===0&&k.focus()}function _(E){if(E.keyCode!==oD.TAB||E.target?.getAttribute("role")==="region"||e.current===E.target)return;let O=E.shiftKey?"findPrevious":"findNext",B=_h.focus.tabbable[O](E.target);(B===t.current||B===o.current)&&(E.preventDefault(),B.focus({preventScroll:!0}))}let{ownerDocument:w}=k,{defaultView:C}=w;return C.addEventListener("keydown",_),k.addEventListener("keydown",v),k.addEventListener("focusout",y),()=>{C.removeEventListener("keydown",_),k.removeEventListener("keydown",v),k.removeEventListener("focusout",y)}},[]),b=(0,a1.useMergeRefs)([e,g]);return[p,b,h]}var Ho=l(je(),1),ia=l(at(),1),l1=l(M(),1),IW=l(Y(),1);function USe(e,t,o){let r=t===ia.UP||t===ia.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 nD(e,t,o,r){let n=Ho.focus.focusable.find(o);t&&n.reverse(),n=n.slice(n.indexOf(e)+1);let i;r&&(i=e.getBoundingClientRect());function s(a){if(!a.closest("[inert]")&&!(a.children.length===1&&EC(a,a.firstElementChild)&&a.firstElementChild.getAttribute("contenteditable")==="true")){if(!Ho.focus.tabbable.isTabbableIndex(a)||a.isContentEditable&&a.contentEditable!=="true")return!1;if(r){let c=a.getBoundingClientRect();if(c.left>=i.right||c.right<=i.left)return!1}return!0}}return n.find(s)}function PW(){let{getMultiSelectedBlocksStartClientId:e,getMultiSelectedBlocksEndClientId:t,getSettings:o,hasMultiSelection:r,__unstableIsFullySelected:n}=(0,l1.useSelect)(S),{selectBlock:i}=(0,l1.useDispatch)(S);return(0,IW.useRefEffect)(s=>{let a;function c(){a=null}function u(f,m){let p=nD(f,m,s);return p&&du(p)}function d(f){if(f.defaultPrevented)return;let{keyCode:m,target:p,shiftKey:h,ctrlKey:g,altKey:b,metaKey:k}=f,v=m===ia.UP,y=m===ia.DOWN,_=m===ia.LEFT,w=m===ia.RIGHT,C=v||_,E=_||w,R=v||y,O=E||R,B=h||g||b||k,T=R?Ho.isVerticalEdge:Ho.isHorizontalEdge,{ownerDocument:A}=s,{defaultView:N}=A;if(!O)return;if(r()){if(h||!n())return;f.preventDefault(),C?i(e()):i(t(),-1);return}if(!USe(p,m,B))return;R?a||(a=(0,Ho.computeCaretRect)(N)):a=null;let z=(0,Ho.isRTL)(p)?!C:C,{keepCaretInsideBlock:U}=o();if(h)u(p,C)&&T(p,C)&&(s.contentEditable=!0,s.focus());else if(R&&(0,Ho.isVerticalEdge)(p,C)&&(!b||(0,Ho.isHorizontalEdge)(p,z))&&!U){let j=nD(p,C,s,!0);j&&((0,Ho.placeCaretAtVerticalEdge)(j,b?!C:C,b?void 0:a),f.preventDefault())}else if(E&&N.getSelection().isCollapsed&&(0,Ho.isHorizontalEdge)(p,z)&&!U){let j=nD(p,z,s);(0,Ho.placeCaretAtHorizontalEdge)(j,C),f.preventDefault()}}return s.addEventListener("mousedown",c),s.addEventListener("keydown",d),()=>{s.removeEventListener("mousedown",c),s.removeEventListener("keydown",d)}},[])}var RW=l(je(),1),c1=l(M(),1),OW=l(ra(),1),AW=l(Y(),1);function LW(){let{getBlockOrder:e,getSelectedBlockClientIds:t,getBlockRootClientId:o}=(0,c1.useSelect)(S),{multiSelect:r,selectBlock:n}=(0,c1.useDispatch)(S),i=(0,OW.__unstableUseShortcutEventMatch)();return(0,AW.useRefEffect)(s=>{function a(c){if(!i("core/block-editor/select-all",c))return;let u=t();if(u.length<2&&!(0,RW.isEntirelySelected)(c.target))return;c.preventDefault();let[d]=u,f=o(d),m=e(f);if(u.length===m.length){f&&(s.ownerDocument.defaultView.getSelection().removeAllRanges(),n(f));return}r(m[0],m[m.length-1])}return s.addEventListener("keydown",a),()=>{s.removeEventListener("keydown",a)}},[])}var u1=l(M(),1),MW=l(Y(),1);function NW(e,t){e.contentEditable=t,t&&e.focus()}function DW(){let{startMultiSelect:e,stopMultiSelect:t}=(0,u1.useDispatch)(S),{isSelectionEnabled:o,hasSelectedBlock:r,isDraggingBlocks:n,isMultiSelecting:i}=(0,u1.useSelect)(S);return(0,MW.useRefEffect)(s=>{let{ownerDocument:a}=s,{defaultView:c}=a,u,d;function f(){t(),c.removeEventListener("mouseup",f),d=c.requestAnimationFrame(()=>{if(!r())return;NW(s,!1);let g=c.getSelection();if(g.rangeCount){let b=g.getRangeAt(0),{commonAncestorContainer:k}=b,v=b.cloneRange();u.contains(k)&&(u.focus(),g.removeAllRanges(),g.addRange(v))}})}let m;function p({target:g}){m=g}function h({buttons:g,target:b,relatedTarget:k}){b.contains(m)&&(b.contains(k)||n()||g===1&&(i()||s!==b&&b.getAttribute("contenteditable")==="true"&&o()&&(u=b,e(),c.addEventListener("mouseup",f),NW(s,!0))))}return s.addEventListener("mouseout",h),s.addEventListener("mousedown",p),()=>{s.removeEventListener("mouseout",h),c.removeEventListener("mouseup",f),c.cancelAnimationFrame(d)}},[e,t,o,r])}var d1=l(M(),1),zW=l(Y(),1),iD=l(zo(),1),jW=l(je(),1);function WSe(e){let{anchorNode:t,anchorOffset:o}=e;return t.nodeType===t.TEXT_NODE||o===0?t:t.childNodes[o-1]}function ZSe(e){let{focusNode:t,focusOffset:o}=e;return t.nodeType===t.TEXT_NODE||o===t.childNodes.length?t:o===0&&(0,jW.isSelectionForward)(e)?t.previousSibling??t.parentElement:t.childNodes[o]}function $Se(e,t){let o=0;for(;e[o]===t[o];)o++;return o}function VW(e,t){e.contentEditable!==String(t)&&(e.contentEditable=t,t&&e.focus())}function FW(e){return(e.nodeType===e.ELEMENT_NODE?e:e.parentElement)?.closest("[data-wp-block-attribute-key]")}function GW(){let{multiSelect:e,selectBlock:t,selectionChange:o}=(0,d1.useDispatch)(S),{getBlockParents:r,getBlockSelectionStart:n,isMultiSelecting:i}=(0,d1.useSelect)(S);return(0,zW.useRefEffect)(s=>{let{ownerDocument:a}=s,{defaultView:c}=a;function u(d){let f=c.getSelection();if(!f.rangeCount)return;let m=WSe(f),p=ZSe(f);if(!s.contains(m)||!s.contains(p))return;let h=d.shiftKey&&d.type==="mouseup";if(f.isCollapsed&&!h){if(s.contentEditable==="true"&&!i()){VW(s,!1);let v=m.nodeType===m.ELEMENT_NODE?m:m.parentElement;v=v?.closest("[contenteditable]"),v?.focus()}return}let g=du(m),b=du(p);if(h){let v=n(),y=du(d.target),_=y!==b;(g===b&&f.isCollapsed||!b||_)&&(b=y),g!==v&&(g=v)}if(g===void 0&&b===void 0){VW(s,!1);return}if(g===b)i()?e(g,g):t(g);else{let v=[...r(g),g],y=[...r(b),b],_=$Se(v,y);if(v[_]!==g||y[_]!==b){e(v[_],y[_]);return}let w=FW(m),C=FW(p);if(w&&C){let E=f.getRangeAt(0),R=(0,iD.create)({element:w,range:E,__unstableIsEditableTree:!0}),O=(0,iD.create)({element:C,range:E,__unstableIsEditableTree:!0}),B=R.start??R.end,T=O.start??O.end;o({start:{clientId:g,attributeKey:w.dataset.wpBlockAttributeKey,offset:B},end:{clientId:b,attributeKey:C.dataset.wpBlockAttributeKey,offset:T}})}else e(g,b)}}return a.addEventListener("selectionchange",u),c.addEventListener("mouseup",u),()=>{a.removeEventListener("selectionchange",u),c.removeEventListener("mouseup",u)}},[e,t,o,r])}var f1=l(M(),1),HW=l(Y(),1);function UW(){let{selectBlock:e}=(0,f1.useDispatch)(S),{isSelectionEnabled:t,getBlockSelectionStart:o,hasMultiSelection:r}=(0,f1.useSelect)(S);return(0,HW.useRefEffect)(n=>{function i(s){if(!t()||s.button!==0)return;let a=o(),c=du(s.target);s.shiftKey?a&&a!==c&&(n.contentEditable=!0,n.focus()):r()&&e(c)}return n.addEventListener("mousedown",i),()=>{n.removeEventListener("mousedown",i)}},[e,t,o,r])}var m1=l(M(),1),WW=l(Y(),1),Tl=l(at(),1),sa=l(Z(),1);function ZW(){let{__unstableIsFullySelected:e,getSelectedBlockClientIds:t,getSelectedBlockClientId:o,__unstableIsSelectionMergeable:r,hasMultiSelection:n,getBlockName:i,canInsertBlockType:s,getBlockRootClientId:a,getSelectionStart:c,getSelectionEnd:u,getBlockAttributes:d}=(0,m1.useSelect)(S),{replaceBlocks:f,__unstableSplitSelection:m,removeBlocks:p,__unstableDeleteSelection:h,__unstableExpandSelection:g,__unstableMarkAutomaticChange:b}=(0,m1.useDispatch)(S);return(0,WW.useRefEffect)(k=>{function v(w){k.contentEditable==="true"&&w.preventDefault()}function y(w){if(!w.defaultPrevented){if(!n()){if(w.keyCode===Tl.ENTER){if(w.shiftKey||e())return;let C=o(),E=i(C),R=c(),O=u();if(R.attributeKey===O.attributeKey){let B=d(C)[R.attributeKey],T=(0,sa.getBlockTransforms)("from").filter(({type:N})=>N==="enter"),A=(0,sa.findTransform)(T,N=>N.regExp.test(B));if(A){f(C,A.transform({content:B})),b();return}}if(!(0,sa.hasBlockSupport)(E,"splitting",!1)&&!w.__deprecatedOnSplit)return;s(E,a(C))&&(m(),w.preventDefault())}return}w.keyCode===Tl.ENTER?(k.contentEditable=!1,w.preventDefault(),e()?f(t(),(0,sa.createBlock)((0,sa.getDefaultBlockName)())):m()):w.keyCode===Tl.BACKSPACE||w.keyCode===Tl.DELETE?(k.contentEditable=!1,w.preventDefault(),e()?p(t()):r()?h(w.keyCode===Tl.DELETE):g()):w.key.length===1&&!(w.metaKey||w.ctrlKey)&&(k.contentEditable=!1,r()?h(w.keyCode===Tl.DELETE):(w.preventDefault(),k.ownerDocument.defaultView.getSelection().removeAllRanges()))}}function _(w){n()&&(k.contentEditable=!1,r()?h():(w.preventDefault(),k.ownerDocument.defaultView.getSelection().removeAllRanges()))}return k.addEventListener("beforeinput",v),k.addEventListener("keydown",y),k.addEventListener("compositionstart",_),()=>{k.removeEventListener("beforeinput",v),k.removeEventListener("keydown",y),k.removeEventListener("compositionstart",_)}},[])}var aa=l(Z(),1),h1=l(je(),1),Ch=l(M(),1),JW=l(Y(),1);var $W=l(I(),1),YW=l(Z(),1),ay=l(M(),1),xi=l(L(),1),KW=l(On(),1);function xh(){let{getBlockName:e}=(0,ay.useSelect)(S),{getBlockType:t}=(0,ay.useSelect)(YW.store),{createSuccessNotice:o}=(0,ay.useDispatch)(KW.store);return(0,$W.useCallback)((r,n)=>{let i="";if(r==="copyStyles")i=(0,xi.__)("Styles copied to clipboard.");else if(n.length===1){let s=n[0],a=t(e(s))?.title;r==="copy"?i=(0,xi.sprintf)((0,xi.__)('Copied "%s" to clipboard.'),a):i=(0,xi.sprintf)((0,xi.__)('Moved "%s" to clipboard.'),a)}else r==="copy"?i=(0,xi.sprintf)((0,xi._n)("Copied %d block to clipboard.","Copied %d blocks to clipboard.",n.length),n.length):i=(0,xi.sprintf)((0,xi._n)("Moved %d block to clipboard.","Moved %d blocks to clipboard.",n.length),n.length);o(i,{type:"snackbar"})},[o,e,t])}var qW=l(je(),1),wi=l(Z(),1);var XW=l(je(),1);function YSe(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 KSe(e){let t="<meta charset='utf-8'>";return e.startsWith(t)?e.slice(t.length):e}function wh({clipboardData:e}){let t="",o="";try{t=e.getData("text/plain"),o=e.getData("text/html")}catch{return}o=YSe(o),o=KSe(o);let r=(0,XW.getFilesFromDataTransfer)(e);return r.length&&!XSe(r,o)?{files:r}:{html:o,plainText:t,files:[]}}function XSe(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 sD=Symbol("requiresWrapperOnCopy");function p1(e,t,o){let r=t,[n]=t;if(n&&o.select(wi.store).getBlockType(n.name)[sD]){let{getBlockRootClientId:a,getBlockName:c,getBlockAttributes:u}=o.select(S),d=a(n.clientId),f=c(d);f&&(r=(0,wi.createBlock)(f,u(d),r))}let i=(0,wi.serialize)(r);e.clipboardData.setData("text/plain",qSe(i)),e.clipboardData.setData("text/html",i)}function QW(e,t){let{plainText:o,html:r,files:n}=wh(e),i=[];if(n.length){let s=(0,wi.getBlockTransforms)("from");i=n.reduce((a,c)=>{let u=(0,wi.findTransform)(s,d=>d.type==="files"&&d.isMatch([c]));return u&&a.push(u.transform([c])),a},[]).flat()}else i=(0,wi.pasteHandler)({HTML:r,plainText:o,mode:"BLOCKS",canUserUseUnfilteredHTML:t});return i}function qSe(e){return e=e.replace(/<br>/g,`
`),(0,qW.__unstableStripHTML)(e).trim().replace(/\n\n+/g,`

`)}function ly(){let e=(0,Ch.useRegistry)(),{getBlocksByClientId:t,getSelectedBlockClientIds:o,hasMultiSelection:r,getSettings:n,getBlockName:i,__unstableIsFullySelected:s,__unstableIsSelectionCollapsed:a,__unstableIsSelectionMergeable:c,__unstableGetSelectedBlocksWithPartialSelection:u,canInsertBlockType:d,getBlockRootClientId:f}=(0,Ch.useSelect)(S),{flashBlock:m,removeBlocks:p,replaceBlocks:h,__unstableDeleteSelection:g,__unstableExpandSelection:b,__unstableSplitSelection:k}=(0,Ch.useDispatch)(S),v=xh();return(0,JW.useRefEffect)(y=>{function _(w){if(w.defaultPrevented)return;let C=o();if(C.length===0)return;if(!r()){let{target:T}=w,{ownerDocument:A}=T;if(w.type==="copy"||w.type==="cut"?(0,h1.documentHasUncollapsedSelection)(A):(0,h1.documentHasSelection)(A)&&!A.activeElement.isContentEditable)return}let{activeElement:E}=w.target.ownerDocument;if(!y.contains(E))return;let R=c(),O=a()||s(),B=!O&&!R;if(w.type==="copy"||w.type==="cut")if(w.preventDefault(),C.length===1&&m(C[0]),B)b();else{v(w.type,C);let T;if(O)T=t(C);else{let[A,N]=u(),z=t(C.slice(1,C.length-1));T=[A,...z,N]}p1(w,T,e)}if(w.type==="cut")O&&!B?p(C):(w.target.ownerDocument.activeElement.contentEditable=!1,g());else if(w.type==="paste"){let{__experimentalCanUserUseUnfilteredHTML:T,mediaUpload:A}=n();if(w.clipboardData.getData("rich-text")==="true")return;let{plainText:z,html:U,files:j}=wh(w),G=s(),V=[];if(j.length){if(!A){w.preventDefault();return}let ee=(0,aa.getBlockTransforms)("from");V=j.reduce((J,ie)=>{let de=(0,aa.findTransform)(ee,q=>q.type==="files"&&q.isMatch([ie]));return de&&J.push(de.transform([ie])),J},[]).flat()}else V=(0,aa.pasteHandler)({HTML:U,plainText:z,mode:G?"BLOCKS":"AUTO",canUserUseUnfilteredHTML:T});if(typeof V=="string")return;if(G){h(C,V,V.length-1,-1),w.preventDefault();return}if(!r()&&!(0,aa.hasBlockSupport)(i(C[0]),"splitting",!1)&&!w.__deprecatedOnSplit)return;let[H]=C,K=f(H),oe=[];for(let ee of V)if(d(ee.name,K))oe.push(ee);else{let J=i(K),ie=ee.name!==J?(0,aa.switchToBlockType)(ee,J):[ee];if(!ie)return;for(let de of ie)for(let q of de.innerBlocks)oe.push(q)}k(oe),w.preventDefault()}}return y.ownerDocument.addEventListener("copy",_),y.ownerDocument.addEventListener("cut",_),y.ownerDocument.addEventListener("paste",_),()=>{y.ownerDocument.removeEventListener("copy",_),y.ownerDocument.removeEventListener("cut",_),y.ownerDocument.removeEventListener("paste",_)}},[])}var Bh=l(x(),1);function aD(){let[e,t,o]=TW(),r=(0,e7.useSelect)(n=>n(S).hasMultiSelection(),[]);return[e,(0,cy.useMergeRefs)([t,ly(),ZW(),DW(),GW(),UW(),EW(),LW(),PW(),(0,cy.useRefEffect)(n=>(n.tabIndex=0,n.dataset.hasMultiSelection=r,r?(n.setAttribute("aria-label",(0,t7.__)("Multiple selected blocks")),()=>{delete n.dataset.hasMultiSelection,n.removeAttribute("aria-label")}):()=>{delete n.dataset.hasMultiSelection}),[r])]),o]}function QSe({children:e,...t},o){let[r,n,i]=aD();return(0,Bh.jsxs)(Bh.Fragment,{children:[r,(0,Bh.jsx)("div",{...t,ref:(0,cy.useMergeRefs)([n,o]),className:D(t.className,"block-editor-writing-flow"),children:e}),i]})}var g1=(0,o7.forwardRef)(QSe);var b1=null;function r7(){return b1||(b1=Array.from(document.styleSheets).reduce((e,t)=>{try{t.cssRules}catch{return e}let{ownerNode:o,cssRules:r}=t;if(o===null||!r||o.id.startsWith("wp-")||!o.id)return e;function n(i){return Array.from(i).find(({selectorText:s,conditionText:a,cssRules:c})=>a?n(c):s&&(s.includes(".editor-styles-wrapper")||s.includes(".wp-block")))}if(n(r)){let i=o.tagName==="STYLE";if(i){let s=o.id.replace("-inline-css","-css"),a=document.getElementById(s);a&&e.push(a.cloneNode(!0))}if(e.push(o.cloneNode(!0)),!i){let s=o.id.replace("-css","-inline-css"),a=document.getElementById(s);a&&e.push(a.cloneNode(!0))}}return e},[]),b1)}var dn=l(I(),1),uy=l(Y(),1);function n7({frameSize:e,containerWidth:t,maxContainerWidth:o,scaleContainerWidth:r}){return(Math.min(t,o)-e*2)/r}function JSe(e,t){let{scaleValue:o,scrollHeight:r}=e,{frameSize:n,scaleValue:i}=t;return r*(i/o)+n*2}function e_e(e,t){let{containerHeight:o,frameSize:r,scaleValue:n,scrollTop:i}=e,{containerHeight:s,frameSize:a,scaleValue:c,scrollHeight:u}=t,d=i;d=(d+o/2-r)/n-o/2,d=(d+s/2)*c+a-s/2,d=i<=r?0:d;let f=u-s;return Math.round(Math.min(Math.max(0,d),Math.max(0,f)))}function t_e(e,t){let{scaleValue:o,frameSize:r,scrollTop:n}=e,{scaleValue:i,frameSize:s,scrollTop:a}=t;return[{translate:"0 0",scale:o,paddingTop:`${r/o}px`,paddingBottom:`${r/o}px`},{translate:`0 ${n-a}px`,scale:i,paddingTop:`${s/i}px`,paddingBottom:`${s/i}px`}]}function i7({frameSize:e,iframeDocument:t,maxContainerWidth:o=750,scale:r}){let[n,{height:i}]=(0,uy.useResizeObserver)(),[s,{width:a,height:c}]=(0,uy.useResizeObserver)(),u=(0,dn.useRef)(0),d=r!==1,f=(0,uy.useReducedMotion)(),m=r==="auto-scaled",p=(0,dn.useRef)(!1),h=(0,dn.useRef)(null);(0,dn.useEffect)(()=>{d||(u.current=a)},[a,d]);let g=Math.max(u.current,a),b=m?n7({frameSize:e,containerWidth:a,maxContainerWidth:o,scaleContainerWidth:g}):r,k=(0,dn.useRef)({scaleValue:b,frameSize:e,containerHeight:0,scrollTop:0,scrollHeight:0}),v=(0,dn.useRef)({scaleValue:b,frameSize:e,containerHeight:0,scrollTop:0,scrollHeight:0}),y=(0,dn.useCallback)(()=>{let{scrollTop:C}=k.current,{scrollTop:E}=v.current;return t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scroll-top",`${C}px`),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scroll-top-next",`${E}px`),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-overflow-behavior",k.current.scrollHeight===k.current.containerHeight?"auto":"scroll"),t.documentElement.classList.add("zoom-out-animation"),t.documentElement.animate(t_e(k.current,v.current),{easing:"cubic-bezier(0.46, 0.03, 0.52, 0.96)",duration:400})},[t]),_=(0,dn.useCallback)(()=>{p.current=!1,h.current=null,t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scale",v.current.scaleValue),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-frame-size",`${v.current.frameSize}px`),t.documentElement.classList.remove("zoom-out-animation"),t.documentElement.scrollTop=v.current.scrollTop,t.documentElement.style.removeProperty("--wp-block-editor-iframe-zoom-out-scroll-top"),t.documentElement.style.removeProperty("--wp-block-editor-iframe-zoom-out-scroll-top-next"),t.documentElement.style.removeProperty("--wp-block-editor-iframe-zoom-out-overflow-behavior"),k.current=v.current},[t]),w=(0,dn.useRef)(!1);return(0,dn.useEffect)(()=>{let C=t&&w.current!==d;if(w.current=d,!!C&&(p.current=!0,!!d))return t.documentElement.classList.add("is-zoomed-out"),()=>{t.documentElement.classList.remove("is-zoomed-out")}},[t,d]),(0,dn.useEffect)(()=>{if(t&&(m&&k.current.scaleValue!==1&&(k.current.scaleValue=n7({frameSize:k.current.frameSize,containerWidth:a,maxContainerWidth:o,scaleContainerWidth:a})),b<1&&(p.current||(t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scale",b),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-frame-size",`${e}px`)),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-content-height",`${i}px`),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-inner-height",`${c}px`),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-container-width",`${a}px`),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scale-container-width",`${g}px`)),p.current))if(p.current=!1,h.current){h.current.reverse();let C=k.current,E=v.current;k.current=E,v.current=C}else k.current.scrollTop=t.documentElement.scrollTop,k.current.scrollHeight=t.documentElement.scrollHeight,k.current.containerHeight=c,v.current={scaleValue:b,frameSize:e,containerHeight:t.documentElement.clientHeight},v.current.scrollHeight=JSe(k.current,v.current),v.current.scrollTop=e_e(k.current,v.current),h.current=y(),f?_():h.current.onfinish=_},[y,_,f,m,b,e,t,i,a,c,o,g]),{isZoomedOut:d,scaleContainerWidth:g,contentResizeListener:n,containerResizeListener:s}}var us=l(x(),1);function l7(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 o_e(e){return(0,ku.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];l7(a,d,o)},r.addEventListener(s,i[s]);return()=>{for(let s of n)r.removeEventListener(s,i[s])}})}function r_e({contentRef:e,children:t,tabIndex:o=0,scale:r=1,frameSize:n=0,readonly:i,forwardedRef:s,title:a=(0,s7.__)("Editor canvas"),...c}){let{resolvedAssets:u,isPreviewMode:d}=(0,lD.useSelect)(j=>{let{getSettings:G}=j(S),V=G();return{resolvedAssets:V.__unstableResolvedAssets,isPreviewMode:V.isPreviewMode}},[]),{styles:f="",scripts:m=""}=u,[p,h]=(0,ds.useState)(),[g,b]=(0,ds.useState)([]),[k,v,y]=aD(),_=(0,ku.useRefEffect)(j=>{j._load=()=>{h(j.contentDocument)};let G;function V(ee){ee.preventDefault()}function H(ee){ee.target.tagName==="A"&&ee.target.getAttribute("href")?.startsWith("#")&&(ee.preventDefault(),G.defaultView.location.hash=ee.target.getAttribute("href").slice(1))}let{ownerDocument:K}=j;b(Array.from(K.body.classList).filter(ee=>ee.startsWith("admin-color-")||ee.startsWith("post-type-")||ee==="wp-embed-responsive"));function oe(){let{contentDocument:ee}=j,{documentElement:J}=ee;G=ee,J.classList.add("block-editor-iframe__html"),ee.dir=K.dir;for(let ie of r7())ee.getElementById(ie.id)||(ee.head.appendChild(ie.cloneNode(!0)),d||console.warn(`${ie.id} was added to the iframe incorrectly. Please use block.json or enqueue_block_assets to add styles to the iframe.`,ie));G.addEventListener("dragover",V,!1),G.addEventListener("drop",V,!1),G.addEventListener("click",H)}return j.addEventListener("load",oe),()=>{delete j._load,j.removeEventListener("load",oe),G?.removeEventListener("dragover",V),G?.removeEventListener("drop",V),G?.removeEventListener("click",H)}},[]),{contentResizeListener:w,containerResizeListener:C,isZoomedOut:E,scaleContainerWidth:R}=i7({scale:r,frameSize:parseInt(n),iframeDocument:p}),O=(0,ku.useDisabled)({isDisabled:!i}),B=(0,ku.useMergeRefs)([o_e(p),e,v,O]),T=`<!doctype html>
<html>
	<head>
		<meta charset="utf-8">
		<base href="${window.location.origin}">
		<script>window.frameElement._load()<\/script>
		<style>
			html{
				height: auto !important;
				min-height: 100%;
			}
			/* Lowest specificity to not override global styles */
			:where(body) {
				margin: 0;
				/* Default background color in case zoom out mode background
				colors the html element */
				background-color: white;
			}
		</style>
		${f}
		${m}
	</head>
	<body>
		<script>document.currentScript.parentElement.remove()<\/script>
	</body>
</html>`,[A,N]=(0,ds.useMemo)(()=>{let j=URL.createObjectURL(new window.Blob([T],{type:"text/html"}));return[j,()=>URL.revokeObjectURL(j)]},[T]);(0,ds.useEffect)(()=>N,[N]);let z=o>=0&&!d,U=(0,us.jsxs)(us.Fragment,{children:[z&&k,(0,us.jsx)("iframe",{...c,style:{...c.style,height:c.style?.height,border:0},ref:(0,ku.useMergeRefs)([s,_]),tabIndex:o,src:A,title:a,onKeyDown:j=>{if(c.onKeyDown&&c.onKeyDown(j),j.currentTarget.ownerDocument!==j.target.ownerDocument){let{stopPropagation:G}=j.nativeEvent;j.nativeEvent.stopPropagation=()=>{},j.stopPropagation(),j.nativeEvent.stopPropagation=G,l7(j,window.KeyboardEvent,j.currentTarget)}},children:p&&(0,ds.createPortal)((0,us.jsxs)("body",{ref:B,className:D("block-editor-iframe__body","editor-styles-wrapper",...g),children:[w,(0,us.jsx)(a7.__experimentalStyleProvider,{document:p,children:t})]}),p.documentElement)}),z&&y]});return(0,us.jsxs)("div",{className:"block-editor-iframe__container",children:[C,(0,us.jsx)("div",{className:D("block-editor-iframe__scale-container",E&&"is-zoomed-out"),style:{"--wp-block-editor-iframe-zoom-out-scale-container-width":E&&`${R}px`},children:U})]})}function n_e(e,t){return(0,lD.useSelect)(r=>r(S).getSettings().__internalIsInitialized,[])?(0,us.jsx)(r_e,{...e,forwardedRef:t}):null}var Eh=(0,ds.forwardRef)(n_e);var tZ=l(P(),1),Ah=l(I(),1),oZ=l(M(),1);var v1={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},i_e=new Set(["combinator","comma"]);var s_e=e=>{switch(e){case"pseudo-element":case"pseudo-class":return new RegExp(v1[e].source.replace("(?<argument>\xB6*)","(?<argument>.*)"),"gu");default:return v1[e]}};function a_e(e,t){let o=0,r="";for(;t<e.length;t++){let n=e[t];switch(n){case"(":++o;break;case")":--o;break}if(r+=n,o===0)return r}return r}function l_e(e,t=v1){if(!e)return[];let o=[e];for(let[n,i]of Object.entries(t))for(let s=0;s<o.length;s++){let a=o[s];if(typeof a!="string")continue;i.lastIndex=0;let c=i.exec(a);if(!c)continue;let u=c.index-1,d=[],f=c[0],m=a.slice(0,u+1);m&&d.push(m),d.push({...c.groups,type:n,content:f});let p=a.slice(u+f.length+1);p&&d.push(p),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],i_e.has(n.type)&&(n.content=n.content.trim()||" ");break}return o}var c_e=/(['"])([^\\\n]+?)\1/g,u_e=/\\./g;function cD(e,t=v1){if(e=e.trim(),e==="")return[];let o=[];e=e.replace(u_e,(i,s)=>(o.push({value:i,offset:s}),"\uE000".repeat(i.length))),e=e.replace(c_e,(i,s,a,c)=>(o.push({value:i,offset:c}),`${s}${"\uE001".repeat(a.length)}${s}`));{let i=0,s;for(;(s=e.indexOf("(",i))>-1;){let a=a_e(e,s);o.push({value:a,offset:s}),e=`${e.substring(0,s)}(${"\xB6".repeat(a.length-2)})${e.substring(s+a.length)}`,i=s+a.length}}let r=l_e(e,t),n=new Set;for(let i of o.reverse())for(let s of r){let{offset:a,value:c}=i;if(!(s.pos[0]<=a&&a+c.length<=s.pos[1]))continue;let{content:u}=s,d=a-s.pos[0];s.content=u.slice(0,d)+c+u.slice(d+c.length),s.content!==u&&n.add(s)}for(let i of n){let s=s_e(i.type);if(!s)throw new Error(`Unknown token type: ${i.type}`);s.lastIndex=0;let a=s.exec(i.content);if(!a)throw new Error(`Unable to parse content for ${i.type}: ${i.content}`);Object.assign(i,a.groups)}return r}function*k1(e,t){switch(e.type){case"list":for(let o of e.list)yield*k1(o,e);break;case"complex":yield*k1(e.left,e),yield*k1(e.right,e);break;case"compound":yield*e.list.map(o=>[o,e]);break;default:yield[e,t]}}function c7(e){let t;return Array.isArray(e)?t=e:t=[...k1(e)].map(([o])=>o),t.map(o=>o.content).join("")}var X8=l(I8(),1),q8=l(_1(),1),Q8=l(O8(),1),J8=l(Y8(),1),K8=new Map,eZ=[{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 _0e(e,t){let o=cD(t),r=o.findLastIndex(({content:s,type:a})=>eZ.some(c=>s===c.content&&a===c.type)),n=-1;for(let s=r+1;s<o.length;s++)if(o[s].type==="combinator"){n=s;break}let i=cD(e);return o.splice(n===-1?o.length:n,0,{type:"combinator",content:" "},...i),c7(o)}function x0e({css:e,ignoredSelectors:t=[],baseURL:o},r="",n){if(!r&&!o)return e;try{let i=[...t,...n?.ignoredSelectors??[],r];return new X8.default([r&&(0,Q8.default)({prefix:r,transform(s,a,c){return i.some(d=>d instanceof RegExp?a.match(d):a.includes(d))?a:eZ.some(d=>a.startsWith(d.content))?_0e(s,a):c}}),o&&(0,J8.default)({rootUrl:o})].filter(Boolean)).process(e,{}).css}catch(i){return i instanceof q8.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 w0e=(e,t="",o)=>{let r=K8.get(t);return r||(r=new WeakMap,K8.set(t,r)),e.map(n=>{let i=r.get(n);return i||(i=x0e(n,t,o),r.set(n,i)),i})},Ff=w0e;var _u=l(x(),1);Ic([Pc,kp]);function C0e(e,t){return(0,Ah.useCallback)(o=>{if(!o)return;let{ownerDocument:r}=o,{defaultView:n,body:i}=r,s=t?r.querySelector(t):i,a;if(s)a=n?.getComputedStyle(s,null).getPropertyValue("background-color");else{let u=r.createElement("div");u.classList.add("editor-styles-wrapper"),i.appendChild(u),a=n?.getComputedStyle(u,null).getPropertyValue("background-color"),i.removeChild(u)}let c=mt(a);c.luminance()>.5||c.alpha()===0?i.classList.remove("is-dark-theme"):i.classList.add("is-dark-theme")},[e,t])}function B0e({styles:e,scope:t,transformOptions:o}){let r=(0,oZ.useSelect)(s=>F(s(S)).getStyleOverrides(),[]),[n,i]=(0,Ah.useMemo)(()=>{let s=Object.values(e??[]);for(let[a,c]of r){let u=s.findIndex(({id:f})=>a===f),d={...c,id:a};u===-1?s.push(d):s[u]=d}return[Ff(s.filter(a=>a?.css),t,o),s.filter(a=>a.__unstableType==="svgs").map(a=>a.assets).join("")]},[e,r,t,o]);return(0,_u.jsxs)(_u.Fragment,{children:[(0,_u.jsx)("style",{ref:C0e(n,t)}),n.map((s,a)=>(0,_u.jsx)("style",{children:s},a)),(0,_u.jsx)(tZ.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 Il=(0,Ah.memo)(B0e);var Ci=l(x(),1),E0e=(0,V1.memo)(Lh),UD=2e3,T0e=[];function I0e({viewportWidth:e,containerWidth:t,minHeight:o,additionalStyles:r=T0e}){e||(e=t);let[n,{height:i}]=(0,_y.useResizeObserver)(),{styles:s}=(0,rZ.useSelect)(d=>({styles:d(S).getSettings().styles}),[]),a=(0,V1.useMemo)(()=>s&&[...s,{css:"body{height:auto;overflow:hidden;border:none;padding:0;}",__unstableType:"presets"},...r],[s,r]),c=t/e,u=i?t/(i*c):0;return(0,Ci.jsx)(nZ.Disabled,{className:"block-editor-block-preview__content",style:{transform:`scale(${c})`,aspectRatio:u,maxHeight:i>UD?UD*c:void 0,minHeight:o},children:(0,Ci.jsxs)(Eh,{contentRef:(0,_y.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:UD,minHeight:c!==0&&c<1&&o?o/c:o},children:[(0,Ci.jsx)(Il,{styles:a}),n,(0,Ci.jsx)(E0e,{renderAppender:!1})]})})}function iZ(e){let[t,{width:o}]=(0,_y.useResizeObserver)();return(0,Ci.jsxs)(Ci.Fragment,{children:[(0,Ci.jsx)("div",{style:{position:"relative",width:"100%",height:0},children:t}),(0,Ci.jsx)("div",{className:"block-editor-block-preview__container",children:!!o&&(0,Ci.jsx)(I0e,{...e,containerWidth:o})})]})}var Nh=l(I(),1),cZ=l(aZ(),1),lZ=(0,cZ.createQueue)();function uZ({children:e,placeholder:t}){let[o,r]=(0,Nh.useState)(!1);return(0,Nh.useEffect)(()=>{let n={};return lZ.add(n,()=>{(0,Nh.flushSync)(()=>{r(!0)})}),()=>{lZ.cancel(n)}},[]),o?e:t}var jf=l(x(),1),P0e=[];function R0e({blocks:e,viewportWidth:t=1200,minHeight:o,additionalStyles:r=P0e,__experimentalMinHeight:n,__experimentalPadding:i}){n&&(o=n,(0,WD.default)("The __experimentalMinHeight prop",{since:"6.2",version:"6.4",alternative:"minHeight"})),i&&(r=[...r,{css:`body { padding: ${i}px; }`}],(0,WD.default)("The __experimentalPadding prop of BlockPreview",{since:"6.2",version:"6.4",alternative:"additionalStyles"}));let s=(0,ZD.useSelect)(u=>u(S).getSettings(),[]),a=(0,zf.useMemo)(()=>({...s,focusMode:!1,isPreviewMode:!0}),[s]),c=(0,zf.useMemo)(()=>Array.isArray(e)?e:[e],[e]);return!e||e.length===0?null:(0,jf.jsx)(Sh,{value:c,settings:a,children:(0,jf.jsx)(iZ,{viewportWidth:t,minHeight:o,additionalStyles:r})})}var dZ=(0,zf.memo)(R0e);dZ.Async=uZ;var fn=dZ;function fZ({blocks:e,props:t={},layout:o}){let r=(0,ZD.useSelect)(u=>u(S).getSettings(),[]),n=(0,zf.useMemo)(()=>({...r,styles:void 0,focusMode:!1,isPreviewMode:!0}),[r]),i=(0,F1.useDisabled)(),s=(0,F1.useMergeRefs)([t.ref,i]),a=(0,zf.useMemo)(()=>Array.isArray(e)?e:[e],[e]),c=(0,jf.jsxs)(Sh,{value:a,settings:n,children:[(0,jf.jsx)(Il,{}),(0,jf.jsx)(xy,{renderAppender:!1,layout:o})]});return{...t,ref:s,className:D(t.className,"block-editor-block-preview__live-content","components-disabled"),children:e?.length?c:null}}var xu=l(x(),1);function O0e({item:e}){let{name:t,title:o,icon:r,description:n,initialAttributes:i,example:s}=e,a=(0,Mh.isReusableBlock)(e),c=(0,mZ.useMemo)(()=>s?(0,Mh.getBlockFromExample)(t,{attributes:{...s.attributes,...i},innerBlocks:s.innerBlocks}):(0,Mh.createBlock)(t,i),[t,s,i]),u=144,d=280,f=s?.viewportWidth??500,m=d/f,p=m!==0&&m<1&&u?u/m:u;return(0,xu.jsxs)("div",{className:"block-editor-inserter__preview-container",children:[(0,xu.jsx)("div",{className:"block-editor-inserter__preview",children:a||s?(0,xu.jsx)("div",{className:"block-editor-inserter__preview-content",children:(0,xu.jsx)(fn,{blocks:c,viewportWidth:f,minHeight:u,additionalStyles:[{css:`
										body { 
											padding: 24px;
											min-height:${Math.round(p)}px;
											display:flex;
											align-items:center;
										}
										.is-root-container { width: 100%; }
									`}]})}):(0,xu.jsx)("div",{className:"block-editor-inserter__preview-content-missing",children:(0,pZ.__)("No preview available.")})}),!a&&(0,xu.jsx)(ry,{title:o,icon:r,description:n})]})}var z1=O0e;var Hh=l(L(),1),Ol=l(I(),1),JD=l(Y(),1);var TZ=l(Z(),1),IZ=l(Y(),1);var Gh=l(I(),1),wu=l(Z(),1),BZ=l(P(),1),wy=l(at(),1);var _Z=l(P(),1),xZ=l(I(),1);var Dh=l(I(),1),hZ=l(L(),1),gZ=l(jo(),1),bZ=l(x(),1);function A0e(e,t){let[o,r]=(0,Dh.useState)(!1);return(0,Dh.useEffect)(()=>{o&&(0,gZ.speak)((0,hZ.__)("Use left and right arrow keys to move through blocks"))},[o]),(0,bZ.jsx)("div",{ref:t,role:"listbox","aria-orientation":"horizontal",onFocus:()=>{r(!0)},onBlur:n=>{!n.currentTarget.contains(n.relatedTarget)&&r(!1)},...e})}var $D=(0,Dh.forwardRef)(A0e);var kZ=l(I(),1),vZ=l(P(),1),yZ=l(x(),1);function L0e(e,t){return(0,yZ.jsx)(vZ.Composite.Group,{role:"presentation",ref:t,...e})}var YD=(0,kZ.forwardRef)(L0e);var G1=l(P(),1),SZ=l(I(),1),j1=l(x(),1);function N0e({isFirst:e,as:t,children:o,...r},n){return(0,j1.jsx)(G1.Composite.Item,{ref:n,role:"option",accessibleWhenDisabled:!0,...r,render:i=>{let s={...i,tabIndex:e?0:i.tabIndex};return t?(0,j1.jsx)(t,{...s,children:o}):typeof o=="function"?o(s):(0,j1.jsx)(G1.Button,{__next40pxDefaultSize:!0,...s,children:o})}})}var KD=(0,SZ.forwardRef)(N0e);var XD=l(x(),1);function M0e({key:e,children:t}){return(0,XD.jsx)(xZ.Fragment,{children:t},e)}function D0e({children:e}){return(0,XD.jsx)(_Z.Composite,{focusShift:!0,focusWrap:"horizontal",render:M0e,children:e})}var Vh=D0e;var wZ=l(P(),1),U1=l(Z(),1),W1=l(M(),1),CZ=l(I(),1);var zh=l(L(),1),Fh=l(P(),1);var ms=l(x(),1);function H1({count:e,icon:t,isPattern:o,fadeWhenDisabled:r}){let n=o&&(0,zh.__)("Pattern");return(0,ms.jsx)("div",{className:"block-editor-block-draggable-chip-wrapper",children:(0,ms.jsx)("div",{className:"block-editor-block-draggable-chip","data-testid":"block-draggable-chip",children:(0,ms.jsxs)(Fh.Flex,{justify:"center",className:"block-editor-block-draggable-chip__content",children:[(0,ms.jsx)(Fh.FlexItem,{children:t?(0,ms.jsx)(Ie,{icon:t}):n||(0,zh.sprintf)((0,zh._n)("%d block","%d blocks",e),e)}),(0,ms.jsx)(Fh.FlexItem,{children:(0,ms.jsx)(Ie,{icon:Vk})}),r&&(0,ms.jsx)(Fh.FlexItem,{className:"block-editor-block-draggable-chip__disabled",children:(0,ms.jsx)("span",{className:"block-editor-block-draggable-chip__disabled-icon"})})]})})})}var qD=l(x(),1),V0e=({isEnabled:e,blocks:t,icon:o,children:r,pattern:n})=>{let i=t.length===1?t[0].name:void 0,s=(0,W1.useSelect)(f=>i&&f(U1.store).getBlockType(i)?.icon,[i]),{startDragging:a,stopDragging:c}=F((0,W1.useDispatch)(S)),u=(0,CZ.useMemo)(()=>n?.type===It.user&&n?.syncStatus!=="unsynced"?[(0,U1.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,qD.jsx)(wZ.Draggable,{__experimentalTransferDataType:"wp-blocks",transferData:{type:"inserter",blocks:d},onDragStart:f=>{a();let m=new Set;for(let p of d){let h=`wp-block:${p.name}`;m.has(h)||(f.dataTransfer.items.add("",h),m.add(h))}},onDragEnd:()=>{c()},__experimentalDragComponent:(0,qD.jsx)(H1,{count:t.length,icon:o||!n&&s,isPattern:!!n}),children:({onDraggableStart:f,onDraggableEnd:m})=>r({draggable:!0,onDragStart:f,onDragEnd:m})})},jh=V0e;var Pl=l(x(),1);function F0e({className:e,isFirst:t,item:o,onSelect:r,onHover:n,isDraggable:i,...s}){let a=(0,Gh.useRef)(!1),c=o.icon?{backgroundColor:o.icon.background,color:o.icon.foreground}:{},u=(0,Gh.useMemo)(()=>[(0,wu.createBlock)(o.name,o.initialAttributes,(0,wu.createBlocksFromInnerBlocksTemplate)(o.innerBlocks))],[o.name,o.initialAttributes,o.innerBlocks]),d=(0,wu.isReusableBlock)(o)&&o.syncStatus!=="unsynced"||(0,wu.isTemplatePart)(o);return(0,Pl.jsx)(jh,{isEnabled:i&&!o.isDisabled,blocks:u,icon:o.icon,children:({draggable:f,onDragStart:m,onDragEnd:p})=>(0,Pl.jsx)("div",{className:D("block-editor-block-types-list__list-item",{"is-synced":d}),draggable:f,onDragStart:h=>{a.current=!0,m&&(n(null),m(h))},onDragEnd:h=>{a.current=!1,p&&p(h)},children:(0,Pl.jsxs)(KD,{isFirst:t,className:D("block-editor-block-types-list__item",e),disabled:o.isDisabled,onClick:h=>{h.preventDefault(),r(o,(0,wy.isAppleOS)()?h.metaKey:h.ctrlKey),n(null)},onKeyDown:h=>{let{keyCode:g}=h;g===wy.ENTER&&(h.preventDefault(),r(o,(0,wy.isAppleOS)()?h.metaKey:h.ctrlKey),n(null))},onMouseEnter:()=>{a.current||n(o)},onMouseLeave:()=>n(null),...s,children:[(0,Pl.jsx)("span",{className:"block-editor-block-types-list__item-icon",style:c,children:(0,Pl.jsx)(Ie,{icon:o.icon,showColors:!0})}),(0,Pl.jsx)("span",{className:"block-editor-block-types-list__item-title",children:(0,Pl.jsx)(BZ.__experimentalTruncate,{numberOfLines:3,children:o.title})})]})})})}var EZ=(0,Gh.memo)(F0e);var Cy=l(x(),1);function z0e(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 PZ({items:e=[],onSelect:t,onHover:o=()=>{},children:r,label:n,isDraggable:i=!0}){let s="block-editor-block-types-list",a=(0,IZ.useInstanceId)(PZ,s);return(0,Cy.jsxs)($D,{className:s,"aria-label":n,children:[z0e(e,3).map((c,u)=>(0,Cy.jsx)(YD,{children:c.map((d,f)=>(0,Cy.jsx)(EZ,{item:d,className:(0,TZ.getBlockMenuDefaultClassName)(d.id),onSelect:t,onHover:o,isDraggable:i&&!d.isDisabled,isFirst:u===0&&f===0,rowId:`${a}-${u}`},d.id))},u)),r]})}var Gf=PZ;var RZ=l(P(),1),Rl=l(x(),1);function j0e({title:e,icon:t,children:o}){return(0,Rl.jsxs)(Rl.Fragment,{children:[(0,Rl.jsxs)("div",{className:"block-editor-inserter__panel-header",children:[(0,Rl.jsx)("h2",{className:"block-editor-inserter__panel-title",children:e}),(0,Rl.jsx)(RZ.Icon,{icon:t})]}),(0,Rl.jsx)("div",{className:"block-editor-inserter__panel-content",children:o})]})}var Cu=j0e;var OZ=l(L(),1),QD=l(x(),1);function G0e(){return(0,QD.jsx)("div",{className:"block-editor-inserter__no-results",children:(0,QD.jsx)("p",{children:(0,OZ.__)("No results found.")})})}var ps=G0e;var Ro=l(x(),1),H0e=e=>e.name.split("/")[0],U0e=6,W0e=[];function AZ({items:e,collections:t,categories:o,onSelectItem:r,onHover:n,showMostUsedBlocks:i,className:s}){let a=(0,Ol.useMemo)(()=>qs(e,"frecency","desc").slice(0,U0e),[e]),c=(0,Ol.useMemo)(()=>e.filter(h=>!h.category),[e]),u=(0,Ol.useMemo)(()=>{let h={...t};return Object.keys(t).forEach(g=>{h[g]=e.filter(b=>H0e(b)===g),h[g].length===0&&delete h[g]}),h},[e,t]);(0,Ol.useEffect)(()=>()=>n(null),[]);let d=(0,JD.useAsyncList)(o),f=o.length===d.length,m=(0,Ol.useMemo)(()=>Object.entries(t),[t]),p=(0,JD.useAsyncList)(f?m:W0e);return(0,Ro.jsxs)("div",{className:s,children:[i&&e.length>3&&!!a.length&&(0,Ro.jsx)(Cu,{title:(0,Hh._x)("Most used","blocks"),children:(0,Ro.jsx)(Gf,{items:a,onSelect:r,onHover:n,label:(0,Hh._x)("Most used","blocks")})}),d.map(h=>{let g=e.filter(b=>b.category===h.slug);return!g||!g.length?null:(0,Ro.jsx)(Cu,{title:h.title,icon:h.icon,children:(0,Ro.jsx)(Gf,{items:g,onSelect:r,onHover:n,label:h.title})},h.slug)}),f&&c.length>0&&(0,Ro.jsx)(Cu,{className:"block-editor-inserter__uncategorized-blocks-panel",title:(0,Hh.__)("Uncategorized"),children:(0,Ro.jsx)(Gf,{items:c,onSelect:r,onHover:n,label:(0,Hh.__)("Uncategorized")})}),p.map(([h,g])=>{let b=u[h];return!b||!b.length?null:(0,Ro.jsx)(Cu,{title:g.title,icon:g.icon,children:(0,Ro.jsx)(Gf,{items:b,onSelect:r,onHover:n,label:g.title})},h)})]})}function Z0e({rootClientId:e,onInsert:t,onHover:o,showMostUsedBlocks:r},n){let[i,s,a,c]=Xc(e,t);if(!i.length)return(0,Ro.jsx)(ps,{});let u=[],d=[];for(let f of i)f.category!=="reusable"&&(f.isSearchOnly||(f.isAllowedInCurrentRoot?u.push(f):d.push(f)));return(0,Ro.jsx)(Vh,{children:(0,Ro.jsxs)("div",{ref:n,children:[!!u.length&&(0,Ro.jsx)(Ro.Fragment,{children:(0,Ro.jsx)(AZ,{items:u,categories:s,collections:a,onSelectItem:c,onHover:o,showMostUsedBlocks:r,className:"block-editor-inserter__insertable-blocks-at-selection"})}),(0,Ro.jsx)(AZ,{items:d,categories:s,collections:a,onSelectItem:c,onHover:o,showMostUsedBlocks:r,className:"block-editor-inserter__all-blocks"})]})})}var LZ=(0,Ol.forwardRef)(Z0e);var t$=l(I(),1),o$=l(Y(),1),r$=l(P(),1),n$=l(L(),1);var KZ=l(P(),1),i5=l(I(),1),XZ=l(L(),1);var Z1=l(P(),1),e5=l(L(),1),Al=l(x(),1);function $0e({selectedCategory:e,patternCategories:t,onClickCategory:o}){let r="block-editor-block-patterns-explorer__sidebar";return(0,Al.jsx)("div",{className:`${r}__categories-list`,children:t.map(({name:n,label:i})=>(0,Al.jsx)(Z1.Button,{__next40pxDefaultSize:!0,label:i,className:`${r}__categories-list__item`,isPressed:e===n,onClick:()=>{o(n)},children:i},n))})}function Y0e({searchValue:e,setSearchValue:t}){return(0,Al.jsx)("div",{className:"block-editor-block-patterns-explorer__search",children:(0,Al.jsx)(Z1.SearchControl,{onChange:t,value:e,label:(0,e5.__)("Search"),placeholder:(0,e5.__)("Search")})})}function K0e({selectedCategory:e,patternCategories:t,onClickCategory:o,searchValue:r,setSearchValue:n}){return(0,Al.jsxs)("div",{className:"block-editor-block-patterns-explorer__sidebar",children:[(0,Al.jsx)(Y0e,{searchValue:r,setSearchValue:n}),!r&&(0,Al.jsx)($0e,{selectedCategory:e,patternCategories:t,onClickCategory:o})]})}var NZ=K0e;var Nl=l(I(),1),Wh=l(L(),1),UZ=l(Y(),1),WZ=l(P(),1),ZZ=l(jo(),1);var MZ=l(Z(),1),ca=l(I(),1),Ll=l(P(),1),DZ=l(Y(),1),VZ=l(L(),1);var mn=l(P(),1),Bi=l(L(),1),vr=l(x(),1);function $1({currentPage:e,numPages:t,changePage:o,totalItems:r}){return(0,vr.jsxs)(mn.__experimentalVStack,{className:"block-editor-patterns__grid-pagination-wrapper",children:[(0,vr.jsx)(mn.__experimentalText,{variant:"muted",children:(0,Bi.sprintf)((0,Bi._n)("%s item","%s items",r),r)}),t>1&&(0,vr.jsxs)(mn.__experimentalHStack,{expanded:!1,spacing:3,justify:"flex-start",className:"block-editor-patterns__grid-pagination",children:[(0,vr.jsxs)(mn.__experimentalHStack,{expanded:!1,spacing:1,className:"block-editor-patterns__grid-pagination-previous",children:[(0,vr.jsx)(mn.Button,{variant:"tertiary",onClick:()=>o(1),disabled:e===1,"aria-label":(0,Bi.__)("First page"),size:"compact",accessibleWhenDisabled:!0,className:"block-editor-patterns__grid-pagination-button",children:(0,vr.jsx)("span",{children:"\xAB"})}),(0,vr.jsx)(mn.Button,{variant:"tertiary",onClick:()=>o(e-1),disabled:e===1,"aria-label":(0,Bi.__)("Previous page"),size:"compact",accessibleWhenDisabled:!0,className:"block-editor-patterns__grid-pagination-button",children:(0,vr.jsx)("span",{children:"\u2039"})})]}),(0,vr.jsx)(mn.__experimentalText,{variant:"muted",children:(0,Bi.sprintf)((0,Bi._x)("%1$s of %2$s","paging"),e,t)}),(0,vr.jsxs)(mn.__experimentalHStack,{expanded:!1,spacing:1,className:"block-editor-patterns__grid-pagination-next",children:[(0,vr.jsx)(mn.Button,{variant:"tertiary",onClick:()=>o(e+1),disabled:e===t,"aria-label":(0,Bi.__)("Next page"),size:"compact",accessibleWhenDisabled:!0,className:"block-editor-patterns__grid-pagination-button",children:(0,vr.jsx)("span",{children:"\u203A"})}),(0,vr.jsx)(mn.Button,{variant:"tertiary",onClick:()=>o(t),disabled:e===t,"aria-label":(0,Bi.__)("Last page"),size:"compact",accessibleWhenDisabled:!0,className:"block-editor-patterns__grid-pagination-button",children:(0,vr.jsx)("span",{children:"\xBB"})})]})]})]})}var jt=l(x(),1),X0e=({showTooltip:e,title:t,children:o})=>e?(0,jt.jsx)(Ll.Tooltip,{text:t,children:o}):(0,jt.jsx)(jt.Fragment,{children:o});function FZ({id:e,isDraggable:t,pattern:o,onClick:r,onHover:n,showTitlesAsTooltip:i,category:s,isSelected:a}){let[c,u]=(0,ca.useState)(!1),{blocks:d,viewportWidth:f}=o,p=`block-editor-block-patterns-list__item-description-${(0,DZ.useInstanceId)(FZ)}`,h=o.type===It.user,g=(0,ca.useMemo)(()=>!s||!t?d:(d??[]).map(b=>{let k=(0,MZ.cloneBlock)(b);return k.attributes.metadata?.categories?.includes(s)&&(k.attributes.metadata.categories=[s]),k}),[d,t,s]);return(0,jt.jsx)(jh,{isEnabled:t,blocks:g,pattern:o,children:({draggable:b,onDragStart:k,onDragEnd:v})=>(0,jt.jsx)("div",{className:"block-editor-block-patterns-list__list-item",draggable:b,onDragStart:y=>{u(!0),k&&(n?.(null),k(y))},onDragEnd:y=>{u(!1),v&&v(y)},children:(0,jt.jsx)(X0e,{showTooltip:i&&!h,title:o.title,children:(0,jt.jsxs)(Ll.Composite.Item,{render:(0,jt.jsx)("div",{role:"option","aria-label":o.title,"aria-describedby":o.description?p:void 0,className:D("block-editor-block-patterns-list__item",{"block-editor-block-patterns-list__list-item-synced":o.type===It.user&&!o.syncStatus,"is-selected":a})}),id:e,onClick:()=>{r(o,d),n?.(null)},onMouseEnter:()=>{c||n?.(o)},onMouseLeave:()=>n?.(null),children:[(0,jt.jsx)(fn.Async,{placeholder:(0,jt.jsx)(q0e,{}),children:(0,jt.jsx)(fn,{blocks:d,viewportWidth:f})}),(!i||h)&&(0,jt.jsxs)(Ll.__experimentalHStack,{className:"block-editor-patterns__pattern-details",spacing:2,children:[h&&!o.syncStatus&&(0,jt.jsx)("div",{className:"block-editor-patterns__pattern-icon-wrapper",children:(0,jt.jsx)(Ee,{className:"block-editor-patterns__pattern-icon",icon:pi})}),(0,jt.jsx)("div",{className:"block-editor-block-patterns-list__item-title",children:o.title})]}),!!o.description&&(0,jt.jsx)(Ll.VisuallyHidden,{id:p,children:o.description})]})})})})}function q0e(){return(0,jt.jsx)("div",{className:"block-editor-block-patterns-list__item is-placeholder"})}function Q0e({isDraggable:e,blockPatterns:t,onHover:o,onClickPattern:r,orientation:n,label:i=(0,VZ.__)("Block patterns"),category:s,showTitlesAsTooltip:a,pagingProps:c},u){let[d,f]=(0,ca.useState)(void 0),[m,p]=(0,ca.useState)(null);(0,ca.useEffect)(()=>{let g=t[0]?.name;f(g)},[t]);let h=(g,b)=>{p(g.name),r(g,b)};return(0,jt.jsxs)(Ll.Composite,{orientation:n,activeId:d,setActiveId:f,role:"listbox",className:"block-editor-block-patterns-list","aria-label":i,ref:u,children:[t.map(g=>(0,jt.jsx)(FZ,{id:g.name,pattern:g,onClick:h,onHover:o,isDraggable:e,showTitlesAsTooltip:a,category:s,isSelected:!!m&&m===g.name},g.name)),c&&(0,jt.jsx)($1,{...c})]})}var ua=(0,ca.forwardRef)(Q0e);var Hf=l(M(),1),jZ=l(Z(),1),Y1=l(L(),1),GZ=l(jo(),1),t5=l(I(),1);function zZ({destinationRootClientId:e,destinationIndex:t,rootClientId:o,registry:r}){if(o===e)return t;let n=["",...r.select(S).getBlockParents(e),e],i=n.indexOf(o);return i!==-1?r.select(S).getBlockIndex(n[i+1])+1:r.select(S).getBlockOrder(o).length}function J0e({rootClientId:e="",insertionIndex:t,clientId:o,isAppender:r,onSelect:n,shouldFocusBlock:i=!0,selectBlockOnInsert:s=!0}){let a=(0,Hf.useRegistry)(),{getSelectedBlock:c,getClosestAllowedInsertionPoint:u,isBlockInsertionPointVisible:d}=F((0,Hf.useSelect)(S)),{destinationRootClientId:f,destinationIndex:m}=(0,Hf.useSelect)(_=>{let{getSelectedBlockClientId:w,getBlockRootClientId:C,getBlockIndex:E,getBlockOrder:R,getInsertionPoint:O}=F(_(S)),B=w(),T=e,A,N=O();return t!==void 0?A=t:N&&N.hasOwnProperty("index")?(T=N?.rootClientId?N.rootClientId:e,A=N.index):o?A=E(o):!r&&B?(T=C(B),A=E(B)+1):A=R(T).length,{destinationRootClientId:T,destinationIndex:A}},[e,t,o,r]),{replaceBlocks:p,insertBlocks:h,showInsertionPoint:g,hideInsertionPoint:b,setLastFocus:k}=F((0,Hf.useDispatch)(S)),v=(0,t5.useCallback)((_,w,C=!1,E)=>{(C||i||s)&&k(null);let R=c();!r&&R&&(0,jZ.isUnmodifiedDefaultBlock)(R,"content")?p(R.clientId,_,null,i||C?0:null,w):h(_,r||E===void 0?m:zZ({destinationRootClientId:f,destinationIndex:m,rootClientId:E,registry:a}),r||E===void 0?f:E,s,i||C?0:null,w);let O=Array.isArray(_)?_.length:1,B=(0,Y1.sprintf)((0,Y1._n)("%d block added.","%d blocks added.",O),O);(0,GZ.speak)(B),n&&n(_)},[r,c,p,h,f,m,n,i,s,k,a]),y=(0,t5.useCallback)(_=>{if(_&&!d()){let w=u(_.name,f);w!==null&&g(w,zZ({destinationRootClientId:f,destinationIndex:m,rootClientId:w,registry:a}))}else b()},[u,d,g,b,f,m,a]);return[f,v,y]}var Bu=J0e;var By=l(I(),1),K1=l(Z(),1),Ey=l(M(),1),X1=l(L(),1),HZ=l(On(),1);var exe=(e,t,o,r)=>{let n=(0,By.useMemo)(()=>({[Gc]:!!r}),[r]),{patternCategories:i,patterns:s,userPatternCategories:a}=(0,Ey.useSelect)(m=>{let{getSettings:p,__experimentalGetAllowedPatterns:h}=F(m(S)),{__experimentalUserPatternCategories:g,__experimentalBlockPatternCategories:b}=p();return{patterns:h(t,n),userPatternCategories:g,patternCategories:b}},[t,n]),{getClosestAllowedInsertionPointForPattern:c}=F((0,Ey.useSelect)(S)),u=(0,By.useMemo)(()=>{let m=[...i];return a?.forEach(p=>{m.find(h=>h.name===p.name)||m.push(p)}),m},[i,a]),{createSuccessNotice:d}=(0,Ey.useDispatch)(HZ.store),f=(0,By.useCallback)((m,p)=>{let h=r?t:c(m,t);if(h===null)return;let g=m.type===It.user&&m.syncStatus!=="unsynced"?[(0,K1.createBlock)("core/block",{ref:m.id})]:p;e((g??[]).map(b=>{let k=(0,K1.cloneBlock)(b);return k.attributes.metadata?.categories?.includes(o)&&(k.attributes.metadata.categories=[o]),k}),m.name,!1,h),d((0,X1.sprintf)((0,X1.__)('Block pattern "%s" inserted.'),m.title),{type:"snackbar",id:"inserter-notice"})},[d,e,o,t,c,r]);return[s,u,f]},Eu=exe;var Uh=l(I(),1),o5=l(Y(),1),r5=l(je(),1),q1=20;function Q1(e,t,o,r=""){let[n,i]=(0,Uh.useState)(1),s=(0,o5.usePrevious)(t),a=(0,o5.usePrevious)(r);(s!==t||a!==r)&&n!==1&&i(1);let c=e.length,u=n-1,d=(0,Uh.useMemo)(()=>e.slice(u*q1,u*q1+q1),[u,e]),f=Math.ceil(e.length/q1),m=p=>{(0,r5.getScrollContainer)(o?.current)?.scrollTo(0,0),i(p)};return(0,Uh.useEffect)(function(){(0,r5.getScrollContainer)(o?.current)?.scrollTo(0,0)},[t,o]),{totalItems:c,categoryPatterns:d,numPages:f,changePage:m,currentPage:n}}var hs=l(x(),1);function txe({filterValue:e,filteredBlockPatternsLength:t}){return e?(0,hs.jsx)(WZ.__experimentalHeading,{level:2,lineHeight:"48px",className:"block-editor-block-patterns-explorer__search-results-count",children:(0,Wh.sprintf)((0,Wh._n)("%d pattern found","%d patterns found",t),t)}):null}function oxe({searchValue:e,selectedCategory:t,patternCategories:o,rootClientId:r,onModalClose:n}){let i=(0,Nl.useRef)(),s=(0,UZ.useDebounce)(ZZ.speak,500),[a,c]=Bu({rootClientId:r,shouldFocusBlock:!0}),[u,,d]=Eu(c,a,t),f=(0,Nl.useMemo)(()=>o.map(k=>k.name),[o]),m=(0,Nl.useMemo)(()=>{let k=u.filter(v=>{if(t===gf.name||t===hl.name&&v.type===It.user||t===Dp.name&&v.blockTypes?.includes("core/post-content"))return!0;if(t==="uncategorized"){let y=v.categories?.some(_=>f.includes(_))??!1;return!v.categories?.length||!y}return v.categories?.includes(t)});return e?wv(k,e):k},[e,u,t,f]);(0,Nl.useEffect)(()=>{if(!e)return;let k=m.length,v=(0,Wh.sprintf)((0,Wh._n)("%d result found.","%d results found.",k),k);s(v)},[e,s,m.length]);let p=Q1(m,t,i),[h,g]=(0,Nl.useState)(e);e!==h&&(g(e),p.changePage(1));let b=!!m?.length;return(0,hs.jsxs)("div",{className:"block-editor-block-patterns-explorer__list",ref:i,children:[(0,hs.jsx)(txe,{filterValue:e,filteredBlockPatternsLength:m.length}),(0,hs.jsx)(Vh,{children:b&&(0,hs.jsxs)(hs.Fragment,{children:[(0,hs.jsx)(ua,{blockPatterns:p.categoryPatterns,onClickPattern:(k,v)=>{d(k,v),n()},isDraggable:!1}),(0,hs.jsx)($1,{...p})]})})]})}var $Z=oxe;var n5=l(I(),1),Zh=l(L(),1),YZ=l(jo(),1);function rxe(e,t){return!e.categories||!e.categories.length?!1:e.categories.some(o=>t.some(r=>r.name===o))}function $h(e,t="all"){let[o,r]=Eu(void 0,e),n=(0,n5.useMemo)(()=>t==="all"?o:o.filter(s=>!sw(s,t)),[t,o]);return(0,n5.useMemo)(()=>{let s=r.filter(a=>n.some(c=>c.categories?.includes(a.name))).sort((a,c)=>a.label.localeCompare(c.label));return n.some(a=>!rxe(a,r))&&!s.find(a=>a.name==="uncategorized")&&s.push({name:"uncategorized",label:(0,Zh._x)("Uncategorized")}),n.some(a=>a.blockTypes?.includes("core/post-content"))&&s.unshift(Dp),n.some(a=>a.type===It.user)&&s.unshift(hl),n.length>0&&s.unshift({name:gf.name,label:gf.label}),(0,YZ.speak)((0,Zh.sprintf)((0,Zh._n)("%d category button displayed.","%d category buttons displayed.",s.length),s.length)),s},[r,n])}var Uf=l(x(),1);function nxe({initialCategory:e,rootClientId:t,onModalClose:o}){let[r,n]=(0,i5.useState)(""),[i,s]=(0,i5.useState)(e?.name),a=$h(t);return(0,Uf.jsxs)("div",{className:"block-editor-block-patterns-explorer",children:[(0,Uf.jsx)(NZ,{selectedCategory:i,patternCategories:a,onClickCategory:s,searchValue:r,setSearchValue:n}),(0,Uf.jsx)($Z,{searchValue:r,selectedCategory:i,patternCategories:a,rootClientId:t,onModalClose:o})]})}function ixe({onModalClose:e,...t}){return(0,Uf.jsx)(KZ.Modal,{title:(0,XZ.__)("Patterns"),onRequestClose:e,isFullScreen:!0,children:(0,Uf.jsx)(nxe,{onModalClose:e,...t})})}var qZ=ixe;var Yh=l(L(),1),Pt=l(P(),1);var Uo=l(x(),1);function sxe({title:e}){return(0,Uo.jsx)(Pt.__experimentalVStack,{spacing:0,children:(0,Uo.jsx)(Pt.__experimentalView,{children:(0,Uo.jsx)(Pt.__experimentalSpacer,{marginBottom:0,paddingX:4,paddingY:3,children:(0,Uo.jsxs)(Pt.__experimentalHStack,{spacing:2,children:[(0,Uo.jsx)(Pt.Navigator.BackButton,{style:{minWidth:24,padding:0},icon:(0,Yh.isRTL)()?er:Lr,size:"small",label:(0,Yh.__)("Back")}),(0,Uo.jsx)(Pt.__experimentalSpacer,{children:(0,Uo.jsx)(Pt.__experimentalHeading,{level:5,children:e})})]})})})})}function J1({categories:e,children:t}){return(0,Uo.jsxs)(Pt.Navigator,{initialPath:"/",className:"block-editor-inserter__mobile-tab-navigation",children:[(0,Uo.jsx)(Pt.Navigator.Screen,{path:"/",children:(0,Uo.jsx)(Pt.__experimentalItemGroup,{children:e.map(o=>(0,Uo.jsx)(Pt.Navigator.Button,{path:`/category/${o.name}`,as:Pt.__experimentalItem,isAction:!0,children:(0,Uo.jsxs)(Pt.__experimentalHStack,{children:[(0,Uo.jsx)(Pt.FlexBlock,{children:o.label}),(0,Uo.jsx)(Ee,{icon:(0,Yh.isRTL)()?Lr:er})]})},o.name))})}),e.map(o=>(0,Uo.jsxs)(Pt.Navigator.Screen,{path:`/category/${o.name}`,children:[(0,Uo.jsx)(sxe,{title:(0,Yh.__)("Back")}),t(o)]},o.name))]})}var Ei=l(I(),1),s5=l(L(),1),gs=l(P(),1);var hn=l(P(),1),pn=l(L(),1);var eB=l(I(),1);var sr=l(x(),1),QZ=e=>e!=="all"&&e!=="user",axe=e=>e.name===hl.name,lxe=[{value:"all",label:(0,pn._x)("All","patterns")},{value:It.directory,label:(0,pn.__)("Pattern Directory")},{value:It.theme,label:(0,pn.__)("Theme & Plugins")},{value:It.user,label:(0,pn.__)("User")}];function JZ({setPatternSyncFilter:e,setPatternSourceFilter:t,patternSyncFilter:o,patternSourceFilter:r,scrollContainerRef:n,category:i}){let s=i.name===hl.name?It.user:r,a=QZ(s),c=axe(i),u=(0,eB.useMemo)(()=>[{value:"all",label:(0,pn._x)("All","patterns")},{value:fv.full,label:(0,pn._x)("Synced","patterns"),disabled:a},{value:fv.unsynced,label:(0,pn._x)("Not synced","patterns"),disabled:a}],[a]);function d(f){t(f),QZ(f)&&e("all")}return(0,sr.jsx)(sr.Fragment,{children:(0,sr.jsx)(hn.DropdownMenu,{popoverProps:{placement:"right-end"},label:(0,pn.__)("Filter patterns"),toggleProps:{size:"compact"},icon:(0,sr.jsx)(Ee,{icon:(0,sr.jsx)(hn.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,sr.jsx)(hn.Path,{d:"M10 17.5H14V16H10V17.5ZM6 6V7.5H18V6H6ZM8 12.5H16V11H8V12.5Z",fill:"currentColor"})})}),children:()=>(0,sr.jsxs)(sr.Fragment,{children:[!c&&(0,sr.jsx)(hn.MenuGroup,{label:(0,pn.__)("Source"),children:(0,sr.jsx)(hn.MenuItemsChoice,{choices:lxe,onSelect:f=>{d(f),n.current?.scrollTo(0,0)},value:s})}),(0,sr.jsx)(hn.MenuGroup,{label:(0,pn.__)("Type"),children:(0,sr.jsx)(hn.MenuItemsChoice,{choices:u,onSelect:f=>{e(f),n.current?.scrollTo(0,0)},value:o})}),(0,sr.jsx)("div",{className:"block-editor-inserter__patterns-filter-help",children:(0,eB.createInterpolateElement)((0,pn.__)("Patterns are available from the <Link>WordPress.org Pattern Directory</Link>, bundled in the active theme, or created by users on this site. Only patterns created on this site can be synced."),{Link:(0,sr.jsx)(hn.ExternalLink,{href:(0,pn.__)("https://wordpress.org/patterns/")})})})]})})})}var Hr=l(x(),1),cxe=()=>{};function tB({rootClientId:e,onInsert:t,onHover:o=cxe,category:r,showTitlesAsTooltip:n}){let[i,,s]=Eu(t,e,r?.name),[a,c]=(0,Ei.useState)("all"),[u,d]=(0,Ei.useState)("all"),f=$h(e,u),m=(0,Ei.useRef)(),p=(0,Ei.useMemo)(()=>i.filter(v=>sw(v,u,a)?!1:r.name===gf.name||r.name===hl.name&&v.type===It.user||r.name===Dp.name&&v.blockTypes?.includes("core/post-content")?!0:r.name==="uncategorized"?v.categories?!v.categories.some(y=>f.some(_=>_.name===y)):!0:v.categories?.includes(r.name)),[i,f,r.name,u,a]),h=Q1(p,r,m),{changePage:g}=h;(0,Ei.useEffect)(()=>()=>o(null),[]);let b=(0,Ei.useCallback)(v=>{c(v),g(1)},[c,g]),k=(0,Ei.useCallback)(v=>{d(v),g(1)},[d,g]);return(0,Hr.jsxs)(Hr.Fragment,{children:[(0,Hr.jsxs)(gs.__experimentalVStack,{spacing:2,className:"block-editor-inserter__patterns-category-panel-header",children:[(0,Hr.jsxs)(gs.__experimentalHStack,{children:[(0,Hr.jsx)(gs.FlexBlock,{children:(0,Hr.jsx)(gs.__experimentalHeading,{className:"block-editor-inserter__patterns-category-panel-title",size:13,level:4,as:"div",children:r.label})}),(0,Hr.jsx)(JZ,{patternSyncFilter:a,patternSourceFilter:u,setPatternSyncFilter:b,setPatternSourceFilter:k,scrollContainerRef:m,category:r})]}),!p.length&&(0,Hr.jsx)(gs.__experimentalText,{variant:"muted",className:"block-editor-inserter__patterns-category-no-results",children:(0,s5.__)("No results found")})]}),p.length>0&&(0,Hr.jsxs)(Hr.Fragment,{children:[(0,Hr.jsx)(gs.__experimentalText,{size:"12",as:"p",className:"block-editor-inserter__help-text",children:(0,s5.__)("Drag and drop patterns into the canvas.")}),(0,Hr.jsx)(ua,{ref:m,blockPatterns:h.categoryPatterns,onClickPattern:s,onHover:o,label:r.label,orientation:"vertical",category:r.name,isDraggable:!0,showTitlesAsTooltip:n,patternFilter:u,pagingProps:h})]})]})}var rB=l(Y(),1),nB=l(P(),1),e$=l(I(),1);var Wf=l(x(),1),{Tabs:oB}=F(nB.privateApis);function uxe({categories:e,selectedCategory:t,onSelectCategory:o,children:r}){let s={type:"tween",duration:(0,rB.useReducedMotion)()?0:.25,ease:[.6,0,.4,1]},a=(0,rB.usePrevious)(t),c=t?t.name:null,[u,d]=(0,e$.useState)(),f=e?.[0]?.name;return c===null&&!u&&f&&d(f),(0,Wf.jsxs)(oB,{selectOnMove:!1,selectedTabId:c,orientation:"vertical",onSelect:m=>{o(e.find(p=>p.name===m))},activeTabId:u,onActiveTabIdChange:d,children:[(0,Wf.jsx)(oB.TabList,{className:"block-editor-inserter__category-tablist",children:e.map(m=>(0,Wf.jsx)(oB.Tab,{tabId:m.name,"aria-current":m===t?"true":void 0,children:m.label},m.name))}),e.map(m=>(0,Wf.jsx)(oB.TabPanel,{tabId:m.name,focusable:!1,children:(0,Wf.jsx)(nB.__unstableMotion.div,{className:"block-editor-inserter__category-panel",initial:a?"open":"closed",animate:"open",variants:{open:{transform:"translateX( 0 )",transitionEnd:{zIndex:"1"}},closed:{transform:"translateX( -100% )",zIndex:"-1"}},transition:s,children:r})},m.name))]})}var iB=uxe;var Fn=l(x(),1);function dxe({onSelectCategory:e,selectedCategory:t,onInsert:o,rootClientId:r,children:n}){let[i,s]=(0,t$.useState)(!1),a=$h(r),c=(0,o$.useViewportMatch)("medium","<");return a.length?(0,Fn.jsxs)(Fn.Fragment,{children:[!c&&(0,Fn.jsxs)("div",{className:"block-editor-inserter__block-patterns-tabs-container",children:[(0,Fn.jsx)(iB,{categories:a,selectedCategory:t,onSelectCategory:e,children:n}),(0,Fn.jsx)(r$.Button,{__next40pxDefaultSize:!0,className:"block-editor-inserter__patterns-explore-button",onClick:()=>s(!0),variant:"secondary",children:(0,n$.__)("Explore all patterns")})]}),c&&(0,Fn.jsx)(J1,{categories:a,children:u=>(0,Fn.jsx)("div",{className:"block-editor-inserter__category-panel",children:(0,Fn.jsx)(tB,{onInsert:o,rootClientId:r,category:u},u.name)})}),i&&(0,Fn.jsx)(qZ,{initialCategory:t||a[0],patternCategories:a,onModalClose:()=>s(!1),rootClientId:r})]}):(0,Fn.jsx)(ps,{})}var i$=dxe;var S$=l(L(),1),_$=l(Y(),1),x$=l(P(),1),lB=l(I(),1);var aB=l(P(),1),b$=l(L(),1),k$=l(Y(),1);var f$=l(P(),1),m$=l(L(),1);var Rt=l(P(),1),zn=l(L(),1),da=l(I(),1),a5=l(Z(),1);var Ty=l(M(),1),l$=l(On(),1),c$=l(qC(),1),u$=l(rn(),1);var s$=l(Z(),1),a$=l(x(),1),fxe={image:"img",video:"video",audio:"audio"};function sB(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=fxe[t],s=(0,a$.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,s$.createBlock)(`core/${t}`,o),s]}var tt=l(x(),1),mxe=["image"],pxe={placement:"bottom-end",className:"block-editor-inserter__media-list__item-preview-options__popover"};function hxe({category:e,media:t}){if(!e.getReportUrl)return null;let o=e.getReportUrl(t);return(0,tt.jsx)(Rt.DropdownMenu,{className:"block-editor-inserter__media-list__item-preview-options",label:(0,zn.__)("Options"),popoverProps:pxe,icon:ts,children:()=>(0,tt.jsx)(Rt.MenuGroup,{children:(0,tt.jsx)(Rt.MenuItem,{onClick:()=>window.open(o,"_blank").focus(),icon:GO,children:(0,zn.sprintf)((0,zn.__)("Report %s"),e.mediaType)})})})}function gxe({onClose:e,onSubmit:t}){return(0,tt.jsxs)(Rt.Modal,{title:(0,zn.__)("Insert external image"),onRequestClose:e,className:"block-editor-inserter-media-tab-media-preview-inserter-external-image-modal",children:[(0,tt.jsxs)(Rt.__experimentalVStack,{spacing:3,children:[(0,tt.jsx)("p",{children:(0,zn.__)("This image cannot be uploaded to your Media Library, but it can still be inserted as an external image.")}),(0,tt.jsx)("p",{children:(0,zn.__)("External images can be removed by the external provider without warning and could even have legal compliance issues related to privacy legislation.")})]}),(0,tt.jsxs)(Rt.Flex,{className:"block-editor-block-lock-modal__actions",justify:"flex-end",expanded:!1,children:[(0,tt.jsx)(Rt.FlexItem,{children:(0,tt.jsx)(Rt.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:e,children:(0,zn.__)("Cancel")})}),(0,tt.jsx)(Rt.FlexItem,{children:(0,tt.jsx)(Rt.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:t,children:(0,zn.__)("Insert")})})]})]})}function d$({media:e,onClick:t,category:o}){let[r,n]=(0,da.useState)(!1),[i,s]=(0,da.useState)(!1),[a,c]=(0,da.useState)(!1),[u,d]=(0,da.useMemo)(()=>sB(e,o.mediaType),[e,o.mediaType]),{createErrorNotice:f,createSuccessNotice:m}=(0,Ty.useDispatch)(l$.store),{getSettings:p,getBlock:h}=(0,Ty.useSelect)(S),{updateBlockAttributes:g}=(0,Ty.useDispatch)(S),b=(0,da.useCallback)(_=>{if(a)return;let w=p(),C=(0,a5.cloneBlock)(_),{id:E,url:R,caption:O}=C.attributes;if(!E&&!w.mediaUpload){n(!0);return}if(E){t(C);return}c(!0),window.fetch(R).then(B=>B.blob()).then(B=>{let T=(0,u$.getFilename)(R)||"image.jpg",A=new File([B],T,{type:B.type});w.mediaUpload({filesList:[A],additionalData:{caption:O},onFileChange([N]){(0,c$.isBlobURL)(N.url)||(h(C.clientId)?g(C.clientId,{...C.attributes,id:N.id,url:N.url}):(t({...C,attributes:{...C.attributes,id:N.id,url:N.url}}),m((0,zn.__)("Image uploaded and inserted."),{type:"snackbar",id:"inserter-notice"})),c(!1))},allowedTypes:mxe,onError(N){f(N,{type:"snackbar",id:"inserter-notice"}),c(!1)}})}).catch(()=>{n(!0),c(!1)})},[a,p,t,m,g,f,h]),k=typeof e.title=="string"?e.title:e.title?.rendered||(0,zn.__)("no title"),v=(0,da.useCallback)(()=>s(!0),[]),y=(0,da.useCallback)(()=>s(!1),[]);return(0,tt.jsxs)(tt.Fragment,{children:[(0,tt.jsx)(jh,{isEnabled:!0,blocks:[u],children:({draggable:_,onDragStart:w,onDragEnd:C})=>(0,tt.jsx)("div",{className:D("block-editor-inserter__media-list__list-item",{"is-hovered":i}),draggable:_,onDragStart:w,onDragEnd:C,children:(0,tt.jsxs)("div",{onMouseEnter:v,onMouseLeave:y,children:[(0,tt.jsx)(Rt.Tooltip,{text:k,children:(0,tt.jsx)(Rt.Composite.Item,{render:(0,tt.jsx)("div",{"aria-label":k,role:"option",className:"block-editor-inserter__media-list__item"}),onClick:()=>b(u),children:(0,tt.jsxs)("div",{className:"block-editor-inserter__media-list__item-preview",children:[d,a&&(0,tt.jsx)("div",{className:"block-editor-inserter__media-list__item-preview-spinner",children:(0,tt.jsx)(Rt.Spinner,{})})]})})}),!a&&(0,tt.jsx)(hxe,{category:o,media:e})]})})}),r&&(0,tt.jsx)(gxe,{onClose:()=>n(!1),onSubmit:()=>{t((0,a5.cloneBlock)(u)),m((0,zn.__)("Image inserted."),{type:"snackbar",id:"inserter-notice"}),n(!1)}})]})}var l5=l(x(),1);function bxe({mediaList:e,category:t,onClick:o,label:r=(0,m$.__)("Media List")}){return(0,l5.jsx)(f$.Composite,{role:"listbox",className:"block-editor-inserter__media-list","aria-label":r,children:e.map((n,i)=>(0,l5.jsx)(d$,{media:n,category:t,onClick:o},n.id||n.sourceId||i))})}var p$=bxe;var Ml=l(I(),1),c5=l(M(),1);function h$(e,t={}){let[o,r]=(0,Ml.useState)(),[n,i]=(0,Ml.useState)(!1),s=(0,Ml.useRef)();return(0,Ml.useEffect)(()=>{(async()=>{let a=JSON.stringify({category:e.name,...t});s.current=a,i(!0),r([]);let c=await e.fetch?.(t);a===s.current&&(r(c),i(!1))})()},[e.name,...Object.values(t)]),{mediaList:o,isLoading:n}}function g$(e){let[t,o]=(0,Ml.useState)([]),r=(0,c5.useSelect)(a=>F(a(S)).getInserterMediaCategories(),[]),{canInsertImage:n,canInsertVideo:i,canInsertAudio:s}=(0,c5.useSelect)(a=>{let{canInsertBlockType:c}=a(S);return{canInsertImage:c("core/image",e),canInsertVideo:c("core/video",e),canInsertAudio:c("core/audio",e)}},[e]);return(0,Ml.useEffect)(()=>{(async()=>{let a=[];if(!r)return;let c=new Map(await Promise.all(r.map(async d=>{if(d.isExternalResource)return[d.name,!0];let f=[];try{f=await d.fetch({per_page:1})}catch{}return[d.name,!!f.length]}))),u={image:n,video:i,audio:s};r.forEach(d=>{u[d.mediaType]&&c.get(d.name)&&a.push(d)}),a.length&&o(a)})()},[n,i,s,r]),t}var Tu=l(x(),1),kxe=10;function Iy({rootClientId:e,onInsert:t,category:o}){let[r,n,i]=(0,k$.useDebouncedInput)(),{mediaList:s,isLoading:a}=h$(o,{per_page:i?20:kxe,search:i}),c="block-editor-inserter__media-panel",u=o.labels.search_items||(0,b$.__)("Search");return(0,Tu.jsxs)("div",{className:c,children:[(0,Tu.jsx)(aB.SearchControl,{className:`${c}-search`,onChange:n,value:r,label:u,placeholder:u}),a&&(0,Tu.jsx)("div",{className:`${c}-spinner`,children:(0,Tu.jsx)(aB.Spinner,{})}),!a&&!s?.length&&(0,Tu.jsx)(ps,{}),!a&&!!s?.length&&(0,Tu.jsx)(p$,{rootClientId:e,onClick:t,mediaList:s,category:o})]})}var v$=l(M(),1);function vxe({fallback:e=null,children:t}){return(0,v$.useSelect)(r=>{let{getSettings:n}=r(S);return!!n().mediaUpload},[])?t:e}var bs=vxe;var y$=l(P(),1),yxe=()=>null,Iu=(0,y$.withFilters)("editor.MediaUpload")(yxe);var jn=l(x(),1),Sxe=["image","video","audio"];function _xe({rootClientId:e,selectedCategory:t,onSelectCategory:o,onInsert:r,children:n}){let i=g$(e),s=(0,_$.useViewportMatch)("medium","<"),a="block-editor-inserter__media-tabs",c=(0,lB.useCallback)(d=>{if(!d?.url)return;let f=window.__experimentalDataViewsMediaModal&&d.mime_type?d.mime_type.split("/")[0]:d.type,[m]=sB(d,f);r(m)},[r]),u=(0,lB.useMemo)(()=>i.map(d=>({...d,label:d.labels.name})),[i]);return u.length?(0,jn.jsxs)(jn.Fragment,{children:[!s&&(0,jn.jsxs)("div",{className:`${a}-container`,children:[(0,jn.jsx)(iB,{categories:u,selectedCategory:t,onSelectCategory:o,children:n}),(0,jn.jsx)(bs,{children:(0,jn.jsx)(Iu,{multiple:!1,onSelect:c,allowedTypes:Sxe,render:({open:d})=>(0,jn.jsx)(x$.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,S$.__)("Open Media Library")})})})]}),s&&(0,jn.jsx)(J1,{categories:u,children:d=>(0,jn.jsx)(Iy,{onInsert:r,rootClientId:e,category:d})})]}):(0,jn.jsx)(ps,{})}var u5=_xe;var Py=l(I(),1),Pu=l(L(),1),d5=l(P(),1),uB=l(Y(),1),B$=l(jo(),1),E$=l(M(),1);var w$=l(P(),1),{Fill:C$,Slot:xxe}=(0,w$.createSlotFill)("__unstableInserterMenuExtension");C$.Slot=xxe;var cB=C$;var gn=l(x(),1),wxe=9,Cxe=[];function Bxe({filterValue:e,onSelect:t,onHover:o,onHoverPattern:r,rootClientId:n,clientId:i,isAppender:s,__experimentalInsertionIndex:a,maxBlockPatterns:c,maxBlockTypes:u,showBlockDirectory:d=!1,isDraggable:f=!0,shouldFocusBlock:m=!0,prioritizePatterns:p,selectBlockOnInsert:h,isQuick:g}){let b=(0,uB.useDebounce)(B$.speak,500),{prioritizedBlocks:k}=(0,E$.useSelect)(G=>({prioritizedBlocks:G(S).getBlockListSettings(n)?.prioritizedInserterBlocks||Cxe}),[n]),[v,y]=Bu({onSelect:t,rootClientId:n,clientId:i,isAppender:s,insertionIndex:a,shouldFocusBlock:m,selectBlockOnInsert:h}),[_,w,C,E]=Xc(v,y,g),[R,,O]=Eu(y,v,void 0,g),B=(0,Py.useMemo)(()=>{if(c===0)return[];let G=wv(R,e);return c!==void 0?G.slice(0,c):G},[e,R,c]),T=u;p&&B.length>2&&(T=0);let A=(0,Py.useMemo)(()=>{if(T===0)return[];let G=_.filter(K=>K.name!=="core/block"),V=qs(G,"frecency","desc");!e&&k.length&&(V=Tw(V,k));let H=Cw(V,w,C,e);return T!==void 0?H.slice(0,T):H},[e,_,w,C,T,k]);(0,Py.useEffect)(()=>{if(!e)return;let G=A.length+B.length,V=(0,Pu.sprintf)((0,Pu._n)("%d result found.","%d results found.",G),G);b(V)},[e,b,A,B]);let N=(0,uB.useAsyncList)(A,{step:wxe}),z=A.length>0||B.length>0,U=!!A.length&&(0,gn.jsx)(Cu,{title:(0,gn.jsx)(d5.VisuallyHidden,{children:(0,Pu.__)("Blocks")}),children:(0,gn.jsx)(Gf,{items:N,onSelect:E,onHover:o,label:(0,Pu.__)("Blocks"),isDraggable:f})}),j=!!B.length&&(0,gn.jsx)(Cu,{title:(0,gn.jsx)(d5.VisuallyHidden,{children:(0,Pu.__)("Block patterns")}),children:(0,gn.jsx)("div",{className:"block-editor-inserter__quick-inserter-patterns",children:(0,gn.jsx)(ua,{blockPatterns:B,onClickPattern:O,onHover:r,isDraggable:f})})});return(0,gn.jsxs)(Vh,{children:[!d&&!z&&(0,gn.jsx)(ps,{}),p?j:U,!!A.length&&!!B.length&&(0,gn.jsx)("div",{className:"block-editor-inserter__quick-inserter-separator"}),p?U:j,d&&(0,gn.jsx)(cB.Slot,{fillProps:{onSelect:E,onHover:o,filterValue:e,hasItems:z,rootClientId:v},children:G=>G.length?G:z?null:(0,gn.jsx)(ps,{})})]})}var dB=Bxe;var mB=l(P(),1),T$=l(I(),1);var Dl=l(x(),1),{Tabs:fB}=F(mB.privateApis);function Exe({defaultTabId:e,onClose:t,onSelect:o,selectedTab:r,tabs:n,closeButtonLabel:i},s){return(0,Dl.jsx)("div",{className:"block-editor-tabbed-sidebar",children:(0,Dl.jsxs)(fB,{selectOnMove:!1,defaultTabId:e,onSelect:o,selectedTabId:r,children:[(0,Dl.jsxs)("div",{className:"block-editor-tabbed-sidebar__tablist-and-close-button",children:[(0,Dl.jsx)(mB.Button,{className:"block-editor-tabbed-sidebar__close-button",icon:nf,label:i,onClick:()=>t(),size:"compact"}),(0,Dl.jsx)(fB.TabList,{className:"block-editor-tabbed-sidebar__tablist",ref:s,children:n.map(a=>(0,Dl.jsx)(fB.Tab,{tabId:a.name,className:"block-editor-tabbed-sidebar__tab",children:a.title},a.name))})]}),n.map(a=>(0,Dl.jsx)(fB.TabPanel,{tabId:a.name,focusable:!1,className:"block-editor-tabbed-sidebar__tabpanel",ref:a.panelRef,children:a.panel},a.name))]})})}var pB=(0,T$.forwardRef)(Exe);var hB=l(M(),1),Kh=l(I(),1);function Ry(e=!0){let{setZoomLevel:t,resetZoomLevel:o}=F((0,hB.useDispatch)(S)),{isZoomedOut:r,isZoomOut:n}=(0,hB.useSelect)(a=>{let{isZoomOut:c}=F(a(S));return{isZoomedOut:c(),isZoomOut:c}},[]),i=(0,Kh.useRef)(!1),s=(0,Kh.useRef)(e);(0,Kh.useEffect)(()=>{r!==s.current&&(i.current=!1)},[r]),(0,Kh.useEffect)(()=>(s.current=e,e!==n()&&(i.current=!0,e?t("auto-scaled"):o()),()=>{i.current&&n()&&o()}),[e,n,o,t])}var Ke=l(x(),1),P$=()=>{};function Txe({rootClientId:e,clientId:t,isAppender:o,__experimentalInsertionIndex:r,onSelect:n,showInserterHelpPanel:i,showMostUsedBlocks:s,__experimentalFilterValue:a="",shouldFocusBlock:c=!0,onPatternCategorySelection:u,onClose:d,__experimentalInitialTab:f,__experimentalInitialCategory:m},p){let{isZoomOutMode:h,hasSectionRootClientId:g}=(0,I$.useSelect)(ge=>{let{isZoomOut:Ae,getSectionRootClientId:Xe}=F(ge(S));return{isZoomOutMode:Ae(),hasSectionRootClientId:!!Xe()}},[]),[b,k,v]=(0,Oy.useDebouncedInput)(a),[y,_]=(0,Ot.useState)(null),[w,C]=(0,Ot.useState)(m),[E,R]=(0,Ot.useState)("all"),[O,B]=(0,Ot.useState)(null),T=(0,Oy.useViewportMatch)("large"),N=(0,Oy.useViewportMatch)("medium","<")?d:P$;function z(){return f||(h?"patterns":"blocks")}let[U,j]=(0,Ot.useState)(z());Ry(g&&(U==="patterns"||U==="media")&&T);let[V,H,K]=Bu({rootClientId:e,clientId:t,isAppender:o,insertionIndex:r,shouldFocusBlock:c}),oe=(0,Ot.useRef)(),ee=(0,Ot.useCallback)((ge,Ae,Xe,dt)=>{H(ge,Ae,Xe,dt),n(ge),N(),window.requestAnimationFrame(()=>{!c&&!oe.current?.contains(p.current.ownerDocument.activeElement)&&oe.current?.querySelector("button").focus()})},[H,N,n,p,c]),J=(0,Ot.useCallback)((ge,Ae,...Xe)=>{K(!1),H(ge,{patternName:Ae},...Xe),n(),N()},[H,N,n,K]),ie=(0,Ot.useCallback)(ge=>{K(ge),_(ge)},[K,_]),de=(0,Ot.useCallback)((ge,Ae)=>{C(ge),R(Ae),u?.()},[C,u]),q=U==="patterns"&&!v&&!!w,ne=U==="media"&&!!O,X=(0,Ot.useMemo)(()=>U==="media"?null:(0,Ke.jsxs)(Ke.Fragment,{children:[(0,Ke.jsx)(Xh.SearchControl,{className:"block-editor-inserter__search",onChange:ge=>{y&&_(null),k(ge)},value:b,label:(0,Ru.__)("Search"),placeholder:(0,Ru.__)("Search")}),!!v&&(0,Ke.jsx)(dB,{filterValue:v,onSelect:n,onHover:ie,rootClientId:e,clientId:t,isAppender:o,__experimentalInsertionIndex:r,showBlockDirectory:!0,shouldFocusBlock:c,prioritizePatterns:U==="patterns"})]}),[U,y,_,k,b,v,n,ie,c,t,e,r,o]),W=(0,Ot.useMemo)(()=>(0,Ke.jsxs)(Ke.Fragment,{children:[(0,Ke.jsx)("div",{className:"block-editor-inserter__block-list",children:(0,Ke.jsx)(LZ,{ref:oe,rootClientId:V,onInsert:ee,onHover:ie,showMostUsedBlocks:s})}),i&&(0,Ke.jsxs)("div",{className:"block-editor-inserter__tips",children:[(0,Ke.jsx)(Xh.VisuallyHidden,{as:"h2",children:(0,Ru.__)("A tip for using the block editor")}),(0,Ke.jsx)(Z9,{})]})]}),[V,ee,ie,s,i]),Q=(0,Ot.useMemo)(()=>(0,Ke.jsx)(i$,{rootClientId:V,onInsert:J,onSelectCategory:de,selectedCategory:w,children:q&&(0,Ke.jsx)(tB,{rootClientId:V,onInsert:J,category:w,patternFilter:E,showTitlesAsTooltip:!0})}),[V,J,de,E,w,q]),se=(0,Ot.useMemo)(()=>(0,Ke.jsx)(u5,{rootClientId:V,selectedCategory:O,onSelectCategory:B,onInsert:ee,children:ne&&(0,Ke.jsx)(Iy,{rootClientId:V,onInsert:ee,category:O})}),[V,ee,O,B,ne]),ce=ge=>{ge!=="patterns"&&C(null),j(ge)},_e=(0,Ot.useRef)();return(0,Ot.useLayoutEffect)(()=>{_e.current&&window.requestAnimationFrame(()=>{_e.current.querySelector('[role="tab"][aria-selected="true"]')?.focus()})},[]),(0,Ke.jsxs)("div",{className:D("block-editor-inserter__menu",{"show-panel":q||ne,"is-zoom-out":h}),ref:p,children:[(0,Ke.jsx)("div",{className:"block-editor-inserter__main-area",children:(0,Ke.jsx)(pB,{ref:_e,onSelect:ce,onClose:d,selectedTab:U,closeButtonLabel:(0,Ru.__)("Close Block Inserter"),tabs:[{name:"blocks",title:(0,Ru.__)("Blocks"),panel:(0,Ke.jsxs)(Ke.Fragment,{children:[X,U==="blocks"&&!v&&W]})},{name:"patterns",title:(0,Ru.__)("Patterns"),panel:(0,Ke.jsxs)(Ke.Fragment,{children:[X,U==="patterns"&&!v&&Q]})},{name:"media",title:(0,Ru.__)("Media"),panel:(0,Ke.jsxs)(Ke.Fragment,{children:[X,se]})}]})}),i&&y&&(0,Ke.jsx)(Xh.Popover,{className:"block-editor-inserter__preview-container__popover",placement:"right-start",offset:16,focusOnMount:!1,animate:!1,children:(0,Ke.jsx)(z1,{item:y})})]})}var f5=(0,Ot.forwardRef)(Txe);function Ixe(e,t){return(0,Ke.jsx)(f5,{...e,onPatternCategorySelection:P$,ref:t})}var R$=(0,Ot.forwardRef)(Ixe);var gB=l(I(),1),Ay=l(L(),1),bB=l(P(),1),O$=l(M(),1);var Zf=l(x(),1),Pxe=6,Rxe=6,Oxe=2;function kB({onSelect:e,rootClientId:t,clientId:o,isAppender:r,selectBlockOnInsert:n,hasSearch:i=!0}){let[s,a]=(0,gB.useState)(""),[c,u]=Bu({onSelect:e,rootClientId:t,clientId:o,isAppender:r,selectBlockOnInsert:n}),[d]=Xc(c,u,!0),{setInserterIsOpened:f,insertionIndex:m}=(0,O$.useSelect)(g=>{let{getSettings:b,getBlockIndex:k,getBlockCount:v}=g(S),y=b(),_=k(o),w=v();return{setInserterIsOpened:y.__experimentalSetIsInserterOpened,insertionIndex:_===-1?w:_}},[o]),p=i&&d.length>Pxe;(0,gB.useEffect)(()=>{f&&f(!1)},[f]);let h=()=>{f({filterValue:s,onSelect:e,rootClientId:t,insertionIndex:m})};return(0,Zf.jsxs)("div",{className:D("block-editor-inserter__quick-inserter",{"has-search":p,"has-expand":f}),children:[p&&(0,Zf.jsx)(bB.SearchControl,{className:"block-editor-inserter__search",value:s,onChange:g=>{a(g)},label:(0,Ay.__)("Search"),placeholder:(0,Ay.__)("Search")}),(0,Zf.jsx)("div",{className:"block-editor-inserter__quick-inserter-results",children:(0,Zf.jsx)(dB,{filterValue:s,onSelect:e,rootClientId:t,clientId:o,isAppender:r,maxBlockPatterns:s?Oxe:0,maxBlockTypes:Rxe,isDraggable:!1,selectBlockOnInsert:n,isQuick:!0})}),f&&(0,Zf.jsx)(bB.Button,{__next40pxDefaultSize:!0,className:"block-editor-inserter__quick-inserter-expand",onClick:h,"aria-label":(0,Ay.__)("Browse all. This will open the main inserter panel in the editor toolbar."),children:(0,Ay.__)("Browse all")})]})}var Ly=l(x(),1),Axe=({onToggle:e,disabled:t,isOpen:o,blockTitle:r,hasSingleBlockType:n,toggleProps:i={}})=>{let{as:s=vB.Button,label:a,onClick:c,...u}=i,d=a;!d&&n?d=(0,Vl.sprintf)((0,Vl._x)("Add %s","directly add the only allowed block"),r):d||(d=(0,Vl._x)("Add block","Generic label for block inserter button"));function f(m){e&&e(m),c&&c(m)}return(0,Ly.jsx)(s,{__next40pxDefaultSize:i.as?void 0:!0,icon:mi,label:d,tooltipPosition:"bottom",onClick:f,className:"block-editor-inserter__toggle","aria-haspopup":n?!1:"true","aria-expanded":n?!1:o,disabled:t,...u})},Lxe=class extends L$.Component{constructor(){super(...arguments),this.onToggle=this.onToggle.bind(this),this.renderToggle=this.renderToggle.bind(this),this.renderContent=this.renderContent.bind(this)}onToggle(e){let{onToggle:t}=this.props;t&&t(e)}renderToggle({onToggle:e,isOpen:t}){let{disabled:o,blockTitle:r,hasSingleBlockType:n,directInsertBlock:i,toggleProps:s,hasItems:a,renderToggle:c=Axe}=this.props;return c({onToggle:e,isOpen:t,disabled:o||!a,blockTitle:r,hasSingleBlockType:n,directInsertBlock:i,toggleProps:s})}renderContent({onClose:e}){let{rootClientId:t,clientId:o,isAppender:r,showInserterHelpPanel:n,__experimentalIsQuick:i,onSelectOrClose:s,selectBlockOnInsert:a}=this.props;return i?(0,Ly.jsx)(kB,{onSelect:c=>{let u=Array.isArray(c)&&c?.length?c[0]:c;s&&typeof s=="function"&&s(u),e()},rootClientId:t,clientId:o,isAppender:r,selectBlockOnInsert:a}):(0,Ly.jsx)(R$,{onSelect:()=>{e()},rootClientId:t,clientId:o,isAppender:r,showInserterHelpPanel:n})}render(){let{position:e,hasSingleBlockType:t,directInsertBlock:o,insertOnlyAllowedBlock:r,__experimentalIsQuick:n,onSelectOrClose:i}=this.props;return t||o?this.renderToggle({onToggle:r}):(0,Ly.jsx)(vB.Dropdown,{className:"block-editor-inserter",contentClassName:D("block-editor-inserter__popover",{"is-quick":n}),popoverProps:{position:e,shift:!0},onToggle:this.onToggle,expandOnMobile:!0,headerTitle:(0,Vl.__)("Add a block"),renderToggle:this.renderToggle,renderContent:this.renderContent,onClose:i})}},Ti=(0,SB.compose)([(0,yB.withSelect)((e,{clientId:t,rootClientId:o,shouldDirectInsert:r=!0})=>{let{getBlockRootClientId:n,hasInserterItems:i,getAllowedBlocks:s,getDirectInsertBlock:a}=e(S),{getBlockVariations:c}=e(Ny.store);o=o||n(t)||void 0;let u=s(o),d=r&&a(o),f=u?.length===1&&c(u[0].name,"inserter")?.length===0,m=!1;return f&&(m=u[0]),{hasItems:i(o),hasSingleBlockType:f,blockTitle:m?m.title:"",allowedBlockType:m,directInsertBlock:d,rootClientId:o}}),(0,yB.withDispatch)((e,t,{select:o})=>({insertOnlyAllowedBlock(){let{rootClientId:r,clientId:n,isAppender:i,hasSingleBlockType:s,allowedBlockType:a,directInsertBlock:c,onSelectOrClose:u,selectBlockOnInsert:d}=t;if(!s&&!c)return;function f(b){let{getBlock:k,getPreviousBlockClientId:v}=o(S);if(!b||!n&&!r)return{};let y={},_={};if(n){let w=k(n),C=k(v(n));w?.name===C?.name&&(_=C?.attributes||{})}else{let w=k(r);if(w?.innerBlocks?.length){let C=w.innerBlocks[w.innerBlocks.length-1];c&&c?.name===C.name&&(_=C.attributes)}}return b.forEach(w=>{_.hasOwnProperty(w)&&(y[w]=_[w])}),y}function m(){let{getBlockIndex:b,getBlockSelectionEnd:k,getBlockOrder:v,getBlockRootClientId:y}=o(S);if(n)return b(n);let _=k();return!i&&_&&y(_)===r?b(_)+1:v(r).length}let{insertBlock:p}=e(S),h;if(c){let b=f(c.attributesToCopy);h=(0,Ny.createBlock)(c.name,{...c.attributes||{},...b})}else h=(0,Ny.createBlock)(a.name);p(h,m(),r,d),u&&u(h);let g=(0,Vl.sprintf)((0,Vl.__)("%s block added"),a.title);(0,A$.speak)(g)}})),(0,SB.ifCondition)(({hasItems:e,isAppender:t,rootClientId:o,clientId:r})=>e||!t&&!o&&!r)])(Lxe);var My=l(x(),1),Nxe="\uFEFF";function qh({rootClientId:e}){let{showPrompt:t,isLocked:o,placeholder:r,isManualGrid:n}=(0,_B.useSelect)(u=>{let{getBlockCount:d,getSettings:f,getTemplateLock:m,getBlockAttributes:p}=u(S),h=!d(e),{bodyPlaceholder:g}=f();return{showPrompt:h,isLocked:!!m(e),placeholder:g,isManualGrid:p(e)?.layout?.isManualPlacement}},[e]),{insertDefaultBlock:i,startTyping:s}=(0,_B.useDispatch)(S);if(o||n)return null;let a=(0,N$.decodeEntities)(r)||(0,m5.__)("Type / to choose a block"),c=()=>{i(void 0,e),s()};return(0,My.jsxs)("div",{"data-root-client-id":e||"",className:D("block-editor-default-block-appender",{"has-visible-prompt":t}),children:[(0,My.jsx)("p",{tabIndex:"0",role:"button","aria-label":(0,m5.__)("Add default block"),className:"block-editor-default-block-appender__content",onKeyDown:u=>{(xB.ENTER===u.keyCode||xB.SPACE===u.keyCode)&&c()},onClick:()=>c(),onFocus:()=>{t&&c()},children:t?a:Nxe}),(0,My.jsx)(Ti,{rootClientId:e,position:"bottom right",isAppender:!0,__experimentalIsQuick:!0})]})}var M$=l(P(),1),p5=l(I(),1),Dy=l(L(),1);var D$=l(Re(),1);var wB=l(x(),1);function V$({rootClientId:e,className:t,onFocus:o,tabIndex:r,onSelect:n},i){return(0,wB.jsx)(Ti,{position:"bottom center",rootClientId:e,__experimentalIsQuick:!0,onSelectOrClose:(...s)=>{n&&typeof n=="function"&&n(...s)},renderToggle:({onToggle:s,disabled:a,isOpen:c,blockTitle:u,hasSingleBlockType:d})=>{let f=!d,m=d?(0,Dy.sprintf)((0,Dy._x)("Add %s","directly add the only allowed block"),u):(0,Dy._x)("Add block","Generic label for block inserter button");return(0,wB.jsx)(M$.Button,{__next40pxDefaultSize:!0,ref:i,onFocus:o,tabIndex:r,className:D(t,"block-editor-button-block-appender"),onClick:s,"aria-haspopup":f?"true":void 0,"aria-expanded":f?c:void 0,disabled:a,label:m,showTooltip:!0,children:(0,wB.jsx)(Ee,{icon:mi})})},isAppender:!0})}var F$=(0,p5.forwardRef)((e,t)=>((0,D$.default)("wp.blockEditor.ButtonBlockerAppender",{alternative:"wp.blockEditor.ButtonBlockAppender",since:"5.9"}),V$(e,t))),Ou=(0,p5.forwardRef)(V$);var Qh=l(x(),1);function Mxe({rootClientId:e}){return(0,h5.useSelect)(o=>o(S).canInsertBlockType((0,z$.getDefaultBlockName)(),e))?(0,Qh.jsx)(qh,{rootClientId:e}):(0,Qh.jsx)(Ou,{rootClientId:e,className:"block-list-appender__toggle"})}function j$({rootClientId:e,CustomAppender:t,className:o,tagName:r="div"}){let n=(0,h5.useSelect)(i=>{let{getBlockInsertionPoint:s,isBlockInsertionPointVisible:a,getBlockCount:c}=i(S),u=s();return a()&&e===u?.rootClientId&&c(e)===0},[e]);return(0,Qh.jsx)(r,{tabIndex:-1,className:D("block-list-appender wp-block",o,{"is-drag-over":n}),contentEditable:!1,"data-block":!0,children:t?(0,Qh.jsx)(t,{}):(0,Qh.jsx)(Mxe,{rootClientId:e})})}var oY=l(Y(),1),Fy=l(M(),1),rY=l(I(),1),nY=l(L(),1);var Jh=l(M(),1),Lu=l(I(),1),EB=l(P(),1),eY=l(Y(),1);var U$=l(M(),1),Au=l(I(),1),W$=l(P(),1),Z$=l(L(),1);var H$=l(Y(),1),g5=l(je(),1),G$=new WeakMap;function Dxe(e){let t=(0,H$.useRefEffect)(o=>{function r(i){let{deltaX:s,deltaY:a,target:c}=i,u=e.current,d=G$.get(u);d||(d=(0,g5.getScrollContainer)(u),G$.set(u,d));let f=(0,g5.getScrollContainer)(c);o.contains(f)||d.scrollBy(s,a)}let n={passive:!0};return o.addEventListener("wheel",r,n),()=>{o.removeEventListener("wheel",r,n)}},[e]);return e?t:null}var $f=Dxe;var b5=l(x(),1),Vxe=Number.MAX_SAFE_INTEGER;function Fxe({previousClientId:e,nextClientId:t,children:o,__unstablePopoverSlot:r,__unstableContentRef:n,operation:i="insert",nearestSide:s="right",...a}){let[c,u]=(0,Au.useReducer)(v=>(v+1)%Vxe,0),{orientation:d,rootClientId:f,isVisible:m}=(0,U$.useSelect)(v=>{let{getBlockListSettings:y,getBlockRootClientId:_,isBlockVisible:w}=v(S),C=_(e??t);return{orientation:y(C)?.orientation||"vertical",rootClientId:C,isVisible:w(e)&&w(t)}},[e,t]),p=ht(e),h=ht(t),g=d==="vertical",b=(0,Au.useMemo)(()=>c<0||!p&&!h||!m?void 0:{contextElement:i==="group"?h||p:p||h,getBoundingClientRect(){let y=p?p.getBoundingClientRect():null,_=h?h.getBoundingClientRect():null,w=0,C=0,E=0,R=0;if(i==="group"){let O=_||y;C=O.top,E=0,R=O.bottom-O.top,w=s==="left"?O.left-2:O.right-2}else g?(C=y?y.bottom:_.top,E=y?y.width:_.width,R=_&&y?_.top-y.bottom:0,w=y?y.left:_.left):(C=y?y.top:_.top,R=y?y.height:_.height,(0,Z$.isRTL)()?(w=_?_.right:y.left,E=y&&_?y.left-_.right:0):(w=y?y.right:_.left,E=y&&_?_.left-y.right:0),E=Math.max(E,0));return new window.DOMRect(w,C,E,R)}},[p,h,c,g,m,i,s]),k=$f(n);return(0,Au.useLayoutEffect)(()=>{if(!p)return;let v=new window.MutationObserver(u);return v.observe(p,{attributes:!0}),()=>{v.disconnect()}},[p]),(0,Au.useLayoutEffect)(()=>{if(!h)return;let v=new window.MutationObserver(u);return v.observe(h,{attributes:!0}),()=>{v.disconnect()}},[h]),(0,Au.useLayoutEffect)(()=>{if(p)return p.ownerDocument.defaultView.addEventListener("resize",u),()=>{p.ownerDocument.defaultView?.removeEventListener("resize",u)}},[p]),!p&&!h||!m?null:(0,b5.jsx)(W$.Popover,{ref:k,animate:!1,anchor:b,focusOnMount:!1,__unstableSlotName:r,inline:!r,...a,className:D("block-editor-block-popover","block-editor-block-popover__inbetween",a.className),resize:!1,flip:!1,placement:"overlay",variant:"unstyled",children:(0,b5.jsx)("div",{className:"block-editor-block-popover__inbetween-container",children:o})},t+"--"+f)}var CB=Fxe;var X$=l(M(),1),q$=l(Y(),1),Q$=l(P(),1);var zl=l(I(),1);var $$=l(Y(),1),Y$=l(P(),1),Fl=l(I(),1);var k5=l(x(),1),zxe=Number.MAX_SAFE_INTEGER;function jxe({clientId:e,bottomClientId:t,children:o,__unstablePopoverSlot:r,__unstableContentRef:n,shift:i=!0,...s},a){let c=ht(e),u=ht(t??e),d=(0,$$.useMergeRefs)([a,$f(n)]),[f,m]=(0,Fl.useReducer)(h=>(h+1)%zxe,0);(0,Fl.useLayoutEffect)(()=>{if(!c)return;let h=new window.MutationObserver(m);return h.observe(c,{attributes:!0}),()=>{h.disconnect()}},[c]);let p=(0,Fl.useMemo)(()=>{if(!(f<0||!c||t&&!u))return{getBoundingClientRect(){return u?HM(uh(c),uh(u)):uh(c)},contextElement:c}},[f,c,t,u]);return!c||t&&!u?null:(0,k5.jsx)(Y$.Popover,{ref:d,animate:!1,focusOnMount:!1,anchor:p,__unstableSlotName:r,inline:!r,placement:"top-start",resize:!1,flip:!1,shift:i,...s,className:D("block-editor-block-popover",s.className),variant:"unstyled",children:o})}var Yf=(0,Fl.forwardRef)(jxe),Gxe=({clientId:e,bottomClientId:t,children:o,...r},n)=>(0,k5.jsx)(Yf,{...r,bottomClientId:t,clientId:e,__unstableContentRef:void 0,__unstablePopoverSlot:void 0,ref:n,children:o}),K$=(0,Fl.forwardRef)(Gxe);var BB=l(x(),1);function Hxe({clientId:e,bottomClientId:t,children:o,shift:r=!1,additionalStyles:n,...i},s){t??=e;let a=ht(e);return(0,BB.jsx)(Yf,{ref:s,clientId:e,bottomClientId:t,shift:r,...i,children:a&&e===t?(0,BB.jsx)(Uxe,{selectedElement:a,additionalStyles:n,children:o}):o})}function Uxe({selectedElement:e,additionalStyles:t={},children:o}){let[r,n]=(0,zl.useState)(e.offsetWidth),[i,s]=(0,zl.useState)(e.offsetHeight);(0,zl.useEffect)(()=>{let c=new window.ResizeObserver(()=>{n(e.offsetWidth),s(e.offsetHeight)});return c.observe(e,{box:"border-box"}),()=>c.disconnect()},[e]);let a=(0,zl.useMemo)(()=>({position:"absolute",width:r,height:i,...t}),[r,i,t]);return(0,BB.jsx)("div",{style:a,children:o})}var Ii=(0,zl.forwardRef)(Hxe);var v5=l(x(),1),Vy={hide:{opacity:0,scaleY:.75},show:{opacity:1,scaleY:1},exit:{opacity:0,scaleY:.9}};function Wxe({__unstablePopoverSlot:e,__unstableContentRef:t}){let{clientId:o}=(0,X$.useSelect)(n=>{let{getBlockOrder:i,getBlockInsertionPoint:s}=n(S),a=s(),c=i(a.rootClientId);return c.length?{clientId:c[a.index]}:{}},[]),r=(0,q$.useReducedMotion)();return(0,v5.jsx)(Ii,{clientId:o,__unstablePopoverSlot:e,__unstableContentRef:t,className:"block-editor-block-popover__drop-zone",children:(0,v5.jsx)(Q$.__unstableMotion.div,{"data-testid":"block-popover-drop-zone",initial:r?Vy.show:Vy.hide,animate:Vy.show,exit:r?Vy.show:Vy.exit,className:"block-editor-block-popover__drop-zone-foreground"})})}var J$=Wxe;var jl=l(x(),1),eg=(0,Lu.createContext)();eg.displayName="InsertionPointOpenRefContext";function Zxe({__unstablePopoverSlot:e,__unstableContentRef:t,operation:o="insert",nearestSide:r="right"}){let{selectBlock:n,hideInsertionPoint:i}=(0,Jh.useDispatch)(S),s=(0,Lu.useContext)(eg),a=(0,Lu.useRef)(),{orientation:c,previousClientId:u,nextClientId:d,rootClientId:f,isInserterShown:m,isDistractionFree:p,isZoomOutMode:h}=(0,Jh.useSelect)(O=>{let{getBlockOrder:B,getBlockListSettings:T,getBlockInsertionPoint:A,isBlockBeingDragged:N,getPreviousBlockClientId:z,getNextBlockClientId:U,getSettings:j,isZoomOut:G}=F(O(S)),V=A(),H=B(V.rootClientId);if(!H.length)return{};let K=H[V.index-1],oe=H[V.index];for(;N(K);)K=z(K);for(;N(oe);)oe=U(oe);let ee=j();return{previousClientId:K,nextClientId:oe,orientation:T(V.rootClientId)?.orientation||"vertical",rootClientId:V.rootClientId,isDistractionFree:ee.isDistractionFree,isInserterShown:V?.__unstableWithInserter,isZoomOutMode:G()}},[]),{getBlockEditingMode:g}=(0,Jh.useSelect)(S),b=(0,eY.useReducedMotion)();function k(O){O.target===a.current&&d&&g(d)!=="disabled"&&n(d,-1)}function v(O){O.target===a.current&&!s.current&&i()}function y(O){O.target!==a.current&&(s.current=!0)}let _=(0,Lu.useCallback)(O=>{!O&&s.current&&(s.current=!1)},[s]),w={start:{opacity:0,scale:0},rest:{opacity:1,scale:1,transition:{delay:m?.5:0,type:"tween"}},hover:{opacity:1,scale:1,transition:{delay:.5,type:"tween"}}},C={start:{scale:b?1:0},rest:{scale:1,transition:{delay:.4,type:"tween"}}};if(p||h&&o!=="insert")return null;let R=D("block-editor-block-list__insertion-point",c==="horizontal"||o==="group"?"is-horizontal":"is-vertical");return(0,jl.jsx)(CB,{previousClientId:u,nextClientId:d,__unstablePopoverSlot:e,__unstableContentRef:t,operation:o,nearestSide:r,children:(0,jl.jsxs)(EB.__unstableMotion.div,{layout:!b,initial:b?"rest":"start",animate:"rest",whileHover:"hover",whileTap:"pressed",exit:"start",ref:a,tabIndex:-1,onClick:k,onFocus:y,className:D(R,{"is-with-inserter":m}),onHoverEnd:v,children:[(0,jl.jsx)(EB.__unstableMotion.div,{variants:w,className:"block-editor-block-list__insertion-point-indicator","data-testid":"block-list-insertion-point-indicator"}),m&&(0,jl.jsx)(EB.__unstableMotion.div,{variants:C,className:D("block-editor-block-list__insertion-point-inserter"),children:(0,jl.jsx)(Ti,{ref:_,position:"bottom center",clientId:d,rootClientId:f,__experimentalIsQuick:!0,onToggle:O=>{s.current=O},onSelectOrClose:()=>{s.current=!1}})})]})})}function tY(e){let{insertionPoint:t,isVisible:o,isBlockListEmpty:r}=(0,Jh.useSelect)(n=>{let{getBlockInsertionPoint:i,isBlockInsertionPointVisible:s,getBlockCount:a}=n(S),c=i();return{insertionPoint:c,isVisible:s(),isBlockListEmpty:a(c?.rootClientId)===0}},[]);return!o||r?null:t.operation==="replace"?(0,jl.jsx)(J$,{...e},`${t.rootClientId}-${t.index}`):(0,jl.jsx)(Zxe,{operation:t.operation,nearestSide:t.nearestSide,...e})}function iY(){let e=(0,rY.useContext)(eg),t=(0,Fy.useSelect)(g=>g(S).getSettings().isDistractionFree||F(g(S)).isZoomOut(),[]),{getBlockListSettings:o,getBlockIndex:r,isMultiSelecting:n,getSelectedBlockClientIds:i,getSettings:s,getTemplateLock:a,__unstableIsWithinBlockOverlay:c,getBlockEditingMode:u,getBlockName:d,getBlockAttributes:f,getParentSectionBlock:m}=F((0,Fy.useSelect)(S)),{showInsertionPoint:p,hideInsertionPoint:h}=(0,Fy.useDispatch)(S);return(0,oY.useRefEffect)(g=>{if(t)return;function b(k){if(e===void 0||e.current||k.target.nodeType===k.target.TEXT_NODE||n())return;if(!k.target.classList.contains("block-editor-block-list__layout")){h();return}let v;if(k.target.classList.contains("is-root-container")||(v=(k.target.getAttribute("data-block")?k.target:k.target.closest("[data-block]")).getAttribute("data-block")),a(v)||u(v)==="disabled"||d(v)==="core/block"||v&&f(v).layout?.isManualPlacement)return;let y=o(v),_=y?.orientation||"vertical",w=!!y?.__experimentalCaptureToolbars,C=k.clientY,E=k.clientX,O=Array.from(k.target.children).find(N=>{let z=N.getBoundingClientRect();return N.classList.contains("wp-block")&&_==="vertical"&&z.top>C||N.classList.contains("wp-block")&&_==="horizontal"&&((0,nY.isRTL)()?z.right<E:z.left>E)});if(!O){h();return}if(!O.id&&(O=O.firstElementChild,!O)){h();return}let B=O.id.slice(6);if(!B||c(B)||m(B)||i().includes(B)&&_==="vertical"&&!w&&!s().hasFixedToolbar)return;let T=O.getBoundingClientRect();if(_==="horizontal"&&(k.clientY>T.bottom||k.clientY<T.top)||_==="vertical"&&(k.clientX>T.right||k.clientX<T.left)){h();return}let A=r(B);if(A===0){h();return}p(v,A,{__unstableWithInserter:!0})}return g.addEventListener("mousemove",b),()=>{g.removeEventListener("mousemove",b)}},[e,o,r,n,p,h,i,t])}var TB=l(M(),1),sY=l(Y(),1);var aY=l(x(),1);function Kf(){let{getSettings:e,hasSelectedBlock:t,hasMultiSelection:o}=(0,TB.useSelect)(S),{clearSelectedBlock:r}=(0,TB.useDispatch)(S),{clearBlockSelection:n}=e();return(0,sY.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 lY(e){return(0,aY.jsx)("div",{ref:Kf(),...e})}var IY=l(Y(),1),og=l(I(),1),PY=l(M(),1),Jf=l(Z(),1);var cY=l(x(),1);function uY({showSeparator:e,isFloating:t,onAddBlock:o,isToggle:r}){let{clientId:n}=Ne();return(0,cY.jsx)(Ou,{className:D({"block-list-appender__toggle":r}),rootClientId:n,showSeparator:e,isFloating:t,onAddBlock:o})}var dY=l(x(),1);function fY(){let{clientId:e}=Ne();return(0,dY.jsx)(qh,{rootClientId:e})}var PB=l(I(),1),hY=l(M(),1),IB=l(Re(),1),gY=l(zy(),1);var jy=new WeakMap;function $xe(){let e;return t=>((e===void 0||!(0,gY.isShallowEqual)(e,t))&&(e=t),e)}function pY(e){let[t]=(0,PB.useState)($xe);return t(e)}function bY(e,t,o,r,n,i,s,a,c,u,d,f){let m=(0,hY.useRegistry)(),p=pY(o),h=pY(r),g=c===void 0||t==="contentOnly"?t:c;(0,PB.useLayoutEffect)(()=>{let b={allowedBlocks:p,prioritizedInserterBlocks:h,templateLock:g};if(u!==void 0&&(b.__experimentalCaptureToolbars=u),d!==void 0)b.orientation=d;else{let k=ns(f?.type);b.orientation=k.getOrientation(f)}s!==void 0&&((0,IB.default)("__experimentalDefaultBlock",{alternative:"defaultBlock",since:"6.3",version:"6.4"}),b.defaultBlock=s),n!==void 0&&(b.defaultBlock=n),a!==void 0&&((0,IB.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,IB.default)("Using `Function` as a `directInsert` argument",{alternative:"`boolean` values",since:"6.5"}),jy.get(m)||jy.set(m,{}),jy.get(m)[e]=b,window.queueMicrotask(()=>{let k=jy.get(m);if(Object.keys(k).length){let{updateBlockListSettings:v}=m.dispatch(S);v(k),jy.set(m,{})}})},[e,p,h,g,n,i,s,a,u,d,f,m])}var y5=l(ef(),1),RB=l(I(),1),kY=l(M(),1),vY=l(Z(),1);function yY(e,t,o,r){let n=(0,kY.useRegistry)(),i=(0,RB.useRef)(null);(0,RB.useLayoutEffect)(()=>{let s=!1,{getBlocks:a,getSelectedBlocksInitialCaretPosition:c,isBlockSelected:u}=n.select(S),{replaceInnerBlocks:d,__unstableMarkNextChangeAsNotPersistent:f}=n.dispatch(S);return window.queueMicrotask(()=>{if(s)return;let m=a(e),p=m.length===0||o==="all"||o==="contentOnly",h=!(0,y5.default)(t,i.current);if(!p||!h)return;i.current=t;let g=(0,vY.synchronizeBlocksWithTemplate)(m,t);(0,y5.default)(g,m)||(f(),d(e,g,m.length===0&&r&&g.length!==0&&u(e),c()))}),()=>{s=!0}},[t,o,e,n,r])}var SY=l(Z(),1),_Y=l(M(),1);function xY(e){return(0,_Y.useSelect)(t=>{let o=t(S).getBlock(e);if(!o)return;let r=t(SY.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 Qf=l(M(),1),LB=l(I(),1),NB=l(Y(),1),EY=l(L(),1),tg=l(Z(),1);var S5=l(I(),1),Gn=l(Z(),1),Xf=l(M(),1),wY=l(je(),1);function _5(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 Yxe(e,t,o,r,n,i,s,a,c){return u=>{let{srcRootClientId:d,srcClientIds:f,type:m,blocks:p}=_5(u);if(m==="inserter"){s();let h=p.map(g=>(0,Gn.cloneBlock)(g));i(h,!0,null)}if(m==="block"){let h=o(f[0]);if(d===e&&h===t||f.includes(e)||r(f).some(v=>v===e))return;if(a==="group"){let v=f.map(y=>c(y));i(v,!0,null,f);return}let g=d===e,b=f.length,k=g&&h<t?t-b:t;n(f,d,k)}}}function Kxe(e,t,o,r,n){return i=>{if(!t().mediaUpload)return;let s=(0,Gn.findTransform)((0,Gn.getBlockTransforms)("from"),a=>a.type==="files"&&r(a.blockName,e)&&a.isMatch(i));if(s){let a=s.transform(i,o);n(a)}}}function Xxe(e){return t=>{let o=(0,Gn.pasteHandler)({HTML:t,mode:"BLOCKS"});o.length&&e(o)}}function OB(e,t,o={}){let{operation:r="insert",nearestSide:n="right"}=o,{canInsertBlockType:i,getBlockIndex:s,getClientIdsOfDescendants:a,getBlockOrder:c,getBlocksByClientId:u,getSettings:d,getBlock:f}=(0,Xf.useSelect)(S),{getGroupingBlockName:m}=(0,Xf.useSelect)(Gn.store),{insertBlocks:p,moveBlocksToPosition:h,updateBlockAttributes:g,clearSelectedBlock:b,replaceBlocks:k,removeBlocks:v}=(0,Xf.useDispatch)(S),y=(0,Xf.useRegistry)(),_=(0,S5.useCallback)((O,B=!0,T=0,A=[])=>{Array.isArray(O)||(O=[O]);let z=c(e)[t];if(r==="replace")k(z,O,void 0,T);else if(r==="group"){let U=f(z);n==="left"?O.push(U):O.unshift(U);let j=O.map(K=>(0,Gn.createBlock)(K.name,K.attributes,K.innerBlocks)),G=O.every(K=>K.name==="core/image"),V=i("core/gallery",e),H=(0,Gn.createBlock)(G&&V?"core/gallery":m(),{layout:{type:"flex",flexWrap:G&&V?null:"nowrap"}},j);k([z,...A],H,void 0,T)}else p(O,t,e,B,T)},[c,e,t,r,k,f,n,i,m,p]),w=(0,S5.useCallback)((O,B,T)=>{if(r==="replace"){let A=u(O),z=c(e)[t];y.batch(()=>{v(O,!1),k(z,A,void 0,0)})}else h(O,B,e,T)},[r,c,u,h,y,v,k,t,e]),C=Yxe(e,t,s,a,w,_,b,r,f),E=Kxe(e,d,g,i,_),R=Xxe(_);return O=>{let B=(0,wY.getFilesFromDataTransfer)(O.dataTransfer),T=O.dataTransfer.getData("text/html");T?R(T):B.length?E(B):C(O)}}function qxe(e,t,o){let r=o==="top"||o==="bottom",{x:n,y:i}=e,s=r?n:i,a=r?i:n,c=r?t.left:t.top,u=r?t.right:t.bottom,d=t[o],f;return s>=c&&s<=u?f=s:s<u?f=c:f=u,Math.sqrt((s-f)**2+(a-d)**2)}function qf(e,t,o=["top","bottom","left","right"]){let r,n;return o.forEach(i=>{let s=qxe(e,t,i);(r===void 0||s<r)&&(r=s,n=i)}),[r,n]}function AB(e,t){return t.left<=e.x&&t.right>=e.x&&t.top<=e.y&&t.bottom>=e.y}function CY(e,t){return t.top<=e.y&&t.bottom>=e.y}var x5=30,Qxe=120,Jxe=120;function ewe(e,t,o="vertical",r={}){let n=o==="horizontal"?["left","right"]:["top","bottom"],i=0,s="before",a=1/0,c=null,u="right",{dropZoneElement:d,parentBlockOrientation:f,rootBlockIndex:m=0}=r;if(d&&f!=="horizontal"){let k=d.getBoundingClientRect(),[v,y]=qf(t,k,["top","bottom"]);if(k.height>Qxe&&v<x5){if(y==="top")return[m,"before"];if(y==="bottom")return[m+1,"after"]}}let p=(0,EY.isRTL)();if(d&&f==="horizontal"){let k=d.getBoundingClientRect(),[v,y]=qf(t,k,["left","right"]);if(k.width>Jxe&&v<x5){if(p&&y==="right"||!p&&y==="left")return[m,"before"];if(p&&y==="left"||!p&&y==="right")return[m+1,"after"]}}e.forEach(({isUnmodifiedDefaultBlock:k,getBoundingClientRect:v,blockIndex:y,blockOrientation:_})=>{let w=v();if(!w)return;let[C,E]=qf(t,w,n),[R,O]=qf(t,w,["left","right"]),B=AB(t,w);k&&B?C=0:o==="vertical"&&_!=="horizontal"&&(B&&R<x5||!B&&CY(t,w))&&(c=y,u=O),C<a&&(s=E==="bottom"||!p&&E==="right"||p&&E==="left"?"after":"before",a=C,i=y)});let h=i+(s==="after"?1:-1),g=!!e[i]?.isUnmodifiedDefaultBlock,b=!!e[h]?.isUnmodifiedDefaultBlock;return c!==null?[c,"group",u]:!g&&!b?[s==="after"?i+1:i,"insert"]:[g?i:h,"replace"]}function MB(e,t,o,r){let n=!0;if(t){let a=t?.map(({name:c})=>c);n=o.every(c=>a?.includes(c))}let s=o.map(a=>e(a)).every(a=>{let[c]=a?.parent||[];return c?c===r:!0});return n&&s}function BY(e,t){let{defaultView:o}=t;return!!(o&&e instanceof o.HTMLElement&&e.closest("[data-is-insertion-point]"))}function TY({dropZoneElement:e,rootClientId:t="",parentClientId:o="",isDisabled:r=!1}={}){let n=(0,Qf.useRegistry)(),[i,s]=(0,LB.useState)({index:null,operation:"insert"}),{getBlockType:a,getBlockVariations:c,getGroupingBlockName:u}=(0,Qf.useSelect)(tg.store),{canInsertBlockType:d,getBlockListSettings:f,getBlocks:m,getBlockIndex:p,getDraggedBlockClientIds:h,getBlockNamesByClientId:g,getAllowedBlocks:b,isDragging:k,isGroupable:v,isZoomOut:y,getSectionRootClientId:_,getBlockParents:w}=F((0,Qf.useSelect)(S)),{showInsertionPoint:C,hideInsertionPoint:E,startDragging:R,stopDragging:O}=F((0,Qf.useDispatch)(S)),B=OB(i.operation==="before"||i.operation==="after"?o:t,i.index,{operation:i.operation,nearestSide:i.nearestSide}),T=(0,NB.useThrottle)((0,LB.useCallback)((A,N)=>{k()||R();let z=h(),U=[t,...w(t,!0)];if(z.some(W=>U.includes(W)))return;let G=b(t),V=g([t])[0],H=g(z);if(!MB(a,G,H,V))return;let oe=_();if(y()&&oe!==t)return;let ee=m(t).filter(W=>!((0,tg.hasBlockSupport)(W.name,"visibility",!0)&&W.attributes?.metadata?.blockVisibility===!1));if(ee.length===0){n.batch(()=>{s({index:0,operation:"insert"}),C(t,0,{operation:"insert"})});return}let J=ee.map(W=>{let Q=W.clientId;return{isUnmodifiedDefaultBlock:(0,tg.isUnmodifiedDefaultBlock)(W),getBoundingClientRect:()=>{let se=N.getElementById(`block-${Q}`);return se?se.getBoundingClientRect():null},blockIndex:p(Q),blockOrientation:f(Q)?.orientation}}),ie=ewe(J,{x:A.clientX,y:A.clientY},f(t)?.orientation,{dropZoneElement:e,parentBlockClientId:o,parentBlockOrientation:o?f(o)?.orientation:void 0,rootBlockIndex:p(t)}),[de,q,ne]=ie,X=J[de]?.isUnmodifiedDefaultBlock;if(!(y()&&!X&&q!=="insert")){if(q==="group"){let W=ee[de],Q=[W.name,...H].every(Ae=>Ae==="core/image"),se=d("core/gallery",t),ce=v([W.clientId,h()]),_e=c(u(),"block"),ge=_e&&_e.find(({name:Ae})=>Ae==="group-row");if(Q&&!se&&(!ce||!ge)||!Q&&(!ce||!ge))return}n.batch(()=>{s({index:de,operation:q,nearestSide:ne});let W=["before","after"].includes(q)?o:t;C(W,de,{operation:q,nearestSide:ne})})}},[k,b,t,g,h,a,_,y,m,f,e,o,p,n,R,C,d,v,c,u]),200);return(0,NB.__experimentalUseDropZone)({dropZoneElement:e,isDisabled:r,onDrop:B,onDragOver(A){T(A,A.currentTarget.ownerDocument)},onDragLeave(A){let{ownerDocument:N}=A.currentTarget;BY(A.relatedTarget,N)||BY(A.target,N)||(T.cancel(),E())},onDragEnd(){T.cancel(),O(),E()}})}var Gl=l(x(),1),twe={};function owe({children:e,clientId:t}){let o=xY(t);return(0,Gl.jsx)(K_,{value:o,children:e})}var rwe=(0,og.memo)(xy);function RY(e){let{clientId:t,allowedBlocks:o,prioritizedInserterBlocks:r,defaultBlock:n,directInsert:i,__experimentalDefaultBlock:s,__experimentalDirectInsert:a,template:c,templateLock:u,wrapperRef:d,templateInsertUpdatesSelection:f,__experimentalCaptureToolbars:m,__experimentalAppenderTagName:p,renderAppender:h,orientation:g,placeholder:b,layout:k,name:v,blockType:y,parentLock:_,defaultLayout:w}=e;bY(t,_,o,r,n,i,s,a,u,m,g,k),yY(t,c,u,f);let C=(0,Jf.getBlockSupport)(v,"layout")||(0,Jf.getBlockSupport)(v,"__experimentalLayout")||twe,{allowSizingOnChildren:E=!1}=C,R=k||C,O=(0,og.useMemo)(()=>({...w,...R,...E&&{allowSizingOnChildren:!0}}),[w,R,E]),B=(0,Gl.jsx)(rwe,{rootClientId:t,renderAppender:h,__experimentalAppenderTagName:p,layout:O,wrapperRef:d,placeholder:b});return!y?.providesContext||Object.keys(y.providesContext).length===0?B:(0,Gl.jsx)(owe,{clientId:t,children:B})}function nwe(e){return r1(e),(0,Gl.jsx)(RY,{...e})}var DB=(0,og.forwardRef)((e,t)=>{let o=em({ref:t},e);return(0,Gl.jsx)("div",{className:"block-editor-inner-blocks",children:(0,Gl.jsx)("div",{...o})})});function em(e={},t={}){let{__unstableDisableLayoutClassNames:o,__unstableDisableDropZone:r,dropZoneElement:n}=t,{clientId:i,layout:s=null,__unstableLayoutClassNames:a=""}=Ne(),c=(0,PY.useSelect)(_=>{let{getBlockName:w,isZoomOut:C,getTemplateLock:E,getBlockRootClientId:R,getBlockEditingMode:O,getBlockSettings:B,getSectionRootClientId:T}=F(_(S));if(!i){let H=T();return{isDropZoneDisabled:C()&&H!==""}}let{hasBlockSupport:A,getBlockType:N}=_(Jf.store),z=w(i),U=O(i),j=R(i),[G]=B(i,"layout"),V=U==="disabled";if(C()){let H=T();V=i!==H}return{__experimentalCaptureToolbars:A(z,"__experimentalExposeControlsToChildren",!1),name:z,blockType:N(z),parentLock:E(j),parentClientId:j,isDropZoneDisabled:V,defaultLayout:G}},[i]),{__experimentalCaptureToolbars:u,name:d,blockType:f,parentLock:m,parentClientId:p,isDropZoneDisabled:h,defaultLayout:g}=c,b=TY({dropZoneElement:n,rootClientId:i,parentClientId:p}),k=(0,IY.useMergeRefs)([e.ref,r||h||s?.isManualPlacement&&window.__experimentalEnableGridInteractivity?null:b]),v={__experimentalCaptureToolbars:u,layout:s,name:d,blockType:f,parentLock:m,defaultLayout:g,...t},y=v.value&&v.onChange?nwe:RY;return{...e,ref:k,className:D(e.className,"block-editor-block-list__layout",o?"":a),children:i?(0,Gl.jsx)(y,{...v,clientId:i}):(0,Gl.jsx)(xy,{...t})}}em.save=Jf.__unstableGetInnerBlocksProps;DB.DefaultBlockAppender=fY;DB.ButtonBlockAppender=uY;DB.Content=()=>em.save().children;var Gy=DB;var Hy=l(Y(),1),rg=l(M(),1),w5=l(je(),1),yr=l(at(),1);var OY=l(x(),1),iwe=new Set([yr.UP,yr.RIGHT,yr.DOWN,yr.LEFT,yr.ENTER,yr.BACKSPACE]);function swe(e){let{keyCode:t,shiftKey:o}=e;return!o&&iwe.has(t)}function Uy(){let e=(0,rg.useSelect)(o=>o(S).isTyping(),[]),{stopTyping:t}=(0,rg.useDispatch)(S);return(0,Hy.useRefEffect)(o=>{if(!e)return;let{ownerDocument:r}=o,n,i;function s(a){let{clientX:c,clientY:u}=a;n&&i&&(n!==c||i!==u)&&t(),n=c,i=u}return r.addEventListener("mousemove",s),()=>{r.removeEventListener("mousemove",s)}},[e,t])}function Wy(){let{isTyping:e}=(0,rg.useSelect)(i=>{let{isTyping:s}=i(S);return{isTyping:s()}},[]),{startTyping:t,stopTyping:o}=(0,rg.useDispatch)(S),r=Uy(),n=(0,Hy.useRefEffect)(i=>{let{ownerDocument:s}=i,{defaultView:a}=s,c=a.getSelection();if(e){let p=function(k){let{target:v}=k;b=a.setTimeout(()=>{(0,w5.isTextField)(v)||o()})},h=function(k){let{keyCode:v}=k;(v===yr.ESCAPE||v===yr.TAB)&&o()},g=function(){c.isCollapsed||o()};var u=p,d=h,f=g;let b;return i.addEventListener("focus",p),i.addEventListener("keydown",h),s.addEventListener("selectionchange",g),()=>{a.clearTimeout(b),i.removeEventListener("focus",p),i.removeEventListener("keydown",h),s.removeEventListener("selectionchange",g)}}function m(p){let{type:h,target:g}=p;!(0,w5.isTextField)(g)||!i.contains(g)||h==="keydown"&&!swe(p)||t()}return i.addEventListener("keypress",m),i.addEventListener("keydown",m),()=>{i.removeEventListener("keypress",m),i.removeEventListener("keydown",m)}},[e,t,o]);return(0,Hy.useMergeRefs)([r,n])}function awe({children:e}){return(0,OY.jsx)("div",{ref:Wy(),children:e})}var AY=awe;var Zy=l(P(),1),LY=l(Y(),1),NY=l(M(),1),MY=l(I(),1),DY=l(L(),1);var VB=l(x(),1);function C5({clientId:e,rootClientId:t="",position:o="top"}){let[r,n]=(0,MY.useState)(!1),{sectionRootClientId:i,sectionClientIds:s,insertionPoint:a,blockInsertionPointVisible:c,blockInsertionPoint:u,blocksBeingDragged:d}=(0,NY.useSelect)(w=>{let{getInsertionPoint:C,getBlockOrder:E,getSectionRootClientId:R,isBlockInsertionPointVisible:O,getBlockInsertionPoint:B,getDraggedBlockClientIds:T}=F(w(S)),A=R(),N=E(A);return{sectionRootClientId:A,sectionClientIds:N,insertionPoint:C(),blockInsertionPoint:B(),blockInsertionPointVisible:O(),blocksBeingDragged:T()}},[]),f=(0,LY.useReducedMotion)();if(!e)return;let m=!1;if(!(t===i&&s&&s.includes(e)))return null;let h=a?.index===0&&e===s[a.index],g=a&&a.hasOwnProperty("index")&&e===s[a.index-1];o==="top"&&(m=h||c&&u.index===0&&e===s[u.index]),o==="bottom"&&(m=g||c&&e===s[u.index-1]);let b=d[0],k=d.includes(e),v=s.indexOf(b),_=(v>0?s[v-1]:null)===e;return(k||_)&&(m=!1),(0,VB.jsx)(Zy.__unstableAnimatePresence,{children:m&&(0,VB.jsx)(Zy.__unstableMotion.div,{initial:{height:0},animate:{height:"calc(1 * var(--wp-block-editor-iframe-zoom-out-frame-size) / var(--wp-block-editor-iframe-zoom-out-scale)"},exit:{height:0},transition:{type:"tween",duration:f?0:.2,ease:[.6,0,.4,1]},className:D("block-editor-block-list__zoom-out-separator",{"is-dragged-over":r}),"data-is-insertion-point":"true",onDragOver:()=>n(!0),onDragLeave:()=>n(!1),children:(0,VB.jsx)(Zy.__unstableMotion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0,transition:{delay:-.125}},transition:{ease:"linear",duration:.1,delay:.125},children:(0,DY.__)("Drop pattern.")})})})}var Ur=l(x(),1),OC=(0,Nu.createContext)();OC.displayName="IntersectionObserverContext";var FB=new WeakMap,lwe={trailing:!0};function cwe({className:e,...t}){let{isOutlineMode:o,isFocusMode:r,editedContentOnlySection:n}=(0,Pi.useSelect)(d=>{let{getSettings:f,isTyping:m,hasBlockSpotlight:p,getEditedContentOnlySection:h}=F(d(S)),{outlineMode:g,focusMode:b}=f();return{isOutlineMode:g&&!m(),isFocusMode:b||p(),editedContentOnlySection:h()}},[]),i=(0,Pi.useRegistry)(),{setBlockVisibility:s}=(0,Pi.useDispatch)(S),a=(0,zB.useDebounce)((0,Nu.useCallback)(()=>{let d={};FB.get(i).forEach(([f,m])=>{d[f]=m}),s(d)},[i]),300,lwe),c=(0,Nu.useMemo)(()=>{let{IntersectionObserver:d}=window;if(d)return new d(f=>{FB.get(i)||FB.set(i,[]);for(let m of f){let p=m.target.getAttribute("data-block");FB.get(i).push([p,m.isIntersecting])}a()})},[]),u=em({ref:(0,zB.useMergeRefs)([Kf(),iY(),Wy()]),className:D("is-root-container",e,{"is-outline-mode":o,"is-focus-mode":r})},t);return(0,Ur.jsxs)(OC.Provider,{value:c,children:[(0,Ur.jsx)("div",{...u}),!!n&&(0,Ur.jsx)(uwe,{clientId:n})]})}function uwe({clientId:e}){let{stopEditingContentOnlySection:t}=F((0,Pi.useDispatch)(S)),o=(0,Pi.useSelect)(r=>{let{isBlockSelected:n,hasSelectedInnerBlock:i,getBlockSelectionStart:s}=r(S);return!s()||n(e)||i(e,!0)},[e]);return(0,Nu.useEffect)(()=>{o||t()},[o,t]),null}function Lh(e){return(0,Ur.jsx)(U_,{value:DR,children:(0,Ur.jsx)(cwe,{...e})})}var dwe=[],fwe=new Set;function mwe({placeholder:e,rootClientId:t,renderAppender:o,__experimentalAppenderTagName:r,layout:n=UN}){let i=o!==!1,s=!!o,{order:a,isZoomOut:c,selectedBlocks:u,visibleBlocks:d,shouldRenderAppender:f}=(0,Pi.useSelect)(m=>{let{getSettings:p,getBlockOrder:h,getSelectedBlockClientIds:g,__unstableGetVisibleBlocks:b,getTemplateLock:k,getBlockEditingMode:v,isSectionBlock:y,isContainerInsertableToInContentOnlyMode:_,getBlockName:w,isZoomOut:C,canInsertBlockType:E}=F(m(S)),R=h(t);if(p().isPreviewMode)return{order:R,selectedBlocks:dwe,visibleBlocks:fwe};let O=g(),B=O[0],T=!t&&!B&&(!R.length||!E((0,VY.getDefaultBlockName)(),t)),A=!!(t&&B&&t===B),N=k(t);return{order:R,selectedBlocks:O,visibleBlocks:b(),isZoomOut:C(),shouldRenderAppender:(!y(t)||_(w(B),t))&&v(t)!=="disabled"&&(!N||N==="contentOnly")&&i&&!C()&&(s||A||T)}},[t,i,s]);return(0,Ur.jsxs)(TG,{value:n,children:[a.map(m=>(0,Ur.jsxs)(Pi.AsyncModeProvider,{value:!d.has(m)&&!u.includes(m),children:[c&&(0,Ur.jsx)(C5,{clientId:m,rootClientId:t,position:"top"}),(0,Ur.jsx)(H9,{rootClientId:t,clientId:m}),c&&(0,Ur.jsx)(C5,{clientId:m,rootClientId:t,position:"bottom"})]},m)),a.length<1&&e,f&&(0,Ur.jsx)(j$,{tagName:r,rootClientId:t,CustomAppender:o})]})}function xy(e){return(0,Ur.jsx)(Pi.AsyncModeProvider,{value:!1,children:(0,Ur.jsx)(mwe,{...e})})}var Eg=l(M(),1),kV=l(je(),1),vV=l(P(),1),CQ=l(ra(),1),sT=l(I(),1),Tg=l(Z(),1),yV=l(jo(),1),Ig=l(L(),1);var lK=l(Y(),1),cK=l(M(),1),uK=l(je(),1),fa=l(I(),1);var Hn=l(L(),1),om=l(Z(),1),ZB=l(P(),1),oK=l(Y(),1),rK=l(M(),1),$B=l(I(),1);var jB=l(P(),1),zY=l(Mv(),1),jY=l(Re(),1),GB=l(I(),1);var Sr=l(P(),1),FY=(0,Sr.createSlotFill)("InspectorControls"),pwe=(0,Sr.createSlotFill)("InspectorAdvancedControls"),hwe=(0,Sr.createSlotFill)("InspectorControlsBindings"),gwe=(0,Sr.createSlotFill)("InspectorControlsBackground"),bwe=(0,Sr.createSlotFill)("InspectorControlsBorder"),kwe=(0,Sr.createSlotFill)("InspectorControlsColor"),vwe=(0,Sr.createSlotFill)("InspectorControlsFilter"),ywe=(0,Sr.createSlotFill)("InspectorControlsDimensions"),Swe=(0,Sr.createSlotFill)("InspectorControlsPosition"),_we=(0,Sr.createSlotFill)("InspectorControlsTypography"),xwe=(0,Sr.createSlotFill)("InspectorControlsListView"),wwe=(0,Sr.createSlotFill)("InspectorControlsStyles"),Cwe=(0,Sr.createSlotFill)("InspectorControlsEffects"),Bwe=(0,Sr.createSlotFill)("InspectorControlsContent"),Ewe={default:FY,advanced:pwe,background:gwe,bindings:hwe,border:bwe,color:kwe,content:Bwe,dimensions:ywe,effects:Cwe,filter:vwe,list:xwe,position:Swe,settings:FY,styles:wwe,typography:_we},Mu=Ewe,$y=(0,Sr.createSlotFill)(Symbol("PrivateInspectorControlsAllowedBlocks"));var ng=l(x(),1);function tm({children:e,group:t="default",__experimentalGroup:o,resetAllFilter:r}){o&&((0,jY.default)("`__experimentalGroup` property in `InspectorControlsFill`",{since:"6.2",version:"6.4",alternative:"`group`"}),t=o);let n=Ne(),i=Mu[t]?.Fill;if(!i)return(0,zY.default)(`Unknown InspectorControls group "${t}" provided.`),null;let s=n[gp]&&(t==="list"||t==="content");return!n[Tc]&&!s?null:(0,ng.jsx)(jB.__experimentalStyleProvider,{document,children:(0,ng.jsx)(i,{children:a=>(0,ng.jsx)(Iwe,{fillProps:a,children:e,resetAllFilter:r})})})}function Twe({resetAllFilter:e,children:t}){let{registerResetAllFilter:o,deregisterResetAllFilter:r}=(0,GB.useContext)(jB.__experimentalToolsPanelContext);return(0,GB.useEffect)(()=>{if(e&&o&&r)return o(e),()=>{r(e)}},[e,o,r]),t}function Iwe({children:e,resetAllFilter:t,fillProps:o}){let{forwardedContext:r=[]}=o,n=(0,ng.jsx)(Twe,{resetAllFilter:t,children:e});return r.reduce((i,[s,a])=>(0,ng.jsx)(s,{...a,children:i}),n)}var KY=l(P(),1),XY=l(Mv(),1),qY=l(Re(),1);var HY=l(P(),1),HB=l(M(),1),UY=l(I(),1);var GY=l(Y(),1);function Co(){return(0,GY.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}}}function ig(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 WY=l(x(),1);function ZY({children:e,group:t,label:o}){let{updateBlockAttributes:r}=(0,HB.useDispatch)(S),{getBlockAttributes:n,getMultiSelectedBlockClientIds:i,getSelectedBlockClientId:s,hasMultiSelection:a}=(0,HB.useSelect)(S),c=Co(),u=s(),d=(0,UY.useCallback)((f=[])=>{let m={},p=a()?i():[u];p.forEach(h=>{let{style:g}=n(h),b={style:g};f.forEach(k=>{b={...b,...k(b)}}),b={...b,style:Se(b.style)},m[h]=b}),r(p,m,!0)},[n,i,a,u,r]);return(0,WY.jsx)(HY.__experimentalToolsPanel,{className:`${t}-block-support-panel`,label:o,resetAll:d,panelId:u,hasInnerWrapper:!0,shouldRenderPlaceholderItems:!0,__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last",dropdownMenuProps:c,children:e},u)}var B5=l(P(),1),UB=l(I(),1),$Y=l(x(),1);function YY({Slot:e,fillProps:t,...o}){let r=(0,UB.useContext)(B5.__experimentalToolsPanelContext),n=(0,UB.useMemo)(()=>({...t??{},forwardedContext:[...t?.forwardedContext??[],[B5.__experimentalToolsPanelContext.Provider,{value:r}]]}),[r,t]);return(0,$Y.jsx)(e,{...o,fillProps:n,bubblesVirtually:!0})}var WB=l(x(),1);function E5({__experimentalGroup:e,group:t="default",label:o,fillProps:r,...n}){e&&((0,qY.default)("`__experimentalGroup` property in `InspectorControlsSlot`",{since:"6.2",version:"6.4",alternative:"`group`"}),t=e);let i=Mu[t],s=(0,KY.__experimentalUseSlotFills)(i?.name);if(!i)return(0,XY.default)(`Unknown InspectorControls group "${t}" provided.`),null;if(!s?.length)return null;let{Slot:a}=i;return o?(0,WB.jsx)(ZY,{group:t,label:o,children:(0,WB.jsx)(YY,{...n,fillProps:r,Slot:a})}):(0,WB.jsx)(a,{...n,fillProps:r,bubblesVirtually:!0})}var T5=l(x(),1),QY=tm;QY.Slot=E5;var Du=e=>(0,T5.jsx)(tm,{...e,group:"advanced"});Du.Slot=e=>(0,T5.jsx)(E5,{...e,group:"advanced"});Du.slotName="InspectorAdvancedControls";var fe=QY;var eK=l(M(),1),Vu=l(Z(),1),Yy=l(L(),1);function JY(e){let t=e?.style?.position?.type;return t==="sticky"?(0,Yy.__)("Sticky"):t==="fixed"?(0,Yy.__)("Fixed"):null}function xt(e){return(0,eK.useSelect)(t=>{if(!e)return null;let{getBlockName:o,getBlockAttributes:r,__experimentalGetParsedPattern:n}=t(S),{getBlockType:i,getActiveBlockVariation:s}=t(Vu.store),a=o(e),c=i(a);if(!c)return null;let u=r(e),d=u?.metadata?.patternName;if(d&&window?.__experimentalContentOnlyPatternInsertion){let k=n(d),v=JY(u);return{isSynced:!1,title:(0,Yy.__)("Pattern"),icon:pi,description:k?.description||(0,Yy.__)("A block pattern."),anchor:u?.anchor,positionLabel:v,positionType:u?.style?.position?.type,name:k?.title||u?.metadata?.name}}let f=s(a,u),m=(0,Vu.isReusableBlock)(c)||(0,Vu.isTemplatePart)(c),h=(m?(0,Vu.__experimentalGetBlockLabel)(c,u):void 0)||c.title,g=JY(u),b={isSynced:m,title:h,icon:c.icon,description:c.description,anchor:u?.anchor,positionLabel:g,positionType:u?.style?.position?.type,name:u?.metadata?.name};return f?{isSynced:m,title:f.title||c.title,icon:f.icon||c.icon,description:f.description||c.description,anchor:u?.anchor,positionLabel:g,positionType:u?.style?.position?.type,name:u?.metadata?.name}:b},[e])}var Ky=l(x(),1),Xy="position",I5={key:"default",value:"",name:(0,Hn.__)("Default")},P5={key:"sticky",value:"sticky",name:(0,Hn._x)("Sticky","Name for the value of the CSS position property"),hint:(0,Hn.__)("The block will stick to the top of the window instead of scrolling.")},tK={key:"fixed",value:"fixed",name:(0,Hn._x)("Fixed","Name for the value of the CSS position property"),hint:(0,Hn.__)("The block will not move when the page is scrolled.")},Pwe=["top","right","bottom","left"],Rwe=["sticky","fixed"];function Owe({selector:e,style:t}){let o="",{type:r}=t?.position||{};return Rwe.includes(r)&&(o+=`${e} {`,o+=`position: ${r};`,Pwe.forEach(n=>{t?.position?.[n]!==void 0&&(o+=`${n}: ${t.position[n]};`)}),(r==="sticky"||r==="fixed")&&(o+="z-index: 10"),o+="}"),o}function Awe(e){let t=(0,om.getBlockSupport)(e,Xy);return!!(t===!0||t?.sticky)}function Lwe(e){let t=(0,om.getBlockSupport)(e,Xy);return!!(t===!0||t?.fixed)}function Nwe(e){return!!(0,om.getBlockSupport)(e,Xy)}function nK(e){let t=e?.style?.position?.type;return t==="sticky"||t==="fixed"}function iK({name:e}={}){let[t,o]=pe("position.fixed","position.sticky"),r=!t&&!o;return!Nwe(e)||r}function Mwe({style:e={},clientId:t,name:o,setAttributes:r}){let n=Lwe(o),i=Awe(o),s=e?.position?.type,{firstParentClientId:a}=(0,rK.useSelect)(p=>{let{getBlockParents:h}=p(S),g=h(t);return{firstParentClientId:g[g.length-1]}},[t]),c=xt(a),u=i&&s===P5.value&&c?(0,Hn.sprintf)((0,Hn.__)("The block will stick to the scrollable area of the parent %s block."),c.title):null,d=(0,$B.useMemo)(()=>{let p=[I5];return(i||s===P5.value)&&p.push(P5),(n||s===tK.value)&&p.push(tK),p},[n,i,s]),f=p=>{let g={...e,position:{...e?.position,type:p,top:p==="sticky"||p==="fixed"?"0px":void 0}};r({style:Se(g)})},m=s&&d.find(p=>p.value===s)||I5;return $B.Platform.select({web:d.length>1?(0,Ky.jsx)(fe,{group:"position",children:(0,Ky.jsx)(ZB.BaseControl,{help:u,children:(0,Ky.jsx)(ZB.CustomSelectControl,{__next40pxDefaultSize:!0,label:(0,Hn.__)("Position"),hideLabelFromVision:!0,describedBy:(0,Hn.sprintf)((0,Hn.__)("Currently selected position: %s"),m.name),options:d,value:m,onChange:({selectedItem:p})=>{f(p.value)},size:"__unstable-large"})})}):null,native:null})}var R5={edit:function(t){return iK(t)?null:(0,Ky.jsx)(Mwe,{...t})},useBlockProps:Vwe,attributeKeys:["style"],hasSupport(e){return(0,om.hasBlockSupport)(e,Xy)}},Dwe={};function Vwe({name:e,style:t}){let o=(0,om.hasBlockSupport)(e,Xy),r=iK({name:e}),n=o&&!r,i=(0,oK.useInstanceId)(Dwe),s=`.wp-container-${i}.wp-container-${i}`,a;n&&(a=Owe({selector:s,style:t})||"");let c=D({[`wp-container-${i}`]:n&&!!a,[`is-position-${t?.position?.type}`]:n&&!!a&&!!t?.position?.type});return ks({css:a}),{className:c}}var dK={placement:"top-start"},sK={...dK,flip:!1,shift:!0},Fwe={...dK,flip:!0,shift:!1};function aK(e,t,o,r,n){if(!e||!t)return sK;let i=o?.scrollTop||0,s=uh(t),a=e.getBoundingClientRect(),c=i+a.top,u=e.ownerDocument.documentElement.clientHeight,d=c+r,f=s.top>d,m=s.height>u-r;return!n&&(f||m)?sK:Fwe}function YB({contentElement:e,clientId:t}){let o=ht(t),[r,n]=(0,fa.useState)(0),{blockIndex:i,isSticky:s}=(0,cK.useSelect)(m=>{let{getBlockIndex:p,getBlockAttributes:h}=m(S);return{blockIndex:p(t),isSticky:nK(h(t))}},[t]),a=(0,fa.useMemo)(()=>{if(e)return(0,uK.getScrollContainer)(e)},[e]),[c,u]=(0,fa.useState)(()=>aK(e,o,a,r,s)),d=(0,lK.useRefEffect)(m=>{n(m.offsetHeight)},[]),f=(0,fa.useCallback)(()=>u(aK(e,o,a,r,s)),[e,o,a,r]);return(0,fa.useLayoutEffect)(f,[i,f]),(0,fa.useLayoutEffect)(()=>{if(!e||!o)return;let m=e?.ownerDocument?.defaultView;m?.addEventHandler?.("resize",f);let p,h=o?.ownerDocument?.defaultView;return h.ResizeObserver&&(p=new h.ResizeObserver(f),p.observe(o)),()=>{m?.removeEventHandler?.("resize",f),p&&p.disconnect()}},[f,e,o]),{...c,ref:d}}var fK=l(M(),1);function KB(e){return(0,fK.useSelect)(o=>{let{getBlockRootClientId:r,getBlockParents:n,__experimentalGetBlockListSettingsForBlocks:i,isBlockInsertionPointVisible:s,getBlockInsertionPoint:a,getBlockOrder:c,hasMultiSelection:u,getLastMultiSelectedBlockClientId:d}=o(S),f=n(e),m=i(f),p=f.find(g=>m[g]?.__experimentalCaptureToolbars),h=!1;if(s()){let g=a();h=c(g.rootClientId)[g.index]===e}return{capturingClientId:p,isInsertionPointVisible:h,lastClientId:u()?d():null,rootClientId:r(e)}},[e])}var XB=l(x(),1);function mK({clientId:e,__unstableContentRef:t}){let{capturingClientId:o,isInsertionPointVisible:r,lastClientId:n,rootClientId:i}=KB(e),s=YB({contentElement:t?.current,clientId:e});return(0,XB.jsx)(Ii,{clientId:o||e,bottomClientId:n,className:D("block-editor-block-list__block-side-inserter-popover",{"is-insertion-point-visible":r}),__unstableContentRef:t,...s,children:(0,XB.jsx)("div",{className:"block-editor-block-list__empty-block-inserter",children:(0,XB.jsx)(Ti,{position:"bottom right",rootClientId:i,clientId:e,__experimentalIsQuick:!0})})})}var pQ=l(M(),1),Bg=l(I(),1),hQ=l(ra(),1);var cQ=l(L(),1),uQ=l(M(),1),pV=l(I(),1),dQ=l(Y(),1),ql=l(Z(),1),fQ=l(P(),1);var rm=l(P(),1),wK=l(M(),1),CK=l(L(),1);var kK=l(Z(),1),vK=l(P(),1),qy=l(M(),1),Qy=l(I(),1),yK=l(Y(),1);var hK=l(je(),1),ma=l(I(),1),qB=50,gK=25,zwe=1e3,pK=zwe*(gK/1e3);function bK(){let e=(0,ma.useRef)(null),t=(0,ma.useRef)(null),o=(0,ma.useRef)(null),r=(0,ma.useRef)(null);(0,ma.useEffect)(()=>()=>{r.current&&(clearInterval(r.current),r.current=null)},[]);let n=(0,ma.useCallback)(a=>{e.current=a.clientY,o.current=(0,hK.getScrollContainer)(a.target),r.current=setInterval(()=>{if(o.current&&t.current){let c=o.current.scrollTop+t.current;o.current.scroll({top:c})}},gK)},[]),i=(0,ma.useCallback)(a=>{if(!o.current)return;let c=o.current.offsetHeight,u=e.current-o.current.offsetTop,d=a.clientY-o.current.offsetTop;if(a.clientY>u){let f=Math.max(c-u-qB,0),m=Math.max(d-u-qB,0),p=f===0||m===0?0:m/f;t.current=pK*p}else if(a.clientY<u){let f=Math.max(u-qB,0),m=Math.max(u-d-qB,0),p=f===0||m===0?0:m/f;t.current=-pK*p}else t.current=0},[]);return[n,i,()=>{e.current=null,o.current=null,r.current&&(clearInterval(r.current),r.current=null)}]}var O5=l(x(),1),jwe=({appendToOwnerDocument:e,children:t,clientIds:o,cloneClassname:r,elementId:n,onDragStart:i,onDragEnd:s,fadeWhenDisabled:a=!1,dragComponent:c})=>{let{srcRootClientId:u,isDraggable:d,icon:f,visibleInserter:m,getBlockType:p}=(0,qy.useSelect)(B=>{let{canMoveBlocks:T,getBlockRootClientId:A,getBlockName:N,getBlockAttributes:z,isBlockInsertionPointVisible:U}=B(S),{getBlockType:j,getActiveBlockVariation:G}=B(kK.store),V=A(o[0]),H=N(o[0]),K=G(H,z(o[0]));return{srcRootClientId:V,isDraggable:T(o),icon:K?.icon||j(H)?.icon,visibleInserter:U(),getBlockType:j}},[o]),h=(0,Qy.useRef)(!1),[g,b,k]=bK(),{getAllowedBlocks:v,getBlockNamesByClientId:y,getBlockRootClientId:_}=(0,qy.useSelect)(S),{startDraggingBlocks:w,stopDraggingBlocks:C}=(0,qy.useDispatch)(S);(0,Qy.useEffect)(()=>()=>{h.current&&C()},[]);let R=ht(o[0])?.closest("body");return(0,Qy.useEffect)(()=>{if(!R||!a)return;let T=(0,yK.throttle)(A=>{if(!A.target.closest("[data-block]"))return;let N=y(o),z=A.target.closest("[data-block]").getAttribute("data-block"),U=v(z),j=y([z])[0],G;if(U?.length===0){let V=_(z),H=y([V])[0],K=v(V);G=MB(p,K,N,H)}else G=MB(p,U,N,j);!G&&!m?window?.document?.body?.classList?.add("block-draggable-invalid-drag-token"):window?.document?.body?.classList?.remove("block-draggable-invalid-drag-token")},200);return R.addEventListener("dragover",T),()=>{R.removeEventListener("dragover",T)}},[o,R,a,v,y,_,p,m]),d?(0,O5.jsx)(vK.Draggable,{appendToOwnerDocument:e,cloneClassname:r,__experimentalTransferDataType:"wp-blocks",transferData:{type:"block",srcClientIds:o,srcRootClientId:u},onDragStart:B=>{window.requestAnimationFrame(()=>{w(o),h.current=!0,g(B),i&&i()})},onDragOver:b,onDragEnd:()=>{C(),h.current=!1,k(),s&&s()},__experimentalDragComponent:c!==void 0?c:(0,O5.jsx)(H1,{count:o.length,icon:f,fadeWhenDisabled:!0}),elementId:n,children:({onDraggableStart:B,onDraggableEnd:T})=>t({draggable:!0,onDragStart:B,onDragEnd:T})}):t({draggable:!1})},QB=jwe;var _K=l(Z(),1),JB=l(P(),1),xK=l(Y(),1),eE=l(M(),1),tE=l(I(),1),Ri=l(L(),1);var ke=l(L(),1),Fu=(e,t)=>e==="up"?t==="horizontal"?(0,ke.isRTL)()?"right":"left":"up":e==="down"?t==="horizontal"?(0,ke.isRTL)()?"left":"right":"down":null;function SK(e,t,o,r,n,i,s){let a=o+1;if(e>1)return Gwe(e,o,r,n,i,s);if(r&&n)return(0,ke.sprintf)((0,ke.__)("Block %s is the only block, and cannot be moved"),t);if(i>0&&!n){let c=Fu("down",s);if(c==="down")return(0,ke.sprintf)((0,ke.__)("Move %1$s block from position %2$d down to position %3$d"),t,a,a+1);if(c==="left")return(0,ke.sprintf)((0,ke.__)("Move %1$s block from position %2$d left to position %3$d"),t,a,a+1);if(c==="right")return(0,ke.sprintf)((0,ke.__)("Move %1$s block from position %2$d right to position %3$d"),t,a,a+1)}if(i>0&&n){let c=Fu("down",s);if(c==="down")return(0,ke.sprintf)((0,ke.__)("Block %1$s is at the end of the content and can\u2019t be moved down"),t);if(c==="left")return(0,ke.sprintf)((0,ke.__)("Block %1$s is at the end of the content and can\u2019t be moved left"),t);if(c==="right")return(0,ke.sprintf)((0,ke.__)("Block %1$s is at the end of the content and can\u2019t be moved right"),t)}if(i<0&&!r){let c=Fu("up",s);if(c==="up")return(0,ke.sprintf)((0,ke.__)("Move %1$s block from position %2$d up to position %3$d"),t,a,a-1);if(c==="left")return(0,ke.sprintf)((0,ke.__)("Move %1$s block from position %2$d left to position %3$d"),t,a,a-1);if(c==="right")return(0,ke.sprintf)((0,ke.__)("Move %1$s block from position %2$d right to position %3$d"),t,a,a-1)}if(i<0&&r){let c=Fu("up",s);if(c==="up")return(0,ke.sprintf)((0,ke.__)("Block %1$s is at the beginning of the content and can\u2019t be moved up"),t);if(c==="left")return(0,ke.sprintf)((0,ke.__)("Block %1$s is at the beginning of the content and can\u2019t be moved left"),t);if(c==="right")return(0,ke.sprintf)((0,ke.__)("Block %1$s is at the beginning of the content and can\u2019t be moved right"),t)}}function Gwe(e,t,o,r,n,i){let s=t+1;if(o&&r)return(0,ke.__)("All blocks are selected, and cannot be moved");if(n>0&&!r){let a=Fu("down",i);if(a==="down")return(0,ke.sprintf)((0,ke.__)("Move %1$d blocks from position %2$d down by one place"),e,s);if(a==="left")return(0,ke.sprintf)((0,ke.__)("Move %1$d blocks from position %2$d left by one place"),e,s);if(a==="right")return(0,ke.sprintf)((0,ke.__)("Move %1$d blocks from position %2$d right by one place"),e,s)}if(n>0&&r){let a=Fu("down",i);if(a==="down")return(0,ke.__)("Blocks cannot be moved down as they are already at the bottom");if(a==="left")return(0,ke.__)("Blocks cannot be moved left as they are already are at the leftmost position");if(a==="right")return(0,ke.__)("Blocks cannot be moved right as they are already are at the rightmost position")}if(n<0&&!o){let a=Fu("up",i);if(a==="up")return(0,ke.sprintf)((0,ke.__)("Move %1$d blocks from position %2$d up by one place"),e,s);if(a==="left")return(0,ke.sprintf)((0,ke.__)("Move %1$d blocks from position %2$d left by one place"),e,s);if(a==="right")return(0,ke.sprintf)((0,ke.__)("Move %1$d blocks from position %2$d right by one place"),e,s)}if(n<0&&o){let a=Fu("up",i);if(a==="up")return(0,ke.__)("Blocks cannot be moved up as they are already at the top");if(a==="left")return(0,ke.__)("Blocks cannot be moved left as they are already are at the leftmost position");if(a==="right")return(0,ke.__)("Blocks cannot be moved right as they are already are at the rightmost position")}}var Hl=l(x(),1),Hwe=(e,t)=>e==="up"?t==="horizontal"?(0,Ri.isRTL)()?er:Lr:rf:e==="down"?t==="horizontal"?(0,Ri.isRTL)()?Lr:er:In:null,Uwe=(e,t)=>e==="up"?t==="horizontal"?(0,Ri.isRTL)()?(0,Ri.__)("Move right"):(0,Ri.__)("Move left"):(0,Ri.__)("Move up"):e==="down"?t==="horizontal"?(0,Ri.isRTL)()?(0,Ri.__)("Move left"):(0,Ri.__)("Move right"):(0,Ri.__)("Move down"):null,A5=(0,tE.forwardRef)(({clientIds:e,direction:t,orientation:o,...r},n)=>{let i=(0,xK.useInstanceId)(A5),s=Array.isArray(e)?e:[e],a=s.length,{disabled:c}=r,{blockType:u,isDisabled:d,rootClientId:f,isFirst:m,isLast:p,firstIndex:h,orientation:g="vertical"}=(0,eE.useSelect)(w=>{let{getBlockIndex:C,getBlockRootClientId:E,getBlockOrder:R,getBlock:O,getBlockListSettings:B}=w(S),T=s[0],A=E(T),N=C(T),z=C(s[s.length-1]),U=R(A),j=O(T),G=N===0,V=z===U.length-1,{orientation:H}=B(A)||{};return{blockType:j?(0,_K.getBlockType)(j.name):null,isDisabled:c||(t==="up"?G:V),rootClientId:A,firstIndex:N,isFirst:G,isLast:V,orientation:o||H}},[e,t]),{moveBlocksDown:b,moveBlocksUp:k}=(0,eE.useDispatch)(S),v=t==="up"?k:b,y=w=>{v(e,f),r.onClick&&r.onClick(w)},_=`block-editor-block-mover-button__description-${i}`;return(0,Hl.jsxs)(Hl.Fragment,{children:[(0,Hl.jsx)(JB.Button,{__next40pxDefaultSize:!0,ref:n,className:D("block-editor-block-mover-button",`is-${t}-button`),icon:Hwe(t,g),label:Uwe(t,g),"aria-describedby":_,...r,onClick:d?null:y,disabled:d,accessibleWhenDisabled:!0}),(0,Hl.jsx)(JB.VisuallyHidden,{id:_,children:SK(a,u&&u.title,h,m,p,t==="up"?-1:1,g)})]})}),oE=(0,tE.forwardRef)((e,t)=>(0,Hl.jsx)(A5,{direction:"up",ref:t,...e})),rE=(0,tE.forwardRef)((e,t)=>(0,Hl.jsx)(A5,{direction:"down",ref:t,...e}));var pa=l(x(),1);function Wwe({clientIds:e,hideDragHandle:t,isBlockMoverUpButtonDisabled:o,isBlockMoverDownButtonDisabled:r}){let{canMove:n,rootClientId:i,isFirst:s,isLast:a,orientation:c,isManualGrid:u}=(0,wK.useSelect)(d=>{let{getBlockIndex:f,getBlockListSettings:m,canMoveBlocks:p,getBlockOrder:h,getBlockRootClientId:g,getBlockAttributes:b}=d(S),k=Array.isArray(e)?e:[e],v=k[0],y=g(v),_=f(v),w=f(k[k.length-1]),C=h(y),{layout:E={}}=b(y)??{};return{canMove:p(e),rootClientId:y,isFirst:_===0,isLast:w===C.length-1,orientation:m(y)?.orientation,isManualGrid:E.type==="grid"&&E.isManualPlacement&&window.__experimentalEnableGridInteractivity}},[e]);return!n||s&&a&&!i||t&&u?null:(0,pa.jsxs)(rm.ToolbarGroup,{className:D("block-editor-block-mover",{"is-horizontal":c==="horizontal"}),children:[!t&&(0,pa.jsx)(QB,{clientIds:e,fadeWhenDisabled:!0,children:d=>(0,pa.jsx)(rm.Button,{__next40pxDefaultSize:!0,icon:Vk,className:"block-editor-block-mover__drag-handle",label:(0,CK.__)("Drag"),tabIndex:"-1",...d})}),!u&&(0,pa.jsxs)("div",{className:"block-editor-block-mover__move-button-container",children:[(0,pa.jsx)(rm.ToolbarItem,{children:d=>(0,pa.jsx)(oE,{disabled:o,clientIds:e,...d})}),(0,pa.jsx)(rm.ToolbarItem,{children:d=>(0,pa.jsx)(rE,{disabled:r,clientIds:e,...d})})]})]})}var nE=Wwe;var TK=l(P(),1),sE=l(M(),1),aE=l(L(),1),IK=l(I(),1);var Jy=l(M(),1),zu=l(I(),1);var{clearTimeout:BK,setTimeout:Zwe}=window,EK=200;function $we({ref:e,isFocused:t,highlightParent:o,debounceTimeout:r=EK}){let{getSelectedBlockClientId:n,getBlockRootClientId:i}=(0,Jy.useSelect)(S),{toggleBlockHighlight:s}=(0,Jy.useDispatch)(S),a=(0,zu.useRef)(),c=(0,Jy.useSelect)(g=>g(S).getSettings().isDistractionFree,[]),u=g=>{if(g&&c)return;let b=n(),k=o?i(b):b;s(k,g)},d=()=>e?.current&&e.current.matches(":hover"),f=()=>{let g=d();return!t&&!g},m=()=>{let g=a.current;g&&BK&&BK(g)},p=g=>{g&&g.stopPropagation(),m(),u(!0)},h=g=>{g&&g.stopPropagation(),m(),a.current=Zwe(()=>{f()&&u(!1)},r)};return(0,zu.useEffect)(()=>()=>{u(!1),m()},[]),{debouncedShowGestures:p,debouncedHideGestures:h}}function sg({ref:e,highlightParent:t=!1,debounceTimeout:o=EK}){let[r,n]=(0,zu.useState)(!1),{debouncedShowGestures:i,debouncedHideGestures:s}=$we({ref:e,debounceTimeout:o,isFocused:r,highlightParent:t}),a=(0,zu.useRef)(!1),c=()=>e?.current&&e.current.contains(e.current.ownerDocument.activeElement);return(0,zu.useEffect)(()=>{let u=e.current,d=()=>{c()&&(n(!0),i())},f=()=>{c()||(n(!1),s())};return u&&!a.current&&(u.addEventListener("focus",d,!0),u.addEventListener("blur",f,!0),a.current=!0),()=>{u&&(u.removeEventListener("focus",d),u.removeEventListener("blur",f))}},[e,a,n,i,s]),{onMouseMove:i,onMouseLeave:s}}var iE=l(x(),1);function PK(){let{selectBlock:e}=(0,sE.useDispatch)(S),{parentClientId:t}=(0,sE.useSelect)(i=>{let{getBlockParents:s,getSelectedBlockClientId:a,getParentSectionBlock:c}=F(i(S)),u=a(),d=c(u),f=s(u);return{parentClientId:d??f[f.length-1]}},[]),o=xt(t),r=(0,IK.useRef)(),n=sg({ref:r,highlightParent:!0});return(0,iE.jsx)("div",{className:"block-editor-block-parent-selector",ref:r,...n,children:(0,iE.jsx)(TK.ToolbarButton,{className:"block-editor-block-parent-selector__button",onClick:()=>e(t),label:(0,aE.sprintf)((0,aE.__)("Select parent block: %s"),o?.title),showTooltip:!0,icon:(0,iE.jsx)(Ie,{icon:o?.icon})})},t)}var lE=l(P(),1);var ag=l(P(),1),Ywe=(0,ag.createSlotFill)("BlockControls"),Kwe=(0,ag.createSlotFill)("BlockControlsBlock"),Xwe=(0,ag.createSlotFill)("BlockFormatControls"),qwe=(0,ag.createSlotFill)("BlockControlsOther"),Qwe=(0,ag.createSlotFill)("BlockControlsParent"),Jwe={default:Ywe,block:Kwe,inline:Xwe,other:qwe,parent:Qwe},eS=Jwe;function RK(e,t){let o=Ne();return o[Tc]?eS[e]?.Fill:o[hp]&&t?eS.parent.Fill:null}var Ul=l(x(),1);function L5({group:e="default",controls:t,children:o,__experimentalShareWithChildBlocks:r=!1}){let n=RK(e,r);if(!n)return null;let i=(0,Ul.jsxs)(Ul.Fragment,{children:[e==="default"&&(0,Ul.jsx)(lE.ToolbarGroup,{controls:t}),o]});return(0,Ul.jsx)(lE.__experimentalStyleProvider,{document,children:(0,Ul.jsx)(n,{children:s=>{let{forwardedContext:a=[]}=s;return a.reduce((c,[u,d])=>(0,Ul.jsx)(u,{...d,children:c}),i)}})})}var tS=l(I(),1),Wl=l(P(),1),AK=l(Mv(),1);var N5=l(x(),1),{ComponentsContext:OK}=F(Wl.privateApis);function M5({group:e="default",...t}){let o=(0,tS.useContext)(Wl.__experimentalToolbarContext),r=(0,tS.useContext)(OK),n=(0,tS.useMemo)(()=>({forwardedContext:[[Wl.__experimentalToolbarContext.Provider,{value:o}],[OK.Provider,{value:r}]]}),[o,r]),i=eS[e],s=(0,Wl.__experimentalUseSlotFills)(i.name);if(!i)return(0,AK.default)(`Unknown BlockControls group "${e}" provided.`),null;if(!s?.length)return null;let{Slot:a}=i,c=(0,N5.jsx)(a,{...t,bubblesVirtually:!0,fillProps:n});return e==="default"?c:(0,N5.jsx)(Wl.ToolbarGroup,{children:c})}var D5=l(x(),1),LK=L5;LK.Slot=M5;var V5=e=>(0,D5.jsx)(L5,{group:"inline",...e});V5.Slot=e=>(0,D5.jsx)(M5,{group:"inline",...e});var pt=LK;var NK=l(P(),1),{Fill:MK,Slot:eCe}=(0,NK.createSlotFill)("__unstableBlockToolbarLastItem");MK.Slot=eCe;var cE=MK;var AE=l(P(),1);var fg=l(Z(),1),$n=l(P(),1),um=l(M(),1);var RE=l(I(),1),ha=l(L(),1),WX=l(ra(),1),cm=l(Y(),1);var cg=l(M(),1),ju=l(Z(),1);var JK=l(I(),1),rS=l(Z(),1),oS=l(M(),1),eX=l(On(),1),Zl=l(L(),1);var Un=l(Z(),1),DK=l(I(),1),tCe="align";var VK="__experimentalBorder",uE="color",oCe="customClassName",FK="typography.__experimentalFontFamily",zK="typography.fontSize",rCe="typography.lineHeight",nCe="typography.__experimentalFontStyle",iCe="typography.__experimentalFontWeight",jK="typography.textAlign",sCe="typography.textColumns",aCe="typography.__experimentalTextDecoration",lCe="typography.__experimentalWritingMode",cCe="typography.__experimentalTextTransform",uCe="typography.__experimentalLetterSpacing",dCe="layout",fCe=[rCe,zK,nCe,iCe,FK,jK,sCe,aCe,cCe,lCe,uCe],mCe=["shadow"],pCe="spacing",hCe=[...mCe,...fCe,VK,uE,pCe],GK=e=>(0,Un.hasBlockSupport)(e,tCe);function HK(e,t="any"){if(DK.Platform.OS!=="web")return!1;let o=(0,Un.getBlockSupport)(e,VK);return o===!0?!0:t==="any"?!!(o?.color||o?.radius||o?.width||o?.style):!!o?.[t]}var UK=e=>{let t=(0,Un.getBlockSupport)(e,uE);return t!==null&&typeof t=="object"&&!!t.gradients},WK=e=>{let t=(0,Un.getBlockSupport)(e,uE);return t&&t.background!==!1},ZK=e=>(0,Un.hasBlockSupport)(e,jK);var $K=e=>{let t=(0,Un.getBlockSupport)(e,uE);return t&&t.text!==!1};var YK=e=>(0,Un.hasBlockSupport)(e,oCe,!0);var KK=e=>(0,Un.hasBlockSupport)(e,FK);var XK=e=>(0,Un.hasBlockSupport)(e,zK);var qK=e=>(0,Un.hasBlockSupport)(e,dCe);var QK=e=>hCe.some(t=>(0,Un.hasBlockSupport)(e,t));function gCe(e){try{let t=(0,rS.parse)(e,{__unstableSkipMigrationLogs:!0,__unstableSkipAutop:!0});return!(t.length===1&&t[0].name==="core/freeform")}catch{return!1}}var bCe={align:GK,borderColor:e=>HK(e,"color"),backgroundColor:WK,textAlign:ZK,textColor:$K,gradient:UK,className:YK,fontFamily:KK,fontSize:XK,layout:qK,style:QK};function kCe(e,t){return Object.entries(bCe).reduce((o,[r,n])=>(n(e.name)&&n(t.name)&&(o[r]=e.attributes[r]),o),{})}function F5(e,t,o){for(let r=0;r<Math.min(t.length,e.length);r+=1)o(e[r].clientId,kCe(t[r],e[r])),F5(e[r].innerBlocks,t[r].innerBlocks,o)}function lg(){let e=(0,oS.useRegistry)(),{updateBlockAttributes:t}=(0,oS.useDispatch)(S),{createSuccessNotice:o,createWarningNotice:r,createErrorNotice:n}=(0,oS.useDispatch)(eX.store);return(0,JK.useCallback)(async i=>{let s="";try{if(!window.navigator.clipboard){n((0,Zl.__)("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,Zl.__)("Unable to paste styles. Please allow browser clipboard permissions before continuing."),{type:"snackbar"});return}if(!s||!gCe(s)){r((0,Zl.__)("Unable to paste styles. Block styles couldn't be found within the copied content."),{type:"snackbar"});return}let a=(0,rS.parse)(s);if(a.length===1?e.batch(()=>{F5(i,i.map(()=>a[0]),t)}):e.batch(()=>{F5(i,a,t)}),i.length===1){let c=(0,rS.getBlockType)(i[0].name)?.title;o((0,Zl.sprintf)((0,Zl.__)("Pasted styles to %s."),c),{type:"snackbar"})}else o((0,Zl.sprintf)((0,Zl.__)("Pasted styles to %d blocks."),i.length),{type:"snackbar"})},[e.batch,t,o,r,n])}function tX({clientIds:e,children:t,__experimentalUpdateSelection:o}){let{getDefaultBlockName:r,getGroupingBlockName:n}=(0,cg.useSelect)(ju.store),i=(0,cg.useSelect)(y=>{let{canInsertBlockType:_,getBlockRootClientId:w,getBlocksByClientId:C,getDirectInsertBlock:E,canRemoveBlocks:R}=y(S),O=C(e),B=w(e[0]),T=_(r(),B),A=B?E(B):null;return{canRemove:R(e),canInsertBlock:O.every(N=>(T||!!A)&&_(N.name,B)),canCopyStyles:O.every(N=>!!N&&((0,ju.hasBlockSupport)(N.name,"color")||(0,ju.hasBlockSupport)(N.name,"typography"))),canDuplicate:O.every(N=>!!N&&(0,ju.hasBlockSupport)(N.name,"multiple",!0)&&_(N.name,B))}},[e,r]),{getBlocksByClientId:s,getBlocks:a}=(0,cg.useSelect)(S),{canRemove:c,canInsertBlock:u,canCopyStyles:d,canDuplicate:f}=i,{removeBlocks:m,replaceBlocks:p,duplicateBlocks:h,insertAfterBlock:g,insertBeforeBlock:b,flashBlock:k}=(0,cg.useDispatch)(S),v=lg();return t({canCopyStyles:d,canDuplicate:f,canInsertBlock:u,canRemove:c,onDuplicate(){return h(e,o)},onRemove(){return m(e,o)},onInsertBefore(){b(e[0])},onInsertAfter(){g(e[e.length-1])},onGroup(){if(!e.length)return;let y=n(),_=(0,ju.switchToBlockType)(s(e),y);_&&p(e,_)},onUngroup(){if(!e.length)return;let y=a(e[0]);y.length&&p(e,y)},onCopy(){e.length===1&&k(e[0])},async onPasteStyles(){await v(s(e))}})}var oX=l(P(),1),vCe=(0,oX.createSlotFill)(Symbol("CommentIconSlotFill")),dE=vCe;var rX=l(L(),1),nX=l(P(),1),fE=l(Z(),1),mE=l(M(),1);var iX=l(x(),1);function yCe({clientId:e}){let t=(0,mE.useSelect)(r=>r(S).getBlock(e),[e]),{replaceBlocks:o}=(0,mE.useDispatch)(S);return!t||t.name!=="core/html"?null:(0,iX.jsx)(nX.MenuItem,{onClick:()=>o(e,(0,fE.rawHandler)({HTML:(0,fE.getBlockContent)(t)})),children:(0,rX.__)("Convert to Blocks")})}var sX=yCe;var aX=l(P(),1),{Fill:lX,Slot:SCe}=(0,aX.createSlotFill)("__unstableBlockSettingsMenuFirstItem");lX.Slot=SCe;var pE=lX;var dg=l(P(),1),DX=l(Z(),1),VX=l(M(),1);var j5=l(P(),1),G5=l(L(),1),dX=l(Z(),1),bE=l(M(),1),fX=l(at(),1);var cX=l(Z(),1),uX=l(M(),1);function nS(e){return(0,uX.useSelect)(t=>{let{getBlocksByClientId:o,getSelectedBlockClientIds:r,isUngroupable:n,isGroupable:i}=t(S),{getGroupingBlockName:s,getBlockType:a}=t(cX.store),c=e?.length?e:r(),u=o(c),[d]=u,f=c.length===1&&n(c[0]);return{clientIds:c,isGroupable:i(c),isUngroupable:f,blocksSelection:u,groupingBlockName:s(),onUngroup:f&&a(d.name)?.transforms?.ungroup}},[e])}var hE=l(M(),1),gE=l(Z(),1),nm=l(P(),1);var iS=l(L(),1);var im=l(x(),1),_Ce={group:{type:"constrained"},row:{type:"flex",flexWrap:"nowrap"},stack:{type:"flex",orientation:"vertical"},grid:{type:"grid"}};function xCe(){let{blocksSelection:e,clientIds:t,groupingBlockName:o,isGroupable:r}=nS(),{replaceBlocks:n}=(0,hE.useDispatch)(S),{canRemove:i,variations:s}=(0,hE.useSelect)(h=>{let{canRemoveBlocks:g}=h(S),{getBlockVariations:b}=h(gE.store);return{canRemove:g(t),variations:b(o,"transform")}},[t,o]),a=h=>{let g=(0,gE.switchToBlockType)(e,o);typeof h!="string"&&(h="group"),g&&g.length>0&&(g[0].attributes.layout=_Ce[h],n(t,g))},c=()=>a("row"),u=()=>a("stack"),d=()=>a("grid");if(!r||!i)return null;let f=!!s.find(({name:h})=>h==="group-row"),m=!!s.find(({name:h})=>h==="group-stack"),p=!!s.find(({name:h})=>h==="group-grid");return(0,im.jsxs)(nm.ToolbarGroup,{children:[(0,im.jsx)(nm.ToolbarButton,{icon:jk,label:(0,iS._x)("Group","action: convert blocks to group"),onClick:a}),f&&(0,im.jsx)(nm.ToolbarButton,{icon:yL,label:(0,iS._x)("Row","action: convert blocks to row"),onClick:c}),m&&(0,im.jsx)(nm.ToolbarButton,{icon:NL,label:(0,iS._x)("Stack","action: convert blocks to stack"),onClick:u}),p&&(0,im.jsx)(nm.ToolbarButton,{icon:zk,label:(0,iS._x)("Grid","action: convert blocks to grid"),onClick:d})]})}var z5=xCe;var sm=l(x(),1);function mX({clientIds:e,isGroupable:t,isUngroupable:o,onUngroup:r,blocksSelection:n,groupingBlockName:i,onClose:s=()=>{}}){let{getSelectedBlockClientIds:a}=(0,bE.useSelect)(S),{replaceBlocks:c}=(0,bE.useDispatch)(S),u=()=>{let m=(0,dX.switchToBlockType)(n,i);m&&c(e,m)},d=()=>{let m=n[0].innerBlocks;m.length&&(r&&(m=r(n[0].attributes,n[0].innerBlocks)),c(e,m))};if(!t&&!o)return null;let f=a();return(0,sm.jsxs)(sm.Fragment,{children:[t&&(0,sm.jsx)(j5.MenuItem,{shortcut:f.length>1?fX.displayShortcut.primary("g"):void 0,onClick:()=>{u(),s()},children:(0,G5._x)("Group","verb")}),o&&(0,sm.jsx)(j5.MenuItem,{onClick:()=>{d(),s()},children:(0,G5._x)("Ungroup","Ungrouping blocks from within a grouping block back into individual blocks within the Editor")})]})}var H5=l(L(),1),gX=l(I(),1),bX=l(P(),1);var pX=l(M(),1);function Wn(e){return(0,pX.useSelect)(t=>{let{canLockBlockType:o,getBlockName:r,isEditLockedBlock:n,isMoveLockedBlock:i,isRemoveLockedBlock:s,isLockedBlock:a}=F(t(S));return{isEditLocked:n(e),isMoveLocked:i(e),isRemoveLocked:s(e),canLock:o(r(e)),isLocked:a(e)}},[e])}var Oi=l(L(),1),sS=l(I(),1),fo=l(P(),1);var kE=l(M(),1),hX=l(Z(),1);var wt=l(x(),1),wCe=["core/navigation"];function CCe(e){return e.remove&&e.move?"all":e.remove&&!e.move?"insert":!1}function vE({clientId:e,onClose:t}){let[o,r]=(0,sS.useState)({move:!1,remove:!1}),{isEditLocked:n,isMoveLocked:i,isRemoveLocked:s}=Wn(e),{allowsEditLocking:a,templateLock:c,hasTemplateLock:u}=(0,kE.useSelect)(b=>{let{getBlockName:k,getBlockAttributes:v}=b(S),y=k(e),_=(0,hX.getBlockType)(y);return{allowsEditLocking:wCe.includes(y),templateLock:v(e)?.templateLock,hasTemplateLock:!!_?.attributes?.templateLock}},[e]),[d,f]=(0,sS.useState)(!!c),{updateBlockAttributes:m}=(0,kE.useDispatch)(S),p=xt(e);(0,sS.useEffect)(()=>{r({move:i,remove:s,...a?{edit:n}:{}})},[n,i,s,a]);let h=Object.values(o).every(Boolean),g=Object.values(o).some(Boolean)&&!h;return(0,wt.jsx)(fo.Modal,{title:(0,Oi.sprintf)((0,Oi.__)("Lock %s"),p.title),overlayClassName:"block-editor-block-lock-modal",onRequestClose:t,size:"small",children:(0,wt.jsxs)("form",{onSubmit:b=>{b.preventDefault(),m([e],{lock:o,templateLock:d?CCe(o):void 0}),t()},children:[(0,wt.jsxs)("fieldset",{className:"block-editor-block-lock-modal__options",children:[(0,wt.jsx)("legend",{children:(0,Oi.__)("Select the features you want to lock")}),(0,wt.jsx)("ul",{role:"list",className:"block-editor-block-lock-modal__checklist",children:(0,wt.jsxs)("li",{children:[(0,wt.jsx)(fo.CheckboxControl,{className:"block-editor-block-lock-modal__options-all",label:(0,Oi.__)("Lock all"),checked:h,indeterminate:g,onChange:b=>r({move:b,remove:b,...a?{edit:b}:{}})}),(0,wt.jsxs)("ul",{role:"list",className:"block-editor-block-lock-modal__checklist",children:[a&&(0,wt.jsxs)("li",{className:"block-editor-block-lock-modal__checklist-item",children:[(0,wt.jsx)(fo.CheckboxControl,{label:(0,Oi.__)("Lock editing"),checked:!!o.edit,onChange:b=>r(k=>({...k,edit:b}))}),(0,wt.jsx)(fo.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:o.edit?df:ul})]}),(0,wt.jsxs)("li",{className:"block-editor-block-lock-modal__checklist-item",children:[(0,wt.jsx)(fo.CheckboxControl,{label:(0,Oi.__)("Lock movement"),checked:o.move,onChange:b=>r(k=>({...k,move:b}))}),(0,wt.jsx)(fo.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:o.move?df:ul})]}),(0,wt.jsxs)("li",{className:"block-editor-block-lock-modal__checklist-item",children:[(0,wt.jsx)(fo.CheckboxControl,{label:(0,Oi.__)("Lock removal"),checked:o.remove,onChange:b=>r(k=>({...k,remove:b}))}),(0,wt.jsx)(fo.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:o.remove?df:ul})]})]})]})}),u&&(0,wt.jsx)(fo.ToggleControl,{className:"block-editor-block-lock-modal__template-lock",label:(0,Oi.__)("Apply to all blocks inside"),checked:d,disabled:o.move&&!o.remove,onChange:()=>f(!d)})]}),(0,wt.jsxs)(fo.Flex,{className:"block-editor-block-lock-modal__actions",justify:"flex-end",expanded:!1,children:[(0,wt.jsx)(fo.FlexItem,{children:(0,wt.jsx)(fo.Button,{variant:"tertiary",onClick:t,__next40pxDefaultSize:!0,children:(0,Oi.__)("Cancel")})}),(0,wt.jsx)(fo.FlexItem,{children:(0,wt.jsx)(fo.Button,{variant:"primary",type:"submit",__next40pxDefaultSize:!0,children:(0,Oi.__)("Apply")})})]})]})})}var am=l(x(),1);function U5({clientId:e}){let{canLock:t,isLocked:o}=Wn(e),[r,n]=(0,gX.useReducer)(s=>!s,!1);if(!t)return null;let i=o?(0,H5.__)("Unlock"):(0,H5.__)("Lock");return(0,am.jsxs)(am.Fragment,{children:[(0,am.jsx)(bX.MenuItem,{icon:o?ul:ZA,onClick:n,"aria-expanded":r,"aria-haspopup":"dialog",children:i}),r&&(0,am.jsx)(vE,{clientId:e,onClose:n})]})}var yE=l(L(),1),SE=l(P(),1),ug=l(I(),1);var Gu=l(x(),1);function W5({clientId:e}){let{canLock:t,isLocked:o}=Wn(e),[r,n]=(0,ug.useReducer)(a=>!a,!1),i=(0,ug.useRef)(!1);if((0,ug.useEffect)(()=>{o&&(i.current=!0)},[o]),!o&&!i.current)return null;let s=o?(0,yE.__)("Unlock"):(0,yE.__)("Lock");return!t&&o&&(s=(0,yE.__)("Locked")),(0,Gu.jsxs)(Gu.Fragment,{children:[(0,Gu.jsx)(SE.ToolbarGroup,{className:"block-editor-block-lock-toolbar",children:(0,Gu.jsx)(SE.ToolbarButton,{disabled:!t,icon:o?df:ul,label:s,onClick:n,"aria-expanded":r,"aria-haspopup":"dialog"})}),r&&(0,Gu.jsx)(vE,{clientId:e,onClose:n})]})}var Z5=l(L(),1),kX=l(P(),1),_E=l(Z(),1),xE=l(M(),1);var vX=l(x(),1),BCe=()=>{};function yX({clientId:e,onToggle:t=BCe}){let{blockType:o,mode:r,enabled:n}=(0,xE.useSelect)(a=>{let{getBlock:c,getBlockMode:u,getSettings:d}=a(S),f=c(e);return{mode:u(e),blockType:f?(0,_E.getBlockType)(f.name):null,enabled:d().codeEditingEnabled&&!!f?.isValid}},[e]),{toggleBlockMode:i}=(0,xE.useDispatch)(S);if(!o||!(0,_E.hasBlockSupport)(o,"html",!0)||!n)return null;let s=r==="visual"?(0,Z5.__)("Edit as HTML"):(0,Z5.__)("Edit visually");return(0,vX.jsx)(kX.MenuItem,{onClick:()=>{i(e),t()},children:s})}var SX=l(P(),1),wE=l(M(),1),_X=l(L(),1);var xX=l(x(),1);function $5({clientId:e,onClose:t}){let{templateLock:o,isLockedByParent:r,isEditingContentOnlySection:n}=(0,wE.useSelect)(u=>{let{getContentLockingParent:d,getTemplateLock:f,getEditedContentOnlySection:m}=F(u(S));return{templateLock:f(e),isLockedByParent:!!d(e),isEditingContentOnlySection:m()===e}},[e]),i=(0,wE.useDispatch)(S),s=!r&&o==="contentOnly";if(window?.__experimentalContentOnlyPatternInsertion||!s&&!n)return null;let{editContentOnlySection:a}=F(i);return!n&&s&&(0,xX.jsx)(SX.MenuItem,{onClick:()=>{a(e),t()},children:(0,_X._x)("Modify","Unlock content locked blocks")})}var TX=l(P(),1),IX=l(L(),1),PX=l(I(),1);var ys=l(P(),1),vs=l(L(),1),CX=l(I(),1),BX=l(jo(),1),CE=l(M(),1);function wX(e){return e?.trim()?.length===0}var $l=l(x(),1);function EX({clientId:e,onClose:t}){let[o,r]=(0,CX.useState)(),n=xt(e),{metadata:i}=(0,CE.useSelect)(b=>{let{getBlockAttributes:k}=b(S);return{metadata:k(e)?.metadata}},[e]),{updateBlockAttributes:s}=(0,CE.useDispatch)(S),a=i?.name||"",c=n?.title,u=!!a&&!!i?.bindings&&Object.values(i.bindings).some(b=>b.source==="core/pattern-overrides"),d=o!==void 0&&o!==a,f=o===c,m=wX(o),p=d||f,h=b=>b.target.select(),g=()=>{let b=f||m?void 0:o,k=f||m?(0,vs.sprintf)((0,vs.__)('Block name reset to: "%s".'),o):(0,vs.sprintf)((0,vs.__)('Block name changed to: "%s".'),o);(0,BX.speak)(k,"assertive"),s([e],{metadata:Se({...i,name:b})}),t()};return(0,$l.jsx)(ys.Modal,{title:(0,vs.__)("Rename"),onRequestClose:t,overlayClassName:"block-editor-block-rename-modal",focusOnMount:"firstContentElement",size:"small",children:(0,$l.jsx)("form",{onSubmit:b=>{b.preventDefault(),p&&g()},children:(0,$l.jsxs)(ys.__experimentalVStack,{spacing:"3",children:[(0,$l.jsx)(ys.TextControl,{__next40pxDefaultSize:!0,value:o??a,label:(0,vs.__)("Name"),help:u?(0,vs.__)("This block allows overrides. Changing the name can cause problems with content entered into instances of this pattern."):void 0,placeholder:c,onChange:r,onFocus:h}),(0,$l.jsxs)(ys.__experimentalHStack,{justify:"right",children:[(0,$l.jsx)(ys.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,children:(0,vs.__)("Cancel")}),(0,$l.jsx)(ys.Button,{__next40pxDefaultSize:!0,accessibleWhenDisabled:!0,disabled:!p,variant:"primary",type:"submit",children:(0,vs.__)("Save")})]})]})})})}var lm=l(x(),1);function Y5({clientId:e}){let[t,o]=(0,PX.useState)(!1);return(0,lm.jsxs)(lm.Fragment,{children:[(0,lm.jsx)(TX.MenuItem,{onClick:()=>{o(!0)},"aria-expanded":t,"aria-haspopup":"dialog",children:(0,IX.__)("Rename")}),t&&(0,lm.jsx)(EX,{clientId:e,onClose:()=>o(!1)})]})}var RX=l(Z(),1);function K5(e){return{canRename:(0,RX.getBlockSupport)(e,"renaming",!0)}}var OX=l(P(),1),AX=l(L(),1),LX=l(M(),1),TE=l(Z(),1);var BE=l(M(),1);function EE(e){let{isSectionBlock:t,isWithinSection:o,isWithinEditedSection:r,isEditingContentOnlySection:n,editedContentOnlySection:i}=(0,BE.useSelect)(u=>{let{isSectionBlock:d,getParentSectionBlock:f,getEditedContentOnlySection:m,isWithinEditedContentOnlySection:p}=F(u(S)),h=m();return{isSectionBlock:d(e),isWithinSection:d(e)||!!f(e),isWithinEditedSection:p(e),isEditingContentOnlySection:h===e,editedContentOnlySection:h}},[e]),s=(0,BE.useDispatch)(S),{editContentOnlySection:a,stopEditingContentOnlySection:c}=F(s);return{isSectionBlock:t,isWithinSection:o,isWithinEditedSection:r,isEditingContentOnlySection:n,editedContentOnlySection:i,editContentOnlySection:a,stopEditingContentOnlySection:c}}var NX=l(x(),1);function MX({clientId:e,onClose:t}){let{isSectionBlock:o,isEditingContentOnlySection:r,editContentOnlySection:n}=EE(e),{block:i,onNavigateToEntityRecord:s}=(0,LX.useSelect)(m=>{let{getBlock:p,getSettings:h}=m(S);return{block:p(e),onNavigateToEntityRecord:h().onNavigateToEntityRecord}},[e]);if(!window?.__experimentalContentOnlyPatternInsertion||!o||r)return null;let a=i?.attributes||{},c=(0,TE.isReusableBlock)(i),u=(0,TE.isTemplatePart)(i),d=(c||u)&&s;return(0,NX.jsx)(OX.MenuItem,{onClick:()=>{if(d){if(c)s({postId:a.ref,postType:"wp_block"});else if(u){let{theme:m,slug:p}=a,h=m&&p?`${m}//${p}`:null;h&&s({postId:h,postType:"wp_template_part"})}}else n(e);t()},children:(0,AX._x)("Edit section","Editing a section in the Editor")})}var Zn=l(x(),1),{Fill:ECe,Slot:TCe}=(0,dg.createSlotFill)("BlockSettingsMenuControls"),ICe=({fillProps:e,clientIds:t=null})=>{let{selectedBlocks:o,selectedClientIds:r,isContentOnly:n,canToggleSelectedBlocksVisibility:i}=(0,VX.useSelect)(g=>{let{getBlocksByClientId:b,getBlockNamesByClientId:k,getSelectedBlockClientIds:v,getBlockEditingMode:y}=g(S),_=t!==null?t:v();return{selectedBlocks:k(_),selectedClientIds:_,isContentOnly:y(_[0])==="contentOnly",canToggleSelectedBlocksVisibility:b(_).every(w=>(0,DX.hasBlockSupport)(w.name,"visibility",!0))}},[t]),{canLock:s}=Wn(r[0]),{canRename:a}=K5(o[0]),c=r.length===1&&s&&!n,u=r.length===1&&a&&!n,d=i&&!n,f=nS(r),{isGroupable:m,isUngroupable:p}=f,h=(m||p)&&!n;return(0,Zn.jsx)(TCe,{fillProps:{...e,selectedBlocks:o,selectedClientIds:r},children:g=>!g?.length>0&&!h&&!c?null:(0,Zn.jsxs)(dg.MenuGroup,{children:[h&&(0,Zn.jsx)(mX,{...f,onClose:e?.onClose}),r.length===1&&(0,Zn.jsx)(MX,{clientId:r[0],onClose:e?.onClose}),c&&(0,Zn.jsx)(U5,{clientId:r[0]}),u&&(0,Zn.jsx)(Y5,{clientId:r[0]}),d&&(0,Zn.jsx)(N9,{clientIds:r}),g,r.length===1&&(0,Zn.jsx)($5,{clientId:r[0],onClose:e?.onClose}),e?.count===1&&!n&&(0,Zn.jsx)(yX,{clientId:e?.firstBlockClientId,onToggle:e?.onClose})]})})};function FX({...e}){return(0,Zn.jsx)(dg.__experimentalStyleProvider,{document,children:(0,Zn.jsx)(ECe,{...e})})}FX.Slot=ICe;var IE=FX;var zX=l(I(),1),jX=l(P(),1),GX=l(Y(),1),HX=l(M(),1),PE=l(L(),1);var X5=l(x(),1);function UX({parentClientId:e,parentBlockType:t}){let o=(0,GX.useViewportMatch)("medium","<"),{selectBlock:r}=(0,HX.useDispatch)(S),n=(0,zX.useRef)(),i=sg({ref:n,highlightParent:!0});return o?(0,X5.jsx)(jX.MenuItem,{...i,ref:n,icon:(0,X5.jsx)(Ie,{icon:t.icon}),onClick:()=>r(e),children:(0,PE.sprintf)((0,PE.__)("Select parent block (%s)"),t.title)}):null}var bt=l(x(),1),PCe={className:"block-editor-block-settings-menu__popover",placement:"bottom-start"};function q5({clientIds:e,onCopy:t,label:o,shortcut:r,eventType:n="copy",__experimentalUpdateSelection:i=!1}){let{getBlocksByClientId:s}=(0,um.useSelect)(S),{removeBlocks:a}=(0,um.useDispatch)(S),c=xh(),u=(0,cm.useCopyToClipboard)(()=>(0,fg.serialize)(s(e)),()=>{switch(n){case"copy":case"copyStyles":t(),c(n,e);break;case"cut":c(n,e),a(e,i);break;default:break}}),d=o||(0,ha.__)("Copy");return(0,bt.jsx)($n.MenuItem,{ref:u,shortcut:r,children:d})}function Q5({block:e,clientIds:t,children:o,__experimentalSelectBlock:r,...n}){let i=t.length,s=t[0],{firstParentClientId:a,parentBlockType:c,previousBlockClientId:u,selectedBlockClientIds:d,isContentOnly:f,isZoomOut:m}=(0,um.useSelect)(w=>{let{getBlockName:C,getBlockRootClientId:E,getPreviousBlockClientId:R,getSelectedBlockClientIds:O,getBlockAttributes:B,getBlockEditingMode:T,isZoomOut:A}=F(w(S)),{getActiveBlockVariation:N}=w(fg.store),z=E(s),U=z&&C(z);return{firstParentClientId:z,parentBlockType:z&&(N(U,B(z))||(0,fg.getBlockType)(U)),previousBlockClientId:R(s),selectedBlockClientIds:O(),isContentOnly:T(s)==="contentOnly",isZoomOut:A()}},[s]),{getBlockOrder:p,getSelectedBlockClientIds:h}=(0,um.useSelect)(S),g=(0,um.useSelect)(w=>{let{getShortcutRepresentation:C}=w(WX.store);return{copy:C("core/block-editor/copy"),cut:C("core/block-editor/cut"),duplicate:C("core/block-editor/duplicate"),remove:C("core/block-editor/remove"),insertAfter:C("core/block-editor/insert-after"),insertBefore:C("core/block-editor/insert-before")}},[]),b=d.length>0;async function k(w){if(!r)return;let C=await w;C&&C[0]&&r(C[0],!1)}function v(){if(!r)return;let w=u||a;w||(w=p()[0]);let C=b&&h().length===0;r(w,C)}let _=!d?.includes(a)&&!!a;return(0,bt.jsx)(tX,{clientIds:t,__experimentalUpdateSelection:!r,children:({canCopyStyles:w,canDuplicate:C,canInsertBlock:E,canRemove:R,onDuplicate:O,onInsertAfter:B,onInsertBefore:T,onRemove:A,onCopy:N,onPasteStyles:z})=>!R&&!C&&!E&&f?null:(0,bt.jsx)($n.DropdownMenu,{icon:ts,label:(0,ha.__)("Options"),className:"block-editor-block-settings-menu",popoverProps:PCe,noIcons:!0,...n,children:({onClose:j})=>(0,bt.jsxs)(bt.Fragment,{children:[(0,bt.jsxs)($n.MenuGroup,{children:[(0,bt.jsx)(pE.Slot,{fillProps:{onClose:j}}),_&&(0,bt.jsx)(UX,{parentClientId:a,parentBlockType:c}),i===1&&(0,bt.jsx)(sX,{clientId:s}),!f&&(0,bt.jsx)(q5,{clientIds:t,onCopy:N,shortcut:g.copy}),!f&&(0,bt.jsx)(q5,{clientIds:t,label:(0,ha.__)("Cut"),eventType:"cut",shortcut:g.cut,__experimentalUpdateSelection:!r}),C&&(0,bt.jsx)($n.MenuItem,{onClick:(0,cm.pipe)(j,O,k),shortcut:g.duplicate,children:(0,ha.__)("Duplicate")}),E&&!m&&(0,bt.jsxs)(bt.Fragment,{children:[(0,bt.jsx)($n.MenuItem,{onClick:(0,cm.pipe)(j,T),shortcut:g.insertBefore,children:(0,ha.__)("Add before")}),(0,bt.jsx)($n.MenuItem,{onClick:(0,cm.pipe)(j,B),shortcut:g.insertAfter,children:(0,ha.__)("Add after")})]}),i===1&&(0,bt.jsx)(dE.Slot,{fillProps:{clientId:s,onClose:j}})]}),w&&!f&&(0,bt.jsxs)($n.MenuGroup,{children:[(0,bt.jsx)(q5,{clientIds:t,onCopy:N,label:(0,ha.__)("Copy styles"),eventType:"copyStyles"}),(0,bt.jsx)($n.MenuItem,{onClick:z,children:(0,ha.__)("Paste styles")})]}),!f&&(0,bt.jsx)(IE.Slot,{fillProps:{onClose:j,count:i,firstBlockClientId:s},clientIds:t}),typeof o=="function"?o({onClose:j}):RE.Children.map(G=>(0,RE.cloneElement)(G,{onClose:j})),R&&(0,bt.jsx)($n.MenuGroup,{children:(0,bt.jsx)($n.MenuItem,{onClick:(0,cm.pipe)(j,A,v),shortcut:g.remove,children:(0,ha.__)("Delete")})})]})})})}var ZX=Q5;var $X=l(P(),1),RCe=(0,$X.createSlotFill)(Symbol("CommentIconToolbarSlotFill")),OE=RCe;var mg=l(x(),1);function OCe({clientIds:e,...t}){return(0,mg.jsxs)(AE.ToolbarGroup,{children:[(0,mg.jsx)(OE.Slot,{}),(0,mg.jsx)(AE.ToolbarItem,{children:o=>(0,mg.jsx)(ZX,{clientIds:e,toggleProps:o,...t})})]})}var LE=OCe;var NE=l(P(),1),YX=l(L(),1),ME=l(M(),1);var J5=l(x(),1);function KX({clientIds:e}){let t=e.length===1?e[0]:void 0,o=(0,ME.useSelect)(n=>!!t&&n(S).getBlockMode(t)==="html",[t]),{toggleBlockMode:r}=(0,ME.useDispatch)(S);return o?(0,J5.jsx)(NE.ToolbarGroup,{children:(0,J5.jsx)(NE.ToolbarButton,{onClick:()=>{r(t)},children:(0,YX.__)("Edit visually")})}):null}var DE=l(P(),1),Wr=l(I(),1),QX=l(M(),1),JX=l(Re(),1),tV=l(je(),1),eq=l(ra(),1),tq=l(at(),1);var eV=l(x(),1);function ACe(e){let t="toolbarItem";return!e.some(o=>!(t in o.dataset))}function XX(e){return Array.from(e.querySelectorAll("[data-toolbar-item]:not([disabled])"))}function qX(e){return e.contains(e.ownerDocument.activeElement)}function LCe(e){let[t]=tV.focus.tabbable.find(e);t&&t.focus({preventScroll:!0})}function NCe(e){let[o,r]=(0,Wr.useState)(!0),n=(0,Wr.useCallback)(()=>{let i=tV.focus.tabbable.find(e.current),s=ACe(i);s||(0,JX.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,Wr.useLayoutEffect)(()=>{let i=new window.MutationObserver(n);return i.observe(e.current,{childList:!0,subtree:!0}),()=>i.disconnect()},[n,o,e]),o}function MCe({toolbarRef:e,focusOnMount:t,isAccessibleToolbar:o,defaultIndex:r,onIndexChange:n,shouldUseKeyboardFocusShortcut:i,focusEditorOnEscape:s}){let[a]=(0,Wr.useState)(t),[c]=(0,Wr.useState)(r),u=(0,Wr.useCallback)(()=>{LCe(e.current)},[e]);(0,eq.useShortcut)("core/block-editor/focus-toolbar",()=>{i&&u()}),(0,Wr.useEffect)(()=>{a&&u()},[o,a,u]),(0,Wr.useEffect)(()=>{let m=e.current,p=0;return!a&&!qX(m)&&(p=window.requestAnimationFrame(()=>{let h=XX(m),g=c||0;h[g]&&qX(m)&&h[g].focus({preventScroll:!0})})),()=>{if(window.cancelAnimationFrame(p),!n||!m)return;let g=XX(m).findIndex(b=>b.tabIndex===0);n(g)}},[c,a,n,e]);let{getLastFocus:f}=F((0,QX.useSelect)(S));(0,Wr.useEffect)(()=>{let m=e.current;if(s){let p=h=>{let g=f();h.keyCode===tq.ESCAPE&&g?.current&&(h.preventDefault(),g.current.focus())};return m.addEventListener("keydown",p),()=>{m.removeEventListener("keydown",p)}}},[s,f,e])}function pg({children:e,focusOnMount:t,focusEditorOnEscape:o=!1,shouldUseKeyboardFocusShortcut:r=!0,__experimentalInitialIndex:n,__experimentalOnIndexChange:i,orientation:s="horizontal",...a}){let c=(0,Wr.useRef)(),u=NCe(c);return MCe({toolbarRef:c,focusOnMount:t,defaultIndex:n,onIndexChange:i,isAccessibleToolbar:u,shouldUseKeyboardFocusShortcut:r,focusEditorOnEscape:o}),u?(0,eV.jsx)(DE.Toolbar,{label:a["aria-label"],ref:c,orientation:s,...a,children:e}):(0,eV.jsx)(DE.NavigableMenu,{orientation:s,role:"toolbar",ref:c,...a,children:e})}var oq=l(M(),1),VE=l(Z(),1);function FE(){return(0,oq.useSelect)(t=>{let{getBlockEditingMode:o,getBlockName:r,getBlockSelectionStart:n}=t(S),i=n(),s=i&&(0,VE.getBlockType)(r(i));return s&&(0,VE.hasBlockSupport)(s,"__experimentalToolbar",!0)&&o(i)!=="disabled"},[])}var Hu=l(P(),1),rq=l(L(),1),nq=l(Z(),1),iq=l(I(),1),zE=l(M(),1);var hg=l(x(),1),oV=[],DCe=6,VCe={placement:"bottom-start"};function sq({clientId:e}){let{categories:t,currentPatternName:o,patterns:r}=(0,zE.useSelect)(a=>{let{getBlockAttributes:c,getBlockRootClientId:u,__experimentalGetAllowedPatterns:d}=a(S),f=c(e),m=f?.metadata?.categories||oV,p=u(e),h=m.length>0?d(p):oV;return{categories:m,currentPatternName:f?.metadata?.patternName,patterns:h}},[e]),{replaceBlocks:n}=(0,zE.useDispatch)(S),i=(0,iq.useMemo)(()=>t.length===0||!r||r.length===0?oV:r.filter(a=>{let c=a.source==="core"||a.source?.startsWith("pattern-directory")&&a.source!=="pattern-directory/theme";return a.blocks.length===1&&!c&&o!==a.name&&a.categories?.some(u=>t.includes(u))&&(a.syncStatus==="unsynced"||!a.id)}).slice(0,DCe),[t,o,r]);if(i.length<2)return null;let s=a=>{let c=(a.blocks??[]).map(u=>(0,nq.cloneBlock)(u));c[0].attributes.metadata={...c[0].attributes.metadata,categories:t},n(e,c)};return(0,hg.jsx)(Hu.Dropdown,{popoverProps:VCe,renderToggle:({onToggle:a,isOpen:c})=>(0,hg.jsx)(Hu.ToolbarGroup,{children:(0,hg.jsx)(Hu.ToolbarButton,{onClick:()=>a(!c),"aria-expanded":c,children:(0,rq.__)("Change design")})}),renderContent:()=>(0,hg.jsx)(Hu.__experimentalDropdownContentWrapper,{className:"block-editor-block-toolbar-change-design-content-wrapper",paddingSize:"none",children:(0,hg.jsx)(ua,{blockPatterns:i,onClickPattern:s,showTitlesAsTooltip:!0})})})}var _s=l(P(),1),Rq=l(L(),1),KE=l(M(),1);var HE=l(M(),1),Uu=l(Z(),1),dq=l(I(),1);var rV=l(jE(),1),lq=l(L(),1);function cq(e,t){for(let o of new rV.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 GE(e)}function gg(e,t,o){let r=new rV.default(e);return t&&r.remove("is-style-"+t.name),r.add("is-style-"+o.name),r.value}function uq(e){return!e||e.length===0?[]:GE(e)?e:[{name:"default",label:(0,lq._x)("Default","block style"),isDefault:!0},...e]}function GE(e){return e?.find(t=>t.isDefault)}function FCe(e,t){return(0,dq.useMemo)(()=>{let o=t?.example,r=t?.name;if(o&&r)return(0,Uu.getBlockFromExample)(r,{attributes:o.attributes,innerBlocks:o.innerBlocks});if(e)return(0,Uu.cloneBlock)(e)},[e,t?.example,t?.name])}function bg({clientId:e,onSwitch:t}){let o=m=>{let{getBlock:p}=m(S),h=p(e);if(!h)return{};let g=(0,Uu.getBlockType)(h.name),{getBlockStyles:b}=m(Uu.store);return{block:g?.example?null:h,blockType:g,styles:b(h.name),className:h.attributes.className||""}},{styles:r,block:n,blockType:i,className:s}=(0,HE.useSelect)(o,[e]),{updateBlockAttributes:a}=(0,HE.useDispatch)(S),c=uq(r),u=cq(c,s),d=FCe(n,i);return{onSelect:m=>{let p=gg(s,u,m);a(e,{className:p}),t()},stylesToRender:c,activeStyle:u,genericPreviewBlock:d,className:s}}var _g=l(Z(),1),dS=l(M(),1),YE=l(I(),1);function fq(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 Bo=(e,t,o)=>{let r=Array.isArray(t)?t:t.split("."),n=e;return r.forEach(i=>{n=n?.[i]}),n??o};var pq=l(Bv(),1);var zCe="1600px",jCe="320px",GCe=1,HCe=.25,UCe=.75,WCe="14px";function mq({minimumFontSize:e,maximumFontSize:t,fontSize:o,minimumViewportWidth:r=jCe,maximumViewportWidth:n=zCe,scaleFactor:i=GCe,minimumFontSizeLimit:s}){if(s=ga(s)?s:WCe,o){let y=ga(o);if(!y?.unit||!y?.value)return null;let _=ga(s,{coerceTo:y.unit});if(_?.value&&!e&&!t&&y?.value<=_?.value)return null;if(t||(t=`${y.value}${y.unit}`),!e){let w=y.unit==="px"?y.value:y.value*16,C=Math.min(Math.max(1-.075*Math.log2(w),HCe),UCe),E=aS(y.value*C,3);_?.value&&E<_?.value?e=`${_.value}${_.unit}`:e=`${E}${y.unit}`}}let a=ga(e),c=a?.unit||"rem",u=ga(t,{coerceTo:c});if(!a||!u)return null;let d=ga(e,{coerceTo:"rem"}),f=ga(n,{coerceTo:c}),m=ga(r,{coerceTo:c});if(!f||!m||!d)return null;let p=f.value-m.value;if(!p)return null;let h=aS(m.value/100,3),g=aS(h,3)+c,b=100*((u.value-a.value)/p),k=aS((b||1)*i,3),v=`${d.value}${d.unit} + ((1vw - ${g}) * ${k})`;return`clamp(${e}, ${v}, ${t})`}function ga(e,t={}){if(typeof e!="string"&&typeof e!="number")return null;isFinite(e)&&(e=`${e}px`);let{coerceTo:o,rootSizeValue:r,acceptableUnits:n}={coerceTo:"",rootSizeValue:16,acceptableUnits:["rem","px","em"],...t},i=n?.join("|"),s=new RegExp(`^(\\d*\\.?\\d+)(${i}){1,1}$`),a=e.toString().match(s);if(!a||a.length<3)return null;let[,c,u]=a,d=parseFloat(c);return o==="px"&&(u==="em"||u==="rem")&&(d=d*r,u=o),u==="px"&&(o==="em"||o==="rem")&&(d=d/r,u=o),(o==="em"||o==="rem")&&(u==="em"||u==="rem")&&(u=o),u?{value:aS(d,3),unit:u}:null}function aS(e,t=3){let o=Math.pow(10,t);return Math.round(e*o)/o}function nV(e){let t=e?.fluid;return t===!0||t&&typeof t=="object"&&Object.keys(t).length>0}function ZCe(e){let t=e?.typography??{},o=e?.layout,r=ga(o?.wideSize)?o?.wideSize:null;return nV(t)&&r?{fluid:{maxViewportWidth:r,...typeof t.fluid=="object"?t.fluid:{}}}:{fluid:t?.fluid}}function Yl(e,t){let{size:o}=e;if(!o||o==="0"||e?.fluid===!1||!nV(t?.typography)&&!nV(e))return o;let r=ZCe(t)?.fluid??{},n=mq({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 ba="body",lS=":root",UE=[{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)=>Yl(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 Ss(e,t){if(!e||!t)return t;let o=e.split(","),r=t.split(","),n=[];return o.forEach(i=>{r.forEach(s=>{n.push(`${i.trim()} ${s.trim()}`)})}),n.join(", ")}function hq(e,t){if(!e||!t)return;let o={};return Object.entries(t).forEach(([r,n])=>{typeof n=="string"&&(o[r]=Ss(e,n)),typeof n=="object"&&(o[r]={},Object.entries(n).forEach(([i,s])=>{o[r][i]=Ss(e,s)}))}),o}function gq(e,t){return e.includes(",")?e.split(",").map(n=>n+t).join(","):e+t}function bq(e,t){let o=`.is-style-${e}`;if(!t)return o;let r=/((?::\([^)]+\))?\s*)([^\s:]+)/,n=(s,a,c)=>a+c+o;return t.split(",").map(s=>s.replace(r,n)).join(",")}function $Ce(e,t){if(!e||!t)return e;if(typeof e=="object"&&"ref"in e&&e?.ref){let o=(0,pq.getCSSValueFromRawStyle)(Bo(t,e.ref));return typeof o=="object"&&o!==null&&"ref"in o&&o?.ref?void 0:o===void 0?e:o}return e}function YCe(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 kg(e,t){if(!e||!t)return e;let o=$Ce(e,t);return typeof o=="object"&&o!==null&&"url"in o&&o?.url&&(o.url=YCe(o.url,t?._links?.["wp:theme-file"])),o}function kq(e,t,o=[],r="slug",n){let i=[t?Bo(e,["blocks",t,...o]):void 0,Bo(e,o)].filter(Boolean);for(let s of i)if(s){let a=["custom","theme","default"];for(let c of a){let u=s[c];if(u){let d=u.find(f=>f[r]===n);if(d)return r==="slug"||kq(e,t,o,"slug",d.slug)[r]===d[r]?d:void 0}}}}function KCe(e,t,o,[r,n]=[]){let i=UE.find(a=>a.cssVarInfix===r);if(!i||!e.settings)return o;let s=kq(e.settings,t,i.path,"slug",n);if(s){let{valueKey:a}=i,c=s[a];return bn(e,t,c)}return o}function XCe(e,t,o,r=[]){let n=(t?Bo(e?.settings??{},["blocks",t,"custom",...r]):void 0)??Bo(e?.settings??{},["custom",...r]);return n?bn(e,t,n):o}function bn(e,t,o){if(!o||typeof o!="string")if(typeof o=="object"&&o!==null&&"ref"in o&&typeof o.ref=="string"){let u=Bo(e,o.ref);if(!u||typeof u=="object"&&"ref"in u)return u;o=u}else return o;let r="var:",n="var(--wp--",i=")",s;if(o.startsWith(r))s=o.slice(r.length).split("|");else if(o.startsWith(n)&&o.endsWith(i))s=o.slice(n.length,-i.length).split("--");else return o;let[a,...c]=s;return a==="preset"?KCe(e,t,o,c):a==="custom"?XCe(e,t,o,c):o}var Zr=l(Z(),1),uS=l(Bv(),1),Eq=l(M(),1);function ka(e,t="root",o={}){if(!t)return null;let{fallback:r=!1}=o,{name:n,selectors:i,supports:s}=e,a=i&&Object.keys(i).length>0,c=Array.isArray(t)?t.join("."):t,u=null;if(a&&i.root?u=i?.root:s?.__experimentalSelector?u=s.__experimentalSelector:u=".wp-block-"+n.replace("core/","").replace("/","-"),c==="root")return u;let d=Array.isArray(t)?t:t.split(".");if(d.length===1){let m=r?u:null;if(a)return Bo(i,`${c}.root`,null)||Bo(i,c,null)||m;let p=s?Bo(s,`${c}.__experimentalSelector`,null):void 0;return p?Ss(u,p):m}let f;return a&&(f=Bo(i,c,null)),f||(r?ka(e,d[0],o):null)}function yg(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 sV(e){if(!e)return;let t=e.match(/var:preset\|spacing\|(.+)/);return t?`var(--wp--preset--spacing--${t[1]})`:e}function u1e(e){if(!e)return null;let t=typeof e=="string";return{top:t?e:e?.top,left:t?e:e?.left}}function aV(e,t="0"){let o=u1e(e);if(!o)return null;let r=sV(o?.top)||t,n=sV(o?.left)||t;return r===n?r:`${r} ${n}`}var _q={backgroundSize:"cover",backgroundPosition:"50% 50%"};function xq(e){if(!e||!e?.backgroundImage?.url)return;let t;return e?.backgroundSize||(t={backgroundSize:_q.backgroundSize}),e?.backgroundSize==="contain"&&!e?.backgroundPosition&&(t={backgroundPosition:_q.backgroundPosition}),t}var wq={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 d1e={button:"wp-element-button",caption:"wp-element-caption"},f1e={__experimentalBorder:"border",color:"color",dimensions:"dimensions",spacing:"spacing",typography:"typography"};function m1e(e="*",t={}){return UE.reduce((o,{path:r,cssVarInfix:n,classes:i})=>{if(!i)return o;let s=Bo(t,r,[]);return["default","theme","custom"].forEach(a=>{s[a]&&s[a].forEach(({slug:c})=>{i.forEach(({classSuffix:u,propertyName:d})=>{let f=`.has-${yg(c)}-${u}`,m=e.split(",").map(h=>`${h}${f}`).join(","),p=`var(--wp--preset--${n}--${yg(c)})`;o+=`${m}{${d}: ${p} !important;}`})})}),o},"")}function p1e(e,t){let o=e.split(","),r=[];return o.forEach(n=>{r.push(`${t.trim()}${n.trim()}`)}),r.join(", ")}var Cq=(e,t)=>{let o={};return Object.entries(e).forEach(([r,n])=>{if(r==="root"||!t?.[r])return;let i=typeof n=="string";if(!i&&typeof n=="object"&&n!==null&&Object.entries(n).forEach(([s,a])=>{if(s==="root"||!t?.[r][s])return;let c={[r]:{[s]:t[r][s]}},u=Sg(c);o[a]=[...o[a]||[],...u],delete t[r][s]}),i||typeof n=="object"&&n!==null&&"root"in n){let s=i?n:n.root,a={[r]:t[r]},c=Sg(a);o[s]=[...o[s]||[],...c],delete t[r]}}),o};function Sg(e={},t="",o,r={},n=!1){let i=ba===t,s=Object.entries(Zr.__EXPERIMENTAL_STYLE_PROPERTY).reduce((c,[u,{value:d,properties:f,useEngine:m,rootOnly:p}])=>{if(p&&!i)return c;let h=d;if(h[0]==="elements"||m)return c;let g=Bo(e,h);if(u==="--wp--style--root--padding"&&(typeof g=="string"||!o))return c;if(f&&typeof g!="string")Object.entries(f).forEach(b=>{let[k,v]=b;if(!Bo(g,[v],!1))return;let y=k.startsWith("--")?k:yg(k);c.push(`${y}: ${(0,uS.getCSSValueFromRawStyle)(Bo(g,[v]))}`)});else if(Bo(e,h,!1)){let b=u.startsWith("--")?u:yg(u);c.push(`${b}: ${(0,uS.getCSSValueFromRawStyle)(Bo(e,h))}`)}return c},[]);return e.background&&(e.background?.backgroundImage&&(e.background.backgroundImage=kg(e.background.backgroundImage,r)),!i&&e.background?.backgroundImage?.id&&(e={...e,background:{...e.background,...xq(e.background)}})),(0,uS.getCSSRules)(e).forEach(c=>{if(i&&(o||n)&&c.key.startsWith("padding"))return;let u=c.key.startsWith("--")?c.key:yg(c.key),d=kg(c.value,r);u==="font-size"&&(d=Yl({name:"",slug:"",size:d},r?.settings)),u==="aspect-ratio"&&s.push("min-height: unset"),s.push(`${u}: ${d}`)}),s}function Tq({layoutDefinitions:e=wq,style:t,selector:o,hasBlockGapSupport:r,hasFallbackGapSupport:n,fallbackGapValue:i}){let s="",a=r?aV(t?.spacing?.blockGap):"";if(n&&(o===ba?a=a||"0.5em":!r&&i&&(a=i)),a&&e&&(Object.values(e).forEach(({className:c,name:u,spacingStyles:d})=>{!r&&u!=="flex"&&u!=="grid"||d?.length&&d.forEach(f=>{let m=[];if(f.rules&&Object.entries(f.rules).forEach(([p,h])=>{m.push(`${p}: ${h||a}`)}),m.length){let p="";r?p=o===ba?`:root :where(.${c})${f?.selector||""}`:`:root :where(${o}-${c})${f?.selector||""}`:p=o===ba?`:where(.${c}${f?.selector||""})`:`:where(${o}.${c}${f?.selector||""})`,s+=`${p} { ${m.join("; ")}; }`}})}),o===ba&&r&&(s+=`${lS} { --wp--style--block-gap: ${a}; }`)),o===ba&&e){let c=["block","flex","grid"];Object.values(e).forEach(({className:u,displayMode:d,baseStyles:f})=>{d&&c.includes(d)&&(s+=`${o} .${u} { display:${d}; }`),f?.length&&f.forEach(m=>{let p=[];if(m.rules&&Object.entries(m.rules).forEach(([h,g])=>{p.push(`${h}: ${g}`)}),p.length){let h=`.${u}${m?.selector||""}`;s+=`${h} { ${p.join("; ")}; }`}})})}return s}var h1e=["border","color","dimensions","spacing","typography","filter","outline","shadow","background"];function WE(e){if(!e)return{};let r=Object.entries(e).filter(([n])=>h1e.includes(n)).map(([n,i])=>[n,JSON.parse(JSON.stringify(i))]);return Object.fromEntries(r)}var g1e=(e,t)=>{let o=[];if(!e?.styles)return o;let r=WE(e.styles);return r&&o.push({styles:r,selector:ba,skipSelectorWrapper:!0}),Object.entries(Zr.__EXPERIMENTAL_ELEMENTS).forEach(([n,i])=>{e.styles?.elements?.[n]&&o.push({styles:e.styles?.elements?.[n]??{},selector:i,skipSelectorWrapper:!d1e[n]})}),Object.entries(e.styles?.blocks??{}).forEach(([n,i])=>{let s=WE(i),a=i;if(a?.variations){let c={};Object.entries(a.variations).forEach(([u,d])=>{let f=d;c[u]=WE(f),f?.css&&(c[u].css=f.css);let m=typeof t!="string"?t[n]?.styleVariationSelectors?.[u]:void 0;Object.entries(f?.elements??{}).forEach(([p,h])=>{h&&Zr.__EXPERIMENTAL_ELEMENTS[p]&&o.push({styles:h,selector:Ss(m,Zr.__EXPERIMENTAL_ELEMENTS[p])})}),Object.entries(f?.blocks??{}).forEach(([p,h])=>{let g=typeof t!="string"?Ss(m,t[p]?.selector):void 0,b=typeof t!="string"?Ss(m,t[p]?.duotoneSelector):void 0,k=typeof t!="string"?hq(m,t[p]?.featureSelectors??{}):void 0,v=WE(h);h?.css&&(v.css=h.css),!(!g||typeof t=="string")&&(o.push({selector:g,duotoneSelector:b,featureSelectors:k,fallbackGapValue:t[p]?.fallbackGapValue,hasLayoutSupport:t[p]?.hasLayoutSupport,styles:v}),Object.entries(h.elements??{}).forEach(([y,_])=>{_&&Zr.__EXPERIMENTAL_ELEMENTS[y]&&o.push({styles:_,selector:Ss(g,Zr.__EXPERIMENTAL_ELEMENTS[y])})}))})}),s.variations=c}typeof t!="string"&&t?.[n]?.selector&&o.push({duotoneSelector:t[n].duotoneSelector,fallbackGapValue:t[n].fallbackGapValue,hasLayoutSupport:t[n].hasLayoutSupport,selector:t[n].selector,styles:s,featureSelectors:t[n].featureSelectors,styleVariationSelectors:t[n].styleVariationSelectors}),Object.entries(a?.elements??{}).forEach(([c,u])=>{typeof t!="string"&&u&&t?.[n]&&Zr.__EXPERIMENTAL_ELEMENTS[c]&&o.push({styles:u,selector:t[n]?.selector.split(",").map(d=>Zr.__EXPERIMENTAL_ELEMENTS[c].split(",").map(m=>d+" "+m)).join(",")})})}),o},b1e=(e,t)=>{let o=[];if(!e?.settings)return o;let r=s=>{let a={};return UE.forEach(({path:c})=>{let u=Bo(s,c,!1);u!==!1&&(a=fq(a,c,u))}),a},n=r(e.settings),i=e.settings?.custom;return(Object.keys(n).length>0||i)&&o.push({presets:n,custom:i,selector:lS}),Object.entries(e.settings?.blocks??{}).forEach(([s,a])=>{let c=a.custom;if(typeof t=="string"||!t[s])return;let u=r(a);(Object.keys(u).length>0||c)&&o.push({presets:u,custom:c,selector:t[s]?.selector})}),o};var ZE=(e,t,o,r,n=!1,i=!1,s={})=>{let a={blockGap:!0,blockStyles:!0,layoutStyles:!0,marginReset:!0,presets:!0,rootPadding:!0,variationStyles:!1,...s},c=g1e(e,t),u=b1e(e,t),d=e?.settings?.useRootPaddingAwareAlignments,{contentSize:f,wideSize:m}=e?.settings?.layout||{},p=a.marginReset||a.rootPadding||a.layoutStyles,h="";if(a.presets&&(f||m)&&(h+=`${lS} {`,h=f?h+` --wp--style--global--content-size: ${f};`:h,h=m?h+` --wp--style--global--wide-size: ${m};`:h,h+="}"),p&&(h+=":where(body) {margin: 0;",a.rootPadding&&d&&(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&&c.forEach(({selector:g,duotoneSelector:b,styles:k,fallbackGapValue:v,hasLayoutSupport:y,featureSelectors:_,styleVariationSelectors:w,skipSelectorWrapper:C})=>{if(_){let O=Cq(_,k);Object.entries(O).forEach(([B,T])=>{if(T.length){let A=T.join(";");h+=`:root :where(${B}){${A};}`}})}if(b){let O={};k?.filter&&(O.filter=k.filter,delete k.filter);let B=Sg(O);B.length&&(h+=`${b}{${B.join(";")};}`)}!n&&(ba===g||y)&&(h+=Tq({style:k,selector:g,hasBlockGapSupport:o,hasFallbackGapSupport:r,fallbackGapValue:v}));let E=Sg(k,g,d,e,i);if(E?.length){let O=C?g:`:root :where(${g})`;h+=`${O}{${E.join(";")};}`}k?.css&&(h+=Bq(k.css,`:root :where(${g})`)),a.variationStyles&&w&&Object.entries(w).forEach(([O,B])=>{let T=k?.variations?.[O];if(T){if(_){let N=Cq(_,T);Object.entries(N).forEach(([z,U])=>{if(U.length){let j=p1e(z,B),G=U.join(";");h+=`:root :where(${j}){${G};}`}})}let A=Sg(T,B,d,e);A.length&&(h+=`:root :where(${B}){${A.join(";")};}`),T?.css&&(h+=Bq(T.css,`:root :where(${B})`))}});let R=Object.entries(k).filter(([O])=>O.startsWith(":"));R?.length&&R.forEach(([O,B])=>{let T=Sg(B);if(!T?.length)return;let N=`:root :where(${g.split(",").map(z=>z+O).join(",")}){${T.join(";")};}`;h+=N})}),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 g=aV(e?.styles?.spacing?.blockGap)||"0.5em";h=h+`:root :where(.wp-site-blocks) > * { margin-block-start: ${g}; 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&&u.forEach(({selector:g,presets:b})=>{(ba===g||lS===g)&&(g="");let k=m1e(g,b);k.length>0&&(h+=k)}),h};var k1e=(e,t)=>{if(e?.selectors&&Object.keys(e.selectors).length>0)return e.selectors;let o={root:t};return Object.entries(f1e).forEach(([r,n])=>{let i=ka(e,r);i&&(o[n]=i)}),o},$E=(e,t)=>{let{getBlockStyles:o}=(0,Eq.select)(Zr.store),r={};return e.forEach(n=>{let i=n.name,s=ka(n);if(!s)return;let a=ka(n,"filter.duotone");if(!a){let p=ka(n),h=(0,Zr.getBlockSupport)(n,"color.__experimentalDuotone",!1);a=h&&p&&Ss(p,h)}let c=!!n?.supports?.layout||!!n?.supports?.__experimentalLayout,u=n?.supports?.spacing?.blockGap?.__experimentalDefault,d=o(i),f={};d?.forEach(p=>{let h=t?`-${t}`:"",g=`${p.name}${h}`,b=bq(g,s);f[g]=b});let m=k1e(n,s);r[i]={duotoneSelector:a??void 0,fallbackGapValue:u,featureSelectors:Object.keys(m).length?m:void 0,hasLayoutSupport:c,name:i,selector:s,styleVariationSelectors:d?.length?f:void 0}}),r};function Bq(e,t){let o="";return!e||e.trim()===""||e.split("&").forEach(n=>{if(!n||n.trim()==="")return;if(!n.includes("{"))o+=`:root :where(${t}){${n.trim()}}`;else{let s=n.replace("}","").split("{");if(s.length!==2)return;let[a,c]=s,u=a.match(/([>+~\s]*::[a-zA-Z-]+)/),d=u?u[1]:"",f=u?a.replace(d,"").trim():a.trim(),m;f===""?m=t:m=a.startsWith(" ")?Ss(t,f):gq(t,f),o+=`:root :where(${m})${d}{${c.trim()}}`}}),o}var fS=l(x(),1),lV="is-style-";function Iq(e){return e?e.split(/\s+/).reduce((t,o)=>{if(o.startsWith(lV)){let r=o.slice(lV.length);r!=="default"&&t.push(r)}return t},[]):[]}function v1e(e,t=[]){let o=Iq(e);if(!o)return null;for(let r of o)if(t.some(n=>n.name===r))return r;return null}function y1e({override:e}){dm(e)}function cV({config:e}){let{getBlockStyles:t,overrides:o}=(0,dS.useSelect)(i=>({getBlockStyles:i(_g.store).getBlockStyles,overrides:F(i(S)).getStyleOverrides()}),[]),{getBlockName:r}=(0,dS.useSelect)(S),n=(0,YE.useMemo)(()=>{if(!o?.length)return;let i=[],s=[];for(let[,a]of o)if(a?.variation&&a?.clientId&&!s.includes(a.clientId)){let c=r(a.clientId),u=e?.styles?.blocks?.[c]?.variations?.[a.variation];if(u){let d={settings:e?.settings,styles:{blocks:{[c]:{variations:{[`${a.variation}-${a.clientId}`]:u}}}}},f=$E((0,_g.getBlockTypes)(),a.clientId),b=ZE(d,f,!1,!0,!0,!0,{blockGap:!1,blockStyles:!0,layoutStyles:!1,marginReset:!1,presets:!1,rootPadding:!1,variationStyles:!0});i.push({id:`${a.variation}-${a.clientId}`,css:b,__unstableType:"variation",variation:a.variation,clientId:a.clientId}),s.push(a.clientId)}}return i},[e,o,t,r]);if(!(!n||!n.length))return(0,fS.jsx)(fS.Fragment,{children:n.map(i=>(0,fS.jsx)(y1e,{override:i},i.id))})}function uV(e,t,o){if(!e?.styles?.blocks?.[t]?.variations?.[o])return;let r=i=>{Object.keys(i).forEach(s=>{let a=i[s];if(typeof a=="object"&&a!==null)if(a.ref!==void 0)if(typeof a.ref!="string"||a.ref.trim()==="")delete i[s];else{let c=dl(e,a.ref);c?i[s]=c:delete i[s]}else r(a),Object.keys(a).length===0&&delete i[s]})},n=JSON.parse(JSON.stringify(e.styles.blocks[t].variations[o]));return r(n),n}function S1e(e,t,o){let{globalSettings:r,globalStyles:n}=(0,dS.useSelect)(i=>{let s=i(S).getSettings();return{globalSettings:s.__experimentalFeatures,globalStyles:s[Ks]}},[]);return(0,YE.useMemo)(()=>{let i=uV({settings:r,styles:n},e,t);return{settings:r,styles:{blocks:{[e]:{variations:{[`${t}-${o}`]:i}}}}}},[r,n,t,o,e])}function _1e({name:e,className:t,clientId:o}){let{getBlockStyles:r}=(0,dS.useSelect)(_g.store),n=r(e),i=v1e(t,n),s=`${lV}${i}-${o}`,{settings:a,styles:c}=S1e(e,i,o),u=(0,YE.useMemo)(()=>{if(!i)return;let d={settings:a,styles:c},f=$E((0,_g.getBlockTypes)(),o);return ZE(d,f,!1,!0,!0,!0,{blockGap:!1,blockStyles:!0,layoutStyles:!1,marginReset:!1,presets:!1,rootPadding:!1,variationStyles:!0})},[i,a,c,o]);return dm({id:`variation-${o}`,css:u,__unstableType:"variation",variation:i,clientId:o}),i?{className:s}:{}}var Pq={hasSupport:()=>!0,attributeKeys:["className"],isMatch:({className:e})=>Iq(e).length>0,useBlockProps:_1e};var Wu=l(x(),1),x1e=(0,Wu.jsxs)(_s.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24","aria-hidden":"true",focusable:"false",children:[(0,Wu.jsx)(_s.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,Wu.jsx)(_s.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 w1e({clientId:e}){let{stylesToRender:t,activeStyle:o,className:r}=bg({clientId:e}),{updateBlockAttributes:n}=(0,KE.useDispatch)(S),{globalSettings:i,globalStyles:s,blockName:a}=(0,KE.useSelect)(d=>{let f=d(S).getSettings();return{globalSettings:f.__experimentalFeatures,globalStyles:f[Ks],blockName:d(S).getBlockName(e)}},[e]),c=o?.name?uV({settings:i,styles:s},a,o.name)?.color?.background:void 0;return!t||t.length===0?null:(0,Wu.jsx)(_s.ToolbarGroup,{children:(0,Wu.jsx)(_s.ToolbarButton,{onClick:()=>{let f=(t.findIndex(h=>h.name===o.name)+1)%t.length,m=t[f],p=gg(r,o,m);n(e,{className:p})},label:(0,Rq.__)("Shuffle styles"),children:(0,Wu.jsx)(_s.Icon,{icon:x1e,style:{fill:c||"transparent"}})})})}var Oq=w1e;var nQ=l(P(),1),iQ=l(L(),1),sQ=l(M(),1);var gS=l(Z(),1),aQ=l(zp(),1);var va=l(L(),1),ya=l(P(),1),Zu=l(Z(),1),oT=l(M(),1);var zq=l(L(),1),mS=l(P(),1),QE=l(Z(),1),JE=l(I(),1);var Aq=l(L(),1),Lq=l(P(),1),Nq=l(Y(),1);var fm=l(x(),1);function XE({blocks:e}){return(0,Nq.useViewportMatch)("medium","<")?null:(0,fm.jsx)("div",{className:"block-editor-block-switcher__popover-preview-container",children:(0,fm.jsx)(Lq.Popover,{className:"block-editor-block-switcher__popover-preview",placement:"right-start",focusOnMount:!1,offset:16,children:(0,fm.jsxs)("div",{className:"block-editor-block-switcher__preview",children:[(0,fm.jsx)("div",{className:"block-editor-block-switcher__preview-title",children:(0,Aq.__)("Preview")}),(0,fm.jsx)(fn,{viewportWidth:601,blocks:e})]})})})}var Mq=l(P(),1),xg=l(Z(),1),Dq=l(M(),1),qE=l(I(),1);var Kl=l(x(),1),C1e={};function Vq({clientIds:e,blocks:t}){let{activeBlockVariation:o,blockVariationTransformations:r}=(0,Dq.useSelect)(i=>{let{getBlockAttributes:s,canRemoveBlocks:a}=i(S),{getActiveBlockVariation:c,getBlockVariations:u}=i(xg.store),d=a(e);if(t.length!==1||!d)return C1e;let[f]=t;return{blockVariationTransformations:u(f.name,"transform"),activeBlockVariation:c(f.name,s(f.clientId))}},[e,t]);return(0,qE.useMemo)(()=>r?.filter(({name:i})=>i!==o?.name),[r,o])}var B1e=({transformations:e,onSelect:t,blocks:o})=>{let[r,n]=(0,qE.useState)();return(0,Kl.jsxs)(Kl.Fragment,{children:[r&&(0,Kl.jsx)(XE,{blocks:(0,xg.cloneBlock)(o[0],e.find(({name:i})=>i===r).attributes)}),e?.map(i=>(0,Kl.jsx)(E1e,{item:i,onSelect:t,setHoveredTransformItemName:n},i.name))]})};function E1e({item:e,onSelect:t,setHoveredTransformItemName:o}){let{name:r,icon:n,title:i}=e;return(0,Kl.jsxs)(Mq.MenuItem,{className:(0,xg.getBlockMenuDefaultClassName)(r),onClick:s=>{s.preventDefault(),t(r)},onMouseLeave:()=>o(null),onMouseEnter:()=>o(r),children:[(0,Kl.jsx)(Ie,{icon:n,showColors:!0}),i]})}var Fq=B1e;var kn=l(x(),1);function T1e(e){let t={"core/paragraph":1,"core/heading":2,"core/list":3,"core/quote":4},o=(0,JE.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 I1e=({className:e,possibleBlockTransformations:t,possibleBlockVariationTransformations:o,onSelect:r,onSelectVariation:n,blocks:i})=>{let[s,a]=(0,JE.useState)(),{priorityTextTransformations:c,restTransformations:u}=T1e(t),d=c.length&&u.length,f=!!u.length&&(0,kn.jsx)(P1e,{restTransformations:u,onSelect:r,setHoveredTransformItemName:a});return(0,kn.jsxs)(kn.Fragment,{children:[(0,kn.jsxs)(mS.MenuGroup,{label:(0,zq.__)("Transform to"),className:e,children:[s&&(0,kn.jsx)(XE,{blocks:(0,QE.switchToBlockType)(i,s)}),!!o?.length&&(0,kn.jsx)(Fq,{transformations:o,blocks:i,onSelect:n}),c.map(m=>(0,kn.jsx)(jq,{item:m,onSelect:r,setHoveredTransformItemName:a},m.name)),!d&&f]}),!!d&&(0,kn.jsx)(mS.MenuGroup,{className:e,children:f})]})};function P1e({restTransformations:e,onSelect:t,setHoveredTransformItemName:o}){return e.map(r=>(0,kn.jsx)(jq,{item:r,onSelect:t,setHoveredTransformItemName:o},r.name))}function jq({item:e,onSelect:t,setHoveredTransformItemName:o}){let{name:r,icon:n,title:i,isDisabled:s}=e;return(0,kn.jsxs)(mS.MenuItem,{className:(0,QE.getBlockMenuDefaultClassName)(r),onClick:a=>{a.preventDefault(),t(r)},disabled:s,onMouseLeave:()=>o(null),onMouseEnter:()=>o(r),children:[(0,kn.jsx)(Ie,{icon:n,showColors:!0}),i]})}var Gq=I1e;var Uq=l(L(),1),Wq=l(P(),1);var eT=l(P(),1);var wg=l(x(),1),R1e=()=>{};function Hq({clientId:e,onSwitch:t=R1e}){let{onSelect:o,stylesToRender:r,activeStyle:n}=bg({clientId:e,onSwitch:t});return!r||r.length===0?null:(0,wg.jsx)(wg.Fragment,{children:r.map(i=>{let s=i.label||i.name;return(0,wg.jsx)(eT.MenuItem,{icon:n.name===i.name?al:null,onClick:()=>o(i),children:(0,wg.jsx)(eT.__experimentalText,{as:"span",limit:18,ellipsizeMode:"tail",truncate:!0,children:s})},i.name)})})}var dV=l(x(),1);function Zq({hoveredBlock:e,onSwitch:t}){let{clientId:o}=e;return(0,dV.jsx)(Wq.MenuGroup,{label:(0,Uq.__)("Styles"),className:"block-editor-block-switcher__styles__menugroup",children:(0,dV.jsx)(Hq,{clientId:o,onSwitch:t})})}var mV=l(L(),1),Qq=l(I(),1),tT=l(Y(),1);var xs=l(P(),1);var Kq=l(I(),1),Xq=l(Z(),1);var $q=l(Z(),1),fV=(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=fV(s,t,o);if(a)return a}}},Yq=(e,t)=>{let o=(0,$q.getBlockAttributesNamesByRole)(e,"content");return o?.length?o.reduce((r,n)=>(t[n]&&(r[n]=t[n]),r),{}):t};var O1e=(e,t)=>{let o=Yq(t.name,t.attributes);e.attributes={...e.attributes,...o}},A1e=(e,t)=>{let o=t.map(n=>(0,Xq.cloneBlock)(n)),r=new Set;for(let n of e){let i=!1;for(let s of o){let a=fV(s,n.name,r);if(a){i=!0,r.add(a.clientId),O1e(a,n);break}}if(!i)return}return o},L1e=(e,t)=>(0,Kq.useMemo)(()=>e.reduce((o,r)=>{let n=A1e(t,r.blocks);return n&&o.push({...r,transformedBlocks:n}),o},[]),[e,t]),qq=L1e;var ar=l(x(),1);function N1e({blocks:e,patterns:t,onSelect:o}){let[r,n]=(0,Qq.useState)(!1),i=qq(t,e);return i.length?(0,ar.jsxs)(xs.MenuGroup,{className:"block-editor-block-switcher__pattern__transforms__menugroup",children:[r&&(0,ar.jsx)(M1e,{patterns:i,onSelect:o}),(0,ar.jsx)(xs.MenuItem,{onClick:s=>{s.preventDefault(),n(!r)},icon:er,children:(0,mV.__)("Patterns")})]}):null}function M1e({patterns:e,onSelect:t}){let o=(0,tT.useViewportMatch)("medium","<");return(0,ar.jsx)("div",{className:"block-editor-block-switcher__popover-preview-container",children:(0,ar.jsx)(xs.Popover,{className:"block-editor-block-switcher__popover-preview",placement:o?"bottom":"right-start",offset:16,children:(0,ar.jsx)("div",{className:"block-editor-block-switcher__preview is-pattern-list-preview",children:(0,ar.jsx)(D1e,{patterns:e,onSelect:t})})})})}function D1e({patterns:e,onSelect:t}){return(0,ar.jsx)(xs.Composite,{role:"listbox",className:"block-editor-block-switcher__preview-patterns-container","aria-label":(0,mV.__)("Patterns list"),children:e.map(o=>(0,ar.jsx)(Jq,{pattern:o,onSelect:t},o.name))})}function Jq({pattern:e,onSelect:t}){let o="block-editor-block-switcher__preview-patterns-container",r=(0,tT.useInstanceId)(Jq,`${o}-list__item-description`);return(0,ar.jsxs)("div",{className:`${o}-list__list-item`,children:[(0,ar.jsxs)(xs.Composite.Item,{render:(0,ar.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,ar.jsx)(fn,{blocks:e.transformedBlocks,viewportWidth:e.viewportWidth||500}),(0,ar.jsx)("div",{className:`${o}-list__item-title`,children:e.title})]}),!!e.description&&(0,ar.jsx)(xs.VisuallyHidden,{id:r,children:e.description})]})}var eQ=N1e;var Yn=l(x(),1);function V1e({onClose:e,clientIds:t}){let{replaceBlocks:o,multiSelect:r,updateBlockAttributes:n}=(0,oT.useDispatch)(S),{possibleBlockTransformations:i,patterns:s,blocks:a,isUsingBindings:c,canRemove:u,hasBlockStyles:d}=(0,oT.useSelect)(R=>{let{getBlockAttributes:O,getBlocksByClientId:B,getBlockRootClientId:T,getBlockTransformItems:A,__experimentalGetPatternTransformItems:N,canRemoveBlocks:z,getBlockName:U}=R(S),{getBlockStyles:j}=R(Zu.store),G=T(t[0]),V=B(t),H=t.length===1,K=H&&U(t[0]),oe=H&&!!j(K)?.length;return{blocks:V,possibleBlockTransformations:A(V,G),patterns:N(V,G),isUsingBindings:t.every(ee=>!!O(ee)?.metadata?.bindings),canRemove:z(t),hasBlockStyles:oe}},[t]),f=Vq({clientIds:t,blocks:a});function m(R){R.length>1&&r(R[0].clientId,R[R.length-1].clientId)}function p(R){let O=(0,Zu.switchToBlockType)(a,R);o(t,O),m(O)}function h(R){n(a[0].clientId,{...f.find(({name:O})=>O===R).attributes})}function g(R){o(t,R),m(R)}let b=a.length===1,k=b&&((0,Zu.isTemplatePart)(a[0])||(0,Zu.isReusableBlock)(a[0])),v=!!i?.length&&u&&!k,y=!!f?.length,_=!!s?.length&&u,w=v||y;if(!(d||w||_))return(0,Yn.jsx)("p",{className:"block-editor-block-switcher__no-transforms",children:(0,va.__)("No transforms.")});let E=b?(0,va._x)("This block is connected.","block toolbar button label and description"):(0,va._x)("These blocks are connected.","block toolbar button label and description");return(0,Yn.jsxs)("div",{className:"block-editor-block-switcher__container",children:[_&&(0,Yn.jsx)(eQ,{blocks:a,patterns:s,onSelect:R=>{g(R),e()}}),w&&(0,Yn.jsx)(Gq,{className:"block-editor-block-switcher__transforms__menugroup",possibleBlockTransformations:i,possibleBlockVariationTransformations:f,blocks:a,onSelect:R=>{p(R),e()},onSelectVariation:R=>{h(R),e()}}),d&&(0,Yn.jsx)(Zq,{hoveredBlock:a[0],onSwitch:e}),c&&(0,Yn.jsx)(ya.MenuGroup,{children:(0,Yn.jsx)(ya.__experimentalText,{className:"block-editor-block-switcher__binding-indicator",children:E})})]})}var F1e=({children:e,clientIds:t,label:o,text:r})=>{let i=t.length===1?(0,va.__)("Change block type or style"):(0,va.sprintf)((0,va._n)("Change type of %d block","Change type of %d blocks",t.length),t.length);return(0,Yn.jsx)(ya.ToolbarGroup,{children:(0,Yn.jsx)(ya.ToolbarItem,{children:s=>(0,Yn.jsx)(ya.DropdownMenu,{className:"block-editor-block-switcher",label:o,popoverProps:{placement:"bottom-start",className:"block-editor-block-switcher__popover"},icon:e,text:r,toggleProps:{description:i,...s},menuProps:{orientation:"both"},children:({onClose:a})=>(0,Yn.jsx)(V1e,{onClose:a,clientIds:t})})})})},tQ=F1e;var Cg=l(P(),1),pS=l(L(),1),rT=l(I(),1),oQ=l(M(),1);var Xl=l(x(),1);function z1e({clientIds:e,blockTitle:t}){let o=(0,oQ.useSelect)(i=>{let{getBlockAttributes:s}=i(S);return s(e?.[0])?.metadata?.name},[e]),r=e.length===1,n;return r&&o?n=(0,pS.sprintf)((0,pS.__)('This %1$s is editable using the "%2$s" override.'),t.toLowerCase(),o):n=(0,pS.__)("These blocks are editable using overrides."),(0,Xl.jsx)(Cg.__experimentalText,{children:n})}function rQ({icon:e,clientIds:t,blockTitle:o,label:r}){let[n,i]=(0,rT.useState)(!1),s=(0,rT.useRef)();return(0,Xl.jsxs)(Xl.Fragment,{children:[(0,Xl.jsx)(Cg.ToolbarButton,{ref:s,className:"block-editor-block-toolbar__pattern-overrides-indicator",icon:e,label:r,onClick:()=>i(!n),"aria-expanded":n}),n&&(0,Xl.jsx)(Cg.Popover,{anchor:s.current,onClose:()=>i(!1),placement:"bottom-start",offset:16,className:"block-editor-block-toolbar__pattern-overrides-popover",children:(0,Xl.jsx)(z1e,{clientIds:t,blockTitle:o})})]})}var hS=l(x(),1);function j1e({select:e,clientIds:t}){let{getBlockName:o,getBlockAttributes:r,getBlockParentsByBlockName:n,canRemoveBlocks:i,getTemplateLock:s,getBlockEditingMode:a}=F(e(S)),{getBlockStyles:c}=e(gS.store),u=t.some(w=>s(w)==="contentOnly"),d=t.length===1,f=d&&o(t[0]),m=d&&!!c(f)?.length,p=t.some(w=>!!r(w)?.metadata?.patternName),h=t.every(w=>Tk(r(w)?.metadata?.bindings)),g=t.every(w=>n(w,"core/block",!0).length>0),b=i(t),k=a(t[0])==="default",y=!(window?.__experimentalContentOnlyPatternInsertion&&p)&&k&&(m||b)&&!u,_=h&&g;return y?"switcher":_?"pattern-overrides":"default"}function G1e({select:e,clientIds:t}){let{getBlockName:o,getBlockAttributes:r}=F(e(S)),n=t.length===1,i=t[0],s=r(i);if(n&&s?.metadata?.patternName&&window?.__experimentalContentOnlyPatternInsertion)return pi;let a=o(i),c=(0,gS.getBlockType)(a);if(n){let{getActiveBlockVariation:f}=e(gS.store);return f(a,s)?.icon||c?.icon}let u=t.map(f=>o(f));return new Set(u).size===1?c?.icon:sf}function lQ({clientIds:e,isSynced:t}){let{icon:o,showIconLabels:r,variant:n}=(0,sQ.useSelect)(f=>({icon:G1e({select:f,clientIds:e}),showIconLabels:f(aQ.store).get("core","showIconLabels"),variant:j1e({select:f,clientIds:e})}),[e]),i=rr({clientId:e?.[0],maximumLength:35}),s=e.length===1,a=s&&t&&!r,c=s?i:(0,iQ.__)("Multiple blocks selected"),u=a&&i?i:void 0,d=(0,hS.jsx)(Ie,{className:"block-editor-block-toolbar__block-icon",icon:o});return n==="switcher"?(0,hS.jsx)(tQ,{clientIds:e,label:c,text:u,children:d}):n==="pattern-overrides"?(0,hS.jsx)(rQ,{icon:d,clientIds:e,blockTitle:i,label:c}):(0,hS.jsx)(nQ.ToolbarButton,{disabled:!0,className:"block-editor-block-toolbar__block-icon-button",title:c,icon:d,text:u})}var ot=l(x(),1);function hV({hideDragHandle:e,focusOnMount:t,__experimentalInitialIndex:o,__experimentalOnIndexChange:r,variant:n="unstyled"}){let{blockClientId:i,blockClientIds:s,isDefaultEditingMode:a,blockType:c,toolbarKey:u,shouldShowVisualToolbar:d,showParentSelector:f,isUsingBindings:m,isSectionContainer:p,hasContentOnlyLocking:h,showShuffleButton:g,showSlots:b,showGroupButtons:k,showLockButtons:v,showBlockVisibilityButton:y,showSwitchSectionStyleButton:_}=(0,uQ.useSelect)(z=>{let{getBlockName:U,getBlockMode:j,getBlockParents:G,getSelectedBlockClientIds:V,isBlockValid:H,getBlockEditingMode:K,getBlockAttributes:oe,getTemplateLock:ee,getParentSectionBlock:J,isZoomOut:ie,isSectionBlock:de}=F(z(S)),q=V(),ne=q[0],X=G(ne),Q=J(ne)??X[X.length-1],se=U(Q),ce=(0,ql.getBlockType)(se),_e=K(ne),ge=_e==="default",Ae=U(ne),Xe=q.every(Fe=>H(Fe)),dt=q.every(Fe=>j(Fe)==="visual"),St=q.every(Fe=>!!oe(Fe)?.metadata?.bindings),yo=q.some(Fe=>ee(Fe)==="contentOnly"),Ge=ie(),So=de(ne),so=window?.__experimentalContentOnlyPatternInsertion&&(Ge||So);return{blockClientId:ne,blockClientIds:q,isDefaultEditingMode:ge,blockType:ne&&(0,ql.getBlockType)(Ae),shouldShowVisualToolbar:Xe&&dt,toolbarKey:`${ne}${Q}`,showParentSelector:!Ge&&ce&&_e!=="contentOnly"&&K(Q)!=="disabled"&&(0,ql.hasBlockSupport)(ce,"__experimentalParentSelector",!0)&&q.length===1,isUsingBindings:St,isSectionContainer:So,hasContentOnlyLocking:yo,showShuffleButton:Ge,showSlots:!Ge,showGroupButtons:!Ge,showLockButtons:!Ge,showBlockVisibilityButton:!Ge,showSwitchSectionStyleButton:so}},[]),w=(0,pV.useRef)(null),C=(0,pV.useRef)(),E=sg({ref:C}),R=!(0,dQ.useViewportMatch)("medium","<");if(!FE())return null;let B=s.length>1,T=(0,ql.isReusableBlock)(c)||(0,ql.isTemplatePart)(c),A=D("block-editor-block-contextual-toolbar",{"has-parent":f}),N=D("block-editor-block-toolbar",{"is-synced":T,"is-connected":m});return(0,ot.jsx)(pg,{focusEditorOnEscape:!0,className:A,"aria-label":(0,cQ.__)("Block tools"),variant:n==="toolbar"?void 0:n,focusOnMount:t,__experimentalInitialIndex:o,__experimentalOnIndexChange:r,children:(0,ot.jsxs)("div",{ref:w,className:N,children:[f&&!B&&R&&(0,ot.jsx)(PK,{}),(d||B)&&(0,ot.jsx)("div",{ref:C,...E,children:(0,ot.jsxs)(fQ.ToolbarGroup,{className:"block-editor-block-toolbar__block-controls",children:[(0,ot.jsx)(lQ,{clientIds:s,isSynced:T}),a&&y&&(0,ot.jsx)(M9,{clientIds:s}),!B&&a&&v&&(0,ot.jsx)(W5,{clientId:i}),(0,ot.jsx)(nE,{clientIds:s,hideDragHandle:e})]})}),!h&&d&&B&&k&&(0,ot.jsx)(z5,{}),g&&(0,ot.jsx)(sq,{clientId:s[0]}),_&&(0,ot.jsx)(Oq,{clientId:s[0]}),d&&b&&(0,ot.jsxs)(ot.Fragment,{children:[!p&&(0,ot.jsxs)(ot.Fragment,{children:[(0,ot.jsx)(pt.Slot,{group:"parent",className:"block-editor-block-toolbar__slot"}),(0,ot.jsx)(pt.Slot,{group:"block",className:"block-editor-block-toolbar__slot"}),(0,ot.jsx)(pt.Slot,{className:"block-editor-block-toolbar__slot"}),(0,ot.jsx)(pt.Slot,{group:"inline",className:"block-editor-block-toolbar__slot"})]}),(0,ot.jsx)(pt.Slot,{group:"other",className:"block-editor-block-toolbar__slot"}),(0,ot.jsx)(cE.Slot,{})]}),(0,ot.jsx)(KX,{clientIds:s}),(0,ot.jsx)(LE,{clientIds:s})]})},u)}function mQ({hideDragHandle:e,variant:t}){return(0,ot.jsx)(hV,{hideDragHandle:e,variant:t,focusOnMount:void 0,__experimentalInitialIndex:void 0,__experimentalOnIndexChange:void 0})}var gV=l(x(),1);function gQ({clientId:e,isTyping:t,__unstableContentRef:o}){let{capturingClientId:r,isInsertionPointVisible:n,lastClientId:i}=KB(e),s=(0,Bg.useRef)();(0,Bg.useEffect)(()=>{s.current=void 0},[e]);let{stopTyping:a}=(0,pQ.useDispatch)(S),c=(0,Bg.useRef)(!1);(0,hQ.useShortcut)("core/block-editor/focus-toolbar",()=>{c.current=!0,a(!0)}),(0,Bg.useEffect)(()=>{c.current=!1});let u=r||e,d=YB({contentElement:o?.current,clientId:u});return!t&&(0,gV.jsx)(Yf,{clientId:u,bottomClientId:i,className:D("block-editor-block-list__block-popover",{"is-insertion-point-visible":n}),resize:!1,...d,__unstableContentRef:o,children:(0,gV.jsx)(hV,{focusOnMount:c.current,__experimentalInitialIndex:s.current,__experimentalOnIndexChange:f=>{s.current=f},variant:"toolbar"})})}var nT=l(M(),1),iT=l(I(),1);var bQ=l(P(),1);var kQ=l(L(),1),vQ=l(x(),1);function H1e({onClick:e}){return(0,vQ.jsx)(bQ.Button,{variant:"primary",icon:mi,size:"compact",className:D("block-editor-button-pattern-inserter__button","block-editor-block-tools__zoom-out-mode-inserter-button"),onClick:e,label:(0,kQ._x)("Add pattern","Generic label for pattern inserter button")})}var yQ=H1e;var bV=l(x(),1);function U1e(){let[e,t]=(0,iT.useState)(!1),{hasSelection:o,blockOrder:r,setInserterIsOpened:n,sectionRootClientId:i,selectedBlockClientId:s,blockInsertionPoint:a,insertionPointVisible:c}=(0,nT.useSelect)(h=>{let{getSettings:g,getBlockOrder:b,getSelectionStart:k,getSelectedBlockClientId:v,getSectionRootClientId:y,getBlockInsertionPoint:_,isBlockInsertionPointVisible:w}=F(h(S)),C=y();return{hasSelection:!!k().clientId,blockOrder:b(C),sectionRootClientId:C,setInserterIsOpened:g().__experimentalSetIsInserterOpened,selectedBlockClientId:v(),blockInsertionPoint:_(),insertionPointVisible:w()}},[]),{showInsertionPoint:u}=F((0,nT.useDispatch)(S));if((0,iT.useEffect)(()=>{let h=setTimeout(()=>{t(!0)},500);return()=>{clearTimeout(h)}},[]),!e||!o)return null;let d=s,m=r.findIndex(h=>s===h)+1,p=r[m];return c&&a?.index===m?null:(0,bV.jsx)(CB,{previousClientId:d,nextClientId:p,children:(0,bV.jsx)(yQ,{onClick:()=>{n({rootClientId:i,insertionIndex:m,tab:"patterns",category:"all"}),u(i,m,{operation:"insert"})}})})}var SQ=U1e;var _Q=l(M(),1),xQ=l(Z(),1);function wQ(){return(0,_Q.useSelect)(e=>{let{getSelectedBlockClientId:t,getFirstMultiSelectedBlockClientId:o,getBlock:r,getBlockMode:n,getSettings:i,isTyping:s,isBlockInterfaceHidden:a}=F(e(S)),c=t()||o(),u=r(c),d=!!c&&!!u,f=d&&(0,xQ.isUnmodifiedDefaultBlock)(u,"content")&&n(c)!=="html",m=c&&!s()&&f,p=!a()&&!i().hasFixedToolbar&&!m&&d&&!f;return{showEmptyBlockSideInserter:m,showBlockToolbarPopover:p}},[])}var ws=l(x(),1);function W1e(e){let{getSelectedBlockClientId:t,getFirstMultiSelectedBlockClientId:o,getSettings:r,isTyping:n,isDragging:i,isZoomOut:s}=F(e(S));return{clientId:t()||o(),hasFixedToolbar:r().hasFixedToolbar,isTyping:n(),isZoomOutMode:s(),isDragging:i()}}function bS({children:e,__unstableContentRef:t,...o}){let{clientId:r,hasFixedToolbar:n,isTyping:i,isZoomOutMode:s,isDragging:a}=(0,Eg.useSelect)(W1e,[]),[c,u]=(0,sT.useState)(null),d=(0,CQ.__unstableUseShortcutEventMatch)(),{getBlocksByClientId:f,getSelectedBlockClientIds:m,getBlockRootClientId:p,isGroupable:h,getEditedContentOnlySection:g}=F((0,Eg.useSelect)(S)),{getGroupingBlockName:b}=(0,Eg.useSelect)(Tg.store),{showEmptyBlockSideInserter:k,showBlockToolbarPopover:v}=wQ(),y=lg(),{duplicateBlocks:_,removeBlocks:w,replaceBlocks:C,insertAfterBlock:E,insertBeforeBlock:R,selectBlock:O,moveBlocksUp:B,moveBlocksDown:T,expandBlock:A,stopEditingContentOnlySection:N,updateBlockAttributes:z}=F((0,Eg.useDispatch)(S));function U(V){if(!V.defaultPrevented){if(d("core/block-editor/move-up",V)||d("core/block-editor/move-down",V)){let H=m();if(H.length){V.preventDefault();let K=p(H[0]);(d("core/block-editor/move-up",V)?"up":"down")==="up"?B(H,K):T(H,K);let ee=Array.isArray(H)?H.length:1,J=(0,Ig.sprintf)((0,Ig._n)("%d block moved.","%d blocks moved.",H.length),ee);(0,yV.speak)(J)}}else if(d("core/block-editor/duplicate",V)){let H=m();H.length&&(V.preventDefault(),_(H))}else if(d("core/block-editor/remove",V)){let H=m();H.length&&(V.preventDefault(),w(H))}else if(d("core/block-editor/paste-styles",V)){let H=m();if(H.length){V.preventDefault();let K=f(H);y(K)}}else if(d("core/block-editor/insert-after",V)){let H=m();H.length&&(V.preventDefault(),E(H[H.length-1]))}else if(d("core/block-editor/insert-before",V)){let H=m();H.length&&(V.preventDefault(),R(H[0]))}else if(d("core/block-editor/unselect",V)){if(V.target.closest("[role=toolbar]"))return;let H=m();H.length>1&&(V.preventDefault(),O(H[0]))}else if(d("core/block-editor/collapse-list-view",V)){if((0,kV.isTextField)(V.target)||(0,kV.isTextField)(V.target?.contentWindow?.document?.activeElement))return;V.preventDefault(),A(r)}else if(d("core/block-editor/group",V)){let H=m();if(H.length>1&&h(H)){V.preventDefault();let K=f(H),oe=b(),ee=(0,Tg.switchToBlockType)(K,oe);C(H,ee),(0,yV.speak)((0,Ig.__)("Selected blocks are grouped."))}}else if(d("core/block-editor/toggle-block-visibility",V)){let H=m();if(H.length){V.preventDefault();let K=f(H);if(!K.every(ee=>(0,Tg.hasBlockSupport)(ee.name,"visibility",!0)))return;if(window.__experimentalHideBlocksBasedOnScreenSize)u(H);else{let ee=K.some(ie=>ie.attributes.metadata?.blockVisibility===!1),J=Object.fromEntries(K.map(({clientId:ie,attributes:de})=>[ie,{metadata:Se({...de?.metadata,blockVisibility:ee?void 0:!1})}]));z(H,J,{uniqueByBlock:!0})}}}d("core/block-editor/stop-editing-as-blocks",V)&&g()&&N()}}let j=$f(t),G=$f(t);return(0,ws.jsxs)("div",{...o,onKeyDown:U,className:D(o.className,{"block-editor-block-tools--is-dragging":a}),children:[(0,ws.jsxs)(eg.Provider,{value:(0,sT.useRef)(!1),children:[!i&&!s&&(0,ws.jsx)(tY,{__unstableContentRef:t}),k&&(0,ws.jsx)(mK,{__unstableContentRef:t,clientId:r}),v&&(0,ws.jsx)(gQ,{__unstableContentRef:t,clientId:r,isTyping:i}),!s&&!n&&(0,ws.jsx)(vV.Popover.Slot,{name:"block-toolbar",ref:j}),e,(0,ws.jsx)(vV.Popover.Slot,{name:"__unstable-block-tools-after",ref:G}),s&&!a&&(0,ws.jsx)(SQ,{__unstableContentRef:t})]}),c&&(0,ws.jsx)(El,{clientIds:c,onClose:()=>u(null)})]})}var Ai=l(L(),1),Sa=l(Z(),1),$u=l(M(),1),SV=l(EQ(),1);var TQ=l(x(),1),Z1e=()=>function(){let{replaceBlocks:t,multiSelect:o}=(0,$u.useDispatch)(S),{blocks:r,clientIds:n,canRemove:i,possibleBlockTransformations:s,invalidSelection:a}=(0,$u.useSelect)(p=>{let{getBlockRootClientId:h,getBlockTransformItems:g,getSelectedBlockClientIds:b,getBlocksByClientId:k,canRemoveBlocks:v}=p(S),y=b(),_=k(y);if(_.filter(C=>!C).length>0)return{invalidSelection:!0};let w=h(y[0]);return{blocks:_,clientIds:y,possibleBlockTransformations:g(_,w),canRemove:v(y),invalidSelection:!1}},[]);if(a)return{isLoading:!1,commands:[]};let c=r.length===1&&(0,Sa.isTemplatePart)(r[0]);function u(p){p.length>1&&o(p[0].clientId,p[p.length-1].clientId)}function d(p){let h=(0,Sa.switchToBlockType)(r,p);t(n,h),u(h)}let f=!!s.length&&i&&!c;return!n||n.length<1||!f?{isLoading:!1,commands:[]}:{isLoading:!1,commands:s.map(p=>{let{name:h,title:g,icon:b}=p;return{name:"core/block-editor/transform-to-"+h.replace("/","-"),label:(0,Ai.sprintf)((0,Ai.__)("Transform to %s"),g),icon:(0,TQ.jsx)(Ie,{icon:b}),callback:({close:k})=>{d(h),k()}}})}},$1e=()=>function(){let{clientIds:t,isUngroupable:o,isGroupable:r}=(0,$u.useSelect)(B=>{let{getSelectedBlockClientIds:T,isUngroupable:A,isGroupable:N}=B(S);return{clientIds:T(),isUngroupable:A(),isGroupable:N()}},[]),{canInsertBlockType:n,getBlockRootClientId:i,getBlocksByClientId:s,canRemoveBlocks:a,getBlockName:c}=(0,$u.useSelect)(S),{getDefaultBlockName:u,getGroupingBlockName:d}=(0,$u.useSelect)(Sa.store),f=s(t),{removeBlocks:m,replaceBlocks:p,duplicateBlocks:h,insertAfterBlock:g,insertBeforeBlock:b,updateBlockAttributes:k}=(0,$u.useDispatch)(S),v=()=>{if(!f.length)return;let B=d(),T=(0,Sa.switchToBlockType)(f,B);T&&p(t,T)},y=()=>{if(!f.length)return;let B=f[0].innerBlocks;B.length&&p(t,B)};if(!t||t.length<1)return{isLoading:!1,commands:[]};let _=i(t[0]),w=n(u(),_),C=f.every(B=>!!B&&(0,Sa.hasBlockSupport)(B.name,"multiple",!0)&&n(B.name,_)),E=a(t),R=f.every(({clientId:B})=>(0,Sa.hasBlockSupport)(c(B),"visibility",!0))&&!window.__experimentalHideBlocksBasedOnScreenSize,O=[];if(C&&O.push({name:"duplicate",label:(0,Ai.__)("Duplicate"),callback:()=>h(t,!0),icon:sf}),w&&O.push({name:"add-before",label:(0,Ai.__)("Add before"),callback:()=>{let B=Array.isArray(t)?t[0]:B;b(B)},icon:mi},{name:"add-after",label:(0,Ai.__)("Add after"),callback:()=>{let B=Array.isArray(t)?t[t.length-1]:B;g(B)},icon:mi}),r&&O.push({name:"Group",label:(0,Ai.__)("Group"),callback:v,icon:jk}),o&&O.push({name:"ungroup",label:(0,Ai.__)("Ungroup"),callback:y,icon:QL}),E&&O.push({name:"remove",label:(0,Ai.__)("Delete"),callback:()=>m(t,!0),icon:XL}),R){let B=f.some(T=>T.attributes.metadata?.blockVisibility===!1);O.push({name:"core/toggle-block-visibility",label:B?(0,Ai.__)("Show"):(0,Ai.__)("Hide"),callback:()=>{let T=Object.fromEntries(f?.map(({clientId:A,attributes:N})=>[A,{metadata:Se({...N?.metadata,blockVisibility:B?void 0:!1})}]));k(t,T,{uniqueByBlock:!0})},icon:B?Pn:tr})}return{isLoading:!1,commands:O.map(B=>({...B,name:"core/block-editor/action-"+B.name,callback:({close:T})=>{B.callback(),T()}}))}},aT=()=>{(0,SV.useCommandLoader)({name:"core/block-editor/blockTransforms",hook:Z1e()}),(0,SV.useCommandLoader)({name:"core/block-editor/blockQuickActions",hook:$1e(),context:"block-selection-edit"})};var _a=l(x(),1),Y1e={ignoredSelectors:[/\.editor-styles-wrapper/gi]};function _V({shouldIframe:e=!0,height:t="300px",children:o=(0,_a.jsx)(Lh,{}),styles:r,contentRef:n,iframeProps:i}){aT();let s=(0,lT.useViewportMatch)("medium","<"),a=Uy(),c=Kf(),u=(0,IQ.useRef)(),d=(0,lT.useMergeRefs)([n,c,u]),f=(0,PQ.useSelect)(p=>F(p(S)).getZoomLevel(),[]),m=f!==100&&!s?{scale:f,frameSize:"40px"}:{};return e?(0,_a.jsx)(bS,{__unstableContentRef:u,style:{height:t,display:"flex"},children:(0,_a.jsxs)(Eh,{...i,...m,ref:a,contentRef:d,style:{...i?.style},name:"editor-canvas",children:[(0,_a.jsx)(Il,{styles:r}),o]})}):(0,_a.jsxs)(bS,{__unstableContentRef:u,style:{height:t,display:"flex"},children:[(0,_a.jsx)(Il,{styles:r,scope:":where(.editor-styles-wrapper)",transformOptions:Y1e}),(0,_a.jsx)(g1,{ref:d,className:"editor-styles-wrapper",tabIndex:-1,style:{height:"100%",width:"100%"},children:o})]})}function K1e({children:e,height:t,styles:o}){return(0,_a.jsx)(_V,{height:t,styles:o,children:e})}var RQ=K1e;var xa=l(P(),1),OQ=l(L(),1),AQ=l(at(),1),LQ=l(Re(),1),Li=l(x(),1),X1e=()=>(0,Li.jsx)(xa.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:(0,Li.jsx)(xa.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"})}),q1e=({style:e,className:t})=>(0,Li.jsx)("div",{className:"block-library-colors-selector__icon-container",children:(0,Li.jsx)("div",{className:`${t} block-library-colors-selector__state-selection`,style:e,children:(0,Li.jsx)(X1e,{})})}),Q1e=({TextColor:e,BackgroundColor:t})=>({onToggle:o,isOpen:r})=>{let n=i=>{!r&&i.keyCode===AQ.DOWN&&(i.preventDefault(),o())};return(0,Li.jsx)(xa.ToolbarGroup,{children:(0,Li.jsx)(xa.ToolbarButton,{className:"components-toolbar__control block-library-colors-selector__toggle",label:(0,OQ.__)("Open Colors Selector"),onClick:o,onKeyDown:n,icon:(0,Li.jsx)(t,{children:(0,Li.jsx)(e,{children:(0,Li.jsx)(q1e,{})})})})})},J1e=({children:e,...t})=>((0,LQ.default)("wp.blockEditor.BlockColorsStyleSelector",{alternative:"block supports API",since:"6.1",version:"6.3"}),(0,Li.jsx)(xa.Dropdown,{popoverProps:{placement:"bottom-start"},className:"block-library-colors-selector",contentClassName:"block-library-colors-selector__popover",renderToggle:Q1e(t),renderContent:()=>e})),NQ=J1e;var GJ=l(Re(),1),BT=l(P(),1),EV=l(L(),1),HJ=l(M(),1),UJ=l(I(),1);var Dg=l(Y(),1),wT=l(P(),1),yS=l(M(),1),zJ=l(Re(),1),po=l(I(),1),BV=l(L(),1);var vT=l(P(),1),yT=l(I(),1),ST=l(M(),1);var DQ=l(Y(),1),VQ=l(jo(),1),FQ=l(M(),1),mT=l(I(),1),Pg=l(L(),1);var cT=l(I(),1),uT=(0,cT.createContext)({});uT.displayName="ListViewContext";var Yu=()=>(0,cT.useContext)(uT);var dT=l(I(),1),MQ=l(x(),1);function fT({children:e,...t}){let o=(0,dT.useRef)();return(0,dT.useEffect)(()=>{o.current&&(o.current.textContent=o.current.textContent)},[e]),(0,MQ.jsx)("div",{hidden:!0,...t,ref:o,children:e})}var kS=l(x(),1),xV=(0,mT.forwardRef)(({nestingLevel:e,blockCount:t,clientId:o,...r},n)=>{let{insertedBlock:i,setInsertedBlock:s}=Yu(),a=(0,DQ.useInstanceId)(xV),{directInsert:c,hideInserter:u}=(0,FQ.useSelect)(h=>{let{getBlockListSettings:g,getTemplateLock:b,isZoomOut:k}=F(h(S)),y=g(o)?.directInsert||!1,_=!!b(o)||k();return{directInsert:y,hideInserter:_}},[o]),d=rr({clientId:o,context:"list-view"}),f=rr({clientId:i?.clientId,context:"list-view"});if((0,mT.useEffect)(()=>{f?.length&&(0,VQ.speak)((0,Pg.sprintf)((0,Pg.__)("%s block inserted"),f),"assertive")},[f]),u)return null;let m=`list-view-appender__${a}`,p=(0,Pg.sprintf)((0,Pg.__)("Append to %1$s block at position %2$d, Level %3$d"),d,t+1,e);return(0,kS.jsxs)("div",{className:"list-view-appender",children:[(0,kS.jsx)(Ti,{ref:n,rootClientId:o,position:"bottom right",isAppender:!0,selectBlockOnInsert:!1,shouldDirectInsert:c,__experimentalIsQuick:!0,...r,toggleProps:{"aria-describedby":m},onSelectOrClose:h=>{h?.clientId&&s(h)}}),(0,kS.jsx)(fT,{id:m,children:p})]})});var Xu=l(Z(),1),pm=l(P(),1),bT=l(Y(),1);var mo=l(I(),1),Ag=l(M(),1),gT=l(L(),1),kT=l(at(),1),dJ=l(zy(),1),fJ=l(ra(),1),mJ=l(jo(),1);var zQ=l(P(),1),jQ=l(Y(),1),GQ=l(I(),1);var HQ=l(x(),1),eBe=WU(zQ.__experimentalTreeGridRow),tBe=(0,GQ.forwardRef)(({isDragged:e,isSelected:t,position:o,level:r,rowCount:n,children:i,className:s,path:a,...c},u)=>{let d=CC({clientId:c["data-block"],enableAnimation:!0,triggerAnimationOnChange:a}),f=(0,jQ.useMergeRefs)([u,d]);return(0,HQ.jsx)(eBe,{ref:f,className:D("block-editor-list-view-leaf",s),level:r,positionInSet:o,setSize:n,isExpanded:void 0,...c,children:i})}),UQ=tBe;var WQ=l(je(),1),ZQ=l(I(),1);function $Q({isSelected:e,selectedClientIds:t,rowItemRef:o}){let r=t.length===1;(0,ZQ.useLayoutEffect)(()=>{if(!e||!r||!o.current)return;let n=(0,WQ.getScrollContainer)(o.current),{ownerDocument:i}=o.current;if(n===i.body||n===i.documentElement||!n)return;let a=o.current.getBoundingClientRect(),c=n.getBoundingClientRect();(a.top<c.top||a.bottom>c.bottom)&&o.current.scrollIntoView()},[e,r,o])}var rJ=l(I(),1);var Rg=l(P(),1),JQ=l(I(),1);var hT=l(at(),1),eJ=l(M(),1),tJ=l(Z(),1);var YQ=l(L(),1),wV=l(x(),1);function pT({onClick:e}){return(0,wV.jsx)("span",{className:"block-editor-list-view__expander",onClick:t=>e(t,{forceToggle:!0}),"aria-hidden":"true","data-testid":"list-view-expander",children:(0,wV.jsx)(Ee,{icon:(0,YQ.isRTL)()?Dk:Mc})})}var KQ=l(I(),1),XQ=l(M(),1);var oBe=3,qQ={"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?qQ[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>=oBe)return t}return t}};function rBe(e,t){let o=qQ[e.name],r=o?o(e):void 0;return r?Array.isArray(r)?t?[]:r:[r]:[]}function QQ({clientId:e,isExpanded:t}){let{block:o}=(0,XQ.useSelect)(n=>({block:n(S).getBlock(e)}),[e]);return(0,KQ.useMemo)(()=>rBe(o,t),[o,t])}var Wo=l(x(),1),{Badge:nBe}=F(Rg.privateApis);function iBe({className:e,block:{clientId:t},onClick:o,onContextMenu:r,onMouseDown:n,onToggleExpanded:i,tabIndex:s,onFocus:a,onDragStart:c,onDragEnd:u,draggable:d,isExpanded:f,ariaDescribedBy:m},p){let h=xt(t),g=rr({clientId:t,context:"list-view"}),{isLocked:b}=Wn(t),{canToggleBlockVisibility:k,isBlockHidden:v,hasPatternName:y}=(0,eJ.useSelect)(B=>{let{getBlockName:T,getBlockAttributes:A}=B(S),{areBlocksHiddenAnywhere:N}=F(B(S)),z=A(t);return{canToggleBlockVisibility:(0,tJ.hasBlockSupport)(T(t),"visibility",!0),isBlockHidden:N([t]),hasPatternName:!!z?.metadata?.patternName}},[t]),_=b,w=k&&v,C=h?.positionType==="sticky",E=QQ({clientId:t,isExpanded:f}),R=B=>{B.dataTransfer.clearData(),c?.(B)};function O(B){(B.keyCode===hT.ENTER||B.keyCode===hT.SPACE)&&o(B)}return(0,Wo.jsxs)("a",{className:D("block-editor-list-view-block-select-button",e),onClick:o,onContextMenu:r,onKeyDown:O,onMouseDown:n,ref:p,tabIndex:s,onFocus:a,onDragStart:R,onDragEnd:u,draggable:d,href:`#block-${t}`,"aria-describedby":m,"aria-expanded":f,children:[(0,Wo.jsx)(pT,{onClick:i}),(0,Wo.jsx)(Ie,{icon:y?pi:h?.icon,showColors:!0,context:"list-view"}),(0,Wo.jsxs)(Rg.__experimentalHStack,{alignment:"center",className:"block-editor-list-view-block-select-button__label-wrapper",justify:"flex-start",spacing:1,children:[(0,Wo.jsx)("span",{className:"block-editor-list-view-block-select-button__title",children:(0,Wo.jsx)(Rg.__experimentalTruncate,{ellipsizeMode:"auto",children:g})}),h?.anchor&&(0,Wo.jsx)("span",{className:"block-editor-list-view-block-select-button__anchor-wrapper",children:(0,Wo.jsx)(nBe,{className:"block-editor-list-view-block-select-button__anchor",children:h.anchor})}),C&&(0,Wo.jsx)("span",{className:"block-editor-list-view-block-select-button__sticky",children:(0,Wo.jsx)(Ee,{icon:oL})}),E.length?(0,Wo.jsx)("span",{className:"block-editor-list-view-block-select-button__images","aria-hidden":!0,children:E.map((B,T)=>(0,Wo.jsx)("span",{className:"block-editor-list-view-block-select-button__image",style:{backgroundImage:`url(${B.url})`,zIndex:E.length-T}},B.clientId))}):null,w&&(0,Wo.jsx)("span",{className:"block-editor-list-view-block-select-button__block-visibility",children:(0,Wo.jsx)(Ee,{icon:tr})}),_&&(0,Wo.jsx)("span",{className:"block-editor-list-view-block-select-button__lock",children:(0,Wo.jsx)(Ee,{icon:YA})})]})]})}var oJ=(0,JQ.forwardRef)(iBe);var Ku=l(x(),1),sBe=(0,rJ.forwardRef)(({onClick:e,onToggleExpanded:t,block:o,isSelected:r,position:n,siblingBlockCount:i,level:s,isExpanded:a,selectedClientIds:c,...u},d)=>{let{clientId:f}=o,{AdditionalBlockContent:m,insertedBlock:p,setInsertedBlock:h}=Yu(),g=c.includes(f)?c:[f];return(0,Ku.jsxs)(Ku.Fragment,{children:[m&&(0,Ku.jsx)(m,{block:o,insertedBlock:p,setInsertedBlock:h}),(0,Ku.jsx)(QB,{appendToOwnerDocument:!0,clientIds:g,cloneClassname:"block-editor-list-view-draggable-chip",children:({draggable:b,onDragStart:k,onDragEnd:v})=>(0,Ku.jsx)(oJ,{ref:d,className:"block-editor-list-view-block-contents",block:o,onClick:e,onToggleExpanded:t,isSelected:r,position:n,siblingBlockCount:i,level:s,draggable:b,onDragStart:k,onDragEnd:v,isExpanded:a,...u})})]})}),nJ=sBe;var mm=l(L(),1),iJ=l(je(),1),sJ=(e,t,o)=>(0,mm.sprintf)((0,mm.__)("Block %1$d of %2$d, Level %3$d."),e,t,o),aJ=(e,t)=>[e?.positionLabel?`${(0,mm.sprintf)((0,mm.__)("Position: %s"),e.positionLabel)}.`:void 0,t?(0,mm.__)("This block is locked."):void 0].filter(Boolean).join(" "),lJ=(e,t)=>Array.isArray(t)&&t.length?t.indexOf(e)!==-1:t===e;function cJ(e,t,o,r){let n=[...o,e],i=[...r,t],s=Math.min(n.length,i.length)-1,a=n[s],c=i[s];return{start:a,end:c}}function Og(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=>{iJ.focus.focusable.find(r)?.[0]?.focus()})}function uJ({blockIndexes:e,blockDropTargetIndex:t,blockDropPosition:o,clientId:r,firstDraggedBlockIndex:n,isDragged:i}){let s,a,c;if(!i){a=!1;let u=e[r];c=u>n,t!=null&&n!==void 0?u!==void 0&&(u>=n&&u<t?s="up":u<n&&u>=t?s="down":s="normal",a=typeof t=="number"&&t-1===u&&o==="inside"):t===null&&n!==void 0?u!==void 0&&u>=n?s="up":s="normal":t!=null&&n===void 0?u!==void 0&&(u<t?s="normal":s="down"):t===null&&(s="normal")}return{displacement:s,isNesting:a,isAfterDraggedBlocks:c}}var Zo=l(x(),1);function pJ({block:{clientId:e},displacement:t,isAfterDraggedBlocks:o,isDragged:r,isNesting:n,isSelected:i,isBranchSelected:s,selectBlock:a,position:c,level:u,rowCount:d,siblingBlockCount:f,showBlockMovers:m,path:p,isExpanded:h,selectedClientIds:g,isSyncedBranch:b}){let k=(0,mo.useRef)(null),v=(0,mo.useRef)(null),y=(0,mo.useRef)(null),[_,w]=(0,mo.useState)(!1),[C,E]=(0,mo.useState)(),[R,O]=(0,mo.useState)(null),{isLocked:B}=Wn(e),T=i&&g[0]===e,A=i&&g[g.length-1]===e,{toggleBlockHighlight:N,duplicateBlocks:z,multiSelect:U,replaceBlocks:j,removeBlocks:G,insertAfterBlock:V,insertBeforeBlock:H,updateBlockAttributes:K}=F((0,Ag.useDispatch)(S)),oe=(0,bT.useDebounce)(N,50),{canInsertBlockType:ee,getSelectedBlockClientIds:J,getPreviousBlockClientId:ie,getBlockRootClientId:de,getBlockOrder:q,getBlockParents:ne,getBlocksByClientId:X,canEditBlock:W,canMoveBlock:Q,canRemoveBlocks:se,isGroupable:ce}=(0,Ag.useSelect)(S),{getGroupingBlockName:_e}=(0,Ag.useSelect)(Xu.store),ge=xt(e),Ae=lg(),{block:Xe,blockName:dt,allowRightClickOverrides:St,isBlockHidden:yo}=(0,Ag.useSelect)(ue=>{let{getBlock:Ft,getBlockName:xe,getSettings:_t}=ue(S),{isBlockHidden:gr}=F(ue(S));return{block:Ft(e),blockName:xe(e),allowRightClickOverrides:_t().allowRightClickOverrides,isBlockHidden:gr(e)}},[e]),Ge=(0,Xu.hasBlockSupport)(dt,"__experimentalToolbar",!0),so=`list-view-block-select-button__description-${(0,bT.useInstanceId)(pJ)}`,{expand:Fe,collapse:Xt,collapseAll:ft,BlockSettingsMenu:qt,listViewInstanceId:ai,expandedState:hr,setInsertedBlock:He,treeGridElementRef:ao,rootClientId:Tn}=Yu(),me=(0,fJ.__unstableUseShortcutEventMatch)();function it(){let ue=J(),Ft=ue.includes(e),xe=Ft?ue[0]:e,_t=de(xe);return{blocksToUpdate:Ft?ue:[e],firstBlockClientId:xe,firstBlockRootClientId:_t,selectedBlockClientIds:ue}}async function Vo(ue){if(ue.defaultPrevented||ue.target.closest("[role=dialog]"))return;let Ft=[kT.BACKSPACE,kT.DELETE].includes(ue.keyCode);if(me("core/block-editor/unselect",ue)&&g.length>0)ue.stopPropagation(),ue.preventDefault(),a(ue,void 0);else if(Ft||me("core/block-editor/remove",ue)){let{blocksToUpdate:xe,firstBlockClientId:_t,firstBlockRootClientId:gr,selectedBlockClientIds:Jo}=it();if(!se(xe))return;let Zs=ie(_t)??gr;G(xe,!1);let Qd=Jo.length>0&&J().length===0;Zs||(Zs=q()[0]),Or(Zs,Qd)}else if(me("core/block-editor/paste-styles",ue)){ue.preventDefault();let{blocksToUpdate:xe}=it(),_t=X(xe);Ae(_t)}else if(me("core/block-editor/duplicate",ue)){ue.preventDefault();let{blocksToUpdate:xe,firstBlockRootClientId:_t}=it();if(X(xe).every(Jo=>!!Jo&&(0,Xu.hasBlockSupport)(Jo.name,"multiple",!0)&&ee(Jo.name,_t))){let Jo=await z(xe,!1);Jo?.length&&Or(Jo[0],!1)}}else if(me("core/block-editor/insert-before",ue)){ue.preventDefault();let{blocksToUpdate:xe}=it();await H(xe[0]);let _t=J();Or(_t[0],!1)}else if(me("core/block-editor/insert-after",ue)){ue.preventDefault();let{blocksToUpdate:xe}=it();await V(xe.at(-1));let _t=J();Or(_t[0],!1)}else if(me("core/block-editor/select-all",ue)){ue.preventDefault();let{firstBlockRootClientId:xe,selectedBlockClientIds:_t}=it(),gr=q(xe);if(!gr.length)return;if((0,dJ.isShallowEqual)(_t,gr)&&xe&&xe!==Tn){Or(xe,!0);return}U(gr[0],gr[gr.length-1],null)}else if(me("core/block-editor/collapse-list-view",ue)){ue.preventDefault();let{firstBlockClientId:xe}=it(),_t=ne(xe,!1);ft(),Fe(_t)}else if(me("core/block-editor/group",ue)){let{blocksToUpdate:xe}=it();if(xe.length>1&&ce(xe)){ue.preventDefault();let _t=X(xe),gr=_e(),Jo=(0,Xu.switchToBlockType)(_t,gr);j(xe,Jo),(0,mJ.speak)((0,gT.__)("Selected blocks are grouped."));let Zs=J();Or(Zs[0],!1)}}else if(me("core/block-editor/toggle-block-visibility",ue)){ue.preventDefault();let{blocksToUpdate:xe}=it(),_t=X(xe);if(!_t.every(Jo=>(0,Xu.hasBlockSupport)(Jo.name,"visibility",!0)))return;if(window.__experimentalHideBlocksBasedOnScreenSize)O(xe);else{let Jo=_t.some(Qd=>Qd.attributes.metadata?.blockVisibility===!1),Zs=Object.fromEntries(_t.map(({clientId:Qd,attributes:pp})=>[Qd,{metadata:Se({...pp?.metadata,blockVisibility:Jo?void 0:!1})}]));K(xe,Zs,{uniqueByBlock:!0})}}}let li=(0,mo.useCallback)(()=>{w(!0),oe(e,!0)},[e,w,oe]),es=(0,mo.useCallback)(()=>{w(!1),oe(e,!1)},[e,w,oe]),Us=(0,mo.useCallback)(ue=>{a(ue,e),ue.preventDefault()},[e,a]),Or=(0,mo.useCallback)((ue,Ft)=>{Ft&&a(void 0,ue,null,null),Og(ue,ao?.current)},[a,ao]),ze=(0,mo.useCallback)(ue=>{ue.preventDefault(),ue.stopPropagation(),h===!0?Xt(e):h===!1&&Fe(e)},[e,Fe,Xt,h]),Le=(0,mo.useCallback)(ue=>{let{ownerDocument:Ft}=y?.current||{};!Ft||!Ft.hasFocus()||Ge&&St&&(y.current?.click(),E(new window.DOMRect(ue.clientX,ue.clientY,0,0)),ue.preventDefault())},[St,y,Ge]),Tt=(0,mo.useCallback)(ue=>{St&&ue.button===2&&ue.preventDefault()},[St]),le=(0,mo.useMemo)(()=>{let{ownerDocument:ue}=v?.current||{};if(!(!C||!ue))return{ownerDocument:ue,getBoundingClientRect(){return C}}},[C]),Pe=(0,mo.useCallback)(()=>{E(void 0)},[E]);if($Q({isSelected:i,rowItemRef:v,selectedClientIds:g}),!Xe)return null;let _o=sJ(c,f,u),on=aJ(ge,B),Ws=yo?(0,gT.__)("Block is hidden."):null,fp=f>0,Kd=m&&fp,Xd=D("block-editor-list-view-block__mover-cell",{"is-visible":_||i}),Ck=D("block-editor-list-view-block__menu-cell",{"is-visible":_||T}),qd;Kd?qd=2:Ge||(qd=3);let Ec=D({"is-selected":i,"is-first-selected":T,"is-last-selected":A,"is-branch-selected":s,"is-synced-branch":b,"is-dragging":r,"has-single-cell":!Ge,"is-synced":ge?.isSynced,"is-draggable":Q,"is-displacement-normal":t==="normal","is-displacement-up":t==="up","is-displacement-down":t==="down","is-after-dragged-blocks":o,"is-nesting":n}),mp=g.includes(e)?g:[e],F_=i&&g.length===1;return(0,Zo.jsxs)(UQ,{className:Ec,isDragged:r,onKeyDown:Vo,onMouseEnter:li,onMouseLeave:es,onFocus:li,onBlur:es,level:u,position:c,rowCount:d,path:p,id:`list-view-${ai}-block-${e}`,"data-block":e,"data-expanded":W?h:void 0,ref:v,children:[(0,Zo.jsx)(pm.__experimentalTreeGridCell,{className:"block-editor-list-view-block__contents-cell",colSpan:qd,ref:k,"aria-selected":!!i,children:({ref:ue,tabIndex:Ft,onFocus:xe})=>(0,Zo.jsxs)("div",{className:"block-editor-list-view-block__contents-container",children:[(0,Zo.jsx)(nJ,{block:Xe,onClick:Us,onContextMenu:Le,onMouseDown:Tt,onToggleExpanded:ze,isSelected:i,position:c,siblingBlockCount:f,level:u,ref:ue,tabIndex:F_?0:Ft,onFocus:xe,isExpanded:W?h:void 0,selectedClientIds:g,ariaDescribedBy:so}),(0,Zo.jsx)(fT,{id:so,children:[_o,on,Ws].filter(Boolean).join(" ")})]})}),Kd&&(0,Zo.jsx)(Zo.Fragment,{children:(0,Zo.jsxs)(pm.__experimentalTreeGridCell,{className:Xd,withoutGridItem:!0,children:[(0,Zo.jsx)(pm.__experimentalTreeGridItem,{children:({ref:ue,tabIndex:Ft,onFocus:xe})=>(0,Zo.jsx)(oE,{orientation:"vertical",clientIds:[e],ref:ue,tabIndex:Ft,onFocus:xe})}),(0,Zo.jsx)(pm.__experimentalTreeGridItem,{children:({ref:ue,tabIndex:Ft,onFocus:xe})=>(0,Zo.jsx)(rE,{orientation:"vertical",clientIds:[e],ref:ue,tabIndex:Ft,onFocus:xe})})]})}),Ge&&qt&&(0,Zo.jsx)(pm.__experimentalTreeGridCell,{className:Ck,"aria-selected":!!i,ref:y,children:({ref:ue,tabIndex:Ft,onFocus:xe})=>(0,Zo.jsx)(qt,{clientIds:mp,block:Xe,icon:ts,label:(0,gT.__)("Options"),popoverProps:{anchor:le},toggleProps:{ref:ue,className:"block-editor-list-view-block__menu",tabIndex:Ft,onClick:Pe,onFocus:xe,size:"small"},disableOpenOnArrowDown:!0,expand:Fe,expandedState:hr,setInsertedBlock:He,__experimentalSelectBlock:Or})}),R&&(0,Zo.jsx)(El,{clientIds:R,onClose:()=>O(null)})]})}var hJ=(0,mo.memo)(pJ);var Kn=l(x(),1);function gJ(e,t,o,r){return o?.includes(e.clientId)?0:t[e.clientId]??r?1+e.innerBlocks.reduce(aBe(t,o,r),0):1}var aBe=(e,t,o)=>(r,n)=>t?.includes(n.clientId)?r:(e[n.clientId]??o)&&n.innerBlocks.length>0?r+gJ(n,e,t,o):r+1,lBe=()=>{};function bJ(e){let{blocks:t,selectBlock:o=lBe,showBlockMovers:r,selectedClientIds:n,level:i=1,path:s="",isBranchSelected:a=!1,listPosition:c=0,fixedListWindow:u,isExpanded:d,parentId:f,shouldShowInnerBlocks:m=!0,isSyncedBranch:p=!1,showAppender:h=!0}=e,g=xt(f),b=p||!!g?.isSynced,k=(0,ST.useSelect)(N=>f?N(S).canEditBlock(f):!0,[f]),{blockDropPosition:v,blockDropTargetIndex:y,firstDraggedBlockIndex:_,blockIndexes:w,expandedState:C,draggedClientIds:E}=Yu(),R=(0,yT.useRef)();if(!k)return null;let O=h&&i===1,B=t.filter(Boolean),T=B.length,A=O?T+1:T;return R.current=c,(0,Kn.jsxs)(Kn.Fragment,{children:[B.map((N,z)=>{let{clientId:U,innerBlocks:j}=N;z>0&&(R.current+=gJ(B[z-1],C,E,d));let G=!!E?.includes(U),{displacement:V,isAfterDraggedBlocks:H,isNesting:K}=uJ({blockIndexes:w,blockDropTargetIndex:y,blockDropPosition:v,clientId:U,firstDraggedBlockIndex:_,isDragged:G}),{itemInView:oe}=u,ee=oe(R.current),J=z+1,ie=s.length>0?`${s}_${J}`:`${J}`,de=!!j?.length,q=de&&m?C[U]??d:void 0,ne=lJ(U,n),X=a||ne&&de,W=G||ee||ne&&U===n[0]||z===0||z===T-1;return(0,Kn.jsxs)(ST.AsyncModeProvider,{value:!ne,children:[W&&(0,Kn.jsx)(hJ,{block:N,selectBlock:o,isSelected:ne,isBranchSelected:X,isDragged:G,level:i,position:J,rowCount:A,siblingBlockCount:T,showBlockMovers:r,path:ie,isExpanded:G?!1:q,listPosition:R.current,selectedClientIds:n,isSyncedBranch:b,displacement:V,isAfterDraggedBlocks:H,isNesting:K}),!W&&(0,Kn.jsx)("tr",{children:(0,Kn.jsx)("td",{className:"block-editor-list-view-placeholder"})}),de&&q&&!G&&(0,Kn.jsx)(bJ,{parentId:U,blocks:j,selectBlock:o,showBlockMovers:r,level:i+1,path:ie,listPosition:R.current+1,fixedListWindow:u,isBranchSelected:X,selectedClientIds:n,isExpanded:d,isSyncedBranch:b})]},U)}),O&&(0,Kn.jsx)(vT.__experimentalTreeGridRow,{level:i,setSize:A,positionInSet:A,isExpanded:!0,children:(0,Kn.jsx)(vT.__experimentalTreeGridCell,{children:N=>(0,Kn.jsx)(xV,{clientId:f,nestingLevel:i,blockCount:T,...N})})})]})}var kJ=(0,yT.memo)(bJ);var Lg=l(P(),1),_T=l(je(),1),Ql=l(I(),1),CV=l(L(),1);var Ni=l(x(),1);function vJ({draggedBlockClientId:e,listViewRef:t,blockDropTarget:o}){let r=xt(e),n=rr({clientId:e,context:"list-view"}),{rootClientId:i,clientId:s,dropPosition:a}=o||{},[c,u]=(0,Ql.useMemo)(()=>{if(!t.current)return[];let v=i?t.current.querySelector(`[data-block="${i}"]`):void 0,y=s?t.current.querySelector(`[data-block="${s}"]`):void 0;return[v,y]},[t,i,s]),d=u||c,f=(0,CV.isRTL)(),m=(0,Ql.useCallback)((v,y)=>{if(!d)return 0;let _=d.offsetWidth,w=(0,_T.getScrollContainer)(d,"horizontal"),C=d.ownerDocument,E=w===C.body||w===C.documentElement;if(w&&!E){let R=w.getBoundingClientRect(),O=(0,CV.isRTL)()?R.right-v.right:v.left-R.left,B=w.clientWidth;if(B<_+O&&(_=B-O),!f&&v.left+y<R.left)return _-=R.left-v.left,_;if(f&&v.right-y>R.right)return _-=v.right-R.right,_}return _-y},[f,d]),p=(0,Ql.useMemo)(()=>{if(!d)return{};let v=d.getBoundingClientRect();return{width:m(v,0)}},[m,d]),h=(0,Ql.useMemo)(()=>{if(!d)return{};let v=(0,_T.getScrollContainer)(d),y=d.ownerDocument,_=v===y.body||v===y.documentElement;if(v&&!_){let w=v.getBoundingClientRect(),C=d.getBoundingClientRect(),E=f?w.right-C.right:C.left-w.left;if(!f&&w.left>C.left)return{transform:`translateX( ${E}px )`};if(f&&w.right<C.right)return{transform:`translateX( ${E*-1}px )`}}return{}},[f,d]),g=(0,Ql.useMemo)(()=>{if(!c)return 1;let v=parseInt(c.getAttribute("aria-level"),10);return v?v+1:1},[c]),b=(0,Ql.useMemo)(()=>d?d.classList.contains("is-branch-selected"):!1,[d]),k=(0,Ql.useMemo)(()=>{if(!(!d||!(a==="top"||a==="bottom"||a==="inside")))return{contextElement:d,getBoundingClientRect(){let y=d.getBoundingClientRect(),_=y.left,w=0,C=(0,_T.getScrollContainer)(d,"horizontal"),E=d.ownerDocument,R=C===E.body||C===E.documentElement;if(C&&!R){let T=C.getBoundingClientRect(),A=f?C.offsetWidth-C.clientWidth:0;_<T.left+A&&(_=T.left+A)}a==="top"?w=y.top-y.height*2:w=y.top;let O=m(y,0),B=y.height;return new window.DOMRect(_,w,O,B)}}},[d,a,m,f]);return d?(0,Ni.jsx)(Lg.Popover,{animate:!1,anchor:k,focusOnMount:!1,className:"block-editor-list-view-drop-indicator--preview",variant:"unstyled",flip:!1,resize:!0,children:(0,Ni.jsx)("div",{style:p,className:D("block-editor-list-view-drop-indicator__line",{"block-editor-list-view-drop-indicator__line--darker":b}),children:(0,Ni.jsxs)("div",{className:"block-editor-list-view-leaf","aria-level":g,children:[(0,Ni.jsxs)("div",{className:D("block-editor-list-view-block-select-button","block-editor-list-view-block-contents"),style:h,children:[(0,Ni.jsx)(pT,{onClick:()=>{}}),(0,Ni.jsx)(Ie,{icon:r?.icon,showColors:!0,context:"list-view"}),(0,Ni.jsx)(Lg.__experimentalHStack,{alignment:"center",className:"block-editor-list-view-block-select-button__label-wrapper",justify:"flex-start",spacing:1,children:(0,Ni.jsx)("span",{className:"block-editor-list-view-block-select-button__title",children:(0,Ni.jsx)(Lg.__experimentalTruncate,{ellipsizeMode:"auto",children:n})})})]}),(0,Ni.jsx)("div",{className:"block-editor-list-view-block__menu-cell"})]})})}):null}var yJ=l(jo(),1),Ng=l(L(),1),vS=l(M(),1),SJ=l(I(),1),Xn=l(at(),1),_J=l(Z(),1);function xJ(){let{clearSelectedBlock:e,multiSelect:t,selectBlock:o}=(0,vS.useDispatch)(S),{getBlockName:r,getBlockParents:n,getBlockSelectionStart:i,getSelectedBlockClientIds:s,hasMultiSelection:a,hasSelectedBlock:c}=(0,vS.useSelect)(S),{getBlockType:u}=(0,vS.useSelect)(_J.store);return{updateBlockSelection:(0,SJ.useCallback)(async(f,m,p,h)=>{if(!f?.shiftKey&&f?.keyCode!==Xn.ESCAPE){o(m,h);return}f.preventDefault();let g=f.type==="keydown"&&f.keyCode===Xn.ESCAPE,b=f.type==="keydown"&&(f.keyCode===Xn.UP||f.keyCode===Xn.DOWN||f.keyCode===Xn.HOME||f.keyCode===Xn.END);if(!b&&!c()&&!a()){o(m,null);return}let k=s(),v=[...n(m),m];if((g||b&&!k.some(C=>v.includes(C)))&&await e(),!g){let C=i(),E=m;b&&(!c()&&!a()&&(C=m),p&&(E=p));let R=n(C),O=n(E),{start:B,end:T}=cJ(C,E,R,O);await t(B,T,null)}let y=s();if((f.keyCode===Xn.HOME||f.keyCode===Xn.END)&&y.length>1)return;let _=k.filter(C=>!y.includes(C)),w;if(_.length===1){let C=u(r(_[0]))?.title;C&&(w=(0,Ng.sprintf)((0,Ng.__)("%s deselected."),C))}else _.length>1&&(w=(0,Ng.sprintf)((0,Ng.__)("%s blocks deselected."),_.length));w&&(0,yJ.speak)(w,"assertive")},[e,r,u,n,i,s,a,c,t,o])}}var wJ=l(I(),1);function CJ(e){return(0,wJ.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 BJ=l(M(),1);function EJ({blocks:e,rootClientId:t}){return(0,BJ.useSelect)(o=>{let{getDraggedBlockClientIds:r,getSelectedBlockClientIds:n,getEnabledClientIdsTree:i}=F(o(S));return{selectedClientIds:n(),draggedClientIds:r(),clientIdsTree:e??i(t)}},[e,t])}var TJ=l(I(),1),IJ=l(M(),1);function PJ({collapseAll:e,expand:t}){let{expandedBlock:o,getBlockParents:r}=(0,IJ.useSelect)(n=>{let{getBlockParents:i,getExpandedBlock:s}=F(n(S));return{expandedBlock:s(),getBlockParents:i}},[]);(0,TJ.useEffect)(()=>{if(o){let n=r(o,!1);e(),t(n)}},[e,t,o,r])}var RJ=l(M(),1),hm=l(I(),1),gm=l(Y(),1),OJ=l(L(),1);var Jl=24;function cBe(e,t,o=1,r=!1){let n=r?t.right-o*Jl:t.left+o*Jl;return r?e.x>n:e.x<n}function uBe(e,t,o=1,r=!1){let n=r?t.right-o*Jl:t.left+o*Jl,i=r?n-e.x:e.x-n,s=Math.round(i/Jl);return Math.abs(s)}function dBe(e,t){let o=[],r=e;for(;r;)o.push({...r}),r=t.find(n=>n.clientId===r.rootClientId);return o}function AJ(e,t){let o=e[t+1];return o&&o.isDraggedBlock?AJ(e,t+1):o}function fBe(e,t,o=1,r=!1){let n=r?t.right-o*Jl:t.left+o*Jl;return(r?e.x<n-Jl:e.x>n+Jl)&&e.y<t.bottom}var mBe=["top","bottom"];function pBe(e,t,o=!1){let r,n,i,s,a;for(let f=0;f<e.length;f++){let m=e[f];if(m.isDraggedBlock)continue;let p=m.element.getBoundingClientRect(),[h,g]=qf(t,p,mBe),b=AB(t,p);if(i===void 0||h<i||b){i=h;let k=e.indexOf(m),v=e[k-1];if(g==="top"&&v&&v.rootClientId===m.rootClientId&&!v.isDraggedBlock?(n=v,r="bottom",s=v.element.getBoundingClientRect(),a=k-1):(n=m,r=g,s=p,a=k),b)break}}if(!n)return;let c=dBe(n,e),u=r==="bottom";if(u&&n.canInsertDraggedBlocksAsChild&&(n.innerBlockCount>0&&n.isExpanded||fBe(t,s,c.length,o))){let f=n.isExpanded?0:n.innerBlockCount||0;return{rootClientId:n.clientId,clientId:n.clientId,blockIndex:f,dropPosition:"inside"}}if(u&&n.rootClientId&&cBe(t,s,c.length,o)){let f=AJ(e,a),m=n.nestingLevel,p=f?f.nestingLevel:1;if(m&&p){let h=uBe(t,s,c.length,o),g=Math.max(Math.min(h,m-p),0);if(c[g]){let b=n.blockIndex;if(c[g].nestingLevel===f?.nestingLevel)b=f?.blockIndex;else for(let k=a;k>=0;k--){let v=e[k];if(v.rootClientId===c[g].rootClientId){b=v.blockIndex+1;break}}return{rootClientId:c[g].rootClientId,clientId:n.clientId,blockIndex:b,dropPosition:r}}}}if(!n.canInsertDraggedBlocksAsSibling)return;let d=u?1:0;return{rootClientId:n.rootClientId,clientId:n.clientId,blockIndex:n.blockIndex+d,dropPosition:r}}var hBe={leading:!1,trailing:!0};function LJ({dropZoneElement:e,expandedState:t,setExpandedState:o}){let{getBlockRootClientId:r,getBlockIndex:n,getBlockCount:i,getDraggedBlockClientIds:s,canInsertBlocks:a}=(0,RJ.useSelect)(S),[c,u]=(0,hm.useState)(),{rootClientId:d,blockIndex:f}=c||{},m=OB(d,f),p=(0,OJ.isRTL)(),h=(0,gm.usePrevious)(d),g=(0,hm.useCallback)((_,w)=>{let{rootClientId:C}=w||{};C&&w?.dropPosition==="inside"&&!_[C]&&o({type:"expand",clientIds:[C]})},[o]),b=(0,gm.useThrottle)(g,500,hBe);(0,hm.useEffect)(()=>{if(c?.dropPosition!=="inside"||h!==c?.rootClientId){b.cancel();return}b(t,c)},[t,h,c,b]);let k=s(),v=(0,gm.useThrottle)((0,hm.useCallback)((_,w)=>{let C={x:_.clientX,y:_.clientY},E=!!k?.length,O=Array.from(w.querySelectorAll("[data-block]")).map(T=>{let A=T.dataset.block,N=T.dataset.expanded==="true",z=T.classList.contains("is-dragging"),U=parseInt(T.getAttribute("aria-level"),10),j=r(A);return{clientId:A,isExpanded:N,rootClientId:j,blockIndex:n(A),element:T,nestingLevel:U||void 0,isDraggedBlock:E?z:!1,innerBlockCount:i(A),canInsertDraggedBlocksAsSibling:E?a(k,j):!0,canInsertDraggedBlocksAsChild:E?a(k,A):!0}}),B=pBe(O,C,p);B&&u(B)},[a,k,i,n,r,p]),50);return{ref:(0,gm.__experimentalUseDropZone)({dropZoneElement:e,onDrop(_){v.cancel(),c&&m(_),u(void 0)},onDragLeave(){v.cancel(),u(null)},onDragOver(_){v(_,_.currentTarget)},onDragEnd(){v.cancel(),u(void 0)}}),target:c}}var xT=l(I(),1),NJ=l(M(),1);function MJ({firstSelectedBlockClientId:e,setExpandedState:t}){let[o,r]=(0,xT.useState)(null),{selectedBlockParentClientIds:n}=(0,NJ.useSelect)(i=>{let{getBlockParents:s}=i(S);return{selectedBlockParentClientIds:s(e,!1)}},[e]);return(0,xT.useEffect)(()=>{o!==e&&n?.length&&t({type:"expand",clientIds:n})},[e,n,o,t]),{setSelectedTreeId:r}}var Mg=l(M(),1),DJ=l(Y(),1);function VJ({selectBlock:e}){let t=(0,Mg.useRegistry)(),{getBlockOrder:o,getBlockRootClientId:r,getBlocksByClientId:n,getPreviousBlockClientId:i,getSelectedBlockClientIds:s,getSettings:a,canInsertBlockType:c,canRemoveBlocks:u}=(0,Mg.useSelect)(S),{flashBlock:d,removeBlocks:f,replaceBlocks:m,insertBlocks:p}=(0,Mg.useDispatch)(S),h=xh();return(0,DJ.useRefEffect)(g=>{function b(y,_){_&&e(void 0,y,null,null),Og(y,g)}function k(y){let _=s(),w=_.includes(y),C=w?_[0]:y,E=r(C);return{blocksToUpdate:w?_:[y],firstBlockClientId:C,firstBlockRootClientId:E,originallySelectedBlockClientIds:_}}function v(y){if(y.defaultPrevented||!g.contains(y.target.ownerDocument.activeElement))return;let w=y.target.ownerDocument.activeElement?.closest("[role=row]")?.dataset?.block;if(!w)return;let{blocksToUpdate:C,firstBlockClientId:E,firstBlockRootClientId:R,originallySelectedBlockClientIds:O}=k(w);if(C.length!==0){if(y.preventDefault(),y.type==="copy"||y.type==="cut"){C.length===1&&d(C[0]),h(y.type,C);let B=n(C);p1(y,B,t)}if(y.type==="cut"){if(!u(C))return;let B=i(E)??R;f(C,!1);let T=O.length>0&&s().length===0;B||(B=o()[0]),b(B,T)}else if(y.type==="paste"){let{__experimentalCanUserUseUnfilteredHTML:B}=a(),T=QW(y,B);if(C.length===1){let[A]=C;if(T.every(N=>c(N.name,A))){p(T,void 0,A),b(T[0]?.clientId,!1);return}}m(C,T,T.length-1,-1),b(T[0]?.clientId,!1)}}}return g.ownerDocument.addEventListener("copy",v),g.ownerDocument.addEventListener("cut",v),g.ownerDocument.addEventListener("paste",v),()=>{g.ownerDocument.removeEventListener("copy",v),g.ownerDocument.removeEventListener("cut",v),g.ownerDocument.removeEventListener("paste",v)}},[])}var ec=l(x(),1),gBe=(e,t)=>t.type==="clear"?{}:Array.isArray(t.clientIds)?{...e,...t.clientIds.reduce((o,r)=>({...o,[r]:t.type==="expand"}),{})}:e,FJ=32;function jJ({id:e,blocks:t,dropZoneElement:o,showBlockMovers:r=!1,isExpanded:n=!1,showAppender:i=!1,blockSettingsMenu:s=Q5,rootClientId:a,description:c,onSelect:u,additionalBlockContent:d},f){t&&(0,zJ.default)("`blocks` property in `wp.blockEditor.__experimentalListView`",{since:"6.3",alternative:"`rootClientId` property"});let m=(0,Dg.useInstanceId)(jJ),{clientIdsTree:p,draggedClientIds:h,selectedClientIds:g}=EJ({blocks:t,rootClientId:a}),b=CJ(p),{getBlock:k,getSelectedBlockClientIds:v}=(0,yS.useSelect)(S),{visibleBlockCount:y}=(0,yS.useSelect)(Q=>{let{getGlobalBlockCount:se,getClientIdsOfDescendants:ce}=Q(S),_e=h?.length>0?ce(h).length+1:0;return{visibleBlockCount:se()-_e}},[h]),{updateBlockSelection:_}=xJ(),[w,C]=(0,po.useReducer)(gBe,{}),[E,R]=(0,po.useState)(null),{setSelectedTreeId:O}=MJ({firstSelectedBlockClientId:g[0],setExpandedState:C}),B=(0,po.useCallback)((Q,se,ce)=>{_(Q,se,null,ce),O(se),u&&u(k(se))},[O,_,u,k]),{ref:T,target:A}=LJ({dropZoneElement:o,expandedState:w,setExpandedState:C}),N=(0,po.useRef)(),z=VJ({selectBlock:B}),U=(0,po.useCallback)(Q=>{let[se]=v();se&&Q&&Og(se,Q)},[v]),j=(0,Dg.useMergeRefs)([z,U,N,T,f]),G=(0,po.useCallback)(Q=>{if(!Q)return;let se=Array.isArray(Q)?Q:[Q];C({type:"expand",clientIds:se})},[C]),V=(0,po.useCallback)(Q=>{Q&&C({type:"collapse",clientIds:[Q]})},[C]),H=(0,po.useCallback)(()=>{C({type:"clear"})},[C]),K=(0,po.useCallback)(Q=>{G(Q?.dataset?.block)},[G]),oe=(0,po.useCallback)(Q=>{V(Q?.dataset?.block)},[V]),ee=(0,po.useCallback)((Q,se,ce)=>{Q.shiftKey&&_(Q,se?.dataset?.block,ce?.dataset?.block)},[_]);PJ({collapseAll:H,expand:G});let J=h?.[0],{blockDropTargetIndex:ie,blockDropPosition:de,firstDraggedBlockIndex:q}=(0,po.useMemo)(()=>{let Q,se;if(A?.clientId){let ce=b[A.clientId];Q=ce===void 0||A?.dropPosition==="top"?ce:ce+1}else A===null&&(Q=null);if(J){let ce=b[J];se=ce===void 0||A?.dropPosition==="top"?ce:ce+1}return{blockDropTargetIndex:Q,blockDropPosition:A?.dropPosition,firstDraggedBlockIndex:se}},[A,b,J]),ne=(0,po.useMemo)(()=>({blockDropPosition:de,blockDropTargetIndex:ie,blockIndexes:b,draggedClientIds:h,expandedState:w,expand:G,firstDraggedBlockIndex:q,collapse:V,collapseAll:H,BlockSettingsMenu:s,listViewInstanceId:m,AdditionalBlockContent:d,insertedBlock:E,setInsertedBlock:R,treeGridElementRef:N,rootClientId:a}),[de,ie,b,h,w,G,q,V,H,s,m,d,E,R,a]),[X]=(0,Dg.__experimentalUseFixedWindowList)(N,FJ,y,{expandedState:w,useWindowing:!0,windowOverscan:40});if(!p.length&&!i)return null;let W=c&&`block-editor-list-view-description-${m}`;return(0,ec.jsxs)(yS.AsyncModeProvider,{value:!0,children:[(0,ec.jsx)(vJ,{draggedBlockClientId:J,listViewRef:N,blockDropTarget:A}),c&&(0,ec.jsx)(wT.VisuallyHidden,{id:W,children:c}),(0,ec.jsx)(wT.__experimentalTreeGrid,{id:e,className:D("block-editor-list-view-tree",{"is-dragging":h?.length>0&&ie!==void 0}),"aria-label":(0,BV.__)("Block navigation structure"),ref:j,onCollapseRow:oe,onExpandRow:K,onFocusRow:ee,applicationAriaLabel:(0,BV.__)("Block navigation structure"),"aria-describedby":W,style:{"--wp-admin--list-view-dragged-items-height":h?.length?`${FJ*(h.length-1)}px`:null},children:(0,ec.jsx)(uT.Provider,{value:ne,children:(0,ec.jsx)(kJ,{blocks:p,parentId:a,selectBlock:B,showBlockMovers:r,fixedListWindow:X,selectedClientIds:g,isExpanded:n,showAppender:i})})})]})}var SS=(0,po.forwardRef)(jJ),CT=(0,po.forwardRef)((e,t)=>(0,ec.jsx)(SS,{ref:t,...e,showAppender:!1,rootClientId:null,onSelect:null,additionalBlockContent:null,blockSettingsMenu:void 0}));var qu=l(x(),1);function bBe({isEnabled:e,onToggle:t,isOpen:o,innerRef:r,...n}){return(0,qu.jsx)(BT.Button,{__next40pxDefaultSize:!0,...n,ref:r,icon:Hk,"aria-expanded":o,"aria-haspopup":"true",onClick:e?t:void 0,label:(0,EV.__)("List view"),className:"block-editor-block-navigation","aria-disabled":!e})}function kBe({isDisabled:e,...t},o){(0,GJ.default)("wp.blockEditor.BlockNavigationDropdown",{since:"6.1",alternative:"wp.components.Dropdown and wp.blockEditor.ListView"});let n=(0,HJ.useSelect)(i=>!!i(S).getBlockCount(),[])&&!e;return(0,qu.jsx)(BT.Dropdown,{contentClassName:"block-editor-block-navigation__popover",popoverProps:{placement:"bottom-start"},renderToggle:({isOpen:i,onToggle:s})=>(0,qu.jsx)(bBe,{...t,innerRef:o,isOpen:i,onToggle:s,isEnabled:n}),renderContent:()=>(0,qu.jsxs)("div",{className:"block-editor-block-navigation__container",children:[(0,qu.jsx)("p",{className:"block-editor-block-navigation__label",children:(0,EV.__)("List view")}),(0,qu.jsx)(CT,{})]})})}var WJ=(0,UJ.forwardRef)(kBe);var XJ=l(I(),1),ET=l(Y(),1),wa=l(P(),1),TV=l(L(),1);var ZJ=l(I(),1);var $J=l(x(),1);function YJ({genericPreviewBlock:e,style:t,className:o,activeStyle:r}){let n=gg(o,r,t),i=(0,ZJ.useMemo)(()=>({name:e.name,title:t.label||t.name,description:t.description,initialAttributes:{...e.attributes,className:n+" block-editor-block-styles__block-preview-container"},example:e}),[e,t,n]);return(0,$J.jsx)(z1,{item:i})}var Cs=l(x(),1),KJ=()=>{};function vBe({clientId:e,onSwitch:t=KJ,onHoverClassName:o=KJ}){let{onSelect:r,stylesToRender:n,activeStyle:i,genericPreviewBlock:s,className:a}=bg({clientId:e,onSwitch:t}),[c,u]=(0,XJ.useState)(null),d=(0,ET.useViewportMatch)("medium","<"),f=Co();if(!n||n.length===0)return null;let m=(0,ET.debounce)(u,250),p=v=>{r(v),o(null),u(null),m.cancel()},h=v=>{if(c===v){m.cancel();return}m(v),o(v?.name??null)},g=GE(n),b=()=>i?.name!==g?.name,k=()=>{p(g)};return(0,Cs.jsx)(wa.__experimentalToolsPanel,{label:(0,TV.__)("Styles"),resetAll:k,panelId:e,hasInnerWrapper:!0,dropdownMenuProps:f,children:(0,Cs.jsx)(wa.__experimentalToolsPanelItem,{hasValue:b,label:(0,TV.__)("Variation"),onDeselect:k,isShownByDefault:!0,panelId:e,children:(0,Cs.jsxs)("div",{className:"block-editor-block-styles",children:[(0,Cs.jsx)("div",{className:"block-editor-block-styles__variants",children:n.map(v=>{let y=v.label||v.name;return(0,Cs.jsx)(wa.Button,{__next40pxDefaultSize:!0,className:D("block-editor-block-styles__item",{"is-active":i.name===v.name}),variant:"secondary",label:y,onMouseEnter:()=>h(v),onFocus:()=>h(v),onMouseLeave:()=>h(null),onBlur:()=>h(null),onClick:()=>p(v),"aria-current":i.name===v.name,children:(0,Cs.jsx)(wa.__experimentalTruncate,{numberOfLines:1,className:"block-editor-block-styles__item-text",children:y})},v.name)})}),c&&!d&&(0,Cs.jsx)(wa.Popover,{placement:"left-start",offset:34,focusOnMount:!1,children:(0,Cs.jsx)("div",{className:"block-editor-block-styles__preview-panel",onMouseLeave:()=>h(null),children:(0,Cs.jsx)(YJ,{activeStyle:i,className:a,genericPreviewBlock:s,style:c})})})]})})})}var Vg=vBe;var tee=l(P(),1),Fg=l(L(),1);var QJ=l(P(),1),JJ=l(x(),1),qJ={0:JA,1:lA,2:uA,3:fA,4:pA,5:gA,6:kA};function IV({level:e}){return qJ[e]?(0,JJ.jsx)(QJ.Icon,{icon:qJ[e]}):null}var TT=l(x(),1),eee=[1,2,3,4,5,6],yBe={className:"block-library-heading-level-dropdown"};function oee({options:e=eee,value:t,onChange:o}){let r=e.filter(n=>n===0||eee.includes(n)).sort((n,i)=>n-i);return(0,TT.jsx)(tee.ToolbarDropdownMenu,{popoverProps:yBe,icon:(0,TT.jsx)(IV,{level:t}),label:(0,Fg.__)("Change level"),controls:r.map(n=>{let i=n===t;return{icon:(0,TT.jsx)(IV,{level:n}),title:n===0?(0,Fg.__)("Paragraph"):(0,Fg.sprintf)((0,Fg.__)("Heading %d"),n),isActive:i,onClick(){o(n)},role:"menuitemradio"}})})}var _S=l(L(),1),xS=l(P(),1);var tc=l(x(),1);function SBe({icon:e=jA,label:t=(0,_S.__)("Choose variation"),instructions:o=(0,_S.__)("Select a variation to start with:"),variations:r,onSelect:n,allowSkip:i}){let s=D("block-editor-block-variation-picker",{"has-many-variations":r.length>4});return(0,tc.jsxs)(xS.Placeholder,{icon:e,label:t,instructions:o,className:s,children:[(0,tc.jsx)("ul",{className:"block-editor-block-variation-picker__variations",role:"list","aria-label":(0,_S.__)("Block variations"),children:r.map(a=>(0,tc.jsxs)("li",{children:[(0,tc.jsx)(xS.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,tc.jsx)("span",{className:"block-editor-block-variation-picker__variation-label",children:a.title})]},a.name))}),i&&(0,tc.jsx)("div",{className:"block-editor-block-variation-picker__skip",children:(0,tc.jsx)(xS.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:()=>n(),children:(0,_S.__)("Skip")})})]})}var ree=SBe;var aee=l(M(),1),lee=l(Z(),1),jg=l(P(),1),PV=l(I(),1),RV=l(Y(),1),cee=l(L(),1);var oc=l(L(),1),zg=l(P(),1);var Qu={carousel:"carousel",grid:"grid"};var qn=l(x(),1),_Be=({onBlockPatternSelect:e})=>(0,qn.jsx)("div",{className:"block-editor-block-pattern-setup__actions",children:(0,qn.jsx)(zg.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:e,children:(0,oc.__)("Choose")})}),xBe=({handlePrevious:e,handleNext:t,activeSlide:o,totalSlides:r})=>(0,qn.jsxs)("div",{className:"block-editor-block-pattern-setup__navigation",children:[(0,qn.jsx)(zg.Button,{size:"compact",icon:(0,oc.isRTL)()?er:Lr,label:(0,oc.__)("Previous pattern"),onClick:e,disabled:o===0,accessibleWhenDisabled:!0}),(0,qn.jsx)(zg.Button,{size:"compact",icon:(0,oc.isRTL)()?Lr:er,label:(0,oc.__)("Next pattern"),onClick:t,disabled:o===r-1,accessibleWhenDisabled:!0})]}),wBe=({viewMode:e,setViewMode:t,handlePrevious:o,handleNext:r,activeSlide:n,totalSlides:i,onBlockPatternSelect:s})=>{let a=e===Qu.carousel,c=(0,qn.jsxs)("div",{className:"block-editor-block-pattern-setup__display-controls",children:[(0,qn.jsx)(zg.Button,{size:"compact",icon:sv,label:(0,oc.__)("Carousel view"),onClick:()=>t(Qu.carousel),isPressed:a}),(0,qn.jsx)(zg.Button,{size:"compact",icon:zk,label:(0,oc.__)("Grid view"),onClick:()=>t(Qu.grid),isPressed:e===Qu.grid})]});return(0,qn.jsxs)("div",{className:"block-editor-block-pattern-setup__toolbar",children:[a&&(0,qn.jsx)(xBe,{handlePrevious:o,handleNext:r,activeSlide:n,totalSlides:i}),c,a&&(0,qn.jsx)(_Be,{onBlockPatternSelect:s})]})},nee=wBe;var iee=l(M(),1);function CBe(e,t,o){return(0,iee.useSelect)(r=>{let{getBlockRootClientId:n,getPatternsByBlockTypes:i,__experimentalGetAllowedPatterns:s}=r(S),a=n(e);return o?s(a).filter(o):i(t,a)},[e,t,o])}var see=CBe;var At=l(x(),1),BBe=({viewMode:e,activeSlide:t,patterns:o,onBlockPatternSelect:r,showTitles:n})=>{let i="block-editor-block-pattern-setup__container";if(e===Qu.carousel){let s=new Map([[t,"active-slide"],[t-1,"previous-slide"],[t+1,"next-slide"]]);return(0,At.jsx)("div",{className:"block-editor-block-pattern-setup__carousel",children:(0,At.jsx)("div",{className:i,children:(0,At.jsx)("div",{className:"carousel-container",children:o.map((a,c)=>(0,At.jsx)(dee,{active:c===t,className:s.get(c)||"",pattern:a},a.name))})})})}return(0,At.jsx)("div",{className:"block-editor-block-pattern-setup__grid",children:(0,At.jsx)(jg.Composite,{role:"listbox",className:i,"aria-label":(0,cee.__)("Patterns list"),children:o.map(s=>(0,At.jsx)(uee,{pattern:s,onSelect:r,showTitles:n},s.name))})})};function uee({pattern:e,onSelect:t,showTitles:o}){let r="block-editor-block-pattern-setup-list",{blocks:n,description:i,viewportWidth:s=700}=e,a=(0,RV.useInstanceId)(uee,`${r}__item-description`);return(0,At.jsx)("div",{className:`${r}__list-item`,children:(0,At.jsxs)(jg.Composite.Item,{render:(0,At.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,At.jsx)(fn,{blocks:n,viewportWidth:s}),o&&(0,At.jsx)("div",{className:`${r}__item-title`,children:e.title}),!!i&&(0,At.jsx)(jg.VisuallyHidden,{id:a,children:i})]})})}function dee({active:e,className:t,pattern:o,minHeight:r}){let{blocks:n,title:i,description:s}=o,a=(0,RV.useInstanceId)(dee,"block-editor-block-pattern-setup-list__item-description");return(0,At.jsxs)("div",{"aria-hidden":!e,role:"img",className:`pattern-slide ${t}`,"aria-label":i,"aria-describedby":s?a:void 0,children:[(0,At.jsx)(fn,{blocks:n,minHeight:r}),!!s&&(0,At.jsx)(jg.VisuallyHidden,{id:a,children:s})]})}var EBe=({clientId:e,blockName:t,filterPatternsFn:o,onBlockPatternSelect:r,initialViewMode:n=Qu.carousel,showTitles:i=!1})=>{let[s,a]=(0,PV.useState)(n),[c,u]=(0,PV.useState)(0),{replaceBlock:d}=(0,aee.useDispatch)(S),f=see(e,t,o);if(!f?.length)return null;let p=r||(h=>{let g=h.map(b=>(0,lee.cloneBlock)(b));d(e,g)});return(0,At.jsx)(At.Fragment,{children:(0,At.jsxs)("div",{className:`block-editor-block-pattern-setup view-mode-${s}`,children:[(0,At.jsx)(BBe,{viewMode:s,activeSlide:c,patterns:f,onBlockPatternSelect:p,showTitles:i}),(0,At.jsx)(nee,{viewMode:s,setViewMode:a,activeSlide:c,totalSlides:f.length,handleNext:()=>{u(h=>Math.min(h+1,f.length-1))},handlePrevious:()=>{u(h=>Math.max(h-1,0))},onBlockPatternSelect:()=>{p(f[c].blocks)}})]})})},fee=EBe;var OV=l(Z(),1),rc=l(L(),1),Bs=l(P(),1),IT=l(M(),1),mee=l(I(),1);var Eo=l(x(),1),{Menu:bm}=F(Bs.privateApis);function TBe({className:e,onSelectVariation:t,selectedValue:o,variations:r}){return(0,Eo.jsxs)("fieldset",{className:e,children:[(0,Eo.jsx)(Bs.VisuallyHidden,{as:"legend",children:(0,rc.__)("Transform to variation")}),r.map(n=>(0,Eo.jsx)(Bs.Button,{__next40pxDefaultSize:!0,size:"compact",icon:(0,Eo.jsx)(Ie,{icon:n.icon,showColors:!0}),isPressed:o===n.name,label:o===n.name?n.title:(0,rc.sprintf)((0,rc.__)("Transform to %s"),n.title),onClick:()=>t(n.name),"aria-label":n.title,showTooltip:!0},n.name))]})}function IBe({className:e,onSelectVariation:t,selectedValue:o,variations:r}){return(0,Eo.jsx)("div",{className:e,children:(0,Eo.jsxs)(bm,{children:[(0,Eo.jsx)(bm.TriggerButton,{render:(0,Eo.jsx)(Bs.Button,{className:"block-editor-block-variation-transforms__button",__next40pxDefaultSize:!0,variant:"secondary",children:(0,rc.__)("Transform to variation")})}),(0,Eo.jsx)(bm.Popover,{position:"bottom",children:(0,Eo.jsx)(bm.Group,{children:r.map(n=>(0,Eo.jsxs)(bm.RadioItem,{value:n.name,checked:o===n.name,onChange:()=>t(n.name),children:[(0,Eo.jsx)(bm.ItemLabel,{children:n.title}),n.description&&(0,Eo.jsx)(bm.ItemHelpText,{children:n.description})]},n.name))})})]})})}function PBe({className:e,onSelectVariation:t,selectedValue:o,variations:r}){return(0,Eo.jsx)("div",{className:e,children:(0,Eo.jsx)(Bs.__experimentalToggleGroupControl,{label:(0,rc.__)("Transform to variation"),value:o,hideLabelFromVision:!0,onChange:t,__next40pxDefaultSize:!0,children:r.map(n=>(0,Eo.jsx)(Bs.__experimentalToggleGroupControlOptionIcon,{icon:(0,Eo.jsx)(Ie,{icon:n.icon,showColors:!0}),value:n.name,label:o===n.name?n.title:(0,rc.sprintf)((0,rc.__)("Transform to %s"),n.title)},n.name))})})}function RBe({blockClientId:e}){let{updateBlockAttributes:t}=(0,IT.useDispatch)(S),{activeBlockVariation:o,variations:r,isContentOnly:n,isSection:i}=(0,IT.useSelect)(h=>{let{getActiveBlockVariation:g,getBlockVariations:b}=h(OV.store),{getBlockName:k,getBlockAttributes:v,getBlockEditingMode:y,isSectionBlock:_}=F(h(S)),w=e&&k(e),{hasContentRoleAttribute:C}=F(h(OV.store)),E=C(w);return{activeBlockVariation:g(w,v(e),"transform"),variations:w&&b(w,"transform"),isContentOnly:y(e)==="contentOnly"&&!E,isSection:_(e)}},[e]),s=o?.name,a=(0,mee.useMemo)(()=>{let h=new Set;return r?(r.forEach(g=>{g.icon&&h.add(g.icon?.src||g.icon)}),h.size===r.length):!1},[r]),c=h=>{t(e,{...r.find(({name:g})=>g===h).attributes})},u=window?.__experimentalContentOnlyPatternInsertion&&i;if(!r?.length||n||u)return null;let d="block-editor-block-variation-transforms",m=r.length>6?TBe:PBe;return(0,Eo.jsx)(a?m:IBe,{className:d,onSelectVariation:c,selectedValue:s,variations:r})}var PT=RBe;var km=l(L(),1),RT=l(P(),1);var pee=l(x(),1),AV={top:{icon:VA,title:(0,km._x)("Align top","Block vertical alignment setting")},center:{icon:EA,title:(0,km._x)("Align middle","Block vertical alignment setting")},bottom:{icon:CA,title:(0,km._x)("Align bottom","Block vertical alignment setting")},stretch:{icon:NA,title:(0,km._x)("Stretch to fill","Block vertical alignment setting")},"space-between":{icon:OA,title:(0,km._x)("Space between","Block vertical alignment setting")}},OBe=["top","center","bottom"],ABe="top";function LBe({value:e,onChange:t,controls:o=OBe,isCollapsed:r=!0,isToolbar:n}){function i(d){return()=>t(e===d?void 0:d)}let s=AV[e],a=AV[ABe],c=n?RT.ToolbarGroup:RT.ToolbarDropdownMenu,u=n?{isCollapsed:r}:{};return(0,pee.jsx)(c,{icon:s?s.icon:a.icon,label:(0,km._x)("Change vertical alignment","Block vertical alignment setting label"),controls:o.map(d=>({...AV[d],isActive:e===d,role:r?"menuitemradio":void 0,onClick:i(d)})),...u})}var LV=LBe;var NV=l(x(),1),Nw=e=>(0,NV.jsx)(LV,{...e,isToolbar:!1}),hee=e=>(0,NV.jsx)(LV,{...e,isToolbar:!0});var vn=l(P(),1),wS=l(I(),1),LT=l(L(),1);var gee=l(P(),1);var MV=l(L(),1),bee=l(x(),1);function kee({isLinked:e,...t}){let o=e?(0,MV.__)("Unlink radii"):(0,MV.__)("Link radii");return(0,bee.jsx)(gee.Button,{...t,className:"components-border-radius-control__linked-button",size:"small",icon:e?nn:fi,iconSize:24,label:o})}var vee=l(P(),1);function NBe(e){return[...e].sort((o,r)=>e.filter(n=>n===r).length-e.filter(n=>n===o).length).shift()}function yee(e={}){if(typeof e=="string")return e;let t=Object.values(e).map(a=>{let c=(0,vee.__experimentalParseQuantityAndUnitFromRawValue)(a);return typeof a=="string"&&c[0]===void 0?[a,""]:c}),o=t.map(a=>a[0]??""),r=t.map(a=>a[1]),n=o.every(a=>a===o[0])?o[0]:"",i=NBe(r);return n===0||n?`${n}${i||""}`:void 0}function See(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 _ee(e){return e?typeof e=="string"?!0:!!Object.values(e).filter(o=>!!o||o===0).length:!1}var Mi=l(P(),1),Tee=l(Y(),1),ed=l(L(),1);var vm=l(I(),1);var DV=24,xee=8,OT={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 Ju=(e,t)=>e?.includes?e==="0"||e.includes(`var:preset|${t}|`):!1;function wee(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 Cee(e,t,o){if(e===void 0)return 0;let r=parseFloat(e,10)===0?"0":wee(e,o),n=t.findIndex(i=>String(i.slug)===r);return n!==-1?n:NaN}function VV(e,t,o){if(!Ju(e,o))return e;let r=parseFloat(e,10)===0?"0":wee(e,o);return t.find(i=>String(i.slug)===r)?.size}function Bee(e,t,o){if(!e||Ju(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 Gg=l(P(),1),nc=l(x(),1);function Eee({allowNegativeOnDrag:e,ariaLabel:t,allPlaceholder:o,minValue:r,parsedQuantity:n,computedUnit:i,units:s,isMixed:a,step:c,max:u,showTooltip:d,value:f,minimumCustomValue:m,onCustomValueChange:p,onCustomValueSliderChange:h,onUnitChange:g,onMouseOut:b,onMouseOver:k,setMinValue:v}){let y=(0,nc.jsx)(Gg.__experimentalUnitControl,{className:"preset-input-control__unit-control",disableUnits:a,hideLabelFromVision:!0,label:t,min:r,onChange:p,onUnitChange:g,onBlur:b,onFocus:k,onMouseOut:b,onMouseOver:k,size:"__unstable-large",units:s,value:[n,i].join(""),placeholder:o,onDragStart:()=>{e&&f?.charAt(0)==="-"&&v(0)},onDrag:()=>{e&&f?.charAt(0)==="-"&&v(0)},onDragEnd:()=>{e&&v(m)}});return(0,nc.jsxs)(nc.Fragment,{children:[d?(0,nc.jsx)(Gg.Tooltip,{text:t,placement:"top",children:(0,nc.jsx)("div",{className:"preset-input-control__tooltip-wrapper",children:y})}):y,(0,nc.jsx)(Gg.RangeControl,{className:"preset-input-control__custom-value-range",hideLabelFromVision:!0,initialPosition:0,label:t,max:u,min:0,onBlur:b,onChange:h,onFocus:k,onMouseOut:b,onMouseOver:k,step:c,value:n,withInputField:!1,__next40pxDefaultSize:!0})]})}var td=l(x(),1);function ym({allowNegativeOnDrag:e=!1,ariaLabel:t,className:o,customValueSettings:r=OT,disableCustomValues:n,icon:i,isMixed:s,value:a,minimumCustomValue:c,onChange:u,onMouseOut:d,onMouseOver:f,onUnitChange:m,presets:p=[],presetType:h,selectedUnit:g,showTooltip:b,units:k}){let v=(0,vm.useMemo)(()=>Bee(a,p,h),[a,p,h]),y=o??"preset-input-control",_=p.slice(1,p.length-1).map((X,W)=>({value:W+1,label:void 0})),w=_.length>0,C=p.length<=xee,E=s?(0,ed.__)("Mixed"):null,[R,O]=(0,vm.useState)(c),[B,T]=(0,vm.useState)(!n&&v!==void 0&&!Ju(v,h)),A=null,N=(0,Tee.usePrevious)(v);(0,vm.useEffect)(()=>{v&&N!==v&&!Ju(v,h)&&B!==!0&&T(!0)},[v,N,h,B]);let z=!C&&!B&&v!==void 0&&(!Ju(v,h)||Ju(v,h)&&s),U=p;z?(U=[...p,{name:s?(0,ed.__)("Mixed"):(0,ed.sprintf)((0,ed.__)("Custom (%s)"),v),slug:"custom",size:v}],A=U.length-1):s||(A=B?VV(v,p,h):Cee(v,p,h));let j=U.map((X,W)=>({key:W,name:X.name})),G=Ju(v,h)?VV(v,p,h):v,[V,H]=(0,Mi.__experimentalParseQuantityAndUnitFromRawValue)(G),K=H||g||"px",oe=k?.find(X=>X.value===K),ee=oe?.step??r[K]?.steps??.1,J=oe?.max??r[K]?.max??10,ie=X=>{let Q=!isNaN(parseFloat(X))?X:void 0;Q!==void 0&&u(Q)},de=X=>{u([X,K].join(""))},q=X=>v===void 0?void 0:p[X]?.name,ne=(X,W)=>{let Q=parseInt(X,10);if(W==="selectList"){if(Q===0&&p[0]?.slug==="0")return"0";if(Q===0)return}else if(Q===0)return"0";return`var:preset|${h}|${p[X]?.slug}`};return(0,td.jsxs)(Mi.__experimentalHStack,{className:`preset-input-control__wrapper ${y}__wrapper`,children:[i&&(0,td.jsx)(Mi.Icon,{className:"preset-input-control__icon",icon:i,size:DV}),(!w||B)&&(0,td.jsx)(Eee,{allowNegativeOnDrag:e,ariaLabel:t,allPlaceholder:E,minValue:R,parsedQuantity:V,computedUnit:K,units:k,isMixed:s,step:ee,max:J,showTooltip:b,value:v,minimumCustomValue:c,onCustomValueChange:ie,onCustomValueSliderChange:de,onUnitChange:m,onMouseOut:d,onMouseOver:f,setMinValue:O}),w&&C&&!B&&(0,td.jsx)(Mi.RangeControl,{"aria-valuenow":A,"aria-valuetext":p[A]?.name,className:"preset-input-control__preset-range",hideLabelFromVision:!0,initialPosition:0,label:t,max:p.length-1,marks:_,min:0,onBlur:d,onChange:X=>u(ne(X)),onFocus:f,onMouseDown:X=>{X?.nativeEvent?.offsetX<35&&v===void 0&&u("0")},onMouseOut:d,onMouseOver:f,renderTooltipContent:q,step:1,value:A,withInputField:!1,__next40pxDefaultSize:!0}),w&&!C&&!B&&(0,td.jsx)(Mi.CustomSelectControl,{className:"preset-input-control__custom-select-control",hideLabelFromVision:!0,label:t,onBlur:d,onChange:X=>{z&&X.selectedItem.key===j.length-1?T(!0):u(ne(X.selectedItem.key,"selectList"))},onFocus:f,onMouseOut:d,onMouseOver:f,options:j,size:"__unstable-large",value:j.find(X=>X.key===A)||""}),w&&!n&&(0,td.jsx)(Mi.Button,{className:"preset-input-control__custom-toggle",icon:wL,iconSize:DV,isPressed:B,label:B?(0,ed.__)("Use preset"):(0,ed.__)("Set custom value"),onClick:()=>{T(!B)},size:"small"})]})}var Hg=l(L(),1);var Iee=8,AT=[],FV={all:(0,Hg.__)("Border radius"),topLeft:(0,Hg.__)("Top left"),topRight:(0,Hg.__)("Top right"),bottomLeft:(0,Hg.__)("Bottom left"),bottomRight:(0,Hg.__)("Bottom right")},zV={all:PO,topLeft:AO,topRight:LO,bottomLeft:RO,bottomRight:OO},jV=0;var ic=l(x(),1);function MBe(e){let t=e?.default??AT,o=e?.custom??AT,r=e?.theme??AT;return(0,wS.useMemo)(()=>{let n=[{name:(0,LT.__)("None"),slug:"0",size:0},...o,...r,...t];return n.length>Iee?[{name:(0,LT.__)("Default"),slug:"default",size:void 0},...n]:n},[o,r,t])}function Pee(e,t){return t==="all"?yee(e):typeof e=="string"?e:e?.[t]}function Ree(e,t){return t==="all"?e.flat:e[t]}function Oee(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 Aee(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 NT({onChange:e,values:t,presets:o}){let[r,n]=(0,wS.useState)(!_ee(t)||!See(t)),i=MBe(o),[s,a]=(0,wS.useState)({flat:typeof t=="string"?(0,vn.__experimentalParseQuantityAndUnitFromRawValue)(t)[1]:void 0,topLeft:(0,vn.__experimentalParseQuantityAndUnitFromRawValue)(t?.topLeft)[1],topRight:(0,vn.__experimentalParseQuantityAndUnitFromRawValue)(t?.topRight)[1],bottomLeft:(0,vn.__experimentalParseQuantityAndUnitFromRawValue)(t?.bottomLeft)[1],bottomRight:(0,vn.__experimentalParseQuantityAndUnitFromRawValue)(t?.bottomRight)[1]}),[c]=pe("spacing.units"),u=(0,vn.__experimentalUseCustomUnits)({availableUnits:c||["px","em","rem"]}),d=()=>n(!r);return(0,ic.jsxs)("fieldset",{className:"components-border-radius-control",children:[(0,ic.jsxs)(vn.__experimentalHStack,{className:"components-border-radius-control__header",children:[(0,ic.jsx)(vn.BaseControl.VisualLabel,{as:"legend",children:(0,LT.__)("Radius")}),(0,ic.jsx)(kee,{onClick:d,isLinked:r})]}),r?(0,ic.jsx)(ym,{ariaLabel:FV.all,className:"components-border-radius-control",icon:zV.all,minimumCustomValue:jV,onChange:Oee("all",t,e),onUnitChange:Aee("all",s,a),presets:i,presetType:"border-radius",selectedUnit:Ree(s,"all"),showTooltip:!0,units:u,value:Pee(t,"all")}):(0,ic.jsx)(vn.__experimentalVStack,{children:["topLeft","topRight","bottomLeft","bottomRight"].map(f=>(0,ic.jsx)(ym,{ariaLabel:FV[f],className:"components-border-radius-control",icon:zV[f],minimumCustomValue:jV,onChange:Oee(f,t,e),onUnitChange:Aee(f,s,a),presets:i,presetType:"border-radius",selectedUnit:Ree(s,f),showTooltip:!0,units:u,value:Pee(t,f)},f))})]})}var Mee=l(P(),1);var Lee=l(Y(),1);var Nee=l(x(),1),MT=(0,Lee.createHigherOrderComponent)(e=>t=>{let[o,r,n,i,s]=pe("color.palette.default","color.palette.theme","color.palette.custom","color.custom","color.defaultPalette"),a=s?[...r||[],...o||[],...n||[]]:[...r||[],...n||[]],{colors:c=a,disableCustomColors:u=!i}=t,d=c&&c.length>0||!u;return(0,Nee.jsx)(e,{...t,colors:c,disableCustomColors:u,hasColorsToChoose:d})},"withColorContext");var Dee=MT(Mee.ColorPalette);var GV=l(L(),1),Es=l(P(),1);var ho=l(x(),1),{Tabs:Ug}=F(Es.privateApis),DBe=["colors","disableCustomColors","gradients","disableCustomGradients"],Ca={color:"color",gradient:"gradient"};function Vee({colors:e,gradients:t,disableCustomColors:o,disableCustomGradients:r,__experimentalIsRenderedInSidebar:n,className:i,label:s,onColorChange:a,onGradientChange:c,colorValue:u,gradientValue:d,clearable:f,showTitle:m=!0,enableAlpha:p,headingLevel:h}){let g=a&&(e&&e.length>0||!o),b=c&&(t&&t.length>0||!r);if(!g&&!b)return null;let k={[Ca.color]:(0,ho.jsx)(Es.ColorPalette,{value:u,onChange:b?y=>{a(y),c()}:a,colors:e,disableCustomColors:o,__experimentalIsRenderedInSidebar:n,clearable:f,enableAlpha:p,headingLevel:h}),[Ca.gradient]:(0,ho.jsx)(Es.GradientPicker,{value:d,onChange:g?y=>{c(y),a()}:c,gradients:t,disableCustomGradients:r,__experimentalIsRenderedInSidebar:n,clearable:f,headingLevel:h})},v=y=>(0,ho.jsx)("div",{className:"block-editor-color-gradient-control__panel",children:k[y]});return(0,ho.jsx)(Es.BaseControl,{className:D("block-editor-color-gradient-control",i),children:(0,ho.jsx)("fieldset",{className:"block-editor-color-gradient-control__fieldset",children:(0,ho.jsxs)(Es.__experimentalVStack,{spacing:1,children:[m&&(0,ho.jsx)("legend",{children:(0,ho.jsx)("div",{className:"block-editor-color-gradient-control__color-indicator",children:(0,ho.jsx)(Es.BaseControl.VisualLabel,{children:s})})}),g&&b&&(0,ho.jsx)("div",{children:(0,ho.jsxs)(Ug,{defaultTabId:d?Ca.gradient:!!g&&Ca.color,children:[(0,ho.jsxs)(Ug.TabList,{children:[(0,ho.jsx)(Ug.Tab,{tabId:Ca.color,children:(0,GV.__)("Color")}),(0,ho.jsx)(Ug.Tab,{tabId:Ca.gradient,children:(0,GV.__)("Gradient")})]}),(0,ho.jsx)(Ug.TabPanel,{tabId:Ca.color,className:"block-editor-color-gradient-control__panel",focusable:!1,children:k.color}),(0,ho.jsx)(Ug.TabPanel,{tabId:Ca.gradient,className:"block-editor-color-gradient-control__panel",focusable:!1,children:k.gradient})]})}),!b&&v(Ca.color),!g&&v(Ca.gradient)]})})})}function VBe(e){let[t,o,r,n]=pe("color.palette","color.gradients","color.custom","color.customGradient");return(0,ho.jsx)(Vee,{colors:t,gradients:o,disableCustomColors:!r,disableCustomGradients:!n,...e})}function FBe(e){return DBe.every(t=>e.hasOwnProperty(t))?(0,ho.jsx)(Vee,{...e}):(0,ho.jsx)(VBe,{...e})}var od=FBe;var Fee=l(x(),1);function zee({onChange:e,value:t,...o}){return(0,Fee.jsx)(od,{...o,onColorChange:e,colorValue:t,gradients:[],disableCustomGradients:!0})}var Ts=l(L(),1),jee=l(P(),1),Gee=l(jo(),1),HV=l(x(),1);Ic([Pc,kp]);function zBe({backgroundColor:e,fallbackBackgroundColor:t,fallbackTextColor:o,fallbackLinkColor:r,fontSize:n,isLargeText:i,textColor:s,linkColor:a,enableAlphaChecker:c=!1}){let u=e||t;if(!u)return null;let d=s||o,f=a||r;if(!d&&!f)return null;let m=[{color:d,description:(0,Ts.__)("text color")},{color:f,description:(0,Ts.__)("link color")}],p=mt(u),h=p.alpha()<1,g=p.brightness(),b={level:"AA",size:i||i!==!1&&n>=24?"large":"small"},k="",v="";for(let y of m){if(!y.color)continue;let _=mt(y.color),w=_.isReadable(p,b),C=_.alpha()<1;if(!w){if(h||C)continue;k=g<_.brightness()?(0,Ts.sprintf)((0,Ts.__)("This color combination may be hard for people to read. Try using a darker background color and/or a brighter %s."),y.description):(0,Ts.sprintf)((0,Ts.__)("This color combination may be hard for people to read. Try using a brighter background color and/or a darker %s."),y.description),v=(0,Ts.__)("This color combination may be hard for people to read.");break}C&&c&&(k=(0,Ts.__)("Transparent text may be hard for people to read."),v=(0,Ts.__)("Transparent text may be hard for people to read."))}return k?((0,Gee.speak)(v),(0,HV.jsx)("div",{className:"block-editor-contrast-checker",children:(0,HV.jsx)(jee.Notice,{spokenMessage:null,status:"warning",isDismissible:!1,children:k})})):null}var DT=zBe;var lr=l(L(),1),CS=l(rd(),1),VT=l(I(),1),Qn=l(P(),1),Ba=l(x(),1),nd=new Date;nd.setDate(20);nd.setMonth(nd.getMonth()-3);nd.getMonth()===4&&nd.setMonth(3);function Uee({format:e,defaultFormat:t,onChange:o}){return(0,Ba.jsxs)(Qn.__experimentalVStack,{as:"fieldset",spacing:4,className:"block-editor-date-format-picker",children:[(0,Ba.jsx)(Qn.VisuallyHidden,{as:"legend",children:(0,lr.__)("Date format")}),(0,Ba.jsx)(Qn.ToggleControl,{label:(0,lr.__)("Default format"),help:`${(0,lr.__)("Example:")}  ${(0,CS.dateI18n)(t,nd)}`,checked:!e,onChange:r=>o(r?null:t)}),e&&(0,Ba.jsx)(jBe,{format:e,onChange:o})]})}function jBe({format:e,onChange:t}){let r=[...[...new Set(["Y-m-d",(0,lr._x)("n/j/Y","short date format"),(0,lr._x)("n/j/Y g:i A","short date format with time"),(0,lr._x)("M j, Y","medium date format"),(0,lr._x)("M j, Y g:i A","medium date format with time"),(0,lr._x)("F j, Y","long date format"),(0,lr._x)("M j","short date format without the year")])].map((a,c)=>({key:`suggested-${c}`,name:(0,CS.dateI18n)(a,nd),format:a})),{key:"human-diff",name:(0,CS.humanTimeDiff)(nd),format:"human-diff"}],n={key:"custom",name:(0,lr.__)("Custom"),className:"block-editor-date-format-picker__custom-format-select-control__custom-option",hint:(0,lr.__)("Enter your own date format")},[i,s]=(0,VT.useState)(()=>!!e&&!r.some(a=>a.format===e));return(0,Ba.jsxs)(Qn.__experimentalVStack,{children:[(0,Ba.jsx)(Qn.CustomSelectControl,{__next40pxDefaultSize:!0,label:(0,lr.__)("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,Ba.jsx)(Qn.TextControl,{__next40pxDefaultSize:!0,label:(0,lr.__)("Custom format"),hideLabelFromVision:!0,help:(0,VT.createInterpolateElement)((0,lr.__)("Enter a date or time <Link>format string</Link>."),{Link:(0,Ba.jsx)(Qn.ExternalLink,{href:(0,lr.__)("https://wordpress.org/documentation/article/customize-date-and-time-format/")})}),value:e,onChange:a=>t(a)})]})}var Di=l(P(),1),BS=l(L(),1),Wee=l(at(),1);var Zee=l(Y(),1),Ea=l(x(),1);function $ee({id:e,colorPalette:t,duotonePalette:o,disableCustomColors:r,disableCustomDuotone:n,value:i,onChange:s}){let a;i==="unset"?a=(0,Ea.jsx)(Di.ColorIndicator,{className:"block-editor-duotone-control__unset-indicator"}):i?a=(0,Ea.jsx)(Di.DuotoneSwatch,{values:i}):a=(0,Ea.jsx)(Ee,{icon:ZO});let c=(0,BS.__)("Apply duotone filter"),d=`${(0,Zee.useInstanceId)($ee,"duotone-control",e)}__description`;return(0,Ea.jsx)(Di.Dropdown,{popoverProps:{className:"block-editor-duotone-control__popover",headerTitle:(0,BS.__)("Duotone")},renderToggle:({isOpen:f,onToggle:m})=>(0,Ea.jsx)(Di.ToolbarButton,{showTooltip:!0,onClick:m,"aria-haspopup":"true","aria-expanded":f,onKeyDown:h=>{!f&&h.keyCode===Wee.DOWN&&(h.preventDefault(),m())},label:c,icon:a}),renderContent:()=>(0,Ea.jsxs)(Di.MenuGroup,{label:(0,BS.__)("Duotone"),children:[(0,Ea.jsx)("p",{children:(0,BS.__)("Create a two-tone color effect without losing your original image.")}),(0,Ea.jsx)(Di.DuotonePicker,{"aria-label":c,"aria-describedby":d,colorPalette:t,duotonePalette:o,disableCustomColors:r,disableCustomDuotone:n,value:i,onChange:s})]})})}var FT=$ee;var qee=l(P(),1),Qee=l(Re(),1),Jee=l(I(),1),Jn=l(L(),1);var $o=l(L(),1);var zT=l(L(),1);function Yee(e){if(!e)return{};if(typeof e=="object")return e;let t;switch(e){case"normal":t=(0,zT._x)("Regular","font style");break;case"italic":t=(0,zT._x)("Italic","font style");break;case"oblique":t=(0,zT._x)("Oblique","font style");break;default:t=e;break}return{name:t,value:e}}var Is=l(L(),1);function UV(e){if(!e)return{};if(typeof e=="object")return e;let t;switch(e){case"normal":case"400":t=(0,Is._x)("Regular","font weight");break;case"bold":case"700":t=(0,Is._x)("Bold","font weight");break;case"100":t=(0,Is._x)("Thin","font weight");break;case"200":t=(0,Is._x)("Extra Light","font weight");break;case"300":t=(0,Is._x)("Light","font weight");break;case"500":t=(0,Is._x)("Medium","font weight");break;case"600":t=(0,Is._x)("Semi Bold","font weight");break;case"800":t=(0,Is._x)("Extra Bold","font weight");break;case"900":t=(0,Is._x)("Black","font weight");break;case"1000":t=(0,Is._x)("Extra Black","font weight");break;default:t=e;break}return{name:t,value:e}}var Kee=[{name:(0,$o._x)("Regular","font style"),value:"normal"},{name:(0,$o._x)("Italic","font style"),value:"italic"}],Xee=[{name:(0,$o._x)("Thin","font weight"),value:"100"},{name:(0,$o._x)("Extra Light","font weight"),value:"200"},{name:(0,$o._x)("Light","font weight"),value:"300"},{name:(0,$o._x)("Regular","font weight"),value:"400"},{name:(0,$o._x)("Medium","font weight"),value:"500"},{name:(0,$o._x)("Semi Bold","font weight"),value:"600"},{name:(0,$o._x)("Bold","font weight"),value:"700"},{name:(0,$o._x)("Extra Bold","font weight"),value:"800"},{name:(0,$o._x)("Black","font weight"),value:"900"},{name:(0,$o._x)("Extra Black","font weight"),value:"1000"}];function Wg(e){let t=[],o=[],r=[],n=!e||e?.length===0,i=!1;return e?.forEach(s=>{if(typeof s.fontWeight=="string"&&/\s/.test(s.fontWeight.trim())){i=!0;let[u,d]=s.fontWeight.split(" ");u=parseInt(u.slice(0,1)),d==="1000"?d=10:d=parseInt(d.slice(0,1));for(let f=u;f<=d;f++){let m=`${f.toString()}00`;o.some(p=>p.value===m)||o.push(UV(m))}}let a=UV(typeof s.fontWeight=="number"?s.fontWeight.toString():s.fontWeight),c=Yee(s.fontStyle);c&&Object.keys(c).length&&(t.some(u=>u.value===c.value)||t.push(c)),a&&Object.keys(a).length&&(o.some(u=>u.value===a.value)||i||o.push(a))}),o.some(s=>s.value>="600")||o.push({name:(0,$o._x)("Bold","font weight"),value:"700"}),t.some(s=>s.value==="italic")||t.push({name:(0,$o._x)("Italic","font style"),value:"italic"}),n&&(t=Kee,o=Xee),t=t.length===0?Kee:t,o=o.length===0?Xee:o,t.forEach(({name:s,value:a})=>{o.forEach(({name:c,value:u})=>{let d=a==="normal"?c:(0,$o.sprintf)((0,$o._x)("%1$s %2$s","font"),c,s);r.push({key:`${a}-${u}`,name:d,style:{fontStyle:a,fontWeight:u}})})}),{fontStyles:t,fontWeights:o,combinedStyleAndWeightOptions:r,isSystemFont:n,isVariableFont:i}}var ete=l(x(),1),GBe=(e,t)=>e?t?(0,Jn.__)("Appearance"):(0,Jn.__)("Font style"):(0,Jn.__)("Font weight");function jT(e){let{__next40pxDefaultSize:t=!1,onChange:o,hasFontStyles:r=!0,hasFontWeights:n=!0,fontFamilyFaces:i,value:{fontStyle:s,fontWeight:a},...c}=e,u=r||n,d=GBe(r,n),f={key:"default",name:(0,Jn.__)("Default"),style:{fontStyle:void 0,fontWeight:void 0}},{fontStyles:m,fontWeights:p,combinedStyleAndWeightOptions:h}=Wg(i),g=()=>{let w=[f];return h&&w.push(...h),w},b=()=>{let w=[f];return m.forEach(({name:C,value:E})=>{w.push({key:E,name:C,style:{fontStyle:E,fontWeight:void 0}})}),w},k=()=>{let w=[f];return p.forEach(({name:C,value:E})=>{w.push({key:E,name:C,style:{fontStyle:void 0,fontWeight:E}})}),w},v=(0,Jee.useMemo)(()=>r&&n?g():r?b():k(),[e.options,m,p,h]),y=v.find(w=>w.style.fontStyle===s&&w.style.fontWeight===a)||v[0],_=()=>y?r?n?(0,Jn.sprintf)((0,Jn.__)("Currently selected font appearance: %s"),y.name):(0,Jn.sprintf)((0,Jn.__)("Currently selected font style: %s"),y.name):(0,Jn.sprintf)((0,Jn.__)("Currently selected font weight: %s"),y.name):(0,Jn.__)("No selected font appearance");return!t&&(c.size===void 0||c.size==="default")&&(0,Qee.default)("36px default size for wp.blockEditor.__experimentalFontAppearanceControl",{since:"6.8",version:"7.1",hint:"Set the `__next40pxDefaultSize` prop to true to start opting into the new default size, which will become the default in a future version."}),u&&(0,ete.jsx)(qee.CustomSelectControl,{...c,className:"components-font-appearance-control",__next40pxDefaultSize:t,__shouldNotWarnDeprecated36pxSize:!0,label:d,describedBy:_(),options:v,value:y,onChange:({selectedItem:w})=>o(w.style)})}var tte=l(P(),1),ote=l(Re(),1),WV=l(L(),1);var rte=l(x(),1);function GT({__next40pxDefaultSize:e=!1,value:t="",onChange:o,fontFamilies:r,className:n,...i}){let[s]=pe("typography.fontFamilies");if(r||(r=s),!r||r.length===0)return null;let a=[{key:"",name:(0,WV.__)("Default")},...r.map(({fontFamily:u,name:d})=>({key:u,name:d||u,style:{fontFamily:u}}))];!e&&(i.size===void 0||i.size==="default")&&(0,ote.default)("36px default size for wp.blockEditor.__experimentalFontFamilyControl",{since:"6.8",version:"7.1",hint:"Set the `__next40pxDefaultSize` prop to true to start opting into the new default size, which will become the default in a future version."});let c=a.find(u=>u.key===t)??"";return(0,rte.jsx)(tte.CustomSelectControl,{__next40pxDefaultSize:e,__shouldNotWarnDeprecated36pxSize:!0,label:(0,WV.__)("Font"),value:c,onChange:({selectedItem:u})=>o(u.key),options:a,className:D("block-editor-font-family-control",n),...i})}var HT=l(P(),1),nte=l(Re(),1),ite=l(L(),1);var ste=l(x(),1);function UT({__next40pxDefaultSize:e=!1,value:t,onChange:o,__unstableInputWidth:r="60px",...n}){let[i]=pe("spacing.units"),s=(0,HT.__experimentalUseCustomUnits)({availableUnits:i||["px","em","rem"],defaultValues:{px:2,em:.2,rem:.2}});return!e&&(n.size===void 0||n.size==="default")&&(0,nte.default)("36px default size for wp.blockEditor.__experimentalLetterSpacingControl",{since:"6.8",version:"7.1",hint:"Set the `__next40pxDefaultSize` prop to true to start opting into the new default size, which will become the default in a future version."}),(0,ste.jsx)(HT.__experimentalUnitControl,{__next40pxDefaultSize:e,__shouldNotWarnDeprecated36pxSize:!0,...n,label:(0,ite.__)("Letter spacing"),value:t,__unstableInputWidth:r,units:s,onChange:o})}var ES=l(L(),1),WT=l(P(),1),ZV=l(x(),1),HBe=[{label:(0,ES.__)("None"),value:"none",icon:Nr},{label:(0,ES.__)("Underline"),value:"underline",icon:eA},{label:(0,ES.__)("Strikethrough"),value:"line-through",icon:QO}];function ZT({value:e,onChange:t,className:o}){return(0,ZV.jsx)(WT.__experimentalToggleGroupControl,{isDeselectable:!0,__next40pxDefaultSize:!0,label:(0,ES.__)("Decoration"),className:D("block-editor-text-decoration-control",o),value:e,onChange:r=>{t(r===e?void 0:r)},children:HBe.map(r=>(0,ZV.jsx)(WT.__experimentalToggleGroupControlOptionIcon,{value:r.value,icon:r.icon,label:r.label},r.value))})}var Zg=l(L(),1);var $T=l(P(),1),$V=l(x(),1),UBe=[{label:(0,Zg.__)("None"),value:"none",icon:Nr},{label:(0,Zg.__)("Uppercase"),value:"uppercase",icon:oA},{label:(0,Zg.__)("Lowercase"),value:"lowercase",icon:XO},{label:(0,Zg.__)("Capitalize"),value:"capitalize",icon:YO}];function YT({className:e,value:t,onChange:o}){return(0,$V.jsx)($T.__experimentalToggleGroupControl,{isDeselectable:!0,__next40pxDefaultSize:!0,label:(0,Zg.__)("Letter case"),className:D("block-editor-text-transform-control",e),value:t,onChange:r=>{o(r===t?void 0:r)},children:UBe.map(r=>(0,$V.jsx)($T.__experimentalToggleGroupControlOptionIcon,{value:r.value,icon:r.icon,label:r.label},r.value))})}var $g=l(L(),1);var KT=l(P(),1),YV=l(x(),1),WBe=[{label:(0,$g.__)("Horizontal"),value:"horizontal-tb",icon:ZL},{label:(0,$g.__)("Vertical"),value:(0,$g.isRTL)()?"vertical-lr":"vertical-rl",icon:YL}];function XT({className:e,value:t,onChange:o}){return(0,YV.jsx)(KT.__experimentalToggleGroupControl,{isDeselectable:!0,__next40pxDefaultSize:!0,label:(0,$g.__)("Orientation"),className:D("block-editor-writing-mode-control",e),value:t,onChange:r=>{o(r===t?void 0:r)},children:WBe.map(r=>(0,YV.jsx)(KT.__experimentalToggleGroupControlOptionIcon,{value:r.value,icon:r.icon,label:r.label},r.value))})}var $r=l(P(),1),ate=l(I(),1),lte=l(L(),1);var Oo=l(x(),1),ZBe=({setting:e,children:t,panelId:o,...r})=>{let n=()=>{e.colorValue?e.onColorChange():e.gradientValue&&e.onGradientChange()};return(0,Oo.jsx)($r.__experimentalToolsPanelItem,{hasValue:()=>!!e.colorValue||!!e.gradientValue,label:e.label,onDeselect:n,isShownByDefault:e.isShownByDefault!==void 0?e.isShownByDefault:!0,...r,className:"block-editor-tools-panel-color-gradient-settings__item",panelId:o,resetAllFilter:e.resetAllFilter,children:t})},$Be=({colorValue:e,label:t})=>(0,Oo.jsxs)($r.__experimentalHStack,{justify:"flex-start",children:[(0,Oo.jsx)($r.ColorIndicator,{className:"block-editor-panel-color-gradient-settings__color-indicator",colorValue:e}),(0,Oo.jsx)($r.FlexItem,{className:"block-editor-panel-color-gradient-settings__color-name",title:t,children:t})]}),YBe=e=>({onToggle:t,isOpen:o})=>{let{clearable:r,colorValue:n,gradientValue:i,onColorChange:s,onGradientChange:a,label:c}=e,u=(0,ate.useRef)(void 0),d={onClick:t,className:D("block-editor-panel-color-gradient-settings__dropdown",{"is-open":o}),"aria-expanded":o,ref:u},f=()=>{n?s():i&&a()},m=n??i;return(0,Oo.jsxs)(Oo.Fragment,{children:[(0,Oo.jsx)($r.Button,{__next40pxDefaultSize:!0,...d,children:(0,Oo.jsx)($Be,{colorValue:m,label:c})}),r&&m&&(0,Oo.jsx)($r.Button,{__next40pxDefaultSize:!0,label:(0,lte.__)("Reset"),className:"block-editor-panel-color-gradient-settings__reset",size:"small",icon:Nr,onClick:()=>{f(),o&&t(),u.current?.focus()}})]})};function qT({colors:e,disableCustomColors:t,disableCustomGradients:o,enableAlpha:r,gradients:n,settings:i,__experimentalIsRenderedInSidebar:s,...a}){let c;return s&&(c={placement:"left-start",offset:36,shift:!0}),(0,Oo.jsx)(Oo.Fragment,{children:i.map((u,d)=>{let f={clearable:!1,colorValue:u.colorValue,colors:e,disableCustomColors:t,disableCustomGradients:o,enableAlpha:r,gradientValue:u.gradientValue,gradients:n,label:u.label,onColorChange:u.onColorChange,onGradientChange:u.onGradientChange,showTitle:!1,__experimentalIsRenderedInSidebar:s,...u},m={clearable:u.clearable,label:u.label,colorValue:u.colorValue,gradientValue:u.gradientValue,onColorChange:u.onColorChange,onGradientChange:u.onGradientChange};return u&&(0,Oo.jsx)(ZBe,{setting:u,...a,children:(0,Oo.jsx)($r.Dropdown,{popoverProps:c,className:"block-editor-tools-panel-color-gradient-settings__dropdown",renderToggle:YBe(m),renderContent:()=>(0,Oo.jsx)($r.__experimentalDropdownContentWrapper,{paddingSize:"none",children:(0,Oo.jsx)("div",{className:"block-editor-panel-color-gradient-settings__dropdown-content",children:(0,Oo.jsx)(od,{...f})})})})},d)})})}var QT=l(P(),1),cte=l(M(),1),ute=l(Y(),1);var KV=l(I(),1),Sm=l(L(),1);function id(){let[e,t,o,r,n,i,s,a,c,u]=pe("color.custom","color.palette.custom","color.palette.theme","color.palette.default","color.defaultPalette","color.customGradient","color.gradients.custom","color.gradients.theme","color.gradients.default","color.defaultGradients"),d={disableCustomColors:!e,disableCustomGradients:!i};return d.colors=(0,KV.useMemo)(()=>{let f=[];return o&&o.length&&f.push({name:(0,Sm._x)("Theme","Indicates this palette comes from the theme."),slug:"theme",colors:o}),n&&r&&r.length&&f.push({name:(0,Sm._x)("Default","Indicates this palette comes from WordPress."),slug:"default",colors:r}),t&&t.length&&f.push({name:(0,Sm._x)("Custom","Indicates this palette is created by the user."),slug:"custom",colors:t}),f},[t,o,r,n]),d.gradients=(0,KV.useMemo)(()=>{let f=[];return a&&a.length&&f.push({name:(0,Sm._x)("Theme","Indicates this palette comes from the theme."),slug:"theme",gradients:a}),u&&c&&c.length&&f.push({name:(0,Sm._x)("Default","Indicates this palette comes from WordPress."),slug:"default",gradients:c}),s&&s.length&&f.push({name:(0,Sm._x)("Custom","Indicates this palette is created by the user."),slug:"custom",gradients:s}),f},[s,a,c,u]),d.hasColorsOrGradients=!!d.colors.length||!!d.gradients.length,d}var Ps=l(x(),1),KBe=["colors","disableCustomColors","gradients","disableCustomGradients"],XV=({className:e,colors:t,gradients:o,disableCustomColors:r,disableCustomGradients:n,children:i,settings:s,title:a,showTitle:c=!0,__experimentalIsRenderedInSidebar:u,enableAlpha:d})=>{let f=(0,ute.useInstanceId)(XV),{batch:m}=(0,cte.useRegistry)();return(!t||t.length===0)&&(!o||o.length===0)&&r&&n&&s?.every(p=>(!p.colors||p.colors.length===0)&&(!p.gradients||p.gradients.length===0)&&(p.disableCustomColors===void 0||p.disableCustomColors)&&(p.disableCustomGradients===void 0||p.disableCustomGradients))?null:(0,Ps.jsxs)(QT.__experimentalToolsPanel,{className:D("block-editor-panel-color-gradient-settings",e),label:c?a:void 0,resetAll:()=>{m(()=>{s.forEach(({colorValue:p,gradientValue:h,onColorChange:g,onGradientChange:b})=>{p?g():h&&b()})})},panelId:f,__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last",children:[(0,Ps.jsx)(qT,{settings:s,panelId:f,colors:t,gradients:o,disableCustomColors:r,disableCustomGradients:n,__experimentalIsRenderedInSidebar:u,enableAlpha:d}),!!i&&(0,Ps.jsxs)(Ps.Fragment,{children:[(0,Ps.jsx)(QT.__experimentalSpacer,{marginY:4})," ",i]})]})},XBe=e=>{let t=id();return(0,Ps.jsx)(XV,{...t,...e})},qBe=e=>KBe.every(t=>e.hasOwnProperty(t))?(0,Ps.jsx)(XV,{...e}):(0,Ps.jsx)(XBe,{...e}),JT=qBe;var eI=l(I(),1),_m=l(P(),1),QV=l(L(),1);var TS=l(x(),1),qV=[],QBe={...OT,px:{max:1e3,steps:1},em:{max:50,steps:.1},rem:{max:50,steps:.1}};function JBe(e){let t=e?.default??qV,o=e?.custom??qV,r=e?.theme??qV;return(0,eI.useMemo)(()=>[{name:(0,QV.__)("None"),slug:"0",size:0},...o,...r,...t],[o,r,t])}function Yg({label:e=(0,QV.__)("Dimension"),onChange:t,value:o}){let[r,n]=pe("dimensions.dimensionSizes","spacing.units"),i=(0,_m.__experimentalUseCustomUnits)({availableUnits:n||["%","px","em","rem","vh","vw"]}),s=JBe(r),[a,c]=(0,eI.useState)(()=>{let[,d]=(0,_m.__experimentalParseQuantityAndUnitFromRawValue)(o);return d||i[0]?.value||"px"}),u=d=>{let[f,m]=(0,_m.__experimentalParseQuantityAndUnitFromRawValue)(o);["em","rem"].includes(d)&&m==="px"?t((f/16).toFixed(2)+d):["em","rem"].includes(m)&&d==="px"?t(Math.round(f*16)+d):["%","vw","svw","lvw","dvw","vh","svh","lvh","dvh","vi","svi","lvi","dvi","vb","svb","lvb","dvb","vmin","svmin","lvmin","dvmin","vmax","svmax","lvmax","dvmax"].includes(d)&&f>100&&t(100+d),c(d)};return(0,TS.jsxs)("fieldset",{className:"block-editor-dimension-control",children:[(0,TS.jsx)(_m.BaseControl.VisualLabel,{as:"legend",children:e}),(0,TS.jsx)(ym,{ariaLabel:e,className:"block-editor-dimension-control",customValueSettings:QBe,minimumCustomValue:0,onChange:t,onUnitChange:u,presets:s,presetType:"dimension",selectedUnit:a,showTooltip:!0,units:i,value:o})]})}var fte=l(I(),1),Yo=l(P(),1),mte=l(L(),1),pte=l(Re(),1);var Ta=l(x(),1),dte={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 hte({label:e=(0,mte.__)("Height"),onChange:t,value:o}){(0,pte.default)("wp.blockEditor.HeightControl",{since:"7.0",version:"7.2",alternative:"wp.blockEditor.DimensionControl"});let r=parseFloat(o),[n]=pe("spacing.units"),i=(0,Yo.__experimentalUseCustomUnits)({availableUnits:n||["%","px","em","rem","vh","vw"]}),s=(0,fte.useMemo)(()=>(0,Yo.__experimentalParseQuantityAndUnitFromRawValue)(o),[o])[1]||i[0]?.value||"px",a=u=>{t([u,s].join(""))},c=u=>{let[d,f]=(0,Yo.__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,Ta.jsxs)("fieldset",{className:"block-editor-height-control",children:[(0,Ta.jsx)(Yo.BaseControl.VisualLabel,{as:"legend",children:e}),(0,Ta.jsxs)(Yo.Flex,{children:[(0,Ta.jsx)(Yo.FlexItem,{isBlock:!0,children:(0,Ta.jsx)(Yo.__experimentalUnitControl,{value:o,units:i,onChange:t,onUnitChange:c,min:0,size:"__unstable-large",label:e,hideLabelFromVision:!0})}),(0,Ta.jsx)(Yo.FlexItem,{isBlock:!0,children:(0,Ta.jsx)(Yo.__experimentalSpacer,{marginX:2,marginBottom:0,children:(0,Ta.jsx)(Yo.RangeControl,{__next40pxDefaultSize:!0,value:r,min:0,max:dte[s]?.max??100,step:dte[s]?.step??.1,withInputField:!1,onChange:a,label:e,hideLabelFromVision:!0})})})]})]})}var OS=l(P(),1);var Vi=l(Fr()),jte=l(Mte());function nEe(e,t,o,r,n,i){i===void 0&&(i=0);var s=Kg(e,t,i),a=s.width,c=s.height,u=Math.min(a,o),d=Math.min(c,r);return u>d*n?{width:d*n,height:d}:{width:u,height:u/n}}function iEe(e){return e.width>e.height?e.width/e.naturalWidth:e.height/e.naturalHeight}function IS(e,t,o,r,n){n===void 0&&(n=0);var i=Kg(t.width,t.height,n),s=i.width,a=i.height;return{x:Dte(e.x,s,o.width,r),y:Dte(e.y,a,o.height,r)}}function Dte(e,t,o,r){var n=t*r/2-o/2;return sI(e,-n,n)}function Vte(e,t){return Math.sqrt(Math.pow(e.y-t.y,2)+Math.pow(e.x-t.x,2))}function Fte(e,t){return Math.atan2(t.y-e.y,t.x-e.x)*180/Math.PI}function sEe(e,t,o,r,n,i,s){i===void 0&&(i=0),s===void 0&&(s=!0);var a=s?aEe:lEe,c=Kg(t.width,t.height,i),u=Kg(t.naturalWidth,t.naturalHeight,i),d={x:a(100,((c.width-o.width/n)/2-e.x/n)/c.width*100),y:a(100,((c.height-o.height/n)/2-e.y/n)/c.height*100),width:a(100,o.width/c.width*100/n),height:a(100,o.height/c.height*100/n)},f=Math.round(a(u.width,d.width*u.width/100)),m=Math.round(a(u.height,d.height*u.height/100)),p=u.width>=u.height*r,h=p?{width:Math.round(m*r),height:m}:{width:f,height:Math.round(f/r)},g=Po(Po({},h),{x:Math.round(a(u.width-h.width,d.x*u.width/100)),y:Math.round(a(u.height-h.height,d.y*u.height/100))});return{croppedAreaPercentages:d,croppedAreaPixels:g}}function aEe(e,t){return Math.min(e,Math.max(0,t))}function lEe(e,t){return t}function cEe(e,t,o,r,n,i){var s=Kg(t.width,t.height,o),a=sI(r.width/s.width*(100/e.width),n,i),c={x:a*s.width/2-r.width/2-s.width*a*(e.x/100),y:a*s.height/2-r.height/2-s.height*a*(e.y/100)};return{crop:c,zoom:a}}function uEe(e,t,o){var r=iEe(t);return o.height>o.width?o.height/(e.height*r):o.width/(e.width*r)}function dEe(e,t,o,r,n,i){o===void 0&&(o=0);var s=Kg(t.naturalWidth,t.naturalHeight,o),a=sI(uEe(e,t,r),n,i),c=r.height>r.width?r.height/e.height:r.width/e.width,u={x:((s.width-e.width)/2-e.x)*c,y:((s.height-e.height)/2-e.y)*c};return{crop:u,zoom:a}}function zte(e,t){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function fEe(e){return e*Math.PI/180}function Kg(e,t,o){var r=fEe(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 sI(e,t,o){return Math.min(Math.max(e,t),o)}function iI(){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 mEe=`.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;
}
`,pEe=1,hEe=3,gEe=1,Gte=(function(e){U6(t,e);function t(){var o=e!==null&&e.apply(this,arguments)||this;return o.cropperRef=Vi.createRef(),o.imageRef=Vi.createRef(),o.videoRef=Vi.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=cEe(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=dEe(o.props.initialCroppedAreaPixels,o.mediaSize,o.props.rotation,r,o.props.minZoom,o.props.maxZoom),i=a.crop,s=a.zoom;o.props.onCropChange(i),o.props.onZoomChange&&o.props.onZoomChange(s)}},o.computeSizes=function(){var r,n,i,s,a,c,u=o.imageRef.current||o.videoRef.current;if(u&&o.containerRef){o.containerRect=o.containerRef.getBoundingClientRect(),o.saveContainerPosition();var d=o.containerRect.width/o.containerRect.height,f=((r=o.imageRef.current)===null||r===void 0?void 0:r.naturalWidth)||((n=o.videoRef.current)===null||n===void 0?void 0:n.videoWidth)||0,m=((i=o.imageRef.current)===null||i===void 0?void 0:i.naturalHeight)||((s=o.videoRef.current)===null||s===void 0?void 0:s.videoHeight)||0,p=u.offsetWidth<f||u.offsetHeight<m,h=f/m,g=void 0;if(p)switch(o.state.mediaObjectFit){default:case"contain":g=d>h?{width:o.containerRect.height*h,height:o.containerRect.height}:{width:o.containerRect.width,height:o.containerRect.width/h};break;case"horizontal-cover":g={width:o.containerRect.width,height:o.containerRect.width/h};break;case"vertical-cover":g={width:o.containerRect.height*h,height:o.containerRect.height};break}else g={width:u.offsetWidth,height:u.offsetHeight};o.mediaSize=Po(Po({},g),{naturalWidth:f,naturalHeight:m}),o.props.setMediaSize&&o.props.setMediaSize(o.mediaSize);var b=o.props.cropSize?o.props.cropSize:nEe(o.mediaSize.width,o.mediaSize.height,o.containerRect.width,o.containerRect.height,o.props.aspect,o.props.rotation);return(((a=o.state.cropSize)===null||a===void 0?void 0:a.height)!==b.height||((c=o.state.cropSize)===null||c===void 0?void 0:c.width)!==b.width)&&o.props.onCropSizeChange&&o.props.onCropSizeChange(b),o.setState({cropSize:b},o.recomputeCropPosition),o.props.setCropSize&&o.props.setCropSize(b),b}},o.saveContainerPosition=function(){if(o.containerRef){var r=o.containerRef.getBoundingClientRect();o.containerPosition={x:r.left,y:r.top}}},o.onMouseDown=function(r){o.currentDoc&&(r.preventDefault(),o.currentDoc.addEventListener("mousemove",o.onMouseMove),o.currentDoc.addEventListener("mouseup",o.onDragStopped),o.saveContainerPosition(),o.onDragStart(t.getMousePoint(r)))},o.onMouseMove=function(r){return o.onDrag(t.getMousePoint(r))},o.onScroll=function(r){o.currentDoc&&(r.preventDefault(),o.saveContainerPosition())},o.onTouchStart=function(r){o.currentDoc&&(o.isTouching=!0,!(o.props.onTouchRequest&&!o.props.onTouchRequest(r))&&(o.currentDoc.addEventListener("touchmove",o.onTouchMove,{passive:!1}),o.currentDoc.addEventListener("touchend",o.onDragStopped),o.saveContainerPosition(),r.touches.length===2?o.onPinchStart(r):r.touches.length===1&&o.onDragStart(t.getTouchPoint(r.touches[0]))))},o.onTouchMove=function(r){r.preventDefault(),r.touches.length===2?o.onPinchMove(r):r.touches.length===1&&o.onDrag(t.getTouchPoint(r.touches[0]))},o.onGestureStart=function(r){o.currentDoc&&(r.preventDefault(),o.currentDoc.addEventListener("gesturechange",o.onGestureChange),o.currentDoc.addEventListener("gestureend",o.onGestureEnd),o.gestureZoomStart=o.props.zoom,o.gestureRotationStart=o.props.rotation)},o.onGestureChange=function(r){if(r.preventDefault(),!o.isTouching){var n=t.getMousePoint(r),i=o.gestureZoomStart-1+r.scale;if(o.setNewZoom(i,n,{shouldUpdatePosition:!0}),o.props.onRotationChange){var s=o.gestureRotationStart+r.rotation;o.props.onRotationChange(s)}}},o.onGestureEnd=function(r){o.cleanEvents()},o.onDragStart=function(r){var n,i,s=r.x,a=r.y;o.dragStartPosition={x:s,y:a},o.dragStartCrop=Po({},o.props.crop),(i=(n=o.props).onInteractionStart)===null||i===void 0||i.call(n)},o.onDrag=function(r){var n=r.x,i=r.y;o.currentWindow&&(o.rafDragTimeout&&o.currentWindow.cancelAnimationFrame(o.rafDragTimeout),o.rafDragTimeout=o.currentWindow.requestAnimationFrame(function(){if(o.state.cropSize&&!(n===void 0||i===void 0)){var s=n-o.dragStartPosition.x,a=i-o.dragStartPosition.y,c={x:o.dragStartCrop.x+s,y:o.dragStartCrop.y+a},u=o.props.restrictPosition?IS(c,o.mediaSize,o.state.cropSize,o.props.zoom,o.props.rotation):c;o.props.onCropChange(u)}}))},o.onDragStopped=function(){var r,n;o.isTouching=!1,o.cleanEvents(),o.emitCropData(),(n=(r=o.props).onInteractionEnd)===null||n===void 0||n.call(r)},o.onWheel=function(r){if(o.currentWindow&&!(o.props.onWheelRequest&&!o.props.onWheelRequest(r))){r.preventDefault();var n=t.getMousePoint(r),i=(0,jte.default)(r).pixelY,s=o.props.zoom-i*o.props.zoomSpeed/200;o.setNewZoom(s,n,{shouldUpdatePosition:!0}),o.state.hasWheelJustStarted||o.setState({hasWheelJustStarted:!0},function(){var a,c;return(c=(a=o.props).onInteractionStart)===null||c===void 0?void 0:c.call(a)}),o.wheelTimer&&clearTimeout(o.wheelTimer),o.wheelTimer=o.currentWindow.setTimeout(function(){return o.setState({hasWheelJustStarted:!1},function(){var a,c;return(c=(a=o.props).onInteractionEnd)===null||c===void 0?void 0:c.call(a)})},250)}},o.getPointOnContainer=function(r,n){var i=r.x,s=r.y;if(!o.containerRect)throw new Error("The Cropper is not mounted");return{x:o.containerRect.width/2-(i-n.x),y:o.containerRect.height/2-(s-n.y)}},o.getPointOnMedia=function(r){var n=r.x,i=r.y,s=o.props,a=s.crop,c=s.zoom;return{x:(n+a.x)/c,y:(i+a.y)/c}},o.setNewZoom=function(r,n,i){var s=i===void 0?{}:i,a=s.shouldUpdatePosition,c=a===void 0?!0:a;if(!(!o.state.cropSize||!o.props.onZoomChange)){var u=sI(r,o.props.minZoom,o.props.maxZoom);if(c){var d=o.getPointOnContainer(n,o.containerPosition),f=o.getPointOnMedia(d),m={x:f.x*u-d.x,y:f.y*u-d.y},p=o.props.restrictPosition?IS(m,o.mediaSize,o.state.cropSize,u,o.props.rotation):m;o.props.onCropChange(p)}o.props.onZoomChange(u)}},o.getCropData=function(){if(!o.state.cropSize)return null;var r=o.props.restrictPosition?IS(o.props.crop,o.mediaSize,o.state.cropSize,o.props.zoom,o.props.rotation):o.props.crop;return sEe(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?IS(r,o.mediaSize,o.state.cropSize,o.props.zoom,o.props.rotation):r;o.previousCropSize=o.state.cropSize,o.props.onCropChange(a),o.emitCropData()}},o.onKeyDown=function(r){var n,i,s=o.props,a=s.crop,c=s.onCropChange,u=s.keyboardStep,d=s.zoom,f=s.rotation,m=u;if(o.state.cropSize){r.shiftKey&&(m*=.2);var p=Po({},a);switch(r.key){case"ArrowUp":p.y-=m,r.preventDefault();break;case"ArrowDown":p.y+=m,r.preventDefault();break;case"ArrowLeft":p.x-=m,r.preventDefault();break;case"ArrowRight":p.x+=m,r.preventDefault();break;default:return}o.props.restrictPosition&&(p=IS(p,o.mediaSize,o.state.cropSize,d,f)),r.repeat||(i=(n=o.props).onInteractionStart)===null||i===void 0||i.call(n),c(p)}},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=mEe,this.currentDoc.head.appendChild(this.styleRef)),this.imageRef.current&&this.imageRef.current.complete&&this.onMediaLoad(),this.props.setImageRef&&this.props.setImageRef(this.imageRef),this.props.setVideoRef&&this.props.setVideoRef(this.videoRef),this.props.setCropperRef&&this.props.setCropperRef(this.cropperRef))},t.prototype.componentWillUnmount=function(){var o,r;!this.currentDoc||!this.currentWindow||(typeof window.ResizeObserver>"u"&&this.currentWindow.removeEventListener("resize",this.computeSizes),(o=this.resizeObserver)===null||o===void 0||o.disconnect(),this.containerRef&&this.containerRef.removeEventListener("gesturestart",this.preventZoomSafari),this.styleRef&&((r=this.styleRef.parentNode)===null||r===void 0||r.removeChild(this.styleRef)),this.cleanEvents(),this.props.zoomWithScroll&&this.clearScrollEvent())},t.prototype.componentDidUpdate=function(o){var r,n,i,s,a,c,u,d,f;o.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):o.aspect!==this.props.aspect?this.computeSizes():o.objectFit!==this.props.objectFit?this.computeSizes():o.zoom!==this.props.zoom?this.recomputeCropPosition():((r=o.cropSize)===null||r===void 0?void 0:r.height)!==((n=this.props.cropSize)===null||n===void 0?void 0:n.height)||((i=o.cropSize)===null||i===void 0?void 0:i.width)!==((s=this.props.cropSize)===null||s===void 0?void 0:s.width)?this.computeSizes():(((a=o.crop)===null||a===void 0?void 0:a.x)!==((c=this.props.crop)===null||c===void 0?void 0:c.x)||((u=o.crop)===null||u===void 0?void 0:u.y)!==((d=this.props.crop)===null||d===void 0?void 0:d.y))&&this.emitCropAreaChange(),o.zoomWithScroll!==this.props.zoomWithScroll&&this.containerRef&&(this.props.zoomWithScroll?this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}):this.clearScrollEvent()),o.video!==this.props.video&&((f=this.videoRef.current)===null||f===void 0||f.load());var m=this.getObjectFit();m!==this.state.mediaObjectFit&&this.setState({mediaObjectFit:m},this.computeSizes)},t.prototype.getAspect=function(){var o=this.props,r=o.cropSize,n=o.aspect;return r?r.width/r.height:n},t.prototype.getObjectFit=function(){var o,r,n,i;if(this.props.objectFit==="cover"){var s=this.imageRef.current||this.videoRef.current;if(s&&this.containerRef){this.containerRect=this.containerRef.getBoundingClientRect();var a=this.containerRect.width/this.containerRect.height,c=((o=this.imageRef.current)===null||o===void 0?void 0:o.naturalWidth)||((r=this.videoRef.current)===null||r===void 0?void 0:r.videoWidth)||0,u=((n=this.imageRef.current)===null||n===void 0?void 0:n.naturalHeight)||((i=this.videoRef.current)===null||i===void 0?void 0:i.videoHeight)||0,d=c/u;return d<a?"horizontal-cover":"vertical-cover"}return"horizontal-cover"}return this.props.objectFit},t.prototype.onPinchStart=function(o){var r=t.getTouchPoint(o.touches[0]),n=t.getTouchPoint(o.touches[1]);this.lastPinchDistance=Vte(r,n),this.lastPinchRotation=Fte(r,n),this.onDragStart(zte(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=zte(n,i);this.onDrag(s),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame(function(){var a=Vte(n,i),c=r.props.zoom*(a/r.lastPinchDistance);r.setNewZoom(c,s,{shouldUpdatePosition:!1}),r.lastPinchDistance=a;var u=Fte(n,i),d=r.props.rotation+(u-r.lastPinchRotation);r.props.onRotationChange&&r.props.onRotationChange(d),r.lastPinchRotation=u})}},t.prototype.render=function(){var o=this,r,n=this.props,i=n.image,s=n.video,a=n.mediaProps,c=n.cropperProps,u=n.transform,d=n.crop,f=d.x,m=d.y,p=n.rotation,h=n.zoom,g=n.cropShape,b=n.showGrid,k=n.roundCropAreaPixels,v=n.style,y=v.containerStyle,_=v.cropAreaStyle,w=v.mediaStyle,C=n.classes,E=C.containerClassName,R=C.cropAreaClassName,O=C.mediaClassName,B=(r=this.state.mediaObjectFit)!==null&&r!==void 0?r:this.getObjectFit();return Vi.createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(A){return o.containerRef=A},"data-testid":"container",style:y,className:iI("reactEasyCrop_Container",E)},i?Vi.createElement("img",Po({alt:"",className:iI("reactEasyCrop_Image",B==="contain"&&"reactEasyCrop_Contain",B==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",B==="vertical-cover"&&"reactEasyCrop_Cover_Vertical",O)},a,{src:i,ref:this.imageRef,style:Po(Po({},w),{transform:u||"translate(".concat(f,"px, ").concat(m,"px) rotate(").concat(p,"deg) scale(").concat(h,")")}),onLoad:this.onMediaLoad})):s&&Vi.createElement("video",Po({autoPlay:!0,playsInline:!0,loop:!0,muted:!0,className:iI("reactEasyCrop_Video",B==="contain"&&"reactEasyCrop_Contain",B==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",B==="vertical-cover"&&"reactEasyCrop_Cover_Vertical",O)},a,{ref:this.videoRef,onLoadedMetadata:this.onMediaLoad,style:Po(Po({},w),{transform:u||"translate(".concat(f,"px, ").concat(m,"px) rotate(").concat(p,"deg) scale(").concat(h,")")}),controls:!1}),(Array.isArray(s)?s:[{src:s}]).map(function(T){return Vi.createElement("source",Po({key:T.src},T))})),this.state.cropSize&&Vi.createElement("div",Po({ref:this.cropperRef,style:Po(Po({},_),{width:k?Math.round(this.state.cropSize.width):this.state.cropSize.width,height:k?Math.round(this.state.cropSize.height):this.state.cropSize.height}),tabIndex:0,onKeyDown:this.onKeyDown,onKeyUp:this.onKeyUp,"data-testid":"cropper",className:iI("reactEasyCrop_CropArea",g==="round"&&"reactEasyCrop_CropAreaRound",b&&"reactEasyCrop_CropAreaGrid",R)},c)))},t.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:hEe,minZoom:pEe,cropShape:"rect",objectFit:"contain",showGrid:!0,style:{},classes:{},mediaProps:{},cropperProps:{},zoomSpeed:1,restrictPosition:!0,zoomWithScroll:!0,keyboardStep:gEe},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})(Vi.Component);var qte=l(I(),1);var qg=l(I(),1);var Hte=Object.prototype.hasOwnProperty;function Ute(e,t,o){for(o of e.keys())if(wm(o,t))return o}function wm(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--&&wm(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=Ute(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=Ute(t,n),!n)||!wm(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(Hte.call(e,o)&&++r&&!Hte.call(t,o)||!(o in t)||!wm(e[o],t[o]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}var Rs=l(I(),1);var Xg=1,Wte=5;var aI=e=>e>=0?e%360:(360+e%360)%360,bEe=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 Zte(e){return e*Math.PI/180}function kEe(e,t,o){let r=Zte(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 $te(e,t,o=0,r={horizontal:!1,vertical:!1}){try{let n=await bEe(e),i=document.createElement("canvas"),s=i.getContext("2d");if(!s)return null;let a=Zte(o),{width:c,height:u}=kEe(n.width,n.height,o);i.width=c,i.height=u,s.translate(c/2,u/2),s.rotate(a),s.scale(r.horizontal?-1:1,r.vertical?-1:1),s.translate(-n.width/2,-n.height/2),s.drawImage(n,0,0);let d=document.createElement("canvas"),f=d.getContext("2d");return f?(d.width=t.width,d.height=t.height,f.drawImage(i,t.x,t.y,t.width,t.height,0,0,t.width,t.height),new Promise(m=>{d.toBlob(p=>{p&&m(URL.createObjectURL(p))},"image/jpeg")})):null}catch{return null}}var Cm={crop:{x:0,y:0,width:100,height:100},zoom:Xg,rotation:0,aspectRatio:1,flip:{horizontal:!1,vertical:!1}},vEe={x:0,y:0},aF={crop:vEe,croppedArea:Cm.crop,croppedAreaPixels:null,zoom:Cm.zoom,rotation:Cm.rotation,flip:Cm.flip,aspectRatio:Cm.aspectRatio,mediaSize:null};function Yte(){let[e,t]=(0,Rs.useState)(aF),[o,r]=(0,Rs.useState)(null),n=(0,Rs.useCallback)(u=>{t(d=>{let m={...typeof u=="function"?u(d):u};return"rotation"in m&&m.rotation!==void 0&&(m.rotation=aI(m.rotation)),{...d,...m}})},[]),i=(0,Rs.useCallback)((u=null)=>{if(!u){r(null),n(aF);return}if(typeof u=="object"){let d={...Cm,...u};r(d),n(d)}},[n,r]),s=(0,Rs.useCallback)(()=>{if(o){let u={crop:{x:0,y:0},croppedAreaPixels:null};o.crop&&(u.croppedArea=o.crop),o.zoom!==void 0&&(u.zoom=o.zoom),o.rotation!==void 0&&(u.rotation=o.rotation),o.aspectRatio!==void 0&&(u.aspectRatio=o.aspectRatio),o.flip!==void 0&&(u.flip=o.flip),n(u)}else n({...aF})},[o,n]),a=(0,Rs.useMemo)(()=>{if(o){let d={crop:e.croppedAreaPixels||e.croppedArea,zoom:e.zoom,rotation:aI(e.rotation),aspectRatio:e.aspectRatio,flip:e.flip};return wm(d,o)===!1}let u={crop:e.croppedArea,zoom:e.zoom,rotation:aI(e.rotation),aspectRatio:e.aspectRatio,flip:e.flip};return wm(u,Cm)===!1},[e,o]),c=(0,Rs.useCallback)(async u=>e.croppedAreaPixels?$te(u,e.croppedAreaPixels,e.rotation,e.flip):null,[e.croppedAreaPixels,e.rotation,e.flip]);return(0,Rs.useMemo)(()=>({cropperState:e,setCropperState:n,resetState:o,setResetState:i,isDirty:a,reset:s,getCroppedImage:c}),[e,n,o,i,a,s,c])}var Kte=l(x(),1),Xte=(0,qg.createContext)({cropperState:{crop:{x:0,y:0},croppedArea:{x:0,y:0,width:100,height:100},croppedAreaPixels:null,zoom:Xg,rotation:0,aspectRatio:1,flip:{horizontal:!1,vertical:!1},mediaSize:null},setCropperState:()=>{},resetState:null,setResetState:()=>{},isDirty:!1,reset:()=>{},getCroppedImage:()=>Promise.resolve(null)});function lF({children:e}){let t=Yte(),o=(0,qg.useMemo)(()=>({...t}),[t]);return(0,Kte.jsx)(Xte.Provider,{value:o,children:e})}var PS=()=>{let e=(0,qg.useContext)(Xte);if(!e)throw new Error("Missing ImageCropperContext");return e};var Qte=l(x(),1);function cF({src:e,onLoad:t,minZoom:o=Xg,maxZoom:r=Wte,...n}){let{cropperState:i,setCropperState:s}=PS(),{crop:a,zoom:c,rotation:u,aspectRatio:d,flip:f}=i,m=k=>s({crop:k}),p=k=>s({zoom:k}),h=k=>s({rotation:k}),g=k=>s({mediaSize:k}),b=(0,qte.useCallback)((k,v)=>{s({croppedArea:k,croppedAreaPixels:v})},[s]);return(0,Qte.jsx)(Gte,{classes:{containerClassName:"image-cropper__container",cropAreaClassName:"image-cropper__crop-area",mediaClassName:"image-cropper__image"},minZoom:o,maxZoom:r,rotation:u,image:e,setMediaSize:g,crop:a,zoom:c,aspect:d,onCropChange:m,onZoomChange:p,onCropComplete:b,onMediaLoaded:k=>{t?.(k)},onRotationChange:h,transform:[`translate(${a.x}px, ${a.y}px)`,`rotateZ(${u}deg)`,`rotateY(${f.horizontal?180:0}deg)`,`rotateX(${f.vertical?180:0}deg)`,`scale(${c})`].join(" "),...n})}var eb=l(P(),1),Jg=l(L(),1);var Jte=100,eoe=300,lI={placement:"bottom-start"};var Qg=l(I(),1);var cI=l(M(),1),Bm=l(I(),1),sc=l(L(),1),toe=l(On(),1),ooe=l(je(),1);var yEe={crop:(0,sc.__)("Image cropped."),rotate:(0,sc.__)("Image rotated."),cropAndRotate:(0,sc.__)("Image cropped and rotated.")};function roe({crop:e,rotation:t,url:o,id:r,onSaveImage:n,onFinishEditing:i}){let{createErrorNotice:s,createSuccessNotice:a}=(0,cI.useDispatch)(toe.store),[c,u]=(0,Bm.useState)(!1),{editMediaEntity:d}=(0,cI.useSelect)(p=>({editMediaEntity:p(S).getSettings()?.[t0]}),[]),f=(0,Bm.useCallback)(()=>{u(!1),i()},[i]),m=(0,Bm.useCallback)(async()=>{if(!d){i(),s((0,sc.__)("Sorry, you are not allowed to edit images on this site."),{id:"image-editing-error",type:"snackbar"});return}u(!0);let p=[];if(t>0&&p.push({type:"rotate",args:{angle:t}}),(e.width<99.9||e.height<99.9)&&p.push({type:"crop",args:{left:e.x,top:e.y,width:e.width,height:e.height}}),p.length===0){u(!1),i();return}let h=p.length===1?p[0].type:"cropAndRotate";try{let g=await d(r,{src:o,modifiers:p},{throwOnError:!0});g&&(n({id:g.id,url:g.source_url}),a(yEe[h],{type:"snackbar",actions:[{label:(0,sc.__)("Undo"),onClick:()=>{n({id:r,url:o})}}]}))}catch(g){s((0,sc.sprintf)((0,sc.__)("Could not edit image. %s"),(0,ooe.__unstableStripHTML)(g.message)),{id:"image-editing-error",type:"snackbar"})}finally{u(!1),i()}},[e,t,r,o,n,s,a,i,d]);return(0,Bm.useMemo)(()=>({isInProgress:c,apply:m,cancel:f}),[c,m,f])}var Os=l(I(),1),noe=l(Je(),1);function ioe({url:e,naturalWidth:t,naturalHeight:o}){let[r,n]=(0,Os.useState)(),{cropperState:i,setCropperState:s}=PS(),{zoom:a,aspectRatio:c,crop:u,croppedArea:d}=i,f=(0,Os.useCallback)(v=>{s({zoom:v})},[s]),m=(0,Os.useCallback)(v=>{s({aspectRatio:v})},[s]),p=t/o,h=o/t;(0,Os.useEffect)(()=>{m(p)},[]);let[g,b]=(0,Os.useState)(0),k=(0,Os.useCallback)(()=>{let v=(g+90)%360,y=p,w=a!==1||!(p===c||h===c);if(g%180===90&&(y=1/p),v===0){n(),b(v),s({aspectRatio:w?c:p,crop:{x:-(u.y*y),y:u.x*y}});return}function C(O){let B=document.createElement("canvas"),T=0,A=0;v%180?(B.width=O.target.height,B.height=O.target.width):(B.width=O.target.width,B.height=O.target.height),(v===90||v===180)&&(T=B.width),(v===270||v===180)&&(A=B.height);let N=B.getContext("2d");N.translate(T,A),N.rotate(v*Math.PI/180),N.drawImage(O.target,0,0),B.toBlob(z=>{n(URL.createObjectURL(z)),b(v);let U=w?c:B.width/B.height;s({aspectRatio:U,crop:{x:-(u.y*y),y:u.x*y}})})}let E=new window.Image;E.src=e,E.onload=C;let R=(0,noe.applyFilters)("media.crossOrigin",void 0,e);typeof R=="string"&&(E.crossOrigin=R)},[g,p,e,s,u,a,c,h,b]);return(0,Os.useMemo)(()=>({editedUrl:r,setEditedUrl:n,crop:d,zoom:a,setZoom:f,rotation:g,rotateClockwise:k,aspect:c,setAspect:m,defaultAspect:p}),[r,d,a,f,g,k,c,m,p])}var soe=l(x(),1),uF=(0,Qg.createContext)({});uF.displayName="ImageEditingContext";var Ia=()=>(0,Qg.useContext)(uF);function aoe({id:e,url:t,naturalWidth:o,naturalHeight:r,onFinishEditing:n,onSaveImage:i,children:s}){let a=ioe({url:t,naturalWidth:o,naturalHeight:r}),c=roe({id:e,url:t,onSaveImage:i,onFinishEditing:n,...a}),u=(0,Qg.useMemo)(()=>({...a,...c}),[a,c]);return(0,soe.jsx)(uF.Provider,{value:u,children:s})}var Fi=l(x(),1);function uI({aspectRatios:e,isDisabled:t,label:o,onClick:r,value:n}){return(0,Fi.jsx)(eb.MenuGroup,{label:o,children:e.map(({name:i,slug:s,ratio:a})=>(0,Fi.jsx)(eb.MenuItem,{disabled:t,onClick:()=>{r(a)},role:"menuitemradio",isSelected:a===n,icon:a===n?al:void 0,children:i},s))})}function SEe(e){let[t,o,...r]=e.split("/").map(Number);return t<=0||o<=0||Number.isNaN(t)||Number.isNaN(o)||r.length?NaN:o?t/o:t}function dF({ratio:e,...t}){return{ratio:SEe(e),...t}}function loe({toggleProps:e}){let{isInProgress:t,aspect:o,setAspect:r,defaultAspect:n}=Ia(),[i,s,a]=pe("dimensions.aspectRatios.default","dimensions.aspectRatios.theme","dimensions.defaultAspectRatios");return(0,Fi.jsx)(eb.DropdownMenu,{icon:cO,label:(0,Jg.__)("Aspect Ratio"),popoverProps:lI,toggleProps:e,children:({onClose:c})=>(0,Fi.jsxs)(Fi.Fragment,{children:[(0,Fi.jsx)(uI,{isDisabled:t,onClick:u=>{r(u),c()},value:o,aspectRatios:[{slug:"original",name:(0,Jg.__)("Original"),ratio:n},...a?i.map(dF).filter(({ratio:u})=>u===1):[]]}),s?.length>0&&(0,Fi.jsx)(uI,{label:(0,Jg.__)("Theme"),isDisabled:t,onClick:u=>{r(u),c()},value:o,aspectRatios:s}),a&&(0,Fi.jsx)(uI,{label:(0,Jg.__)("Landscape"),isDisabled:t,onClick:u=>{r(u),c()},value:o,aspectRatios:i.map(dF).filter(({ratio:u})=>u>1)}),a&&(0,Fi.jsx)(uI,{label:(0,Jg.__)("Portrait"),isDisabled:t,onClick:u=>{r(u),c()},value:o,aspectRatios:i.map(dF).filter(({ratio:u})=>u<1)})]})})}var coe=l(P(),1),uoe=l(Y(),1);var sd=l(x(),1);function doe({url:e,width:t,height:o,naturalHeight:r,naturalWidth:n,borderProps:i}){let{isInProgress:s,editedUrl:a,rotation:c}=Ia(),[u,{width:d}]=(0,uoe.useResizeObserver)(),f=o||d*r/n;c%180===90&&(f=d*n/r);let m=(0,sd.jsxs)("div",{className:D("wp-block-image__crop-area",i?.className,{"is-applying":s}),style:{...i?.style,width:t||d,height:f},children:[(0,sd.jsx)(cF,{src:a||e}),s&&(0,sd.jsx)(coe.Spinner,{})]});return(0,sd.jsxs)(sd.Fragment,{children:[u,m]})}var ad=l(P(),1),fF=l(L(),1);var RS=l(x(),1);function foe(){let{isInProgress:e,zoom:t,setZoom:o}=Ia();return(0,RS.jsx)(ad.Dropdown,{contentClassName:"wp-block-image__zoom",popoverProps:lI,renderToggle:({isOpen:r,onToggle:n})=>(0,RS.jsx)(ad.ToolbarButton,{icon:_L,label:(0,fF.__)("Zoom"),onClick:n,"aria-expanded":r,disabled:e}),renderContent:()=>(0,RS.jsx)(ad.__experimentalDropdownContentWrapper,{paddingSize:"medium",children:(0,RS.jsx)(ad.RangeControl,{__next40pxDefaultSize:!0,label:(0,fF.__)("Zoom"),min:Jte,max:eoe,value:Math.round(t*100),onChange:r=>o(r/100)})})})}var moe=l(P(),1),poe=l(L(),1);var hoe=l(x(),1);function goe(){let{isInProgress:e,rotateClockwise:t}=Ia();return(0,hoe.jsx)(moe.ToolbarButton,{icon:kL,label:(0,poe.__)("Rotate"),onClick:t,disabled:e})}var mF=l(P(),1),pF=l(L(),1);var Em=l(x(),1);function boe(){let{isInProgress:e,apply:t,cancel:o}=Ia();return(0,Em.jsxs)(Em.Fragment,{children:[(0,Em.jsx)(mF.ToolbarButton,{onClick:t,disabled:e,children:(0,pF.__)("Apply")}),(0,Em.jsx)(mF.ToolbarButton,{onClick:o,children:(0,pF.__)("Cancel")})]})}var ei=l(x(),1);function koe({id:e,url:t,width:o,height:r,naturalHeight:n,naturalWidth:i,onSaveImage:s,onFinishEditing:a,borderProps:c}){return(0,ei.jsx)(lF,{children:(0,ei.jsxs)(aoe,{id:e,url:t,naturalWidth:i,naturalHeight:n,onSaveImage:s,onFinishEditing:a,children:[(0,ei.jsx)(doe,{borderProps:c,url:t,width:o,height:r,naturalHeight:n,naturalWidth:i}),(0,ei.jsxs)(pt,{children:[(0,ei.jsxs)(OS.ToolbarGroup,{children:[(0,ei.jsx)(foe,{}),(0,ei.jsx)(OS.ToolbarItem,{children:u=>(0,ei.jsx)(loe,{toggleProps:u})}),(0,ei.jsx)(goe,{})]}),(0,ei.jsx)(OS.ToolbarGroup,{children:(0,ei.jsx)(boe,{})})]})]})})}var ti=l(P(),1),ld=l(L(),1);var tb=l(I(),1);function voe(e,t,o,r,n){let[i,s]=(0,tb.useState)(t??r??""),[a,c]=(0,tb.useState)(e??o??"");return(0,tb.useEffect)(()=>{t===void 0&&r!==void 0&&s(r),e===void 0&&o!==void 0&&c(o)},[r,o]),(0,tb.useEffect)(()=>{t!==void 0&&Number.parseInt(t)!==Number.parseInt(i)&&s(t),e!==void 0&&Number.parseInt(e)!==Number.parseInt(a)&&c(e)},[t,e]),{currentHeight:a,currentWidth:i,updateDimension:(f,m)=>{let p=m===""?void 0:parseInt(m,10);f==="width"?s(p):c(p),n({[f]:p})},updateDimensions:(f,m)=>{c(f??o),s(m??r),n({height:f,width:m})}}}var zi=l(x(),1),yoe=[25,50,75,100],_Ee=()=>{};function Soe(e,t,o){let r=Math.round(t*(e/100)),n=Math.round(o*(e/100));return{scaledWidth:r,scaledHeight:n}}function _oe({imageSizeHelp:e,imageWidth:t,imageHeight:o,imageSizeOptions:r=[],isResizable:n=!0,slug:i,width:s,height:a,onChange:c,onChangeImage:u=_Ee}){let{currentHeight:d,currentWidth:f,updateDimension:m,updateDimensions:p}=voe(a,s,o,t,c),h=b=>{if(b===void 0){p();return}let{scaledWidth:k,scaledHeight:v}=Soe(b,t,o);p(v,k)},g=yoe.find(b=>{let{scaledWidth:k,scaledHeight:v}=Soe(b,t,o);return f===k&&d===v});return(0,zi.jsxs)(ti.__experimentalVStack,{className:"block-editor-image-size-control",spacing:"4",children:[r&&r.length>0&&(0,zi.jsx)(ti.SelectControl,{label:(0,ld.__)("Resolution"),value:i,options:r,onChange:u,help:e,size:"__unstable-large"}),n&&(0,zi.jsxs)(zi.Fragment,{children:[(0,zi.jsxs)(ti.__experimentalHStack,{align:"baseline",spacing:"4",children:[(0,zi.jsx)(ti.__experimentalNumberControl,{label:(0,ld.__)("Width"),value:f,min:1,onChange:b=>m("width",b),size:"__unstable-large"}),(0,zi.jsx)(ti.__experimentalNumberControl,{label:(0,ld.__)("Height"),value:d,min:1,onChange:b=>m("height",b),size:"__unstable-large"})]}),(0,zi.jsx)(ti.__experimentalToggleGroupControl,{label:(0,ld.__)("Image size presets"),hideLabelFromVision:!0,onChange:h,value:g,isBlock:!0,__next40pxDefaultSize:!0,children:yoe.map(b=>(0,zi.jsx)(ti.__experimentalToggleGroupControlOption,{value:b,label:(0,ld.sprintf)((0,ld.__)("%d%%"),b)},b))})]})]})}var dI=l(P(),1);var Tm=l(L(),1),woe=l(x(),1),xoe={left:Vc,center:Dc,right:Fc,"space-between":Ip,stretch:Pp};function xEe({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?xoe[r]:xoe.left,c=[{name:"left",icon:Vc,title:(0,Tm.__)("Justify items left"),isActive:r==="left",onClick:()=>s("left")},{name:"center",icon:Dc,title:(0,Tm.__)("Justify items center"),isActive:r==="center",onClick:()=>s("center")},{name:"right",icon:Fc,title:(0,Tm.__)("Justify items right"),isActive:r==="right",onClick:()=>s("right")},{name:"space-between",icon:Ip,title:(0,Tm.__)("Space between items"),isActive:r==="space-between",onClick:()=>s("space-between")},{name:"stretch",icon:Pp,title:(0,Tm.__)("Stretch items"),isActive:r==="stretch",onClick:()=>s("stretch")}],u=i?dI.ToolbarGroup:dI.ToolbarDropdownMenu,d=i?{isCollapsed:t}:{};return(0,woe.jsx)(u,{icon:a,popoverProps:n,label:(0,Tm.__)("Change items justification"),controls:c.filter(f=>e.includes(f.name)),...d})}var hF=xEe;var gF=l(x(),1),qp=e=>(0,gF.jsx)(hF,{...e,isToolbar:!1}),Coe=e=>(0,gF.jsx)(hF,{...e,isToolbar:!0});var Kr=l(P(),1),Pa=l(L(),1),cr=l(I(),1),gre=l(Y(),1),bre=l(je(),1),kre=l(at(),1),vre=l(zy(),1),wI=l(M(),1),EF=l(zp(),1);var yre=l(Re(),1);var ob=l(P(),1);var fI=l(Y(),1),mI=l(L(),1),Boe=l(I(),1),ac=l(x(),1);function Eoe({children:e,settingsOpen:t,setSettingsOpen:o}){let r=(0,fI.useReducedMotion)(),n=r?Boe.Fragment:ob.__unstableAnimatePresence,i=r?"div":ob.__unstableMotion.div,a=`link-control-settings-drawer-${(0,fI.useInstanceId)(Eoe)}`;return(0,ac.jsxs)(ac.Fragment,{children:[(0,ac.jsx)(ob.Button,{__next40pxDefaultSize:!0,className:"block-editor-link-control__drawer-toggle","aria-expanded":t,onClick:()=>o(!t),icon:(0,mI.isRTL)()?Dk:Mc,"aria-controls":a,children:(0,mI._x)("Advanced","Additional link settings")}),(0,ac.jsx)(n,{children:t&&(0,ac.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,ac.jsx)("div",{className:"block-editor-link-control__drawer-inner",children:e})})})]})}var Toe=Eoe;var kI=l(I(),1),CF=l(L(),1),$oe=l(Re(),1);var AS=l(L(),1),Foe=l(P(),1);var pI=l(L(),1),Ioe=l(P(),1),Poe=l(I(),1);var bF=l(x(),1),wEe=({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,Poe.createInterpolateElement)((0,pI.sprintf)((0,pI.__)("Create: <mark>%s</mark>"),e),{mark:(0,bF.jsx)("mark",{})}),(0,bF.jsx)(Ioe.MenuItem,{...o,iconPosition:"left",icon:mi,className:"block-editor-link-control__search-item",onClick:t,children:n})},Roe=wEe;var lc=l(L(),1),gI=l(P(),1);var Ooe=l(je(),1),nb=l(rn(),1),Aoe=l(Y(),1),Loe=l(Re(),1),rb=l(x(),1),hI={post:{icon:mL,label:(0,lc.__)("Post")},page:{icon:cl,label:(0,lc.__)("Page")},post_tag:{icon:UL,label:(0,lc.__)("Tag")},category:{icon:hO,label:(0,lc.__)("Category")},attachment:{icon:UO,label:(0,lc.__)("Attachment")}};function CEe({isURL:e,suggestion:t}){let o=null;return e?o=Fk:t.type in hI&&(o=hI[t.type].icon,t.type==="page"&&(t.isFrontPage&&(o=yA),t.isBlogHome&&(o=nN))),o?(0,rb.jsx)(Ee,{className:"block-editor-link-control__search-item-icon",icon:o}):null}function BEe(e){return e?.trim()?.length?e?.replace(/^\/?/,"/"):e}function EEe(e){return e?.trim()?.length?e?.replace(/\/$/,""):e}var TEe=(e,...t)=>(...o)=>e(...o,...t),IEe=e=>t=>t==null||t!==t?e:t;function PEe(e){return e&&(0,Aoe.pipe)(nb.safeDecodeURI,nb.getPath,IEe(""),TEe(nb.filterURLForDisplay,24),EEe,BEe)(e)}var Noe=({itemProps:e,suggestion:t,searchTerm:o,onClick:r,isURL:n=!1,shouldShowType:i=!1})=>{let s=n?(0,lc.__)("Press ENTER to add this link"):PEe(t.url);return(0,rb.jsx)(gI.MenuItem,{...e,info:s,iconPosition:"left",icon:(0,rb.jsx)(CEe,{suggestion:t,isURL:n}),onClick:r,shortcut:i&&REe(t),className:"block-editor-link-control__search-item",children:(0,rb.jsx)(gI.TextHighlight,{text:(0,Ooe.__unstableStripHTML)(t.title),highlight:o})})};function REe(e){return e.isFrontPage?(0,lc.__)("Front page"):e.isBlogHome?(0,lc.__)("Blog home"):e.type in hI?hI[e.type].label:e.type}var Moe=Noe,Doe=e=>((0,Loe.default)("wp.blockEditor.__experimentalLinkControlSearchItem",{since:"6.8"}),(0,rb.jsx)(Noe,{...e}));var Voe=l(L(),1),Im="__CREATE__",kF="tel",vF="link",yF="mailto",SF="internal",_F=[vF,yF,kF,SF],xF=[{id:"opensInNewTab",title:(0,Voe.__)("Open in new tab")}];var zoe=l(Re(),1),Pm=l(x(),1);function joe({withCreateSuggestion:e,currentInputValue:t,handleSuggestionClick:o,suggestionsListProps:r,buildSuggestionItemProps:n,suggestions:i,selectedSuggestion:s,isLoading:a,isInitialSuggestions:c,createSuggestionButtonText:u,suggestionsQuery:d}){let f=D("block-editor-link-control__search-results",{"is-loading":a}),m=i.length===1&&_F.includes(i[0].type),p=e&&!m&&!c,h=!d?.type,g=c?(0,AS.__)("Suggestions"):(0,AS.sprintf)((0,AS.__)('Search results for "%s"'),t);return(0,Pm.jsx)("div",{className:"block-editor-link-control__search-results-wrapper",children:(0,Pm.jsx)("div",{...r,className:f,"aria-label":g,children:(0,Pm.jsx)(Foe.MenuGroup,{children:i.map((b,k)=>p&&Im===b.type?(0,Pm.jsx)(Roe,{searchTerm:t,buttonText:u,onClick:()=>o(b),itemProps:n(b,k),isSelected:k===s},b.type):Im===b.type?null:(0,Pm.jsx)(Moe,{itemProps:n(b,k),suggestion:b,index:k,onClick:()=>{o(b)},isSelected:k===s,isURL:_F.includes(b.type),searchTerm:t,shouldShowType:h,isFrontPage:b?.isFrontPage,isBlogHome:b?.isBlogHome},`${b.id}-${b.type}`))})})})}var Goe=joe,Hoe=e=>((0,zoe.default)("wp.blockEditor.__experimentalLinkControlSearchResults",{since:"6.8"}),(0,Pm.jsx)(joe,{...e}));var bI=l(rn(),1),Uoe=l(I(),1),Woe=l(M(),1);var OEe=()=>Promise.resolve([]),AEe=e=>{let t=vF,o=(0,bI.getProtocol)(e)||"";return o.includes("mailto")&&(t=yF),o.includes("tel")&&(t=kF),e?.startsWith("#")&&(t=SF),Promise.resolve([{id:e,title:e,url:t==="URL"?(0,bI.prependHTTP)(e):e,type:t}])},LEe=async(e,t,o,r,n,i)=>{let{isInitialSuggestions:s}=t,a=await o(e,t);return a.map(c=>Number(c.id)===n?(c.isFrontPage=!0,c):(Number(c.id)===i&&(c.isBlogHome=!0),c)),s||Ek(e)||!r?a:a.concat({title:e,url:e,type:Im})};function Zoe(e,t,o){let{fetchSearchSuggestions:r,pageOnFront:n,pageForPosts:i}=(0,Woe.useSelect)(a=>{let{getSettings:c}=a(S);return{pageOnFront:c().pageOnFront,pageForPosts:c().pageForPosts,fetchSearchSuggestions:c().__experimentalFetchLinkSuggestions}},[]),s=t?AEe:OEe;return(0,Uoe.useCallback)((a,{isInitialSuggestions:c})=>Ek(a)?s(a,{isInitialSuggestions:c}):LEe(a,{...e,isInitialSuggestions:c},r,o,n,i),[s,r,n,i,e,o])}var ib=l(x(),1),NEe=()=>Promise.resolve([]),wF=()=>{},Yoe=(0,kI.forwardRef)(({value:e,children:t,currentLink:o={},className:r=null,placeholder:n=null,withCreateSuggestion:i=!1,onCreateSuggestion:s=wF,onChange:a=wF,onSelect:c=wF,showSuggestions:u=!0,renderSuggestions:d=w=>(0,ib.jsx)(Goe,{...w}),fetchSuggestions:f=null,allowDirectEntry:m=!0,showInitialSuggestions:p=!1,suggestionsQuery:h={},withURLSuggestion:g=!0,createSuggestionButtonText:b,hideLabelFromVision:k=!1,suffix:v,isEntity:y=!1},_)=>{let w=Zoe(h,m,i,g),C=u?f||w:NEe,[E,R]=(0,kI.useState)(),O=(z,U)=>{a(z),R(U)},B=z=>d({...z,withCreateSuggestion:i,createSuggestionButtonText:b,suggestionsQuery:h,handleSuggestionClick:U=>{z.handleSuggestionClick&&z.handleSuggestionClick(U),T(U)}}),T=async z=>{let U=z;if(Im===z.type){try{U=await s(z.title),U?.url&&c(U)}catch{}return}if(m||U&&Object.keys(U).length>=1){let{id:j,url:G,kind:V,type:H,...K}=o??{};c({...K,...U},U)}},A=n??(0,CF.__)("Search or type URL"),N=k&&n!==""?A:(0,CF.__)("Link");return(0,ib.jsxs)("div",{className:"block-editor-link-control__search-input-container",children:[(0,ib.jsx)(cd,{disableSuggestions:o?.url===e,label:N,hideLabelFromVision:k,className:r,value:e,onChange:O,placeholder:A,__experimentalRenderSuggestions:u?B:null,__experimentalFetchLinkSuggestions:C,__experimentalHandleURLSuggestions:!0,__experimentalShowInitialSuggestions:p,onSubmit:(z,U)=>{let j=z||E;!j&&!e?.trim()?.length?U.preventDefault():T(j||{url:e})},inputRef:_,suffix:v,disabled:y}),t]})}),Koe=Yoe,Xoe=e=>((0,$oe.default)("wp.blockEditor.__experimentalLinkControlSearchInput",{since:"6.8"}),(0,ib.jsx)(Yoe,{...e}));var ud=l(L(),1),Yr=l(P(),1),tre=l(Y(),1),SI=l(rn(),1);var ore=l(je(),1),_I=l(M(),1),rre=l(On(),1),nre=l(zp(),1);var qoe=l(P(),1),{Slot:Qoe,Fill:Joe}=(0,qoe.createSlotFill)("BlockEditorLinkControlViewer");var ere=l(M(),1),vI=l(I(),1);function MEe(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 DEe(e){let[t,o]=(0,vI.useReducer)(MEe,{richData:null,isFetching:!1}),{fetchRichUrlData:r}=(0,ere.useSelect)(n=>{let{getSettings:i}=n(S);return{fetchRichUrlData:i().__experimentalFetchRichUrlData}},[]);return(0,vI.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 yI=DEe;var eo=l(x(),1);function VEe(e){return e.replace(/^[a-z\-.\+]+[0-9]*:(\/\/)?/i,"").replace(/^www\./i,"")}function ire({value:e,onEditClick:t,hasRichPreviews:o=!1,hasUnlinkControl:r=!1,onRemove:n}){let i=(0,_I.useSelect)(k=>k(nre.store).get("core","showIconLabels"),[]),s=o?e?.url:null,{richData:a,isFetching:c}=yI(s),u=a&&Object.keys(a).length,d=e&&(0,SI.filterURLForDisplay)((0,SI.safeDecodeURI)(e.url),24)||"",f=!e?.url?.length,m=!f&&(0,ore.__unstableStripHTML)(a?.title||e?.title||d),p=!e?.url||VEe(m)===d,h;a?.icon?h=(0,eo.jsx)("img",{src:a?.icon,alt:""}):f?h=(0,eo.jsx)(Ee,{icon:xA,size:32}):h=(0,eo.jsx)(Ee,{icon:Fk});let{createNotice:g}=(0,_I.useDispatch)(rre.store),b=(0,tre.useCopyToClipboard)(e.url,()=>{g("info",(0,ud.__)("Link copied to clipboard."),{isDismissible:!0,type:"snackbar"})});return(0,eo.jsx)(Yr.Flex,{role:"group","aria-label":(0,ud.__)("Manage link"),className:D("block-editor-link-control__preview",{"is-current":!0,"is-rich":u,"is-fetching":!!c,"is-preview":!0,"is-error":f,"is-url-title":m===d}),children:(0,eo.jsxs)(Yr.Flex,{gap:0,children:[(0,eo.jsxs)(Yr.Flex,{className:"block-editor-link-control__link-information",role:"figure","aria-label":(0,ud.__)("Link information"),justify:"start",children:[(0,eo.jsx)(Yr.Flex,{className:D("block-editor-link-control__preview-icon",{"is-image":a?.icon}),justify:"center",children:h}),(0,eo.jsx)(Yr.Flex,{className:"block-editor-link-control__preview-details",direction:"column",gap:1,children:f?(0,eo.jsx)("span",{className:"block-editor-link-control__preview-error-notice",children:(0,ud.__)("Link is empty")}):(0,eo.jsxs)(eo.Fragment,{children:[(0,eo.jsx)(Yr.ExternalLink,{className:"block-editor-link-control__preview-title",href:e.url,children:(0,eo.jsx)(Yr.__experimentalTruncate,{numberOfLines:1,children:m})}),!p&&(0,eo.jsx)("span",{className:"block-editor-link-control__preview-info",children:(0,eo.jsx)(Yr.__experimentalTruncate,{numberOfLines:1,children:d})})]})})]}),(0,eo.jsx)(Yr.Button,{icon:Kk,label:(0,ud.__)("Edit link"),onClick:t,size:"compact",showTooltip:!i}),r&&(0,eo.jsx)(Yr.Button,{icon:fi,label:(0,ud.__)("Remove link"),onClick:n,size:"compact",showTooltip:!i}),(0,eo.jsx)(Yr.Button,{icon:EO,label:(0,ud.__)("Copy link"),ref:b,accessibleWhenDisabled:!0,disabled:f,size:"compact",showTooltip:!i}),(0,eo.jsx)(Qoe,{fillProps:e})]})})}var sre=l(L(),1),xI=l(P(),1),sb=l(x(),1),FEe=()=>{},zEe=({value:e,onChange:t=FEe,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,sb.jsx)("div",{className:"block-editor-link-control__setting",children:s},i.id)}return null}return(0,sb.jsx)(xI.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,sb.jsxs)("fieldset",{className:"block-editor-link-control__settings",children:[(0,sb.jsx)(xI.VisuallyHidden,{as:"legend",children:(0,sre.__)("Currently selected link settings")}),n]})},are=zEe;var lre=l(L(),1),Rm=l(I(),1);function cre(e){let t=(0,Rm.useRef)(),[o,r]=(0,Rm.useState)(!1),[n,i]=(0,Rm.useState)(null),s=async function(a){r(!0),i(null);try{return t.current=jEe(Promise.resolve(e(a))),await t.current.promise}catch(c){if(c&&c.isCanceled)return;throw i(c.message||(0,lre.__)("An unknown error occurred during creation. Please try again.")),c}finally{r(!1)}};return(0,Rm.useEffect)(()=>()=>{t.current&&t.current.cancel()},[]),{createPage:s,isCreatingPage:o,errorMessage:n}}var jEe=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 BF=l(I(),1),fre=l(dre(),1);function mre(e){let[t,o]=(0,BF.useState)(e||{}),[r,n]=(0,BF.useState)(e);return(0,fre.default)(e,r)||(n(e),o(e)),[t,o,c=>{o({...t,url:c})},c=>{o({...t,title:c})},c=>u=>{let d=Object.keys(u).reduce((f,m)=>(c.includes(m)&&(f[m]=u[m]),f),{});o({...t,...d})}]}var Ct=l(x(),1),TF=()=>{},pre="core/block-editor",hre="linkControlSettingsDrawer";function Om({searchInputPlaceholder:e,value:t,settings:o=xF,onChange:r=TF,onRemove:n,onCancel:i,noDirectEntry:s=!1,showSuggestions:a=!0,showInitialSuggestions:c,forceIsEditingLink:u,createSuggestion:d,withCreateSuggestion:f,inputValue:m="",suggestionsQuery:p={},noURLSuggestion:h=!1,createSuggestionButtonText:g,hasRichPreviews:b=!1,hasTextControl:k=!1,renderControlBottom:v=null,handleEntities:y=!1}){f===void 0&&d&&(f=!0);let[_,w]=(0,cr.useState)(!1),{advancedSettingsPreference:C}=(0,wI.useSelect)(He=>({advancedSettingsPreference:He(EF.store).get(pre,hre)??!1}),[]),{set:E}=(0,wI.useDispatch)(EF.store),R=He=>{E&&E(pre,hre,He),w(He)},O=C||_,B=(0,cr.useRef)(!0),T=(0,cr.useRef)(),A=(0,cr.useRef)(),N=(0,cr.useRef)(),z=(0,cr.useRef)(),U=o.map(({id:He})=>He),[j,G,V,H,K]=mre(t),oe=y&&!!j?.id,ee=(0,gre.useInstanceId)(Om,"link-control"),J=oe?`${ee}__help`:null,ie=t&&!(0,vre.isShallowEqualObjects)(j,t),[de,q]=(0,cr.useState)(u!==void 0?u:!t||!t.url),{createPage:ne,isCreatingPage:X,errorMessage:W}=cre(d);(0,cr.useEffect)(()=>{u!==void 0&&q(u)},[u]),(0,cr.useEffect)(()=>{if(B.current)return;(bre.focus.focusable.find(T.current)[0]||T.current).focus()},[de,X]),(0,cr.useEffect)(()=>(B.current=!1,()=>{B.current=!0}),[]);let Q=t?.url?.trim()?.length>0,se=()=>{q(!1)},ce=He=>{He?.kind==="taxonomy"&&He?.url&&(z.current=He.url);let ao=Object.keys(He).reduce((Tn,me)=>(U.includes(me)||(Tn[me]=He[me]),Tn),{});r({...j,...ao,title:j?.title||He?.title}),se()},_e=()=>{ie&&r({...t,...j,url:Ge}),se()},ge=He=>{let{keyCode:ao}=He;ao===kre.ENTER&&!So&&(He.preventDefault(),_e())},Ae=()=>{G(t)},Xe=He=>{He.preventDefault(),He.stopPropagation(),Ae(),Q?se():n?.(),i?.()},[dt,St]=(0,cr.useState)(!1),yo=()=>{let{id:He,kind:ao,type:Tn,...me}=j;G({...me,id:void 0,kind:void 0,type:void 0,url:void 0}),St(!0)};(0,cr.useEffect)(()=>{dt&&(N.current?.focus(),St(!1))},[dt]);let Ge=m||j?.url||"",So=!Ge?.trim()?.length,so=n&&t&&!de&&!X,Fe=de&&Q,Xt=Q&&k,ft=(de||!t)&&!X,qt=!ie||So,ai=!!o?.length&&de&&Q,hr=(0,cr.useMemo)(()=>t?.kind==="taxonomy"&&!t?.url&&z.current?{...t,url:z.current}:t,[t]);return(0,Ct.jsxs)("div",{tabIndex:-1,ref:T,className:"block-editor-link-control",children:[X&&(0,Ct.jsxs)("div",{className:"block-editor-link-control__loading",children:[(0,Ct.jsx)(Kr.Spinner,{})," ",(0,Pa.__)("Creating"),"\u2026"]}),ft&&(0,Ct.jsxs)(Ct.Fragment,{children:[(0,Ct.jsxs)("div",{className:D({"block-editor-link-control__search-input-wrapper":!0,"has-text-control":Xt,"has-actions":Fe}),children:[Xt&&(0,Ct.jsx)(Kr.TextControl,{ref:A,className:"block-editor-link-control__field block-editor-link-control__text-content",label:(0,Pa.__)("Text"),value:j?.title,onChange:H,onKeyDown:ge,__next40pxDefaultSize:!0}),(0,Ct.jsx)(Koe,{ref:N,currentLink:t,className:"block-editor-link-control__field block-editor-link-control__search-input",placeholder:e,value:Ge,withCreateSuggestion:f,onCreateSuggestion:ne,onChange:V,onSelect:ce,showInitialSuggestions:c,allowDirectEntry:!s,showSuggestions:a,suggestionsQuery:p,withURLSuggestion:!h,createSuggestionButtonText:g,hideLabelFromVision:!Xt,isEntity:oe,suffix:(0,Ct.jsx)(GEe,{isEntity:oe,showActions:Fe,isDisabled:qt,onUnlink:yo,onSubmit:_e,helpTextId:J})}),oe&&J&&(0,Ct.jsx)("p",{id:J,className:"block-editor-link-control__help",children:(0,Pa.sprintf)((0,Pa.__)("Synced with the selected %s."),j?.type||"item")})]}),W&&(0,Ct.jsx)(Kr.Notice,{className:"block-editor-link-control__search-error",status:"error",isDismissible:!1,children:W})]}),t&&!de&&!X&&(0,Ct.jsx)(ire,{value:hr,onEditClick:()=>q(!0),hasRichPreviews:b,hasUnlinkControl:so,onRemove:()=>{n(),q(!0)}},hr?.url),ai&&(0,Ct.jsx)("div",{className:"block-editor-link-control__tools",children:!So&&(0,Ct.jsx)(Toe,{settingsOpen:O,setSettingsOpen:R,children:(0,Ct.jsx)(are,{value:j,settings:o,onChange:K(U)})})}),Fe&&(0,Ct.jsxs)(Kr.__experimentalHStack,{justify:"right",className:"block-editor-link-control__search-actions",children:[(0,Ct.jsx)(Kr.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:Xe,children:(0,Pa.__)("Cancel")}),(0,Ct.jsx)(Kr.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:qt?TF:_e,className:"block-editor-link-control__search-submit","aria-disabled":qt,children:(0,Pa.__)("Apply")})]}),!X&&v&&v()]})}function GEe({isEntity:e,showActions:t,isDisabled:o,onUnlink:r,onSubmit:n,helpTextId:i}){if(e)return(0,Ct.jsx)(Kr.Button,{icon:fi,onClick:r,"aria-describedby":i,showTooltip:!0,label:(0,Pa.__)("Unsync and edit"),__next40pxDefaultSize:!0});if(!t)return(0,Ct.jsx)(Kr.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,Ct.jsx)(Kr.Button,{onClick:o?TF:n,label:(0,Pa.__)("Submit"),icon:ll,className:"block-editor-link-control__search-submit","aria-disabled":o,size:"small"})})}Om.ViewerFill=Joe;Om.DEFAULT_LINK_SETTINGS=xF;var CI=e=>((0,yre.default)("wp.blockEditor.__experimentalLinkControl",{since:"6.8",alternative:"wp.blockEditor.LinkControl"}),(0,Ct.jsx)(Om,{...e}));CI.ViewerFill=Om.ViewerFill;CI.DEFAULT_LINK_SETTINGS=Om.DEFAULT_LINK_SETTINGS;var dd=Om;var _re=l(L(),1),xre=l(P(),1),wre=l(Re(),1);var LS=1.5,IF=.01,PF=10,RF="";function Sre(e){return e!==void 0&&e!==RF}var OF=l(x(),1),HEe=({__next40pxDefaultSize:e=!1,value:t,onChange:o,__unstableInputWidth:r="60px",...n})=>{let i=Sre(t),s=(d,f)=>{if(i)return d;let m=IF*PF;switch(`${d}`){case`${m}`:return LS+m;case"0":return f?d:LS-m;case"":return LS;default:return d}},a=(d,f)=>{let m=["insertText","insertFromPaste"].includes(f.payload.event.nativeEvent?.inputType),p=s(d.value,m);return{...d,value:p}},c=i?t:RF,u=(d,{event:f})=>{if(d===""){o();return}if(f.type==="click"){o(s(`${d}`,!1));return}o(`${d}`)};return!e&&(n.size===void 0||n.size==="default")&&(0,wre.default)("36px default size for wp.blockEditor.LineHeightControl",{since:"6.8",version:"7.1",hint:"Set the `__next40pxDefaultSize` prop to true to start opting into the new default size, which will become the default in a future version."}),(0,OF.jsx)("div",{className:"block-editor-line-height-control",children:(0,OF.jsx)(xre.__experimentalNumberControl,{...n,__shouldNotWarnDeprecated36pxSize:!0,__next40pxDefaultSize:e,__unstableInputWidth:r,__unstableStateReducer:a,onChange:u,label:(0,_re.__)("Line height"),placeholder:LS,step:IF,spinFactor:PF,value:c,min:0,spinControls:"custom"})})},BI=HEe;var Ra=l(L(),1),Cre=l(jo(),1),Xr=l(P(),1),TI=l(M(),1),Bre=l(at(),1);var Ere=l(Y(),1),Tre=l(je(),1),Ire=l(On(),1),Pre=l(I(),1);function EI(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 Ko=l(x(),1),UEe=()=>{},WEe=0,ZEe=({mediaURL:e,mediaId:t,mediaIds:o,allowedTypes:r,accept:n,onError:i,onSelect:s,onSelectURL:a,onReset:c,onToggleFeaturedImage:u,useFeaturedImage:d,onFilesUpload:f=UEe,name:m=(0,Ra.__)("Replace"),createNotice:p,removeNotice:h,children:g,multiple:b=!1,addToGallery:k,handleUpload:v=!0,variant:y,popoverProps:_,renderToggle:w,className:C})=>{let{mediaUpload:E,allowedMimeTypes:R}=(0,TI.useSelect)(V=>{let{getSettings:H}=V(S),K=H();return{mediaUpload:K.mediaUpload,allowedMimeTypes:K.allowedMimeTypes}},[]),O=`block-editor/media-replace-flow/error-notice/${++WEe}`,B=(0,Pre.useMemo)(()=>EI(r,R,n),[r,R,n]),T=V=>{let H=(0,Tre.__unstableStripHTML)(V);if(i){i(H);return}setTimeout(()=>{p("error",H,{speak:!0,id:O,isDismissible:!0})},1e3)},A=(V,H)=>{d&&u&&u(),H(),s(V),(0,Cre.speak)((0,Ra.__)("The media file has been replaced")),h(O)},N=(V,H)=>{let K=V.target.files;if(!v)return H(),s(K);f(K),E({allowedTypes:r,filesList:K,onFileChange:([oe])=>{A(oe,H)},onError:T})},z=V=>{V.keyCode===Bre.DOWN&&(V.preventDefault(),V.target.click())},j=b&&(!r||r.length===0?!1:r.every(V=>V==="image"||V.startsWith("image/"))),G={..._,variant:y};return(0,Ko.jsx)(Xr.Dropdown,{popoverProps:G,className:C,contentClassName:D("block-editor-media-replace-flow__options",y&&`is-variant-${y}`),renderToggle:({isOpen:V,onToggle:H})=>w?w({"aria-expanded":V,"aria-haspopup":"true",onClick:H,onKeyDown:z,children:m}):(0,Ko.jsx)(Xr.ToolbarButton,{"aria-expanded":V,"aria-haspopup":"true",onClick:H,onKeyDown:z,children:m}),renderContent:({onClose:V})=>(0,Ko.jsxs)(Ko.Fragment,{children:[(0,Ko.jsxs)(Xr.NavigableMenu,{className:"block-editor-media-replace-flow__media-upload-menu",children:[(0,Ko.jsxs)(bs,{children:[(0,Ko.jsx)(Iu,{gallery:j,addToGallery:k,multiple:b,value:b?o:t,onSelect:H=>A(H,V),allowedTypes:r,render:({open:H})=>(0,Ko.jsx)(Xr.MenuItem,{icon:Rp,onClick:H,children:(0,Ra.__)("Open Media Library")})}),(0,Ko.jsx)(Xr.FormFileUpload,{onChange:H=>{N(H,V)},accept:B,multiple:!!b,render:({openFileDialog:H})=>(0,Ko.jsx)(Xr.MenuItem,{icon:oN,onClick:()=>{H()},children:(0,Ra._x)("Upload","verb")})})]}),u&&(0,Ko.jsx)(Xr.MenuItem,{icon:dL,onClick:u,isPressed:d,children:(0,Ra.__)("Use featured image")}),e&&c&&(0,Ko.jsx)(Xr.MenuItem,{onClick:()=>{c(),V()},children:(0,Ra.__)("Reset")}),typeof g=="function"?g({onClose:V}):g]}),a&&(0,Ko.jsxs)("form",{className:"block-editor-media-flow__url-input",children:[(0,Ko.jsx)("span",{className:"block-editor-media-replace-flow__image-url-label",children:(0,Ra.__)("Current media URL:")}),(0,Ko.jsx)(dd,{value:{url:e},settings:[],showSuggestions:!1,onChange:({url:H})=>{a(H)},searchInputPlaceholder:(0,Ra.__)("Paste or type URL")})]})]})})},ab=(0,Ere.compose)([(0,TI.withDispatch)(e=>{let{createNotice:t,removeNotice:o}=e(Ire.store);return{createNotice:t,removeNotice:o}}),(0,Xr.withFilters)("editor.MediaReplaceFlow")])(ZEe);var bo=l(P(),1),go=l(L(),1),hd=l(I(),1),Ure=l(M(),1);var Wre=l(Re(),1);var LF=l(L(),1),PI=l(I(),1),lb=l(P(),1);var Hre=l(Re(),1);var Are=l(L(),1),Lre=l(P(),1);var Rre=l(P(),1),II=l(rn(),1),AF=l(x(),1);function Ore({url:e,urlLabel:t,className:o}){let r=D(o,"block-editor-url-popover__link-viewer-url");return e?(0,AF.jsx)(Rre.ExternalLink,{className:r,href:e,children:t||(0,II.filterURLForDisplay)((0,II.safeDecodeURI)(e))}):(0,AF.jsx)("span",{className:r})}var NS=l(x(),1);function Nre({className:e,linkClassName:t,onEditLinkClick:o,url:r,urlLabel:n,...i}){return(0,NS.jsxs)("div",{className:D("block-editor-url-popover__link-viewer",e),...i,children:[(0,NS.jsx)(Ore,{url:r,urlLabel:n,className:t}),o&&(0,NS.jsx)(Lre.Button,{icon:Kk,label:(0,Are.__)("Edit"),onClick:o,size:"compact"})]})}var zre=l(L(),1),jre=l(P(),1);var cc=l(L(),1),MS=l(I(),1),As=l(at(),1),ji=l(P(),1),fd=l(Y(),1),Mre=l(M(),1),Dre=l(rn(),1);var Oa=l(x(),1),Vre=l(Fr(),1);function Fre(e){return typeof e=="function"}var $Ee=class extends MS.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,MS.createRef)(),this.inputRef=e.inputRef||(0,MS.createRef)(),this.updateSuggestions=(0,fd.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,Dre.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,cc.sprintf)((0,cc._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,cc.__)("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 As.UP:{e.target.selectionStart!==0&&(e.preventDefault(),e.target.setSelectionRange(0,0));break}case As.DOWN:{this.props.value.length!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(this.props.value.length,this.props.value.length));break}case As.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 As.UP:{e.preventDefault();let s=o?o-1:r.length-1;this.setState({selectedSuggestion:s});break}case As.DOWN:{e.preventDefault();let s=o===null||o===r.length-1?0:o+1;this.setState({selectedSuggestion:s});break}case As.TAB:{this.state.selectedSuggestion!==null&&(this.selectLink(i),this.props.speak((0,cc.__)("Link selected.")));break}case As.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,Oa.jsxs)(Oa.Fragment,{children:[this.renderControl(),this.renderSuggestions()]})}renderControl(){let{label:e=null,className:t,isFullWidth:o,instanceId:r,placeholder:n=(0,cc.__)("Paste URL or type to search"),__experimentalRenderControl:i,value:s="",hideLabelFromVision:a=!1,help:c=null,disabled:u=!1}=this.props,{loading:d,showSuggestions:f,selectedSuggestion:m,suggestionsListboxId:p,suggestionOptionIdPrefix:h}=this.state,g=`url-input-control-${r}`,b={id:g,label:e,className:D("block-editor-url-input",t,{"is-full-width":o}),hideLabelFromVision:a},k={id:g,value:s,required:!0,type:"text",name:g,autoComplete:"off",onChange:u?()=>{}:this.onChange,onFocus:u?()=>{}:this.onFocus,placeholder:n,onKeyDown:u?()=>{}:this.onKeyDown,role:"combobox","aria-label":e?void 0:(0,cc.__)("URL"),"aria-expanded":f,"aria-autocomplete":"list","aria-owns":p,"aria-activedescendant":m!==null?`${h}-${m}`:void 0,ref:this.inputRef,disabled:u,suffix:this.props.suffix,help:c};return i?i(b,k,d):(0,Oa.jsxs)(ji.BaseControl,{...b,children:[(0,Oa.jsx)(ji.__experimentalInputControl,{...k,__next40pxDefaultSize:!0}),d&&(0,Oa.jsx)(ji.Spinner,{})]})}renderSuggestions(){let{className:e,__experimentalRenderSuggestions:t}=this.props,{showSuggestions:o,suggestions:r,suggestionsValue:n,selectedSuggestion:i,suggestionsListboxId:s,suggestionOptionIdPrefix:a,loading:c}=this.state;if(!o||r.length===0)return null;let u={id:s,ref:this.autocompleteRef,role:"listbox"},d=(f,m)=>({role:"option",tabIndex:"-1",id:`${a}-${m}`,ref:this.bindSuggestionNode(m),"aria-selected":m===i?!0:void 0});return Fre(t)?t({suggestions:r,selectedSuggestion:i,suggestionsListProps:u,buildSuggestionItemProps:d,isLoading:c,handleSuggestionClick:this.handleOnClick,isInitialSuggestions:!n?.length,currentInputValue:n}):(0,Oa.jsx)(ji.Popover,{placement:"bottom",focusOnMount:!1,children:(0,Oa.jsx)("div",{...u,className:D("block-editor-url-input__suggestions",{[`${e}__suggestions`]:e}),children:r.map((f,m)=>(0,Vre.createElement)(ji.Button,{__next40pxDefaultSize:!0,...d(f,m),key:f.id,className:D("block-editor-url-input__suggestion",{"is-selected":m===i}),onClick:()=>this.handleOnClick(f)},f.title))})})}},cd=(0,fd.compose)(fd.withSafeTimeout,ji.withSpokenMessages,fd.withInstanceId,(0,Mre.withSelect)((e,t)=>{if(Fre(t.__experimentalFetchLinkSuggestions))return;let{getSettings:o}=e(S);return{__experimentalFetchLinkSuggestions:o().__experimentalFetchLinkSuggestions}}))($Ee);var DS=l(x(),1);function Gre({autocompleteRef:e,className:t,onChangeInputValue:o,value:r,...n}){return(0,DS.jsxs)("form",{className:D("block-editor-url-popover__link-editor",t),...n,children:[(0,DS.jsx)(cd,{value:r,onChange:o,autocompleteRef:e}),(0,DS.jsx)(jre.Button,{icon:ll,label:(0,zre.__)("Apply"),type:"submit",size:"compact"})]})}var md=l(x(),1),{__experimentalPopoverLegacyPositionToPlacement:YEe}=F(lb.privateApis),KEe="bottom",NF=(0,PI.forwardRef)(({additionalControls:e,children:t,renderSettings:o,placement:r,focusOnMount:n="firstElement",position:i,...s},a)=>{i!==void 0&&(0,Hre.default)("`position` prop in wp.blockEditor.URLPopover",{since:"6.2",alternative:"`placement` prop"});let c;r!==void 0?c=r:i!==void 0&&(c=YEe(i)),c=c||KEe;let[u,d]=(0,PI.useState)(!1),f=!!o&&u,m=()=>{d(!u)};return(0,md.jsxs)(lb.Popover,{ref:a,role:"dialog","aria-modal":"true","aria-label":(0,LF.__)("Edit URL"),className:"block-editor-url-popover",focusOnMount:n,placement:c,shift:!0,variant:"toolbar",...s,children:[(0,md.jsx)("div",{className:"block-editor-url-popover__input-container",children:(0,md.jsxs)("div",{className:"block-editor-url-popover__row",children:[t,!!o&&(0,md.jsx)(lb.Button,{className:"block-editor-url-popover__settings-toggle",icon:In,label:(0,LF.__)("Link settings"),onClick:m,"aria-expanded":u,size:"compact"})]})}),f&&(0,md.jsx)("div",{className:"block-editor-url-popover__settings",children:o()}),e&&!f&&(0,md.jsx)("div",{className:"block-editor-url-popover__additional-controls",children:e})]})});NF.LinkEditor=Gre;NF.LinkViewer=Nre;var pd=NF;var We=l(x(),1),XEe=()=>{},qEe=({src:e,onChange:t,onSubmit:o,onClose:r,popoverAnchor:n})=>(0,We.jsx)(pd,{anchor:n,onClose:r,children:(0,We.jsx)("form",{className:"block-editor-media-placeholder__url-input-form",onSubmit:o,children:(0,We.jsx)(bo.__experimentalInputControl,{__next40pxDefaultSize:!0,label:(0,go.__)("URL"),type:"text",hideLabelFromVision:!0,placeholder:(0,go.__)("Paste or type URL"),onChange:t,value:e,suffix:(0,We.jsx)(bo.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,We.jsx)(bo.Button,{size:"small",icon:ll,label:(0,go.__)("Apply"),type:"submit"})})})})}),QEe=({src:e,onChangeSrc:t,onSelectURL:o})=>{let[r,n]=(0,hd.useState)(null),[i,s]=(0,hd.useState)(!1),a=()=>{s(!0)},c=()=>{s(!1),r?.focus()},u=d=>{d.preventDefault(),e&&o&&(o(e),c())};return(0,We.jsxs)("div",{className:"block-editor-media-placeholder__url-input-container",children:[(0,We.jsx)(bo.Button,{__next40pxDefaultSize:!0,className:"block-editor-media-placeholder__button",onClick:a,isPressed:i,variant:"secondary","aria-haspopup":"dialog",ref:n,children:(0,go.__)("Insert from URL")}),i&&(0,We.jsx)(qEe,{src:e,onChange:t,onSubmit:u,onClose:c,popoverAnchor:r})]})};function JEe({value:e={},allowedTypes:t,className:o,icon:r,labels:n={},mediaPreview:i,notices:s,isAppender:a,accept:c,addToGallery:u,multiple:d=!1,handleUpload:f=!0,disableDropZone:m,disableMediaButtons:p,onError:h,onSelect:g,onCancel:b,onSelectURL:k,onToggleFeaturedImage:v,onDoubleClick:y,onFilesPreUpload:_=XEe,onHTMLDrop:w,children:C,mediaLibraryButton:E,placeholder:R,style:O}){w&&(0,Wre.default)("wp.blockEditor.MediaPlaceholder onHTMLDrop prop",{since:"6.2",version:"6.4"});let{mediaUpload:B,allowedMimeTypes:T}=(0,Ure.useSelect)(q=>{let{getSettings:ne}=q(S),X=ne();return{mediaUpload:X.mediaUpload,allowedMimeTypes:X.allowedMimeTypes}},[]),[A,N]=(0,hd.useState)("");(0,hd.useEffect)(()=>{N(e?.src??"")},[e?.src]);let z=(0,hd.useMemo)(()=>EI(t,T,c),[t,T,c]),U=()=>!t||t.length===0?!1:t.every(q=>q==="image"||q.startsWith("image/")),j=q=>{if(!f||typeof f=="function"&&!f(q))return g(q);_(q);let ne;if(d)if(u){let X=[];ne=W=>{let Q=(e??[]).filter(se=>se.id?!X.some(({id:ce})=>Number(ce)===Number(se.id)):!X.some(({urlSlug:ce})=>se.url.includes(ce)));g(Q.concat(W)),X=W.map(se=>{let ce=se.url.lastIndexOf("."),_e=se.url.slice(0,ce);return{id:se.id,urlSlug:_e}})}}else ne=g;else ne=([X])=>g(X);B({allowedTypes:t,filesList:q,onFileChange:ne,onError:h,multiple:d})};async function G(q){let{blocks:ne}=_5(q);if(!ne?.length)return;let X=await Promise.all(ne.map(W=>{let Q=W.name.split("/")[1];return W.attributes.id?(W.attributes.type=Q,W.attributes):new Promise((se,ce)=>{window.fetch(W.attributes.url).then(_e=>_e.blob()).then(_e=>B({filesList:[_e],additionalData:{title:W.attributes.title,alt_text:W.attributes.alt,caption:W.attributes.caption,type:Q},onFileChange:([ge])=>{ge.id&&se(ge)},allowedTypes:t,onError:ce})).catch(()=>se(W.attributes.url))})})).catch(W=>h(W));X?.length&&g(d?X:X[0])}let V=q=>{j(q.target.files)},K=R??(q=>{let{instructions:ne,title:X}=n;if(!B&&!k&&(ne=(0,go.__)("To edit this block, you need permission to upload media.")),ne===void 0||X===void 0){let Q=t??[],[se]=Q,ce=Q.length===1,_e=ce&&se==="audio",ge=ce&&se==="image",Ae=ce&&se==="video";ne===void 0&&B&&(ne=(0,go.__)("Drag and drop an image or video, upload, or choose from your library."),_e?ne=(0,go.__)("Drag and drop an audio file, upload, or choose from your library."):ge?ne=(0,go.__)("Drag and drop an image, upload, or choose from your library."):Ae&&(ne=(0,go.__)("Drag and drop a video, upload, or choose from your library."))),X===void 0&&(X=(0,go.__)("Media"),_e?X=(0,go.__)("Audio"):ge?X=(0,go.__)("Image"):Ae&&(X=(0,go.__)("Video")))}let W=D("block-editor-media-placeholder",o,{"is-appender":a});return(0,We.jsxs)(bo.Placeholder,{icon:r,label:X,instructions:ne,className:W,notices:s,onDoubleClick:y,preview:i,style:O,children:[q,C]})}),oe=()=>m?null:(0,We.jsx)(bo.DropZone,{onFilesDrop:j,onDrop:G,isEligible:q=>{let ne="wp-block:core/",X=[];for(let W of q.types)W.startsWith(ne)&&X.push(W.slice(ne.length));return X.every(W=>t.includes(W))&&(d?!0:X.length===1)}}),ee=()=>b&&(0,We.jsx)(bo.Button,{__next40pxDefaultSize:!0,className:"block-editor-media-placeholder__cancel-button",title:(0,go.__)("Cancel"),variant:"link",onClick:b,children:(0,go.__)("Cancel")}),J=()=>k&&(0,We.jsx)(QEe,{src:A,onChangeSrc:N,onSelectURL:k}),ie=()=>v&&(0,We.jsx)("div",{className:"block-editor-media-placeholder__url-input-container",children:(0,We.jsx)(bo.Button,{__next40pxDefaultSize:!0,className:"block-editor-media-placeholder__button",onClick:v,variant:"secondary",children:(0,go.__)("Use featured image")})}),de=()=>{let ne=E??(({open:W})=>(0,We.jsx)(bo.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>{W()},children:(0,go.__)("Media Library")})),X=(0,We.jsx)(Iu,{addToGallery:u,gallery:d&&U(),multiple:d,onSelect:g,allowedTypes:t,mode:"browse",value:Array.isArray(e)?e.map(({id:W})=>W):e.id,render:ne});if(B&&a)return(0,We.jsxs)(We.Fragment,{children:[oe(),(0,We.jsx)(bo.FormFileUpload,{onChange:V,accept:z,multiple:!!d,render:({openFileDialog:W})=>{let Q=(0,We.jsxs)(We.Fragment,{children:[(0,We.jsx)(bo.Button,{__next40pxDefaultSize:!0,variant:"primary",className:D("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onClick:W,children:(0,go._x)("Upload","verb")}),X,J(),ie(),ee()]});return K(Q)}})]});if(B){let W=(0,We.jsxs)(We.Fragment,{children:[oe(),(0,We.jsx)(bo.FormFileUpload,{render:({openFileDialog:Q})=>(0,We.jsx)(bo.Button,{__next40pxDefaultSize:!0,onClick:Q,variant:"primary",className:D("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),children:(0,go._x)("Upload","verb")}),onChange:V,accept:z,multiple:!!d}),X,J(),ie(),ee()]});return K(W)}return K(X)};return p?(0,We.jsx)(bs,{children:oe()}):(0,We.jsx)(bs,{fallback:K(J()),children:de()})}var Zre=(0,bo.withFilters)("editor.MediaPlaceholder")(JEe);var $re=l(x(),1),eTe=({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,$re.jsx)(JT,{settings:o,gradients:[],disableCustomGradients:!0,...t})},Yre=eTe;var Zne=l(iM(),1);var $ne=l(I(),1);var Hne=l(I(),1);var Vne=l(ef(),1),_r=l(I(),1),bd=l(M(),1),ZI=l(Y(),1),$I=l(zo(),1),Fne=l(P(),1),zne=l(Z(),1),jne=l(Re(),1),kb=l(L(),1);var Kre=l(L(),1),RI=l(P(),1);var MF=l(L(),1),Am=l(P(),1);var uc=l(x(),1),tTe={placement:"bottom-start"},oTe=()=>(0,uc.jsxs)(uc.Fragment,{children:[["bold","italic","link","unknown"].map(e=>(0,uc.jsx)(Am.Slot,{name:`RichText.ToolbarControls.${e}`},e)),(0,uc.jsx)(Am.Slot,{name:"RichText.ToolbarControls",children:e=>{if(!e.length)return null;let o=e.map(([{props:r}])=>r).some(({isActive:r})=>r);return(0,uc.jsx)(Am.ToolbarItem,{children:r=>(0,uc.jsx)(Am.DropdownMenu,{icon:In,label:(0,MF.__)("More"),toggleProps:{...r,className:D(r.className,{"is-pressed":o}),description:(0,MF.__)("Displays more block tools")},controls:qs(e.map(([{props:n}])=>n),"title"),popoverProps:tTe})})}})]}),DF=oTe;var gd=l(x(),1);function rTe({popoverAnchor:e}){return(0,gd.jsx)(RI.Popover,{placement:"top",focusOnMount:!1,anchor:e,className:"block-editor-rich-text__inline-format-toolbar",__unstableSlotName:"block-toolbar",children:(0,gd.jsx)(pg,{className:"block-editor-rich-text__inline-format-toolbar-group","aria-label":(0,Kre.__)("Format tools"),children:(0,gd.jsx)(RI.ToolbarGroup,{children:(0,gd.jsx)(DF,{})})})})}var nTe=({inline:e,editableContentElement:t})=>e?(0,gd.jsx)(rTe,{popoverAnchor:t}):(0,gd.jsx)(pt,{group:"inline",children:(0,gd.jsx)(DF,{})}),Xre=nTe;var OI=l(I(),1),qre=l(M(),1);function Qre({html:e,value:t}){let o=(0,OI.useRef)(),r=!!t.activeFormats?.length,{__unstableMarkLastChangeAsPersistent:n}=(0,qre.useDispatch)(S);(0,OI.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 ene=l(I(),1),VS=l(M(),1),tne=l(zo(),1);function iTe(e){return e(tne.store).getFormatTypes()}var sTe=new Set(["a","audio","button","details","embed","iframe","input","label","select","textarea","video"]);function aTe(e,t){return typeof e!="object"?{[t]:e}:Object.fromEntries(Object.entries(e).map(([o,r])=>[`${t}.${o}`,r]))}function Jre(e,t){return e[t]?e[t]:Object.keys(e).filter(o=>o.startsWith(t+".")).reduce((o,r)=>(o[r.slice(t.length+1)]=e[r],o),{})}function AI({clientId:e,identifier:t,allowedFormats:o,withoutInteractiveFormatting:r,disableNoneEssentialFormatting:n=!1}){let i=(0,VS.useSelect)(iTe,[]),s=(0,ene.useMemo)(()=>i.filter(({name:p,interactive:h,tagName:g,[r0]:b})=>!(o&&!o.includes(p)||n&&!b||r&&(h||sTe.has(g)))),[i,o,n,r]),a=(0,VS.useSelect)(p=>s.reduce((h,g)=>g.__experimentalGetPropsForEditableTreePreparation?{...h,...aTe(g.__experimentalGetPropsForEditableTreePreparation(p,{richTextIdentifier:t,blockClientId:e}),g.name)}:h,{}),[s,e,t]),c=(0,VS.useDispatch)(),u=[],d=[],f=[],m=[];for(let p in a)m.push(a[p]);return s.forEach(p=>{if(p.__experimentalCreatePrepareEditableTree){let h=p.__experimentalCreatePrepareEditableTree(Jre(a,p.name),{richTextIdentifier:t,blockClientId:e});p.__experimentalCreateOnChangeEditableValue?d.push(h):u.push(h)}if(p.__experimentalCreateOnChangeEditableValue){let h={};p.__experimentalGetPropsForEditableTreeChangeHandler&&(h=p.__experimentalGetPropsForEditableTreeChangeHandler(c,{richTextIdentifier:t,blockClientId:e}));let g=Jre(a,p.name);f.push(p.__experimentalCreateOnChangeEditableValue({...typeof g=="object"?g:{},...h},{richTextIdentifier:t,blockClientId:e}))}}),{formatTypes:s,prepareHandlers:u,valueHandlers:d,changeHandlers:f,dependencies:m}}var db=l(I(),1),yne=l(Y(),1);var FS=l(zo(),1),one=l(Je(),1);var lTe=["`",'"',"'","\u201C\u201D","\u2018\u2019"],rne=e=>t=>{function o(r){let{inputType:n,data:i}=r,{value:s,onChange:a,registry:c}=e.current;if(n!=="insertText"||(0,FS.isCollapsed)(s))return;let u=(0,one.applyFilters)("blockEditor.wrapSelectionSettings",lTe).find(([w,C])=>w===i||C===i);if(!u)return;let[d,f=d]=u,m=s.start,p=s.end+d.length,h=(0,FS.insert)(s,d,m,m);h=(0,FS.insert)(h,f,p,p);let{__unstableMarkLastChangeAsPersistent:g,__unstableMarkAutomaticChange:b}=c.dispatch(S);g(),a(h),b();let k={};for(let w in r)k[w]=r[w];k.data=f;let{ownerDocument:v}=t,{defaultView:y}=v,_=new y.InputEvent("input",k);window.queueMicrotask(()=>{r.target.dispatchEvent(_)}),r.preventDefault()}return t.addEventListener("beforeinput",o),()=>{t.removeEventListener("beforeinput",o)}};var LI=l(zo(),1),cb=l(Z(),1);var nne=l(zo(),1);function ine(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,nne.insert)(e,o)}function sne(e){let t=e.length;for(;t--;){let o=kv(e[t].attributes);if(o)return e[t].attributes[o]=e[t].attributes[o].toString().replace(kl,""),[e[t].clientId,o,0,0];let r=sne(e[t].innerBlocks);if(r)return r}return[]}var ane=e=>t=>{function o(){let{getValue:n,onReplace:i,selectionChange:s,registry:a}=e.current;if(!i)return;let c=n(),{start:u,text:d}=c;if(d.slice(u-1,u)!==" ")return;let m=d.slice(0,u).trim(),p=(0,cb.getBlockTransforms)("from").filter(({type:k})=>k==="prefix"),h=(0,cb.findTransform)(p,({prefix:k})=>m===k);if(!h)return;let g=(0,LI.toHTMLString)({value:(0,LI.insert)(c,kl,0,u)}),b=h.transform(g);return s(...sne([b])),i([b]),a.dispatch(S).__unstableMarkAutomaticChange(),!0}function r(n){let{inputType:i,type:s}=n,{getValue:a,onChange:c,__unstableAllowPrefixTransformations:u,formatTypes:d,registry:f,onReplace:m}=e.current;if(i!=="insertText"&&s!=="compositionend"||u&&o())return;let p=a(),h=(0,cb.getBlockTransforms)("from").filter(y=>y.type==="input"),g=(0,cb.findTransform)(h,y=>y.regExp.test(p.text));if(g){m(g.transform()),f.dispatch(S).__unstableMarkAutomaticChange();return}let b=d.reduce((y,{__unstableInputRule:_})=>(_&&(y=_(y)),y),ine(p)),{__unstableMarkLastChangeAsPersistent:k,__unstableMarkAutomaticChange:v}=f.dispatch(S);b!==p&&(k(),c({...b,activeFormats:p.activeFormats}),v())}return t.addEventListener("input",r),t.addEventListener("compositionend",r),()=>{t.removeEventListener("input",r),t.removeEventListener("compositionend",r)}};var lne=e=>t=>{function o(r){if(r.inputType!=="insertReplacementText")return;let{registry:n}=e.current;n.dispatch(S).__unstableMarkLastChangeAsPersistent()}return t.addEventListener("beforeinput",o),()=>{t.removeEventListener("beforeinput",o)}};var NI=l(at(),1),cne=()=>e=>{function t(o){(NI.isKeyboardEvent.primary(o,"z")||NI.isKeyboardEvent.primary(o,"y")||NI.isKeyboardEvent.primaryShift(o,"z"))&&o.preventDefault()}return e.addEventListener("keydown",t),()=>{e.removeEventListener("keydown",t)}};var une=e=>t=>{let{keyboardShortcuts:o}=e.current;function r(n){for(let i of o.current)i(n)}return t.addEventListener("keydown",r),()=>{t.removeEventListener("keydown",r)}};var dne=e=>t=>{let{inputEvents:o}=e.current;function r(n){for(let i of o.current)i(n)}return t.addEventListener("input",r),()=>{t.removeEventListener("input",r)}};var MI=l(at(),1);var fne=e=>t=>{function o(r){let{keyCode:n}=r;if(r.defaultPrevented||n!==MI.BACKSPACE&&n!==MI.ESCAPE)return;let{registry:i}=e.current,{didAutomaticChange:s,getSettings:a}=i.select(S),{__experimentalUndo:c}=a();c&&s()&&(r.preventDefault(),c())}return t.addEventListener("keydown",o),()=>{t.removeEventListener("keydown",o)}};var pne=l(Z(),1),Aa=l(zo(),1),hne=l(rn(),1);var cTe=l(I(),1),uTe=l(Z(),1),dTe=l(x(),1);function mne(e,t){if(t?.length){let o=e.formats.length;for(;o--;)e.formats[o]=[...t,...e.formats[o]||[]]}}function DI(e){if(!(e!==!0&&e!=="p"&&e!=="li"))return e===!0?"p":e}function ub({allowedFormats:e,disableFormats:t}){return t?ub.EMPTY_ARRAY:e}ub.EMPTY_ARRAY=[];var gne=e=>t=>{function o(n){let{disableFormats:i,onChange:s,value:a,formatTypes:c,tagName:u,onReplace:d,__unstableEmbedURLOnPaste:f,preserveWhiteSpace:m,pastePlainText:p}=e.current;if(!t.contains(n.target)||n.defaultPrevented)return;let{plainText:h,html:g}=wh(n);if(n.preventDefault(),window.console.log(`Received HTML:

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

`,h),i){s((0,Aa.insert)(a,h));return}let b=n.clipboardData.getData("rich-text")==="true";function k(w){let C=c.reduce((E,{__unstablePasteRule:R})=>(R&&E===a&&(E=R(a,{html:g,plainText:h})),E),a);if(C!==a)s(C);else{let E=(0,Aa.create)({html:w});mne(E,a.activeFormats),s((0,Aa.insert)(a,E))}}if(b){k(g);return}if(p){s((0,Aa.insert)(a,(0,Aa.create)({text:h})));return}let v="INLINE",y=h.trim();f&&(0,Aa.isEmpty)(a)&&(0,hne.isURL)(y)&&/^https?:/.test(y)&&(v="BLOCKS");let _=(0,pne.pasteHandler)({HTML:g,plainText:h,mode:v,tagName:u,preserveWhiteSpace:m});typeof _=="string"?k(_):_.length>0&&d&&(0,Aa.isEmpty)(a)&&d(_,_.length-1,-1)}let{defaultView:r}=t.ownerDocument;return r.addEventListener("paste",o),()=>{r.removeEventListener("paste",o)}};var zS=l(at(),1),VI=l(zo(),1),bne=e=>t=>{function o(r){let{keyCode:n}=r;if(r.defaultPrevented)return;let{value:i,onMerge:s,onRemove:a}=e.current;if(n===zS.DELETE||n===zS.BACKSPACE){let{start:c,end:u,text:d}=i,f=n===zS.BACKSPACE,m=i.activeFormats&&!!i.activeFormats.length;if(!(0,VI.isCollapsed)(i)||m||f&&c!==0||!f&&u!==d.length)return;s?s(!f):a&&(0,VI.isEmpty)(i)&&f&&a(!f),r.preventDefault()}}return t.addEventListener("keydown",o),()=>{t.removeEventListener("keydown",o)}};var VF=l(at(),1),jS=l(zo(),1),kne=e=>t=>{function o(i){if(i.keyCode!==VF.ENTER)return;let{onReplace:s,onSplit:a}=e.current;s&&a&&(i.__deprecatedOnSplit=!0)}function r(i){if(i.defaultPrevented||i.target!==t||i.keyCode!==VF.ENTER)return;let{value:s,onChange:a,disableLineBreaks:c,onSplitAtEnd:u,onSplitAtDoubleLineEnd:d,registry:f}=e.current;i.preventDefault();let{text:m,start:p,end:h}=s;i.shiftKey?c||a((0,jS.insert)(s,`
`)):u&&p===h&&h===m.length?u():d&&p===h&&h===m.length&&m.slice(-2)===`

`?f.batch(()=>{let g={...s};g.start=g.end-2,a((0,jS.remove)(g)),d()}):c||a((0,jS.insert)(s,`
`))}let{defaultView:n}=t.ownerDocument;return n.addEventListener("keydown",r),t.addEventListener("keydown",o),()=>{n.removeEventListener("keydown",r),t.removeEventListener("keydown",o)}};var vne=e=>t=>{function o(){let{registry:r}=e.current;if(!r.select(S).isMultiSelecting())return;let n=t.parentElement.closest('[contenteditable="true"]');n&&n.focus()}return t.addEventListener("focus",o),()=>{t.removeEventListener("focus",o)}};var fTe=[rne,ane,lne,cne,une,dne,fne,gne,bne,kne,vne];function FI(e){let t=(0,db.useRef)(e);(0,db.useInsertionEffect)(()=>{t.current=e});let o=(0,db.useMemo)(()=>fTe.map(r=>r(t)),[t]);return(0,yne.useRefEffect)(r=>{if(!e.isSelected)return;let n=o.map(i=>i(r));return()=>{n.forEach(i=>i())}},[o,e.isSelected])}var zI=l(zo(),1),jI=l(I(),1);var Sne=l(x(),1),_ne=l(Fr(),1),mTe={},FF=Symbol("usesContext");function pTe({onChange:e,onFocus:t,value:o,forwardedRef:r,settings:n,isVisible:i}){let{name:s,edit:a,[FF]:c}=n,u=(0,jI.useContext)(di),d=(0,jI.useMemo)(()=>c?Object.fromEntries(Object.entries(u).filter(([g])=>c.includes(g))):mTe,[c,u]);if(!a)return null;let f=(0,zI.getActiveFormat)(o,s),m=f!==void 0,p=(0,zI.getActiveObject)(o),h=p!==void 0&&p.type===s;return(0,Sne.jsx)(a,{isActive:m,isVisible:i,activeAttributes:m?f.attributes||{}:{},isObjectActive:h,activeObjectAttributes:h?p.attributes||{}:{},value:o,onChange:e,onFocus:t,contentRef:r,context:d},s)}function GI({formatTypes:e,...t}){return e.map(o=>(0,_ne.createElement)(pTe,{settings:o,...t,key:o.name}))}var xne=l(I(),1),wne=l(Z(),1),Cne=l(Re(),1);var zF=l(x(),1);function jF(e,t){if(fb.isEmpty(e)){let o=DI(t);return o?`<${o}></${o}>`:""}return Array.isArray(e)?((0,Cne.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/"}),wne.children.toHTML(e)):typeof e=="string"?e:e.toHTMLString()}function GS({value:e,tagName:t,multiline:o,format:r,...n}){return e=(0,zF.jsx)(xne.RawHTML,{children:jF(e,o)}),t?(0,zF.jsx)(t,{...n,children:e}):e}var Pne=l(I(),1),HF=l(Z(),1),Rne=l(zo(),1),One=l(Re(),1);var Bne=l(I(),1),Ene=l(Re(),1),HI=l(M(),1),Tne=l(at(),1),mb=l(zo(),1);var GF=l(x(),1);function hTe({children:e,identifier:t,tagName:o="div",value:r="",onChange:n,multiline:i,...s},a){(0,Ene.default)("wp.blockEditor.RichText multiline prop",{since:"6.1",version:"6.3",alternative:"nested blocks (InnerBlocks)",link:"https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/nested-blocks-inner-blocks/"});let{clientId:c}=Ne(),{getSelectionStart:u,getSelectionEnd:d}=(0,HI.useSelect)(S),{selectionChange:f}=(0,HI.useDispatch)(S),m=DI(i);r=r||`<${m}></${m}>`;let h=`</${m}>${r}<${m}>`.split(`</${m}><${m}>`);h.shift(),h.pop();function g(b){n(`<${m}>${b.join(`</${m}><${m}>`)}</${m}>`)}return(0,GF.jsx)(o,{ref:a,children:h.map((b,k)=>(0,GF.jsx)(UI,{identifier:`${t}-${k}`,tagName:m,value:b,onChange:v=>{let y=h.slice();y[k]=v,g(y)},isSelected:void 0,onKeyDown:v=>{if(v.keyCode!==Tne.ENTER)return;v.preventDefault();let{offset:y}=u(),{offset:_}=d();if(typeof y!="number"||typeof _!="number")return;let w=(0,mb.create)({html:b});w.start=y,w.end=_;let C=(0,mb.split)(w).map(R=>(0,mb.toHTMLString)({value:R})),E=h.slice();E.splice(k,1,...C),g(E),f(c,`${t}-${k+1}`,0,0)},onMerge:v=>{let y=h.slice(),_=0;if(v){if(!y[k+1])return;y.splice(k,2,y[k]+y[k+1]),_=y[k].length-1}else{if(!y[k-1])return;y.splice(k-1,2,y[k-1]+y[k]),_=y[k-1].length-1}g(y),f(c,`${t}-${k-(v?0:1)}`,_,_)},...s},k))})}var Ine=(0,Bne.forwardRef)(hTe);var Ane=l(x(),1);function Lne(e){return(0,Pne.forwardRef)((t,o)=>{let r=t.value,n=t.onChange;Array.isArray(r)&&((0,One.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=HF.children.toHTML(t.value),n=s=>t.onChange(HF.children.fromDOM((0,Rne.__unstableCreateElement)(document,s).childNodes)));let i=t.multiline?Ine:e;return(0,Ane.jsx)(i,{...t,value:r,onChange:n,ref:o})})}var Nne=l(at(),1),pb=l(I(),1);function UF({character:e,type:t,onUse:o}){let r=(0,pb.useContext)(hb),n=(0,pb.useRef)();return n.current=o,(0,pb.useEffect)(()=>{function i(s){Nne.isKeyboardEvent[t](s,e)&&(n.current(),s.preventDefault())}return r.current.add(i),()=>{r.current.delete(i)}},[e,t]),null}var WI=l(P(),1),Mne=l(at(),1),WF=l(x(),1);function ZF({name:e,shortcutType:t,shortcutCharacter:o,...r}){let n,i="RichText.ToolbarControls";return e&&(i+=`.${e}`),t&&o&&(n=Mne.displayShortcut[t](o)),(0,WF.jsx)(WI.Fill,{name:i,children:(0,WF.jsx)(WI.ToolbarButton,{...r,shortcut:n})})}var gb=l(I(),1);function $F({inputType:e,onInput:t}){let o=(0,gb.useContext)(bb),r=(0,gb.useRef)();return r.current=t,(0,gb.useEffect)(()=>{function n(i){i.inputType===e&&(r.current(),i.preventDefault())}return o.current.add(n),()=>{o.current.delete(n)}},[e]),null}var oi=l(x(),1),hb=(0,_r.createContext)();hb.displayName="keyboardShortcutContext";var bb=(0,_r.createContext)();bb.displayName="inputEventContext";var Dne=Symbol("instanceId");function Gne(e){let{__unstableMobileNoFocusOnMount:t,deleteEnter:o,placeholderTextColor:r,textAlign:n,selectionColor:i,tagsToEliminate:s,disableEditingMenu:a,fontSize:c,fontFamily:u,fontWeight:d,fontStyle:f,minWidth:m,maxWidth:p,disableSuggestions:h,disableAutocorrection:g,...b}=e;return b}function UI({children:e,tagName:t="div",value:o="",onChange:r,isSelected:n,multiline:i,inlineToolbar:s,wrapperClassName:a,autocompleters:c,onReplace:u,placeholder:d,allowedFormats:f,withoutInteractiveFormatting:m,onRemove:p,onMerge:h,onSplit:g,__unstableOnSplitAtEnd:b,__unstableOnSplitAtDoubleLineEnd:k,identifier:v,preserveWhiteSpace:y,__unstablePastePlainText:_,__unstableEmbedURLOnPaste:w,__unstableDisableFormats:C,disableLineBreaks:E,__unstableAllowPrefixTransformations:R,readOnly:O,...B},T){B=Gne(B),g&&(0,jne.default)("wp.blockEditor.RichText onSplit prop",{since:"6.4",alternative:'block.json support key: "splitting"'});let A=(0,ZI.useInstanceId)(UI),N=(0,_r.useRef)(),[z,U]=(0,_r.useState)(null),j=Ne(),{clientId:G,isSelected:V,name:H}=j,K=j[bp],oe=(0,_r.useContext)(di),ee=(0,bd.useRegistry)(),J=ze=>{if(!V)return{isSelected:!1};let{getSelectionStart:Le,getSelectionEnd:Tt,getBlockEditingMode:le}=ze(S),Pe=Le(),_o=Tt(),on;return n===void 0?on=Pe.clientId===G&&_o.clientId===G&&(v?Pe.attributeKey===v:Pe[Dne]===A):n&&(on=Pe.clientId===G),{selectionStart:on?Pe.offset:void 0,selectionEnd:on?_o.offset:void 0,isSelected:on,isContentOnly:le(G)==="contentOnly"}},{selectionStart:ie,selectionEnd:de,isSelected:q,isContentOnly:ne}=(0,bd.useSelect)(J,[G,v,A,n,V]),{disableBoundBlock:X,bindingsPlaceholder:W,bindingsLabel:Q}=(0,bd.useSelect)(ze=>{if(!K?.[v])return{};let{__experimentalBlockBindingsSupportedAttributes:Le}=ze(S).getSettings();if(!Le?.[H])return{};let le=K[v],Pe=(0,zne.getBlockBindingsSource)(le.source),_o={};if(Pe?.usesContext?.length)for(let Ec of Pe.usesContext)_o[Ec]=oe[Ec];let on=!Pe?.canUserEditValue?.({select:ze,context:_o,args:le.args});if(o.length>0)return{disableBoundBlock:on,bindingsPlaceholder:null,bindingsLabel:null};let{getBlockAttributes:Ws}=ze(S),fp=Ws(G),Kd=null;Pe?.getFieldsList&&(Kd=Pe.getFieldsList({select:ze,context:_o})?.find(mp=>(0,Vne.default)(mp.args,le?.args))?.label);let Xd=Kd??Pe?.label,Ck=on?Xd:(0,kb.sprintf)((0,kb.__)("Add %s"),Xd),qd=on?le?.args?.key||Pe?.label:(0,kb.sprintf)((0,kb.__)("Empty %s; start writing to edit its value"),le?.args?.key||Pe?.label);return{disableBoundBlock:on,bindingsPlaceholder:fp?.placeholder||Ck,bindingsLabel:qd}},[K,v,H,o,G,oe]),se=!!oe?.["pattern/overrides"],ce=K?.__default?.source==="core/pattern-overrides",ge=O||X||se&&!ce,{getSelectionStart:Ae,getSelectionEnd:Xe,getBlockRootClientId:dt}=(0,bd.useSelect)(S),{selectionChange:St}=(0,bd.useDispatch)(S),yo=ub({allowedFormats:f,disableFormats:C}),Ge=!yo||yo.length>0,So=(0,_r.useCallback)((ze,Le)=>{let Tt={},le=ze===void 0&&Le===void 0,Pe={clientId:G,[v?"attributeKey":Dne]:v||A};if(typeof ze=="number"||le){if(Le===void 0&&dt(G)!==dt(Xe().clientId))return;Tt.start={...Pe,offset:ze}}if(typeof Le=="number"||le){if(ze===void 0&&dt(G)!==dt(Ae().clientId))return;Tt.end={...Pe,offset:Le}}St(Tt)},[G,dt,Xe,Ae,v,A,St]),{formatTypes:so,prepareHandlers:Fe,valueHandlers:Xt,changeHandlers:ft,dependencies:qt}=AI({clientId:G,identifier:v,allowedFormats:yo,withoutInteractiveFormatting:m,disableNoneEssentialFormatting:ne});function ai(ze){return Xt.reduce((Le,Tt)=>Tt(Le,ze.text),ze.formats)}function hr(ze){return so.forEach(Le=>{Le.__experimentalCreatePrepareEditableTree&&(ze=(0,$I.removeFormat)(ze,Le.name,0,ze.text.length))}),ze.formats}function He(ze){return Fe.reduce((Le,Tt)=>Tt(Le,ze.text),ze.formats)}let{value:ao,getValue:Tn,onChange:me,ref:it}=(0,$I.__unstableUseRichText)({value:o,onChange(ze,{__unstableFormats:Le,__unstableText:Tt}){r(ze),Object.values(ft).forEach(le=>{le(Le,Tt)})},selectionStart:ie,selectionEnd:de,onSelectionChange:So,placeholder:W||d,__unstableIsSelected:q,__unstableDisableFormats:C,preserveWhiteSpace:y,__unstableDependencies:[...qt,t],__unstableAfterParse:ai,__unstableBeforeSerialize:hr,__unstableAddInvisibleFormats:He}),Vo=uG({onReplace:u,completers:c,record:ao,onChange:me});Qre({html:o,value:ao});let li=(0,_r.useRef)(new Set),es=(0,_r.useRef)(new Set);function Us(){N.current?.focus()}let Or=t;return(0,oi.jsxs)(oi.Fragment,{children:[q&&(0,oi.jsx)(hb.Provider,{value:li,children:(0,oi.jsx)(bb.Provider,{value:es,children:(0,oi.jsxs)(Fne.Popover.__unstableSlotNameProvider,{value:"__unstable-block-tools-after",children:[e&&e({value:ao,onChange:me,onFocus:Us}),(0,oi.jsx)(GI,{value:ao,onChange:me,onFocus:Us,formatTypes:so,forwardedRef:N})]})})}),q&&Ge&&(0,oi.jsx)(Xre,{inline:s,editableContentElement:z}),(0,oi.jsx)(Or,{role:"textbox","aria-multiline":!E,"aria-readonly":ge,...B,draggable:void 0,"aria-label":Q||B["aria-label"]||d,...Vo,ref:(0,ZI.useMergeRefs)([it,T,Vo.ref,B.ref,FI({registry:ee,getValue:Tn,onChange:me,__unstableAllowPrefixTransformations:R,formatTypes:so,onReplace:u,selectionChange:St,isSelected:q,disableFormats:C,value:ao,tagName:t,onSplit:g,__unstableEmbedURLOnPaste:w,pastePlainText:_,onMerge:h,onRemove:p,removeEditorOnlyFormats:hr,disableLineBreaks:E,onSplitAtEnd:b,onSplitAtDoubleLineEnd:k,keyboardShortcuts:li,inputEvents:es}),N,U]),contentEditable:!ge,suppressContentEditableWarning:!0,className:D("block-editor-rich-text__editable",B.className,"rich-text"),tabIndex:B.tabIndex===0&&!ge?null:B.tabIndex,"data-wp-block-attribute-key":v})]})}var HS=Lne((0,_r.forwardRef)(UI));HS.Content=GS;HS.isEmpty=e=>!e||e.length===0;var YF=(0,_r.forwardRef)((e,t)=>{if(Ne()[H_]){let{children:n,tagName:i="div",value:s,onChange:a,isSelected:c,multiline:u,inlineToolbar:d,wrapperClassName:f,autocompleters:m,onReplace:p,placeholder:h,allowedFormats:g,withoutInteractiveFormatting:b,onRemove:k,onMerge:v,onSplit:y,__unstableOnSplitAtEnd:_,__unstableOnSplitAtDoubleLineEnd:w,identifier:C,preserveWhiteSpace:E,__unstablePastePlainText:R,__unstableEmbedURLOnPaste:O,__unstableDisableFormats:B,disableLineBreaks:T,__unstableAllowPrefixTransformations:A,readOnly:N,...z}=Gne(e);return(0,oi.jsx)(i,{ref:t,...z,dangerouslySetInnerHTML:{__html:jF(s,u)}})}return(0,oi.jsx)(HS,{ref:t,...e,readOnly:!1})});YF.Content=GS;YF.isEmpty=e=>!e||e.length===0;var fb=YF;var KF=l(x(),1),Une=(0,Hne.forwardRef)((e,t)=>(0,KF.jsx)(fb,{ref:t,...e,__unstableDisableFormats:!0}));Une.Content=({value:e="",tagName:t="div",...o})=>(0,KF.jsx)(t,{...o,children:e});var Wne=Une;var XF=l(x(),1),gTe=(0,$ne.forwardRef)(({__experimentalVersion:e,...t},o)=>{if(e===2)return(0,XF.jsx)(Wne,{ref:o,...t});let{className:r,onChange:n,...i}=t;return(0,XF.jsx)(Zne.default,{ref:o,className:D("block-editor-plain-text",r),onChange:s=>n(s.target.value),...i})}),Yne=gTe;var La=l(L(),1),qne=l(I(),1),Qne=l(P(),1);var Kne=l(Y(),1),Xne=l(P(),1),YI=l(L(),1),Lm=l(x(),1);function KI({property:e,viewport:t,desc:o}){let r=(0,Kne.useInstanceId)(KI),n=o||(0,YI.sprintf)((0,YI._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,Lm.jsxs)(Lm.Fragment,{children:[(0,Lm.jsx)("span",{"aria-describedby":`rbc-desc-${r}`,children:t.label}),(0,Lm.jsx)(Xne.VisuallyHidden,{as:"span",id:`rbc-desc-${r}`,children:n})]})}var Na=l(x(),1);function bTe(e){let{title:t,property:o,toggleLabel:r,onIsResponsiveChange:n,renderDefaultControl:i,renderResponsiveControls:s,isResponsive:a=!1,defaultLabel:c={id:"all",label:(0,La._x)("All","screen sizes")},viewports:u=[{id:"small",label:(0,La.__)("Small screens")},{id:"medium",label:(0,La.__)("Medium screens")},{id:"large",label:(0,La.__)("Large screens")}]}=e;if(!t||!o||!i)return null;let d=r||(0,La.sprintf)((0,La.__)("Use the same %s on all screen sizes."),o),f=(0,La.__)("Choose whether to use the same value for all screen sizes or a unique value for each screen size."),m=i((0,Na.jsx)(KI,{property:o,viewport:c}),c),p=()=>u.map(h=>(0,Na.jsx)(qne.Fragment,{children:i((0,Na.jsx)(KI,{property:o,viewport:h}),h)},h.id));return(0,Na.jsxs)("fieldset",{className:"block-editor-responsive-block-control",children:[(0,Na.jsx)("legend",{className:"block-editor-responsive-block-control__title",children:t}),(0,Na.jsxs)("div",{className:"block-editor-responsive-block-control__inner",children:[(0,Na.jsx)(Qne.ToggleControl,{className:"block-editor-responsive-block-control__toggle",label:d,checked:!a,onChange:n,help:f}),(0,Na.jsxs)("div",{className:D("block-editor-responsive-block-control__group",{"is-responsive":a}),children:[!a&&m,a&&(s?s(u):p())]})]})]})}var Jne=bTe;var XI=l(P(),1);var eie=l(x(),1);function tie({units:e,...t}){let[o]=pe("spacing.units"),r=(0,XI.__experimentalUseCustomUnits)({availableUnits:o||["%","px","em","rem","vw"],units:e});return(0,eie.jsx)(XI.__experimentalUnitControl,{units:r,...t})}var US=l(L(),1),oie=l(I(),1),vb=l(P(),1);var Ma=l(x(),1);function kTe({url:e,onChange:t}){let[o,r]=(0,oie.useReducer)(i=>!i,!1),n=i=>{i.preventDefault(),r()};return(0,Ma.jsxs)("div",{className:"block-editor-url-input__button",children:[(0,Ma.jsx)(vb.Button,{size:"compact",icon:nn,label:e?(0,US.__)("Edit link"):(0,US.__)("Insert link"),onClick:r,className:"components-toolbar__control",isPressed:!!e}),o&&(0,Ma.jsx)("form",{className:"block-editor-url-input__button-modal",onSubmit:n,children:(0,Ma.jsxs)("div",{className:"block-editor-url-input__button-modal-line",children:[(0,Ma.jsx)(vb.Button,{__next40pxDefaultSize:!0,className:"block-editor-url-input__back",icon:Nk,label:(0,US.__)("Close"),onClick:r}),(0,Ma.jsx)(cd,{value:e||"",onChange:t,suffix:(0,Ma.jsx)(vb.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,Ma.jsx)(vb.Button,{size:"small",icon:ll,label:(0,US.__)("Submit"),type:"submit"})})})]})})]})}var rie=kTe;var Sn=l(L(),1),Gi=l(I(),1),lie=l(je(),1),Ao=l(P(),1);var cie=l(rn(),1);var kt=l(x(),1),qF="none",nie="custom",iie="media",sie="attachment",aie=["noreferrer","noopener"],uie=({linkDestination:e,onChangeUrl:t,url:o,mediaType:r="image",mediaUrl:n,mediaLink:i,linkTarget:s,linkClass:a,rel:c,showLightboxSetting:u,lightboxEnabled:d,onSetLightbox:f,resetLightbox:m})=>{let[p,h]=(0,Gi.useState)(!1),[g,b]=(0,Gi.useState)(null),k=()=>{h(!0)},[v,y]=(0,Gi.useState)(!1),[_,w]=(0,Gi.useState)(null),C=(0,Gi.useRef)(null),E=(0,Gi.useRef)();(0,Gi.useEffect)(()=>{if(!E.current)return;(lie.focus.focusable.find(E.current)[0]||E.current).focus()},[v,o,d]);let R=()=>{(e===iie||e===sie)&&w(""),y(!0)},O=()=>{y(!1)},B=()=>{w(null),O(),h(!1)},T=q=>{let ne=q?"_blank":void 0,X;if(ne){let W=(c??"").split(" ");aie.forEach(Q=>{W.includes(Q)||W.push(Q)}),X=W.join(" ")}else{let W=(c??"").split(" ").filter(Q=>aie.includes(Q)===!1);X=W.length?W.join(" "):void 0}return{linkTarget:ne,rel:X}},A=()=>q=>{let ne=C.current;ne&&ne.contains(q.target)||(h(!1),w(null),O())},N=()=>q=>{if(_){let ne=U().find(X=>X.url===_)?.linkDestination||nie;t({href:(0,cie.prependHTTP)(_),linkDestination:ne,lightbox:{enabled:!1}})}O(),w(null),q.preventDefault()},z=()=>{t({linkDestination:qF,href:""})},U=()=>{let q=[{linkDestination:iie,title:(0,Sn.__)("Link to image file"),url:r==="image"?n:void 0,icon:Gk}];return r==="image"&&i&&q.push({linkDestination:sie,title:(0,Sn.__)("Link to attachment page"),url:r==="image"?i:void 0,icon:cl}),q},j=q=>{let ne=U(),X;q?X=(ne.find(W=>W.url===q)||{linkDestination:nie}).linkDestination:X=qF,t({linkDestination:X,href:q})},G=q=>{let ne=T(q);t(ne)},V=q=>{t({rel:q})},H=q=>{t({linkClass:q})},K=(0,kt.jsxs)(Ao.__experimentalVStack,{spacing:"3",children:[(0,kt.jsx)(Ao.ToggleControl,{label:(0,Sn.__)("Open in new tab"),onChange:G,checked:s==="_blank"}),(0,kt.jsx)(Ao.TextControl,{__next40pxDefaultSize:!0,label:(0,Sn.__)("Link relation"),value:c??"",onChange:V,help:(0,Gi.createInterpolateElement)((0,Sn.__)("The <a>Link Relation</a> attribute defines the relationship between a linked resource and the current document."),{a:(0,kt.jsx)(Ao.ExternalLink,{href:"https://developer.mozilla.org/docs/Web/HTML/Attributes/rel"})})}),(0,kt.jsx)(Ao.TextControl,{__next40pxDefaultSize:!0,label:(0,Sn.__)("Link CSS class"),value:a||"",onChange:H})]}),oe=_!==null?_:o,ee=!d||d&&!u,J=!oe&&ee,ie=(U().find(q=>q.linkDestination===e)||{}).title,de=()=>{if(d&&u&&!o&&!v)return(0,kt.jsxs)("div",{className:"block-editor-url-popover__expand-on-click",children:[(0,kt.jsx)(Ee,{icon:Tp}),(0,kt.jsxs)("div",{className:"text",children:[(0,kt.jsx)("p",{children:(0,Sn.__)("Enlarge on click")}),(0,kt.jsx)("p",{className:"description",children:(0,Sn.__)("Scales the image with a lightbox effect")})]}),(0,kt.jsx)(Ao.Button,{icon:fi,label:(0,Sn.__)("Disable enlarge on click"),onClick:()=>{f?.(!1)},size:"compact"})]});if(!o||v)return(0,kt.jsx)(pd.LinkEditor,{className:"block-editor-format-toolbar__link-container-content",value:oe,onChangeInputValue:w,onSubmit:N(),autocompleteRef:C});if(o&&!v)return(0,kt.jsxs)(kt.Fragment,{children:[(0,kt.jsx)(pd.LinkViewer,{className:"block-editor-format-toolbar__link-container-content",url:o,onEditLinkClick:R,urlLabel:ie}),(0,kt.jsx)(Ao.Button,{icon:fi,label:(0,Sn.__)("Remove link"),onClick:()=>{z(),m?.()},size:"compact"})]})};return(0,kt.jsxs)(kt.Fragment,{children:[(0,kt.jsx)(Ao.ToolbarButton,{icon:nn,className:"components-toolbar__control",label:(0,Sn.__)("Link"),"aria-expanded":p,onClick:k,ref:b,isActive:!!o||d&&u}),p&&(0,kt.jsx)(pd,{ref:E,anchor:g,onFocusOutside:A(),onClose:B,renderSettings:ee?()=>K:null,additionalControls:J&&(0,kt.jsxs)(Ao.NavigableMenu,{children:[U().map(q=>(0,kt.jsx)(Ao.MenuItem,{icon:q.icon,iconPosition:"left",onClick:()=>{w(null),j(q.url),O()},children:q.title},q.linkDestination)),u&&(0,kt.jsx)(Ao.MenuItem,{className:"block-editor-url-popover__expand-on-click",icon:Tp,info:(0,Sn.__)("Scale the image with a lightbox effect."),iconPosition:"left",onClick:()=>{w(null),t({linkDestination:qF,href:""}),f?.(!0),O()},children:(0,Sn.__)("Enlarge on click")},"expand-on-click")]}),offset:13,children:de()})]})};var Sb=l(P(),1),wie=l(I(),1),JI=l(L(),1);var die=l(I(),1),JF=l(L(),1);var QF=[],vTe=new Intl.Collator("und",{numeric:!0}).compare;function qI(){let[e,t,o,r]=pe("spacing.spacingSizes.custom","spacing.spacingSizes.theme","spacing.spacingSizes.default","spacing.defaultSpacingSizes"),n=e??QF,i=t??QF,s=o&&r!==!1?o:QF;return(0,die.useMemo)(()=>{let a=[{name:(0,JF.__)("None"),slug:"0",size:0},...n,...i,...s];return a.every(({slug:c})=>/^[0-9]/.test(c))&&a.sort((c,u)=>vTe(c.slug,u.slug)),a.length>fG?[{name:(0,JF.__)("Default"),slug:"default",size:void 0},...a]:a},[n,i,s])}var fie=l(I(),1),mie=l(M(),1),QI=l(L(),1),pie=l(P(),1);var hie=l(x(),1),yTe={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 yb({icon:e,isMixed:t=!1,minimumCustomValue:o,onChange:r,onMouseOut:n,onMouseOver:i,showSideInLabel:s=!0,side:a,spacingSizes:c,type:u,value:d,...f}){let m=(0,mie.useSelect)(_=>_(S).getSettings()?.disableCustomSpacingSizes),[p]=pe("spacing.units"),h=(0,pie.__experimentalUseCustomUnits)({availableUnits:p||["px","em","rem"]}),g=(0,fie.useMemo)(()=>c?.map(_=>({name:_.name,slug:_.slug,size:_.size}))||[],[c]),b=(Jc.includes(a)||["vertical","horizontal"].includes(a))&&s?Js[a]:"",k=s?u?.toLowerCase():u,v=(0,QI.sprintf)((0,QI._x)("%1$s %2$s","spacing"),b,k).trim(),y=h[0]?.value||"px";return(0,hie.jsx)(ym,{allowNegativeOnDrag:o<0,ariaLabel:v,className:"spacing-sizes-control",customValueSettings:yTe,disableCustomValues:m,icon:e,isMixed:t,minimumCustomValue:o,onChange:r,onMouseOut:n,onMouseOver:i,presets:g,presetType:"spacing",selectedUnit:y,units:h,value:d,...f})}var WS=l(x(),1),gie=["vertical","horizontal"];function bie({minimumCustomValue:e,onChange:t,onMouseOut:o,onMouseOver:r,sides:n,spacingSizes:i,type:s,values:a}){let c=d=>f=>{if(!t)return;let m={...Object.keys(a).reduce((p,h)=>(p[h]=Xp(a[h],i),p),{})};d==="vertical"&&(m.top=f,m.bottom=f),d==="horizontal"&&(m.left=f,m.right=f),t(m)},u=n?.length?gie.filter(d=>GN(n,d)):gie;return(0,WS.jsx)(WS.Fragment,{children:u.map(d=>{let f=d==="vertical"?a.top:a.left;return(0,WS.jsx)(yb,{icon:Aw[d],label:Js[d],minimumCustomValue:e,onChange:c(d),onMouseOut:o,onMouseOver:r,side:d,spacingSizes:i,type:s,value:f,withInputField:!1},`spacing-sizes-control-${d}`)})})}var ZS=l(x(),1);function kie({minimumCustomValue:e,onChange:t,onMouseOut:o,onMouseOver:r,sides:n,spacingSizes:i,type:s,values:a}){let c=n?.length?Jc.filter(d=>n.includes(d)):Jc,u=d=>f=>{let m={...Object.keys(a).reduce((p,h)=>(p[h]=Xp(a[h],i),p),{})};m[d]=f,t(m)};return(0,ZS.jsx)(ZS.Fragment,{children:c.map(d=>(0,ZS.jsx)(yb,{icon:Aw[d],label:Js[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 vie=l(x(),1);function yie({minimumCustomValue:e,onChange:t,onMouseOut:o,onMouseOver:r,showSideInLabel:n,side:i,spacingSizes:s,type:a,values:c}){let u=d=>f=>{let m={...Object.keys(c).reduce((p,h)=>(p[h]=Xp(c[h],s),p),{})};m[d]=f,t(m)};return(0,vie.jsx)(yb,{label:Js[i],minimumCustomValue:e,onChange:u(i),onMouseOut:o,onMouseOver:r,showSideInLabel:n,side:i,spacingSizes:s,type:a,value:c[i],withInputField:!1})}var Sie=l(P(),1);var e4=l(L(),1),_ie=l(x(),1);function xie({isLinked:e,...t}){let o=e?(0,e4.__)("Unlink sides"):(0,e4.__)("Link sides");return(0,_ie.jsx)(Sie.Button,{...t,size:"small",icon:e?nn:fi,iconSize:24,label:o})}var Da=l(x(),1);function _b({inputProps:e,label:t,minimumCustomValue:o=0,onChange:r,onMouseOut:n,onMouseOver:i,showSideInLabel:s=!0,sides:a=Jc,useSelect:c,values:u}){let d=qI(),f=u||mG,m=a?.length===1,p=a?.includes("horizontal")&&a?.includes("vertical")&&a?.length===2,[h,g]=(0,wie.useState)(hG(f,a)),b=()=>{g(h===vl.axial?vl.custom:vl.axial)},v={...e,minimumCustomValue:o,onChange:C=>{let E={...u,...C};r(E)},onMouseOut:n,onMouseOver:i,sides:a,spacingSizes:d,type:t,useSelect:c,values:f},y=()=>h===vl.axial?(0,Da.jsx)(bie,{...v}):h===vl.custom?(0,Da.jsx)(kie,{...v}):(0,Da.jsx)(yie,{side:h,...v,showSideInLabel:s}),_=Jc.includes(h)&&s?Js[h]:"",w=(0,JI.sprintf)((0,JI._x)("%1$s %2$s","spacing"),t,_).trim();return(0,Da.jsxs)("fieldset",{className:"spacing-sizes-control",children:[(0,Da.jsxs)(Sb.__experimentalHStack,{className:"spacing-sizes-control__header",children:[(0,Da.jsx)(Sb.BaseControl.VisualLabel,{as:"legend",className:"spacing-sizes-control__label",children:w}),!m&&!p&&(0,Da.jsx)(xie,{label:t,onClick:b,isLinked:h===vl.axial})]}),(0,Da.jsx)(Sb.__experimentalVStack,{spacing:.5,children:y()})]})}var Cie=l(Re(),1);function Bie(){return(0,Cie.default)("wp.blockEditor.PreviewOptions",{version:"6.5"}),null}var e2=l(I(),1);function Eie(e){let[t,o]=(0,e2.useState)(window.innerWidth);(0,e2.useEffect)(()=>{if(e==="Desktop")return;let i=()=>o(window.innerWidth);return window.addEventListener("resize",i),()=>{window.removeEventListener("resize",i)}},[e]);let r=i=>{let s;switch(i){case"Tablet":s=781;break;case"Mobile":s=479;break;default:return null}return s<t?s:t};return(i=>{let s=i==="Mobile"?"768px":"1024px",a="40px",c="auto";switch(i){case"Tablet":case"Mobile":return{width:r(i),marginTop:a,marginBottom:a,marginLeft:c,marginRight:c,height:s,overflowY:"auto"};default:return{marginLeft:c,marginRight:c}}})(e)}var zb=l(L(),1),jb=l(Z(),1),hae=l(P(),1),C4=l(M(),1);var xb=l(P(),1),t2=l(L(),1),Tie=l(M(),1),o2=l(Z(),1);var Nm=l(x(),1);function STe({block:e,onNavigateToEntityRecord:t,isSyncedPattern:o,isTemplatePartBlock:r}){let n=e?.attributes||{};return(0,Nm.jsx)(xb.__experimentalVStack,{className:"block-editor-block-inspector-edit-contents",expanded:!0,children:(0,Nm.jsx)(xb.Button,{className:"block-editor-block-inspector-edit-contents__button",__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>{if(o)t({postId:n.ref,postType:"wp_block"});else if(r){let{theme:s,slug:a}=n,c=s&&a?`${s}//${a}`:null;c&&t({postId:c,postType:"wp_template_part"})}},children:(0,t2.__)("Edit section")})})}function _Te({clientId:e,editedContentOnlySection:t,editContentOnlySection:o,stopEditingContentOnlySection:r}){return(0,Nm.jsx)(xb.__experimentalVStack,{className:"block-editor-block-inspector-edit-contents",expanded:!0,children:(0,Nm.jsx)(xb.Button,{className:"block-editor-block-inspector-edit-contents__button",__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>{t?r():o(e)},children:t?(0,t2.__)("Exit section"):(0,t2.__)("Edit section")})})}function Iie({clientId:e}){let{isWithinSection:t,isWithinEditedSection:o,editedContentOnlySection:r,editContentOnlySection:n,stopEditingContentOnlySection:i}=EE(e),{block:s,onNavigateToEntityRecord:a}=(0,Tie.useSelect)(f=>{let{getBlock:m,getSettings:p}=f(S);return{block:m(e),onNavigateToEntityRecord:p().onNavigateToEntityRecord}},[e]);if(!t&&!o)return null;let c=(0,o2.isReusableBlock)(s),u=(0,o2.isTemplatePart)(s);return(c||u)&&a?(0,Nm.jsx)(STe,{block:s,onNavigateToEntityRecord:a,isSyncedPattern:c,isTemplatePartBlock:u}):(0,Nm.jsx)(_Te,{clientId:e,editedContentOnlySection:r,editContentOnlySection:n,stopEditingContentOnlySection:i})}var Pie=l(M(),1),Rie=l(L(),1),Oie=l(P(),1),Aie=l(I(),1);var Lie=l(x(),1);function r2(){let e=(0,Pie.useSelect)(r=>r(S).getBlockSelectionStart(),[]),t=(0,Aie.useRef)();return wf(e,t),e?(0,Lie.jsx)(Oie.Button,{__next40pxDefaultSize:!0,variant:"secondary",className:"block-editor-skip-to-selected-block",onClick:()=>{t.current?.focus()},children:(0,Rie.__)("Skip to the selected block")}):null}var n2=l(L(),1),Nie=l(M(),1);var Mie=l(P(),1);var $S=l(x(),1);function t4(){let e=(0,Nie.useSelect)(t=>t(S).getSelectedBlockCount(),[]);return(0,$S.jsxs)(Mie.__experimentalHStack,{justify:"flex-start",spacing:2,className:"block-editor-multi-selection-inspector__card",children:[(0,$S.jsx)(Ie,{icon:sf,showColors:!0}),(0,$S.jsx)("div",{className:"block-editor-multi-selection-inspector__card-title",children:(0,n2.sprintf)((0,n2._n)("%d Block","%d Blocks",e),e)})]})}var Vb=l(P(),1),Um=l(I(),1),aae=l(zp(),1),lae=l(M(),1);var YS=l(L(),1),i2={name:"settings",title:(0,YS.__)("Settings"),value:"settings",icon:CO},s2={name:"styles",title:(0,YS.__)("Styles"),value:"styles",icon:FL},a2={name:"content",title:(0,YS.__)("Content"),value:"content",icon:cl},l2={name:"list",title:(0,YS.__)("List View"),value:"list-view",icon:Hk};var KS=l(P(),1),Die=l(L(),1);var XS=l(x(),1),xTe=()=>{let e=(0,KS.__experimentalUseSlotFills)(Du.slotName),t=(0,KS.__experimentalUseSlotFills)($y.name),o=!!(e&&e.length),r=!!(t&&t.length);return!o&&!r?null:(0,XS.jsxs)(KS.PanelBody,{className:"block-editor-block-inspector__advanced",title:(0,Die.__)("Advanced"),initialOpen:!1,children:[(0,XS.jsx)(fe.Slot,{group:"advanced"}),(0,XS.jsx)($y.Slot,{})]})},qS=xTe;var wb=l(P(),1),c2=l(M(),1),o4=l(L(),1);var QS=l(x(),1),wTe=()=>{let{selectedClientIds:e,selectedBlocks:t,hasPositionAttribute:o}=(0,c2.useSelect)(s=>{let{getBlocksByClientId:a,getSelectedBlockClientIds:c}=s(S),u=c(),d=a(u);return{selectedClientIds:u,selectedBlocks:d,hasPositionAttribute:d?.some(({attributes:f})=>!!f?.style?.position?.type)}},[]),{updateBlockAttributes:r}=(0,c2.useDispatch)(S),n=Co();function i(){if(!e?.length||!t?.length)return;let s=Object.fromEntries(t?.map(({clientId:a,attributes:c})=>[a,{style:Se({...c?.style,position:{...c?.style?.position,type:void 0,top:void 0,right:void 0,bottom:void 0,left:void 0}})}]));r(e,s,!0)}return(0,QS.jsx)(wb.__experimentalToolsPanel,{className:"block-editor-block-inspector__position",label:(0,o4.__)("Position"),resetAll:i,dropdownMenuProps:n,children:(0,QS.jsx)(wb.__experimentalToolsPanelItem,{isShownByDefault:o,label:(0,o4.__)("Position"),hasValue:()=>o,onDeselect:i,children:(0,QS.jsx)(fe.Slot,{group:"position"})})})},CTe=()=>{let e=(0,wb.__experimentalUseSlotFills)(Mu.position.name);return!(e&&e.length)?null:(0,QS.jsx)(wTe,{})},u2=CTe;var Va=l(x(),1),BTe=({showAdvancedControls:e=!1})=>(0,Va.jsxs)(Va.Fragment,{children:[(0,Va.jsx)(fe.Slot,{}),(0,Va.jsx)(u2,{}),(0,Va.jsx)(fe.Slot,{group:"bindings"}),e&&(0,Va.jsx)("div",{children:(0,Va.jsx)(qS,{})})]}),Vie=BTe;var Mb=l(L(),1),K2=l(M(),1);var s_=l(Z(),1),m4=l(P(),1),Nb=l(I(),1),jse=l(Je(),1),Gse=l(M(),1);var f4={};$s(f4,{AdvancedPanel:()=>Ase,BackgroundPanel:()=>D2,BorderPanel:()=>C2,ColorPanel:()=>I2,DimensionsPanel:()=>S2,FiltersPanel:()=>R2,ImageSettingsPanel:()=>Rse,TypographyPanel:()=>g2,useHasBackgroundPanel:()=>i_,useHasBorderPanel:()=>w2,useHasBorderPanelControls:()=>e_,useHasColorPanel:()=>T2,useHasDimensionsPanel:()=>y2,useHasFiltersPanel:()=>Tse,useHasImageSettingsPanel:()=>Pse,useHasTypographyPanel:()=>h2,useSettingsForBlockElement:()=>f2});var d2=l(I(),1),Fie=l(M(),1),r4=l(Z(),1),Mm=l(L(),1);function f2(e,t,o){let{supportedStyles:r,supports:n}=(0,Fie.useSelect)(i=>({supportedStyles:F(i(r4.store)).getSupportedStyles(t,o),supports:i(r4.store).getBlockType(t)?.supports}),[t,o]);return(0,d2.useMemo)(()=>{let i={...e};return r.includes("fontSize")||(i.typography={...i.typography,fontSizes:{},customFontSize:!1,defaultFontSizes:!1}),r.includes("fontFamily")||(i.typography={...i.typography,fontFamilies:{}}),i.color={...i.color,text:i.color?.text&&r.includes("color"),background:i.color?.background&&(r.includes("background")||r.includes("backgroundColor")),button:i.color?.button&&r.includes("buttonColor"),heading:i.color?.heading&&r.includes("headingColor"),link:i.color?.link&&r.includes("linkColor"),caption:i.color?.caption&&r.includes("captionColor")},r.includes("background")||(i.color.gradients=[],i.color.customGradient=!1),r.includes("filter")||(i.color.defaultDuotone=!1,i.color.customDuotone=!1),["lineHeight","fontStyle","fontWeight","letterSpacing","textAlign","textTransform","textDecoration","writingMode"].forEach(s=>{r.includes(s)||(i.typography={...i.typography,[s]:!1})}),r.includes("columnCount")||(i.typography={...i.typography,textColumns:!1}),["contentSize","wideSize"].forEach(s=>{r.includes(s)||(i.layout={...i.layout,[s]:!1})}),["padding","margin","blockGap"].forEach(s=>{r.includes(s)||(i.spacing={...i.spacing,[s]:!1});let a=Array.isArray(n?.spacing?.[s])?n?.spacing?.[s]:n?.spacing?.[s]?.sides;a?.length&&i.spacing?.[s]&&(i.spacing={...i.spacing,[s]:{...i.spacing?.[s],sides:a}})}),["aspectRatio","height","minHeight","width"].forEach(s=>{r.includes(s)||(i.dimensions={...i.dimensions,[s]:!1})}),["radius","color","style","width"].forEach(s=>{r.includes("border"+s.charAt(0).toUpperCase()+s.slice(1))||(i.border={...i.border,[s]:!1})}),["backgroundImage","backgroundSize"].forEach(s=>{r.includes(s)||(i.background={...i.background,[s]:!1})}),i.shadow=r.includes("shadow")?i.shadow:!1,i},[e,r,n])}function Fa(e){let t=e?.color?.palette?.custom,o=e?.color?.palette?.theme,r=e?.color?.palette?.default,n=e?.color?.defaultPalette;return(0,d2.useMemo)(()=>{let i=[];return o&&o.length&&i.push({name:(0,Mm._x)("Theme","Indicates this palette comes from the theme."),colors:o}),n&&r&&r.length&&i.push({name:(0,Mm._x)("Default","Indicates this palette comes from WordPress."),colors:r}),t&&t.length&&i.push({name:(0,Mm._x)("Custom","Indicates this palette is created by the user."),colors:t}),i},[t,o,r,n])}function JS(e){let t=e?.color?.gradients?.custom,o=e?.color?.gradients?.theme,r=e?.color?.gradients?.default,n=e?.color?.defaultGradients;return(0,d2.useMemo)(()=>{let i=[];return o&&o.length&&i.push({name:(0,Mm._x)("Theme","Indicates this palette comes from the theme."),gradients:o}),n&&r&&r.length&&i.push({name:(0,Mm._x)("Default","Indicates this palette comes from WordPress."),gradients:r}),t&&t.length&&i.push({name:(0,Mm._x)("Custom","Indicates this palette is created by the user."),gradients:t}),i},[t,o,r,n])}var Lo=l(P(),1),xr=l(L(),1),Bb=l(I(),1);var Cb=l(L(),1);var zie=l(I(),1),m2=l(P(),1),n4=l(x(),1),ETe=[{label:(0,Cb.__)("Align text left"),value:"left",icon:Lc},{label:(0,Cb.__)("Align text center"),value:"center",icon:tf},{label:(0,Cb.__)("Align text right"),value:"right",icon:Nc},{label:(0,Cb.__)("Justify text"),value:"justify",icon:eO}],TTe=["left","center","right"];function p2({className:e,value:t,onChange:o,options:r=TTe}){let n=(0,zie.useMemo)(()=>ETe.filter(i=>r.includes(i.value)),[r]);return n.length?(0,n4.jsx)(m2.__experimentalToggleGroupControl,{isDeselectable:!0,__next40pxDefaultSize:!0,label:(0,Cb.__)("Text alignment"),className:D("block-editor-text-alignment-control",e),value:t,onChange:i=>{o(i===t?void 0:i)},children:n.map(i=>(0,n4.jsx)(m2.__experimentalToggleGroupControlOptionIcon,{value:i.value,icon:i.icon,label:i.label},i.value))}):null}function Gie(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 jie(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 ITe(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 Hie(e,t,o){let r=t,n=o,{fontStyles:i,fontWeights:s,combinedStyleAndWeightOptions:a}=Wg(e),c=i?.some(({value:d})=>d===t),u=s?.some(({value:d})=>d?.toString()===o?.toString());return c||(r=t?ITe(i,t):a?.find(d=>d.style.fontWeight===jie(s,o))?.style?.fontStyle),u||(n=o?jie(s,o):a?.find(d=>d.style.fontStyle===(r||t))?.style?.fontWeight),{nearestFontStyle:r,nearestFontWeight:n}}var vt=l(x(),1),PTe=1,RTe=6;function h2(e){let t=Wie(e),o=Zie(e),r=$ie(e),n=Yie(e),i=Xie(e),s=Kie(e),a=qie(e),c=Qie(e),u=Jie(e),d=Uie(e);return t||o||r||n||i||s||d||a||c||u}function Uie(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 Wie(e){return["default","theme","custom"].some(t=>e?.typography?.fontFamilies?.[t]?.length)}function Zie(e){return e?.typography?.lineHeight}function $ie(e){return e?.typography?.fontStyle||e?.typography?.fontWeight}function OTe(e){return e?.typography?.fontStyle?e?.typography?.fontWeight?(0,xr.__)("Appearance"):(0,xr.__)("Font style"):(0,xr.__)("Font weight")}function Yie(e){return e?.typography?.letterSpacing}function Kie(e){return e?.typography?.textTransform}function Xie(e){return e?.typography?.textAlign}function qie(e){return e?.typography?.textDecoration}function Qie(e){return e?.typography?.writingMode}function Jie(e){return e?.typography?.textColumns}function ATe(e){let t=e?.typography?.fontSizes,o=!!e?.typography?.defaultFontSizes;return[...t?.custom??[],...t?.theme??[],...o?t?.default??[]:[]]}function LTe({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n}){let i=Co(),s=()=>{let a=e(o);t(a)};return(0,vt.jsx)(Lo.__experimentalToolsPanel,{label:(0,xr.__)("Typography"),resetAll:s,panelId:r,dropdownMenuProps:i,children:n})}var NTe={fontFamily:!0,fontSize:!0,fontAppearance:!0,lineHeight:!0,letterSpacing:!0,textAlign:!0,textTransform:!0,textDecoration:!0,writingMode:!0,textColumns:!0};function g2({as:e=LTe,value:t,onChange:o,inheritedValue:r=t,settings:n,panelId:i,defaultControls:s=NTe}){let a=me=>bn({settings:n},"",me),c=Wie(n),u=a(r?.typography?.fontFamily),{fontFamilies:d,fontFamilyFaces:f}=(0,Bb.useMemo)(()=>Gie(n,u),[n,u]),m=me=>{let it=d?.find(({fontFamily:Le})=>Le===me)?.slug,Vo=he(t,["typography","fontFamily"],it?`var:preset|font-family|${it}`:me||void 0),li=d?.find(({fontFamily:Le})=>Le===me)?.fontFace??[],{fontStyles:es,fontWeights:Us}=Wg(li),Or=es?.some(({value:Le})=>Le===T),ze=Us?.some(({value:Le})=>Le?.toString()===A?.toString());if(!Or||!ze){let{nearestFontStyle:Le,nearestFontWeight:Tt}=Hie(li,T,A);Le||Tt?Vo={...Vo,typography:{...Vo?.typography,fontStyle:Le||void 0,fontWeight:Tt||void 0}}:(T||A)&&(Vo={...Vo,typography:{...Vo?.typography,fontStyle:void 0,fontWeight:void 0}})}o(Vo)},p=()=>!!t?.typography?.fontFamily,h=()=>m(void 0),g=Uie(n),b=!n?.typography?.customFontSize,k=ATe(n),v=a(r?.typography?.fontSize),y=(()=>{let me=r?.typography?.fontSize;if(!me||typeof me!="string")return;if(me.startsWith("var:preset|font-size|"))return me.replace("var:preset|font-size|","");let it=me.match(/^var\(--wp--preset--font-size--([^)]+)\)$/);if(it)return it[1]})(),_=(me,it)=>{let Vo=it?.slug?`var:preset|font-size|${it?.slug}`:me;o(he(t,["typography","fontSize"],Vo||void 0))},w=()=>!!t?.typography?.fontSize,C=()=>_(void 0),E=$ie(n),R=OTe(n),O=n?.typography?.fontStyle,B=n?.typography?.fontWeight,T=a(r?.typography?.fontStyle),A=a(r?.typography?.fontWeight),N=(0,Bb.useCallback)(({fontStyle:me,fontWeight:it})=>{(me!==T||it!==A)&&o({...t,typography:{...t?.typography,fontStyle:me||void 0,fontWeight:it||void 0}})},[T,A,o,t]),z=()=>!!t?.typography?.fontStyle||!!t?.typography?.fontWeight,U=(0,Bb.useCallback)(()=>{N({})},[N]),j=Zie(n),G=a(r?.typography?.lineHeight),V=me=>{o(he(t,["typography","lineHeight"],me||void 0))},H=()=>t?.typography?.lineHeight!==void 0,K=()=>V(void 0),oe=Yie(n),ee=a(r?.typography?.letterSpacing),J=me=>{o(he(t,["typography","letterSpacing"],me||void 0))},ie=()=>!!t?.typography?.letterSpacing,de=()=>J(void 0),q=Jie(n),ne=a(r?.typography?.textColumns),X=me=>{o(he(t,["typography","textColumns"],me||void 0))},W=()=>!!t?.typography?.textColumns,Q=()=>X(void 0),se=Kie(n),ce=a(r?.typography?.textTransform),_e=me=>{o(he(t,["typography","textTransform"],me||void 0))},ge=()=>!!t?.typography?.textTransform,Ae=()=>_e(void 0),Xe=qie(n),dt=a(r?.typography?.textDecoration),St=me=>{o(he(t,["typography","textDecoration"],me||void 0))},yo=()=>!!t?.typography?.textDecoration,Ge=()=>St(void 0),So=Qie(n),so=a(r?.typography?.writingMode),Fe=me=>{o(he(t,["typography","writingMode"],me||void 0))},Xt=()=>!!t?.typography?.writingMode,ft=()=>Fe(void 0),qt=Xie(n),ai=a(r?.typography?.textAlign),hr=me=>{o(he(t,["typography","textAlign"],me||void 0))},He=()=>!!t?.typography?.textAlign,ao=()=>hr(void 0),Tn=(0,Bb.useCallback)(me=>({...me,typography:{}}),[]);return(0,vt.jsxs)(e,{resetAllFilter:Tn,value:t,onChange:o,panelId:i,children:[c&&(0,vt.jsx)(Lo.__experimentalToolsPanelItem,{label:(0,xr.__)("Font"),hasValue:p,onDeselect:h,isShownByDefault:s.fontFamily,panelId:i,children:(0,vt.jsx)(GT,{fontFamilies:d,value:u,onChange:m,size:"__unstable-large"})}),g&&(0,vt.jsx)(Lo.__experimentalToolsPanelItem,{label:(0,xr.__)("Size"),hasValue:w,onDeselect:C,isShownByDefault:s.fontSize,panelId:i,children:(0,vt.jsx)(Lo.FontSizePicker,{value:y||v,valueMode:y?"slug":"literal",onChange:_,fontSizes:k,disableCustomFontSizes:b,withReset:!1,withSlider:!0,size:"__unstable-large"})}),E&&(0,vt.jsx)(Lo.__experimentalToolsPanelItem,{className:"single-column",label:R,hasValue:z,onDeselect:U,isShownByDefault:s.fontAppearance,panelId:i,children:(0,vt.jsx)(jT,{value:{fontStyle:T,fontWeight:A},onChange:N,hasFontStyles:O,hasFontWeights:B,fontFamilyFaces:f,size:"__unstable-large"})}),j&&(0,vt.jsx)(Lo.__experimentalToolsPanelItem,{className:"single-column",label:(0,xr.__)("Line height"),hasValue:H,onDeselect:K,isShownByDefault:s.lineHeight,panelId:i,children:(0,vt.jsx)(BI,{__unstableInputWidth:"auto",value:G,onChange:V,size:"__unstable-large"})}),oe&&(0,vt.jsx)(Lo.__experimentalToolsPanelItem,{className:"single-column",label:(0,xr.__)("Letter spacing"),hasValue:ie,onDeselect:de,isShownByDefault:s.letterSpacing,panelId:i,children:(0,vt.jsx)(UT,{value:ee,onChange:J,size:"__unstable-large",__unstableInputWidth:"auto"})}),q&&(0,vt.jsx)(Lo.__experimentalToolsPanelItem,{className:"single-column",label:(0,xr.__)("Columns"),hasValue:W,onDeselect:Q,isShownByDefault:s.textColumns,panelId:i,children:(0,vt.jsx)(Lo.__experimentalNumberControl,{label:(0,xr.__)("Columns"),max:RTe,min:PTe,onChange:X,size:"__unstable-large",spinControls:"custom",value:ne,initialPosition:1})}),Xe&&(0,vt.jsx)(Lo.__experimentalToolsPanelItem,{className:"single-column",label:(0,xr.__)("Decoration"),hasValue:yo,onDeselect:Ge,isShownByDefault:s.textDecoration,panelId:i,children:(0,vt.jsx)(ZT,{value:dt,onChange:St,size:"__unstable-large",__unstableInputWidth:"auto"})}),So&&(0,vt.jsx)(Lo.__experimentalToolsPanelItem,{className:"single-column",label:(0,xr.__)("Orientation"),hasValue:Xt,onDeselect:ft,isShownByDefault:s.writingMode,panelId:i,children:(0,vt.jsx)(XT,{value:so,onChange:Fe,size:"__unstable-large"})}),se&&(0,vt.jsx)(Lo.__experimentalToolsPanelItem,{label:(0,xr.__)("Letter case"),hasValue:ge,onDeselect:Ae,isShownByDefault:s.textTransform,panelId:i,children:(0,vt.jsx)(YT,{value:ce,onChange:_e,showNone:!0,isBlock:!0,size:"__unstable-large"})}),qt&&(0,vt.jsxs)(Lo.__experimentalToolsPanelItem,{label:(0,xr.__)("Text alignment"),hasValue:He,onDeselect:ao,isShownByDefault:s.textAlign,panelId:i,children:[(0,vt.jsx)(p2,{value:ai,onChange:hr,options:["left","center","right","justify"],size:"__unstable-large"}),ai==="justify"&&(0,vt.jsx)("div",{children:(0,vt.jsx)(Lo.Notice,{status:"warning",isDismissible:!1,children:(0,xr.__)("Justified text can reduce readability. For better accessibility, use left-aligned text instead.")})})]})]})}var Ht=l(L(),1),Lt=l(P(),1);var Tb=l(I(),1);var Qe=l(P(),1),No=l(L(),1),tse=l(I(),1),b2=l(M(),1);var ese=l(M(),1);function Dm(e,t){let{getBlockOrder:o,getBlockAttributes:r}=(0,ese.useSelect)(S);return(i,s)=>{let a=(s-1)*t+i-1,c=0;for(let u of o(e)){let{columnStart:d,rowStart:f}=r(u).style?.layout??{};(f-1)*t+d-1<a&&c++}return c}}var Gt=l(x(),1);function MTe(e,t){let{orientation:o="horizontal"}=t;return e==="fill"?(0,No.__)("Stretch to fill available space."):e==="fixed"&&o==="horizontal"?(0,No.__)("Specify a fixed width."):e==="fixed"?(0,No.__)("Specify a fixed height."):(0,No.__)("Fit contents.")}function ose({value:e={},onChange:t,parentLayout:o,isShownByDefault:r,panelId:n}){let{type:i,default:{type:s="default"}={}}=o??{},a=i||s;return a==="flex"?(0,Gt.jsx)(DTe,{childLayout:e,onChange:t,parentLayout:o,isShownByDefault:r,panelId:n}):a==="grid"?(0,Gt.jsx)(FTe,{childLayout:e,onChange:t,parentLayout:o,isShownByDefault:r,panelId:n}):null}function DTe({childLayout:e,onChange:t,parentLayout:o,isShownByDefault:r,panelId:n}){let{selfStretch:i,flexSize:s}=e,{orientation:a="horizontal"}=o??{},c=()=>!!i,u=a==="horizontal"?(0,No.__)("Width"):(0,No.__)("Height"),[d]=pe("spacing.units"),f=(0,Qe.__experimentalUseCustomUnits)({availableUnits:d||["%","px","em","rem","vh","vw"]}),m=()=>{t({selfStretch:void 0,flexSize:void 0})};return(0,tse.useEffect)(()=>{i==="fixed"&&!s&&t({...e,selfStretch:"fit"})},[]),(0,Gt.jsxs)(Qe.__experimentalVStack,{as:Qe.__experimentalToolsPanelItem,spacing:2,hasValue:c,label:u,onDeselect:m,isShownByDefault:r,panelId:n,children:[(0,Gt.jsxs)(Qe.__experimentalToggleGroupControl,{size:"__unstable-large",label:VTe(o),value:i||"fit",help:MTe(i,o),onChange:p=>{t({selfStretch:p,flexSize:p!=="fixed"?null:s})},isBlock:!0,children:[(0,Gt.jsx)(Qe.__experimentalToggleGroupControlOption,{value:"fit",label:(0,No._x)("Fit","Intrinsic block width in flex layout")},"fit"),(0,Gt.jsx)(Qe.__experimentalToggleGroupControlOption,{value:"fill",label:(0,No._x)("Grow","Block with expanding width in flex layout")},"fill"),(0,Gt.jsx)(Qe.__experimentalToggleGroupControlOption,{value:"fixed",label:(0,No._x)("Fixed","Block with fixed width in flex layout")},"fixed")]}),i==="fixed"&&(0,Gt.jsx)(Qe.__experimentalUnitControl,{size:"__unstable-large",units:f,onChange:p=>{t({selfStretch:i,flexSize:p})},value:s,min:0,label:u,hideLabelFromVision:!0})]})}function VTe(e){let{orientation:t="horizontal"}=e;return t==="horizontal"?(0,No.__)("Width"):(0,No.__)("Height")}function FTe({childLayout:e,onChange:t,parentLayout:o,isShownByDefault:r,panelId:n}){let{columnStart:i,rowStart:s,columnSpan:a,rowSpan:c}=e,{columnCount:u,rowCount:d}=o??{},f=(0,b2.useSelect)(w=>w(S).getBlockRootClientId(n)),{moveBlocksToPosition:m,__unstableMarkNextChangeAsNotPersistent:p}=(0,b2.useDispatch)(S),h=Dm(f,u||3),g=()=>!!i||!!s,b=()=>!!a||!!c,k=()=>{t({columnStart:void 0,rowStart:void 0})},v=()=>{t({columnSpan:void 0,rowSpan:void 0})},y=u?u-(i??1)+1:void 0,_=window.__experimentalEnableGridInteractivity&&d?d-(s??1)+1:void 0;return(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsxs)(Qe.Flex,{as:Qe.__experimentalToolsPanelItem,hasValue:b,label:(0,No.__)("Grid span"),onDeselect:v,isShownByDefault:r,panelId:n,children:[(0,Gt.jsx)(Qe.FlexItem,{style:{width:"50%"},children:(0,Gt.jsx)(Qe.__experimentalInputControl,{size:"__unstable-large",label:(0,No.__)("Column span"),type:"number",onChange:w=>{let C=w===""?1:parseInt(w,10),E=y?Math.min(C,y):C;t({columnStart:i,rowStart:s,rowSpan:c,columnSpan:E})},value:a??1,min:1,max:y})}),(0,Gt.jsx)(Qe.FlexItem,{style:{width:"50%"},children:(0,Gt.jsx)(Qe.__experimentalInputControl,{size:"__unstable-large",label:(0,No.__)("Row span"),type:"number",onChange:w=>{let C=w===""?1:parseInt(w,10),E=_?Math.min(C,_):C;t({columnStart:i,rowStart:s,columnSpan:a,rowSpan:E})},value:c??1,min:1,max:_})})]}),window.__experimentalEnableGridInteractivity&&(0,Gt.jsxs)(Qe.Flex,{as:Qe.__experimentalToolsPanelItem,hasValue:g,label:(0,No.__)("Grid placement"),onDeselect:k,isShownByDefault:!1,panelId:n,children:[(0,Gt.jsx)(Qe.FlexItem,{style:{width:"50%"},children:(0,Gt.jsx)(Qe.__experimentalInputControl,{size:"__unstable-large",label:(0,No.__)("Column"),type:"number",onChange:w=>{let C=w===""?1:parseInt(w,10);t({columnStart:C,rowStart:s,columnSpan:a,rowSpan:c}),p(),m([n],f,f,h(C,s))},value:i??1,min:1,max:u?u-(a??1)+1:void 0})}),(0,Gt.jsx)(Qe.FlexItem,{style:{width:"50%"},children:(0,Gt.jsx)(Qe.__experimentalInputControl,{size:"__unstable-large",label:(0,No.__)("Row"),type:"number",onChange:w=>{let C=w===""?1:parseInt(w,10);t({columnStart:i,rowStart:C,columnSpan:a,rowSpan:c}),p(),m([n],f,f,h(i,C))},value:s??1,min:1,max:d?d-(c??1)+1:void 0})})]})]})}var k2=l(P(),1),Eb=l(L(),1);var i4=l(x(),1);function v2({panelId:e,value:t,onChange:o=()=>{},options:r,defaultValue:n="auto",hasValue:i,isShownByDefault:s=!0}){let a=t??"auto",[c,u,d]=pe("dimensions.aspectRatios.default","dimensions.aspectRatios.theme","dimensions.defaultAspectRatios"),f=u?.map(({name:h,ratio:g})=>({label:h,value:g})),m=c?.map(({name:h,ratio:g})=>({label:h,value:g})),p=[{label:(0,Eb._x)("Original","Aspect ratio option for dimensions control"),value:"auto"},...d?m:[],...f||[],{label:(0,Eb._x)("Custom","Aspect ratio option for dimensions control"),value:"custom",disabled:!0,hidden:!0}];return(0,i4.jsx)(k2.__experimentalToolsPanelItem,{hasValue:i||(()=>a!==n),label:(0,Eb.__)("Aspect ratio"),onDeselect:()=>o(void 0),isShownByDefault:s,panelId:e,children:(0,i4.jsx)(k2.SelectControl,{label:(0,Eb.__)("Aspect ratio"),value:a,options:r??p,onChange:o,size:"__unstable-large"})})}var Ze=l(x(),1),s4=["horizontal","vertical"];function y2(e){let t=ise(e),o=sse(e),r=ase(e),n=lse(e),i=cse(e),s=use(e),a=dse(e),c=fse(e),u=mse(e),d=pse(e);return Tb.Platform.OS==="web"&&(t||o||r||n||i||s||a||c||u||d)}function ise(e){return e?.layout?.contentSize}function sse(e){return e?.layout?.wideSize}function ase(e){return e?.spacing?.padding}function lse(e){return e?.spacing?.margin}function cse(e){return e?.spacing?.blockGap}function use(e){return e?.dimensions?.height}function dse(e){return e?.dimensions?.minHeight}function fse(e){return e?.dimensions?.width}function mse(e){return e?.dimensions?.aspectRatio}function pse(e){let{type:t="default",default:{type:o="default"}={},allowSizingOnChildren:r=!1}=e?.parentLayout??{},n=(o==="flex"||t==="flex"||o==="grid"||t==="grid")&&r;return!!e?.layout&&n}function zTe(e){let{defaultSpacingSizes:t,spacingSizes:o}=e?.spacing||{};return t!==!1&&o?.default?.length>0||o?.theme?.length>0||o?.custom?.length>0}function rse(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 nse(e){return e&&typeof e=="string"?{top:e,right:e,bottom:e,left:e}:e}function jTe(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 GTe({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n}){let i=Co(),s=()=>{let a=e(o);t(a)};return(0,Ze.jsx)(Lt.__experimentalToolsPanel,{label:(0,Ht.__)("Dimensions"),resetAll:s,panelId:r,dropdownMenuProps:i,children:n})}var Ls={contentSize:!0,wideSize:!0,padding:!0,margin:!0,blockGap:!0,height:!0,minHeight:!0,width:!0,aspectRatio:!0,childLayout:!0};function S2({as:e=GTe,value:t,onChange:o,inheritedValue:r=t,settings:n,panelId:i,defaultControls:s=Ls,onVisualize:a=()=>{},includeLayoutControls:c=!1}){let{dimensions:u,spacing:d}=n,f=le=>le&&typeof le=="object"?Object.keys(le).reduce((Pe,_o)=>(Pe[_o]=bn({settings:{dimensions:u,spacing:d}},"",le[_o]),Pe),{}):bn({settings:{dimensions:u,spacing:d}},"",le),m=zTe(n),p=(0,Lt.__experimentalUseCustomUnits)({availableUnits:n?.spacing?.units||["%","px","em","rem","vw"]}),h=-1/0,[g,b]=(0,Tb.useState)(h),k=ise(n)&&c,v=f(r?.layout?.contentSize),y=le=>{o(he(t,["layout","contentSize"],le||void 0))},_=()=>!!t?.layout?.contentSize,w=()=>y(void 0),C=sse(n)&&c,E=f(r?.layout?.wideSize),R=le=>{o(he(t,["layout","wideSize"],le||void 0))},O=()=>!!t?.layout?.wideSize,B=()=>R(void 0),T=ase(n),A=f(r?.spacing?.padding),N=nse(A),z=Array.isArray(n?.spacing?.padding)?n?.spacing?.padding:n?.spacing?.padding?.sides,U=z&&z.some(le=>s4.includes(le)),j=le=>{let Pe=rse(le,z);o(he(t,["spacing","padding"],Pe))},G=()=>!!t?.spacing?.padding&&Object.keys(t?.spacing?.padding).length,V=()=>j(void 0),H=()=>a("padding"),K=lse(n),oe=f(r?.spacing?.margin),ee=nse(oe),J=Array.isArray(n?.spacing?.margin)?n?.spacing?.margin:n?.spacing?.margin?.sides,ie=J&&J.some(le=>s4.includes(le)),de=le=>{let Pe=rse(le,J);o(he(t,["spacing","margin"],Pe))},q=()=>!!t?.spacing?.margin&&Object.keys(t?.spacing?.margin).length,ne=()=>de(void 0),X=()=>a("margin"),W=cse(n),Q=Array.isArray(n?.spacing?.blockGap)?n?.spacing?.blockGap:n?.spacing?.blockGap?.sides,se=Q&&Q.some(le=>s4.includes(le)),ce=f(r?.spacing?.blockGap),_e=jTe(ce,se),ge=le=>{o(he(t,["spacing","blockGap"],le))},Ae=le=>{le||ge(null),!se&&le?.hasOwnProperty("top")?ge(le.top):ge({top:le?.top,left:le?.left})},Xe=()=>ge(void 0),dt=()=>!!t?.spacing?.blockGap,St=dse(n),yo=f(r?.dimensions?.minHeight),Ge=le=>{let Pe=he(t,["dimensions","minHeight"],le);o(he(Pe,["dimensions","aspectRatio"],void 0))},So=()=>{Ge(void 0)},so=()=>!!t?.dimensions?.minHeight,Fe=use(n),Xt=f(r?.dimensions?.height),ft=le=>{let Pe=he(t,["dimensions","height"],le);o(he(Pe,["dimensions","aspectRatio"],void 0))},qt=()=>{ft(void 0)},ai=()=>!!t?.dimensions?.height,hr=fse(n),He=f(r?.dimensions?.width),ao=le=>{o(he(t,["dimensions","width"],le))},Tn=()=>{ao(void 0)},me=()=>!!t?.dimensions?.width,it=mse(n),Vo=f(r?.dimensions?.aspectRatio),li=le=>{let Pe=he(t,["dimensions","aspectRatio"],le);o(he(Pe,["dimensions","minHeight"],void 0))},es=()=>!!t?.dimensions?.aspectRatio,Us=pse(n),Or=r?.layout,ze=le=>{o({...t,layout:{...le}})},Le=(0,Tb.useCallback)(le=>({...le,layout:Se({...le?.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:{...le?.spacing,padding:void 0,margin:void 0,blockGap:void 0},dimensions:{...le?.dimensions,height:void 0,minHeight:void 0,aspectRatio:void 0,width:void 0}}),[]),Tt=()=>a(!1);return(0,Ze.jsxs)(e,{resetAllFilter:Le,value:t,onChange:o,panelId:i,children:[(k||C)&&(0,Ze.jsx)("span",{className:"span-columns",children:(0,Ht.__)("Set the width of the main content area.")}),k&&(0,Ze.jsx)(Lt.__experimentalToolsPanelItem,{label:(0,Ht.__)("Content width"),hasValue:_,onDeselect:w,isShownByDefault:s.contentSize??Ls.contentSize,panelId:i,children:(0,Ze.jsx)(Lt.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,Ht.__)("Content width"),labelPosition:"top",value:v||"",onChange:le=>{y(le)},units:p,prefix:(0,Ze.jsx)(Lt.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,Ze.jsx)(Ee,{icon:of})})})}),C&&(0,Ze.jsx)(Lt.__experimentalToolsPanelItem,{label:(0,Ht.__)("Wide width"),hasValue:O,onDeselect:B,isShownByDefault:s.wideSize??Ls.wideSize,panelId:i,children:(0,Ze.jsx)(Lt.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,Ht.__)("Wide width"),labelPosition:"top",value:E||"",onChange:le=>{R(le)},units:p,prefix:(0,Ze.jsx)(Lt.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,Ze.jsx)(Ee,{icon:ff})})})}),T&&(0,Ze.jsxs)(Lt.__experimentalToolsPanelItem,{hasValue:G,label:(0,Ht.__)("Padding"),onDeselect:V,isShownByDefault:s.padding??Ls.padding,className:D({"tools-panel-item-spacing":m}),panelId:i,children:[!m&&(0,Ze.jsx)(Lt.BoxControl,{__next40pxDefaultSize:!0,values:N,onChange:j,label:(0,Ht.__)("Padding"),sides:z,units:p,allowReset:!1,splitOnAxis:U,inputProps:{onMouseOver:H,onMouseOut:Tt}}),m&&(0,Ze.jsx)(_b,{values:N,onChange:j,label:(0,Ht.__)("Padding"),sides:z,units:p,allowReset:!1,onMouseOver:H,onMouseOut:Tt})]}),K&&(0,Ze.jsxs)(Lt.__experimentalToolsPanelItem,{hasValue:q,label:(0,Ht.__)("Margin"),onDeselect:ne,isShownByDefault:s.margin??Ls.margin,className:D({"tools-panel-item-spacing":m}),panelId:i,children:[!m&&(0,Ze.jsx)(Lt.BoxControl,{__next40pxDefaultSize:!0,values:ee,onChange:de,inputProps:{min:g,onDragStart:()=>{b(0)},onDragEnd:()=>{b(h)},onMouseOver:X,onMouseOut:Tt},label:(0,Ht.__)("Margin"),sides:J,units:p,allowReset:!1,splitOnAxis:ie}),m&&(0,Ze.jsx)(_b,{values:ee,onChange:de,minimumCustomValue:-1/0,label:(0,Ht.__)("Margin"),sides:J,units:p,allowReset:!1,onMouseOver:X,onMouseOut:Tt})]}),W&&(0,Ze.jsxs)(Lt.__experimentalToolsPanelItem,{hasValue:dt,label:(0,Ht.__)("Block spacing"),onDeselect:Xe,isShownByDefault:s.blockGap??Ls.blockGap,className:D({"tools-panel-item-spacing":m,"single-column":!m&&!se}),panelId:i,children:[!m&&(se?(0,Ze.jsx)(Lt.BoxControl,{__next40pxDefaultSize:!0,label:(0,Ht.__)("Block spacing"),min:0,onChange:Ae,units:p,sides:Q,values:_e,allowReset:!1,splitOnAxis:se}):(0,Ze.jsx)(Lt.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,Ht.__)("Block spacing"),min:0,onChange:ge,units:p,value:ce})),m&&(0,Ze.jsx)(_b,{label:(0,Ht.__)("Block spacing"),min:0,onChange:Ae,showSideInLabel:!1,sides:se?Q:["top"],values:_e,allowReset:!1})]}),Us&&(0,Ze.jsx)(ose,{value:Or,onChange:ze,parentLayout:n?.parentLayout,panelId:i,isShownByDefault:s.childLayout??Ls.childLayout}),St&&(0,Ze.jsx)(Lt.__experimentalToolsPanelItem,{hasValue:so,label:(0,Ht.__)("Minimum height"),onDeselect:So,isShownByDefault:s.minHeight??Ls.minHeight,panelId:i,children:(0,Ze.jsx)(Yg,{label:(0,Ht.__)("Minimum height"),value:yo,onChange:Ge})}),Fe&&(0,Ze.jsx)(Lt.__experimentalToolsPanelItem,{hasValue:ai,label:(0,Ht.__)("Height"),onDeselect:qt,isShownByDefault:s.height??Ls.height,panelId:i,children:(0,Ze.jsx)(Yg,{label:(0,Ht.__)("Height"),value:Xt,onChange:ft})}),hr&&(0,Ze.jsx)(Lt.__experimentalToolsPanelItem,{hasValue:me,label:(0,Ht.__)("Width"),onDeselect:Tn,isShownByDefault:s.width??Ls.width,panelId:i,children:(0,Ze.jsx)(Yg,{label:(0,Ht.__)("Width"),value:He,onChange:ao})}),it&&(0,Ze.jsx)(v2,{hasValue:es,value:Vo,onChange:li,panelId:i,isShownByDefault:s.aspectRatio??Ls.aspectRatio})]})}var qr=l(P(),1),Pb=l(I(),1),Ib=l(L(),1);var Vm=l(L(),1),ko=l(P(),1),x2=l(I(),1);var Bt=l(x(),1),_2=[];function HTe({shadow:e,onShadowChange:t,settings:o}){let r=a4(o);return(0,Bt.jsx)("div",{className:"block-editor-global-styles__shadow-popover-container",children:(0,Bt.jsxs)(ko.__experimentalVStack,{spacing:4,children:[(0,Bt.jsx)(ko.__experimentalHeading,{level:5,children:(0,Vm.__)("Drop shadow")}),(0,Bt.jsx)(UTe,{presets:r,activeShadow:e,onSelect:t}),(0,Bt.jsx)("div",{className:"block-editor-global-styles__clear-shadow",children:(0,Bt.jsx)(ko.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>t(void 0),disabled:!e,accessibleWhenDisabled:!0,children:(0,Vm.__)("Clear")})})]})})}function UTe({presets:e,activeShadow:t,onSelect:o}){return e?(0,Bt.jsx)(ko.Composite,{role:"listbox",className:"block-editor-global-styles__shadow__list","aria-label":(0,Vm.__)("Drop shadows"),children:e.map(({name:r,slug:n,shadow:i})=>(0,Bt.jsx)(WTe,{label:r,isActive:i===t,type:n==="unset"?"unset":"preset",onSelect:()=>o(i===t?void 0:i),shadow:i},n))}):null}function WTe({type:e,label:t,isActive:o,onSelect:r,shadow:n}){return(0,Bt.jsx)(ko.Tooltip,{text:t,children:(0,Bt.jsx)(ko.Composite.Item,{role:"option","aria-label":t,"aria-selected":o,className:D("block-editor-global-styles__shadow__item",{"is-active":o}),render:(0,Bt.jsx)("button",{className:D("block-editor-global-styles__shadow-indicator",{unset:e==="unset"}),onClick:r,style:{boxShadow:n},"aria-label":t,children:o&&(0,Bt.jsx)(Ee,{icon:al})})})})}function hse({shadow:e,onShadowChange:t,settings:o}){return(0,Bt.jsx)(ko.Dropdown,{popoverProps:{placement:"left-start",offset:36,shift:!0},className:"block-editor-global-styles__shadow-dropdown",renderToggle:ZTe(e,t),renderContent:()=>(0,Bt.jsx)(ko.__experimentalDropdownContentWrapper,{paddingSize:"medium",children:(0,Bt.jsx)(HTe,{shadow:e,onShadowChange:t,settings:o})})})}function ZTe(e,t){return({onToggle:o,isOpen:r})=>{let n=(0,x2.useRef)(void 0),i={onClick:o,className:D("block-editor-global-styles__shadow-dropdown-toggle",{"is-open":r}),"aria-expanded":r,ref:n},s={onClick:()=>{r&&o(),t(void 0),n.current?.focus()},className:D("block-editor-global-styles__shadow-editor__remove-button",{"is-open":r}),label:(0,Vm.__)("Remove")};return(0,Bt.jsxs)(Bt.Fragment,{children:[(0,Bt.jsx)(ko.Button,{__next40pxDefaultSize:!0,...i,children:(0,Bt.jsxs)(ko.__experimentalHStack,{justify:"flex-start",children:[(0,Bt.jsx)(Ee,{className:"block-editor-global-styles__toggle-icon",icon:BL,size:24}),(0,Bt.jsx)(ko.FlexItem,{children:(0,Vm.__)("Drop shadow")})]})}),!!e&&(0,Bt.jsx)(ko.Button,{__next40pxDefaultSize:!0,size:"small",icon:Nr,...s})]})}}function a4(e){return(0,x2.useMemo)(()=>{if(!e?.shadow)return _2;let t=e?.shadow?.defaultPresets,{default:o,theme:r,custom:n}=e?.shadow?.presets??{},i={name:(0,Vm.__)("Unset"),slug:"unset",shadow:"none"},s=[...t&&o||_2,...r||_2,...n||_2];return s.length&&s.unshift(i),s},[e])}var Ns=l(x(),1);function w2(e){return Object.values(e_(e)).some(Boolean)}function e_(e){return{hasBorderColor:gse(e),hasBorderRadius:bse(e),hasBorderStyle:kse(e),hasBorderWidth:vse(e),hasShadow:yse(e)}}function gse(e){return e?.border?.color}function bse(e){return e?.border?.radius}function kse(e){return e?.border?.style}function vse(e){return e?.border?.width}function yse(e){let t=a4(e);return!!e?.shadow&&t.length>0}function $Te({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n,label:i}){let s=Co();return(0,Ns.jsx)(qr.__experimentalToolsPanel,{label:i,resetAll:()=>{let c=e(o);t(c)},panelId:r,dropdownMenuProps:s,children:n})}var YTe={radius:!0,color:!0,width:!0,shadow:!0};function C2({as:e=$Te,value:t,onChange:o,inheritedValue:r=t,settings:n,panelId:i,name:s,defaultControls:a=YTe}){let c=Fa(n),u=(0,Pb.useCallback)(G=>bn({settings:n},"",G),[n]),d=G=>{let H=c.flatMap(({colors:K})=>K).find(({color:K})=>K===G);return H?"var:preset|color|"+H.slug:G},f=(0,Pb.useMemo)(()=>{if((0,qr.__experimentalHasSplitBorders)(r?.border)){let G={...r?.border};return["top","right","bottom","left"].forEach(V=>{G[V]={...G[V],color:u(G[V]?.color)}}),G}return{...r?.border,color:r?.border?.color?u(r?.border?.color):void 0}},[r?.border,u]),m=G=>o({...t,border:G}),p=gse(n),h=kse(n),g=vse(n),b=bse(n),k=(0,Pb.useMemo)(()=>typeof r?.border?.radius!="object"?u(r?.border?.radius):{topLeft:u(r?.border?.radius?.topLeft),topRight:u(r?.border?.radius?.topRight),bottomLeft:u(r?.border?.radius?.bottomLeft),bottomRight:u(r?.border?.radius?.bottomRight)},[r?.border?.radius,u]),v=G=>m({...f,radius:G}),y=()=>{let G=t?.border?.radius;return typeof G=="object"?Object.entries(G).some(Boolean):!!G},_=yse(n),w=u(r?.shadow),C=n?.shadow?.presets??{},E=C.custom??C.theme??C.default??[],R=G=>{let V=E?.find(({shadow:H})=>H===G)?.slug;o(he(t,["shadow"],V?`var:preset|shadow|${V}`:G||void 0))},O=()=>!!t?.shadow,B=()=>R(void 0),T=()=>{if(y())return m({radius:t?.border?.radius});m(void 0)},A=G=>{let V={...G};(0,qr.__experimentalHasSplitBorders)(V)?["top","right","bottom","left"].forEach(H=>{V[H]&&(V[H]={...V[H],color:d(V[H]?.color)})}):V&&(V.color=d(V.color)),m({radius:f?.radius,...V})},N=(0,Pb.useCallback)(G=>({...G,border:void 0,shadow:void 0}),[]),z=a?.color||a?.width,U=p||h||g||b,j=Rb({blockName:s,hasShadowControl:_,hasBorderControl:U});return(0,Ns.jsxs)(e,{resetAllFilter:N,value:t,onChange:o,panelId:i,label:j,children:[(g||p)&&(0,Ns.jsx)(qr.__experimentalToolsPanelItem,{hasValue:()=>(0,qr.__experimentalIsDefinedBorder)(t?.border),label:(0,Ib.__)("Border"),onDeselect:()=>T(),isShownByDefault:z,panelId:i,children:(0,Ns.jsx)(qr.BorderBoxControl,{colors:c,enableAlpha:!0,enableStyle:h,onChange:A,popoverOffset:40,popoverPlacement:"left-start",value:f,__experimentalIsRenderedInSidebar:!0,size:"__unstable-large",hideLabelFromVision:!_,label:(0,Ib.__)("Border")})}),b&&(0,Ns.jsx)(qr.__experimentalToolsPanelItem,{hasValue:y,label:(0,Ib.__)("Radius"),onDeselect:()=>v(void 0),isShownByDefault:a.radius,panelId:i,children:(0,Ns.jsx)(NT,{presets:n?.border?.radiusSizes,values:k,onChange:G=>{v(G||void 0)}})}),_&&(0,Ns.jsxs)(qr.__experimentalToolsPanelItem,{label:(0,Ib.__)("Shadow"),hasValue:O,onDeselect:B,isShownByDefault:a.shadow,panelId:i,children:[U?(0,Ns.jsx)(qr.BaseControl.VisualLabel,{as:"legend",children:(0,Ib.__)("Shadow")}):null,(0,Ns.jsx)(hse,{shadow:w,onShadowChange:R,settings:n})]})]})}var Wt=l(P(),1),E2=l(I(),1),Ut=l(L(),1);var rt=l(x(),1);function T2(e){let t=_se(e),o=Bse(e),r=xse(e),n=kd(e),i=Cse(e),s=wse(e);return t||o||r||n||i||s}function _se(e){let t=Fa(e);return e?.color?.text&&(t?.length>0||e?.color?.custom)}function xse(e){let t=Fa(e);return e?.color?.link&&(t?.length>0||e?.color?.custom)}function wse(e){let t=Fa(e);return e?.color?.caption&&(t?.length>0||e?.color?.custom)}function kd(e){let t=Fa(e),o=JS(e);return e?.color?.heading&&(t?.length>0||e?.color?.custom||o?.length>0||e?.color?.customGradient)}function Cse(e){let t=Fa(e),o=JS(e);return e?.color?.button&&(t?.length>0||e?.color?.custom||o?.length>0||e?.color?.customGradient)}function Bse(e){let t=Fa(e),o=JS(e);return e?.color?.background&&(t?.length>0||e?.color?.custom||o?.length>0||e?.color?.customGradient)}function l4({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n,label:i}){let s=Co(),a=()=>{let c=e(o);t(c)};return(0,rt.jsx)(Wt.__experimentalToolsPanel,{label:i||(0,Ut.__)("Elements"),resetAll:a,panelId:r,hasInnerWrapper:!0,headingLevel:3,className:"color-block-support-panel",__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last",dropdownMenuProps:s,children:(0,rt.jsx)("div",{className:"color-block-support-panel__inner-wrapper",children:n})})}var KTe={text:!0,background:!0,link:!0,heading:!0,button:!0,caption:!0},XTe={placement:"left-start",offset:36,shift:!0},{Tabs:B2}=F(Wt.privateApis),qTe=({indicators:e,label:t})=>(0,rt.jsxs)(Wt.__experimentalHStack,{justify:"flex-start",children:[(0,rt.jsx)(Wt.__experimentalZStack,{isLayered:!1,offset:-8,children:e.map((o,r)=>(0,rt.jsx)(Wt.Flex,{expanded:!1,children:(0,rt.jsx)(Wt.ColorIndicator,{colorValue:o})},r))}),(0,rt.jsx)(Wt.FlexItem,{className:"block-editor-panel-color-gradient-settings__color-name",children:t})]});function Sse({isGradient:e,inheritedValue:t,userValue:o,setValue:r,colorGradientControlSettings:n}){return(0,rt.jsx)(od,{...n,showTitle:!1,enableAlpha:!0,__experimentalIsRenderedInSidebar:!0,colorValue:e?void 0:t,gradientValue:e?t:void 0,onColorChange:e?void 0:r,onGradientChange:e?r:void 0,clearable:t===o,headingLevel:3})}function QTe({label:e,hasValue:t,resetValue:o,isShownByDefault:r,indicators:n,tabs:i,colorGradientControlSettings:s,panelId:a}){let c=i.find(m=>m.userValue!==void 0),{key:u,...d}=i[0]??{},f=(0,E2.useRef)(void 0);return(0,rt.jsx)(Wt.__experimentalToolsPanelItem,{className:"block-editor-tools-panel-color-gradient-settings__item",hasValue:t,label:e,onDeselect:o,isShownByDefault:r,panelId:a,children:(0,rt.jsx)(Wt.Dropdown,{popoverProps:XTe,className:"block-editor-tools-panel-color-gradient-settings__dropdown",renderToggle:({onToggle:m,isOpen:p})=>{let h={onClick:m,className:D("block-editor-panel-color-gradient-settings__dropdown",{"is-open":p}),"aria-expanded":p,ref:f};return(0,rt.jsxs)(rt.Fragment,{children:[(0,rt.jsx)(Wt.Button,{...h,__next40pxDefaultSize:!0,children:(0,rt.jsx)(qTe,{indicators:n,label:e})}),t()&&(0,rt.jsx)(Wt.Button,{__next40pxDefaultSize:!0,label:(0,Ut.__)("Reset"),className:"block-editor-panel-color-gradient-settings__reset",size:"small",icon:Nr,onClick:()=>{o(),p&&m(),f.current?.focus()}})]})},renderContent:()=>(0,rt.jsx)(Wt.__experimentalDropdownContentWrapper,{paddingSize:"none",children:(0,rt.jsxs)("div",{className:"block-editor-panel-color-gradient-settings__dropdown-content",children:[i.length===1&&(0,rt.jsx)(Sse,{...d,colorGradientControlSettings:s},u),i.length>1&&(0,rt.jsxs)(B2,{defaultTabId:c?.key,children:[(0,rt.jsx)(B2.TabList,{children:i.map(m=>(0,rt.jsx)(B2.Tab,{tabId:m.key,children:m.label},m.key))}),i.map(m=>{let{key:p,...h}=m;return(0,rt.jsx)(B2.TabPanel,{tabId:p,focusable:!1,children:(0,rt.jsx)(Sse,{...h,colorGradientControlSettings:s},p)},p)})]})]})})})})}function I2({as:e=l4,value:t,onChange:o,inheritedValue:r=t,settings:n,panelId:i,defaultControls:s=KTe,label:a,children:c}){let u=Fa(n),d=JS(n),f=n?.color?.custom,m=n?.color?.customGradient,p=u.length>0||f,h=d.length>0||m,g=W=>bn({settings:n},"",W),b=W=>{let se=u.flatMap(({colors:ce})=>ce).find(({color:ce})=>ce===W);return se?"var:preset|color|"+se.slug:W},k=W=>{let se=d.flatMap(({gradients:ce})=>ce).find(({gradient:ce})=>ce===W);return se?"var:preset|gradient|"+se.slug:W},v=Bse(n),y=g(r?.color?.background),_=g(t?.color?.background),w=g(r?.color?.gradient),C=g(t?.color?.gradient),E=()=>!!_||!!C,R=W=>{let Q=he(t,["color","background"],b(W));Q.color.gradient=void 0,o(Q)},O=W=>{let Q=he(t,["color","gradient"],k(W));Q.color.background=void 0,o(Q)},B=()=>{let W=he(t,["color","background"],void 0);W.color.gradient=void 0,o(W)},T=xse(n),A=g(r?.elements?.link?.color?.text),N=g(t?.elements?.link?.color?.text),z=W=>{o(he(t,["elements","link","color","text"],b(W)))},U=g(r?.elements?.link?.[":hover"]?.color?.text),j=g(t?.elements?.link?.[":hover"]?.color?.text),G=W=>{o(he(t,["elements","link",":hover","color","text"],b(W)))},V=()=>!!N||!!j,H=()=>{let W=he(t,["elements","link",":hover","color","text"],void 0);W=he(W,["elements","link","color","text"],void 0),o(W)},K=_se(n),oe=g(r?.color?.text),ee=g(t?.color?.text),J=()=>!!ee,ie=W=>{let Q=he(t,["color","text"],b(W));oe===A&&(Q=he(Q,["elements","link","color","text"],b(W))),o(Q)},de=()=>ie(void 0),q=[{name:"caption",label:(0,Ut.__)("Captions"),showPanel:wse(n)},{name:"button",label:(0,Ut.__)("Button"),showPanel:Cse(n)},{name:"heading",label:(0,Ut.__)("Heading"),showPanel:kd(n)},{name:"h1",label:(0,Ut.__)("H1"),showPanel:kd(n)},{name:"h2",label:(0,Ut.__)("H2"),showPanel:kd(n)},{name:"h3",label:(0,Ut.__)("H3"),showPanel:kd(n)},{name:"h4",label:(0,Ut.__)("H4"),showPanel:kd(n)},{name:"h5",label:(0,Ut.__)("H5"),showPanel:kd(n)},{name:"h6",label:(0,Ut.__)("H6"),showPanel:kd(n)}],ne=(0,E2.useCallback)(W=>({...W,color:void 0,elements:{...W?.elements,link:{...W?.elements?.link,color:void 0,":hover":{color:void 0}},...q.reduce((Q,se)=>({...Q,[se.name]:{...W?.elements?.[se.name],color:void 0}}),{})}}),[q]),X=[K&&{key:"text",label:(0,Ut.__)("Text"),hasValue:J,resetValue:de,isShownByDefault:s.text,indicators:[oe],tabs:[{key:"text",label:(0,Ut.__)("Text"),inheritedValue:oe,setValue:ie,userValue:ee}]},v&&{key:"background",label:(0,Ut.__)("Background"),hasValue:E,resetValue:B,isShownByDefault:s.background,indicators:[w??y],tabs:[p&&{key:"background",label:(0,Ut.__)("Color"),inheritedValue:y,setValue:R,userValue:_},h&&{key:"gradient",label:(0,Ut.__)("Gradient"),inheritedValue:w,setValue:O,userValue:C,isGradient:!0}].filter(Boolean)},T&&{key:"link",label:(0,Ut.__)("Link"),hasValue:V,resetValue:H,isShownByDefault:s.link,indicators:[A,U],tabs:[{key:"link",label:(0,Ut.__)("Default"),inheritedValue:A,setValue:z,userValue:N},{key:"hover",label:(0,Ut.__)("Hover"),inheritedValue:U,setValue:G,userValue:j}]}].filter(Boolean);return q.forEach(({name:W,label:Q,showPanel:se})=>{if(!se)return;let ce=g(r?.elements?.[W]?.color?.background),_e=g(r?.elements?.[W]?.color?.gradient),ge=g(r?.elements?.[W]?.color?.text),Ae=g(t?.elements?.[W]?.color?.background),Xe=g(t?.elements?.[W]?.color?.gradient),dt=g(t?.elements?.[W]?.color?.text),St=()=>!!(dt||Ae||Xe),yo=()=>{let ft=he(t,["elements",W,"color","background"],void 0);ft.elements[W].color.gradient=void 0,ft.elements[W].color.text=void 0,o(ft)},Ge=ft=>{o(he(t,["elements",W,"color","text"],b(ft)))},So=ft=>{let qt=he(t,["elements",W,"color","background"],b(ft));qt.elements[W].color.gradient=void 0,o(qt)},so=ft=>{let qt=he(t,["elements",W,"color","gradient"],k(ft));qt.elements[W].color.background=void 0,o(qt)},Fe=!0,Xt=W!=="caption";X.push({key:W,label:Q,hasValue:St,resetValue:yo,isShownByDefault:s[W],indicators:Fe&&Xt?[ge,_e??ce]:[Fe?ge:_e??ce],tabs:[p&&Fe&&{key:"text",label:(0,Ut.__)("Text"),inheritedValue:ge,setValue:Ge,userValue:dt},p&&Xt&&{key:"background",label:(0,Ut.__)("Background"),inheritedValue:ce,setValue:So,userValue:Ae},h&&Xt&&{key:"gradient",label:(0,Ut.__)("Gradient"),inheritedValue:_e,setValue:so,userValue:Xe,isGradient:!0}].filter(Boolean)})}),(0,rt.jsxs)(e,{resetAllFilter:ne,value:t,onChange:o,panelId:i,label:a,children:[X.map(W=>{let{key:Q,...se}=W;return(0,rt.jsx)(QTe,{...se,colorGradientControlSettings:{colors:u,disableCustomColors:!f,gradients:d,disableCustomGradients:!m},panelId:i},Q)}),c]})}var lt=l(P(),1),dc=l(L(),1),Ob=l(I(),1);var to=l(x(),1),P2=[];function Ese(e,{presetSetting:t,defaultSetting:o}){let r=!e?.color?.[o],n=e?.color?.[t]?.custom||P2,i=e?.color?.[t]?.theme||P2,s=e?.color?.[t]?.default||P2;return(0,Ob.useMemo)(()=>[...n,...i,...r?P2:s],[r,n,i,s])}function Tse(e){return Ise(e)}function Ise(e){return e.color.customDuotone||e.color.defaultDuotone||e.color.duotone.length>0}function JTe({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n}){let i=Co(),s=()=>{let a=e(o);t(a)};return(0,to.jsx)(lt.__experimentalToolsPanel,{label:(0,dc._x)("Filters","Name for applying graphical effects"),resetAll:s,panelId:r,dropdownMenuProps:i,children:n})}var eIe={duotone:!0},tIe={placement:"left-start",offset:36,shift:!0,className:"block-editor-duotone-control__popover",headerTitle:(0,dc.__)("Duotone")},oIe=({indicator:e,label:t})=>(0,to.jsxs)(lt.__experimentalHStack,{justify:"flex-start",children:[(0,to.jsx)(lt.__experimentalZStack,{isLayered:!1,offset:-8,children:(0,to.jsx)(lt.Flex,{expanded:!1,children:e==="unset"||!e?(0,to.jsx)(lt.ColorIndicator,{className:"block-editor-duotone-control__unset-indicator"}):(0,to.jsx)(lt.DuotoneSwatch,{values:e})})}),(0,to.jsx)(lt.FlexItem,{title:t,children:t})]}),rIe=(e,t)=>({onToggle:o,isOpen:r})=>{let n=(0,Ob.useRef)(void 0),i={onClick:o,className:D("block-editor-global-styles-filters-panel__dropdown-toggle",{"is-open":r}),"aria-expanded":r,ref:n},s={onClick:()=>{r&&o(),t(),n.current?.focus()},className:"block-editor-panel-duotone-settings__reset",label:(0,dc.__)("Reset")};return(0,to.jsxs)(to.Fragment,{children:[(0,to.jsx)(lt.Button,{__next40pxDefaultSize:!0,...i,children:(0,to.jsx)(oIe,{indicator:e,label:(0,dc.__)("Duotone")})}),e&&(0,to.jsx)(lt.Button,{size:"small",icon:Nr,...s})]})};function R2({as:e=JTe,value:t,onChange:o,inheritedValue:r=t,settings:n,panelId:i,defaultControls:s=eIe}){let a=b=>bn({settings:n},"",b),c=Ise(n),u=Ese(n,{presetSetting:"duotone",defaultSetting:"defaultDuotone"}),d=Ese(n,{presetSetting:"palette",defaultSetting:"defaultPalette"}),f=a(r?.filter?.duotone),m=b=>{let k=u.find(({colors:y})=>y===b),v=k?`var:preset|duotone|${k.slug}`:b;o(he(t,["filter","duotone"],v))},p=()=>!!t?.filter?.duotone,h=()=>m(void 0),g=(0,Ob.useCallback)(b=>({...b,filter:{...b.filter,duotone:void 0}}),[]);return(0,to.jsx)(e,{resetAllFilter:g,value:t,onChange:o,panelId:i,children:c&&(0,to.jsx)(lt.__experimentalToolsPanelItem,{label:(0,dc.__)("Duotone"),hasValue:p,onDeselect:h,isShownByDefault:s.duotone,panelId:i,children:(0,to.jsx)(lt.Dropdown,{popoverProps:tIe,className:"block-editor-global-styles-filters-panel__dropdown",renderToggle:rIe(f,h),renderContent:()=>(0,to.jsx)(lt.__experimentalDropdownContentWrapper,{paddingSize:"small",children:(0,to.jsxs)(lt.MenuGroup,{label:(0,dc.__)("Duotone"),children:[(0,to.jsx)("p",{children:(0,dc.__)("Create a two-tone color effect without losing your original image.")}),(0,to.jsx)(lt.DuotonePicker,{colorPalette:d,duotonePalette:u,disableCustomColors:!0,disableCustomDuotone:!0,value:f,onChange:m})]})})})})})}var Ab=l(P(),1),t_=l(L(),1);var Fm=l(x(),1);function Pse(e,t,o){return e==="core/image"&&o?.lightbox?.allowEditing||!!t?.lightbox}function Rse({onChange:e,value:t,inheritedValue:o,panelId:r}){let n=Co(),i=()=>{e(void 0)},s=c=>{e({enabled:c})},a=!1;return o?.lightbox?.enabled&&(a=o.lightbox.enabled),(0,Fm.jsx)(Fm.Fragment,{children:(0,Fm.jsx)(Ab.__experimentalToolsPanel,{label:(0,t_._x)("Settings","Image settings"),resetAll:i,panelId:r,dropdownMenuProps:n,children:(0,Fm.jsx)(Ab.__experimentalToolsPanelItem,{hasValue:()=>!!t?.lightbox,label:(0,t_.__)("Enlarge on click"),onDeselect:i,isShownByDefault:!0,panelId:r,children:(0,Fm.jsx)(Ab.ToggleControl,{label:(0,t_.__)("Enlarge on click"),checked:a,onChange:s})})})})}var Lb=l(P(),1),Ose=l(I(),1),c4=l(L(),1);var o_=l(x(),1);function Ase({value:e,onChange:t,inheritedValue:o=e}){let[r,n]=(0,Ose.useState)(null),i=o?.css;function s(c){if(t({...e,css:c}),r){let[u]=Ff([{css:c}],".for-validation-only");u&&n(null)}}function a(c){if(!c?.target?.value){n(null);return}let[u]=Ff([{css:c.target.value}],".for-validation-only");n(u===null?(0,c4.__)("There is an error with your CSS structure."):null)}return(0,o_.jsxs)(Lb.__experimentalVStack,{spacing:3,children:[r&&(0,o_.jsx)(Lb.Notice,{status:"error",onRemove:()=>n(null),children:r}),(0,o_.jsx)(Lb.TextareaControl,{label:(0,c4.__)("Additional CSS"),value:i,onChange:c=>s(c),onBlur:a,className:"block-editor-global-styles-advanced-panel__custom-css-input",spellCheck:!1})]})}var N2=l(P(),1),M2=l(I(),1);var Be=l(P(),1);var Et=l(L(),1),Nse=l(On(),1),u4=l(rn(),1),fc=l(I(),1),r_=l(M(),1),Mse=l(je(),1),Dse=l(qC(),1);var Ce=l(x(),1),O2="image",nIe={placement:"left-start",offset:36,shift:!0,className:"block-editor-global-styles-background-panel__popover"},L2=()=>{},A2=e=>{window.requestAnimationFrame(()=>{let[t]=Mse.focus.tabbable.find(e?.current);t&&t.focus()})};function iIe(e){return e==="cover"||e===void 0?(0,Et.__)("Image covers the space evenly."):e==="contain"?(0,Et.__)("Image is contained without distortion."):(0,Et.__)("Image has a fixed width.")}var sIe=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}%`},aIe=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 Vse({as:e="span",imgUrl:t,toggleProps:o={},filename:r,label:n,onToggleCallback:i=L2}){let{isOpen:s,...a}=o;(0,fc.useEffect)(()=>{typeof s<"u"&&i(s)},[s,i]);let c=()=>(0,Ce.jsxs)(Be.__experimentalHStack,{justify:"flex-start",as:"span",className:"block-editor-global-styles-background-panel__inspector-preview-inner",children:[t&&(0,Ce.jsx)("span",{className:"block-editor-global-styles-background-panel__inspector-image-indicator-wrapper","aria-hidden":!0,children:(0,Ce.jsx)("span",{className:"block-editor-global-styles-background-panel__inspector-image-indicator",style:{backgroundImage:`url(${t})`}})}),(0,Ce.jsxs)(Be.FlexItem,{as:"span",style:t?{}:{flexGrow:1},children:[(0,Ce.jsx)(Be.__experimentalTruncate,{numberOfLines:1,className:"block-editor-global-styles-background-panel__inspector-media-replace-title",children:n}),(0,Ce.jsx)(Be.VisuallyHidden,{as:"span",children:t?(0,Et.sprintf)((0,Et.__)("Background image: %s"),r||n):(0,Et.__)("No background image selected")})]})]});return e==="button"?(0,Ce.jsx)(Be.Button,{__next40pxDefaultSize:!0,...a,children:c()}):c()}function lIe({label:e,filename:t,url:o,children:r,onToggle:n=L2,hasImageValue:i,onReset:s,containerRef:a}){if(!i)return;let c=e||(0,u4.getFilename)(o)||(0,Et.__)("Add background image");return(0,Ce.jsx)(Be.Dropdown,{popoverProps:nIe,renderToggle:({onToggle:u,isOpen:d})=>{let f={onClick:u,className:"block-editor-global-styles-background-panel__dropdown-toggle","aria-expanded":d,"aria-label":(0,Et.__)("Background size, position and repeat options."),isOpen:d};return(0,Ce.jsxs)(Ce.Fragment,{children:[(0,Ce.jsx)(Vse,{imgUrl:o,filename:t,label:c,toggleProps:f,as:"button",onToggleCallback:n}),s&&(0,Ce.jsx)(Be.Button,{__next40pxDefaultSize:!0,label:(0,Et.__)("Reset"),className:"block-editor-global-styles-background-panel__reset",size:"small",icon:Nr,onClick:()=>{s(),d&&u(),A2(a)}})]})},renderContent:()=>(0,Ce.jsx)(Be.__experimentalDropdownContentWrapper,{className:"block-editor-global-styles-background-panel__dropdown-content-wrapper",paddingSize:"medium",children:r})})}function cIe(){return(0,Ce.jsx)(Be.Placeholder,{className:"block-editor-global-styles-background-panel__loading",children:(0,Ce.jsx)(Be.Spinner,{})})}function Lse({onChange:e,style:t,inheritedValue:o,onRemoveImage:r=L2,onResetImage:n=L2,displayInPanel:i,defaultValues:s,containerRef:a}){let[c,u]=(0,fc.useState)(!1),{getSettings:d}=(0,r_.useSelect)(S),{id:f,title:m,url:p}=t?.background?.backgroundImage||{...o?.background?.backgroundImage},{createErrorNotice:h}=(0,r_.useDispatch)(Nse.store),g=E=>{h(E,{type:"snackbar"}),u(!1)},b=()=>e(he(t,["background","backgroundImage"],void 0)),k=E=>{if(!E||!E.url){b(),u(!1);return}if((0,Dse.isBlobURL)(E.url)){u(!0);return}if(E.media_type&&E.media_type!==O2||!E.media_type&&E.type&&E.type!==O2){g((0,Et.__)("Only images can be used as a background image."));return}let R=t?.background?.backgroundSize||s?.backgroundSize,O=t?.background?.backgroundPosition;e(he(t,["background"],{...t?.background,backgroundImage:{url:E.url,id:E.id,source:"file",title:E.title||void 0},backgroundPosition:!O&&(R==="auto"||!R)?"50% 0":O,backgroundSize:R})),u(!1),A2(a)},v=E=>{d().mediaUpload({allowedTypes:[O2],filesList:E,onFileChange([R]){k(R)},onError:g,multiple:!1})},y=zm(t),_=()=>e(he(t,["background"],{backgroundImage:"none"})),w=!y&&zm(o),C=m||(0,u4.getFilename)(p)||(0,Et.__)("Add background image");return(0,Ce.jsxs)("div",{className:"block-editor-global-styles-background-panel__image-tools-panel-item",children:[c&&(0,Ce.jsx)(cIe,{}),(0,Ce.jsx)(ab,{mediaId:f,mediaURL:p,allowedTypes:[O2],accept:"image/*",onSelect:k,popoverProps:{className:D({"block-editor-global-styles-background-panel__media-replace-popover":i})},name:(0,Ce.jsx)(Vse,{imgUrl:p,filename:m,label:C}),renderToggle:E=>(0,Ce.jsx)(Be.Button,{...E,__next40pxDefaultSize:!0}),onError:g,onReset:()=>{A2(a),n()},children:w&&(0,Ce.jsx)(Be.MenuItem,{onClick:()=>{A2(a),_(),r()},children:(0,Et.__)("Remove")})}),(0,Ce.jsx)(Be.DropZone,{onFilesDrop:v,label:(0,Et.__)("Drop to upload")})]})}function uIe({onChange:e,style:t,inheritedValue:o,defaultValues:r}){let n=t?.background?.backgroundSize||o?.background?.backgroundSize,i=t?.background?.backgroundRepeat||o?.background?.backgroundRepeat,s=t?.background?.backgroundImage?.url||o?.background?.backgroundImage?.url,a=t?.background?.backgroundImage?.id,c=t?.background?.backgroundPosition||o?.background?.backgroundPosition,u=t?.background?.backgroundAttachment||o?.background?.backgroundAttachment,d=!n&&a?r?.backgroundSize:n||"auto";d=["cover","contain","auto"].includes(d)?d:"auto";let f=!(i==="no-repeat"||d==="cover"&&i===void 0),m=k=>{let v=i,y=c;k==="contain"&&(v="no-repeat",y=void 0),k==="cover"&&(v=void 0,y=void 0),(d==="cover"||d==="contain")&&k==="auto"&&(v=void 0,t?.background?.backgroundImage?.id&&(y="50% 0")),!k&&d==="auto"&&(k="auto"),e(he(t,["background"],{...t?.background,backgroundPosition:y,backgroundRepeat:v,backgroundSize:k}))},p=k=>{e(he(t,["background","backgroundPosition"],sIe(k)))},h=()=>e(he(t,["background","backgroundRepeat"],f===!0?"no-repeat":"repeat")),g=()=>e(he(t,["background","backgroundAttachment"],u==="fixed"?"scroll":"fixed")),b=!c&&a&&n==="contain"?r?.backgroundPosition:c;return(0,Ce.jsxs)(Be.__experimentalVStack,{spacing:3,className:"single-column",children:[(0,Ce.jsx)(Be.FocalPointPicker,{label:(0,Et.__)("Focal point"),url:s,value:aIe(b),onChange:p}),(0,Ce.jsx)(Be.ToggleControl,{label:(0,Et.__)("Fixed background"),checked:u==="fixed",onChange:g}),(0,Ce.jsxs)(Be.__experimentalToggleGroupControl,{size:"__unstable-large",label:(0,Et.__)("Size"),value:d,onChange:m,isBlock:!0,help:iIe(n||r?.backgroundSize),children:[(0,Ce.jsx)(Be.__experimentalToggleGroupControlOption,{value:"cover",label:(0,Et._x)("Cover","Size option for background image control")},"cover"),(0,Ce.jsx)(Be.__experimentalToggleGroupControlOption,{value:"contain",label:(0,Et._x)("Contain","Size option for background image control")},"contain"),(0,Ce.jsx)(Be.__experimentalToggleGroupControlOption,{value:"auto",label:(0,Et._x)("Tile","Size option for background image control")},"tile")]}),(0,Ce.jsxs)(Be.__experimentalHStack,{justify:"flex-start",spacing:2,as:"span",children:[(0,Ce.jsx)(Be.__experimentalUnitControl,{"aria-label":(0,Et.__)("Background image width"),onChange:m,value:n,size:"__unstable-large",__unstableInputWidth:"100px",min:0,placeholder:(0,Et.__)("Auto"),disabled:d!=="auto"||d===void 0}),(0,Ce.jsx)(Be.ToggleControl,{label:(0,Et.__)("Repeat"),checked:f,onChange:h,disabled:d==="cover"})]})]})}function Fse({value:e,onChange:t,inheritedValue:o=e,settings:r,defaultValues:n={}}){let{globalStyles:i,_links:s}=(0,r_.useSelect)(k=>{let{getSettings:v}=k(S),y=v();return{globalStyles:y[Ks],_links:y[J_]}},[]),a=(0,fc.useMemo)(()=>{let k={background:{}};return o?.background?(Object.entries(o?.background).forEach(([v,y])=>{k.background[v]=kg(y,{styles:i,_links:s})}),k):o},[i,s,o]),c=()=>t(he(e,["background"],{})),{title:u,url:d}=e?.background?.backgroundImage||{...a?.background?.backgroundImage},f=zm(e)||zm(a),m=e?.background?.backgroundImage||o?.background?.backgroundImage,p=f&&m!=="none"&&(r?.background?.backgroundSize||r?.background?.backgroundPosition||r?.background?.backgroundRepeat),[h,g]=(0,fc.useState)(!1),b=(0,fc.useRef)();return(0,Ce.jsx)("div",{ref:b,className:D("block-editor-global-styles-background-panel__inspector-media-replace-container",{"is-open":h}),children:p?(0,Ce.jsx)(lIe,{label:u,filename:u,url:d,onToggle:g,hasImageValue:f,onReset:c,containerRef:b,children:(0,Ce.jsxs)(Be.__experimentalVStack,{spacing:3,className:"single-column",children:[(0,Ce.jsx)(Lse,{onChange:t,style:e,inheritedValue:a,displayInPanel:!0,onResetImage:()=>{g(!1),c()},onRemoveImage:()=>g(!1),defaultValues:n,containerRef:b}),(0,Ce.jsx)(uIe,{onChange:t,style:e,defaultValues:n,inheritedValue:a})]})}):(0,Ce.jsx)(Lse,{onChange:t,style:e,inheritedValue:a,defaultValues:n,onResetImage:()=>{g(!1),c()},onRemoveImage:()=>g(!1),containerRef:b})})}var d4=l(L(),1),n_=l(x(),1),dIe={backgroundImage:!0};function i_(e){return M2.Platform.OS==="web"&&e?.background?.backgroundImage}function zm(e){return!!e?.background?.backgroundImage?.id||typeof e?.background?.backgroundImage=="string"||!!e?.background?.backgroundImage?.url}function fIe({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n,headerLabel:i}){let s=Co();return(0,n_.jsx)(N2.__experimentalToolsPanel,{label:i,resetAll:()=>{let c=e(o);t(c)},panelId:r,dropdownMenuProps:s,children:n})}function D2({as:e=fIe,value:t,onChange:o,inheritedValue:r,settings:n,panelId:i,defaultControls:s=dIe,defaultValues:a={},headerLabel:c=(0,d4.__)("Background image")}){let u=i_(n),d=()=>o(he(t,["background"],{})),f=(0,M2.useCallback)(m=>({...m,background:{}}),[]);return(0,n_.jsx)(e,{resetAllFilter:f,value:t,onChange:o,panelId:i,headerLabel:c,children:u&&(0,n_.jsx)(N2.__experimentalToolsPanelItem,{hasValue:()=>!!t?.background,label:(0,d4.__)("Image"),onDeselect:d,isShownByDefault:s.backgroundImage,panelId:i,children:(0,n_.jsx)(Fse,{value:t,onChange:o,settings:n,inheritedValue:r,defaultControls:s,defaultValues:a})})})}var F2=l(L(),1),p4=l(x(),1),Gm="__experimentalBorder",a_="shadow",zse=(e,t,o)=>{let r;return e.some(n=>n.colors.some(i=>i[t]===o?(r=i,!0):!1)),r},jm=({colors:e,namedColor:t,customColor:o})=>{if(t){let n=zse(e,"slug",t);if(n)return n}if(!o)return{color:void 0};let r=zse(e,"color",o);return r||{color:o}};function V2(e){let t=/var:preset\|color\|(.+)/.exec(e);return t&&t[1]?t[1]:null}function Hse(e){if((0,m4.__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:Se(r),borderColor:o}}function Use(e){return(0,m4.__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 mIe({label:e,children:t,resetAllFilter:o}){let r=(0,Nb.useCallback)(n=>{let i=Use(n),s=o(i);return{...n,...Hse(s)}},[o]);return(0,p4.jsx)(fe,{group:"border",resetAllFilter:r,label:e,children:t})}function Wse({clientId:e,name:t,setAttributes:o,settings:r}){let n=w2(r),{style:i,borderColor:s}=(0,Gse.useSelect)(d=>{if(!n)return{};let{style:f,borderColor:m}=d(S).getBlockAttributes(e)||{};return{style:f,borderColor:m}},[e,n]),a=(0,Nb.useMemo)(()=>Use({style:i,borderColor:s}),[i,s]),c=d=>{o(Hse(d))};if(!n)return null;let u={...(0,s_.getBlockSupport)(t,[Gm,"__experimentalDefaultControls"]),...(0,s_.getBlockSupport)(t,[a_,"__experimentalDefaultControls"])};return(0,p4.jsx)(C2,{as:mIe,panelId:e,settings:r,value:a,onChange:c,defaultControls:u})}function z2(e,t="any"){if(Nb.Platform.OS!=="web")return!1;let o=(0,s_.getBlockSupport)(e,Gm);return o===!0?!0:t==="any"?!!(o?.color||o?.radius||o?.width||o?.style):!!o?.[t]}function Rb({blockName:e,hasBorderControl:t,hasShadowControl:o}={}){let r=Hi(e),n=e_(r);return!t&&!o&&e&&(t=n?.hasBorderColor||n?.hasBorderStyle||n?.hasBorderWidth||n?.hasBorderRadius,o=n?.hasShadow),t&&o?(0,F2.__)("Border & Shadow"):o?(0,F2.__)("Shadow"):(0,F2.__)("Border")}function pIe(e){return!z2(e,"color")||e.attributes.borderColor?e:{...e,attributes:{...e.attributes,borderColor:{type:"string"}}}}function Zse(e,t,o){if(!z2(t,"color")||qe(t,Gm,"color"))return e;let r=h4(o),n=D(e.className,r);return e.className=n||void 0,e}function h4(e){let{borderColor:t,style:o}=e,r=ui("border-color",t);return D({"has-border-color":t||o?.border?.color,[r]:!!r})}function hIe({name:e,borderColor:t,style:o}){let{colors:r}=id();if(!z2(e,"color")||qe(e,Gm,"color"))return{};let{color:n}=jm({colors:r,namedColor:t}),{color:i}=jm({colors:r,namedColor:V2(o?.border?.top?.color)}),{color:s}=jm({colors:r,namedColor:V2(o?.border?.right?.color)}),{color:a}=jm({colors:r,namedColor:V2(o?.border?.bottom?.color)}),{color:c}=jm({colors:r,namedColor:V2(o?.border?.left?.color)});return Zse({style:Se({borderTopColor:i||n,borderRightColor:s||n,borderBottomColor:a||n,borderLeftColor:c||n})||{}},e,{borderColor:t,style:o})}var g4={useBlockProps:hIe,addSaveProps:Zse,attributeKeys:["borderColor","style"],hasSupport(e){return z2(e,"color")}};(0,jse.addFilter)("blocks.registerBlockType","core/border/addAttributes",pIe);var y4=l(Je(),1),mc=l(Z(),1),vd=l(I(),1),eae=l(M(),1);var k4=l(Z(),1),$se=l(M(),1),Yse=l(I(),1);var v4=l(x(),1),Hm="background",b4={backgroundSize:"cover",backgroundPosition:"50% 50%"};function j2(e,t="any"){let o=(0,k4.getBlockSupport)(e,Hm);return o===!0?!0:t==="any"?!!o?.backgroundImage||!!o?.backgroundSize||!!o?.backgroundRepeat:!!o?.[t]}function G2(e){if(!e||!e?.backgroundImage?.url)return;let t;return e?.backgroundSize||(t={backgroundSize:b4.backgroundSize}),e?.backgroundSize==="contain"&&!e?.backgroundPosition&&(t={backgroundPosition:b4.backgroundPosition}),t}function gIe({name:e,style:t}){if(!j2(e)||!t?.background?.backgroundImage)return;let o=G2(t?.background);if(o)return{style:{...o}}}function Kse(e){return zm(e)?"has-background":""}function bIe({children:e}){let t=(0,Yse.useCallback)(o=>({...o,style:{...o.style,background:void 0}}),[]);return(0,v4.jsx)(fe,{group:"background",resetAllFilter:t,children:e})}function Xse({clientId:e,name:t,setAttributes:o,settings:r}){let{style:n,inheritedValue:i}=(0,$se.useSelect)(u=>{let{getBlockAttributes:d,getSettings:f}=u(S),m=f();return{style:d(e)?.style,inheritedValue:m[Ks]?.blocks?.[t]}},[e,t]);if(!i_(r)||!j2(t,"backgroundImage"))return null;let s=u=>{o({style:Se(u)})},a={...r,background:{...r.background,backgroundSize:r?.background?.backgroundSize&&j2(t,"backgroundSize")}},c=(0,k4.getBlockSupport)(t,[Hm,"defaultControls"]);return(0,v4.jsx)(D2,{inheritedValue:i,as:bIe,panelId:e,defaultValues:b4,settings:a,onChange:s,defaultControls:c,value:n})}var qse={useBlockProps:gIe,attributeKeys:["style"],hasSupport:j2};var U2=l(I(),1);var Qse=l(x(),1);function H2(e,t){return e.ownerDocument.defaultView.getComputedStyle(e).getPropertyValue(t)}function kIe(e){if(!e)return{};let t=e.querySelector("a"),o=t?.innerText?H2(t,"color"):void 0,r=H2(e,"color"),n=e,i=H2(n,"background-color");for(;i==="rgba(0, 0, 0, 0)"&&n.parentNode&&n.parentNode.nodeType===n.parentNode.ELEMENT_NODE;)n=n.parentNode,i=H2(n,"background-color");return{textColor:r,backgroundColor:i,linkColor:o}}function vIe(e,t){return Object.keys(t).some(r=>e[r]!==t[r])?t:e}function Jse({clientId:e}){let t=ht(e),[o,r]=(0,U2.useReducer)(vIe,{});return(0,U2.useLayoutEffect)(()=>{if(!t)return;function n(){r(kIe(t))}window.requestAnimationFrame(()=>window.requestAnimationFrame(n))}),(0,Qse.jsx)(DT,{backgroundColor:o.backgroundColor,textColor:o.textColor,linkColor:o.linkColor,enableAlphaChecker:!0})}var W2=l(x(),1),Xo="color",Z2=e=>{let t=(0,mc.getBlockSupport)(e,Xo);return t&&(t.link===!0||t.gradient===!0||t.background!==!1||t.text!==!1)},yIe=e=>{if(vd.Platform.OS!=="web")return!1;let t=(0,mc.getBlockSupport)(e,Xo);return t!==null&&typeof t=="object"&&!!t.link},S4=e=>{let t=(0,mc.getBlockSupport)(e,Xo);return t!==null&&typeof t=="object"&&!!t.gradients},SIe=e=>{let t=(0,mc.getBlockSupport)(e,Xo);return t&&t.background!==!1},_Ie=e=>{let t=(0,mc.getBlockSupport)(e,Xo);return t&&t.text!==!1};function xIe(e){return Z2(e)&&(e.attributes.backgroundColor||Object.assign(e.attributes,{backgroundColor:{type:"string"}}),e.attributes.textColor||Object.assign(e.attributes,{textColor:{type:"string"}}),S4(e)&&!e.attributes.gradient&&Object.assign(e.attributes,{gradient:{type:"string"}})),e}function tae(e,t,o){if(!Z2(t)||qe(t,Xo))return e;let r=S4(t),{backgroundColor:n,textColor:i,gradient:s,style:a}=o,c=g=>!qe(t,Xo,g),u=c("text")?ui("color",i):void 0,d=c("gradients")?Wp(s):void 0,f=c("background")?ui("background-color",n):void 0,m=c("background")||c("gradients"),p=n||a?.color?.background||r&&(s||a?.color?.gradient),h=D(e.className,u,d,{[f]:(!r||!a?.color?.gradient)&&!!f,"has-text-color":c("text")&&(i||a?.color?.text),"has-background":m&&p,"has-link-color":c("link")&&a?.elements?.link?.color});return e.className=h||void 0,e}function oae(e){let t=e?.color?.text,o=t?.startsWith("var:preset|color|")?t.substring(17):void 0,r=e?.color?.background,n=r?.startsWith("var:preset|color|")?r.substring(17):void 0,i=e?.color?.gradient,s=i?.startsWith("var:preset|gradient|")?i.substring(20):void 0,a={...e};return a.color={...a.color,text:o?void 0:t,background:n?void 0:r,gradient:s?void 0:i},{style:Se(a),textColor:o,backgroundColor:n,gradient:s}}function rae(e){return{...e.style,color:{...e.style?.color,text:e.textColor?"var:preset|color|"+e.textColor:e.style?.color?.text,background:e.backgroundColor?"var:preset|color|"+e.backgroundColor:e.style?.color?.background,gradient:e.gradient?"var:preset|gradient|"+e.gradient:e.style?.color?.gradient}}}function wIe({children:e,resetAllFilter:t}){let o=(0,vd.useCallback)(r=>{let n=rae(r),i=t(n);return{...r,...oae(i)}},[t]);return(0,W2.jsx)(fe,{group:"color",resetAllFilter:o,children:e})}function $2({clientId:e,name:t,setAttributes:o,settings:r,asWrapper:n,label:i,defaultControls:s}){let a=T2(r),{style:c,textColor:u,backgroundColor:d,gradient:f}=(0,eae.useSelect)(b=>{if(!a)return{};let{style:k,textColor:v,backgroundColor:y,gradient:_}=b(S).getBlockAttributes(e)||{};return{style:k,textColor:v,backgroundColor:y,gradient:_}},[e,a]),m=(0,vd.useMemo)(()=>rae({style:c,textColor:u,backgroundColor:d,gradient:f}),[c,u,d,f]),p=b=>{o(oae(b))};if(!a)return null;s=s||(0,mc.getBlockSupport)(t,[Xo,"__experimentalDefaultControls"]);let h=vd.Platform.OS==="web"&&!m?.color?.gradient&&(r?.color?.text||r?.color?.link)&&(0,mc.getBlockSupport)(t,[Xo,"enableContrastChecker"])!==!1;return(0,W2.jsx)(I2,{as:n||wIe,panelId:e,settings:r,value:m,onChange:p,defaultControls:s,label:i,enableContrastChecker:(0,mc.getBlockSupport)(t,[Xo,"enableContrastChecker"])!==!1,children:h&&(0,W2.jsx)(Jse,{clientId:e})})}function CIe({name:e,backgroundColor:t,textColor:o,gradient:r,style:n}){let[i,s,a]=pe("color.palette.custom","color.palette.theme","color.palette.default"),c=(0,vd.useMemo)(()=>[...i||[],...s||[],...a||[]],[i,s,a]);if(!Z2(e)||qe(e,Xo))return{};let u={};o&&!qe(e,Xo,"text")&&(u.color=Ys(c,o)?.color),t&&!qe(e,Xo,"background")&&(u.backgroundColor=Ys(c,t)?.color);let d=tae({style:u},e,{textColor:o,backgroundColor:t,gradient:r,style:n}),f=t||n?.color?.background||r||n?.color?.gradient;return{...d,className:D(d.className,!f&&Kse(n))}}var _4={useBlockProps:CIe,addSaveProps:tae,attributeKeys:["backgroundColor","textColor","gradient","style"],hasSupport:Z2},BIe={linkColor:[["style","elements","link","color","text"]],textColor:[["textColor"],["style","color","text"]],backgroundColor:[["backgroundColor"],["style","color","background"]],gradient:[["gradient"],["style","color","gradient"]]};function EIe(e,t,o,r){let n=e.name,i={linkColor:yIe(n),textColor:_Ie(n),backgroundColor:SIe(n),gradient:S4(n)};return Y2(i,BIe,e,t,o,r)}(0,y4.addFilter)("blocks.registerBlockType","core/color/addAttribute",xIe);(0,y4.addFilter)("blocks.switchToBlockType.transformedBlock","core/color/addTransforms",EIe);var ur=l(x(),1);function TIe({blockName:e,clientId:t,contentClientIds:o}){let r=Hi(e),{updateBlockAttributes:n}=(0,K2.useDispatch)(S),{hasButton:i,hasHeading:s}=(0,K2.useSelect)(c=>{let u=c(S).getBlockNamesByClientId(o);return{hasButton:u.includes("core/button"),hasHeading:u.includes("core/heading")}},[o]);return(0,ur.jsx)($2,{clientId:t,name:e,settings:r,setAttributes:c=>{n(t,c)},asWrapper:l4,label:(0,Mb.__)("Color"),defaultControls:{text:!0,background:!0,button:i,heading:s}})}var IIe=({blockName:e,clientId:t,hasBlockStyles:o,isSectionBlock:r,contentClientIds:n})=>{let i=Rb({blockName:e});return(0,ur.jsxs)(ur.Fragment,{children:[o&&(0,ur.jsx)(Vg,{clientId:t}),r&&window?.__experimentalContentOnlyPatternInsertion&&(0,ur.jsx)(TIe,{blockName:e,clientId:t,contentClientIds:n}),!r&&(0,ur.jsxs)(ur.Fragment,{children:[(0,ur.jsx)(fe.Slot,{group:"color",label:(0,Mb.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,ur.jsx)(fe.Slot,{group:"background",label:(0,Mb.__)("Background image")}),(0,ur.jsx)(fe.Slot,{group:"filter"}),(0,ur.jsx)(fe.Slot,{group:"typography",label:(0,Mb.__)("Typography")}),(0,ur.jsx)(fe.Slot,{group:"dimensions",label:(0,Mb.__)("Dimensions")}),(0,ur.jsx)(fe.Slot,{group:"border",label:i}),(0,ur.jsx)(fe.Slot,{group:"styles"})]})]})},nae=IIe;var iae=l(P(),1),sae=l(L(),1);var X2=l(M(),1),Ui=l(P(),1);var za=l(x(),1);function q2({clientIds:e,onSelect:t}){return e.length?(0,za.jsx)(Ui.__experimentalVStack,{spacing:1,children:e.map(o=>(0,za.jsx)(PIe,{onSelect:t,clientId:o},o))}):null}function PIe({clientId:e,onSelect:t}){let o=xt(e),r=rr({clientId:e,context:"list-view"}),{isSelected:n}=(0,X2.useSelect)(s=>{let{isBlockSelected:a,hasSelectedInnerBlock:c}=s(S);return{isSelected:a(e)||c(e,!0)}},[e]),{selectBlock:i}=(0,X2.useDispatch)(S);return(0,za.jsx)(Ui.Button,{__next40pxDefaultSize:!0,className:"block-editor-block-quick-navigation__item",isPressed:n,onClick:async()=>{await i(e),t&&t(e)},children:(0,za.jsxs)(Ui.Flex,{children:[(0,za.jsx)(Ui.FlexItem,{children:(0,za.jsx)(Ie,{icon:o?.icon})}),(0,za.jsx)(Ui.FlexBlock,{style:{textAlign:"left"},children:(0,za.jsx)(Ui.__experimentalTruncate,{children:r})})]})})}var Db=l(x(),1),RIe=({contentClientIds:e})=>{if(!e||e.length===0)return null;let t=window?.__experimentalContentOnlyInspectorFields;return(0,Db.jsx)(Db.Fragment,{children:!t&&(0,Db.jsx)(iae.PanelBody,{title:(0,sae.__)("Content"),children:(0,Db.jsx)(q2,{clientIds:e})})})},Q2=RIe;var qo=l(x(),1),{Tabs:yd}=F(Vb.privateApis);function x4({blockName:e,clientId:t,hasBlockStyles:o,tabs:r,isSectionBlock:n,contentClientIds:i}){let s=(0,lae.useSelect)(f=>f(aae.store).get("core","showIconLabels"),[]),[a,c]=(0,Um.useState)(r[0]?.name),u=(0,Um.useRef)(!1);return(0,Um.useEffect)(()=>{u.current=!1},[t]),(0,Um.useEffect)(()=>{if(!r?.length||u.current)return;let f=r[0]?.name;a!==f&&c(f)},[r,a]),(0,qo.jsx)("div",{className:"block-editor-block-inspector__tabs",children:(0,qo.jsxs)(yd,{selectedTabId:a,onSelect:f=>{c(f),u.current=!0},children:[(0,qo.jsx)(yd.TabList,{children:r.map(f=>s?(0,qo.jsx)(yd.Tab,{tabId:f.name,children:f.title},f.name):(0,qo.jsx)(Vb.Tooltip,{text:f.title,children:(0,qo.jsx)(yd.Tab,{tabId:f.name,"aria-label":f.title,children:(0,qo.jsx)(Vb.Icon,{icon:f.icon})})},f.name))}),(0,qo.jsx)(yd.TabPanel,{tabId:i2.name,focusable:!1,children:(0,qo.jsx)(Vie,{showAdvancedControls:!!e})}),(0,qo.jsx)(yd.TabPanel,{tabId:s2.name,focusable:!1,children:(0,qo.jsx)(nae,{blockName:e,clientId:t,hasBlockStyles:o,isSectionBlock:n,contentClientIds:i})}),(0,qo.jsxs)(yd.TabPanel,{tabId:a2.name,focusable:!1,children:[(0,qo.jsx)(fe.Slot,{group:"content"}),(0,qo.jsx)(Q2,{contentClientIds:i})]}),(0,qo.jsx)(yd.TabPanel,{tabId:l2.name,focusable:!1,children:(0,qo.jsx)(fe.Slot,{group:"list"})})]},t)})}var ri=l(P(),1),cae=l(M(),1);var OIe=[];function AIe(e,t={}){return t[e]!==void 0?t[e]:t.default!==void 0?t.default:!0}function uae(e,t,o,r){let n=[],{bindings:i,border:s,color:a,content:c,default:u,dimensions:d,list:f,position:m,styles:p,typography:h,effects:g}=Mu,b=(0,ri.__experimentalUseSlotFills)(f.name),k=!!b&&b.length,v=(0,ri.__experimentalUseSlotFills)(c.name),y=!!v&&v.length,w=[...(0,ri.__experimentalUseSlotFills)(s.name)||[],...(0,ri.__experimentalUseSlotFills)(a.name)||[],...(0,ri.__experimentalUseSlotFills)(d.name)||[],...(0,ri.__experimentalUseSlotFills)(p.name)||[],...(0,ri.__experimentalUseSlotFills)(h.name)||[],...(0,ri.__experimentalUseSlotFills)(g.name)||[]].length,C=[...(0,ri.__experimentalUseSlotFills)(Du.slotName)||[],...(0,ri.__experimentalUseSlotFills)(i.name)||[]],E=[...(0,ri.__experimentalUseSlotFills)(u.name)||[],...(0,ri.__experimentalUseSlotFills)(m.name)||[],...k&&w>1?C:[]],R=window?.__experimentalContentOnlyInspectorFields,O=y||!R&&t?.length;O&&n.push(a2),k&&n.push(l2),(E.length||C.length&&(O||k))&&!o&&n.push(i2),(r||w)&&n.push(s2);let B=(0,cae.useSelect)(A=>A(S).getSettings().blockInspectorTabs,[]);return AIe(e,B)?n:OIe}var dae=l(M(),1);function fae(e){return(0,dae.useSelect)(t=>{if(e){let o=t(S).getSettings().blockInspectorAnimation,r=o?.animationParent,{getSelectedBlockClientId:n,getBlockParentsByBlockName:i}=t(S),s=n();return!i(s,r,!0)[0]&&e.name!==r?null:o?.[e.name]}return null},[e])}var Sd=l(P(),1),mae=l(M(),1),w4=l(L(),1);var Fb=l(x(),1),{Badge:LIe}=F(Sd.privateApis);function pae({clientId:e}){let{isBlockHidden:t,hasHiddenParent:o}=(0,mae.useSelect)(r=>{if(!e)return{isBlockHidden:!1,hasHiddenParent:!1};let{isBlockHidden:n,getBlockParents:i}=F(r(S)),s=n(e),c=i(e).some(u=>n(u));return{isBlockHidden:s,hasHiddenParent:c}},[e]);return t||o?(0,Fb.jsx)(LIe,{className:"block-editor-block-visibility-info",children:(0,Fb.jsxs)(Sd.__experimentalHStack,{spacing:2,justify:"start",children:[(0,Fb.jsx)(Sd.Icon,{icon:tr}),(0,Fb.jsx)(Sd.__experimentalText,{children:t?(0,w4.__)("Block is hidden"):(0,w4.__)("Parent block is hidden")})]})}):null}var ye=l(x(),1);function gae({blockName:e,showAdvancedControls:t=!0,showPositionControls:o=!0,showBindingsControls:r=!0}){let n=Rb({blockName:e});return(0,ye.jsxs)(ye.Fragment,{children:[(0,ye.jsx)(fe.Slot,{}),(0,ye.jsx)(fe.Slot,{group:"color",label:(0,zb.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,ye.jsx)(fe.Slot,{group:"background",label:(0,zb.__)("Background image")}),(0,ye.jsx)(fe.Slot,{group:"typography",label:(0,zb.__)("Typography")}),(0,ye.jsx)(fe.Slot,{group:"dimensions",label:(0,zb.__)("Dimensions")}),(0,ye.jsx)(fe.Slot,{group:"border",label:n}),(0,ye.jsx)(fe.Slot,{group:"styles"}),o&&(0,ye.jsx)(u2,{}),r&&(0,ye.jsx)(fe.Slot,{group:"bindings"}),t&&(0,ye.jsx)("div",{children:(0,ye.jsx)(qS,{})})]})}function NIe(){let{selectedBlockCount:e,selectedBlockClientId:t,renderedBlockName:o,renderedBlockClientId:r,blockType:n,isSectionBlock:i,isSectionBlockInSelection:s,hasBlockStyles:a,editedContentOnlySection:c}=(0,C4.useSelect)(b=>{let{getSelectedBlockClientId:k,getSelectedBlockClientIds:v,getSelectedBlockCount:y,getBlockName:_,getParentSectionBlock:w,isSectionBlock:C,getEditedContentOnlySection:E,isWithinEditedContentOnlySection:R}=F(b(S)),{getBlockStyles:O}=b(jb.store),B=k(),A=R(B)?B:w(B)||B,N=A&&_(A),z=N&&(0,jb.getBlockType)(N),j=v().some(H=>C(H)),G=N&&O(N),V=G&&G.length>0;return{selectedBlockCount:y(),selectedBlockClientId:B,renderedBlockClientId:A,renderedBlockName:N,blockType:z,isSectionBlockInSelection:j,isSectionBlock:C(A),hasBlockStyles:V,editedContentOnlySection:E()}},[]),u=(0,C4.useSelect)(b=>{if(!i||!r)return[];let{getClientIdsOfDescendants:k,getBlockName:v,getBlockEditingMode:y}=F(b(S)),_=k(r),w=new Set;return _.forEach(C=>{v(C)==="core/navigation"&&k(C).forEach(R=>w.add(R))}),_.filter(C=>w.has(C)?!1:v(C)!=="core/list-item"&&y(C)==="contentOnly")},[i,r]),d=uae(n?.name,u,i,a),f=d?.length>1,m=fae(n),p=e>1;if(p&&!s)return(0,ye.jsxs)("div",{className:"block-editor-block-inspector",children:[(0,ye.jsx)(t4,{}),f?(0,ye.jsx)(x4,{tabs:d}):(0,ye.jsx)(gae,{blockName:o,showAdvancedControls:!1,showPositionControls:!1,showBindingsControls:!1})]});if(p&&s)return(0,ye.jsx)("div",{className:"block-editor-block-inspector",children:(0,ye.jsx)(t4,{})});let h=o===(0,jb.getUnregisteredTypeHandlerName)();return!n||!r||h?(0,ye.jsx)("span",{className:"block-editor-block-inspector__no-blocks",children:(0,zb.__)("No block selected.")}):(0,ye.jsx)(MIe,{animate:m,wrapper:b=>(0,ye.jsx)(DIe,{blockInspectorAnimationSettings:m,renderedBlockClientId:r,children:b}),children:(0,ye.jsx)(VIe,{renderedBlockClientId:r,selectedBlockClientId:t,blockName:n.name,isSectionBlock:i,availableTabs:d,contentClientIds:u,hasBlockStyles:a,editedContentOnlySection:c})})}var MIe=({animate:e,wrapper:t,children:o})=>e?t(o):o,DIe=({blockInspectorAnimationSettings:e,renderedBlockClientId:t,children:o})=>{let r=e&&e.enterDirection==="leftToRight"?-50:50;return(0,ye.jsx)(hae.__unstableMotion.div,{animate:{x:0,opacity:1,transition:{ease:"easeInOut",duration:.14}},initial:{x:r,opacity:0},children:o},t)},VIe=({renderedBlockClientId:e,selectedBlockClientId:t,blockName:o,isSectionBlock:r,availableTabs:n,contentClientIds:i,hasBlockStyles:s,editedContentOnlySection:a})=>{let c=n?.length>1,u=window?.__experimentalContentOnlyPatternInsertion&&a&&a!==e,d=xt(a),f=xt(e),m=f.isSynced,p=!m&&c,h=window?.__experimentalContentOnlyPatternInsertion&&t===e;return(0,ye.jsxs)("div",{className:"block-editor-block-inspector",children:[u&&(0,ye.jsx)(ry,{...d,className:d.isSynced&&"is-synced",parentClientId:a}),(0,ye.jsx)(ry,{...f,allowParentNavigation:!0,className:m&&"is-synced",isChild:u,clientId:e}),(0,ye.jsx)(pae,{clientId:e}),window?.__experimentalContentOnlyPatternInsertion&&(0,ye.jsx)(Iie,{clientId:e}),(0,ye.jsx)(PT,{blockClientId:e}),p&&(0,ye.jsx)(x4,{hasBlockStyles:s,clientId:e,blockName:o,tabs:n,isSectionBlock:r,contentClientIds:i}),!p&&(0,ye.jsxs)(ye.Fragment,{children:[s&&(0,ye.jsx)(Vg,{clientId:e}),(0,ye.jsx)(Q2,{contentClientIds:i}),(0,ye.jsx)(fe.Slot,{group:"content"}),(0,ye.jsx)(fe.Slot,{group:"list"}),!r&&(0,ye.jsx)(gae,{blockName:o}),r&&m&&h&&(0,ye.jsxs)(ye.Fragment,{children:[(0,ye.jsx)(fe.Slot,{}),(0,ye.jsx)(qS,{})]})]}),(0,ye.jsx)(r2,{},"back")]})},bae=NIe;var B4=l(Re(),1);var kae=l(x(),1),vae=()=>((0,B4.default)("__unstableUseClipboardHandler",{alternative:"BlockCanvas or WritingFlow",since:"6.4",version:"6.7"}),ly());function yae(e){return(0,B4.default)("CopyHandler",{alternative:"BlockCanvas or WritingFlow",since:"6.4",version:"6.7"}),(0,kae.jsx)("div",{...e,ref:ly()})}var Sae=l(M(),1),E4=l(I(),1);var T4=l(x(),1),FIe=()=>{};function zIe({rootClientId:e,clientId:t,isAppender:o,showInserterHelpPanel:r,showMostUsedBlocks:n=!1,__experimentalInsertionIndex:i,__experimentalInitialTab:s,__experimentalInitialCategory:a,__experimentalFilterValue:c,onPatternCategorySelection:u,onSelect:d=FIe,shouldFocusBlock:f=!1,onClose:m},p){let{destinationRootClientId:h}=(0,Sae.useSelect)(g=>{let{getBlockRootClientId:b}=g(S);return{destinationRootClientId:e||b(t)||void 0}},[t,e]);return(0,T4.jsx)(f5,{onSelect:d,rootClientId:h,clientId:t,isAppender:o,showInserterHelpPanel:r,showMostUsedBlocks:n,__experimentalInsertionIndex:i,__experimentalFilterValue:c,onPatternCategorySelection:u,__experimentalInitialTab:s,__experimentalInitialCategory:a,shouldFocusBlock:f,ref:p,onClose:m})}var I4=(0,E4.forwardRef)(zIe);function jIe(e,t){return(0,T4.jsx)(I4,{...e,onPatternCategorySelection:void 0,ref:t})}var _ae=(0,E4.forwardRef)(jIe);var xae=l(Re(),1);function wae(){return(0,xae.default)("wp.blockEditor.MultiSelectScrollIntoView",{hint:"This behaviour is now built-in.",since:"5.8"}),null}var Cae=l(Y(),1),l_=l(je(),1),Bae=l(M(),1),_d=l(at(),1);var Eae=l(x(),1),GIe=window.navigator.userAgent.indexOf("Trident")!==-1,HIe=new Set([_d.UP,_d.DOWN,_d.LEFT,_d.RIGHT]),UIe=.75;function P4(){let e=(0,Bae.useSelect)(t=>t(S).hasSelectedBlock(),[]);return(0,Cae.useRefEffect)(t=>{if(!e)return;let{ownerDocument:o}=t,{defaultView:r}=o,n,i,s;function a(){n||(n=r.requestAnimationFrame(()=>{m(),n=null}))}function c(g){i&&r.cancelAnimationFrame(i),i=r.requestAnimationFrame(()=>{u(g),i=null})}function u({keyCode:g}){if(!p())return;let b=(0,l_.computeCaretRect)(r);if(!b)return;if(!s){s=b;return}if(HIe.has(g)){s=b;return}let k=b.top-s.top;if(k===0)return;let v=(0,l_.getScrollContainer)(t);if(!v)return;let y=v===o.body||v===o.documentElement,_=y?r.scrollY:v.scrollTop,w=y?0:v.getBoundingClientRect().top,C=y?s.top/r.innerHeight:(s.top-w)/(r.innerHeight-w);if(_===0&&C<UIe&&h()){s=b;return}let E=y?r.innerHeight:v.clientHeight;if(s.top+s.height>w+E||s.top<w){s=b;return}y?r.scrollBy(0,k):v.scrollTop+=k}function d(){o.addEventListener("selectionchange",f)}function f(){o.removeEventListener("selectionchange",f),m()}function m(){p()&&(s=(0,l_.computeCaretRect)(r))}function p(){return t.contains(o.activeElement)&&o.activeElement.isContentEditable}function h(){let g=t.querySelectorAll('[contenteditable="true"]');return g[g.length-1]===o.activeElement}return r.addEventListener("scroll",a,!0),r.addEventListener("resize",a,!0),t.addEventListener("keydown",c),t.addEventListener("keyup",u),t.addEventListener("mousedown",d),t.addEventListener("touchstart",d),()=>{r.removeEventListener("scroll",a,!0),r.removeEventListener("resize",a,!0),t.removeEventListener("keydown",c),t.removeEventListener("keyup",u),t.removeEventListener("mousedown",d),t.removeEventListener("touchstart",d),o.removeEventListener("selectionchange",f),r.cancelAnimationFrame(n),r.cancelAnimationFrame(i)}},[e])}function WIe({children:e}){return(0,Eae.jsx)("div",{ref:P4(),className:"block-editor__typewriter",children:e})}var ZIe=GIe?e=>e.children:WIe,Tae=ZIe;var Wm=l(I(),1),R4=l(Re(),1);var O4=l(x(),1),J2=(0,Wm.createContext)({});J2.displayName="RenderedRefsContext";function $Ie(e,t,o){let r={...e,[t]:e[t]?new Set(e[t]):new Set};return r[t].add(o),r}function A4({children:e,uniqueId:t,blockName:o=""}){let r=(0,Wm.useContext)(J2),{name:n}=Ne();o=o||n;let i=(0,Wm.useMemo)(()=>$Ie(r,o,t),[r,o,t]);return(0,O4.jsx)(J2.Provider,{value:i,children:e})}function L4(e,t=""){let o=(0,Wm.useContext)(J2),{name:r}=Ne();return t=t||r,!!o[t]?.has(e)}var Iae=e=>((0,R4.default)("wp.blockEditor.__experimentalRecursionProvider",{since:"6.5",alternative:"wp.blockEditor.RecursionProvider"}),(0,O4.jsx)(A4,{...e})),Pae=(...e)=>((0,R4.default)("wp.blockEditor.__experimentalUseHasRecursion",{since:"6.5",alternative:"wp.blockEditor.useHasRecursion"}),L4(...e));var tP=l(P(),1),N4=l(L(),1),M4=l(I(),1),Oae=l(rd(),1);var ni=l(P(),1);var Rae=l(L(),1),pc=l(x(),1);function eP({title:e,help:t,actions:o=[],onClose:r}){return(0,pc.jsxs)(ni.__experimentalVStack,{className:"block-editor-inspector-popover-header",spacing:4,children:[(0,pc.jsxs)(ni.__experimentalHStack,{alignment:"center",children:[(0,pc.jsx)(ni.__experimentalHeading,{className:"block-editor-inspector-popover-header__heading",level:2,size:13,children:e}),(0,pc.jsx)(ni.__experimentalSpacer,{}),o.map(({label:n,icon:i,onClick:s})=>(0,pc.jsx)(ni.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,pc.jsx)(ni.Button,{size:"small",className:"block-editor-inspector-popover-header__action",label:(0,Rae.__)("Close"),icon:nf,onClick:r})]}),t&&(0,pc.jsx)(ni.__experimentalText,{children:t})]})}var Gb=l(x(),1);function YIe({onClose:e,onChange:t,showPopoverHeaderActions:o,isCompact:r,currentDate:n,title:i,...s},a){let c={startOfWeek:(0,Oae.getSettings)().l10n.startOfWeek,onChange:t,currentDate:r?void 0:n,currentTime:r?n:void 0,...s},u=r?tP.TimePicker:tP.DateTimePicker;return(0,Gb.jsxs)("div",{ref:a,className:"block-editor-publish-date-time-picker",children:[(0,Gb.jsx)(eP,{title:i||(0,N4.__)("Publish"),actions:o?[{label:(0,N4.__)("Now"),onClick:()=>t?.(null)}]:void 0,onClose:e}),(0,Gb.jsx)(u,{...c})]})}var D4=(0,M4.forwardRef)(YIe);function KIe(e,t){return(0,Gb.jsx)(D4,{...e,showPopoverHeaderActions:!0,isCompact:!1,ref:t})}var Aae=(0,M4.forwardRef)(KIe);var oP=l(M(),1),Lae=l(I(),1);function To(e){let t=Ne(),{clientId:o=""}=t,{setBlockEditingMode:r,unsetBlockEditingMode:n}=(0,oP.useDispatch)(S),i=(0,oP.useSelect)(s=>o?null:s(S).getBlockEditingMode(),[o]);return(0,Lae.useEffect)(()=>(e&&r(o,e),()=>{e&&n(o)}),[o,e,r,n]),o?t[G_]:i}var Nae=l(Re(),1),Mae=l(I(),1);function XIe(){return(0,Nae.default)("wp.blockEditor.ToolSelector",{since:"6.9",hint:"The ToolSelector component no longer renders anything."}),null}var Dae=(0,Mae.forwardRef)(XIe);var u_=l(x(),1),Se=e=>{if(e===null||typeof e!="object"||Array.isArray(e))return e;let t=Object.entries(e).map(([o,r])=>[o,Se(r)]).filter(([,o])=>o!==void 0);return t.length?Object.fromEntries(t):void 0};function Y2(e,t,o,r,n,i){if(Object.values(e??{}).every(c=>!c)||i.length===1&&o.innerBlocks.length===r.length)return o;let s=r[0]?.attributes;if(i.length>1&&r.length>1)if(r[n])s=r[n]?.attributes;else return o;let a=o;return Object.entries(e).forEach(([c,u])=>{u&&t[c].forEach(d=>{let f=dl(s,d);f&&(a={...a,attributes:he(a.attributes,d,f)})})}),a}function qe(e,t,o){let n=(0,Vae.getBlockSupport)(e,t)?.__experimentalSkipSerialization;return Array.isArray(n)?n.includes(o):n}var hc=new WeakMap;function ks({id:e,css:t}){return dm({id:e,css:t})}function dm({id:e,css:t,assets:o,__unstableType:r,variation:n,clientId:i}={}){let{setStyleOverride:s,deleteStyleOverride:a}=F((0,rP.useDispatch)(S)),c=(0,rP.useRegistry)(),u=(0,Wi.useId)();(0,Wi.useEffect)(()=>{if(!t&&!o)return;let d=e||u,f={id:e,css:t,assets:o,__unstableType:r,variation:n,clientId:i};return hc.get(c)||hc.set(c,[]),hc.get(c).push([d,f]),window.queueMicrotask(()=>{hc.get(c)?.length&&c.batch(()=>{hc.get(c).forEach(m=>{s(...m)}),hc.set(c,[])})}),()=>{hc.get(c)?.find(([p])=>p===d)?hc.set(c,hc.get(c).filter(([p])=>p!==d)):a(d)}},[e,t,i,o,r,u,s,a,c,n])}function Hi(e,t){let[o,r,n,i,s,a,c,u,d,f,m,p,h,g,b,k,v,y,_,w,C,E,R,O,B,T,A,N,z,U,j,G,V,H,K,oe,ee,J,ie,de,q,ne,X,W,Q,se,ce,_e,ge,Ae,Xe,dt,St,yo,Ge,So,so,Fe,Xt,ft]=pe("background.backgroundImage","background.backgroundSize","typography.fontFamilies.custom","typography.fontFamilies.default","typography.fontFamilies.theme","typography.defaultFontSizes","typography.fontSizes.custom","typography.fontSizes.default","typography.fontSizes.theme","typography.customFontSize","typography.fontStyle","typography.fontWeight","typography.lineHeight","typography.textAlign","typography.textColumns","typography.textDecoration","typography.writingMode","typography.textTransform","typography.letterSpacing","spacing.padding","spacing.margin","spacing.blockGap","spacing.defaultSpacingSizes","spacing.customSpacingSize","spacing.spacingSizes.custom","spacing.spacingSizes.default","spacing.spacingSizes.theme","spacing.units","dimensions.aspectRatio","dimensions.height","dimensions.minHeight","dimensions.width","dimensions.dimensionSizes","layout","border.color","border.radius","border.style","border.width","border.radiusSizes","color.custom","color.palette.custom","color.customDuotone","color.palette.theme","color.palette.default","color.defaultPalette","color.defaultDuotone","color.duotone.custom","color.duotone.theme","color.duotone.default","color.gradients.custom","color.gradients.theme","color.gradients.default","color.defaultGradients","color.customGradient","color.background","color.link","color.text","color.heading","color.button","shadow"),qt=(0,Wi.useMemo)(()=>({background:{backgroundImage:o,backgroundSize:r},color:{palette:{custom:q,theme:X,default:W},gradients:{custom:Ae,theme:Xe,default:dt},duotone:{custom:ce,theme:_e,default:ge},defaultGradients:St,defaultPalette:Q,defaultDuotone:se,custom:de,customGradient:yo,customDuotone:ne,background:Ge,link:So,heading:Fe,button:Xt,text:so},typography:{fontFamilies:{custom:n,default:i,theme:s},fontSizes:{custom:c,default:u,theme:d},customFontSize:f,defaultFontSizes:a,fontStyle:m,fontWeight:p,lineHeight:h,textAlign:g,textColumns:b,textDecoration:k,textTransform:y,letterSpacing:_,writingMode:v},spacing:{spacingSizes:{custom:B,default:T,theme:A},customSpacingSize:O,defaultSpacingSizes:R,padding:w,margin:C,blockGap:E,units:N},border:{color:K,radius:oe,style:ee,width:J,radiusSizes:ie},dimensions:{aspectRatio:z,height:U,minHeight:j,width:G,dimensionSizes:V},layout:H,parentLayout:t,shadow:ft}),[o,r,n,i,s,a,c,u,d,f,m,p,h,g,b,k,y,_,v,w,C,E,R,O,B,T,A,N,z,U,j,G,V,H,t,K,oe,ee,J,ie,de,q,ne,X,W,Q,se,ce,_e,ge,Ae,Xe,dt,St,yo,Ge,So,so,Fe,Xt,ft]);return f2(qt,e)}function Fae(e){e=e.map(o=>({...o,Edit:(0,Wi.memo)(o.edit)}));let t=(0,V4.createHigherOrderComponent)(o=>r=>{let n=Ne();return[...e.map((i,s)=>{let{Edit:a,hasSupport:c,attributeKeys:u=[],shareWithChildBlocks:d,supportsPatternEditing:f}=i;if(!(f&&n[gp]||n[Tc]||n[hp]&&d)||!c(r.name))return null;let p={};for(let h of u)r.attributes[h]&&(p[h]=r.attributes[h]);return(0,u_.jsx)(a,{name:r.name,isSelected:r.isSelected,clientId:r.clientId,setAttributes:r.setAttributes,__unstableParentLayout:r.__unstableParentLayout,...p},s)}),(0,u_.jsx)(o,{...r},"edit")]},"withBlockEditHooks");(0,c_.addFilter)("editor.BlockEdit","core/editor/hooks",t)}function qIe({index:e,useBlockProps:t,setAllWrapperProps:o,...r}){let n=t(r),i=s=>o(a=>{let c=[...a];return c[e]=s,c});return(0,Wi.useEffect)(()=>(i(n),()=>{i(void 0)})),null}var QIe=(0,Wi.memo)(qIe);function zae(e){let t=(0,V4.createHigherOrderComponent)(o=>r=>{let[n,i]=(0,Wi.useState)(Array(e.length).fill(void 0));return[...e.map((s,a)=>{let{hasSupport:c,attributeKeys:u=[],useBlockProps:d,isMatch:f}=s,m={};for(let p of u)r.attributes[p]&&(m[p]=r.attributes[p]);return!Object.keys(m).length||!c(r.name)||f&&!f(m)?null:(0,u_.jsx)(QIe,{index:a,useBlockProps:d,setAllWrapperProps:i,name:r.name,clientId:r.clientId,...m},a)}),(0,u_.jsx)(o,{...r,wrapperProps:n.filter(Boolean).reduce((s,a)=>({...s,...a,className:D(s.className,a.className),style:{...s.style,...a.style}}),r.wrapperProps||{})},"edit")]},"withBlockListBlockHooks");(0,c_.addFilter)("editor.BlockListBlock","core/editor/hooks",t)}function jae(e){function t(o,r,n){return e.reduce((i,s)=>{let{hasSupport:a,attributeKeys:c=[],addSaveProps:u}=s,d={};for(let f of c)n[f]&&(d[f]=n[f]);return!Object.keys(d).length||!a(r)?i:u(i,r,d)},o)}(0,c_.addFilter)("blocks.getSaveContent.extraProps","core/editor/hooks",t,0),(0,c_.addFilter)("blocks.getSaveContent.extraProps","core/editor/hooks",o=>(o.hasOwnProperty("className")&&!o.className&&delete o.className,o))}var Gae=l(Z(),1),Hae=l(Je(),1);function JIe(e){let{apiVersion:t=1}=e;return t<2&&(0,Gae.hasBlockSupport)(e,"lightBlockWrapper",!1)&&(e.apiVersion=2),e}(0,Hae.addFilter)("blocks.registerBlockType","core/compat/migrateLightBlockWrapper",JIe);var Wae=l(Je(),1),Zae=l(Y(),1),F4=l(x(),1);function Uae(e){if(e.hasAttribute("crossorigin")||e.setAttribute("crossorigin","anonymous"),e.nodeName==="IFRAME"&&!e.hasAttribute("credentialless")){if(e.getAttribute("src")?.startsWith("blob:"))return;e.setAttribute("credentialless","");let t=e.getAttribute("src")||"";e.setAttribute("src",""),e.setAttribute("src",t)}}if(window.crossOriginIsolated){let e=new window.MutationObserver(t=>{t.forEach(o=>{[o.addedNodes,o.target].forEach(r=>{(r instanceof window.NodeList?r:[r]).forEach(i=>{let s=i;if(s.querySelectorAll){if(s.querySelectorAll("img,source,script,video,link,iframe").forEach(a=>{Uae(a)}),s.nodeName==="IFRAME"){let a=s;a.classList.contains("components-sandbox")||a.addEventListener("load",()=>{a.contentDocument&&e.observe(a.contentDocument,{childList:!0,attributes:!0,subtree:!0})})}["IMG","SOURCE","SCRIPT","VIDEO","LINK","IFRAME"].includes(s.nodeName)&&Uae(s)}})})})});e.observe(document.body,{childList:!0,attributes:!0,subtree:!0})}if(window.crossOriginIsolated){let e="credentialless"in window.HTMLIFrameElement.prototype,t=(0,Zae.createHigherOrderComponent)(o=>r=>{if(r.name!=="core/embed")return(0,F4.jsx)(o,{...r});let n=e&&!["facebook","smugmug"].includes(r.attributes.providerNameSlug);return(0,F4.jsx)(o,{...r,attributes:{...r.attributes,previewable:n}})},"withDisabledEmbedPreview");(0,Wae.addFilter)("editor.BlockEdit","media-experiments/disable-embed-previews",t)}var $ae=l(Je(),1),Zi=l(Z(),1);var z4=l(x(),1),j4=["left","center","right","wide","full"],e2e=["wide","full"];function G4(e,t=!0,o=!0){let r;return Array.isArray(e)?r=j4.filter(n=>e.includes(n)):e===!0?r=[...j4]:r=[],!o||e===!0&&!t?r.filter(n=>!e2e.includes(n)):r}function t2e(e){return"type"in(e.attributes?.align??{})||(0,Zi.hasBlockSupport)(e,"align")&&(e.attributes={...e.attributes,align:{type:"string",enum:[...j4,""]}}),e}function o2e({name:e,align:t,setAttributes:o}){let r=G4((0,Zi.getBlockSupport)(e,"align"),(0,Zi.hasBlockSupport)(e,"alignWide",!0)),n=Ev(r).map(({name:a})=>a),i=To();return!n.length||i!=="default"?null:(0,z4.jsx)(pt,{group:"block",__experimentalShareWithChildBlocks:!0,children:(0,z4.jsx)(Fw,{value:t,onChange:a=>{a||(0,Zi.getBlockType)(e)?.attributes?.align?.default&&(a=""),o({align:a})},controls:n})})}var nP={shareWithChildBlocks:!0,edit:o2e,useBlockProps:r2e,addSaveProps:n2e,attributeKeys:["align"],hasSupport(e){return(0,Zi.hasBlockSupport)(e,"align",!1)}};function r2e({name:e,align:t}){let o=G4((0,Zi.getBlockSupport)(e,"align"),(0,Zi.hasBlockSupport)(e,"alignWide",!0));return Ev(o).some(n=>n.name===t)?{"data-align":t}:{}}function n2e(e,t,o){let{align:r}=o,n=(0,Zi.getBlockSupport)(t,"align"),i=(0,Zi.hasBlockSupport)(t,"alignWide",!0);return G4(n,i).includes(r)&&(e.className=D(`align${r}`,e.className)),e}(0,$ae.addFilter)("blocks.registerBlockType","core/editor/align/addAttribute",t2e);var Yae=l(Je(),1);function i2e(e){return"type"in(e.attributes?.lock??{})||(e.attributes={...e.attributes,lock:{type:"object"}}),e}(0,Yae.addFilter)("blocks.registerBlockType","core/lock/addAttribute",i2e);var $4=l(Je(),1),Zb=l(Z(),1);var f_=l(P(),1),aP=l(L(),1),sle=l(I(),1),ale=l(M(),1),lP=l(Z(),1);var _n=l(P(),1),rle=l(I(),1),d_=l(L(),1),nle=l(M(),1);var W4=l(Z(),1),ele=l(M(),1),Wb=l(P(),1),Ms=l(L(),1),iP=l(I(),1),tle=l(Y(),1),ole=l(jo(),1);var H4=l(I(),1),qae=l(Y(),1),Qae=l(P(),1);var Kae=l(P(),1);var Hb=l(x(),1);function s2e({blockTypes:e,value:t,onItemChange:o}){return(0,Hb.jsx)("ul",{className:"block-editor-block-manager__checklist",children:e.map(r=>(0,Hb.jsxs)("li",{className:"block-editor-block-manager__checklist-item",children:[(0,Hb.jsx)(Kae.CheckboxControl,{label:r.title,checked:t.includes(r.name),onChange:(...n)=>o(r,...n)}),(0,Hb.jsx)(Ie,{icon:r.icon})]},r.name))})}var Xae=s2e;var Ub=l(x(),1);function Jae({title:e,blockTypes:t,selectedBlockTypes:o,onChange:r}){let n=(0,qae.useInstanceId)(Jae),i=(0,H4.useCallback)((f,m)=>{r(m?[...o,f]:o.filter(({name:p})=>p!==f.name))},[o,r]),s=(0,H4.useCallback)(f=>{r(f?[...o,...t.filter(m=>!o.find(({name:p})=>p===m.name))]:o.filter(m=>!t.find(({name:p})=>p===m.name)))},[t,o,r]);if(!t.length)return null;let a=t.map(({name:f})=>f).filter(f=>(o??[]).some(m=>m.name===f)),c="block-editor-block-manager__category-title-"+n,u=a.length===t.length,d=!u&&a.length>0;return(0,Ub.jsxs)("div",{role:"group","aria-labelledby":c,className:"block-editor-block-manager__category",children:[(0,Ub.jsx)(Qae.CheckboxControl,{checked:u,onChange:s,className:"block-editor-block-manager__category-title",indeterminate:d,label:(0,Ub.jsx)("span",{id:c,children:e})}),(0,Ub.jsx)(Xae,{blockTypes:t,value:a,onItemChange:i})]})}var U4=Jae;var gc=l(x(),1);function sP({blockTypes:e,selectedBlockTypes:t,onChange:o,showSelectAll:r=!0}){let n=(0,tle.useDebounce)(ole.speak,500),[i,s]=(0,iP.useState)(""),{categories:a,isMatchingSearchTerm:c}=(0,ele.useSelect)(m=>({categories:m(W4.store).getCategories(),isMatchingSearchTerm:m(W4.store).isMatchingSearchTerm}),[]),u=e.filter(m=>!i||c(m,i)),d=t.length>0&&t.length!==e.length,f=e.length>0&&t.length===e.length;return(0,iP.useEffect)(()=>{if(!i)return;let m=u.length,p=(0,Ms.sprintf)((0,Ms._n)("%d result found.","%d results found.",m),m);n(p)},[u?.length,i,n]),(0,gc.jsxs)(Wb.__experimentalVStack,{className:"block-editor-block-manager__content",spacing:4,children:[(0,gc.jsx)(Wb.SearchControl,{label:(0,Ms.__)("Search for a block"),placeholder:(0,Ms.__)("Search for a block"),value:i,onChange:m=>s(m),className:"block-editor-block-manager__search"}),r&&(0,gc.jsx)(Wb.CheckboxControl,{className:"block-editor-block-manager__select-all",label:(0,Ms.__)("Select all"),checked:f,onChange:()=>{o(f?[]:e)},indeterminate:d}),(0,gc.jsxs)("div",{tabIndex:"0",role:"region","aria-label":(0,Ms.__)("Available block types"),className:"block-editor-block-manager__results",children:[u.length===0&&(0,gc.jsx)("p",{className:"block-editor-block-manager__no-results",children:(0,Ms.__)("No blocks found.")}),a.map(m=>(0,gc.jsx)(U4,{title:m.title,blockTypes:u.filter(p=>p.category===m.slug),selectedBlockTypes:t,onChange:o},m.slug)),(0,gc.jsx)(U4,{title:(0,Ms.__)("Uncategorized"),blockTypes:u.filter(({category:m})=>!m),selectedBlockTypes:t,onChange:o})]})]})}var Ds=l(x(),1);function ile({clientId:e,blockTypes:t,selectedBlockTypes:o,onClose:r}){let[n,i]=(0,rle.useState)(o),{updateBlockAttributes:s}=(0,nle.useDispatch)(S),a=()=>{let c=n.length===t.length,u=n.map(({name:d})=>d);s(e,{allowedBlocks:c?void 0:u}),r()};return(0,Ds.jsx)(_n.Modal,{title:(0,d_.__)("Manage allowed blocks"),onRequestClose:r,overlayClassName:"block-editor-block-allowed-blocks-modal",focusOnMount:"firstContentElement",size:"medium",children:(0,Ds.jsxs)(_n.__experimentalVStack,{as:"form",onSubmit:c=>{c.preventDefault(),a()},spacing:"4",children:[(0,Ds.jsx)(_n.__experimentalText,{children:(0,d_.__)("Select which blocks can be added inside this container.")}),(0,Ds.jsx)(sP,{blockTypes:t,selectedBlockTypes:n,onChange:c=>{i(c)}}),(0,Ds.jsxs)(_n.Flex,{className:"block-editor-block-allowed-blocks-modal__actions",justify:"flex-end",expanded:!1,children:[(0,Ds.jsx)(_n.FlexItem,{children:(0,Ds.jsx)(_n.Button,{variant:"tertiary",onClick:r,__next40pxDefaultSize:!0,children:(0,d_.__)("Cancel")})}),(0,Ds.jsx)(_n.FlexItem,{children:(0,Ds.jsx)(_n.Button,{variant:"primary",type:"submit",__next40pxDefaultSize:!0,children:(0,d_.__)("Apply")})})]})]})})}var Zm=l(x(),1);function lle({clientId:e}){let[t,o]=(0,sle.useState)(!1),{blockTypes:r,selectedBlockNames:n}=(0,ale.useSelect)(a=>{let{getBlockAttributes:c}=a(S);return{blockTypes:a(lP.store).getBlockTypes(),selectedBlockNames:c(e)?.allowedBlocks}},[e]),i=r.filter(a=>(0,lP.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,Zm.jsxs)("div",{className:"block-editor-block-allowed-blocks-control",children:[(0,Zm.jsxs)(f_.BaseControl,{help:(0,aP.__)("Specify which blocks are allowed inside this container."),children:[(0,Zm.jsx)(f_.BaseControl.VisualLabel,{children:(0,aP.__)("Allowed Blocks")}),(0,Zm.jsx)(f_.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>{o(!0)},className:"block-editor-block-allowed-blocks-control__button",children:(0,aP.__)("Manage allowed blocks")})]}),t&&(0,Zm.jsx)(ile,{clientId:e,blockTypes:i,selectedBlockTypes:s,onClose:()=>o(!1)})]})}var Z4=l(x(),1);function a2e({clientId:e}){return To()==="contentOnly"?null:(0,Z4.jsx)($y.Fill,{children:(0,Z4.jsx)(lle,{clientId:e})})}var cle={edit:a2e,attributeKeys:["allowedBlocks"],hasSupport(e){return(0,Zb.hasBlockSupport)(e,"allowedBlocks")}};function l2e(e){return e?.attributes?.allowedBlocks?.type||(0,Zb.hasBlockSupport)(e,"allowedBlocks")&&(e.attributes={...e.attributes,allowedBlocks:{type:"array"}}),e}(0,$4.addFilter)("blocks.registerBlockType","core/allowedBlocks/attribute",l2e);function c2e(e,t,o,r){if(!(0,Zb.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,Zb.getBlockType)(e.name)?.allowedBlocks||[];if(!s.length)return{...e,attributes:{...e.attributes,allowedBlocks:n}};let a=n.filter(c=>s.includes(c));return{...e,attributes:{...e.attributes,allowedBlocks:a}}}(0,$4.addFilter)("blocks.switchToBlockType.transformedBlock","core/allowedBlocks/addTransforms",c2e);var ule=l(Je(),1),cP=l(P(),1),$b=l(L(),1),uP=l(Z(),1),dle=l(I(),1);var ja=l(x(),1),u2e=/[\s#]/g;function d2e(e){return"type"in(e.attributes?.anchor??{})||(0,uP.hasBlockSupport)(e,"anchor")&&(e.attributes={...e.attributes,anchor:{type:"string"}}),e}function f2e({anchor:e,setAttributes:t}){if(To()!=="default")return null;let r=dle.Platform.OS==="web";return(0,ja.jsx)(fe,{group:"advanced",children:(0,ja.jsx)(cP.TextControl,{__next40pxDefaultSize:!0,className:"html-anchor-control",label:(0,$b.__)("HTML anchor"),help:(0,ja.jsxs)(ja.Fragment,{children:[(0,$b.__)("Enter a word or two \u2014 without spaces \u2014 to make a unique web address just for this block, called an \u201Canchor\u201D. Then, you\u2019ll be able to link directly to this section of your page."),r&&(0,ja.jsxs)(ja.Fragment,{children:[" ",(0,ja.jsx)(cP.ExternalLink,{href:(0,$b.__)("https://wordpress.org/documentation/article/page-jumps/"),children:(0,$b.__)("Learn more about anchors")})]})]}),value:e||"",placeholder:r?null:(0,$b.__)("Add an anchor"),onChange:n=>{n=n.replace(u2e,"-"),t({anchor:n!==""?n:void 0})},autoCapitalize:"none",autoComplete:"off"})})}var Y4={addSaveProps:m2e,edit:f2e,attributeKeys:["anchor"],hasSupport(e){return(0,uP.hasBlockSupport)(e,"anchor")}};function m2e(e,t,o){return(0,uP.hasBlockSupport)(t,"anchor")&&(e.id=o.anchor===""?null:o.anchor),e}(0,ule.addFilter)("blocks.registerBlockType","core/anchor/attribute",d2e);var fle=l(Je(),1),dP=l(Z(),1);function p2e(e){return e?.attributes?.ariaLabel?.type||(0,dP.hasBlockSupport)(e,"ariaLabel")&&(e.attributes={...e.attributes,ariaLabel:{type:"string"}}),e}function h2e(e,t,o){return(0,dP.hasBlockSupport)(t,"ariaLabel")&&(e["aria-label"]=o.ariaLabel===""?null:o.ariaLabel),e}var mle={addSaveProps:h2e,attributeKeys:["ariaLabel"],hasSupport(e){return(0,dP.hasBlockSupport)(e,"ariaLabel")}};(0,fle.addFilter)("blocks.registerBlockType","core/ariaLabel/attribute",p2e);var nR=l(Z(),1),iR=l(P(),1),ade=l(M(),1);var hle=l(Fr(),1),ple={};function K4(e,t){let o=hle.useRef(ple);return o.current===ple&&(o.current=e(t)),o}function X4(e,...t){let o=new URL(`https://base-ui.com/production-error/${e}`);return t.forEach(r=>o.searchParams.append("args[]",r)),`Base UI error #${e}; visit ${o} for the full message.`}var mP=l(Fr(),1);function q4(e,t,o,r){let n=K4(ble).current;return g2e(n,e,t,o,r)&&kle(n,[e,t,o,r]),n.callback}function gle(e){let t=K4(ble).current;return b2e(t,e)&&kle(t,e),t.callback}function ble(){return{callback:null,cleanup:null,refs:[]}}function g2e(e,t,o,r,n){return e.refs[0]!==t||e.refs[1]!==o||e.refs[2]!==r||e.refs[3]!==n}function b2e(e,t){return e.refs.length!==t.length||e.refs.some((o,r)=>o!==t[r])}function kle(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 Sle=l(Fr(),1);var vle=l(Fr(),1),k2e=parseInt(vle.version,10);function yle(e){return k2e>=e}function Q4(e){if(!Sle.isValidElement(e))return null;let t=e,o=t.props;return(yle(19)?o?.ref:t.ref)??null}function m_(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function _le(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 xle(e,t){return typeof e=="function"?e(t):e}function wle(e,t){return typeof e=="function"?e(t):e}var h_={};function fP(e,t,o,r,n){let i={...J4(e,h_)};return t&&(i=p_(i,t)),o&&(i=p_(i,o)),r&&(i=p_(i,r)),n&&(i=p_(i,n)),i}function Cle(e){if(e.length===0)return h_;if(e.length===1)return J4(e[0],h_);let t={...J4(e[0],h_)};for(let o=1;o<e.length;o+=1)t=p_(t,e[o]);return t}function p_(e,t){return Ble(t)?t(e):v2e(e,t)}function v2e(e,t){if(!t)return e;for(let o in t){let r=t[o];switch(o){case"style":{e[o]=m_(e.style,r);break}case"className":{e[o]=e3(e.className,r);break}default:y2e(o,r)?e[o]=S2e(e[o],r):e[o]=r}}return e}function y2e(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 Ble(e){return typeof e=="function"}function J4(e,t){return Ble(e)?e(t):e??h_}function S2e(e,t){return t?e?o=>{if(x2e(o)){let n=o;_2e(n);let i=t(n);return n.baseUIHandlerPrevented||e?.(n),i}let r=t(o);return e?.(o),r}:t:e}function _2e(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function e3(e,t){return t?e?t+" "+e:t:e}function x2e(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}var w2e=Object.freeze([]),xd=Object.freeze({});var t3=l(Fr(),1);function Ele(e,t,o={}){let r=t.render,n=C2e(t,o);if(o.enabled===!1)return null;let i=o.state??xd;return B2e(e,r,n,i)}function C2e(e,t={}){let{className:o,style:r,render:n}=e,{state:i=xd,ref:s,props:a,stateAttributesMapping:c,enabled:u=!0}=t,d=u?xle(o,i):void 0,f=u?wle(r,i):void 0,m=u?_le(i,c):xd,p=u?m_(m,Array.isArray(a)?Cle(a):a)??xd:xd;return typeof document<"u"&&(u?Array.isArray(s)?p.ref=gle([p.ref,Q4(n),...s]):p.ref=q4(p.ref,Q4(n),s):q4(null,null)),u?(d!==void 0&&(p.className=e3(p.className,d)),f!==void 0&&(p.style=m_(p.style,f)),p):xd}function B2e(e,t,o,r){if(t){if(typeof t=="function")return t(o,r);let n=fP(o,t.props);return n.ref=o.ref,mP.cloneElement(t,n)}if(e&&typeof e=="string")return E2e(e,o);throw new Error(X4(8))}function E2e(e,t){return e==="button"?(0,t3.createElement)("button",{type:"button",...t,key:t.key}):e==="img"?(0,t3.createElement)("img",{alt:"",...t,key:t.key}):mP.createElement(e,t)}function Tle(e){return Ele(e.defaultTagName??"div",e,e)}var Ile=l(I(),1),T2e=`@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;

@layer wp-ui-components {
	.style-module__stack__Gc4EG {
		display: flex;
	}
}
`;document.head.appendChild(document.createElement("style")).appendChild(document.createTextNode(T2e));var I2e={stack:"style-module__stack__Gc4EG"},Oe=(0,Ile.forwardRef)(function({direction:t,gap:o,align:r,justify:n,wrap:i,render:s,...a},c){let u={gap:o&&`var(--wpds-dimension-gap-${o})`,alignItems:r,justifyContent:n,flexDirection:t,flexWrap:i};return Tle({render:s,ref:c,props:fP(a,{style:u,className:I2e.stack})})});var o3=l(L(),1);var Nt="isAny",Mt="isNone",wr="isAll",Cr="isNotAll",Qr="between",Jr="inThePast",xn="over",Zt="is",$t="isNot",wd="lessThan",Cd="greaterThan",Bd="lessThanOrEqual",Ed="greaterThanOrEqual",Td="before",Id="after",Pd="beforeInc",Rd="afterInc",Ga="contains",Ha="notContains",Ua="startsWith",Od="on",Ad="notOn";var Aht={asc:(0,o3.__)("Sort ascending"),desc:(0,o3.__)("Sort descending")};var Ple=l(Z_(),1),{lock:Nht,unlock:Dt}=(0,Ple.__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 g_=l(I(),1),P2e=[];function Wa({elements:e,getElements:t}){let o=Array.isArray(e)&&e.length>0?e:P2e,[r,n]=(0,g_.useState)(o),[i,s]=(0,g_.useState)(!1);return(0,g_.useEffect)(()=>{if(!t){n(o);return}let a=!1;return s(!0),t().then(c=>{if(!a){let u=Array.isArray(c)&&c.length>0?c:o;n(u)}}).catch(()=>{a||n(o)}).finally(()=>{a||s(!1)}),()=>{a=!0}},[t,o]),{elements:r,isLoading:i}}var ae=l(L(),1),Yt=l(I(),1);var r3=l(x(),1),oo={Name:(0,r3.jsx)("span",{className:"dataviews-filters__summary-filter-text-name"}),Value:(0,r3.jsx)("span",{className:"dataviews-filters__summary-filter-text-value"})},R2e=[{name:Nt,label:(0,ae.__)("Includes"),filterText:(e,t)=>(0,Yt.createInterpolateElement)((0,ae.sprintf)((0,ae.__)("<Name>%1$s includes: </Name><Value>%2$s</Value>"),e.name,t.map(o=>o.label).join(", ")),oo),selection:"multi"},{name:Mt,label:(0,ae.__)("Is none of"),filterText:(e,t)=>(0,Yt.createInterpolateElement)((0,ae.sprintf)((0,ae.__)("<Name>%1$s is none of: </Name><Value>%2$s</Value>"),e.name,t.map(o=>o.label).join(", ")),oo),selection:"multi"},{name:wr,label:(0,ae.__)("Includes all"),filterText:(e,t)=>(0,Yt.createInterpolateElement)((0,ae.sprintf)((0,ae.__)("<Name>%1$s includes all: </Name><Value>%2$s</Value>"),e.name,t.map(o=>o.label).join(", ")),oo),selection:"multi"},{name:Cr,label:(0,ae.__)("Is none of"),filterText:(e,t)=>(0,Yt.createInterpolateElement)((0,ae.sprintf)((0,ae.__)("<Name>%1$s is none of: </Name><Value>%2$s</Value>"),e.name,t.map(o=>o.label).join(", ")),oo),selection:"multi"},{name:Qr,label:(0,ae.__)("Between (inc)"),filterText:(e,t)=>(0,Yt.createInterpolateElement)((0,ae.sprintf)((0,ae.__)("<Name>%1$s between (inc): </Name><Value>%2$s and %3$s</Value>"),e.name,t[0].label[0],t[0].label[1]),oo),selection:"custom"},{name:Jr,label:(0,ae.__)("In the past"),filterText:(e,t)=>(0,Yt.createInterpolateElement)((0,ae.sprintf)((0,ae.__)("<Name>%1$s is in the past: </Name><Value>%2$s</Value>"),e.name,`${t[0].value.value} ${t[0].value.unit}`),oo),selection:"custom"},{name:xn,label:(0,ae.__)("Over"),filterText:(e,t)=>(0,Yt.createInterpolateElement)((0,ae.sprintf)((0,ae.__)("<Name>%1$s is over: </Name><Value>%2$s</Value>"),e.name,`${t[0].value.value} ${t[0].value.unit}`),oo),selection:"custom"},{name:Zt,label:(0,ae.__)("Is"),filterText:(e,t)=>(0,Yt.createInterpolateElement)((0,ae.sprintf)((0,ae.__)("<Name>%1$s is: </Name><Value>%2$s</Value>"),e.name,t[0].label),oo),selection:"single"},{name:$t,label:(0,ae.__)("Is not"),filterText:(e,t)=>(0,Yt.createInterpolateElement)((0,ae.sprintf)((0,ae.__)("<Name>%1$s is not: </Name><Value>%2$s</Value>"),e.name,t[0].label),oo),selection:"single"},{name:wd,label:(0,ae.__)("Less than"),filterText:(e,t)=>(0,Yt.createInterpolateElement)((0,ae.sprintf)((0,ae.__)("<Name>%1$s is less than: </Name><Value>%2$s</Value>"),e.name,t[0].label),oo),selection:"single"},{name:Cd,label:(0,ae.__)("Greater than"),filterText:(e,t)=>(0,Yt.createInterpolateElement)((0,ae.sprintf)((0,ae.__)("<Name>%1$s is greater than: </Name><Value>%2$s</Value>"),e.name,t[0].label),oo),selection:"single"},{name:Bd,label:(0,ae.__)("Less than or equal"),filterText:(e,t)=>(0,Yt.createInterpolateElement)((0,ae.sprintf)((0,ae.__)("<Name>%1$s is less than or equal to: </Name><Value>%2$s</Value>"),e.name,t[0].label),oo),selection:"single"},{name:Ed,label:(0,ae.__)("Greater than or equal"),filterText:(e,t)=>(0,Yt.createInterpolateElement)((0,ae.sprintf)((0,ae.__)("<Name>%1$s is greater than or equal to: </Name><Value>%2$s</Value>"),e.name,t[0].label),oo),selection:"single"},{name:Td,label:(0,ae.__)("Before"),filterText:(e,t)=>(0,Yt.createInterpolateElement)((0,ae.sprintf)((0,ae.__)("<Name>%1$s is before: </Name><Value>%2$s</Value>"),e.name,t[0].label),oo),selection:"single"},{name:Id,label:(0,ae.__)("After"),filterText:(e,t)=>(0,Yt.createInterpolateElement)((0,ae.sprintf)((0,ae.__)("<Name>%1$s is after: </Name><Value>%2$s</Value>"),e.name,t[0].label),oo),selection:"single"},{name:Pd,label:(0,ae.__)("Before (inc)"),filterText:(e,t)=>(0,Yt.createInterpolateElement)((0,ae.sprintf)((0,ae.__)("<Name>%1$s is on or before: </Name><Value>%2$s</Value>"),e.name,t[0].label),oo),selection:"single"},{name:Rd,label:(0,ae.__)("After (inc)"),filterText:(e,t)=>(0,Yt.createInterpolateElement)((0,ae.sprintf)((0,ae.__)("<Name>%1$s is on or after: </Name><Value>%2$s</Value>"),e.name,t[0].label),oo),selection:"single"},{name:Ga,label:(0,ae.__)("Contains"),filterText:(e,t)=>(0,Yt.createInterpolateElement)((0,ae.sprintf)((0,ae.__)("<Name>%1$s contains: </Name><Value>%2$s</Value>"),e.name,t[0].label),oo),selection:"single"},{name:Ha,label:(0,ae.__)("Doesn't contain"),filterText:(e,t)=>(0,Yt.createInterpolateElement)((0,ae.sprintf)((0,ae.__)("<Name>%1$s doesn't contain: </Name><Value>%2$s</Value>"),e.name,t[0].label),oo),selection:"single"},{name:Ua,label:(0,ae.__)("Starts with"),filterText:(e,t)=>(0,Yt.createInterpolateElement)((0,ae.sprintf)((0,ae.__)("<Name>%1$s starts with: </Name><Value>%2$s</Value>"),e.name,t[0].label),oo),selection:"single"},{name:Od,label:(0,ae.__)("On"),filterText:(e,t)=>(0,Yt.createInterpolateElement)((0,ae.sprintf)((0,ae.__)("<Name>%1$s is: </Name><Value>%2$s</Value>"),e.name,t[0].label),oo),selection:"single"},{name:Ad,label:(0,ae.__)("Not on"),filterText:(e,t)=>(0,Yt.createInterpolateElement)((0,ae.sprintf)((0,ae.__)("<Name>%1$s is not: </Name><Value>%2$s</Value>"),e.name,t[0].label),oo),selection:"single"}];var Rle=()=>R2e.map(e=>e.name);var Ole=l(P(),1),Ale=l(I(),1);function Vt(e,t){let o;return e?.required&&t?.required?o=t?.required?.message?t.required:void 0:e?.pattern&&t?.pattern?o=t.pattern:e?.min&&t?.min?o=t.min:e?.max&&t?.max?o=t.max:e?.minLength&&t?.minLength?o=t.minLength:e?.maxLength&&t?.maxLength?o=t.maxLength:e?.elements&&t?.elements?o=t.elements:t?.custom&&(o=t.custom),o}var Lle=l(x(),1),{ValidatedCheckboxControl:O2e}=Dt(Ole.privateApis);function Nle({field:e,onChange:t,data:o,hideLabelFromVision:r,validity:n}){let{getValue:i,setValue:s,label:a,description:c,isValid:u}=e,d=(0,Ale.useCallback)(()=>{t(s({item:o,value:!i({item:o})}))},[o,i,t,s]);return(0,Lle.jsx)(O2e,{required:!!e.isValid?.required,customValidity:Vt(u,n),hidden:r,label:a,help:c,checked:i({item:o}),onChange:d})}var A2e=Math.pow(10,8)*24*60*60*1e3,Uht=-A2e,pP=6048e5,Mle=864e5;var L2e=3600;var Dle=L2e*24,Wht=Dle*7,N2e=Dle*365.2425,M2e=N2e/12,Zht=M2e*3,n3=Symbol.for("constructDateFrom");function Mo(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&n3 in e?e[n3](t):e instanceof Date?new e.constructor(t):new Date(t)}function nt(e,t){return Mo(t||e,e)}function Vle(e,t,o){let r=nt(e,o?.in);return isNaN(t)?Mo(o?.in||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function hP(e,t,o){let r=nt(e,o?.in);if(isNaN(t))return Mo(o?.in||e,NaN);if(!t)return r;let n=r.getDate(),i=Mo(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 D2e={};function Ld(){return D2e}function bc(e,t){let o=Ld(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??o.weekStartsOn??o.locale?.options?.weekStartsOn??0,n=nt(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 $m(e,t){return bc(e,{...t,weekStartsOn:1})}function gP(e,t){let o=nt(e,t?.in),r=o.getFullYear(),n=Mo(o,0);n.setFullYear(r+1,0,4),n.setHours(0,0,0,0);let i=$m(n),s=Mo(o,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);let a=$m(s);return o.getTime()>=i.getTime()?r+1:o.getTime()>=a.getTime()?r:r-1}function i3(e){let t=nt(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 Fle(e,...t){let o=Mo.bind(null,e||t.find(r=>typeof r=="object"));return t.map(o)}function s3(e,t){let o=nt(e,t?.in);return o.setHours(0,0,0,0),o}function zle(e,t,o){let[r,n]=Fle(o?.in,e,t),i=s3(r),s=s3(n),a=+i-i3(i),c=+s-i3(s);return Math.round((a-c)/Mle)}function jle(e,t){let o=gP(e,t),r=Mo(t?.in||e,0);return r.setFullYear(o,0,4),r.setHours(0,0,0,0),$m(r)}function Gle(e,t,o){return hP(e,t*12,o)}function Hle(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Yb(e){return!(!Hle(e)&&typeof e!="number"||isNaN(+nt(e)))}function Ule(e,t){let o=nt(e,t?.in);return o.setDate(1),o.setHours(0,0,0,0),o}function bP(e,t){let o=nt(e,t?.in);return o.setFullYear(o.getFullYear(),0,1),o.setHours(0,0,0,0),o}var V2e={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"}},Wle=(e,t,o)=>{let r,n=V2e[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 kP(e){return(t={})=>{let o=t.width?String(t.width):e.defaultWidth;return e.formats[o]||e.formats[e.defaultWidth]}}var F2e={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},z2e={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},j2e={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Zle={date:kP({formats:F2e,defaultWidth:"full"}),time:kP({formats:z2e,defaultWidth:"full"}),dateTime:kP({formats:j2e,defaultWidth:"full"})};var G2e={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},$le=(e,t,o,r)=>G2e[e];function Kb(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 H2e={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},U2e={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},W2e={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"]},Z2e={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"]},$2e={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"}},Y2e={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"}},K2e=(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"},Yle={ordinalNumber:K2e,era:Kb({values:H2e,defaultWidth:"wide"}),quarter:Kb({values:U2e,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Kb({values:W2e,defaultWidth:"wide"}),day:Kb({values:Z2e,defaultWidth:"wide"}),dayPeriod:Kb({values:$2e,defaultWidth:"wide",formattingValues:Y2e,defaultFormattingWidth:"wide"})};function Xb(e){return(t,o={})=>{let r=o.width,n=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(n);if(!i)return null;let s=i[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(a)?q2e(a,f=>f.test(s)):X2e(a,f=>f.test(s)),u;u=e.valueCallback?e.valueCallback(c):c,u=o.valueCallback?o.valueCallback(u):u;let d=t.slice(s.length);return{value:u,rest:d}}}function X2e(e,t){for(let o in e)if(Object.prototype.hasOwnProperty.call(e,o)&&t(e[o]))return o}function q2e(e,t){for(let o=0;o<e.length;o++)if(t(e[o]))return o}function Kle(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 Q2e=/^(\d+)(th|st|nd|rd)?/i,J2e=/\d+/i,ePe={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},tPe={any:[/^b/i,/^(a|c)/i]},oPe={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},rPe={any:[/1/i,/2/i,/3/i,/4/i]},nPe={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},iPe={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]},sPe={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},aPe={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]},lPe={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},cPe={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}},Xle={ordinalNumber:Kle({matchPattern:Q2e,parsePattern:J2e,valueCallback:e=>parseInt(e,10)}),era:Xb({matchPatterns:ePe,defaultMatchWidth:"wide",parsePatterns:tPe,defaultParseWidth:"any"}),quarter:Xb({matchPatterns:oPe,defaultMatchWidth:"wide",parsePatterns:rPe,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Xb({matchPatterns:nPe,defaultMatchWidth:"wide",parsePatterns:iPe,defaultParseWidth:"any"}),day:Xb({matchPatterns:sPe,defaultMatchWidth:"wide",parsePatterns:aPe,defaultParseWidth:"any"}),dayPeriod:Xb({matchPatterns:lPe,defaultMatchWidth:"any",parsePatterns:cPe,defaultParseWidth:"any"})};var a3={code:"en-US",formatDistance:Wle,formatLong:Zle,formatRelative:$le,localize:Yle,match:Xle,options:{weekStartsOn:0,firstWeekContainsDate:1}};function qle(e,t){let o=nt(e,t?.in);return zle(o,bP(o))+1}function Qle(e,t){let o=nt(e,t?.in),r=+$m(o)-+jle(o);return Math.round(r/pP)+1}function vP(e,t){let o=nt(e,t?.in),r=o.getFullYear(),n=Ld(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,s=Mo(t?.in||e,0);s.setFullYear(r+1,0,i),s.setHours(0,0,0,0);let a=bc(s,t),c=Mo(t?.in||e,0);c.setFullYear(r,0,i),c.setHours(0,0,0,0);let u=bc(c,t);return+o>=+a?r+1:+o>=+u?r:r-1}function Jle(e,t){let o=Ld(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,n=vP(e,t),i=Mo(t?.in||e,0);return i.setFullYear(n,0,r),i.setHours(0,0,0,0),bc(i,t)}function ece(e,t){let o=nt(e,t?.in),r=+bc(o,t)-+Jle(o,t);return Math.round(r/pP)+1}function $e(e,t){let o=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return o+r}var kc={y(e,t){let o=e.getFullYear(),r=o>0?o:1-o;return $e(t==="yy"?r%100:r,t.length)},M(e,t){let o=e.getMonth();return t==="M"?String(o+1):$e(o+1,2)},d(e,t){return $e(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 $e(e.getHours()%12||12,t.length)},H(e,t){return $e(e.getHours(),t.length)},m(e,t){return $e(e.getMinutes(),t.length)},s(e,t){return $e(e.getSeconds(),t.length)},S(e,t){let o=t.length,r=e.getMilliseconds(),n=Math.trunc(r*Math.pow(10,o-3));return $e(n,t.length)}};var qb={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},l3={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 kc.y(e,t)},Y:function(e,t,o,r){let n=vP(e,r),i=n>0?n:1-n;if(t==="YY"){let s=i%100;return $e(s,2)}return t==="Yo"?o.ordinalNumber(i,{unit:"year"}):$e(i,t.length)},R:function(e,t){let o=gP(e);return $e(o,t.length)},u:function(e,t){let o=e.getFullYear();return $e(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 $e(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 $e(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 kc.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 $e(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=ece(e,r);return t==="wo"?o.ordinalNumber(n,{unit:"week"}):$e(n,t.length)},I:function(e,t,o){let r=Qle(e);return t==="Io"?o.ordinalNumber(r,{unit:"week"}):$e(r,t.length)},d:function(e,t,o){return t==="do"?o.ordinalNumber(e.getDate(),{unit:"date"}):kc.d(e,t)},D:function(e,t,o){let r=qle(e);return t==="Do"?o.ordinalNumber(r,{unit:"dayOfYear"}):$e(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 $e(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 $e(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 $e(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=qb.noon:r===0?n=qb.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=qb.evening:r>=12?n=qb.afternoon:r>=4?n=qb.morning:n=qb.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 kc.h(e,t)},H:function(e,t,o){return t==="Ho"?o.ordinalNumber(e.getHours(),{unit:"hour"}):kc.H(e,t)},K:function(e,t,o){let r=e.getHours()%12;return t==="Ko"?o.ordinalNumber(r,{unit:"hour"}):$e(r,t.length)},k:function(e,t,o){let r=e.getHours();return r===0&&(r=24),t==="ko"?o.ordinalNumber(r,{unit:"hour"}):$e(r,t.length)},m:function(e,t,o){return t==="mo"?o.ordinalNumber(e.getMinutes(),{unit:"minute"}):kc.m(e,t)},s:function(e,t,o){return t==="so"?o.ordinalNumber(e.getSeconds(),{unit:"second"}):kc.s(e,t)},S:function(e,t){return kc.S(e,t)},X:function(e,t,o){let r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return oce(r);case"XXXX":case"XX":return Ym(r);default:return Ym(r,":")}},x:function(e,t,o){let r=e.getTimezoneOffset();switch(t){case"x":return oce(r);case"xxxx":case"xx":return Ym(r);default:return Ym(r,":")}},O:function(e,t,o){let r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+tce(r,":");default:return"GMT"+Ym(r,":")}},z:function(e,t,o){let r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+tce(r,":");default:return"GMT"+Ym(r,":")}},t:function(e,t,o){let r=Math.trunc(+e/1e3);return $e(r,t.length)},T:function(e,t,o){return $e(+e,t.length)}};function tce(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+$e(i,2)}function oce(e,t){return e%60===0?(e>0?"-":"+")+$e(Math.abs(e)/60,2):Ym(e,t)}function Ym(e,t=""){let o=e>0?"-":"+",r=Math.abs(e),n=$e(Math.trunc(r/60),2),i=$e(r%60,2);return o+n+t+i}var rce=(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"})}},nce=(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"})}},uPe=(e,t)=>{let o=e.match(/(P+)(p+)?/)||[],r=o[1],n=o[2];if(!n)return rce(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}}",rce(r,t)).replace("{{time}}",nce(n,t))},ice={p:nce,P:uPe};var dPe=/^D+$/,fPe=/^Y+$/,mPe=["D","DD","YY","YYYY"];function sce(e){return dPe.test(e)}function ace(e){return fPe.test(e)}function lce(e,t,o){let r=pPe(e,t,o);if(console.warn(r),mPe.includes(e))throw new RangeError(r)}function pPe(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 hPe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,gPe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,bPe=/^'([^]*?)'?$/,kPe=/''/g,vPe=/[a-zA-Z]/;function b_(e,t,o){let r=Ld(),n=o?.locale??r.locale??a3,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=nt(e,o?.in);if(!Yb(a))throw new RangeError("Invalid time value");let c=t.match(gPe).map(d=>{let f=d[0];if(f==="p"||f==="P"){let m=ice[f];return m(d,n.formatLong)}return d}).join("").match(hPe).map(d=>{if(d==="''")return{isToken:!1,value:"'"};let f=d[0];if(f==="'")return{isToken:!1,value:yPe(d)};if(l3[f])return{isToken:!0,value:d};if(f.match(vPe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+f+"`");return{isToken:!1,value:d}});n.localize.preprocessor&&(c=n.localize.preprocessor(a,c));let u={firstWeekContainsDate:i,weekStartsOn:s,locale:n};return c.map(d=>{if(!d.isToken)return d.value;let f=d.value;(!o?.useAdditionalWeekYearTokens&&ace(f)||!o?.useAdditionalDayOfYearTokens&&sce(f))&&lce(f,t,String(e));let m=l3[f[0]];return m(a,f,n.localize,u)}).join("")}function yPe(e){let t=e.match(bPe);return t?t[1].replace(kPe,"'"):e}function k_(e,t,o){return Vle(e,-t,o)}function cce(e,t,o){return hP(e,-t,o)}function uce(e,t,o){return Gle(e,-t,o)}var SP=l(P(),1),$i=l(I(),1),u3=l(L(),1),d3=l(rd(),1);var Jb=l(P(),1),c3=l(I(),1),Za=l(L(),1);var Qb=l(x(),1),SPe={[Jr]:[{value:"days",label:(0,Za.__)("Days")},{value:"weeks",label:(0,Za.__)("Weeks")},{value:"months",label:(0,Za.__)("Months")},{value:"years",label:(0,Za.__)("Years")}],[xn]:[{value:"days",label:(0,Za.__)("Days ago")},{value:"weeks",label:(0,Za.__)("Weeks ago")},{value:"months",label:(0,Za.__)("Months ago")},{value:"years",label:(0,Za.__)("Years ago")}]};function yP({className:e,data:t,field:o,onChange:r,hideLabelFromVision:n,operator:i}){let s=SPe[i===Jr?"inThePast":"over"],{id:a,label:c,getValue:u,setValue:d}=o,f=u({item:t}),{value:m="",unit:p=s[0].value}=f&&typeof f=="object"?f:{},h=(0,c3.useCallback)(b=>r(d({item:t,value:{value:Number(b),unit:p}})),[r,d,t,p]),g=(0,c3.useCallback)(b=>r(d({item:t,value:{value:m,unit:b}})),[r,d,t,m]);return(0,Qb.jsx)(Jb.BaseControl,{id:a,className:D(e,"dataviews-controls__relative-date"),label:c,hideLabelFromVision:n,children:(0,Qb.jsxs)(Oe,{direction:"row",gap:"xs",children:[(0,Qb.jsx)(Jb.__experimentalNumberControl,{__next40pxDefaultSize:!0,className:"dataviews-controls__relative-date-number",spinControls:"none",min:1,step:1,value:m,onChange:h}),(0,Qb.jsx)(Jb.SelectControl,{className:"dataviews-controls__relative-date-unit",__next40pxDefaultSize:!0,label:(0,Za.__)("Unit"),value:p,options:s,onChange:g,hideLabelFromVision:!0})]})})}var dce=l(rd(),1);function ek(e){if(!e)return null;let t=(0,dce.getDate)(e);return t&&Yb(t)?t:null}var Nd=l(x(),1),{DateCalendar:_Pe,ValidatedInputControl:xPe}=Dt(SP.privateApis),wPe=e=>e?typeof e=="string"?e:b_(e,"yyyy-MM-dd'T'HH:mm"):"";function CPe({data:e,field:t,onChange:o,hideLabelFromVision:r,validity:n}){let{id:i,label:s,description:a,setValue:c,getValue:u,isValid:d}=t,f=u({item:e}),m=typeof f=="string"?f:void 0,[p,h]=(0,$i.useState)(()=>ek(m)||new Date),g=(0,$i.useRef)(null),b=(0,$i.useRef)(),k=(0,$i.useRef)(null),v=(0,$i.useCallback)(O=>o(c({item:e,value:O})),[e,o,c]);(0,$i.useEffect)(()=>()=>{b.current&&clearTimeout(b.current)},[]);let y=(0,$i.useCallback)(O=>{let B;if(O){let T=O;if(m){let A=ek(m);A&&(T=new Date(O),T.setHours(A.getHours()),T.setMinutes(A.getMinutes()))}B=T.toISOString(),v(B),b.current&&clearTimeout(b.current)}else v(void 0);k.current=g.current&&g.current.ownerDocument.activeElement,b.current=setTimeout(()=>{g.current&&(g.current.focus(),g.current.blur(),v(B),k.current&&k.current instanceof HTMLElement&&k.current.focus())},0)},[v,m]),_=(0,$i.useCallback)(O=>{if(O){let B=new Date(O);v(B.toISOString());let T=ek(B.toISOString());T&&h(T)}else v(void 0)},[v]),{format:w}=t,C=w.weekStartsOn??(0,d3.getSettings)().l10n.startOfWeek,{timezone:{string:E}}=(0,d3.getSettings)(),R=d?.required&&!r?`${s} (${(0,u3.__)("Required")})`:s;return(0,Nd.jsx)(SP.BaseControl,{id:i,label:R,help:a,hideLabelFromVision:r,children:(0,Nd.jsxs)(Oe,{direction:"column",gap:"md",children:[(0,Nd.jsx)(_Pe,{style:{width:"100%"},selected:m&&ek(m)||void 0,onSelect:y,month:p,onMonthChange:h,timeZone:E||void 0,weekStartsOn:C}),(0,Nd.jsx)(xPe,{ref:g,__next40pxDefaultSize:!0,required:!!d?.required,customValidity:Vt(d,n),type:"datetime-local",label:(0,u3.__)("Date time"),hideLabelFromVision:!0,value:m?wPe(ek(m)||void 0):"",onChange:_})]})})}function fce({data:e,field:t,onChange:o,hideLabelFromVision:r,operator:n,validity:i}){return n===Jr||n===xn?(0,Nd.jsx)(yP,{className:"dataviews-controls__datetime",data:e,field:t,onChange:o,hideLabelFromVision:r,operator:n}):(0,Nd.jsx)(CPe,{data:e,field:t,onChange:o,hideLabelFromVision:r,validity:i})}var Er=l(P(),1),ut=l(I(),1),dr=l(L(),1),Br=l(rd(),1);var ct=l(x(),1),{DateCalendar:BPe,DateRangeCalendar:EPe}=Dt(Er.privateApis),TPe=[{id:"today",label:(0,dr.__)("Today"),getValue:()=>(0,Br.getDate)(null)},{id:"yesterday",label:(0,dr.__)("Yesterday"),getValue:()=>{let e=(0,Br.getDate)(null);return k_(e,1)}},{id:"past-week",label:(0,dr.__)("Past week"),getValue:()=>{let e=(0,Br.getDate)(null);return k_(e,7)}},{id:"past-month",label:(0,dr.__)("Past month"),getValue:()=>{let e=(0,Br.getDate)(null);return cce(e,1)}}],IPe=[{id:"last-7-days",label:(0,dr.__)("Last 7 days"),getValue:()=>{let e=(0,Br.getDate)(null);return[k_(e,7),e]}},{id:"last-30-days",label:(0,dr.__)("Last 30 days"),getValue:()=>{let e=(0,Br.getDate)(null);return[k_(e,30),e]}},{id:"month-to-date",label:(0,dr.__)("Month to date"),getValue:()=>{let e=(0,Br.getDate)(null);return[Ule(e),e]}},{id:"last-year",label:(0,dr.__)("Last year"),getValue:()=>{let e=(0,Br.getDate)(null);return[uce(e,1),e]}},{id:"year-to-date",label:(0,dr.__)("Year to date"),getValue:()=>{let e=(0,Br.getDate)(null);return[bP(e),e]}}],tk=e=>{if(!e)return null;let t=(0,Br.getDate)(e);return t&&Yb(t)?t:null},f3=e=>e?typeof e=="string"?e:b_(e,"yyyy-MM-dd"):"";function mce({field:e,validity:t,inputRefs:o,isTouched:r,setIsTouched:n,children:i}){let{isValid:s}=e,[a,c]=(0,ut.useState)(void 0),u=(0,ut.useCallback)(()=>{let f=Array.isArray(o)?o:[o];for(let m of f){let p=m.current;if(p&&!p.validity.valid){c({type:"invalid",message:p.validationMessage});return}}c(void 0)},[o]);return(0,ut.useEffect)(()=>{if(r){let f=setTimeout(()=>{t?c(Vt(s,t)):u()},0);return()=>clearTimeout(f)}},[r,s,t,u]),(0,ct.jsxs)("div",{onBlur:f=>{r||(!f.relatedTarget||!f.currentTarget.contains(f.relatedTarget))&&n(!0)},children:[i,(0,ct.jsx)("div",{"aria-live":"polite",children:a&&(0,ct.jsxs)("p",{className:D("components-validated-control__indicator",a.type==="invalid"?"is-invalid":void 0,a.type==="valid"?"is-valid":void 0),children:[(0,ct.jsx)(Er.Icon,{className:"components-validated-control__indicator-icon",icon:Ep,size:16,fill:"currentColor"}),a.message]})})]})}function PPe({data:e,field:t,onChange:o,hideLabelFromVision:r,validity:n}){let{id:i,label:s,setValue:a,getValue:c,isValid:u,format:d}=t,[f,m]=(0,ut.useState)(null),p=d.weekStartsOn??(0,Br.getSettings)().l10n.startOfWeek,h=c({item:e}),g=typeof h=="string"?h:void 0,[b,k]=(0,ut.useState)(()=>tk(g)||new Date),[v,y]=(0,ut.useState)(!1),_=(0,ut.useRef)(null),w=(0,ut.useCallback)(T=>o(a({item:e,value:T})),[e,o,a]),C=(0,ut.useCallback)(T=>{let A=T?b_(T,"yyyy-MM-dd"):void 0;w(A),m(null),y(!0)},[w]),E=(0,ut.useCallback)(T=>{let A=T.getValue(),N=f3(A);k(A),w(N),m(T.id),y(!0)},[w]),R=(0,ut.useCallback)(T=>{if(w(T),T){let A=tk(T);A&&k(A)}m(null),y(!0)},[w]),{timezone:{string:O}}=(0,Br.getSettings)(),B=u?.required?`${s} (${(0,dr.__)("Required")})`:s;return(0,ct.jsx)(mce,{field:t,validity:n,inputRefs:_,isTouched:v,setIsTouched:y,children:(0,ct.jsx)(Er.BaseControl,{id:i,className:"dataviews-controls__date",label:B,hideLabelFromVision:r,children:(0,ct.jsxs)(Oe,{direction:"column",gap:"md",children:[(0,ct.jsxs)(Oe,{direction:"row",gap:"xs",wrap:"wrap",justify:"flex-start",children:[TPe.map(T=>{let A=f===T.id;return(0,ct.jsx)(Er.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:A,size:"small",onClick:()=>E(T),children:T.label},T.id)}),(0,ct.jsx)(Er.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:!f,size:"small",disabled:!!f,accessibleWhenDisabled:!1,children:(0,dr.__)("Custom")})]}),(0,ct.jsx)(Er.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:_,type:"date",label:(0,dr.__)("Date"),hideLabelFromVision:!0,value:g,onChange:R,required:!!t.isValid?.required}),(0,ct.jsx)(BPe,{style:{width:"100%"},selected:g&&tk(g)||void 0,onSelect:C,month:b,onMonthChange:k,timeZone:O||void 0,weekStartsOn:p})]})})})}function RPe({data:e,field:t,onChange:o,hideLabelFromVision:r,validity:n}){let{id:i,label:s,getValue:a,setValue:c,format:u}=t,d,f=a({item:e});Array.isArray(f)&&f.length===2&&f.every(N=>typeof N=="string")&&(d=f);let m=u.weekStartsOn??(0,Br.getSettings)().l10n.startOfWeek,p=(0,ut.useCallback)(N=>{o(c({item:e,value:N}))},[e,o,c]),[h,g]=(0,ut.useState)(null),b=(0,ut.useMemo)(()=>{if(!d)return{from:void 0,to:void 0};let[N,z]=d;return{from:tk(N)||void 0,to:tk(z)||void 0}},[d]),[k,v]=(0,ut.useState)(()=>b.from||new Date),[y,_]=(0,ut.useState)(!1),w=(0,ut.useRef)(null),C=(0,ut.useRef)(null),E=(0,ut.useCallback)((N,z)=>{N&&z?p([f3(N),f3(z)]):!N&&!z&&p(void 0)},[p]),R=(0,ut.useCallback)(N=>{E(N?.from,N?.to),g(null),_(!0)},[E]),O=(0,ut.useCallback)(N=>{let[z,U]=N.getValue();v(z),E(z,U),g(N.id),_(!0)},[E]),B=(0,ut.useCallback)((N,z)=>{let[U,j]=d||[void 0,void 0];if(E(N==="from"?z:U,N==="to"?z:j),z){let H=tk(z);H&&v(H)}g(null),_(!0)},[d,E]),{timezone:T}=(0,Br.getSettings)(),A=t.isValid?.required?`${s} (${(0,dr.__)("Required")})`:s;return(0,ct.jsx)(mce,{field:t,validity:n,inputRefs:[w,C],isTouched:y,setIsTouched:_,children:(0,ct.jsx)(Er.BaseControl,{id:i,className:"dataviews-controls__date",label:A,hideLabelFromVision:r,children:(0,ct.jsxs)(Oe,{direction:"column",gap:"md",children:[(0,ct.jsxs)(Oe,{direction:"row",gap:"xs",wrap:"wrap",justify:"flex-start",children:[IPe.map(N=>{let z=h===N.id;return(0,ct.jsx)(Er.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:z,size:"small",onClick:()=>O(N),children:N.label},N.id)}),(0,ct.jsx)(Er.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:!h,size:"small",accessibleWhenDisabled:!1,disabled:!!h,children:(0,dr.__)("Custom")})]}),(0,ct.jsxs)(Oe,{direction:"row",gap:"xs",justify:"space-between",className:"dataviews-controls__date-range-inputs",children:[(0,ct.jsx)(Er.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:w,type:"date",label:(0,dr.__)("From"),hideLabelFromVision:!0,value:d?.[0],onChange:N=>B("from",N),required:!!t.isValid?.required}),(0,ct.jsx)(Er.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:C,type:"date",label:(0,dr.__)("To"),hideLabelFromVision:!0,value:d?.[1],onChange:N=>B("to",N),required:!!t.isValid?.required})]}),(0,ct.jsx)(EPe,{style:{width:"100%"},selected:b,onSelect:R,month:k,onMonthChange:v,timeZone:T.string||void 0,weekStartsOn:m})]})})})}function pce({data:e,field:t,onChange:o,hideLabelFromVision:r,operator:n,validity:i}){return n===Jr||n===xn?(0,ct.jsx)(yP,{className:"dataviews-controls__date",data:e,field:t,onChange:o,hideLabelFromVision:r,operator:n}):n===Qr?(0,ct.jsx)(RPe,{data:e,field:t,onChange:o,hideLabelFromVision:r,validity:i}):(0,ct.jsx)(PPe,{data:e,field:t,onChange:o,hideLabelFromVision:r,validity:i})}var xP=l(P(),1);var hce=l(P(),1),gce=l(I(),1);var bce=l(x(),1),{ValidatedInputControl:OPe}=Dt(hce.privateApis);function $a({data:e,field:t,onChange:o,hideLabelFromVision:r,type:n,prefix:i,suffix:s,validity:a}){let{label:c,placeholder:u,description:d,getValue:f,setValue:m,isValid:p}=t,h=f({item:e}),g=(0,gce.useCallback)(b=>o(m({item:e,value:b})),[e,m,o]);return(0,bce.jsx)(OPe,{required:!!p.required,customValidity:Vt(p,a),label:c,placeholder:u,value:h??"",help:d,onChange:g,hideLabelFromVision:r,type:n,prefix:i,suffix:s,pattern:p.pattern?p.pattern.constraint:void 0,minLength:p.minLength?p.minLength.constraint:void 0,maxLength:p.maxLength?p.maxLength.constraint:void 0,__next40pxDefaultSize:!0})}var _P=l(x(),1);function kce({data:e,field:t,onChange:o,hideLabelFromVision:r,validity:n}){return(0,_P.jsx)($a,{data:e,field:t,onChange:o,hideLabelFromVision:r,validity:n,type:"email",prefix:(0,_P.jsx)(xP.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,_P.jsx)(xP.Icon,{icon:FO})})})}var CP=l(P(),1);var wP=l(x(),1);function vce({data:e,field:t,onChange:o,hideLabelFromVision:r,validity:n}){return(0,wP.jsx)($a,{data:e,field:t,onChange:o,hideLabelFromVision:r,validity:n,type:"tel",prefix:(0,wP.jsx)(CP.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,wP.jsx)(CP.Icon,{icon:Zk})})})}var EP=l(P(),1);var BP=l(x(),1);function yce({data:e,field:t,onChange:o,hideLabelFromVision:r,validity:n}){return(0,BP.jsx)($a,{data:e,field:t,onChange:o,hideLabelFromVision:r,validity:n,type:"url",prefix:(0,BP.jsx)(EP.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,BP.jsx)(EP.Icon,{icon:nn})})})}var vc=l(P(),1),v_=l(I(),1),TP=l(L(),1);var Md=l(x(),1),{ValidatedNumberControl:APe}=Dt(vc.privateApis);function Sce(e){if(e===""||e===void 0)return"";let t=Number(e);return Number.isFinite(t)?t:""}function LPe({value:e,onChange:t,hideLabelFromVision:o,step:r}){let[n="",i=""]=e,s=(0,v_.useCallback)(c=>t([Sce(c),i]),[t,i]),a=(0,v_.useCallback)(c=>t([n,Sce(c)]),[t,n]);return(0,Md.jsx)(vc.BaseControl,{help:(0,TP.__)("The max. value must be greater than the min. value."),children:(0,Md.jsxs)(vc.Flex,{direction:"row",gap:4,children:[(0,Md.jsx)(vc.__experimentalNumberControl,{label:(0,TP.__)("Min."),value:n,max:i?Number(i)-r:void 0,onChange:s,__next40pxDefaultSize:!0,hideLabelFromVision:o,step:r}),(0,Md.jsx)(vc.__experimentalNumberControl,{label:(0,TP.__)("Max."),value:i,min:n?Number(n)+r:void 0,onChange:a,__next40pxDefaultSize:!0,hideLabelFromVision:o,step:r})]})})}function IP({data:e,field:t,onChange:o,hideLabelFromVision:r,operator:n,validity:i}){let s=t.format?.decimals??0,a=Math.pow(10,Math.abs(s)*-1),{label:c,description:u,getValue:d,setValue:f,isValid:m}=t,p=d({item:e})??"",h=(0,v_.useCallback)(b=>{o(f({item:e,value:["",void 0].includes(b)?void 0:Number(b)}))},[e,o,f]),g=(0,v_.useCallback)(b=>{o(f({item:e,value:b}))},[e,o,f]);if(n===Qr){let b=["",""];return Array.isArray(p)&&p.length===2&&p.every(k=>typeof k=="number"||k==="")&&(b=p),(0,Md.jsx)(LPe,{value:b,onChange:g,hideLabelFromVision:r,step:a})}return(0,Md.jsx)(APe,{required:!!m.required,customValidity:Vt(m,i),label:c,help:u,value:p,onChange:h,__next40pxDefaultSize:!0,hideLabelFromVision:r,step:a,min:m.min?m.min.constraint:void 0,max:m.max?m.max.constraint:void 0})}var _ce=l(x(),1);function xce(e){return(0,_ce.jsx)(IP,{...e})}var wce=l(x(),1);function Cce(e){return(0,wce.jsx)(IP,{...e})}var PP=l(P(),1),Bce=l(I(),1);var m3=l(x(),1),{ValidatedRadioControl:NPe}=Dt(PP.privateApis);function Ece({data:e,field:t,onChange:o,hideLabelFromVision:r,validity:n}){let{label:i,description:s,getValue:a,setValue:c,isValid:u}=t,{elements:d,isLoading:f}=Wa({elements:t.elements,getElements:t.getElements}),m=a({item:e}),p=(0,Bce.useCallback)(h=>o(c({item:e,value:h})),[e,o,c]);return f?(0,m3.jsx)(PP.Spinner,{}):(0,m3.jsx)(NPe,{required:!!t.isValid?.required,customValidity:Vt(u,n),label:i,help:s,onChange:p,options:d,selected:m,hideLabelFromVision:r})}var RP=l(P(),1),Tce=l(I(),1);var p3=l(x(),1),{ValidatedSelectControl:MPe}=Dt(RP.privateApis);function Ice({data:e,field:t,onChange:o,hideLabelFromVision:r,validity:n}){let{type:i,label:s,description:a,getValue:c,setValue:u,isValid:d}=t,f=i==="array",m=c({item:e})??(f?[]:""),p=(0,Tce.useCallback)(b=>o(u({item:e,value:b})),[e,o,u]),{elements:h,isLoading:g}=Wa({elements:t.elements,getElements:t.getElements});return g?(0,p3.jsx)(RP.Spinner,{}):(0,p3.jsx)(MPe,{required:!!t.isValid?.required,customValidity:Vt(d,n),label:s,value:m,help:a,options:h,onChange:p,__next40pxDefaultSize:!0,hideLabelFromVision:r,multiple:f})}var h3=l(I(),1);var Pce=l(x(),1);function Rce({data:e,field:t,onChange:o,hideLabelFromVision:r,config:n,validity:i}){let{prefix:s,suffix:a}=n||{};return(0,Pce.jsx)($a,{data:e,field:t,onChange:o,hideLabelFromVision:r,validity:i,prefix:s?(0,h3.createElement)(s):void 0,suffix:a?(0,h3.createElement)(a):void 0})}var Oce=l(P(),1),Ace=l(I(),1);var Lce=l(x(),1),{ValidatedToggleControl:DPe}=Dt(Oce.privateApis);function Nce({field:e,onChange:t,data:o,hideLabelFromVision:r,validity:n}){let{label:i,description:s,getValue:a,setValue:c,isValid:u}=e,d=(0,Ace.useCallback)(()=>{t(c({item:o,value:!a({item:o})}))},[t,c,o,a]);return(0,Lce.jsx)(DPe,{required:!!u.required,customValidity:Vt(u,n),hidden:r,label:i,help:s,checked:a({item:o}),onChange:d})}var Mce=l(P(),1),Dce=l(I(),1);var Vce=l(x(),1),{ValidatedTextareaControl:VPe}=Dt(Mce.privateApis);function Fce({data:e,field:t,onChange:o,hideLabelFromVision:r,config:n,validity:i}){let{rows:s=4}=n||{},{label:a,placeholder:c,description:u,setValue:d,isValid:f}=t,m=t.getValue({item:e}),p=(0,Dce.useCallback)(h=>o(d({item:e,value:h})),[e,o,d]);return(0,Vce.jsx)(VPe,{required:!!f.required,customValidity:Vt(f,i),label:a,placeholder:c,value:m??"",help:u,onChange:p,rows:s,minLength:f.minLength?f.minLength.constraint:void 0,maxLength:f.maxLength?f.maxLength.constraint:void 0,__next40pxDefaultSize:!0,hideLabelFromVision:r})}var ok=l(P(),1),zce=l(I(),1);var OP=l(x(),1),{ValidatedToggleGroupControl:FPe}=Dt(ok.privateApis);function jce({data:e,field:t,onChange:o,hideLabelFromVision:r,validity:n}){let{getValue:i,setValue:s,isValid:a}=t,c=i({item:e}),u=(0,zce.useCallback)(p=>o(s({item:e,value:p})),[e,o,s]),{elements:d,isLoading:f}=Wa({elements:t.elements,getElements:t.getElements});if(f)return(0,OP.jsx)(ok.Spinner,{});if(d.length===0)return null;let m=d.find(p=>p.value===c);return(0,OP.jsx)(FPe,{required:!!t.isValid?.required,customValidity:Vt(a,n),__next40pxDefaultSize:!0,isBlock:!0,label:t.label,help:m?.description||t.description,onChange:u,value:c,hideLabelFromVision:r,children:d.map(p=>(0,OP.jsx)(ok.__experimentalToggleGroupControlOption,{label:p.label,value:p.value},p.value))})}var AP=l(P(),1),LP=l(I(),1);var y_=l(x(),1),{ValidatedFormTokenField:zPe}=Dt(AP.privateApis);function Gce({data:e,field:t,onChange:o,hideLabelFromVision:r,validity:n}){let{label:i,placeholder:s,getValue:a,setValue:c,isValid:u}=t,d=a({item:e}),{elements:f,isLoading:m}=Wa({elements:t.elements,getElements:t.getElements}),p=(0,LP.useMemo)(()=>Array.isArray(d)?d.map(g=>f?.find(k=>k.value===g)||{value:g,label:g}):[],[d,f]),h=(0,LP.useCallback)(g=>{let b=g.map(k=>typeof k=="object"&&"value"in k?k.value:k);o(c({item:e,value:b}))},[o,c,e]);return m?(0,y_.jsx)(AP.Spinner,{}):(0,y_.jsx)(zPe,{required:!!u?.required,customValidity:Vt(u,n),label:r?void 0:i,value:p,onChange:h,placeholder:s,suggestions:f?.map(g=>g.value),__experimentalValidateInput:g=>t.isValid?.elements&&f?f.some(b=>b.value===g||b.label===g):!0,__experimentalExpandOnFocus:f&&f.length>0,__experimentalShowHowTo:!t.isValid?.elements,displayTransform:g=>typeof g=="object"&&"label"in g?g.label:typeof g=="string"&&f&&f.find(k=>k.value===g)?.label||g,__experimentalRenderItem:({item:g})=>{if(typeof g=="string"&&f){let b=f.find(k=>k.value===g);return(0,y_.jsx)("span",{children:b?.label||g})}return(0,y_.jsx)("span",{children:g})}})}var rk=l(P(),1),g3=l(I(),1);var Dd=l(x(),1),{ValidatedInputControl:jPe,Picker:GPe}=Dt(rk.privateApis),HPe=({color:e,onColorChange:t})=>{let o=e&&mt(e).isValid()?e:"#ffffff";return(0,Dd.jsx)(rk.Dropdown,{renderToggle:({onToggle:r,isOpen:n})=>(0,Dd.jsx)(rk.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,Dd.jsx)("button",{type:"button",onClick:r,style:{width:"24px",height:"24px",borderRadius:"50%",backgroundColor:o,border:"1px solid #ddd",cursor:"pointer",outline:n?"2px solid #007cba":"none",outlineOffset:"2px",display:"flex",alignItems:"center",justifyContent:"center",padding:0,margin:0},"aria-label":"Open color picker"})}),renderContent:()=>(0,Dd.jsx)("div",{style:{padding:"16px"},children:(0,Dd.jsx)(GPe,{color:mt(o),onChange:t,enableAlpha:!0})})})};function Hce({data:e,field:t,onChange:o,hideLabelFromVision:r,validity:n}){let{label:i,placeholder:s,description:a,setValue:c,isValid:u}=t,d=t.getValue({item:e})||"",f=(0,g3.useCallback)(p=>{o(c({item:e,value:p.toHex()}))},[e,o,c]),m=(0,g3.useCallback)(p=>{o(c({item:e,value:p||""}))},[e,o,c]);return(0,Dd.jsx)(jPe,{required:!!t.isValid?.required,customValidity:Vt(u,n),label:i,placeholder:s,value:d,help:a,onChange:m,hideLabelFromVision:r,type:"text",prefix:(0,Dd.jsx)(HPe,{color:d,onColorChange:f})})}var MP=l(P(),1),DP=l(I(),1),b3=l(L(),1);var NP=l(x(),1);function Uce({data:e,field:t,onChange:o,hideLabelFromVision:r,validity:n}){let[i,s]=(0,DP.useState)(!1),a=(0,DP.useCallback)(()=>{s(c=>!c)},[]);return(0,NP.jsx)($a,{data:e,field:t,onChange:o,hideLabelFromVision:r,validity:n,type:i?"text":"password",suffix:(0,NP.jsx)(MP.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,NP.jsx)(MP.Button,{icon:i?tr:Pn,onClick:a,size:"small",label:i?(0,b3.__)("Hide password"):(0,b3.__)("Show password")})})})}function VP(e){return Array.isArray(e.elements)&&e.elements.length>0||typeof e.getElements=="function"}var Zce=l(x(),1),Wce={array:Gce,checkbox:Nle,color:Hce,datetime:fce,date:pce,email:kce,telephone:vce,url:yce,integer:xce,number:Cce,password:Uce,radio:Ece,select:Ice,text:Rce,toggle:Nce,textarea:Fce,toggleGroup:jce};function UPe(e){return e&&typeof e=="object"&&typeof e.control=="string"}function WPe(e){let{control:t,...o}=e,r=FP(t);return r===null?null:function(i){return(0,Zce.jsx)(r,{...i,config:o})}}function $ce(e,t){return typeof e.Edit=="function"?e.Edit:typeof e.Edit=="string"?FP(e.Edit):UPe(e.Edit)?WPe(e.Edit):VP(e)&&e.type!=="array"?FP("select"):t===null?null:FP(t)}function FP(e){return Object.keys(Wce).includes(e)?Wce[e]:null}function ZPe(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 Yce=ZPe;var $Pe=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},Kce=$Pe;var YPe=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},Xce=YPe;var Qce=l(L(),1);function zP({item:e,field:t}){let{elements:o,isLoading:r}=Wa({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 qce=l(x(),1);function ro({item:e,field:t}){return t.hasElements?(0,qce.jsx)(zP,{item:e,field:t}):t.getValueFormatted({item:e,field:t})}var Ya=(e,t,o)=>o==="asc"?e.localeCompare(t):t.localeCompare(e);function no(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)}function Ka(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 Xa(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 qa(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 yt(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 KPe({item:e,field:t}){return t.getValue({item:e})}var en=KPe;var XPe=/^[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 qPe(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)&&!XPe.test(o)?(0,Qce.__)("Value must be a valid email address."):null}var Jce={type:"email",render:ro,Edit:"email",sort:Ya,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Nt,Mt],validOperators:[Zt,$t,Ga,Ha,Ua,Nt,Mt,wr,Cr],format:{},getValueFormatted:en,validate:{required:no,pattern:qa,minLength:Ka,maxLength:Xa,elements:yt,custom:qPe}};var eue=l(L(),1);var nk=(e,t,o)=>o==="asc"?e-t:t-e;function jP(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 GP(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 tue={separatorThousand:","};function QPe({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=tue: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 JPe(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)&&!Number.isInteger(o)?(0,eue.__)("Value must be an integer."):null}var oue={type:"integer",render:ro,Edit:"integer",sort:nk,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Zt,$t,wd,Cd,Bd,Ed,Qr],validOperators:[Zt,$t,wd,Cd,Bd,Ed,Qr,Nt,Mt,wr,Cr],format:tue,getValueFormatted:QPe,validate:{required:no,min:jP,max:GP,elements:yt,custom:JPe}};var rue=l(L(),1);var nue={separatorThousand:",",separatorDecimal:".",decimals:2};function eRe({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=nue:r=t.format;let{separatorThousand:n,separatorDecimal:i,decimals:s}=r,a=o.toFixed(s),[c,u]=a.split("."),d=n?c.replace(/\B(?=(\d{3})+(?!\d))/g,n):c;return s===0?d:d+i+u}function tRe(e){return e===""||e===void 0||e===null}function oRe(e,t){let o=t.getValue({item:e});return!tRe(o)&&!Number.isFinite(o)?(0,rue.__)("Value must be a number."):null}var iue={type:"number",render:ro,Edit:"number",sort:nk,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Zt,$t,wd,Cd,Bd,Ed,Qr],validOperators:[Zt,$t,wd,Cd,Bd,Ed,Qr,Nt,Mt,wr,Cr],format:nue,getValueFormatted:eRe,validate:{required:no,min:jP,max:GP,elements:yt,custom:oRe}};var sue={type:"text",render:ro,Edit:"text",sort:Ya,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Nt,Mt],validOperators:[Zt,$t,Ga,Ha,Ua,Nt,Mt,wr,Cr],format:{},getValueFormatted:en,validate:{required:no,pattern:qa,minLength:Ka,maxLength:Xa,elements:yt}};var Km=l(rd(),1);var aue={datetime:(0,Km.getSettings)().formats.datetime,weekStartsOn:(0,Km.getSettings)().l10n.startOfWeek};function rRe({item:e,field:t}){let o=t.getValue({item:e});if(["",void 0,null].includes(o))return"";let r;return t.type!=="datetime"?r=aue:r=t.format,(0,Km.dateI18n)(r.datetime,(0,Km.getDate)(o))}var nRe=(e,t,o)=>{let r=new Date(e).getTime(),n=new Date(t).getTime();return o==="asc"?r-n:n-r},lue={type:"datetime",render:ro,Edit:"datetime",sort:nRe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Od,Ad,Td,Id,Pd,Rd,Jr,xn],validOperators:[Od,Ad,Td,Id,Pd,Rd,Jr,xn],format:aue,getValueFormatted:rRe,validate:{required:no,elements:yt}};var Xm=l(rd(),1);var cue={date:(0,Xm.getSettings)().formats.date,weekStartsOn:(0,Xm.getSettings)().l10n.startOfWeek};function iRe({item:e,field:t}){let o=t.getValue({item:e});if(["",void 0,null].includes(o))return"";let r;return t.type!=="date"?r=cue:r=t.format,(0,Xm.dateI18n)(r.date,(0,Xm.getDate)(o))}var sRe=(e,t,o)=>{let r=new Date(e).getTime(),n=new Date(t).getTime();return o==="asc"?r-n:n-r},uue={type:"date",render:ro,Edit:"date",sort:sRe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Od,Ad,Td,Id,Pd,Rd,Jr,xn,Qr],validOperators:[Od,Ad,Td,Id,Pd,Rd,Jr,xn,Qr],format:cue,getValueFormatted:iRe,validate:{required:no,elements:yt}};var HP=l(L(),1);function due(e,t){return t.getValue({item:e})===!0}function aRe({item:e,field:t}){let o=t.getValue({item:e});return o===!0?(0,HP.__)("True"):o===!1?(0,HP.__)("False"):""}function lRe(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)&&![!0,!1].includes(o)?(0,HP.__)("Value must be true, false, or undefined"):null}var cRe=(e,t,o)=>{let r=!!e;return r===!!t?0:o==="asc"?r?1:-1:r?-1:1},fue={type:"boolean",render:ro,Edit:"checkbox",sort:cRe,validate:{required:due,elements:yt,custom:lRe},enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Zt,$t],validOperators:[Zt,$t],format:{},getValueFormatted:aRe};var mue={type:"media",render:()=>null,Edit:null,sort:()=>0,enableSorting:!1,enableGlobalSearch:!1,defaultOperators:[],validOperators:[],format:{},getValueFormatted:en,validate:{}};var k3=l(L(),1);function pue(e,t){let o=t.getValue({item:e});return Array.isArray(o)&&o.length>0&&o.every(r=>![void 0,"",null].includes(r))}function hue({item:e,field:t}){let o=t.getValue({item:e});return(Array.isArray(o)?o:[]).join(", ")}function uRe({item:e,field:t}){return hue({item:e,field:t})}function dRe(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)&&!Array.isArray(o)?(0,k3.__)("Value must be an array."):o.every(r=>typeof r=="string")?null:(0,k3.__)("Every value must be a string.")}var fRe=(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)},gue={type:"array",render:uRe,Edit:"array",sort:fRe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Nt,Mt],validOperators:[Nt,Mt,wr,Cr],format:{},getValueFormatted:hue,validate:{required:pue,elements:yt,custom:dRe}};function mRe({item:e,field:t}){return t.getValue({item:e})?"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022":""}var bue={type:"password",render:ro,Edit:"password",sort:()=>0,enableSorting:!1,enableGlobalSearch:!1,defaultOperators:[],validOperators:[],format:{},getValueFormatted:mRe,validate:{required:no,pattern:qa,minLength:Ka,maxLength:Xa,elements:yt}};var kue={type:"telephone",render:ro,Edit:"telephone",sort:Ya,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Nt,Mt],validOperators:[Zt,$t,Ga,Ha,Ua,Nt,Mt,wr,Cr],format:{},getValueFormatted:en,validate:{required:no,pattern:qa,minLength:Ka,maxLength:Xa,elements:yt}};var vue=l(L(),1);var ik=l(x(),1);function pRe({item:e,field:t}){if(t.hasElements)return(0,ik.jsx)(zP,{item:e,field:t});let o=en({item:e,field:t});return!o||!mt(o).isValid()?o:(0,ik.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,ik.jsx)("div",{style:{width:"16px",height:"16px",borderRadius:"50%",backgroundColor:o,border:"1px solid #ddd",flexShrink:0}}),(0,ik.jsx)("span",{children:o})]})}function hRe(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)&&!mt(o).isValid()?(0,vue.__)("Value must be a valid color."):null}var gRe=(e,t,o)=>{let r=mt(e),n=mt(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},yue={type:"color",render:pRe,Edit:"color",sort:gRe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Nt,Mt],validOperators:[Zt,$t,Nt,Mt],format:{},getValueFormatted:en,validate:{required:no,elements:yt,custom:hRe}};var Sue={type:"url",render:ro,Edit:"url",sort:Ya,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Nt,Mt],validOperators:[Zt,$t,Ga,Ha,Ua,Nt,Mt,wr,Cr],format:{},getValueFormatted:en,validate:{required:no,pattern:qa,minLength:Ka,maxLength:Xa,elements:yt}};var bRe=(e,t,o)=>typeof e=="number"&&typeof t=="number"?nk(e,t,o):Ya(e,t,o),_ue={render:ro,Edit:null,sort:bRe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Zt,$t],validOperators:Rle(),format:{},getValueFormatted:en,validate:{required:no,elements:yt}};function xue(e,t){let o;e.isValid?.required===!0&&t.validate.required!==void 0&&(o={constraint:!0,validate:t.validate.required});let r;(e.isValid?.elements===!0||e.isValid?.elements===void 0&&(e.elements||e.getElements))&&t.validate.elements!==void 0&&(r={constraint:!0,validate:t.validate.elements});let n;typeof e.isValid?.min=="number"&&t.validate.min!==void 0&&(n={constraint:e.isValid.min,validate:t.validate.min});let i;typeof e.isValid?.max=="number"&&t.validate.max!==void 0&&(i={constraint:e.isValid.max,validate:t.validate.max});let s;typeof e.isValid?.minLength=="number"&&t.validate.minLength!==void 0&&(s={constraint:e.isValid.minLength,validate:t.validate.minLength});let a;typeof e.isValid?.maxLength=="number"&&t.validate.maxLength!==void 0&&(a={constraint:e.isValid.maxLength,validate:t.validate.maxLength});let c;e.isValid?.pattern!==void 0&&t.validate.pattern!==void 0&&(c={constraint:e.isValid?.pattern,validate:t.validate.pattern});let u=e.isValid?.custom??t.validate.custom;return{required:o,elements:r,min:n,max:i,minLength:s,maxLength:a,pattern:c,custom:u}}function kRe(e,t){return{...t.format,...e.format}}var wue=kRe;function vRe(e){let t=[Jce,oue,iue,sue,lue,uue,fue,mue,gue,bue,kue,yue,Sue].find(o=>o?.type===e);return t||_ue}function S_(e){return e.map(t=>{let o=vRe(t.type),r=t.getValue||Kce(t.id),n=function(i,s,a){let c=r({item:i}),u=r({item:s});return t.sort?t.sort(c,u,a):o.sort(c,u,a)};return{id:t.id,label:t.label||t.id,header:t.header||t.label||t.id,description:t.description,placeholder:t.placeholder,getValue:r,setValue:t.setValue||Xce(t.id),elements:t.elements,getElements:t.getElements,hasElements:VP(t),isVisible:t.isVisible,enableHiding:t.enableHiding??!0,readOnly:t.readOnly??!1,type:o.type,render:t.render??o.render,Edit:$ce(t,o.Edit),sort:n,enableSorting:t.enableSorting??o.enableSorting,enableGlobalSearch:t.enableGlobalSearch??o.enableGlobalSearch,isValid:xue(t,o),filterBy:Yce(t,o.defaultOperators,o.validOperators),format:wue(t,o),getValueFormatted:t.getValueFormatted??o.getValueFormatted}})}var x3=l(I(),1);var Cue=l(I(),1),Bue=l(x(),1),v3=(0,Cue.createContext)({fields:[]});v3.displayName="DataFormContext";function Eue({fields:e,children:t}){return(0,Bue.jsx)(v3.Provider,{value:{fields:e},children:t})}var Yi=v3;var Kue=l(I(),1);var WP=l(I(),1),ZP=l(P(),1);var Tr={type:"regular",labelPosition:"top"},yRe=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 Tue(e){let t=Tr;if(e?.type==="regular")t={type:"regular",labelPosition:e?.labelPosition??"top"};else if(e?.type==="panel"){let o=e.summary??[],r=Array.isArray(o)?o:[o];t={type:"panel",labelPosition:e?.labelPosition??"side",openAs:e?.openAs??"dropdown",summary:r}}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:yRe(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 Iue(e){let t=Tue(e?.layout),o=(e.fields??[]).map(r=>{if(typeof r=="string")return{id:r,layout:t};let n=r.layout?Tue(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:Iue({fields:r.children,layout:Tr}).fields}}});return{layout:t,fields:o}}var UP=Iue;var Kt=l(x(),1);function SRe({title:e}){return(0,Kt.jsx)(Oe,{direction:"column",className:"dataforms-layouts-regular__header",gap:"md",children:(0,Kt.jsx)(Oe,{direction:"row",align:"center",children:(0,Kt.jsx)(ZP.__experimentalHeading,{level:2,size:13,children:e})})})}function Pue({data:e,field:t,onChange:o,hideLabelFromVision:r,validity:n}){let{fields:i}=(0,WP.useContext)(Yi),s=t.layout,a=(0,WP.useMemo)(()=>({layout:Tr,fields:t.children?t.children:[]}),[t]);if(t.children)return(0,Kt.jsxs)(Kt.Fragment,{children:[!r&&t.label&&(0,Kt.jsx)(SRe,{title:t.label}),(0,Kt.jsx)(wn,{data:e,form:a,onChange:o,validity:n?.children})]});let c=s.labelPosition,u=i.find(d=>d.id===t.id);return!u||!u.Edit?null:c==="side"?(0,Kt.jsxs)(Oe,{direction:"row",className:"dataforms-layouts-regular__field",gap:"xs",children:[(0,Kt.jsx)("div",{className:D("dataforms-layouts-regular__field-label",`dataforms-layouts-regular__field-label--label-position-${c}`),children:u.label}),(0,Kt.jsx)("div",{className:"dataforms-layouts-regular__field-control",children:u.readOnly===!0?(0,Kt.jsx)(u.render,{item:e,field:u}):(0,Kt.jsx)(u.Edit,{data:e,field:u,onChange:o,hideLabelFromVision:!0,validity:n},u.id)})]}):(0,Kt.jsx)("div",{className:"dataforms-layouts-regular__field",children:u.readOnly===!0?(0,Kt.jsx)(Kt.Fragment,{children:(0,Kt.jsxs)(Kt.Fragment,{children:[!r&&c!=="none"&&(0,Kt.jsx)(ZP.BaseControl.VisualLabel,{children:u.label}),(0,Kt.jsx)(u.render,{item:e,field:u})]})}):(0,Kt.jsx)(u.Edit,{data:e,field:u,onChange:o,hideLabelFromVision:c==="none"?!0:r,validity:n})})}var ak=l(P(),1),__=l(I(),1);var Vd=l(P(),1),Oue=l(L(),1),KP=l(I(),1);var Aue=l(Y(),1);var Rue=l(P(),1),$P=l(L(),1),sk=l(x(),1);function _Re({summaryFields:e,data:t,labelPosition:o,fieldLabel:r,disabled:n,onClick:i,"aria-expanded":s}){return(0,sk.jsx)(Rue.Button,{className:"dataforms-layouts-panel__summary-button",size:"compact",variant:["none","top"].includes(o)?"link":"tertiary","aria-expanded":s,"aria-label":(0,$P.sprintf)((0,$P._x)("Edit %s","field"),r||""),onClick:i,disabled:n,accessibleWhenDisabled:!0,style:e.length>1?{minHeight:"auto",height:"auto",alignItems:"flex-start"}:void 0,children:e.length>1?(0,sk.jsx)("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",width:"100%",gap:"2px"},children:e.map(a=>(0,sk.jsx)("div",{style:{width:"100%"},children:(0,sk.jsx)(a.render,{item:t,field:a})},a.id))}):e.map(a=>(0,sk.jsx)(a.render,{item:t,field:a},a.id))})}var YP=_Re;var Ir=l(x(),1);function xRe({title:e,onClose:t}){return(0,Ir.jsx)(Oe,{direction:"column",className:"dataforms-layouts-panel__dropdown-header",gap:"md",children:(0,Ir.jsxs)(Oe,{direction:"row",gap:"xs",align:"center",children:[e&&(0,Ir.jsx)(Vd.__experimentalHeading,{level:2,size:13,children:e}),(0,Ir.jsx)(Vd.__experimentalSpacer,{style:{flex:1}}),t&&(0,Ir.jsx)(Vd.Button,{label:(0,Oue.__)("Close"),icon:nf,onClick:t,size:"small"})]})})}function wRe({data:e,field:t,onChange:o,validity:r,labelPosition:n="side",summaryFields:i,fieldDefinition:s,popoverAnchor:a,onOpen:c}){let u=t.children?t.label:s?.label,d=(0,KP.useMemo)(()=>({layout:Tr,fields:t.children?t.children:[{id:t.id,layout:Tr}]}),[t]),f=(0,KP.useMemo)(()=>{if(r!==void 0)return t.children?r?.children:{[t.id]:r}},[r,t]),m=(0,KP.useMemo)(()=>({anchor:a,placement:"left-start",offset:36,shift:!0}),[a]),p=(0,Aue.useFocusOnMount)("firstInputElement");return(0,Ir.jsx)(Vd.Dropdown,{contentClassName:"dataforms-layouts-panel__field-dropdown",popoverProps:m,focusOnMount:!1,toggleProps:{size:"compact",variant:"tertiary",tooltipPosition:"middle left"},renderToggle:({isOpen:h,onToggle:g})=>(0,Ir.jsx)(YP,{summaryFields:i,data:e,labelPosition:n,fieldLabel:u,disabled:s.readOnly===!0,onClick:()=>{!h&&c&&c(),g()},"aria-expanded":h}),renderContent:({onClose:h})=>(0,Ir.jsxs)(Ir.Fragment,{children:[(0,Ir.jsx)(xRe,{title:u,onClose:h}),(0,Ir.jsx)("div",{ref:p,children:(0,Ir.jsx)(wn,{data:e,form:d,onChange:o,validity:f,children:(g,b,k)=>(0,Ir.jsx)(g,{data:e,field:b,onChange:o,hideLabelFromVision:(d?.fields??[]).length<2,validity:k},b.id)})})]})})}var Lue=wRe;var S3=l(iV(),1),Qm=l(P(),1),_3=l(L(),1),Fd=l(I(),1),zue=l(Y(),1);var Nue=l(iV(),1),y3=l(ef(),1),Qa=l(I(),1),Pr=l(L(),1);function Mue(e){return e?Object.values(e).every(t=>Object.entries(t).every(([o,r])=>o==="children"&&r&&typeof r=="object"?Mue(r):r.type==="valid")):!0}function CRe(e,t){let o=UP(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]=S_([d]);return{id:s.id,children:u,field:f}}return{id:s.id,children:u}}let a=r.get(s.id);if(!a)return null;let[c]=S_([a]);return{id:s.id,children:[],field:c}}return o.fields.map(n).filter(s=>s!==null)}function qm(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=n[a]}let i=o[o.length-1];return n[i]={...n[i]||{},...t},r}function BRe(e,t,o){let{elementsCounterRef:r,setFormValidity:n,path:i,item:s}=o,a=(r.current[t.id]||0)+1;r.current[t.id]=a,e.then(c=>{if(a===r.current[t.id]){if(!Array.isArray(c)){n(u=>qm(u,{elements:{type:"invalid",message:(0,Pr.__)("Could not validate elements.")}},[...i,t.id]));return}t.field?.isValid.elements&&!t.field.isValid.elements.validate(s,{...t.field,elements:c})&&n(u=>qm(u,{elements:{type:"invalid",message:(0,Pr.__)("Value must be one of the elements.")}},[...i,t.id]))}}).catch(c=>{if(a!==r.current[t.id])return;let u;c instanceof Error?u=c.message:u=String(c)||(0,Pr.__)("Unknown error when running elements validation asynchronously."),n(d=>qm(d,{elements:{type:"invalid",message:u}},[...i,t.id]))})}function ERe(e,t,o){let{customCounterRef:r,setFormValidity:n,path:i}=o,s=(r.current[t.id]||0)+1;r.current[t.id]=s,e.then(a=>{if(s===r.current[t.id]){if(a===null){n(c=>qm(c,{custom:{type:"valid",message:(0,Pr.__)("Valid")}},[...i,t.id]));return}if(typeof a=="string"){n(c=>qm(c,{custom:{type:"invalid",message:a}},[...i,t.id]));return}n(c=>qm(c,{custom:{type:"invalid",message:(0,Pr.__)("Validation could not be processed.")}},[...i,t.id]))}}).catch(a=>{if(s!==r.current[t.id])return;let c;a instanceof Error?c=a.message:c=String(a)||(0,Pr.__)("Unknown error when running custom validation asynchronously."),n(u=>qm(u,{custom:{type:"invalid",message:c}},[...i,t.id]))})}function Due(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,Pr.__)("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,Pr.__)("Value is below the minimum.")}};if(t.field?.isValid.max&&!t.field.isValid.max.validate(e,t.field))return{max:{type:"invalid",message:(0,Pr.__)("Value is above the maximum.")}};if(t.field?.isValid.minLength&&!t.field.isValid.minLength.validate(e,t.field))return{minLength:{type:"invalid",message:(0,Pr.__)("Value is too short.")}};if(t.field?.isValid.maxLength&&!t.field.isValid.maxLength.validate(e,t.field))return{maxLength:{type:"invalid",message:(0,Pr.__)("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,Pr.__)("Value must be one of the elements.")}};if(t.field&&t.field.isValid.elements&&t.field.hasElements&&typeof t.field.getElements=="function")return BRe(t.field.getElements(),t,o),{elements:{type:"validating",message:(0,Pr.__)("Validating\u2026")}};let r;if(t.field&&t.field.isValid.custom)try{let n=t.field.getValue({item:e});r=t.field.isValid.custom((0,Nue.default)(e,t.field.setValue({item:e,value:n})),t.field)}catch(n){let i;return n instanceof Error?i=n.message:i=String(n)||(0,Pr.__)("Unknown error when running custom validation."),{custom:{type:"invalid",message:i}}}if(typeof r=="string")return{custom:{type:"invalid",message:r}};if(r instanceof Promise)return ERe(r,t,o),{custom:{type:"validating",message:(0,Pr.__)("Validating\u2026")}};if(t.children.length>0){let n={};t.children.forEach(s=>{n[s.id]=Due(e,s,{...o,path:[...o.path,t.id,"children"]})});let i={};return Object.entries(n).forEach(([s,a])=>{a!==void 0&&(i[s]=a)}),Object.keys(i).length===0?void 0:{children:i}}}function Vue(e,t){let o=e?.field?.getValue({item:t});if(e.children.length===0)return o;let r=e.children.map(n=>Vue(n,t));return r?{value:o,children:r}:o}function TRe(e,t,o){let[r,n]=(0,Qa.useState)(),i=(0,Qa.useRef)({}),s=(0,Qa.useRef)({}),a=(0,Qa.useRef)({}),c=(0,Qa.useCallback)(()=>{let u={customCounterRef:i,elementsCounterRef:s,setFormValidity:n,path:[],item:e},d=CRe(o,t);if(d.length===0){n(void 0);return}let f={},m=[];d.forEach(p=>{let h=Vue(p,e);if(a.current.hasOwnProperty(p.id)&&(0,y3.default)(a.current[p.id],h)){m.push(p.id);return}a.current[p.id]=h;let g=Due(e,p,u);g!==void 0&&(f[p.id]=g)}),n(p=>{let h={...p,...f},g=[...m,...Object.keys(f)];return Object.keys(h).forEach(k=>{h&&!g.includes(k)&&delete h[k]}),Object.keys(h).length===0&&(h=void 0),(0,y3.default)(p,h)?p:h})},[e,t,o]);return(0,Qa.useEffect)(()=>{c()},[c]),{validity:r,isValid:Mue(r)}}var Fue=TRe;var tn=l(x(),1);function IRe({data:e,field:t,onChange:o,fieldLabel:r,onClose:n}){let{fields:i}=(0,Fd.useContext)(Yi),[s,a]=(0,Fd.useState)({}),c=(0,Fd.useMemo)(()=>(0,S3.default)(e,s,{arrayMerge:(g,b)=>b}),[e,s]),u=(0,Fd.useMemo)(()=>({layout:Tr,fields:t.children?t.children:[{id:t.id,layout:Tr}]}),[t]),d=i.map(g=>({...g,Edit:g.Edit===null?void 0:g.Edit,isValid:{required:g.isValid.required?.constraint,elements:g.isValid.elements?.constraint,min:g.isValid.min?.constraint,max:g.isValid.max?.constraint,pattern:g.isValid.pattern?.constraint,minLength:g.isValid.minLength?.constraint,maxLength:g.isValid.maxLength?.constraint}})),{validity:f}=Fue(c,d,u),m=()=>{o(s),n()},p=g=>{a(b=>(0,S3.default)(b,g,{arrayMerge:(k,v)=>v}))},h=(0,zue.useFocusOnMount)("firstInputElement");return(0,tn.jsxs)(Qm.Modal,{className:"dataforms-layouts-panel__modal",onRequestClose:n,isFullScreen:!1,title:r,size:"medium",children:[(0,tn.jsx)("div",{ref:h,children:(0,tn.jsx)(wn,{data:c,form:u,onChange:p,validity:f,children:(g,b,k)=>(0,tn.jsx)(g,{data:c,field:b,onChange:p,hideLabelFromVision:u.fields.length<2,validity:k},b.id)})}),(0,tn.jsxs)(Oe,{direction:"row",className:"dataforms-layouts-panel__modal-footer",gap:"sm",children:[(0,tn.jsx)(Qm.__experimentalSpacer,{style:{flex:1}}),(0,tn.jsx)(Qm.Button,{variant:"tertiary",onClick:n,__next40pxDefaultSize:!0,children:(0,_3.__)("Cancel")}),(0,tn.jsx)(Qm.Button,{variant:"primary",onClick:m,__next40pxDefaultSize:!0,children:(0,_3.__)("Apply")})]})]})}function PRe({data:e,field:t,onChange:o,labelPosition:r,summaryFields:n,fieldDefinition:i,onOpen:s}){let[a,c]=(0,Fd.useState)(!1),u=t.children?t.label:i?.label;return(0,tn.jsxs)(tn.Fragment,{children:[(0,tn.jsx)(YP,{summaryFields:n,data:e,labelPosition:r,fieldLabel:u,disabled:i.readOnly===!0,onClick:()=>{s&&s(),c(!0)},"aria-expanded":a}),a&&(0,tn.jsx)(IRe,{data:e,field:t,onChange:o,fieldLabel:u??"",onClose:()=>c(!1)})]})}var jue=PRe;function RRe(e){return Array.isArray(e)?e.map(t=>typeof t=="string"?t:t.id):[]}var XP=(e,t)=>Array.isArray(e)&&e.length>0?RRe(e).map(r=>t.find(n=>n.id===r)).filter(r=>r!==void 0):[];var Io=l(x(),1);function Gue(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=Gue(o);if(r)return r}}var ORe=(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})},ARe=(e,t,o)=>{let r=XP(e.summary,o),n=ORe(t,o);return r.length===0?{summaryFields:n?[n]:[],fieldDefinition:n}:{summaryFields:r,fieldDefinition:n}};function Hue({data:e,field:t,onChange:o,validity:r}){let{fields:n}=(0,__.useContext)(Yi),i=t.layout,[s,a]=(0,__.useState)(null),[c,u]=(0,__.useState)(!1),d=()=>u(!0),{fieldDefinition:f,summaryFields:m}=ARe(i,t,n);if(!f)return null;let p=i.labelPosition,h=Gue(r),g=c&&!!h,b=D("dataforms-layouts-panel__field-label",`dataforms-layouts-panel__field-label--label-position-${p}`,{"has-error":g}),k=t.children?t.label:f?.label,v=g?(0,Io.jsx)(ak.Tooltip,{text:h,placement:"top",children:(0,Io.jsxs)(Oe,{direction:"row",gap:"xs",className:"dataforms-layouts-panel__field-label-error-content",justify:"flex-start",children:[(0,Io.jsx)(ak.Icon,{icon:Ep,size:16}),(0,Io.jsx)(Io.Fragment,{children:k})]})}):k,y=i.openAs==="modal"?(0,Io.jsx)(jue,{data:e,field:t,onChange:o,labelPosition:p,summaryFields:m,fieldDefinition:f,onOpen:d}):(0,Io.jsx)(Lue,{data:e,field:t,onChange:o,validity:r,labelPosition:p,summaryFields:m,fieldDefinition:f,popoverAnchor:s,onOpen:d});return p==="top"?(0,Io.jsxs)(Oe,{direction:"column",className:"dataforms-layouts-panel__field",children:[(0,Io.jsx)("div",{className:b,style:{paddingBottom:0},children:v}),(0,Io.jsx)("div",{className:"dataforms-layouts-panel__field-control",children:y})]}):p==="none"?(0,Io.jsxs)(Oe,{direction:"row",gap:"xs",className:"dataforms-layouts-panel__field dataforms-layouts-panel__field--label-position-none",children:[g&&(0,Io.jsx)(ak.Tooltip,{text:h,placement:"top",children:(0,Io.jsx)(ak.Icon,{className:"dataforms-layouts-panel__field-label-error-content",icon:Ep,size:16})}),(0,Io.jsx)("div",{className:"dataforms-layouts-panel__field-control",children:y})]}):(0,Io.jsxs)(Oe,{direction:"row",gap:"xs",ref:a,className:"dataforms-layouts-panel__field",children:[(0,Io.jsx)("div",{className:b,children:v}),(0,Io.jsx)("div",{className:"dataforms-layouts-panel__field-control",children:y})]})}var Vs=l(P(),1),Fs=l(I(),1);var io=l(x(),1),LRe=({children:e,...t})=>(0,io.jsx)(Vs.CardHeader,{isBorderless:!0,...t,children:(0,io.jsx)("div",{style:{height:"40px",width:"100%",display:"flex",justifyContent:"space-between",alignItems:"center"},children:e})});function NRe(e){let{isOpened:t,isCollapsible:o}=e,[r,n]=(0,Fs.useState)(t);(0,Fs.useEffect)(()=>{n(t)},[t]);let i=(0,Fs.useCallback)(()=>{n(u=>!u)},[]),s=(0,Fs.useCallback)(({children:u,...d})=>(0,io.jsxs)(Vs.CardHeader,{...d,onClick:i,style:{cursor:"pointer",...d.style},isBorderless:!0,children:[(0,io.jsx)("div",{style:{width:"100%",display:"flex",justifyContent:"space-between",alignItems:"center"},children:u}),(0,io.jsx)(Vs.Button,{__next40pxDefaultSize:!0,variant:"tertiary",icon:r?rf:In,"aria-expanded":r,"aria-label":r?"Collapse":"Expand"})]}),[i,r]);return{isOpen:o?r:!0,CardHeader:o?s:LRe}}function MRe(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 Uue({data:e,field:t,onChange:o,hideLabelFromVision:r,validity:n}){let{fields:i}=(0,Fs.useContext)(Yi),s=t.layout,a=(0,Fs.useMemo)(()=>({layout:Tr,fields:t.children??[]}),[t]),{isOpen:c,CardHeader:u}=NRe(s),f=XP(s.summary,i).filter(k=>MRe(k,s.summary,c)),m={blockStart:"medium",blockEnd:"medium",inlineStart:"medium",inlineEnd:"medium"};if(t.children){let k=!!t.label&&s.withHeader,v={blockStart:k?"none":"medium",blockEnd:"medium",inlineStart:"medium",inlineEnd:"medium"};return(0,io.jsxs)(Vs.Card,{className:"dataforms-layouts-card__field",size:m,children:[k&&(0,io.jsxs)(u,{className:"dataforms-layouts-card__field-header",children:[(0,io.jsx)("span",{className:"dataforms-layouts-card__field-header-label",children:t.label}),f.length>0&&s.withHeader&&(0,io.jsx)("div",{className:"dataforms-layouts-card__field-summary",children:f.map(y=>(0,io.jsx)(y.render,{item:e,field:y},y.id))})]}),(c||!k)&&(0,io.jsxs)(Vs.CardBody,{size:v,className:"dataforms-layouts-card__field-control",children:[t.description&&(0,io.jsx)("div",{className:"dataforms-layouts-card__field-description",children:t.description}),(0,io.jsx)(wn,{data:e,form:a,onChange:o,validity:n?.children})]})]})}let p=i.find(k=>k.id===t.id);if(!p||!p.Edit)return null;let h=Jm("regular")?.component;if(!h)return null;let g=!!p.label&&s.withHeader,b={blockStart:g?"none":"medium",blockEnd:"medium",inlineStart:"medium",inlineEnd:"medium"};return(0,io.jsxs)(Vs.Card,{className:"dataforms-layouts-card__field",size:m,children:[g&&(0,io.jsxs)(u,{className:"dataforms-layouts-card__field-header",children:[(0,io.jsx)("span",{className:"dataforms-layouts-card__field-header-label",children:p.label}),f.length>0&&s.withHeader&&(0,io.jsx)("div",{className:"dataforms-layouts-card__field-summary",children:f.map(k=>(0,io.jsx)(k.render,{item:e,field:k},k.id))})]}),(c||!g)&&(0,io.jsx)(Vs.CardBody,{size:b,className:"dataforms-layouts-card__field-control",children:(0,io.jsx)(h,{data:e,field:t,onChange:o,hideLabelFromVision:r||g,validity:n})})]})}var Wue=l(P(),1);var Qo=l(x(),1);function DRe({title:e}){return(0,Qo.jsx)(Oe,{direction:"column",className:"dataforms-layouts-row__header",gap:"md",children:(0,Qo.jsx)(Oe,{direction:"row",align:"center",children:(0,Qo.jsx)(Wue.__experimentalHeading,{level:2,size:13,children:e})})})}var VRe=({children:e})=>(0,Qo.jsx)(Qo.Fragment,{children:e});function Zue({data:e,field:t,onChange:o,hideLabelFromVision:r,validity:n}){let i=t.layout;if(t.children){let a={layout:Tr,fields:t.children};return(0,Qo.jsxs)("div",{className:"dataforms-layouts-row__field",children:[!r&&t.label&&(0,Qo.jsx)(DRe,{title:t.label}),(0,Qo.jsx)(Oe,{direction:"row",align:i.alignment,gap:"md",children:(0,Qo.jsx)(wn,{data:e,form:a,onChange:o,validity:n?.children,as:VRe,children:(c,u,d)=>(0,Qo.jsx)("div",{className:"dataforms-layouts-row__field-control",style:i.styles[u.id],children:(0,Qo.jsx)(c,{data:e,field:u,onChange:o,hideLabelFromVision:r,validity:d})},u.id)})})]})}let s=Jm("regular")?.component;return s?(0,Qo.jsx)(Qo.Fragment,{children:(0,Qo.jsx)("div",{className:"dataforms-layouts-row__field-control",children:(0,Qo.jsx)(s,{data:e,field:t,onChange:o,validity:n})})}):null}var qP=l(I(),1),$ue=l(L(),1);var ep=l(x(),1);function Yue({data:e,field:t,onChange:o}){let{fields:r}=(0,qP.useContext)(Yi),n=(0,qP.useMemo)(()=>({layout:Tr,fields:t.children??[]}),[t]);if(!t.children)return null;let i=t.layout.summary??"",s=i?r.find(c=>c.id===i):void 0,a;return s&&s.render?a=(0,ep.jsx)(s.render,{item:e,field:s}):a=t.label||(0,$ue.__)("More details"),(0,ep.jsxs)("details",{className:"dataforms-layouts-details__details",children:[(0,ep.jsx)("summary",{className:"dataforms-layouts-details__summary",children:a}),(0,ep.jsx)("div",{className:"dataforms-layouts-details__content",children:(0,ep.jsx)(wn,{data:e,form:n,onChange:o})})]})}var tp=l(x(),1),FRe=[{type:"regular",component:Pue,wrapper:({children:e})=>(0,tp.jsx)(Oe,{direction:"column",className:"dataforms-layouts__wrapper",gap:"md",children:e})},{type:"panel",component:Hue,wrapper:({children:e})=>(0,tp.jsx)(Oe,{direction:"column",className:"dataforms-layouts__wrapper",gap:"xs",children:e})},{type:"card",component:Uue,wrapper:({children:e})=>(0,tp.jsx)(Oe,{direction:"column",className:"dataforms-layouts__wrapper",gap:"lg",children:e})},{type:"row",component:Zue,wrapper:({children:e,layout:t})=>(0,tp.jsx)(Oe,{direction:"column",className:"dataforms-layouts__wrapper",gap:"md",children:(0,tp.jsx)("div",{className:"dataforms-layouts-row__field",children:(0,tp.jsx)(Oe,{direction:"row",gap:"md",align:t.alignment,children:e})})})},{type:"details",component:Yue}];function Jm(e){return FRe.find(t=>t.type===e)}var QP=l(x(),1),zRe=({children:e})=>(0,QP.jsx)(Oe,{direction:"column",className:"dataforms-layouts__wrapper",gap:"md",children:e});function wn({data:e,form:t,onChange:o,validity:r,children:n,as:i}){let{fields:s}=(0,Kue.useContext)(Yi);function a(u){return s.find(d=>d.id===u.id)}let c=i??Jm(t.layout.type)?.wrapper??zRe;return(0,QP.jsx)(c,{layout:t.layout,children:t.fields.map(u=>{let d=Jm(u.layout.type)?.component;if(!d)return null;let f=u.children?void 0:a(u);return f&&f.isVisible&&!f.isVisible(e)?null:n?n(d,u,r?.[u.id]):(0,QP.jsx)(d,{data:e,field:u,onChange:o,validity:r?.[u.id]},u.id)})})}var w3=l(x(),1);function x_({data:e,form:t,fields:o,onChange:r,validity:n}){let i=(0,x3.useMemo)(()=>UP(t),[t]),s=(0,x3.useMemo)(()=>S_(o),[o]);return t.fields?(0,w3.jsx)(Eue,{fields:s,children:(0,w3.jsx)(wn,{data:e,form:i,onChange:r,validity:n})}):null}var np=l(I(),1),lde=l(L(),1);var ck=l(P(),1);var C3=l(L(),1);var Xue=l(Y(),1);function lk({isControl:e}={isControl:!1}){return(0,Xue.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:e?35:259}}}var JP=l(x(),1);function que({fields:e,visibleFields:t,onToggleField:o}){let{popoverProps:r}=lk();return!e||e.length===0?null:(0,JP.jsx)(ck.DropdownMenu,{icon:ts,label:(0,C3.__)("Options"),popoverProps:r,toggleProps:{size:"small"},children:({onClose:n})=>(0,JP.jsx)(ck.MenuGroup,{label:(0,C3.__)("Show / Hide"),children:e.map(i=>{let s=t.includes(i.id);return(0,JP.jsx)(ck.MenuItem,{isSelected:s,onClick:()=>{o(i.id),n()},role:"menuitemcheckbox",icon:s?al:null,children:i.label},i.id)})})})}var eR=l(P(),1),Que=l(Y(),1),Jue=l(M(),1),op=l(I(),1),tR=l(zo(),1);var zs=l(x(),1);function ede({data:e,field:t,hideLabelFromVision:o,onChange:r,config:n={}}){let i=(0,Jue.useRegistry)(),s=t.getValue({item:e}),a=t.config||{},{clientId:c}=n,[u,d]=(0,op.useState)({start:void 0,end:void 0}),[f,m]=(0,op.useState)(!1),p=(0,op.useRef)(),h=(0,op.useRef)(new Set),g=(0,op.useRef)(new Set),b=ub({allowedFormats:a?.allowedFormats,disableFormats:a?.disableFormats}),{formatTypes:k,prepareHandlers:v,valueHandlers:y,changeHandlers:_,dependencies:w}=AI({clientId:c,identifier:t.id,allowedFormats:b,withoutInteractiveFormatting:a?.withoutInteractiveFormatting,disableNoneEssentialFormatting:!0});function C(j){return y.reduce((G,V)=>V(G,j.text),j.formats)}function E(j){return k.forEach(G=>{G.__experimentalCreatePrepareEditableTree&&(j=(0,tR.removeFormat)(j,G.name,0,j.text.length))}),j.formats}function R(j){return v.reduce((G,V)=>V(G,j.text),j.formats)}function O(){p.current?.focus()}let{value:B,getValue:T,onChange:A,ref:N}=(0,tR.__unstableUseRichText)({value:s,onChange(j,{__unstableFormats:G,__unstableText:V}){r(t.setValue({item:e,value:j})),Object.values(_).forEach(H=>{H(G,V)})},selectionStart:u.start,selectionEnd:u.end,onSelectionChange:(j,G)=>d({start:j,end:G}),__unstableIsSelected:f,preserveWhiteSpace:!!a?.preserveWhiteSpace,placeholder:a?.placeholder,__unstableDisableFormats:a?.disableFormats,__unstableDependencies:w,__unstableAfterParse:C,__unstableBeforeSerialize:E,__unstableAddInvisibleFormats:R}),{baseControlProps:z,controlProps:U}=(0,eR.useBaseControlProps)({hideLabelFromVision:o??t.hideLabelFromVision,label:t.label});return(0,zs.jsxs)(zs.Fragment,{children:[f&&(0,zs.jsx)(hb.Provider,{value:g,children:(0,zs.jsx)(bb.Provider,{value:h,children:(0,zs.jsx)("div",{children:(0,zs.jsx)(GI,{value:B,onChange:A,onFocus:O,formatTypes:k,forwardedRef:p,isVisible:!1})})})}),(0,zs.jsx)(eR.BaseControl,{...z,children:(0,zs.jsx)("div",{className:"block-editor-content-only-controls__rich-text",role:"textbox","aria-multiline":!a?.disableLineBreaks,ref:(0,Que.useMergeRefs)([N,FI({registry:i,getValue:T,onChange:A,formatTypes:k,selectionChange:d,isSelected:f,disableFormats:a?.disableFormats,value:B,tagName:"div",removeEditorOnlyFormats:E,disableLineBreaks:a?.disableLineBreaks,keyboardShortcuts:g,inputEvents:h}),p]),onFocus:()=>m(!0),onBlur:()=>m(!1),contentEditable:!0,...U})})]})}var rp=l(P(),1),tde=l(M(),1),uk=l(L(),1);var vo=l(x(),1);function jRe({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,vo.jsx)("div",{className:"block-editor-content-only-controls__media-thumbnail",children:(0,vo.jsx)("img",{alt:"",width:24,height:24,src:o.media_type==="image"?o.source_url:o.poster})});if(n.length===1){let a=t.getValue({item:e})?.url;if(n[0]==="image"&&a)return(0,vo.jsx)("div",{className:"block-editor-content-only-controls__media-thumbnail",children:(0,vo.jsx)("img",{alt:"",width:24,height:24,src:a})});let c;if(n[0]==="image"?c=Gk:n[0]==="video"?c=sN:n[0]==="audio"?c=dO:c=Rp,c)return(0,vo.jsx)(rp.Icon,{icon:c,size:24})}return(0,vo.jsx)(rp.Icon,{icon:Rp,size:24})}function ode({data:e,field:t,onChange:o,config:r={}}){let{popoverProps:n}=lk({isControl:!0}),i=t.getValue({item:e}),{allowedTypes:s=[],multiple:a=!1,useFeaturedImage:c=!1}=r,u=i?.id,d=i?.url,f=(0,tde.useSelect)(p=>{if(!u)return;let g=p(S).getSettings()[o0];if(g)return g(p,u)},[u]),m;if(s.length===1){let p=s[0];p==="image"?m=(0,uk.__)("Choose an image\u2026"):p==="video"?m=(0,uk.__)("Choose a video\u2026"):p==="application"?m=(0,uk.__)("Choose a file\u2026"):m=(0,uk.__)("Choose a media item\u2026")}else m=(0,uk.__)("Choose a media item\u2026");return(0,vo.jsx)(bs,{children:(0,vo.jsx)(ab,{className:"block-editor-content-only-controls__media-replace-flow",allowedTypes:s,mediaId:u,mediaURL:d,multiple:a,popoverProps:n,onReset:()=>{o(t.setValue({item:e,value:{}}))},...c&&{useFeaturedImage:!!i?.featuredImage,onToggleFeaturedImage:()=>{o(t.setValue({item:e,value:{featuredImage:!i?.featuredImage}}))}},onSelect:p=>{if(p.id&&p.url){let h={...p,mediaType:p.media_type};c&&(h.featuredImage=!1),o(t.setValue({item:e,value:h}))}},renderToggle:p=>(0,vo.jsx)(rp.Button,{__next40pxDefaultSize:!0,className:"block-editor-content-only-controls__media",...p,children:(0,vo.jsxs)(rp.__experimentalGrid,{rowGap:0,columnGap:8,templateColumns:"24px 1fr",className:"block-editor-content-only-controls__media-row",children:[d&&(0,vo.jsxs)(vo.Fragment,{children:[(0,vo.jsx)(jRe,{attachment:f,field:t,data:e,config:r}),(0,vo.jsx)("span",{className:"block-editor-content-only-controls__media-title",children:f?.title?.raw&&f?.title?.raw!==""?f?.title?.raw:d})]}),!d&&(0,vo.jsxs)(vo.Fragment,{children:[(0,vo.jsx)("span",{className:"block-editor-content-only-controls__media-placeholder",style:{width:"24px",height:"24px"}}),(0,vo.jsx)("span",{className:"block-editor-content-only-controls__media-title",children:m})]})]})})})})}var yc=l(P(),1),rR=l(I(),1),rde=l(L(),1);var nde=l(rn(),1);var fr=l(x(),1),B3="noreferrer noopener",ide="_blank",oR="nofollow";function GRe({rel:e="",url:t="",opensInNewTab:o,nofollow:r}){let n,i=e;if(o)n=ide,i=i?.includes(B3)?i:i+` ${B3}`;else{let s=new RegExp(`\\b${B3}\\s*`,"g");i=i?.replace(s,"").trim()}if(r)i=i?.includes(oR)?i:(i+` ${oR}`).trim();else{let s=new RegExp(`\\b${oR}\\s*`,"g");i=i?.replace(s,"").trim()}return{url:(0,nde.prependHTTP)(t),linkTarget:n,rel:i||void 0}}function sde({data:e,field:t,onChange:o}){let[r,n]=(0,rR.useState)(!1),{popoverProps:i}=lk({isControl:!0}),s=t.getValue({item:e}),a=s?.url,c=s?.rel||"",d=s?.linkTarget===ide,f=c===oR,m=(0,rR.useMemo)(()=>({url:a,opensInNewTab:d,nofollow:f}),[a,d,f]);return(0,fr.jsxs)(fr.Fragment,{children:[(0,fr.jsx)(yc.Button,{__next40pxDefaultSize:!0,className:"block-editor-content-only-controls__link",onClick:()=>{n(!0)},children:(0,fr.jsxs)(yc.__experimentalGrid,{rowGap:0,columnGap:8,templateColumns:"24px 1fr",className:"block-editor-content-only-controls__link-row",children:[a&&(0,fr.jsxs)(fr.Fragment,{children:[(0,fr.jsx)(yc.Icon,{icon:nn,size:24}),(0,fr.jsx)("span",{className:"block-editor-content-only-controls__link-title",children:a})]}),!a&&(0,fr.jsxs)(fr.Fragment,{children:[(0,fr.jsx)(yc.Icon,{icon:nn,size:24,style:{opacity:.3}}),(0,fr.jsx)("span",{className:"block-editor-content-only-controls__link-title",children:(0,rde.__)("Link")})]})]})}),r&&(0,fr.jsx)(yc.Popover,{onClose:()=>{n(!1)},...i??{},children:(0,fr.jsx)(dd,{value:m,onChange:p=>{let h=GRe({rel:c,...p});o(t.setValue({item:e,value:h}))},onRemove:()=>{o(t.setValue({item:e,value:{}}))}})})]})}var mr=l(x(),1),{fieldsKey:cde,formKey:E3}=F(nR.privateApis);function T3(e,t={}){return function(r){return(0,mr.jsx)(e,{...r,config:t})}}function HRe({clientId:e,blockType:t,setAttributes:o,isCollapsed:r=!1}){let n=rr({clientId:e,context:"list-view"}),i=xt(e),s=t?.[cde],a=(0,ade.useSelect)(p=>p(S).getBlockAttributes(e),[e]),c=(0,np.useMemo)(()=>r?{...t?.[E3],fields:[t?.[E3]?.fields?.[0]]}:t?.[E3],[t,r]),[u,d]=(0,np.useState)(c),f=(0,np.useMemo)(()=>s?.length?s.map(p=>{let h={...p};return typeof p.Edit=="string"&&p.Edit==="rich-text"?h.Edit=T3(ede,{clientId:e}):typeof p.Edit=="string"&&p.Edit==="link"?h.Edit=T3(sde):typeof p.Edit=="object"&&p.Edit.control==="media"&&(h.Edit=T3(ode,{...p.Edit})),h}):[],[s,e]);if(!s?.length)return null;let m=p=>{d(h=>h.fields?.includes(p)?{...h,fields:h.fields.filter(g=>g!==p)}:{...h,fields:[...h.fields||[],p]})};return(0,mr.jsxs)("div",{className:"block-editor-block-fields__container",children:[(0,mr.jsx)("div",{className:"block-editor-block-fields__header",children:(0,mr.jsxs)(iR.__experimentalHStack,{spacing:1,children:[r&&(0,mr.jsxs)(mr.Fragment,{children:[(0,mr.jsx)(Ie,{className:"block-editor-block-fields__header-icon",icon:i?.icon}),(0,mr.jsx)("h2",{className:"block-editor-block-fields__header-title",children:(0,mr.jsx)(iR.__experimentalTruncate,{numberOfLines:1,children:n})}),(0,mr.jsx)(que,{fields:f,visibleFields:u.fields,onToggleField:m})]}),!r&&(0,mr.jsx)("h2",{className:"block-editor-block-fields__header-title",children:(0,lde.__)("Content")})]})}),(0,mr.jsx)(x_,{data:a,fields:f,form:u,onChange:o})]})}function URe(e){return!!(window?.__experimentalContentOnlyInspectorFields&&(0,nR.getBlockType)(e)?.[cde])}function WRe(e){let{blockType:t,isSelectionWithinCurrentSection:o}=(0,np.useContext)(Ar);return(0,mr.jsx)(tm,{group:"content",children:(0,mr.jsx)(HRe,{...e,blockType:t,isCollapsed:o})})}var ude={edit:WRe,hasSupport:URe,attributeKeys:[],supportsPatternEditing:!0};var R3=l(Je(),1),dde=l(P(),1),I3=l(L(),1),w_=l(Z(),1);var P3=l(x(),1);function ZRe(e){return(0,w_.hasBlockSupport)(e,"customClassName",!0)&&(e.attributes={...e.attributes,className:{type:"string"}}),e}function $Re({className:e,setAttributes:t}){return To()!=="default"?null:(0,P3.jsx)(fe,{group:"advanced",children:(0,P3.jsx)(dde.TextControl,{__next40pxDefaultSize:!0,autoComplete:"off",label:(0,I3.__)("Additional CSS class(es)"),value:e||"",onChange:r=>{t({className:r!==""?r:void 0})},help:(0,I3.__)("Separate multiple classes with spaces.")})})}var O3={edit:$Re,addSaveProps:YRe,attributeKeys:["className"],hasSupport(e){return(0,w_.hasBlockSupport)(e,"customClassName",!0)}};function YRe(e,t,o){return(0,w_.hasBlockSupport)(t,"customClassName",!0)&&o.className&&(e.className=D(e.className,o.className)),e}function KRe(e,t,o,r){if(!(0,w_.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,R3.addFilter)("blocks.registerBlockType","core/editor/custom-class-name/attribute",ZRe);(0,R3.addFilter)("blocks.switchToBlockType.transformedBlock","core/customClassName/addTransforms",KRe);var fde=l(Je(),1),C_=l(Z(),1);function XRe(e,t){return(0,C_.hasBlockSupport)(t,"className",!0)&&(typeof e.className=="string"?e.className=[...new Set([(0,C_.getBlockDefaultClassName)(t.name),...e.className.split(" ")])].join(" ").trim():e.className=(0,C_.getBlockDefaultClassName)(t.name)),e}(0,fde.addFilter)("blocks.getSaveContent.extraProps","core/generated-class-name/save-props",XRe);var Ude=l(I(),1),Wde=l(Je(),1),Hd=l(Z(),1),Zde=l(Y(),1),pk=l(Bv(),1);var z3=l(Z(),1),dR=l(I(),1),Rde=l(M(),1);var qRe=l(Z(),1);var QRe=l(x(),1),mde="typography.lineHeight";var pde=l(Je(),1),sR=l(Z(),1),hde=l(jE(),1),gde=l(P(),1);var B_="typography.__experimentalFontFamily",{kebabCase:JRe}=F(gde.privateApis);function eOe(e){return(0,sR.hasBlockSupport)(e,B_)&&(e.attributes.fontFamily||Object.assign(e.attributes,{fontFamily:{type:"string"}})),e}function bde(e,t,o){if(!(0,sR.hasBlockSupport)(t,B_)||qe(t,Ki,"fontFamily")||!o?.fontFamily)return e;let r=new hde.default(e.className);r.add(`has-${JRe(o?.fontFamily)}-font-family`);let n=r.value;return e.className=n||void 0,e}function tOe({name:e,fontFamily:t}){return bde({},e,{fontFamily:t})}var A3={useBlockProps:tOe,addSaveProps:bde,attributeKeys:["fontFamily"],hasSupport(e){return(0,sR.hasBlockSupport)(e,B_)}};(0,pde.addFilter)("blocks.registerBlockType","core/fontFamily/addAttribute",eOe);var L3=l(Je(),1),dk=l(Z(),1),kde=l(jE(),1);var oOe=l(x(),1),ip="typography.fontSize";function rOe(e){return(0,dk.hasBlockSupport)(e,ip)&&(e.attributes.fontSize||Object.assign(e.attributes,{fontSize:{type:"string"}})),e}function vde(e,t,o){if(!(0,dk.hasBlockSupport)(t,ip)||qe(t,Ki,"fontSize"))return e;let r=new kde.default(e.className);r.add($c(o.fontSize));let n=r.value;return e.className=n||void 0,e}function nOe({name:e,fontSize:t,style:o}){let[r,n,i]=pe("typography.fontSizes","typography.fluid","layout");if(!(0,dk.hasBlockSupport)(e,ip)||qe(e,Ki,"fontSize")||!t&&!o?.typography?.fontSize)return;let s;if(o?.typography?.fontSize&&(s={style:{fontSize:Yl({size:o.typography.fontSize},{typography:{fluid:n},layout:i})}}),t&&(s={style:{fontSize:Zp(r,t,o?.typography?.fontSize).size}}),!!s)return vde(s,e,{fontSize:t})}var N3={useBlockProps:nOe,addSaveProps:vde,attributeKeys:["fontSize","style"],hasSupport(e){return(0,dk.hasBlockSupport)(e,ip)}},iOe={fontSize:[["fontSize"],["style","typography","fontSize"]]};function sOe(e,t,o,r){let n=e.name,i={fontSize:(0,dk.hasBlockSupport)(n,ip)};return Y2(i,iOe,e,t,o,r)}(0,L3.addFilter)("blocks.registerBlockType","core/font/addAttribute",rOe);(0,L3.addFilter)("blocks.switchToBlockType.transformedBlock","core/font-size/addTransforms",sOe);var aR=l(L(),1),fk=l(Z(),1);var M3=l(x(),1),mk="typography.textAlign",aOe=[{icon:Lc,title:(0,aR.__)("Align text left"),align:"left"},{icon:tf,title:(0,aR.__)("Align text center"),align:"center"},{icon:Nc,title:(0,aR.__)("Align text right"),align:"right"}],yde=["left","center","right"],lOe=[];function D3(e){return Array.isArray(e)?yde.filter(t=>e.includes(t)):e===!0?yde:lOe}function cOe({style:e,name:t,setAttributes:o}){let n=Hi(t)?.typography?.textAlign,i=To();if(!n||i!=="default")return null;let s=D3((0,fk.getBlockSupport)(t,mk));if(!s.length)return null;let a=aOe.filter(u=>s.includes(u.align)),c=u=>{let d={...e,typography:{...e?.typography,textAlign:u}};o({style:Se(d)})};return(0,M3.jsx)(pt,{group:"block",children:(0,M3.jsx)(_w,{value:e?.typography?.textAlign,onChange:c,alignmentControls:a})})}var lR={edit:cOe,useBlockProps:uOe,addSaveProps:dOe,attributeKeys:["style"],hasSupport(e){return(0,fk.hasBlockSupport)(e,mk,!1)}};function uOe({name:e,style:t}){if(!t?.typography?.textAlign||!D3((0,fk.getBlockSupport)(e,mk)).length||qe(e,Ki,"textAlign"))return null;let r=t.typography.textAlign;return{className:D({[`has-text-align-${r}`]:r})}}function dOe(e,t,o){if(!o?.style?.typography?.textAlign)return e;let{textAlign:r}=o.style.typography,n=(0,fk.getBlockSupport)(t,mk);return D3(n).includes(r)&&!qe(t,Ki,"textAlign")&&(e.className=D(`has-text-align-${r}`,e.className)),e}var F3=l(Je(),1),zd=l(Z(),1),sp=l(I(),1),Tde=l(M(),1),E_=l(L(),1),cR=l(P(),1),Ide=l(Y(),1);function fOe(e,t){let o=e.scrollHeight>e.clientHeight,r=0,n=2400,i=r,s=window.getComputedStyle(e),a=parseFloat(s.paddingLeft)||0,c=parseFloat(s.paddingRight)||0,u=document.createRange();for(u.selectNodeContents(e);r<=n;){let d=Math.floor((r+n)/2);t(d);let m=u.getBoundingClientRect().width,p=e.scrollWidth<=e.clientWidth&&m<=e.clientWidth-a-c,h=o||e.scrollHeight<=e.clientHeight;p&&h?(i=d,r=d+1):n=d-1}return u.detach(),i}function Sde(e,t){if(!e)return;t(0);let o=fOe(e,t);return t(o),o}var _de=l(I(),1),xde=l(L(),1),wde=l(P(),1),Cde=l(jo(),1),V3=l(x(),1);function Bde(){let e=(0,xde.__)("The text may be too small to read. Consider using a larger container or less text.");return(0,_de.useEffect)(()=>{(0,Cde.speak)(e)},[e]),(0,V3.jsx)("div",{className:"block-editor-fit-text-size-warning",children:(0,V3.jsx)(wde.Notice,{spokenMessage:null,status:"warning",isDismissible:!1,children:e})})}var Cn=l(x(),1),mOe={},pOe=12,Sc="typography.fitText";function hOe(e){return!(0,zd.hasBlockSupport)(e,Sc)||e.attributes?.fitText?e:{...e,attributes:{...e.attributes,fitText:{type:"boolean"}}}}function gOe({fitText:e,name:t,clientId:o}){let[r,n]=(0,sp.useState)(null),i=(0,zd.hasBlockSupport)(t,Sc),s=ht(o),{blockAttributes:a,parentId:c}=(0,Tde.useSelect)(d=>!o||!i||!e?mOe:{blockAttributes:d(S).getBlockAttributes(o),parentId:d(S).getBlockRootClientId(o)},[o,i,e]),u=(0,sp.useCallback)(()=>{if(!s||!i||!e)return;let d=`fit-text-${o}`,f=s.ownerDocument.getElementById(d);f||(f=s.ownerDocument.createElement("style"),f.id=d,s.ownerDocument.head.appendChild(f));let m=`#block-${o}`,h=Sde(s,g=>{g===0?f.textContent="":f.textContent=`${m} { font-size: ${g}px !important; }`});n(h)},[s,o,i,e]);return(0,sp.useEffect)(()=>{if(!e||!s||!o||!i)return;let d=s,f=d.style.visibility,m=null,p=null,h=null;m=window.requestAnimationFrame(()=>{d.style.visibility="hidden",p=window.requestAnimationFrame(()=>{u(),h=setTimeout(()=>{d.style.visibility=f},10)})});let g;return window.ResizeObserver&&d.parentElement&&(g=new window.ResizeObserver(u),g.observe(d.parentElement),g.observe(d)),()=>{m!==null&&window.cancelAnimationFrame(m),p!==null&&window.cancelAnimationFrame(p),h!==null&&clearTimeout(h),g&&g.disconnect();let b=`fit-text-${o}`,k=d.ownerDocument.getElementById(b);k&&k.remove()}},[e,o,c,u,s,i]),(0,sp.useEffect)(()=>{if(e&&s&&i){let d=window.requestAnimationFrame(()=>{s&&u()});return()=>window.cancelAnimationFrame(d)}},[a,e,u,s,i]),{fontSize:r}}function Ede({clientId:e,fitText:t=!1,setAttributes:o,name:r,fontSize:n,style:i,warning:s}){return(0,zd.hasBlockSupport)(r,Sc)?(0,Cn.jsx)(fe,{group:"typography",children:(0,Cn.jsxs)(cR.__experimentalToolsPanelItem,{hasValue:()=>t,label:(0,E_.__)("Fit text"),onDeselect:()=>o({fitText:void 0}),resetAllFilter:()=>({fitText:void 0}),panelId:e,children:[(0,Cn.jsx)(cR.ToggleControl,{label:(0,E_.__)("Fit text"),checked:t,onChange:()=>{let a=!t||void 0,c={fitText:a};a&&(n&&(c.fontSize=void 0),i?.typography?.fontSize&&(c.style={...i,typography:{...i?.typography,fontSize:void 0}})),o(c)},help:t?(0,E_.__)("Text will resize to fit its container."):(0,E_.__)("The text will resize to fit its container, resetting other font size settings.")}),s]})}):null}function bOe(e,t,o){if(!(0,zd.hasBlockSupport)(t,Sc))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 kOe({name:e,fitText:t}){return t&&(0,zd.hasBlockSupport)(e,Sc)?{className:"has-fit-text"}:{}}(0,F3.addFilter)("blocks.registerBlockType","core/fit-text/addAttribute",hOe);var vOe=e=>(0,zd.hasBlockSupport)(e,Sc);function yOe({fitText:e,name:t,clientId:o,children:r}){let{fontSize:n}=gOe({fitText:e,name:t,clientId:o});return r(n)}var SOe=(0,Ide.createHigherOrderComponent)(e=>t=>{let{name:o,attributes:r,clientId:n,isSelected:i,setAttributes:s}=t,{fitText:a}=r;return(0,zd.hasBlockSupport)(o,Sc)?(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsx)(e,{...t}),a&&(0,Cn.jsx)(yOe,{fitText:a,name:o,clientId:n,children:u=>i&&(0,Cn.jsx)(Ede,{clientId:n,fitText:a,setAttributes:s,name:o,fontSize:r.fontSize,style:r.style,warning:u<pOe&&(0,Cn.jsx)(Bde,{})})}),!a&&i&&(0,Cn.jsx)(Ede,{clientId:n,fitText:a,setAttributes:s,name:o,fontSize:r.fontSize,style:r.style})]}):(0,Cn.jsx)(e,{...t})},"addFitTextControl");(0,F3.addFilter)("editor.BlockEdit","core/fit-text/add-fit-text-control",SOe);var uR={useBlockProps:kOe,addSaveProps:bOe,attributeKeys:["fitText","fontSize","style"],hasSupport:vOe,edit:()=>null};var j3=l(x(),1);function Pde(e,t){return Object.fromEntries(Object.entries(e).filter(([o])=>!t.includes(o)))}var _Oe="typography.__experimentalLetterSpacing",xOe="typography.__experimentalTextTransform",wOe="typography.__experimentalTextDecoration",COe="typography.textColumns",BOe="typography.__experimentalFontStyle",EOe="typography.__experimentalFontWeight",TOe="typography.__experimentalWritingMode",Ki="typography",Ode=[mde,ip,BOe,EOe,B_,mk,COe,wOe,TOe,xOe,_Oe,Sc];function Ade(e){let t={...Pde(e,["fontFamily"])},o=e?.typography?.fontSize,r=e?.typography?.fontFamily,n=typeof o=="string"&&o?.startsWith("var:preset|font-size|")?o.substring(21):void 0,i=r?.startsWith("var:preset|font-family|")?r.substring(23):void 0;return t.typography={...Pde(t.typography,["fontFamily"]),fontSize:n?void 0:o},{style:Se(t),fontFamily:i,fontSize:n}}function Lde(e){return{...e.style,typography:{...e.style?.typography,fontFamily:e.fontFamily?"var:preset|font-family|"+e.fontFamily:void 0,fontSize:e.fontSize?"var:preset|font-size|"+e.fontSize:e.style?.typography?.fontSize}}}function IOe({children:e,resetAllFilter:t}){let o=(0,dR.useCallback)(r=>{let n=Lde(r),i=t(n);return{...r,...Ade(i)}},[t]);return(0,j3.jsx)(fe,{group:"typography",resetAllFilter:o,children:e})}function Nde({clientId:e,name:t,setAttributes:o,settings:r}){let n=h2(r),{style:i,fontFamily:s,fontSize:a,fitText:c}=(0,Rde.useSelect)(m=>{if(!n)return{};let{style:p,fontFamily:h,fontSize:g,fitText:b}=m(S).getBlockAttributes(e)||{};return{style:p,fontFamily:h,fontSize:g,fitText:b}},[e,n]),u=(0,dR.useMemo)(()=>Lde({style:i,fontFamily:s,fontSize:a}),[i,a,s]),d=m=>{let p=Ade(m);(p.fontSize||p.style?.typography?.fontSize)&&c&&(p.fitText=void 0),o(p)};if(!n)return null;let f=(0,z3.getBlockSupport)(t,[Ki,"__experimentalDefaultControls"]);return(0,j3.jsx)(g2,{as:IOe,panelId:e,settings:r,value:u,onChange:d,defaultControls:f})}var Gd=l(I(),1),mR=l(M(),1),fR=l(Z(),1),zde=l(Re(),1);var Ja=l(I(),1),Mde=l(zy(),1);var T_=l(x(),1);function Dde({clientId:e,value:t,computeStyle:o,forceShow:r}){let n=ht(e),[i,s]=(0,Ja.useReducer)(()=>o(n));(0,Ja.useEffect)(()=>{n&&r&&s()},[n,r]),(0,Ja.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,Ja.useRef)(t),[c,u]=(0,Ja.useState)(!1);return(0,Ja.useEffect)(()=>{if((0,Mde.isShallowEqual)(t,a.current)||r)return;u(!0),a.current=t;let d=setTimeout(()=>{u(!1)},400);return()=>{u(!1),clearTimeout(d)}},[t,r]),!c&&!r?null:(0,T_.jsx)(Ii,{clientId:e,__unstablePopoverSlot:"block-toolbar",children:(0,T_.jsx)("div",{className:"block-editor__spacing-visualizer",style:i})})}function jd(e,t){return e.ownerDocument.defaultView.getComputedStyle(e).getPropertyValue(t)}function Vde({clientId:e,value:t,forceShow:o}){return(0,T_.jsx)(Dde,{clientId:e,value:t?.spacing?.margin,computeStyle:r=>{let n=jd(r,"margin-top"),i=jd(r,"margin-right"),s=jd(r,"margin-bottom"),a=jd(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 Fde({clientId:e,value:t,forceShow:o}){return(0,T_.jsx)(Dde,{clientId:e,value:t?.spacing?.padding,computeStyle:r=>({borderTopWidth:jd(r,"padding-top"),borderRightWidth:jd(r,"padding-right"),borderBottomWidth:jd(r,"padding-bottom"),borderLeftWidth:jd(r,"padding-left")}),forceShow:o})}var _c=l(x(),1),el="dimensions",I_="spacing";function POe(){let[e,t]=(0,Gd.useState)(!1),{hideBlockInterface:o,showBlockInterface:r}=F((0,mR.useDispatch)(S));return(0,Gd.useEffect)(()=>{e?o():r()},[e,r,o]),[e,t]}function ROe({children:e,resetAllFilter:t}){let o=(0,Gd.useCallback)(r=>{let n=r.style,i=t(n);return{...r,style:i}},[t]);return(0,_c.jsx)(fe,{group:"dimensions",resetAllFilter:o,children:e})}function jde({clientId:e,name:t,setAttributes:o,settings:r}){let n=y2(r),i=(0,mR.useSelect)(m=>{if(n)return m(S).getBlockAttributes(e)?.style},[e,n]),[s,a]=POe(),c=m=>{o({style:Se(m)})};if(!n)return null;let u=(0,fR.getBlockSupport)(t,[el,"__experimentalDefaultControls"]),d=(0,fR.getBlockSupport)(t,[I_,"__experimentalDefaultControls"]),f={...u,...d};return(0,_c.jsxs)(_c.Fragment,{children:[(0,_c.jsx)(S2,{as:ROe,panelId:e,settings:r,value:i,onChange:c,defaultControls:f,onVisualize:a}),!!r?.spacing?.padding&&s==="padding"&&(0,_c.jsx)(Fde,{forceShow:s==="padding",clientId:e,value:i}),!!r?.spacing?.margin&&s==="margin"&&(0,_c.jsx)(Vde,{forceShow:s==="margin",clientId:e,value:i})]})}function Gde(e,t="any"){if(Gd.Platform.OS!=="web")return!1;let o=(0,fR.getBlockSupport)(e,el);return o===!0?!0:t==="any"?!!(o?.aspectRatio||o?.height||o?.minHeight||o?.width):!!o?.[t]}var Hde={useBlockProps:OOe,attributeKeys:["height","minHeight","width","style"],hasSupport(e){return Gde(e)}};function OOe({name:e,height:t,minHeight:o,style:r}){if(!Gde(e,"aspectRatio")||qe(e,el,"aspectRatio"))return{};let n=D({"has-aspect-ratio":!!r?.dimensions?.aspectRatio}),i={};return r?.dimensions?.aspectRatio?(i.minHeight="unset",i.height="unset"):(o||r?.dimensions?.minHeight||t||r?.dimensions?.height)&&(i.aspectRatio="unset"),{className:n,style:i}}function G3(){(0,zde.default)("wp.blockEditor.__experimentalUseCustomSides",{since:"6.3",version:"6.4"})}var tl=l(x(),1),AOe=[...Ode,Gm,Xo,el,Hm,I_,a_],U3=e=>AOe.some(t=>(0,Hd.hasBlockSupport)(e,t));function js(e={}){let t={};return(0,pk.getCSSRules)(e).forEach(o=>{t[o.key]=o.value}),t}function LOe(e){return U3(e)&&(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}})),e}var $de={[`${Gm}.__experimentalSkipSerialization`]:["border"],[`${Xo}.__experimentalSkipSerialization`]:[Xo],[`${Ki}.__experimentalSkipSerialization`]:[Ki],[`${el}.__experimentalSkipSerialization`]:[el],[`${I_}.__experimentalSkipSerialization`]:[I_],[`${a_}.__experimentalSkipSerialization`]:[a_]},NOe={...$de,[`${el}.aspectRatio`]:[`${el}.aspectRatio`],[`${Hm}`]:[Hm]},MOe={[`${el}.aspectRatio`]:!0,[`${Hm}`]:!0},DOe={gradients:"gradient"};function H3(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;H3(r[i],[s],!0)}else n.length===1&&delete r[n[0]]}),r}function Yde(e,t,o,r=NOe){if(!U3(t))return e;let{style:n}=o;return Object.entries(r).forEach(([i,s])=>{let a=MOe[i]||(0,Hd.getBlockSupport)(t,i);a===!0&&(n=H3(n,s)),Array.isArray(a)&&a.forEach(c=>{let u=DOe[c]||c;n=H3(n,[[...s,u]])})}),e.style={...js(n),...e.style},e}function VOe({clientId:e,name:t,setAttributes:o,__unstableParentLayout:r}){let n=Hi(t,r),i=To(),s={clientId:e,name:t,setAttributes:o,settings:{...n,typography:{...n.typography,textAlign:!1}}};return i!=="default"?null:(0,tl.jsxs)(tl.Fragment,{children:[(0,tl.jsx)($2,{...s}),(0,tl.jsx)(Xse,{...s}),(0,tl.jsx)(Nde,{...s}),(0,tl.jsx)(Wse,{...s}),(0,tl.jsx)(jde,{...s})]})}var pR={edit:VOe,hasSupport:U3,addSaveProps:Yde,attributeKeys:["style"],useBlockProps:jOe},FOe=[{elementType:"button"},{elementType:"link",pseudo:[":hover"]},{elementType:"heading",elements:["h1","h2","h3","h4","h5","h6"]}],zOe={};function jOe({name:e,style:t}){let o=(0,Zde.useInstanceId)(zOe,"wp-elements"),r=`.${o}`,n=t?.elements,i=(0,Ude.useMemo)(()=>{if(!n)return;let s=[];return FOe.forEach(({elementType:a,pseudo:c,elements:u})=>{if(qe(e,Xo,a))return;let f=n?.[a];if(f){let m=ig(r,Hd.__EXPERIMENTAL_ELEMENTS[a]);s.push((0,pk.compileCSS)(f,{selector:m})),c&&c.forEach(p=>{f[p]&&s.push((0,pk.compileCSS)(f[p],{selector:ig(r,`${Hd.__EXPERIMENTAL_ELEMENTS[a]}${p}`)}))})}u&&u.forEach(m=>{n[m]&&s.push((0,pk.compileCSS)(n[m],{selector:ig(r,Hd.__EXPERIMENTAL_ELEMENTS[m])}))})}),s.length>0?s.join(""):void 0},[r,n,e]);return ks({css:i}),Yde({className:o},e,{style:t},$de)}(0,Wde.addFilter)("blocks.registerBlockType","core/style/addAttribute",LOe);var Kde=l(Je(),1),Xde=l(Z(),1),GOe=e=>(0,Xde.hasBlockSupport)(e,"__experimentalSettings",!1);function HOe(e){return GOe(e)&&(e?.attributes?.settings||(e.attributes={...e.attributes,settings:{type:"object"}})),e}(0,Kde.addFilter)("blocks.registerBlockType","core/settings/addAttribute",HOe);var Ud=l(Z(),1),Jde=l(Y(),1),efe=l(Je(),1),P_=l(I(),1);function UOe(e=[]){let t={r:[],g:[],b:[],a:[]};return e.forEach(o=>{let r=mt(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 qde(e){return`${e}{filter:none}`}function Qde(e,t){return`${e}{filter:url(#${t})}`}function hR(e,t){let o=UOe(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 xc=l(x(),1),W3=[],WOe=window?.navigator.userAgent&&window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome")&&!window.navigator.userAgent.includes("Chromium");Ic([Pc]);function Z3({presetSetting:e,defaultSetting:t}){let[o,r,n,i]=pe(t,`${e}.custom`,`${e}.theme`,`${e}.default`);return(0,P_.useMemo)(()=>[...r||W3,...n||W3,...o&&i||W3],[o,r,n,i])}function tfe(e,t){if(!e)return;let o=t?.find(({slug:r})=>e===`var:preset|duotone|${r}`);return o?o.colors:void 0}function ZOe(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 $Oe({style:e,setAttributes:t,name:o}){let r=e?.color?.duotone,n=Hi(o),i=To(),s=Z3({presetSetting:"color.duotone",defaultSetting:"color.defaultDuotone"}),a=Z3({presetSetting:"color.palette",defaultSetting:"color.defaultPalette"}),[c,u]=pe("color.custom","color.customDuotone"),d=!c,f=!u||a?.length===0&&d;if(s?.length===0&&f||i!=="default")return null;let m=r==="unset"||Array.isArray(r)?r:tfe(r,s);return(0,xc.jsxs)(xc.Fragment,{children:[(0,xc.jsx)(fe,{group:"filter",children:(0,xc.jsx)(R2,{value:{filter:{duotone:m}},onChange:p=>{let h={...e,color:{...p?.filter}};t({style:Se(h)})},settings:n})}),(0,xc.jsx)(pt,{group:"block",__experimentalShareWithChildBlocks:!0,children:(0,xc.jsx)(FT,{duotonePalette:s,colorPalette:a,disableCustomDuotone:f,disableCustomColors:d,value:m,onChange:p=>{let h=ZOe(p,s),g={...e,color:{...e?.color,duotone:h??p}};t({style:Se(g)})},settings:n})})]})}var $3={shareWithChildBlocks:!0,edit:$Oe,useBlockProps:qOe,attributeKeys:["style"],hasSupport(e){return(0,Ud.hasBlockSupport)(e,"filter.duotone")}};function YOe(e){return(0,Ud.hasBlockSupport)(e,"filter.duotone")&&(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}})),e}function KOe({clientId:e,id:t,selector:o,attribute:r}){let n=Z3({presetSetting:"color.duotone",defaultSetting:"color.defaultDuotone"}),i=Array.isArray(r),s=i?void 0:tfe(r,n),a=typeof r=="string"&&s,c=typeof r=="string"&&!a,u=null;a?u=s:(c||i)&&(u=r);let m=o.split(",").map(g=>`.${t}${g.trim()}`).join(", "),p=Array.isArray(u)||u==="unset";dm(p?{css:u!=="unset"?Qde(m,t):qde(m),__unstableType:"presets"}:void 0),dm(p?{assets:u!=="unset"?hR(t,u):"",__unstableType:"svgs"}:void 0);let h=ht(e);(0,P_.useEffect)(()=>{if(p&&h&&WOe){let g=h.style.display;h.style.setProperty("display","inline-block"),h.offsetHeight,h.style.setProperty("display",g)}},[p,h,u])}var XOe={};function qOe({clientId:e,name:t,style:o}){let r=(0,Jde.useInstanceId)(XOe),n=(0,P_.useMemo)(()=>{let c=(0,Ud.getBlockType)(t);if(c){if(!(0,Ud.getBlockSupport)(c,"filter.duotone",!1))return null;let d=(0,Ud.getBlockSupport)(c,"color.__experimentalDuotone",!1);if(d){let f=ka(c);return typeof d=="string"?ig(f,d):f}return ka(c,"filter.duotone",{fallback:!0})}},[t]),i=o?.color?.duotone,s=`wp-duotone-${r}`,a=n&&i;return KOe({clientId:e,id:s,selector:n,attribute:i}),{className:a?s:""}}(0,efe.addFilter)("blocks.registerBlockType","core/editor/duotone/add-attributes",YOe);var gR=l(Y(),1),K3=l(Je(),1),ap=l(Z(),1),bR=l(M(),1),ol=l(P(),1),hk=l(L(),1);var Do=l(x(),1),X3="layout",{kebabCase:Y3}=F(ol.privateApis);function q3(e){return(0,ap.hasBlockSupport)(e,"layout")||(0,ap.hasBlockSupport)(e,"__experimentalLayout")}function kR(e={},t=""){let{layout:o}=e,{default:r}=(0,ap.getBlockSupport)(t,X3)||{},n=o?.inherit||o?.contentSize||o?.wideSize?{...o,type:"constrained"}:o||r||{},i=[];if(An[n?.type||"default"]?.className){let a=An[n?.type||"default"]?.className,c=t.split("/"),d=`wp-block-${c[0]==="core"?c.pop():c.join("-")}-${a}`;i.push(a,d)}return(0,bR.useSelect)(a=>!n?.inherit&&!n?.contentSize&&n?.type!=="constrained"?!1:a(S).getSettings().__experimentalFeatures?.useRootPaddingAwareAlignments,[n?.contentSize,n?.inherit,n?.type])&&i.push("has-global-padding"),n?.orientation&&i.push(`is-${Y3(n.orientation)}`),n?.justifyContent&&i.push(`is-content-justification-${Y3(n.justifyContent)}`),n?.flexWrap&&n.flexWrap==="nowrap"&&i.push("is-nowrap"),i}function Q3(e={},t,o){let{layout:r={},style:n={}}=e,i=r?.inherit||r?.contentSize||r?.wideSize?{...r,type:"constrained"}:r||{},s=ns(i?.type||"default"),[a]=pe("spacing.blockGap"),c=a!==null;return s?.getLayoutStyle?.({blockName:t,selector:o,layout:r,style:n,hasBlockGapSupport:c})}function QOe({layout:e,setAttributes:t,name:o,clientId:r}){let n=Hi(o),{layout:i}=n,{themeSupportsLayout:s}=(0,bR.useSelect)(A=>{let{getSettings:N}=A(S);return{themeSupportsLayout:N().supportsLayout}},[]);if(To()!=="default")return null;let c=(0,ap.getBlockSupport)(o,X3,{}),u={...i,...c},{allowSwitching:d,allowEditing:f=!0,allowInheriting:m=!0,default:p}=u;if(!f)return null;let h={...c,...e},{type:g,default:{type:b="default"}={}}=h,k=g||b,v=!!(m&&(!k||k==="default"||k==="constrained"||h.inherit)),y=e||p||{},{inherit:_=!1,contentSize:w=null}=y;if((k==="default"||k==="constrained")&&!s)return null;let C=ns(k),E=ns("constrained"),R=!y.type&&(w||_),O=!!_||!!w,B=A=>t({layout:{type:A}}),T=A=>t({layout:A});return(0,Do.jsxs)(Do.Fragment,{children:[(0,Do.jsx)(fe,{children:(0,Do.jsxs)(ol.PanelBody,{title:(0,hk.__)("Layout"),children:[v&&(0,Do.jsx)(Do.Fragment,{children:(0,Do.jsx)(ol.ToggleControl,{label:(0,hk.__)("Inner blocks use content width"),checked:C?.name==="constrained"||O,onChange:()=>t({layout:{type:C?.name==="constrained"||O?"default":"constrained"}}),help:C?.name==="constrained"||O?(0,hk.__)("Nested blocks use content width with options for full and wide widths."):(0,hk.__)("Nested blocks will fill the width of this container.")})}),!_&&d&&(0,Do.jsx)(JOe,{type:k,onChange:B}),C&&C.name!=="default"&&(0,Do.jsx)(C.inspectorControls,{layout:y,onChange:T,layoutBlockSupport:u,name:o,clientId:r}),E&&R&&(0,Do.jsx)(E.inspectorControls,{layout:y,onChange:T,layoutBlockSupport:u,name:o,clientId:r})]})}),!_&&C&&(0,Do.jsx)(C.toolBarControls,{layout:y,onChange:T,layoutBlockSupport:c,name:o,clientId:r})]})}var ofe={shareWithChildBlocks:!0,edit:QOe,attributeKeys:["layout"],hasSupport(e){return q3(e)}};function JOe({type:e,onChange:t}){return(0,Do.jsx)(ol.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,isBlock:!0,label:(0,hk.__)("Layout type"),hideLabelFromVision:!0,isAdaptiveWidth:!0,value:e,onChange:t,children:EG().map(({name:o,label:r})=>(0,Do.jsx)(ol.__experimentalToggleGroupControlOption,{value:o,label:r},o))})}function eAe(e){return"type"in(e.attributes?.layout??{})||q3(e)&&(e.attributes={...e.attributes,layout:{type:"object"}}),e}function tAe({block:e,props:t,blockGapSupport:o,layoutClasses:r}){let{name:n,attributes:i}=t,s=(0,gR.useInstanceId)(e),{layout:a}=i,{default:c}=(0,ap.getBlockSupport)(n,X3)||{},u=a?.inherit||a?.contentSize||a?.wideSize?{...a,type:"constrained"}:a||c||{},d=`wp-container-${Y3(n)}-is-layout-`,f=`.${d}${s}`,m=o!==null,h=ns(u?.type||"default")?.getLayoutStyle?.({blockName:n,selector:f,layout:u,style:i?.style,hasBlockGapSupport:m}),g=D({[`${d}${s}`]:!!h},r);return ks({css:h}),(0,Do.jsx)(e,{...t,__unstableLayoutClassNames:g})}var oAe=(0,gR.createHigherOrderComponent)(e=>t=>{let{clientId:o,name:r,attributes:n}=t,i=q3(r),s=kR(n,r),a=(0,bR.useSelect)(c=>{if(!i)return;let{getSettings:u,getBlockSettings:d}=F(c(S)),{disableLayoutStyles:f}=u();if(f)return;let[m]=d(o,"spacing.blockGap");return{blockGapSupport:m}},[i,o]);return a?(0,Do.jsx)(tAe,{block:e,props:t,layoutClasses:s,...a}):(0,Do.jsx)(e,{...t,__unstableLayoutClassNames:i?s:void 0})},"withLayoutStyles");(0,K3.addFilter)("blocks.registerBlockType","core/layout/addAttribute",eAe);(0,K3.addFilter)("editor.BlockListBlock","core/editor/layout/with-layout-styles",oAe);var cfe=l(Y(),1),iz=l(M(),1),ufe=l(I(),1);var Gs=l(I(),1),Wd=l(M(),1),rfe=l(Y(),1);function J3(e,t){return Array.from({length:t},(o,r)=>e+r)}var rl=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 pr(e,t){return e.ownerDocument.defaultView.getComputedStyle(e).getPropertyValue(t)}function ez(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 R_(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 tz(e){let t=pr(e,"grid-template-columns"),o=pr(e,"grid-template-rows"),r=pr(e,"border-top-width"),n=pr(e,"border-right-width"),i=pr(e,"border-bottom-width"),s=pr(e,"border-left-width"),a=pr(e,"padding-top"),c=pr(e,"padding-right"),u=pr(e,"padding-bottom"),d=pr(e,"padding-left"),f=t.split(" ").length,m=o.split(" ").length,p=f*m;return{numColumns:f,numRows:m,numItems:p,currentColor:pr(e,"color"),style:{gridTemplateColumns:t,gridTemplateRows:o,gap:pr(e,"gap"),inset:`
				calc(${a} + ${r})
				calc(${c} + ${n})
				calc(${u} + ${i})
				calc(${d} + ${s})
			`}}}var Xi=l(x(),1);function O_({clientId:e,contentRef:t,parentLayout:o}){let r=(0,Wd.useSelect)(s=>s(S).getSettings().isDistractionFree,[]),n=ht(e);if(r||!n)return null;let i=o?.isManualPlacement&&window.__experimentalEnableGridInteractivity;return(0,Xi.jsx)(rAe,{gridClientId:e,gridElement:n,isManualGrid:i,ref:t})}var rAe=(0,Gs.forwardRef)(({gridClientId:e,gridElement:t,isManualGrid:o},r)=>{let[n,i]=(0,Gs.useState)(()=>tz(t)),[s,a]=(0,Gs.useState)(!1);return(0,Gs.useEffect)(()=>{let c=()=>i(tz(t)),u=new window.ResizeObserver(c);u.observe(t,{box:"border-box"});let d=new window.ResizeObserver(c);return d.observe(t),()=>{u.disconnect(),d.disconnect()}},[t]),(0,Gs.useEffect)(()=>{function c(){a(!0)}function u(){a(!1)}return document.addEventListener("drag",c),document.addEventListener("dragend",u),()=>{document.removeEventListener("drag",c),document.removeEventListener("dragend",u)}},[]),(0,Xi.jsx)(Ii,{className:D("block-editor-grid-visualizer",{"is-dropping-allowed":s}),clientId:e,__unstablePopoverSlot:"__unstable-block-tools-after",children:(0,Xi.jsx)("div",{ref:r,className:"block-editor-grid-visualizer__grid",style:n.style,children:o?(0,Xi.jsx)(nAe,{gridClientId:e,gridInfo:n}):Array.from({length:n.numItems},(c,u)=>(0,Xi.jsx)(nfe,{color:n.currentColor},u))})})});function nAe({gridClientId:e,gridInfo:t}){let[o,r]=(0,Gs.useState)(null),n=(0,Wd.useSelect)(s=>{let{getBlockOrder:a,getBlockStyles:c}=F(s(S)),u=a(e);return c(u)},[e]),i=(0,Gs.useMemo)(()=>{let s=[];for(let a of Object.values(n)){let{columnStart:c,rowStart:u,columnSpan:d=1,rowSpan:f=1}=a?.layout??{};!c||!u||s.push(new rl({columnStart:c,rowStart:u,columnSpan:d,rowSpan:f}))}return s},[n]);return J3(1,t.numRows).map(s=>J3(1,t.numColumns).map(a=>{let c=i.some(d=>d.contains(a,s)),u=o?.contains(a,s)??!1;return(0,Xi.jsx)(nfe,{color:t.currentColor,className:u&&"is-highlighted",children:c?(0,Xi.jsx)(iAe,{column:a,row:s,gridClientId:e,gridInfo:t,setHighlightedRect:r}):(0,Xi.jsx)(sAe,{column:a,row:s,gridClientId:e,gridInfo:t,setHighlightedRect:r})},`${s}-${a}`)}))}function nfe({color:e,children:t,className:o}){return(0,Xi.jsx)("div",{className:D("block-editor-grid-visualizer__cell",o),style:{boxShadow:`inset 0 0 0 1px color-mix(in srgb, ${e} 20%, #0000)`,color:e},children:t})}function ife(e,t,o,r,n){let{getBlockAttributes:i,getBlockRootClientId:s,canInsertBlockType:a,getBlockName:c}=(0,Wd.useSelect)(S),{updateBlockAttributes:u,moveBlocksToPosition:d,__unstableMarkNextChangeAsNotPersistent:f}=(0,Wd.useDispatch)(S),m=Dm(o,r.numColumns);return aAe({validateDrag(p){let h=c(p);if(!a(h,o))return!1;let g=i(p),b=new rl({columnStart:e,rowStart:t,columnSpan:g.style?.layout?.columnSpan,rowSpan:g.style?.layout?.rowSpan});return new rl({columnSpan:r.numColumns,rowSpan:r.numRows}).containsRect(b)},onDragEnter(p){let h=i(p);n(new rl({columnStart:e,rowStart:t,columnSpan:h.style?.layout?.columnSpan,rowSpan:h.style?.layout?.rowSpan}))},onDragLeave(){n(p=>p?.columnStart===e&&p?.rowStart===t?null:p)},onDrop(p){n(null);let h=i(p);u(p,{style:{...h.style,layout:{...h.style?.layout,columnStart:e,rowStart:t}}}),f(),d([p],s(p),o,m(e,t))}})}function iAe({column:e,row:t,gridClientId:o,gridInfo:r,setHighlightedRect:n}){return(0,Xi.jsx)("div",{className:"block-editor-grid-visualizer__drop-zone",ref:ife(e,t,o,r,n)})}function sAe({column:e,row:t,gridClientId:o,gridInfo:r,setHighlightedRect:n}){let{updateBlockAttributes:i,moveBlocksToPosition:s,__unstableMarkNextChangeAsNotPersistent:a}=(0,Wd.useDispatch)(S),c=Dm(o,r.numColumns);return(0,Xi.jsx)(Ou,{rootClientId:o,className:"block-editor-grid-visualizer__appender",ref:ife(e,t,o,r,n),style:{color:r.currentColor},onSelect:u=>{u&&(i(u.clientId,{style:{layout:{columnStart:e,rowStart:t}}}),a(),s([u.clientId],o,o,c(e,t)))}})}function aAe({validateDrag:e,onDragEnter:t,onDragLeave:o,onDrop:r}){let{getDraggedBlockClientIds:n}=(0,Wd.useSelect)(S);return(0,rfe.__experimentalUseDropZone)({onDragEnter(){let[i]=n();i&&e(i)&&t(i)},onDragLeave(){o()},onDrop(){let[i]=n();i&&e(i)&&r(i)}})}var sfe=l(P(),1),A_=l(I(),1);var vR=l(x(),1);function oz({clientId:e,bounds:t,onChange:o,parentLayout:r}){let n=ht(e),i=n?.parentElement,{isManualPlacement:s}=r;return!n||!i?null:(0,vR.jsx)(lAe,{clientId:e,bounds:t,blockElement:n,rootBlockElement:i,onChange:o,isManualGrid:s&&window.__experimentalEnableGridInteractivity})}function lAe({clientId:e,bounds:t,blockElement:o,rootBlockElement:r,onChange:n,isManualGrid:i}){let[s,a]=(0,A_.useState)(null),[c,u]=(0,A_.useState)({top:!1,bottom:!1,left:!1,right:!1});(0,A_.useEffect)(()=>{let p=new window.ResizeObserver(()=>{let h=o.getBoundingClientRect(),g=r.getBoundingClientRect(),b=h.top>g.top,k=h.bottom<g.bottom,v=h.left>g.left,y=h.right<g.right;u({top:(i||!k)&&b,bottom:k,left:(i||!y)&&v,right:y})});return p.observe(o),()=>p.disconnect()},[o,r,i]);let d={right:"left",left:"right"},f={top:"flex-end",bottom:"flex-start"},m={display:"flex",justifyContent:"center",alignItems:"center",...d[s]&&{justifyContent:d[s]},...f[s]&&{alignItems:f[s]}};return(0,vR.jsx)(Ii,{className:"block-editor-grid-item-resizer",clientId:e,__unstablePopoverSlot:"__unstable-block-tools-after",additionalStyles:m,children:(0,vR.jsx)(sfe.ResizableBox,{className:"block-editor-grid-item-resizer__box",size:{width:"100%",height:"100%"},enable:{bottom:c.bottom,bottomLeft:!1,bottomRight:!1,left:c.left,right:c.right,top:c.top,topLeft:!1,topRight:!1},bounds:t,boundsByDirection:!0,onPointerDown:({target:p,pointerId:h})=>{p.setPointerCapture(h)},onResizeStart:(p,h)=>{a(h)},onResizeStop:(p,h,g)=>{let b=parseFloat(pr(r,"column-gap")),k=parseFloat(pr(r,"row-gap")),v=ez(pr(r,"grid-template-columns"),b),y=ez(pr(r,"grid-template-rows"),k),_=new window.DOMRect(o.offsetLeft+g.offsetLeft,o.offsetTop+g.offsetTop,g.offsetWidth,g.offsetHeight),w=R_(v,_.left)+1,C=R_(y,_.top)+1,E=R_(v,_.right,"end")+1,R=R_(y,_.bottom,"end")+1;n({columnSpan:E-w+1,rowSpan:R-C+1,columnStart:i?w:void 0,rowStart:i?C:void 0})}})})}var qi=l(L(),1),gk=l(P(),1);var afe=l(M(),1),lfe=l(Y(),1);var Rr=l(x(),1);function rz({layout:e,parentLayout:t,onChange:o,gridClientId:r,blockClientId:n}){let{moveBlocksToPosition:i,__unstableMarkNextChangeAsNotPersistent:s}=(0,afe.useDispatch)(S),a=e?.columnStart??1,c=e?.rowStart??1,u=e?.columnSpan??1,d=e?.rowSpan??1,f=a+u-1,m=c+d-1,p=t?.columnCount,h=t?.rowCount,g=Dm(r,p);return(0,Rr.jsx)(pt,{group:"parent",children:(0,Rr.jsxs)(gk.ToolbarGroup,{className:"block-editor-grid-item-mover__move-button-container",children:[(0,Rr.jsx)("div",{className:"block-editor-grid-item-mover__move-horizontal-button-container is-left",children:(0,Rr.jsx)(L_,{icon:(0,qi.isRTL)()?er:Lr,label:(0,qi.__)("Move left"),description:(0,qi.__)("Move left"),isDisabled:a<=1,onClick:()=>{o({columnStart:a-1}),s(),i([n],r,r,g(a-1,c))}})}),(0,Rr.jsxs)("div",{className:"block-editor-grid-item-mover__move-vertical-button-container",children:[(0,Rr.jsx)(L_,{className:"is-up-button",icon:rf,label:(0,qi.__)("Move up"),description:(0,qi.__)("Move up"),isDisabled:c<=1,onClick:()=>{o({rowStart:c-1}),s(),i([n],r,r,g(a,c-1))}}),(0,Rr.jsx)(L_,{className:"is-down-button",icon:In,label:(0,qi.__)("Move down"),description:(0,qi.__)("Move down"),isDisabled:h&&m>=h,onClick:()=>{o({rowStart:c+1}),s(),i([n],r,r,g(a,c+1))}})]}),(0,Rr.jsx)("div",{className:"block-editor-grid-item-mover__move-horizontal-button-container is-right",children:(0,Rr.jsx)(L_,{icon:(0,qi.isRTL)()?Lr:er,label:(0,qi.__)("Move right"),description:(0,qi.__)("Move right"),isDisabled:p&&f>=p,onClick:()=>{o({columnStart:a+1}),s(),i([n],r,r,g(a+1,c))}})})]})})}function L_({className:e,icon:t,label:o,isDisabled:r,onClick:n,description:i}){let a=`block-editor-grid-item-mover-button__description-${(0,lfe.useInstanceId)(L_)}`;return(0,Rr.jsxs)(Rr.Fragment,{children:[(0,Rr.jsx)(gk.ToolbarButton,{className:D("block-editor-grid-item-mover-button",e),icon:t,label:o,"aria-describedby":a,onClick:r?null:n,disabled:r,accessibleWhenDisabled:!0}),(0,Rr.jsx)(gk.VisuallyHidden,{id:a,children:i})]})}var N_=l(M(),1),SR=l(I(),1),yR=l(Y(),1);function nz({clientId:e}){let{gridLayout:t,blockOrder:o,selectedBlockLayout:r}=(0,N_.useSelect)(m=>{let{getBlockAttributes:p,getBlockOrder:h}=m(S),g=m(S).getSelectedBlock();return{gridLayout:p(e).layout??{},blockOrder:h(e),selectedBlockLayout:g?.attributes.style?.layout}},[e]),{getBlockAttributes:n,getBlockRootClientId:i}=(0,N_.useSelect)(S),{updateBlockAttributes:s,__unstableMarkNextChangeAsNotPersistent:a}=(0,N_.useDispatch)(S),c=(0,SR.useMemo)(()=>r?new rl(r):null,[r]),u=(0,yR.usePrevious)(c),d=(0,yR.usePrevious)(t.isManualPlacement),f=(0,yR.usePrevious)(o);(0,SR.useEffect)(()=>{let m={};if(t.isManualPlacement){let p=[];for(let g of o){let{columnStart:b,rowStart:k,columnSpan:v=1,rowSpan:y=1}=n(g).style?.layout??{};!b||!k||p.push(new rl({columnStart:b,rowStart:k,columnSpan:v,rowSpan:y}))}for(let g of o){let b=n(g),{columnStart:k,rowStart:v,columnSpan:y=1,rowSpan:_=1}=b.style?.layout??{};if(k&&v)continue;let[w,C]=cAe(p,t.columnCount,y,_,u?.columnEnd,u?.rowEnd);p.push(new rl({columnStart:w,rowStart:C,columnSpan:y,rowSpan:_})),m[g]={style:{...b.style,layout:{...b.style?.layout,columnStart:w,rowStart:C}}}}let h=Math.max(...p.map(g=>g.rowEnd));(!t.rowCount||t.rowCount<h)&&(m[e]={layout:{...t,rowCount:h}});for(let g of f??[])if(!o.includes(g)){let b=i(g);if(b===null||n(b)?.layout?.type==="grid")continue;let v=n(g),{columnStart:y,rowStart:_,columnSpan:w,rowSpan:C,...E}=v.style?.layout??{};if(y||_||w||C){let R=Object.keys(E).length===0;m[g]=he(v,["style","layout"],R?void 0:E)}}}else{if(d===!0)for(let p of o){let h=n(p),{columnStart:g,rowStart:b,...k}=h.style?.layout??{};if(g||b){let v=Object.keys(k).length===0;m[p]=he(h,["style","layout"],v?void 0:k)}}t.rowCount&&(m[e]={layout:{...t,rowCount:void 0}})}Object.keys(m).length&&(a(),s(Object.keys(m),m,!0))},[e,t,f,o,u,d,a,n,i,s])}function cAe(e,t,o,r,n=1,i=1){for(let s=i;;s++)for(let a=s===i?n:1;a<=t;a++){let c=new rl({columnStart:a,rowStart:s,columnSpan:o,rowSpan:r});if(!e.some(u=>u.intersectsRect(c)))return[a,s]}}var wc=l(x(),1),uAe={};function dAe({style:e}){let t=(0,iz.useSelect)(g=>!g(S).getSettings().disableLayoutStyles),o=e?.layout??{},{selfStretch:r,flexSize:n,columnStart:i,rowStart:s,columnSpan:a,rowSpan:c}=o,u=yf()||{},{columnCount:d,minimumColumnWidth:f}=u,m=(0,cfe.useInstanceId)(uAe),p=`.wp-container-content-${m}`,h="";if(t&&(r==="fixed"&&n?h=`${p} {
				flex-basis: ${n};
				box-sizing: border-box;
			}`:r==="fill"?h=`${p} {
				flex-grow: 1;
			}`:i&&a?h=`${p} {
				grid-column: ${i} / span ${a};
			}`:i?h=`${p} {
				grid-column: ${i};
			}`:a&&(h=`${p} {
				grid-column: span ${a};
			}`),s&&c?h+=`${p} {
				grid-row: ${s} / span ${c};
			}`:s?h+=`${p} {
				grid-row: ${s};
			}`:c&&(h+=`${p} {
				grid-row: span ${c};
			}`),(a||i)&&(f||!d))){let g=parseFloat(f);isNaN(g)&&(g=12);let b=f?.replace(g,"");["px","rem","em"].includes(b)||(b="rem");let k=2;a&&i?k=a+i-1:a?k=a:k=i;let v=b==="px"?24:1.5,y=k*g+(k-1)*v,_=g*2+v-1,w=a&&a>1?"1/-1":"auto";h+=`@container (max-width: ${Math.max(y,_)}${b}) {
				${p} {
					grid-column: ${w};
					grid-row: auto;
				}
			}`}if(ks({css:h}),!!h)return{className:`wp-container-content-${m}`}}function fAe({clientId:e,style:t,setAttributes:o}){let r=yf()||{},{type:n="default",allowSizingOnChildren:i=!1,isManualPlacement:s}=r;return n!=="grid"?null:(0,wc.jsx)(mAe,{clientId:e,style:t,setAttributes:o,allowSizingOnChildren:i,isManualPlacement:s,parentLayout:r})}function mAe({clientId:e,style:t,setAttributes:o,allowSizingOnChildren:r,isManualPlacement:n,parentLayout:i}){let{rootClientId:s,isVisible:a}=(0,iz.useSelect)(f=>{let{getBlockRootClientId:m,getBlockEditingMode:p,getTemplateLock:h}=f(S),g=m(e);return h(g)||p(g)!=="default"?{rootClientId:g,isVisible:!1}:{rootClientId:g,isVisible:!0}},[e]),[c,u]=(0,ufe.useState)();if(!a)return null;function d(f){o({style:{...t,layout:{...t?.layout,...f}}})}return(0,wc.jsxs)(wc.Fragment,{children:[(0,wc.jsx)(O_,{clientId:s,contentRef:u,parentLayout:i}),r&&(0,wc.jsx)(oz,{clientId:e,bounds:c,onChange:d,parentLayout:i}),n&&window.__experimentalEnableGridInteractivity&&(0,wc.jsx)(rz,{layout:t?.layout,parentLayout:i,onChange:d,gridClientId:s,blockClientId:e})]})}var sz={useBlockProps:dAe,edit:fAe,attributeKeys:["style"],hasSupport(){return!0}};var dfe=l(P(),1),_R=l(M(),1),ffe=l(L(),1),mfe=l(I(),1);var az=l(x(),1);function pAe({clientId:e}){let{templateLock:t,isLockedByParent:o,isEditingContentOnlySection:r}=(0,_R.useSelect)(a=>{let{getContentLockingParent:c,getTemplateLock:u,getEditedContentOnlySection:d}=F(a(S));return{templateLock:u(e),isLockedByParent:!!c(e),isEditingContentOnlySection:d()===e}},[e]),{stopEditingContentOnlySection:n}=F((0,_R.useDispatch)(S)),i=!o&&t==="contentOnly",s=(0,mfe.useCallback)(()=>{n()},[n]);return window?.__experimentalContentOnlyPatternInsertion||!i&&!r?null:r&&(0,az.jsx)(pt,{group:"other",children:(0,az.jsx)(dfe.ToolbarButton,{onClick:s,children:(0,ffe.__)("Done")})})}var pfe={edit:pAe,hasSupport(){return!0}};var cz=l(Je(),1),lz=l(Z(),1),hfe="metadata";function hAe(e){return e?.attributes?.[hfe]?.type||(e.attributes={...e.attributes,[hfe]:{type:"object"}}),e}function gAe(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,lz.hasBlockSupport)(e.name,"renaming",!0)&&(i.name=n.name),n.blockVisibility!==void 0&&!e.attributes?.metadata?.blockVisibility&&(0,lz.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,cz.addFilter)("blocks.registerBlockType","core/metadata/addMetaAttribute",hAe);(0,cz.addFilter)("blocks.switchToBlockType.transformedBlock","core/metadata/addTransforms",gAe);var uz=l(L(),1),xR=l(I(),1),wR=l(P(),1),CR=l(Z(),1),bk=l(M(),1);var Zd=l(x(),1),bAe={};function kAe({name:e,clientId:t,metadata:{ignoredHookedBlocks:o=[]}={}}){let r=(0,bk.useSelect)(p=>p(CR.store).getBlockTypes(),[]),n=(0,xR.useMemo)(()=>r?.filter(({name:p,blockHooks:h})=>h&&e in h||o.includes(p)),[r,e,o]),i=(0,bk.useSelect)(p=>{let{getBlocks:h,getBlockRootClientId:g,getGlobalBlockCount:b}=p(S),k=g(t),v=n.reduce((y,_)=>{if(b(_.name)===0)return y;let w=_?.blockHooks?.[e],C;switch(w){case"before":case"after":C=h(k);break;case"first_child":case"last_child":C=h(t);break;case void 0:C=[...h(k),...h(t)];break}let E=C?.find(R=>R.name===_.name);return E?{...y,[_.name]:E.clientId}:y},{});return Object.values(v).length>0?v:bAe},[n,e,t]),{getBlockIndex:s,getBlockCount:a,getBlockRootClientId:c}=(0,bk.useSelect)(S),{insertBlock:u,removeBlock:d}=(0,bk.useDispatch)(S);if(!n.length)return null;let f=n.reduce((p,h)=>{let[g]=h.name.split("/");return p[g]||(p[g]=[]),p[g].push(h),p},{}),m=(p,h)=>{let g=s(t),b=a(t),k=c(t);switch(h){case"before":case"after":u(p,h==="after"?g+1:g,k,!1);break;case"first_child":case"last_child":u(p,h==="first_child"?0:b,t,!1);break;case void 0:u(p,g+1,k,!1);break}};return(0,Zd.jsx)(fe,{children:(0,Zd.jsxs)(wR.PanelBody,{className:"block-editor-hooks__block-hooks",title:(0,uz.__)("Plugins"),initialOpen:!0,children:[(0,Zd.jsx)("p",{className:"block-editor-hooks__block-hooks-helptext",children:(0,uz.__)("Manage the inclusion of blocks added automatically by plugins.")}),Object.keys(f).map(p=>(0,Zd.jsxs)(xR.Fragment,{children:[(0,Zd.jsx)("h3",{children:p}),f[p].map(h=>{let g=h.name in i;return(0,Zd.jsx)(wR.ToggleControl,{checked:g,label:h.title,onChange:()=>{if(!g){let b=h.blockHooks[e];m((0,CR.createBlock)(h.name),b);return}d(i[h.name],!1)}},h.title)})]},p))]})})}var gfe={edit:kAe,attributeKeys:["metadata"],hasSupport(){return!0}};var dz=l(L(),1),bfe=l(Z(),1),kk=l(P(),1),kfe=l(M(),1),vfe=l(I(),1),yfe=l(Y(),1);var $d=l(x(),1),vAe=()=>(0,yfe.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}},yAe=({name:e,metadata:t})=>{let o=(0,vfe.useContext)(di),{removeAllBlockBindings:r}=Sl(),n=vAe(),{bindableAttributes:i,hasCompatibleFields:s}=(0,kfe.useSelect)(c=>{let{__experimentalBlockBindingsSupportedAttributes:u}=c(S).getSettings(),{getAllBlockBindingsSources:d,getBlockBindingsSourceFieldsList:f}=F(c(bfe.store));return{bindableAttributes:u?.[e],hasCompatibleFields:Object.values(d()).some(m=>f(m,o)?.length>0)}},[e,o]);if(!i||i.length===0)return null;let{bindings:a}=t||{};return a===void 0&&!s?null:(0,$d.jsx)(fe,{group:"bindings",children:(0,$d.jsxs)(kk.__experimentalToolsPanel,{label:(0,dz.__)("Attributes"),resetAll:()=>{r()},dropdownMenuProps:n,className:"block-editor-bindings__panel",children:[(0,$d.jsx)(kk.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:i.map(c=>(0,$d.jsx)(Pv,{attribute:c,blockName:e,binding:a?.[c]},c))}),(0,$d.jsx)(kk.__experimentalText,{as:"div",variant:"muted",children:(0,$d.jsx)("p",{children:(0,dz.__)("Attributes connected to custom fields or other dynamic data.")})})]})})},Sfe={edit:yAe,attributeKeys:["metadata"],hasSupport(e){return!["core/post-date","core/navigation-link","core/navigation-submenu"].includes(e)}};var _fe=l(L(),1),xfe=l(P(),1),wfe=l(M(),1),M_=l(Z(),1),Cfe=l(I(),1);var vk=l(x(),1),SAe="listView";function Bfe(e){return(0,M_.hasBlockSupport)(e,SAe)}function _Ae({clientId:e,name:t}){let{isSelectionWithinCurrentSection:o}=(0,Cfe.useContext)(Ar),r=Bfe(t),{hasChildren:n,blockTitle:i,isNestedListView:s}=(0,wfe.useSelect)(c=>{let{getBlockCount:u,getBlockParents:d,getBlockName:f}=c(S),m=!1;return o&&(m=d(e,!0).find(h=>{let g=f(h);return g==="core/navigation"||(0,M_.hasBlockSupport)(g,"listView")})),{hasChildren:!!u(e),blockTitle:c(M_.store).getBlockType(t)?.title,isNestedListView:m}},[e,t,o]);return!r||s?null:(0,vk.jsx)(tm,{group:"list",children:(0,vk.jsxs)(xfe.PanelBody,{title:o?i:void 0,children:[!n&&(0,vk.jsx)("p",{className:"block-editor-block-inspector__no-blocks",children:(0,_fe.__)("No items yet.")}),(0,vk.jsx)(SS,{rootClientId:e,isExpanded:!0,description:i,showAppender:!0})]})})}var Efe={edit:_Ae,hasSupport:Bfe,attributeKeys:[],supportsPatternEditing:!0};var Tfe=l(Je(),1),Ife=l(Z(),1);function xAe(e){return e.__experimentalLabel||(0,Ife.hasBlockSupport)(e,"renaming",!0)&&(e.__experimentalLabel=(o,{context:r})=>{let{metadata:n}=o;if(r==="list-view"&&n?.name)return n.name}),e}(0,Tfe.addFilter)("blocks.registerBlockType","core/metadata/addLabelCallback",xAe);var Pfe=l(Y(),1),Rfe=l(Je(),1),Ofe=l(M(),1);var Qi=l(x(),1);function wAe(e){nz(e)}function CAe({clientId:e,layout:t}){let o=(0,Ofe.useSelect)(r=>{let{isBlockSelected:n,isDraggingBlocks:i,getTemplateLock:s,getBlockEditingMode:a}=r(S);return!(!i()&&!n(e)||s(e)||a(e)!=="default")},[e]);return(0,Qi.jsxs)(Qi.Fragment,{children:[(0,Qi.jsx)(wAe,{clientId:e}),o&&(0,Qi.jsx)(O_,{clientId:e,parentLayout:t})]})}var BAe=(0,Pfe.createHigherOrderComponent)(e=>t=>t.attributes.layout?.type!=="grid"?(0,Qi.jsx)(e,{...t},"edit"):(0,Qi.jsxs)(Qi.Fragment,{children:[(0,Qi.jsx)(CAe,{clientId:t.clientId,layout:t.attributes.layout}),(0,Qi.jsx)(e,{...t},"edit")]}),"addGridVisualizerToBlockEdit");(0,Rfe.addFilter)("editor.BlockEdit","core/editor/grid-visualizer",BAe);var fz=l(Z(),1),Lfe=l(P(),1),Nfe=l(M(),1);var Mfe=l(I(),1),Dfe=l(L(),1);function Afe(e){let t=[],o=[];return Object.entries(e).forEach(([r,n])=>{if(!n.__experimentalAutoInspectorControl)return;let i=EAe(r,n);i&&(t.push(i),o.push(r))}),{fields:t,form:{fields:o}}}function EAe(e,t){let o=t.type;if(!["string","number","integer","boolean"].includes(o))return null;let 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 BR=l(x(),1);function TAe(e){return e?Object.values(e).some(t=>t?.__experimentalAutoInspectorControl):!1}function IAe({name:e,clientId:t,setAttributes:o}){let r=To(),n=(0,Nfe.useSelect)(c=>c(S).getBlockAttributes(t),[t]),i=(0,fz.getBlockType)(e),{fields:s,form:a}=(0,Mfe.useMemo)(()=>i?.attributes?Afe(i.attributes):{fields:[],form:{fields:[]}},[i?.attributes]);return r!=="default"||!s||s.length===0?null:(0,BR.jsx)(fe,{children:(0,BR.jsx)(Lfe.PanelBody,{title:(0,Dfe.__)("Settings"),children:(0,BR.jsx)(x_,{data:n,fields:s,form:a,onChange:o})})})}var Vfe={edit:IAe,attributeKeys:[],hasSupport(e){let t=(0,fz.getBlockType)(e);return TAe(t?.attributes)}};function ER(e){let t=e.style?.border||{};return{className:h4(e)||void 0,style:js({border:t})}}function mz(e){let{colors:t}=id(),o=ER(e),{borderColor:r}=e;if(r){let n=jm({colors:t,namedColor:r});o.style.borderColor=n.color}return o}function pz(e){let t=e.style?.shadow||"";return{style:js({shadow:t})}}var hz=l(I(),1);function TR(e){let{backgroundColor:t,textColor:o,gradient:r,style:n}=e,i=ui("background-color",t),s=ui("color",o),a=Wp(r),c=a||n?.color?.gradient,u=D(s,a,{[i]:!c&&!!i,"has-text-color":o||n?.color?.text,"has-background":t||n?.color?.background||r||n?.color?.gradient,"has-link-color":n?.elements?.link?.color}),d=n?.color||{},f=js({color:d});return{className:u||void 0,style:f}}function gz(e){let{backgroundColor:t,textColor:o,gradient:r}=e,[n,i,s,a,c,u]=pe("color.palette.custom","color.palette.theme","color.palette.default","color.gradients.custom","color.gradients.theme","color.gradients.default"),d=(0,hz.useMemo)(()=>[...n||[],...i||[],...s||[]],[n,i,s]),f=(0,hz.useMemo)(()=>[...a||[],...c||[],...u||[]],[a,c,u]),m=TR(e);if(t){let p=Ys(d,t);m.style.backgroundColor=p.color}if(r&&(m.style.background=yw(f,r)),o){let p=Ys(d,o);m.style.color=p.color}return m}function bz(e){let{style:t}=e,o=t?.spacing||{};return{style:js({spacing:o})}}var Ffe=l(P(),1);var{kebabCase:PAe}=F(Ffe.privateApis);function kz(e,t){let o=e?.style?.typography||{};o={...o,fontSize:Yl({size:e?.style?.typography?.fontSize},t)};let r=js({typography:o}),n=e?.fontFamily?`has-${PAe(e.fontFamily)}-font-family`:"",i=e?.style?.typography?.textAlign?`has-text-align-${e?.style?.typography?.textAlign}`:"";return{className:D(n,i,$c(e?.fontSize)),style:r}}var IR=l(I(),1);function vz(e){let[t,o]=(0,IR.useState)(e);return(0,IR.useEffect)(()=>{e&&o(e)},[e]),t}Fae([nP,lR,Y4,O3,pR,$3,uR,R5,ofe,pfe,gfe,Sfe,sz,cle,ude,Efe,Vfe].filter(Boolean));zae([nP,lR,qse,pR,_4,Hde,$3,A3,N3,uR,g4,R5,Pq,sz]);jae([nP,lR,Y4,mle,O3,g4,uR,_4,pR,A3,N3]);var zfe={button:"wp-element-button",caption:"wp-element-caption"},RAe=e=>zfe[e]?zfe[e]:"";var jfe=()=>"";var yk=l(I(),1),D_=l(Z(),1),Sz=l(zo(),1);var Gfe=l(x(),1);function _z(e,t,o){if(e==null||e===!1)return;if(Array.isArray(e))return yz(e,t,o);switch(typeof e){case"string":case"number":return}let{type:r,props:n}=e;switch(r){case yk.StrictMode:case yk.Fragment:return yz(n.children,t,o);case yk.RawHTML:return;case Gy.Content:return Hfe(t,o);case GS:t.push(n.value);return}switch(typeof r){case"string":return typeof n.children<"u"?yz(n.children,t,o):void 0;case"function":let i=r.prototype&&typeof r.prototype.render=="function"?new r(n).render():r(n);return _z(i,t,o)}}function yz(e,...t){e=Array.isArray(e)?e:[e];for(let o=0;o<e.length;o++)_z(e[o],...t)}function Hfe(e,t){for(let o=0;o<t.length;o++){let{name:r,attributes:n,innerBlocks:i}=t[o],s=(0,D_.getSaveElement)(r,n,(0,Gfe.jsx)(Gy.Content,{}));_z(s,e,i)}}function Ufe(e=[]){D_.__unstableGetBlockProps.skipFilters=!0;let t=[];return Hfe(t,e),D_.__unstableGetBlockProps.skipFilters=!1,t.map(o=>o instanceof Sz.RichTextData?o:Sz.RichTextData.fromHTMLString(o))}var Wfe=l(P(),1);var xz=l(x(),1);function Zfe({clientId:e,resizableBoxProps:t,...o}){return(0,xz.jsx)(Ii,{clientId:e,__unstablePopoverSlot:"block-toolbar",...o,children:(0,xz.jsx)(Wfe.ResizableBox,{...t})})}var $fe=l(I(),1),RR=l(M(),1),cp=l(P(),1),PR=l(L(),1);var lp=l(x(),1);function Yfe({rules:e}){let{clientIds:t,selectPrevious:o,message:r}=(0,RR.useSelect)(c=>F(c(S)).getRemovalPromptData()),{clearBlockRemovalPrompt:n,setBlockRemovalRules:i,privateRemoveBlocks:s}=F((0,RR.useDispatch)(S));if((0,$fe.useEffect)(()=>(i(e),()=>{i()}),[e,i]),!r)return;let a=()=>{s(t,o,!0),n()};return(0,lp.jsxs)(cp.Modal,{title:(0,PR.__)("Be careful!"),onRequestClose:n,size:"medium",children:[(0,lp.jsx)("p",{children:r}),(0,lp.jsxs)(cp.__experimentalHStack,{justify:"right",children:[(0,lp.jsx)(cp.Button,{variant:"tertiary",onClick:n,__next40pxDefaultSize:!0,children:(0,PR.__)("Cancel")}),(0,lp.jsx)(cp.Button,{variant:"primary",onClick:a,__next40pxDefaultSize:!0,children:(0,PR.__)("Delete")})]})]})}var wz=l(I(),1);var Sk=l(P(),1),Xfe=l(I(),1),Bn=l(L(),1),OR=l(x(),1),Kfe=[{value:"fill",label:(0,Bn._x)("Fill","Scale option for dimensions control"),help:(0,Bn.__)("Fill the space by stretching the content.")},{value:"contain",label:(0,Bn._x)("Contain","Scale option for dimensions control"),help:(0,Bn.__)("Fit the content to the space without clipping.")},{value:"cover",label:(0,Bn._x)("Cover","Scale option for dimensions control"),help:(0,Bn.__)("Fill the space by clipping what doesn't fit.")},{value:"none",label:(0,Bn._x)("None","Scale option for dimensions control"),help:(0,Bn.__)("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,Bn._x)("Scale down","Scale option for dimensions control"),help:(0,Bn.__)("Scale down the content to fit the space if it is too big. Content that is too small will have additional padding.")}];function qfe({panelId:e,value:t,onChange:o,options:r=Kfe,defaultValue:n=Kfe[0].value,isShownByDefault:i=!0}){let s=t??"fill",a=(0,Xfe.useMemo)(()=>r.reduce((c,u)=>(c[u.value]=u.help,c),{}),[r]);return(0,OR.jsx)(Sk.__experimentalToolsPanelItem,{label:(0,Bn.__)("Scale"),isShownByDefault:i,hasValue:()=>s!==n,onDeselect:()=>o(n),panelId:e,children:(0,OR.jsx)(Sk.__experimentalToggleGroupControl,{label:(0,Bn.__)("Scale"),isBlock:!0,help:a[s],value:s,onChange:o,size:"__unstable-large",children:r.map(c=>(0,OR.jsx)(Sk.__experimentalToggleGroupControlOption,{...c},c.value))})})}var _k=l(P(),1),up=l(L(),1),Cc=l(x(),1);function Qfe({panelId:e,value:t={},onChange:o=()=>{},units:r,isShownByDefault:n=!0}){let i=t.width==="auto"?"":t.width??"",s=t.height==="auto"?"":t.height??"",a=c=>u=>{let d={...t};u?d[c]=u:delete d[c],o(d)};return(0,Cc.jsxs)(Cc.Fragment,{children:[(0,Cc.jsx)(_k.__experimentalToolsPanelItem,{style:{gridColumn:"span 1"},label:(0,up.__)("Width"),isShownByDefault:n,hasValue:()=>i!=="",onDeselect:a("width"),panelId:e,children:(0,Cc.jsx)(_k.__experimentalUnitControl,{label:(0,up.__)("Width"),placeholder:(0,up.__)("Auto"),labelPosition:"top",units:r,min:0,value:i,onChange:a("width"),size:"__unstable-large"})}),(0,Cc.jsx)(_k.__experimentalToolsPanelItem,{style:{gridColumn:"span 1"},label:(0,up.__)("Height"),isShownByDefault:n,hasValue:()=>s!=="",onDeselect:a("height"),panelId:e,children:(0,Cc.jsx)(_k.__experimentalUnitControl,{label:(0,up.__)("Height"),placeholder:(0,up.__)("Auto"),labelPosition:"top",units:r,min:0,value:s,onChange:a("height"),size:"__unstable-large"})})]})}var Yd=l(x(),1);function OAe({panelId:e,value:t={},onChange:o=()=>{},aspectRatioOptions:r,defaultAspectRatio:n="auto",scaleOptions:i,defaultScale:s="fill",unitsOptions:a,tools:c=["aspectRatio","widthHeight","scale"]}){let u=t.width===void 0||t.width==="auto"?null:t.width,d=t.height===void 0||t.height==="auto"?null:t.height,f=t.aspectRatio===void 0||t.aspectRatio==="auto"?null:t.aspectRatio,m=t.scale===void 0||t.scale==="fill"?null:t.scale,[p,h]=(0,wz.useState)(m),[g,b]=(0,wz.useState)(f),k=u&&d?"custom":g,v=f||u&&d;return(0,Yd.jsxs)(Yd.Fragment,{children:[c.includes("aspectRatio")&&(0,Yd.jsx)(v2,{panelId:e,options:r,defaultValue:n,value:k,onChange:y=>{let _={...t};y=y==="auto"?null:y,b(y),y?_.aspectRatio=y:delete _.aspectRatio,y?p?_.scale=p:(_.scale=s,h(s)):delete _.scale,y!=="custom"&&u&&d&&delete _.height,o(_)}}),c.includes("widthHeight")&&(0,Yd.jsx)(Qfe,{panelId:e,units:a,value:{width:u,height:d},onChange:({width:y,height:_})=>{let w={...t};y=y==="auto"?null:y,_=_==="auto"?null:_,y?w.width=y:delete w.width,_?w.height=_:delete w.height,y&&_?delete w.aspectRatio:g&&(w.aspectRatio=g),!g&&!!y!=!!_?delete w.scale:p?w.scale=p:(w.scale=s,h(s)),o(w)}}),c.includes("scale")&&v&&(0,Yd.jsx)(qfe,{panelId:e,options:i,defaultValue:s,value:p,onChange:y=>{let _={...t};y=y==="fill"?null:y,h(y),y?_.scale=y:delete _.scale,o(_)}})]})}var Jfe=OAe;var AR=l(P(),1),Bc=l(L(),1),Cz=l(x(),1),eme=[{label:(0,Bc._x)("Thumbnail","Image size option for resolution control"),value:"thumbnail"},{label:(0,Bc._x)("Medium","Image size option for resolution control"),value:"medium"},{label:(0,Bc._x)("Large","Image size option for resolution control"),value:"large"},{label:(0,Bc._x)("Full Size","Image size option for resolution control"),value:"full"}];function tme({panelId:e,value:t,onChange:o,options:r=eme,defaultValue:n=eme[0].value,isShownByDefault:i=!0,resetAllFilter:s}){let a=t??n;return(0,Cz.jsx)(AR.__experimentalToolsPanelItem,{hasValue:()=>a!==n,label:(0,Bc.__)("Resolution"),onDeselect:()=>o(n),isShownByDefault:i,panelId:e,resetAllFilter:s,children:(0,Cz.jsx)(AR.SelectControl,{label:(0,Bc.__)("Resolution"),value:a,options:r,onChange:o,help:(0,Bc.__)("Select the size of the source image."),size:"__unstable-large"})})}var dp=l(L(),1),xk=l(P(),1),rme=l(M(),1);var Hs=l(L(),1),ome={a:(0,Hs.__)("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,Hs.__)("The <article> element should represent a self-contained, syndicatable portion of the document."),aside:(0,Hs.__)("The <aside> element should represent a portion of a document whose content is only indirectly related to the document's main content."),button:(0,Hs.__)("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,Hs.__)("The <div> element should only be used if the block is a design element with no semantic meaning."),footer:(0,Hs.__)("The <footer> element should represent a footer for its nearest sectioning element (e.g.: <section>, <article>, <main> etc.)."),header:(0,Hs.__)("The <header> element should represent introductory content, typically a group of introductory or navigational aids."),main:(0,Hs.__)("The <main> element should be used for the primary content of your document only."),nav:(0,Hs.__)("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,Hs.__)("The <section> element should represent a standalone portion of the document that can't be better represented by another element.")};var V_=l(x(),1);function nme({tagName:e,onChange:t,clientId:o,options:r=[{label:(0,dp.__)("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,rme.useSelect)(a=>{if(!n)return!1;let{getClientIdsWithDescendants:c,getBlockAttributes:u}=a(S);return c().some(d=>d===o?!1:u(d)?.tagName==="main")},[o,n]),s=r.map(a=>a.value==="main"&&i&&e!=="main"?{...a,disabled:!0,label:(0,dp.sprintf)((0,dp.__)("%s (Already in use)"),a.label)}:a);return(0,V_.jsxs)(xk.__experimentalVStack,{spacing:2,className:"block-editor-html-element-control",children:[(0,V_.jsx)(xk.SelectControl,{__next40pxDefaultSize:!0,label:(0,dp.__)("HTML element"),options:s,value:e,onChange:t,help:ome[e]}),e==="main"&&i&&(0,V_.jsx)(xk.Notice,{status:"warning",isDismissible:!1,children:(0,dp.__)("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 Ji=l(P(),1),wk=l(I(),1),LR=l(L(),1);var En=l(P(),1);var ii=l(x(),1),{Badge:AAe}=F(En.privateApis);function ime({title:e,url:t,image:o,badges:r}){return(0,ii.jsxs)(En.__experimentalHStack,{justify:"space-between",alignment:"top",children:[(0,ii.jsx)(En.FlexItem,{className:"link-preview-button__content",children:(0,ii.jsxs)(En.__experimentalHStack,{alignment:"top",children:[o&&(0,ii.jsx)(En.FlexItem,{className:"link-preview-button__image-container",children:(0,ii.jsx)("img",{className:"link-preview-button__image",src:o,alt:""})}),(0,ii.jsxs)(En.__experimentalVStack,{className:"link-preview-button__details",alignment:"topLeft",children:[(0,ii.jsx)(En.__experimentalTruncate,{numberOfLines:1,className:"link-preview-button__title",children:e}),t&&(0,ii.jsx)(En.__experimentalTruncate,{numberOfLines:1,className:"link-preview-button__hint",children:t}),r&&r.length>0&&(0,ii.jsx)(En.__experimentalHStack,{className:"link-preview-button__badges",alignment:"left",children:r.map(n=>(0,ii.jsx)(AAe,{intent:n.intent,children:n.label},`${n.label}|${n.intent}`))})]})]})}),(0,ii.jsx)(Ee,{icon:In,className:"link-preview-button__icon"})]})}var si=l(x(),1);function Bz({preview:e,onSelect:t,suggestionsQuery:o,label:r,help:n}){let[i,s]=(0,wk.useState)(!1),a=(0,wk.useId)(),c=`link-picker-title-${a}`,u=`link-picker-description-${a}`,d=(0,wk.useRef)(null),{baseControlProps:f,controlProps:m}=(0,Ji.useBaseControlProps)({help:n}),p=h=>{if(s(!1),h){let g={url:h.url,kind:h.kind,type:h.type,id:h.id,title:h.title};t(g)}};return(0,si.jsxs)(Ji.BaseControl,{...f,children:[(0,si.jsx)(Ji.BaseControl.VisualLabel,{children:r}),(0,si.jsxs)(Ji.Button,{ref:d,onClick:()=>s(!i),"aria-haspopup":"dialog","aria-expanded":i,"aria-describedby":m["aria-describedby"],variant:"secondary",__next40pxDefaultSize:!0,className:"link-preview-button",children:[r&&(0,si.jsxs)(Ji.VisuallyHidden,{children:[r,":"]}),(0,si.jsx)(ime,{title:e.title||(0,LR.__)("Add link"),url:e.url,image:e.image,badges:e.badges})]}),i&&(0,si.jsx)(Ji.Popover,{anchor:d.current,onClose:()=>s(!1),placement:"left-start",offset:36,shift:!0,children:(0,si.jsxs)("div",{role:"dialog","aria-labelledby":c,"aria-describedby":u,children:[(0,si.jsxs)(Ji.VisuallyHidden,{children:[(0,si.jsx)("h2",{id:c,children:(0,LR.__)("Select a link")}),(0,si.jsx)("p",{id:u,children:(0,LR.__)("Search for and add a link to the navigation item.")})]}),(0,si.jsx)(dd,{value:null,onChange:p,suggestionsQuery:o,showInitialSuggestions:!0,forceIsEditingLink:!0,settings:[]})]})})]})}var Ez={};Yz(Ez,{...f4,ExperimentalBlockCanvas:_V,ExperimentalBlockEditorProvider:Sh,getDuotoneFilter:hR,getRichTextValues:Ufe,PrivateQuickInserter:kB,extractWords:ww,getNormalizedSearchTerms:xv,normalizeString:_v,PrivateListView:SS,ResizableBoxPopover:Zfe,useHasBlockToolbar:FE,cleanEmptyObject:Se,BlockQuickNavigation:q2,LayoutStyle:IG,BlockManager:sP,BlockRemovalWarningModal:Yfe,useLayoutClasses:kR,useLayoutStyles:Q3,DimensionsTool:Jfe,ResolutionTool:tme,TabbedSidebar:pB,TextAlignmentControl:p2,usesContextKey:FF,useFlashEditableBlocks:LC,HTMLElementControl:nme,useZoomOut:Ry,globalStylesDataKey:Ks,globalStylesLinksDataKey:J_,selectBlockPatternsKey:Rc,requiresWrapperOnCopy:sD,PrivateRichText:HS,PrivateInserterLibrary:I4,reusableBlocksSelectKey:e0,PrivateBlockPopover:Yf,PrivatePublishDateTimePicker:D4,useSpacingSizes:qI,useBlockDisplayTitle:rr,__unstableBlockStyleVariationOverridesWithConfig:cV,setBackgroundStyleDefaults:G2,sectionRootClientIdKey:Oc,CommentIconSlotFill:dE,CommentIconToolbarSlotFill:OE,mediaEditKey:t0,getMediaSelectKey:o0,essentialFormatKey:r0,deviceTypeKey:_p,isIsolatedEditorKey:Sp,useBlockElement:ht,useBlockElementRef:wf,LinkPicker:Bz,useRemoteUrlData:yI});return mme(LAe);})();
/*! Bundled license information:

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

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