From 17f95f5b8b03bc1036964fd00a26db3b67788277 Mon Sep 17 00:00:00 2001 From: mmtr <1233880+mmtr@users.noreply.github.com> Date: Thu, 20 Feb 2025 15:55:52 +0100 Subject: [PATCH] Block editor: Remove hotfix for Gutenberg v19.0, v20.0 and v20.1 --- .../changelog/remove-block-editor-hotfix | 4 + .../wp-block-editor-19.9.0-hotfix.min.js | 214 ----------------- .../wp-block-editor-20.0.0-hotfix.min.js | 211 ----------------- .../wp-block-editor-20.1.0-hotfix.min.js | 224 ------------------ .../wpcom-hotfixes/wpcom-hotfixes.php | 36 --- 5 files changed, 4 insertions(+), 685 deletions(-) create mode 100644 projects/packages/jetpack-mu-wpcom/changelog/remove-block-editor-hotfix delete mode 100644 projects/packages/jetpack-mu-wpcom/src/features/wpcom-hotfixes/wp-block-editor-19.9.0-hotfix.min.js delete mode 100644 projects/packages/jetpack-mu-wpcom/src/features/wpcom-hotfixes/wp-block-editor-20.0.0-hotfix.min.js delete mode 100644 projects/packages/jetpack-mu-wpcom/src/features/wpcom-hotfixes/wp-block-editor-20.1.0-hotfix.min.js diff --git a/projects/packages/jetpack-mu-wpcom/changelog/remove-block-editor-hotfix b/projects/packages/jetpack-mu-wpcom/changelog/remove-block-editor-hotfix new file mode 100644 index 00000000000..edf9f3b3c3b --- /dev/null +++ b/projects/packages/jetpack-mu-wpcom/changelog/remove-block-editor-hotfix @@ -0,0 +1,4 @@ +Significance: minor +Type: removed + +Block editor: Remove hotfix for Gutenberg v19.0, v20.0 and v20.1 diff --git a/projects/packages/jetpack-mu-wpcom/src/features/wpcom-hotfixes/wp-block-editor-19.9.0-hotfix.min.js b/projects/packages/jetpack-mu-wpcom/src/features/wpcom-hotfixes/wp-block-editor-19.9.0-hotfix.min.js deleted file mode 100644 index 9048e7c9d48..00000000000 --- a/projects/packages/jetpack-mu-wpcom/src/features/wpcom-hotfixes/wp-block-editor-19.9.0-hotfix.min.js +++ /dev/null @@ -1,214 +0,0 @@ -(()=>{var e={4306:function(e,t){var n,o;n=function(e,t){"use strict";var n,o,r="function"==typeof Map?new Map:(n=[],o=[],{has:function(e){return n.indexOf(e)>-1},get:function(e){return o[n.indexOf(e)]},set:function(e,t){-1===n.indexOf(e)&&(n.push(e),o.push(t))},delete:function(e){var t=n.indexOf(e);t>-1&&(n.splice(t,1),o.splice(t,1))}}),i=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){i=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}function s(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!r.has(e)){var t=null,n=null,o=null,s=function(){e.clientWidth!==n&&d()},l=function(t){window.removeEventListener("resize",s,!1),e.removeEventListener("input",d,!1),e.removeEventListener("keyup",d,!1),e.removeEventListener("autosize:destroy",l,!1),e.removeEventListener("autosize:update",d,!1),Object.keys(t).forEach((function(n){e.style[n]=t[n]})),r.delete(e)}.bind(e,{height:e.style.height,resize:e.style.resize,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",l,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",d,!1),window.addEventListener("resize",s,!1),e.addEventListener("input",d,!1),e.addEventListener("autosize:update",d,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",r.set(e,{destroy:l,update:d}),"vertical"===(a=window.getComputedStyle(e,null)).resize?e.style.resize="none":"both"===a.resize&&(e.style.resize="horizontal"),t="content-box"===a.boxSizing?-(parseFloat(a.paddingTop)+parseFloat(a.paddingBottom)):parseFloat(a.borderTopWidth)+parseFloat(a.borderBottomWidth),isNaN(t)&&(t=0),d()}var a;function c(t){var n=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=n,e.style.overflowY=t}function u(){if(0!==e.scrollHeight){var o=function(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return t}(e),r=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+t+"px",n=e.clientWidth,o.forEach((function(e){e.node.scrollTop=e.scrollTop})),r&&(document.documentElement.scrollTop=r)}}function d(){u();var t=Math.round(parseFloat(e.style.height)),n=window.getComputedStyle(e,null),r="content-box"===n.boxSizing?Math.round(parseFloat(n.height)):e.offsetHeight;if(r{e.exports=function(e,t,n){return((n=window.getComputedStyle)?n(e):e.currentStyle)[t.replace(/-(\w)/gi,(function(e,t){return t.toUpperCase()}))]}},5417:(e,t)=>{"use strict";function n(){}function o(e,t,n,o,r){for(var i=0,s=t.length,l=0,a=0;ie.length?n:e})),c.value=e.join(d)}else c.value=e.join(n.slice(l,l+c.count));l+=c.count,c.added||(a+=c.count)}}var p=t[s-1];return s>1&&"string"==typeof p.value&&(p.added||p.removed)&&e.equals("",p.value)&&(t[s-2].value+=p.value,t.pop()),t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,n.prototype={diff:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.callback;"function"==typeof n&&(r=n,n={}),this.options=n;var i=this;function s(e){return r?(setTimeout((function(){r(void 0,e)}),0),!0):e}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e));var l=(t=this.removeEmpty(this.tokenize(t))).length,a=e.length,c=1,u=l+a,d=[{newPos:-1,components:[]}],p=this.extractCommon(d[0],t,e,0);if(d[0].newPos+1>=l&&p+1>=a)return s([{value:this.join(t),count:t.length}]);function h(){for(var n=-1*c;n<=c;n+=2){var r=void 0,u=d[n-1],p=d[n+1],h=(p?p.newPos:0)-n;u&&(d[n-1]=void 0);var g=u&&u.newPos+1=l&&h+1>=a)return s(o(i,r.components,t,e,i.useLongestToken));d[n]=r}else d[n]=void 0}var f;c++}if(r)!function e(){setTimeout((function(){if(c>u)return r();h()||e()}),0)}();else for(;c<=u;){var g=h();if(g)return g}},pushComponent:function(e,t,n){var o=e[e.length-1];o&&o.added===t&&o.removed===n?e[e.length-1]={count:o.count+1,added:t,removed:n}:e.push({count:1,added:t,removed:n})},extractCommon:function(e,t,n,o){for(var r=t.length,i=n.length,s=e.newPos,l=s-o,a=0;s+1{"use strict";var o;t.JJ=function(e,t,n){return r.diff(e,t,n)};var r=new(((o=n(5417))&&o.__esModule?o:{default:o}).default)},7734:e=>{"use strict";e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var o,r,i;if(Array.isArray(t)){if((o=t.length)!=n.length)return!1;for(r=o;0!=r--;)if(!e(t[r],n[r]))return!1;return!0}if(t instanceof Map&&n instanceof Map){if(t.size!==n.size)return!1;for(r of t.entries())if(!n.has(r[0]))return!1;for(r of t.entries())if(!e(r[1],n.get(r[0])))return!1;return!0}if(t instanceof Set&&n instanceof Set){if(t.size!==n.size)return!1;for(r of t.entries())if(!n.has(r[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(n)){if((o=t.length)!=n.length)return!1;for(r=o;0!=r--;)if(t[r]!==n[r])return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((o=(i=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(r=o;0!=r--;)if(!Object.prototype.hasOwnProperty.call(n,i[r]))return!1;for(r=o;0!=r--;){var s=i[r];if(!e(t[s],n[s]))return!1}return!0}return t!=t&&n!=n}},5215:e=>{"use strict";e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var o,r,i;if(Array.isArray(t)){if((o=t.length)!=n.length)return!1;for(r=o;0!=r--;)if(!e(t[r],n[r]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((o=(i=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(r=o;0!=r--;)if(!Object.prototype.hasOwnProperty.call(n,i[r]))return!1;for(r=o;0!=r--;){var s=i[r];if(!e(t[s],n[s]))return!1}return!0}return t!=t&&n!=n}},461:(e,t,n)=>{var o=n(6109);e.exports=function(e){var t=o(e,"line-height"),n=parseFloat(t,10);if(t===n+""){var r=e.style.lineHeight;e.style.lineHeight=t+"em",t=o(e,"line-height"),n=parseFloat(t,10),r?e.style.lineHeight=r:delete e.style.lineHeight}if(-1!==t.indexOf("pt")?(n*=4,n/=3):-1!==t.indexOf("mm")?(n*=96,n/=25.4):-1!==t.indexOf("cm")?(n*=96,n/=2.54):-1!==t.indexOf("in")?n*=96:-1!==t.indexOf("pc")&&(n*=16),n=Math.round(n),"normal"===t){var i=e.nodeName,s=document.createElement(i);s.innerHTML=" ","TEXTAREA"===i.toUpperCase()&&s.setAttribute("rows","1");var l=o(e,"font-size");s.style.fontSize=l,s.style.padding="0px",s.style.border="0px";var a=document.body;a.appendChild(s),n=s.offsetHeight,a.removeChild(s)}return n}},7520:(e,t,n)=>{e.exports=n(7191)},8202:e=>{"use strict";var t=!("undefined"==typeof window||!window.document||!window.document.createElement),n={canUseDOM:t,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:t&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:t&&!!window.screen,isInWorker:!t};e.exports=n},2213:e=>{var t,n,o,r,i,s,l,a,c,u,d,p,h,g,m,f=!1;function b(){if(!f){f=!0;var e=navigator.userAgent,b=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e),k=/(Mac OS X)|(Windows)|(Linux)/.exec(e);if(p=/\b(iPhone|iP[ao]d)/.exec(e),h=/\b(iP[ao]d)/.exec(e),u=/Android/i.exec(e),g=/FBAN\/\w+;/i.exec(e),m=/Mobile/i.exec(e),d=!!/Win64/.exec(e),b){(t=b[1]?parseFloat(b[1]):b[5]?parseFloat(b[5]):NaN)&&document&&document.documentMode&&(t=document.documentMode);var v=/(?:Trident\/(\d+.\d+))/.exec(e);s=v?parseFloat(v[1])+4:t,n=b[2]?parseFloat(b[2]):NaN,o=b[3]?parseFloat(b[3]):NaN,(r=b[4]?parseFloat(b[4]):NaN)?(b=/(?:Chrome\/(\d+\.\d+))/.exec(e),i=b&&b[1]?parseFloat(b[1]):NaN):i=NaN}else t=n=o=i=r=NaN;if(k){if(k[1]){var _=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);l=!_||parseFloat(_[1].replace("_","."))}else l=!1;a=!!k[2],c=!!k[3]}else l=a=c=!1}}var k={ie:function(){return b()||t},ieCompatibilityMode:function(){return b()||s>t},ie64:function(){return k.ie()&&d},firefox:function(){return b()||n},opera:function(){return b()||o},webkit:function(){return b()||r},safari:function(){return k.webkit()},chrome:function(){return b()||i},windows:function(){return b()||a},osx:function(){return b()||l},linux:function(){return b()||c},iphone:function(){return b()||p},mobile:function(){return b()||p||h||u||m},nativeApp:function(){return b()||g},android:function(){return b()||u},ipad:function(){return b()||h}};e.exports=k},1087:(e,t,n)=>{"use strict";var o,r=n(8202);r.canUseDOM&&(o=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature("","")),e.exports=function(e,t){if(!r.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,i=n in document;if(!i){var s=document.createElement("div");s.setAttribute(n,"return;"),i="function"==typeof s[n]}return!i&&o&&"wheel"===e&&(i=document.implementation.hasFeature("Events.wheel","3.0")),i}},7191:(e,t,n)=>{"use strict";var o=n(2213),r=n(1087);function i(e){var t=0,n=0,o=0,r=0;return"detail"in e&&(n=e.detail),"wheelDelta"in e&&(n=-e.wheelDelta/120),"wheelDeltaY"in e&&(n=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n,n=0),o=10*t,r=10*n,"deltaY"in e&&(r=e.deltaY),"deltaX"in e&&(o=e.deltaX),(o||r)&&e.deltaMode&&(1==e.deltaMode?(o*=40,r*=40):(o*=800,r*=800)),o&&!t&&(t=o<1?-1:1),r&&!n&&(n=r<1?-1:1),{spinX:t,spinY:n,pixelX:o,pixelY:r}}i.getEventType=function(){return o.firefox()?"DOMMouseScroll":r("wheel")?"wheel":"mousewheel"},e.exports=i},2775:e=>{var t=String,n=function(){return{isColorSupported:!1,reset:t,bold:t,dim:t,italic:t,underline:t,inverse:t,hidden:t,strikethrough:t,black:t,red:t,green:t,yellow:t,blue:t,magenta:t,cyan:t,white:t,gray:t,bgBlack:t,bgRed:t,bgGreen:t,bgYellow:t,bgBlue:t,bgMagenta:t,bgCyan:t,bgWhite:t,blackBright:t,redBright:t,greenBright:t,yellowBright:t,blueBright:t,magentaBright:t,cyanBright:t,whiteBright:t,bgBlackBright:t,bgRedBright:t,bgGreenBright:t,bgYellowBright:t,bgBlueBright:t,bgMagentaBright:t,bgCyanBright:t,bgWhiteBright:t}};e.exports=n(),e.exports.createColors=n},1443:e=>{function t(e,t){return t.some((t=>t instanceof RegExp?t.test(e):e.includes(t)))}e.exports=function(e){const n=e.prefix,o=/\s+$/.test(n)?n:`${n} `,r=e.ignoreFiles?[].concat(e.ignoreFiles):[],i=e.includeFiles?[].concat(e.includeFiles):[];return function(s){r.length&&s.source.input.file&&t(s.source.input.file,r)||i.length&&s.source.input.file&&!t(s.source.input.file,i)||s.walkRules((t=>{t.parent&&["keyframes","-webkit-keyframes","-moz-keyframes","-o-keyframes","-ms-keyframes"].includes(t.parent.name)||(t.selectors=t.selectors.map((r=>e.exclude&&function(e,t){return t.some((t=>t instanceof RegExp?t.test(e):e===t))}(r,e.exclude)?r:e.transform?e.transform(n,r,o+r,s.source.input.file,t):o+r)))}))}}},1326:(e,t,n)=>{"use strict";let o=n(683);class r extends o{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}}e.exports=r,r.default=r,o.registerAtRule(r)},6589:(e,t,n)=>{"use strict";let o=n(7490);class r extends o{constructor(e){super(e),this.type="comment"}}e.exports=r,r.default=r},683:(e,t,n)=>{"use strict";let o,r,i,s,{isClean:l,my:a}=n(1381),c=n(1516),u=n(6589),d=n(7490);function p(e){return e.map((e=>(e.nodes&&(e.nodes=p(e.nodes)),delete e.source,e)))}function h(e){if(e[l]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)h(t)}class g extends d{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t,n,o=this.getIterator();for(;this.indexes[o]"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...n)=>e[t](...n.map((e=>"function"==typeof e?(t,n)=>e(t.toProxy(),n):e))):"every"===t||"some"===t?n=>e[t](((e,...t)=>n(e.toProxy(),...t))):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map((e=>e.toProxy())):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,n)=>(e[t]===n||(e[t]=n,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let n,o=this.index(e),r=this.normalize(t,this.proxyOf.nodes[o]).reverse();o=this.index(e);for(let e of r)this.proxyOf.nodes.splice(o+1,0,e);for(let e in this.indexes)n=this.indexes[e],o(e[a]||g.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[l]&&h(e),void 0===e.raws.before&&t&&void 0!==t.raws.before&&(e.raws.before=t.raws.before.replace(/\S/g,"")),e.parent=this.proxyOf,e)))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let n in this.indexes)t=this.indexes[n],t>=e&&(this.indexes[n]=t-1);return this.markDirty(),this}replaceValues(e,t,n){return n||(n=t,t={}),this.walkDecls((o=>{t.props&&!t.props.includes(o.prop)||t.fast&&!o.value.includes(t.fast)||(o.value=o.value.replace(e,n))})),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each(((t,n)=>{let o;try{o=e(t,n)}catch(e){throw t.addToError(e)}return!1!==o&&t.walk&&(o=t.walk(e)),o}))}walkAtRules(e,t){return t?e instanceof RegExp?this.walk(((n,o)=>{if("atrule"===n.type&&e.test(n.name))return t(n,o)})):this.walk(((n,o)=>{if("atrule"===n.type&&n.name===e)return t(n,o)})):(t=e,this.walk(((e,n)=>{if("atrule"===e.type)return t(e,n)})))}walkComments(e){return this.walk(((t,n)=>{if("comment"===t.type)return e(t,n)}))}walkDecls(e,t){return t?e instanceof RegExp?this.walk(((n,o)=>{if("decl"===n.type&&e.test(n.prop))return t(n,o)})):this.walk(((n,o)=>{if("decl"===n.type&&n.prop===e)return t(n,o)})):(t=e,this.walk(((e,n)=>{if("decl"===e.type)return t(e,n)})))}walkRules(e,t){return t?e instanceof RegExp?this.walk(((n,o)=>{if("rule"===n.type&&e.test(n.selector))return t(n,o)})):this.walk(((n,o)=>{if("rule"===n.type&&n.selector===e)return t(n,o)})):(t=e,this.walk(((e,n)=>{if("rule"===e.type)return t(e,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]}}g.registerParse=e=>{o=e},g.registerRule=e=>{r=e},g.registerAtRule=e=>{i=e},g.registerRoot=e=>{s=e},e.exports=g,g.default=g,g.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,i.prototype):"rule"===e.type?Object.setPrototypeOf(e,r.prototype):"decl"===e.type?Object.setPrototypeOf(e,c.prototype):"comment"===e.type?Object.setPrototypeOf(e,u.prototype):"root"===e.type&&Object.setPrototypeOf(e,s.prototype),e[a]=!0,e.nodes&&e.nodes.forEach((e=>{g.rebuild(e)}))}},356:(e,t,n)=>{"use strict";let o=n(2775),r=n(9746);class i extends Error{constructor(e,t,n,o,r,s){super(e),this.name="CssSyntaxError",this.reason=e,r&&(this.file=r),o&&(this.source=o),s&&(this.plugin=s),void 0!==t&&void 0!==n&&("number"==typeof t?(this.line=t,this.column=n):(this.line=t.line,this.column=t.column,this.endLine=n.line,this.endColumn=n.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,i)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=o.isColorSupported),r&&e&&(t=r(t));let n,i,s=t.split(/\r?\n/),l=Math.max(this.line-3,0),a=Math.min(this.line+2,s.length),c=String(a).length;if(e){let{bold:e,gray:t,red:r}=o.createColors(!0);n=t=>e(r(t)),i=e=>t(e)}else n=i=e=>e;return s.slice(l,a).map(((e,t)=>{let o=l+1+t,r=" "+(" "+o).slice(-c)+" | ";if(o===this.line){let t=i(r.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return n(">")+i(r)+e+"\n "+t+n("^")}return" "+i(r)+e})).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}}e.exports=i,i.default=i},1516:(e,t,n)=>{"use strict";let o=n(7490);class r extends o{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}}e.exports=r,r.default=r},271:(e,t,n)=>{"use strict";let o,r,i=n(683);class s extends i{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new o(new r,this,e).stringify()}}s.registerLazyResult=e=>{o=e},s.registerProcessor=e=>{r=e},e.exports=s,s.default=s},5380:(e,t,n)=>{"use strict";let{SourceMapConsumer:o,SourceMapGenerator:r}=n(1866),{fileURLToPath:i,pathToFileURL:s}=n(2739),{isAbsolute:l,resolve:a}=n(197),{nanoid:c}=n(5042),u=n(9746),d=n(356),p=n(5696),h=Symbol("fromOffsetCache"),g=Boolean(o&&r),m=Boolean(a&&l);class f{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!m||/^\w+:\/\//.test(t.from)||l(t.from)?this.file=t.from:this.file=a(t.from)),m&&g){let e=new p(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id=""),this.map&&(this.map.file=this.from)}error(e,t,n,o={}){let r,i,l;if(t&&"object"==typeof t){let e=t,o=n;if("number"==typeof e.offset){let o=this.fromOffset(e.offset);t=o.line,n=o.col}else t=e.line,n=e.column;if("number"==typeof o.offset){let e=this.fromOffset(o.offset);i=e.line,l=e.col}else i=o.line,l=o.column}else if(!n){let e=this.fromOffset(t);t=e.line,n=e.col}let a=this.origin(t,n,i,l);return r=a?new d(e,void 0===a.endLine?a.line:{column:a.column,line:a.line},void 0===a.endLine?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,o.plugin):new d(e,void 0===i?t:{column:n,line:t},void 0===i?n:{column:l,line:i},this.css,this.file,o.plugin),r.input={column:n,endColumn:l,endLine:i,line:t,source:this.css},this.file&&(s&&(r.input.url=s(this.file).toString()),r.input.file=this.file),r}fromOffset(e){let t,n;if(this[h])n=this[h];else{let e=this.css.split("\n");n=new Array(e.length);let t=0;for(let o=0,r=e.length;o=t)o=n.length-1;else{let t,r=n.length-2;for(;o>1),e=n[t+1])){o=t;break}o=t+1}}return{col:e-n[o]+1,line:o+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:a(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,n,o){if(!this.map)return!1;let r,a,c=this.map.consumer(),u=c.originalPositionFor({column:t,line:e});if(!u.source)return!1;"number"==typeof n&&(r=c.originalPositionFor({column:o,line:n})),a=l(u.source)?s(u.source):new URL(u.source,this.map.consumer().sourceRoot||s(this.map.mapFile));let d={column:u.column,endColumn:r&&r.column,endLine:r&&r.line,line:u.line,url:a.toString()};if("file:"===a.protocol){if(!i)throw new Error("file: protocol is not available in this PostCSS build");d.file=i(a)}let p=c.sourceContentFor(u.source);return p&&(d.source=p),d}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}}e.exports=f,f.default=f,u&&u.registerInput&&u.registerInput(f)},448:(e,t,n)=>{"use strict";let{isClean:o,my:r}=n(1381),i=n(1670),s=n(633),l=n(683),a=n(271),c=(n(3122),n(9055)),u=n(4295),d=n(9434);const p={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},h={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},g={Once:!0,postcssPlugin:!0,prepare:!0},m=0;function f(e){return"object"==typeof e&&"function"==typeof e.then}function b(e){let t=!1,n=p[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[n,n+"-"+t,m,n+"Exit",n+"Exit-"+t]:t?[n,n+"-"+t,n+"Exit",n+"Exit-"+t]:e.append?[n,m,n+"Exit"]:[n,n+"Exit"]}function k(e){let t;return t="document"===e.type?["Document",m,"DocumentExit"]:"root"===e.type?["Root",m,"RootExit"]:b(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function v(e){return e[o]=!1,e.nodes&&e.nodes.forEach((e=>v(e))),e}let _={};class x{constructor(e,t,n){let o;if(this.stringified=!1,this.processed=!1,"object"!=typeof t||null===t||"root"!==t.type&&"document"!==t.type)if(t instanceof x||t instanceof c)o=v(t.root),t.map&&(void 0===n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=t.map);else{let e=u;n.syntax&&(e=n.syntax.parse),n.parser&&(e=n.parser),e.parse&&(e=e.parse);try{o=e(t,n)}catch(e){this.processed=!0,this.error=e}o&&!o[r]&&l.rebuild(o)}else o=v(t);this.result=new c(e,o,n),this.helpers={..._,postcss:_,result:this.result},this.plugins=this.processor.plugins.map((e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e))}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let n=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin?n.postcssVersion:(e.plugin=n.postcssPlugin,e.setMessage())}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,n)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,n])};for(let t of this.plugins)if("object"==typeof t)for(let n in t){if(!h[n]&&/^[A-Z]/.test(n))throw new Error(`Unknown event ${n} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!g[n])if("object"==typeof t[n])for(let o in t[n])e(t,"*"===o?n:n+"-"+o.toLowerCase(),t[n][o]);else"function"==typeof t[n]&&e(t,n,t[n])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e0;){let e=this.visitTick(t);if(f(e))try{await e}catch(e){let n=t[t.length-1].node;throw this.handleError(e,n)}}}if(this.listeners.OnceExit)for(let[t,n]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if("document"===e.type){let t=e.nodes.map((e=>n(e,this.helpers)));await Promise.all(t)}else await n(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map((t=>e.Once(t,this.helpers)));return f(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=s;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let n=new i(t,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 e of this.plugins)if(f(this.runOnRoot(e)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[o];)e[o]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[n,o]of e){let e;this.result.lastPlugin=n;try{e=o(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(f(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:n,visitors:r}=t;if("root"!==n.type&&"document"!==n.type&&!n.parent)return void e.pop();if(r.length>0&&t.visitorIndex{e[o]||this.walkSync(e)}));else{let t=this.listeners[n];if(t&&this.visitSync(t,e.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"}}x.registerPostcss=e=>{_=e},e.exports=x,x.default=x,d.registerLazyResult(x),a.registerLazyResult(x)},7374:e=>{"use strict";let t={comma:e=>t.split(e,[","],!0),space:e=>t.split(e,[" ","\n","\t"]),split(e,t,n){let o=[],r="",i=!1,s=0,l=!1,a="",c=!1;for(let n of e)c?c=!1:"\\"===n?c=!0:l?n===a&&(l=!1):'"'===n||"'"===n?(l=!0,a=n):"("===n?s+=1:")"===n?s>0&&(s-=1):0===s&&t.includes(n)&&(i=!0),i?(""!==r&&o.push(r.trim()),r="",i=!1):r+=n;return(n||""!==r)&&o.push(r.trim()),o}};e.exports=t,t.default=t},1670:(e,t,n)=>{"use strict";let{SourceMapConsumer:o,SourceMapGenerator:r}=n(1866),{dirname:i,relative:s,resolve:l,sep:a}=n(197),{pathToFileURL:c}=n(2739),u=n(5380),d=Boolean(o&&r),p=Boolean(i&&l&&s&&a);e.exports=class{constructor(e,t,n,o){this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=o,this.originalCSS=o,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t,n=this.toUrl(this.path(e.file)),r=e.root||i(e.file);!1===this.mapOpts.sourcesContent?(t=new o(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,n,this.toUrl(this.path(r)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),p&&d&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,(t=>{e+=t})),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=r.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new r({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)):""});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 r({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,n=1,o=1,i="",s={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,((r,l,a)=>{if(this.css+=r,l&&"end"!==a&&(s.generated.line=n,s.generated.column=o-1,l.source&&l.source.start?(s.source=this.sourcePath(l),s.original.line=l.source.start.line,s.original.column=l.source.start.column-1,this.map.addMapping(s)):(s.source=i,s.original.line=1,s.original.column=0,this.map.addMapping(s))),e=r.match(/\n/g),e?(n+=e.length,t=r.lastIndexOf("\n"),o=r.length-t):o+=r.length,l&&"start"!==a){let e=l.parent||{raws:{}};("decl"===l.type||"atrule"===l.type&&!l.nodes)&&l===e.last&&!e.raws.semicolon||(l.source&&l.source.end?(s.source=this.sourcePath(l),s.original.line=l.source.end.line,s.original.column=l.source.end.column-1,s.generated.line=n,s.generated.column=o-2,this.map.addMapping(s)):(s.source=i,s.original.line=1,s.original.column=0,s.generated.line=n,s.generated.column=o-1,this.map.addMapping(s)))}}))}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some((e=>e.annotation)))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some((e=>e.inline)))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some((e=>e.withContent()))}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let n=this.opts.to?i(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(n=i(l(n,this.mapOpts.annotation)));let o=s(n,e);return this.memoizedPaths.set(e,o),o}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk((e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}}));else{let e=new u(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk((t=>{if(t.source){let n=t.source.input.from;if(n&&!e[n]){e[n]=!0;let o=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(o,t.source.input.css)}}}));else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"";this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(c){let t=c(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===a&&(e=e.replace(/\\/g,"/"));let n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n}}},7661:(e,t,n)=>{"use strict";let o=n(1670),r=n(633),i=(n(3122),n(4295));const s=n(9055);class l{constructor(e,t,n){let i;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=n,this._map=void 0;let l=r;this.result=new s(this._processor,i,this._opts),this.result.css=t;let a=this;Object.defineProperty(this.result,"root",{get:()=>a.root});let c=new o(l,i,this._opts,t);if(c.isMap()){let[e,t]=c.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else c.clearAnnotation(),this.result.css=c.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}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 e,t=i;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}}e.exports=l,l.default=l},7490:(e,t,n)=>{"use strict";let{isClean:o,my:r}=n(1381),i=n(356),s=n(346),l=n(633);function a(e,t){let n=new e.constructor;for(let o in e){if(!Object.prototype.hasOwnProperty.call(e,o))continue;if("proxyCache"===o)continue;let r=e[o],i=typeof r;"parent"===o&&"object"===i?t&&(n[o]=t):"source"===o?n[o]=r:Array.isArray(r)?n[o]=r.map((e=>a(e,n))):("object"===i&&null!==r&&(r=a(r)),n[o]=r)}return n}class c{constructor(e={}){this.raws={},this[o]=!1,this[r]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let n of e[t])"function"==typeof n.clone?this.append(n.clone()):this.append(n)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=a(this);for(let n in e)t[n]=e[n];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:n,start:o}=this.rangeBy(t);return this.source.input.error(e,{column:o.column,line:o.line},{column:n.column,line:n.line},t)}return new i(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,n)=>(e[t]===n||(e[t]=n,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markDirty(){if(this[o]){this[o]=!1;let e=this;for(;e=e.parent;)e[o]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let n=this.source.start;if(e.index)n=this.positionInside(e.index,t);else if(e.word){let o=(t=this.toString()).indexOf(e.word);-1!==o&&(n=this.positionInside(o,t))}return n}positionInside(e,t){let n=t||this.toString(),o=this.source.start.column,r=this.source.start.line;for(let t=0;t"object"==typeof e&&e.toJSON?e.toJSON(null,t):e));else if("object"==typeof o&&o.toJSON)n[e]=o.toJSON(null,t);else if("source"===e){let i=t.get(o.input);null==i&&(i=r,t.set(o.input,r),r++),n[e]={end:o.end,inputId:i,start:o.start}}else n[e]=o}return o&&(n.inputs=[...t.keys()].map((e=>e.toJSON()))),n}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=l){e.stringify&&(e=e.stringify);let t="";return e(this,(e=>{t+=e})),t}warn(e,t,n){let o={node:this};for(let e in n)o[e]=n[e];return e.warn(t,o)}get proxyOf(){return this}}e.exports=c,c.default=c},4295:(e,t,n)=>{"use strict";let o=n(683),r=n(3937),i=n(5380);function s(e,t){let n=new i(e,t),o=new r(n);try{o.parse()}catch(e){throw e}return o.root}e.exports=s,s.default=s,o.registerParse(s)},3937:(e,t,n)=>{"use strict";let o=n(1516),r=n(2327),i=n(6589),s=n(1326),l=n(9434),a=n(4092);const c={empty:!0,space:!0};e.exports=class{constructor(e){this.input=e,this.root=new l,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,n,o,r=new s;r.name=e[1].slice(1),""===r.name&&this.unnamedAtrule(r,e),this.init(r,e[2]);let i=!1,l=!1,a=[],c=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?c.push("("===t?")":"]"):"{"===t&&c.length>0?c.push("}"):t===c[c.length-1]&&c.pop(),0===c.length){if(";"===t){r.source.end=this.getPosition(e[2]),r.source.end.offset++,this.semicolon=!0;break}if("{"===t){l=!0;break}if("}"===t){if(a.length>0){for(o=a.length-1,n=a[o];n&&"space"===n[0];)n=a[--o];n&&(r.source.end=this.getPosition(n[3]||n[2]),r.source.end.offset++)}this.end(e);break}a.push(e)}else a.push(e);if(this.tokenizer.endOfFile()){i=!0;break}}r.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(r.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(r,"params",a),i&&(e=a[a.length-1],r.source.end=this.getPosition(e[3]||e[2]),r.source.end.offset++,this.spaces=r.raws.between,r.raws.between="")):(r.raws.afterName="",r.params=""),l&&(r.nodes=[],this.current=r)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let n,o=0;for(let r=t-1;r>=0&&(n=e[r],"space"===n[0]||(o+=1,2!==o));r--);throw this.input.error("Missed semicolon","word"===n[0]?n[3]+1:n[2])}colon(e){let t,n,o,r=0;for(let[i,s]of e.entries()){if(t=s,n=t[0],"("===n&&(r+=1),")"===n&&(r-=1),0===r&&":"===n){if(o){if("word"===o[0]&&"progid"===o[1])continue;return i}this.doubleColon(t)}o=t}return!1}comment(e){let t=new i;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let n=e[1].slice(2,-2);if(/^\s*$/.test(n))t.text="",t.raws.left=n,t.raws.right="";else{let e=n.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=r(this.input)}decl(e,t){let n=new o;this.init(n,e[0][2]);let r,i=e[e.length-1];for(";"===i[0]&&(this.semicolon=!0,e.pop()),n.source.end=this.getPosition(i[3]||i[2]||function(e){for(let t=e.length-1;t>=0;t--){let n=e[t],o=n[3]||n[2];if(o)return o}}(e)),n.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),n.raws.before+=e.shift()[1];for(n.source.start=this.getPosition(e[0][2]),n.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;n.prop+=e.shift()[1]}for(n.raws.between="";e.length;){if(r=e.shift(),":"===r[0]){n.raws.between+=r[1];break}"word"===r[0]&&/\w/.test(r[1])&&this.unknownWord([r]),n.raws.between+=r[1]}"_"!==n.prop[0]&&"*"!==n.prop[0]||(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));let s,l=[];for(;e.length&&(s=e[0][0],"space"===s||"comment"===s);)l.push(e.shift());this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){if(r=e[t],"!important"===r[1].toLowerCase()){n.important=!0;let o=this.stringFrom(e,t);o=this.spacesFromEnd(e)+o," !important"!==o&&(n.raws.important=o);break}if("important"===r[1].toLowerCase()){let o=e.slice(0),r="";for(let e=t;e>0;e--){let t=o[e][0];if(0===r.trim().indexOf("!")&&"space"!==t)break;r=o.pop()[1]+r}0===r.trim().indexOf("!")&&(n.important=!0,n.raws.important=r,e=o)}if("space"!==r[0]&&"comment"!==r[0])break}e.some((e=>"space"!==e[0]&&"comment"!==e[0]))&&(n.raws.between+=l.map((e=>e[1])).join(""),l=[]),this.raw(n,"value",l.concat(e),t),n.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new a;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){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(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}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(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,n=null,o=!1,r=null,i=[],s=e[1].startsWith("--"),l=[],a=e;for(;a;){if(n=a[0],l.push(a),"("===n||"["===n)r||(r=a),i.push("("===n?")":"]");else if(s&&o&&"{"===n)r||(r=a),i.push("}");else if(0===i.length){if(";"===n){if(o)return void this.decl(l,s);break}if("{"===n)return void this.rule(l);if("}"===n){this.tokenizer.back(l.pop()),t=!0;break}":"===n&&(o=!0)}else n===i[i.length-1]&&(i.pop(),0===i.length&&(r=null));a=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),i.length>0&&this.unclosedBracket(r),t&&o){if(!s)for(;l.length&&(a=l[l.length-1][0],"space"===a||"comment"===a);)this.tokenizer.back(l.pop());this.decl(l,s)}else this.unknownWord(l)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,n,o){let r,i,s,l,a=n.length,u="",d=!0;for(let e=0;ee+t[1]),"");e.raws[t]={raw:o,value:u}}e[t]=u}rule(e){e.pop();let t=new a;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,n="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)n=e.pop()[1]+n;return n}spacesAndCommentsFromStart(e){let t,n="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)n+=e.shift()[1];return n}spacesFromEnd(e){let t,n="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)n=e.pop()[1]+n;return n}stringFrom(e,t){let n="";for(let o=t;o{"use strict";let{SourceMapConsumer:o,SourceMapGenerator:r}=n(1866),{existsSync:i,readFileSync:s}=n(9977),{dirname:l,join:a}=n(197);class c{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let n=t.map?t.map.prev:void 0,o=this.loadMap(t.from,n);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=l(this.mapFile)),o&&(this.text=o)}consumer(){return this.consumerCache||(this.consumerCache=new o(this.text)),this.consumerCache}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t;let n=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+n)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let n=e.lastIndexOf(t.pop()),o=e.indexOf("*/",n);n>-1&&o>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,o)))}loadFile(e){if(this.root=l(e),i(e))return this.mapFile=e,s(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof o)return r.fromSourceMap(t).toString();if(t instanceof r)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let n=t(e);if(n){let e=this.loadFile(n);if(!e)throw new Error("Unable to load previous source map: "+n.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=a(l(e),t)),this.loadFile(t)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}e.exports=c,c.default=c},9656:(e,t,n)=>{"use strict";let o=n(7661),r=n(448),i=n(271),s=n(9434);class l{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let n of e)if(!0===n.postcss?n=n():n.postcss&&(n=n.postcss),"object"==typeof n&&Array.isArray(n.plugins))t=t.concat(n.plugins);else if("object"==typeof n&&n.postcssPlugin)t.push(n);else if("function"==typeof n)t.push(n);else if("object"!=typeof n||!n.parse&&!n.stringify)throw new Error(n+" is not a PostCSS plugin");return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new r(this,e,t):new o(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}}e.exports=l,l.default=l,s.registerProcessor(l),i.registerProcessor(l)},9055:(e,t,n)=>{"use strict";let o=n(5776);class r{constructor(e,t,n){this.processor=e,this.messages=[],this.root=t,this.opts=n,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let n=new o(e,t);return this.messages.push(n),n}warnings(){return this.messages.filter((e=>"warning"===e.type))}get content(){return this.css}}e.exports=r,r.default=r},9434:(e,t,n)=>{"use strict";let o,r,i=n(683);class s extends i{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,n){let o=super.normalize(e);if(t)if("prepend"===n)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of o)e.raws.before=t.raws.before;return o}removeChild(e,t){let n=this.index(e);return!t&&0===n&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(e)}toResult(e={}){return new o(new r,this,e).stringify()}}s.registerLazyResult=e=>{o=e},s.registerProcessor=e=>{r=e},e.exports=s,s.default=s,i.registerRoot(s)},4092:(e,t,n)=>{"use strict";let o=n(683),r=n(7374);class i extends o{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return r.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,n=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(n)}}e.exports=i,i.default=i,o.registerRule(i)},346:e=>{"use strict";const t={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};class n{constructor(e){this.builder=e}atrule(e,t){let n="@"+e.name,o=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?n+=e.raws.afterName:o&&(n+=" "),e.nodes)this.block(e,n+o);else{let r=(e.raws.between||"")+(t?";":"");this.builder(n+o+r,e)}}beforeAfter(e,t){let n;n="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let o=e.parent,r=0;for(;o&&"root"!==o.type;)r+=1,o=o.parent;if(n.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e0&&"comment"===e.nodes[t].type;)t-=1;let n=this.raw(e,"semicolon");for(let o=0;o{if(r=e.raws[n],void 0!==r)return!1}))}var l;return void 0===r&&(r=t[o]),s.rawCache[o]=r,r}rawBeforeClose(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let n;return e.walkComments((e=>{if(void 0!==e.raws.before)return n=e.raws.before,n.includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1})),void 0===n?n=this.raw(t,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeDecl(e,t){let n;return e.walkDecls((e=>{if(void 0!==e.raws.before)return n=e.raws.before,n.includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1})),void 0===n?n=this.raw(t,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeOpen(e){let t;return e.walk((e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1})),t}rawBeforeRule(e){let t;return e.walk((n=>{if(n.nodes&&(n.parent!==e||e.first!==n)&&void 0!==n.raws.before)return t=n.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls((e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1})),t}rawEmptyBody(e){let t;return e.walk((e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1})),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk((n=>{let o=n.parent;if(o&&o!==e&&o.parent&&o.parent===e&&void 0!==n.raws.before){let e=n.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}})),t}rawSemicolon(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1})),t}rawValue(e,t){let n=e[t],o=e.raws[t];return o&&o.value===n?o.raw:n}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}}e.exports=n,n.default=n},633:(e,t,n)=>{"use strict";let o=n(346);function r(e,t){new o(t).stringify(e)}e.exports=r,r.default=r},1381:e=>{"use strict";e.exports.isClean=Symbol("isClean"),e.exports.my=Symbol("my")},2327:e=>{"use strict";const t="'".charCodeAt(0),n='"'.charCodeAt(0),o="\\".charCodeAt(0),r="/".charCodeAt(0),i="\n".charCodeAt(0),s=" ".charCodeAt(0),l="\f".charCodeAt(0),a="\t".charCodeAt(0),c="\r".charCodeAt(0),u="[".charCodeAt(0),d="]".charCodeAt(0),p="(".charCodeAt(0),h=")".charCodeAt(0),g="{".charCodeAt(0),m="}".charCodeAt(0),f=";".charCodeAt(0),b="*".charCodeAt(0),k=":".charCodeAt(0),v="@".charCodeAt(0),_=/[\t\n\f\r "#'()/;[\\\]{}]/g,x=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,y=/.[\r\n"'(/\\]/,S=/[\da-f]/i;e.exports=function(e,w={}){let C,B,I,j,E,T,M,P,R,N,L=e.css.valueOf(),A=w.ignoreErrors,O=L.length,D=0,z=[],V=[];function F(t){throw e.error("Unclosed "+t,D)}return{back:function(e){V.push(e)},endOfFile:function(){return 0===V.length&&D>=O},nextToken:function(e){if(V.length)return V.pop();if(D>=O)return;let w=!!e&&e.ignoreUnclosed;switch(C=L.charCodeAt(D),C){case i:case s:case a:case c:case l:B=D;do{B+=1,C=L.charCodeAt(B)}while(C===s||C===i||C===a||C===c||C===l);N=["space",L.slice(D,B)],D=B-1;break;case u:case d:case g:case m:case k:case f:case h:{let e=String.fromCharCode(C);N=[e,e,D];break}case p:if(P=z.length?z.pop()[1]:"",R=L.charCodeAt(D+1),"url"===P&&R!==t&&R!==n&&R!==s&&R!==i&&R!==a&&R!==l&&R!==c){B=D;do{if(T=!1,B=L.indexOf(")",B+1),-1===B){if(A||w){B=D;break}F("bracket")}for(M=B;L.charCodeAt(M-1)===o;)M-=1,T=!T}while(T);N=["brackets",L.slice(D,B+1),D,B],D=B}else B=L.indexOf(")",D+1),j=L.slice(D,B+1),-1===B||y.test(j)?N=["(","(",D]:(N=["brackets",j,D,B],D=B);break;case t:case n:I=C===t?"'":'"',B=D;do{if(T=!1,B=L.indexOf(I,B+1),-1===B){if(A||w){B=D+1;break}F("string")}for(M=B;L.charCodeAt(M-1)===o;)M-=1,T=!T}while(T);N=["string",L.slice(D,B+1),D,B],D=B;break;case v:_.lastIndex=D+1,_.test(L),B=0===_.lastIndex?L.length-1:_.lastIndex-2,N=["at-word",L.slice(D,B+1),D,B],D=B;break;case o:for(B=D,E=!0;L.charCodeAt(B+1)===o;)B+=1,E=!E;if(C=L.charCodeAt(B+1),E&&C!==r&&C!==s&&C!==i&&C!==a&&C!==c&&C!==l&&(B+=1,S.test(L.charAt(B)))){for(;S.test(L.charAt(B+1));)B+=1;L.charCodeAt(B+1)===s&&(B+=1)}N=["word",L.slice(D,B+1),D,B],D=B;break;default:C===r&&L.charCodeAt(D+1)===b?(B=L.indexOf("*/",D+2)+1,0===B&&(A||w?B=L.length:F("comment")),N=["comment",L.slice(D,B+1),D,B],D=B):(x.lastIndex=D+1,x.test(L),B=0===x.lastIndex?L.length-1:x.lastIndex-2,N=["word",L.slice(D,B+1),D,B],z.push(N),D=B)}return D++,N},position:function(){return D}}}},3122:e=>{"use strict";let t={};e.exports=function(e){t[e]||(t[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))}},5776:e=>{"use strict";class t{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}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}}e.exports=t,t.default=t},628:(e,t,n)=>{"use strict";var o=n(4067);function r(){}function i(){}i.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,i,s){if(s!==o){var l=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 l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={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:i,resetWarningCache:r};return n.PropTypes=n,n}},5826:(e,t,n)=>{e.exports=n(628)()},4067:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},4462:function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function __(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),i=this&&this.__assign||Object.assign||function(e){for(var t,n=1,o=arguments.length;n{"use strict";var o=n(4462);t.A=o.TextareaAutosize},9681:e=>{var t={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Ấ:"A",Ắ:"A",Ẳ:"A",Ẵ:"A",Ặ:"A",Æ:"AE",Ầ:"A",Ằ:"A",Ȃ:"A",Ả:"A",Ạ:"A",Ẩ:"A",Ẫ:"A",Ậ:"A",Ç:"C",Ḉ:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ế:"E",Ḗ:"E",Ề:"E",Ḕ:"E",Ḝ:"E",Ȇ:"E",Ẻ:"E",Ẽ:"E",Ẹ:"E",Ể:"E",Ễ:"E",Ệ:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ḯ:"I",Ȋ:"I",Ỉ:"I",Ị:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",Ố:"O",Ṍ:"O",Ṓ:"O",Ȏ:"O",Ỏ:"O",Ọ:"O",Ổ:"O",Ỗ:"O",Ộ:"O",Ờ:"O",Ở:"O",Ỡ:"O",Ớ:"O",Ợ:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",Ủ:"U",Ụ:"U",Ử:"U",Ữ:"U",Ự:"U",Ý:"Y",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",ấ:"a",ắ:"a",ẳ:"a",ẵ:"a",ặ:"a",æ:"ae",ầ:"a",ằ:"a",ȃ:"a",ả:"a",ạ:"a",ẩ:"a",ẫ:"a",ậ:"a",ç:"c",ḉ:"c",è:"e",é:"e",ê:"e",ë:"e",ế:"e",ḗ:"e",ề:"e",ḕ:"e",ḝ:"e",ȇ:"e",ẻ:"e",ẽ:"e",ẹ:"e",ể:"e",ễ:"e",ệ:"e",ì:"i",í:"i",î:"i",ï:"i",ḯ:"i",ȋ:"i",ỉ:"i",ị:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",ố:"o",ṍ:"o",ṓ:"o",ȏ:"o",ỏ:"o",ọ:"o",ổ:"o",ỗ:"o",ộ:"o",ờ:"o",ở:"o",ỡ:"o",ớ:"o",ợ:"o",ù:"u",ú:"u",û:"u",ü:"u",ủ:"u",ụ:"u",ử:"u",ữ:"u",ự:"u",ý:"y",ÿ:"y",Ā:"A",ā:"a",Ă:"A",ă:"a",Ą:"A",ą:"a",Ć:"C",ć:"c",Ĉ:"C",ĉ:"c",Ċ:"C",ċ:"c",Č:"C",č:"c",C̆:"C",c̆:"c",Ď:"D",ď:"d",Đ:"D",đ:"d",Ē:"E",ē:"e",Ĕ:"E",ĕ:"e",Ė:"E",ė:"e",Ę:"E",ę:"e",Ě:"E",ě:"e",Ĝ:"G",Ǵ:"G",ĝ:"g",ǵ:"g",Ğ:"G",ğ:"g",Ġ:"G",ġ:"g",Ģ:"G",ģ:"g",Ĥ:"H",ĥ:"h",Ħ:"H",ħ:"h",Ḫ:"H",ḫ:"h",Ĩ:"I",ĩ:"i",Ī:"I",ī:"i",Ĭ:"I",ĭ:"i",Į:"I",į:"i",İ:"I",ı:"i",IJ:"IJ",ij:"ij",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",Ḱ:"K",ḱ:"k",K̆:"K",k̆:"k",Ĺ:"L",ĺ:"l",Ļ:"L",ļ:"l",Ľ:"L",ľ:"l",Ŀ:"L",ŀ:"l",Ł:"l",ł:"l",Ḿ:"M",ḿ:"m",M̆:"M",m̆:"m",Ń:"N",ń:"n",Ņ:"N",ņ:"n",Ň:"N",ň:"n",ʼn:"n",N̆:"N",n̆:"n",Ō:"O",ō:"o",Ŏ:"O",ŏ:"o",Ő:"O",ő:"o",Œ:"OE",œ:"oe",P̆:"P",p̆:"p",Ŕ:"R",ŕ:"r",Ŗ:"R",ŗ:"r",Ř:"R",ř:"r",R̆:"R",r̆:"r",Ȓ:"R",ȓ:"r",Ś:"S",ś:"s",Ŝ:"S",ŝ:"s",Ş:"S",Ș:"S",ș:"s",ş:"s",Š:"S",š:"s",Ţ:"T",ţ:"t",ț:"t",Ț:"T",Ť:"T",ť:"t",Ŧ:"T",ŧ:"t",T̆:"T",t̆:"t",Ũ:"U",ũ:"u",Ū:"U",ū:"u",Ŭ:"U",ŭ:"u",Ů:"U",ů:"u",Ű:"U",ű:"u",Ų:"U",ų:"u",Ȗ:"U",ȗ:"u",V̆:"V",v̆:"v",Ŵ:"W",ŵ:"w",Ẃ:"W",ẃ:"w",X̆:"X",x̆:"x",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Y̆:"Y",y̆:"y",Ź:"Z",ź:"z",Ż:"Z",ż:"z",Ž:"Z",ž:"z",ſ:"s",ƒ:"f",Ơ:"O",ơ:"o",Ư:"U",ư:"u",Ǎ:"A",ǎ:"a",Ǐ:"I",ǐ:"i",Ǒ:"O",ǒ:"o",Ǔ:"U",ǔ:"u",Ǖ:"U",ǖ:"u",Ǘ:"U",ǘ:"u",Ǚ:"U",ǚ:"u",Ǜ:"U",ǜ:"u",Ứ:"U",ứ:"u",Ṹ:"U",ṹ:"u",Ǻ:"A",ǻ:"a",Ǽ:"AE",ǽ:"ae",Ǿ:"O",ǿ:"o",Þ:"TH",þ:"th",Ṕ:"P",ṕ:"p",Ṥ:"S",ṥ:"s",X́:"X",x́:"x",Ѓ:"Г",ѓ:"г",Ќ:"К",ќ:"к",A̋:"A",a̋:"a",E̋:"E",e̋:"e",I̋:"I",i̋:"i",Ǹ:"N",ǹ:"n",Ồ:"O",ồ:"o",Ṑ:"O",ṑ:"o",Ừ:"U",ừ:"u",Ẁ:"W",ẁ:"w",Ỳ:"Y",ỳ:"y",Ȁ:"A",ȁ:"a",Ȅ:"E",ȅ:"e",Ȉ:"I",ȉ:"i",Ȍ:"O",ȍ:"o",Ȑ:"R",ȑ:"r",Ȕ:"U",ȕ:"u",B̌:"B",b̌:"b",Č̣:"C",č̣:"c",Ê̌:"E",ê̌:"e",F̌:"F",f̌:"f",Ǧ:"G",ǧ:"g",Ȟ:"H",ȟ:"h",J̌:"J",ǰ:"j",Ǩ:"K",ǩ:"k",M̌:"M",m̌:"m",P̌:"P",p̌:"p",Q̌:"Q",q̌:"q",Ř̩:"R",ř̩:"r",Ṧ:"S",ṧ:"s",V̌:"V",v̌:"v",W̌:"W",w̌:"w",X̌:"X",x̌:"x",Y̌:"Y",y̌:"y",A̧:"A",a̧:"a",B̧:"B",b̧:"b",Ḑ:"D",ḑ:"d",Ȩ:"E",ȩ:"e",Ɛ̧:"E",ɛ̧:"e",Ḩ:"H",ḩ:"h",I̧:"I",i̧:"i",Ɨ̧:"I",ɨ̧:"i",M̧:"M",m̧:"m",O̧:"O",o̧:"o",Q̧:"Q",q̧:"q",U̧:"U",u̧:"u",X̧:"X",x̧:"x",Z̧:"Z",z̧:"z",й:"и",Й:"И",ё:"е",Ё:"Е"},n=Object.keys(t).join("|"),o=new RegExp(n,"g"),r=new RegExp(n,"");function i(e){return t[e]}var s=function(e){return e.replace(o,i)};e.exports=s,e.exports.has=function(e){return!!e.match(r)},e.exports.remove=s},6020:(e,t,n)=>{const o=n(4848);e.exports=e=>{const t=Object.assign({skipHostRelativeUrls:!0},e);return{postcssPlugin:"rebaseUrl",Declaration(n){const r=o(n.value);let i=!1;r.walk((n=>{if("function"!==n.type||"url"!==n.value)return;const o=n.nodes[0].value,r=new URL(o,e.rootUrl);return r.pathname===o&&t.skipHostRelativeUrls||(n.nodes[0].value=r.toString(),i=!0),!1})),i&&(n.value=o.stringify(r))}}},e.exports.postcss=!0},4848:(e,t,n)=>{var o=n(3715),r=n(8703),i=n(7293);function s(e){return this instanceof s?(this.nodes=o(e),this):new s(e)}s.prototype.toString=function(){return Array.isArray(this.nodes)?i(this.nodes):""},s.prototype.walk=function(e,t){return r(this.nodes,e,t),this},s.unit=n(9356),s.walk=r,s.stringify=i,e.exports=s},3715:e=>{var t="(".charCodeAt(0),n=")".charCodeAt(0),o="'".charCodeAt(0),r='"'.charCodeAt(0),i="\\".charCodeAt(0),s="/".charCodeAt(0),l=",".charCodeAt(0),a=":".charCodeAt(0),c="*".charCodeAt(0),u="u".charCodeAt(0),d="U".charCodeAt(0),p="+".charCodeAt(0),h=/^[a-f0-9?-]+$/i;e.exports=function(e){for(var g,m,f,b,k,v,_,x,y,S=[],w=e,C=0,B=w.charCodeAt(C),I=w.length,j=[{nodes:S}],E=0,T="",M="",P="";C{function t(e,t){var o,r,i=e.type,s=e.value;return t&&void 0!==(r=t(e))?r:"word"===i||"space"===i?s:"string"===i?(o=e.quote||"")+s+(e.unclosed?"":o):"comment"===i?"/*"+s+(e.unclosed?"":"*/"):"div"===i?(e.before||"")+s+(e.after||""):Array.isArray(e.nodes)?(o=n(e.nodes,t),"function"!==i?o:s+"("+(e.before||"")+o+(e.after||"")+(e.unclosed?"":")")):s}function n(e,n){var o,r;if(Array.isArray(e)){for(o="",r=e.length-1;~r;r-=1)o=t(e[r],n)+o;return o}return t(e,n)}e.exports=n},9356:e=>{var t="-".charCodeAt(0),n="+".charCodeAt(0),o=".".charCodeAt(0),r="e".charCodeAt(0),i="E".charCodeAt(0);e.exports=function(e){var s,l,a,c=0,u=e.length;if(0===u||!function(e){var r,i=e.charCodeAt(0);if(i===n||i===t){if((r=e.charCodeAt(1))>=48&&r<=57)return!0;var s=e.charCodeAt(2);return r===o&&s>=48&&s<=57}return i===o?(r=e.charCodeAt(1))>=48&&r<=57:i>=48&&i<=57}(e))return!1;for((s=e.charCodeAt(c))!==n&&s!==t||c++;c57);)c+=1;if(s=e.charCodeAt(c),l=e.charCodeAt(c+1),s===o&&l>=48&&l<=57)for(c+=2;c57);)c+=1;if(s=e.charCodeAt(c),l=e.charCodeAt(c+1),a=e.charCodeAt(c+2),(s===r||s===i)&&(l>=48&&l<=57||(l===n||l===t)&&a>=48&&a<=57))for(c+=l===n||l===t?3:2;c57);)c+=1;return{number:e.slice(0,c),unit:e.slice(c)}}},8703:e=>{e.exports=function e(t,n,o){var r,i,s,l;for(r=0,i=t.length;r{"use strict";e.exports=window.React},9746:()=>{},9977:()=>{},197:()=>{},1866:()=>{},2739:()=>{},5042:e=>{e.exports={nanoid:(e=21)=>{let t="",n=e;for(;n--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(n=t)=>{let o="",r=n;for(;r--;)o+=e[Math.random()*e.length|0];return o}}}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o].call(i.exports,i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};(()=>{"use strict";n.r(o),n.d(o,{AlignmentControl:()=>tg,AlignmentToolbar:()=>ng,Autocomplete:()=>MB,BlockAlignmentControl:()=>ea,BlockAlignmentToolbar:()=>ta,BlockBreadcrumb:()=>DB,BlockCanvas:()=>eE,BlockColorsStyleSelector:()=>rE,BlockContextProvider:()=>mb,BlockControls:()=>Ss,BlockEdit:()=>wb,BlockEditorKeyboardShortcuts:()=>db,BlockEditorProvider:()=>hb,BlockFormatControls:()=>ys,BlockIcon:()=>rb,BlockInspector:()=>OP,BlockList:()=>By,BlockMover:()=>tI,BlockNavigationDropdown:()=>AE,BlockPopover:()=>pm,BlockPreview:()=>MS,BlockSelectionClearer:()=>Yx,BlockSettingsMenu:()=>_j,BlockSettingsMenuControls:()=>hj,BlockStyles:()=>zE,BlockTitle:()=>OB,BlockToolbar:()=>Fj,BlockTools:()=>Wj,BlockVerticalAlignmentControl:()=>cl,BlockVerticalAlignmentToolbar:()=>ul,ButtonBlockAppender:()=>yC,ButtonBlockerAppender:()=>xC,ColorPalette:()=>lT,ColorPaletteControl:()=>aT,ContrastChecker:()=>Ep,CopyHandler:()=>zP,DefaultBlockAppender:()=>Dx,FontSizePicker:()=>vB,HeadingLevelDropdown:()=>$E,HeightControl:()=>Eg,InnerBlocks:()=>fy,Inserter:()=>vC,InspectorAdvancedControls:()=>Ia,InspectorControls:()=>ja,JustifyContentControl:()=>hl,JustifyToolbar:()=>gl,LineHeightControl:()=>eh,LinkControl:()=>Kc,MediaPlaceholder:()=>pM,MediaReplaceFlow:()=>Yc,MediaUpload:()=>Aa,MediaUploadCheck:()=>Oa,MultiSelectScrollIntoView:()=>GP,NavigableToolbar:()=>Pj,ObserveTyping:()=>_y,PanelColorSettings:()=>hM,PlainText:()=>WM,RecursionProvider:()=>YP,RichText:()=>GM,RichTextShortcut:()=>qM,RichTextToolbarButton:()=>YM,SETTINGS_DEFAULTS:()=>I,SkipToSelectedBlock:()=>hP,ToolSelector:()=>JM,Typewriter:()=>ZP,URLInput:()=>Ka,URLInputButton:()=>oP,URLPopover:()=>aM,Warning:()=>xb,WritingFlow:()=>qy,__experimentalBlockAlignmentMatrixControl:()=>LB,__experimentalBlockFullHeightAligmentControl:()=>RB,__experimentalBlockPatternSetup:()=>tT,__experimentalBlockPatternsList:()=>tw,__experimentalBlockVariationPicker:()=>WE,__experimentalBlockVariationTransforms:()=>iT,__experimentalBorderRadiusControl:()=>Sd,__experimentalColorGradientControl:()=>pp,__experimentalColorGradientSettingsDropdown:()=>fT,__experimentalDateFormatPicker:()=>dT,__experimentalDuotoneControl:()=>zm,__experimentalFontAppearanceControl:()=>Jp,__experimentalFontFamilyControl:()=>Xp,__experimentalGetBorderClassesAndStyles:()=>nB,__experimentalGetColorClassesAndStyles:()=>iB,__experimentalGetElementClassName:()=>rR,__experimentalGetGapCSSValue:()=>el,__experimentalGetGradientClass:()=>np,__experimentalGetGradientObjectByGradientValue:()=>rp,__experimentalGetShadowClassesAndStyles:()=>rB,__experimentalGetSpacingClassesAndStyles:()=>lB,__experimentalImageEditor:()=>eM,__experimentalImageSizeControl:()=>rM,__experimentalImageURLInputUI:()=>uP,__experimentalInspectorPopoverHeader:()=>eR,__experimentalLetterSpacingControl:()=>th,__experimentalLibrary:()=>HP,__experimentalLinkControl:()=>Wc,__experimentalLinkControlSearchInput:()=>jc,__experimentalLinkControlSearchItem:()=>dc,__experimentalLinkControlSearchResults:()=>_c,__experimentalListView:()=>NE,__experimentalPanelColorGradientSettings:()=>_T,__experimentalPreviewOptions:()=>dP,__experimentalPublishDateTimePicker:()=>nR,__experimentalRecursionProvider:()=>QP,__experimentalResponsiveBlockControl:()=>ZM,__experimentalSpacingSizesControl:()=>Ig,__experimentalTextDecorationControl:()=>bh,__experimentalTextTransformControl:()=>hh,__experimentalUnitControl:()=>eP,__experimentalUseBlockOverlayActive:()=>zB,__experimentalUseBlockPreview:()=>PS,__experimentalUseBorderProps:()=>oB,__experimentalUseColorProps:()=>sB,__experimentalUseCustomSides:()=>Cm,__experimentalUseGradient:()=>sp,__experimentalUseHasRecursion:()=>JP,__experimentalUseMultipleOriginColorsAndGradients:()=>cd,__experimentalUseResizeCanvas:()=>pP,__experimentalWritingModeControl:()=>xh,__unstableBlockNameContext:()=>Ej,__unstableBlockSettingsMenuFirstItem:()=>KI,__unstableBlockToolbarLastItem:()=>PI,__unstableEditorStyles:()=>yS,__unstableIframe:()=>tS,__unstableInserterMenuExtension:()=>iC,__unstableRichTextInputEvent:()=>XM,__unstableUseBlockSelectionClearer:()=>qx,__unstableUseClipboardHandler:()=>DP,__unstableUseMouseMoveTypingReset:()=>ky,__unstableUseTypewriter:()=>KP,__unstableUseTypingObserver:()=>vy,createCustomColorsHOC:()=>bB,getColorClassName:()=>ad,getColorObjectByAttributeValues:()=>sd,getColorObjectByColorValue:()=>ld,getComputedFluidTypographyValue:()=>Mi,getCustomValueFromPreset:()=>qs,getFontSize:()=>Uh,getFontSizeClass:()=>Kh,getFontSizeObjectByValue:()=>Wh,getGradientSlugByValue:()=>ip,getGradientValueBySlug:()=>op,getPxFromCssUnit:()=>iR,getSpacingPresetCssVar:()=>Xs,getTypographyClassesAndStyles:()=>cB,isValueSpacingPreset:()=>Zs,privateApis:()=>XN,store:()=>_i,storeConfig:()=>vi,transformStyles:()=>_S,useBlockBindingsUtils:()=>$C,useBlockCommands:()=>Xj,useBlockDisplayInformation:()=>sf,useBlockEditContext:()=>_,useBlockEditingMode:()=>na,useBlockProps:()=>Mx,useCachedTruthy:()=>uB,useHasRecursion:()=>XP,useInnerBlocksProps:()=>my,useSetting:()=>Si,useSettings:()=>yi,useStyleOverride:()=>ps,withColorContext:()=>sT,withColors:()=>kB,withFontSizes:()=>yB});var e={};n.r(e),n.d(e,{getAllPatterns:()=>ze,getBlockRemovalRules:()=>Me,getBlockSettings:()=>ye,getBlockStyles:()=>Ye,getBlockWithoutAttributes:()=>Ce,getClosestAllowedInsertionPoint:()=>et,getClosestAllowedInsertionPointForPattern:()=>tt,getContentLockingParent:()=>Ue,getEnabledBlockParents:()=>Ee,getEnabledClientIdsTree:()=>je,getExpandedBlock:()=>$e,getInserterMediaCategories:()=>Le,getInsertionPoint:()=>nt,getLastFocus:()=>He,getLastInsertedBlocksClientIds:()=>we,getOpenedBlockSettingsMenu:()=>Pe,getParentSectionBlock:()=>We,getPatternBySlug:()=>De,getRegisteredInserterMediaCategories:()=>Ne,getRemovalPromptData:()=>Te,getReusableBlocks:()=>Fe,getSectionRootClientId:()=>Xe,getStyleOverrides:()=>Re,getTemporarilyEditingAsBlocks:()=>Ze,getTemporarilyEditingFocusModeToRevert:()=>qe,getZoomLevel:()=>Je,hasAllowedPatterns:()=>Ae,isBlockInterfaceHidden:()=>Se,isBlockSubtreeDisabled:()=>Be,isDragging:()=>Ge,isSectionBlock:()=>Ke,isZoomOut:()=>Qe});var t={};n.r(t),n.d(t,{__experimentalGetActiveBlockIdByBlockNames:()=>So,__experimentalGetAllowedBlocks:()=>Qn,__experimentalGetAllowedPatterns:()=>io,__experimentalGetBlockListSettingsForBlocks:()=>ho,__experimentalGetDirectInsertBlock:()=>eo,__experimentalGetGlobalBlocksByName:()=>Et,__experimentalGetLastBlockAttributeChanges:()=>fo,__experimentalGetParsedPattern:()=>to,__experimentalGetPatternTransformItems:()=>ao,__experimentalGetPatternsByBlockTypes:()=>lo,__experimentalGetReusableBlockTitle:()=>go,__unstableGetBlockWithoutInnerBlocks:()=>xt,__unstableGetClientIdWithClientIdsTree:()=>St,__unstableGetClientIdsTree:()=>wt,__unstableGetContentLockingParent:()=>Ro,__unstableGetEditorMode:()=>ko,__unstableGetSelectedBlocksWithPartialSelection:()=>dn,__unstableGetTemporarilyEditingAsBlocks:()=>No,__unstableGetTemporarilyEditingFocusModeToRevert:()=>Lo,__unstableGetVisibleBlocks:()=>Io,__unstableHasActiveBlockOverlayActive:()=>jo,__unstableIsFullySelected:()=>ln,__unstableIsLastBlockChangeIgnored:()=>mo,__unstableIsSelectionCollapsed:()=>an,__unstableIsSelectionMergeable:()=>un,__unstableIsWithinBlockOverlay:()=>Eo,__unstableSelectionHasUnmergeableBlock:()=>cn,areInnerBlocksControlled:()=>yo,canEditBlock:()=>Hn,canInsertBlockType:()=>An,canInsertBlocks:()=>On,canLockBlockType:()=>Gn,canMoveBlock:()=>Vn,canMoveBlocks:()=>Fn,canRemoveBlock:()=>Dn,canRemoveBlocks:()=>zn,didAutomaticChange:()=>_o,getAdjacentBlockClientId:()=>Wt,getAllowedBlocks:()=>Xn,getBlock:()=>_t,getBlockAttributes:()=>vt,getBlockCount:()=>Pt,getBlockEditingMode:()=>To,getBlockHierarchyRootClientId:()=>$t,getBlockIndex:()=>hn,getBlockInsertionPoint:()=>En,getBlockListSettings:()=>co,getBlockMode:()=>yn,getBlockName:()=>bt,getBlockNamesByClientId:()=>Mt,getBlockOrder:()=>pn,getBlockParents:()=>Ht,getBlockParentsByBlockName:()=>Gt,getBlockRootClientId:()=>Ft,getBlockSelectionEnd:()=>At,getBlockSelectionStart:()=>Lt,getBlockTransformItems:()=>qn,getBlocks:()=>yt,getBlocksByClientId:()=>Tt,getBlocksByName:()=>jt,getClientIdsOfDescendants:()=>Ct,getClientIdsWithDescendants:()=>Bt,getDirectInsertBlock:()=>Jn,getDraggedBlockClientIds:()=>Cn,getFirstMultiSelectedBlockClientId:()=>Jt,getGlobalBlockCount:()=>It,getHoveredBlockClientId:()=>Bo,getInserterItems:()=>Zn,getLastMultiSelectedBlockClientId:()=>en,getLowestCommonAncestorWithSelectedBlock:()=>Ut,getMultiSelectedBlockClientIds:()=>Xt,getMultiSelectedBlocks:()=>Qt,getMultiSelectedBlocksEndClientId:()=>sn,getMultiSelectedBlocksStartClientId:()=>rn,getNextBlockClientId:()=>Zt,getPatternsByBlockTypes:()=>so,getPreviousBlockClientId:()=>Kt,getSelectedBlock:()=>Vt,getSelectedBlockClientId:()=>zt,getSelectedBlockClientIds:()=>Yt,getSelectedBlockCount:()=>Ot,getSelectedBlocksInitialCaretPosition:()=>qt,getSelectionEnd:()=>Nt,getSelectionStart:()=>Rt,getSettings:()=>uo,getTemplate:()=>Pn,getTemplateLock:()=>Rn,hasBlockMovingClientId:()=>vo,hasDraggedInnerBlock:()=>fn,hasInserterItems:()=>Yn,hasMultiSelection:()=>kn,hasSelectedBlock:()=>Dt,hasSelectedInnerBlock:()=>mn,isAncestorBeingDragged:()=>In,isAncestorMultiSelected:()=>on,isBlockBeingDragged:()=>Bn,isBlockHighlighted:()=>xo,isBlockInsertionPointVisible:()=>Tn,isBlockMultiSelected:()=>nn,isBlockSelected:()=>gn,isBlockValid:()=>kt,isBlockVisible:()=>Co,isBlockWithinSelection:()=>bn,isCaretWithinFormattedText:()=>jn,isDraggingBlocks:()=>wn,isFirstMultiSelectedBlock:()=>tn,isGroupable:()=>Po,isLastBlockChangePersistent:()=>po,isMultiSelecting:()=>vn,isNavigationMode:()=>bo,isSelectionEnabled:()=>xn,isTyping:()=>Sn,isUngroupable:()=>Mo,isValidTemplate:()=>Mn,wasBlockJustInserted:()=>wo});var r={};n.r(r),n.d(r,{__experimentalUpdateSettings:()=>Do,clearBlockRemovalPrompt:()=>$o,deleteStyleOverride:()=>Zo,ensureDefaultBlock:()=>Ho,expandBlock:()=>Jo,hideBlockInterface:()=>zo,modifyContentLockBlock:()=>tr,privateRemoveBlocks:()=>Fo,resetZoomLevel:()=>or,setBlockRemovalRules:()=>Uo,setInsertionPoint:()=>er,setLastFocus:()=>qo,setOpenedBlockSettingsMenu:()=>Wo,setStyleOverride:()=>Ko,setZoomLevel:()=>nr,showBlockInterface:()=>Vo,startDragging:()=>Xo,stopDragging:()=>Qo,stopEditingAsBlocks:()=>Yo});var i={};n.r(i),n.d(i,{__unstableDeleteSelection:()=>Or,__unstableExpandSelection:()=>zr,__unstableMarkAutomaticChange:()=>ri,__unstableMarkLastChangeAsPersistent:()=>ni,__unstableMarkNextChangeAsNotPersistent:()=>oi,__unstableSaveReusableBlock:()=>ti,__unstableSetEditorMode:()=>si,__unstableSetTemporarilyEditingAsBlocks:()=>mi,__unstableSplitSelection:()=>Dr,clearSelectedBlock:()=>yr,duplicateBlocks:()=>ai,enterFormattedText:()=>qr,exitFormattedText:()=>Yr,flashBlock:()=>pi,hideInsertionPoint:()=>Nr,hoverBlock:()=>fr,insertAfterBlock:()=>ui,insertBeforeBlock:()=>ci,insertBlock:()=>Mr,insertBlocks:()=>Pr,insertDefaultBlock:()=>Qr,mergeBlocks:()=>Vr,moveBlockToPosition:()=>Tr,moveBlocksDown:()=>Ir,moveBlocksToPosition:()=>Er,moveBlocksUp:()=>jr,multiSelect:()=>xr,receiveBlocks:()=>pr,registerInserterMediaCategory:()=>fi,removeBlock:()=>Hr,removeBlocks:()=>Fr,replaceBlock:()=>Cr,replaceBlocks:()=>wr,replaceInnerBlocks:()=>Gr,resetBlocks:()=>cr,resetSelection:()=>dr,selectBlock:()=>mr,selectNextBlock:()=>kr,selectPreviousBlock:()=>br,selectionChange:()=>Xr,setBlockEditingMode:()=>bi,setBlockMovingClientId:()=>li,setBlockVisibility:()=>gi,setHasControlledInnerBlocks:()=>hi,setNavigationMode:()=>ii,setTemplateValidity:()=>Lr,showInsertionPoint:()=>Rr,startDraggingBlocks:()=>Kr,startMultiSelect:()=>vr,startTyping:()=>Ur,stopDraggingBlocks:()=>Zr,stopMultiSelect:()=>_r,stopTyping:()=>Wr,synchronizeTemplate:()=>Ar,toggleBlockHighlight:()=>di,toggleBlockMode:()=>$r,toggleSelection:()=>Sr,unsetBlockEditingMode:()=>ki,updateBlock:()=>gr,updateBlockAttributes:()=>hr,updateBlockListSettings:()=>Jr,updateSettings:()=>ei,validateBlocksToTemplate:()=>ur});var s={};n.r(s),n.d(s,{AdvancedPanel:()=>aR,BackgroundPanel:()=>pu,BorderPanel:()=>Fd,ColorPanel:()=>jp,DimensionsPanel:()=>Xg,FiltersPanel:()=>Qm,GlobalStylesContext:()=>Xi,ImageSettingsPanel:()=>lR,TypographyPanel:()=>Oh,areGlobalStyleConfigsEqual:()=>qi,getBlockCSSSelector:()=>Gm,getBlockSelectors:()=>Tf,getGlobalStylesChanges:()=>fR,getLayoutStyles:()=>wf,toStyles:()=>Ef,useGlobalSetting:()=>ts,useGlobalStyle:()=>ns,useGlobalStylesOutput:()=>Rf,useGlobalStylesOutputWithConfig:()=>Pf,useGlobalStylesReset:()=>es,useHasBackgroundPanel:()=>cu,useHasBorderPanel:()=>Pd,useHasBorderPanelControls:()=>Rd,useHasColorPanel:()=>gp,useHasDimensionsPanel:()=>Dg,useHasFiltersPanel:()=>Wm,useHasImageSettingsPanel:()=>sR,useHasTypographyPanel:()=>wh,useSettingsForBlockElement:()=>os});const l=window.wp.blocks,a=window.wp.element,c=window.wp.data,u=window.wp.compose,d=window.wp.hooks,p=Symbol("mayDisplayControls"),h=Symbol("mayDisplayParentControls"),g=Symbol("blockEditingMode"),m=Symbol("blockBindings"),f=Symbol("isPreviewMode"),b={name:"",isSelected:!1},k=(0,a.createContext)(b),{Provider:v}=k;function _(){return(0,a.useContext)(k)}const x=window.wp.deprecated;var y=n.n(x),S=n(7734),w=n.n(S);const C=window.wp.i18n,B={insertUsage:{}},I={alignWide:!1,supportsLayout:!0,colors:[{name:(0,C.__)("Black"),slug:"black",color:"#000000"},{name:(0,C.__)("Cyan bluish gray"),slug:"cyan-bluish-gray",color:"#abb8c3"},{name:(0,C.__)("White"),slug:"white",color:"#ffffff"},{name:(0,C.__)("Pale pink"),slug:"pale-pink",color:"#f78da7"},{name:(0,C.__)("Vivid red"),slug:"vivid-red",color:"#cf2e2e"},{name:(0,C.__)("Luminous vivid orange"),slug:"luminous-vivid-orange",color:"#ff6900"},{name:(0,C.__)("Luminous vivid amber"),slug:"luminous-vivid-amber",color:"#fcb900"},{name:(0,C.__)("Light green cyan"),slug:"light-green-cyan",color:"#7bdcb5"},{name:(0,C.__)("Vivid green cyan"),slug:"vivid-green-cyan",color:"#00d084"},{name:(0,C.__)("Pale cyan blue"),slug:"pale-cyan-blue",color:"#8ed1fc"},{name:(0,C.__)("Vivid cyan blue"),slug:"vivid-cyan-blue",color:"#0693e3"},{name:(0,C.__)("Vivid purple"),slug:"vivid-purple",color:"#9b51e0"}],fontSizes:[{name:(0,C._x)("Small","font size name"),size:13,slug:"small"},{name:(0,C._x)("Normal","font size name"),size:16,slug:"normal"},{name:(0,C._x)("Medium","font size name"),size:20,slug:"medium"},{name:(0,C._x)("Large","font size name"),size:36,slug:"large"},{name:(0,C._x)("Huge","font size name"),size:42,slug:"huge"}],imageDefaultSize:"large",imageSizes:[{slug:"thumbnail",name:(0,C.__)("Thumbnail")},{slug:"medium",name:(0,C.__)("Medium")},{slug:"large",name:(0,C.__)("Large")},{slug:"full",name:(0,C.__)("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,C.__)("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,C.__)("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,C.__)("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,C.__)("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,C.__)("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,C.__)("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,C.__)("Blush light purple"),gradient:"linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)",slug:"blush-light-purple"},{name:(0,C.__)("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,C.__)("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,C.__)("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,C.__)("Electric grass"),gradient:"linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%)",slug:"electric-grass"},{name:(0,C.__)("Midnight"),gradient:"linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%)",slug:"midnight"}],__unstableResolvedAssets:{styles:[],scripts:[]}};function j(e,t,n){return[...e.slice(0,n),...Array.isArray(t)?t:[t],...e.slice(n)]}function E(e,t,n,o=1){const r=[...e];return r.splice(t,o),j(r,e.slice(t,t+o),n)}const T=Symbol("globalStylesDataKey"),M=Symbol("globalStylesLinks"),P=Symbol("selectBlockPatternsKey"),R=Symbol("reusableBlocksSelect"),N=Symbol("sectionRootClientIdKey"),L=window.wp.privateApis,{lock:A,unlock:O}=(0,L.__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"),{isContentBlock:D}=O(l.privateApis),z=e=>e;function V(e,t=""){const n=new Map,o=[];return n.set(t,o),e.forEach((e=>{const{clientId:t,innerBlocks:r}=e;o.push(t),V(r,t).forEach(((e,t)=>{n.set(t,e)}))})),n}function F(e,t=""){const n=[],o=[[t,e]];for(;o.length;){const[e,t]=o.shift();t.forEach((({innerBlocks:t,...r})=>{n.push([r.clientId,e]),t?.length&&o.push([r.clientId,t])}))}return n}function H(e,t=z){const n=[],o=[...e];for(;o.length;){const{innerBlocks:e,...r}=o.shift();o.push(...e),n.push([r.clientId,t(r)])}return n}function G(e){return H(e,(e=>{const{attributes:t,...n}=e;return n}))}function $(e){return H(e,(e=>e.attributes))}function U(e,t){return"UPDATE_BLOCK_ATTRIBUTES"===e.type&&void 0!==t&&"UPDATE_BLOCK_ATTRIBUTES"===t.type&&w()(e.clientIds,t.clientIds)&&function(e,t){return w()(Object.keys(e),Object.keys(t))}(e.attributes,t.attributes)}function W(e,t){const n=e.tree,o=[...t],r=[...t];for(;o.length;){const e=o.shift();o.push(...e.innerBlocks),r.push(...e.innerBlocks)}for(const e of r)n.set(e.clientId,{});for(const t of r)n.set(t.clientId,Object.assign(n.get(t.clientId),{...e.byClientId.get(t.clientId),attributes:e.attributes.get(t.clientId),innerBlocks:t.innerBlocks.map((e=>n.get(e.clientId)))}))}function K(e,t,n=!1){const o=e.tree,r=new Set([]),i=new Set;for(const o of t){let t=n?o:e.parents.get(o);do{if(e.controlledInnerBlocks[t]){i.add(t);break}r.add(t),t=e.parents.get(t)}while(void 0!==t)}for(const e of r)o.set(e,{...o.get(e)});for(const t of r)o.get(t).innerBlocks=(e.order.get(t)||[]).map((e=>o.get(e)));for(const t of i)o.set("controlled||"+t,{innerBlocks:(e.order.get(t)||[]).map((e=>o.get(e)))})}const Z=(0,u.pipe)(c.combineReducers,(e=>(t,n)=>{if(t&&"SAVE_REUSABLE_BLOCK_SUCCESS"===n.type){const{id:e,updatedId:o}=n;if(e===o)return t;(t={...t}).attributes=new Map(t.attributes),t.attributes.forEach(((n,r)=>{const{name:i}=t.byClientId.get(r);"core/block"===i&&n.ref===e&&t.attributes.set(r,{...n,ref:o})}))}return e(t,n)}),(e=>(t={},n)=>{const o=e(t,n);if(o===t)return t;switch(o.tree=t.tree?t.tree:new Map,n.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":o.tree=new Map(o.tree),W(o,n.blocks),K(o,n.rootClientId?[n.rootClientId]:[""],!0);break;case"UPDATE_BLOCK":o.tree=new Map(o.tree),o.tree.set(n.clientId,{...o.tree.get(n.clientId),...o.byClientId.get(n.clientId),attributes:o.attributes.get(n.clientId)}),K(o,[n.clientId],!1);break;case"SYNC_DERIVED_BLOCK_ATTRIBUTES":case"UPDATE_BLOCK_ATTRIBUTES":o.tree=new Map(o.tree),n.clientIds.forEach((e=>{o.tree.set(e,{...o.tree.get(e),attributes:o.attributes.get(e)})})),K(o,n.clientIds,!1);break;case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const e=function(e){const t={},n=[...e];for(;n.length;){const{innerBlocks:e,...o}=n.shift();n.push(...e),t[o.clientId]=!0}return t}(n.blocks);o.tree=new Map(o.tree),n.replacedClientIds.forEach((t=>{o.tree.delete(t),e[t]||o.tree.delete("controlled||"+t)})),W(o,n.blocks),K(o,n.blocks.map((e=>e.clientId)),!1);const r=[];for(const e of n.clientIds){const n=t.parents.get(e);void 0===n||""!==n&&!o.byClientId.get(n)||r.push(n)}K(o,r,!0);break}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":const e=[];for(const r of n.clientIds){const n=t.parents.get(r);void 0===n||""!==n&&!o.byClientId.get(n)||e.push(n)}o.tree=new Map(o.tree),n.removedClientIds.forEach((e=>{o.tree.delete(e),o.tree.delete("controlled||"+e)})),K(o,e,!0);break;case"MOVE_BLOCKS_TO_POSITION":{const e=[];n.fromRootClientId?e.push(n.fromRootClientId):e.push(""),n.toRootClientId&&e.push(n.toRootClientId),o.tree=new Map(o.tree),K(o,e,!0);break}case"MOVE_BLOCKS_UP":case"MOVE_BLOCKS_DOWN":{const e=[n.rootClientId?n.rootClientId:""];o.tree=new Map(o.tree),K(o,e,!0);break}case"SAVE_REUSABLE_BLOCK_SUCCESS":{const e=[];o.attributes.forEach(((t,r)=>{"core/block"===o.byClientId.get(r).name&&t.ref===n.updatedId&&e.push(r)})),o.tree=new Map(o.tree),e.forEach((e=>{o.tree.set(e,{...o.byClientId.get(e),attributes:o.attributes.get(e),innerBlocks:o.tree.get(e).innerBlocks})})),K(o,e,!1)}}return o}),(e=>(t,n)=>{const o=e=>{let o=e;for(let r=0;r(t,n)=>{if("REPLACE_INNER_BLOCKS"!==n.type)return e(t,n);const o={};if(Object.keys(t.controlledInnerBlocks).length){const e=[...n.blocks];for(;e.length;){const{innerBlocks:n,...r}=e.shift();e.push(...n),t.controlledInnerBlocks[r.clientId]&&(o[r.clientId]=!0)}}let r=t;t.order.get(n.rootClientId)&&(r=e(r,{type:"REMOVE_BLOCKS",keepControlledInnerBlocks:o,clientIds:t.order.get(n.rootClientId)}));let i=r;if(n.blocks.length){i=e(i,{...n,type:"INSERT_BLOCKS",index:0});const r=new Map(i.order);Object.keys(o).forEach((e=>{t.order.get(e)&&r.set(e,t.order.get(e))})),i.order=r,i.tree=new Map(i.tree),Object.keys(o).forEach((e=>{const n=`controlled||${e}`;t.tree.has(n)&&i.tree.set(n,t.tree.get(n))}))}return i}),(e=>(t,n)=>{if("RESET_BLOCKS"===n.type){const e={...t,byClientId:new Map(G(n.blocks)),attributes:new Map($(n.blocks)),order:V(n.blocks),parents:new Map(F(n.blocks)),controlledInnerBlocks:{}};return e.tree=new Map(t?.tree),W(e,n.blocks),e.tree.set("",{innerBlocks:n.blocks.map((t=>e.tree.get(t.clientId)))}),e}return e(t,n)}),(function(e){let t,n,o=!1;return(r,i)=>{let s,l=e(r,i);var a;if("SET_EXPLICIT_PERSISTENT"===i.type&&(n=i.isPersistentChange,s=null===(a=r.isPersistentChange)||void 0===a||a),void 0!==n)return s=n,s===l.isPersistentChange?l:{...l,isPersistentChange:s};const c="MARK_LAST_CHANGE_AS_PERSISTENT"===i.type||o;var u;return r!==l||c?(l={...l,isPersistentChange:c?!o:!U(i,t)},t=i,o="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===i.type,l):(o="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===i.type,s=null===(u=r?.isPersistentChange)||void 0===u||u,r.isPersistentChange===s?r:{...l,isPersistentChange:s})}}),(function(e){const t=new Set(["RECEIVE_BLOCKS"]);return(n,o)=>{const r=e(n,o);return r!==n&&(r.isIgnoredChange=t.has(o.type)),r}}),(e=>(t,n)=>{if("SET_HAS_CONTROLLED_INNER_BLOCKS"===n.type){const o=e(t,{type:"REPLACE_INNER_BLOCKS",rootClientId:n.clientId,blocks:[]});return e(o,n)}return e(t,n)}))({byClientId(e=new Map,t){switch(t.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{const n=new Map(e);return G(t.blocks).forEach((([e,t])=>{n.set(e,t)})),n}case"UPDATE_BLOCK":{if(!e.has(t.clientId))return e;const{attributes:n,...o}=t.updates;if(0===Object.values(o).length)return e;const r=new Map(e);return r.set(t.clientId,{...e.get(t.clientId),...o}),r}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{if(!t.blocks)return e;const n=new Map(e);return t.replacedClientIds.forEach((e=>{n.delete(e)})),G(t.blocks).forEach((([e,t])=>{n.set(e,t)})),n}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.removedClientIds.forEach((e=>{n.delete(e)})),n}}return e},attributes(e=new Map,t){switch(t.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{const n=new Map(e);return $(t.blocks).forEach((([e,t])=>{n.set(e,t)})),n}case"UPDATE_BLOCK":{if(!e.get(t.clientId)||!t.updates.attributes)return e;const n=new Map(e);return n.set(t.clientId,{...e.get(t.clientId),...t.updates.attributes}),n}case"SYNC_DERIVED_BLOCK_ATTRIBUTES":case"UPDATE_BLOCK_ATTRIBUTES":{if(t.clientIds.every((t=>!e.get(t))))return e;let o=!1;const r=new Map(e);for(const i of t.clientIds){var n;const s=Object.entries(t.uniqueByBlock?t.attributes[i]:null!==(n=t.attributes)&&void 0!==n?n:{});if(0===s.length)continue;let l=!1;const a=e.get(i),c={};s.forEach((([e,t])=>{a[e]!==t&&(l=!0,c[e]=t)})),o=o||l,l&&r.set(i,{...a,...c})}return o?r:e}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{if(!t.blocks)return e;const n=new Map(e);return t.replacedClientIds.forEach((e=>{n.delete(e)})),$(t.blocks).forEach((([e,t])=>{n.set(e,t)})),n}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.removedClientIds.forEach((e=>{n.delete(e)})),n}}return e},order(e=new Map,t){switch(t.type){case"RECEIVE_BLOCKS":{var n;const o=V(t.blocks),r=new Map(e);return o.forEach(((e,t)=>{""!==t&&r.set(t,e)})),r.set("",(null!==(n=e.get(""))&&void 0!==n?n:[]).concat(o[""])),r}case"INSERT_BLOCKS":{const{rootClientId:n=""}=t,o=e.get(n)||[],r=V(t.blocks,n),{index:i=o.length}=t,s=new Map(e);return r.forEach(((e,t)=>{s.set(t,e)})),s.set(n,j(o,r.get(n),i)),s}case"MOVE_BLOCKS_TO_POSITION":{var o;const{fromRootClientId:n="",toRootClientId:r="",clientIds:i}=t,{index:s=e.get(r).length}=t;if(n===r){const t=e.get(r).indexOf(i[0]),n=new Map(e);return n.set(r,E(e.get(r),t,s,i.length)),n}const l=new Map(e);return l.set(n,null!==(o=e.get(n)?.filter((e=>!i.includes(e))))&&void 0!==o?o:[]),l.set(r,j(e.get(r),i,s)),l}case"MOVE_BLOCKS_UP":{const{clientIds:n,rootClientId:o=""}=t,r=n[0],i=e.get(o);if(!i.length||r===i[0])return e;const s=i.indexOf(r),l=new Map(e);return l.set(o,E(i,s,s-1,n.length)),l}case"MOVE_BLOCKS_DOWN":{const{clientIds:n,rootClientId:o=""}=t,r=n[0],i=n[n.length-1],s=e.get(o);if(!s.length||i===s[s.length-1])return e;const l=s.indexOf(r),a=new Map(e);return a.set(o,E(s,l,l+1,n.length)),a}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const{clientIds:n}=t;if(!t.blocks)return e;const o=V(t.blocks),r=new Map(e);return t.replacedClientIds.forEach((e=>{r.delete(e)})),o.forEach(((e,t)=>{""!==t&&r.set(t,e)})),r.forEach(((e,t)=>{const i=Object.values(e).reduce(((e,t)=>t===n[0]?[...e,...o.get("")]:(-1===n.indexOf(t)&&e.push(t),e)),[]);r.set(t,i)})),r}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.removedClientIds.forEach((e=>{n.delete(e)})),n.forEach(((e,o)=>{var r;const i=null!==(r=e?.filter((e=>!t.removedClientIds.includes(e))))&&void 0!==r?r:[];i.length!==e.length&&n.set(o,i)})),n}}return e},parents(e=new Map,t){switch(t.type){case"RECEIVE_BLOCKS":{const n=new Map(e);return F(t.blocks).forEach((([e,t])=>{n.set(e,t)})),n}case"INSERT_BLOCKS":{const n=new Map(e);return F(t.blocks,t.rootClientId||"").forEach((([e,t])=>{n.set(e,t)})),n}case"MOVE_BLOCKS_TO_POSITION":{const n=new Map(e);return t.clientIds.forEach((e=>{n.set(e,t.toRootClientId||"")})),n}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.replacedClientIds.forEach((e=>{n.delete(e)})),F(t.blocks,e.get(t.clientIds[0])).forEach((([e,t])=>{n.set(e,t)})),n}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.removedClientIds.forEach((e=>{n.delete(e)})),n}}return e},controlledInnerBlocks:(e={},{type:t,clientId:n,hasControlledInnerBlocks:o})=>"SET_HAS_CONTROLLED_INNER_BLOCKS"===t?{...e,[n]:o}:e});function q(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?{clientId:t.blocks[0].clientId}:e;case"REMOVE_BLOCKS":return t.clientIds&&t.clientIds.length&&-1!==t.clientIds.indexOf(e.clientId)?{}:e;case"REPLACE_BLOCKS":{if(-1===t.clientIds.indexOf(e.clientId))return e;const n=t.blocks[t.indexToSelect]||t.blocks[t.blocks.length-1];return n?n.clientId===e.clientId?e:{clientId:n.clientId}:{}}}return e}const Y=(0,c.combineReducers)({blocks:Z,isDragging:function(e=!1,t){switch(t.type){case"START_DRAGGING":return!0;case"STOP_DRAGGING":return!1}return e},isTyping:function(e=!1,t){switch(t.type){case"START_TYPING":return!0;case"STOP_TYPING":return!1}return e},isBlockInterfaceHidden:function(e=!1,t){switch(t.type){case"HIDE_BLOCK_INTERFACE":return!0;case"SHOW_BLOCK_INTERFACE":return!1}return e},draggedBlocks:function(e=[],t){switch(t.type){case"START_DRAGGING_BLOCKS":return t.clientIds;case"STOP_DRAGGING_BLOCKS":return[]}return e},selection:function(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":const{selectionStart:n,selectionEnd:o}=t;return{selectionStart:n,selectionEnd:o};case"MULTI_SELECT":const{start:r,end:i}=t;return r===e.selectionStart?.clientId&&i===e.selectionEnd?.clientId?e:{selectionStart:{clientId:r},selectionEnd:{clientId:i}};case"RESET_BLOCKS":const s=e?.selectionStart?.clientId,l=e?.selectionEnd?.clientId;if(!s&&!l)return e;if(!t.blocks.some((e=>e.clientId===s)))return{selectionStart:{},selectionEnd:{}};if(!t.blocks.some((e=>e.clientId===l)))return{...e,selectionEnd:e.selectionStart}}const n=q(e.selectionStart,t),o=q(e.selectionEnd,t);return n===e.selectionStart&&o===e.selectionEnd?e:{selectionStart:n,selectionEnd:o}},isMultiSelecting:function(e=!1,t){switch(t.type){case"START_MULTI_SELECT":return!0;case"STOP_MULTI_SELECT":return!1}return e},isSelectionEnabled:function(e=!0,t){return"TOGGLE_SELECTION"===t.type?t.isSelectionEnabled:e},initialPosition:function(e=null,t){return"REPLACE_BLOCKS"===t.type&&void 0!==t.initialPosition||["MULTI_SELECT","SELECT_BLOCK","RESET_SELECTION","INSERT_BLOCKS","REPLACE_INNER_BLOCKS"].includes(t.type)?t.initialPosition:e},blocksMode:function(e={},t){if("TOGGLE_BLOCK_MODE"===t.type){const{clientId:n}=t;return{...e,[n]:e[n]&&"html"===e[n]?"visual":"html"}}return e},blockListSettings:(e={},t)=>{switch(t.type){case"REPLACE_BLOCKS":case"REMOVE_BLOCKS":return Object.fromEntries(Object.entries(e).filter((([e])=>!t.clientIds.includes(e))));case"UPDATE_BLOCK_LIST_SETTINGS":{const n="string"==typeof t.clientId?{[t.clientId]:t.settings}:t.clientId;for(const t in n)n[t]?w()(e[t],n[t])&&delete n[t]:e[t]||delete n[t];if(0===Object.keys(n).length)return e;const o={...e,...n};for(const e in n)n[e]||delete o[e];return o}}return e},insertionPoint:function(e=null,t){switch(t.type){case"SET_INSERTION_POINT":return t.value;case"SELECT_BLOCK":return null}return e},insertionCue:function(e=null,t){switch(t.type){case"SHOW_INSERTION_POINT":{const{rootClientId:n,index:o,__unstableWithInserter:r,operation:i,nearestSide:s}=t,l={rootClientId:n,index:o,__unstableWithInserter:r,operation:i,nearestSide:s};return w()(e,l)?e:l}case"HIDE_INSERTION_POINT":return null}return e},template:function(e={isValid:!0},t){return"SET_TEMPLATE_VALIDITY"===t.type?{...e,isValid:t.isValid}:e},settings:function(e=I,t){if("UPDATE_SETTINGS"===t.type){const n=t.reset?{...I,...t.settings}:{...e,...t.settings};return Object.defineProperty(n,"__unstableIsPreviewMode",{get(){return y()("__unstableIsPreviewMode",{since:"6.8",alternative:"isPreviewMode"}),this.isPreviewMode}}),n}return e},preferences:function(e=B,t){switch(t.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":{const n=t.blocks.reduce(((e,n)=>{const{attributes:o,name:r}=n;let i=r;const s=(0,c.select)(l.store).getActiveBlockVariation(r,o);return s?.name&&(i+="/"+s.name),"core/block"===r&&(i+="/"+o.ref),{...e,[i]:{time:t.time,count:e[i]?e[i].count+1:1}}}),e.insertUsage);return{...e,insertUsage:n}}}return e},lastBlockAttributesChange:function(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(((e,n)=>({...e,[n]:t.uniqueByBlock?t.attributes[n]:t.attributes})),{})}return e},lastFocus:function(e=!1,t){return"LAST_FOCUS"===t.type?t.lastFocus:e},expandedBlock:function(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},highlightedBlock:function(e,t){switch(t.type){case"TOGGLE_BLOCK_HIGHLIGHT":const{clientId:n,isHighlighted:o}=t;return o?n:e===n?null:e;case"SELECT_BLOCK":if(t.clientId!==e)return null}return e},lastBlockInserted:function(e={},t){switch(t.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":if(!t.blocks.length)return e;const n=t.blocks.map((e=>e.clientId)),o=t.meta?.source;return{clientIds:n,source:o};case"RESET_BLOCKS":return{}}return e},temporarilyEditingAsBlocks:function(e="",t){return"SET_TEMPORARILY_EDITING_AS_BLOCKS"===t.type?t.temporarilyEditingAsBlocks:e},temporarilyEditingFocusModeRevert:function(e="",t){return"SET_TEMPORARILY_EDITING_AS_BLOCKS"===t.type?t.focusModeToRevert:e},blockVisibility:function(e={},t){return"SET_BLOCK_VISIBILITY"===t.type?{...e,...t.updates}:e},blockEditingModes:function(e=new Map,t){switch(t.type){case"SET_BLOCK_EDITING_MODE":return new Map(e).set(t.clientId,t.mode);case"UNSET_BLOCK_EDITING_MODE":{const n=new Map(e);return n.delete(t.clientId),n}case"RESET_BLOCKS":return e.has("")?(new Map).set("",e.get("")):e}return e},styleOverrides:function(e=new Map,t){switch(t.type){case"SET_STYLE_OVERRIDE":return new Map(e).set(t.id,t.style);case"DELETE_STYLE_OVERRIDE":{const n=new Map(e);return n.delete(t.id),n}}return e},removalPromptData:function(e=!1,t){switch(t.type){case"DISPLAY_BLOCK_REMOVAL_PROMPT":const{clientIds:e,selectPrevious:n,message:o}=t;return{clientIds:e,selectPrevious:n,message:o};case"CLEAR_BLOCK_REMOVAL_PROMPT":return!1}return e},blockRemovalRules:function(e=!1,t){return"SET_BLOCK_REMOVAL_RULES"===t.type?t.rules:e},openedBlockSettingsMenu:function(e=null,t){var n;return"SET_OPENED_BLOCK_SETTINGS_MENU"===t.type?null!==(n=t?.clientId)&&void 0!==n?n:null:e},registeredInserterMediaCategories:function(e=[],t){return"REGISTER_INSERTER_MEDIA_CATEGORY"===t.type?[...e,t.category]:e},hoveredBlockClientId:function(e=!1,t){return"HOVER_BLOCK"===t.type?t.clientId:e},zoomLevel:function(e=100,t){switch(t.type){case"SET_ZOOM_LEVEL":return t.zoom;case"RESET_ZOOM_LEVEL":return 100}return e}});function X(e,t,n){const o=function(e,t){if(""===t){const n=e.blocks.tree.get(t);if(!n)return;return{clientId:"",...n}}if(!e.blocks.controlledInnerBlocks[t])return e.blocks.tree.get(t);const n=e.blocks.tree.get(`controlled||${t}`);return{...e.blocks.tree.get(t),innerBlocks:n?.innerBlocks}}(e,t);if(o&&(n(o),o?.innerBlocks?.length))for(const t of o?.innerBlocks)X(e,t.clientId,n)}function Q(e,t,n){let o=e.blocks.parents.get(t);for(;o;){if(n.includes(o))return o;o=e.blocks.parents.get(o)}}function J(e){return e?.attributes?.metadata?.bindings&&Object.keys(e?.attributes?.metadata?.bindings).length}function ee(e,t=!1,n=""){const o=e?.zoomLevel<100||"auto-scaled"===e?.zoomLevel,r=new Map,i=e.settings?.[N],s=e.blocks.order.get(i),l=Object.keys(e.blocks.controlledInnerBlocks).filter((t=>"core/block"===e.blocks.byClientId?.get(t)?.name));return X(e,n,(n=>{const{clientId:a,name:c}=n;if(o||t){if(a===i)return void r.set(a,"contentOnly");if(!s?.length)return void r.set(a,"disabled");if(s.includes(a))return void r.set(a,"contentOnly");if(o||!Q(e,a,s))return void r.set(a,"disabled");if(l.length){const t=Q(e,a,l);if(t)return Q(e,t,l)?void r.set(a,"disabled"):J(n)?void r.set(a,"contentOnly"):void r.set(a,"disabled")}return c&&D(c)?void r.set(a,"contentOnly"):void r.set(a,"disabled")}if(l.length){if(l.includes(a))return Q(e,a,l)?void r.set(a,"disabled"):void 0;const t=Q(e,a,l);if(t){if(Q(e,t,l))return void r.set(a,"disabled");if(J(n))return void r.set(a,"contentOnly");r.set(a,"disabled")}}})),r}function te({prevState:e,nextState:t,addedBlocks:n,removedClientIds:o,isNavMode:r=!1}){const i=r?e.derivedNavModeBlockEditingModes:e.derivedBlockEditingModes;let s;return o?.forEach((t=>{X(e,t,(e=>{i.has(e.clientId)&&(s||(s=new Map(i)),s.delete(e.clientId))}))})),n?.forEach((e=>{X(t,e.clientId,(e=>{const n=ee(t,r,e.clientId);n.size&&(s=s?new Map([...s?.size?s:[],...n]):new Map([...i?.size?i:[],...n]))}))})),s}const ne=(0,u.pipe)((function(e){return(t,n)=>{var o,r;const i=e(t,n);if("SET_EDITOR_MODE"!==n.type&&i===t)return t;switch(n.type){case"REMOVE_BLOCKS":{const e=te({prevState:t,nextState:i,removedClientIds:n.clientIds,isNavMode:!1}),o=te({prevState:t,nextState:i,removedClientIds:n.clientIds,isNavMode:!0});if(e||o)return{...i,derivedBlockEditingModes:null!=e?e:t.derivedBlockEditingModes,derivedNavModeBlockEditingModes:null!=o?o:t.derivedNavModeBlockEditingModes};break}case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{const e=te({prevState:t,nextState:i,addedBlocks:n.blocks,isNavMode:!1}),o=te({prevState:t,nextState:i,addedBlocks:n.blocks,isNavMode:!0});if(e||o)return{...i,derivedBlockEditingModes:null!=e?e:t.derivedBlockEditingModes,derivedNavModeBlockEditingModes:null!=o?o:t.derivedNavModeBlockEditingModes};break}case"SET_HAS_CONTROLLED_INNER_BLOCKS":{const e=i.blocks.tree.get(n.clientId);if(!e)break;const o=te({prevState:t,nextState:i,addedBlocks:[e],isNavMode:!1}),r=te({prevState:t,nextState:i,addedBlocks:[e],isNavMode:!0});if(o||r)return{...i,derivedBlockEditingModes:null!=o?o:t.derivedBlockEditingModes,derivedNavModeBlockEditingModes:null!=r?r:t.derivedNavModeBlockEditingModes};break}case"REPLACE_BLOCKS":{const e=te({prevState:t,nextState:i,addedBlocks:n.blocks,removedClientIds:n.clientIds,isNavMode:!1}),o=te({prevState:t,nextState:i,addedBlocks:n.blocks,removedClientIds:n.clientIds,isNavMode:!0});if(e||o)return{...i,derivedBlockEditingModes:null!=e?e:t.derivedBlockEditingModes,derivedNavModeBlockEditingModes:null!=o?o:t.derivedNavModeBlockEditingModes};break}case"REPLACE_INNER_BLOCKS":{const e=t.blocks.order.get(n.rootClientId),o=te({prevState:t,nextState:i,addedBlocks:n.blocks,removedClientIds:e,isNavMode:!1}),r=te({prevState:t,nextState:i,addedBlocks:n.blocks,removedClientIds:e,isNavMode:!0});if(o||r)return{...i,derivedBlockEditingModes:null!=o?o:t.derivedBlockEditingModes,derivedNavModeBlockEditingModes:null!=r?r:t.derivedNavModeBlockEditingModes};break}case"MOVE_BLOCKS_TO_POSITION":{const e=n.clientIds.map((e=>i.blocks.byClientId.get(e))),o=te({prevState:t,nextState:i,addedBlocks:e,removedClientIds:n.clientIds,isNavMode:!1}),r=te({prevState:t,nextState:i,addedBlocks:e,removedClientIds:n.clientIds,isNavMode:!0});if(o||r)return{...i,derivedBlockEditingModes:null!=o?o:t.derivedBlockEditingModes,derivedNavModeBlockEditingModes:null!=r?r:t.derivedNavModeBlockEditingModes};break}case"UPDATE_SETTINGS":if(t?.settings?.[N]!==i?.settings?.[N])return{...i,derivedBlockEditingModes:ee(i,!1),derivedNavModeBlockEditingModes:ee(i,!0)};break;case"RESET_BLOCKS":case"SET_EDITOR_MODE":case"RESET_ZOOM_LEVEL":case"SET_ZOOM_LEVEL":return{...i,derivedBlockEditingModes:ee(i,!1),derivedNavModeBlockEditingModes:ee(i,!0)}}return i.derivedBlockEditingModes=null!==(o=t?.derivedBlockEditingModes)&&void 0!==o?o:new Map,i.derivedNavModeBlockEditingModes=null!==(r=t?.derivedNavModeBlockEditingModes)&&void 0!==r?r:new Map,i}}),(function(e){return(t,n)=>{const o=e(t,n);return t?(o.automaticChangeStatus=t.automaticChangeStatus,"MARK_AUTOMATIC_CHANGE"===n.type?{...o,automaticChangeStatus:"pending"}:"MARK_AUTOMATIC_CHANGE_FINAL"===n.type&&"pending"===t.automaticChangeStatus?{...o,automaticChangeStatus:"final"}:o.blocks===t.blocks&&o.selection===t.selection||"final"!==o.automaticChangeStatus&&o.selection!==t.selection?o:{...o,automaticChangeStatus:void 0}):o}}))(Y),oe=window.wp.primitives,re=window.ReactJSXRuntime,ie=(0,re.jsx)(oe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,re.jsx)(oe.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"})}),se=window.wp.richText,le=window.wp.preferences,ae=window.wp.blockSerializationDefaultParser,ce="core/block-editor",ue={user:"user",theme:"theme",directory:"directory"},de={full:"fully",unsynced:"unsynced"},pe={name:"allPatterns",label:(0,C._x)("All","patterns")},he={name:"myPatterns",label:(0,C.__)("My patterns")},ge={name:"core/starter-content",label:(0,C.__)("Starter content")};function me(e,t,n){const o=e.name.startsWith("core/block"),r="core"===e.source||e.source?.startsWith("pattern-directory");return!(t!==ue.theme||!o&&!r)||!(t!==ue.directory||!o&&r)||t===ue.user&&e.type!==ue.user||n===de.full&&""!==e.syncStatus||!(n!==de.unsynced||"unsynced"===e.syncStatus||!o)}function fe(e,t,n){t=Array.isArray(t)?[...t]:[t],e=Array.isArray(e)?[...e]:{...e};const o=t.pop();let r=e;for(const e of t){const t=r[e];r=r[e]=Array.isArray(t)?[...t]:{...t}}return r[o]=n,e}const be=(e,t,n)=>{var o;const r=Array.isArray(t)?t:t.split(".");let i=e;return r.forEach((e=>{i=i?.[e]})),null!==(o=i)&&void 0!==o?o:n},ke=["color","border","dimensions","typography","spacing"],ve={"color.palette":e=>e.colors,"color.gradients":e=>e.gradients,"color.custom":e=>void 0===e.disableCustomColors?void 0:!e.disableCustomColors,"color.customGradient":e=>void 0===e.disableCustomGradients?void 0:!e.disableCustomGradients,"typography.fontSizes":e=>e.fontSizes,"typography.customFontSize":e=>void 0===e.disableCustomFontSizes?void 0:!e.disableCustomFontSizes,"typography.lineHeight":e=>e.enableCustomLineHeight,"spacing.units":e=>{if(void 0!==e.enableCustomUnits)return!0===e.enableCustomUnits?["px","em","rem","vh","vw","%"]:e.enableCustomUnits},"spacing.padding":e=>e.enableCustomSpacing},_e={"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"},xe=e=>_e[e]||e;function ye(e,t,...n){const o=bt(e,t),r=[];if(t){let n=t;do{const t=bt(e,n);(0,l.hasBlockSupport)(t,"__experimentalSettings",!1)&&r.push(n)}while(n=e.blocks.parents.get(n))}return n.map((n=>{if(ke.includes(n))return void console.warn("Top level useSetting paths are disabled. Please use a subpath to query the information needed.");let i=(0,d.applyFilters)("blockEditor.useSetting.before",void 0,n,t,o);if(void 0!==i)return i;const s=xe(n);for(const t of r){var a;const n=vt(e,t);if(i=null!==(a=be(n.settings?.blocks?.[o],s))&&void 0!==a?a:be(n.settings,s),void 0!==i)break}const c=uo(e);var u,p;if(void 0===i&&o&&(i=be(c.__experimentalFeatures?.blocks?.[o],s)),void 0===i&&(i=be(c.__experimentalFeatures,s)),void 0!==i)return l.__EXPERIMENTAL_PATHS_WITH_OVERRIDE[s]?null!==(u=null!==(p=i.custom)&&void 0!==p?p:i.theme)&&void 0!==u?u:i.default:i;const h=ve[s]?.(c);return void 0!==h?h:"typography.dropCap"===s||void 0}))}function Se(e){return e.isBlockInterfaceHidden}function we(e){return e?.lastBlockInserted?.clientIds}function Ce(e,t){return e.blocks.byClientId.get(t)}const Be=(e,t)=>{const n=t=>"disabled"===To(e,t)&&pn(e,t).every(n);return pn(e,t).every(n)};function Ie(e,t){const n=pn(e,t),o=[];for(const t of n){const n=Ie(e,t);"disabled"!==To(e,t)?o.push({clientId:t,innerBlocks:n}):o.push(...n)}return o}const je=(0,c.createRegistrySelector)((e=>(0,c.createSelector)(Ie,(t=>[t.blocks.order,t.derivedBlockEditingModes,t.derivedNavModeBlockEditingModes,t.blockEditingModes,t.settings.templateLock,t.blockListSettings,e(ce).__unstableGetEditorMode(t)])))),Ee=(0,c.createSelector)(((e,t,n=!1)=>Ht(e,t,n).filter((t=>"disabled"!==To(e,t)))),(e=>[e.blocks.parents,e.blockEditingModes,e.settings.templateLock,e.blockListSettings]));function Te(e){return e.removalPromptData}function Me(e){return e.blockRemovalRules}function Pe(e){return e.openedBlockSettingsMenu}const Re=(0,c.createSelector)((e=>{const t=Bt(e).reduce(((e,t,n)=>(e[t]=n,e)),{});return[...e.styleOverrides].sort(((e,n)=>{var o,r;const[,{clientId:i}]=e,[,{clientId:s}]=n;return(null!==(o=t[i])&&void 0!==o?o:-1)-(null!==(r=t[s])&&void 0!==r?r:-1)}))}),(e=>[e.blocks.order,e.styleOverrides]));function Ne(e){return e.registeredInserterMediaCategories}const Le=(0,c.createSelector)((e=>{const{settings:{inserterMediaCategories:t,allowedMimeTypes:n,enableOpenverseMediaCategory:o},registeredInserterMediaCategories:r}=e;if(!t&&!r.length||!n)return;const i=t?.map((({name:e})=>e))||[];return[...t||[],...(r||[]).filter((({name:e})=>!i.includes(e)))].filter((e=>!(!o&&"openverse"===e.name)&&Object.values(n).some((t=>t.startsWith(`${e.mediaType}/`)))))}),(e=>[e.settings.inserterMediaCategories,e.settings.allowedMimeTypes,e.settings.enableOpenverseMediaCategory,e.registeredInserterMediaCategories])),Ae=(0,c.createRegistrySelector)((e=>(0,c.createSelector)(((t,n=null)=>{const{getAllPatterns:o}=O(e(ce)),r=o(),{allowedBlockTypes:i}=uo(t);return r.some((e=>{const{inserter:o=!0}=e;if(!o)return!1;const r=lt(e);return ct(r,i)&&r.every((({name:e})=>An(t,e,n)))}))}),((t,n)=>[...ut(e)(t),...dt(e)(t,n)]))));function Oe(e,t=[]){return{name:`core/block/${e.id}`,id:e.id,type:ue.user,title:e.title.raw,categories:e.wp_pattern_category?.map((e=>{const n=t.find((({id:t})=>t===e));return n?n.slug:e})),content:e.content.raw,syncStatus:e.wp_pattern_sync_status}}const De=(0,c.createRegistrySelector)((e=>(0,c.createSelector)(((t,n)=>{var o,r;if(n?.startsWith("core/block/")){const o=parseInt(n.slice(11),10),r=O(e(ce)).getReusableBlocks().find((({id:e})=>e===o));return r?Oe(r,t.settings.__experimentalUserPatternCategories):null}return[...null!==(o=t.settings.__experimentalBlockPatterns)&&void 0!==o?o:[],...null!==(r=t.settings[P]?.(e))&&void 0!==r?r:[]].find((({name:e})=>e===n))}),((t,n)=>n?.startsWith("core/block/")?[O(e(ce)).getReusableBlocks(),t.settings.__experimentalReusableBlocks]:[t.settings.__experimentalBlockPatterns,t.settings[P]?.(e)])))),ze=(0,c.createRegistrySelector)((e=>(0,c.createSelector)((t=>{var n,o;return[...O(e(ce)).getReusableBlocks().map((e=>Oe(e,t.settings.__experimentalUserPatternCategories))),...null!==(n=t.settings.__experimentalBlockPatterns)&&void 0!==n?n:[],...null!==(o=t.settings[P]?.(e))&&void 0!==o?o:[]].filter(((e,t,n)=>t===n.findIndex((t=>e.name===t.name))))}),ut(e)))),Ve=[],Fe=(0,c.createRegistrySelector)((e=>t=>{var n;const o=t.settings[R];return null!==(n=o?o(e):t.settings.__experimentalReusableBlocks)&&void 0!==n?n:Ve}));function He(e){return e.lastFocus}function Ge(e){return e.isDragging}function $e(e){return e.expandedBlock}const Ue=(e,t)=>{let n,o=t;for(;!n&&(o=e.blocks.parents.get(o));)"contentOnly"===Rn(e,o)&&(n=o);return n},We=(e,t)=>{let n,o=t;for(;!n&&(o=e.blocks.parents.get(o));)Ke(e,o)&&(n=o);return n};function Ke(e,t){const n=pn(e,Xe(e));return"core/block"===bt(e,t)||"contentOnly"===Rn(e,t)||bo(e)&&n.includes(t)}function Ze(e){return e.temporarilyEditingAsBlocks}function qe(e){return e.temporarilyEditingFocusModeRevert}const Ye=(0,c.createSelector)(((e,t)=>t.reduce(((t,n)=>(t[n]=e.blocks.attributes.get(n)?.style,t)),{})),((e,t)=>[...t.map((t=>e.blocks.attributes.get(t)?.style))]));function Xe(e){return e.settings?.[N]}function Qe(e){return"auto-scaled"===e.zoomLevel||e.zoomLevel<100}function Je(e){return e.zoomLevel}function et(e,t,n=""){const o=Array.isArray(t)?t:[t],r=t=>o.every((n=>An(e,n,t)));if(!n){if(r(n))return n;const t=Xe(e);return t&&r(t)?t:null}let i=n;for(;null!==i&&!r(i);)i=Ft(e,i);return i}function tt(e,t,n){const{allowedBlockTypes:o}=uo(e);return ct(lt(t),o)?et(e,lt(t).map((({blockName:e})=>e)),n):null}function nt(e){return e.insertionPoint}const ot=Symbol("isFiltered"),rt=new WeakMap,it=new WeakMap;function st(e){let t=rt.get(e);return t||(t=function(e){const t=(0,l.parse)(e.content,{__unstableSkipMigrationLogs:!0});return 1===t.length&&(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}}(e),rt.set(e,t)),t}function lt(e){let t=it.get(e);return t||(t=(0,ae.parse)(e.content),t=t.filter((e=>null!==e.blockName)),it.set(e,t)),t}const at=(e,t,n=null)=>"boolean"==typeof e?e:Array.isArray(e)?!(!e.includes("core/post-content")||null!==t)||e.includes(t):n,ct=(e,t)=>{if("boolean"==typeof t)return t;const n=[...e];for(;n.length>0;){const e=n.shift();if(!at(t,e.name||e.blockName,!0))return!1;e.innerBlocks?.forEach((e=>{n.push(e)}))}return!0},ut=e=>t=>[t.settings.__experimentalBlockPatterns,t.settings.__experimentalUserPatternCategories,t.settings.__experimentalReusableBlocks,t.settings[P]?.(e),t.blockPatterns,O(e(ce)).getReusableBlocks()],dt=e=>(t,n)=>[t.blockListSettings[n],t.blocks.byClientId.get(n),t.settings.allowedBlockTypes,t.settings.templateLock,t.blockEditingModes,e(ce).__unstableGetEditorMode(t),Xe(t)],pt=(e,t,n)=>(o,r)=>{let i,s;if("function"==typeof e?(i=e(o),s=e(r)):(i=o[e],s=r[e]),i>s)return"asc"===n?1:-1;if(s>i)return"asc"===n?-1:1;const l=t.findIndex((e=>e===o)),a=t.findIndex((e=>e===r));return l>a?1:a>l?-1:0};function ht(e,t,n="asc"){return e.concat().sort(pt(t,e,n))}const gt=[],mt=new Set,ft={[ot]:!0};function bt(e,t){const n=e.blocks.byClientId.get(t),o="core/social-link";if("web"!==a.Platform.OS&&n?.name===o){const n=e.blocks.attributes.get(t),{service:r}=null!=n?n:{};return r?`${o}-${r}`:o}return n?n.name:null}function kt(e,t){const n=e.blocks.byClientId.get(t);return!!n&&n.isValid}function vt(e,t){return e.blocks.byClientId.get(t)?e.blocks.attributes.get(t):null}function _t(e,t){return e.blocks.byClientId.has(t)?e.blocks.tree.get(t):null}const xt=(0,c.createSelector)(((e,t)=>{const n=e.blocks.byClientId.get(t);return n?{...n,attributes:vt(e,t)}:null}),((e,t)=>[e.blocks.byClientId.get(t),e.blocks.attributes.get(t)]));function yt(e,t){const n=t&&yo(e,t)?"controlled||"+t:t||"";return e.blocks.tree.get(n)?.innerBlocks||gt}const St=(0,c.createSelector)(((e,t)=>(y()("wp.data.select( 'core/block-editor' ).__unstableGetClientIdWithClientIdsTree",{since:"6.3",version:"6.5"}),{clientId:t,innerBlocks:wt(e,t)})),(e=>[e.blocks.order])),wt=(0,c.createSelector)(((e,t="")=>(y()("wp.data.select( 'core/block-editor' ).__unstableGetClientIdsTree",{since:"6.3",version:"6.5"}),pn(e,t).map((t=>St(e,t))))),(e=>[e.blocks.order])),Ct=(0,c.createSelector)(((e,t)=>{t=Array.isArray(t)?[...t]:[t];const n=[];for(const o of t){const t=e.blocks.order.get(o);t&&n.push(...t)}let o=0;for(;o[e.blocks.order])),Bt=e=>Ct(e,""),It=(0,c.createSelector)(((e,t)=>{const n=Bt(e);if(!t)return n.length;let o=0;for(const r of n)e.blocks.byClientId.get(r).name===t&&o++;return o}),(e=>[e.blocks.order,e.blocks.byClientId])),jt=(0,c.createSelector)(((e,t)=>{if(!t)return gt;const n=Array.isArray(t)?t:[t],o=Bt(e).filter((t=>{const o=e.blocks.byClientId.get(t);return n.includes(o.name)}));return o.length>0?o:gt}),(e=>[e.blocks.order,e.blocks.byClientId]));function Et(e,t){return y()("wp.data.select( 'core/block-editor' ).__experimentalGetGlobalBlocksByName",{since:"6.5",alternative:"wp.data.select( 'core/block-editor' ).getBlocksByName"}),jt(e,t)}const Tt=(0,c.createSelector)(((e,t)=>(Array.isArray(t)?t:[t]).map((t=>_t(e,t)))),((e,t)=>(Array.isArray(t)?t:[t]).map((t=>e.blocks.tree.get(t))))),Mt=(0,c.createSelector)(((e,t)=>Tt(e,t).filter(Boolean).map((e=>e.name))),((e,t)=>Tt(e,t)));function Pt(e,t){return pn(e,t).length}function Rt(e){return e.selection.selectionStart}function Nt(e){return e.selection.selectionEnd}function Lt(e){return e.selection.selectionStart.clientId}function At(e){return e.selection.selectionEnd.clientId}function Ot(e){return Xt(e).length||(e.selection.selectionStart.clientId?1:0)}function Dt(e){const{selectionStart:t,selectionEnd:n}=e.selection;return!!t.clientId&&t.clientId===n.clientId}function zt(e){const{selectionStart:t,selectionEnd:n}=e.selection,{clientId:o}=t;return o&&o===n.clientId?o:null}function Vt(e){const t=zt(e);return t?_t(e,t):null}function Ft(e,t){var n;return null!==(n=e.blocks.parents.get(t))&&void 0!==n?n:null}const Ht=(0,c.createSelector)(((e,t,n=!1)=>{const o=[];let r=t;for(;r=e.blocks.parents.get(r);)o.push(r);return o.length?n?o:o.reverse():gt}),(e=>[e.blocks.parents])),Gt=(0,c.createSelector)(((e,t,n,o=!1)=>{const r=Ht(e,t,o),i=Array.isArray(n)?e=>n.includes(e):e=>n===e;return r.filter((t=>i(bt(e,t))))}),(e=>[e.blocks.parents]));function $t(e,t){let n,o=t;do{n=o,o=e.blocks.parents.get(o)}while(o);return n}function Ut(e,t){const n=zt(e),o=[...Ht(e,t),t],r=[...Ht(e,n),n];let i;const s=Math.min(o.length,r.length);for(let e=0;e{const{selectionStart:t,selectionEnd:n}=e.selection;if(!t.clientId||!n.clientId)return gt;if(t.clientId===n.clientId)return[t.clientId];const o=Ft(e,t.clientId);if(null===o)return gt;const r=pn(e,o),i=r.indexOf(t.clientId),s=r.indexOf(n.clientId);return i>s?r.slice(s,i+1):r.slice(i,s+1)}),(e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]));function Xt(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?gt:Yt(e)}const Qt=(0,c.createSelector)((e=>{const t=Xt(e);return t.length?t.map((t=>_t(e,t))):gt}),(e=>[...Yt.getDependants(e),e.blocks.byClientId,e.blocks.order,e.blocks.attributes]));function Jt(e){return Xt(e)[0]||null}function en(e){const t=Xt(e);return t[t.length-1]||null}function tn(e,t){return Jt(e)===t}function nn(e,t){return-1!==Xt(e).indexOf(t)}const on=(0,c.createSelector)(((e,t)=>{let n=t,o=!1;for(;n&&!o;)n=Ft(e,n),o=nn(e,n);return o}),(e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]));function rn(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:t.clientId||null}function sn(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:n.clientId||null}function ln(e){const t=Rt(e),n=Nt(e);return!t.attributeKey&&!n.attributeKey&&void 0===t.offset&&void 0===n.offset}function an(e){const t=Rt(e),n=Nt(e);return!!t&&!!n&&t.clientId===n.clientId&&t.attributeKey===n.attributeKey&&t.offset===n.offset}function cn(e){return Yt(e).some((t=>{const n=bt(e,t);return!(0,l.getBlockType)(n).merge}))}function un(e,t){const n=Rt(e),o=Nt(e);if(n.clientId===o.clientId)return!1;if(!n.attributeKey||!o.attributeKey||void 0===n.offset||void 0===o.offset)return!1;const r=Ft(e,n.clientId);if(r!==Ft(e,o.clientId))return!1;const i=pn(e,r);let s,a;i.indexOf(n.clientId)>i.indexOf(o.clientId)?(s=o,a=n):(s=n,a=o);const c=t?a.clientId:s.clientId,u=t?s.clientId:a.clientId,d=bt(e,c);if(!(0,l.getBlockType)(d).merge)return!1;const p=_t(e,u);if(p.name===d)return!0;const h=(0,l.switchToBlockType)(p,d);return h&&h.length}const dn=e=>{const t=Rt(e),n=Nt(e);if(t.clientId===n.clientId)return gt;if(!t.attributeKey||!n.attributeKey||void 0===t.offset||void 0===n.offset)return gt;const o=Ft(e,t.clientId);if(o!==Ft(e,n.clientId))return gt;const r=pn(e,o),i=r.indexOf(t.clientId),s=r.indexOf(n.clientId),[l,a]=i>s?[n,t]:[t,n],c=_t(e,l.clientId),u=_t(e,a.clientId),d=c.attributes[l.attributeKey],p=u.attributes[a.attributeKey];let h=(0,se.create)({html:d}),g=(0,se.create)({html:p});return h=(0,se.remove)(h,0,l.offset),g=(0,se.remove)(g,a.offset,g.text.length),[{...c,attributes:{...c.attributes,[l.attributeKey]:(0,se.toHTMLString)({value:h})}},{...u,attributes:{...u.attributes,[a.attributeKey]:(0,se.toHTMLString)({value:g})}}]};function pn(e,t){return e.blocks.order.get(t||"")||gt}function hn(e,t){return pn(e,Ft(e,t)).indexOf(t)}function gn(e,t){const{selectionStart:n,selectionEnd:o}=e.selection;return n.clientId===o.clientId&&n.clientId===t}function mn(e,t,n=!1){const o=Yt(e);return!!o.length&&(n?o.some((n=>Ht(e,n,!0).includes(t))):o.some((n=>Ft(e,n)===t)))}function fn(e,t,n=!1){return pn(e,t).some((t=>Bn(e,t)||n&&fn(e,t,n)))}function bn(e,t){if(!t)return!1;const n=Xt(e),o=n.indexOf(t);return o>-1&&oBn(e,t)))}function jn(){return y()('wp.data.select( "core/block-editor" ).isCaretWithinFormattedText',{since:"6.1",version:"6.3"}),!1}const En=(0,c.createSelector)((e=>{let t,n;const{insertionCue:o,selection:{selectionEnd:r}}=e;if(null!==o)return o;const{clientId:i}=r;return i?(t=Ft(e,i)||void 0,n=hn(e,r.clientId)+1):n=pn(e).length,{rootClientId:t,index:n}}),(e=>[e.insertionCue,e.selection.selectionEnd.clientId,e.blocks.parents,e.blocks.order]));function Tn(e){return null!==e.insertionCue}function Mn(e){return e.template.isValid}function Pn(e){return e.settings.template}function Rn(e,t){var n,o;return t?null!==(n=co(e,t)?.templateLock)&&void 0!==n&&n:null!==(o=e.settings.templateLock)&&void 0!==o&&o}const Nn=(e,t,n=null)=>{let o,r;if(t&&"object"==typeof t?(o=t,r=t.name):(o=(0,l.getBlockType)(t),r=t),!o)return!1;const{allowedBlockTypes:i}=uo(e);if(!at(i,r,!0))return!1;const s=(Array.isArray(o.parent)?o.parent:[]).concat(Array.isArray(o.ancestor)?o.ancestor:[]);if(s.length>0){if(s.includes("core/post-content"))return!0;let t=n,o=!1;do{const n=bt(e,t);if(s.includes(n)){o=!0;break}t=e.blocks.parents.get(t)}while(t);return o}return!0},Ln=(e,t,n=null)=>{if(!Nn(e,t,n))return!1;let o;if(t&&"object"==typeof t?(o=t,t=o.name):o=(0,l.getBlockType)(t),Rn(e,n))return!1;if(Ke(e,n))return!1;if("disabled"===To(e,null!=n?n:""))return!1;const r=co(e,n);if(n&&void 0===r)return!1;const i=bt(e,n),s=(0,l.getBlockType)(i),a=s?.allowedBlocks;let c=at(a,t);if(!1!==c){const e=r?.allowedBlocks,n=at(e,t);null!==n&&(c=n)}const u=o.parent,p=at(u,i);let h=!0;const g=o.ancestor;g&&(h=[n,...Ht(e,n)].some((t=>at(g,bt(e,t)))));const m=h&&(null===c&&null===p||!0===c||!0===p);return m?(0,d.applyFilters)("blockEditor.__unstableCanInsertBlockType",m,o,n,{getBlock:_t.bind(null,e),getBlockParentsByBlockName:Gt.bind(null,e)}):m},An=(0,c.createRegistrySelector)((e=>(0,c.createSelector)(Ln,((t,n,o)=>dt(e)(t,o)))));function On(e,t,n=null){return t.every((t=>An(e,bt(e,t),n)))}function Dn(e,t){const n=vt(e,t);if(null===n)return!0;if(void 0!==n.lock?.remove)return!n.lock.remove;const o=Ft(e,t);return!Rn(e,o)&&(!We(e,t)&&"disabled"!==To(e,o))}function zn(e,t){return t.every((t=>Dn(e,t)))}function Vn(e,t){const n=vt(e,t);if(null===n)return!0;if(void 0!==n.lock?.move)return!n.lock.move;const o=Ft(e,t);return"all"!==Rn(e,o)&&"disabled"!==To(e,o)}function Fn(e,t){return t.every((t=>Vn(e,t)))}function Hn(e,t){const n=vt(e,t);if(null===n)return!0;const{lock:o}=n;return!o?.edit}function Gn(e,t){return!!(0,l.hasBlockSupport)(t,"lock",!0)&&!!e.settings?.canLockBlocks}function $n(e,t){var n;return null!==(n=e.preferences.insertUsage?.[t])&&void 0!==n?n:null}const Un=(e,t,n)=>!!(0,l.hasBlockSupport)(t,"inserter",!0)&&Ln(e,t.name,n),Wn=(e,t)=>{if(!e)return t;const n=Date.now()-e;switch(!0){case n<36e5:return 4*t;case n<864e5:return 2*t;case n<6048e5:return t/2;default:return t/4}},Kn=(e,{buildScope:t="inserter"})=>n=>{const o=n.name;let r=!1;(0,l.hasBlockSupport)(n.name,"multiple",!0)||(r=Tt(e,Bt(e)).some((({name:e})=>e===n.name)));const{time:i,count:s=0}=$n(e,o)||{},a={id:o,name:n.name,title:n.title,icon:n.icon,isDisabled:r,frecency:Wn(i,s)};if("transform"===t)return a;const c=(0,l.getBlockVariations)(n.name,"inserter");return{...a,initialAttributes:{},description:n.description,category:n.category,keywords:n.keywords,parent:n.parent,ancestor:n.ancestor,variations:c,example:n.example,utility:1}},Zn=(0,c.createRegistrySelector)((e=>(0,c.createSelector)(((t,n=null,o=ft)=>{const r=Ln(t,"core/block",n)?O(e(ce)).getReusableBlocks().map((e=>{const n=e.wp_pattern_sync_status?ie:{src:ie,foreground:"var(--wp-block-synced-color)"},o=`core/block/${e.id}`,{time:r,count:i=0}=$n(t,o)||{},s=Wn(r,i);return{id:o,name:"core/block",initialAttributes:{ref:e.id},title:e.title?.raw,icon:n,category:"reusable",keywords:["reusable"],isDisabled:!1,utility:1,frecency:s,content:e.content?.raw,syncStatus:e.wp_pattern_sync_status}})):[],i=Kn(t,{buildScope:"inserter"});let s=(0,l.getBlockTypes)().filter((e=>(0,l.hasBlockSupport)(e,"inserter",!0))).map(i);s=!1!==o[ot]?s.filter((e=>Un(t,e,n))):s.filter((e=>Nn(t,e,n))).map((e=>({...e,isAllowedInCurrentRoot:Un(t,e,n)})));const a=s.reduce(((e,n)=>{const{variations:o=[]}=n;if(o.some((({isDefault:e})=>e))||e.push(n),o.length){const r=((e,t)=>n=>{const o=`${t.id}/${n.name}`,{time:r,count:i=0}=$n(e,o)||{};return{...t,id:o,icon:n.icon||t.icon,title:n.title||t.title,description:n.description||t.description,category:n.category||t.category,example:n.hasOwnProperty("example")?n.example:t.example,initialAttributes:{...t.initialAttributes,...n.attributes},innerBlocks:n.innerBlocks,keywords:n.keywords||t.keywords,frecency:Wn(r,i)}})(t,n);e.push(...o.map(r))}return e}),[]),{core:c,noncore:u}=a.reduce(((e,t)=>{const{core:n,noncore:o}=e;return(t.name.startsWith("core/")?n:o).push(t),e}),{core:[],noncore:[]});return[...c,...u,...r]}),((t,n)=>[(0,l.getBlockTypes)(),O(e(ce)).getReusableBlocks(),t.blocks.order,t.preferences.insertUsage,...dt(e)(t,n)])))),qn=(0,c.createRegistrySelector)((e=>(0,c.createSelector)(((e,t,n=null)=>{const o=Array.isArray(t)?t:[t],r=Kn(e,{buildScope:"transform"}),i=(0,l.getBlockTypes)().filter((t=>Un(e,t,n))).map(r),s=Object.fromEntries(Object.entries(i).map((([,e])=>[e.name,e]))),a=(0,l.getPossibleBlockTransformations)(o).reduce(((e,t)=>(s[t?.name]&&e.push(s[t.name]),e)),[]);return ht(a,(e=>s[e.name].frecency),"desc")}),((t,n,o)=>[(0,l.getBlockTypes)(),t.preferences.insertUsage,...dt(e)(t,o)])))),Yn=(0,c.createRegistrySelector)((e=>(t,n=null)=>!!(0,l.getBlockTypes)().some((e=>Un(t,e,n)))||Ln(t,"core/block",n)&&O(e(ce)).getReusableBlocks().length>0)),Xn=(0,c.createRegistrySelector)((e=>(0,c.createSelector)(((t,n=null)=>{if(!n)return;const o=(0,l.getBlockTypes)().filter((e=>Un(t,e,n)));return Ln(t,"core/block",n)&&O(e(ce)).getReusableBlocks().length>0&&o.push("core/block"),o}),((t,n)=>[(0,l.getBlockTypes)(),O(e(ce)).getReusableBlocks(),...dt(e)(t,n)])))),Qn=(0,c.createSelector)(((e,t=null)=>(y()('wp.data.select( "core/block-editor" ).__experimentalGetAllowedBlocks',{alternative:'wp.data.select( "core/block-editor" ).getAllowedBlocks',since:"6.2",version:"6.4"}),Xn(e,t))),((e,t)=>Xn.getDependants(e,t)));function Jn(e,t=null){var n;if(!t)return;const{defaultBlock:o,directInsert:r}=null!==(n=e.blockListSettings[t])&&void 0!==n?n:{};return o&&r?o:void 0}function eo(e,t=null){return y()('wp.data.select( "core/block-editor" ).__experimentalGetDirectInsertBlock',{alternative:'wp.data.select( "core/block-editor" ).getDirectInsertBlock',since:"6.3",version:"6.4"}),Jn(e,t)}const to=(0,c.createRegistrySelector)((e=>(t,n)=>{const o=O(e(ce)).getPatternBySlug(n);return o?st(o):null})),no=e=>(t,n)=>[...ut(e)(t),...dt(e)(t,n)],oo=new WeakMap;function ro(e){let t=oo.get(e);return t||(t={...e,get blocks(){return st(e).blocks}},oo.set(e,t)),t}const io=(0,c.createRegistrySelector)((e=>(0,c.createSelector)(((t,n=null,o=ft)=>{const{getAllPatterns:r}=O(e(ce)),i=r(),{allowedBlockTypes:s}=uo(t),l=i.filter((({inserter:e=!0})=>!!e)).map(ro);return l.filter((e=>ct(lt(e),s))).filter((e=>lt(e).every((({blockName:e})=>!1!==o[ot]?An(t,e,n):Nn(t,e,n)))))}),no(e)))),so=(0,c.createRegistrySelector)((e=>(0,c.createSelector)(((t,n,o=null)=>{if(!n)return gt;const r=e(ce).__experimentalGetAllowedPatterns(o),i=Array.isArray(n)?n:[n],s=r.filter((e=>e?.blockTypes?.some?.((e=>i.includes(e)))));return 0===s.length?gt:s}),((t,n,o)=>no(e)(t,o))))),lo=(0,c.createRegistrySelector)((e=>(y()('wp.data.select( "core/block-editor" ).__experimentalGetPatternsByBlockTypes',{alternative:'wp.data.select( "core/block-editor" ).getPatternsByBlockTypes',since:"6.2",version:"6.4"}),e(ce).getPatternsByBlockTypes))),ao=(0,c.createRegistrySelector)((e=>(0,c.createSelector)(((t,n,o=null)=>{if(!n)return gt;if(n.some((({clientId:e,innerBlocks:n})=>n.length||yo(t,e))))return gt;const r=Array.from(new Set(n.map((({name:e})=>e))));return e(ce).getPatternsByBlockTypes(r,o)}),((t,n,o)=>no(e)(t,o)))));function co(e,t){return e.blockListSettings[t]}function uo(e){return e.settings}function po(e){return e.blocks.isPersistentChange}const ho=(0,c.createSelector)(((e,t=[])=>t.reduce(((t,n)=>e.blockListSettings[n]?{...t,[n]:e.blockListSettings[n]}:t),{})),(e=>[e.blockListSettings])),go=(0,c.createRegistrySelector)((e=>(0,c.createSelector)(((t,n)=>{y()("wp.data.select( 'core/block-editor' ).__experimentalGetReusableBlockTitle",{since:"6.6",version:"6.8"});const o=O(e(ce)).getReusableBlocks().find((e=>e.id===n));return o?o.title?.raw:null}),(()=>[O(e(ce)).getReusableBlocks()]))));function mo(e){return e.blocks.isIgnoredChange}function fo(e){return e.lastBlockAttributesChange}function bo(e){return"navigation"===ko(e)}const ko=(0,c.createRegistrySelector)((e=>t=>{var n;return window?.__experimentalEditorWriteMode?null!==(n=t.settings.editorTool)&&void 0!==n?n:e(le.store).get("core","editorTool"):"edit"}));function vo(){return y()('wp.data.select( "core/block-editor" ).hasBlockMovingClientId',{since:"6.7",hint:"Block moving mode feature has been removed"}),!1}function _o(e){return!!e.automaticChangeStatus}function xo(e,t){return e.highlightedBlock===t}function yo(e,t){return!!e.blocks.controlledInnerBlocks[t]}const So=(0,c.createSelector)(((e,t)=>{if(!t.length)return null;const n=zt(e);if(t.includes(bt(e,n)))return n;const o=Xt(e),r=Gt(e,n||o[0],t);return r?r[r.length-1]:null}),((e,t)=>[e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId,t]));function wo(e,t,n){const{lastBlockInserted:o}=e;return o.clientIds?.includes(t)&&o.source===n}function Co(e,t){var n;return null===(n=e.blockVisibility?.[t])||void 0===n||n}function Bo(e){return e.hoveredBlockClientId}const Io=(0,c.createSelector)((e=>{const t=new Set(Object.keys(e.blockVisibility).filter((t=>e.blockVisibility[t])));return 0===t.size?mt:t}),(e=>[e.blockVisibility]));function jo(e,t){if("default"!==To(e,t))return!1;if(!Hn(e,t))return!0;if(Qe(e)){const n=Xe(e);if(n){const o=pn(e,n);if(o?.includes(t))return!0}else if(t&&!Ft(e,t))return!0}return!(0,l.hasBlockSupport)(bt(e,t),"__experimentalDisableBlockOverlay",!1)&&yo(e,t)&&!gn(e,t)&&!mn(e,t,!0)}function Eo(e,t){let n=e.blocks.parents.get(t);for(;n;){if(jo(e,n))return!0;n=e.blocks.parents.get(n)}return!1}const To=(0,c.createRegistrySelector)((e=>(t,n="")=>{null===n&&(n="");const o=bo(t);if(!o&&t.derivedBlockEditingModes?.has(n))return t.derivedBlockEditingModes.get(n);if(o&&t.derivedNavModeBlockEditingModes?.has(n))return t.derivedNavModeBlockEditingModes.get(n);const r=t.blockEditingModes.get(n);if(r)return r;if(""===n)return"default";const i=Ft(t,n);if("contentOnly"===Rn(t,i)){const o=bt(t,n),{hasContentRoleAttribute:r}=O(e(l.store));return r(o)?"contentOnly":"disabled"}const s=To(t,i);return"contentOnly"===s?"default":s})),Mo=(0,c.createRegistrySelector)((e=>(t,n="")=>{const o=n||zt(t);if(!o)return!1;const{getGroupingBlockName:r}=e(l.store),i=_t(t,o),s=r();return i&&(i.name===s||(0,l.getBlockType)(i.name)?.transforms?.ungroup)&&!!i.innerBlocks.length&&Dn(t,o)})),Po=(0,c.createRegistrySelector)((e=>(t,n=gt)=>{const{getGroupingBlockName:o}=e(l.store),r=o(),i=n?.length?n:Yt(t),s=i?.length?Ft(t,i[0]):void 0;return An(t,r,s)&&i.length&&zn(t,i)})),Ro=(e,t)=>(y()("wp.data.select( 'core/block-editor' ).__unstableGetContentLockingParent",{since:"6.1",version:"6.7"}),Ue(e,t));function No(e){return y()("wp.data.select( 'core/block-editor' ).__unstableGetTemporarilyEditingAsBlocks",{since:"6.1",version:"6.7"}),Ze(e)}function Lo(e){return y()("wp.data.select( 'core/block-editor' ).__unstableGetTemporarilyEditingFocusModeToRevert",{since:"6.5",version:"6.7"}),qe(e)}const Ao=window.wp.a11y,Oo=["inserterMediaCategories","blockInspectorAnimation"];function Do(e,{stripExperimentalSettings:t=!1,reset:n=!1}={}){let o=e;Object.hasOwn(o,"__unstableIsPreviewMode")&&(y()("__unstableIsPreviewMode argument in wp.data.dispatch('core/block-editor').updateSettings",{since:"6.8",alternative:"isPreviewMode"}),o={...o},o.isPreviewMode=o.__unstableIsPreviewMode,delete o.__unstableIsPreviewMode);let r=o;if(t&&"web"===a.Platform.OS){r={};for(const e in o)Oo.includes(e)||(r[e]=o[e])}return{type:"UPDATE_SETTINGS",settings:r,reset:n}}function zo(){return{type:"HIDE_BLOCK_INTERFACE"}}function Vo(){return{type:"SHOW_BLOCK_INTERFACE"}}const Fo=(e,t=!0,n=!1)=>({select:o,dispatch:r,registry:i})=>{if(!e||!e.length)return;var s;if(s=e,e=Array.isArray(s)?s:[s],!o.canRemoveBlocks(e))return;const l=!n&&o.getBlockRemovalRules();if(l){function a(e){const t=[],n=[...e];for(;n.length;){const{innerBlocks:e,...o}=n.shift();n.push(...e),t.push(o)}return t}const c=a(e.map(o.getBlock));let u;for(const d of l)if(u=d.callback(c),u)return void r(Go(e,t,u))}t&&r.selectPreviousBlock(e[0],t),i.batch((()=>{r({type:"REMOVE_BLOCKS",clientIds:e}),r(Ho())}))},Ho=()=>({select:e,dispatch:t})=>{if(e.getBlockCount()>0)return;const{__unstableHasCustomAppender:n}=e.getSettings();n||t.insertDefaultBlock()};function Go(e,t,n){return{type:"DISPLAY_BLOCK_REMOVAL_PROMPT",clientIds:e,selectPrevious:t,message:n}}function $o(){return{type:"CLEAR_BLOCK_REMOVAL_PROMPT"}}function Uo(e=!1){return{type:"SET_BLOCK_REMOVAL_RULES",rules:e}}function Wo(e){return{type:"SET_OPENED_BLOCK_SETTINGS_MENU",clientId:e}}function Ko(e,t){return{type:"SET_STYLE_OVERRIDE",id:e,style:t}}function Zo(e){return{type:"DELETE_STYLE_OVERRIDE",id:e}}function qo(e=null){return{type:"LAST_FOCUS",lastFocus:e}}function Yo(e){return({select:t,dispatch:n,registry:o})=>{const r=O(o.select(_i)).getTemporarilyEditingFocusModeToRevert();n.__unstableMarkNextChangeAsNotPersistent(),n.updateBlockAttributes(e,{templateLock:"contentOnly"}),n.updateBlockListSettings(e,{...t.getBlockListSettings(e),templateLock:"contentOnly"}),n.updateSettings({focusMode:r}),n.__unstableSetTemporarilyEditingAsBlocks()}}function Xo(){return{type:"START_DRAGGING"}}function Qo(){return{type:"STOP_DRAGGING"}}function Jo(e){return{type:"SET_BLOCK_EXPANDED_IN_LIST_VIEW",clientId:e}}function er(e){return{type:"SET_INSERTION_POINT",value:e}}const tr=e=>({select:t,dispatch:n})=>{n.selectBlock(e),n.__unstableMarkNextChangeAsNotPersistent(),n.updateBlockAttributes(e,{templateLock:void 0}),n.updateBlockListSettings(e,{...t.getBlockListSettings(e),templateLock:!1});const o=t.getSettings().focusMode;n.updateSettings({focusMode:!0}),n.__unstableSetTemporarilyEditingAsBlocks(e,o)},nr=(e=100)=>({select:t,dispatch:n})=>{if(100!==e){const e=t.getBlockSelectionStart(),o=t.getSectionRootClientId();if(e){let r;if(o){const n=t.getBlockOrder(o);r=n?.includes(e)?e:t.getBlockParents(e).find((e=>n.includes(e)))}else r=t.getBlockHierarchyRootClientId(e);r?n.selectBlock(r):n.clearSelectedBlock(),(0,Ao.speak)((0,C.__)("You are currently in zoom-out mode."))}}n({type:"SET_ZOOM_LEVEL",zoom:e})};function or(){return{type:"RESET_ZOOM_LEVEL"}}const rr=window.wp.notices,ir="†";function sr(e){if(e)return Object.keys(e).find((t=>{const n=e[t];return("string"==typeof n||n instanceof se.RichTextData)&&-1!==n.toString().indexOf(ir)}))}function lr(e){for(const[t,n]of Object.entries(e.attributes))if("rich-text"===n.source||"html"===n.source)return t}const ar=e=>Array.isArray(e)?e:[e],cr=e=>({dispatch:t})=>{t({type:"RESET_BLOCKS",blocks:e}),t(ur(e))},ur=e=>({select:t,dispatch:n})=>{const o=t.getTemplate(),r=t.getTemplateLock(),i=!o||"all"!==r||(0,l.doBlocksMatchTemplate)(e,o);if(i!==t.isValidTemplate())return n.setTemplateValidity(i),i};function dr(e,t,n){return{type:"RESET_SELECTION",selectionStart:e,selectionEnd:t,initialPosition:n}}function pr(e){return y()('wp.data.dispatch( "core/block-editor" ).receiveBlocks',{since:"5.9",alternative:"resetBlocks or insertBlocks"}),{type:"RECEIVE_BLOCKS",blocks:e}}function hr(e,t,n=!1){return{type:"UPDATE_BLOCK_ATTRIBUTES",clientIds:ar(e),attributes:t,uniqueByBlock:n}}function gr(e,t){return{type:"UPDATE_BLOCK",clientId:e,updates:t}}function mr(e,t=0){return{type:"SELECT_BLOCK",initialPosition:t,clientId:e}}function fr(e){return{type:"HOVER_BLOCK",clientId:e}}const br=(e,t=!1)=>({select:n,dispatch:o})=>{const r=n.getPreviousBlockClientId(e);if(r)o.selectBlock(r,-1);else if(t){const t=n.getBlockRootClientId(e);t&&o.selectBlock(t,-1)}},kr=e=>({select:t,dispatch:n})=>{const o=t.getNextBlockClientId(e);o&&n.selectBlock(o)};function vr(){return{type:"START_MULTI_SELECT"}}function _r(){return{type:"STOP_MULTI_SELECT"}}const xr=(e,t,n=0)=>({select:o,dispatch:r})=>{if(o.getBlockRootClientId(e)!==o.getBlockRootClientId(t))return;r({type:"MULTI_SELECT",start:e,end:t,initialPosition:n});const i=o.getSelectedBlockCount();(0,Ao.speak)((0,C.sprintf)(/* translators: %s: number of selected blocks */ /* translators: %s: number of selected blocks */ -(0,C._n)("%s block selected.","%s blocks selected.",i),i),"assertive")};function yr(){return{type:"CLEAR_SELECTED_BLOCK"}}function Sr(e=!0){return{type:"TOGGLE_SELECTION",isSelectionEnabled:e}}const wr=(e,t,n,o=0,r)=>({select:i,dispatch:s,registry:l})=>{e=ar(e),t=ar(t);const a=i.getBlockRootClientId(e[0]);for(let e=0;e{s({type:"REPLACE_BLOCKS",clientIds:e,blocks:t,time:Date.now(),indexToSelect:n,initialPosition:o,meta:r}),s.ensureDefaultBlock()}))};function Cr(e,t){return wr(e,t)}const Br=e=>(t,n)=>({select:o,dispatch:r})=>{o.canMoveBlocks(t)&&r({type:e,clientIds:ar(t),rootClientId:n})},Ir=Br("MOVE_BLOCKS_DOWN"),jr=Br("MOVE_BLOCKS_UP"),Er=(e,t="",n="",o)=>({select:r,dispatch:i})=>{if(r.canMoveBlocks(e)){if(t!==n){if(!r.canRemoveBlocks(e))return;if(!r.canInsertBlocks(e,n))return}i({type:"MOVE_BLOCKS_TO_POSITION",fromRootClientId:t,toRootClientId:n,clientIds:e,index:o})}};function Tr(e,t="",n="",o){return Er([e],t,n,o)}function Mr(e,t,n,o,r){return Pr([e],t,n,o,0,r)}const Pr=(e,t,n,o=!0,r=0,i)=>({select:s,dispatch:l})=>{null!==r&&"object"==typeof r&&(i=r,r=0,y()("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=ar(e);const a=[];for(const t of e)s.canInsertBlockType(t.name,n)&&a.push(t);a.length&&l({type:"INSERT_BLOCKS",blocks:a,index:t,rootClientId:n,time:Date.now(),updateSelection:o,initialPosition:o?r:null,meta:i})};function Rr(e,t,n={}){const{__unstableWithInserter:o,operation:r,nearestSide:i}=n;return{type:"SHOW_INSERTION_POINT",rootClientId:e,index:t,__unstableWithInserter:o,operation:r,nearestSide:i}}const Nr=()=>({select:e,dispatch:t})=>{e.isBlockInsertionPointVisible()&&t({type:"HIDE_INSERTION_POINT"})};function Lr(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}const Ar=()=>({select:e,dispatch:t})=>{t({type:"SYNCHRONIZE_TEMPLATE"});const n=e.getBlocks(),o=e.getTemplate(),r=(0,l.synchronizeBlocksWithTemplate)(n,o);t.resetBlocks(r)},Or=e=>({registry:t,select:n,dispatch:o})=>{const r=n.getSelectionStart(),i=n.getSelectionEnd();if(r.clientId===i.clientId)return;if(!r.attributeKey||!i.attributeKey||void 0===r.offset||void 0===i.offset)return!1;const s=n.getBlockRootClientId(r.clientId);if(s!==n.getBlockRootClientId(i.clientId))return;const a=n.getBlockOrder(s);let c,u;a.indexOf(r.clientId)>a.indexOf(i.clientId)?(c=i,u=r):(c=r,u=i);const d=e?u:c,p=n.getBlock(d.clientId),h=(0,l.getBlockType)(p.name);if(!h.merge)return;const g=c,m=u,f=n.getBlock(g.clientId),b=n.getBlock(m.clientId),k=f.attributes[g.attributeKey],v=b.attributes[m.attributeKey];let _=(0,se.create)({html:k}),x=(0,se.create)({html:v});_=(0,se.remove)(_,g.offset,_.text.length),x=(0,se.insert)(x,ir,0,m.offset);const y=(0,l.cloneBlock)(f,{[g.attributeKey]:(0,se.toHTMLString)({value:_})}),S=(0,l.cloneBlock)(b,{[m.attributeKey]:(0,se.toHTMLString)({value:x})}),w=e?y:S,C=f.name===b.name?[w]:(0,l.switchToBlockType)(w,h.name);if(!C||!C.length)return;let B;if(e){const e=C.pop();B=h.merge(e.attributes,S.attributes)}else{const e=C.shift();B=h.merge(y.attributes,e.attributes)}const I=sr(B),j=B[I],E=(0,se.create)({html:j}),T=E.text.indexOf(ir),M=(0,se.remove)(E,T,T+1),P=(0,se.toHTMLString)({value:M});B[I]=P;const R=n.getSelectedBlockClientIds(),N=[...e?C:[],{...p,attributes:{...p.attributes,...B}},...e?[]:C];t.batch((()=>{o.selectionChange(p.clientId,I,T,T),o.replaceBlocks(R,N,0,n.getSelectedBlocksInitialCaretPosition())}))},Dr=(e=[])=>({registry:t,select:n,dispatch:o})=>{const r=n.getSelectionStart(),i=n.getSelectionEnd(),s=n.getBlockRootClientId(r.clientId),a=n.getBlockRootClientId(i.clientId);if(s!==a)return;const c=n.getBlockOrder(s);let u,d;c.indexOf(r.clientId)>c.indexOf(i.clientId)?(u=i,d=r):(u=r,d=i);const p=u,h=d,g=n.getBlock(p.clientId),m=n.getBlock(h.clientId),f=(0,l.getBlockType)(g.name),b=(0,l.getBlockType)(m.name),k="string"==typeof p.attributeKey?p.attributeKey:lr(f),v="string"==typeof h.attributeKey?h.attributeKey:lr(b),_=n.getBlockAttributes(p.clientId),x=_?.metadata?.bindings;if(x?.[k]){if(e.length){const{createWarningNotice:D}=t.dispatch(rr.store);return void D((0,C.__)("Blocks can't be inserted into other blocks with bindings"),{type:"snackbar"})}return void o.insertAfterBlock(p.clientId)}if(!k||!v||void 0===r.offset||void 0===i.offset)return;if(p.clientId===h.clientId&&k===v&&p.offset===h.offset)if(e.length){if((0,l.isUnmodifiedDefaultBlock)(g))return void o.replaceBlocks([p.clientId],e,e.length-1,-1)}else if(!n.getBlockOrder(p.clientId).length){function z(){const e=(0,l.getDefaultBlockName)();return n.canInsertBlockType(e,s)?(0,l.createBlock)(e):(0,l.createBlock)(n.getBlockName(p.clientId))}const V=_[k].length;if(0===p.offset&&V)return void o.insertBlocks([z()],n.getBlockIndex(p.clientId),s,!1);if(p.offset===V)return void o.insertBlocks([z()],n.getBlockIndex(p.clientId)+1,s)}const y=g.attributes[k],S=m.attributes[v];let w=(0,se.create)({html:y}),B=(0,se.create)({html:S});w=(0,se.remove)(w,p.offset,w.text.length),B=(0,se.remove)(B,0,h.offset);let I={...g,innerBlocks:g.clientId===m.clientId?[]:g.innerBlocks,attributes:{...g.attributes,[k]:(0,se.toHTMLString)({value:w})}},j={...m,clientId:g.clientId===m.clientId?(0,l.createBlock)(m.name).clientId:m.clientId,attributes:{...m.attributes,[v]:(0,se.toHTMLString)({value:B})}};const E=(0,l.getDefaultBlockName)();if(g.clientId===m.clientId&&E&&j.name!==E&&n.canInsertBlockType(E,s)){const F=(0,l.switchToBlockType)(j,E);1===F?.length&&(j=F[0])}if(!e.length)return void o.replaceBlocks(n.getSelectedBlockClientIds(),[I,j]);let T;const M=[],P=[...e],R=P.shift(),N=(0,l.getBlockType)(I.name),L=N.merge&&R.name===N.name?[R]:(0,l.switchToBlockType)(R,N.name);if(L?.length){const H=L.shift();I={...I,attributes:{...I.attributes,...N.merge(I.attributes,H.attributes)}},M.push(I),T={clientId:I.clientId,attributeKey:k,offset:(0,se.create)({html:I.attributes[k]}).text.length},P.unshift(...L)}else(0,l.isUnmodifiedBlock)(I)||M.push(I),M.push(R);const A=P.pop(),O=(0,l.getBlockType)(j.name);if(P.length&&M.push(...P),A){const G=O.merge&&O.name===A.name?[A]:(0,l.switchToBlockType)(A,O.name);if(G?.length){const $=G.pop();M.push({...j,attributes:{...j.attributes,...O.merge($.attributes,j.attributes)}}),M.push(...G),T={clientId:j.clientId,attributeKey:v,offset:(0,se.create)({html:$.attributes[v]}).text.length}}else M.push(A),(0,l.isUnmodifiedBlock)(j)||M.push(j)}else(0,l.isUnmodifiedBlock)(j)||M.push(j);t.batch((()=>{o.replaceBlocks(n.getSelectedBlockClientIds(),M,M.length-1,0),T&&o.selectionChange(T.clientId,T.attributeKey,T.offset,T.offset)}))},zr=()=>({select:e,dispatch:t})=>{const n=e.getSelectionStart(),o=e.getSelectionEnd();t.selectionChange({start:{clientId:n.clientId},end:{clientId:o.clientId}})},Vr=(e,t)=>({registry:n,select:o,dispatch:r})=>{const i=e,s=t,a=o.getBlock(i),c=(0,l.getBlockType)(a.name);if(!c)return;const u=o.getBlock(s);if(!c.merge&&(0,l.getBlockSupport)(a.name,"__experimentalOnMerge")){const e=(0,l.switchToBlockType)(u,c.name);if(1!==e?.length)return void r.selectBlock(a.clientId);const[t]=e;return t.innerBlocks.length<1?void r.selectBlock(a.clientId):void n.batch((()=>{r.insertBlocks(t.innerBlocks,void 0,i),r.removeBlock(s),r.selectBlock(t.innerBlocks[0].clientId);const e=o.getNextBlockClientId(i);if(e&&o.getBlockName(i)===o.getBlockName(e)){const t=o.getBlockAttributes(i),n=o.getBlockAttributes(e);Object.keys(t).every((e=>t[e]===n[e]))&&(r.moveBlocksToPosition(o.getBlockOrder(e),e,i),r.removeBlock(e,!1))}}))}if((0,l.isUnmodifiedDefaultBlock)(a))return void r.removeBlock(i,o.isBlockSelected(i));if((0,l.isUnmodifiedDefaultBlock)(u))return void r.removeBlock(s,o.isBlockSelected(s));if(!c.merge)return void r.selectBlock(a.clientId);const d=(0,l.getBlockType)(u.name),{clientId:p,attributeKey:h,offset:g}=o.getSelectionStart(),m=(p===i?c:d).attributes[h],f=(p===i||p===s)&&void 0!==h&&void 0!==g&&!!m;m||("number"==typeof h?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 h):window.console.error("The RichText identifier prop does not match any attributes defined by the block."));const b=(0,l.cloneBlock)(a),k=(0,l.cloneBlock)(u);if(f){const e=p===i?b:k,t=e.attributes[h],n=(0,se.insert)((0,se.create)({html:t}),ir,g,g);e.attributes[h]=(0,se.toHTMLString)({value:n})}const v=a.name===u.name?[k]:(0,l.switchToBlockType)(k,a.name);if(!v||!v.length)return;const _=c.merge(b.attributes,v[0].attributes);if(f){const e=sr(_),t=_[e],n=(0,se.create)({html:t}),o=n.text.indexOf(ir),i=(0,se.remove)(n,o,o+1),s=(0,se.toHTMLString)({value:i});_[e]=s,r.selectionChange(a.clientId,e,o,o)}r.replaceBlocks([a.clientId,u.clientId],[{...a,attributes:{...a.attributes,..._}},...v.slice(1)],0)},Fr=(e,t=!0)=>Fo(e,t);function Hr(e,t){return Fr([e],t)}function Gr(e,t,n=!1,o=0){return{type:"REPLACE_INNER_BLOCKS",rootClientId:e,blocks:t,updateSelection:n,initialPosition:n?o:null,time:Date.now()}}function $r(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function Ur(){return{type:"START_TYPING"}}function Wr(){return{type:"STOP_TYPING"}}function Kr(e=[]){return{type:"START_DRAGGING_BLOCKS",clientIds:e}}function Zr(){return{type:"STOP_DRAGGING_BLOCKS"}}function qr(){return y()('wp.data.dispatch( "core/block-editor" ).enterFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function Yr(){return y()('wp.data.dispatch( "core/block-editor" ).exitFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function Xr(e,t,n,o){return"string"==typeof e?{type:"SELECTION_CHANGE",clientId:e,attributeKey:t,startOffset:n,endOffset:o}:{type:"SELECTION_CHANGE",...e}}const Qr=(e,t,n)=>({dispatch:o})=>{const r=(0,l.getDefaultBlockName)();if(!r)return;const i=(0,l.createBlock)(r,e);return o.insertBlock(i,n,t)};function Jr(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function ei(e){return Do(e,{stripExperimentalSettings:!0})}function ti(e,t){return{type:"SAVE_REUSABLE_BLOCK_SUCCESS",id:e,updatedId:t}}function ni(){return{type:"MARK_LAST_CHANGE_AS_PERSISTENT"}}function oi(){return{type:"MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"}}const ri=()=>({dispatch:e})=>{e({type:"MARK_AUTOMATIC_CHANGE"});const{requestIdleCallback:t=e=>setTimeout(e,100)}=window;t((()=>{e({type:"MARK_AUTOMATIC_CHANGE_FINAL"})}))},ii=(e=!0)=>({dispatch:t})=>{t.__unstableSetEditorMode(e?"navigation":"edit")},si=e=>({registry:t})=>{t.dispatch(le.store).set("core","editorTool",e),"navigation"===e?(0,Ao.speak)((0,C.__)("You are currently in Write mode.")):"edit"===e&&(0,Ao.speak)((0,C.__)("You are currently in Design mode."))};function li(){return y()('wp.data.dispatch( "core/block-editor" ).setBlockMovingClientId',{since:"6.7",hint:"Block moving mode feature has been removed"}),{type:"DO_NOTHING"}}const ai=(e,t=!0)=>({select:n,dispatch:o})=>{if(!e||!e.length)return;const r=n.getBlocksByClientId(e);if(r.some((e=>!e)))return;const i=r.map((e=>e.name));if(i.some((e=>!(0,l.hasBlockSupport)(e,"multiple",!0))))return;const s=n.getBlockRootClientId(e[0]),a=ar(e),c=n.getBlockIndex(a[a.length-1]),u=r.map((e=>(0,l.__experimentalCloneSanitizedBlock)(e)));return o.insertBlocks(u,c+1,s,t),u.length>1&&t&&o.multiSelect(u[0].clientId,u[u.length-1].clientId),u.map((e=>e.clientId))},ci=e=>({select:t,dispatch:n})=>{if(!e)return;const o=t.getBlockRootClientId(e);if(t.getTemplateLock(o))return;const r=t.getBlockIndex(e),i=o?t.getDirectInsertBlock(o):null;if(!i)return n.insertDefaultBlock({},o,r);const s={};if(i.attributesToCopy){const n=t.getBlockAttributes(e);i.attributesToCopy.forEach((e=>{n[e]&&(s[e]=n[e])}))}const a=(0,l.createBlock)(i.name,{...i.attributes,...s});return n.insertBlock(a,r,o)},ui=e=>({select:t,dispatch:n})=>{if(!e)return;const o=t.getBlockRootClientId(e);if(t.getTemplateLock(o))return;const r=t.getBlockIndex(e),i=o?t.getDirectInsertBlock(o):null;if(!i)return n.insertDefaultBlock({},o,r+1);const s={};if(i.attributesToCopy){const n=t.getBlockAttributes(e);i.attributesToCopy.forEach((e=>{n[e]&&(s[e]=n[e])}))}const a=(0,l.createBlock)(i.name,{...i.attributes,...s});return n.insertBlock(a,r+1,o)};function di(e,t){return{type:"TOGGLE_BLOCK_HIGHLIGHT",clientId:e,isHighlighted:t}}const pi=e=>async({dispatch:t})=>{t(di(e,!0)),await new Promise((e=>setTimeout(e,150))),t(di(e,!1))};function hi(e,t){return{type:"SET_HAS_CONTROLLED_INNER_BLOCKS",hasControlledInnerBlocks:t,clientId:e}}function gi(e){return{type:"SET_BLOCK_VISIBILITY",updates:e}}function mi(e,t){return{type:"SET_TEMPORARILY_EDITING_AS_BLOCKS",temporarilyEditingAsBlocks:e,focusModeToRevert:t}}const fi=e=>({select:t,dispatch:n})=>{if(!e||"object"!=typeof e)return void console.error("Category should be an `InserterMediaCategory` object.");if(!e.name)return void console.error("Category should have a `name` that should be unique among all media categories.");if(!e.labels?.name)return void console.error("Category should have a `labels.name`.");if(!["image","audio","video"].includes(e.mediaType))return void console.error("Category should have `mediaType` property that is one of `image|audio|video`.");if(!e.fetch||"function"!=typeof e.fetch)return void console.error("Category should have a `fetch` function defined with the following signature `(InserterMediaRequest) => Promise`.");const o=t.getRegisteredInserterMediaCategories();o.some((({name:t})=>t===e.name))?console.error(`A category is already registered with the same name: "${e.name}".`):o.some((({labels:{name:t}={}})=>t===e.labels?.name))?console.error(`A category is already registered with the same labels.name: "${e.labels.name}".`):n({type:"REGISTER_INSERTER_MEDIA_CATEGORY",category:{...e,isExternalResource:!0}})};function bi(e="",t){return{type:"SET_BLOCK_EDITING_MODE",clientId:e,mode:t}}function ki(e=""){return{type:"UNSET_BLOCK_EDITING_MODE",clientId:e}}const vi={reducer:ne,selectors:t,actions:i},_i=(0,c.createReduxStore)(ce,{...vi,persist:["preferences"]}),xi=(0,c.registerStore)(ce,{...vi,persist:["preferences"]});function yi(...e){const{clientId:t=null}=_();return(0,c.useSelect)((n=>O(n(_i)).getBlockSettings(t,...e)),[t,...e])}function Si(e){y()("wp.blockEditor.useSetting",{since:"6.5",alternative:"wp.blockEditor.useSettings",note:"The new useSettings function can retrieve multiple settings at once, with better performance."});const[t]=yi(e);return t}O(xi).registerPrivateActions(r),O(xi).registerPrivateSelectors(e),O(_i).registerPrivateActions(r),O(_i).registerPrivateSelectors(e);const wi=window.wp.styleEngine,Ci="1600px",Bi="320px",Ii=1,ji=.25,Ei=.75,Ti="14px";function Mi({minimumFontSize:e,maximumFontSize:t,fontSize:n,minimumViewportWidth:o=Bi,maximumViewportWidth:r=Ci,scaleFactor:i=Ii,minimumFontSizeLimit:s}){if(s=Pi(s)?s:Ti,n){const o=Pi(n);if(!o?.unit)return null;const r=Pi(s,{coerceTo:o.unit});if(r?.value&&!e&&!t&&o?.value<=r?.value)return null;if(t||(t=`${o.value}${o.unit}`),!e){const t="px"===o.unit?o.value:16*o.value,n=Math.min(Math.max(1-.075*Math.log2(t),ji),Ei),i=Ri(o.value*n,3);e=r?.value&&i{if("string"==typeof e.fontWeight&&/\s/.test(e.fontWeight.trim())){i=!0;let[t,o]=e.fontWeight.split(" ");t=parseInt(t.slice(0,1)),o="1000"===o?10:parseInt(o.slice(0,1));for(let e=t;e<=o;e++){const t=`${e.toString()}00`;n.some((e=>e.value===t))||n.push(Ni(t))}}const o=Ni("number"==typeof e.fontWeight?e.fontWeight.toString():e.fontWeight),r=function(e){if(!e)return{};if("object"==typeof e)return e;let t;switch(e){case"normal":t=(0,C._x)("Regular","font style");break;case"italic":t=(0,C._x)("Italic","font style");break;case"oblique":t=(0,C._x)("Oblique","font style");break;default:t=e}return{name:t,value:e}}(e.fontStyle);r&&Object.keys(r).length&&(t.some((e=>e.value===r.value))||t.push(r)),o&&Object.keys(o).length&&(n.some((e=>e.value===o.value))||i||n.push(o))})),n.some((e=>e.value>="600"))||n.push({name:(0,C._x)("Bold","font weight"),value:"700"}),t.some((e=>"italic"===e.value))||t.push({name:(0,C._x)("Italic","font style"),value:"italic"}),r&&(t=Li,n=Ai),t=0===t.length?Li:t,n=0===n.length?Ai:n,t.forEach((({name:e,value:t})=>{n.forEach((({name:n,value:r})=>{const i="normal"===t?n:(0,C.sprintf)(/* translators: 1: Font weight name. 2: Font style name. */ /* translators: 1: Font weight name. 2: Font style name. */ -(0,C._x)("%1$s %2$s","font"),n,e);o.push({key:`${t}-${r}`,name:i,style:{fontStyle:t,fontWeight:r}})}))})),{fontStyles:t,fontWeights:n,combinedStyleAndWeightOptions:o,isSystemFont:r,isVariableFont:i}}function Di(e,t){const{size:n}=e;if(!n||"0"===n||!1===e?.fluid)return n;if(!zi(t?.typography)&&!zi(e))return n;let o=function(e){const t=e?.typography,n=e?.layout,o=Pi(n?.wideSize)?n?.wideSize:null;return zi(t)&&o?{fluid:{maxViewportWidth:o,...t.fluid}}:{fluid:t?.fluid}}(t);o="object"==typeof o?.fluid?o?.fluid:{};return Mi({minimumFontSize:e?.fluid?.min,maximumFontSize:e?.fluid?.max,fontSize:n,minimumFontSizeLimit:o?.minFontSize,maximumViewportWidth:o?.maxViewportWidth,minimumViewportWidth:o?.minViewportWidth})||n}function zi(e){const t=e?.fluid;return!0===t||t&&"object"==typeof t&&Object.keys(t).length>0}function Vi(e,t){if(!(t="number"==typeof t?t.toString():t)||"string"!=typeof t)return"";if(!e||0===e.length)return t;const n=e?.reduce(((e,{value:n})=>Math.abs(parseInt(n)-parseInt(t))`url( '#wp-duotone-${e}' )`,classes:[]},{path:["shadow","presets"],valueKey:"shadow",cssVarInfix:"shadow",classes:[]},{path:["typography","fontSizes"],valueFunc:(e,t)=>Di(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:[]}],$i={"color.background":"color","color.text":"color","filter.duotone":"duotone","elements.link.color.text":"color","elements.link.:hover.color.text":"color","elements.link.typography.fontFamily":"font-family","elements.link.typography.fontSize":"font-size","elements.button.color.text":"color","elements.button.color.background":"color","elements.caption.color.text":"color","elements.button.typography.fontFamily":"font-family","elements.button.typography.fontSize":"font-size","elements.heading.color":"color","elements.heading.color.background":"color","elements.heading.typography.fontFamily":"font-family","elements.heading.gradient":"gradient","elements.heading.color.gradient":"gradient","elements.h1.color":"color","elements.h1.color.background":"color","elements.h1.typography.fontFamily":"font-family","elements.h1.color.gradient":"gradient","elements.h2.color":"color","elements.h2.color.background":"color","elements.h2.typography.fontFamily":"font-family","elements.h2.color.gradient":"gradient","elements.h3.color":"color","elements.h3.color.background":"color","elements.h3.typography.fontFamily":"font-family","elements.h3.color.gradient":"gradient","elements.h4.color":"color","elements.h4.color.background":"color","elements.h4.typography.fontFamily":"font-family","elements.h4.color.gradient":"gradient","elements.h5.color":"color","elements.h5.color.background":"color","elements.h5.typography.fontFamily":"font-family","elements.h5.color.gradient":"gradient","elements.h6.color":"color","elements.h6.color.background":"color","elements.h6.typography.fontFamily":"font-family","elements.h6.color.gradient":"gradient","color.gradient":"gradient",shadow:"shadow","typography.fontSize":"font-size","typography.fontFamily":"font-family"};function Ui(){return(0,u.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}}}function Wi(e,t,n,o,r){const i=[be(e,["blocks",t,...n]),be(e,n)];for(const s of i)if(s){const i=["custom","theme","default"];for(const l of i){const i=s[l];if(i){const s=i.find((e=>e[o]===r));if(s)return"slug"===o||Wi(e,t,n,"slug",s.slug)[o]===s[o]?s:void 0}}}}function Ki(e,t,n){if(!n||"string"!=typeof n){if("string"!=typeof n?.ref)return n;if(!(n=be(e,n.ref))||n?.ref)return n}let o;if(n.startsWith("var:"))o=n.slice(4).split("|");else{if(!n.startsWith("var(--wp--")||!n.endsWith(")"))return n;o=n.slice(10,-1).split("--")}const[r,...i]=o;return"preset"===r?function(e,t,n,[o,r]){const i=Gi.find((e=>e.cssVarInfix===o));if(!i)return n;const s=Wi(e.settings,t,i.path,"slug",r);if(s){const{valueKey:n}=i;return Ki(e,t,s[n])}return n}(e,t,n,i):"custom"===r?function(e,t,n,o){var r;const i=null!==(r=be(e.settings,["blocks",t,"custom",...o]))&&void 0!==r?r:be(e.settings,["custom",...o]);return i?Ki(e,t,i):n}(e,t,n,i):n}function Zi(e,t){if(!e||!t)return t;const n=e.split(","),o=t.split(","),r=[];return n.forEach((e=>{o.forEach((t=>{r.push(`${e.trim()} ${t.trim()}`)}))})),r.join(", ")}function qi(e,t){return"object"!=typeof e||"object"!=typeof t?e===t:w()(e?.styles,t?.styles)&&w()(e?.settings,t?.settings)}function Yi(e,t){if(!e||!t)return e;const n=function(e,t){if(!e||!t)return e;if("string"!=typeof e&&e?.ref){const n=(0,wi.getCSSValueFromRawStyle)(be(t,e.ref));if(n?.ref)return;return void 0===n?e:n}return e}(e,t);return n?.url&&(n.url=function(e,t){if(!e||!t||!Array.isArray(t))return e;const n=t.find((t=>t?.name===e));return n?.href?n?.href:e}(n.url,t?._links?.["wp:theme-file"])),n}const Xi=(0,a.createContext)({user:{},base:{},merged:{},setUserConfig:()=>{}}),Qi={settings:{},styles:{}},Ji=["appearanceTools","useRootPaddingAwareAlignments","background.backgroundImage","background.backgroundRepeat","background.backgroundSize","background.backgroundPosition","border.color","border.radius","border.style","border.width","shadow.presets","shadow.defaultPresets","color.background","color.button","color.caption","color.custom","color.customDuotone","color.customGradient","color.defaultDuotone","color.defaultGradients","color.defaultPalette","color.duotone","color.gradients","color.heading","color.link","color.palette","color.text","custom","dimensions.aspectRatio","dimensions.minHeight","layout.contentSize","layout.definitions","layout.wideSize","lightbox.enabled","lightbox.allowEditing","position.fixed","position.sticky","spacing.customSpacingSize","spacing.defaultSpacingSizes","spacing.spacingSizes","spacing.spacingScale","spacing.blockGap","spacing.margin","spacing.padding","spacing.units","typography.fluid","typography.customFontSize","typography.defaultFontSizes","typography.dropCap","typography.fontFamilies","typography.fontSizes","typography.fontStyle","typography.fontWeight","typography.letterSpacing","typography.lineHeight","typography.textAlign","typography.textColumns","typography.textDecoration","typography.textTransform","typography.writingMode"],es=()=>{const{user:e,setUserConfig:t}=(0,a.useContext)(Xi),n={settings:e.settings,styles:e.styles};return[!!n&&!w()(n,Qi),(0,a.useCallback)((()=>t(Qi)),[t])]};function ts(e,t,n="all"){const{setUserConfig:o,...r}=(0,a.useContext)(Xi),i=t?".blocks."+t:"",s=e?"."+e:"",l=`settings${i}${s}`,c=`settings${s}`,u="all"===n?"merged":n;return[(0,a.useMemo)((()=>{const t=r[u];if(!t)throw"Unsupported source";var n;if(e)return null!==(n=be(t,l))&&void 0!==n?n:be(t,c);let o={};return Ji.forEach((e=>{var n;const r=null!==(n=be(t,`settings${i}.${e}`))&&void 0!==n?n:be(t,`settings.${e}`);void 0!==r&&(o=fe(o,e.split("."),r))})),o}),[r,u,e,l,c,i]),e=>{o((t=>fe(t,l.split("."),e)))}]}function ns(e,t,n="all",{shouldDecodeEncode:o=!0}={}){const{merged:r,base:i,user:s,setUserConfig:l}=(0,a.useContext)(Xi),c=e?"."+e:"",u=t?`styles.blocks.${t}${c}`:`styles${c}`;let d,p;switch(n){case"all":d=be(r,u),p=o?Ki(r,t,d):d;break;case"user":d=be(s,u),p=o?Ki(r,t,d):d;break;case"base":d=be(i,u),p=o?Ki(i,t,d):d;break;default:throw"Unsupported source"}return[p,n=>{l((i=>fe(i,u.split("."),o?function(e,t,n,o){if(!o)return o;const r=$i[n],i=Gi.find((e=>e.cssVarInfix===r));if(!i)return o;const{valueKey:s,path:l}=i,a=Wi(e,t,l,s,o);return a?`var:preset|${r}|${a.slug}`:o}(r.settings,t,e,n):n)))}]}function os(e,t,n){const{supportedStyles:o,supports:r}=(0,c.useSelect)((e=>({supportedStyles:O(e(l.store)).getSupportedStyles(t,n),supports:e(l.store).getBlockType(t)?.supports})),[t,n]);return(0,a.useMemo)((()=>{const t={...e};return o.includes("fontSize")||(t.typography={...t.typography,fontSizes:{},customFontSize:!1,defaultFontSizes:!1}),o.includes("fontFamily")||(t.typography={...t.typography,fontFamilies:{}}),t.color={...t.color,text:t.color?.text&&o.includes("color"),background:t.color?.background&&(o.includes("background")||o.includes("backgroundColor")),button:t.color?.button&&o.includes("buttonColor"),heading:t.color?.heading&&o.includes("headingColor"),link:t.color?.link&&o.includes("linkColor"),caption:t.color?.caption&&o.includes("captionColor")},o.includes("background")||(t.color.gradients=[],t.color.customGradient=!1),o.includes("filter")||(t.color.defaultDuotone=!1,t.color.customDuotone=!1),["lineHeight","fontStyle","fontWeight","letterSpacing","textAlign","textTransform","textDecoration","writingMode"].forEach((e=>{o.includes(e)||(t.typography={...t.typography,[e]:!1})})),o.includes("columnCount")||(t.typography={...t.typography,textColumns:!1}),["contentSize","wideSize"].forEach((e=>{o.includes(e)||(t.layout={...t.layout,[e]:!1})})),["padding","margin","blockGap"].forEach((e=>{o.includes(e)||(t.spacing={...t.spacing,[e]:!1});const n=Array.isArray(r?.spacing?.[e])?r?.spacing?.[e]:r?.spacing?.[e]?.sides;n?.length&&t.spacing?.[e]&&(t.spacing={...t.spacing,[e]:{...t.spacing?.[e],sides:n}})})),["aspectRatio","minHeight"].forEach((e=>{o.includes(e)||(t.dimensions={...t.dimensions,[e]:!1})})),["radius","color","style","width"].forEach((e=>{o.includes("border"+e.charAt(0).toUpperCase()+e.slice(1))||(t.border={...t.border,[e]:!1})})),["backgroundImage","backgroundSize"].forEach((e=>{o.includes(e)||(t.background={...t.background,[e]:!1})})),t.shadow=!!o.includes("shadow")&&t.shadow,n&&(t.typography.textAlign=!1),t}),[e,o,r,n])}function rs(e){const t=e?.color?.palette?.custom,n=e?.color?.palette?.theme,o=e?.color?.palette?.default,r=e?.color?.defaultPalette;return(0,a.useMemo)((()=>{const e=[];return n&&n.length&&e.push({name:(0,C._x)("Theme","Indicates this palette comes from the theme."),colors:n}),r&&o&&o.length&&e.push({name:(0,C._x)("Default","Indicates this palette comes from WordPress."),colors:o}),t&&t.length&&e.push({name:(0,C._x)("Custom","Indicates this palette is created by the user."),colors:t}),e}),[t,n,o,r])}function is(e){const t=e?.color?.gradients?.custom,n=e?.color?.gradients?.theme,o=e?.color?.gradients?.default,r=e?.color?.defaultGradients;return(0,a.useMemo)((()=>{const e=[];return n&&n.length&&e.push({name:(0,C._x)("Theme","Indicates this palette comes from the theme."),gradients:n}),r&&o&&o.length&&e.push({name:(0,C._x)("Default","Indicates this palette comes from WordPress."),gradients:o}),t&&t.length&&e.push({name:(0,C._x)("Custom","Indicates this palette is created by the user."),gradients:t}),e}),[t,n,o,r])}function ss(e){var t,n,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e)){var r=e.length;for(t=0;t{if(null===e||"object"!=typeof e||Array.isArray(e))return e;const t=Object.entries(e).map((([e,t])=>[e,as(t)])).filter((([,e])=>void 0!==e));return t.length?Object.fromEntries(t):void 0};function cs(e,t,n,o,r,i){if(Object.values(null!=e?e:{}).every((e=>!e)))return n;if(1===i.length&&n.innerBlocks.length===o.length)return n;let s=o[0]?.attributes;if(i.length>1&&o.length>1){if(!o[r])return n;s=o[r]?.attributes}let l=n;return Object.entries(e).forEach((([e,n])=>{n&&t[e].forEach((e=>{const t=be(s,e);t&&(l={...l,attributes:fe(l.attributes,e,t)})}))})),l}function us(e,t,n){const o=(0,l.getBlockSupport)(e,t),r=o?.skipSerialization;return Array.isArray(r)?r.includes(n):r}const ds=new WeakMap;function ps({id:e,css:t}){return hs({id:e,css:t})}function hs({id:e,css:t,assets:n,__unstableType:o,variation:r,clientId:i}={}){const{setStyleOverride:s,deleteStyleOverride:l}=O((0,c.useDispatch)(_i)),u=(0,c.useRegistry)(),d=(0,a.useId)();(0,a.useEffect)((()=>{if(!t&&!n)return;const a=e||d,c={id:e,css:t,assets:n,__unstableType:o,variation:r,clientId:i};return ds.get(u)||ds.set(u,[]),ds.get(u).push([a,c]),window.queueMicrotask((()=>{ds.get(u)?.length&&u.batch((()=>{ds.get(u).forEach((e=>{s(...e)})),ds.set(u,[])}))})),()=>{const e=ds.get(u)?.find((([e])=>e===a));e?ds.set(u,ds.get(u).filter((([e])=>e!==a))):l(a)}}),[e,t,i,n,o,d,s,l,u])}function gs(e,t){const[n,o,r,i,s,l,c,u,d,p,h,g,m,f,b,k,v,_,x,y,S,w,C,B,I,j,E,T,M,P,R,N,L,A,O,D,z,V,F,H,G,$,U,W,K,Z,q,Y,X,Q,J,ee,te,ne,oe,re]=yi("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.minHeight","layout","border.color","border.radius","border.style","border.width","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");return os((0,a.useMemo)((()=>({background:{backgroundImage:n,backgroundSize:o},color:{palette:{custom:z,theme:F,default:H},gradients:{custom:Z,theme:q,default:Y},duotone:{custom:U,theme:W,default:K},defaultGradients:X,defaultPalette:G,defaultDuotone:$,custom:D,customGradient:Q,customDuotone:V,background:J,link:ee,heading:ne,button:oe,text:te},typography:{fontFamilies:{custom:r,default:i,theme:s},fontSizes:{custom:c,default:u,theme:d},customFontSize:p,defaultFontSizes:l,fontStyle:h,fontWeight:g,lineHeight:m,textAlign:f,textColumns:b,textDecoration:k,textTransform:_,letterSpacing:x,writingMode:v},spacing:{spacingSizes:{custom:I,default:j,theme:E},customSpacingSize:B,defaultSpacingSizes:C,padding:y,margin:S,blockGap:w,units:T},border:{color:N,radius:L,style:A,width:O},dimensions:{aspectRatio:M,minHeight:P},layout:R,parentLayout:t,shadow:re})),[n,o,r,i,s,l,c,u,d,p,h,g,m,f,b,k,_,x,v,y,S,w,C,B,I,j,E,T,M,P,R,t,N,L,A,O,D,z,V,F,H,G,$,U,W,K,Z,q,Y,X,Q,J,ee,te,ne,oe,re]),e)}const ms=(0,a.memo)((function({index:e,useBlockProps:t,setAllWrapperProps:n,...o}){const r=t(o),i=t=>n((n=>{const o=[...n];return o[e]=t,o}));return(0,a.useEffect)((()=>(i(r),()=>{i(void 0)}))),null}));(0,d.addFilter)("blocks.registerBlockType","core/compat/migrateLightBlockWrapper",(function(e){const{apiVersion:t=1}=e;return t<2&&(0,l.hasBlockSupport)(e,"lightBlockWrapper",!1)&&(e.apiVersion=2),e}));const fs=window.wp.components,bs={default:(0,fs.createSlotFill)("BlockControls"),block:(0,fs.createSlotFill)("BlockControlsBlock"),inline:(0,fs.createSlotFill)("BlockFormatControls"),other:(0,fs.createSlotFill)("BlockControlsOther"),parent:(0,fs.createSlotFill)("BlockControlsParent")};function ks({group:e="default",controls:t,children:n,__experimentalShareWithChildBlocks:o=!1}){const r=function(e,t){const n=_();return n[p]?bs[e]?.Fill:n[h]&&t?bs.parent.Fill:null}(e,o);if(!r)return null;const i=(0,re.jsxs)(re.Fragment,{children:["default"===e&&(0,re.jsx)(fs.ToolbarGroup,{controls:t}),n]});return(0,re.jsx)(fs.__experimentalStyleProvider,{document,children:(0,re.jsx)(r,{children:e=>{const{forwardedContext:t=[]}=e;return t.reduce(((e,[t,n])=>(0,re.jsx)(t,{...n,children:e})),i)}})})}window.wp.warning;const{ComponentsContext:vs}=O(fs.privateApis);function _s({group:e="default",...t}){const n=(0,a.useContext)(fs.__experimentalToolbarContext),o=(0,a.useContext)(vs),r=(0,a.useMemo)((()=>({forwardedContext:[[fs.__experimentalToolbarContext.Provider,{value:n}],[vs.Provider,{value:o}]]})),[n,o]),i=bs[e],s=(0,fs.__experimentalUseSlotFills)(i.name);if(!i)return null;if(!s?.length)return null;const{Slot:l}=i,c=(0,re.jsx)(l,{...t,bubblesVirtually:!0,fillProps:r});return"default"===e?c:(0,re.jsx)(fs.ToolbarGroup,{children:c})}const xs=ks;xs.Slot=_s;const ys=e=>(0,re.jsx)(ks,{group:"inline",...e});ys.Slot=e=>(0,re.jsx)(_s,{group:"inline",...e});const Ss=xs,ws=(0,re.jsx)(oe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,re.jsx)(oe.Path,{d:"M9 9v6h11V9H9zM4 20h1.5V4H4v16z"})}),Cs=(0,re.jsx)(oe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,re.jsx)(oe.Path,{d:"M12.5 15v5H11v-5H4V9h7V4h1.5v5h7v6h-7Z"})}),Bs=(0,re.jsx)(oe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,re.jsx)(oe.Path,{d:"M4 15h11V9H4v6zM18.5 4v16H20V4h-1.5z"})}),Is=(0,re.jsx)(oe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,re.jsx)(oe.Path,{d:"M9 15h6V9H9v6zm-5 5h1.5V4H4v16zM18.5 4v16H20V4h-1.5z"})}),js=(0,re.jsx)(oe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,re.jsx)(oe.Path,{d:"M4 4H5.5V20H4V4ZM7 10L17 10V14L7 14V10ZM20 4H18.5V20H20V4Z"})}),Es=(0,re.jsx)(oe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,re.jsx)(oe.Path,{d:"m14.5 6.5-1 1 3.7 3.7H4v1.6h13.2l-3.7 3.7 1 1 5.6-5.5z"})}),Ts=(0,re.jsx)(oe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,re.jsx)(oe.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"})}),Ms={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 Ps(e,t=""){return e.split(",").map((e=>`${e}${t?` ${t}`:""}`)).join(",")}function Rs(e,t=Ms,n,o){let r="";return t?.[n]?.spacingStyles?.length&&o&&t[n].spacingStyles.forEach((t=>{r+=`${Ps(e,t.selector.trim())} { `,r+=Object.entries(t.rules).map((([e,t])=>`${e}: ${t||o}`)).join("; "),r+="; }"})),r}function Ns(e){const{contentSize:t,wideSize:n,type:o="default"}=e,r={},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)&&"constrained"===o&&( -// translators: %s: container size (i.e. 600px etc) -r.none=(0,C.sprintf)((0,C.__)("Max %s wide"),t)),i.test(n)&&( -// translators: %s: container size (i.e. 600px etc) -r.wide=(0,C.sprintf)((0,C.__)("Max %s wide"),n)),r}const Ls=(0,re.jsx)(oe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,re.jsx)(oe.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z"})}),As=(0,re.jsxs)(oe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,re.jsx)(oe.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,re.jsx)(oe.Path,{d:"m4.5 7.5v9h1.5v-9z"}),(0,re.jsx)(oe.Path,{d:"m18 7.5v9h1.5v-9z"})]}),Os=(0,re.jsxs)(oe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,re.jsx)(oe.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,re.jsx)(oe.Path,{d:"m7.5 6h9v-1.5h-9z"}),(0,re.jsx)(oe.Path,{d:"m7.5 19.5h9v-1.5h-9z"})]}),Ds=(0,re.jsxs)(oe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,re.jsx)(oe.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,re.jsx)(oe.Path,{d:"m16.5 6h-9v-1.5h9z"})]}),zs=(0,re.jsxs)(oe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,re.jsx)(oe.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,re.jsx)(oe.Path,{d:"m18 16.5v-9h1.5v9z"})]}),Vs=(0,re.jsxs)(oe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,re.jsx)(oe.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,re.jsx)(oe.Path,{d:"m16.5 19.5h-9v-1.5h9z"})]}),Fs=(0,re.jsxs)(oe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,re.jsx)(oe.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,re.jsx)(oe.Path,{d:"m4.5 16.5v-9h1.5v9z"})]}),Hs=8,Gs=["top","right","bottom","left"],$s={top:void 0,right:void 0,bottom:void 0,left:void 0},Us={custom:Ls,axial:Ls,horizontal:As,vertical:Os,top:Ds,right:zs,bottom:Vs,left:Fs},Ws={default:(0,C.__)("Spacing control"),top:(0,C.__)("Top"),bottom:(0,C.__)("Bottom"),left:(0,C.__)("Left"),right:(0,C.__)("Right"),mixed:(0,C.__)("Mixed"),vertical:(0,C.__)("Vertical"),horizontal:(0,C.__)("Horizontal"),axial:(0,C.__)("Horizontal & vertical"),custom:(0,C.__)("Custom")},Ks={axial:"axial",top:"top",right:"right",bottom:"bottom",left:"left",custom:"custom"};function Zs(e){return!!e?.includes&&("0"===e||e.includes("var:preset|spacing|"))}function qs(e,t){if(!Zs(e))return e;const n=Qs(e),o=t.find((e=>String(e.slug)===n));return o?.size}function Ys(e,t){if(!e||Zs(e)||"0"===e)return e;const n=t.find((t=>String(t.size)===String(e)));return n?.slug?`var:preset|spacing|${n.slug}`:e}function Xs(e){if(!e)return;const t=e.match(/var:preset\|spacing\|(.+)/);return t?`var(--wp--preset--spacing--${t[1]})`:e}function Qs(e){if(!e)return;if("0"===e||"default"===e)return e;const t=e.match(/var:preset\|spacing\|(.+)/);return t?t[1]:void 0}function Js(e,t){if(!e||!e.length)return!1;const n=e.includes("horizontal")||e.includes("left")&&e.includes("right"),o=e.includes("vertical")||e.includes("top")&&e.includes("bottom");return"horizontal"===t?n:"vertical"===t?o:n||o}function el(e,t="0"){const n=function(e){if(!e)return null;const t="string"==typeof e;return{top:t?e:e?.top,left:t?e:e?.left}}(e);if(!n)return null;const o=Xs(n?.top)||t,r=Xs(n?.left)||t;return o===r?o:`${o} ${r}`}const tl=(0,re.jsx)(oe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,re.jsx)(oe.Path,{d:"M9 20h6V9H9v11zM4 4v1.5h16V4H4z"})}),nl=(0,re.jsx)(oe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,re.jsx)(oe.Path,{d:"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"})}),ol=(0,re.jsx)(oe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,re.jsx)(oe.Path,{d:"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"})}),rl=(0,re.jsx)(oe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,re.jsx)(oe.Path,{d:"M4 4L20 4L20 5.5L4 5.5L4 4ZM10 7L14 7L14 17L10 17L10 7ZM20 18.5L4 18.5L4 20L20 20L20 18.5Z"})}),il=(0,re.jsx)(oe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,re.jsx)(oe.Path,{d:"M7 4H17V8L7 8V4ZM7 16L17 16V20L7 20V16ZM20 11.25H4V12.75H20V11.25Z"})}),sl={top:{icon:tl,title:(0,C._x)("Align top","Block vertical alignment setting")},center:{icon:nl,title:(0,C._x)("Align middle","Block vertical alignment setting")},bottom:{icon:ol,title:(0,C._x)("Align bottom","Block vertical alignment setting")},stretch:{icon:rl,title:(0,C._x)("Stretch to fill","Block vertical alignment setting")},"space-between":{icon:il,title:(0,C._x)("Space between","Block vertical alignment setting")}},ll=["top","center","bottom"],al=function({value:e,onChange:t,controls:n=ll,isCollapsed:o=!0,isToolbar:r}){function i(n){return()=>t(e===n?void 0:n)}const s=sl[e],l=sl.top,a=r?fs.ToolbarGroup:fs.ToolbarDropdownMenu,c=r?{isCollapsed:o}:{};return(0,re.jsx)(a,{icon:s?s.icon:l.icon,label:(0,C._x)("Change vertical alignment","Block vertical alignment setting label"),controls:n.map((t=>({...sl[t],isActive:e===t,role:o?"menuitemradio":void 0,onClick:i(t)}))),...c})},cl=e=>(0,re.jsx)(al,{...e,isToolbar:!1}),ul=e=>(0,re.jsx)(al,{...e,isToolbar:!0}),dl={left:ws,center:Cs,right:Bs,"space-between":Is,stretch:js},pl=function({allowedControls:e=["left","center","right","space-between"],isCollapsed:t=!0,onChange:n,value:o,popoverProps:r,isToolbar:i}){const s=e=>{n(e===o?void 0:e)},l=o?dl[o]:dl.left,a=[{name:"left",icon:ws,title:(0,C.__)("Justify items left"),isActive:"left"===o,onClick:()=>s("left")},{name:"center",icon:Cs,title:(0,C.__)("Justify items center"),isActive:"center"===o,onClick:()=>s("center")},{name:"right",icon:Bs,title:(0,C.__)("Justify items right"),isActive:"right"===o,onClick:()=>s("right")},{name:"space-between",icon:Is,title:(0,C.__)("Space between items"),isActive:"space-between"===o,onClick:()=>s("space-between")},{name:"stretch",icon:js,title:(0,C.__)("Stretch items"),isActive:"stretch"===o,onClick:()=>s("stretch")}],c=i?fs.ToolbarGroup:fs.ToolbarDropdownMenu,u=i?{isCollapsed:t}:{};return(0,re.jsx)(c,{icon:l,popoverProps:r,label:(0,C.__)("Change items justification"),controls:a.filter((t=>e.includes(t.name))),...u})},hl=e=>(0,re.jsx)(pl,{...e,isToolbar:!1}),gl=e=>(0,re.jsx)(pl,{...e,isToolbar:!0}),ml={left:"flex-start",right:"flex-end",center:"center","space-between":"space-between"},fl={left:"flex-start",right:"flex-end",center:"center",stretch:"stretch"},bl={top:"flex-start",center:"center",bottom:"flex-end",stretch:"stretch","space-between":"space-between"},kl=["wrap","nowrap"],vl={name:"flex",label:(0,C.__)("Flex"),inspectorControls:function({layout:e={},onChange:t,layoutBlockSupport:n={}}){const{allowOrientation:o=!0,allowJustification:r=!0}=n;return(0,re.jsxs)(re.Fragment,{children:[(0,re.jsxs)(fs.Flex,{children:[r&&(0,re.jsx)(fs.FlexItem,{children:(0,re.jsx)(yl,{layout:e,onChange:t})}),o&&(0,re.jsx)(fs.FlexItem,{children:(0,re.jsx)(wl,{layout:e,onChange:t})})]}),(0,re.jsx)(Sl,{layout:e,onChange:t})]})},toolBarControls:function({layout:e={},onChange:t,layoutBlockSupport:n}){const{allowVerticalAlignment:o=!0,allowJustification:r=!0}=n;return r||o?(0,re.jsxs)(Ss,{group:"block",__experimentalShareWithChildBlocks:!0,children:[r&&(0,re.jsx)(yl,{layout:e,onChange:t,isToolbar:!0}),o&&(0,re.jsx)(_l,{layout:e,onChange:t})]}):null},getLayoutStyle:function({selector:e,layout:t,style:n,blockName:o,hasBlockGapSupport:r,layoutDefinitions:i=Ms}){const{orientation:s="horizontal"}=t,l=n?.spacing?.blockGap&&!us(o,"spacing","blockGap")?el(n?.spacing?.blockGap,"0.5em"):void 0,a=ml[t.justifyContent],c=kl.includes(t.flexWrap)?t.flexWrap:"wrap",u=bl[t.verticalAlignment],d=fl[t.justifyContent]||fl.left;let p="";const h=[];return c&&"wrap"!==c&&h.push(`flex-wrap: ${c}`),"horizontal"===s?(u&&h.push(`align-items: ${u}`),a&&h.push(`justify-content: ${a}`)):(u&&h.push(`justify-content: ${u}`),h.push("flex-direction: column"),h.push(`align-items: ${d}`)),h.length&&(p=`${Ps(e)} {\n\t\t\t\t${h.join("; ")};\n\t\t\t}`),r&&l&&(p+=Rs(e,i,"flex",l)),p},getOrientation(e){const{orientation:t="horizontal"}=e;return t},getAlignments:()=>[]};function _l({layout:e,onChange:t}){const{orientation:n="horizontal"}=e,o="horizontal"===n?bl.center:bl.top,{verticalAlignment:r=o}=e;return(0,re.jsx)(cl,{onChange:n=>{t({...e,verticalAlignment:n})},value:r,controls:"horizontal"===n?["top","center","bottom","stretch"]:["top","center","bottom","space-between"]})}const xl={placement:"bottom-start"};function yl({layout:e,onChange:t,isToolbar:n=!1}){const{justifyContent:o="left",orientation:r="horizontal"}=e,i=n=>{t({...e,justifyContent:n})},s=["left","center","right"];if("horizontal"===r?s.push("space-between"):s.push("stretch"),n)return(0,re.jsx)(hl,{allowedControls:s,value:o,onChange:i,popoverProps:xl});const l=[{value:"left",icon:ws,label:(0,C.__)("Justify items left")},{value:"center",icon:Cs,label:(0,C.__)("Justify items center")},{value:"right",icon:Bs,label:(0,C.__)("Justify items right")}];return"horizontal"===r?l.push({value:"space-between",icon:Is,label:(0,C.__)("Space between items")}):l.push({value:"stretch",icon:js,label:(0,C.__)("Stretch items")}),(0,re.jsx)(fs.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,C.__)("Justification"),value:o,onChange:i,className:"block-editor-hooks__flex-layout-justification-controls",children:l.map((({value:e,icon:t,label:n})=>(0,re.jsx)(fs.__experimentalToggleGroupControlOptionIcon,{value:e,icon:t,label:n},e)))})}function Sl({layout:e,onChange:t}){const{flexWrap:n="wrap"}=e;return(0,re.jsx)(fs.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,C.__)("Allow to wrap to multiple lines"),onChange:n=>{t({...e,flexWrap:n?"wrap":"nowrap"})},checked:"wrap"===n})}function wl({layout:e,onChange:t}){const{orientation:n="horizontal",verticalAlignment:o,justifyContent:r}=e;return(0,re.jsxs)(fs.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,className:"block-editor-hooks__flex-layout-orientation-controls",label:(0,C.__)("Orientation"),value:n,onChange:n=>{let i=o,s=r;return"horizontal"===n?("space-between"===o&&(i="center"),"stretch"===r&&(s="left")):("stretch"===o&&(i="top"),"space-between"===r&&(s="left")),t({...e,orientation:n,verticalAlignment:i,justifyContent:s})},children:[(0,re.jsx)(fs.__experimentalToggleGroupControlOptionIcon,{icon:Es,value:"horizontal",label:(0,C.__)("Horizontal")}),(0,re.jsx)(fs.__experimentalToggleGroupControlOptionIcon,{icon:Ts,value:"vertical",label:(0,C.__)("Vertical")})]})}const Cl={name:"default",label:(0,C.__)("Flow"),inspectorControls:function(){return null},toolBarControls:function(){return null},getLayoutStyle:function({selector:e,style:t,blockName:n,hasBlockGapSupport:o,layoutDefinitions:r=Ms}){const i=el(t?.spacing?.blockGap);let s="";us(n,"spacing","blockGap")||(i?.top?s=el(i?.top):"string"==typeof i&&(s=el(i)));let l="";return o&&s&&(l+=Rs(e,r,"default",s)),l},getOrientation:()=>"vertical",getAlignments(e,t){const n=Ns(e);if(void 0!==e.alignments)return e.alignments.includes("none")||e.alignments.unshift("none"),e.alignments.map((e=>({name:e,info:n[e]})));const o=[{name:"left"},{name:"center"},{name:"right"}];if(!t){const{contentSize:t,wideSize:r}=e;t&&o.unshift({name:"full"}),r&&o.unshift({name:"wide",info:n.wide})}return o.unshift({name:"none",info:n.none}),o}},Bl=(0,a.forwardRef)((function({icon:e,size:t=24,...n},o){return(0,a.cloneElement)(e,{width:t,height:t,...n,ref:o})})),Il=(0,re.jsx)(oe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,re.jsx)(oe.Path,{d:"M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM5 9h14v6H5V9Z"})}),jl=(0,re.jsx)(oe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,re.jsx)(oe.Path,{d:"M16 5.5H8V4h8v1.5ZM16 20H8v-1.5h8V20ZM5 9h14v6H5V9Z"})}),El={name:"constrained",label:(0,C.__)("Constrained"),inspectorControls:function({layout:e,onChange:t,layoutBlockSupport:n={}}){const{wideSize:o,contentSize:r,justifyContent:i="center"}=e,{allowJustification:s=!0,allowCustomContentAndWideSize:l=!0}=n,a=[{value:"left",icon:ws,label:(0,C.__)("Justify items left")},{value:"center",icon:Cs,label:(0,C.__)("Justify items center")},{value:"right",icon:Bs,label:(0,C.__)("Justify items right")}],[c]=yi("spacing.units"),u=(0,fs.__experimentalUseCustomUnits)({availableUnits:c||["%","px","em","rem","vw"]});return(0,re.jsxs)(fs.__experimentalVStack,{spacing:4,className:"block-editor-hooks__layout-constrained",children:[l&&(0,re.jsxs)(re.Fragment,{children:[(0,re.jsx)(fs.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,C.__)("Content width"),labelPosition:"top",value:r||o||"",onChange:n=>{n=0>parseFloat(n)?"0":n,t({...e,contentSize:n})},units:u,prefix:(0,re.jsx)(fs.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,re.jsx)(Bl,{icon:Il})})}),(0,re.jsx)(fs.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,C.__)("Wide width"),labelPosition:"top",value:o||r||"",onChange:n=>{n=0>parseFloat(n)?"0":n,t({...e,wideSize:n})},units:u,prefix:(0,re.jsx)(fs.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,re.jsx)(Bl,{icon:jl})})}),(0,re.jsx)("p",{className:"block-editor-hooks__layout-constrained-helptext",children:(0,C.__)("Customize the width for all elements that are assigned to the center or wide columns.")})]}),s&&(0,re.jsx)(fs.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,C.__)("Justification"),value:i,onChange:n=>{t({...e,justifyContent:n})},children:a.map((({value:e,icon:t,label:n})=>(0,re.jsx)(fs.__experimentalToggleGroupControlOptionIcon,{value:e,icon:t,label:n},e)))})]})},toolBarControls:function({layout:e={},onChange:t,layoutBlockSupport:n}){const{allowJustification:o=!0}=n;return o?(0,re.jsx)(Ss,{group:"block",__experimentalShareWithChildBlocks:!0,children:(0,re.jsx)(Ml,{layout:e,onChange:t})}):null},getLayoutStyle:function({selector:e,layout:t={},style:n,blockName:o,hasBlockGapSupport:r,layoutDefinitions:i=Ms}){const{contentSize:s,wideSize:l,justifyContent:a}=t,c=el(n?.spacing?.blockGap);let u="";us(o,"spacing","blockGap")||(c?.top?u=el(c?.top):"string"==typeof c&&(u=el(c)));const d="left"===a?"0 !important":"auto !important",p="right"===a?"0 !important":"auto !important";let h=s||l?`\n\t\t\t\t\t${Ps(e,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")} {\n\t\t\t\t\t\tmax-width: ${null!=s?s:l};\n\t\t\t\t\t\tmargin-left: ${d};\n\t\t\t\t\t\tmargin-right: ${p};\n\t\t\t\t\t}\n\t\t\t\t\t${Ps(e,"> .alignwide")} {\n\t\t\t\t\t\tmax-width: ${null!=l?l:s};\n\t\t\t\t\t}\n\t\t\t\t\t${Ps(e,"> .alignfull")} {\n\t\t\t\t\t\tmax-width: none;\n\t\t\t\t\t}\n\t\t\t\t`:"";return"left"===a?h+=`${Ps(e,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")}\n\t\t\t{ margin-left: ${d}; }`:"right"===a&&(h+=`${Ps(e,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")}\n\t\t\t{ margin-right: ${p}; }`),n?.spacing?.padding&&(0,wi.getCSSRules)(n).forEach((t=>{if("paddingRight"===t.key){const n="0"===t.value?"0px":t.value;h+=`\n\t\t\t\t\t${Ps(e,"> .alignfull")} {\n\t\t\t\t\t\tmargin-right: calc(${n} * -1);\n\t\t\t\t\t}\n\t\t\t\t\t`}else if("paddingLeft"===t.key){const n="0"===t.value?"0px":t.value;h+=`\n\t\t\t\t\t${Ps(e,"> .alignfull")} {\n\t\t\t\t\t\tmargin-left: calc(${n} * -1);\n\t\t\t\t\t}\n\t\t\t\t\t`}})),r&&u&&(h+=Rs(e,i,"constrained",u)),h},getOrientation:()=>"vertical",getAlignments(e){const t=Ns(e);if(void 0!==e.alignments)return e.alignments.includes("none")||e.alignments.unshift("none"),e.alignments.map((e=>({name:e,info:t[e]})));const{contentSize:n,wideSize:o}=e,r=[{name:"left"},{name:"center"},{name:"right"}];return n&&r.unshift({name:"full"}),o&&r.unshift({name:"wide",info:t.wide}),r.unshift({name:"none",info:t.none}),r}},Tl={placement:"bottom-start"};function Ml({layout:e,onChange:t}){const{justifyContent:n="center"}=e;return(0,re.jsx)(hl,{allowedControls:["left","center","right"],value:n,onChange:n=>{t({...e,justifyContent:n})},popoverProps:Tl})}const Pl={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},Rl=[{value:"px",label:"px",default:0},{value:"rem",label:"rem",default:0},{value:"em",label:"em",default:0}],Nl={name:"grid",label:(0,C.__)("Grid"),inspectorControls:function({layout:e={},onChange:t,layoutBlockSupport:n={}}){const{allowSizingOnChildren:o=!1}=n,r=window.__experimentalEnableGridInteractivity||!!e?.columnCount,i=window.__experimentalEnableGridInteractivity||!e?.columnCount;return(0,re.jsxs)(re.Fragment,{children:[(0,re.jsx)(Ol,{layout:e,onChange:t}),(0,re.jsxs)(fs.__experimentalVStack,{spacing:4,children:[r&&(0,re.jsx)(Al,{layout:e,onChange:t,allowSizingOnChildren:o}),i&&(0,re.jsx)(Ll,{layout:e,onChange:t})]})]})},toolBarControls:function(){return null},getLayoutStyle:function({selector:e,layout:t,style:n,blockName:o,hasBlockGapSupport:r,layoutDefinitions:i=Ms}){const{minimumColumnWidth:s=null,columnCount:l=null,rowCount:a=null}=t,c=n?.spacing?.blockGap&&!us(o,"spacing","blockGap")?el(n?.spacing?.blockGap,"0.5em"):void 0;let u="";const d=[];if(s&&l>0){const e=`max(${s}, ( 100% - (${c||"1.2rem"}*${l-1}) ) / ${l})`;d.push(`grid-template-columns: repeat(auto-fill, minmax(${e}, 1fr))`,"container-type: inline-size"),a&&d.push(`grid-template-rows: repeat(${a}, minmax(1rem, auto))`)}else l?(d.push(`grid-template-columns: repeat(${l}, minmax(0, 1fr))`),a&&d.push(`grid-template-rows: repeat(${a}, minmax(1rem, auto))`)):d.push(`grid-template-columns: repeat(auto-fill, minmax(min(${s||"12rem"}, 100%), 1fr))`,"container-type: inline-size");return d.length&&(u=`${Ps(e)} { ${d.join("; ")}; }`),r&&c&&(u+=Rs(e,i,"grid",c)),u},getOrientation:()=>"horizontal",getAlignments:()=>[]};function Ll({layout:e,onChange:t}){const{minimumColumnWidth:n,columnCount:o,isManualPlacement:r}=e,i=n||(r||o?null:"12rem"),[s,l="rem"]=(0,fs.__experimentalParseQuantityAndUnitFromRawValue)(i);return(0,re.jsxs)("fieldset",{children:[(0,re.jsx)(fs.BaseControl.VisualLabel,{as:"legend",children:(0,C.__)("Minimum column width")}),(0,re.jsxs)(fs.Flex,{gap:4,children:[(0,re.jsx)(fs.FlexItem,{isBlock:!0,children:(0,re.jsx)(fs.__experimentalUnitControl,{size:"__unstable-large",onChange:n=>{t({...e,minimumColumnWidth:""===n?void 0:n})},onUnitChange:n=>{let o;["em","rem"].includes(n)&&"px"===l?o=(s/16).toFixed(2)+n:["em","rem"].includes(l)&&"px"===n&&(o=Math.round(16*s)+n),t({...e,minimumColumnWidth:o})},value:i,units:Rl,min:0,label:(0,C.__)("Minimum column width"),hideLabelFromVision:!0})}),(0,re.jsx)(fs.FlexItem,{isBlock:!0,children:(0,re.jsx)(fs.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,onChange:n=>{t({...e,minimumColumnWidth:[n,l].join("")})},value:s||0,min:0,max:Pl[l]||600,withInputField:!1,label:(0,C.__)("Minimum column width"),hideLabelFromVision:!0})})]})]})}function Al({layout:e,onChange:t,allowSizingOnChildren:n}){const o=window.__experimentalEnableGridInteractivity?void 0:3,{columnCount:r=o,rowCount:i,isManualPlacement:s}=e;return(0,re.jsx)(re.Fragment,{children:(0,re.jsxs)("fieldset",{children:[(!window.__experimentalEnableGridInteractivity||!s)&&(0,re.jsx)(fs.BaseControl.VisualLabel,{as:"legend",children:(0,C.__)("Columns")}),(0,re.jsxs)(fs.Flex,{gap:4,children:[(0,re.jsx)(fs.FlexItem,{isBlock:!0,children:(0,re.jsx)(fs.__experimentalNumberControl,{size:"__unstable-large",onChange:n=>{if(window.__experimentalEnableGridInteractivity){const o=""===n||"0"===n?s?1:void 0:parseInt(n,10);t({...e,columnCount:o})}else{const o=""===n||"0"===n?1:parseInt(n,10);t({...e,columnCount:o})}},value:r,min:1,label:(0,C.__)("Columns"),hideLabelFromVision:!window.__experimentalEnableGridInteractivity||!s})}),(0,re.jsx)(fs.FlexItem,{isBlock:!0,children:window.__experimentalEnableGridInteractivity&&n&&s?(0,re.jsx)(fs.__experimentalNumberControl,{size:"__unstable-large",onChange:n=>{const o=""===n||"0"===n?1:parseInt(n,10);t({...e,rowCount:o})},value:i,min:1,label:(0,C.__)("Rows")}):(0,re.jsx)(fs.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:null!=r?r:1,onChange:n=>t({...e,columnCount:""===n||"0"===n?1:n}),min:1,max:16,withInputField:!1,label:(0,C.__)("Columns"),hideLabelFromVision:!0})})]})]})})}function Ol({layout:e,onChange:t}){const{columnCount:n,rowCount:o,minimumColumnWidth:r,isManualPlacement:i}=e,[s,l]=(0,a.useState)(n||3),[c,u]=(0,a.useState)(o),[d,p]=(0,a.useState)(r||"12rem"),h=i||n&&!window.__experimentalEnableGridInteractivity?"manual":"auto",g="manual"===h?(0,C.__)("Grid items can be manually placed in any position on the grid."):(0,C.__)("Grid items are placed automatically depending on their order.");return(0,re.jsxs)(fs.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,C.__)("Grid item position"),value:h,onChange:i=>{"manual"===i?p(r||"12rem"):(l(n||3),u(o)),t({...e,columnCount:"manual"===i?s:null,rowCount:"manual"===i&&window.__experimentalEnableGridInteractivity?c:void 0,isManualPlacement:!("manual"!==i||!window.__experimentalEnableGridInteractivity)||void 0,minimumColumnWidth:"auto"===i?d:null})},isBlock:!0,help:window.__experimentalEnableGridInteractivity?g:void 0,children:[(0,re.jsx)(fs.__experimentalToggleGroupControlOption,{value:"auto",label:(0,C.__)("Auto")},"auto"),(0,re.jsx)(fs.__experimentalToggleGroupControlOption,{value:"manual",label:(0,C.__)("Manual")},"manual")]})}const Dl=[Cl,vl,El,Nl];function zl(e="default"){return Dl.find((t=>t.name===e))}const Vl={type:"default"},Fl=(0,a.createContext)(Vl),Hl=Fl.Provider;function Gl(){return(0,a.useContext)(Fl)}const $l=[],Ul=["none","left","center","right","wide","full"],Wl=["wide","full"];function Kl(e=Ul){e.includes("none")||(e=["none",...e]);const t=1===e.length&&"none"===e[0],[n,o,r]=(0,c.useSelect)((e=>{var n;if(t)return[!1,!1,!1];const o=e(_i).getSettings();return[null!==(n=o.alignWide)&&void 0!==n&&n,o.supportsLayout,o.__unstableIsBlockBasedTheme]}),[t]),i=Gl();if(t)return $l;const s=zl(i?.type);if(o){const t=s.getAlignments(i,r).filter((t=>e.includes(t.name)));return 1===t.length&&"none"===t[0].name?$l:t}if("default"!==s.name&&"constrained"!==s.name)return $l;const l=e.filter((e=>i.alignments?i.alignments.includes(e):!(!n&&Wl.includes(e))&&Ul.includes(e))).map((e=>({name:e})));return 1===l.length&&"none"===l[0].name?$l:l}const Zl=(0,re.jsx)(oe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,re.jsx)(oe.Path,{d:"M5 5.5h8V4H5v1.5ZM5 20h8v-1.5H5V20ZM19 9H5v6h14V9Z"})}),ql=(0,re.jsx)(oe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,re.jsx)(oe.Path,{d:"M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM7 9h10v6H7V9Z"})}),Yl=(0,re.jsx)(oe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,re.jsx)(oe.Path,{d:"M19 5.5h-8V4h8v1.5ZM19 20h-8v-1.5h8V20ZM5 9h14v6H5V9Z"})}),Xl=(0,re.jsx)(oe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,re.jsx)(oe.Path,{d:"M5 4h14v11H5V4Zm11 16H8v-1.5h8V20Z"})}),Ql={none:{icon:Il,title:(0,C._x)("None","Alignment option")},left:{icon:Zl,title:(0,C.__)("Align left")},center:{icon:ql,title:(0,C.__)("Align center")},right:{icon:Yl,title:(0,C.__)("Align right")},wide:{icon:jl,title:(0,C.__)("Wide width")},full:{icon:Xl,title:(0,C.__)("Full width")}},Jl=function({value:e,onChange:t,controls:n,isToolbar:o,isCollapsed:r=!0}){const i=Kl(n);if(!i.length)return null;function s(n){t([e,"none"].includes(n)?void 0:n)}const l=Ql[e],a=Ql.none,c=o?fs.ToolbarGroup:fs.ToolbarDropdownMenu,u={icon:l?l.icon:a.icon,label:(0,C.__)("Align")},d=o?{isCollapsed:r,controls:i.map((({name:t})=>({...Ql[t],isActive:e===t||!e&&"none"===t,role:r?"menuitemradio":void 0,onClick:()=>s(t)})))}:{toggleProps:{description:(0,C.__)("Change alignment")},children:({onClose:t})=>(0,re.jsx)(re.Fragment,{children:(0,re.jsx)(fs.MenuGroup,{className:"block-editor-block-alignment-control__menu-group",children:i.map((({name:n,info:o})=>{const{icon:r,title:i}=Ql[n],l=n===e||!e&&"none"===n;return(0,re.jsx)(fs.MenuItem,{icon:r,iconPosition:"left",className:ls("components-dropdown-menu__menu-item",{"is-active":l}),isSelected:l,onClick:()=>{s(n),t()},role:"menuitemradio",info:o,children:i},n)}))})})};return(0,re.jsx)(c,{...u,...d})},ea=e=>(0,re.jsx)(Jl,{...e,isToolbar:!1}),ta=e=>(0,re.jsx)(Jl,{...e,isToolbar:!0});function na(e){const t=_(),{clientId:n=""}=t,{setBlockEditingMode:o,unsetBlockEditingMode:r}=(0,c.useDispatch)(_i),i=(0,c.useSelect)((e=>n?null:e(_i).getBlockEditingMode()),[n]);return(0,a.useEffect)((()=>(e&&o(n,e),()=>{e&&r(n)})),[n,e,o,r]),n?t[g]:i}const oa=["left","center","right","wide","full"],ra=["wide","full"];function ia(e,t=!0,n=!0){let o;return o=Array.isArray(e)?oa.filter((t=>e.includes(t))):!0===e?[...oa]:[],!n||!0===e&&!t?o.filter((e=>!ra.includes(e))):o}const sa={shareWithChildBlocks:!0,edit:function({name:e,align:t,setAttributes:n}){const o=Kl(ia((0,l.getBlockSupport)(e,"align"),(0,l.hasBlockSupport)(e,"alignWide",!0))).map((({name:e})=>e)),r=na();return o.length&&"default"===r?(0,re.jsx)(Ss,{group:"block",__experimentalShareWithChildBlocks:!0,children:(0,re.jsx)(ea,{value:t,onChange:t=>{if(!t){const n=(0,l.getBlockType)(e),o=n?.attributes?.align?.default;o&&(t="")}n({align:t})},controls:o})}):null},useBlockProps:function({name:e,align:t}){return Kl(ia((0,l.getBlockSupport)(e,"align"),(0,l.hasBlockSupport)(e,"alignWide",!0))).some((e=>e.name===t))?{"data-align":t}:{}},addSaveProps:function(e,t,n){const{align:o}=n;return ia((0,l.getBlockSupport)(t,"align"),(0,l.hasBlockSupport)(t,"alignWide",!0)).includes(o)&&(e.className=ls(`align${o}`,e.className)),e},attributeKeys:["align"],hasSupport:e=>(0,l.hasBlockSupport)(e,"align",!1)};(0,d.addFilter)("blocks.registerBlockType","core/editor/align/addAttribute",(function(e){var t;return"type"in(null!==(t=e.attributes?.align)&&void 0!==t?t:{})||(0,l.hasBlockSupport)(e,"align")&&(e.attributes={...e.attributes,align:{type:"string",enum:[...oa,""]}}),e}));const la=(0,fs.createSlotFill)("InspectorControls"),aa=(0,fs.createSlotFill)("InspectorAdvancedControls"),ca=(0,fs.createSlotFill)("InspectorControlsBindings"),ua=(0,fs.createSlotFill)("InspectorControlsBackground"),da=(0,fs.createSlotFill)("InspectorControlsBorder"),pa=(0,fs.createSlotFill)("InspectorControlsColor"),ha=(0,fs.createSlotFill)("InspectorControlsFilter"),ga=(0,fs.createSlotFill)("InspectorControlsDimensions"),ma=(0,fs.createSlotFill)("InspectorControlsPosition"),fa=(0,fs.createSlotFill)("InspectorControlsTypography"),ba=(0,fs.createSlotFill)("InspectorControlsListView"),ka=(0,fs.createSlotFill)("InspectorControlsStyles"),va={default:la,advanced:aa,background:ua,bindings:ca,border:da,color:pa,dimensions:ga,effects:(0,fs.createSlotFill)("InspectorControlsEffects"),filter:ha,list:ba,position:ma,settings:la,styles:ka,typography:fa};function _a({children:e,group:t="default",__experimentalGroup:n,resetAllFilter:o}){n&&(y()("`__experimentalGroup` property in `InspectorControlsFill`",{since:"6.2",version:"6.4",alternative:"`group`"}),t=n);const r=_(),i=va[t]?.Fill;return i&&r[p]?(0,re.jsx)(fs.__experimentalStyleProvider,{document,children:(0,re.jsx)(i,{children:t=>(0,re.jsx)(ya,{fillProps:t,children:e,resetAllFilter:o})})}):null}function xa({resetAllFilter:e,children:t}){const{registerResetAllFilter:n,deregisterResetAllFilter:o}=(0,a.useContext)(fs.__experimentalToolsPanelContext);return(0,a.useEffect)((()=>{if(e&&n&&o)return n(e),()=>{o(e)}}),[e,n,o]),t}function ya({children:e,resetAllFilter:t,fillProps:n}){const{forwardedContext:o=[]}=n,r=(0,re.jsx)(xa,{resetAllFilter:t,children:e});return o.reduce(((e,[t,n])=>(0,re.jsx)(t,{...n,children:e})),r)}function Sa({children:e,group:t,label:n}){const{updateBlockAttributes:o}=(0,c.useDispatch)(_i),{getBlockAttributes:r,getMultiSelectedBlockClientIds:i,getSelectedBlockClientId:s,hasMultiSelection:l}=(0,c.useSelect)(_i),u=Ui(),d=s(),p=(0,a.useCallback)(((e=[])=>{const t={},n=l()?i():[d];n.forEach((n=>{const{style:o}=r(n);let i={style:o};e.forEach((e=>{i={...i,...e(i)}})),i={...i,style:as(i.style)},t[n]=i})),o(n,t,!0)}),[r,i,l,d,o]);return(0,re.jsx)(fs.__experimentalToolsPanel,{className:`${t}-block-support-panel`,label:n,resetAll:p,panelId:d,hasInnerWrapper:!0,shouldRenderPlaceholderItems:!0,__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last",dropdownMenuProps:u,children:e},d)}function wa({Slot:e,fillProps:t,...n}){const o=(0,a.useContext)(fs.__experimentalToolsPanelContext),r=(0,a.useMemo)((()=>{var e;return{...null!=t?t:{},forwardedContext:[...null!==(e=t?.forwardedContext)&&void 0!==e?e:[],[fs.__experimentalToolsPanelContext.Provider,{value:o}]]}}),[o,t]);return(0,re.jsx)(e,{...n,fillProps:r,bubblesVirtually:!0})}function Ca({__experimentalGroup:e,group:t="default",label:n,fillProps:o,...r}){e&&(y()("`__experimentalGroup` property in `InspectorControlsSlot`",{since:"6.2",version:"6.4",alternative:"`group`"}),t=e);const i=va[t],s=(0,fs.__experimentalUseSlotFills)(i?.name);if(!i)return null;if(!s?.length)return null;const{Slot:l}=i;return n?(0,re.jsx)(Sa,{group:t,label:n,children:(0,re.jsx)(wa,{...r,fillProps:o,Slot:l})}):(0,re.jsx)(l,{...r,fillProps:o,bubblesVirtually:!0})}const Ba=_a;Ba.Slot=Ca;const Ia=e=>(0,re.jsx)(_a,{...e,group:"advanced"});Ia.Slot=e=>(0,re.jsx)(Ca,{...e,group:"advanced"}),Ia.slotName="InspectorAdvancedControls";const ja=Ba,Ea=window.wp.url,Ta=window.wp.dom,Ma=window.wp.blob,Pa=window.wp.keycodes,Ra=(0,re.jsxs)(oe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,re.jsx)(oe.Path,{d:"m7 6.5 4 2.5-4 2.5z"}),(0,re.jsx)(oe.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"})]}),Na=(0,re.jsx)(oe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,re.jsx)(oe.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"})}),La=(0,re.jsx)(oe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,re.jsx)(oe.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"})}),Aa=(0,fs.withFilters)("editor.MediaUpload")((()=>null)),Oa=function({fallback:e=null,children:t}){const n=(0,c.useSelect)((e=>{const{getSettings:t}=e(_i);return!!t().mediaUpload}),[]);return n?t:e},Da=window.wp.isShallowEqual;var za=n.n(Da);const Va=(0,re.jsx)(oe.SVG,{xmlns:"http://www.w3.org/2000/svg",children:(0,re.jsx)(oe.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"})}),Fa=(0,re.jsx)(oe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,re.jsx)(oe.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"})}),Ha=(0,re.jsx)(oe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,re.jsx)(oe.Path,{d:"M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z"})}),Ga=function e({children:t,settingsOpen:n,setSettingsOpen:o}){const r=(0,u.useReducedMotion)(),i=r?a.Fragment:fs.__unstableAnimatePresence,s=r?"div":fs.__unstableMotion.div,l=`link-control-settings-drawer-${(0,u.useInstanceId)(e)}`;return(0,re.jsxs)(re.Fragment,{children:[(0,re.jsx)(fs.Button,{__next40pxDefaultSize:!0,className:"block-editor-link-control__drawer-toggle","aria-expanded":n,onClick:()=>o(!n),icon:(0,C.isRTL)()?Fa:Ha,"aria-controls":l,children:(0,C._x)("Advanced","Additional link settings")}),(0,re.jsx)(i,{children:n&&(0,re.jsx)(s,{className:"block-editor-link-control__drawer",hidden:!n,id:l,initial:"collapsed",animate:"open",exit:"collapsed",variants:{open:{opacity:1,height:"auto"},collapsed:{opacity:0,height:0}},transition:{duration:.1},children:(0,re.jsx)("div",{className:"block-editor-link-control__drawer-inner",children:t})})})]})};var $a=n(1609);function Ua(e){return"function"==typeof e}class Wa extends a.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,a.createRef)(),this.inputRef=(0,a.createRef)(),this.updateSuggestions=(0,u.debounce)(this.updateSuggestions.bind(this),200),this.suggestionNodes=[],this.suggestionsRequest=null,this.state={suggestions:[],showSuggestions:!1,suggestionsValue:null,selectedSuggestion:null,suggestionsListboxId:"",suggestionOptionIdPrefix:""}}componentDidUpdate(e){const{showSuggestions:t,selectedSuggestion:n}=this.state,{value:o,__experimentalShowInitialSuggestions:r=!1}=this.props;t&&null!==n&&this.suggestionNodes[n]&&this.suggestionNodes[n].scrollIntoView({behavior:"instant",block:"nearest",inline:"nearest"}),e.value===o||this.props.disableSuggestions||(o?.length?this.updateSuggestions(o):r&&this.updateSuggestions())}componentDidMount(){this.shouldShowInitialSuggestions()&&this.updateSuggestions()}componentWillUnmount(){this.suggestionsRequest?.cancel?.(),this.suggestionsRequest=null}bindSuggestionNode(e){return t=>{this.suggestionNodes[e]=t}}shouldShowInitialSuggestions(){const{__experimentalShowInitialSuggestions:e=!1,value:t}=this.props;return e&&!(t&&t.length)}updateSuggestions(e=""){const{__experimentalFetchLinkSuggestions:t,__experimentalHandleURLSuggestions:n}=this.props;if(!t)return;const o=!e?.length;if(e=e.trim(),!o&&(e.length<2||!n&&(0,Ea.isURL)(e)))return this.suggestionsRequest?.cancel?.(),this.suggestionsRequest=null,void this.setState({suggestions:[],showSuggestions:!1,suggestionsValue:e,selectedSuggestion:null,loading:!1});this.setState({selectedSuggestion:null,loading:!0});const r=t(e,{isInitialSuggestions:o});r.then((t=>{this.suggestionsRequest===r&&(this.setState({suggestions:t,suggestionsValue:e,loading:!1,showSuggestions:!!t.length}),t.length?this.props.debouncedSpeak((0,C.sprintf)(/* translators: %d: number of results. */ /* translators: %d: number of results. */ -(0,C._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",t.length),t.length),"assertive"):this.props.debouncedSpeak((0,C.__)("No results."),"assertive"))})).catch((()=>{this.suggestionsRequest===r&&this.setState({loading:!1})})).finally((()=>{this.suggestionsRequest===r&&(this.suggestionsRequest=null)})),this.suggestionsRequest=r}onChange(e){this.props.onChange(e)}onFocus(){const{suggestions:e}=this.state,{disableSuggestions:t,value:n}=this.props;!n||t||e&&e.length||null!==this.suggestionsRequest||this.updateSuggestions(n)}onKeyDown(e){this.props.onKeyDown?.(e);const{showSuggestions:t,selectedSuggestion:n,suggestions:o,loading:r}=this.state;if(!t||!o.length||r){switch(e.keyCode){case Pa.UP:0!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(0,0));break;case Pa.DOWN:this.props.value.length!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(this.props.value.length,this.props.value.length));break;case Pa.ENTER:this.props.onSubmit&&(e.preventDefault(),this.props.onSubmit(null,e))}return}const i=this.state.suggestions[this.state.selectedSuggestion];switch(e.keyCode){case Pa.UP:{e.preventDefault();const t=n?n-1:o.length-1;this.setState({selectedSuggestion:t});break}case Pa.DOWN:{e.preventDefault();const t=null===n||n===o.length-1?0:n+1;this.setState({selectedSuggestion:t});break}case Pa.TAB:null!==this.state.selectedSuggestion&&(this.selectLink(i),this.props.speak((0,C.__)("Link selected.")));break;case Pa.ENTER:e.preventDefault(),null!==this.state.selectedSuggestion?(this.selectLink(i),this.props.onSubmit&&this.props.onSubmit(i,e)):this.props.onSubmit&&this.props.onSubmit(null,e)}}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:n,__experimentalShowInitialSuggestions:o=!1},{showSuggestions:r}){let i=r;const s=e&&e.length;return o||s||(i=!1),!0===n&&(i=!1),{showSuggestions:i,suggestionsListboxId:`block-editor-url-input-suggestions-${t}`,suggestionOptionIdPrefix:`block-editor-url-input-suggestion-${t}`}}render(){return(0,re.jsxs)(re.Fragment,{children:[this.renderControl(),this.renderSuggestions()]})}renderControl(){const{label:e=null,className:t,isFullWidth:n,instanceId:o,placeholder:r=(0,C.__)("Paste URL or type to search"),__experimentalRenderControl:i,value:s="",hideLabelFromVision:l=!1}=this.props,{loading:a,showSuggestions:c,selectedSuggestion:u,suggestionsListboxId:d,suggestionOptionIdPrefix:p}=this.state,h=`url-input-control-${o}`,g={id:h,label:e,className:ls("block-editor-url-input",t,{"is-full-width":n}),hideLabelFromVision:l},m={id:h,value:s,required:!0,type:"text",onChange:this.onChange,onFocus:this.onFocus,placeholder:r,onKeyDown:this.onKeyDown,role:"combobox","aria-label":e?void 0:(0,C.__)("URL"),"aria-expanded":c,"aria-autocomplete":"list","aria-owns":d,"aria-activedescendant":null!==u?`${p}-${u}`:void 0,ref:this.inputRef,suffix:this.props.suffix};return i?i(g,m,a):(0,re.jsxs)(fs.BaseControl,{__nextHasNoMarginBottom:!0,...g,children:[(0,re.jsx)(fs.__experimentalInputControl,{...m,__next40pxDefaultSize:!0}),a&&(0,re.jsx)(fs.Spinner,{})]})}renderSuggestions(){const{className:e,__experimentalRenderSuggestions:t}=this.props,{showSuggestions:n,suggestions:o,suggestionsValue:r,selectedSuggestion:i,suggestionsListboxId:s,suggestionOptionIdPrefix:l,loading:a}=this.state;if(!n||0===o.length)return null;const c={id:s,ref:this.autocompleteRef,role:"listbox"},u=(e,t)=>({role:"option",tabIndex:"-1",id:`${l}-${t}`,ref:this.bindSuggestionNode(t),"aria-selected":t===i||void 0});return Ua(t)?t({suggestions:o,selectedSuggestion:i,suggestionsListProps:c,buildSuggestionItemProps:u,isLoading:a,handleSuggestionClick:this.handleOnClick,isInitialSuggestions:!r?.length,currentInputValue:r}):(0,re.jsx)(fs.Popover,{placement:"bottom",focusOnMount:!1,children:(0,re.jsx)("div",{...c,className:ls("block-editor-url-input__suggestions",{[`${e}__suggestions`]:e}),children:o.map(((e,t)=>(0,$a.createElement)(fs.Button,{__next40pxDefaultSize:!0,...u(0,t),key:e.id,className:ls("block-editor-url-input__suggestion",{"is-selected":t===i}),onClick:()=>this.handleOnClick(e)},e.title)))})})}}const Ka=(0,u.compose)(u.withSafeTimeout,fs.withSpokenMessages,u.withInstanceId,(0,c.withSelect)(((e,t)=>{if(Ua(t.__experimentalFetchLinkSuggestions))return;const{getSettings:n}=e(_i);return{__experimentalFetchLinkSuggestions:n().__experimentalFetchLinkSuggestions}})))(Wa),Za=(0,re.jsx)(oe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,re.jsx)(oe.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})}),qa=({searchTerm:e,onClick:t,itemProps:n,buttonText:o})=>{if(!e)return null;let r;return r=o?"function"==typeof o?o(e):o:(0,a.createInterpolateElement)((0,C.sprintf)(/* translators: %s: search term. */ /* translators: %s: search term. */ -(0,C.__)("Create: %s"),e),{mark:(0,re.jsx)("mark",{})}),(0,re.jsx)(fs.MenuItem,{...n,iconPosition:"left",icon:Za,className:"block-editor-link-control__search-item",onClick:t,children:r})},Ya=(0,re.jsx)(oe.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,re.jsx)(oe.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"})}),Xa=(0,re.jsxs)(oe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,re.jsx)(oe.Path,{d:"M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z"}),(0,re.jsx)(oe.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"})]}),Qa=(0,re.jsx)(oe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,re.jsx)(oe.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"})}),Ja=(0,re.jsx)(oe.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,re.jsx)(oe.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"})}),ec=(0,re.jsx)(oe.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,re.jsx)(oe.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"})}),tc=(0,re.jsx)(oe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,re.jsx)(oe.Path,{d:"M12 3.3c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8s-4-8.8-8.8-8.8zm6.5 5.5h-2.6C15.4 7.3 14.8 6 14 5c2 .6 3.6 2 4.5 3.8zm.7 3.2c0 .6-.1 1.2-.2 1.8h-2.9c.1-.6.1-1.2.1-1.8s-.1-1.2-.1-1.8H19c.2.6.2 1.2.2 1.8zM12 18.7c-1-.7-1.8-1.9-2.3-3.5h4.6c-.5 1.6-1.3 2.9-2.3 3.5zm-2.6-4.9c-.1-.6-.1-1.1-.1-1.8 0-.6.1-1.2.1-1.8h5.2c.1.6.1 1.1.1 1.8s-.1 1.2-.1 1.8H9.4zM4.8 12c0-.6.1-1.2.2-1.8h2.9c-.1.6-.1 1.2-.1 1.8 0 .6.1 1.2.1 1.8H5c-.2-.6-.2-1.2-.2-1.8zM12 5.3c1 .7 1.8 1.9 2.3 3.5H9.7c.5-1.6 1.3-2.9 2.3-3.5zM10 5c-.8 1-1.4 2.3-1.8 3.8H5.5C6.4 7 8 5.6 10 5zM5.5 15.3h2.6c.4 1.5 1 2.8 1.8 3.7-1.8-.6-3.5-2-4.4-3.7zM14 19c.8-1 1.4-2.2 1.8-3.7h2.6C17.6 17 16 18.4 14 19z"})}),nc=(0,re.jsx)(oe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,re.jsx)(oe.Path,{d:"M12 4L4 7.9V20h16V7.9L12 4zm6.5 14.5H14V13h-4v5.5H5.5V8.8L12 5.7l6.5 3.1v9.7z"})}),oc=(0,re.jsx)(oe.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,re.jsx)(oe.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"})}),rc={post:Ya,page:Xa,post_tag:Qa,category:Ja,attachment:ec};function ic({isURL:e,suggestion:t}){let n=null;return e?n=tc:t.type in rc&&(n=rc[t.type],"page"===t.type&&(t.isFrontPage&&(n=nc),t.isBlogHome&&(n=oc))),n?(0,re.jsx)(Bl,{className:"block-editor-link-control__search-item-icon",icon:n}):null}function sc(e){const t=e?.trim();return t?.length?e?.replace(/^\/?/,"/"):e}function lc(e){const t=e?.trim();return t?.length?e?.replace(/\/$/,""):e}const ac=({itemProps:e,suggestion:t,searchTerm:n,onClick:o,isURL:r=!1,shouldShowType:i=!1})=>{const s=r?(0,C.__)("Press ENTER to add this link"):(l=t.url)?(0,u.pipe)(Ea.safeDecodeURI,Ea.getPath,(e=>null==e||e!=e?"":e),((e,...t)=>(...n)=>e(...n,...t))(Ea.filterURLForDisplay,24),lc,sc)(l):l;var l;return(0,re.jsx)(fs.MenuItem,{...e,info:s,iconPosition:"left",icon:(0,re.jsx)(ic,{suggestion:t,isURL:r}),onClick:o,shortcut:i&&cc(t),className:"block-editor-link-control__search-item",children:(0,re.jsx)(fs.TextHighlight,{text:(0,Ta.__unstableStripHTML)(t.title),highlight:n})})};function cc(e){return e.isFrontPage?"front page":e.isBlogHome?"blog home":"post_tag"===e.type?"tag":e.type}const uc=ac,dc=e=>(y()("wp.blockEditor.__experimentalLinkControlSearchItem",{since:"6.8"}),(0,re.jsx)(ac,{...e})),pc="__CREATE__",hc="link",gc="mailto",mc="internal",fc=[hc,gc,"tel",mc],bc=[{id:"opensInNewTab",title:(0,C.__)("Open in new tab")}];function kc({withCreateSuggestion:e,currentInputValue:t,handleSuggestionClick:n,suggestionsListProps:o,buildSuggestionItemProps:r,suggestions:i,selectedSuggestion:s,isLoading:l,isInitialSuggestions:a,createSuggestionButtonText:c,suggestionsQuery:u}){const d=ls("block-editor-link-control__search-results",{"is-loading":l}),p=1===i.length&&fc.includes(i[0].type),h=e&&!p&&!a,g=!u?.type,m=a?(0,C.__)("Suggestions"):(0,C.sprintf)(/* translators: %s: search term. */ /* translators: %s: search term. */ -(0,C.__)('Search results for "%s"'),t);return(0,re.jsx)("div",{className:"block-editor-link-control__search-results-wrapper",children:(0,re.jsx)("div",{...o,className:d,"aria-label":m,children:(0,re.jsx)(fs.MenuGroup,{children:i.map(((e,o)=>h&&pc===e.type?(0,re.jsx)(qa,{searchTerm:t,buttonText:c,onClick:()=>n(e),itemProps:r(e,o),isSelected:o===s},e.type):pc===e.type?null:(0,re.jsx)(uc,{itemProps:r(e,o),suggestion:e,index:o,onClick:()=>{n(e)},isSelected:o===s,isURL:fc.includes(e.type),searchTerm:t,shouldShowType:g,isFrontPage:e?.isFrontPage,isBlogHome:e?.isBlogHome},`${e.id}-${e.type}`)))})})})}const vc=kc,_c=e=>(y()("wp.blockEditor.__experimentalLinkControlSearchResults",{since:"6.8"}),(0,re.jsx)(kc,{...e}));function xc(e){if(e.includes(" "))return!1;const t=(0,Ea.getProtocol)(e),n=(0,Ea.isValidProtocol)(t),o=function(e,t=6){const n=e.split(/[?#]/)[0];return new RegExp(`(?<=\\S)\\.(?:[a-zA-Z_]{2,${t}})(?:\\/|$)`).test(n)}(e),r=e?.startsWith("www."),i=e?.startsWith("#")&&(0,Ea.isValidFragment)(e);return n||r||i||o}const yc=()=>Promise.resolve([]),Sc=e=>{let t=hc;const n=(0,Ea.getProtocol)(e)||"";return n.includes("mailto")&&(t=gc),n.includes("tel")&&(t="tel"),e?.startsWith("#")&&(t=mc),Promise.resolve([{id:e,title:e,url:"URL"===t?(0,Ea.prependHTTP)(e):e,type:t}])};const wc=()=>Promise.resolve([]),Cc=()=>{},Bc=(0,a.forwardRef)((({value:e,children:t,currentLink:n={},className:o=null,placeholder:r=null,withCreateSuggestion:i=!1,onCreateSuggestion:s=Cc,onChange:l=Cc,onSelect:u=Cc,showSuggestions:d=!0,renderSuggestions:p=e=>(0,re.jsx)(vc,{...e}),fetchSuggestions:h=null,allowDirectEntry:g=!0,showInitialSuggestions:m=!1,suggestionsQuery:f={},withURLSuggestion:b=!0,createSuggestionButtonText:k,hideLabelFromVision:v=!1,suffix:_},x)=>{const y=function(e,t,n){const{fetchSearchSuggestions:o,pageOnFront:r,pageForPosts:i}=(0,c.useSelect)((e=>{const{getSettings:t}=e(_i);return{pageOnFront:t().pageOnFront,pageForPosts:t().pageForPosts,fetchSearchSuggestions:t().__experimentalFetchLinkSuggestions}}),[]),s=t?Sc:yc;return(0,a.useCallback)(((t,{isInitialSuggestions:l})=>xc(t)?s(t,{isInitialSuggestions:l}):(async(e,t,n,o,r,i)=>{const{isInitialSuggestions:s}=t,l=await n(e,t);return l.map((e=>Number(e.id)===r?(e.isFrontPage=!0,e):Number(e.id)===i?(e.isBlogHome=!0,e):e)),s||xc(e)||!o?l:l.concat({title:e,url:e,type:pc})})(t,{...e,isInitialSuggestions:l},o,n,r,i)),[s,o,r,i,e,n])}(f,g,i),S=d?h||y:wc,[w,B]=(0,a.useState)(),I=async e=>{let t=e;if(pc!==e.type){if(g||t&&Object.keys(t).length>=1){const{id:e,url:o,...r}=null!=n?n:{};u({...r,...t},t)}}else try{t=await s(e.title),t?.url&&u(t)}catch(e){}},j=null!=r?r:(0,C.__)("Search or type URL");return(0,re.jsxs)("div",{className:"block-editor-link-control__search-input-container",children:[(0,re.jsx)(Ka,{disableSuggestions:n?.url===e,label:j,hideLabelFromVision:v,className:o,value:e,onChange:(e,t)=>{l(e),B(t)},placeholder:j,__experimentalRenderSuggestions:d?e=>p({...e,withCreateSuggestion:i,createSuggestionButtonText:k,suggestionsQuery:f,handleSuggestionClick:t=>{e.handleSuggestionClick&&e.handleSuggestionClick(t),I(t)}}):null,__experimentalFetchLinkSuggestions:S,__experimentalHandleURLSuggestions:!0,__experimentalShowInitialSuggestions:m,onSubmit:(t,n)=>{const o=t||w;o||e?.trim()?.length?I(o||{url:e}):n.preventDefault()},ref:x,suffix:_}),t]})})),Ic=Bc,jc=e=>(y()("wp.blockEditor.__experimentalLinkControlSearchInput",{since:"6.8"}),(0,re.jsx)(Bc,{...e})),Ec=(0,re.jsx)(oe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,re.jsx)(oe.Path,{d:"M12 3.2c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z"})}),Tc=(0,re.jsx)(oe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,re.jsx)(oe.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})}),Mc=(0,re.jsx)(oe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,re.jsx)(oe.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"})}),Pc=(0,re.jsx)(oe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,re.jsx)(oe.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"})}),{Slot:Rc,Fill:Nc}=(0,fs.createSlotFill)("BlockEditorLinkControlViewer");function Lc(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}`)}}const Ac=function(e){const[t,n]=(0,a.useReducer)(Lc,{richData:null,isFetching:!1}),{fetchRichUrlData:o}=(0,c.useSelect)((e=>{const{getSettings:t}=e(_i);return{fetchRichUrlData:t().__experimentalFetchRichUrlData}}),[]);return(0,a.useEffect)((()=>{if(e?.length&&o&&"undefined"!=typeof AbortController){n({type:"LOADING"});const t=new window.AbortController,r=t.signal;return o(e,{signal:r}).then((e=>{n({type:"RESOLVED",richData:e})})).catch((()=>{r.aborted||n({type:"ERROR"})})),()=>{t.abort()}}}),[e]),t};function Oc({value:e,onEditClick:t,hasRichPreviews:n=!1,hasUnlinkControl:o=!1,onRemove:r}){const i=(0,c.useSelect)((e=>e(le.store).get("core","showIconLabels")),[]),s=n?e?.url:null,{richData:l,isFetching:a}=Ac(s),d=l&&Object.keys(l).length,p=e&&(0,Ea.filterURLForDisplay)((0,Ea.safeDecodeURI)(e.url),24)||"",h=!e?.url?.length,g=!h&&(0,Ta.__unstableStripHTML)(l?.title||e?.title||p),m=!e?.url||g.replace(/^[a-z\-.\+]+[0-9]*:(\/\/)?/i,"").replace(/^www\./i,"")===p;let f;f=l?.icon?(0,re.jsx)("img",{src:l?.icon,alt:""}):h?(0,re.jsx)(Bl,{icon:Ec,size:32}):(0,re.jsx)(Bl,{icon:tc});const{createNotice:b}=(0,c.useDispatch)(rr.store),k=(0,u.useCopyToClipboard)(e.url,(()=>{b("info",(0,C.__)("Link copied to clipboard."),{isDismissible:!0,type:"snackbar"})}));return(0,re.jsx)("div",{role:"group","aria-label":(0,C.__)("Manage link"),className:ls("block-editor-link-control__search-item",{"is-current":!0,"is-rich":d,"is-fetching":!!a,"is-preview":!0,"is-error":h,"is-url-title":g===p}),children:(0,re.jsxs)("div",{className:"block-editor-link-control__search-item-top",children:[(0,re.jsxs)("span",{className:"block-editor-link-control__search-item-header",role:"figure","aria-label":/* translators: Accessibility text for the link preview when editing a link. */ /* translators: Accessibility text for the link preview when editing a link. */ -(0,C.__)("Link information"),children:[(0,re.jsx)("span",{className:ls("block-editor-link-control__search-item-icon",{"is-image":l?.icon}),children:f}),(0,re.jsx)("span",{className:"block-editor-link-control__search-item-details",children:h?(0,re.jsx)("span",{className:"block-editor-link-control__search-item-error-notice",children:(0,C.__)("Link is empty")}):(0,re.jsxs)(re.Fragment,{children:[(0,re.jsx)(fs.ExternalLink,{className:"block-editor-link-control__search-item-title",href:e.url,children:(0,re.jsx)(fs.__experimentalTruncate,{numberOfLines:1,children:g})}),!m&&(0,re.jsx)("span",{className:"block-editor-link-control__search-item-info",children:(0,re.jsx)(fs.__experimentalTruncate,{numberOfLines:1,children:p})})]})})]}),(0,re.jsx)(fs.Button,{icon:Tc,label:(0,C.__)("Edit link"),onClick:t,size:"compact",showTooltip:!i}),o&&(0,re.jsx)(fs.Button,{icon:Mc,label:(0,C.__)("Remove link"),onClick:r,size:"compact",showTooltip:!i}),(0,re.jsx)(fs.Button,{icon:Pc,label:(0,C.__)("Copy link"),ref:k,accessibleWhenDisabled:!0,disabled:h,size:"compact",showTooltip:!i}),(0,re.jsx)(Rc,{fillProps:e})]})})}const Dc=()=>{},zc=({value:e,onChange:t=Dc,settings:n})=>{if(!n||!n.length)return null;const o=n=>o=>{t({...e,[n.id]:o})},r=n.map((t=>(0,re.jsx)(fs.CheckboxControl,{__nextHasNoMarginBottom:!0,className:"block-editor-link-control__setting",label:t.title,onChange:o(t),checked:!!e&&!!e[t.id],help:t?.help},t.id)));return(0,re.jsxs)("fieldset",{className:"block-editor-link-control__settings",children:[(0,re.jsx)(fs.VisuallyHidden,{as:"legend",children:(0,C.__)("Currently selected link settings")}),r]})};var Vc=n(5215),Fc=n.n(Vc);const Hc=()=>{},Gc="core/block-editor",$c="linkControlSettingsDrawer";function Uc({searchInputPlaceholder:e,value:t,settings:n=bc,onChange:o=Hc,onRemove:r,onCancel:i,noDirectEntry:s=!1,showSuggestions:l=!0,showInitialSuggestions:u,forceIsEditingLink:d,createSuggestion:p,withCreateSuggestion:h,inputValue:g="",suggestionsQuery:m={},noURLSuggestion:f=!1,createSuggestionButtonText:b,hasRichPreviews:k=!1,hasTextControl:v=!1,renderControlBottom:_=null}){void 0===h&&p&&(h=!0);const[x,y]=(0,a.useState)(!1),{advancedSettingsPreference:S}=(0,c.useSelect)((e=>{var t;return{advancedSettingsPreference:null!==(t=e(le.store).get(Gc,$c))&&void 0!==t&&t}}),[]),{set:w}=(0,c.useDispatch)(le.store),B=S||x,I=(0,a.useRef)(!0),j=(0,a.useRef)(),E=(0,a.useRef)(),T=(0,a.useRef)(!1),M=n.map((({id:e})=>e)),[P,R,N,L,A]=function(e){const[t,n]=(0,a.useState)(e||{}),[o,r]=(0,a.useState)(e);return Fc()(e,o)||(r(e),n(e)),[t,n,e=>{n({...t,url:e})},e=>{n({...t,title:e})},e=>o=>{const r=Object.keys(o).reduce(((t,n)=>(e.includes(n)&&(t[n]=o[n]),t)),{});n({...t,...r})}]}(t),O=t&&!(0,Da.isShallowEqualObjects)(P,t),[D,z]=(0,a.useState)(void 0!==d?d:!t||!t.url),{createPage:V,isCreatingPage:F,errorMessage:H}=function(e){const t=(0,a.useRef)(),[n,o]=(0,a.useState)(!1),[r,i]=(0,a.useState)(null);return(0,a.useEffect)((()=>()=>{t.current&&t.current.cancel()}),[]),{createPage:async function(n){o(!0),i(null);try{return t.current=(e=>{let t=!1;return{promise:new Promise(((n,o)=>{e.then((e=>t?o({isCanceled:!0}):n(e)),(e=>o(t?{isCanceled:!0}:e)))})),cancel(){t=!0}}})(Promise.resolve(e(n))),await t.current.promise}catch(e){if(e&&e.isCanceled)return;throw i(e.message||(0,C.__)("An unknown error occurred during creation. Please try again.")),e}finally{o(!1)}},isCreatingPage:n,errorMessage:r}}(p);(0,a.useEffect)((()=>{void 0!==d&&z(d)}),[d]),(0,a.useEffect)((()=>{I.current||((Ta.focus.focusable.find(j.current)[0]||j.current).focus(),T.current=!1)}),[D,F]),(0,a.useEffect)((()=>(I.current=!1,()=>{I.current=!0})),[]);const G=t?.url?.trim()?.length>0,$=()=>{T.current=!!j.current?.contains(j.current.ownerDocument.activeElement),z(!1)},U=()=>{O&&o({...t,...P,url:W}),$()},W=g||P?.url||"",K=!W?.trim()?.length,Z=r&&t&&!D&&!F,q=D&&G,Y=G&&v,X=(D||!t)&&!F,Q=!O||K,J=!!n?.length&&D&&G;return(0,re.jsxs)("div",{tabIndex:-1,ref:j,className:"block-editor-link-control",children:[F&&(0,re.jsxs)("div",{className:"block-editor-link-control__loading",children:[(0,re.jsx)(fs.Spinner,{})," ",(0,C.__)("Creating"),"…"]}),X&&(0,re.jsxs)(re.Fragment,{children:[(0,re.jsxs)("div",{className:ls({"block-editor-link-control__search-input-wrapper":!0,"has-text-control":Y,"has-actions":q}),children:[Y&&(0,re.jsx)(fs.TextControl,{__nextHasNoMarginBottom:!0,ref:E,className:"block-editor-link-control__field block-editor-link-control__text-content",label:(0,C.__)("Text"),value:P?.title,onChange:L,onKeyDown:e=>{const{keyCode:t}=e;t!==Pa.ENTER||K||(e.preventDefault(),U())},__next40pxDefaultSize:!0}),(0,re.jsx)(Ic,{currentLink:t,className:"block-editor-link-control__field block-editor-link-control__search-input",placeholder:e,value:W,withCreateSuggestion:h,onCreateSuggestion:V,onChange:N,onSelect:e=>{const t=Object.keys(e).reduce(((t,n)=>(M.includes(n)||(t[n]=e[n]),t)),{});o({...P,...t,title:P?.title||e?.title}),$()},showInitialSuggestions:u,allowDirectEntry:!s,showSuggestions:l,suggestionsQuery:m,withURLSuggestion:!f,createSuggestionButtonText:b,hideLabelFromVision:!Y,suffix:q?void 0:(0,re.jsx)(fs.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,re.jsx)(fs.Button,{onClick:Q?Hc:U,label:(0,C.__)("Submit"),icon:Va,className:"block-editor-link-control__search-submit","aria-disabled":Q,size:"small"})})})]}),H&&(0,re.jsx)(fs.Notice,{className:"block-editor-link-control__search-error",status:"error",isDismissible:!1,children:H})]}),t&&!D&&!F&&(0,re.jsx)(Oc,{value:t,onEditClick:()=>z(!0),hasRichPreviews:k,hasUnlinkControl:Z,onRemove:()=>{r(),z(!0)}},t?.url),J&&(0,re.jsx)("div",{className:"block-editor-link-control__tools",children:!K&&(0,re.jsx)(Ga,{settingsOpen:B,setSettingsOpen:e=>{w&&w(Gc,$c,e),y(e)},children:(0,re.jsx)(zc,{value:P,settings:n,onChange:A(M)})})}),q&&(0,re.jsxs)(fs.__experimentalHStack,{justify:"right",className:"block-editor-link-control__search-actions",children:[(0,re.jsx)(fs.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:e=>{e.preventDefault(),e.stopPropagation(),R(t),G?$():r?.(),i?.()},children:(0,C.__)("Cancel")}),(0,re.jsx)(fs.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:Q?Hc:U,className:"block-editor-link-control__search-submit","aria-disabled":Q,children:(0,C.__)("Save")})]}),!F&&_&&_()]})}Uc.ViewerFill=Nc,Uc.DEFAULT_LINK_SETTINGS=bc;const Wc=e=>(y()("wp.blockEditor.__experimentalLinkControl",{since:"6.8",alternative:"wp.blockEditor.LinkControl"}),(0,re.jsx)(Uc,{...e})),Kc=Uc,Zc=()=>{};let qc=0;const Yc=(0,u.compose)([(0,c.withDispatch)((e=>{const{createNotice:t,removeNotice:n}=e(rr.store);return{createNotice:t,removeNotice:n}})),(0,fs.withFilters)("editor.MediaReplaceFlow")])((({mediaURL:e,mediaId:t,mediaIds:n,allowedTypes:o,accept:r,onError:i,onSelect:s,onSelectURL:l,onReset:u,onToggleFeaturedImage:d,useFeaturedImage:p,onFilesUpload:h=Zc,name:g=(0,C.__)("Replace"),createNotice:m,removeNotice:f,children:b,multiple:k=!1,addToGallery:v,handleUpload:_=!0,popoverProps:x})=>{const y=(0,c.useSelect)((e=>e(_i).getSettings().mediaUpload),[]),S=!!y,w=(0,a.useRef)(),B="block-editor/media-replace-flow/error-notice/"+ ++qc,I=e=>{const t=(0,Ta.__unstableStripHTML)(e);i?i(t):setTimeout((()=>{m("error",t,{speak:!0,id:B,isDismissible:!0})}),1e3)},j=(e,t)=>{p&&d&&d(),t(),s(e),(0,Ao.speak)((0,C.__)("The media file has been replaced")),f(B)},E=e=>{e.keyCode===Pa.DOWN&&(e.preventDefault(),e.target.click())},T=k&&!(!o||0===o.length)&&o.every((e=>"image"===e||e.startsWith("image/")));return(0,re.jsx)(fs.Dropdown,{popoverProps:x,contentClassName:"block-editor-media-replace-flow__options",renderToggle:({isOpen:e,onToggle:t})=>(0,re.jsx)(fs.ToolbarButton,{ref:w,"aria-expanded":e,"aria-haspopup":"true",onClick:t,onKeyDown:E,children:g}),renderContent:({onClose:i})=>(0,re.jsxs)(re.Fragment,{children:[(0,re.jsxs)(fs.NavigableMenu,{className:"block-editor-media-replace-flow__media-upload-menu",children:[(0,re.jsxs)(Oa,{children:[(0,re.jsx)(Aa,{gallery:T,addToGallery:v,multiple:k,value:k?n:t,onSelect:e=>j(e,i),allowedTypes:o,render:({open:e})=>(0,re.jsx)(fs.MenuItem,{icon:Ra,onClick:e,children:(0,C.__)("Open Media Library")})}),(0,re.jsx)(fs.FormFileUpload,{onChange:e=>{((e,t)=>{const n=e.target.files;if(!_)return t(),s(n);h(n),y({allowedTypes:o,filesList:n,onFileChange:([e])=>{j(e,t)},onError:I})})(e,i)},accept:r,multiple:!!k,render:({openFileDialog:e})=>(0,re.jsx)(fs.MenuItem,{icon:Na,onClick:()=>{e()},children:(0,C.__)("Upload")})})]}),d&&(0,re.jsx)(fs.MenuItem,{icon:La,onClick:d,isPressed:p,children:(0,C.__)("Use featured image")}),e&&u&&(0,re.jsx)(fs.MenuItem,{onClick:()=>{u(),i()},children:(0,C.__)("Reset")}),"function"==typeof b?b({onClose:i}):b]}),l&&(0,re.jsxs)("form",{className:ls("block-editor-media-flow__url-input",{"has-siblings":S||d}),children:[(0,re.jsx)("span",{className:"block-editor-media-replace-flow__image-url-label",children:(0,C.__)("Current media URL:")}),(0,re.jsx)(Kc,{value:{url:e},settings:[],showSuggestions:!1,onChange:({url:e})=>{l(e),w.current.focus()}})]})]})})})),Xc="image",Qc={placement:"left-start",offset:36,shift:!0,className:"block-editor-global-styles-background-panel__popover"},Jc=()=>{},eu=e=>{if(!(!e||isNaN(e.x)&&isNaN(e.y)))return`${100*(isNaN(e.x)?.5:e.x)}% ${100*(isNaN(e.y)?.5:e.y)}%`},tu=e=>{if(!e)return{x:void 0,y:void 0};let[t,n]=e.split(" ").map((e=>parseFloat(e)/100));return t=isNaN(t)?void 0:t,n=isNaN(n)?t:n,{x:t,y:n}};function nu({as:e="span",imgUrl:t,toggleProps:n={},filename:o,label:r,className:i,onToggleCallback:s=Jc}){return(0,a.useEffect)((()=>{void 0!==n?.isOpen&&s(n?.isOpen)}),[n?.isOpen,s]),(0,re.jsx)(fs.__experimentalItemGroup,{as:e,className:i,...n,children:(0,re.jsxs)(fs.__experimentalHStack,{justify:"flex-start",as:"span",className:"block-editor-global-styles-background-panel__inspector-preview-inner",children:[t&&(0,re.jsx)("span",{className:"block-editor-global-styles-background-panel__inspector-image-indicator-wrapper","aria-hidden":!0,children:(0,re.jsx)("span",{className:"block-editor-global-styles-background-panel__inspector-image-indicator",style:{backgroundImage:`url(${t})`}})}),(0,re.jsxs)(fs.FlexItem,{as:"span",style:t?{}:{flexGrow:1},children:[(0,re.jsx)(fs.__experimentalTruncate,{numberOfLines:1,className:"block-editor-global-styles-background-panel__inspector-media-replace-title",children:r}),(0,re.jsx)(fs.VisuallyHidden,{as:"span",children:t?(0,C.sprintf)(/* translators: %s: file name */ /* translators: %s: file name */ -(0,C.__)("Background image: %s"),o||r):(0,C.__)("No background image selected")})]})]})})}function ou({label:e,filename:t,url:n,children:o,onToggle:r=Jc,hasImageValue:i}){if(!i)return;const s=e||(0,Ea.getFilename)(n)||(0,C.__)("Add background image");return(0,re.jsx)(fs.Dropdown,{popoverProps:Qc,renderToggle:({onToggle:e,isOpen:o})=>{const i={onClick:e,className:"block-editor-global-styles-background-panel__dropdown-toggle","aria-expanded":o,"aria-label":(0,C.__)("Background size, position and repeat options."),isOpen:o};return(0,re.jsx)(nu,{imgUrl:n,filename:t,label:s,toggleProps:i,as:"button",onToggleCallback:r})},renderContent:()=>(0,re.jsx)(fs.__experimentalDropdownContentWrapper,{className:"block-editor-global-styles-background-panel__dropdown-content-wrapper",paddingSize:"medium",children:o})})}function ru(){return(0,re.jsx)(fs.Placeholder,{className:"block-editor-global-styles-background-panel__loading",children:(0,re.jsx)(fs.Spinner,{})})}function iu({onChange:e,style:t,inheritedValue:n,onRemoveImage:o=Jc,onResetImage:r=Jc,displayInPanel:i,defaultValues:s}){const[l,u]=(0,a.useState)(!1),{getSettings:d}=(0,c.useSelect)(_i),{id:p,title:h,url:g}=t?.background?.backgroundImage||{...n?.background?.backgroundImage},m=(0,a.useRef)(),{createErrorNotice:f}=(0,c.useDispatch)(rr.store),b=e=>{f(e,{type:"snackbar"}),u(!1)},k=n=>{if(!n||!n.url)return e(fe(t,["background","backgroundImage"],void 0)),void u(!1);if((0,Ma.isBlobURL)(n.url))return void u(!0);if(n.media_type&&n.media_type!==Xc||!n.media_type&&n.type&&n.type!==Xc)return void b((0,C.__)("Only images can be used as a background image."));const o=t?.background?.backgroundSize||s?.backgroundSize,r=t?.background?.backgroundPosition;e(fe(t,["background"],{...t?.background,backgroundImage:{url:n.url,id:n.id,source:"file",title:n.title||void 0},backgroundPosition:r||"auto"!==o&&o?r:"50% 0",backgroundSize:o})),u(!1)},v=uu(t),_=()=>{const[e]=Ta.focus.tabbable.find(m.current);e?.focus(),e?.click()},x=!v&&uu(n),y=h||(0,Ea.getFilename)(g)||(0,C.__)("Add background image");return(0,re.jsxs)("div",{ref:m,className:"block-editor-global-styles-background-panel__image-tools-panel-item",children:[l&&(0,re.jsx)(ru,{}),(0,re.jsx)(Yc,{mediaId:p,mediaURL:g,allowedTypes:[Xc],accept:"image/*",onSelect:k,popoverProps:{className:ls({"block-editor-global-styles-background-panel__media-replace-popover":i})},name:(0,re.jsx)(nu,{className:"block-editor-global-styles-background-panel__image-preview",imgUrl:g,filename:h,label:y}),variant:"secondary",onError:b,onReset:()=>{_(),r()},children:x&&(0,re.jsx)(fs.MenuItem,{onClick:()=>{_(),e(fe(t,["background"],{backgroundImage:"none"})),o()},children:(0,C.__)("Remove")})}),(0,re.jsx)(fs.DropZone,{onFilesDrop:e=>{e?.length>1?b((0,C.__)("Only one image can be used as a background image.")):d().mediaUpload({allowedTypes:[Xc],filesList:e,onFileChange([e]){k(e)},onError:b})},label:(0,C.__)("Drop to upload")})]})}function su({onChange:e,style:t,inheritedValue:n,defaultValues:o}){const r=t?.background?.backgroundSize||n?.background?.backgroundSize,i=t?.background?.backgroundRepeat||n?.background?.backgroundRepeat,s=t?.background?.backgroundImage?.url||n?.background?.backgroundImage?.url,l=t?.background?.backgroundImage?.id,a=t?.background?.backgroundPosition||n?.background?.backgroundPosition,c=t?.background?.backgroundAttachment||n?.background?.backgroundAttachment;let u=!r&&l?o?.backgroundSize:r||"auto";u=["cover","contain","auto"].includes(u)?u:"auto";const d=!("no-repeat"===i||"cover"===u&&void 0===i),p=n=>{let o=i,r=a;"contain"===n&&(o="no-repeat",r=void 0),"cover"===n&&(o=void 0,r=void 0),"cover"!==u&&"contain"!==u||"auto"!==n||(o=void 0,t?.background?.backgroundImage?.id&&(r="50% 0")),n||"auto"!==u||(n="auto"),e(fe(t,["background"],{...t?.background,backgroundPosition:r,backgroundRepeat:o,backgroundSize:n}))},h=!a&&l&&"contain"===r?o?.backgroundPosition:a;return(0,re.jsxs)(fs.__experimentalVStack,{spacing:3,className:"single-column",children:[(0,re.jsx)(fs.FocalPointPicker,{__nextHasNoMarginBottom:!0,label:(0,C.__)("Focal point"),url:s,value:tu(h),onChange:n=>{e(fe(t,["background","backgroundPosition"],eu(n)))}}),(0,re.jsx)(fs.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,C.__)("Fixed background"),checked:"fixed"===c,onChange:()=>e(fe(t,["background","backgroundAttachment"],"fixed"===c?"scroll":"fixed"))}),(0,re.jsxs)(fs.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,size:"__unstable-large",label:(0,C.__)("Size"),value:u,onChange:p,isBlock:!0,help:(g=r||o?.backgroundSize,"cover"===g||void 0===g?(0,C.__)("Image covers the space evenly."):"contain"===g?(0,C.__)("Image is contained without distortion."):(0,C.__)("Image has a fixed width.")),children:[(0,re.jsx)(fs.__experimentalToggleGroupControlOption,{value:"cover",label:(0,C._x)("Cover","Size option for background image control")},"cover"),(0,re.jsx)(fs.__experimentalToggleGroupControlOption,{value:"contain",label:(0,C._x)("Contain","Size option for background image control")},"contain"),(0,re.jsx)(fs.__experimentalToggleGroupControlOption,{value:"auto",label:(0,C._x)("Tile","Size option for background image control")},"tile")]}),(0,re.jsxs)(fs.__experimentalHStack,{justify:"flex-start",spacing:2,as:"span",children:[(0,re.jsx)(fs.__experimentalUnitControl,{"aria-label":(0,C.__)("Background image width"),onChange:p,value:r,size:"__unstable-large",__unstableInputWidth:"100px",min:0,placeholder:(0,C.__)("Auto"),disabled:"auto"!==u||void 0===u}),(0,re.jsx)(fs.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,C.__)("Repeat"),checked:d,onChange:()=>e(fe(t,["background","backgroundRepeat"],!0===d?"no-repeat":"repeat")),disabled:"cover"===u})]})]});var g}function lu({value:e,onChange:t,inheritedValue:n=e,settings:o,defaultValues:r={}}){const{globalStyles:i,_links:s}=(0,c.useSelect)((e=>{const{getSettings:t}=e(_i),n=t();return{globalStyles:n[T],_links:n[M]}}),[]),l=(0,a.useMemo)((()=>{const e={background:{}};return n?.background?(Object.entries(n?.background).forEach((([t,n])=>{e.background[t]=Yi(n,{styles:i,_links:s})})),e):n}),[i,s,n]),u=()=>t(fe(e,["background"],{})),{title:d,url:p}=e?.background?.backgroundImage||{...l?.background?.backgroundImage},h=uu(e)||uu(l),g=h&&"none"!==(e?.background?.backgroundImage||n?.background?.backgroundImage)&&(o?.background?.backgroundSize||o?.background?.backgroundPosition||o?.background?.backgroundRepeat),[m,f]=(0,a.useState)(!1);return(0,re.jsx)("div",{className:ls("block-editor-global-styles-background-panel__inspector-media-replace-container",{"is-open":m}),children:g?(0,re.jsx)(ou,{label:d,filename:d,url:p,onToggle:f,hasImageValue:h,children:(0,re.jsxs)(fs.__experimentalVStack,{spacing:3,className:"single-column",children:[(0,re.jsx)(iu,{onChange:t,style:e,inheritedValue:l,displayInPanel:!0,onResetImage:()=>{f(!1),u()},onRemoveImage:()=>f(!1),defaultValues:r}),(0,re.jsx)(su,{onChange:t,style:e,defaultValues:r,inheritedValue:l})]})}):(0,re.jsx)(iu,{onChange:t,style:e,inheritedValue:l,defaultValues:r,onResetImage:()=>{f(!1),u()},onRemoveImage:()=>f(!1)})})}const au={backgroundImage:!0};function cu(e){return"web"===a.Platform.OS&&e?.background?.backgroundImage}function uu(e){return!!e?.background?.backgroundImage?.id||"string"==typeof e?.background?.backgroundImage||!!e?.background?.backgroundImage?.url}function du({resetAllFilter:e,onChange:t,value:n,panelId:o,children:r,headerLabel:i}){const s=Ui();return(0,re.jsx)(fs.__experimentalToolsPanel,{label:i,resetAll:()=>{const o=e(n);t(o)},panelId:o,dropdownMenuProps:s,children:r})}function pu({as:e=du,value:t,onChange:n,inheritedValue:o,settings:r,panelId:i,defaultControls:s=au,defaultValues:l={},headerLabel:c=(0,C.__)("Background image")}){const u=cu(r),d=(0,a.useCallback)((e=>({...e,background:{}})),[]);return(0,re.jsx)(e,{resetAllFilter:d,value:t,onChange:n,panelId:i,headerLabel:c,children:u&&(0,re.jsx)(fs.__experimentalToolsPanelItem,{hasValue:()=>!!t?.background,label:(0,C.__)("Image"),onDeselect:()=>n(fe(t,["background"],{})),isShownByDefault:s.backgroundImage,panelId:i,children:(0,re.jsx)(lu,{value:t,onChange:n,settings:r,inheritedValue:o,defaultControls:s,defaultValues:l})})})}const hu="background",gu={backgroundSize:"cover",backgroundPosition:"50% 50%"};function mu(e,t="any"){const n=(0,l.getBlockSupport)(e,hu);return!!(!0===n||("any"===t?n?.backgroundImage||n?.backgroundSize||n?.backgroundRepeat:n?.[t]))}function fu(e){if(!e||!e?.backgroundImage?.url)return;let t;return e?.backgroundSize||(t={backgroundSize:gu.backgroundSize}),"contain"!==e?.backgroundSize||e?.backgroundPosition||(t={backgroundPosition:gu.backgroundPosition}),t}function bu(e){return uu(e)?"has-background":""}function ku({children:e}){const t=(0,a.useCallback)((e=>({...e,style:{...e.style,background:void 0}})),[]);return(0,re.jsx)(ja,{group:"background",resetAllFilter:t,children:e})}function vu({clientId:e,name:t,setAttributes:n,settings:o}){const{style:r,inheritedValue:i}=(0,c.useSelect)((n=>{const{getBlockAttributes:o,getSettings:r}=n(_i),i=r();return{style:o(e)?.style,inheritedValue:i[T]?.blocks?.[t]}}),[e,t]);if(!cu(o)||!mu(t,"backgroundImage"))return null;const s={...o,background:{...o.background,backgroundSize:o?.background?.backgroundSize&&mu(t,"backgroundSize")}};return(0,re.jsx)(pu,{inheritedValue:i,as:ku,panelId:e,defaultValues:gu,settings:s,onChange:e=>{n({style:as(e)})},value:r})}const _u={useBlockProps:function({name:e,style:t}){if(!mu(e)||!t?.background?.backgroundImage)return;const n=fu(t?.background);return n?{style:{...n}}:void 0},attributeKeys:["style"],hasSupport:mu};(0,d.addFilter)("blocks.registerBlockType","core/lock/addAttribute",(function(e){var t;return"type"in(null!==(t=e.attributes?.lock)&&void 0!==t?t:{})||(e.attributes={...e.attributes,lock:{type:"object"}}),e}));const xu=/[\s#]/g,yu={type:"string",source:"attribute",attribute:"id",selector:"*"},Su={addSaveProps:function(e,t,n){return(0,l.hasBlockSupport)(t,"anchor")&&(e.id=""===n.anchor?null:n.anchor),e},edit:function({anchor:e,setAttributes:t}){if("default"!==na())return null;const n="web"===a.Platform.OS;return(0,re.jsx)(ja,{group:"advanced",children:(0,re.jsx)(fs.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,className:"html-anchor-control",label:(0,C.__)("HTML anchor"),help:(0,re.jsxs)(re.Fragment,{children:[(0,C.__)("Enter a word or two — without spaces — to make a unique web address just for this block, called an “anchor”. Then, you’ll be able to link directly to this section of your page."),n&&(0,re.jsxs)(re.Fragment,{children:[" ",(0,re.jsx)(fs.ExternalLink,{href:(0,C.__)("https://wordpress.org/documentation/article/page-jumps/"),children:(0,C.__)("Learn more about anchors")})]})]}),value:e||"",placeholder:n?null:(0,C.__)("Add an anchor"),onChange:e=>{e=e.replace(xu,"-"),t({anchor:e})},autoCapitalize:"none",autoComplete:"off"})})},attributeKeys:["anchor"],hasSupport:e=>(0,l.hasBlockSupport)(e,"anchor")};(0,d.addFilter)("blocks.registerBlockType","core/anchor/attribute",(function(e){var t;return"type"in(null!==(t=e.attributes?.anchor)&&void 0!==t?t:{})||(0,l.hasBlockSupport)(e,"anchor")&&(e.attributes={...e.attributes,anchor:yu}),e}));const wu={type:"string",source:"attribute",attribute:"aria-label",selector:"*"},Cu={addSaveProps:function(e,t,n){return(0,l.hasBlockSupport)(t,"ariaLabel")&&(e["aria-label"]=""===n.ariaLabel?null:n.ariaLabel),e},attributeKeys:["ariaLabel"],hasSupport:e=>(0,l.hasBlockSupport)(e,"ariaLabel")};(0,d.addFilter)("blocks.registerBlockType","core/ariaLabel/attribute",(function(e){return e?.attributes?.ariaLabel?.type||(0,l.hasBlockSupport)(e,"ariaLabel")&&(e.attributes={...e.attributes,ariaLabel:wu}),e}));const Bu={edit:function({className:e,setAttributes:t}){return"default"!==na()?null:(0,re.jsx)(ja,{group:"advanced",children:(0,re.jsx)(fs.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,autoComplete:"off",label:(0,C.__)("Additional CSS class(es)"),value:e||"",onChange:e=>{t({className:""!==e?e:void 0})},help:(0,C.__)("Separate multiple classes with spaces.")})})},addSaveProps:function(e,t,n){return(0,l.hasBlockSupport)(t,"customClassName",!0)&&n.className&&(e.className=ls(e.className,n.className)),e},attributeKeys:["className"],hasSupport:e=>(0,l.hasBlockSupport)(e,"customClassName",!0)};(0,d.addFilter)("blocks.registerBlockType","core/editor/custom-class-name/attribute",(function(e){return(0,l.hasBlockSupport)(e,"customClassName",!0)&&(e.attributes={...e.attributes,className:{type:"string"}}),e})),(0,d.addFilter)("blocks.switchToBlockType.transformedBlock","core/color/addTransforms",(function(e,t,n,o){if(!(0,l.hasBlockSupport)(e.name,"customClassName",!0))return e;if(1===o.length&&e.innerBlocks.length===t.length)return e;if(1===o.length&&t.length>1||o.length>1&&1===t.length)return e;if(t[n]){const o=t[n]?.attributes.className;if(o)return{...e,attributes:{...e.attributes,className:o}}}return e})),(0,d.addFilter)("blocks.getSaveContent.extraProps","core/generated-class-name/save-props",(function(e,t){return(0,l.hasBlockSupport)(t,"className",!0)&&("string"==typeof e.className?e.className=[...new Set([(0,l.getBlockDefaultClassName)(t.name),...e.className.split(" ")])].join(" ").trim():e.className=(0,l.getBlockDefaultClassName)(t.name)),e}));var Iu={grad:.9,turn:360,rad:360/(2*Math.PI)},ju=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},Eu=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},Tu=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},Mu=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},Pu=function(e){return{r:Tu(e.r,0,255),g:Tu(e.g,0,255),b:Tu(e.b,0,255),a:Tu(e.a)}},Ru=function(e){return{r:Eu(e.r),g:Eu(e.g),b:Eu(e.b),a:Eu(e.a,3)}},Nu=/^#([0-9a-f]{3,8})$/i,Lu=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Au=function(e){var t=e.r,n=e.g,o=e.b,r=e.a,i=Math.max(t,n,o),s=i-Math.min(t,n,o),l=s?i===t?(n-o)/s:i===n?2+(o-t)/s:4+(t-n)/s:0;return{h:60*(l<0?l+6:l),s:i?s/i*100:0,v:i/255*100,a:r}},Ou=function(e){var t=e.h,n=e.s,o=e.v,r=e.a;t=t/360*6,n/=100,o/=100;var i=Math.floor(t),s=o*(1-n),l=o*(1-(t-i)*n),a=o*(1-(1-t+i)*n),c=i%6;return{r:255*[o,l,s,s,a,o][c],g:255*[a,o,o,l,s,s][c],b:255*[s,s,a,o,o,l][c],a:r}},Du=function(e){return{h:Mu(e.h),s:Tu(e.s,0,100),l:Tu(e.l,0,100),a:Tu(e.a)}},zu=function(e){return{h:Eu(e.h),s:Eu(e.s),l:Eu(e.l),a:Eu(e.a,3)}},Vu=function(e){return Ou((n=(t=e).s,{h:t.h,s:(n*=((o=t.l)<50?o:100-o)/100)>0?2*n/(o+n)*100:0,v:o+n,a:t.a}));var t,n,o},Fu=function(e){return{h:(t=Au(e)).h,s:(r=(200-(n=t.s))*(o=t.v)/100)>0&&r<200?n*o/100/(r<=100?r:200-r)*100:0,l:r/2,a:t.a};var t,n,o,r},Hu=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Gu=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,$u=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Uu=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Wu={string:[[function(e){var t=Nu.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:4===e.length?Eu(parseInt(e[3]+e[3],16)/255,2):1}:6===e.length||8===e.length?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:8===e.length?Eu(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=$u.exec(e)||Uu.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:Pu({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:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=Hu.exec(e)||Gu.exec(e);if(!t)return null;var n,o,r=Du({h:(n=t[1],o=t[2],void 0===o&&(o="deg"),Number(n)*(Iu[o]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return Vu(r)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,o=e.b,r=e.a,i=void 0===r?1:r;return ju(t)&&ju(n)&&ju(o)?Pu({r:Number(t),g:Number(n),b:Number(o),a:Number(i)}):null},"rgb"],[function(e){var t=e.h,n=e.s,o=e.l,r=e.a,i=void 0===r?1:r;if(!ju(t)||!ju(n)||!ju(o))return null;var s=Du({h:Number(t),s:Number(n),l:Number(o),a:Number(i)});return Vu(s)},"hsl"],[function(e){var t=e.h,n=e.s,o=e.v,r=e.a,i=void 0===r?1:r;if(!ju(t)||!ju(n)||!ju(o))return null;var s=function(e){return{h:Mu(e.h),s:Tu(e.s,0,100),v:Tu(e.v,0,100),a:Tu(e.a)}}({h:Number(t),s:Number(n),v:Number(o),a:Number(i)});return Ou(s)},"hsv"]]},Ku=function(e,t){for(var n=0;n=.5},e.prototype.toHex=function(){return t=(e=Ru(this.rgba)).r,n=e.g,o=e.b,i=(r=e.a)<1?Lu(Eu(255*r)):"","#"+Lu(t)+Lu(n)+Lu(o)+i;var e,t,n,o,r,i},e.prototype.toRgb=function(){return Ru(this.rgba)},e.prototype.toRgbString=function(){return t=(e=Ru(this.rgba)).r,n=e.g,o=e.b,(r=e.a)<1?"rgba("+t+", "+n+", "+o+", "+r+")":"rgb("+t+", "+n+", "+o+")";var e,t,n,o,r},e.prototype.toHsl=function(){return zu(Fu(this.rgba))},e.prototype.toHslString=function(){return t=(e=zu(Fu(this.rgba))).h,n=e.s,o=e.l,(r=e.a)<1?"hsla("+t+", "+n+"%, "+o+"%, "+r+")":"hsl("+t+", "+n+"%, "+o+"%)";var e,t,n,o,r},e.prototype.toHsv=function(){return e=Au(this.rgba),{h:Eu(e.h),s:Eu(e.s),v:Eu(e.v),a:Eu(e.a,3)};var e},e.prototype.invert=function(){return Qu({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},e.prototype.saturate=function(e){return void 0===e&&(e=.1),Qu(Zu(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),Qu(Zu(this.rgba,-e))},e.prototype.grayscale=function(){return Qu(Zu(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),Qu(Yu(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),Qu(Yu(this.rgba,-e))},e.prototype.rotate=function(e){return void 0===e&&(e=15),this.hue(this.hue()+e)},e.prototype.alpha=function(e){return"number"==typeof e?Qu({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):Eu(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=Fu(this.rgba);return"number"==typeof e?Qu({h:e,s:t.s,l:t.l,a:t.a}):Eu(t.h)},e.prototype.isEqual=function(e){return this.toHex()===Qu(e).toHex()},e}(),Qu=function(e){return e instanceof Xu?e:new Xu(e)},Ju=[],ed=function(e){e.forEach((function(e){Ju.indexOf(e)<0&&(e(Xu,Wu),Ju.push(e))}))};function td(e,t){var n={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"},o={};for(var r in n)o[n[r]]=r;var i={};e.prototype.toName=function(t){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var r,s,l=o[this.toHex()];if(l)return l;if(null==t?void 0:t.closest){var a=this.toRgb(),c=1/0,u="black";if(!i.length)for(var d in n)i[d]=new e(n[d]).toRgb();for(var p in n){var h=(r=a,s=i[p],Math.pow(r.r-s.r,2)+Math.pow(r.g-s.g,2)+Math.pow(r.b-s.b,2));h(a=od(s))?(l+.05)/(a+.05):(a+.05)/(l+.05),void 0===(o=2)&&(o=0),void 0===r&&(r=Math.pow(10,o)),Math.floor(r*n)/r+0},e.prototype.isReadable=function(e,t){return void 0===e&&(e="#FFF"),void 0===t&&(t={}),this.contrast(e)>=(s=void 0===(i=(n=t).size)?"normal":i,"AAA"===(r=void 0===(o=n.level)?"AA":o)&&"normal"===s?7:"AA"===r&&"large"===s?3:4.5);var n,o,r,i,s}}ed([td,rd]);const{kebabCase:id}=O(fs.privateApis),sd=(e,t,n)=>{if(t){const n=e?.find((e=>e.slug===t));if(n)return n}return{color:n}},ld=(e,t)=>e?.find((e=>e.color===t));function ad(e,t){if(e&&t)return`has-${id(t)}-${e}`}function cd(){const[e,t,n,o,r,i,s,l,c,u]=yi("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,a.useMemo)((()=>{const e=[];return n&&n.length&&e.push({name:(0,C._x)("Theme","Indicates this palette comes from the theme."),slug:"theme",colors:n}),r&&o&&o.length&&e.push({name:(0,C._x)("Default","Indicates this palette comes from WordPress."),slug:"default",colors:o}),t&&t.length&&e.push({name:(0,C._x)("Custom","Indicates this palette is created by the user."),slug:"custom",colors:t}),e}),[t,n,o,r]),d.gradients=(0,a.useMemo)((()=>{const e=[];return l&&l.length&&e.push({name:(0,C._x)("Theme","Indicates this palette comes from the theme."),slug:"theme",gradients:l}),u&&c&&c.length&&e.push({name:(0,C._x)("Default","Indicates this palette comes from WordPress."),slug:"default",gradients:c}),s&&s.length&&e.push({name:(0,C._x)("Custom","Indicates this palette is created by the user."),slug:"custom",gradients:s}),e}),[s,l,c,u]),d.hasColorsOrGradients=!!d.colors.length||!!d.gradients.length,d}function ud(e){return[...e].sort(((t,n)=>e.filter((e=>e===n)).length-e.filter((e=>e===t)).length)).shift()}function dd(e={}){const{flat:t,...n}=e;return t||ud(Object.values(n).filter(Boolean))||"px"}function pd(e={}){if("string"==typeof e)return e;const t=Object.values(e).map((e=>(0,fs.__experimentalParseQuantityAndUnitFromRawValue)(e))),n=t.map((e=>{var t;return null!==(t=e[0])&&void 0!==t?t:""})),o=t.map((e=>e[1])),r=n.every((e=>e===n[0]))?n[0]:"",i=ud(o);return 0===r||r?`${r}${i}`:void 0}function hd(e={}){const t=pd(e);return"string"!=typeof e&&isNaN(parseFloat(t))}function gd(e){return!!e&&("string"==typeof e||!!Object.values(e).filter((e=>!!e||0===e)).length)}function md({onChange:e,selectedUnits:t,setSelectedUnits:n,values:o,...r}){let i=pd(o);void 0===i&&(i=dd(t));const s=gd(o)&&hd(o),l=s?(0,C.__)("Mixed"):null;return(0,re.jsx)(fs.__experimentalUnitControl,{...r,"aria-label":(0,C.__)("Border radius"),disableUnits:s,isOnly:!0,value:i,onChange:t=>{const n=!isNaN(parseFloat(t));e(n?t:void 0)},onUnitChange:e=>{n({topLeft:e,topRight:e,bottomLeft:e,bottomRight:e})},placeholder:l,size:"__unstable-large"})}const fd={topLeft:(0,C.__)("Top left"),topRight:(0,C.__)("Top right"),bottomLeft:(0,C.__)("Bottom left"),bottomRight:(0,C.__)("Bottom right")};function bd({onChange:e,selectedUnits:t,setSelectedUnits:n,values:o,...r}){const i=t=>n=>{if(!e)return;const o=isNaN(parseFloat(n))?void 0:n;e({...s,[t]:o})},s="string"!=typeof o?o:{topLeft:o,topRight:o,bottomLeft:o,bottomRight:o};return(0,re.jsx)("div",{className:"components-border-radius-control__input-controls-wrapper",children:Object.entries(fd).map((([e,o])=>{const[l,a]=(0,fs.__experimentalParseQuantityAndUnitFromRawValue)(s[e]),c=s[e]?a:t[e]||t.flat;return(0,re.jsx)(fs.Tooltip,{text:o,placement:"top",children:(0,re.jsx)("div",{className:"components-border-radius-control__tooltip-wrapper",children:(0,re.jsx)(fs.__experimentalUnitControl,{...r,"aria-label":o,value:[l,c].join(""),onChange:i(e),onUnitChange:(u=e,e=>{const o={...t};o[u]=e,n(o)}),size:"__unstable-large"})})},e);var u}))})}const kd=(0,re.jsx)(oe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,re.jsx)(oe.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"})});function vd({isLinked:e,...t}){const n=e?(0,C.__)("Unlink radii"):(0,C.__)("Link radii");return(0,re.jsx)(fs.Button,{...t,className:"component-border-radius-control__linked-button",size:"small",icon:e?kd:Mc,iconSize:24,label:n})}const _d={topLeft:void 0,topRight:void 0,bottomLeft:void 0,bottomRight:void 0},xd=0,yd={px:100,em:20,rem:20};function Sd({onChange:e,values:t}){const[n,o]=(0,a.useState)(!gd(t)||!hd(t)),[r,i]=(0,a.useState)({flat:"string"==typeof t?(0,fs.__experimentalParseQuantityAndUnitFromRawValue)(t)[1]:void 0,topLeft:(0,fs.__experimentalParseQuantityAndUnitFromRawValue)(t?.topLeft)[1],topRight:(0,fs.__experimentalParseQuantityAndUnitFromRawValue)(t?.topRight)[1],bottomLeft:(0,fs.__experimentalParseQuantityAndUnitFromRawValue)(t?.bottomLeft)[1],bottomRight:(0,fs.__experimentalParseQuantityAndUnitFromRawValue)(t?.bottomRight)[1]}),[s]=yi("spacing.units"),l=(0,fs.__experimentalUseCustomUnits)({availableUnits:s||["px","em","rem"]}),c=dd(r),u=l&&l.find((e=>e.value===c)),d=u?.step||1,[p]=(0,fs.__experimentalParseQuantityAndUnitFromRawValue)(pd(t));return(0,re.jsxs)("fieldset",{className:"components-border-radius-control",children:[(0,re.jsx)(fs.BaseControl.VisualLabel,{as:"legend",children:(0,C.__)("Radius")}),(0,re.jsxs)("div",{className:"components-border-radius-control__wrapper",children:[n?(0,re.jsxs)(re.Fragment,{children:[(0,re.jsx)(md,{className:"components-border-radius-control__unit-control",values:t,min:xd,onChange:e,selectedUnits:r,setSelectedUnits:i,units:l}),(0,re.jsx)(fs.RangeControl,{__next40pxDefaultSize:!0,label:(0,C.__)("Border radius"),hideLabelFromVision:!0,className:"components-border-radius-control__range-control",value:null!=p?p:"",min:xd,max:yd[c],initialPosition:0,withInputField:!1,onChange:t=>{e(void 0!==t?`${t}${c}`:void 0)},step:d,__nextHasNoMarginBottom:!0})]}):(0,re.jsx)(bd,{min:xd,onChange:e,selectedUnits:r,setSelectedUnits:i,values:t||_d,units:l}),(0,re.jsx)(vd,{onClick:()=>o(!n),isLinked:n})]})]})}const wd=(0,re.jsx)(oe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,re.jsx)(oe.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})}),Cd=(0,re.jsx)(oe.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,re.jsx)(oe.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"})}),Bd=[];function Id({shadow:e,onShadowChange:t,settings:n}){const o=Md(n);return(0,re.jsx)("div",{className:"block-editor-global-styles__shadow-popover-container",children:(0,re.jsxs)(fs.__experimentalVStack,{spacing:4,children:[(0,re.jsx)(fs.__experimentalHeading,{level:5,children:(0,C.__)("Drop shadow")}),(0,re.jsx)(jd,{presets:o,activeShadow:e,onSelect:t}),(0,re.jsx)("div",{className:"block-editor-global-styles__clear-shadow",children:(0,re.jsx)(fs.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>t(void 0),children:(0,C.__)("Clear")})})]})})}function jd({presets:e,activeShadow:t,onSelect:n}){return e?(0,re.jsx)(fs.Composite,{role:"listbox",className:"block-editor-global-styles__shadow__list","aria-label":(0,C.__)("Drop shadows"),children:e.map((({name:e,slug:o,shadow:r})=>(0,re.jsx)(Ed,{label:e,isActive:r===t,type:"unset"===o?"unset":"preset",onSelect:()=>n(r===t?void 0:r),shadow:r},o)))}):null}function Ed({type:e,label:t,isActive:n,onSelect:o,shadow:r}){return(0,re.jsx)(fs.Tooltip,{text:t,children:(0,re.jsx)(fs.Composite.Item,{role:"option","aria-label":t,"aria-selected":n,className:ls("block-editor-global-styles__shadow__item",{"is-active":n}),render:(0,re.jsx)("button",{className:ls("block-editor-global-styles__shadow-indicator",{unset:"unset"===e}),onClick:o,style:{boxShadow:r},"aria-label":t,children:n&&(0,re.jsx)(Bl,{icon:wd})})})})}function Td({shadow:e,onShadowChange:t,settings:n}){return(0,re.jsx)(fs.Dropdown,{popoverProps:{placement:"left-start",offset:36,shift:!0},className:"block-editor-global-styles__shadow-dropdown",renderToggle:({onToggle:e,isOpen:t})=>{const n={onClick:e,className:ls({"is-open":t}),"aria-expanded":t};return(0,re.jsx)(fs.Button,{__next40pxDefaultSize:!0,...n,children:(0,re.jsxs)(fs.__experimentalHStack,{justify:"flex-start",children:[(0,re.jsx)(Bl,{className:"block-editor-global-styles__toggle-icon",icon:Cd,size:24}),(0,re.jsx)(fs.FlexItem,{children:(0,C.__)("Drop shadow")})]})})},renderContent:()=>(0,re.jsx)(fs.__experimentalDropdownContentWrapper,{paddingSize:"medium",children:(0,re.jsx)(Id,{shadow:e,onShadowChange:t,settings:n})})})}function Md(e){return(0,a.useMemo)((()=>{var t;if(!e?.shadow)return Bd;const n=e?.shadow?.defaultPresets,{default:o,theme:r,custom:i}=null!==(t=e?.shadow?.presets)&&void 0!==t?t:{},s={name:(0,C.__)("Unset"),slug:"unset",shadow:"none"},l=[...n&&o||Bd,...r||Bd,...i||Bd];return l.length&&l.unshift(s),l}),[e])}function Pd(e){return Object.values(Rd(e)).some(Boolean)}function Rd(e){return{hasBorderColor:Nd(e),hasBorderRadius:Ld(e),hasBorderStyle:Ad(e),hasBorderWidth:Od(e),hasShadow:Dd(e)}}function Nd(e){return e?.border?.color}function Ld(e){return e?.border?.radius}function Ad(e){return e?.border?.style}function Od(e){return e?.border?.width}function Dd(e){const t=Md(e);return!!e?.shadow&&t.length>0}function zd({resetAllFilter:e,onChange:t,value:n,panelId:o,children:r,label:i}){const s=Ui();return(0,re.jsx)(fs.__experimentalToolsPanel,{label:i,resetAll:()=>{const o=e(n);t(o)},panelId:o,dropdownMenuProps:s,children:r})}const Vd={radius:!0,color:!0,width:!0,shadow:!0};function Fd({as:e=zd,value:t,onChange:n,inheritedValue:o=t,settings:r,panelId:i,name:s,defaultControls:l=Vd}){var c,u,d,p;const h=rs(r),g=(0,a.useCallback)((e=>Ki({settings:r},"",e)),[r]),m=e=>{const t=h.flatMap((({colors:e})=>e)).find((({color:t})=>t===e));return t?"var:preset|color|"+t.slug:e},f=(0,a.useMemo)((()=>{if((0,fs.__experimentalHasSplitBorders)(o?.border)){const e={...o?.border};return["top","right","bottom","left"].forEach((t=>{e[t]={...e[t],color:g(e[t]?.color)}})),e}return{...o?.border,color:o?.border?.color?g(o?.border?.color):void 0}}),[o?.border,g]),b=e=>n({...t,border:e}),k=Nd(r),v=Ad(r),_=Od(r),x=Ld(r),y=g(f?.radius),S=e=>b({...f,radius:e}),w=()=>{const e=t?.border?.radius;return"object"==typeof e?Object.entries(e).some(Boolean):!!e},B=Dd(r),I=g(o?.shadow),j=null!==(c=r?.shadow?.presets)&&void 0!==c?c:{},E=null!==(u=null!==(d=null!==(p=j.custom)&&void 0!==p?p:j.theme)&&void 0!==d?d:j.default)&&void 0!==u?u:[],T=e=>{const o=E?.find((({shadow:t})=>t===e))?.slug;n(fe(t,["shadow"],o?`var:preset|shadow|${o}`:e||void 0))},M=(0,a.useCallback)((e=>({...e,border:void 0,shadow:void 0})),[]),P=l?.color||l?.width,R=k||v||_||x,N=Qd({blockName:s,hasShadowControl:B,hasBorderControl:R});return(0,re.jsxs)(e,{resetAllFilter:M,value:t,onChange:n,panelId:i,label:N,children:[(_||k)&&(0,re.jsx)(fs.__experimentalToolsPanelItem,{hasValue:()=>(0,fs.__experimentalIsDefinedBorder)(t?.border),label:(0,C.__)("Border"),onDeselect:()=>(()=>{if(w())return b({radius:t?.border?.radius});b(void 0)})(),isShownByDefault:P,panelId:i,children:(0,re.jsx)(fs.BorderBoxControl,{colors:h,enableAlpha:!0,enableStyle:v,onChange:e=>{const t={...e};(0,fs.__experimentalHasSplitBorders)(t)?["top","right","bottom","left"].forEach((e=>{t[e]&&(t[e]={...t[e],color:m(t[e]?.color)})})):t&&(t.color=m(t.color)),b({radius:f?.radius,...t})},popoverOffset:40,popoverPlacement:"left-start",value:f,__experimentalIsRenderedInSidebar:!0,size:"__unstable-large",hideLabelFromVision:!B,label:(0,C.__)("Border")})}),x&&(0,re.jsx)(fs.__experimentalToolsPanelItem,{hasValue:w,label:(0,C.__)("Radius"),onDeselect:()=>S(void 0),isShownByDefault:l.radius,panelId:i,children:(0,re.jsx)(Sd,{values:y,onChange:e=>{S(e||void 0)}})}),B&&(0,re.jsxs)(fs.__experimentalToolsPanelItem,{label:(0,C.__)("Shadow"),hasValue:()=>!!t?.shadow,onDeselect:()=>T(void 0),isShownByDefault:l.shadow,panelId:i,children:[R?(0,re.jsx)(fs.BaseControl.VisualLabel,{as:"legend",children:(0,C.__)("Shadow")}):null,(0,re.jsx)(fs.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:(0,re.jsx)(Td,{shadow:I,onShadowChange:T,settings:r})})]})]})}const Hd="border",Gd="shadow",$d=(e,t,n)=>{let o;return e.some((e=>e.colors.some((e=>e[t]===n&&(o=e,!0))))),o},Ud=({colors:e,namedColor:t,customColor:n})=>{if(t){const n=$d(e,"slug",t);if(n)return n}if(!n)return{color:void 0};return $d(e,"color",n)||{color:n}};function Wd(e){const t=/var:preset\|color\|(.+)/.exec(e);return t&&t[1]?t[1]:null}function Kd(e){if((0,fs.__experimentalHasSplitBorders)(e?.border))return{style:e,borderColor:void 0};const t=e?.border?.color,n=t?.startsWith("var:preset|color|")?t.substring(17):void 0,o={...e};return o.border={...o.border,color:n?void 0:t},{style:as(o),borderColor:n}}function Zd(e){return(0,fs.__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 qd({label:e,children:t,resetAllFilter:n}){const o=(0,a.useCallback)((e=>{const t=Zd(e),o=n(t);return{...e,...Kd(o)}}),[n]);return(0,re.jsx)(ja,{group:"border",resetAllFilter:o,label:e,children:t})}function Yd({clientId:e,name:t,setAttributes:n,settings:o}){const r=Pd(o),{style:i,borderColor:s}=(0,c.useSelect)((function(t){const{style:n,borderColor:o}=t(_i).getBlockAttributes(e)||{};return{style:n,borderColor:o}}),[e]),u=(0,a.useMemo)((()=>Zd({style:i,borderColor:s})),[i,s]);if(!r)return null;const d={...(0,l.getBlockSupport)(t,[Hd,"defaultControls"]),...(0,l.getBlockSupport)(t,[Gd,"defaultControls"])};return(0,re.jsx)(Fd,{as:qd,panelId:e,settings:o,value:u,onChange:e=>{n(Kd(e))},defaultControls:d})}function Xd(e,t="any"){if("web"!==a.Platform.OS)return!1;const n=(0,l.getBlockSupport)(e,Hd);return!0===n||("any"===t?!!(n?.color||n?.radius||n?.width||n?.style):!!n?.[t])}function Qd({blockName:e,hasBorderControl:t,hasShadowControl:n}={}){const o=Rd(gs(e));return t||n||!e||(t=o?.hasBorderColor||o?.hasBorderStyle||o?.hasBorderWidth||o?.hasBorderRadius,n=o?.hasShadow),t&&n?(0,C.__)("Border & Shadow"):n?(0,C.__)("Shadow"):(0,C.__)("Border")}function Jd(e,t,n){if(!Xd(t,"color")||us(t,Hd,"color"))return e;const o=ep(n),r=ls(e.className,o);return e.className=r||void 0,e}function ep(e){const{borderColor:t,style:n}=e,o=ad("border-color",t);return ls({"has-border-color":t||n?.border?.color,[o]:!!o})}const tp={useBlockProps:function({name:e,borderColor:t,style:n}){const{colors:o}=cd();if(!Xd(e,"color")||us(e,Hd,"color"))return{};const{color:r}=Ud({colors:o,namedColor:t}),{color:i}=Ud({colors:o,namedColor:Wd(n?.border?.top?.color)}),{color:s}=Ud({colors:o,namedColor:Wd(n?.border?.right?.color)}),{color:l}=Ud({colors:o,namedColor:Wd(n?.border?.bottom?.color)}),{color:a}=Ud({colors:o,namedColor:Wd(n?.border?.left?.color)});return Jd({style:as({borderTopColor:i||r,borderRightColor:s||r,borderBottomColor:l||r,borderLeftColor:a||r})||{}},e,{borderColor:t,style:n})},addSaveProps:Jd,attributeKeys:["borderColor","style"],hasSupport:e=>Xd(e,"color")};function np(e){if(e)return`has-${e}-gradient-background`}function op(e,t){const n=e?.find((e=>e.slug===t));return n&&n.gradient}function rp(e,t){const n=e?.find((e=>e.gradient===t));return n}function ip(e,t){const n=rp(e,t);return n&&n.slug}function sp({gradientAttribute:e="gradient",customGradientAttribute:t="customGradient"}={}){const{clientId:n}=_(),[o,r,i]=yi("color.gradients.custom","color.gradients.theme","color.gradients.default"),s=(0,a.useMemo)((()=>[...o||[],...r||[],...i||[]]),[o,r,i]),{gradient:l,customGradient:u}=(0,c.useSelect)((o=>{const{getBlockAttributes:r}=o(_i),i=r(n)||{};return{customGradient:i[t],gradient:i[e]}}),[n,e,t]),{updateBlockAttributes:d}=(0,c.useDispatch)(_i),p=(0,a.useCallback)((o=>{const r=ip(s,o);d(n,r?{[e]:r,[t]:void 0}:{[e]:void 0,[t]:o})}),[s,n,d]),h=np(l);let g;return g=l?op(s,l):u,{gradientClass:h,gradientValue:g,setGradient:p}}(0,d.addFilter)("blocks.registerBlockType","core/border/addAttributes",(function(e){return Xd(e,"color")?e.attributes.borderColor?e:{...e,attributes:{...e.attributes,borderColor:{type:"string"}}}:e}));const{Tabs:lp}=O(fs.privateApis),ap=["colors","disableCustomColors","gradients","disableCustomGradients"],cp={color:"color",gradient:"gradient"};function up({colors:e,gradients:t,disableCustomColors:n,disableCustomGradients:o,__experimentalIsRenderedInSidebar:r,className:i,label:s,onColorChange:l,onGradientChange:a,colorValue:c,gradientValue:u,clearable:d,showTitle:p=!0,enableAlpha:h,headingLevel:g}){const m=l&&(e&&e.length>0||!n),f=a&&(t&&t.length>0||!o);if(!m&&!f)return null;const b={[cp.color]:(0,re.jsx)(fs.ColorPalette,{value:c,onChange:f?e=>{l(e),a()}:l,colors:e,disableCustomColors:n,__experimentalIsRenderedInSidebar:r,clearable:d,enableAlpha:h,headingLevel:g}),[cp.gradient]:(0,re.jsx)(fs.GradientPicker,{value:u,onChange:m?e=>{a(e),l()}:a,gradients:t,disableCustomGradients:o,__experimentalIsRenderedInSidebar:r,clearable:d,headingLevel:g})},k=e=>(0,re.jsx)("div",{className:"block-editor-color-gradient-control__panel",children:b[e]});return(0,re.jsx)(fs.BaseControl,{__nextHasNoMarginBottom:!0,className:ls("block-editor-color-gradient-control",i),children:(0,re.jsx)("fieldset",{className:"block-editor-color-gradient-control__fieldset",children:(0,re.jsxs)(fs.__experimentalVStack,{spacing:1,children:[p&&(0,re.jsx)("legend",{children:(0,re.jsx)("div",{className:"block-editor-color-gradient-control__color-indicator",children:(0,re.jsx)(fs.BaseControl.VisualLabel,{children:s})})}),m&&f&&(0,re.jsx)("div",{children:(0,re.jsxs)(lp,{defaultTabId:u?cp.gradient:!!m&&cp.color,children:[(0,re.jsxs)(lp.TabList,{children:[(0,re.jsx)(lp.Tab,{tabId:cp.color,children:(0,C.__)("Color")}),(0,re.jsx)(lp.Tab,{tabId:cp.gradient,children:(0,C.__)("Gradient")})]}),(0,re.jsx)(lp.TabPanel,{tabId:cp.color,className:"block-editor-color-gradient-control__panel",focusable:!1,children:b.color}),(0,re.jsx)(lp.TabPanel,{tabId:cp.gradient,className:"block-editor-color-gradient-control__panel",focusable:!1,children:b.gradient})]})}),!f&&k(cp.color),!m&&k(cp.gradient)]})})})}function dp(e){const[t,n,o,r]=yi("color.palette","color.gradients","color.custom","color.customGradient");return(0,re.jsx)(up,{colors:t,gradients:n,disableCustomColors:!o,disableCustomGradients:!r,...e})}const pp=function(e){return ap.every((t=>e.hasOwnProperty(t)))?(0,re.jsx)(up,{...e}):(0,re.jsx)(dp,{...e})},hp=(0,re.jsx)(oe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,re.jsx)(oe.Path,{d:"M7 11.5h10V13H7z"})});function gp(e){const t=mp(e),n=_p(e),o=fp(e),r=kp(e),i=vp(e),s=bp(e);return t||n||o||r||i||s}function mp(e){const t=rs(e);return e?.color?.text&&(t?.length>0||e?.color?.custom)}function fp(e){const t=rs(e);return e?.color?.link&&(t?.length>0||e?.color?.custom)}function bp(e){const t=rs(e);return e?.color?.caption&&(t?.length>0||e?.color?.custom)}function kp(e){const t=rs(e),n=is(e);return e?.color?.heading&&(t?.length>0||e?.color?.custom||n?.length>0||e?.color?.customGradient)}function vp(e){const t=rs(e),n=is(e);return e?.color?.button&&(t?.length>0||e?.color?.custom||n?.length>0||e?.color?.customGradient)}function _p(e){const t=rs(e),n=is(e);return e?.color?.background&&(t?.length>0||e?.color?.custom||n?.length>0||e?.color?.customGradient)}function xp({resetAllFilter:e,onChange:t,value:n,panelId:o,children:r}){const i=Ui();return(0,re.jsx)(fs.__experimentalToolsPanel,{label:(0,C.__)("Elements"),resetAll:()=>{const o=e(n);t(o)},panelId:o,hasInnerWrapper:!0,headingLevel:3,className:"color-block-support-panel",__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last",dropdownMenuProps:i,children:(0,re.jsx)("div",{className:"color-block-support-panel__inner-wrapper",children:r})})}const yp={text:!0,background:!0,link:!0,heading:!0,button:!0,caption:!0},Sp={placement:"left-start",offset:36,shift:!0},{Tabs:wp}=O(fs.privateApis),Cp=({indicators:e,label:t})=>(0,re.jsxs)(fs.__experimentalHStack,{justify:"flex-start",children:[(0,re.jsx)(fs.__experimentalZStack,{isLayered:!1,offset:-8,children:e.map(((e,t)=>(0,re.jsx)(fs.Flex,{expanded:!1,children:(0,re.jsx)(fs.ColorIndicator,{colorValue:e})},t)))}),(0,re.jsx)(fs.FlexItem,{className:"block-editor-panel-color-gradient-settings__color-name",children:t})]});function Bp({isGradient:e,inheritedValue:t,userValue:n,setValue:o,colorGradientControlSettings:r}){return(0,re.jsx)(pp,{...r,showTitle:!1,enableAlpha:!0,__experimentalIsRenderedInSidebar:!0,colorValue:e?void 0:t,gradientValue:e?t:void 0,onColorChange:e?void 0:o,onGradientChange:e?o:void 0,clearable:t===n,headingLevel:3})}function Ip({label:e,hasValue:t,resetValue:n,isShownByDefault:o,indicators:r,tabs:i,colorGradientControlSettings:s,panelId:l}){var c;const u=i.find((e=>void 0!==e.userValue)),{key:d,...p}=null!==(c=i[0])&&void 0!==c?c:{},h=(0,a.useRef)(void 0);return(0,re.jsx)(fs.__experimentalToolsPanelItem,{className:"block-editor-tools-panel-color-gradient-settings__item",hasValue:t,label:e,onDeselect:n,isShownByDefault:o,panelId:l,children:(0,re.jsx)(fs.Dropdown,{popoverProps:Sp,className:"block-editor-tools-panel-color-gradient-settings__dropdown",renderToggle:({onToggle:o,isOpen:i})=>{const s={onClick:o,className:ls("block-editor-panel-color-gradient-settings__dropdown",{"is-open":i}),"aria-expanded":i,ref:h};return(0,re.jsxs)(re.Fragment,{children:[(0,re.jsx)(fs.Button,{...s,__next40pxDefaultSize:!0,children:(0,re.jsx)(Cp,{indicators:r,label:e})}),t()&&(0,re.jsx)(fs.Button,{__next40pxDefaultSize:!0,label:(0,C.__)("Reset"),className:"block-editor-panel-color-gradient-settings__reset",size:"small",icon:hp,onClick:()=>{n(),h.current?.focus()}})]})},renderContent:()=>(0,re.jsx)(fs.__experimentalDropdownContentWrapper,{paddingSize:"none",children:(0,re.jsxs)("div",{className:"block-editor-panel-color-gradient-settings__dropdown-content",children:[1===i.length&&(0,re.jsx)(Bp,{...p,colorGradientControlSettings:s},d),i.length>1&&(0,re.jsxs)(wp,{defaultTabId:u?.key,children:[(0,re.jsx)(wp.TabList,{children:i.map((e=>(0,re.jsx)(wp.Tab,{tabId:e.key,children:e.label},e.key)))}),i.map((e=>{const{key:t,...n}=e;return(0,re.jsx)(wp.TabPanel,{tabId:t,focusable:!1,children:(0,re.jsx)(Bp,{...n,colorGradientControlSettings:s},t)},t)}))]})]})})})})}function jp({as:e=xp,value:t,onChange:n,inheritedValue:o=t,settings:r,panelId:i,defaultControls:s=yp,children:l}){const c=rs(r),u=is(r),d=r?.color?.custom,p=r?.color?.customGradient,h=c.length>0||d,g=u.length>0||p,m=e=>Ki({settings:r},"",e),f=e=>{const t=c.flatMap((({colors:e})=>e)).find((({color:t})=>t===e));return t?"var:preset|color|"+t.slug:e},b=e=>{const t=u.flatMap((({gradients:e})=>e)).find((({gradient:t})=>t===e));return t?"var:preset|gradient|"+t.slug:e},k=_p(r),v=m(o?.color?.background),_=m(t?.color?.background),x=m(o?.color?.gradient),y=m(t?.color?.gradient),S=fp(r),w=m(o?.elements?.link?.color?.text),B=m(t?.elements?.link?.color?.text),I=m(o?.elements?.link?.[":hover"]?.color?.text),j=m(t?.elements?.link?.[":hover"]?.color?.text),E=mp(r),T=m(o?.color?.text),M=m(t?.color?.text),P=e=>{let o=fe(t,["color","text"],f(e));T===w&&(o=fe(o,["elements","link","color","text"],f(e))),n(o)},R=[{name:"caption",label:(0,C.__)("Captions"),showPanel:bp(r)},{name:"button",label:(0,C.__)("Button"),showPanel:vp(r)},{name:"heading",label:(0,C.__)("Heading"),showPanel:kp(r)},{name:"h1",label:(0,C.__)("H1"),showPanel:kp(r)},{name:"h2",label:(0,C.__)("H2"),showPanel:kp(r)},{name:"h3",label:(0,C.__)("H3"),showPanel:kp(r)},{name:"h4",label:(0,C.__)("H4"),showPanel:kp(r)},{name:"h5",label:(0,C.__)("H5"),showPanel:kp(r)},{name:"h6",label:(0,C.__)("H6"),showPanel:kp(r)}],N=(0,a.useCallback)((e=>({...e,color:void 0,elements:{...e?.elements,link:{...e?.elements?.link,color:void 0,":hover":{color:void 0}},...R.reduce(((t,n)=>({...t,[n.name]:{...e?.elements?.[n.name],color:void 0}})),{})}})),[]),L=[E&&{key:"text",label:(0,C.__)("Text"),hasValue:()=>!!M,resetValue:()=>P(void 0),isShownByDefault:s.text,indicators:[T],tabs:[{key:"text",label:(0,C.__)("Text"),inheritedValue:T,setValue:P,userValue:M}]},k&&{key:"background",label:(0,C.__)("Background"),hasValue:()=>!!_||!!y,resetValue:()=>{const e=fe(t,["color","background"],void 0);e.color.gradient=void 0,n(e)},isShownByDefault:s.background,indicators:[null!=x?x:v],tabs:[h&&{key:"background",label:(0,C.__)("Color"),inheritedValue:v,setValue:e=>{const o=fe(t,["color","background"],f(e));o.color.gradient=void 0,n(o)},userValue:_},g&&{key:"gradient",label:(0,C.__)("Gradient"),inheritedValue:x,setValue:e=>{const o=fe(t,["color","gradient"],b(e));o.color.background=void 0,n(o)},userValue:y,isGradient:!0}].filter(Boolean)},S&&{key:"link",label:(0,C.__)("Link"),hasValue:()=>!!B||!!j,resetValue:()=>{let e=fe(t,["elements","link",":hover","color","text"],void 0);e=fe(e,["elements","link","color","text"],void 0),n(e)},isShownByDefault:s.link,indicators:[w,I],tabs:[{key:"link",label:(0,C.__)("Default"),inheritedValue:w,setValue:e=>{n(fe(t,["elements","link","color","text"],f(e)))},userValue:B},{key:"hover",label:(0,C.__)("Hover"),inheritedValue:I,setValue:e=>{n(fe(t,["elements","link",":hover","color","text"],f(e)))},userValue:j}]}].filter(Boolean);return R.forEach((({name:e,label:r,showPanel:i})=>{if(!i)return;const l=m(o?.elements?.[e]?.color?.background),a=m(o?.elements?.[e]?.color?.gradient),c=m(o?.elements?.[e]?.color?.text),u=m(t?.elements?.[e]?.color?.background),d=m(t?.elements?.[e]?.color?.gradient),p=m(t?.elements?.[e]?.color?.text),k="caption"!==e;L.push({key:e,label:r,hasValue:()=>!!(p||u||d),resetValue:()=>{const o=fe(t,["elements",e,"color","background"],void 0);o.elements[e].color.gradient=void 0,o.elements[e].color.text=void 0,n(o)},isShownByDefault:s[e],indicators:k?[c,null!=a?a:l]:[c],tabs:[h&&{key:"text",label:(0,C.__)("Text"),inheritedValue:c,setValue:o=>{n(fe(t,["elements",e,"color","text"],f(o)))},userValue:p},h&&k&&{key:"background",label:(0,C.__)("Background"),inheritedValue:l,setValue:o=>{const r=fe(t,["elements",e,"color","background"],f(o));r.elements[e].color.gradient=void 0,n(r)},userValue:u},g&&k&&{key:"gradient",label:(0,C.__)("Gradient"),inheritedValue:a,setValue:o=>{const r=fe(t,["elements",e,"color","gradient"],b(o));r.elements[e].color.background=void 0,n(r)},userValue:d,isGradient:!0}].filter(Boolean)})})),(0,re.jsxs)(e,{resetAllFilter:N,value:t,onChange:n,panelId:i,children:[L.map((e=>{const{key:t,...n}=e;return(0,re.jsx)(Ip,{...n,colorGradientControlSettings:{colors:c,disableCustomColors:!d,gradients:u,disableCustomGradients:!p},panelId:i},t)})),l]})}ed([td,rd]);const Ep=function({backgroundColor:e,fallbackBackgroundColor:t,fallbackTextColor:n,fallbackLinkColor:o,fontSize:r,isLargeText:i,textColor:s,linkColor:l,enableAlphaChecker:a=!1}){const c=e||t;if(!c)return null;const u=s||n,d=l||o;if(!u&&!d)return null;const p=[{color:u,description:(0,C.__)("text color")},{color:d,description:(0,C.__)("link color")}],h=Qu(c),g=h.alpha()<1,m=h.brightness(),f={level:"AA",size:i||!1!==i&&r>=24?"large":"small"};let b="",k="";for(const e of p){if(!e.color)continue;const t=Qu(e.color),n=t.isReadable(h,f),o=t.alpha()<1;if(!n){if(g||o)continue;b=m({refsMap:(0,u.observableMap)()})),[]);return(0,re.jsx)(Tp.Provider,{value:t,children:e})}function Pp(e){const{refsMap:t}=(0,a.useContext)(Tp);return(0,u.useRefEffect)((n=>(t.set(e,n),()=>t.delete(e))),[e])}function Rp(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function Np(e,t){const{refsMap:n}=(0,a.useContext)(Tp);(0,a.useLayoutEffect)((()=>{Rp(t,n.get(e));const o=n.subscribe(e,(()=>Rp(t,n.get(e))));return()=>{o(),Rp(t,null)}}),[n,e,t])}function Lp(e){const[t,n]=(0,a.useState)(null);return Np(e,n),t}function Ap(e){return e.ownerDocument.defaultView.getComputedStyle(e)}function Op({clientId:e}){const[t,n]=(0,a.useState)(),[o,r]=(0,a.useState)(),[i,s]=(0,a.useState)(),l=Lp(e);return(0,a.useEffect)((()=>{if(!l)return;r(Ap(l).color);const e=l.querySelector("a");e&&e.innerText&&s(Ap(e).color);let t=l,o=Ap(t).backgroundColor;for(;"rgba(0, 0, 0, 0)"===o&&t.parentNode&&t.parentNode.nodeType===t.parentNode.ELEMENT_NODE;)t=t.parentNode,o=Ap(t).backgroundColor;n(o)}),[l]),(0,re.jsx)(Ep,{backgroundColor:t,textColor:o,enableAlphaChecker:!0,linkColor:i})}const Dp="color",zp=e=>{const t=(0,l.getBlockSupport)(e,Dp);return t&&(!0===t.link||!0===t.gradient||!1!==t.background||!1!==t.text)},Vp=e=>{if("web"!==a.Platform.OS)return!1;const t=(0,l.getBlockSupport)(e,Dp);return null!==t&&"object"==typeof t&&!!t.link},Fp=e=>{const t=(0,l.getBlockSupport)(e,Dp);return null!==t&&"object"==typeof t&&!!t.gradients},Hp=e=>{const t=(0,l.getBlockSupport)(e,Dp);return t&&!1!==t.background},Gp=e=>{const t=(0,l.getBlockSupport)(e,Dp);return t&&!1!==t.text};function $p(e,t,n){if(!zp(t)||us(t,Dp))return e;const o=Fp(t),{backgroundColor:r,textColor:i,gradient:s,style:l}=n,a=e=>!us(t,Dp,e),c=a("text")?ad("color",i):void 0,u=a("gradients")?np(s):void 0,d=a("background")?ad("background-color",r):void 0,p=a("background")||a("gradients"),h=r||l?.color?.background||o&&(s||l?.color?.gradient),g=ls(e.className,c,u,{[d]:!(o&&l?.color?.gradient||!d),"has-text-color":a("text")&&(i||l?.color?.text),"has-background":p&&h,"has-link-color":a("link")&&l?.elements?.link?.color});return e.className=g||void 0,e}function Up(e){const t=e?.color?.text,n=t?.startsWith("var:preset|color|")?t.substring(17):void 0,o=e?.color?.background,r=o?.startsWith("var:preset|color|")?o.substring(17):void 0,i=e?.color?.gradient,s=i?.startsWith("var:preset|gradient|")?i.substring(20):void 0,l={...e};return l.color={...l.color,text:n?void 0:t,background:r?void 0:o,gradient:s?void 0:i},{style:as(l),textColor:n,backgroundColor:r,gradient:s}}function Wp(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 Kp({children:e,resetAllFilter:t}){const n=(0,a.useCallback)((e=>{const n=Wp(e),o=t(n);return{...e,...Up(o)}}),[t]);return(0,re.jsx)(ja,{group:"color",resetAllFilter:n,children:e})}function Zp({clientId:e,name:t,setAttributes:n,settings:o}){const r=gp(o),{style:i,textColor:s,backgroundColor:u,gradient:d}=(0,c.useSelect)((function(t){const{style:n,textColor:o,backgroundColor:r,gradient:i}=t(_i).getBlockAttributes(e)||{};return{style:n,textColor:o,backgroundColor:r,gradient:i}}),[e]),p=(0,a.useMemo)((()=>Wp({style:i,textColor:s,backgroundColor:u,gradient:d})),[i,s,u,d]);if(!r)return null;const h=(0,l.getBlockSupport)(t,[Dp,"defaultControls"]),g="web"===a.Platform.OS&&!p?.color?.gradient&&(o?.color?.text||o?.color?.link)&&!1!==(0,l.getBlockSupport)(t,[Dp,"enableContrastChecker"]);return(0,re.jsx)(jp,{as:Kp,panelId:e,settings:o,value:p,onChange:e=>{n(Up(e))},defaultControls:h,enableContrastChecker:!1!==(0,l.getBlockSupport)(t,[Dp,"enableContrastChecker"]),children:g&&(0,re.jsx)(Op,{clientId:e})})}const qp={useBlockProps:function({name:e,backgroundColor:t,textColor:n,gradient:o,style:r}){const[i,s,l]=yi("color.palette.custom","color.palette.theme","color.palette.default"),c=(0,a.useMemo)((()=>[...i||[],...s||[],...l||[]]),[i,s,l]);if(!zp(e)||us(e,Dp))return{};const u={};n&&!us(e,Dp,"text")&&(u.color=sd(c,n)?.color),t&&!us(e,Dp,"background")&&(u.backgroundColor=sd(c,t)?.color);const d=$p({style:u},e,{textColor:n,backgroundColor:t,gradient:o,style:r}),p=t||r?.color?.background||o||r?.color?.gradient;return{...d,className:ls(d.className,!p&&bu(r))}},addSaveProps:$p,attributeKeys:["backgroundColor","textColor","gradient","style"],hasSupport:zp},Yp={linkColor:[["style","elements","link","color","text"]],textColor:[["textColor"],["style","color","text"]],backgroundColor:[["backgroundColor"],["style","color","background"]],gradient:[["gradient"],["style","color","gradient"]]};function Xp({__next40pxDefaultSize:e=!1,__nextHasNoMarginBottom:t=!1,value:n="",onChange:o,fontFamilies:r,className:i,...s}){const[l]=yi("typography.fontFamilies");if(r||(r=l),!r||0===r.length)return null;const a=[{key:"",name:(0,C.__)("Default")},...r.map((({fontFamily:e,name:t})=>({key:e,name:t||e,style:{fontFamily:e}})))];return t||y()("Bottom margin styles for wp.blockEditor.FontFamilyControl",{since:"6.7",version:"7.0",hint:"Set the `__nextHasNoMarginBottom` prop to true to start opting into the new styles, which will become the default in a future version"}),(0,re.jsx)(fs.CustomSelectControl,{__next40pxDefaultSize:e,__shouldNotWarnDeprecated36pxSize:!0,label:(0,C.__)("Font"),value:n,onChange:({selectedItem:e})=>o(e.key),options:a,className:ls("block-editor-font-family-control",i,{"is-next-has-no-margin-bottom":t}),...s})}(0,d.addFilter)("blocks.registerBlockType","core/color/addAttribute",(function(e){return zp(e)?(e.attributes.backgroundColor||Object.assign(e.attributes,{backgroundColor:{type:"string"}}),e.attributes.textColor||Object.assign(e.attributes,{textColor:{type:"string"}}),Fp(e)&&!e.attributes.gradient&&Object.assign(e.attributes,{gradient:{type:"string"}}),e):e})),(0,d.addFilter)("blocks.switchToBlockType.transformedBlock","core/color/addTransforms",(function(e,t,n,o){const r=e.name;return cs({linkColor:Vp(r),textColor:Gp(r),backgroundColor:Hp(r),gradient:Fp(r)},Yp,e,t,n,o)}));const Qp=(e,t)=>e?t?(0,C.__)("Appearance"):(0,C.__)("Font style"):(0,C.__)("Font weight");function Jp(e){const{__next40pxDefaultSize:t=!1,onChange:n,hasFontStyles:o=!0,hasFontWeights:r=!0,fontFamilyFaces:i,value:{fontStyle:s,fontWeight:l},...c}=e,u=o||r,d=Qp(o,r),p={key:"default",name:(0,C.__)("Default"),style:{fontStyle:void 0,fontWeight:void 0}},{fontStyles:h,fontWeights:g,combinedStyleAndWeightOptions:m}=Oi(i),f=(0,a.useMemo)((()=>o&&r?(()=>{const e=[p];return m&&e.push(...m),e})():o?(()=>{const e=[p];return h.forEach((({name:t,value:n})=>{e.push({key:n,name:t,style:{fontStyle:n,fontWeight:void 0}})})),e})():(()=>{const e=[p];return g.forEach((({name:t,value:n})=>{e.push({key:n,name:t,style:{fontStyle:void 0,fontWeight:n}})})),e})()),[e.options,h,g,m]),b=f.find((e=>e.style.fontStyle===s&&e.style.fontWeight===l))||f[0];return u&&(0,re.jsx)(fs.CustomSelectControl,{...c,className:"components-font-appearance-control",__next40pxDefaultSize:t,__shouldNotWarnDeprecated36pxSize:!0,label:d,describedBy:b?o?r?(0,C.sprintf)( -// translators: %s: Currently selected font appearance. -// translators: %s: Currently selected font appearance. -(0,C.__)("Currently selected font appearance: %s"),b.name):(0,C.sprintf)( -// translators: %s: Currently selected font style. -// translators: %s: Currently selected font style. -(0,C.__)("Currently selected font style: %s"),b.name):(0,C.sprintf)( -// translators: %s: Currently selected font weight. -// translators: %s: Currently selected font weight. -(0,C.__)("Currently selected font weight: %s"),b.name):(0,C.__)("No selected font appearance"),options:f,value:b,onChange:({selectedItem:e})=>n(e.style)})}const eh=({__next40pxDefaultSize:e=!1,value:t,onChange:n,__unstableInputWidth:o="60px",...r})=>{const i=function(e){return void 0!==e&&""!==e}(t),s=(e,t)=>{if(i)return e;switch(`${e}`){case"0.1":return 1.6;case"0":return t?e:1.4;case"":return 1.5;default:return e}},l=i?t:"";return(0,re.jsx)("div",{className:"block-editor-line-height-control",children:(0,re.jsx)(fs.__experimentalNumberControl,{...r,__shouldNotWarnDeprecated36pxSize:!0,__next40pxDefaultSize:e,__unstableInputWidth:o,__unstableStateReducer:(e,t)=>{const n=["insertText","insertFromPaste"].includes(t.payload.event.nativeEvent?.inputType),o=s(e.value,n);return{...e,value:o}},onChange:(e,{event:t})=>{""!==e?"click"!==t.type?n(`${e}`):n(s(`${e}`,!1)):n()},label:(0,C.__)("Line height"),placeholder:1.5,step:.01,spinFactor:10,value:l,min:0,spinControls:"custom"})})};function th({__next40pxDefaultSize:e=!1,value:t,onChange:n,__unstableInputWidth:o="60px",...r}){const[i]=yi("spacing.units"),s=(0,fs.__experimentalUseCustomUnits)({availableUnits:i||["px","em","rem"],defaultValues:{px:2,em:.2,rem:.2}});return e||void 0!==r.size&&"default"!==r.size||y()("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,re.jsx)(fs.__experimentalUnitControl,{__next40pxDefaultSize:e,__shouldNotWarnDeprecated36pxSize:!0,...r,label:(0,C.__)("Letter spacing"),value:t,__unstableInputWidth:o,units:s,onChange:n})}const nh=(0,re.jsx)(oe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,re.jsx)(oe.Path,{d:"M13 5.5H4V4h9v1.5Zm7 7H4V11h16v1.5Zm-7 7H4V18h9v1.5Z"})}),oh=(0,re.jsx)(oe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,re.jsx)(oe.Path,{d:"M7.5 5.5h9V4h-9v1.5Zm-3.5 7h16V11H4v1.5Zm3.5 7h9V18h-9v1.5Z"})}),rh=(0,re.jsx)(oe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,re.jsx)(oe.Path,{d:"M11.111 5.5H20V4h-8.889v1.5ZM4 12.5h16V11H4v1.5Zm7.111 7H20V18h-8.889v1.5Z"})}),ih=(0,re.jsx)(oe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,re.jsx)(oe.Path,{d:"M4 12.8h16v-1.5H4v1.5zm0 7h12.4v-1.5H4v1.5zM4 4.3v1.5h16V4.3H4z"})}),sh=[{label:(0,C.__)("Align text left"),value:"left",icon:nh},{label:(0,C.__)("Align text center"),value:"center",icon:oh},{label:(0,C.__)("Align text right"),value:"right",icon:rh},{label:(0,C.__)("Justify text"),value:"justify",icon:ih}],lh=["left","center","right"];function ah({className:e,value:t,onChange:n,options:o=lh}){const r=(0,a.useMemo)((()=>sh.filter((e=>o.includes(e.value)))),[o]);return r.length?(0,re.jsx)(fs.__experimentalToggleGroupControl,{isDeselectable:!0,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,C.__)("Text alignment"),className:ls("block-editor-text-alignment-control",e),value:t,onChange:e=>{n(e===t?void 0:e)},children:r.map((e=>(0,re.jsx)(fs.__experimentalToggleGroupControlOptionIcon,{value:e.value,icon:e.icon,label:e.label},e.value)))}):null}const ch=(0,re.jsx)(oe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,re.jsx)(oe.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"})}),uh=(0,re.jsx)(oe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,re.jsx)(oe.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"})}),dh=(0,re.jsx)(oe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,re.jsx)(oe.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"})}),ph=[{label:(0,C.__)("None"),value:"none",icon:hp},{label:(0,C.__)("Uppercase"),value:"uppercase",icon:ch},{label:(0,C.__)("Lowercase"),value:"lowercase",icon:uh},{label:(0,C.__)("Capitalize"),value:"capitalize",icon:dh}];function hh({className:e,value:t,onChange:n}){return(0,re.jsx)(fs.__experimentalToggleGroupControl,{isDeselectable:!0,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,C.__)("Letter case"),className:ls("block-editor-text-transform-control",e),value:t,onChange:e=>{n(e===t?void 0:e)},children:ph.map((e=>(0,re.jsx)(fs.__experimentalToggleGroupControlOptionIcon,{value:e.value,icon:e.icon,label:e.label},e.value)))})}const gh=(0,re.jsx)(oe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,re.jsx)(oe.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"})}),mh=(0,re.jsx)(oe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,re.jsx)(oe.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"})}),fh=[{label:(0,C.__)("None"),value:"none",icon:hp},{label:(0,C.__)("Underline"),value:"underline",icon:gh},{label:(0,C.__)("Strikethrough"),value:"line-through",icon:mh}];function bh({value:e,onChange:t,className:n}){return(0,re.jsx)(fs.__experimentalToggleGroupControl,{isDeselectable:!0,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,C.__)("Decoration"),className:ls("block-editor-text-decoration-control",n),value:e,onChange:n=>{t(n===e?void 0:n)},children:fh.map((e=>(0,re.jsx)(fs.__experimentalToggleGroupControlOptionIcon,{value:e.value,icon:e.icon,label:e.label},e.value)))})}const kh=(0,re.jsx)(oe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,re.jsx)(oe.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"})}),vh=(0,re.jsx)(oe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,re.jsx)(oe.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"})}),_h=[{label:(0,C.__)("Horizontal"),value:"horizontal-tb",icon:kh},{label:(0,C.__)("Vertical"),value:(0,C.isRTL)()?"vertical-lr":"vertical-rl",icon:vh}];function xh({className:e,value:t,onChange:n}){return(0,re.jsx)(fs.__experimentalToggleGroupControl,{isDeselectable:!0,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,C.__)("Orientation"),className:ls("block-editor-writing-mode-control",e),value:t,onChange:e=>{n(e===t?void 0:e)},children:_h.map((e=>(0,re.jsx)(fs.__experimentalToggleGroupControlOptionIcon,{value:e.value,icon:e.icon,label:e.label},e.value)))})}const yh=1,Sh=6;function wh(e){const t=Bh(e),n=Ih(e),o=jh(e),r=Eh(e),i=Mh(e),s=Th(e),l=Ph(e),a=Rh(e),c=Nh(e),u=Ch(e);return t||n||o||r||i||s||u||l||a||c}function Ch(e){return!1!==e?.typography?.defaultFontSizes&&e?.typography?.fontSizes?.default?.length||e?.typography?.fontSizes?.theme?.length||e?.typography?.fontSizes?.custom?.length||e?.typography?.customFontSize}function Bh(e){return["default","theme","custom"].some((t=>e?.typography?.fontFamilies?.[t]?.length))}function Ih(e){return e?.typography?.lineHeight}function jh(e){return e?.typography?.fontStyle||e?.typography?.fontWeight}function Eh(e){return e?.typography?.letterSpacing}function Th(e){return e?.typography?.textTransform}function Mh(e){return e?.typography?.textAlign}function Ph(e){return e?.typography?.textDecoration}function Rh(e){return e?.typography?.writingMode}function Nh(e){return e?.typography?.textColumns}function Lh({resetAllFilter:e,onChange:t,value:n,panelId:o,children:r}){const i=Ui();return(0,re.jsx)(fs.__experimentalToolsPanel,{label:(0,C.__)("Typography"),resetAll:()=>{const o=e(n);t(o)},panelId:o,dropdownMenuProps:i,children:r})}const Ah={fontFamily:!0,fontSize:!0,fontAppearance:!0,lineHeight:!0,letterSpacing:!0,textAlign:!0,textTransform:!0,textDecoration:!0,writingMode:!0,textColumns:!0};function Oh({as:e=Lh,value:t,onChange:n,inheritedValue:o=t,settings:r,panelId:i,defaultControls:s=Ah}){const l=e=>Ki({settings:r},"",e),c=Bh(r),u=l(o?.typography?.fontFamily),{fontFamilies:d,fontFamilyFaces:p}=(0,a.useMemo)((()=>function(e,t){var n;const o=e?.typography?.fontFamilies,r=["default","theme","custom"].flatMap((e=>{var t;return null!==(t=o?.[e])&&void 0!==t?t:[]})),i=null!==(n=r.find((e=>e.fontFamily===t))?.fontFace)&&void 0!==n?n:[];return{fontFamilies:r,fontFamilyFaces:i}}(r,u)),[r,u]),h=e=>{const o=d?.find((({fontFamily:t})=>t===e))?.slug;n(fe(t,["typography","fontFamily"],o?`var:preset|font-family|${o}`:e||void 0))},g=Ch(r),m=!r?.typography?.customFontSize,f=function(e){var t,n,o;const r=e?.typography?.fontSizes,i=!!e?.typography?.defaultFontSizes;return[...null!==(t=r?.custom)&&void 0!==t?t:[],...null!==(n=r?.theme)&&void 0!==n?n:[],...i&&null!==(o=r?.default)&&void 0!==o?o:[]]}(r),b=l(o?.typography?.fontSize),k=(e,o)=>{n(fe(t,["typography","fontSize"],(o?.slug?`var:preset|font-size|${o?.slug}`:e)||void 0))},v=jh(r),_=function(e){return e?.typography?.fontStyle?e?.typography?.fontWeight?(0,C.__)("Appearance"):(0,C.__)("Font style"):(0,C.__)("Font weight")}(r),x=r?.typography?.fontStyle,y=r?.typography?.fontWeight,S=l(o?.typography?.fontStyle),w=l(o?.typography?.fontWeight),{nearestFontStyle:B,nearestFontWeight:I}=function(e,t,n){let o=t,r=n;const{fontStyles:i,fontWeights:s,combinedStyleAndWeightOptions:l}=Oi(e),a=i?.some((({value:e})=>e===t)),c=s?.some((({value:e})=>e?.toString()===n?.toString()));var u,d;return a||(o=t?(u=i,"string"==typeof(d=t)&&d&&["normal","italic","oblique"].includes(d)?!u||0===u.length||u.find((e=>e.value===d))?d:"oblique"!==d||u.find((e=>"oblique"===e.value))?"":"italic":""):l?.find((e=>e.style.fontWeight===Vi(s,n)))?.style?.fontStyle),c||(r=n?Vi(s,n):l?.find((e=>e.style.fontStyle===(o||t)))?.style?.fontWeight),{nearestFontStyle:o,nearestFontWeight:r}}(p,S,w),j=(0,a.useCallback)((({fontStyle:e,fontWeight:o})=>{e===S&&o===w||n({...t,typography:{...t?.typography,fontStyle:e||void 0,fontWeight:o||void 0}})}),[S,w,n,t]),E=(0,a.useCallback)((()=>{j({})}),[j]);(0,a.useEffect)((()=>{B&&I?j({fontStyle:B,fontWeight:I}):E()}),[B,I,E,j]);const T=Ih(r),M=l(o?.typography?.lineHeight),P=e=>{n(fe(t,["typography","lineHeight"],e||void 0))},R=Eh(r),N=l(o?.typography?.letterSpacing),L=e=>{n(fe(t,["typography","letterSpacing"],e||void 0))},A=Nh(r),O=l(o?.typography?.textColumns),D=e=>{n(fe(t,["typography","textColumns"],e||void 0))},z=Th(r),V=l(o?.typography?.textTransform),F=e=>{n(fe(t,["typography","textTransform"],e||void 0))},H=Ph(r),G=l(o?.typography?.textDecoration),$=e=>{n(fe(t,["typography","textDecoration"],e||void 0))},U=Rh(r),W=l(o?.typography?.writingMode),K=e=>{n(fe(t,["typography","writingMode"],e||void 0))},Z=Mh(r),q=l(o?.typography?.textAlign),Y=e=>{n(fe(t,["typography","textAlign"],e||void 0))},X=(0,a.useCallback)((e=>({...e,typography:{}})),[]);return(0,re.jsxs)(e,{resetAllFilter:X,value:t,onChange:n,panelId:i,children:[c&&(0,re.jsx)(fs.__experimentalToolsPanelItem,{label:(0,C.__)("Font"),hasValue:()=>!!t?.typography?.fontFamily,onDeselect:()=>h(void 0),isShownByDefault:s.fontFamily,panelId:i,children:(0,re.jsx)(Xp,{fontFamilies:d,value:u,onChange:h,size:"__unstable-large",__nextHasNoMarginBottom:!0})}),g&&(0,re.jsx)(fs.__experimentalToolsPanelItem,{label:(0,C.__)("Size"),hasValue:()=>!!t?.typography?.fontSize,onDeselect:()=>k(void 0),isShownByDefault:s.fontSize,panelId:i,children:(0,re.jsx)(fs.FontSizePicker,{value:b,onChange:k,fontSizes:f,disableCustomFontSizes:m,withReset:!1,withSlider:!0,size:"__unstable-large"})}),v&&(0,re.jsx)(fs.__experimentalToolsPanelItem,{className:"single-column",label:_,hasValue:()=>!!t?.typography?.fontStyle||!!t?.typography?.fontWeight,onDeselect:E,isShownByDefault:s.fontAppearance,panelId:i,children:(0,re.jsx)(Jp,{value:{fontStyle:S,fontWeight:w},onChange:j,hasFontStyles:x,hasFontWeights:y,fontFamilyFaces:p,size:"__unstable-large"})}),T&&(0,re.jsx)(fs.__experimentalToolsPanelItem,{className:"single-column",label:(0,C.__)("Line height"),hasValue:()=>void 0!==t?.typography?.lineHeight,onDeselect:()=>P(void 0),isShownByDefault:s.lineHeight,panelId:i,children:(0,re.jsx)(eh,{__unstableInputWidth:"auto",value:M,onChange:P,size:"__unstable-large"})}),R&&(0,re.jsx)(fs.__experimentalToolsPanelItem,{className:"single-column",label:(0,C.__)("Letter spacing"),hasValue:()=>!!t?.typography?.letterSpacing,onDeselect:()=>L(void 0),isShownByDefault:s.letterSpacing,panelId:i,children:(0,re.jsx)(th,{value:N,onChange:L,size:"__unstable-large",__unstableInputWidth:"auto"})}),A&&(0,re.jsx)(fs.__experimentalToolsPanelItem,{className:"single-column",label:(0,C.__)("Columns"),hasValue:()=>!!t?.typography?.textColumns,onDeselect:()=>D(void 0),isShownByDefault:s.textColumns,panelId:i,children:(0,re.jsx)(fs.__experimentalNumberControl,{label:(0,C.__)("Columns"),max:Sh,min:yh,onChange:D,size:"__unstable-large",spinControls:"custom",value:O,initialPosition:1})}),H&&(0,re.jsx)(fs.__experimentalToolsPanelItem,{className:"single-column",label:(0,C.__)("Decoration"),hasValue:()=>!!t?.typography?.textDecoration,onDeselect:()=>$(void 0),isShownByDefault:s.textDecoration,panelId:i,children:(0,re.jsx)(bh,{value:G,onChange:$,size:"__unstable-large",__unstableInputWidth:"auto"})}),U&&(0,re.jsx)(fs.__experimentalToolsPanelItem,{className:"single-column",label:(0,C.__)("Orientation"),hasValue:()=>!!t?.typography?.writingMode,onDeselect:()=>K(void 0),isShownByDefault:s.writingMode,panelId:i,children:(0,re.jsx)(xh,{value:W,onChange:K,size:"__unstable-large",__nextHasNoMarginBottom:!0})}),z&&(0,re.jsx)(fs.__experimentalToolsPanelItem,{label:(0,C.__)("Letter case"),hasValue:()=>!!t?.typography?.textTransform,onDeselect:()=>F(void 0),isShownByDefault:s.textTransform,panelId:i,children:(0,re.jsx)(hh,{value:V,onChange:F,showNone:!0,isBlock:!0,size:"__unstable-large",__nextHasNoMarginBottom:!0})}),Z&&(0,re.jsx)(fs.__experimentalToolsPanelItem,{label:(0,C.__)("Text alignment"),hasValue:()=>!!t?.typography?.textAlign,onDeselect:()=>Y(void 0),isShownByDefault:s.textAlign,panelId:i,children:(0,re.jsx)(ah,{value:q,onChange:Y,size:"__unstable-large",__nextHasNoMarginBottom:!0})})]})}const Dh=window.wp.tokenList;var zh=n.n(Dh);const Vh="typography.fontFamily",{kebabCase:Fh}=O(fs.privateApis);function Hh(e,t,n){if(!(0,l.hasBlockSupport)(t,Vh))return e;if(us(t,ug,"fontFamily"))return e;if(!n?.fontFamily)return e;const o=new(zh())(e.className);o.add(`has-${Fh(n?.fontFamily)}-font-family`);const r=o.value;return e.className=r||void 0,e}const Gh={useBlockProps:function({name:e,fontFamily:t}){return Hh({},e,{fontFamily:t})},addSaveProps:Hh,attributeKeys:["fontFamily"],hasSupport:e=>(0,l.hasBlockSupport)(e,Vh)};(0,d.addFilter)("blocks.registerBlockType","core/fontFamily/addAttribute",(function(e){return(0,l.hasBlockSupport)(e,Vh)?(e.attributes.fontFamily||Object.assign(e.attributes,{fontFamily:{type:"string"}}),e):e}));const{kebabCase:$h}=O(fs.privateApis),Uh=(e,t,n)=>{if(t){const n=e?.find((({slug:e})=>e===t));if(n)return n}return{size:n}};function Wh(e,t){const n=e?.find((({size:e})=>e===t));return n||{size:t}}function Kh(e){if(e)return`has-${$h(e)}-font-size`}const Zh="typography.fontSize";function qh(e,t,n){if(!(0,l.hasBlockSupport)(t,Zh))return e;if(us(t,ug,"fontSize"))return e;const o=new(zh())(e.className);o.add(Kh(n.fontSize));const r=o.value;return e.className=r||void 0,e}const Yh={useBlockProps:function({name:e,fontSize:t,style:n}){const[o,r,i]=yi("typography.fontSizes","typography.fluid","layout");if(!(0,l.hasBlockSupport)(e,Zh)||us(e,ug,"fontSize")||!t&&!n?.typography?.fontSize)return;let s;return n?.typography?.fontSize&&(s={style:{fontSize:Di({size:n.typography.fontSize},{typography:{fluid:r},layout:i})}}),t&&(s={style:{fontSize:Uh(o,t,n?.typography?.fontSize).size}}),s?qh(s,e,{fontSize:t}):void 0},addSaveProps:qh,attributeKeys:["fontSize","style"],hasSupport:e=>(0,l.hasBlockSupport)(e,Zh)},Xh={fontSize:[["fontSize"],["style","typography","fontSize"]]};(0,d.addFilter)("blocks.registerBlockType","core/font/addAttribute",(function(e){return(0,l.hasBlockSupport)(e,Zh)?(e.attributes.fontSize||Object.assign(e.attributes,{fontSize:{type:"string"}}),e):e})),(0,d.addFilter)("blocks.switchToBlockType.transformedBlock","core/font-size/addTransforms",(function(e,t,n,o){const r=e.name;return cs({fontSize:(0,l.hasBlockSupport)(r,Zh)},Xh,e,t,n,o)}));const Qh=[{icon:nh,title:(0,C.__)("Align text left"),align:"left"},{icon:oh,title:(0,C.__)("Align text center"),align:"center"},{icon:rh,title:(0,C.__)("Align text right"),align:"right"}],Jh={placement:"bottom-start"},eg=function({value:e,onChange:t,alignmentControls:n=Qh,label:o=(0,C.__)("Align text"),description:r=(0,C.__)("Change text alignment"),isCollapsed:i=!0,isToolbar:s}){function l(n){return()=>t(e===n?void 0:n)}const a=n.find((t=>t.align===e)),c=s?fs.ToolbarGroup:fs.ToolbarDropdownMenu,u=s?{isCollapsed:i}:{toggleProps:{description:r},popoverProps:Jh};return(0,re.jsx)(c,{icon:a?a.icon:(0,C.isRTL)()?rh:nh,label:o,controls:n.map((t=>{const{align:n}=t,o=e===n;return{...t,isActive:o,role:i?"menuitemradio":void 0,onClick:l(n)}})),...u})},tg=e=>(0,re.jsx)(eg,{...e,isToolbar:!1}),ng=e=>(0,re.jsx)(eg,{...e,isToolbar:!0}),og="typography.textAlign",rg=[{icon:nh,title:(0,C.__)("Align text left"),align:"left"},{icon:oh,title:(0,C.__)("Align text center"),align:"center"},{icon:rh,title:(0,C.__)("Align text right"),align:"right"}],ig=["left","center","right"],sg=[];function lg(e){return Array.isArray(e)?ig.filter((t=>e.includes(t))):!0===e?ig:sg}const ag={edit:function({style:e,name:t,setAttributes:n}){const o=gs(t),r=o?.typography?.textAlign,i=na();if(!r||"default"!==i)return null;const s=lg((0,l.getBlockSupport)(t,og));if(!s.length)return null;const a=rg.filter((e=>s.includes(e.align)));return(0,re.jsx)(Ss,{group:"block",children:(0,re.jsx)(tg,{value:e?.typography?.textAlign,onChange:t=>{const o={...e,typography:{...e?.typography,textAlign:t}};n({style:as(o)})},alignmentControls:a})})},useBlockProps:function({name:e,style:t}){if(!t?.typography?.textAlign)return null;if(!lg((0,l.getBlockSupport)(e,og)).length)return null;if(us(e,ug,"textAlign"))return null;const n=t.typography.textAlign;return{className:ls({[`has-text-align-${n}`]:n})}},addSaveProps:function(e,t,n){if(!n?.style?.typography?.textAlign)return e;const{textAlign:o}=n.style.typography;return lg((0,l.getBlockSupport)(t,og)).includes(o)&&!us(t,ug,"textAlign")&&(e.className=ls(`has-text-align-${o}`,e.className)),e},attributeKeys:["style"],hasSupport:e=>(0,l.hasBlockSupport)(e,og,!1)};function cg(e,t){return Object.fromEntries(Object.entries(e).filter((([e])=>!t.includes(e))))}const ug="typography",dg=["typography.lineHeight",Zh,"typography.fontStyle","typography.fontWeight",Vh,og,"typography.textColumns","typography.textDecoration","typography.__experimentalWritingMode","typography.textTransform","typography.letterSpacing"];function pg(e){const t={...cg(e,["fontFamily"])},n=e?.typography?.fontSize,o=e?.typography?.fontFamily,r=n?.startsWith("var:preset|font-size|")?n.substring(21):void 0,i=o?.startsWith("var:preset|font-family|")?o.substring(23):void 0;return t.typography={...cg(t.typography,["fontFamily"]),fontSize:r?void 0:n},{style:as(t),fontFamily:i,fontSize:r}}function hg(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 gg({children:e,resetAllFilter:t}){const n=(0,a.useCallback)((e=>{const n=hg(e),o=t(n);return{...e,...pg(o)}}),[t]);return(0,re.jsx)(ja,{group:"typography",resetAllFilter:n,children:e})}function mg({clientId:e,name:t,setAttributes:n,settings:o}){const{style:r,fontFamily:i,fontSize:s}=(0,c.useSelect)((function(t){const{style:n,fontFamily:o,fontSize:r}=t(_i).getBlockAttributes(e)||{};return{style:n,fontFamily:o,fontSize:r}}),[e]),u=wh(o),d=(0,a.useMemo)((()=>hg({style:r,fontFamily:i,fontSize:s})),[r,s,i]);if(!u)return null;const p=(0,l.getBlockSupport)(t,[ug,"defaultControls"]);return(0,re.jsx)(Oh,{as:gg,panelId:e,settings:o,value:d,onChange:e=>{n(pg(e))},defaultControls:p})}const fg=(0,re.jsxs)(oe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,re.jsx)(oe.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,re.jsx)(oe.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"})]}),bg={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 kg({icon:e,isMixed:t=!1,minimumCustomValue:n,onChange:o,onMouseOut:r,onMouseOver:i,showSideInLabel:s=!0,side:l,spacingSizes:d,type:p,value:h}){var g,m;h=Ys(h,d);let f=d;const b=d.length<=Hs,k=(0,c.useSelect)((e=>{const t=e(_i).getSettings();return t?.disableCustomSpacingSizes})),[v,_]=(0,a.useState)(!k&&void 0!==h&&!Zs(h)),[x,y]=(0,a.useState)(n),S=(0,u.usePrevious)(h);h&&S!==h&&!Zs(h)&&!0!==v&&_(!0);const[w]=yi("spacing.units"),B=(0,fs.__experimentalUseCustomUnits)({availableUnits:w||["px","em","rem"]});let I=null;b||v||void 0===h||!(!Zs(h)||Zs(h)&&t)?t||(I=v?qs(h,d):function(e,t){if(void 0===e)return 0;const n=0===parseFloat(e,10)?"0":Qs(e),o=t.findIndex((e=>String(e.slug)===n));return-1!==o?o:NaN}(h,d)):(f=[...d,{name:t?(0,C.__)("Mixed"): -// translators: %s: A custom measurement, e.g. a number followed by a unit like 12px. -// translators: %s: A custom measurement, e.g. a number followed by a unit like 12px. -(0,C.sprintf)((0,C.__)("Custom (%s)"),h),slug:"custom",size:h}],I=f.length-1);const j=(0,a.useMemo)((()=>(0,fs.__experimentalParseQuantityAndUnitFromRawValue)(I)),[I])[1]||B[0]?.value,E=parseFloat(I,10),T=(e,t)=>{const n=parseInt(e,10);if("selectList"===t){if(0===n)return;if(1===n)return"0"}else if(0===n)return"0";return`var:preset|spacing|${d[e]?.slug}`},M=t?(0,C.__)("Mixed"):null,P=f.map(((e,t)=>({key:t,name:e.name}))),R=d.slice(1,d.length-1).map(((e,t)=>({value:t+1,label:void 0}))),N=Gs.includes(l)&&s?Ws[l]:"",L=s?p?.toLowerCase():p,A=(0,C.sprintf)( -// translators: 1: The side of the block being modified (top, bottom, left etc.). 2. Type of spacing being modified (padding, margin, etc). -// translators: 1: The side of the block being modified (top, bottom, left etc.). 2. Type of spacing being modified (padding, margin, etc). -(0,C._x)("%1$s %2$s","spacing"),N,L).trim();return(0,re.jsxs)(fs.__experimentalHStack,{className:"spacing-sizes-control__wrapper",children:[e&&(0,re.jsx)(fs.Icon,{className:"spacing-sizes-control__icon",icon:e,size:24}),v&&(0,re.jsxs)(re.Fragment,{children:[(0,re.jsx)(fs.__experimentalUnitControl,{onMouseOver:i,onMouseOut:r,onFocus:i,onBlur:r,onChange:e=>o((e=>isNaN(parseFloat(e))?void 0:e)(e)),value:I,units:B,min:x,placeholder:M,disableUnits:t,label:A,hideLabelFromVision:!0,className:"spacing-sizes-control__custom-value-input",size:"__unstable-large",onDragStart:()=>{"-"===h?.charAt(0)&&y(0)},onDrag:()=>{"-"===h?.charAt(0)&&y(0)},onDragEnd:()=>{y(n)}}),(0,re.jsx)(fs.RangeControl,{__next40pxDefaultSize:!0,onMouseOver:i,onMouseOut:r,onFocus:i,onBlur:r,value:E,min:0,max:null!==(g=bg[j]?.max)&&void 0!==g?g:10,step:null!==(m=bg[j]?.steps)&&void 0!==m?m:.1,withInputField:!1,onChange:e=>{o([e,j].join(""))},className:"spacing-sizes-control__custom-value-range",__nextHasNoMarginBottom:!0,label:A,hideLabelFromVision:!0})]}),b&&!v&&(0,re.jsx)(fs.RangeControl,{__next40pxDefaultSize:!0,onMouseOver:i,onMouseOut:r,className:"spacing-sizes-control__range-control",value:I,onChange:e=>o(T(e)),onMouseDown:e=>{e?.nativeEvent?.offsetX<35&&void 0===h&&o("0")},withInputField:!1,"aria-valuenow":I,"aria-valuetext":d[I]?.name,renderTooltipContent:e=>void 0===h?void 0:d[e]?.name,min:0,max:d.length-1,marks:R,label:A,hideLabelFromVision:!0,__nextHasNoMarginBottom:!0,onFocus:i,onBlur:r}),!b&&!v&&(0,re.jsx)(fs.CustomSelectControl,{className:"spacing-sizes-control__custom-select-control",value:P.find((e=>e.key===I))||"",onChange:e=>{o(T(e.selectedItem.key,"selectList"))},options:P,label:A,hideLabelFromVision:!0,size:"__unstable-large",onMouseOver:i,onMouseOut:r,onFocus:i,onBlur:r}),!k&&(0,re.jsx)(fs.Button,{label:v?(0,C.__)("Use size preset"):(0,C.__)("Set custom size"),icon:fg,onClick:()=>{_(!v)},isPressed:v,size:"small",className:"spacing-sizes-control__custom-toggle",iconSize:24})]})}const vg=["vertical","horizontal"];function _g({minimumCustomValue:e,onChange:t,onMouseOut:n,onMouseOver:o,sides:r,spacingSizes:i,type:s,values:l}){const a=e=>n=>{if(!t)return;const o={...Object.keys(l).reduce(((e,t)=>(e[t]=Ys(l[t],i),e)),{})};"vertical"===e&&(o.top=n,o.bottom=n),"horizontal"===e&&(o.left=n,o.right=n),t(o)},c=r?.length?vg.filter((e=>Js(r,e))):vg;return(0,re.jsx)(re.Fragment,{children:c.map((t=>{const r="vertical"===t?l.top:l.left;return(0,re.jsx)(kg,{icon:Us[t],label:Ws[t],minimumCustomValue:e,onChange:a(t),onMouseOut:n,onMouseOver:o,side:t,spacingSizes:i,type:s,value:r,withInputField:!1},`spacing-sizes-control-${t}`)}))})}function xg({minimumCustomValue:e,onChange:t,onMouseOut:n,onMouseOver:o,sides:r,spacingSizes:i,type:s,values:l}){const a=r?.length?Gs.filter((e=>r.includes(e))):Gs,c=e=>n=>{const o={...Object.keys(l).reduce(((e,t)=>(e[t]=Ys(l[t],i),e)),{})};o[e]=n,t(o)};return(0,re.jsx)(re.Fragment,{children:a.map((t=>(0,re.jsx)(kg,{icon:Us[t],label:Ws[t],minimumCustomValue:e,onChange:c(t),onMouseOut:n,onMouseOver:o,side:t,spacingSizes:i,type:s,value:l[t],withInputField:!1},`spacing-sizes-control-${t}`)))})}function yg({minimumCustomValue:e,onChange:t,onMouseOut:n,onMouseOver:o,showSideInLabel:r,side:i,spacingSizes:s,type:l,values:a}){return(0,re.jsx)(kg,{label:Ws[i],minimumCustomValue:e,onChange:(c=i,e=>{const n={...Object.keys(a).reduce(((e,t)=>(e[t]=Ys(a[t],s),e)),{})};n[c]=e,t(n)}),onMouseOut:n,onMouseOver:o,showSideInLabel:r,side:i,spacingSizes:s,type:l,value:a[i],withInputField:!1});var c}function Sg({isLinked:e,...t}){const n=e?(0,C.__)("Unlink sides"):(0,C.__)("Link sides");return(0,re.jsx)(fs.Tooltip,{text:n,children:(0,re.jsx)(fs.Button,{...t,size:"small",icon:e?kd:Mc,iconSize:24,"aria-label":n})})}const wg=[],Cg=new Intl.Collator("und",{numeric:!0}).compare;function Bg(){const[e,t,n,o]=yi("spacing.spacingSizes.custom","spacing.spacingSizes.theme","spacing.spacingSizes.default","spacing.defaultSpacingSizes"),r=null!=e?e:wg,i=null!=t?t:wg,s=n&&!1!==o?n:wg;return(0,a.useMemo)((()=>{const e=[{name:(0,C.__)("None"),slug:"0",size:0},...r,...i,...s];return e.every((({slug:e})=>/^[0-9]/.test(e)))&&e.sort(((e,t)=>Cg(e.slug,t.slug))),e.length>Hs?[{name:(0,C.__)("Default"),slug:"default",size:void 0},...e]:e}),[r,i,s])}function Ig({inputProps:e,label:t,minimumCustomValue:n=0,onChange:o,onMouseOut:r,onMouseOver:i,showSideInLabel:s=!0,sides:l=Gs,useSelect:c,values:u}){const d=Bg(),p=u||$s,h=1===l?.length,g=l?.includes("horizontal")&&l?.includes("vertical")&&2===l?.length,[m,f]=(0,a.useState)(function(e={},t){const{top:n,right:o,bottom:r,left:i}=e,s=[n,o,r,i].filter(Boolean),l=!(n!==r||i!==o||!n&&!i),a=!s.length&&function(e=[]){const t={top:0,right:0,bottom:0,left:0};return e.forEach((e=>t[e]+=1)),(t.top+t.bottom)%2==0&&(t.left+t.right)%2==0}(t),c=t?.includes("horizontal")&&t?.includes("vertical")&&2===t?.length;if(Js(t)&&(l||a))return Ks.axial;if(c&&1===s.length){let t;return Object.entries(e).some((([e,n])=>(t=e,void 0!==n))),t}return 1!==t?.length||s.length?Ks.custom:t[0]}(p,l)),b={...e,minimumCustomValue:n,onChange:e=>{const t={...u,...e};o(t)},onMouseOut:r,onMouseOver:i,sides:l,spacingSizes:d,type:t,useSelect:c,values:p},k=Gs.includes(m)&&s?Ws[m]:"",v=(0,C.sprintf)( -// translators: 1: The side of the block being modified (top, bottom, left etc.). 2. Type of spacing being modified (padding, margin, etc). -// translators: 1: The side of the block being modified (top, bottom, left etc.). 2. Type of spacing being modified (padding, margin, etc). -(0,C._x)("%1$s %2$s","spacing"),t,k).trim();return(0,re.jsxs)("fieldset",{className:"spacing-sizes-control",children:[(0,re.jsxs)(fs.__experimentalHStack,{className:"spacing-sizes-control__header",children:[(0,re.jsx)(fs.BaseControl.VisualLabel,{as:"legend",className:"spacing-sizes-control__label",children:v}),!h&&!g&&(0,re.jsx)(Sg,{label:t,onClick:()=>{f(m===Ks.axial?Ks.custom:Ks.axial)},isLinked:m===Ks.axial})]}),(0,re.jsx)(fs.__experimentalVStack,{spacing:.5,children:m===Ks.axial?(0,re.jsx)(_g,{...b}):m===Ks.custom?(0,re.jsx)(xg,{...b}):(0,re.jsx)(yg,{side:m,...b,showSideInLabel:s})})]})}const jg={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 Eg({label:e=(0,C.__)("Height"),onChange:t,value:n}){var o,r;const i=parseFloat(n),[s]=yi("spacing.units"),l=(0,fs.__experimentalUseCustomUnits)({availableUnits:s||["%","px","em","rem","vh","vw"]}),c=(0,a.useMemo)((()=>(0,fs.__experimentalParseQuantityAndUnitFromRawValue)(n)),[n])[1]||l[0]?.value||"px";return(0,re.jsxs)("fieldset",{className:"block-editor-height-control",children:[(0,re.jsx)(fs.BaseControl.VisualLabel,{as:"legend",children:e}),(0,re.jsxs)(fs.Flex,{children:[(0,re.jsx)(fs.FlexItem,{isBlock:!0,children:(0,re.jsx)(fs.__experimentalUnitControl,{value:n,units:l,onChange:t,onUnitChange:e=>{const[o,r]=(0,fs.__experimentalParseQuantityAndUnitFromRawValue)(n);["em","rem"].includes(e)&&"px"===r?t((o/16).toFixed(2)+e):["em","rem"].includes(r)&&"px"===e?t(Math.round(16*o)+e):["%","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(e)&&o>100&&t(100+e)},min:0,size:"__unstable-large",label:e,hideLabelFromVision:!0})}),(0,re.jsx)(fs.FlexItem,{isBlock:!0,children:(0,re.jsx)(fs.__experimentalSpacer,{marginX:2,marginBottom:0,children:(0,re.jsx)(fs.RangeControl,{__next40pxDefaultSize:!0,value:i,min:0,max:null!==(o=jg[c]?.max)&&void 0!==o?o:100,step:null!==(r=jg[c]?.step)&&void 0!==r?r:.1,withInputField:!1,onChange:e=>{t([e,c].join(""))},__nextHasNoMarginBottom:!0,label:e,hideLabelFromVision:!0})})})]})]})}function Tg(e,t){const{getBlockOrder:n,getBlockAttributes:o}=(0,c.useSelect)(_i);return(r,i)=>{const s=(i-1)*t+r-1;let l=0;for(const r of n(e)){var a;const{columnStart:e,rowStart:n}=null!==(a=o(r).style?.layout)&&void 0!==a?a:{};(n-1)*t+e-1{"fixed"!==i||s||t({...e,selfStretch:"fit"})}),[]),(0,re.jsxs)(fs.__experimentalVStack,{as:fs.__experimentalToolsPanelItem,spacing:2,hasValue:()=>!!i,label:c,onDeselect:()=>{t({selfStretch:void 0,flexSize:void 0})},isShownByDefault:o,panelId:r,children:[(0,re.jsxs)(fs.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,size:"__unstable-large",label:Ng(n),value:i||"fit",help:Mg(i,n),onChange:e=>{t({selfStretch:e,flexSize:"fixed"!==e?null:s})},isBlock:!0,children:[(0,re.jsx)(fs.__experimentalToggleGroupControlOption,{value:"fit",label:(0,C._x)("Fit","Intrinsic block width in flex layout")},"fit"),(0,re.jsx)(fs.__experimentalToggleGroupControlOption,{value:"fill",label:(0,C._x)("Grow","Block with expanding width in flex layout")},"fill"),(0,re.jsx)(fs.__experimentalToggleGroupControlOption,{value:"fixed",label:(0,C._x)("Fixed","Block with fixed width in flex layout")},"fixed")]}),"fixed"===i&&(0,re.jsx)(fs.__experimentalUnitControl,{size:"__unstable-large",onChange:e=>{t({selfStretch:i,flexSize:e})},value:s,label:c,hideLabelFromVision:!0})]})}function Ng(e){const{orientation:t="horizontal"}=e;return"horizontal"===t?(0,C.__)("Width"):(0,C.__)("Height")}function Lg({childLayout:e,onChange:t,parentLayout:n,isShownByDefault:o,panelId:r}){const{columnStart:i,rowStart:s,columnSpan:l,rowSpan:a}=e,{columnCount:u=3,rowCount:d}=null!=n?n:{},p=(0,c.useSelect)((e=>e(_i).getBlockRootClientId(r))),{moveBlocksToPosition:h,__unstableMarkNextChangeAsNotPersistent:g}=(0,c.useDispatch)(_i),m=Tg(p,u);return(0,re.jsxs)(re.Fragment,{children:[(0,re.jsxs)(fs.__experimentalHStack,{as:fs.__experimentalToolsPanelItem,hasValue:()=>!!l||!!a,label:(0,C.__)("Grid span"),onDeselect:()=>{t({columnSpan:void 0,rowSpan:void 0})},isShownByDefault:o,panelId:r,children:[(0,re.jsx)(fs.__experimentalInputControl,{size:"__unstable-large",label:(0,C.__)("Column span"),type:"number",onChange:e=>{const n=""===e?1:parseInt(e,10);t({columnStart:i,rowStart:s,rowSpan:a,columnSpan:n})},value:null!=l?l:1,min:1}),(0,re.jsx)(fs.__experimentalInputControl,{size:"__unstable-large",label:(0,C.__)("Row span"),type:"number",onChange:e=>{const n=""===e?1:parseInt(e,10);t({columnStart:i,rowStart:s,columnSpan:l,rowSpan:n})},value:null!=a?a:1,min:1})]}),window.__experimentalEnableGridInteractivity&&u&&(0,re.jsxs)(fs.Flex,{as:fs.__experimentalToolsPanelItem,hasValue:()=>!!i||!!s,label:(0,C.__)("Grid placement"),onDeselect:()=>{t({columnStart:void 0,rowStart:void 0})},isShownByDefault:!1,panelId:r,children:[(0,re.jsx)(fs.FlexItem,{style:{width:"50%"},children:(0,re.jsx)(fs.__experimentalInputControl,{size:"__unstable-large",label:(0,C.__)("Column"),type:"number",onChange:e=>{const n=""===e?1:parseInt(e,10);t({columnStart:n,rowStart:s,columnSpan:l,rowSpan:a}),g(),h([r],p,p,m(n,s))},value:null!=i?i:1,min:1,max:u?u-(null!=l?l:1)+1:void 0})}),(0,re.jsx)(fs.FlexItem,{style:{width:"50%"},children:(0,re.jsx)(fs.__experimentalInputControl,{size:"__unstable-large",label:(0,C.__)("Row"),type:"number",onChange:e=>{const n=""===e?1:parseInt(e,10);t({columnStart:i,rowStart:n,columnSpan:l,rowSpan:a}),g(),h([r],p,p,m(i,n))},value:null!=s?s:1,min:1,max:d?d-(null!=a?a:1)+1:void 0})})]})]})}function Ag({panelId:e,value:t,onChange:n=()=>{},options:o,defaultValue:r="auto",hasValue:i,isShownByDefault:s=!0}){const l=null!=t?t:"auto",[a,c,u]=yi("dimensions.aspectRatios.default","dimensions.aspectRatios.theme","dimensions.defaultAspectRatios"),d=c?.map((({name:e,ratio:t})=>({label:e,value:t}))),p=a?.map((({name:e,ratio:t})=>({label:e,value:t}))),h=[{label:(0,C._x)("Original","Aspect ratio option for dimensions control"),value:"auto"},...u?p:[],...d||[],{label:(0,C._x)("Custom","Aspect ratio option for dimensions control"),value:"custom",disabled:!0,hidden:!0}];return(0,re.jsx)(fs.__experimentalToolsPanelItem,{hasValue:i||(()=>l!==r),label:(0,C.__)("Aspect ratio"),onDeselect:()=>n(void 0),isShownByDefault:s,panelId:e,children:(0,re.jsx)(fs.SelectControl,{label:(0,C.__)("Aspect ratio"),value:l,options:null!=o?o:h,onChange:n,size:"__unstable-large",__nextHasNoMarginBottom:!0})})}const Og=["horizontal","vertical"];function Dg(e){const t=zg(e),n=Vg(e),o=Fg(e),r=Hg(e),i=Gg(e),s=$g(e),l=Ug(e),c=Wg(e);return"web"===a.Platform.OS&&(t||n||o||r||i||s||l||c)}function zg(e){return e?.layout?.contentSize}function Vg(e){return e?.layout?.wideSize}function Fg(e){return e?.spacing?.padding}function Hg(e){return e?.spacing?.margin}function Gg(e){return e?.spacing?.blockGap}function $g(e){return e?.dimensions?.minHeight}function Ug(e){return e?.dimensions?.aspectRatio}function Wg(e){var t;const{type:n="default",default:{type:o="default"}={},allowSizingOnChildren:r=!1}=null!==(t=e?.parentLayout)&&void 0!==t?t:{},i=("flex"===o||"flex"===n||"grid"===o||"grid"===n)&&r;return!!e?.layout&&i}function Kg(e,t){if(!t||!e)return e;const n={};return t.forEach((t=>{"vertical"===t&&(n.top=e.top,n.bottom=e.bottom),"horizontal"===t&&(n.left=e.left,n.right=e.right),n[t]=e?.[t]})),n}function Zg(e){return e&&"string"==typeof e?{top:e,right:e,bottom:e,left:e}:e}function qg({resetAllFilter:e,onChange:t,value:n,panelId:o,children:r}){const i=Ui();return(0,re.jsx)(fs.__experimentalToolsPanel,{label:(0,C.__)("Dimensions"),resetAll:()=>{const o=e(n);t(o)},panelId:o,dropdownMenuProps:i,children:r})}const Yg={contentSize:!0,wideSize:!0,padding:!0,margin:!0,blockGap:!0,minHeight:!0,aspectRatio:!0,childLayout:!0};function Xg({as:e=qg,value:t,onChange:n,inheritedValue:o=t,settings:r,panelId:i,defaultControls:s=Yg,onVisualize:l=()=>{},includeLayoutControls:c=!1}){var u,d,p,h,g,m,f,b;const{dimensions:k,spacing:v}=r,_=e=>e&&"object"==typeof e?Object.keys(e).reduce(((t,n)=>(t[n]=Ki({settings:{dimensions:k,spacing:v}},"",e[n]),t)),{}):Ki({settings:{dimensions:k,spacing:v}},"",e),x=function(e){const{defaultSpacingSizes:t,spacingSizes:n}=e?.spacing||{};return!1!==t&&n?.default?.length>0||n?.theme?.length>0||n?.custom?.length>0}(r),y=(0,fs.__experimentalUseCustomUnits)({availableUnits:r?.spacing?.units||["%","px","em","rem","vw"]}),S=-1/0,[w,B]=(0,a.useState)(S),I=zg(r)&&c,j=_(o?.layout?.contentSize),E=e=>{n(fe(t,["layout","contentSize"],e||void 0))},T=Vg(r)&&c,M=_(o?.layout?.wideSize),P=e=>{n(fe(t,["layout","wideSize"],e||void 0))},R=Fg(r),N=Zg(_(o?.spacing?.padding)),L=Array.isArray(r?.spacing?.padding)?r?.spacing?.padding:r?.spacing?.padding?.sides,A=L&&L.some((e=>Og.includes(e))),O=e=>{const o=Kg(e,L);n(fe(t,["spacing","padding"],o))},D=()=>l("padding"),z=Hg(r),V=Zg(_(o?.spacing?.margin)),F=Array.isArray(r?.spacing?.margin)?r?.spacing?.margin:r?.spacing?.margin?.sides,H=F&&F.some((e=>Og.includes(e))),G=e=>{const o=Kg(e,F);n(fe(t,["spacing","margin"],o))},$=()=>l("margin"),U=Gg(r),W=Array.isArray(r?.spacing?.blockGap)?r?.spacing?.blockGap:r?.spacing?.blockGap?.sides,K=W&&W.some((e=>Og.includes(e))),Z=_(o?.spacing?.blockGap),q=function(e,t){return e?"string"==typeof e?t?{top:e,right:e,bottom:e,left:e}:{top:e}:{...e,right:e?.left,bottom:e?.top}:e}(Z,K),Y=e=>{n(fe(t,["spacing","blockGap"],e))},X=e=>{e||Y(null),!K&&e?.hasOwnProperty("top")?Y(e.top):Y({top:e?.top,left:e?.left})},Q=$g(r),J=_(o?.dimensions?.minHeight),ee=e=>{const o=fe(t,["dimensions","minHeight"],e);n(fe(o,["dimensions","aspectRatio"],void 0))},te=Ug(r),ne=_(o?.dimensions?.aspectRatio),oe=Wg(r),ie=o?.layout,se=(0,a.useCallback)((e=>({...e,layout:as({...e?.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:{...e?.spacing,padding:void 0,margin:void 0,blockGap:void 0},dimensions:{...e?.dimensions,minHeight:void 0,aspectRatio:void 0}})),[]),le=()=>l(!1);return(0,re.jsxs)(e,{resetAllFilter:se,value:t,onChange:n,panelId:i,children:[(I||T)&&(0,re.jsx)("span",{className:"span-columns",children:(0,C.__)("Set the width of the main content area.")}),I&&(0,re.jsx)(fs.__experimentalToolsPanelItem,{label:(0,C.__)("Content width"),hasValue:()=>!!t?.layout?.contentSize,onDeselect:()=>E(void 0),isShownByDefault:null!==(u=s.contentSize)&&void 0!==u?u:Yg.contentSize,panelId:i,children:(0,re.jsx)(fs.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,C.__)("Content width"),labelPosition:"top",value:j||"",onChange:e=>{E(e)},units:y,prefix:(0,re.jsx)(fs.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,re.jsx)(Bl,{icon:Il})})})}),T&&(0,re.jsx)(fs.__experimentalToolsPanelItem,{label:(0,C.__)("Wide width"),hasValue:()=>!!t?.layout?.wideSize,onDeselect:()=>P(void 0),isShownByDefault:null!==(d=s.wideSize)&&void 0!==d?d:Yg.wideSize,panelId:i,children:(0,re.jsx)(fs.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,C.__)("Wide width"),labelPosition:"top",value:M||"",onChange:e=>{P(e)},units:y,prefix:(0,re.jsx)(fs.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,re.jsx)(Bl,{icon:jl})})})}),R&&(0,re.jsxs)(fs.__experimentalToolsPanelItem,{hasValue:()=>!!t?.spacing?.padding&&Object.keys(t?.spacing?.padding).length,label:(0,C.__)("Padding"),onDeselect:()=>O(void 0),isShownByDefault:null!==(p=s.padding)&&void 0!==p?p:Yg.padding,className:ls({"tools-panel-item-spacing":x}),panelId:i,children:[!x&&(0,re.jsx)(fs.BoxControl,{__next40pxDefaultSize:!0,values:N,onChange:O,label:(0,C.__)("Padding"),sides:L,units:y,allowReset:!1,splitOnAxis:A,inputProps:{onMouseOver:D,onMouseOut:le}}),x&&(0,re.jsx)(Ig,{values:N,onChange:O,label:(0,C.__)("Padding"),sides:L,units:y,allowReset:!1,onMouseOver:D,onMouseOut:le})]}),z&&(0,re.jsxs)(fs.__experimentalToolsPanelItem,{hasValue:()=>!!t?.spacing?.margin&&Object.keys(t?.spacing?.margin).length,label:(0,C.__)("Margin"),onDeselect:()=>G(void 0),isShownByDefault:null!==(h=s.margin)&&void 0!==h?h:Yg.margin,className:ls({"tools-panel-item-spacing":x}),panelId:i,children:[!x&&(0,re.jsx)(fs.BoxControl,{__next40pxDefaultSize:!0,values:V,onChange:G,inputProps:{min:w,onDragStart:()=>{B(0)},onDragEnd:()=>{B(S)},onMouseOver:$,onMouseOut:le},label:(0,C.__)("Margin"),sides:F,units:y,allowReset:!1,splitOnAxis:H}),x&&(0,re.jsx)(Ig,{values:V,onChange:G,minimumCustomValue:-1/0,label:(0,C.__)("Margin"),sides:F,units:y,allowReset:!1,onMouseOver:$,onMouseOut:le})]}),U&&(0,re.jsxs)(fs.__experimentalToolsPanelItem,{hasValue:()=>!!t?.spacing?.blockGap,label:(0,C.__)("Block spacing"),onDeselect:()=>Y(void 0),isShownByDefault:null!==(g=s.blockGap)&&void 0!==g?g:Yg.blockGap,className:ls({"tools-panel-item-spacing":x,"single-column":!x&&!K}),panelId:i,children:[!x&&(K?(0,re.jsx)(fs.BoxControl,{__next40pxDefaultSize:!0,label:(0,C.__)("Block spacing"),min:0,onChange:X,units:y,sides:W,values:q,allowReset:!1,splitOnAxis:K}):(0,re.jsx)(fs.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,C.__)("Block spacing"),min:0,onChange:Y,units:y,value:Z})),x&&(0,re.jsx)(Ig,{label:(0,C.__)("Block spacing"),min:0,onChange:X,showSideInLabel:!1,sides:K?W:["top"],values:q,allowReset:!1})]}),oe&&(0,re.jsx)(Pg,{value:ie,onChange:e=>{n({...t,layout:{...e}})},parentLayout:r?.parentLayout,panelId:i,isShownByDefault:null!==(m=s.childLayout)&&void 0!==m?m:Yg.childLayout}),Q&&(0,re.jsx)(fs.__experimentalToolsPanelItem,{hasValue:()=>!!t?.dimensions?.minHeight,label:(0,C.__)("Minimum height"),onDeselect:()=>{ee(void 0)},isShownByDefault:null!==(f=s.minHeight)&&void 0!==f?f:Yg.minHeight,panelId:i,children:(0,re.jsx)(Eg,{label:(0,C.__)("Minimum height"),value:J,onChange:ee})}),te&&(0,re.jsx)(Ag,{hasValue:()=>!!t?.dimensions?.aspectRatio,value:ne,onChange:e=>{const o=fe(t,["dimensions","aspectRatio"],e);n(fe(o,["dimensions","minHeight"],void 0))},panelId:i,isShownByDefault:null!==(b=s.aspectRatio)&&void 0!==b?b:Yg.aspectRatio})]})}const Qg=function(e){return(0,u.useRefEffect)((t=>{if(!e)return;function n(t){const{deltaX:n,deltaY:o}=t;e.current.scrollBy(n,o)}const o={passive:!0};return t.addEventListener("wheel",n,o),()=>{t.removeEventListener("wheel",n,o)}}),[e])},Jg=".block-editor-block-list__block",em=".block-list-appender",tm=".block-editor-button-block-appender";function nm(e,t){return e.closest(Jg)===t.closest(Jg)}function om(e,t){return t.closest([Jg,em,tm].join(","))===e}function rm(e){for(;e&&e.nodeType!==e.ELEMENT_NODE;)e=e.parentNode;if(!e)return;const t=e.closest(Jg);return t?t.id.slice(6):void 0}function im(e,t){const n=Math.min(e.left,t.left),o=Math.max(e.right,t.right),r=Math.max(e.bottom,t.bottom),i=Math.min(e.top,t.top);return new window.DOMRectReadOnly(n,i,o-n,r-i)}function sm(e){const t=e.ownerDocument.defaultView;if(!t)return!1;if(e.classList.contains("components-visually-hidden"))return!1;const n=e.getBoundingClientRect();if(0===n.width||0===n.height)return!1;if(e.checkVisibility)return e.checkVisibility?.({opacityProperty:!0,contentVisibilityAuto:!0,visibilityProperty:!0});const o=t.getComputedStyle(e);return"none"!==o.display&&"hidden"!==o.visibility&&"0"!==o.opacity}function lm(e){const t=window.getComputedStyle(e);return"auto"===t.overflowX||"scroll"===t.overflowX||"auto"===t.overflowY||"scroll"===t.overflowY}const am=["core/navigation"];function cm(e){const t=e.ownerDocument.defaultView;if(!t)return new window.DOMRectReadOnly;let n=e.getBoundingClientRect();const o=e.getAttribute("data-type");if(o&&am.includes(o)){const t=[e];let o;for(;o=t.pop();)if(!lm(o))for(const e of o.children)sm(e)&&(n=im(n,e.getBoundingClientRect()),t.push(e))}const r=Math.max(n.left,0),i=Math.min(n.right,t.innerWidth);return n=new window.DOMRectReadOnly(r,n.top,i-r,n.height),n}const um=Number.MAX_SAFE_INTEGER,dm=(0,a.forwardRef)((function({clientId:e,bottomClientId:t,children:n,__unstablePopoverSlot:o,__unstableContentRef:r,shift:i=!0,...s},l){const c=Lp(e),d=Lp(null!=t?t:e),p=(0,u.useMergeRefs)([l,Qg(r)]),[h,g]=(0,a.useReducer)((e=>(e+1)%um),0);(0,a.useLayoutEffect)((()=>{if(!c)return;const e=new window.MutationObserver(g);return e.observe(c,{attributes:!0}),()=>{e.disconnect()}}),[c]);const m=(0,a.useMemo)((()=>{if(!(h<0||!c||t&&!d))return{getBoundingClientRect:()=>d?im(cm(c),cm(d)):cm(c),contextElement:c}}),[h,c,t,d]);return!c||t&&!d?null:(0,re.jsx)(fs.Popover,{ref:p,animate:!1,focusOnMount:!1,anchor:m,__unstableSlotName:o,inline:!o,placement:"top-start",resize:!1,flip:!1,shift:i,...s,className:ls("block-editor-block-popover",s.className),variant:"unstyled",children:n})})),pm=(0,a.forwardRef)((({clientId:e,bottomClientId:t,children:n,...o},r)=>(0,re.jsx)(dm,{...o,bottomClientId:t,clientId:e,__unstableContentRef:void 0,__unstablePopoverSlot:void 0,ref:r,children:n})));function hm({selectedElement:e,additionalStyles:t={},children:n}){const[o,r]=(0,a.useState)(e.offsetWidth),[i,s]=(0,a.useState)(e.offsetHeight);(0,a.useEffect)((()=>{const t=new window.ResizeObserver((()=>{r(e.offsetWidth),s(e.offsetHeight)}));return t.observe(e,{box:"border-box"}),()=>t.disconnect()}),[e]);const l=(0,a.useMemo)((()=>({position:"absolute",width:o,height:i,...t})),[o,i,t]);return(0,re.jsx)("div",{style:l,children:n})}const gm=(0,a.forwardRef)((function({clientId:e,bottomClientId:t,children:n,shift:o=!1,additionalStyles:r,...i},s){var l;null!==(l=t)&&void 0!==l||(t=e);const a=Lp(e);return(0,re.jsx)(dm,{ref:s,clientId:e,bottomClientId:t,shift:o,...i,children:a&&e===t?(0,re.jsx)(hm,{selectedElement:a,additionalStyles:r,children:n}):n})}));function mm({clientId:e,value:t,computeStyle:n,forceShow:o}){const r=Lp(e),[i,s]=(0,a.useReducer)((()=>n(r)));(0,a.useLayoutEffect)((()=>{r&&window.requestAnimationFrame((()=>window.requestAnimationFrame(s)))}),[r,t]);const l=(0,a.useRef)(t),[c,u]=(0,a.useState)(!1);return(0,a.useEffect)((()=>{if(za()(t,l.current)||o)return;u(!0),l.current=t;const e=setTimeout((()=>{u(!1)}),400);return()=>{u(!1),clearTimeout(e)}}),[t,o]),c||o?(0,re.jsx)(gm,{clientId:e,__unstablePopoverSlot:"block-toolbar",children:(0,re.jsx)("div",{className:"block-editor__spacing-visualizer",style:i})}):null}function fm(e,t){return e.ownerDocument.defaultView.getComputedStyle(e).getPropertyValue(t)}function bm({clientId:e,value:t,forceShow:n}){return(0,re.jsx)(mm,{clientId:e,value:t?.spacing?.margin,computeStyle:e=>{const t=fm(e,"margin-top"),n=fm(e,"margin-right"),o=fm(e,"margin-bottom"),r=fm(e,"margin-left");return{borderTopWidth:t,borderRightWidth:n,borderBottomWidth:o,borderLeftWidth:r,top:t?`-${t}`:0,right:n?`-${n}`:0,bottom:o?`-${o}`:0,left:r?`-${r}`:0}},forceShow:n})}function km({clientId:e,value:t,forceShow:n}){return(0,re.jsx)(mm,{clientId:e,value:t?.spacing?.padding,computeStyle:e=>({borderTopWidth:fm(e,"padding-top"),borderRightWidth:fm(e,"padding-right"),borderBottomWidth:fm(e,"padding-bottom"),borderLeftWidth:fm(e,"padding-left")}),forceShow:n})}const vm="dimensions",_m="spacing";function xm({children:e,resetAllFilter:t}){const n=(0,a.useCallback)((e=>{const n=e.style,o=t(n);return{...e,style:o}}),[t]);return(0,re.jsx)(ja,{group:"dimensions",resetAllFilter:n,children:e})}function ym({clientId:e,name:t,setAttributes:n,settings:o}){const r=Dg(o),i=(0,c.useSelect)((t=>t(_i).getBlockAttributes(e)?.style),[e]),[s,u]=function(){const[e,t]=(0,a.useState)(!1),{hideBlockInterface:n,showBlockInterface:o}=O((0,c.useDispatch)(_i));return(0,a.useEffect)((()=>{e?n():o()}),[e,o,n]),[e,t]}();if(!r)return null;const d={...(0,l.getBlockSupport)(t,[vm,"defaultControls"]),...(0,l.getBlockSupport)(t,[_m,"defaultControls"])};return(0,re.jsxs)(re.Fragment,{children:[(0,re.jsx)(Xg,{as:xm,panelId:e,settings:o,value:i,onChange:e=>{n({style:as(e)})},defaultControls:d,onVisualize:u}),!!o?.spacing?.padding&&(0,re.jsx)(km,{forceShow:"padding"===s,clientId:e,value:i}),!!o?.spacing?.margin&&(0,re.jsx)(bm,{forceShow:"margin"===s,clientId:e,value:i})]})}function Sm(e,t="any"){if("web"!==a.Platform.OS)return!1;const n=(0,l.getBlockSupport)(e,vm);return!(!0!==n&&("any"===t?!n?.aspectRatio&&!n?.minHeight:!n?.[t]))}const wm={useBlockProps:function({name:e,minHeight:t,style:n}){if(!Sm(e,"aspectRatio")||us(e,vm,"aspectRatio"))return{};const o=ls({"has-aspect-ratio":!!n?.dimensions?.aspectRatio}),r={};return n?.dimensions?.aspectRatio?r.minHeight="unset":(t||n?.dimensions?.minHeight)&&(r.aspectRatio="unset"),{className:o,style:r}},attributeKeys:["minHeight","style"],hasSupport:e=>Sm(e,"aspectRatio")};function Cm(){y()("wp.blockEditor.__experimentalUseCustomSides",{since:"6.3",version:"6.4"})}const Bm=[...dg,Hd,Dp,vm,hu,_m,Gd],Im=e=>Bm.some((t=>(0,l.hasBlockSupport)(e,t)));function jm(e={}){const t={};return(0,wi.getCSSRules)(e).forEach((e=>{t[e.key]=e.value})),t}const Em={[`${Hd}.skipSerialization`]:["border"],[`${Dp}.skipSerialization`]:[Dp],[`${ug}.skipSerialization`]:[ug],[`${vm}.skipSerialization`]:[vm],[`${_m}.skipSerialization`]:[_m],[`${Gd}.skipSerialization`]:[Gd]},Tm={...Em,[`${vm}.aspectRatio`]:[`${vm}.aspectRatio`],[`${hu}`]:[hu]},Mm={[`${vm}.aspectRatio`]:!0,[`${hu}`]:!0},Pm={gradients:"gradient"};function Rm(e,t,n=!1){if(!e)return e;let o=e;return n||(o=structuredClone(e)),Array.isArray(t)||(t=[t]),t.forEach((e=>{if(Array.isArray(e)||(e=e.split(".")),e.length>1){const[t,...n]=e;Rm(o[t],[n],!0)}else 1===e.length&&delete o[e[0]]})),o}function Nm(e,t,n,o=Tm){if(!Im(t))return e;let{style:r}=n;return Object.entries(o).forEach((([e,n])=>{const o=Mm[e]||(0,l.getBlockSupport)(t,e);!0===o&&(r=Rm(r,n)),Array.isArray(o)&&o.forEach((e=>{const t=Pm[e]||e;r=Rm(r,[[...n,t]])}))})),e.style={...jm(r),...e.style},e}const Lm={edit:function({clientId:e,name:t,setAttributes:n,__unstableParentLayout:o}){const r=gs(t,o),i=na(),s={clientId:e,name:t,setAttributes:n,settings:{...r,typography:{...r.typography,textAlign:!1}}};return"default"!==i?null:(0,re.jsxs)(re.Fragment,{children:[(0,re.jsx)(Zp,{...s}),(0,re.jsx)(vu,{...s}),(0,re.jsx)(mg,{...s}),(0,re.jsx)(Yd,{...s}),(0,re.jsx)(ym,{...s})]})},hasSupport:Im,addSaveProps:Nm,attributeKeys:["style"],useBlockProps:function({name:e,style:t}){const n=(0,u.useInstanceId)(Om,"wp-elements"),o=`.${n}`,r=t?.elements,i=(0,a.useMemo)((()=>{if(!r)return;const t=[];return Am.forEach((({elementType:n,pseudo:i,elements:s})=>{if(us(e,Dp,n))return;const a=r?.[n];if(a){const e=Zi(o,l.__EXPERIMENTAL_ELEMENTS[n]);t.push((0,wi.compileCSS)(a,{selector:e})),i&&i.forEach((e=>{a[e]&&t.push((0,wi.compileCSS)(a[e],{selector:Zi(o,`${l.__EXPERIMENTAL_ELEMENTS[n]}${e}`)}))}))}s&&s.forEach((e=>{r[e]&&t.push((0,wi.compileCSS)(r[e],{selector:Zi(o,l.__EXPERIMENTAL_ELEMENTS[e])}))}))})),t.length>0?t.join(""):void 0}),[o,r,e]);return ps({css:i}),Nm({className:n},e,{style:t},Em)}},Am=[{elementType:"button"},{elementType:"link",pseudo:[":hover"]},{elementType:"heading",elements:["h1","h2","h3","h4","h5","h6"]}],Om={};(0,d.addFilter)("blocks.registerBlockType","core/style/addAttribute",(function(e){return Im(e)?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e})),(0,d.addFilter)("blocks.registerBlockType","core/settings/addAttribute",(function(e){return t=e,(0,l.hasBlockSupport)(t,"__experimentalSettings",!1)?(e?.attributes?.settings||(e.attributes={...e.attributes,settings:{type:"object"}}),e):e;var t}));const Dm=(0,re.jsx)(oe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,re.jsx)(oe.Path,{d:"M12 4 4 19h16L12 4zm0 3.2 5.5 10.3H12V7.2z"})}),zm=function e({id:t,colorPalette:n,duotonePalette:o,disableCustomColors:r,disableCustomDuotone:i,value:s,onChange:l}){let a;a="unset"===s?(0,re.jsx)(fs.ColorIndicator,{className:"block-editor-duotone-control__unset-indicator"}):s?(0,re.jsx)(fs.DuotoneSwatch,{values:s}):(0,re.jsx)(Bl,{icon:Dm});const c=(0,C.__)("Apply duotone filter"),d=`${(0,u.useInstanceId)(e,"duotone-control",t)}__description`;return(0,re.jsx)(fs.Dropdown,{popoverProps:{className:"block-editor-duotone-control__popover",headerTitle:(0,C.__)("Duotone")},renderToggle:({isOpen:e,onToggle:t})=>(0,re.jsx)(fs.ToolbarButton,{showTooltip:!0,onClick:t,"aria-haspopup":"true","aria-expanded":e,onKeyDown:n=>{e||n.keyCode!==Pa.DOWN||(n.preventDefault(),t())},label:c,icon:a}),renderContent:()=>(0,re.jsxs)(fs.MenuGroup,{label:(0,C.__)("Duotone"),children:[(0,re.jsx)("p",{children:(0,C.__)("Create a two-tone color effect without losing your original image.")}),(0,re.jsx)(fs.DuotonePicker,{"aria-label":c,"aria-describedby":d,colorPalette:n,duotonePalette:o,disableCustomColors:r,disableCustomDuotone:i,value:s,onChange:l})]})})};function Vm(e){return`${e}{filter:none}`}function Fm(e,t){return`${e}{filter:url(#${t})}`}function Hm(e,t){const n=function(e=[]){const t={r:[],g:[],b:[],a:[]};return e.forEach((e=>{const n=Qu(e).toRgb();t.r.push(n.r/255),t.g.push(n.g/255),t.b.push(n.b/255),t.a.push(n.a)})),t}(t);return`\n\n\t\n\t\t\n\t\t\t\x3c!--\n\t\t\t\tUse sRGB instead of linearRGB so transparency looks correct.\n\t\t\t\tUse perceptual brightness to convert to grayscale.\n\t\t\t--\x3e\n\t\t\t\n\t\t\t\x3c!-- Use sRGB instead of linearRGB to be consistent with how CSS gradients work. --\x3e\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\x3c!-- Re-mask the image with the original transparency since the feColorMatrix above loses that information. --\x3e\n\t\t\t\n\t\t\n\t\n`}function Gm(e,t="root",n={}){if(!t)return null;const{fallback:o=!1}=n,{name:r,selectors:i,supports:s}=e,l=i&&Object.keys(i).length>0,a=Array.isArray(t)?t.join("."):t;let c=null;if(c=l&&i.root?i?.root:s?.__experimentalSelector?s.__experimentalSelector:".wp-block-"+r.replace("core/","").replace("/","-"),"root"===a)return c;const u=Array.isArray(t)?t:t.split(".");if(1===u.length){const e=o?c:null;if(l)return be(i,`${a}.root`,null)||be(i,a,null)||e;const t=be(s,`${a}.__experimentalSelector`,null);return t?Zi(c,t):e}let d;return l&&(d=be(i,a,null)),d||(o?Gm(e,u[0],n):null)}const $m=[];function Um(e,{presetSetting:t,defaultSetting:n}){const o=!e?.color?.[n],r=e?.color?.[t]?.custom||$m,i=e?.color?.[t]?.theme||$m,s=e?.color?.[t]?.default||$m;return(0,a.useMemo)((()=>[...r,...i,...o?$m:s]),[o,r,i,s])}function Wm(e){return Km(e)}function Km(e){return e.color.customDuotone||e.color.defaultDuotone||e.color.duotone.length>0}function Zm({resetAllFilter:e,onChange:t,value:n,panelId:o,children:r}){const i=Ui();return(0,re.jsx)(fs.__experimentalToolsPanel,{label:(0,C._x)("Filters","Name for applying graphical effects"),resetAll:()=>{const o=e(n);t(o)},panelId:o,dropdownMenuProps:i,children:r})}const qm={duotone:!0},Ym={placement:"left-start",offset:36,shift:!0,className:"block-editor-duotone-control__popover",headerTitle:(0,C.__)("Duotone")},Xm=({indicator:e,label:t})=>(0,re.jsxs)(fs.__experimentalHStack,{justify:"flex-start",children:[(0,re.jsx)(fs.__experimentalZStack,{isLayered:!1,offset:-8,children:(0,re.jsx)(fs.Flex,{expanded:!1,children:"unset"!==e&&e?(0,re.jsx)(fs.DuotoneSwatch,{values:e}):(0,re.jsx)(fs.ColorIndicator,{className:"block-editor-duotone-control__unset-indicator"})})}),(0,re.jsx)(fs.FlexItem,{title:t,children:t})]});function Qm({as:e=Zm,value:t,onChange:n,inheritedValue:o=t,settings:r,panelId:i,defaultControls:s=qm}){const l=Km(r),c=Um(r,{presetSetting:"duotone",defaultSetting:"defaultDuotone"}),u=Um(r,{presetSetting:"palette",defaultSetting:"defaultPalette"}),d=(p=o?.filter?.duotone,Ki({settings:r},"",p));var p;const h=e=>{const o=c.find((({colors:t})=>t===e)),r=o?`var:preset|duotone|${o.slug}`:e;n(fe(t,["filter","duotone"],r))},g=(0,a.useCallback)((e=>({...e,filter:{...e.filter,duotone:void 0}})),[]);return(0,re.jsx)(e,{resetAllFilter:g,value:t,onChange:n,panelId:i,children:l&&(0,re.jsx)(fs.__experimentalToolsPanelItem,{label:(0,C.__)("Duotone"),hasValue:()=>!!t?.filter?.duotone,onDeselect:()=>h(void 0),isShownByDefault:s.duotone,panelId:i,children:(0,re.jsx)(fs.Dropdown,{popoverProps:Ym,className:"block-editor-global-styles-filters-panel__dropdown",renderToggle:({onToggle:e,isOpen:t})=>{const n={onClick:e,className:ls({"is-open":t}),"aria-expanded":t};return(0,re.jsx)(fs.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:(0,re.jsx)(fs.__experimentalItem,{as:"button",...n,children:(0,re.jsx)(Xm,{indicator:d,label:(0,C.__)("Duotone")})})})},renderContent:()=>(0,re.jsx)(fs.__experimentalDropdownContentWrapper,{paddingSize:"small",children:(0,re.jsxs)(fs.MenuGroup,{label:(0,C.__)("Duotone"),children:[(0,re.jsx)("p",{children:(0,C.__)("Create a two-tone color effect without losing your original image.")}),(0,re.jsx)(fs.DuotonePicker,{colorPalette:u,duotonePalette:c,disableCustomColors:!0,disableCustomDuotone:!0,value:d,onChange:h})]})})})})})}const Jm=[],ef=window?.navigator.userAgent&&window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome")&&!window.navigator.userAgent.includes("Chromium");function tf({presetSetting:e,defaultSetting:t}){const[n,o,r,i]=yi(t,`${e}.custom`,`${e}.theme`,`${e}.default`);return(0,a.useMemo)((()=>[...o||Jm,...r||Jm,...n&&i||Jm]),[n,o,r,i])}function nf(e,t){if(!e)return;const n=t?.find((({slug:t})=>e===`var:preset|duotone|${t}`));return n?n.colors:void 0}ed([td]);const of={shareWithChildBlocks:!0,edit:function({style:e,setAttributes:t,name:n}){const o=e?.color?.duotone,r=gs(n),i=na(),s=tf({presetSetting:"color.duotone",defaultSetting:"color.defaultDuotone"}),l=tf({presetSetting:"color.palette",defaultSetting:"color.defaultPalette"}),[a,c]=yi("color.custom","color.customDuotone"),u=!a,d=!c||0===l?.length&&u;if(0===s?.length&&d)return null;if("default"!==i)return null;const p=Array.isArray(o)?o:nf(o,s);return(0,re.jsxs)(re.Fragment,{children:[(0,re.jsx)(ja,{group:"filter",children:(0,re.jsx)(Qm,{value:{filter:{duotone:p}},onChange:n=>{const o={...e,color:{...n?.filter}};t({style:o})},settings:r})}),(0,re.jsx)(Ss,{group:"block",__experimentalShareWithChildBlocks:!0,children:(0,re.jsx)(zm,{duotonePalette:s,colorPalette:l,disableCustomDuotone:d,disableCustomColors:u,value:p,onChange:n=>{const o=function(e,t){if(!e||!Array.isArray(e))return;const n=t?.find((t=>t?.colors?.every(((t,n)=>t===e[n]))));return n?`var:preset|duotone|${n.slug}`:void 0}(n,s),r={...e,color:{...e?.color,duotone:null!=o?o:n}};t({style:r})},settings:r})})]})},useBlockProps:function({clientId:e,name:t,style:n}){const o=(0,u.useInstanceId)(rf),r=(0,a.useMemo)((()=>{const e=(0,l.getBlockType)(t);if(e){if(!(0,l.getBlockSupport)(e,"filter.duotone",!1))return null;const t=(0,l.getBlockSupport)(e,"color.__experimentalDuotone",!1);if(t){const n=Gm(e);return"string"==typeof t?Zi(n,t):n}return Gm(e,"filter.duotone",{fallback:!0})}}),[t]),i=n?.color?.duotone,s=`wp-duotone-${o}`,c=r&&i;return function({clientId:e,id:t,selector:n,attribute:o}){const r=tf({presetSetting:"color.duotone",defaultSetting:"color.defaultDuotone"}),i=Array.isArray(o),s=i?void 0:nf(o,r),l="string"==typeof o&&s;let c=null;l?c=s:("string"==typeof o&&!l||i)&&(c=o);const u=n.split(",").map((e=>`.${t}${e.trim()}`)).join(", "),d=Array.isArray(c)||"unset"===c;hs(d?{css:"unset"!==c?Fm(u,t):Vm(u),__unstableType:"presets"}:void 0),hs(d?{assets:"unset"!==c?Hm(t,c):"",__unstableType:"svgs"}:void 0);const p=Lp(e);(0,a.useEffect)((()=>{if(d&&p&&ef){const e=p.style.display;p.style.setProperty("display","inline-block"),p.offsetHeight,p.style.setProperty("display",e)}}),[d,p,c])}({clientId:e,id:s,selector:r,attribute:i}),{className:c?s:""}},attributeKeys:["style"],hasSupport:e=>(0,l.hasBlockSupport)(e,"filter.duotone")};const rf={};function sf(e){return(0,c.useSelect)((t=>{if(!e)return null;const{getBlockName:n,getBlockAttributes:o}=t(_i),{getBlockType:r,getActiveBlockVariation:i}=t(l.store),s=n(e),a=r(s);if(!a)return null;const c=o(e),u=i(s,c),d=(0,l.isReusableBlock)(a)||(0,l.isTemplatePart)(a),p=(d?(0,l.__experimentalGetBlockLabel)(a,c):void 0)||a.title,h=function(e){const t=e?.style?.position?.type;return"sticky"===t?(0,C.__)("Sticky"):"fixed"===t?(0,C.__)("Fixed"):null}(c),g={isSynced:d,title:p,icon:a.icon,description:a.description,anchor:c?.anchor,positionLabel:h,positionType:c?.style?.position?.type,name:c?.metadata?.name};return u?{isSynced:d,title:u.title||a.title,icon:u.icon||a.icon,description:u.description||a.description,anchor:c?.anchor,positionLabel:h,positionType:c?.style?.position?.type,name:c?.metadata?.name}:g}),[e])}(0,d.addFilter)("blocks.registerBlockType","core/editor/duotone/add-attributes",(function(e){return(0,l.hasBlockSupport)(e,"filter.duotone")?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e}));const lf="position",af={key:"default",value:"",name:(0,C.__)("Default")},cf={key:"sticky",value:"sticky",name:(0,C._x)("Sticky","Name for the value of the CSS position property"),hint:(0,C.__)("The block will stick to the top of the window instead of scrolling.")},uf={key:"fixed",value:"fixed",name:(0,C._x)("Fixed","Name for the value of the CSS position property"),hint:(0,C.__)("The block will not move when the page is scrolled.")},df=["top","right","bottom","left"],pf=["sticky","fixed"];function hf(e){const t=e?.style?.position?.type;return"sticky"===t||"fixed"===t}function gf({name:e}={}){const[t,n]=yi("position.fixed","position.sticky"),o=!t&&!n;return r=e,!(0,l.getBlockSupport)(r,lf)||o;var r}function mf({style:e={},clientId:t,name:n,setAttributes:o}){const r=function(e){const t=(0,l.getBlockSupport)(e,lf);return!(!0!==t&&!t?.fixed)}(n),i=function(e){const t=(0,l.getBlockSupport)(e,lf);return!(!0!==t&&!t?.sticky)}(n),s=e?.position?.type,{firstParentClientId:u}=(0,c.useSelect)((e=>{const{getBlockParents:n}=e(_i),o=n(t);return{firstParentClientId:o[o.length-1]}}),[t]),d=sf(u),p=i&&s===cf.value&&d?(0,C.sprintf)(/* translators: %s: the name of the parent block. */ /* translators: %s: the name of the parent block. */ -(0,C.__)("The block will stick to the scrollable area of the parent %s block."),d.title):null,h=(0,a.useMemo)((()=>{const e=[af];return(i||s===cf.value)&&e.push(cf),(r||s===uf.value)&&e.push(uf),e}),[r,i,s]),g=s&&h.find((e=>e.value===s))||af;return a.Platform.select({web:h.length>1?(0,re.jsx)(ja,{group:"position",children:(0,re.jsx)(fs.BaseControl,{__nextHasNoMarginBottom:!0,help:p,children:(0,re.jsx)(fs.CustomSelectControl,{__next40pxDefaultSize:!0,label:(0,C.__)("Position"),hideLabelFromVision:!0,describedBy:(0,C.sprintf)( -// translators: %s: Currently selected position. -// translators: %s: Currently selected position. -(0,C.__)("Currently selected position: %s"),g.name),options:h,value:g,onChange:({selectedItem:t})=>{(t=>{const n={...e,position:{...e?.position,type:t,top:"sticky"===t||"fixed"===t?"0px":void 0}};o({style:as(n)})})(t.value)},size:"__unstable-large"})})}):null,native:null})}const ff={edit:function(e){return gf(e)?null:(0,re.jsx)(mf,{...e})},useBlockProps:function({name:e,style:t}){const n=(0,l.hasBlockSupport)(e,lf),o=gf({name:e}),r=n&&!o,i=(0,u.useInstanceId)(bf);let s;r&&(s=function({selector:e,style:t}){let n="";const{type:o}=t?.position||{};return pf.includes(o)?(n+=`${e} {`,n+=`position: ${o};`,df.forEach((e=>{void 0!==t?.position?.[e]&&(n+=`${e}: ${t.position[e]};`)})),"sticky"!==o&&"fixed"!==o||(n+="z-index: 10"),n+="}",n):n}({selector:`.wp-container-${i}.wp-container-${i}`,style:t})||"");const a=ls({[`wp-container-${i}`]:r&&!!s,[`is-position-${t?.position?.type}`]:r&&!!s&&!!t?.position?.type});return ps({css:s}),{className:a}},attributeKeys:["style"],hasSupport:e=>(0,l.hasBlockSupport)(e,lf)},bf={},kf={button:"wp-element-button",caption:"wp-element-caption"},vf={border:"border",color:"color",spacing:"spacing",typography:"typography"},{kebabCase:_f}=O(fs.privateApis);function xf(e={},t,n){let o=[];return Object.keys(e).forEach((r=>{const i=t+_f(r.replace("/","-")),s=e[r];if(s instanceof Object){const e=i+n;o=[...o,...xf(s,e,n)]}else o.push(`${i}: ${s}`)})),o}const yf=(e,t)=>{const n={};return Object.entries(e).forEach((([e,o])=>{if("root"===e||!t?.[e])return;const r="string"==typeof o;if(r||Object.entries(o).forEach((([o,r])=>{if("root"===o||!t?.[e][o])return;const i=Sf({[e]:{[o]:t[e][o]}});n[r]=[...n[r]||[],...i],delete t[e][o]})),r||o.root){const i=r?o:o.root,s=Sf({[e]:t[e]});n[i]=[...n[i]||[],...s],delete t[e]}})),n};function Sf(e={},t="",n,o={},r=!1){const i=Fi===t,s=Object.entries(l.__EXPERIMENTAL_STYLE_PROPERTY).reduce(((t,[o,{value:r,properties:s,useEngine:l,rootOnly:a}])=>{if(a&&!i)return t;const c=r;if("elements"===c[0]||l)return t;const u=be(e,c);if("--wp--style--root--padding"===o&&("string"==typeof u||!n))return t;if(s&&"string"!=typeof u)Object.entries(s).forEach((e=>{const[n,o]=e;if(!be(u,[o],!1))return;const r=n.startsWith("--")?n:_f(n);t.push(`${r}: ${(0,wi.getCSSValueFromRawStyle)(be(u,[o]))}`)}));else if(be(e,c,!1)){const n=o.startsWith("--")?o:_f(o);t.push(`${n}: ${(0,wi.getCSSValueFromRawStyle)(be(e,c))}`)}return t}),[]);return e.background&&(e.background?.backgroundImage&&(e.background.backgroundImage=Yi(e.background.backgroundImage,o)),!i&&e.background?.backgroundImage?.id&&(e={...e,background:{...e.background,...fu(e.background)}})),(0,wi.getCSSRules)(e).forEach((e=>{if(i&&(n||r)&&e.key.startsWith("padding"))return;const t=e.key.startsWith("--")?e.key:_f(e.key);let l=Yi(e.value,o);"font-size"===t&&(l=Di({size:l},o?.settings)),"aspect-ratio"===t&&s.push("min-height: unset"),s.push(`${t}: ${l}`)})),s}function wf({layoutDefinitions:e=Ms,style:t,selector:n,hasBlockGapSupport:o,hasFallbackGapSupport:r,fallbackGapValue:i}){let s="",l=o?el(t?.spacing?.blockGap):"";if(r&&(n===Fi?l=l||"0.5em":!o&&i&&(l=i)),l&&e&&(Object.values(e).forEach((({className:e,name:t,spacingStyles:r})=>{(o||"flex"===t||"grid"===t)&&r?.length&&r.forEach((t=>{const r=[];if(t.rules&&Object.entries(t.rules).forEach((([e,t])=>{r.push(`${e}: ${t||l}`)})),r.length){let i="";i=o?n===Fi?`:root :where(.${e})${t?.selector||""}`:`:root :where(${n}-${e})${t?.selector||""}`:n===Fi?`:where(.${e}${t?.selector||""})`:`:where(${n}.${e}${t?.selector||""})`,s+=`${i} { ${r.join("; ")}; }`}}))})),n===Fi&&o&&(s+=`${Hi} { --wp--style--block-gap: ${l}; }`)),n===Fi&&e){const t=["block","flex","grid"];Object.values(e).forEach((({className:e,displayMode:o,baseStyles:r})=>{o&&t.includes(o)&&(s+=`${n} .${e} { display:${o}; }`),r?.length&&r.forEach((t=>{const n=[];t.rules&&Object.entries(t.rules).forEach((([e,t])=>{n.push(`${e}: ${t}`)})),n.length&&(s+=`.${e}${t?.selector||""} { ${n.join("; ")}; }`)}))}))}return s}const Cf=["border","color","dimensions","spacing","typography","filter","outline","shadow","background"];function Bf(e){if(!e)return{};const t=Object.entries(e).filter((([e])=>Cf.includes(e))).map((([e,t])=>[e,structuredClone(t)]));return Object.fromEntries(t)}const If=(e,t)=>{var n;const o=[];if(!e?.settings)return o;const r=e=>{let t={};return Gi.forEach((({path:n})=>{const o=be(e,n,!1);!1!==o&&(t=fe(t,n,o))})),t},i=r(e.settings),s=e.settings?.custom;return(Object.keys(i).length>0||s)&&o.push({presets:i,custom:s,selector:Hi}),Object.entries(null!==(n=e.settings?.blocks)&&void 0!==n?n:{}).forEach((([e,n])=>{const i=r(n),s=n.custom;(Object.keys(i).length>0||s)&&o.push({presets:i,custom:s,selector:t[e]?.selector})})),o},jf=(e,t)=>{const n=If(e,t);let o="";return n.forEach((({presets:t,custom:n,selector:r})=>{const i=function(e={},t){return Gi.reduce(((n,{path:o,valueKey:r,valueFunc:i,cssVarInfix:s})=>{const l=be(e,o,[]);return["default","theme","custom"].forEach((e=>{l[e]&&l[e].forEach((e=>{r&&!i?n.push(`--wp--preset--${s}--${_f(e.slug)}: ${e[r]}`):i&&"function"==typeof i&&n.push(`--wp--preset--${s}--${_f(e.slug)}: ${i(e,t)}`)}))})),n}),[])}(t,e?.settings),s=xf(n,"--wp--custom--","--");s.length>0&&i.push(...s),i.length>0&&(o+=`${r}{${i.join(";")};}`)})),o},Ef=(e,t,n,o,r=!1,i=!1,s=void 0)=>{const a={blockGap:!0,blockStyles:!0,layoutStyles:!0,marginReset:!0,presets:!0,rootPadding:!0,variationStyles:!1,...s},c=((e,t)=>{var n;const o=[];if(!e?.styles)return o;const r=Bf(e.styles);return r&&o.push({styles:r,selector:Fi,skipSelectorWrapper:!0}),Object.entries(l.__EXPERIMENTAL_ELEMENTS).forEach((([t,n])=>{e.styles?.elements?.[t]&&o.push({styles:e.styles?.elements?.[t],selector:n,skipSelectorWrapper:!kf[t]})})),Object.entries(null!==(n=e.styles?.blocks)&&void 0!==n?n:{}).forEach((([e,n])=>{var r;const i=Bf(n);if(n?.variations){const r={};Object.entries(n.variations).forEach((([n,i])=>{var s,a;r[n]=Bf(i),i?.css&&(r[n].css=i.css);const c=t[e]?.styleVariationSelectors?.[n];Object.entries(null!==(s=i?.elements)&&void 0!==s?s:{}).forEach((([e,t])=>{t&&l.__EXPERIMENTAL_ELEMENTS[e]&&o.push({styles:t,selector:Zi(c,l.__EXPERIMENTAL_ELEMENTS[e])})})),Object.entries(null!==(a=i?.blocks)&&void 0!==a?a:{}).forEach((([e,n])=>{var r;const i=Zi(c,t[e]?.selector),s=Zi(c,t[e]?.duotoneSelector),a=function(e,t){if(!e||!t)return;const n={};return Object.entries(t).forEach((([t,o])=>{"string"==typeof o&&(n[t]=Zi(e,o)),"object"==typeof o&&(n[t]={},Object.entries(o).forEach((([o,r])=>{n[t][o]=Zi(e,r)})))})),n}(c,t[e]?.featureSelectors),u=Bf(n);n?.css&&(u.css=n.css),o.push({selector:i,duotoneSelector:s,featureSelectors:a,fallbackGapValue:t[e]?.fallbackGapValue,hasLayoutSupport:t[e]?.hasLayoutSupport,styles:u}),Object.entries(null!==(r=n.elements)&&void 0!==r?r:{}).forEach((([e,t])=>{t&&l.__EXPERIMENTAL_ELEMENTS[e]&&o.push({styles:t,selector:Zi(i,l.__EXPERIMENTAL_ELEMENTS[e])})}))}))})),i.variations=r}t?.[e]?.selector&&o.push({duotoneSelector:t[e].duotoneSelector,fallbackGapValue:t[e].fallbackGapValue,hasLayoutSupport:t[e].hasLayoutSupport,selector:t[e].selector,styles:i,featureSelectors:t[e].featureSelectors,styleVariationSelectors:t[e].styleVariationSelectors}),Object.entries(null!==(r=n?.elements)&&void 0!==r?r:{}).forEach((([n,r])=>{r&&t?.[e]&&l.__EXPERIMENTAL_ELEMENTS[n]&&o.push({styles:r,selector:t[e]?.selector.split(",").map((e=>l.__EXPERIMENTAL_ELEMENTS[n].split(",").map((t=>e+" "+t)))).join(",")})}))})),o})(e,t),u=If(e,t),d=e?.settings?.useRootPaddingAwareAlignments,{contentSize:p,wideSize:h}=e?.settings?.layout||{},g=a.marginReset||a.rootPadding||a.layoutStyles;let m="";if(a.presets&&(p||h)&&(m+=`${Hi} {`,m=p?m+` --wp--style--global--content-size: ${p};`:m,m=h?m+` --wp--style--global--wide-size: ${h};`:m,m+="}"),g&&(m+=":where(body) {margin: 0;",a.rootPadding&&d&&(m+="padding-right: 0; padding-left: 0; padding-top: var(--wp--style--root--padding-top); padding-bottom: var(--wp--style--root--padding-bottom) }\n\t\t\t\t.has-global-padding { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }\n\t\t\t\t.has-global-padding > .alignfull { margin-right: calc(var(--wp--style--root--padding-right) * -1); margin-left: calc(var(--wp--style--root--padding-left) * -1); }\n\t\t\t\t.has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) { padding-right: 0; padding-left: 0; }\n\t\t\t\t.has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) > .alignfull { margin-left: 0; margin-right: 0;\n\t\t\t\t"),m+="}"),a.blockStyles&&c.forEach((({selector:t,duotoneSelector:s,styles:l,fallbackGapValue:c,hasLayoutSupport:u,featureSelectors:p,styleVariationSelectors:h,skipSelectorWrapper:g})=>{if(p){const e=yf(p,l);Object.entries(e).forEach((([e,t])=>{if(t.length){const n=t.join(";");m+=`:root :where(${e}){${n};}`}}))}if(s){const e={};l?.filter&&(e.filter=l.filter,delete l.filter);const t=Sf(e);t.length&&(m+=`${s}{${t.join(";")};}`)}r||Fi!==t&&!u||(m+=wf({style:l,selector:t,hasBlockGapSupport:n,hasFallbackGapSupport:o,fallbackGapValue:c}));const f=Sf(l,t,d,e,i);f?.length&&(m+=`${g?t:`:root :where(${t})`}{${f.join(";")};}`),l?.css&&(m+=Mf(l.css,`:root :where(${t})`)),a.variationStyles&&h&&Object.entries(h).forEach((([t,n])=>{const o=l?.variations?.[t];if(o){if(p){const e=yf(p,o);Object.entries(e).forEach((([e,t])=>{if(t.length){const o=function(e,t){const n=e.split(","),o=[];return n.forEach((e=>{o.push(`${t.trim()}${e.trim()}`)})),o.join(", ")}(e,n),r=t.join(";");m+=`:root :where(${o}){${r};}`}}))}const t=Sf(o,n,d,e);t.length&&(m+=`:root :where(${n}){${t.join(";")};}`),o?.css&&(m+=Mf(o.css,`:root :where(${n})`))}}));const b=Object.entries(l).filter((([e])=>e.startsWith(":")));b?.length&&b.forEach((([e,n])=>{const o=Sf(n);if(!o?.length)return;const r=`:root :where(${t.split(",").map((t=>t+e)).join(",")}){${o.join(";")};}`;m+=r}))})),a.layoutStyles&&(m+=".wp-site-blocks > .alignleft { float: left; margin-right: 2em; }",m+=".wp-site-blocks > .alignright { float: right; margin-left: 2em; }",m+=".wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }"),a.blockGap&&n){const t=el(e?.styles?.spacing?.blockGap)||"0.5em";m+=`:root :where(.wp-site-blocks) > * { margin-block-start: ${t}; margin-block-end: 0; }`,m+=":root :where(.wp-site-blocks) > :first-child { margin-block-start: 0; }",m+=":root :where(.wp-site-blocks) > :last-child { margin-block-end: 0; }"}return a.presets&&u.forEach((({selector:e,presets:t})=>{Fi!==e&&Hi!==e||(e="");const n=function(e="*",t={}){return Gi.reduce(((n,{path:o,cssVarInfix:r,classes:i})=>{if(!i)return n;const s=be(t,o,[]);return["default","theme","custom"].forEach((t=>{s[t]&&s[t].forEach((({slug:t})=>{i.forEach((({classSuffix:o,propertyName:i})=>{const s=`.has-${_f(t)}-${o}`,l=e.split(",").map((e=>`${e}${s}`)).join(","),a=`var(--wp--preset--${r}--${_f(t)})`;n+=`${l}{${i}: ${a} !important;}`}))}))})),n}),"")}(e,t);n.length>0&&(m+=n)})),m};const Tf=(e,t,n)=>{const o={};return e.forEach((e=>{const r=e.name,i=Gm(e);let s=Gm(e,"filter.duotone");if(!s){const t=Gm(e),n=(0,l.getBlockSupport)(e,"color.__experimentalDuotone",!1);s=n&&Zi(t,n)}const a=!!e?.supports?.layout||!!e?.supports?.__experimentalLayout,c=e?.supports?.spacing?.blockGap?.__experimentalDefault,u=t(r),d={};u?.forEach((e=>{const t=n?`-${n}`:"",o=`${e.name}${t}`,r=function(e,t){const n=`.is-style-${e}`;if(!t)return n;const o=/((?::\([^)]+\))?\s*)([^\s:]+)/,r=(e,t,o)=>t+o+n;return t.split(",").map((e=>e.replace(o,r))).join(",")}(o,i);d[o]=r}));const p=((e,t)=>{if(e?.selectors&&Object.keys(e.selectors).length>0)return e.selectors;const n={root:t};return Object.entries(vf).forEach((([t,o])=>{const r=Gm(e,t);r&&(n[o]=r)})),n})(e,i);o[r]={duotoneSelector:s,fallbackGapValue:c,featureSelectors:Object.keys(p).length?p:void 0,hasLayoutSupport:a,name:r,selector:i,styleVariationSelectors:u?.length?d:void 0}})),o};function Mf(e,t){let n="";return e&&""!==e.trim()?(e.split("&").forEach((e=>{if(e&&""!==e.trim())if(e.includes("{")){const o=e.replace("}","").split("{");if(2!==o.length)return;const[r,i]=o,s=r.match(/([>+~\s]*::[a-zA-Z-]+)/),l=s?s[1]:"",a=s?r.replace(l,"").trim():r.trim();let c;c=""===a?t:r.startsWith(" ")?Zi(t,a):function(e,t){return e.includes(",")?e.split(",").map((e=>e+t)).join(","):e+t}(t,a),n+=`:root :where(${c})${l}{${i.trim()}}`}else n+=`:root :where(${t}){${e.trim()}}`})),n):n}function Pf(e={},t){const[n]=ts("spacing.blockGap"),o=null!==n,r=!o,i=(0,c.useSelect)((e=>{const{getSettings:t}=e(_i);return!!t().disableLayoutStyles})),{getBlockStyles:s}=(0,c.useSelect)(l.store);return(0,a.useMemo)((()=>{var n;if(!e?.styles||!e?.settings)return[];const a=(g=e,g.styles?.blocks?.["core/separator"]&&g.styles?.blocks?.["core/separator"].color?.background&&!g.styles?.blocks?.["core/separator"].color?.text&&!g.styles?.blocks?.["core/separator"].border?.color?{...g,styles:{...g.styles,blocks:{...g.styles.blocks,"core/separator":{...g.styles.blocks["core/separator"],color:{...g.styles.blocks["core/separator"].color,text:g.styles?.blocks["core/separator"].color.background}}}}}:g),c=Tf((0,l.getBlockTypes)(),s),u=jf(a,c),d=Ef(a,c,o,r,i,t),p=function(e,t){return If(e,t).flatMap((({presets:e})=>function(e={}){return Gi.filter((e=>"duotone"===e.path.at(-1))).flatMap((t=>{const n=be(e,t.path,{});return["default","theme"].filter((e=>n[e])).flatMap((e=>n[e].map((e=>Hm(`wp-duotone-${e.slug}`,e.colors))))).join("")}))}(e)))}(a,c),h=[{css:u,isGlobalStyles:!0},{css:d,isGlobalStyles:!0},{css:null!==(n=a.styles.css)&&void 0!==n?n:"",isGlobalStyles:!0},{assets:p,__unstableType:"svg",isGlobalStyles:!0}];var g;return(0,l.getBlockTypes)().forEach((e=>{if(a.styles.blocks[e.name]?.css){const t=c[e.name].selector;h.push({css:Mf(a.styles.blocks[e.name]?.css,t),isGlobalStyles:!0})}})),[h,a.settings]}),[o,r,e,i,t,s])}function Rf(e=!1){const{merged:t}=(0,a.useContext)(Xi);return Pf(t,e)}const Nf="is-style-";function Lf(e){return e?e.split(/\s+/).reduce(((e,t)=>{if(t.startsWith(Nf)){const n=t.slice(9);"default"!==n&&e.push(n)}return e}),[]):[]}function Af({override:e}){hs(e)}function Of(e,t,n){if(!e?.styles?.blocks?.[t]?.variations?.[n])return;const o=t=>{Object.keys(t).forEach((n=>{const r=t[n];if("object"==typeof r&&null!==r)if(void 0!==r.ref)if("string"!=typeof r.ref||""===r.ref.trim())delete t[n];else{const o=be(e,r.ref);o?t[n]=o:delete t[n]}else o(r),0===Object.keys(r).length&&delete t[n]}))},r=JSON.parse(JSON.stringify(e.styles.blocks[t].variations[n]));return o(r),r}const Df={hasSupport:()=>!0,attributeKeys:["className"],isMatch:({className:e})=>Lf(e).length>0,useBlockProps:function({name:e,className:t,clientId:n}){const{getBlockStyles:o}=(0,c.useSelect)(l.store),r=function(e,t=[]){const n=Lf(e);if(!n)return null;for(const e of n)if(t.some((t=>t.name===e)))return e;return null}(t,o(e)),i=`${Nf}${r}-${n}`,{settings:s,styles:u}=function(e,t,n){const{merged:o}=(0,a.useContext)(Xi),{globalSettings:r,globalStyles:i}=(0,c.useSelect)((e=>{const t=e(_i).getSettings();return{globalSettings:t.__experimentalFeatures,globalStyles:t[T]}}),[]);return(0,a.useMemo)((()=>{var s,l,a;const c=Of({settings:null!==(s=o?.settings)&&void 0!==s?s:r,styles:null!==(l=o?.styles)&&void 0!==l?l:i},e,t);return{settings:null!==(a=o?.settings)&&void 0!==a?a:r,styles:{blocks:{[e]:{variations:{[`${t}-${n}`]:c}}}}}}),[o,r,i,t,n,e])}(e,r,n),d=(0,a.useMemo)((()=>{if(!r)return;const e={settings:s,styles:u},t=Tf((0,l.getBlockTypes)(),o,n);return Ef(e,t,!1,!0,!0,!0,{blockGap:!1,blockStyles:!0,layoutStyles:!1,marginReset:!1,presets:!1,rootPadding:!1,variationStyles:!0})}),[r,s,u,o,n]);return hs({id:`variation-${n}`,css:d,__unstableType:"variation",variation:r,clientId:n}),r?{className:i}:{}}},zf="layout",{kebabCase:Vf}=O(fs.privateApis);function Ff(e){return(0,l.hasBlockSupport)(e,"layout")||(0,l.hasBlockSupport)(e,"__experimentalLayout")}function Hf(e={},t=""){const{layout:n}=e,{default:o}=(0,l.getBlockSupport)(t,zf)||{},r=n?.inherit||n?.contentSize||n?.wideSize?{...n,type:"constrained"}:n||o||{},i=[];if(Ms[r?.type||"default"]?.className){const e=Ms[r?.type||"default"]?.className,n=t.split("/"),o=`wp-block-${"core"===n[0]?n.pop():n.join("-")}-${e}`;i.push(e,o)}return(0,c.useSelect)((e=>(r?.inherit||r?.contentSize||"constrained"===r?.type)&&e(_i).getSettings().__experimentalFeatures?.useRootPaddingAwareAlignments),[r?.contentSize,r?.inherit,r?.type])&&i.push("has-global-padding"),r?.orientation&&i.push(`is-${Vf(r.orientation)}`),r?.justifyContent&&i.push(`is-content-justification-${Vf(r.justifyContent)}`),r?.flexWrap&&"nowrap"===r.flexWrap&&i.push("is-nowrap"),i}const Gf={shareWithChildBlocks:!0,edit:function({layout:e,setAttributes:t,name:n,clientId:o}){const r=gs(n),{layout:i}=r,{themeSupportsLayout:s}=(0,c.useSelect)((e=>{const{getSettings:t}=e(_i);return{themeSupportsLayout:t().supportsLayout}}),[]);if("default"!==na())return null;const a=(0,l.getBlockSupport)(n,zf,{}),u={...i,...a},{allowSwitching:d,allowEditing:p=!0,allowInheriting:h=!0,default:g}=u;if(!p)return null;const m={...a,...e},{type:f,default:{type:b="default"}={}}=m,k=f||b,v=!(!h||k&&"default"!==k&&"constrained"!==k&&!m.inherit),_=e||g||{},{inherit:x=!1,contentSize:y=null}=_;if(("default"===k||"constrained"===k)&&!s)return null;const S=zl(k),w=zl("constrained"),B=!_.type&&(y||x),I=!!x||!!y,j=e=>t({layout:e});return(0,re.jsxs)(re.Fragment,{children:[(0,re.jsx)(ja,{children:(0,re.jsxs)(fs.PanelBody,{title:(0,C.__)("Layout"),children:[v&&(0,re.jsx)(re.Fragment,{children:(0,re.jsx)(fs.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,C.__)("Inner blocks use content width"),checked:"constrained"===S?.name||I,onChange:()=>t({layout:{type:"constrained"===S?.name||I?"default":"constrained"}}),help:"constrained"===S?.name||I?(0,C.__)("Nested blocks use content width with options for full and wide widths."):(0,C.__)("Nested blocks will fill the width of this container. Toggle to constrain.")})}),!x&&d&&(0,re.jsx)($f,{type:k,onChange:e=>t({layout:{type:e}})}),S&&"default"!==S.name&&(0,re.jsx)(S.inspectorControls,{layout:_,onChange:j,layoutBlockSupport:u,name:n,clientId:o}),w&&B&&(0,re.jsx)(w.inspectorControls,{layout:_,onChange:j,layoutBlockSupport:u,name:n,clientId:o})]})}),!x&&S&&(0,re.jsx)(S.toolBarControls,{layout:_,onChange:j,layoutBlockSupport:a,name:n,clientId:o})]})},attributeKeys:["layout"],hasSupport:e=>Ff(e)};function $f({type:e,onChange:t}){return(0,re.jsx)(fs.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,isBlock:!0,label:(0,C.__)("Layout type"),__nextHasNoMarginBottom:!0,hideLabelFromVision:!0,isAdaptiveWidth:!0,value:e,onChange:t,children:Dl.map((({name:e,label:t})=>(0,re.jsx)(fs.__experimentalToggleGroupControlOption,{value:e,label:t},e)))})}function Uf({block:e,props:t,blockGapSupport:n,layoutClasses:o}){const{name:r,attributes:i}=t,s=(0,u.useInstanceId)(e),{layout:a}=i,{default:c}=(0,l.getBlockSupport)(r,zf)||{},d=a?.inherit||a?.contentSize||a?.wideSize?{...a,type:"constrained"}:a||c||{},p=`wp-container-${Vf(r)}-is-layout-`,h=`.${p}${s}`,g=null!==n,m=zl(d?.type||"default"),f=m?.getLayoutStyle?.({blockName:r,selector:h,layout:d,style:i?.style,hasBlockGapSupport:g}),b=ls({[`${p}${s}`]:!!f},o);return ps({css:f}),(0,re.jsx)(e,{...t,__unstableLayoutClassNames:b})}const Wf=(0,u.createHigherOrderComponent)((e=>t=>{const{clientId:n,name:o,attributes:r}=t,i=Ff(o),s=Hf(r,o),l=(0,c.useSelect)((e=>{if(!i)return;const{getSettings:t,getBlockSettings:o}=O(e(_i)),{disableLayoutStyles:r}=t();if(r)return;const[s]=o(n,"spacing.blockGap");return{blockGapSupport:s}}),[i,n]);return l?(0,re.jsx)(Uf,{block:e,props:t,layoutClasses:s,...l}):(0,re.jsx)(e,{...t,__unstableLayoutClassNames:i?s:void 0})}),"withLayoutStyles");function Kf(e,t){return Array.from({length:t},((t,n)=>e+n))}(0,d.addFilter)("blocks.registerBlockType","core/layout/addAttribute",(function(e){var t;return"type"in(null!==(t=e.attributes?.layout)&&void 0!==t?t:{})||Ff(e)&&(e.attributes={...e.attributes,layout:{type:"object"}}),e})),(0,d.addFilter)("editor.BlockListBlock","core/editor/layout/with-layout-styles",Wf);class Zf{constructor({columnStart:e,rowStart:t,columnEnd:n,rowEnd:o,columnSpan:r,rowSpan:i}={}){this.columnStart=null!=e?e:1,this.rowStart=null!=t?t:1,this.columnEnd=void 0!==r?this.columnStart+r-1:null!=n?n:this.columnStart,this.rowEnd=void 0!==i?this.rowStart+i-1:null!=o?o: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 qf(e,t){return e.ownerDocument.defaultView.getComputedStyle(e).getPropertyValue(t)}function Yf(e,t){const n=[];for(const o of e.split(" ")){const e=n[n.length-1],r=e?e.end+t:0,i=r+parseFloat(o);n.push({start:r,end:i})}return n}function Xf(e,t,n="start"){return e.reduce(((o,r,i)=>Math.abs(r[n]-t)/ to quickly insert new blocks."),{kbd:(0,re.jsx)("kbd",{})}),(0,a.createInterpolateElement)((0,C.__)("Indent a list by pressing space at the beginning of a line."),{kbd:(0,re.jsx)("kbd",{})}),(0,a.createInterpolateElement)((0,C.__)("Outdent a list by pressing backspace at the beginning of a line."),{kbd:(0,re.jsx)("kbd",{})}),(0,C.__)("Drag files into the editor to automatically insert media blocks."),(0,C.__)("Change a block's type by pressing the block icon on the toolbar.")],eb=function(){const[e]=(0,a.useState)(Math.floor(Math.random()*Jf.length));return(0,re.jsx)(fs.Tip,{children:Jf[e]})},tb=(0,re.jsx)(oe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,re.jsx)(oe.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})}),nb=(0,re.jsx)(oe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,re.jsx)(oe.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})}),ob=(0,re.jsx)(oe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,re.jsx)(oe.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"})}),rb=(0,a.memo)((function({icon:e,showColors:t=!1,className:n,context:o}){"block-default"===e?.src&&(e={src:ob});const r=(0,re.jsx)(fs.Icon,{icon:e&&e.src?e.src:e,context:o}),i=t?{backgroundColor:e&&e.background,color:e&&e.foreground}:{};return(0,re.jsx)("span",{style:i,className:ls("block-editor-block-icon",n,{"has-colors":t}),children:r})})),ib=function({title:e,icon:t,description:n,blockType:o,className:r,name:i}){o&&(y()("`blockType` property in `BlockCard component`",{since:"5.7",alternative:"`title, icon and description` properties"}),({title:e,icon:t,description:n}=o));const{parentNavBlockClientId:s}=(0,c.useSelect)((e=>{const{getSelectedBlockClientId:t,getBlockParentsByBlockName:n}=e(_i);return{parentNavBlockClientId:n(t(),"core/navigation",!0)[0]}}),[]),{selectBlock:l}=(0,c.useDispatch)(_i);return(0,re.jsxs)("div",{className:ls("block-editor-block-card",r),children:[s&&(0,re.jsx)(fs.Button,{onClick:()=>l(s),label:(0,C.__)("Go to parent Navigation block"),style:{minWidth:24,padding:0},icon:(0,C.isRTL)()?tb:nb,size:"small"}),(0,re.jsx)(rb,{icon:t,showColors:!0}),(0,re.jsxs)(fs.__experimentalVStack,{spacing:1,children:[(0,re.jsx)("h2",{className:"block-editor-block-card__title",children:i?.length?(0,C.sprintf)( -// translators: 1: Custom block name. 2: Block title. -// translators: 1: Custom block name. 2: Block title. -(0,C._x)("%1$s (%2$s)","block label"),i,e):e}),n&&(0,re.jsx)(fs.__experimentalText,{className:"block-editor-block-card__description",children:n})]})]})},sb=(0,u.createHigherOrderComponent)((e=>({useSubRegistry:t=!0,...n})=>{const o=(0,c.useRegistry)(),[r]=(0,a.useState)((()=>new WeakMap)),i=function(e,t,n){if(!n)return t;let o=e.get(t);return o||(o=(0,c.createRegistry)({},t),o.registerStore(ce,vi),e.set(t,o)),o}(r,o,t);return i===o?(0,re.jsx)(e,{registry:o,...n}):(0,re.jsx)(c.RegistryProvider,{value:i,children:(0,re.jsx)(e,{registry:i,...n})})}),"withRegistryProvider"),lb=()=>{};function ab({clientId:e=null,value:t,selection:n,onChange:o=lb,onInput:r=lb}){const i=(0,c.useRegistry)(),{resetBlocks:s,resetSelection:u,replaceInnerBlocks:d,setHasControlledInnerBlocks:p,__unstableMarkNextChangeAsNotPersistent:h}=i.dispatch(_i),{getBlockName:g,getBlocks:m,getSelectionStart:f,getSelectionEnd:b}=i.select(_i),k=(0,c.useSelect)((t=>!e||t(_i).areInnerBlocksControlled(e)),[e]),v=(0,a.useRef)({incoming:null,outgoing:[]}),_=(0,a.useRef)(!1),x=()=>{t&&(h(),e?i.batch((()=>{p(e,!0);const n=t.map((e=>(0,l.cloneBlock)(e)));_.current&&(v.current.incoming=n),h(),d(e,n)})):(_.current&&(v.current.incoming=t),s(t)))},y=(0,a.useRef)(r),S=(0,a.useRef)(o);(0,a.useEffect)((()=>{y.current=r,S.current=o}),[r,o]),(0,a.useEffect)((()=>{v.current.outgoing.includes(t)?v.current.outgoing[v.current.outgoing.length-1]===t&&(v.current.outgoing=[]):m(e)!==t&&(v.current.outgoing=[],x(),n&&u(n.selectionStart,n.selectionEnd,n.initialPosition))}),[t,e]);const w=(0,a.useRef)(!1);(0,a.useEffect)((()=>{w.current?k||(v.current.outgoing=[],x()):w.current=!0}),[k]),(0,a.useEffect)((()=>{const{getSelectedBlocksInitialCaretPosition:t,isLastBlockChangePersistent:n,__unstableIsLastBlockChangeIgnored:o,areInnerBlocksControlled:r}=i.select(_i);let s=m(e),l=n(),a=!1;_.current=!0;const c=i.subscribe((()=>{if(null!==e&&null===g(e))return;if(e&&!r(e))return;const i=n(),c=m(e),u=c!==s;if(s=c,u&&(v.current.incoming||o()))return v.current.incoming=null,void(l=i);(u||a&&!u&&i&&!l)&&(l=i,v.current.outgoing.push(s),(l?S.current:y.current)(s,{selection:{selectionStart:f(),selectionEnd:b(),initialPosition:t()}})),a=u}),_i);return()=>{_.current=!1,c()}}),[i,e]),(0,a.useEffect)((()=>()=>{h(),e?(p(e,!1),h(),d(e,[])):s([])}),[])}const cb=window.wp.keyboardShortcuts;function ub(){return null}ub.Register=function(){const{registerShortcut:e}=(0,c.useDispatch)(cb.store);return(0,a.useEffect)((()=>{e({name:"core/block-editor/duplicate",category:"block",description:(0,C.__)("Duplicate the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"d"}}),e({name:"core/block-editor/remove",category:"block",description:(0,C.__)("Remove the selected block(s)."),keyCombination:{modifier:"access",character:"z"}}),e({name:"core/block-editor/insert-before",category:"block",description:(0,C.__)("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,C.__)("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,C.__)("Delete selection."),keyCombination:{character:"del"},aliases:[{character:"backspace"}]}),e({name:"core/block-editor/select-all",category:"selection",description:(0,C.__)("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,C.__)("Clear selection."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/multi-text-selection",category:"selection",description:(0,C.__)("Select text across multiple blocks."),keyCombination:{modifier:"shift",character:"arrow"}}),e({name:"core/block-editor/focus-toolbar",category:"global",description:(0,C.__)("Navigate to the nearest toolbar."),keyCombination:{modifier:"alt",character:"F10"}}),e({name:"core/block-editor/move-up",category:"block",description:(0,C.__)("Move the selected block(s) up."),keyCombination:{modifier:"secondary",character:"t"}}),e({name:"core/block-editor/move-down",category:"block",description:(0,C.__)("Move the selected block(s) down."),keyCombination:{modifier:"secondary",character:"y"}}),e({name:"core/block-editor/collapse-list-view",category:"list-view",description:(0,C.__)("Collapse all other items."),keyCombination:{modifier:"alt",character:"l"}}),e({name:"core/block-editor/group",category:"block",description:(0,C.__)("Create a group block from the selected multiple blocks."),keyCombination:{modifier:"primary",character:"g"}})}),[e]),null};const db=ub,pb=sb((e=>{const{children:t,settings:n,stripExperimentalSettings:o=!1}=e,{__experimentalUpdateSettings:r}=O((0,c.useDispatch)(_i));return(0,a.useEffect)((()=>{r({...n,__internalIsInitialized:!0},{stripExperimentalSettings:o,reset:!0})}),[n,o,r]),ab(e),(0,re.jsxs)(fs.SlotFillProvider,{passthrough:!0,children:[!n?.isPreviewMode&&(0,re.jsx)(db.Register,{}),(0,re.jsx)(Mp,{children:t})]})})),hb=e=>(0,re.jsx)(pb,{...e,stripExperimentalSettings:!0,children:e.children}),gb=(0,a.createContext)({});function mb({value:e,children:t}){const n=(0,a.useContext)(gb),o=(0,a.useMemo)((()=>({...n,...e})),[n,e]);return(0,re.jsx)(gb.Provider,{value:o,children:t})}const fb=gb,bb={},kb=(0,fs.withFilters)("editor.BlockEdit")((e=>{const{name:t}=e,n=(0,l.getBlockType)(t);if(!n)return null;const o=n.edit||n.save;return(0,re.jsx)(o,{...e})})),vb=e=>{const{attributes:t={},name:n}=e,o=(0,l.getBlockType)(n),r=(0,a.useContext)(fb),i=(0,a.useMemo)((()=>o&&o.usesContext?Object.fromEntries(Object.entries(r).filter((([e])=>o.usesContext.includes(e)))):bb),[o,r]);if(!o)return null;if(o.apiVersion>1)return(0,re.jsx)(kb,{...e,context:i});const s=(0,l.hasBlockSupport)(o,"className",!0)?(0,l.getBlockDefaultClassName)(n):null,c=ls(s,t.className,e.className);return(0,re.jsx)(kb,{...e,context:i,className:c})},_b=(0,re.jsx)(oe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,re.jsx)(oe.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})}),xb=function({className:e,actions:t,children:n,secondaryActions:o}){return(0,re.jsx)("div",{style:{display:"contents",all:"initial"},children:(0,re.jsx)("div",{className:ls(e,"block-editor-warning"),children:(0,re.jsxs)("div",{className:"block-editor-warning__contents",children:[(0,re.jsx)("p",{className:"block-editor-warning__message",children:n}),(t?.length>0||o)&&(0,re.jsxs)("div",{className:"block-editor-warning__actions",children:[t?.length>0&&t.map(((e,t)=>(0,re.jsx)("span",{className:"block-editor-warning__action",children:e},t))),o&&(0,re.jsx)(fs.DropdownMenu,{className:"block-editor-warning__secondary",icon:_b,label:(0,C.__)("More options"),popoverProps:{position:"bottom left",className:"block-editor-warning__dropdown"},noIcons:!0,children:()=>(0,re.jsx)(fs.MenuGroup,{children:o.map(((e,t)=>(0,re.jsx)(fs.MenuItem,{onClick:e.onClick,children:e.title},t)))})})]})]})})})};function yb({originalBlockClientId:e,name:t,onReplace:n}){const{selectBlock:o}=(0,c.useDispatch)(_i),r=(0,l.getBlockType)(t);return(0,re.jsxs)(xb,{actions:[(0,re.jsx)(fs.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>o(e),children:(0,C.__)("Find original")},"find-original"),(0,re.jsx)(fs.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>n([]),children:(0,C.__)("Remove")},"remove")],children:[(0,re.jsxs)("strong",{children:[r?.title,": "]}),(0,C.__)("This block can only be used once.")]})}const Sb=(0,a.createContext)({});function wb({mayDisplayControls:e,mayDisplayParentControls:t,blockEditingMode:n,isPreviewMode:o,...r}){const{name:i,isSelected:s,clientId:c,attributes:u={},__unstableLayoutClassNames:d}=r,{layout:b=null,metadata:k={}}=u,{bindings:_}=k,x=(0,l.hasBlockSupport)(i,"layout",!1)||(0,l.hasBlockSupport)(i,"__experimentalLayout",!1),{originalBlockClientId:y}=(0,a.useContext)(Sb);return(0,re.jsxs)(v,{value:(0,a.useMemo)((()=>({name:i,isSelected:s,clientId:c,layout:x?b:null,__unstableLayoutClassNames:d,[p]:e,[h]:t,[g]:n,[m]:_,[f]:o})),[i,s,c,x,b,d,e,t,n,_,o]),children:[(0,re.jsx)(vb,{...r}),y&&(0,re.jsx)(yb,{originalBlockClientId:y,name:i,onReplace:r.onReplace})]})}var Cb=n(8021);function Bb({title:e,rawContent:t,renderedContent:n,action:o,actionText:r,className:i}){return(0,re.jsxs)("div",{className:i,children:[(0,re.jsxs)("div",{className:"block-editor-block-compare__content",children:[(0,re.jsx)("h2",{className:"block-editor-block-compare__heading",children:e}),(0,re.jsx)("div",{className:"block-editor-block-compare__html",children:t}),(0,re.jsx)("div",{className:"block-editor-block-compare__preview edit-post-visual-editor",children:(0,re.jsx)(a.RawHTML,{children:(0,Ta.safeHTML)(n)})})]}),(0,re.jsx)("div",{className:"block-editor-block-compare__action",children:(0,re.jsx)(fs.Button,{__next40pxDefaultSize:!0,variant:"secondary",tabIndex:"0",onClick:o,children:r})})]})}const Ib=function({block:e,onKeep:t,onConvert:n,convertor:o,convertButtonText:r}){const i=(s=o(e),(Array.isArray(s)?s:[s]).map((e=>(0,l.getSaveContent)(e.name,e.attributes,e.innerBlocks))).join(""));var s;const a=(c=e.originalContent,u=i,(0,Cb.JJ)(c,u).map(((e,t)=>{const n=ls({"block-editor-block-compare__added":e.added,"block-editor-block-compare__removed":e.removed});return(0,re.jsx)("span",{className:n,children:e.value},t)})));var c,u;return(0,re.jsxs)("div",{className:"block-editor-block-compare__wrapper",children:[(0,re.jsx)(Bb,{title:(0,C.__)("Current"),className:"block-editor-block-compare__current",action:t,actionText:(0,C.__)("Convert to HTML"),rawContent:e.originalContent,renderedContent:e.originalContent}),(0,re.jsx)(Bb,{title:(0,C.__)("After Conversion"),className:"block-editor-block-compare__converted",action:n,actionText:r,rawContent:a,renderedContent:i})]})},jb=e=>(0,l.rawHandler)({HTML:e.originalContent});function Eb({clientId:e}){const{block:t,canInsertHTMLBlock:n,canInsertClassicBlock:o}=(0,c.useSelect)((t=>{const{canInsertBlockType:n,getBlock:o,getBlockRootClientId:r}=t(_i),i=r(e);return{block:o(e),canInsertHTMLBlock:n("core/html",i),canInsertClassicBlock:n("core/freeform",i)}}),[e]),{replaceBlock:r}=(0,c.useDispatch)(_i),[i,s]=(0,a.useState)(!1),u=(0,a.useCallback)((()=>s(!1)),[]),d=(0,a.useMemo)((()=>({toClassic(){const e=(0,l.createBlock)("core/freeform",{content:t.originalContent});return r(t.clientId,e)},toHTML(){const e=(0,l.createBlock)("core/html",{content:t.originalContent});return r(t.clientId,e)},toBlocks(){const e=jb(t);return r(t.clientId,e)},toRecoveredBlock(){const e=(0,l.createBlock)(t.name,t.attributes,t.innerBlocks);return r(t.clientId,e)}})),[t,r]),p=(0,a.useMemo)((()=>[{ -// translators: Button to fix block content -title:(0,C._x)("Resolve","imperative verb"),onClick:()=>s(!0)},n&&{title:(0,C.__)("Convert to HTML"),onClick:d.toHTML},o&&{title:(0,C.__)("Convert to Classic Block"),onClick:d.toClassic}].filter(Boolean)),[n,o,d]);return(0,re.jsxs)(re.Fragment,{children:[(0,re.jsx)(xb,{actions:[(0,re.jsx)(fs.Button,{__next40pxDefaultSize:!0,onClick:d.toRecoveredBlock,variant:"primary",children:(0,C.__)("Attempt recovery")},"recover")],secondaryActions:p,children:(0,C.__)("Block contains unexpected or invalid content.")}),i&&(0,re.jsx)(fs.Modal,{title: -// translators: Dialog title to fix block content -// translators: Dialog title to fix block content -(0,C.__)("Resolve Block"),onRequestClose:u,className:"block-editor-block-compare",children:(0,re.jsx)(Ib,{block:t,onKeep:d.toHTML,onConvert:d.toBlocks,convertor:jb,convertButtonText:(0,C.__)("Convert to Blocks")})})]})}const Tb=(0,re.jsx)(xb,{className:"block-editor-block-list__block-crash-warning",children:(0,C.__)("This block has encountered an error and cannot be previewed.")}),Mb=()=>Tb;class Pb extends a.Component{constructor(){super(...arguments),this.state={hasError:!1}}componentDidCatch(){this.setState({hasError:!0})}render(){return this.state.hasError?this.props.fallback:this.props.children}}const Rb=Pb;var Nb=n(4132);const Lb=function({clientId:e}){const[t,n]=(0,a.useState)(""),o=(0,c.useSelect)((t=>t(_i).getBlock(e)),[e]),{updateBlock:r}=(0,c.useDispatch)(_i);return(0,a.useEffect)((()=>{n((0,l.getBlockContent)(o))}),[o]),(0,re.jsx)(Nb.A,{className:"block-editor-block-list__block-html-textarea",value:t,onBlur:()=>{const i=(0,l.getBlockType)(o.name);if(!i)return;const s=(0,l.getBlockAttributes)(i,t,o.attributes),a=t||(0,l.getSaveContent)(i,s),[c]=t?(0,l.validateBlock)({...o,attributes:s,originalContent:a}):[!0];r(e,{attributes:s,originalContent:a,isValid:c}),t||n(a)},onChange:e=>n(e.target.value)})};let Ab=Qb();const Ob=e=>Zb(e,Ab);let Db=Qb();Ob.write=e=>Zb(e,Db);let zb=Qb();Ob.onStart=e=>Zb(e,zb);let Vb=Qb();Ob.onFrame=e=>Zb(e,Vb);let Fb=Qb();Ob.onFinish=e=>Zb(e,Fb);let Hb=[];Ob.setTimeout=(e,t)=>{let n=Ob.now()+t,o=()=>{let e=Hb.findIndex((e=>e.cancel==o));~e&&Hb.splice(e,1),Wb-=~e?1:0},r={time:n,handler:e,cancel:o};return Hb.splice(Gb(n),0,r),Wb+=1,qb(),r};let Gb=e=>~(~Hb.findIndex((t=>t.time>e))||~Hb.length);Ob.cancel=e=>{zb.delete(e),Vb.delete(e),Fb.delete(e),Ab.delete(e),Db.delete(e)},Ob.sync=e=>{Kb=!0,Ob.batchedUpdates(e),Kb=!1},Ob.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function o(...e){t=e,Ob.onStart(n)}return o.handler=e,o.cancel=()=>{zb.delete(n),t=null},o};let $b="undefined"!=typeof window?window.requestAnimationFrame:()=>{};Ob.use=e=>$b=e,Ob.now="undefined"!=typeof performance?()=>performance.now():Date.now,Ob.batchedUpdates=e=>e(),Ob.catch=console.error,Ob.frameLoop="always",Ob.advance=()=>{"demand"!==Ob.frameLoop?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):Xb()};let Ub=-1,Wb=0,Kb=!1;function Zb(e,t){Kb?(t.delete(e),e(0)):(t.add(e),qb())}function qb(){Ub<0&&(Ub=0,"demand"!==Ob.frameLoop&&$b(Yb))}function Yb(){~Ub&&($b(Yb),Ob.batchedUpdates(Xb))}function Xb(){let e=Ub;Ub=Ob.now();let t=Gb(Ub);t&&(Jb(Hb.splice(0,t),(e=>e.handler())),Wb-=t),Wb?(zb.flush(),Ab.flush(e?Math.min(64,Ub-e):16.667),Vb.flush(),Db.flush(),Fb.flush()):Ub=-1}function Qb(){let e=new Set,t=e;return{add(n){Wb+=t!=e||e.has(n)?0:1,e.add(n)},delete:n=>(Wb-=t==e&&e.has(n)?1:0,e.delete(n)),flush(n){t.size&&(e=new Set,Wb-=t.size,Jb(t,(t=>t(n)&&e.add(t))),Wb+=e.size,t=e)}}}function Jb(e,t){e.forEach((e=>{try{t(e)}catch(e){Ob.catch(e)}}))}function ek(){}const tk={arr:Array.isArray,obj:e=>!!e&&"Object"===e.constructor.name,fun:e=>"function"==typeof e,str:e=>"string"==typeof e,num:e=>"number"==typeof e,und:e=>void 0===e};function nk(e,t){if(tk.arr(e)){if(!tk.arr(t)||e.length!==t.length)return!1;for(let n=0;ne.forEach(t);function rk(e,t,n){if(tk.arr(e))for(let o=0;otk.und(e)?[]:tk.arr(e)?e:[e];function sk(e,t){if(e.size){const n=Array.from(e);e.clear(),ok(n,t)}}const lk=(e,...t)=>sk(e,(e=>e(...t))),ak=()=>"undefined"==typeof window||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent);let ck,uk,dk=null,pk=!1,hk=ek;var gk=Object.freeze({__proto__:null,get createStringInterpolator(){return ck},get to(){return uk},get colors(){return dk},get skipAnimation(){return pk},get willAdvance(){return hk},assign:e=>{e.to&&(uk=e.to),e.now&&(Ob.now=e.now),void 0!==e.colors&&(dk=e.colors),null!=e.skipAnimation&&(pk=e.skipAnimation),e.createStringInterpolator&&(ck=e.createStringInterpolator),e.requestAnimationFrame&&Ob.use(e.requestAnimationFrame),e.batchedUpdates&&(Ob.batchedUpdates=e.batchedUpdates),e.willAdvance&&(hk=e.willAdvance),e.frameLoop&&(Ob.frameLoop=e.frameLoop)}});const mk=new Set;let fk=[],bk=[],kk=0;const vk={get idle(){return!mk.size&&!fk.length},start(e){kk>e.priority?(mk.add(e),Ob.onStart(_k)):(xk(e),Ob(Sk))},advance:Sk,sort(e){if(kk)Ob.onFrame((()=>vk.sort(e)));else{const t=fk.indexOf(e);~t&&(fk.splice(t,1),yk(e))}},clear(){fk=[],mk.clear()}};function _k(){mk.forEach(xk),mk.clear(),Ob(Sk)}function xk(e){fk.includes(e)||yk(e)}function yk(e){fk.splice(function(t){const n=t.findIndex((t=>t.priority>e.priority));return n<0?t.length:n}(fk),0,e)}function Sk(e){const t=bk;for(let n=0;n0}const wk="[-+]?\\d*\\.?\\d+",Ck=wk+"%";function Bk(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}const Ik=new RegExp("rgb"+Bk(wk,wk,wk)),jk=new RegExp("rgba"+Bk(wk,wk,wk,wk)),Ek=new RegExp("hsl"+Bk(wk,Ck,Ck)),Tk=new RegExp("hsla"+Bk(wk,Ck,Ck,wk)),Mk=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Pk=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Rk=/^#([0-9a-fA-F]{6})$/,Nk=/^#([0-9a-fA-F]{8})$/;function Lk(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Ak(e,t,n){const o=n<.5?n*(1+t):n+t-n*t,r=2*n-o,i=Lk(r,o,e+1/3),s=Lk(r,o,e),l=Lk(r,o,e-1/3);return Math.round(255*i)<<24|Math.round(255*s)<<16|Math.round(255*l)<<8}function Ok(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function Dk(e){return(parseFloat(e)%360+360)%360/360}function zk(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function Vk(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function Fk(e){let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=Rk.exec(e))?parseInt(t[1]+"ff",16)>>>0:dk&&void 0!==dk[e]?dk[e]:(t=Ik.exec(e))?(Ok(t[1])<<24|Ok(t[2])<<16|Ok(t[3])<<8|255)>>>0:(t=jk.exec(e))?(Ok(t[1])<<24|Ok(t[2])<<16|Ok(t[3])<<8|zk(t[4]))>>>0:(t=Mk.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=Nk.exec(e))?parseInt(t[1],16)>>>0:(t=Pk.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=Ek.exec(e))?(255|Ak(Dk(t[1]),Vk(t[2]),Vk(t[3])))>>>0:(t=Tk.exec(e))?(Ak(Dk(t[1]),Vk(t[2]),Vk(t[3]))|zk(t[4]))>>>0:null}(e);return null===t?e:(t=t||0,`rgba(${(4278190080&t)>>>24}, ${(16711680&t)>>>16}, ${(65280&t)>>>8}, ${(255&t)/255})`)}const Hk=(e,t,n)=>{if(tk.fun(e))return e;if(tk.arr(e))return Hk({range:e,output:t,extrapolate:n});if(tk.str(e.output[0]))return ck(e);const o=e,r=o.output,i=o.range||[0,1],s=o.extrapolateLeft||o.extrapolate||"extend",l=o.extrapolateRight||o.extrapolate||"extend",a=o.easing||(e=>e);return e=>{const t=function(e,t){for(var n=1;n=e);++n);return n-1}(e,i);return function(e,t,n,o,r,i,s,l,a){let c=a?a(e):e;if(cn){if("identity"===l)return c;"clamp"===l&&(c=n)}return o===r?o:t===n?e<=t?o:r:(t===-1/0?c=-c:n===1/0?c-=t:c=(c-t)/(n-t),c=i(c),o===-1/0?c=-c:r===1/0?c+=o:c=c*(r-o)+o,c)}(e,i[t],i[t+1],r[t],r[t+1],a,s,l,o.map)}};function Gk(){return Gk=Object.assign?Object.assign.bind():function(e){for(var t=1;tBoolean(e&&e[$k]),Kk=e=>e&&e[$k]?e[$k]():e,Zk=e=>e[Uk]||null;function qk(e,t){let n=e[Uk];n&&n.forEach((e=>{!function(e,t){e.eventObserved?e.eventObserved(t):e(t)}(e,t)}))}class Yk{constructor(e){if(this[$k]=void 0,this[Uk]=void 0,!e&&!(e=this.get))throw Error("Unknown getter");Xk(this,e)}}const Xk=(e,t)=>ev(e,$k,t);function Qk(e,t){if(e[$k]){let n=e[Uk];n||ev(e,Uk,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function Jk(e,t){let n=e[Uk];if(n&&n.has(t)){const o=n.size-1;o?n.delete(t):e[Uk]=null,e.observerRemoved&&e.observerRemoved(o,t)}}const ev=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),tv=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,nv=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,ov=new RegExp(`(${tv.source})(%|[a-z]+)`,"i"),rv=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,iv=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,sv=e=>{const[t,n]=lv(e);if(!t||ak())return e;const o=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(o)return o.trim();if(n&&n.startsWith("--")){return window.getComputedStyle(document.documentElement).getPropertyValue(n)||e}return n&&iv.test(n)?sv(n):n||e},lv=e=>{const t=iv.exec(e);if(!t)return[,];const[,n,o]=t;return[n,o]};let av;const cv=(e,t,n,o,r)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(o)}, ${r})`,uv=e=>{av||(av=dk?new RegExp(`(${Object.keys(dk).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map((e=>Kk(e).replace(iv,sv).replace(nv,Fk).replace(av,Fk))),n=t.map((e=>e.match(tv).map(Number))),o=n[0].map(((e,t)=>n.map((e=>{if(!(t in e))throw Error('The arity of each "output" value must be equal');return e[t]})))),r=o.map((t=>Hk(Gk({},e,{output:t}))));return e=>{var n;const o=!ov.test(t[0])&&(null==(n=t.find((e=>ov.test(e))))?void 0:n.replace(tv,""));let i=0;return t[0].replace(tv,(()=>`${r[i++](e)}${o||""}`)).replace(rv,cv)}},dv="react-spring: ",pv=e=>{const t=e;let n=!1;if("function"!=typeof t)throw new TypeError(`${dv}once requires a function parameter`);return(...e)=>{n||(t(...e),n=!0)}},hv=pv(console.warn);function gv(e){return tk.str(e)&&("#"==e[0]||/\d/.test(e)||!ak()&&iv.test(e)||e in(dk||{}))}pv(console.warn);const mv=ak()?$a.useEffect:$a.useLayoutEffect;const fv=[],bv=Symbol.for("Animated:node"),kv=e=>e&&e[bv],vv=(e,t)=>{return n=e,o=bv,r=t,Object.defineProperty(n,o,{value:r,writable:!0,configurable:!0});var n,o,r},_v=e=>e&&e[bv]&&e[bv].getPayload();class xv{constructor(){this.payload=void 0,vv(this,this)}getPayload(){return this.payload||[]}}class yv extends xv{constructor(e){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=e,tk.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new yv(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return tk.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value!==e&&(this._value=e,!0)}reset(){const{done:e}=this;this.done=!1,tk.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}}class Sv extends yv{constructor(e){super(0),this._string=null,this._toString=void 0,this._toString=Hk({output:[e,e]})}static create(e){return new Sv(e)}getValue(){let e=this._string;return null==e?this._string=this._toString(this._value):e}setValue(e){if(tk.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else{if(!super.setValue(e))return!1;this._string=null}return!0}reset(e){e&&(this._toString=Hk({output:[this.getValue(),e]})),this._value=0,super.reset()}}const wv={dependencies:null};class Cv extends xv{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return rk(this.source,((n,o)=>{var r;(r=n)&&r[bv]===r?t[o]=n.getValue(e):Wk(n)?t[o]=Kk(n):e||(t[o]=n)})),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&ok(this.payload,(e=>e.reset()))}_makePayload(e){if(e){const t=new Set;return rk(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){wv.dependencies&&Wk(e)&&wv.dependencies.add(e);const t=_v(e);t&&ok(t,(e=>this.add(e)))}}class Bv extends Cv{constructor(e){super(e)}static create(e){return new Bv(e)}getValue(){return this.source.map((e=>e.getValue()))}setValue(e){const t=this.getPayload();return e.length==t.length?t.map(((t,n)=>t.setValue(e[n]))).some(Boolean):(super.setValue(e.map(Iv)),!0)}}function Iv(e){return(gv(e)?Sv:yv).create(e)}function jv(e){const t=kv(e);return t?t.constructor:tk.arr(e)?Bv:gv(e)?Sv:yv}function Ev(){return Ev=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const n=!tk.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,$a.forwardRef)(((o,r)=>{const i=(0,$a.useRef)(null),s=n&&(0,$a.useCallback)((e=>{i.current=function(e,t){return e&&(tk.fun(e)?e(t):e.current=t),t}(r,e)}),[r]),[l,a]=function(e,t){const n=new Set;return wv.dependencies=n,e.style&&(e=Ev({},e,{style:t.createAnimatedStyle(e.style)})),e=new Cv(e),wv.dependencies=null,[e,n]}(o,t),c=function(){const e=(0,$a.useState)()[1],t=(()=>{const e=(0,$a.useRef)(!1);return mv((()=>(e.current=!0,()=>{e.current=!1})),[]),e})();return()=>{t.current&&e(Math.random())}}(),u=()=>{const e=i.current;n&&!e||!1===(!!e&&t.applyAnimatedValues(e,l.getValue(!0)))&&c()},d=new Mv(u,a),p=(0,$a.useRef)();var h;mv((()=>(p.current=d,ok(a,(e=>Qk(e,d))),()=>{p.current&&(ok(p.current.deps,(e=>Jk(e,p.current))),Ob.cancel(p.current.update))}))),(0,$a.useEffect)(u,[]),h=()=>()=>{const e=p.current;ok(e.deps,(t=>Jk(t,e)))},(0,$a.useEffect)(h,fv);const g=t.getComponentProps(l.getValue());return $a.createElement(e,Ev({},g,{ref:s}))}))};class Mv{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){"change"==e.type&&Ob.write(this.update)}}const Pv=Symbol.for("AnimatedComponent"),Rv=e=>tk.str(e)?e:e&&tk.str(e.displayName)?e.displayName:tk.fun(e)&&e.name||null;function Nv(){return Nv=Object.assign?Object.assign.bind():function(e){for(var t=1;t!0===e||!!(t&&e&&(tk.fun(e)?e(t):ik(e).includes(t))),Ov=(e,t)=>tk.obj(e)?t&&e[t]:e,Dv=(e,t)=>!0===e.default?e[t]:e.default?e.default[t]:void 0,zv=e=>e,Vv=(e,t=zv)=>{let n=Fv;e.default&&!0!==e.default&&(e=e.default,n=Object.keys(e));const o={};for(const r of n){const n=t(e[r],r);tk.und(n)||(o[r]=n)}return o},Fv=["config","onProps","onStart","onChange","onPause","onResume","onRest"],Hv={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 Gv(e){const t=function(e){const t={};let n=0;if(rk(e,((e,o)=>{Hv[o]||(t[o]=e,n++)})),n)return t}(e);if(t){const n={to:t};return rk(e,((e,o)=>o in t||(n[o]=e))),n}return Nv({},e)}function $v(e){return e=Kk(e),tk.arr(e)?e.map($v):gv(e)?gk.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function Uv(e){return tk.fun(e)||tk.arr(e)&&tk.obj(e[0])}const Wv=1.70158,Kv=1.525*Wv,Zv=Wv+1,qv=2*Math.PI/3,Yv=2*Math.PI/4.5,Xv=e=>{const t=7.5625,n=2.75;return e<1/n?t*e*e:e<2/n?t*(e-=1.5/n)*e+.75:e<2.5/n?t*(e-=2.25/n)*e+.9375:t*(e-=2.625/n)*e+.984375},Qv={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=>0===e?0:Math.pow(2,10*e-10),easeOutExpo:e=>1===e?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>0===e?0:1===e?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=>Zv*e*e*e-Wv*e*e,easeOutBack:e=>1+Zv*Math.pow(e-1,3)+Wv*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*(7.189819*e-Kv)/2:(Math.pow(2*e-2,2)*((Kv+1)*(2*e-2)+Kv)+2)/2,easeInElastic:e=>0===e?0:1===e?1:-Math.pow(2,10*e-10)*Math.sin((10*e-10.75)*qv),easeOutElastic:e=>0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin((10*e-.75)*qv)+1,easeInOutElastic:e=>0===e?0:1===e?1:e<.5?-Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*Yv)/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*Yv)/2+1,easeInBounce:e=>1-Xv(1-e),easeOutBounce:Xv,easeInOutBounce:e=>e<.5?(1-Xv(1-2*e))/2:(1+Xv(2*e-1))/2},Jv=Nv({},{tension:170,friction:26},{mass:1,damping:1,easing:Qv.linear,clamp:!1});class e_{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,Jv)}}function t_(e,t){if(tk.und(t.decay)){const n=!tk.und(t.tension)||!tk.und(t.friction);!n&&tk.und(t.frequency)&&tk.und(t.damping)&&tk.und(t.mass)||(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}else e.duration=void 0}const n_=[];class o_{constructor(){this.changed=!1,this.values=n_,this.toValues=null,this.fromValues=n_,this.to=void 0,this.from=void 0,this.config=new e_,this.immediate=!1}}function r_(e,{key:t,props:n,defaultProps:o,state:r,actions:i}){return new Promise(((s,l)=>{var a;let c,u,d=Av(null!=(a=n.cancel)?a:null==o?void 0:o.cancel,t);if(d)g();else{tk.und(n.pause)||(r.paused=Av(n.pause,t));let e=null==o?void 0:o.pause;!0!==e&&(e=r.paused||Av(e,t)),c=Lv(n.delay||0,t),e?(r.resumeQueue.add(h),i.pause()):(i.resume(),h())}function p(){r.resumeQueue.add(h),r.timeouts.delete(u),u.cancel(),c=u.time-Ob.now()}function h(){c>0&&!gk.skipAnimation?(r.delayed=!0,u=Ob.setTimeout(g,c),r.pauseQueue.add(p),r.timeouts.add(u)):g()}function g(){r.delayed&&(r.delayed=!1),r.pauseQueue.delete(p),r.timeouts.delete(u),e<=(r.cancelId||0)&&(d=!0);try{i.start(Nv({},n,{callId:e,cancel:d}),s)}catch(e){l(e)}}}))}const i_=(e,t)=>1==t.length?t[0]:t.some((e=>e.cancelled))?a_(e.get()):t.every((e=>e.noop))?s_(e.get()):l_(e.get(),t.every((e=>e.finished))),s_=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),l_=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),a_=e=>({value:e,cancelled:!0,finished:!1});function c_(e,t,n,o){const{callId:r,parentId:i,onRest:s}=t,{asyncTo:l,promise:a}=n;return i||e!==l||t.reset?n.promise=(async()=>{n.asyncId=r,n.asyncTo=e;const c=Vv(t,((e,t)=>"onRest"===t?void 0:e));let u,d;const p=new Promise(((e,t)=>(u=e,d=t))),h=e=>{const t=r<=(n.cancelId||0)&&a_(o)||r!==n.asyncId&&l_(o,!1);if(t)throw e.result=t,d(e),e},g=(e,t)=>{const i=new d_,s=new p_;return(async()=>{if(gk.skipAnimation)throw u_(n),s.result=l_(o,!1),d(s),s;h(i);const l=tk.obj(e)?Nv({},e):Nv({},t,{to:e});l.parentId=r,rk(c,((e,t)=>{tk.und(l[t])&&(l[t]=e)}));const a=await o.start(l);return h(i),n.paused&&await new Promise((e=>{n.resumeQueue.add(e)})),a})()};let m;if(gk.skipAnimation)return u_(n),l_(o,!1);try{let t;t=tk.arr(e)?(async e=>{for(const t of e)await g(t)})(e):Promise.resolve(e(g,o.stop.bind(o))),await Promise.all([t.then(u),p]),m=l_(o.get(),!0,!1)}catch(e){if(e instanceof d_)m=e.result;else{if(!(e instanceof p_))throw e;m=e.result}}finally{r==n.asyncId&&(n.asyncId=i,n.asyncTo=i?l:void 0,n.promise=i?a:void 0)}return tk.fun(s)&&Ob.batchedUpdates((()=>{s(m,o,o.item)})),m})():a}function u_(e,t){sk(e.timeouts,(e=>e.cancel())),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}class d_ 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}}class p_ extends Error{constructor(){super("SkipAnimationSignal"),this.result=void 0}}const h_=e=>e instanceof m_;let g_=1;class m_ extends Yk{constructor(...e){super(...e),this.id=g_++,this.key=void 0,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=kv(this);return e&&e.getValue()}to(...e){return gk.to(this,e)}interpolate(...e){return hv(`${dv}The "interpolate" function is deprecated in v9 (use "to" instead)`),gk.to(this,e)}toJSON(){return this.get()}observerAdded(e){1==e&&this._attach()}observerRemoved(e){0==e&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){qk(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||vk.sort(this),qk(this,{type:"priority",parent:this,priority:e})}}const f_=Symbol.for("SpringPhase"),b_=e=>(1&e[f_])>0,k_=e=>(2&e[f_])>0,v_=e=>(4&e[f_])>0,x_=(e,t)=>t?e[f_]|=3:e[f_]&=-3,y_=(e,t)=>t?e[f_]|=4:e[f_]&=-5;class S_ extends m_{constructor(e,t){if(super(),this.key=void 0,this.animation=new o_,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,!tk.und(e)||!tk.und(t)){const n=tk.obj(e)?Nv({},e):Nv({},t,{from:e});tk.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(k_(this)||this._state.asyncTo)||v_(this)}get goal(){return Kk(this.animation.to)}get velocity(){const e=kv(this);return e instanceof yv?e.lastVelocity||0:e.getPayload().map((e=>e.lastVelocity||0))}get hasAnimated(){return b_(this)}get isAnimating(){return k_(this)}get isPaused(){return v_(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1;const o=this.animation;let{config:r,toValues:i}=o;const s=_v(o.to);!s&&Wk(o.to)&&(i=ik(Kk(o.to))),o.values.forEach(((l,a)=>{if(l.done)return;const c=l.constructor==Sv?1:s?s[a].lastPosition:i[a];let u=o.immediate,d=c;if(!u){if(d=l.lastPosition,r.tension<=0)return void(l.done=!0);let t=l.elapsedTime+=e;const n=o.fromValues[a],i=null!=l.v0?l.v0:l.v0=tk.arr(r.velocity)?r.velocity[a]:r.velocity;let s;const p=r.precision||(n==c?.005:Math.min(1,.001*Math.abs(c-n)));if(tk.und(r.duration))if(r.decay){const e=!0===r.decay?.998:r.decay,o=Math.exp(-(1-e)*t);d=n+i/(1-e)*(1-o),u=Math.abs(l.lastPosition-d)<=p,s=i*o}else{s=null==l.lastVelocity?i:l.lastVelocity;const t=r.restVelocity||p/10,o=r.clamp?0:r.bounce,a=!tk.und(o),h=n==c?l.v0>0:nt,g||(u=Math.abs(c-d)<=p,!u));++e)a&&(m=d==c||d>c==h,m&&(s=-s*o,d=c)),s+=(1e-6*-r.tension*(d-c)+.001*-r.friction*s)/r.mass*f,d+=s*f}else{let o=1;r.duration>0&&(this._memoizedDuration!==r.duration&&(this._memoizedDuration=r.duration,l.durationProgress>0&&(l.elapsedTime=r.duration*l.durationProgress,t=l.elapsedTime+=e)),o=(r.progress||0)+t/this._memoizedDuration,o=o>1?1:o<0?0:o,l.durationProgress=o),d=n+r.easing(o)*(c-n),s=(d-l.lastPosition)/e,u=1==o}l.lastVelocity=s,Number.isNaN(d)&&(console.warn("Got NaN while animating:",this),u=!0)}s&&!s[a].done&&(u=!1),u?l.done=!0:t=!1,l.setValue(d,r.round)&&(n=!0)}));const l=kv(this),a=l.getValue();if(t){const e=Kk(o.to);a===e&&!n||r.decay?n&&r.decay&&this._onChange(a):(l.setValue(e),this._onChange(e)),this._stop()}else n&&this._onChange(a)}set(e){return Ob.batchedUpdates((()=>{this._stop(),this._focus(e),this._set(e)})),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(k_(this)){const{to:e,config:t}=this.animation;Ob.batchedUpdates((()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()}))}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let n;return tk.und(e)?(n=this.queue||[],this.queue=[]):n=[tk.obj(e)?e:Nv({},t,{to:e})],Promise.all(n.map((e=>this._update(e)))).then((e=>i_(this,e)))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),u_(this._state,e&&this._lastCallId),Ob.batchedUpdates((()=>this._stop(t,e))),this}reset(){this._update({reset:!0})}eventObserved(e){"change"==e.type?this._start():"priority"==e.type&&(this.priority=e.priority+1)}_prepareNode(e){const t=this.key||"";let{to:n,from:o}=e;n=tk.obj(n)?n[t]:n,(null==n||Uv(n))&&(n=void 0),o=tk.obj(o)?o[t]:o,null==o&&(o=void 0);const r={to:n,from:o};return b_(this)||(e.reverse&&([n,o]=[o,n]),o=Kk(o),tk.und(o)?kv(this)||this._set(n):this._set(o)),r}_update(e,t){let n=Nv({},e);const{key:o,defaultProps:r}=this;n.default&&Object.assign(r,Vv(n,((e,t)=>/^on/.test(t)?Ov(e,o):e))),E_(this,n,"onProps"),T_(this,"onProps",n,this);const i=this._prepareNode(n);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?");const s=this._state;return r_(++this._lastCallId,{key:o,props:n,defaultProps:r,state:s,actions:{pause:()=>{v_(this)||(y_(this,!0),lk(s.pauseQueue),T_(this,"onPause",l_(this,w_(this,this.animation.to)),this))},resume:()=>{v_(this)&&(y_(this,!1),k_(this)&&this._resume(),lk(s.resumeQueue),T_(this,"onResume",l_(this,w_(this,this.animation.to)),this))},start:this._merge.bind(this,i)}}).then((e=>{if(n.loop&&e.finished&&(!t||!e.noop)){const e=C_(n);if(e)return this._update(e,!0)}return e}))}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(a_(this));const o=!tk.und(e.to),r=!tk.und(e.from);if(o||r){if(!(t.callId>this._lastToId))return n(a_(this));this._lastToId=t.callId}const{key:i,defaultProps:s,animation:l}=this,{to:a,from:c}=l;let{to:u=a,from:d=c}=e;!r||o||t.default&&!tk.und(u)||(u=d),t.reverse&&([u,d]=[d,u]);const p=!nk(d,c);p&&(l.from=d),d=Kk(d);const h=!nk(u,a);h&&this._focus(u);const g=Uv(t.to),{config:m}=l,{decay:f,velocity:b}=m;(o||r)&&(m.velocity=0),t.config&&!g&&function(e,t,n){n&&(t_(n=Nv({},n),t),t=Nv({},n,t)),t_(e,t),Object.assign(e,t);for(const t in Jv)null==e[t]&&(e[t]=Jv[t]);let{mass:o,frequency:r,damping:i}=e;tk.und(r)||(r<.01&&(r=.01),i<0&&(i=0),e.tension=Math.pow(2*Math.PI/r,2)*o,e.friction=4*Math.PI*i*o/r)}(m,Lv(t.config,i),t.config!==s.config?Lv(s.config,i):void 0);let k=kv(this);if(!k||tk.und(u))return n(l_(this,!0));const v=tk.und(t.reset)?r&&!t.default:!tk.und(d)&&Av(t.reset,i),_=v?d:this.get(),x=$v(u),y=tk.num(x)||tk.arr(x)||gv(x),S=!g&&(!y||Av(s.immediate||t.immediate,i));if(h){const e=jv(u);if(e!==k.constructor){if(!S)throw Error(`Cannot animate between ${k.constructor.name} and ${e.name}, as the "to" prop suggests`);k=this._set(x)}}const w=k.constructor;let C=Wk(u),B=!1;if(!C){const e=v||!b_(this)&&p;(h||e)&&(B=nk($v(_),x),C=!B),(nk(l.immediate,S)||S)&&nk(m.decay,f)&&nk(m.velocity,b)||(C=!0)}if(B&&k_(this)&&(l.changed&&!v?C=!0:C||this._stop(a)),!g&&((C||Wk(a))&&(l.values=k.getPayload(),l.toValues=Wk(u)?null:w==Sv?[1]:ik(x)),l.immediate!=S&&(l.immediate=S,S||v||this._set(a)),C)){const{onRest:e}=l;ok(j_,(e=>E_(this,t,e)));const o=l_(this,w_(this,a));lk(this._pendingCalls,o),this._pendingCalls.add(n),l.changed&&Ob.batchedUpdates((()=>{l.changed=!v,null==e||e(o,this),v?Lv(s.onRest,o):null==l.onStart||l.onStart(o,this)}))}v&&this._set(_),g?n(c_(t.to,t,this._state,this)):C?this._start():k_(this)&&!h?this._pendingCalls.add(n):n(s_(_))}_focus(e){const t=this.animation;e!==t.to&&(Zk(this)&&this._detach(),t.to=e,Zk(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;Wk(t)&&(Qk(t,this),h_(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;Wk(e)&&Jk(e,this)}_set(e,t=!0){const n=Kk(e);if(!tk.und(n)){const e=kv(this);if(!e||!nk(n,e.getValue())){const o=jv(n);e&&e.constructor==o?e.setValue(n):vv(this,o.create(n)),e&&Ob.batchedUpdates((()=>{this._onChange(n,t)}))}}return kv(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,T_(this,"onStart",l_(this,w_(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),Lv(this.animation.onChange,e,this)),Lv(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;kv(this).reset(Kk(e.to)),e.immediate||(e.fromValues=e.values.map((e=>e.lastPosition))),k_(this)||(x_(this,!0),v_(this)||this._resume())}_resume(){gk.skipAnimation?this.finish():vk.start(this)}_stop(e,t){if(k_(this)){x_(this,!1);const n=this.animation;ok(n.values,(e=>{e.done=!0})),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),qk(this,{type:"idle",parent:this});const o=t?a_(this.get()):l_(this.get(),w_(this,null!=e?e:n.to));lk(this._pendingCalls,o),n.changed&&(n.changed=!1,T_(this,"onRest",o,this))}}}function w_(e,t){const n=$v(t);return nk($v(e.get()),n)}function C_(e,t=e.loop,n=e.to){let o=Lv(t);if(o){const r=!0!==o&&Gv(o),i=(r||e).reverse,s=!r||r.reset;return B_(Nv({},e,{loop:t,default:!1,pause:void 0,to:!i||Uv(n)?n:void 0,from:s?e.from:void 0,reset:s},r))}}function B_(e){const{to:t,from:n}=e=Gv(e),o=new Set;return tk.obj(t)&&I_(t,o),tk.obj(n)&&I_(n,o),e.keys=o.size?Array.from(o):null,e}function I_(e,t){rk(e,((e,n)=>null!=e&&t.add(n)))}const j_=["onStart","onRest","onChange","onPause","onResume"];function E_(e,t,n){e.animation[n]=t[n]!==Dv(t,n)?Ov(t[n],e.key):void 0}function T_(e,t,...n){var o,r,i,s;null==(o=(r=e.animation)[t])||o.call(r,...n),null==(i=(s=e.defaultProps)[t])||i.call(s,...n)}const M_=["onStart","onChange","onRest"];let P_=1;class R_{constructor(e,t){this.id=P_++,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),t&&(this._flush=t),e&&this.start(Nv({default:!0},e))}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every((e=>e.idle&&!e.isDelayed&&!e.isPaused))}get item(){return this._item}set item(e){this._item=e}get(){const e={};return this.each(((t,n)=>e[n]=t.get())),e}set(e){for(const t in e){const n=e[t];tk.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(B_(e)),this}start(e){let{queue:t}=this;return e?t=ik(e).map(B_):this.queue=[],this._flush?this._flush(this,t):(L_(this,t),function(e,t){return Promise.all(t.map((t=>N_(e,t)))).then((t=>i_(e,t)))}(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){const n=this.springs;ok(ik(t),(t=>n[t].stop(!!e)))}else u_(this._state,this._lastAsyncId),this.each((t=>t.stop(!!e)));return this}pause(e){if(tk.und(e))this.start({pause:!0});else{const t=this.springs;ok(ik(e),(e=>t[e].pause()))}return this}resume(e){if(tk.und(e))this.start({pause:!1});else{const t=this.springs;ok(ik(e),(e=>t[e].resume()))}return this}each(e){rk(this.springs,e)}_onFrame(){const{onStart:e,onChange:t,onRest:n}=this._events,o=this._active.size>0,r=this._changed.size>0;(o&&!this._started||r&&!this._started)&&(this._started=!0,sk(e,(([e,t])=>{t.value=this.get(),e(t,this,this._item)})));const i=!o&&this._started,s=r||i&&n.size?this.get():null;r&&t.size&&sk(t,(([e,t])=>{t.value=s,e(t,this,this._item)})),i&&(this._started=!1,sk(n,(([e,t])=>{t.value=s,e(t,this,this._item)})))}eventObserved(e){if("change"==e.type)this._changed.add(e.parent),e.idle||this._active.add(e.parent);else{if("idle"!=e.type)return;this._active.delete(e.parent)}Ob.onFrame(this._onFrame)}}async function N_(e,t,n){const{keys:o,to:r,from:i,loop:s,onRest:l,onResolve:a}=t,c=tk.obj(t.default)&&t.default;s&&(t.loop=!1),!1===r&&(t.to=null),!1===i&&(t.from=null);const u=tk.arr(r)||tk.fun(r)?r:void 0;u?(t.to=void 0,t.onRest=void 0,c&&(c.onRest=void 0)):ok(M_,(n=>{const o=t[n];if(tk.fun(o)){const r=e._events[n];t[n]=({finished:e,cancelled:t})=>{const n=r.get(o);n?(e||(n.finished=!1),t&&(n.cancelled=!0)):r.set(o,{value:null,finished:e||!1,cancelled:t||!1})},c&&(c[n]=t[n])}}));const d=e._state;t.pause===!d.paused?(d.paused=t.pause,lk(t.pause?d.pauseQueue:d.resumeQueue)):d.paused&&(t.pause=!0);const p=(o||Object.keys(e.springs)).map((n=>e.springs[n].start(t))),h=!0===t.cancel||!0===Dv(t,"cancel");(u||h&&d.asyncId)&&p.push(r_(++e._lastAsyncId,{props:t,state:d,actions:{pause:ek,resume:ek,start(t,n){h?(u_(d,e._lastAsyncId),n(a_(e))):(t.onRest=l,n(c_(u,t,d,e)))}}})),d.paused&&await new Promise((e=>{d.resumeQueue.add(e)}));const g=i_(e,await Promise.all(p));if(s&&g.finished&&(!n||!g.noop)){const n=C_(t,s,r);if(n)return L_(e,[n]),N_(e,n,!0)}return a&&Ob.batchedUpdates((()=>a(g,e,e.item))),g}function L_(e,t){ok(t,(t=>{!function(e,t,n){t.keys&&ok(t.keys,(o=>{(e[o]||(e[o]=n(o)))._prepareNode(t)}))}(e.springs,t,(t=>function(e,t){const n=new S_;return n.key=e,t&&Qk(n,t),n}(t,e)))}))}const A_=["children"],O_=e=>{let{children:t}=e,n=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,A_);const o=(0,$a.useContext)(D_),r=n.pause||!!o.pause,i=n.immediate||!!o.immediate;n=function(e,t){const[n]=(0,$a.useState)((()=>({inputs:t,result:e()}))),o=(0,$a.useRef)(),r=o.current;let i=r;if(i){const n=Boolean(t&&i.inputs&&function(e,t){if(e.length!==t.length)return!1;for(let n=0;n{o.current=i,r==n&&(n.inputs=n.result=void 0)}),[i]),i.result}((()=>({pause:r,immediate:i})),[r,i]);const{Provider:s}=D_;return $a.createElement(s,{value:n},t)},D_=(z_=O_,V_={},Object.assign(z_,$a.createContext(V_)),z_.Provider._context=z_,z_.Consumer._context=z_,z_);var z_,V_;let F_;O_.Provider=D_.Provider,O_.Consumer=D_.Consumer,function(e){e.MOUNT="mount",e.ENTER="enter",e.UPDATE="update",e.LEAVE="leave"}(F_||(F_={}));class H_ extends m_{constructor(e,t){super(),this.key=void 0,this.idle=!0,this.calc=void 0,this._active=new Set,this.source=e,this.calc=Hk(...t);const n=this._get(),o=jv(n);vv(this,o.create(n))}advance(e){const t=this._get();nk(t,this.get())||(kv(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&$_(this._active)&&U_(this)}_get(){const e=tk.arr(this.source)?this.source.map(Kk):ik(Kk(this.source));return this.calc(...e)}_start(){this.idle&&!$_(this._active)&&(this.idle=!1,ok(_v(this),(e=>{e.done=!1})),gk.skipAnimation?(Ob.batchedUpdates((()=>this.advance())),U_(this)):vk.start(this))}_attach(){let e=1;ok(ik(this.source),(t=>{Wk(t)&&Qk(t,this),h_(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))})),this.priority=e,this._start()}_detach(){ok(ik(this.source),(e=>{Wk(e)&&Jk(e,this)})),this._active.clear(),U_(this)}eventObserved(e){"change"==e.type?e.idle?this.advance():(this._active.add(e.parent),this._start()):"idle"==e.type?this._active.delete(e.parent):"priority"==e.type&&(this.priority=ik(this.source).reduce(((e,t)=>Math.max(e,(h_(t)?t.priority:0)+1)),0))}}function G_(e){return!1!==e.idle}function $_(e){return!e.size||Array.from(e).every(G_)}function U_(e){e.idle||(e.idle=!0,ok(_v(e),(e=>{e.done=!0})),qk(e,{type:"idle",parent:e}))}gk.assign({createStringInterpolator:uv,to:(e,t)=>new H_(e,t)}),vk.advance;const W_=window.ReactDOM;function K_(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}const Z_=["style","children","scrollTop","scrollLeft"],q_=/^--/;function Y_(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||q_.test(e)||Q_.hasOwnProperty(e)&&Q_[e]?(""+t).trim():t+"px"}const X_={};let Q_={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};const J_=["Webkit","Ms","Moz","O"];Q_=Object.keys(Q_).reduce(((e,t)=>(J_.forEach((n=>e[((e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1))(n,t)]=e[t])),e)),Q_);const ex=["x","y","z"],tx=/^(matrix|translate|scale|rotate|skew)/,nx=/^(translate)/,ox=/^(rotate|skew)/,rx=(e,t)=>tk.num(e)&&0!==e?e+t:e,ix=(e,t)=>tk.arr(e)?e.every((e=>ix(e,t))):tk.num(e)?e===t:parseFloat(e)===t;class sx extends Cv{constructor(e){let{x:t,y:n,z:o}=e,r=K_(e,ex);const i=[],s=[];(t||n||o)&&(i.push([t||0,n||0,o||0]),s.push((e=>[`translate3d(${e.map((e=>rx(e,"px"))).join(",")})`,ix(e,0)]))),rk(r,((e,t)=>{if("transform"===t)i.push([e||""]),s.push((e=>[e,""===e]));else if(tx.test(t)){if(delete r[t],tk.und(e))return;const n=nx.test(t)?"px":ox.test(t)?"deg":"";i.push(ik(e)),s.push("rotate3d"===t?([e,t,o,r])=>[`rotate3d(${e},${t},${o},${rx(r,n)})`,ix(r,0)]:e=>[`${t}(${e.map((e=>rx(e,n))).join(",")})`,ix(e,t.startsWith("scale")?1:0)])}})),i.length&&(r.transform=new lx(i,s)),super(r)}}class lx extends Yk{constructor(e,t){super(),this._value=null,this.inputs=e,this.transforms=t}get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return ok(this.inputs,((n,o)=>{const r=Kk(n[0]),[i,s]=this.transforms[o](tk.arr(r)?r:n.map(Kk));e+=" "+i,t=t&&s})),t?"none":e}observerAdded(e){1==e&&ok(this.inputs,(e=>ok(e,(e=>Wk(e)&&Qk(e,this)))))}observerRemoved(e){0==e&&ok(this.inputs,(e=>ok(e,(e=>Wk(e)&&Jk(e,this)))))}eventObserved(e){"change"==e.type&&(this._value=null),qk(this,e)}}const ax=["scrollTop","scrollLeft"];gk.assign({batchedUpdates:W_.unstable_batchedUpdates,createStringInterpolator:uv,colors:{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}});const cx=((e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=e=>new Cv(e),getComponentProps:o=e=>e}={})=>{const r={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:o},i=e=>{const t=Rv(e)||"Anonymous";return(e=tk.str(e)?i[e]||(i[e]=Tv(e,r)):e[Pv]||(e[Pv]=Tv(e,r))).displayName=`Animated(${t})`,e};return rk(e,((t,n)=>{tk.arr(e)&&(n=Rv(t)),i[n]=i(t)})),{animated:i}})(["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"],{applyAnimatedValues:function(e,t){if(!e.nodeType||!e.setAttribute)return!1;const n="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName,o=t,{style:r,children:i,scrollTop:s,scrollLeft:l}=o,a=K_(o,Z_),c=Object.values(a),u=Object.keys(a).map((t=>n||e.hasAttribute(t)?t:X_[t]||(X_[t]=t.replace(/([A-Z])/g,(e=>"-"+e.toLowerCase())))));void 0!==i&&(e.textContent=i);for(let t in r)if(r.hasOwnProperty(t)){const n=Y_(t,r[t]);q_.test(t)?e.style.setProperty(t,n):e.style[t]=n}u.forEach(((t,n)=>{e.setAttribute(t,c[n])})),void 0!==s&&(e.scrollTop=s),void 0!==l&&(e.scrollLeft=l)},createAnimatedStyle:e=>new sx(e),getComponentProps:e=>K_(e,ax)}),ux=cx.animated;function dx(e){return{top:e.offsetTop,left:e.offsetLeft}}const px=function({triggerAnimationOnChange:e,clientId:t}){const n=(0,a.useRef)(),{isTyping:o,getGlobalBlockCount:r,isBlockSelected:i,isFirstMultiSelectedBlock:s,isBlockMultiSelected:l,isAncestorMultiSelected:u,isDraggingBlocks:d}=(0,c.useSelect)(_i),{previous:p,prevRect:h}=(0,a.useMemo)((()=>({previous:n.current&&dx(n.current),prevRect:n.current&&n.current.getBoundingClientRect()})),[e]);return(0,a.useLayoutEffect)((()=>{if(!p||!n.current)return;const e=(0,Ta.getScrollContainer)(n.current),a=i(t),c=a||s(t),g=d();function m(){if(!g&&c&&h){const t=n.current.getBoundingClientRect().top-h.top;t&&(e.scrollTop+=t)}}if(window.matchMedia("(prefers-reduced-motion: reduce)").matches||o()||r()>200)return void m();const f=a||l(t)||u(t);if(f&&g)return;const b=f?"1":"",k=new R_({x:0,y:0,config:{mass:5,tension:2e3,friction:200},onChange({value:e}){if(!n.current)return;let{x:t,y:o}=e;t=Math.round(t),o=Math.round(o);const r=0===t&&0===o;n.current.style.transformOrigin="center center",n.current.style.transform=r?null:`translate3d(${t}px,${o}px,0)`,n.current.style.zIndex=b,m()}});n.current.style.transform=void 0;const v=dx(n.current),_=Math.round(p.left-v.left),x=Math.round(p.top-v.top);return k.start({x:0,y:0,from:{x:_,y:x}}),()=>{k.stop(),k.set({x:0,y:0})}}),[p,h,t,o,r,i,s,l,u,d]),n};function hx({clientId:e,initialPosition:t}){const n=(0,a.useRef)(),{isBlockSelected:o,isMultiSelecting:r,isZoomOut:i}=O((0,c.useSelect)(_i));return(0,a.useEffect)((()=>{if(!o(e)||r()||i())return;if(null==t)return;if(!n.current)return;const{ownerDocument:s}=n.current;if(om(n.current,s.activeElement))return;const l=Ta.focus.tabbable.find(n.current).filter((e=>(0,Ta.isTextField)(e))),a=-1===t,c=l[a?l.length-1:0]||n.current;if(om(n.current,c)){if(!n.current.getAttribute("contenteditable")){const e=Ta.focus.tabbable.findNext(n.current);if(e&&om(n.current,e)&&(0,Ta.isFormElement)(e))return void e.focus()}(0,Ta.placeCaretAtHorizontalEdge)(c,a)}else n.current.focus()}),[t,e]),n}function gx({clientId:e}){const{hoverBlock:t}=(0,c.useDispatch)(_i);function n(n){if(n.defaultPrevented)return;const o="mouseover"===n.type?"add":"remove";n.preventDefault(),n.currentTarget.classList[o]("is-hovered"),t("add"===o?e:null)}return(0,u.useRefEffect)((e=>(e.addEventListener("mouseout",n),e.addEventListener("mouseover",n),()=>{e.removeEventListener("mouseout",n),e.removeEventListener("mouseover",n),e.classList.remove("is-hovered"),t(null)})),[])}function mx(e){const{isBlockSelected:t}=(0,c.useSelect)(_i),{selectBlock:n,selectionChange:o}=(0,c.useDispatch)(_i);return(0,u.useRefEffect)((r=>{function i(i){r.parentElement.closest('[contenteditable="true"]')||(t(e)?i.target.isContentEditable||o(e):om(r,i.target)&&n(e))}return r.addEventListener("focusin",i),()=>{r.removeEventListener("focusin",i)}}),[t,n])}const fx=(0,re.jsx)(oe.SVG,{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,re.jsx)(oe.Path,{d:"M8 7h2V5H8v2zm0 6h2v-2H8v2zm0 6h2v-2H8v2zm6-14v2h2V5h-2zm0 8h2v-2h-2v2zm0 6h2v-2h-2v2z"})});function bx({count:e,icon:t,isPattern:n,fadeWhenDisabled:o}){const r=n&&(0,C.__)("Pattern");return(0,re.jsx)("div",{className:"block-editor-block-draggable-chip-wrapper",children:(0,re.jsx)("div",{className:"block-editor-block-draggable-chip","data-testid":"block-draggable-chip",children:(0,re.jsxs)(fs.Flex,{justify:"center",className:"block-editor-block-draggable-chip__content",children:[(0,re.jsx)(fs.FlexItem,{children:t?(0,re.jsx)(rb,{icon:t}):r||(0,C.sprintf)(/* translators: %d: Number of blocks. */ /* translators: %d: Number of blocks. */ -(0,C._n)("%d block","%d blocks",e),e)}),(0,re.jsx)(fs.FlexItem,{children:(0,re.jsx)(rb,{icon:fx})}),o&&(0,re.jsx)(fs.FlexItem,{className:"block-editor-block-draggable-chip__disabled",children:(0,re.jsx)("span",{className:"block-editor-block-draggable-chip__disabled-icon"})})]})})})}function kx({clientId:e,isSelected:t}){const{getBlockType:n}=(0,c.useSelect)(l.store),{getBlockRootClientId:o,isZoomOut:r,hasMultiSelection:i,getBlockName:s}=O((0,c.useSelect)(_i)),{insertAfterBlock:d,removeBlock:p,resetZoomLevel:h,startDraggingBlocks:g,stopDraggingBlocks:m}=O((0,c.useDispatch)(_i));return(0,u.useRefEffect)((l=>{if(t)return l.addEventListener("keydown",c),l.addEventListener("dragstart",u),()=>{l.removeEventListener("keydown",c),l.removeEventListener("dragstart",u)};function c(t){const{keyCode:n,target:o}=t;n!==Pa.ENTER&&n!==Pa.BACKSPACE&&n!==Pa.DELETE||o!==l||(0,Ta.isTextField)(o)||(t.preventDefault(),n===Pa.ENTER&&r()?h():n===Pa.ENTER?d(e):p(e))}function u(t){if(l!==t.target||l.isContentEditable||l.ownerDocument.activeElement!==l||i())return void t.preventDefault();const r=JSON.stringify({type:"block",srcClientIds:[e],srcRootClientId:o(e)});t.dataTransfer.effectAllowed="move",t.dataTransfer.clearData(),t.dataTransfer.setData("wp-blocks",r);const{ownerDocument:c}=l,{defaultView:u}=c;u.getSelection().removeAllRanges();const d=document.createElement("div");(0,a.createRoot)(d).render((0,re.jsx)(bx,{icon:n(s(e)).icon})),document.body.appendChild(d),d.style.position="absolute",d.style.top="0",d.style.left="0",d.style.zIndex="1000",d.style.pointerEvents="none";const p=c.createElement("div");p.style.width="1px",p.style.height="1px",p.style.position="fixed",p.style.visibility="hidden",c.body.appendChild(p),t.dataTransfer.setDragImage(p,0,0);let h={x:0,y:0};if(document!==c){const e=u.frameElement;if(e){const t=e.getBoundingClientRect();h={x:t.left,y:t.top}}}function f(e){d.style.transform=`translate( ${e.clientX+h.x}px, ${e.clientY+h.y}px )`}function b(){c.removeEventListener("dragover",f),c.removeEventListener("dragend",b),d.remove(),p.remove(),m(),document.body.classList.remove("is-dragging-components-draggable"),c.documentElement.classList.remove("is-dragging")}h.x-=58,f(t),c.addEventListener("dragover",f),c.addEventListener("dragend",b),c.addEventListener("drop",b),g([e]),document.body.classList.add("is-dragging-components-draggable"),c.documentElement.classList.add("is-dragging")}}),[e,t,o,d,p,r,h,i,g,m])}function vx(){const e=(0,a.useContext)(yy);return(0,u.useRefEffect)((t=>{if(e)return e.observe(t),()=>{e.unobserve(t)}}),[e])}function xx({isSelected:e}){const t=(0,u.useReducedMotion)();return(0,u.useRefEffect)((n=>{if(e){const{ownerDocument:e}=n,{defaultView:o}=e;if(!o.IntersectionObserver)return;const r=new o.IntersectionObserver((e=>{e[0].isIntersecting||n.scrollIntoView({behavior:t?"instant":"smooth"}),r.disconnect()}));return r.observe(n),()=>{r.disconnect()}}}),[e])}function yx({clientId:e="",isEnabled:t=!0}={}){const{getEnabledClientIdsTree:n}=O((0,c.useSelect)(_i));return(0,u.useRefEffect)((o=>{if(!t)return;const r=t=>{(t.target===o||t.target.classList.contains("is-root-container"))&&(t.defaultPrevented||(t.preventDefault(),n(e).forEach((({clientId:e})=>{const t=o.querySelector(`[data-block="${e}"]`);t&&(t.classList.remove("has-editable-outline"),t.offsetWidth,t.classList.add("has-editable-outline"))}))))};return o.addEventListener("click",r),()=>o.removeEventListener("click",r)}),[t])}const Sx={"core/paragraph":["content"],"core/heading":["content"],"core/image":["id","url","title","alt"],"core/button":["url","text","linkTarget","rel"]},wx="__default";function Cx(e){return e in Sx}function Bx(e,t){return Cx(e)&&Sx[e].includes(t)}const Ix=(0,u.createHigherOrderComponent)((e=>t=>{const n=(0,c.useRegistry)(),o=(0,a.useContext)(fb),r=(0,c.useSelect)((e=>O(e(l.store)).getAllBlockBindingsSources())),{name:i,clientId:s,context:u,setAttributes:d}=t,p=(0,a.useMemo)((()=>function(e,t){if("core/pattern-overrides"===t?.[wx]?.source){const n=Sx[e],o={};for(const e of n){const n=t[e]?t[e]:{source:"core/pattern-overrides"};o[e]=n}return o}return t}(i,t.attributes.metadata?.bindings)),[t.attributes.metadata?.bindings,i]),h={},g=(0,c.useSelect)((e=>{if(!p)return;const t={},n=new Map;for(const[e,t]of Object.entries(p)){const{source:s,args:l}=t,a=r[s];if(a&&Bx(i,e)){for(const e of a.usesContext||[])h[e]=o[e];n.set(a,{...n.get(a),[e]:{args:l}})}}if(n.size)for(const[o,r]of n){let n={};o.getValues?n=o.getValues({select:e,context:h,clientId:s,bindings:r}):Object.keys(r).forEach((e=>{n[e]=o.label}));for(const[e,o]of Object.entries(n))"url"!==e||o&&xc(o)?t[e]=o:t[e]=null}return t}),[p,i,s,h,r]),m=!!h["pattern/overrides"],f="core/pattern-overrides"===t.attributes.metadata?.bindings?.[wx]?.source,b=(0,a.useCallback)((e=>{n.batch((()=>{if(!p)return void d(e);const t={...e},o=new Map;for(const[e,n]of Object.entries(t)){if(!p[e]||!Bx(i,e))continue;const s=p[e],l=r[s?.source];l?.setValues&&(o.set(l,{...o.get(l),[e]:{args:s.args,newValue:n}}),delete t[e])}if(o.size)for(const[e,t]of o)e.setValues({select:n.select,dispatch:n.dispatch,context:h,clientId:s,bindings:t});f&&m||!Object.keys(t).length||(f&&(delete t?.caption,delete t?.href),d(t))}))}),[n,p,i,s,h,d,r,f,m]);return(0,re.jsx)(re.Fragment,{children:(0,re.jsx)(e,{...t,attributes:{...t.attributes,...g},setAttributes:b,context:{...u,...h}})})}),"withBlockBindingSupport");(0,d.addFilter)("blocks.registerBlockType","core/editor/custom-sources-backwards-compatibility/shim-attribute-source",(function(e,t){return Cx(t)?{...e,edit:Ix(e.edit)}:e}));const jx=new Map;function Ex(e){const t=e.getAttribute("data-draggable");t&&(e.removeAttribute("data-draggable"),"true"!==t||e.getAttribute("draggable")||e.setAttribute("draggable","true"))}function Tx(e){const{target:t}=e,{ownerDocument:n,isContentEditable:o}=t,r=jx.get(n);if(o)for(const e of r)"true"===e.getAttribute("draggable")&&e.contains(t)&&(e.removeAttribute("draggable"),e.setAttribute("data-draggable","true"));else for(const e of r)Ex(e)}function Mx(e={},{__unstableIsHtml:t}={}){const{clientId:n,className:o,wrapperProps:r={},isAligned:i,index:s,mode:l,name:c,blockApiVersion:d,blockTitle:p,isSelected:h,isSubtreeDisabled:g,hasOverlay:f,initialPosition:b,blockEditingMode:k,isHighlighted:v,isMultiSelected:x,isPartiallySelected:y,isReusable:S,isDragging:w,hasChildSelected:B,isEditingDisabled:I,hasEditableOutline:j,isTemporarilyEditingAsBlocks:E,defaultClassName:T,isSectionBlock:M,canMove:P}=(0,a.useContext)(Sb),R=(0,C.sprintf)((0,C.__)("Block: %s"),p),N="html"!==l||t?"":"-visual",L=(0,u.useRefEffect)((e=>(function(e,t){let n=jx.get(e);n||(n=new Set,jx.set(e,n),e.addEventListener("pointerdown",Tx)),n.add(t)}(e.ownerDocument,e),()=>{!function(e,t){const n=jx.get(e);n&&(n.delete(t),Ex(t),0===n.size&&(jx.delete(e),e.removeEventListener("pointerdown",Tx)))}(e.ownerDocument,e)})),[]),A=(0,u.useMergeRefs)([e.ref,hx({clientId:n,initialPosition:b}),Pp(n),mx(n),kx({clientId:n,isSelected:h}),gx({clientId:n}),vx(),px({triggerAnimationOnChange:s,clientId:n}),(0,u.useDisabled)({isDisabled:!f}),yx({clientId:n,isEnabled:M}),xx({isSelected:h}),P?L:void 0]),O=_(),D=O[m]&&Cx(c)?{"--wp-admin-theme-color":"var(--wp-block-synced-color)","--wp-admin-theme-color--rgb":"var(--wp-block-synced-color--rgb)"}:{}; -// translators: %s: Type of block (i.e. Text, Image etc) -d<2&&O.clientId;let z=!1;return"-"!==r?.style?.marginTop?.charAt(0)&&"-"!==r?.style?.marginBottom?.charAt(0)&&"-"!==r?.style?.marginLeft?.charAt(0)&&"-"!==r?.style?.marginRight?.charAt(0)||(z=!0),{tabIndex:"disabled"===k?-1:0,draggable:!(!P||B)||void 0,...r,...e,ref:A,id:`block-${n}${N}`,role:"document","aria-label":R,"data-block":n,"data-type":c,"data-title":p,inert:g?"true":void 0,className:ls("block-editor-block-list__block",{"wp-block":!i,"has-block-overlay":f,"is-selected":h,"is-highlighted":v,"is-multi-selected":x,"is-partially-selected":y,"is-reusable":S,"is-dragging":w,"has-child-selected":B,"is-editing-disabled":I,"has-editable-outline":j,"has-negative-margin":z,"is-content-locked-temporarily-editing-as-blocks":E},o,e.className,r.className,T),style:{...r.style,...e.style,...D}}}function Px({children:e,isHtml:t,...n}){return(0,re.jsx)("div",{...Mx(n,{__unstableIsHtml:t}),children:e})}function Rx({block:{__unstableBlockSource:e},mode:t,isLocked:n,canRemove:o,clientId:r,isSelected:i,isSelectionEnabled:s,className:c,__unstableLayoutClassNames:u,name:d,isValid:p,attributes:h,wrapperProps:g,setAttributes:m,onReplace:f,onRemove:b,onInsertBlocksAfter:k,onMerge:v,toggleSelection:_}){var x;const{mayDisplayControls:y,mayDisplayParentControls:S,themeSupportsLayout:w,...C}=(0,a.useContext)(Sb),B=Gl()||{};let I=(0,re.jsx)(wb,{name:d,isSelected:i,attributes:h,setAttributes:m,insertBlocksAfter:n?void 0:k,onReplace:o?f:void 0,onRemove:o?b:void 0,mergeBlocks:o?v:void 0,clientId:r,isSelectionEnabled:s,toggleSelection:_,__unstableLayoutClassNames:u,__unstableParentLayout:Object.keys(B).length?B:void 0,mayDisplayControls:y,mayDisplayParentControls:S,blockEditingMode:C.blockEditingMode,isPreviewMode:C.isPreviewMode});const j=(0,l.getBlockType)(d);j?.getEditWrapperProps&&(g=function(e,t){const n={...e,...t};return e?.hasOwnProperty("className")&&t?.hasOwnProperty("className")&&(n.className=ls(e.className,t.className)),e?.hasOwnProperty("style")&&t?.hasOwnProperty("style")&&(n.style={...e.style,...t.style}),n}(g,j.getEditWrapperProps(h)));const E=g&&!!g["data-align"]&&!w,T=c?.includes("is-position-sticky");let M;if(E&&(I=(0,re.jsx)("div",{className:ls("wp-block",T&&c),"data-align":g["data-align"],children:I})),p)M="html"===t?(0,re.jsxs)(re.Fragment,{children:[(0,re.jsx)("div",{style:{display:"none"},children:I}),(0,re.jsx)(Px,{isHtml:!0,children:(0,re.jsx)(Lb,{clientId:r})})]}):j?.apiVersion>1?I:(0,re.jsx)(Px,{children:I});else{const t=e?(0,l.serializeRawBlock)(e):(0,l.getSaveContent)(j,h);M=(0,re.jsxs)(Px,{className:"has-warning",children:[(0,re.jsx)(Eb,{clientId:r}),(0,re.jsx)(a.RawHTML,{children:(0,Ta.safeHTML)(t)})]})}const{"data-align":P,...R}=null!==(x=g)&&void 0!==x?x:{},N={...R,className:ls(R.className,P&&w&&`align${P}`,!(P&&T)&&c)};return(0,re.jsx)(Sb.Provider,{value:{wrapperProps:N,isAligned:E,...C},children:(0,re.jsx)(Rb,{fallback:(0,re.jsx)(Px,{className:"has-warning",children:(0,re.jsx)(Mb,{})}),children:M})})}Mx.save=l.__unstableGetBlockProps;const Nx=(0,c.withDispatch)(((e,t,n)=>{const{updateBlockAttributes:o,insertBlocks:r,mergeBlocks:i,replaceBlocks:s,toggleSelection:a,__unstableMarkLastChangeAsPersistent:c,moveBlocksToPosition:u,removeBlock:d,selectBlock:p}=e(_i);return{setAttributes(e){const{getMultiSelectedBlockClientIds:r}=n.select(_i),i=r(),{clientId:s}=t,l=i.length?i:[s];o(l,e)},onInsertBlocks(e,n){const{rootClientId:o}=t;r(e,n,o)},onInsertBlocksAfter(e){const{clientId:o,rootClientId:i}=t,{getBlockIndex:s}=n.select(_i),l=s(o);r(e,l+1,i)},onMerge(e){const{clientId:o,rootClientId:a}=t,{getPreviousBlockClientId:c,getNextBlockClientId:h,getBlock:g,getBlockAttributes:m,getBlockName:f,getBlockOrder:b,getBlockIndex:k,getBlockRootClientId:v,canInsertBlockType:_}=n.select(_i);function x(){const e=g(o),t=(0,l.getDefaultBlockName)(),r=(0,l.getBlockType)(t);if(f(o)!==t){const n=(0,l.switchToBlockType)(e,t);n&&n.length&&s(o,n)}else if((0,l.isUnmodifiedDefaultBlock)(e)){const e=h(o);e&&n.batch((()=>{d(o),p(e)}))}else if(r.merge){const n=r.merge({},e.attributes);s([o],[(0,l.createBlock)(t,n)])}}function y(e,t=!0){const o=f(e),i="text"===(0,l.getBlockType)(o).category,s=v(e),a=b(e),[c]=a;1===a.length&&(0,l.isUnmodifiedBlock)(g(c))?d(e):i?n.batch((()=>{if(_(f(c),s))u([c],e,s,k(e));else{const n=(0,l.switchToBlockType)(g(c),(0,l.getDefaultBlockName)());n&&n.length&&n.every((e=>_(e.name,s)))?(r(n,k(e),s,t),d(c,!1)):x()}!b(e).length&&(0,l.isUnmodifiedBlock)(g(e))&&d(e,!1)})):x()}if(e){if(a){const e=h(a);if(e){if(f(a)!==f(e))return void i(a,e);{const t=m(a),o=m(e);if(Object.keys(t).every((e=>t[e]===o[e])))return void n.batch((()=>{u(b(e),e,a),d(e,!1)}))}}}const e=h(o);if(!e)return;b(e).length?y(e,!1):i(o,e)}else{const e=c(o);if(e)i(e,o);else if(a){const e=c(a);if(e&&f(a)===f(e)){const t=m(a),o=m(e);if(Object.keys(t).every((e=>t[e]===o[e])))return void n.batch((()=>{u(b(a),a,e),d(a,!1)}))}y(a)}else x()}},onReplace(e,n,o){e.length&&!(0,l.isUnmodifiedDefaultBlock)(e[e.length-1])&&c();const r=1===e?.length&&Array.isArray(e[0])?e[0]:e;s([t.clientId],r,n,o)},onRemove(){d(t.clientId)},toggleSelection(e){a(e)}}}));Rx=(0,u.compose)(Nx,(0,fs.withFilters)("editor.BlockListBlock"))(Rx);const Lx=(0,a.memo)((function(e){const{clientId:t,rootClientId:n}=e,o=(0,c.useSelect)((e=>{const{isBlockSelected:o,getBlockMode:r,isSelectionEnabled:i,getTemplateLock:s,isSectionBlock:a,getBlockWithoutAttributes:c,getBlockAttributes:u,canRemoveBlock:d,canMoveBlock:p,getSettings:h,getTemporarilyEditingAsBlocks:g,getBlockEditingMode:m,getBlockName:f,isFirstMultiSelectedBlock:b,getMultiSelectedBlockClientIds:k,hasSelectedInnerBlock:v,getBlocksByName:_,getBlockIndex:x,isBlockMultiSelected:y,isBlockSubtreeDisabled:S,isBlockHighlighted:w,__unstableIsFullySelected:C,__unstableSelectionHasUnmergeableBlock:B,isBlockBeingDragged:I,isDragging:j,__unstableHasActiveBlockOverlayActive:E,getSelectedBlocksInitialCaretPosition:T}=O(e(_i)),M=c(t);if(!M)return;const{hasBlockSupport:P,getActiveBlockVariation:R}=e(l.store),N=u(t),{name:L,isValid:A}=M,D=(0,l.getBlockType)(L),{supportsLayout:z,isPreviewMode:V}=h(),F=D?.apiVersion>1,H={isPreviewMode:V,blockWithoutAttributes:M,name:L,attributes:N,isValid:A,themeSupportsLayout:z,index:x(t),isReusable:(0,l.isReusableBlock)(D),className:F?N.className:void 0,defaultClassName:F?(0,l.getBlockDefaultClassName)(L):void 0,blockTitle:D?.title};if(V)return H;const G=o(t),$=d(t),U=p(t),W=R(L,N),K=y(t),Z=v(t,!0),q=m(t),Y=(0,l.hasBlockSupport)(L,"multiple",!0)?[]:_(L),X=Y.length&&Y[0]!==t;return{...H,mode:r(t),isSelectionEnabled:i(),isLocked:!!s(n),isSectionBlock:a(t),canRemove:$,canMove:U,isSelected:G,isTemporarilyEditingAsBlocks:g()===t,blockEditingMode:q,mayDisplayControls:G||b(t)&&k().every((e=>f(e)===L)),mayDisplayParentControls:P(f(t),"__experimentalExposeControlsToChildren",!1)&&v(t),blockApiVersion:D?.apiVersion||1,blockTitle:W?.title||D?.title,isSubtreeDisabled:"disabled"===q&&S(t),hasOverlay:E(t)&&!j(),initialPosition:G?T():void 0,isHighlighted:w(t),isMultiSelected:K,isPartiallySelected:K&&!C()&&!B(),isDragging:I(t),hasChildSelected:Z,isEditingDisabled:"disabled"===q,hasEditableOutline:"disabled"!==q&&"disabled"===m(n),originalBlockClientId:!!X&&Y[0]}}),[t,n]),{isPreviewMode:r,mode:i="visual",isSelectionEnabled:s=!1,isLocked:u=!1,canRemove:d=!1,canMove:p=!1,blockWithoutAttributes:h,name:g,attributes:m,isValid:f,isSelected:b=!1,themeSupportsLayout:k,isTemporarilyEditingAsBlocks:v,blockEditingMode:_,mayDisplayControls:x,mayDisplayParentControls:y,index:S,blockApiVersion:w,blockTitle:C,isSubtreeDisabled:B,hasOverlay:I,initialPosition:j,isHighlighted:E,isMultiSelected:T,isPartiallySelected:M,isReusable:P,isDragging:R,hasChildSelected:N,isSectionBlock:L,isEditingDisabled:A,hasEditableOutline:D,className:z,defaultClassName:V,originalBlockClientId:F}=o,H=(0,a.useMemo)((()=>({...h,attributes:m})),[h,m]);if(!o)return null;const G={isPreviewMode:r,clientId:t,className:z,index:S,mode:i,name:g,blockApiVersion:w,blockTitle:C,isSelected:b,isSubtreeDisabled:B,hasOverlay:I,initialPosition:j,blockEditingMode:_,isHighlighted:E,isMultiSelected:T,isPartiallySelected:M,isReusable:P,isDragging:R,hasChildSelected:N,isSectionBlock:L,isEditingDisabled:A,hasEditableOutline:D,isTemporarilyEditingAsBlocks:v,defaultClassName:V,mayDisplayControls:x,mayDisplayParentControls:y,originalBlockClientId:F,themeSupportsLayout:k,canMove:p};return(0,re.jsx)(Sb.Provider,{value:G,children:(0,re.jsx)(Rx,{...e,mode:i,isSelectionEnabled:s,isLocked:u,canRemove:d,canMove:p,block:H,name:g,attributes:m,isValid:f,isSelected:b})})})),Ax=window.wp.htmlEntities,Ox="\ufeff";function Dx({rootClientId:e}){const{showPrompt:t,isLocked:n,placeholder:o,isManualGrid:r}=(0,c.useSelect)((t=>{const{getBlockCount:n,getSettings:o,getTemplateLock:r,getBlockAttributes:i}=t(_i),s=!n(e),{bodyPlaceholder:l}=o();return{showPrompt:s,isLocked:!!r(e),placeholder:l,isManualGrid:i(e)?.layout?.isManualPlacement}}),[e]),{insertDefaultBlock:i,startTyping:s}=(0,c.useDispatch)(_i);if(n||r)return null;const l=(0,Ax.decodeEntities)(o)||(0,C.__)("Type / to choose a block"),a=()=>{i(void 0,e),s()};return(0,re.jsxs)("div",{"data-root-client-id":e||"",className:ls("block-editor-default-block-appender",{"has-visible-prompt":t}),children:[(0,re.jsx)("p",{tabIndex:"0",role:"button","aria-label":(0,C.__)("Add default block"),className:"block-editor-default-block-appender__content",onKeyDown:e=>{Pa.ENTER!==e.keyCode&&Pa.SPACE!==e.keyCode||a()},onClick:()=>a(),onFocus:()=>{t&&a()},children:t?l:Ox}),(0,re.jsx)(vC,{rootClientId:e,position:"bottom right",isAppender:!0,__experimentalIsQuick:!0})]})}function zx({rootClientId:e}){return(0,c.useSelect)((t=>t(_i).canInsertBlockType((0,l.getDefaultBlockName)(),e)))?(0,re.jsx)(Dx,{rootClientId:e}):(0,re.jsx)(yC,{rootClientId:e,className:"block-list-appender__toggle"})}function Vx({rootClientId:e,CustomAppender:t,className:n,tagName:o="div"}){const r=(0,c.useSelect)((t=>{const{getBlockInsertionPoint:n,isBlockInsertionPointVisible:o,getBlockCount:r}=t(_i),i=n();return o()&&e===i?.rootClientId&&0===r(e)}),[e]);return(0,re.jsx)(o,{tabIndex:-1,className:ls("block-list-appender wp-block",n,{"is-drag-over":r}),contentEditable:!1,"data-block":!0,children:t?(0,re.jsx)(t,{}):(0,re.jsx)(zx,{rootClientId:e})})}const Fx=Number.MAX_SAFE_INTEGER;(0,a.createContext)();const Hx=function({previousClientId:e,nextClientId:t,children:n,__unstablePopoverSlot:o,__unstableContentRef:r,operation:i="insert",nearestSide:s="right",...l}){const[u,d]=(0,a.useReducer)((e=>(e+1)%Fx),0),{orientation:p,rootClientId:h,isVisible:g}=(0,c.useSelect)((n=>{const{getBlockListSettings:o,getBlockRootClientId:r,isBlockVisible:i}=n(_i),s=r(null!=e?e:t);return{orientation:o(s)?.orientation||"vertical",rootClientId:s,isVisible:i(e)&&i(t)}}),[e,t]),m=Lp(e),f=Lp(t),b="vertical"===p,k=(0,a.useMemo)((()=>{if(!(u<0||!m&&!f)&&g)return{contextElement:"group"===i?f||m:m||f,getBoundingClientRect(){const e=m?m.getBoundingClientRect():null,t=f?f.getBoundingClientRect():null;let n=0,o=0,r=0,l=0;if("group"===i){const i=t||e;o=i.top,r=0,l=i.bottom-i.top,n="left"===s?i.left-2:i.right-2}else b?(o=e?e.bottom:t.top,r=e?e.width:t.width,l=t&&e?t.top-e.bottom:0,n=e?e.left:t.left):(o=e?e.top:t.top,l=e?e.height:t.height,(0,C.isRTL)()?(n=t?t.right:e.left,r=e&&t?e.left-t.right:0):(n=e?e.right:t.left,r=e&&t?t.left-e.right:0),r=Math.max(r,0));return new window.DOMRect(n,o,r,l)}}}),[m,f,u,b,g,i,s]),v=Qg(r);return(0,a.useLayoutEffect)((()=>{if(!m)return;const e=new window.MutationObserver(d);return e.observe(m,{attributes:!0}),()=>{e.disconnect()}}),[m]),(0,a.useLayoutEffect)((()=>{if(!f)return;const e=new window.MutationObserver(d);return e.observe(f,{attributes:!0}),()=>{e.disconnect()}}),[f]),(0,a.useLayoutEffect)((()=>{if(m)return m.ownerDocument.defaultView.addEventListener("resize",d),()=>{m.ownerDocument.defaultView?.removeEventListener("resize",d)}}),[m]),(m||f)&&g?(0,re.jsx)(fs.Popover,{ref:v,animate:!1,anchor:k,focusOnMount:!1,__unstableSlotName:o,inline:!o,...l,className:ls("block-editor-block-popover","block-editor-block-popover__inbetween",l.className),resize:!1,flip:!1,placement:"overlay",variant:"unstyled",children:(0,re.jsx)("div",{className:"block-editor-block-popover__inbetween-container",children:n})},t+"--"+h):null},Gx={hide:{opacity:0,scaleY:.75},show:{opacity:1,scaleY:1},exit:{opacity:0,scaleY:.9}},$x=function({__unstablePopoverSlot:e,__unstableContentRef:t}){const{clientId:n}=(0,c.useSelect)((e=>{const{getBlockOrder:t,getBlockInsertionPoint:n}=e(_i),o=n(),r=t(o.rootClientId);return r.length?{clientId:r[o.index]}:{}}),[]),o=(0,u.useReducedMotion)();return(0,re.jsx)(gm,{clientId:n,__unstablePopoverSlot:e,__unstableContentRef:t,className:"block-editor-block-popover__drop-zone",children:(0,re.jsx)(fs.__unstableMotion.div,{"data-testid":"block-popover-drop-zone",initial:o?Gx.show:Gx.hide,animate:Gx.show,exit:o?Gx.show:Gx.exit,className:"block-editor-block-popover__drop-zone-foreground"})})},Ux=(0,a.createContext)();function Wx({__unstablePopoverSlot:e,__unstableContentRef:t,operation:n="insert",nearestSide:o="right"}){const{selectBlock:r,hideInsertionPoint:i}=(0,c.useDispatch)(_i),s=(0,a.useContext)(Ux),l=(0,a.useRef)(),{orientation:d,previousClientId:p,nextClientId:h,rootClientId:g,isInserterShown:m,isDistractionFree:f,isZoomOutMode:b}=(0,c.useSelect)((e=>{const{getBlockOrder:t,getBlockListSettings:n,getBlockInsertionPoint:o,isBlockBeingDragged:r,getPreviousBlockClientId:i,getNextBlockClientId:s,getSettings:l,isZoomOut:a}=O(e(_i)),c=o(),u=t(c.rootClientId);if(!u.length)return{};let d=u[c.index-1],p=u[c.index];for(;r(d);)d=i(d);for(;r(p);)p=s(p);const h=l();return{previousClientId:d,nextClientId:p,orientation:n(c.rootClientId)?.orientation||"vertical",rootClientId:c.rootClientId,isDistractionFree:h.isDistractionFree,isInserterShown:c?.__unstableWithInserter,isZoomOutMode:a()}}),[]),{getBlockEditingMode:k}=(0,c.useSelect)(_i),v=(0,u.useReducedMotion)(),_={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"}}},x={start:{scale:v?1:0},rest:{scale:1,transition:{delay:.4,type:"tween"}}};if(f)return null;if(b&&"insert"!==n)return null;const y=ls("block-editor-block-list__insertion-point","horizontal"===d||"group"===n?"is-horizontal":"is-vertical");return(0,re.jsx)(Hx,{previousClientId:p,nextClientId:h,__unstablePopoverSlot:e,__unstableContentRef:t,operation:n,nearestSide:o,children:(0,re.jsxs)(fs.__unstableMotion.div,{layout:!v,initial:v?"rest":"start",animate:"rest",whileHover:"hover",whileTap:"pressed",exit:"start",ref:l,tabIndex:-1,onClick:function(e){e.target===l.current&&h&&"disabled"!==k(h)&&r(h,-1)},onFocus:function(e){e.target!==l.current&&(s.current=!0)},className:ls(y,{"is-with-inserter":m}),onHoverEnd:function(e){e.target!==l.current||s.current||i()},children:[(0,re.jsx)(fs.__unstableMotion.div,{variants:_,className:"block-editor-block-list__insertion-point-indicator","data-testid":"block-list-insertion-point-indicator"}),m&&(0,re.jsx)(fs.__unstableMotion.div,{variants:x,className:ls("block-editor-block-list__insertion-point-inserter"),children:(0,re.jsx)(vC,{position:"bottom center",clientId:h,rootClientId:g,__experimentalIsQuick:!0,onToggle:e=>{s.current=e},onSelectOrClose:()=>{s.current=!1}})})]})})}function Kx(e){const{insertionPoint:t,isVisible:n,isBlockListEmpty:o}=(0,c.useSelect)((e=>{const{getBlockInsertionPoint:t,isBlockInsertionPointVisible:n,getBlockCount:o}=e(_i),r=t();return{insertionPoint:r,isVisible:n(),isBlockListEmpty:0===o(r?.rootClientId)}}),[]);return!n||o?null:"replace"===t.operation?(0,re.jsx)($x,{...e},`${t.rootClientId}-${t.index}`):(0,re.jsx)(Wx,{operation:t.operation,nearestSide:t.nearestSide,...e})}function Zx(){const e=(0,a.useContext)(Ux),t=(0,c.useSelect)((e=>e(_i).getSettings().isDistractionFree||O(e(_i)).isZoomOut()),[]),{getBlockListSettings:n,getBlockIndex:o,isMultiSelecting:r,getSelectedBlockClientIds:i,getSettings:s,getTemplateLock:l,__unstableIsWithinBlockOverlay:d,getBlockEditingMode:p,getBlockName:h,getBlockAttributes:g,getParentSectionBlock:m}=O((0,c.useSelect)(_i)),{showInsertionPoint:f,hideInsertionPoint:b}=(0,c.useDispatch)(_i);return(0,u.useRefEffect)((a=>{if(!t)return a.addEventListener("mousemove",c),()=>{a.removeEventListener("mousemove",c)};function c(t){if(void 0===e||e.current)return;if(t.target.nodeType===t.target.TEXT_NODE)return;if(r())return;if(!t.target.classList.contains("block-editor-block-list__layout"))return void b();let a;if(t.target.classList.contains("is-root-container")||(a=(t.target.getAttribute("data-block")?t.target:t.target.closest("[data-block]")).getAttribute("data-block")),l(a)||"disabled"===p(a)||"core/block"===h(a)||a&&g(a).layout?.isManualPlacement)return;const c=n(a),u=c?.orientation||"vertical",k=!!c?.__experimentalCaptureToolbars,v=t.clientY,_=t.clientX;let x=Array.from(t.target.children).find((e=>{const t=e.getBoundingClientRect();return e.classList.contains("wp-block")&&"vertical"===u&&t.top>v||e.classList.contains("wp-block")&&"horizontal"===u&&((0,C.isRTL)()?t.right<_:t.left>_)}));if(!x)return void b();if(!x.id&&(x=x.firstElementChild,!x))return void b();const y=x.id.slice(6);if(!y||d(y)||m(y))return;if(i().includes(y)&&"vertical"===u&&!k&&!s().hasFixedToolbar)return;const S=x.getBoundingClientRect();if("horizontal"===u&&(t.clientY>S.bottom||t.clientYS.right||t.clientX{if(r)return e.addEventListener("mousedown",i),()=>{e.removeEventListener("mousedown",i)};function i(r){(t()||n())&&r.target===e&&o()}}),[t,n,o,r])}function Yx(e){return(0,re.jsx)("div",{ref:qx(),...e})}const Xx=new WeakMap;function Qx(){let e;return t=>(void 0!==e&&za()(e,t)||(e=t),e)}function Jx(e){const[t]=(0,a.useState)(Qx);return t(e)}function ey(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(e){return t}return t}function ty(e,t,n={}){const{operation:o="insert",nearestSide:r="right"}=n,{canInsertBlockType:i,getBlockIndex:s,getClientIdsOfDescendants:u,getBlockOrder:d,getBlocksByClientId:p,getSettings:h,getBlock:g}=(0,c.useSelect)(_i),{getGroupingBlockName:m}=(0,c.useSelect)(l.store),{insertBlocks:f,moveBlocksToPosition:b,updateBlockAttributes:k,clearSelectedBlock:v,replaceBlocks:_,removeBlocks:x}=(0,c.useDispatch)(_i),y=(0,c.useRegistry)(),S=(0,a.useCallback)(((n,s=!0,a=0,c=[])=>{Array.isArray(n)||(n=[n]);const u=d(e)[t];if("replace"===o)_(u,n,void 0,a);else if("group"===o){const t=g(u);"left"===r?n.push(t):n.unshift(t);const o=n.map((e=>(0,l.createBlock)(e.name,e.attributes,e.innerBlocks))),s=n.every((e=>"core/image"===e.name)),d=i("core/gallery",e),p=(0,l.createBlock)(s&&d?"core/gallery":m(),{layout:{type:"flex",flexWrap:s&&d?null:"nowrap"}},o);_([u,...c],p,void 0,a)}else f(n,t,e,s,a)}),[d,e,t,o,_,g,r,i,m,f]),w=(0,a.useCallback)(((n,r,i)=>{if("replace"===o){const o=p(n),r=d(e)[t];y.batch((()=>{x(n,!1),_(r,o,void 0,0)}))}else b(n,r,e,i)}),[o,d,p,b,y,x,_,t,e]),C=function(e,t,n,o,r,i,s,a,c){return u=>{const{srcRootClientId:d,srcClientIds:p,type:h,blocks:g}=ey(u);if("inserter"===h){s();const e=g.map((e=>(0,l.cloneBlock)(e)));i(e,!0,null)}if("block"===h){const s=n(p[0]);if(d===e&&s===t)return;if(p.includes(e)||o(p).some((t=>t===e)))return;if("group"===a){const e=p.map((e=>c(e)));return void i(e,!0,null,p)}const l=d===e,u=p.length;r(p,d,l&&s{if(!t().mediaUpload)return;const s=(0,l.findTransform)((0,l.getBlockTransforms)("from"),(t=>"files"===t.type&&o(t.blockName,e)&&t.isMatch(i)));if(s){const e=s.transform(i,n);r(e)}}}(e,h,k,i,S),I=function(e){return t=>{const n=(0,l.pasteHandler)({HTML:t,mode:"BLOCKS"});n.length&&e(n)}}(S);return e=>{const t=(0,Ta.getFilesFromDataTransfer)(e.dataTransfer),n=e.dataTransfer.getData("text/html");n?I(n):t.length?B(t):C(e)}}function ny(e,t,n=["top","bottom","left","right"]){let o,r;return n.forEach((n=>{const i=function(e,t,n){const o="top"===n||"bottom"===n,{x:r,y:i}=e,s=o?r:i,l=o?i:r,a=o?t.left:t.top,c=o?t.right:t.bottom,u=t[n];let d;return d=s>=a&&s<=c?s:s=e.x&&t.top<=e.y&&t.bottom>=e.y}const ry=30,iy=120,sy=120;function ly(e,t,n,o){let r=!0;if(t){const e=t?.map((({name:e})=>e));r=n.every((t=>e?.includes(t)))}const i=n.map((t=>e(t))).every((e=>{const[t]=e?.parent||[];return!t||t===o}));return r&&i}function ay(e,t){const{defaultView:n}=t;return!!(n&&e instanceof n.HTMLElement&&e.closest("[data-is-insertion-point]"))}const cy={};function uy({children:e,clientId:t}){const n=function(e){return(0,c.useSelect)((t=>{const n=t(_i).getBlock(e);if(!n)return;const o=t(l.store).getBlockType(n.name);return o&&0!==Object.keys(o.providesContext).length?Object.fromEntries(Object.entries(o.providesContext).map((([e,t])=>[e,n.attributes[t]]))):void 0}),[e])}(t);return(0,re.jsx)(mb,{value:n,children:e})}const dy=(0,a.memo)(Ty);function py(e){const{clientId:t,allowedBlocks:n,prioritizedInserterBlocks:o,defaultBlock:r,directInsert:i,__experimentalDefaultBlock:s,__experimentalDirectInsert:u,template:d,templateLock:p,wrapperRef:h,templateInsertUpdatesSelection:g,__experimentalCaptureToolbars:m,__experimentalAppenderTagName:f,renderAppender:b,orientation:k,placeholder:v,layout:_,name:x,blockType:S,parentLock:C,defaultLayout:B}=e;!function(e,t,n,o,r,i,s,l,u,d,p,h){const g=(0,c.useRegistry)(),m=Jx(n),f=Jx(o),b=void 0===u||"contentOnly"===t?t:u;(0,a.useLayoutEffect)((()=>{const t={allowedBlocks:m,prioritizedInserterBlocks:f,templateLock:b};if(void 0!==d&&(t.__experimentalCaptureToolbars=d),void 0!==p)t.orientation=p;else{const e=zl(h?.type);t.orientation=e.getOrientation(h)}void 0!==s&&(y()("__experimentalDefaultBlock",{alternative:"defaultBlock",since:"6.3",version:"6.4"}),t.defaultBlock=s),void 0!==r&&(t.defaultBlock=r),void 0!==l&&(y()("__experimentalDirectInsert",{alternative:"directInsert",since:"6.3",version:"6.4"}),t.directInsert=l),void 0!==i&&(t.directInsert=i),void 0!==t.directInsert&&"boolean"!=typeof t.directInsert&&y()("Using `Function` as a `directInsert` argument",{alternative:"`boolean` values",since:"6.5"}),Xx.get(g)||Xx.set(g,{}),Xx.get(g)[e]=t,window.queueMicrotask((()=>{const e=Xx.get(g);if(Object.keys(e).length){const{updateBlockListSettings:t}=g.dispatch(_i);t(e),Xx.set(g,{})}}))}),[e,m,f,b,r,i,s,l,d,p,h,g])}(t,C,n,o,r,i,s,u,p,m,k,_),function(e,t,n,o){const{getBlocks:r,getSelectedBlocksInitialCaretPosition:i,isBlockSelected:s}=(0,c.useSelect)(_i),{replaceInnerBlocks:u,__unstableMarkNextChangeAsNotPersistent:d}=(0,c.useDispatch)(_i),p=(0,a.useRef)(null);(0,a.useLayoutEffect)((()=>{let a=!1;return window.queueMicrotask((()=>{if(a)return;const c=r(e),h=0===c.length||"all"===n||"contentOnly"===n,g=!w()(t,p.current);if(!h||!g)return;p.current=t;const m=(0,l.synchronizeBlocksWithTemplate)(c,t);w()(m,c)||(d(),u(e,m,0===c.length&&o&&0!==m.length&&s(e),i()))})),()=>{a=!0}}),[t,n,e])}(t,d,p,g);const I=(0,l.getBlockSupport)(x,"layout")||(0,l.getBlockSupport)(x,"__experimentalLayout")||cy,{allowSizingOnChildren:j=!1}=I,E=_||I,T=(0,a.useMemo)((()=>({...B,...E,...j&&{allowSizingOnChildren:!0}})),[B,E,j]),M=(0,re.jsx)(dy,{rootClientId:t,renderAppender:b,__experimentalAppenderTagName:f,layout:T,wrapperRef:h,placeholder:v});return S?.providesContext&&0!==Object.keys(S.providesContext).length?(0,re.jsx)(uy,{clientId:t,children:M}):M}function hy(e){return ab(e),(0,re.jsx)(py,{...e})}const gy=(0,a.forwardRef)(((e,t)=>{const n=my({ref:t},e);return(0,re.jsx)("div",{className:"block-editor-inner-blocks",children:(0,re.jsx)("div",{...n})})}));function my(e={},t={}){const{__unstableDisableLayoutClassNames:n,__unstableDisableDropZone:o,dropZoneElement:r}=t,{clientId:i,layout:s=null,__unstableLayoutClassNames:d=""}=_(),p=(0,c.useSelect)((e=>{const{getBlockName:t,isZoomOut:n,getTemplateLock:o,getBlockRootClientId:r,getBlockEditingMode:s,getBlockSettings:a,getSectionRootClientId:c}=O(e(_i));if(!i){const e=c();return{isDropZoneDisabled:n()&&""!==e}}const{hasBlockSupport:u,getBlockType:d}=e(l.store),p=t(i),h=s(i),g=r(i),[m]=a(i,"layout");let f="disabled"===h;if(n()){const e=c();f=i!==e}return{__experimentalCaptureToolbars:u(p,"__experimentalExposeControlsToChildren",!1),name:p,blockType:d(p),parentLock:o(g),parentClientId:g,isDropZoneDisabled:f,defaultLayout:m}}),[i]),{__experimentalCaptureToolbars:h,name:g,blockType:m,parentLock:f,parentClientId:b,isDropZoneDisabled:k,defaultLayout:v}=p,x=function({dropZoneElement:e,rootClientId:t="",parentClientId:n="",isDisabled:o=!1}={}){const r=(0,c.useRegistry)(),[i,s]=(0,a.useState)({index:null,operation:"insert"}),{getBlockType:d,getBlockVariations:p,getGroupingBlockName:h}=(0,c.useSelect)(l.store),{canInsertBlockType:g,getBlockListSettings:m,getBlocks:f,getBlockIndex:b,getDraggedBlockClientIds:k,getBlockNamesByClientId:v,getAllowedBlocks:_,isDragging:x,isGroupable:y,isZoomOut:S,getSectionRootClientId:w,getBlockParents:B}=O((0,c.useSelect)(_i)),{showInsertionPoint:I,hideInsertionPoint:j,startDragging:E,stopDragging:T}=O((0,c.useDispatch)(_i)),M=ty("before"===i.operation||"after"===i.operation?n:t,i.index,{operation:i.operation,nearestSide:i.nearestSide}),P=(0,u.useThrottle)((0,a.useCallback)(((o,i)=>{x()||E();const a=k(),c=[t,...B(t,!0)];if(a.some((e=>c.includes(e))))return;const u=_(t),j=v([t])[0],T=v(a);if(!ly(d,u,T,j))return;const M=w();if(S()&&M!==t)return;const P=f(t);if(0===P.length)return void r.batch((()=>{s({index:0,operation:"insert"}),I(t,0,{operation:"insert"})}));const R=P.map((e=>{const t=e.clientId;return{isUnmodifiedDefaultBlock:(0,l.isUnmodifiedDefaultBlock)(e),getBoundingClientRect:()=>i.getElementById(`block-${t}`).getBoundingClientRect(),blockIndex:b(t),blockOrientation:m(t)?.orientation}})),N=function(e,t,n="vertical",o={}){const r="horizontal"===n?["left","right"]:["top","bottom"];let i=0,s="before",l=1/0,a=null,c="right";const{dropZoneElement:u,parentBlockOrientation:d,rootBlockIndex:p=0}=o;if(u&&"horizontal"!==d){const e=u.getBoundingClientRect(),[n,o]=ny(t,e,["top","bottom"]);if(e.height>iy&&nsy&&n{const p=o();let[g,m]=ny(t,p,r);const[f,b]=ny(t,p,["left","right"]),k=oy(t,p);e&&k?g=0:"vertical"===n&&"horizontal"!==d&&(k&&f=e.y}(t,p))&&(a=u,c=b),g"core/image"===e)),o=g("core/gallery",t),r=y([e.clientId,k()]),i=p(h(),"block"),s=i&&i.find((({name:e})=>"group-row"===e));if(n&&!o&&(!r||!s))return;if(!(n||r&&s))return}r.batch((()=>{s({index:L,operation:A,nearestSide:O});const e=["before","after"].includes(A)?n:t;I(e,L,{operation:A,nearestSide:O})}))}}),[x,_,t,v,k,d,w,S,f,m,e,n,b,r,E,I,g,y,p,h]),200);return(0,u.__experimentalUseDropZone)({dropZoneElement:e,isDisabled:o,onDrop:M,onDragOver(e){P(e,e.currentTarget.ownerDocument)},onDragLeave(e){const{ownerDocument:t}=e.currentTarget;ay(e.relatedTarget,t)||ay(e.target,t)||(P.cancel(),j())},onDragEnd(){P.cancel(),T(),j()}})}({dropZoneElement:r,rootClientId:i,parentClientId:b}),y=(0,u.useMergeRefs)([e.ref,o||k||s?.isManualPlacement&&window.__experimentalEnableGridInteractivity?null:x]),S={__experimentalCaptureToolbars:h,layout:s,name:g,blockType:m,parentLock:f,defaultLayout:v,...t},w=S.value&&S.onChange?hy:py;return{...e,ref:y,className:ls(e.className,"block-editor-block-list__layout",n?"":d),children:i?(0,re.jsx)(w,{...S,clientId:i}):(0,re.jsx)(Ty,{...t})}}my.save=l.__unstableGetInnerBlocksProps,gy.DefaultBlockAppender=function(){const{clientId:e}=_();return(0,re.jsx)(Dx,{rootClientId:e})},gy.ButtonBlockAppender=function({showSeparator:e,isFloating:t,onAddBlock:n,isToggle:o}){const{clientId:r}=_();return(0,re.jsx)(yC,{className:ls({"block-list-appender__toggle":o}),rootClientId:r,showSeparator:e,isFloating:t,onAddBlock:n})},gy.Content=()=>my.save().children;const fy=gy,by=new Set([Pa.UP,Pa.RIGHT,Pa.DOWN,Pa.LEFT,Pa.ENTER,Pa.BACKSPACE]);function ky(){const e=(0,c.useSelect)((e=>e(_i).isTyping()),[]),{stopTyping:t}=(0,c.useDispatch)(_i);return(0,u.useRefEffect)((n=>{if(!e)return;const{ownerDocument:o}=n;let r,i;function s(e){const{clientX:n,clientY:o}=e;r&&i&&(r!==n||i!==o)&&t(),r=n,i=o}return o.addEventListener("mousemove",s),()=>{o.removeEventListener("mousemove",s)}}),[e,t])}function vy(){const{isTyping:e}=(0,c.useSelect)((e=>{const{isTyping:t}=e(_i);return{isTyping:t()}}),[]),{startTyping:t,stopTyping:n}=(0,c.useDispatch)(_i),o=ky(),r=(0,u.useRefEffect)((o=>{const{ownerDocument:r}=o,{defaultView:i}=r,s=i.getSelection();if(e){let a;function c(e){const{target:t}=e;a=i.setTimeout((()=>{(0,Ta.isTextField)(t)||n()}))}function u(e){const{keyCode:t}=e;t!==Pa.ESCAPE&&t!==Pa.TAB||n()}function d(){s.isCollapsed||n()}return o.addEventListener("focus",c),o.addEventListener("keydown",u),r.addEventListener("selectionchange",d),()=>{i.clearTimeout(a),o.removeEventListener("focus",c),o.removeEventListener("keydown",u),r.removeEventListener("selectionchange",d)}}function l(e){const{type:n,target:r}=e;(0,Ta.isTextField)(r)&&o.contains(r)&&("keydown"!==n||function(e){const{keyCode:t,shiftKey:n}=e;return!n&&by.has(t)}(e))&&t()}return o.addEventListener("keypress",l),o.addEventListener("keydown",l),()=>{o.removeEventListener("keypress",l),o.removeEventListener("keydown",l)}}),[e,t,n]);return(0,u.useMergeRefs)([o,r])}const _y=function({children:e}){return(0,re.jsx)("div",{ref:vy(),children:e})};function xy({clientId:e,rootClientId:t="",position:n="top"}){const[o,r]=(0,a.useState)(!1),{sectionRootClientId:i,sectionClientIds:s,insertionPoint:l,blockInsertionPointVisible:d,blockInsertionPoint:p}=(0,c.useSelect)((e=>{const{getInsertionPoint:t,getBlockOrder:n,getSectionRootClientId:o,isBlockInsertionPointVisible:r,getBlockInsertionPoint:i}=O(e(_i)),s=o();return{sectionRootClientId:s,sectionClientIds:n(s),blockOrder:n(s),insertionPoint:t(),blockInsertionPoint:i(),blockInsertionPointVisible:r()}}),[]),h=(0,u.useReducedMotion)();if(!e)return;let g=!1;if(t!==i||!s||!s.includes(e))return null;const m=0===l?.index&&e===s[l.index],f=l&&l.hasOwnProperty("index")&&e===s[l.index-1];return"top"===n&&(g=m||d&&0===p.index&&e===s[p.index]),"bottom"===n&&(g=f||d&&e===s[p.index-1]),(0,re.jsx)(fs.__unstableAnimatePresence,{children:g&&(0,re.jsx)(fs.__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:h?0:.2,ease:[.6,0,.4,1]},className:ls("block-editor-block-list__zoom-out-separator",{"is-dragged-over":o}),"data-is-insertion-point":"true",onDragOver:()=>r(!0),onDragLeave:()=>r(!1),children:(0,re.jsx)(fs.__unstableMotion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0,transition:{delay:-.125}},transition:{ease:"linear",duration:.1,delay:.125},children:(0,C.__)("Drop pattern.")})})})}const yy=(0,a.createContext)(),Sy=new WeakMap;function wy({className:e,...t}){const n=(0,u.useViewportMatch)("medium"),{isOutlineMode:o,isFocusMode:r,temporarilyEditingAsBlocks:i}=(0,c.useSelect)((e=>{const{getSettings:t,getTemporarilyEditingAsBlocks:n,isTyping:o}=O(e(_i)),{outlineMode:r,focusMode:i}=t();return{isOutlineMode:r&&!o(),isFocusMode:i,temporarilyEditingAsBlocks:n()}}),[]),s=(0,c.useRegistry)(),{setBlockVisibility:l}=(0,c.useDispatch)(_i),d=(0,u.useDebounce)((0,a.useCallback)((()=>{const e={};Sy.get(s).forEach((([t,n])=>{e[t]=n})),l(e)}),[s]),300,{trailing:!0}),p=(0,a.useMemo)((()=>{const{IntersectionObserver:e}=window;if(e)return new e((e=>{Sy.get(s)||Sy.set(s,[]);for(const t of e){const e=t.target.getAttribute("data-block");Sy.get(s).push([e,t.isIntersecting])}d()}))}),[]),h=my({ref:(0,u.useMergeRefs)([qx(),Zx(),vy()]),className:ls("is-root-container",e,{"is-outline-mode":o,"is-focus-mode":r&&n})},t);return(0,re.jsxs)(yy.Provider,{value:p,children:[(0,re.jsx)("div",{...h}),!!i&&(0,re.jsx)(Cy,{clientId:i})]})}function Cy({clientId:e}){const{stopEditingAsBlocks:t}=O((0,c.useDispatch)(_i)),n=(0,c.useSelect)((t=>{const{isBlockSelected:n,hasSelectedInnerBlock:o}=t(_i);return n(e)||o(e,!0)}),[e]);return(0,a.useEffect)((()=>{n||t(e)}),[n,e,t]),null}function By(e){return(0,re.jsx)(v,{value:b,children:(0,re.jsx)(wy,{...e})})}const Iy=[],jy=new Set;function Ey({placeholder:e,rootClientId:t,renderAppender:n,__experimentalAppenderTagName:o,layout:r=Vl}){const i=!1!==n,s=!!n,{order:l,isZoomOut:a,selectedBlocks:u,visibleBlocks:d,shouldRenderAppender:p}=(0,c.useSelect)((e=>{const{getSettings:n,getBlockOrder:o,getSelectedBlockClientId:r,getSelectedBlockClientIds:l,__unstableGetVisibleBlocks:a,getTemplateLock:c,getBlockEditingMode:u,isSectionBlock:d,isZoomOut:p}=O(e(_i)),h=o(t);if(n().isPreviewMode)return{order:h,selectedBlocks:Iy,visibleBlocks:jy};const g=r();return{order:h,selectedBlocks:l(),visibleBlocks:a(),isZoomOut:p(),shouldRenderAppender:!d(t)&&"disabled"!==u(t)&&!c(t)&&i&&!p()&&(s||t===g||!t&&!g&&!h.length)}}),[t,i,s]);return(0,re.jsxs)(Hl,{value:r,children:[l.map((e=>(0,re.jsxs)(c.AsyncModeProvider,{value:!d.has(e)&&!u.includes(e),children:[a&&(0,re.jsx)(xy,{clientId:e,rootClientId:t,position:"top"}),(0,re.jsx)(Lx,{rootClientId:t,clientId:e}),a&&(0,re.jsx)(xy,{clientId:e,rootClientId:t,position:"bottom"})]},e))),l.length<1&&e,p&&(0,re.jsx)(Vx,{tagName:o,rootClientId:t,CustomAppender:n})]})}function Ty(e){return(0,re.jsx)(c.AsyncModeProvider,{value:!1,children:(0,re.jsx)(Ey,{...e})})}function My(e){const{isMultiSelecting:t,getMultiSelectedBlockClientIds:n,hasMultiSelection:o,getSelectedBlockClientId:r,getSelectedBlocksInitialCaretPosition:i,__unstableIsFullySelected:s}=e(_i);return{isMultiSelecting:t(),multiSelectedBlockClientIds:n(),hasMultiSelection:o(),selectedBlockClientId:r(),initialPosition:i(),isFullSelection:s()}}function Py(){const{initialPosition:e,isMultiSelecting:t,multiSelectedBlockClientIds:n,hasMultiSelection:o,selectedBlockClientId:r,isFullSelection:i}=(0,c.useSelect)(My,[]);return(0,u.useRefEffect)((r=>{const{ownerDocument:s}=r,{defaultView:l}=s;if(null==e)return;if(!o||t)return;const{length:a}=n;a<2||i&&(r.contentEditable=!0,r.focus(),l.getSelection().removeAllRanges())}),[o,t,n,r,e,i])}function Ry(e,t,n,o){let r,i=Ta.focus.focusable.find(n);return t&&i.reverse(),i=i.slice(i.indexOf(e)+1),o&&(r=e.getBoundingClientRect()),i.find((function(e){if(!(e.closest("[inert]")||1===e.children.length&&nm(e,e.firstElementChild)&&"true"===e.firstElementChild.getAttribute("contenteditable"))){if(!Ta.focus.tabbable.isTabbableIndex(e))return!1;if(e.isContentEditable&&"true"!==e.contentEditable)return!1;if(o){const t=e.getBoundingClientRect();if(t.left>=r.right||t.right<=r.left)return!1}return!0}}))}function Ny(){const{getMultiSelectedBlocksStartClientId:e,getMultiSelectedBlocksEndClientId:t,getSettings:n,hasMultiSelection:o,__unstableIsFullySelected:r}=(0,c.useSelect)(_i),{selectBlock:i}=(0,c.useDispatch)(_i);return(0,u.useRefEffect)((s=>{let l;function a(){l=null}function c(a){if(a.defaultPrevented)return;const{keyCode:c,target:u,shiftKey:d,ctrlKey:p,altKey:h,metaKey:g}=a,m=c===Pa.UP,f=c===Pa.DOWN,b=c===Pa.LEFT,k=c===Pa.RIGHT,v=m||b,_=b||k,x=m||f,y=_||x,S=d||p||h||g,w=x?Ta.isVerticalEdge:Ta.isHorizontalEdge,{ownerDocument:C}=s,{defaultView:B}=C;if(!y)return;if(o()){if(d)return;if(!r())return;return a.preventDefault(),void(v?i(e()):i(t(),-1))}if(!function(e,t,n){const o=t===Pa.UP||t===Pa.DOWN,{tagName:r}=e,i=e.getAttribute("type");return o&&!n?"INPUT"!==r||!["date","datetime-local","month","number","range","time","week"].includes(i):"INPUT"===r?["button","checkbox","number","color","file","image","radio","reset","submit"].includes(i):"TEXTAREA"!==r}(u,c,S))return;x?l||(l=(0,Ta.computeCaretRect)(B)):l=null;const I=(0,Ta.isRTL)(u)?!v:v,{keepCaretInsideBlock:j}=n();if(d)(function(e,t){const n=Ry(e,t,s);return n&&rm(n)})(u,v)&&w(u,v)&&(s.contentEditable=!0,s.focus());else if(!x||!(0,Ta.isVerticalEdge)(u,v)||h&&!(0,Ta.isHorizontalEdge)(u,I)||j){if(_&&B.getSelection().isCollapsed&&(0,Ta.isHorizontalEdge)(u,I)&&!j){const e=Ry(u,I,s);(0,Ta.placeCaretAtHorizontalEdge)(e,v),a.preventDefault()}}else{const e=Ry(u,v,s,!0);e&&((0,Ta.placeCaretAtVerticalEdge)(e,h?!v:v,h?void 0:l),a.preventDefault())}}return s.addEventListener("mousedown",a),s.addEventListener("keydown",c),()=>{s.removeEventListener("mousedown",a),s.removeEventListener("keydown",c)}}),[])}function Ly(){const{getBlockOrder:e,getSelectedBlockClientIds:t,getBlockRootClientId:n}=(0,c.useSelect)(_i),{multiSelect:o,selectBlock:r}=(0,c.useDispatch)(_i),i=(0,cb.__unstableUseShortcutEventMatch)();return(0,u.useRefEffect)((s=>{function l(l){if(!i("core/block-editor/select-all",l))return;const a=t();if(a.length<2&&!(0,Ta.isEntirelySelected)(l.target))return;l.preventDefault();const[c]=a,u=n(c),d=e(u);a.length!==d.length?o(d[0],d[d.length-1]):u&&(s.ownerDocument.defaultView.getSelection().removeAllRanges(),r(u))}return s.addEventListener("keydown",l),()=>{s.removeEventListener("keydown",l)}}),[])}function Ay(e,t){e.contentEditable=t,t&&e.focus()}function Oy(){const{startMultiSelect:e,stopMultiSelect:t}=(0,c.useDispatch)(_i),{isSelectionEnabled:n,hasSelectedBlock:o,isDraggingBlocks:r,isMultiSelecting:i}=(0,c.useSelect)(_i);return(0,u.useRefEffect)((s=>{const{ownerDocument:l}=s,{defaultView:a}=l;let c,u,d;function p(){t(),a.removeEventListener("mouseup",p),u=a.requestAnimationFrame((()=>{if(!o())return;Ay(s,!1);const e=a.getSelection();if(e.rangeCount){const t=e.getRangeAt(0),{commonAncestorContainer:n}=t,o=t.cloneRange();c.contains(n)&&(c.focus(),e.removeAllRanges(),e.addRange(o))}}))}function h({buttons:t,target:o,relatedTarget:l}){o.contains(d)&&(o.contains(l)||r()||1===t&&(i()||s!==o&&"true"===o.getAttribute("contenteditable")&&n()&&(c=o,e(),a.addEventListener("mouseup",p),Ay(s,!0))))}return s.addEventListener("mouseout",h),s.addEventListener("mousedown",(function({target:e}){d=e})),()=>{s.removeEventListener("mouseout",h),a.removeEventListener("mouseup",p),a.cancelAnimationFrame(u)}}),[e,t,n,o])}function Dy(e,t){e.contentEditable!==String(t)&&(e.contentEditable=t,t&&e.focus())}function zy(e){const t=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;return t?.closest("[data-wp-block-attribute-key]")}function Vy(){const{multiSelect:e,selectBlock:t,selectionChange:n}=(0,c.useDispatch)(_i),{getBlockParents:o,getBlockSelectionStart:r,isMultiSelecting:i}=(0,c.useSelect)(_i);return(0,u.useRefEffect)((s=>{const{ownerDocument:l}=s,{defaultView:a}=l;function c(l){const c=a.getSelection();if(!c.rangeCount)return;const u=function(e){const{anchorNode:t,anchorOffset:n}=e;return t.nodeType===t.TEXT_NODE||0===n?t:t.childNodes[n-1]}(c),d=function(e){const{focusNode:t,focusOffset:n}=e;return t.nodeType===t.TEXT_NODE||n===t.childNodes.length?t:0===n&&(0,Ta.isSelectionForward)(e)?null!==(o=t.previousSibling)&&void 0!==o?o:t.parentElement:t.childNodes[n];var o}(c);if(!s.contains(u)||!s.contains(d))return;const p=l.shiftKey&&"mouseup"===l.type;if(c.isCollapsed&&!p){if("true"===s.contentEditable&&!i()){Dy(s,!1);let e=u.nodeType===u.ELEMENT_NODE?u:u.parentElement;e=e?.closest("[contenteditable]"),e?.focus()}return}let h=rm(u),g=rm(d);if(p){const e=r(),t=rm(l.target),n=t!==g;(h===g&&c.isCollapsed||!g||n)&&(g=t),h!==e&&(h=e)}if(void 0!==h||void 0!==g)if(h===g)i()?e(h,h):t(h);else{const t=[...o(h),h],r=[...o(g),g],i=function(e,t){let n=0;for(;e[n]===t[n];)n++;return n}(t,r);if(t[i]!==h||r[i]!==g)return void e(t[i],r[i]);const s=zy(u),l=zy(d);if(s&&l){var m,f;const e=c.getRangeAt(0),t=(0,se.create)({element:s,range:e,__unstableIsEditableTree:!0}),o=(0,se.create)({element:l,range:e,__unstableIsEditableTree:!0}),r=null!==(m=t.start)&&void 0!==m?m:t.end,i=null!==(f=o.start)&&void 0!==f?f:o.end;n({start:{clientId:h,attributeKey:s.dataset.wpBlockAttributeKey,offset:r},end:{clientId:g,attributeKey:l.dataset.wpBlockAttributeKey,offset:i}})}else e(h,g)}else Dy(s,!1)}return l.addEventListener("selectionchange",c),a.addEventListener("mouseup",c),()=>{l.removeEventListener("selectionchange",c),a.removeEventListener("mouseup",c)}}),[e,t,n,o])}function Fy(){const{selectBlock:e}=(0,c.useDispatch)(_i),{isSelectionEnabled:t,getBlockSelectionStart:n,hasMultiSelection:o}=(0,c.useSelect)(_i);return(0,u.useRefEffect)((r=>{function i(i){if(!t()||0!==i.button)return;const s=n(),l=rm(i.target);i.shiftKey?s!==l&&(r.contentEditable=!0,r.focus()):o()&&e(l)}return r.addEventListener("mousedown",i),()=>{r.removeEventListener("mousedown",i)}}),[e,t,n,o])}function Hy(){const{__unstableIsFullySelected:e,getSelectedBlockClientIds:t,getSelectedBlockClientId:n,__unstableIsSelectionMergeable:o,hasMultiSelection:r,getBlockName:i,canInsertBlockType:s,getBlockRootClientId:a,getSelectionStart:d,getSelectionEnd:p,getBlockAttributes:h}=(0,c.useSelect)(_i),{replaceBlocks:g,__unstableSplitSelection:m,removeBlocks:f,__unstableDeleteSelection:b,__unstableExpandSelection:k,__unstableMarkAutomaticChange:v}=(0,c.useDispatch)(_i);return(0,u.useRefEffect)((c=>{function u(e){"true"===c.contentEditable&&e.preventDefault()}function _(u){if(!u.defaultPrevented)if(r())u.keyCode===Pa.ENTER?(c.contentEditable=!1,u.preventDefault(),e()?g(t(),(0,l.createBlock)((0,l.getDefaultBlockName)())):m()):u.keyCode===Pa.BACKSPACE||u.keyCode===Pa.DELETE?(c.contentEditable=!1,u.preventDefault(),e()?f(t()):o()?b(u.keyCode===Pa.DELETE):k()):1!==u.key.length||u.metaKey||u.ctrlKey||(c.contentEditable=!1,o()?b(u.keyCode===Pa.DELETE):(u.preventDefault(),c.ownerDocument.defaultView.getSelection().removeAllRanges()));else if(u.keyCode===Pa.ENTER){if(u.shiftKey||e())return;const t=n(),o=i(t),r=d(),c=p();if(r.attributeKey===c.attributeKey){const e=h(t)[r.attributeKey],n=(0,l.getBlockTransforms)("from").filter((({type:e})=>"enter"===e)),o=(0,l.findTransform)(n,(t=>t.regExp.test(e)));if(o)return g(t,o.transform({content:e})),void v()}if(!(0,l.hasBlockSupport)(o,"splitting",!1)&&!u.__deprecatedOnSplit)return;s(o,a(t))&&(m(),u.preventDefault())}}function x(e){r()&&(c.contentEditable=!1,o()?b():(e.preventDefault(),c.ownerDocument.defaultView.getSelection().removeAllRanges()))}return c.addEventListener("beforeinput",u),c.addEventListener("keydown",_),c.addEventListener("compositionstart",x),()=>{c.removeEventListener("beforeinput",u),c.removeEventListener("keydown",_),c.removeEventListener("compositionstart",x)}}),[])}function Gy(){const{getBlockName:e}=(0,c.useSelect)(_i),{getBlockType:t}=(0,c.useSelect)(l.store),{createSuccessNotice:n}=(0,c.useDispatch)(rr.store);return(0,a.useCallback)(((o,r)=>{let i="";if(1===r.length){const n=r[0],s=t(e(n))?.title;i="copy"===o?(0,C.sprintf)( -// Translators: Name of the block being copied, e.g. "Paragraph". -// Translators: Name of the block being copied, e.g. "Paragraph". -(0,C.__)('Copied "%s" to clipboard.'),s):(0,C.sprintf)( -// Translators: Name of the block being cut, e.g. "Paragraph". -// Translators: Name of the block being cut, e.g. "Paragraph". -(0,C.__)('Moved "%s" to clipboard.'),s)}else i="copy"===o?(0,C.sprintf)( -// Translators: %d: Number of blocks being copied. -// Translators: %d: Number of blocks being copied. -(0,C._n)("Copied %d block to clipboard.","Copied %d blocks to clipboard.",r.length),r.length):(0,C.sprintf)( -// Translators: %d: Number of blocks being cut. -// Translators: %d: Number of blocks being cut. -(0,C._n)("Moved %d block to clipboard.","Moved %d blocks to clipboard.",r.length),r.length);n(i,{type:"snackbar"})}),[])}function $y({clipboardData:e}){let t="",n="";try{t=e.getData("text/plain"),n=e.getData("text/html")}catch(e){return}n=function(e){const t=e.indexOf("\x3c!--StartFragment--\x3e");if(!(t>-1))return e;const n=(e=e.substring(t+20)).indexOf("\x3c!--EndFragment--\x3e");return n>-1&&(e=e.substring(0,n)),e}(n),n=function(e){return e.startsWith("")?e.slice(22):e}(n);const o=(0,Ta.getFilesFromDataTransfer)(e);return o.length&&!function(e,t){if(t&&1===e?.length&&0===e[0].type.indexOf("image/")){const e=/<\s*img\b/gi;if(1!==t.match(e)?.length)return!0;const n=/<\s*img\b[^>]*\bsrc="file:\/\//i;if(t.match(n))return!0}return!1}(o,n)?{files:o}:{html:n,plainText:t,files:[]}}const Uy=Symbol("requiresWrapperOnCopy");function Wy(e,t,n){let o=t;const[r]=t;if(r&&n.select(l.store).getBlockType(r.name)[Uy]){const{getBlockRootClientId:e,getBlockName:t,getBlockAttributes:i}=n.select(_i),s=e(r.clientId),a=t(s);a&&(o=(0,l.createBlock)(a,i(s),o))}const i=(0,l.serialize)(o);var s;e.clipboardData.setData("text/plain",(s=(s=i).replace(/
/g,"\n"),(0,Ta.__unstableStripHTML)(s).trim().replace(/\n\n+/g,"\n\n"))),e.clipboardData.setData("text/html",i)}function Ky(){const e=(0,c.useRegistry)(),{getBlocksByClientId:t,getSelectedBlockClientIds:n,hasMultiSelection:o,getSettings:r,getBlockName:i,__unstableIsFullySelected:s,__unstableIsSelectionCollapsed:a,__unstableIsSelectionMergeable:d,__unstableGetSelectedBlocksWithPartialSelection:p,canInsertBlockType:h,getBlockRootClientId:g}=(0,c.useSelect)(_i),{flashBlock:m,removeBlocks:f,replaceBlocks:b,__unstableDeleteSelection:k,__unstableExpandSelection:v,__unstableSplitSelection:_}=(0,c.useDispatch)(_i),x=Gy();return(0,u.useRefEffect)((c=>{function u(u){if(u.defaultPrevented)return;const y=n();if(0===y.length)return;if(!o()){const{target:e}=u,{ownerDocument:t}=e;if("copy"===u.type||"cut"===u.type?(0,Ta.documentHasUncollapsedSelection)(t):(0,Ta.documentHasSelection)(t)&&!t.activeElement.isContentEditable)return}const{activeElement:S}=u.target.ownerDocument;if(!c.contains(S))return;const w=d(),C=a()||s(),B=!C&&!w;if("copy"===u.type||"cut"===u.type)if(u.preventDefault(),1===y.length&&m(y[0]),B)v();else{let n;if(x(u.type,y),C)n=t(y);else{const[e,o]=p();n=[e,...t(y.slice(1,y.length-1)),o]}Wy(u,n,e)}if("cut"===u.type)C&&!B?f(y):(u.target.ownerDocument.activeElement.contentEditable=!1,k());else if("paste"===u.type){const{__experimentalCanUserUseUnfilteredHTML:e}=r();if("true"===u.clipboardData.getData("rich-text"))return;const{plainText:t,html:n,files:a}=$y(u),c=s();let d=[];if(a.length){const e=(0,l.getBlockTransforms)("from");d=a.reduce(((t,n)=>{const o=(0,l.findTransform)(e,(e=>"files"===e.type&&e.isMatch([n])));return o&&t.push(o.transform([n])),t}),[]).flat()}else d=(0,l.pasteHandler)({HTML:n,plainText:t,mode:c?"BLOCKS":"AUTO",canUserUseUnfilteredHTML:e});if("string"==typeof d)return;if(c)return b(y,d,d.length-1,-1),void u.preventDefault();if(!o()&&!(0,l.hasBlockSupport)(i(y[0]),"splitting",!1)&&!u.__deprecatedOnSplit)return;const[p]=y,m=g(p),f=[];for(const e of d)if(h(e.name,m))f.push(e);else{const t=i(m),n=e.name!==t?(0,l.switchToBlockType)(e,t):[e];if(!n)return;for(const e of n)for(const t of e.innerBlocks)f.push(t)}_(f),u.preventDefault()}}return c.ownerDocument.addEventListener("copy",u),c.ownerDocument.addEventListener("cut",u),c.ownerDocument.addEventListener("paste",u),()=>{c.ownerDocument.removeEventListener("copy",u),c.ownerDocument.removeEventListener("cut",u),c.ownerDocument.removeEventListener("paste",u)}}),[])}function Zy(){const[e,t,n]=function(){const e=(0,a.useRef)(),t=(0,a.useRef)(),n=(0,a.useRef)(),{hasMultiSelection:o,getSelectedBlockClientId:r,getBlockCount:i,getBlockOrder:s,getLastFocus:l,getSectionRootClientId:d,isZoomOut:p}=O((0,c.useSelect)(_i)),{setLastFocus:h}=O((0,c.useDispatch)(_i)),g=(0,a.useRef)();function m(t){const n=e.current.ownerDocument===t.target.ownerDocument?e.current:e.current.ownerDocument.defaultView.frameElement;if(g.current)g.current=null;else if(o())e.current.focus();else if(r())l()?.current?l().current.focus():e.current.querySelector(`[data-block="${r()}"]`).focus();else if(p()){const t=d(),o=s(t);o.length?e.current.querySelector(`[data-block="${o[0]}"]`).focus():t?e.current.querySelector(`[data-block="${t}"]`).focus():n.focus()}else{const o=t.target.compareDocumentPosition(n)&t.target.DOCUMENT_POSITION_FOLLOWING,r=Ta.focus.tabbable.find(e.current);r.length&&(o?r[0]:r[r.length-1]).focus()}}const f=(0,re.jsx)("div",{ref:t,tabIndex:"0",onFocus:m}),b=(0,re.jsx)("div",{ref:n,tabIndex:"0",onFocus:m}),k=(0,u.useRefEffect)((o=>{function r(e){if(e.defaultPrevented)return;if(e.keyCode!==Pa.TAB)return;const o=e.shiftKey,r=o?"findPrevious":"findNext",i=Ta.focus.tabbable[r](e.target),s=e.target.closest("[data-block]"),l=s&&i&&(nm(s,i)||om(s,i));if((0,Ta.isFormElement)(i)&&l)return;const a=o?t:n;g.current=!0,a.current.focus({preventScroll:!0})}function s(e){h({...l(),current:e.target});const{ownerDocument:t}=o;e.relatedTarget||t.activeElement!==t.body||0!==i()||o.focus()}function a(o){if(o.keyCode!==Pa.TAB)return;if("region"===o.target?.getAttribute("role"))return;if(e.current===o.target)return;const r=o.shiftKey?"findPrevious":"findNext",i=Ta.focus.tabbable[r](o.target);i!==t.current&&i!==n.current||(o.preventDefault(),i.focus({preventScroll:!0}))}const{ownerDocument:c}=o,{defaultView:u}=c;return u.addEventListener("keydown",a),o.addEventListener("keydown",r),o.addEventListener("focusout",s),()=>{u.removeEventListener("keydown",a),o.removeEventListener("keydown",r),o.removeEventListener("focusout",s)}}),[]);return[f,(0,u.useMergeRefs)([e,k]),b]}(),o=(0,c.useSelect)((e=>e(_i).hasMultiSelection()),[]);return[e,(0,u.useMergeRefs)([t,Ky(),Hy(),Oy(),Vy(),Fy(),Py(),Ly(),Ny(),(0,u.useRefEffect)((e=>(e.tabIndex=0,e.dataset.hasMultiSelection=o,o?(e.setAttribute("aria-label",(0,C.__)("Multiple selected blocks")),()=>{delete e.dataset.hasMultiSelection,e.removeAttribute("aria-label")}):()=>{delete e.dataset.hasMultiSelection})),[o])]),n]}const qy=(0,a.forwardRef)((function({children:e,...t},n){const[o,r,i]=Zy();return(0,re.jsxs)(re.Fragment,{children:[o,(0,re.jsx)("div",{...t,ref:(0,u.useMergeRefs)([r,n]),className:ls(t.className,"block-editor-writing-flow"),children:e}),i]})}));let Yy=null;function Xy({frameSize:e,containerWidth:t,maxContainerWidth:n,scaleContainerWidth:o}){return(Math.min(t,n)-2*e)/o}function Qy(e,t,n){const o={};for(const t in e)o[t]=e[t];if(e instanceof n.contentDocument.defaultView.MouseEvent){const e=n.getBoundingClientRect();o.clientX+=e.left,o.clientY+=e.top}const r=new t(e.type,o);o.defaultPrevented&&r.preventDefault(),!n.dispatchEvent(r)&&e.preventDefault()}function Jy(e){return(0,u.useRefEffect)((()=>{const{defaultView:t}=e;if(!t)return;const{frameElement:n}=t,o=e.documentElement,r=["dragover","mousemove"],i={};for(const e of r)i[e]=e=>{const t=Object.getPrototypeOf(e).constructor.name;Qy(e,window[t],n)},o.addEventListener(e,i[e]);return()=>{for(const e of r)o.removeEventListener(e,i[e])}}))}function eS({contentRef:e,children:t,tabIndex:n=0,scale:o=1,frameSize:r=0,readonly:i,forwardedRef:s,title:l=(0,C.__)("Editor canvas"),...d}){const{resolvedAssets:p,isPreviewMode:h}=(0,c.useSelect)((e=>{const{getSettings:t}=e(_i),n=t();return{resolvedAssets:n.__unstableResolvedAssets,isPreviewMode:n.isPreviewMode}}),[]),{styles:g="",scripts:m=""}=p,[f,b]=(0,a.useState)(),[k,v]=(0,a.useState)([]),_=qx(),[x,y,S]=Zy(),w=(0,u.useRefEffect)((e=>{let t;function n(e){e.preventDefault()}function o(){const{contentDocument:o,ownerDocument:r}=e,{documentElement:i}=o;t=o,i.classList.add("block-editor-iframe__html"),_(i),v(Array.from(r.body.classList).filter((e=>e.startsWith("admin-color-")||e.startsWith("post-type-")||"wp-embed-responsive"===e))),o.dir=r.dir;for(const e of Yy||(Yy=Array.from(document.styleSheets).reduce(((e,t)=>{try{t.cssRules}catch(t){return e}const{ownerNode:n,cssRules:o}=t;if(null===n)return e;if(!o)return e;if(n.id.startsWith("wp-"))return e;if(!n.id)return e;if(function e(t){return Array.from(t).find((({selectorText:t,conditionText:n,cssRules:o})=>n?e(o):t&&(t.includes(".editor-styles-wrapper")||t.includes(".wp-block"))))}(o)){const t="STYLE"===n.tagName;if(t){const t=n.id.replace("-inline-css","-css"),o=document.getElementById(t);o&&e.push(o.cloneNode(!0))}if(e.push(n.cloneNode(!0)),!t){const t=n.id.replace("-css","-inline-css"),o=document.getElementById(t);o&&e.push(o.cloneNode(!0))}}return e}),[]),Yy))o.getElementById(e.id)||(o.head.appendChild(e.cloneNode(!0)),h||console.warn(`${e.id} was added to the iframe incorrectly. Please use block.json or enqueue_block_assets to add styles to the iframe.`,e));t.addEventListener("dragover",n,!1),t.addEventListener("drop",n,!1),t.addEventListener("click",(e=>{if("A"===e.target.tagName){e.preventDefault();const n=e.target.getAttribute("href");n.startsWith("#")&&(t.defaultView.location.hash=n.slice(1))}}))}return e._load=()=>{b(e.contentDocument)},e.addEventListener("load",o),()=>{delete e._load,e.removeEventListener("load",o),t?.removeEventListener("dragover",n),t?.removeEventListener("drop",n)}}),[]),{contentResizeListener:B,containerResizeListener:I,isZoomedOut:j,scaleContainerWidth:E}=function({frameSize:e,iframeDocument:t,maxContainerWidth:n=750,scale:o}){const[r,{height:i}]=(0,u.useResizeObserver)(),[s,{width:l,height:c}]=(0,u.useResizeObserver)(),d=(0,a.useRef)(0),p=1!==o,h=(0,u.useReducedMotion)(),g="auto-scaled"===o,m=(0,a.useRef)(!1),f=(0,a.useRef)(null);(0,a.useEffect)((()=>{p||(d.current=l)}),[l,p]);const b=Math.max(d.current,l),k=g?Xy({frameSize:e,containerWidth:l,maxContainerWidth:n,scaleContainerWidth:b}):o,v=(0,a.useRef)({scaleValue:k,frameSize:e,containerHeight:0,scrollTop:0,scrollHeight:0}),_=(0,a.useRef)({scaleValue:k,frameSize:e,containerHeight:0,scrollTop:0,scrollHeight:0}),x=(0,a.useCallback)((()=>{const{scrollTop:e}=v.current,{scrollTop:n}=_.current;return t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scroll-top",`${e}px`),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scroll-top-next",`${n}px`),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-overflow-behavior",v.current.scrollHeight===v.current.containerHeight?"auto":"scroll"),t.documentElement.classList.add("zoom-out-animation"),t.documentElement.animate(function(e,t){const{scaleValue:n,frameSize:o,scrollTop:r}=e,{scaleValue:i,frameSize:s,scrollTop:l}=t;return[{translate:"0 0",scale:n,paddingTop:o/n+"px",paddingBottom:o/n+"px"},{translate:`0 ${r-l}px`,scale:i,paddingTop:s/i+"px",paddingBottom:s/i+"px"}]}(v.current,_.current),{easing:"cubic-bezier(0.46, 0.03, 0.52, 0.96)",duration:400})}),[t]),y=(0,a.useCallback)((()=>{m.current=!1,f.current=null,t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scale",_.current.scaleValue),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-frame-size",`${_.current.frameSize}px`),t.documentElement.classList.remove("zoom-out-animation"),t.documentElement.scrollTop=_.current.scrollTop,t.documentElement.style.removeProperty("--wp-block-editor-iframe-zoom-out-scroll-top"),t.documentElement.style.removeProperty("--wp-block-editor-iframe-zoom-out-scroll-top-next"),t.documentElement.style.removeProperty("--wp-block-editor-iframe-zoom-out-overflow-behavior"),v.current=_.current}),[t]),S=(0,a.useRef)(!1);return(0,a.useEffect)((()=>{const e=t&&S.current!==p;if(S.current=p,e&&(m.current=!0,p))return t.documentElement.classList.add("is-zoomed-out"),()=>{t.documentElement.classList.remove("is-zoomed-out")}}),[t,p]),(0,a.useEffect)((()=>{if(t&&(g&&1!==v.current.scaleValue&&(v.current.scaleValue=Xy({frameSize:v.current.frameSize,containerWidth:l,maxContainerWidth:n,scaleContainerWidth:l})),k<1&&(m.current||(t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scale",k),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",`${l}px`),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scale-container-width",`${b}px`)),m.current))if(m.current=!1,f.current){f.current.reverse();const e=v.current,t=_.current;v.current=t,_.current=e}else v.current.scrollTop=t.documentElement.scrollTop,v.current.scrollHeight=t.documentElement.scrollHeight,v.current.containerHeight=c,_.current={scaleValue:k,frameSize:e,containerHeight:t.documentElement.clientHeight},_.current.scrollHeight=function(e,t){const{scaleValue:n,scrollHeight:o}=e,{frameSize:r,scaleValue:i}=t;return o*(i/n)+2*r}(v.current,_.current),_.current.scrollTop=function(e,t){const{containerHeight:n,frameSize:o,scaleValue:r,scrollTop:i}=e,{containerHeight:s,frameSize:l,scaleValue:a,scrollHeight:c}=t;let u=i;u=(u+n/2-o)/r-n/2,u=(u+s/2)*a+l-s/2,u=i<=o?0:u;const d=c-s;return Math.round(Math.min(Math.max(0,u),Math.max(0,d)))}(v.current,_.current),f.current=x(),h?y():f.current.onfinish=y}),[x,y,h,g,k,e,t,i,l,c,n,b]),{isZoomedOut:p,scaleContainerWidth:b,contentResizeListener:r,containerResizeListener:s}}({scale:o,frameSize:parseInt(r),iframeDocument:f}),T=(0,u.useDisabled)({isDisabled:!i}),M=(0,u.useMergeRefs)([Jy(f),e,_,y,T]),P=`\n\n\t\n\t\t\n\t\t\n\t\t