PHP 8.2.31
Preview: form_editor.js Size: 1.41 MB
/home/nshryvcy/himaltourism.com/wp-content/plugins/mailpoet/assets/dist/js/form_editor.js

/*! For license information please see form_editor.js.LICENSE.txt */
(self.webpackChunk=self.webpackChunk||[]).push([[514],{89504:function(e,t,n){e=n.nmd(e),function(t){"use strict";var n,r="function"==typeof(n=t.atob)?n:"function"==typeof Buffer?function(e){return new Buffer(e,"base64").toString("binary")}:"object"==typeof t.base64js?function(e){var n=t.base64js.b64ToByteArray(e);return Array.prototype.map.call(n,(function(e){return String.fromCharCode(e)})).join("")}:function(){throw new Error("You're probably in an old browser or an iOS webworker. It might help to include beatgammit's base64-js.")};t.atob=r,e&&e.exports&&(e.exports=r)}(window)},17121:function(e,t){var n,r;n=function(e,t){"use strict";var n,r,o="function"==typeof Map?new Map:(n=[],r=[],{has:function(e){return n.indexOf(e)>-1},get:function(e){return r[n.indexOf(e)]},set:function(e,t){-1===n.indexOf(e)&&(n.push(e),r.push(t))},delete:function(e){var t=n.indexOf(e);t>-1&&(n.splice(t,1),r.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 l(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!o.has(e)){var t=null,n=null,r=null,l=function(){e.clientWidth!==n&&d()},a=function(t){window.removeEventListener("resize",l,!1),e.removeEventListener("input",d,!1),e.removeEventListener("keyup",d,!1),e.removeEventListener("autosize:destroy",a,!1),e.removeEventListener("autosize:update",d,!1),Object.keys(t).forEach((function(n){e.style[n]=t[n]})),o.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",a,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",d,!1),window.addEventListener("resize",l,!1),e.addEventListener("input",d,!1),e.addEventListener("autosize:update",d,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",o.set(e,{destroy:a,update:d}),"vertical"===(s=window.getComputedStyle(e,null)).resize?e.style.resize="none":"both"===s.resize&&(e.style.resize="horizontal"),t="content-box"===s.boxSizing?-(parseFloat(s.paddingTop)+parseFloat(s.paddingBottom)):parseFloat(s.borderTopWidth)+parseFloat(s.borderBottomWidth),isNaN(t)&&(t=0),d()}var s;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 r=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),o=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+t+"px",n=e.clientWidth,r.forEach((function(e){e.node.scrollTop=e.scrollTop})),o&&(document.documentElement.scrollTop=o)}}function d(){u();var t=Math.round(parseFloat(e.style.height)),n=window.getComputedStyle(e,null),o="content-box"===n.boxSizing?Math.round(parseFloat(n.height)):e.offsetHeight;if(o<t?"hidden"===n.overflowY&&(c("scroll"),u(),o="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight):"hidden"!==n.overflowY&&(c("hidden"),u(),o="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight),r!==o){r=o;var l=i("autosize:resized");try{e.dispatchEvent(l)}catch(e){}}}}function a(e){var t=o.get(e);t&&t.destroy()}function s(e){var t=o.get(e);t&&t.update()}var c=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((c=function(e){return e}).destroy=function(e){return e},c.update=function(e){return e}):((c=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],(function(e){return l(e)})),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],a),e},c.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],s),e}),t.default=c,e.exports=t.default},void 0===(r=n.apply(t,[e,t]))||(e.exports=r)},84972:function(e,t,n){"use strict";var r={};n.r(r),n.d(r,{__experimentalGetUnprocessedBlockTypes:function(){return nt},__experimentalHasContentRoleAttribute:function(){return kt},getActiveBlockVariation:function(){return at},getBlockStyles:function(){return it},getBlockSupport:function(){return gt},getBlockType:function(){return ot},getBlockTypes:function(){return rt},getBlockVariations:function(){return lt},getCategories:function(){return ct},getChildBlockNames:function(){return ht},getCollections:function(){return ut},getDefaultBlockName:function(){return dt},getDefaultBlockVariation:function(){return st},getFreeformFallbackBlockName:function(){return pt},getGroupingBlockName:function(){return ft},getUnregisteredFallbackBlockName:function(){return mt},hasBlockSupport:function(){return vt},hasChildBlocks:function(){return yt},hasChildBlocksWithInserterSupport:function(){return _t},isMatchingSearchTerm:function(){return bt}});var o={};n.r(o),n.d(o,{getSupportedStyles:function(){return Ct}});var i={};n.r(i),n.d(i,{__experimentalReapplyBlockTypeFilters:function(){return Dt},__experimentalRegisterBlockType:function(){return At},addBlockCollection:function(){return Ut},addBlockStyles:function(){return Mt},addBlockTypes:function(){return Pt},addBlockVariations:function(){return Zt},removeBlockCollection:function(){return Gt},removeBlockStyles:function(){return Ot},removeBlockTypes:function(){return Rt},removeBlockVariations:function(){return Ft},setCategories:function(){return Wt},setDefaultBlockName:function(){return jt},setFreeformFallbackBlockName:function(){return zt},setGroupingBlockName:function(){return Vt},setUnregisteredFallbackBlockName:function(){return Ht},updateCategory:function(){return $t}});var l={};n.r(l),n.d(l,{getFormatType:function(){return mi},getFormatTypeForBareElement:function(){return fi},getFormatTypeForClassName:function(){return hi},getFormatTypes:function(){return pi}});var a={};n.r(a),n.d(a,{addFormatTypes:function(){return gi},removeFormatTypes:function(){return vi}});var s={};n.r(s),n.d(s,{__experimentalGetActiveBlockIdByBlockNames:function(){return Gs},__experimentalGetAllowedBlocks:function(){return Es},__experimentalGetAllowedPatterns:function(){return Ns},__experimentalGetBlockListSettingsForBlocks:function(){return Ms},__experimentalGetDirectInsertBlock:function(){return Ss},__experimentalGetGlobalBlocksByName:function(){return oa},__experimentalGetLastBlockAttributeChanges:function(){return Fs},__experimentalGetParsedPattern:function(){return Is},__experimentalGetPatternTransformItems:function(){return Ps},__experimentalGetPatternsByBlockTypes:function(){return Ls},__experimentalGetReusableBlockTitle:function(){return Os},__unstableGetBlockWithoutInnerBlocks:function(){return Xl},__unstableGetClientIdWithClientIdsTree:function(){return Ql},__unstableGetClientIdsTree:function(){return ea},__unstableGetContentLockingParent:function(){return Xs},__unstableGetEditorMode:function(){return Hs},__unstableGetSelectedBlocksWithPartialSelection:function(){return Fa},__unstableGetTemporarilyEditingAsBlocks:function(){return Js},__unstableGetVisibleBlocks:function(){return Ys},__unstableHasActiveBlockOverlayActive:function(){return Qs},__unstableIsFullySelected:function(){return Ra},__unstableIsLastBlockChangeIgnored:function(){return Zs},__unstableIsSelectionCollapsed:function(){return Ma},__unstableIsSelectionMergeable:function(){return Za},__unstableIsWithinBlockOverlay:function(){return ec},__unstableSelectionHasUnmergeableBlock:function(){return Oa},areInnerBlocksControlled:function(){return Us},canEditBlock:function(){return fs},canInsertBlockType:function(){return ss},canInsertBlocks:function(){return cs},canLockBlockType:function(){return hs},canMoveBlock:function(){return ps},canMoveBlocks:function(){return ms},canRemoveBlock:function(){return us},canRemoveBlocks:function(){return ds},didAutomaticChange:function(){return Ws},getAdjacentBlockClientId:function(){return ka},getAllowedBlocks:function(){return Cs},getBlock:function(){return Yl},getBlockAttributes:function(){return Kl},getBlockCount:function(){return aa},getBlockHierarchyRootClientId:function(){return ya},getBlockIndex:function(){return za},getBlockInsertionPoint:function(){return ts},getBlockListSettings:function(){return As},getBlockMode:function(){return qa},getBlockName:function(){return Gl},getBlockNamesByClientId:function(){return la},getBlockOrder:function(){return ja},getBlockParents:function(){return va},getBlockParentsByBlockName:function(){return ba},getBlockRootClientId:function(){return ga},getBlockSelectionEnd:function(){return da},getBlockSelectionStart:function(){return ua},getBlockTransformItems:function(){return xs},getBlocks:function(){return Jl},getBlocksByClientId:function(){return ia},getClientIdsOfDescendants:function(){return ta},getClientIdsWithDescendants:function(){return na},getDraggedBlockClientIds:function(){return Xa},getFirstMultiSelectedBlockClientId:function(){return Ta},getGlobalBlockCount:function(){return ra},getInserterItems:function(){return ks},getLastMultiSelectedBlockClientId:function(){return Na},getLowestCommonAncestorWithSelectedBlock:function(){return _a},getMultiSelectedBlockClientIds:function(){return Sa},getMultiSelectedBlocks:function(){return Ia},getMultiSelectedBlocksEndClientId:function(){return Da},getMultiSelectedBlocksStartClientId:function(){return Aa},getNextBlockClientId:function(){return wa},getPatternsByBlockTypes:function(){return Bs},getPreviousBlockClientId:function(){return xa},getSelectedBlock:function(){return ha},getSelectedBlockClientId:function(){return fa},getSelectedBlockClientIds:function(){return Ea},getSelectedBlockCount:function(){return pa},getSelectedBlocksInitialCaretPosition:function(){return Ca},getSelectionEnd:function(){return ca},getSelectionStart:function(){return sa},getSettings:function(){return Ds},getTemplate:function(){return os},getTemplateLock:function(){return is},hasBlockMovingClientId:function(){return Vs},hasInserterItems:function(){return ws},hasMultiSelection:function(){return $a},hasSelectedBlock:function(){return ma},hasSelectedInnerBlock:function(){return Va},isAncestorBeingDragged:function(){return Qa},isAncestorMultiSelected:function(){return Pa},isBlockBeingDragged:function(){return Ja},isBlockHighlighted:function(){return $s},isBlockInsertionPointVisible:function(){return ns},isBlockMultiSelected:function(){return La},isBlockSelected:function(){return Ha},isBlockValid:function(){return ql},isBlockVisible:function(){return Ks},isBlockWithinSelection:function(){return Wa},isCaretWithinFormattedText:function(){return es},isDraggingBlocks:function(){return Ya},isFirstMultiSelectedBlock:function(){return Ba},isLastBlockChangePersistent:function(){return Rs},isMultiSelecting:function(){return Ua},isNavigationMode:function(){return zs},isSelectionEnabled:function(){return Ga},isTyping:function(){return Ka},isValidTemplate:function(){return rs},wasBlockJustInserted:function(){return qs}});var c={};n.r(c),n.d(c,{__experimentalUpdateSettings:function(){return nc},hideBlockInterface:function(){return rc},showBlockInterface:function(){return oc}});var u={};n.r(u),n.d(u,{getLastInsertedBlocksClientIds:function(){return lc},isBlockInterfaceHidden:function(){return ic}});var d={};n.r(d),n.d(d,{__unstableDeleteSelection:function(){return Zc},__unstableExpandSelection:function(){return jc},__unstableMarkAutomaticChange:function(){return iu},__unstableMarkLastChangeAsPersistent:function(){return ru},__unstableMarkNextChangeAsNotPersistent:function(){return ou},__unstableSaveReusableBlock:function(){return nu},__unstableSetEditorMode:function(){return au},__unstableSetTemporarilyEditingAsBlocks:function(){return gu},__unstableSplitSelection:function(){return Fc},clearSelectedBlock:function(){return xc},duplicateBlocks:function(){return cu},enterFormattedText:function(){return Yc},exitFormattedText:function(){return Xc},flashBlock:function(){return mu},hideInsertionPoint:function(){return Rc},insertAfterBlock:function(){return du},insertBeforeBlock:function(){return uu},insertBlock:function(){return Pc},insertBlocks:function(){return Ac},insertDefaultBlock:function(){return Qc},mergeBlocks:function(){return zc},moveBlockToPosition:function(){return Lc},moveBlocksDown:function(){return Tc},moveBlocksToPosition:function(){return Bc},moveBlocksUp:function(){return Nc},multiSelect:function(){return kc},receiveBlocks:function(){return mc},removeBlock:function(){return Vc},removeBlocks:function(){return Hc},replaceBlock:function(){return Sc},replaceBlocks:function(){return Ec},replaceInnerBlocks:function(){return Wc},resetBlocks:function(){return uc},resetSelection:function(){return pc},selectBlock:function(){return gc},selectNextBlock:function(){return bc},selectPreviousBlock:function(){return vc},selectionChange:function(){return Jc},setBlockMovingClientId:function(){return su},setBlockVisibility:function(){return hu},setHasControlledInnerBlocks:function(){return fu},setNavigationMode:function(){return lu},setTemplateValidity:function(){return Mc},showInsertionPoint:function(){return Dc},startDraggingBlocks:function(){return qc},startMultiSelect:function(){return yc},startTyping:function(){return Uc},stopDraggingBlocks:function(){return Kc},stopMultiSelect:function(){return _c},stopTyping:function(){return Gc},synchronizeTemplate:function(){return Oc},toggleBlockHighlight:function(){return pu},toggleBlockMode:function(){return $c},toggleSelection:function(){return wc},updateBlock:function(){return hc},updateBlockAttributes:function(){return fc},updateBlockListSettings:function(){return eu},updateSettings:function(){return tu},validateBlocksToTemplate:function(){return dc}});var p={};n.r(p),n.d(p,{ButtonContentView:function(){return Nd},LabelView:function(){return Cd},buttonView:function(){return Sd},labelBlock:function(){return Ed}});var m={};n.r(m),n.d(m,{TooltipContent:function(){return nB},TooltipPopoverView:function(){return rB},TooltipShortcut:function(){return iB},noOutline:function(){return oB}});var f={};n.r(f),n.d(f,{applyStylesToAllTextInputs:function(){return uz},blocksChangedInBlockEditor:function(){return cz},changeActiveSidebar:function(){return Xj},changeFormBlocks:function(){return Dj},changeFormName:function(){return Rj},changeFormSettings:function(){return Gj},changeFormStyles:function(){return Fj},changePreviewSettings:function(){return Jj},createCustomField:function(){return az},createCustomFieldDone:function(){return Wj},createCustomFieldFailed:function(){return Uj},createCustomFieldStarted:function(){return $j},customFieldEdited:function(){return jj},deleteCustomField:function(){return sz},deleteCustomFieldDone:function(){return Oj},deleteCustomFieldFailed:function(){return Zj},deleteCustomFieldStarted:function(){return Mj},hidePreview:function(){return tz},historyRedo:function(){return pz},historyUndo:function(){return dz},removeNotice:function(){return nz},saveCustomField:function(){return lz},saveCustomFieldDone:function(){return zj},saveCustomFieldFailed:function(){return Vj},saveCustomFieldStarted:function(){return Hj},saveForm:function(){return iz},saveFormDone:function(){return qj},saveFormFailed:function(){return Yj},saveFormStarted:function(){return Kj},showPlacementSettings:function(){return Qj},showPreview:function(){return ez},switchDefaultSidebarTab:function(){return rz},toggleForm:function(){return Pj},toggleFullscreen:function(){return Aj},toggleInserter:function(){return Lj},toggleSidebar:function(){return Bj},toggleSidebarPanel:function(){return oz},tutorialDismissed:function(){return mz}});var h={};n.r(h),n.d(h,{selectCategory:function(){return b0},selectTemplate:function(){return v0}});var g={};n.r(g),n.d(g,{CALL_API:function(){return Nz.t},TRACK_EVENT:function(){return y0.L}});var v=n(70079),b=n(99581),y=n(77159),_=n(51561),k=n(1349),x=n(65443),w=n.n(x),C=n(8175),E=n(10159),S=n(48405),I=n(46538),T=n(47585),N=n(7936);const B=[],L=()=>{const{wp:e}=window;return e.media.view.MediaFrame.Select.extend({featuredImageToolbar(t){this.createSelectToolbar(t,{text:e.media.view.l10n.setFeaturedImage,state:this.options.state})},editState(){const t=this.state("featured-image").get("selection"),n=new e.media.view.EditImage({model:t.single(),controller:this}).render();this.content.set(n),n.loadEditor()},createStates:function(){this.on("toolbar:create:featured-image",this.featuredImageToolbar,this),this.on("content:render:edit-image",this.editState,this),this.states.add([new e.media.controller.FeaturedImage,new e.media.controller.EditImage({model:this.options.editImage})])}})},P=()=>{const{wp:e}=window;return e.media.view.MediaFrame.Post.extend({galleryToolbar(){const t=this.state().get("editing");this.toolbar.set(new e.media.view.Toolbar({controller:this,items:{insert:{style:"primary",text:t?e.media.view.l10n.updateGallery:e.media.view.l10n.insertGallery,priority:80,requires:{library:!0},click(){const e=this.controller,t=e.state();e.close(),t.trigger("update",t.get("library")),e.setState(e.options.state),e.reset()}}}}))},editState(){const t=this.state("gallery").get("selection"),n=new e.media.view.EditImage({model:t.single(),controller:this}).render();this.content.set(n),n.loadEditor()},createStates:function(){this.on("toolbar:create:main-gallery",this.galleryToolbar,this),this.on("content:render:edit-image",this.editState,this),this.states.add([new e.media.controller.Library({id:"gallery",title:e.media.view.l10n.createGalleryTitle,priority:40,toolbar:"main-gallery",filterable:"uploaded",multiple:"add",editable:!1,library:e.media.query({type:"image",...this.options.library})}),new e.media.controller.EditImage({model:this.options.editImage}),new e.media.controller.GalleryEdit({library:this.options.selection,editing:this.options.editing,menu:"gallery",displaySettings:!1,multiple:!0}),new e.media.controller.GalleryAdd])}})},A=e=>["sizes","mime","type","subtype","id","url","alt","link","caption"].reduce(((t,n)=>(null!=e&&e.hasOwnProperty(n)&&(t[n]=e[n]),t)),{}),D=e=>{const{wp:t}=window;return t.media.query({order:"ASC",orderby:"post__in",post__in:e,posts_per_page:-1,query:!0,type:"image"})};class R extends v.Component{constructor(e){let{allowedTypes:t,gallery:n=!1,unstableFeaturedImageFlow:r=!1,modalClass:o,multiple:i=!1,title:l=(0,N.__)("Select or Upload Media")}=e;super(...arguments),this.openModal=this.openModal.bind(this),this.onOpen=this.onOpen.bind(this),this.onSelect=this.onSelect.bind(this),this.onUpdate=this.onUpdate.bind(this),this.onClose=this.onClose.bind(this);const{wp:a}=window;if(n)this.buildAndSetGalleryFrame();else{const e={title:l,multiple:i};t&&(e.library={type:t}),this.frame=a.media(e)}o&&this.frame.$el.addClass(o),r&&this.buildAndSetFeatureImageFrame(),this.initializeListeners()}initializeListeners(){this.frame.on("select",this.onSelect),this.frame.on("update",this.onUpdate),this.frame.on("open",this.onOpen),this.frame.on("close",this.onClose)}buildAndSetGalleryFrame(){const{addToGallery:e=!1,allowedTypes:t,multiple:n=!1,value:r=B}=this.props;if(r===this.lastGalleryValue)return;const{wp:o}=window;let i;this.lastGalleryValue=r,this.frame&&this.frame.remove(),i=e?"gallery-library":r&&r.length?"gallery-edit":"gallery",this.GalleryDetailsMediaFrame||(this.GalleryDetailsMediaFrame=P());const l=D(r),a=new o.media.model.Selection(l.models,{props:l.props.toJSON(),multiple:n});this.frame=new this.GalleryDetailsMediaFrame({mimeType:t,state:i,multiple:n,selection:a,editing:!(!r||!r.length)}),o.media.frame=this.frame,this.initializeListeners()}buildAndSetFeatureImageFrame(){const{wp:e}=window,t=L(),n=D(this.props.value),r=new e.media.model.Selection(n.models,{props:n.props.toJSON()});this.frame=new t({mimeType:this.props.allowedTypes,state:"featured-image",multiple:this.props.multiple,selection:r,editing:!!this.props.value}),e.media.frame=this.frame}componentWillUnmount(){this.frame.remove()}onUpdate(e){const{onSelect:t,multiple:n=!1}=this.props,r=this.frame.state(),o=e||r.get("selection");o&&o.models.length&&t(n?o.models.map((e=>A(e.toJSON()))):A(o.models[0].toJSON()))}onSelect(){const{onSelect:e,multiple:t=!1}=this.props,n=this.frame.state().get("selection").toJSON();e(t?n:n[0])}onOpen(){const{wp:e}=window,{value:t}=this.props;if(this.updateCollection(),this.props.mode&&this.frame.content.mode(this.props.mode),!(Array.isArray(t)?null!=t&&t.length:t))return;const n=this.props.gallery,r=this.frame.state().get("selection"),o=Array.isArray(t)?t:[t];n||o.forEach((t=>{r.add(e.media.attachment(t))}));const i=D(o);i.more().done((function(){var e;n&&null!=i&&null!==(e=i.models)&&void 0!==e&&e.length&&r.add(i.models)}))}onClose(){const{onClose:e}=this.props;e&&e()}updateCollection(){const e=this.frame.content.get();if(e&&e.collection){const t=e.collection;t.toArray().forEach((e=>e.trigger("destroy",e))),t.mirroring._hasMore=!0,t.more()}}openModal(){this.props.gallery&&this.buildAndSetGalleryFrame(),this.frame.open()}render(){return this.props.render({open:this.openModal})}}var M=R;const O={};function Z(e){const t=window.URL.createObjectURL(e);return O[t]=e,t}function F(e){O[e]&&window.URL.revokeObjectURL(e),delete O[e]}function j(e){return!(!e||!e.indexOf)&&0===e.indexOf("blob:")}const z=()=>{};async function H(e){let{allowedTypes:t,additionalData:n={},filesList:r,maxUploadFileSize:o,onError:i=z,onFileChange:l,wpAllowedMimeTypes:a=null}=e;const s=[...r],c=[],u=(e,t)=>{var n;F(null===(n=c[e])||void 0===n?void 0:n.url),c[e]=t,l(c.filter(Boolean))},d=e=>!t||t.some((t=>t.includes("/")?t===e:e.startsWith(`${t}/`))),p=(m=a)?Object.entries(m).map((e=>{let[t,n]=e;const[r]=n.split("/");return[n,...t.split("|").map((e=>`${r}/${e}`))]})).flat():m;var m;const f=[];for(const e of s)p&&e.type&&(h=e.type,!p.includes(h))?i({code:"MIME_TYPE_NOT_ALLOWED_FOR_USER",message:(0,N.sprintf)((0,N.__)("%s: Sorry, you are not allowed to upload this file type."),e.name),file:e}):!e.type||d(e.type)?o&&e.size>o?i({code:"SIZE_ABOVE_LIMIT",message:(0,N.sprintf)((0,N.__)("%s: This file exceeds the maximum upload size for this site."),e.name),file:e}):e.size<=0?i({code:"EMPTY_FILE",message:(0,N.sprintf)((0,N.__)("%s: This file is empty."),e.name),file:e}):(f.push(e),c.push({url:Z(e)}),l(c)):i({code:"MIME_TYPE_NOT_SUPPORTED",message:(0,N.sprintf)((0,N.__)("%s: Sorry, this file type is not supported here."),e.name),file:e});var h;for(let e=0;e<f.length;++e){const t=f[e];try{var g,v;const r=await V(t,n),{alt_text:o,source_url:i,...l}=r;u(e,{...l,alt:r.alt_text,caption:null!==(g=null===(v=r.caption)||void 0===v?void 0:v.raw)&&void 0!==g?g:"",title:r.title.raw,url:r.source_url})}catch(n){let r;u(e,null),r=n.message?n.message:(0,N.sprintf)((0,N.__)("Error while uploading file %s to the media library."),t.name),i({code:"GENERAL",message:r,file:t})}}}function V(e,t){const n=new window.FormData;return n.append("file",e,e.name||e.type.replace("/",".")),t&&Object.entries(t).forEach((e=>{let[t,r]=e;return n.append(t,r)})),(0,y.default)({path:"/wp/v2/media",body:n,method:"POST"})}var W=n(64826),$=n(81433),U=n(61888),G=n(85799),q=n(46688),K=n(33780),Y=n(84217);const X="block-default",J=["attributes","supports","save","migrate","isEligible","apiVersion"],Q={"--wp--style--color--link":{value:["color","link"],support:["color","link"]},background:{value:["color","gradient"],support:["color","gradients"],useEngine:!0},backgroundColor:{value:["color","background"],support:["color","background"],requiresOptOut:!0,useEngine:!0},borderColor:{value:["border","color"],support:["__experimentalBorder","color"],useEngine:!0},borderRadius:{value:["border","radius"],support:["__experimentalBorder","radius"],properties:{borderTopLeftRadius:"topLeft",borderTopRightRadius:"topRight",borderBottomLeftRadius:"bottomLeft",borderBottomRightRadius:"bottomRight"},useEngine:!0},borderStyle:{value:["border","style"],support:["__experimentalBorder","style"],useEngine:!0},borderWidth:{value:["border","width"],support:["__experimentalBorder","width"],useEngine:!0},borderTopColor:{value:["border","top","color"],support:["__experimentalBorder","color"],useEngine:!0},borderTopStyle:{value:["border","top","style"],support:["__experimentalBorder","style"],useEngine:!0},borderTopWidth:{value:["border","top","width"],support:["__experimentalBorder","width"],useEngine:!0},borderRightColor:{value:["border","right","color"],support:["__experimentalBorder","color"],useEngine:!0},borderRightStyle:{value:["border","right","style"],support:["__experimentalBorder","style"],useEngine:!0},borderRightWidth:{value:["border","right","width"],support:["__experimentalBorder","width"],useEngine:!0},borderBottomColor:{value:["border","bottom","color"],support:["__experimentalBorder","color"],useEngine:!0},borderBottomStyle:{value:["border","bottom","style"],support:["__experimentalBorder","style"],useEngine:!0},borderBottomWidth:{value:["border","bottom","width"],support:["__experimentalBorder","width"],useEngine:!0},borderLeftColor:{value:["border","left","color"],support:["__experimentalBorder","color"],useEngine:!0},borderLeftStyle:{value:["border","left","style"],support:["__experimentalBorder","style"],useEngine:!0},borderLeftWidth:{value:["border","left","width"],support:["__experimentalBorder","width"],useEngine:!0},color:{value:["color","text"],support:["color","text"],requiresOptOut:!0,useEngine:!0},filter:{value:["filter","duotone"],support:["color","__experimentalDuotone"]},linkColor:{value:["elements","link","color","text"],support:["color","link"]},buttonColor:{value:["elements","button","color","text"],support:["color","button"]},buttonBackgroundColor:{value:["elements","button","color","background"],support:["color","button"]},fontFamily:{value:["typography","fontFamily"],support:["typography","__experimentalFontFamily"],useEngine:!0},fontSize:{value:["typography","fontSize"],support:["typography","fontSize"],useEngine:!0},fontStyle:{value:["typography","fontStyle"],support:["typography","__experimentalFontStyle"],useEngine:!0},fontWeight:{value:["typography","fontWeight"],support:["typography","__experimentalFontWeight"],useEngine:!0},lineHeight:{value:["typography","lineHeight"],support:["typography","lineHeight"],useEngine:!0},margin:{value:["spacing","margin"],support:["spacing","margin"],properties:{marginTop:"top",marginRight:"right",marginBottom:"bottom",marginLeft:"left"},useEngine:!0},minHeight:{value:["dimensions","minHeight"],support:["dimensions","minHeight"],useEngine:!0},padding:{value:["spacing","padding"],support:["spacing","padding"],properties:{paddingTop:"top",paddingRight:"right",paddingBottom:"bottom",paddingLeft:"left"},useEngine:!0},textDecoration:{value:["typography","textDecoration"],support:["typography","__experimentalTextDecoration"],useEngine:!0},textTransform:{value:["typography","textTransform"],support:["typography","__experimentalTextTransform"],useEngine:!0},letterSpacing:{value:["typography","letterSpacing"],support:["typography","__experimentalLetterSpacing"],useEngine:!0},"--wp--style--root--padding":{value:["spacing","padding"],support:["spacing","padding"],properties:{"--wp--style--root--padding-top":"top","--wp--style--root--padding-right":"right","--wp--style--root--padding-bottom":"bottom","--wp--style--root--padding-left":"left"},rootOnly:!0}},ee={link:"a",heading:"h1, h2, h3, h4, h5, h6",h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",button:".wp-element-button, .wp-block-button__link",caption:".wp-element-caption, .wp-block-audio figcaption, .wp-block-embed figcaption, .wp-block-gallery figcaption, .wp-block-image figcaption, .wp-block-table figcaption, .wp-block-video figcaption",cite:"cite"},te={"color.duotone":!0,"color.gradients":!0,"color.palette":!0,"typography.fontFamilies":!0,"typography.fontSizes":!0,"spacing.spacingSizes":!0};var ne=n(15680);const re={title:"block title",description:"block description",keywords:["block keyword"],styles:[{label:"block style label"}],variations:[{title:"block variation title",description:"block variation description",keywords:["block variation keyword"]}]},oe={};function ie(e){return null!==e&&"object"==typeof e}function le(e){let{textdomain:t,...n}=e;const r=["apiVersion","title","category","parent","ancestor","icon","description","keywords","attributes","providesContext","usesContext","supports","styles","example","variations"],o=Object.fromEntries(Object.entries(n).filter((e=>{let[t]=e;return r.includes(t)})));return t&&Object.keys(re).forEach((e=>{o[e]&&(o[e]=se(re[e],o[e],t))})),o}function ae(e,t){const n=ie(e)?e.name:e;if("string"!=typeof n)return void console.error("Block names must be strings.");if(!/^[a-z][a-z0-9-]*\/[a-z][a-z0-9-]*$/.test(n))return void console.error("Block names must contain a namespace prefix, include only lowercase alphanumeric characters or dashes, and start with a letter. Example: my-plugin/my-custom-block");if((0,$.select)(Xt).getBlockType(n))return void console.error('Block "'+n+'" is already registered.');ie(e)&&function(e){for(const t of Object.keys(e))oe[t]?(void 0===oe[t].apiVersion&&e[t].apiVersion&&(oe[t].apiVersion=e[t].apiVersion),void 0===oe[t].ancestor&&e[t].ancestor&&(oe[t].ancestor=e[t].ancestor)):oe[t]=Object.fromEntries(Object.entries(e[t]).filter((e=>{let[,t]=e;return null!=t})).map((e=>{let[t,n]=e;return[(0,ne.eV)(t),n]})))}({[n]:le(e)});const r={name:n,icon:X,keywords:[],attributes:{},providesContext:{},usesContext:[],supports:{},styles:[],variations:[],save:()=>null,...null==oe?void 0:oe[n],...t};return(0,$.dispatch)(Xt).__experimentalRegisterBlockType(r),(0,$.select)(Xt).getBlockType(n)}function se(e,t,n){return"string"==typeof e&&"string"==typeof t?(0,N._x)(t,e,n):Array.isArray(e)&&e.length&&Array.isArray(t)?t.map((t=>se(e[0],t,n))):ie(e)&&Object.entries(e).length&&ie(t)?Object.keys(t).reduce(((r,o)=>e[o]?(r[o]=se(e[o],t[o],n),r):(r[o]=t[o],r)),{}):t}function ce(){return(0,$.select)(Xt).getFreeformFallbackBlockName()}function ue(){return(0,$.select)(Xt).getUnregisteredFallbackBlockName()}function de(){return(0,$.select)(Xt).getDefaultBlockName()}function pe(e){var t;return null===(t=(0,$.select)(Xt))||void 0===t?void 0:t.getBlockType(e)}function me(){return(0,$.select)(Xt).getBlockTypes()}function fe(e,t,n){return(0,$.select)(Xt).getBlockSupport(e,t,n)}function he(e,t,n){return(0,$.select)(Xt).hasBlockSupport(e,t,n)}function ge(e){return"core/block"===(null==e?void 0:e.name)}function ve(e){return"core/template-part"===(null==e?void 0:e.name)}const be=(e,t)=>(0,$.select)(Xt).getBlockVariations(e,t);var ye=n(66711),_e=n(62925);function ke(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const r=je(e,t),o=(0,ye.Z)();return{clientId:o,name:e,isValid:!0,attributes:r,innerBlocks:n}}function xe(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map((e=>{const t=Array.isArray(e)?e:[e.name,e.attributes,e.innerBlocks],[n,r,o=[]]=t;return ke(n,r,xe(o))}))}function we(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;const r=(0,ye.Z)(),o=je(e.name,{...e.attributes,...t});return{...e,clientId:r,attributes:o,innerBlocks:n||e.innerBlocks.map((e=>we(e)))}}function Ce(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;const r=(0,ye.Z)();return{...e,clientId:r,attributes:{...e.attributes,...t},innerBlocks:n||e.innerBlocks.map((e=>Ce(e)))}}const Ee=(e,t,n)=>{if(!n.length)return!1;const r=n.length>1,o=n[0].name;if(!Se(e)&&r&&!e.isMultiBlock)return!1;if(!Se(e)&&!n.every((e=>e.name===o)))return!1;if("block"!==e.type)return!1;const i=n[0];return!("from"===t&&-1===e.blocks.indexOf(i.name)&&!Se(e)||!r&&"from"===t&&Ie(i.name)&&Ie(e.blockName)||!Le(e,n)||e.usingMobileTransformations&&Se(e)&&!Ie(i.name))},Se=e=>e&&"block"===e.type&&Array.isArray(e.blocks)&&e.blocks.includes("*"),Ie=e=>e===(0,$.select)(Xt).getGroupingBlockName();function Te(e){if(!e.length)return[];const t=(e=>e.length?me().filter((t=>!!Ne(Be("from",t.name),(t=>Ee(t,"from",e))))):[])(e),n=(e=>{if(!e.length)return[];const t=pe(e[0].name);return(t?Be("to",t.name):[]).filter((t=>t&&Ee(t,"to",e))).map((e=>e.blocks)).flat().map((e=>"*"===e?e:pe(e)))})(e);return[...new Set([...t,...n])]}function Ne(e,t){const n=(0,_e.Hu)();for(let r=0;r<e.length;r++){const o=e[r];t(o)&&n.addFilter("transform","transform/"+r.toString(),(e=>e||o),o.priority)}return n.applyFilters("transform",null)}function Be(e,t){if(void 0===t)return me().map((t=>{let{name:n}=t;return Be(e,n)})).flat();const n=Ze(t),{name:r,transforms:o}=n||{};if(!o||!Array.isArray(o[e]))return[];const i=o.supportedMobileTransforms&&Array.isArray(o.supportedMobileTransforms);return(i?o[e].filter((e=>"raw"===e.type||!(!e.blocks||!e.blocks.length)&&(!!Se(e)||e.blocks.every((e=>o.supportedMobileTransforms.includes(e)))))):o[e]).map((e=>({...e,blockName:r,usingMobileTransformations:i})))}function Le(e,t){if("function"!=typeof e.isMatch)return!0;const n=t[0],r=e.isMultiBlock?t.map((e=>e.attributes)):n.attributes,o=e.isMultiBlock?t:n;return e.isMatch(r,o)}function Pe(e,t){const n=Array.isArray(e)?e:[e],r=n.length>1,o=n[0],i=o.name,l=Be("from",t),a=Ne(Be("to",i),(e=>"block"===e.type&&-1!==e.blocks.indexOf(t)&&(!r||e.isMultiBlock)&&Le(e,n)))||Ne(l,(e=>"block"===e.type&&(Se(e)||-1!==e.blocks.indexOf(i))&&(!r||e.isMultiBlock)&&Le(e,n)));if(!a)return null;let s;return s=a.isMultiBlock?"__experimentalConvert"in a?a.__experimentalConvert(n):a.transform(n.map((e=>e.attributes)),n.map((e=>e.innerBlocks))):"__experimentalConvert"in a?a.__experimentalConvert(o):a.transform(o.attributes,o.innerBlocks),null===s||"object"!=typeof s?null:(s=Array.isArray(s)?s:[s],s.some((e=>!pe(e.name)))?null:"*"===t?s:s.some((e=>e.name===t))?s.map(((t,n,r)=>(0,_e.O)("blocks.switchToBlockType.transformedBlock",t,e,n,r))):null)}const Ae=(e,t)=>{var n;return ke(e,t.attributes,(null!==(n=t.innerBlocks)&&void 0!==n?n:[]).map((e=>Ae(e.name,e))))};(0,G.l7)([q.Z,K.Z]);const De=["#191e23","#f8f9f9"];function Re(e){var t;Re[e.name]||(Re[e.name]=ke(e.name));const n=Re[e.name],r=pe(e.name);return Object.keys(null!==(t=null==r?void 0:r.attributes)&&void 0!==t?t:{}).every((t=>n.attributes[t]===e.attributes[t]))}function Me(e){return e.name===de()&&Re(e)}function Oe(e){return!!e&&("string"==typeof e||(0,v.isValidElement)(e)||"function"==typeof e||e instanceof v.Component)}function Ze(e){return"string"==typeof e?pe(e):e}function Fe(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"visual";const{__experimentalLabel:r,title:o}=e,i=r&&r(t,{context:n});return i?(0,Y.Z)(i):o}function je(e,t){const n=pe(e);if(void 0===n)throw new Error(`Block type '${e}' is not registered.`);return Object.entries(n.attributes).reduce(((e,n)=>{let[r,o]=n;const i=t[r];return void 0!==i?e[r]=i:o.hasOwnProperty("default")&&(e[r]=o.default),-1!==["node","children"].indexOf(o.source)&&("string"==typeof e[r]?e[r]=[e[r]]:Array.isArray(e[r])||(e[r]=[])),e}),{})}function ze(e,t){return Object.fromEntries(Object.entries(e).filter((e=>{let[n]=e;return!t.includes(n)})))}const He=[{slug:"text",title:(0,N.__)("Text")},{slug:"media",title:(0,N.__)("Media")},{slug:"design",title:(0,N.__)("Design")},{slug:"widgets",title:(0,N.__)("Widgets")},{slug:"theme",title:(0,N.__)("Theme")},{slug:"embed",title:(0,N.__)("Embeds")},{slug:"reusable",title:(0,N.__)("Reusable blocks")}];function Ve(e){return e.reduce(((e,t)=>({...e,[t.name]:t})),{})}function We(e){return e.reduce(((e,t)=>(e.some((e=>e.name===t.name))||e.push(t),e)),[])}function $e(e){return function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1?arguments[1]:void 0;switch(n.type){case"REMOVE_BLOCK_TYPES":return-1!==n.names.indexOf(t)?null:t;case e:return n.name||null}return t}}const Ue=$e("SET_DEFAULT_BLOCK_NAME"),Ge=$e("SET_FREEFORM_FALLBACK_BLOCK_NAME"),qe=$e("SET_UNREGISTERED_FALLBACK_BLOCK_NAME"),Ke=$e("SET_GROUPING_BLOCK_NAME");var Ye=(0,$.combineReducers)({unprocessedBlockTypes:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_UNPROCESSED_BLOCK_TYPE":return{...e,[t.blockType.name]:t.blockType};case"REMOVE_BLOCK_TYPES":return ze(e,t.names)}return e},blockTypes:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_BLOCK_TYPES":return{...e,...Ve(t.blockTypes)};case"REMOVE_BLOCK_TYPES":return ze(e,t.names)}return e},blockStyles:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_BLOCK_TYPES":return{...e,...(0,U.mapValues)(Ve(t.blockTypes),(t=>We([...(0,U.get)(t,["styles"],[]).map((e=>({...e,source:"block"}))),...(0,U.get)(e,[t.name],[]).filter((e=>{let{source:t}=e;return"block"!==t}))])))};case"ADD_BLOCK_STYLES":return{...e,[t.blockName]:We([...(0,U.get)(e,[t.blockName],[]),...t.styles])};case"REMOVE_BLOCK_STYLES":return{...e,[t.blockName]:(0,U.get)(e,[t.blockName],[]).filter((e=>-1===t.styleNames.indexOf(e.name)))}}return e},blockVariations:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_BLOCK_TYPES":return{...e,...(0,U.mapValues)(Ve(t.blockTypes),(t=>We([...(0,U.get)(t,["variations"],[]).map((e=>({...e,source:"block"}))),...(0,U.get)(e,[t.name],[]).filter((e=>{let{source:t}=e;return"block"!==t}))])))};case"ADD_BLOCK_VARIATIONS":return{...e,[t.blockName]:We([...(0,U.get)(e,[t.blockName],[]),...t.variations])};case"REMOVE_BLOCK_VARIATIONS":return{...e,[t.blockName]:(0,U.get)(e,[t.blockName],[]).filter((e=>-1===t.variationNames.indexOf(e.name)))}}return e},defaultBlockName:Ue,freeformFallbackBlockName:Ge,unregisteredFallbackBlockName:qe,groupingBlockName:Ke,categories:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:He,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_CATEGORIES":return t.categories||[];case"UPDATE_CATEGORY":if(!t.category||(0,U.isEmpty)(t.category))return e;if(e.find((e=>{let{slug:n}=e;return n===t.slug})))return e.map((e=>e.slug===t.slug?{...e,...t.category}:e))}return e},collections:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_BLOCK_COLLECTION":return{...e,[t.namespace]:{title:t.title,icon:t.icon}};case"REMOVE_BLOCK_COLLECTION":return ze(e,t.namespace)}return e}}),Xe=n(32407),Je=n(68457),Qe=n.n(Je),et=n(70845);const tt=(e,t)=>"string"==typeof t?ot(e,t):t;function nt(e){return e.unprocessedBlockTypes}const rt=(0,Xe.Z)((e=>Object.values(e.blockTypes)),(e=>[e.blockTypes]));function ot(e,t){return e.blockTypes[t]}function it(e,t){return e.blockStyles[t]}const lt=(0,Xe.Z)(((e,t,n)=>{const r=e.blockVariations[t];return r&&n?r.filter((e=>(e.scope||["block","inserter"]).includes(n))):r}),((e,t)=>[e.blockVariations[t]]));function at(e,t,n,r){const o=lt(e,t,r);return null==o?void 0:o.find((r=>{var o;if(Array.isArray(r.isActive)){const o=ot(e,t),i=Object.keys((null==o?void 0:o.attributes)||{}),l=r.isActive.filter((e=>i.includes(e)));return 0!==l.length&&l.every((e=>n[e]===r.attributes[e]))}return null===(o=r.isActive)||void 0===o?void 0:o.call(r,n,r.attributes)}))}function st(e,t,n){const r=lt(e,t,n),o=[...r].reverse().find((e=>{let{isDefault:t}=e;return!!t}));return o||r[0]}function ct(e){return e.categories}function ut(e){return e.collections}function dt(e){return e.defaultBlockName}function pt(e){return e.freeformFallbackBlockName}function mt(e){return e.unregisteredFallbackBlockName}function ft(e){return e.groupingBlockName}const ht=(0,Xe.Z)(((e,t)=>rt(e).filter((e=>{var n;return null===(n=e.parent)||void 0===n?void 0:n.includes(t)})).map((e=>{let{name:t}=e;return t}))),(e=>[e.blockTypes])),gt=(e,t,n,r)=>{const o=tt(e,t);return null!=o&&o.supports?(0,U.get)(o.supports,n,r):r};function vt(e,t,n,r){return!!gt(e,t,n,r)}function bt(e,t,n){var r;const o=tt(e,t),i=(0,et.Z)([e=>Qe()(null!=e?e:""),e=>e.toLowerCase(),e=>e.trim()]),l=i(n),a=(0,et.Z)([i,e=>e.includes(l)]);return a(o.title)||(null===(r=o.keywords)||void 0===r?void 0:r.some(a))||a(o.category)||"string"==typeof o.description&&a(o.description)}const yt=(e,t)=>ht(e,t).length>0,_t=(e,t)=>ht(e,t).some((t=>vt(e,t,"inserter",!0))),kt=(0,Xe.Z)(((e,t)=>{const n=ot(e,t);return!!n&&Object.entries(n.attributes).some((e=>{let[,{__experimentalRole:t}]=e;return"content"===t}))}),((e,t)=>{var n;return[null===(n=e.blockTypes[t])||void 0===n?void 0:n.attributes]})),xt=["background","backgroundColor","color","linkColor","buttonColor","fontFamily","fontSize","fontStyle","fontWeight","lineHeight","padding","contentSize","wideSize","blockGap","textDecoration","textTransform","letterSpacing"];function wt(e,t,n){return e.filter((e=>!("fontSize"===e&&"heading"===n||"textDecoration"===e&&!t&&"link"!==n||"textTransform"===e&&!t&&!["heading","h1","h2","h3","h4","h5","h6"].includes(n)||"letterSpacing"===e&&!t&&!["heading","h1","h2","h3","h4","h5","h6"].includes(n))))}const Ct=(0,Xe.Z)(((e,t,n)=>{var r,o,i,l,a,s,c,u,d;if(!t)return wt(xt,t,n);const p=ot(e,t);if(!p)return[];const m=[];return null==p||null===(r=p.supports)||void 0===r||null===(o=r.spacing)||void 0===o||!o.blockGap||!0===(null==p||null===(i=p.supports)||void 0===i||null===(l=i.spacing)||void 0===l?void 0:l.__experimentalSkipSerialization)||null!=p&&null!==(a=p.supports)&&void 0!==a&&null!==(s=a.spacing)&&void 0!==s&&null!==(c=s.__experimentalSkipSerialization)&&void 0!==c&&null!==(u=c.some)&&void 0!==u&&u.call(c,(e=>"blockGap"===e))||m.push("blockGap"),null!=p&&null!==(d=p.supports)&&void 0!==d&&d.shadow&&m.push("shadow"),Object.keys(Q).forEach((e=>{Q[e].support&&(Q[e].requiresOptOut&&Q[e].support[0]in p.supports&&!1!==(0,U.get)(p.supports,Q[e].support)||(0,U.get)(p.supports,Q[e].support,!1))&&m.push(e)})),wt(m,t,n)}),((e,t)=>[e.blockTypes[t]]));var Et=n(85628),St=n(67492);const{error:It,warn:Tt}=window.console,Nt={common:"text",formatting:"text",layout:"design"};function Bt(e){return"function"==typeof e}const Lt=(e,t)=>{let{select:n}=t;const{name:r}=e,o=(0,_e.O)("blocks.registerBlockType",{...e},r,null);if(o.description&&"string"!=typeof o.description&&(0,St.default)("Declaring non-string block descriptions",{since:"6.2"}),o.deprecated&&(o.deprecated=o.deprecated.map((t=>Object.fromEntries(Object.entries((0,_e.O)("blocks.registerBlockType",{...ze(e,J),...t},r,t)).filter((e=>{let[t]=e;return J.includes(t)})))))),(0,Et.P)(o))if(Bt(o.save))if(!("edit"in o)||Bt(o.edit))if(Nt.hasOwnProperty(o.category)&&(o.category=Nt[o.category]),"category"in o&&!n.getCategories().some((e=>{let{slug:t}=e;return t===o.category}))&&(Tt('The block "'+r+'" is registered with an invalid category "'+o.category+'".'),delete o.category),"title"in o&&""!==o.title)if("string"==typeof o.title){if(o.icon=function(e){if(Oe(e=e||X))return{src:e};if("background"in e){const t=(0,G.Vi)(e.background),n=e=>t.contrast(e),r=Math.max(...De.map(n));return{...e,foreground:e.foreground?e.foreground:De.find((e=>n(e)===r)),shadowColor:t.alpha(.3).toRgbString()}}return e}(o.icon),Oe(o.icon.src))return o;It("The icon passed is invalid. The icon should be a string, an element, a function, or an object following the specifications documented in https://developer.wordpress.org/block-editor/developers/block-api/block-registration/#icon-optional")}else It("Block titles must be strings.");else It('The block "'+r+'" must have a title.');else It('The "edit" property must be a valid function.');else It('The "save" property must be a valid function.');else It("Block settings must be a valid object.")};function Pt(e){return{type:"ADD_BLOCK_TYPES",blockTypes:Array.isArray(e)?e:[e]}}const At=e=>t=>{let{dispatch:n,select:r}=t;n({type:"ADD_UNPROCESSED_BLOCK_TYPE",blockType:e});const o=Lt(e,{select:r});o&&n.addBlockTypes(o)},Dt=()=>e=>{let{dispatch:t,select:n}=e;const r=n.__experimentalGetUnprocessedBlockTypes(),o=Object.keys(r).reduce(((e,t)=>{const o=Lt(r[t],{select:n});return o&&e.push(o),e}),[]);o.length&&t.addBlockTypes(o)};function Rt(e){return{type:"REMOVE_BLOCK_TYPES",names:Array.isArray(e)?e:[e]}}function Mt(e,t){return{type:"ADD_BLOCK_STYLES",styles:Array.isArray(t)?t:[t],blockName:e}}function Ot(e,t){return{type:"REMOVE_BLOCK_STYLES",styleNames:Array.isArray(t)?t:[t],blockName:e}}function Zt(e,t){return{type:"ADD_BLOCK_VARIATIONS",variations:Array.isArray(t)?t:[t],blockName:e}}function Ft(e,t){return{type:"REMOVE_BLOCK_VARIATIONS",variationNames:Array.isArray(t)?t:[t],blockName:e}}function jt(e){return{type:"SET_DEFAULT_BLOCK_NAME",name:e}}function zt(e){return{type:"SET_FREEFORM_FALLBACK_BLOCK_NAME",name:e}}function Ht(e){return{type:"SET_UNREGISTERED_FALLBACK_BLOCK_NAME",name:e}}function Vt(e){return{type:"SET_GROUPING_BLOCK_NAME",name:e}}function Wt(e){return{type:"SET_CATEGORIES",categories:e}}function $t(e,t){return{type:"UPDATE_CATEGORY",slug:e,category:t}}function Ut(e,t,n){return{type:"ADD_BLOCK_COLLECTION",namespace:e,title:t,icon:n}}function Gt(e){return{type:"REMOVE_BLOCK_COLLECTION",namespace:e}}var qt=n(86066);const{lock:Kt,unlock:Yt}=(0,qt.es)("I know using unstable features means my plugin or theme will inevitably break on the next WordPress release.","@wordpress/blocks"),Xt=(0,W.Z)("core/blocks",{reducer:Ye,selectors:r,actions:i});let Jt,Qt,en,tn;(0,$.register)(Xt),Yt(Xt).registerPrivateSelectors(o);const nn=/<!--\s+(\/)?wp:([a-z][a-z0-9_-]*\/)?([a-z][a-z0-9_-]*)\s+({(?:(?=([^}]+|}+(?=})|(?!}\s+\/?-->)[^])*)\5|[^]*?)}\s+)?(\/)?-->/g;function rn(e,t,n,r,o){return{blockName:e,attrs:t,innerBlocks:n,innerHTML:r,innerContent:o}}function on(e){return rn(null,{},[],e,[e])}function ln(){const e=tn.length,t=function(){const e=nn.exec(Jt);if(null===e)return["no-more-tokens","",null,0,0];const t=e.index,[n,r,o,i,l,,a]=e,s=n.length,c=!!r,u=!!a,d=(o||"core/")+i,p=!!l?function(e){try{return JSON.parse(e)}catch(e){return null}}(l):{};return u?["void-block",d,p,t,s]:c?["block-closer",d,null,t,s]:["block-opener",d,p,t,s]}(),[n,r,o,i,l]=t,a=i>Qt?Qt:null;switch(n){case"no-more-tokens":if(0===e)return an(),!1;if(1===e)return cn(),!1;for(;0<tn.length;)cn();return!1;case"void-block":return 0===e?(null!==a&&en.push(on(Jt.substr(a,i-a))),en.push(rn(r,o,[],"",[])),Qt=i+l,!0):(sn(rn(r,o,[],"",[]),i,l),Qt=i+l,!0);case"block-opener":return tn.push(function(e,t,n,r,o){return{block:e,tokenStart:t,tokenLength:n,prevOffset:r||t+n,leadingHtmlStart:o}}(rn(r,o,[],"",[]),i,l,i+l,a)),Qt=i+l,!0;case"block-closer":if(0===e)return an(),!1;if(1===e)return cn(i),Qt=i+l,!0;const t=tn.pop(),n=Jt.substr(t.prevOffset,i-t.prevOffset);return t.block.innerHTML+=n,t.block.innerContent.push(n),t.prevOffset=i+l,sn(t.block,t.tokenStart,t.tokenLength,i+l),Qt=i+l,!0;default:return an(),!1}}function an(e){const t=e||Jt.length-Qt;0!==t&&en.push(on(Jt.substr(Qt,t)))}function sn(e,t,n,r){const o=tn[tn.length-1];o.block.innerBlocks.push(e);const i=Jt.substr(o.prevOffset,t-o.prevOffset);i&&(o.block.innerHTML+=i,o.block.innerContent.push(i)),o.block.innerContent.push(null),o.prevOffset=r||t+n}function cn(e){const{block:t,leadingHtmlStart:n,prevOffset:r,tokenStart:o}=tn.pop(),i=e?Jt.substr(r,e-r):Jt.substr(r);i&&(t.innerHTML+=i,t.innerContent.push(i)),null!==n&&en.push(on(Jt.substr(n,o-n))),en.push(t)}const un=new RegExp("(<((?=!--|!\\[CDATA\\[)((?=!-)!(?:-(?!->)[^\\-]*)*(?:--\x3e)?|!\\[CDATA\\[[^\\]]*(?:](?!]>)[^\\]]*)*?(?:]]>)?)|[^>]*>?))");function dn(e,t){const n=function(e){const t=[];let n,r=e;for(;n=r.match(un);){const e=n.index;t.push(r.slice(0,e)),t.push(n[0]),r=r.slice(e+n[0].length)}return r.length&&t.push(r),t}(e);let r=!1;const o=Object.keys(t);for(let e=1;e<n.length;e+=2)for(let i=0;i<o.length;i++){const l=o[i];if(-1!==n[e].indexOf(l)){n[e]=n[e].replace(new RegExp(l,"g"),t[l]),r=!0;break}}return r&&(e=n.join("")),e}var pn=n(12850),mn=n(70491),fn=n(91207);function hn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{isCommentDelimited:n=!0}=t,{blockName:r,attrs:o={},innerBlocks:i=[],innerContent:l=[]}=e;let a=0;const s=l.map((e=>null!==e?e:hn(i[a++],t))).join("\n").replace(/\n+/g,"\n").trim();return n?wn(r,o,s):s}function gn(e){const t="wp-block-"+e.replace(/\//,"-").replace(/^core-/,"");return(0,_e.O)("blocks.getBlockDefaultClassName",t,e)}function vn(e){const t="editor-block-list-item-"+e.replace(/\//,"-").replace(/^core-/,"");return(0,_e.O)("blocks.getBlockMenuDefaultClassName",t,e)}const bn={},yn={};function _n(e,t,n){const r=Ze(e);return(0,mn.ZP)(function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const r=Ze(e);let{save:o}=r;if(o.prototype instanceof v.Component){const e=new o({attributes:t});o=e.render.bind(e)}bn.blockType=r,bn.attributes=t,yn.innerBlocks=n;let i=o({attributes:t,innerBlocks:n});if(null!==i&&"object"==typeof i&&(0,_e.H7)("blocks.getSaveContent.extraProps")&&!(r.apiVersion>1)){const e=(0,_e.O)("blocks.getSaveContent.extraProps",{...i.props},r,t);(0,fn.ZP)(e,i.props)||(i=(0,v.cloneElement)(i,e))}return(0,_e.O)("blocks.getSaveElement",i,r,t)}(r,t,n))}function kn(e,t){var n;return Object.entries(null!==(n=e.attributes)&&void 0!==n?n:{}).reduce(((e,n)=>{let[r,o]=n;const i=t[r];return void 0===i||void 0!==o.source||"default"in o&&o.default===i||(e[r]=i),e}),{})}function xn(e){let t=e.originalContent;if(e.isValid||e.innerBlocks.length)try{t=_n(e.name,e.attributes,e.innerBlocks)}catch(e){}return t}function wn(e,t,n){const r=t&&Object.entries(t).length?function(e){return JSON.stringify(e).replace(/--/g,"\\u002d\\u002d").replace(/</g,"\\u003c").replace(/>/g,"\\u003e").replace(/&/g,"\\u0026").replace(/\\"/g,"\\u0022")}(t)+" ":"",o=null!=e&&e.startsWith("core/")?e.slice(5):e;return n?`\x3c!-- wp:${o} ${r}--\x3e\n`+n+`\n\x3c!-- /wp:${o} --\x3e`:`\x3c!-- wp:${o} ${r}/--\x3e`}function Cn(e,t){return(Array.isArray(e)?e:[e]).map((e=>function(e){let{isInnerBlocks:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e.isValid&&e.__unstableBlockSource)return hn(e.__unstableBlockSource);const n=e.name,r=xn(e);if(n===ue()||!t&&n===ce())return r;const o=pe(n);if(!o)return r;const i=kn(o,e.attributes);return wn(n,i,r)}(e,t))).join("\n\n")}var En=/[\t\n\f ]/,Sn=/[A-Za-z]/,In=/\r\n?/g;function Tn(e){return En.test(e)}function Nn(e){return Sn.test(e)}var Bn=function(){function e(e,t,n){void 0===n&&(n="precompile"),this.delegate=e,this.entityParser=t,this.mode=n,this.state="beforeData",this.line=-1,this.column=-1,this.input="",this.index=-1,this.tagNameBuffer="",this.states={beforeData:function(){var e=this.peek();if("<"!==e||this.isIgnoredEndTag()){if("precompile"===this.mode&&"\n"===e){var t=this.tagNameBuffer.toLowerCase();"pre"!==t&&"textarea"!==t||this.consume()}this.transitionTo("data"),this.delegate.beginData()}else this.transitionTo("tagOpen"),this.markTagStart(),this.consume()},data:function(){var e=this.peek(),t=this.tagNameBuffer;"<"!==e||this.isIgnoredEndTag()?"&"===e&&"script"!==t&&"style"!==t?(this.consume(),this.delegate.appendToData(this.consumeCharRef()||"&")):(this.consume(),this.delegate.appendToData(e)):(this.delegate.finishData(),this.transitionTo("tagOpen"),this.markTagStart(),this.consume())},tagOpen:function(){var e=this.consume();"!"===e?this.transitionTo("markupDeclarationOpen"):"/"===e?this.transitionTo("endTagOpen"):("@"===e||":"===e||Nn(e))&&(this.transitionTo("tagName"),this.tagNameBuffer="",this.delegate.beginStartTag(),this.appendToTagName(e))},markupDeclarationOpen:function(){var e=this.consume();"-"===e&&"-"===this.peek()?(this.consume(),this.transitionTo("commentStart"),this.delegate.beginComment()):"DOCTYPE"===e.toUpperCase()+this.input.substring(this.index,this.index+6).toUpperCase()&&(this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.transitionTo("doctype"),this.delegate.beginDoctype&&this.delegate.beginDoctype())},doctype:function(){Tn(this.consume())&&this.transitionTo("beforeDoctypeName")},beforeDoctypeName:function(){var e=this.consume();Tn(e)||(this.transitionTo("doctypeName"),this.delegate.appendToDoctypeName&&this.delegate.appendToDoctypeName(e.toLowerCase()))},doctypeName:function(){var e=this.consume();Tn(e)?this.transitionTo("afterDoctypeName"):">"===e?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeName&&this.delegate.appendToDoctypeName(e.toLowerCase())},afterDoctypeName:function(){var e=this.consume();if(!Tn(e))if(">"===e)this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData");else{var t=e.toUpperCase()+this.input.substring(this.index,this.index+5).toUpperCase(),n="PUBLIC"===t.toUpperCase(),r="SYSTEM"===t.toUpperCase();(n||r)&&(this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.consume()),n?this.transitionTo("afterDoctypePublicKeyword"):r&&this.transitionTo("afterDoctypeSystemKeyword")}},afterDoctypePublicKeyword:function(){var e=this.peek();Tn(e)?(this.transitionTo("beforeDoctypePublicIdentifier"),this.consume()):'"'===e?(this.transitionTo("doctypePublicIdentifierDoubleQuoted"),this.consume()):"'"===e?(this.transitionTo("doctypePublicIdentifierSingleQuoted"),this.consume()):">"===e&&(this.consume(),this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData"))},doctypePublicIdentifierDoubleQuoted:function(){var e=this.consume();'"'===e?this.transitionTo("afterDoctypePublicIdentifier"):">"===e?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypePublicIdentifier&&this.delegate.appendToDoctypePublicIdentifier(e)},doctypePublicIdentifierSingleQuoted:function(){var e=this.consume();"'"===e?this.transitionTo("afterDoctypePublicIdentifier"):">"===e?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypePublicIdentifier&&this.delegate.appendToDoctypePublicIdentifier(e)},afterDoctypePublicIdentifier:function(){var e=this.consume();Tn(e)?this.transitionTo("betweenDoctypePublicAndSystemIdentifiers"):">"===e?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):'"'===e?this.transitionTo("doctypeSystemIdentifierDoubleQuoted"):"'"===e&&this.transitionTo("doctypeSystemIdentifierSingleQuoted")},betweenDoctypePublicAndSystemIdentifiers:function(){var e=this.consume();Tn(e)||(">"===e?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):'"'===e?this.transitionTo("doctypeSystemIdentifierDoubleQuoted"):"'"===e&&this.transitionTo("doctypeSystemIdentifierSingleQuoted"))},doctypeSystemIdentifierDoubleQuoted:function(){var e=this.consume();'"'===e?this.transitionTo("afterDoctypeSystemIdentifier"):">"===e?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeSystemIdentifier&&this.delegate.appendToDoctypeSystemIdentifier(e)},doctypeSystemIdentifierSingleQuoted:function(){var e=this.consume();"'"===e?this.transitionTo("afterDoctypeSystemIdentifier"):">"===e?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeSystemIdentifier&&this.delegate.appendToDoctypeSystemIdentifier(e)},afterDoctypeSystemIdentifier:function(){var e=this.consume();Tn(e)||">"===e&&(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData"))},commentStart:function(){var e=this.consume();"-"===e?this.transitionTo("commentStartDash"):">"===e?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData(e),this.transitionTo("comment"))},commentStartDash:function(){var e=this.consume();"-"===e?this.transitionTo("commentEnd"):">"===e?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData("-"),this.transitionTo("comment"))},comment:function(){var e=this.consume();"-"===e?this.transitionTo("commentEndDash"):this.delegate.appendToCommentData(e)},commentEndDash:function(){var e=this.consume();"-"===e?this.transitionTo("commentEnd"):(this.delegate.appendToCommentData("-"+e),this.transitionTo("comment"))},commentEnd:function(){var e=this.consume();">"===e?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData("--"+e),this.transitionTo("comment"))},tagName:function(){var e=this.consume();Tn(e)?this.transitionTo("beforeAttributeName"):"/"===e?this.transitionTo("selfClosingStartTag"):">"===e?(this.delegate.finishTag(),this.transitionTo("beforeData")):this.appendToTagName(e)},endTagName:function(){var e=this.consume();Tn(e)?(this.transitionTo("beforeAttributeName"),this.tagNameBuffer=""):"/"===e?(this.transitionTo("selfClosingStartTag"),this.tagNameBuffer=""):">"===e?(this.delegate.finishTag(),this.transitionTo("beforeData"),this.tagNameBuffer=""):this.appendToTagName(e)},beforeAttributeName:function(){var e=this.peek();Tn(e)?this.consume():"/"===e?(this.transitionTo("selfClosingStartTag"),this.consume()):">"===e?(this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):"="===e?(this.delegate.reportSyntaxError("attribute name cannot start with equals sign"),this.transitionTo("attributeName"),this.delegate.beginAttribute(),this.consume(),this.delegate.appendToAttributeName(e)):(this.transitionTo("attributeName"),this.delegate.beginAttribute())},attributeName:function(){var e=this.peek();Tn(e)?(this.transitionTo("afterAttributeName"),this.consume()):"/"===e?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):"="===e?(this.transitionTo("beforeAttributeValue"),this.consume()):">"===e?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):'"'===e||"'"===e||"<"===e?(this.delegate.reportSyntaxError(e+" is not a valid character within attribute names"),this.consume(),this.delegate.appendToAttributeName(e)):(this.consume(),this.delegate.appendToAttributeName(e))},afterAttributeName:function(){var e=this.peek();Tn(e)?this.consume():"/"===e?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):"="===e?(this.consume(),this.transitionTo("beforeAttributeValue")):">"===e?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.transitionTo("attributeName"),this.delegate.beginAttribute(),this.consume(),this.delegate.appendToAttributeName(e))},beforeAttributeValue:function(){var e=this.peek();Tn(e)?this.consume():'"'===e?(this.transitionTo("attributeValueDoubleQuoted"),this.delegate.beginAttributeValue(!0),this.consume()):"'"===e?(this.transitionTo("attributeValueSingleQuoted"),this.delegate.beginAttributeValue(!0),this.consume()):">"===e?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.transitionTo("attributeValueUnquoted"),this.delegate.beginAttributeValue(!1),this.consume(),this.delegate.appendToAttributeValue(e))},attributeValueDoubleQuoted:function(){var e=this.consume();'"'===e?(this.delegate.finishAttributeValue(),this.transitionTo("afterAttributeValueQuoted")):"&"===e?this.delegate.appendToAttributeValue(this.consumeCharRef()||"&"):this.delegate.appendToAttributeValue(e)},attributeValueSingleQuoted:function(){var e=this.consume();"'"===e?(this.delegate.finishAttributeValue(),this.transitionTo("afterAttributeValueQuoted")):"&"===e?this.delegate.appendToAttributeValue(this.consumeCharRef()||"&"):this.delegate.appendToAttributeValue(e)},attributeValueUnquoted:function(){var e=this.peek();Tn(e)?(this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("beforeAttributeName")):"/"===e?(this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):"&"===e?(this.consume(),this.delegate.appendToAttributeValue(this.consumeCharRef()||"&")):">"===e?(this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.consume(),this.delegate.appendToAttributeValue(e))},afterAttributeValueQuoted:function(){var e=this.peek();Tn(e)?(this.consume(),this.transitionTo("beforeAttributeName")):"/"===e?(this.consume(),this.transitionTo("selfClosingStartTag")):">"===e?(this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):this.transitionTo("beforeAttributeName")},selfClosingStartTag:function(){">"===this.peek()?(this.consume(),this.delegate.markTagAsSelfClosing(),this.delegate.finishTag(),this.transitionTo("beforeData")):this.transitionTo("beforeAttributeName")},endTagOpen:function(){var e=this.consume();("@"===e||":"===e||Nn(e))&&(this.transitionTo("endTagName"),this.tagNameBuffer="",this.delegate.beginEndTag(),this.appendToTagName(e))}},this.reset()}return e.prototype.reset=function(){this.transitionTo("beforeData"),this.input="",this.tagNameBuffer="",this.index=0,this.line=1,this.column=0,this.delegate.reset()},e.prototype.transitionTo=function(e){this.state=e},e.prototype.tokenize=function(e){this.reset(),this.tokenizePart(e),this.tokenizeEOF()},e.prototype.tokenizePart=function(e){for(this.input+=function(e){return e.replace(In,"\n")}(e);this.index<this.input.length;){var t=this.states[this.state];if(void 0===t)throw new Error("unhandled state "+this.state);t.call(this)}},e.prototype.tokenizeEOF=function(){this.flushData()},e.prototype.flushData=function(){"data"===this.state&&(this.delegate.finishData(),this.transitionTo("beforeData"))},e.prototype.peek=function(){return this.input.charAt(this.index)},e.prototype.consume=function(){var e=this.peek();return this.index++,"\n"===e?(this.line++,this.column=0):this.column++,e},e.prototype.consumeCharRef=function(){var e=this.input.indexOf(";",this.index);if(-1!==e){var t=this.input.slice(this.index,e),n=this.entityParser.parse(t);if(n){for(var r=t.length;r;)this.consume(),r--;return this.consume(),n}}},e.prototype.markTagStart=function(){this.delegate.tagOpen()},e.prototype.appendToTagName=function(e){this.tagNameBuffer+=e,this.delegate.appendToTagName(e)},e.prototype.isIgnoredEndTag=function(){var e=this.tagNameBuffer;return"title"===e&&"</title>"!==this.input.substring(this.index,this.index+8)||"style"===e&&"</style>"!==this.input.substring(this.index,this.index+8)||"script"===e&&"<\/script>"!==this.input.substring(this.index,this.index+9)},e}(),Ln=function(){function e(e,t){void 0===t&&(t={}),this.options=t,this.token=null,this.startLine=1,this.startColumn=0,this.tokens=[],this.tokenizer=new Bn(this,e,t.mode),this._currentAttribute=void 0}return e.prototype.tokenize=function(e){return this.tokens=[],this.tokenizer.tokenize(e),this.tokens},e.prototype.tokenizePart=function(e){return this.tokens=[],this.tokenizer.tokenizePart(e),this.tokens},e.prototype.tokenizeEOF=function(){return this.tokens=[],this.tokenizer.tokenizeEOF(),this.tokens[0]},e.prototype.reset=function(){this.token=null,this.startLine=1,this.startColumn=0},e.prototype.current=function(){var e=this.token;if(null===e)throw new Error("token was unexpectedly null");if(0===arguments.length)return e;for(var t=0;t<arguments.length;t++)if(e.type===arguments[t])return e;throw new Error("token type was unexpectedly "+e.type)},e.prototype.push=function(e){this.token=e,this.tokens.push(e)},e.prototype.currentAttribute=function(){return this._currentAttribute},e.prototype.addLocInfo=function(){this.options.loc&&(this.current().loc={start:{line:this.startLine,column:this.startColumn},end:{line:this.tokenizer.line,column:this.tokenizer.column}}),this.startLine=this.tokenizer.line,this.startColumn=this.tokenizer.column},e.prototype.beginDoctype=function(){this.push({type:"Doctype",name:""})},e.prototype.appendToDoctypeName=function(e){this.current("Doctype").name+=e},e.prototype.appendToDoctypePublicIdentifier=function(e){var t=this.current("Doctype");void 0===t.publicIdentifier?t.publicIdentifier=e:t.publicIdentifier+=e},e.prototype.appendToDoctypeSystemIdentifier=function(e){var t=this.current("Doctype");void 0===t.systemIdentifier?t.systemIdentifier=e:t.systemIdentifier+=e},e.prototype.endDoctype=function(){this.addLocInfo()},e.prototype.beginData=function(){this.push({type:"Chars",chars:""})},e.prototype.appendToData=function(e){this.current("Chars").chars+=e},e.prototype.finishData=function(){this.addLocInfo()},e.prototype.beginComment=function(){this.push({type:"Comment",chars:""})},e.prototype.appendToCommentData=function(e){this.current("Comment").chars+=e},e.prototype.finishComment=function(){this.addLocInfo()},e.prototype.tagOpen=function(){},e.prototype.beginStartTag=function(){this.push({type:"StartTag",tagName:"",attributes:[],selfClosing:!1})},e.prototype.beginEndTag=function(){this.push({type:"EndTag",tagName:""})},e.prototype.finishTag=function(){this.addLocInfo()},e.prototype.markTagAsSelfClosing=function(){this.current("StartTag").selfClosing=!0},e.prototype.appendToTagName=function(e){this.current("StartTag","EndTag").tagName+=e},e.prototype.beginAttribute=function(){this._currentAttribute=["","",!1]},e.prototype.appendToAttributeName=function(e){this.currentAttribute()[0]+=e},e.prototype.beginAttributeValue=function(e){this.currentAttribute()[2]=e},e.prototype.appendToAttributeValue=function(e){this.currentAttribute()[1]+=e},e.prototype.finishAttributeValue=function(){this.current("StartTag").attributes.push(this._currentAttribute)},e.prototype.reportSyntaxError=function(e){this.current().syntaxError=e},e}(),Pn=n(55701),An=n.n(Pn),Dn=n(64942);function Rn(){function e(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return e("Block validation: "+t,...r)}}return{error:e(console.error),warning:e(console.warn),getItems:()=>[]}}function Mn(){const e=[],t=Rn();return{error(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];e.push({log:t.error,args:r})},warning(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];e.push({log:t.warning,args:r})},getItems:()=>e}}const On=/[\t\n\r\v\f ]+/g,Zn=/^[\t\n\r\v\f ]*$/,Fn=/^url\s*\(['"\s]*(.*?)['"\s]*\)$/,jn=["allowfullscreen","allowpaymentrequest","allowusermedia","async","autofocus","autoplay","checked","controls","default","defer","disabled","download","formnovalidate","hidden","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected","typemustmatch"],zn=[...jn,"autocapitalize","autocomplete","charset","contenteditable","crossorigin","decoding","dir","draggable","enctype","formenctype","formmethod","http-equiv","inputmode","kind","method","preload","scope","shape","spellcheck","translate","type","wrap"],Hn=[e=>e,function(e){return Gn(e).join(" ")}],Vn=/^[\da-z]+$/i,Wn=/^#\d+$/,$n=/^#x[\da-f]+$/i;class Un{parse(e){if(t=e,Vn.test(t)||Wn.test(t)||$n.test(t))return(0,Dn.decodeEntities)("&"+e+";");var t}}function Gn(e){return e.trim().split(On)}function qn(e){return e.attributes.filter((e=>{const[t,n]=e;return n||0===t.indexOf("data-")||zn.includes(t)}))}function Kn(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Rn(),r=e.chars,o=t.chars;for(let e=0;e<Hn.length;e++){const t=Hn[e];if(r=t(r),o=t(o),r===o)return!0}return n.warning("Expected text `%s`, saw `%s`.",t.chars,e.chars),!1}function Yn(e){return 0===parseFloat(e)?"0":0===e.indexOf(".")?"0"+e:e}function Xn(e){return Gn(e).map(Yn).join(" ").replace(Fn,"url($1)")}function Jn(e){const t=e.replace(/;?\s*$/,"").split(";").map((e=>{const[t,...n]=e.split(":"),r=n.join(":");return[t.trim(),Xn(r.trim())]}));return Object.fromEntries(t)}const Qn={class:(e,t)=>{const[n,r]=[e,t].map(Gn),o=n.filter((e=>!r.includes(e))),i=r.filter((e=>!n.includes(e)));return 0===o.length&&0===i.length},style:(e,t)=>An()(...[e,t].map(Jn)),...Object.fromEntries(jn.map((e=>[e,()=>!0])))};function er(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Rn();if(e.length!==t.length)return n.warning("Expected attributes %o, instead saw %o.",t,e),!1;const r={};for(let e=0;e<t.length;e++)r[t[e][0].toLowerCase()]=t[e][1];for(let t=0;t<e.length;t++){const[o,i]=e[t],l=o.toLowerCase();if(!r.hasOwnProperty(l))return n.warning("Encountered unexpected attribute `%s`.",o),!1;const a=r[l],s=Qn[l];if(s){if(!s(i,a))return n.warning("Expected attribute `%s` of value `%s`, saw `%s`.",o,a,i),!1}else if(i!==a)return n.warning("Expected attribute `%s` of value `%s`, saw `%s`.",o,a,i),!1}return!0}const tr={StartTag:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Rn();return e.tagName!==t.tagName&&e.tagName.toLowerCase()!==t.tagName.toLowerCase()?(n.warning("Expected tag name `%s`, instead saw `%s`.",t.tagName,e.tagName),!1):er(...[e,t].map(qn),n)},Chars:Kn,Comment:Kn};function nr(e){let t;for(;t=e.shift();){if("Chars"!==t.type)return t;if(!Zn.test(t.chars))return t}}function rr(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Rn();try{return new Ln(new Un).tokenize(e)}catch(n){t.warning("Malformed HTML detected: %s",e)}return null}function or(e,t){return!!e.selfClosing&&!(!t||t.tagName!==e.tagName||"EndTag"!==t.type)}function ir(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Rn();if(e===t)return!0;const[r,o]=[e,t].map((e=>rr(e,n)));if(!r||!o)return!1;let i,l;for(;i=nr(r);){if(l=nr(o),!l)return n.warning("Expected end of content, instead saw %o.",i),!1;if(i.type!==l.type)return n.warning("Expected token of type `%s` (%o), instead saw `%s` (%o).",l.type,l,i.type,i),!1;const e=tr[i.type];if(e&&!e(i,l,n))return!1;or(i,o[0])?nr(o):or(l,r[0])&&nr(r)}return!(l=nr(o))||(n.warning("Expected %o, instead saw end of content.",l),!1)}function lr(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.name;const n=e.name===ce()||e.name===ue();if(n)return[!0,[]];const r=Mn(),o=Ze(t);let i;try{i=_n(o,e.attributes)}catch(e){return r.error("Block validation failed because an error occurred while generating block content:\n\n%s",e.toString()),[!1,r.getItems()]}const l=ir(e.originalContent,i,r);return l||r.error("Block validation failed for `%s` (%o).\n\nContent generated by `save` function:\n\n%s\n\nContent retrieved from post body:\n\n%s",o.name,o,i,e.originalContent),[l,r.getItems()]}function ar(e,t){const n={...t};if("core/cover-image"===e&&(e="core/cover"),"core/text"!==e&&"core/cover-text"!==e||(e="core/paragraph"),e&&0===e.indexOf("core/social-link-")&&(n.service=e.substring(17),e="core/social-link"),e&&0===e.indexOf("core-embed/")){const t=e.substring(11),r={speaker:"speaker-deck",polldaddy:"crowdsignal"};n.providerNameSlug=t in r?r[t]:t,["amazon-kindle","wordpress"].includes(t)||(n.responsive=!0),e="core/embed"}if("core/post-comment-author"===e&&(e="core/comment-author-name"),"core/post-comment-content"===e&&(e="core/comment-content"),"core/post-comment-date"===e&&(e="core/comment-date"),"core/comments-query-loop"===e){e="core/comments";const{className:t=""}=n;t.includes("wp-block-comments-query-loop")||(n.className=["wp-block-comments-query-loop",t].join(" "))}return"core/post-comments"===e&&(e="core/comments",n.legacy=!0),[e,n]}function sr(e,t){for(var n,r=t.split(".");n=r.shift();){if(!(n in e))return;e=e[n]}return e}var cr,ur=function(){return cr||(cr=document.implementation.createHTMLDocument("")),cr};function dr(e,t){if(t){if("string"==typeof e){var n=ur();n.body.innerHTML=e,e=n.body}if("function"==typeof t)return t(e);if(Object===t.constructor)return Object.keys(t).reduce((function(n,r){return n[r]=dr(e,t[r]),n}),{})}}function pr(e,t){return 1===arguments.length&&(t=e,e=void 0),function(n){var r=n;if(e&&(r=n.querySelector(e)),r)return sr(r,t)}}var mr=n(35721),fr=n.n(mr);function hr(e){const t={};for(let n=0;n<e.length;n++){const{name:r,value:o}=e[n];t[r]=o}return t}function gr(e){if((0,St.default)("wp.blocks.node.fromDOM",{since:"6.1",version:"6.3",alternative:"wp.richText.create",link:"https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"}),e.nodeType===e.TEXT_NODE)return e.nodeValue;if(e.nodeType!==e.ELEMENT_NODE)throw new TypeError("A block node can only be created from a node of type text or element.");return{type:e.nodeName.toLowerCase(),props:{...hr(e.attributes),children:vr(e.childNodes)}}}function vr(e){(0,St.default)("wp.blocks.children.fromDOM",{since:"6.1",version:"6.3",alternative:"wp.richText.create",link:"https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"});const t=[];for(let n=0;n<e.length;n++)try{t.push(gr(e[n]))}catch(e){}return t}function br(e){return(0,St.default)("wp.blocks.children.matcher",{since:"6.1",version:"6.3",alternative:"html source",link:"https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"}),t=>{let n=t;return e&&(n=t.querySelector(e)),n?vr(n.childNodes):[]}}var yr={concat:function(){(0,St.default)("wp.blocks.children.concat",{since:"6.1",version:"6.3",alternative:"wp.richText.concat",link:"https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"});const e=[];for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];for(let t=0;t<n.length;t++){const r=Array.isArray(n[t])?n[t]:[n[t]];for(let t=0;t<r.length;t++){const n=r[t];"string"==typeof n&&"string"==typeof e[e.length-1]?e[e.length-1]+=n:e.push(n)}}return e},getChildrenArray:function(e){return(0,St.default)("wp.blocks.children.getChildrenArray",{since:"6.1",version:"6.3",link:"https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"}),e},fromDOM:vr,toHTML:function(e){(0,St.default)("wp.blocks.children.toHTML",{since:"6.1",version:"6.3",alternative:"wp.richText.toHTMLString",link:"https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"});const t=e;return(0,mn.ZP)(t)},matcher:br};function _r(e,t,n,r,o){let i;switch(t.source){case void 0:i=r?r[e]:void 0;break;case"raw":i=o;break;case"attribute":case"property":case"html":case"text":case"children":case"node":case"query":case"tag":i=wr(n,t)}return function(e,t){return void 0===t||function(e,t){return t.some((t=>function(e,t){switch(t){case"string":return"string"==typeof e;case"boolean":return"boolean"==typeof e;case"object":return!!e&&e.constructor===Object;case"null":return null===e;case"array":return Array.isArray(e);case"integer":case"number":return"number"==typeof e}return!0}(e,t)))}(e,Array.isArray(t)?t:[t])}(i,t.type)&&function(e,t){return!Array.isArray(t)||t.includes(e)}(i,t.enum)||(i=void 0),void 0===i&&(i=t.default),i}const kr=fr()((e=>{switch(e.source){case"attribute":let t=function(e,t){return 1===arguments.length&&(t=e,e=void 0),function(n){var r=pr(e,"attributes")(n);if(r&&r.hasOwnProperty(t))return r[t].value}}(e.selector,e.attribute);return"boolean"===e.type&&(t=(e=>(0,et.Z)([e,e=>void 0!==e]))(t)),t;case"html":return function(e,t){return n=>{let r=n;if(e&&(r=n.querySelector(e)),!r)return"";if(t){let e="";const n=r.children.length;for(let o=0;o<n;o++){const n=r.children[o];n.nodeName.toLowerCase()===t&&(e+=n.outerHTML)}return e}return r.innerHTML}}(e.selector,e.multiline);case"text":return function(e){return pr(e,"textContent")}(e.selector);case"children":return br(e.selector);case"node":return function(e){return(0,St.default)("wp.blocks.node.matcher",{since:"6.1",version:"6.3",alternative:"html source",link:"https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"}),t=>{let n=t;e&&(n=t.querySelector(e));try{return gr(n)}catch(e){return null}}}(e.selector);case"query":const n=(0,U.mapValues)(e.query,kr);return function(e,t){return function(n){var r=n.querySelectorAll(e);return[].map.call(r,(function(e){return dr(e,t)}))}}(e.selector,n);case"tag":return(0,et.Z)([pr(e.selector,"nodeName"),e=>e?e.toLowerCase():void 0]);default:console.error(`Unknown source type "${e.source}"`)}}));function xr(e){return dr(e,(e=>e))}function wr(e,t){return kr(t)(xr(e))}function Cr(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=xr(t),o=Ze(e),i=(0,U.mapValues)(o.attributes,((e,o)=>_r(o,e,r,n,t)));return(0,_e.O)("blocks.getBlockAttributes",i,o,t,n)}const Er={type:"string",source:"attribute",selector:"[data-custom-class-name] > *",attribute:"class"};function Sr(e){const t=wr(`<div data-custom-class-name>${e}</div>`,Er);return t?t.trim().split(/\s+/):[]}function Ir(e,t){const n=function(e,t,n){if(he(t,"customClassName",!0)){const{className:r,...o}=e,i=_n(t,o),l=Sr(i),a=Sr(n).filter((e=>!l.includes(e)));a.length?e.className=a.join(" "):i&&delete e.className}return e}(e.attributes,t,e.originalContent);return{...e,attributes:n}}function Tr(){return!1}function Nr(e,t){let n=function(e,t){const n=ce(),r=e.blockName||ce(),o=e.attrs||{},i=e.innerBlocks||[];let l=e.innerHTML.trim();return r!==n||null!=t&&t.__unstableSkipAutop||(l=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=[];if(""===e.trim())return"";if(-1!==(e+="\n").indexOf("<pre")){const t=e.split("</pre>"),r=t.pop();e="";for(let r=0;r<t.length;r++){const o=t[r],i=o.indexOf("<pre");if(-1===i){e+=o;continue}const l="<pre wp-pre-tag-"+r+"></pre>";n.push([l,o.substr(i)+"</pre>"]),e+=o.substr(0,i)+l}e+=r}const r="(?:table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|legend|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary)";-1!==(e=dn(e=(e=(e=(e=e.replace(/<br\s*\/?>\s*<br\s*\/?>/g,"\n\n")).replace(new RegExp("(<"+r+"[\\s/>])","g"),"\n\n$1")).replace(new RegExp("(</"+r+">)","g"),"$1\n\n")).replace(/\r\n|\r/g,"\n"),{"\n":" \x3c!-- wpnl --\x3e "})).indexOf("<option")&&(e=(e=e.replace(/\s*<option/g,"<option")).replace(/<\/option>\s*/g,"</option>")),-1!==e.indexOf("</object>")&&(e=(e=(e=e.replace(/(<object[^>]*>)\s*/g,"$1")).replace(/\s*<\/object>/g,"</object>")).replace(/\s*(<\/?(?:param|embed)[^>]*>)\s*/g,"$1")),-1===e.indexOf("<source")&&-1===e.indexOf("<track")||(e=(e=(e=e.replace(/([<\[](?:audio|video)[^>\]]*[>\]])\s*/g,"$1")).replace(/\s*([<\[]\/(?:audio|video)[>\]])/g,"$1")).replace(/\s*(<(?:source|track)[^>]*>)\s*/g,"$1")),-1!==e.indexOf("<figcaption")&&(e=(e=e.replace(/\s*(<figcaption[^>]*>)/,"$1")).replace(/<\/figcaption>\s*/,"</figcaption>"));const o=(e=e.replace(/\n\n+/g,"\n\n")).split(/\n\s*\n/).filter(Boolean);return e="",o.forEach((t=>{e+="<p>"+t.replace(/^\n*|\n*$/g,"")+"</p>\n"})),e=(e=(e=(e=(e=(e=(e=(e=e.replace(/<p>\s*<\/p>/g,"")).replace(/<p>([^<]+)<\/(div|address|form)>/g,"<p>$1</p></$2>")).replace(new RegExp("<p>\\s*(</?"+r+"[^>]*>)\\s*</p>","g"),"$1")).replace(/<p>(<li.+?)<\/p>/g,"$1")).replace(/<p><blockquote([^>]*)>/gi,"<blockquote$1><p>")).replace(/<\/blockquote><\/p>/g,"</p></blockquote>")).replace(new RegExp("<p>\\s*(</?"+r+"[^>]*>)","g"),"$1")).replace(new RegExp("(</?"+r+"[^>]*>)\\s*</p>","g"),"$1"),t&&(e=e.replace(/<(script|style).*?<\/\\1>/g,(e=>e[0].replace(/\n/g,"<WPPreserveNewline />"))),e=(e=e.replace(/<br>|<br\/>/g,"<br />")).replace(/(<br \/>)?\s*\n/g,((e,t)=>t?e:"<br />\n")),e=e.replace(/<WPPreserveNewline \/>/g,"\n")),e=(e=(e=e.replace(new RegExp("(</?"+r+"[^>]*>)\\s*<br />","g"),"$1")).replace(/<br \/>(\s*<\/?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)[^>]*>)/g,"$1")).replace(/\n<\/p>$/g,"</p>"),n.forEach((t=>{const[n,r]=t;e=e.replace(n,r)})),-1!==e.indexOf("\x3c!-- wpnl --\x3e")&&(e=e.replace(/\s?<!-- wpnl -->\s?/g,"\n")),e}(l).trim()),{...e,blockName:r,attrs:o,innerHTML:l,innerBlocks:i}}(e,t);n=function(e){const[t,n]=ar(e.blockName,e.attrs);return{...e,blockName:t,attrs:n}}(n);let r=pe(n.blockName);r||(n=function(e){const t=ue()||ce(),n=hn(e,{isCommentDelimited:!1}),r=hn(e,{isCommentDelimited:!0});return{blockName:t,attrs:{originalName:e.blockName,originalContent:r,originalUndelimitedContent:n},innerHTML:e.blockName?r:e.innerHTML,innerBlocks:e.innerBlocks,innerContent:e.innerContent}}(n),r=pe(n.blockName));const o=n.blockName===ce()||n.blockName===ue();if(!r||!n.innerHTML&&o)return;const i=n.innerBlocks.map((e=>Nr(e,t))).filter((e=>!!e)),l=ke(n.blockName,Cr(r,n.innerHTML,n.attrs),i);l.originalContent=n.innerHTML;const a=function(e,t){const[n]=lr(e,t);if(n)return{...e,isValid:n,validationIssues:[]};const r=Ir(e,t),[o,i]=lr(e,t);return{...r,isValid:o,validationIssues:i}}(l,r),{validationIssues:s}=a,c=function(e,t,n){const r=t.attrs,{deprecated:o}=n;if(!o||!o.length)return e;for(let t=0;t<o.length;t++){const{isEligible:i=Tr}=o[t];if(e.isValid&&!i(r,e.innerBlocks))continue;const l=Object.assign(ze(n,J),o[t]);let a={...e,attributes:Cr(l,e.originalContent,r)},[s]=lr(a,l);if(s||(a=Ir(a,l),[s]=lr(a,l)),!s)continue;let c=a.innerBlocks,u=a.attributes;const{migrate:d}=l;if(d){let t=d(u,e.innerBlocks);Array.isArray(t)||(t=[t]),[u=r,c=e.innerBlocks]=t}e={...e,attributes:u,innerBlocks:c,isValid:!0,validationIssues:[]}}return e}(a,n,r);return c.isValid||(c.__unstableBlockSource=e),a.isValid||!c.isValid||null!=t&&t.__unstableSkipMigrationLogs?a.isValid||c.isValid||s.forEach((e=>{let{log:t,args:n}=e;return t(...n)})):(console.groupCollapsed("Updated Block: %s",r.name),console.info("Block successfully updated for `%s` (%o).\n\nNew content generated by `save` function:\n\n%s\n\nContent retrieved from post body:\n\n%s",r.name,r,_n(r,c.attributes),c.originalContent),console.groupEnd()),c}function Br(e,t){return(e=>{Jt=e,Qt=0,en=[],tn=[],nn.lastIndex=0;do{}while(ln());return en})(e).reduce(((e,n)=>{const r=Nr(n,t);return r&&e.push(r),e}),[])}function Lr(){return Be("from").filter((e=>{let{type:t}=e;return"raw"===t})).map((e=>e.isMatch?e:{...e,isMatch:t=>e.selector&&t.matches(e.selector)}))}function Pr(e,t){const n=document.implementation.createHTMLDocument("");return n.body.innerHTML=e,Array.from(n.body.children).flatMap((e=>{const n=Ne(Lr(),(t=>{let{isMatch:n}=t;return n(e)}));if(!n)return ke("core/html",Cr("core/html",e.outerHTML));const{transform:r,blockName:o}=n;return r?r(e,t):ke(o,Cr(o,e.outerHTML))}))}var Ar=n(95657),Dr=n(76119);function Rr(e){const t=document.implementation.createHTMLDocument(""),n=document.implementation.createHTMLDocument(""),r=t.body,o=n.body;for(r.innerHTML=e;r.firstChild;){const e=r.firstChild;e.nodeType===e.TEXT_NODE?(0,Ar.Z)(e)?r.removeChild(e):(o.lastChild&&"P"===o.lastChild.nodeName||o.appendChild(n.createElement("P")),o.lastChild.appendChild(e)):e.nodeType===e.ELEMENT_NODE?"BR"===e.nodeName?(e.nextSibling&&"BR"===e.nextSibling.nodeName&&(o.appendChild(n.createElement("P")),r.removeChild(e.nextSibling)),o.lastChild&&"P"===o.lastChild.nodeName&&o.lastChild.hasChildNodes()?o.lastChild.appendChild(e):r.removeChild(e)):"P"===e.nodeName?(0,Ar.Z)(e)?r.removeChild(e):o.appendChild(e):(0,Dr.V2)(e)?(o.lastChild&&"P"===o.lastChild.nodeName||o.appendChild(n.createElement("P")),o.lastChild.appendChild(e)):o.appendChild(e):r.removeChild(e)}return o.innerHTML}var Mr=n(78747),Or=n(56205);function Zr(e,t){e.nodeType===e.COMMENT_NODE&&("nextpage"!==e.nodeValue?0===e.nodeValue.indexOf("more")&&function(e,t){const n=e.nodeValue.slice(4).trim();let r=e,o=!1;for(;r=r.nextSibling;)if(r.nodeType===r.COMMENT_NODE&&"noteaser"===r.nodeValue){o=!0,(0,Or.Z)(r);break}const i=function(e,t,n){const r=n.createElement("wp-block");return r.dataset.block="core/more",e&&(r.dataset.customText=e),t&&(r.dataset.noTeaser=""),r}(n,o,t);if(e.parentNode&&"P"===e.parentNode.nodeName&&1!==e.parentNode.childNodes.length){const n=Array.from(e.parentNode.childNodes),r=n.indexOf(e),o=e.parentNode.parentNode||t.body,l=(e,n)=>(e||(e=t.createElement("p")),e.appendChild(n),e);[n.slice(0,r).reduce(l,null),i,n.slice(r+1).reduce(l,null)].forEach((t=>t&&o.insertBefore(t,e.parentNode))),(0,Or.Z)(e.parentNode)}else(0,Mr.Z)(e,i)}(e,t):(0,Mr.Z)(e,function(e){const t=e.createElement("wp-block");return t.dataset.block="core/nextpage",t}(t)))}var Fr=n(7391);function jr(e){return"OL"===e.nodeName||"UL"===e.nodeName}function zr(e){if(!jr(e))return;const t=e,n=e.previousElementSibling;if(n&&n.nodeName===e.nodeName&&1===t.children.length){for(;t.firstChild;)n.appendChild(t.firstChild);t.parentNode.removeChild(t)}const r=e.parentNode;if(r&&"LI"===r.nodeName&&1===r.children.length&&!/\S/.test((o=r,Array.from(o.childNodes).map((e=>{let{nodeValue:t=""}=e;return t})).join("")))){const e=r,n=e.previousElementSibling,o=e.parentNode;n?(n.appendChild(t),o.removeChild(e)):(o.parentNode.insertBefore(t,o),o.parentNode.removeChild(o))}var o;if(r&&jr(r)){const t=e.previousElementSibling;t?t.appendChild(e):(0,Fr.Z)(e)}}function Hr(e){"BLOCKQUOTE"===e.nodeName&&(e.innerHTML=Rr(e.innerHTML))}function Vr(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;const n=e.ownerDocument.createElement("figure");t.parentNode.insertBefore(n,t),n.appendChild(e)}function Wr(e,t,n){if(!function(e,t){var n,r;const o=e.nodeName.toLowerCase();return"figcaption"!==o&&!(0,Dr.my)(e)&&o in(null!==(n=null==t||null===(r=t.figure)||void 0===r?void 0:r.children)&&void 0!==n?n:{})}(e,n))return;let r=e;const o=e.parentNode;(function(e,t){var n,r,o,i;return e.nodeName.toLowerCase()in(null!==(n=null==t||null===(r=t.figure)||void 0===r||null===(o=r.children)||void 0===o||null===(i=o.a)||void 0===i?void 0:i.children)&&void 0!==n?n:{})})(e,n)&&"A"===o.nodeName&&1===o.childNodes.length&&(r=e.parentNode);const i=r.closest("p,div");i?e.classList?(e.classList.contains("alignright")||e.classList.contains("alignleft")||e.classList.contains("aligncenter")||!i.textContent.trim())&&Vr(r,i):Vr(r,i):"BODY"===r.parentNode.nodeName&&Vr(r)}function $r(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const r=Ur(e);r.lastIndex=n;const o=r.exec(t);if(!o)return;if("["===o[1]&&"]"===o[7])return $r(e,t,r.lastIndex);const i={index:o.index,content:o[0],shortcode:qr(o)};return o[1]&&(i.content=i.content.slice(1),i.index++),o[7]&&(i.content=i.content.slice(0,-1)),i}function Ur(e){return new RegExp("\\[(\\[?)("+e+")(?![\\w-])([^\\]\\/]*(?:\\/(?!\\])[^\\]\\/]*)*?)(?:(\\/)\\]|\\](?:([^\\[]*(?:\\[(?!\\/\\2\\])[^\\[]*)*)(\\[\\/\\2\\]))?)(\\]?)","g")}const Gr=fr()((e=>{const t={},n=[],r=/([\w-]+)\s*=\s*"([^"]*)"(?:\s|$)|([\w-]+)\s*=\s*'([^']*)'(?:\s|$)|([\w-]+)\s*=\s*([^\s'"]+)(?:\s|$)|"([^"]*)"(?:\s|$)|'([^']*)'(?:\s|$)|(\S+)(?:\s|$)/g;let o;for(e=e.replace(/[\u00a0\u200b]/g," ");o=r.exec(e);)o[1]?t[o[1].toLowerCase()]=o[2]:o[3]?t[o[3].toLowerCase()]=o[4]:o[5]?t[o[5].toLowerCase()]=o[6]:o[7]?n.push(o[7]):o[8]?n.push(o[8]):o[9]&&n.push(o[9]);return{named:t,numeric:n}}));function qr(e){let t;return t=e[4]?"self-closing":e[6]?"closed":"single",new Kr({tag:e[2],attrs:e[3],type:t,content:e[5]})}const Kr=Object.assign((function(e){const{tag:t,attrs:n,type:r,content:o}=e||{};if(Object.assign(this,{tag:t,type:r,content:o}),this.attrs={named:{},numeric:[]},!n)return;const i=["named","numeric"];"string"==typeof n?this.attrs=Gr(n):n.length===i.length&&i.every(((e,t)=>e===n[t]))?this.attrs=n:Object.entries(n).forEach((e=>{let[t,n]=e;this.set(t,n)}))}),{next:$r,replace:function(e,t,n){return t.replace(Ur(e),(function(e,t,r,o,i,l,a,s){if("["===t&&"]"===s)return e;const c=n(qr(arguments));return c||""===c?t+c+s:e}))},string:function(e){return new Kr(e).string()},regexp:Ur,attrs:Gr,fromMatch:qr});Object.assign(Kr.prototype,{get(e){return this.attrs["number"==typeof e?"numeric":"named"][e]},set(e,t){return this.attrs["number"==typeof e?"numeric":"named"][e]=t,this},string(){let e="["+this.tag;return this.attrs.numeric.forEach((t=>{/\s/.test(t)?e+=' "'+t+'"':e+=" "+t})),Object.entries(this.attrs.named).forEach((t=>{let[n,r]=t;e+=" "+n+'="'+r+'"'})),"single"===this.type?e+"]":"self-closing"===this.type?e+" /]":(e+="]",this.content&&(e+=this.content),e+"[/"+this.tag+"]")}});const Yr=e=>Array.isArray(e)?e:[e];var Xr=function e(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const o=Be("from"),i=Ne(o,(e=>-1===r.indexOf(e.blockName)&&"shortcode"===e.type&&Yr(e.tag).some((e=>Ur(e).test(t)))));if(!i)return[t];const l=Yr(i.tag),a=l.find((e=>Ur(e).test(t)));let s;const c=n;if(s=$r(a,t,n)){var u;n=s.index+s.content.length;const o=t.substr(0,s.index),l=t.substr(n);if(!(null!==(u=s.shortcode.content)&&void 0!==u&&u.includes("<")||/(\n|<p>)\s*$/.test(o)&&/^\s*(\n|<\/p>)/.test(l)))return e(t,n);if(i.isMatch&&!i.isMatch(s.shortcode.attrs))return e(t,c,[...r,i.blockName]);let a=[];if("function"==typeof i.transform)a=[].concat(i.transform(s.shortcode.attrs,s)),a=a.map((e=>(e.originalContent=s.shortcode.content,Ir(e,pe(e.name)))));else{const e=Object.fromEntries(Object.entries(i.attributes).filter((e=>{let[,t]=e;return t.shortcode})).map((e=>{let[t,n]=e;return[t,n.shortcode(s.shortcode.attrs,s)]}))),n=pe(i.blockName);if(!n)return[t];const r={...n,attributes:i.attributes};let o=ke(i.blockName,Cr(r,s.shortcode.content,e));o.originalContent=s.shortcode.content,o=Ir(o,r),a=[o]}return[...e(o),...a,...e(l)]}return[t]};function Jr(e){return function(e,t){const n={phrasingContentSchema:(0,Dr.s3)(t),isPaste:"paste"===t},r=e.map((e=>{let{isMatch:t,blockName:r,schema:o}=e;const i=he(r,"anchor");return o="function"==typeof o?o(n):o,i||t?(0,U.mapValues)(o,(e=>{let n=e.attributes||[];return i&&(n=[...n,"id"]),{...e,attributes:n,isMatch:t||void 0}})):o}));return(0,U.mergeWith)({},...r,((e,t,n)=>{switch(n){case"children":return"*"===e||"*"===t?"*":{...e,...t};case"attributes":case"require":return[...e||[],...t||[]];case"isMatch":if(!e||!t)return;return function(){return e(...arguments)||t(...arguments)}}}))}(Lr(),e)}function Qr(e,t,n,r){Array.from(e).forEach((e=>{Qr(e.childNodes,t,n,r),t.forEach((t=>{n.contains(e)&&t(e,n,r)}))}))}function eo(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0;const r=document.implementation.createHTMLDocument("");return r.body.innerHTML=e,Qr(r.body.childNodes,t,r,n),r.body.innerHTML}function to(e,t){const n=e[`${t}Sibling`];if(n&&(0,Dr.V2)(n))return n;const{parentNode:r}=e;return r&&(0,Dr.V2)(r)?to(r,t):void 0}function no(e){let{HTML:t=""}=e;if(-1!==t.indexOf("\x3c!-- wp:"))return Br(t);const n=Xr(t),r=Jr();return n.map((e=>"string"!=typeof e?e:Pr(e=Rr(e=eo(e,[zr,Zr,Wr,Hr],r)),no))).flat().filter(Boolean)}var ro=n(47534);function oo(e){e.nodeType===e.COMMENT_NODE&&(0,Or.Z)(e)}function io(e,t){return e.every((e=>function(e,t){if((0,Dr.my)(e))return!0;if(!t)return!1;const n=e.nodeName.toLowerCase();return[["ul","li","ol"],["h1","h2","h3","h4","h5","h6"]].some((e=>0===[n,t].filter((t=>!e.includes(t))).length))}(e,t)&&io(Array.from(e.children),t)))}function lo(e){return"BR"===e.nodeName&&e.previousSibling&&"BR"===e.previousSibling.nodeName}var ao=n(4599),so=n(26750);function co(e,t){if("SPAN"===e.nodeName&&e.style){const{fontWeight:n,fontStyle:r,textDecorationLine:o,textDecoration:i,verticalAlign:l}=e.style;"bold"!==n&&"700"!==n||(0,ao.Z)(t.createElement("strong"),e),"italic"===r&&(0,ao.Z)(t.createElement("em"),e),("line-through"===o||i.includes("line-through"))&&(0,ao.Z)(t.createElement("s"),e),"super"===l?(0,ao.Z)(t.createElement("sup"),e):"sub"===l&&(0,ao.Z)(t.createElement("sub"),e)}else"B"===e.nodeName?e=(0,so.Z)(e,"strong"):"I"===e.nodeName?e=(0,so.Z)(e,"em"):"A"===e.nodeName&&(e.target&&"_blank"===e.target.toLowerCase()?e.rel="noreferrer noopener":(e.removeAttribute("target"),e.removeAttribute("rel")),e.name&&!e.id&&(e.id=e.name),e.id&&!e.ownerDocument.querySelector(`[href="#${e.id}"]`)&&e.removeAttribute("id"))}function uo(e){"SCRIPT"!==e.nodeName&&"NOSCRIPT"!==e.nodeName&&"TEMPLATE"!==e.nodeName&&"STYLE"!==e.nodeName||e.parentNode.removeChild(e)}const{parseInt:po}=window;function mo(e){return"OL"===e.nodeName||"UL"===e.nodeName}function fo(e,t){if("P"!==e.nodeName)return;const n=e.getAttribute("style");if(!n)return;if(-1===n.indexOf("mso-list"))return;const r=/mso-list\s*:[^;]+level([0-9]+)/i.exec(n);if(!r)return;let o=po(r[1],10)-1||0;const i=e.previousElementSibling;if(!i||!mo(i)){const n=e.textContent.trim().slice(0,1),r=/[1iIaA]/.test(n),o=t.createElement(r?"ol":"ul");r&&o.setAttribute("type",n),e.parentNode.insertBefore(o,e)}const l=e.previousElementSibling,a=l.nodeName,s=t.createElement("li");let c=l;for(e.removeChild(e.firstChild);e.firstChild;)s.appendChild(e.firstChild);for(;o--;)c=c.lastChild||c,mo(c)&&(c=c.lastChild||c);mo(c)||(c=c.appendChild(t.createElement(a))),c.appendChild(s),e.parentNode.removeChild(e)}const{atob:ho,File:go}=window;function vo(e){if("IMG"===e.nodeName){if(0===e.src.indexOf("file:")&&(e.src=""),0===e.src.indexOf("data:")){const[t,n]=e.src.split(","),[r]=t.slice(5).split(";");if(!n||!r)return void(e.src="");let o;try{o=ho(n)}catch(t){return void(e.src="")}const i=new Uint8Array(o.length);for(let e=0;e<i.length;e++)i[e]=o.charCodeAt(e);const l=r.replace("/","."),a=new go([i],l,{type:r});e.src=Z(a)}1!==e.height&&1!==e.width||e.parentNode.removeChild(e)}}function bo(e){"DIV"===e.nodeName&&(e.innerHTML=Rr(e.innerHTML))}var yo=n(52965);const _o=new(n.n(yo)().Converter)({noHeaderId:!0,tables:!0,literalMidWordUnderscores:!0,omitExtraWLInCodeBlocks:!0,simpleLineBreaks:!0,strikethrough:!0});function ko(e){if("IFRAME"===e.nodeName){const t=e.ownerDocument.createTextNode(e.src);e.parentNode.replaceChild(t,e)}}function xo(e){e.id&&0===e.id.indexOf("docs-internal-guid-")&&("B"===e.tagName?(0,Fr.Z)(e):e.removeAttribute("id"))}function wo(e){if(e.nodeType!==e.TEXT_NODE)return;let t=e;for(;t=t.parentNode;)if(t.nodeType===t.ELEMENT_NODE&&"PRE"===t.nodeName)return;let n=e.data.replace(/[ \r\n\t]+/g," ");if(" "===n[0]){const t=to(e,"previous");t&&"BR"!==t.nodeName&&" "!==t.textContent.slice(-1)||(n=n.slice(1))}if(" "===n[n.length-1]){const t=to(e,"next");(!t||"BR"===t.nodeName||t.nodeType===t.TEXT_NODE&&function(e){return" "===e||"\r"===e||"\n"===e||"\t"===e}(t.textContent[0]))&&(n=n.slice(0,-1))}n?e.data=n:e.parentNode.removeChild(e)}function Co(e){"BR"===e.nodeName&&(to(e,"next")||e.parentNode.removeChild(e))}function Eo(e){"P"===e.nodeName&&(e.hasChildNodes()||e.parentNode.removeChild(e))}function So(e){if("SPAN"!==e.nodeName)return;if("paragraph-break"!==e.getAttribute("data-stringify-type"))return;const{parentNode:t}=e;t.insertBefore(e.ownerDocument.createElement("br"),e),t.insertBefore(e.ownerDocument.createElement("br"),e),t.removeChild(e)}const{console:Io}=window;function To(e,t){return e=eo(e,[uo,xo,co,oo]),e=(0,ro.Z)(e,(0,Dr.s3)("paste"),{inline:!0}),t||(e=eo(e,[wo,Co])),Io.log("Processed inline HTML:\n\n",e),e}function No(e){let{HTML:t="",plainText:n="",mode:r="AUTO",tagName:o,preserveWhiteSpace:i}=e;if(t=t.replace(/<meta[^>]+>/g,""),t=t.replace(/^\s*<html[^>]*>\s*<body[^>]*>(?:\s*<!--\s*StartFragment\s*-->)?/i,""),t=t.replace(/(?:<!--\s*EndFragment\s*-->\s*)?<\/body>\s*<\/html>\s*$/i,""),"INLINE"!==r){const e=t||n;if(-1!==e.indexOf("\x3c!-- wp:"))return Br(e)}var l;if(String.prototype.normalize&&(t=t.normalize()),!n||t&&!function(e){return!/<(?!br[ />])/i.test(e)}(t)||(t=n,/^\s+$/.test(n)||(l=t,t=_o.makeHtml(function(e){return e.replace(/((?:^|\n)```)([^\n`]+)(```(?:$|\n))/,((e,t,n,r)=>`${t}\n${n}\n${r}`))}(function(e){return e.replace(/(^|\n)•( +)/g,"$1*$2")}(l)))),"AUTO"===r&&-1===n.indexOf("\n")&&0!==n.indexOf("<p>")&&0===t.indexOf("<p>")&&(r="INLINE")),"INLINE"===r)return To(t,i);t=eo(t,[So]);const a=Xr(t),s=a.length>1;if("AUTO"===r&&!s&&function(e,t){const n=document.implementation.createHTMLDocument("");n.body.innerHTML=e;const r=Array.from(n.body.children);return!r.some(lo)&&io(r,t)}(t,o))return To(t,i);const c=(0,Dr.s3)("paste"),u=Jr("paste"),d=a.map((e=>{if("string"!=typeof e)return e;const t=[xo,fo,uo,zr,vo,co,Zr,oo,ko,Wr,Hr,bo],n={...u,...c};return e=eo(e,t,u),e=eo(e=Rr(e=(0,ro.Z)(e,n)),[wo,Co,Eo],u),Io.log("Processed HTML piece:\n\n",e),Pr(e,No)})).flat().filter(Boolean);if("AUTO"===r&&1===d.length&&he(d[0].name,"__unstablePasteTextInline",!1)){const e=/^[\n]+|[\n]+$/g,t=n.replace(e,"");if(""!==t&&-1===t.indexOf("\n"))return(0,ro.Z)(xn(d[0]),c).replace(e,"")}return d}function Bo(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return e.length===t.length&&t.every(((t,n)=>{let[r,,o]=t;const i=e[n];return r===i.name&&Bo(i.innerBlocks,o)}))}function Lo(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return t?t.map(((t,n)=>{var r;let[o,i,l]=t;const a=e[n];if(a&&a.name===o){const e=Lo(a.innerBlocks,l);return{...a,innerBlocks:e}}const s=pe(o),c=(e,t)=>t?Object.fromEntries(Object.entries(t).map((t=>{let[n,r]=t;return[n,u(e[n],r)]}))):{},u=(e,t)=>{return"html"===(null==(n=e)?void 0:n.source)&&Array.isArray(t)?(0,mn.ZP)(t):(e=>"query"===(null==e?void 0:e.source))(e)&&t?t.map((t=>c(e.query,t))):t;var n},d=c(null!==(r=null==s?void 0:s.attributes)&&void 0!==r?r:{},i);let[p,m]=ar(o,d);return void 0===pe(p)&&(m={originalName:o,originalContent:"",originalUndelimitedContent:""},p="core/missing"),ke(p,m,Lo([],l))})):e}(0,_e.KJ)("blocks.registerBlockType","core/compat/migrateLightBlockWrapper",(function(e){const{apiVersion:t=1}=e;return t<2&&he(e,"lightBlockWrapper",!1)&&(e.apiVersion=2),e}));var Po=n(48041),Ao=n(56662),Do=n(819),Ro=n(43039),Mo=n(903),Oo=n(75527),Zo=e=>(0,v.createElement)("div",{className:e.className},e.children),Fo=(0,v.forwardRef)((function(e,t){let{containerClassName:n,className:r,extraProps:o,children:i,title:l,isActive:a,isDisabled:s,...c}=e;return(0,v.useContext)(Ro.Z)?(0,v.createElement)(Oo.Z,(0,Po.Z)({className:w()("components-toolbar-button",r)},o,c,{ref:t}),(e=>(0,v.createElement)(Mo.ZP,(0,Po.Z)({label:l,isPressed:a,disabled:s},e),i))):(0,v.createElement)(Zo,{className:n},(0,v.createElement)(Mo.ZP,(0,Po.Z)({ref:t,icon:c.icon,label:l,shortcut:c.shortcut,"data-subscript":c.subscript,onClick:e=>{e.stopPropagation(),c.onClick&&c.onClick(e)},className:w()("components-toolbar__control",r),isPressed:a,disabled:s,"data-toolbar-item":!0},o,c),i))})),jo=e=>{let{className:t,children:n,...r}=e;return(0,v.createElement)("div",(0,Po.Z)({className:t},r),n)},zo=n(86849),Ho=function(e){let{controls:t=[],toggleProps:n,...r}=e;const o=e=>(0,v.createElement)(zo.Z,(0,Po.Z)({controls:t,toggleProps:{...e,"data-toolbar-item":!0}},r));return(0,v.useContext)(Ro.Z)?(0,v.createElement)(Oo.Z,n,o):o(n)},Vo=function(e){var t;let{controls:n=[],children:r,className:o,isCollapsed:i,title:l,...a}=e;const s=(0,v.useContext)(Ro.Z);if(!(n&&n.length||r))return null;const c=w()(s?"components-toolbar-group":"components-toolbar",o);let u=n;return Array.isArray(u[0])||(u=[u]),i?(0,v.createElement)(Ho,(0,Po.Z)({label:l,controls:u,className:c,children:r},a)):(0,v.createElement)(jo,(0,Po.Z)({className:c},a),null===(t=u)||void 0===t?void 0:t.flatMap(((e,t)=>e.map(((e,n)=>(0,v.createElement)(Fo,(0,Po.Z)({key:[t,n].join(),containerClassName:t>0&&0===n?"has-left-divider":null},e)))))),r)},Wo={default:(0,I.up)("BlockControls"),block:(0,I.up)("BlockControlsBlock"),inline:(0,I.up)("BlockFormatControls"),other:(0,I.up)("BlockControlsOther"),parent:(0,I.up)("BlockControlsParent")};const $o={insertUsage:{}},Uo={alignWide:!1,supportsLayout:!0,colors:[{name:(0,N.__)("Black"),slug:"black",color:"#000000"},{name:(0,N.__)("Cyan bluish gray"),slug:"cyan-bluish-gray",color:"#abb8c3"},{name:(0,N.__)("White"),slug:"white",color:"#ffffff"},{name:(0,N.__)("Pale pink"),slug:"pale-pink",color:"#f78da7"},{name:(0,N.__)("Vivid red"),slug:"vivid-red",color:"#cf2e2e"},{name:(0,N.__)("Luminous vivid orange"),slug:"luminous-vivid-orange",color:"#ff6900"},{name:(0,N.__)("Luminous vivid amber"),slug:"luminous-vivid-amber",color:"#fcb900"},{name:(0,N.__)("Light green cyan"),slug:"light-green-cyan",color:"#7bdcb5"},{name:(0,N.__)("Vivid green cyan"),slug:"vivid-green-cyan",color:"#00d084"},{name:(0,N.__)("Pale cyan blue"),slug:"pale-cyan-blue",color:"#8ed1fc"},{name:(0,N.__)("Vivid cyan blue"),slug:"vivid-cyan-blue",color:"#0693e3"},{name:(0,N.__)("Vivid purple"),slug:"vivid-purple",color:"#9b51e0"}],fontSizes:[{name:(0,N._x)("Small","font size name"),size:13,slug:"small"},{name:(0,N._x)("Normal","font size name"),size:16,slug:"normal"},{name:(0,N._x)("Medium","font size name"),size:20,slug:"medium"},{name:(0,N._x)("Large","font size name"),size:36,slug:"large"},{name:(0,N._x)("Huge","font size name"),size:42,slug:"huge"}],imageDefaultSize:"large",imageSizes:[{slug:"thumbnail",name:(0,N.__)("Thumbnail")},{slug:"medium",name:(0,N.__)("Medium")},{slug:"large",name:(0,N.__)("Large")},{slug:"full",name:(0,N.__)("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:[],__unstableGalleryWithImageBlocks:!1,__unstableIsPreviewMode:!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,N.__)("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,N.__)("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,N.__)("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,N.__)("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,N.__)("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,N.__)("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,N.__)("Blush light purple"),gradient:"linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)",slug:"blush-light-purple"},{name:(0,N.__)("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,N.__)("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,N.__)("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,N.__)("Electric grass"),gradient:"linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%)",slug:"electric-grass"},{name:(0,N.__)("Midnight"),gradient:"linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%)",slug:"midnight"}],__unstableResolvedAssets:{styles:[],scripts:[]}};function Go(e,t,n){return[...e.slice(0,n),...Array.isArray(t)?t:[t],...e.slice(n)]}function qo(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;const o=[...e];return o.splice(t,r),Go(o,e.slice(t,t+r),n)}const Ko=e=>e;function Yo(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=new Map,r=[];return n.set(t,r),e.forEach((e=>{const{clientId:t,innerBlocks:o}=e;r.push(t),Yo(o,t).forEach(((e,t)=>{n.set(t,e)}))})),n}function Xo(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=[],r=[[t,e]];for(;r.length;){const[e,t]=r.shift();t.forEach((t=>{let{innerBlocks:o,...i}=t;n.push([i.clientId,e]),null!=o&&o.length&&r.push([i.clientId,o])}))}return n}function Jo(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ko;const n=[],r=[...e];for(;r.length;){const{innerBlocks:e,...o}=r.shift();r.push(...e),n.push([o.clientId,t(o)])}return n}function Qo(e){const t={},n=[...e];for(;n.length;){const{innerBlocks:e,...r}=n.shift();n.push(...e),t[r.clientId]=!0}return t}function ei(e){return Jo(e,(e=>{const{attributes:t,...n}=e;return n}))}function ti(e){return Jo(e,(e=>e.attributes))}function ni(e,t){return"UPDATE_BLOCK_ATTRIBUTES"===e.type&&void 0!==t&&"UPDATE_BLOCK_ATTRIBUTES"===t.type&&An()(e.clientIds,t.clientIds)&&function(e,t){return An()(Object.keys(e),Object.keys(t))}(e.attributes,t.attributes)}function ri(e,t){const n=e.tree,r=[...t],o=[...t];for(;r.length;){const e=r.shift();r.push(...e.innerBlocks),o.push(...e.innerBlocks)}for(const e of o)n.set(e.clientId,{});for(const t of o)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 oi(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=e.tree,o=new Set([]),i=new Set;for(const r of t){let t=n?r:e.parents.get(r);do{if(e.controlledInnerBlocks[t]){i.add(t);break}o.add(t),t=e.parents.get(t)}while(void 0!==t)}for(const e of o)r.set(e,{...r.get(e)});for(const t of o)r.get(t).innerBlocks=(e.order.get(t)||[]).map((e=>r.get(e)));for(const t of i)r.set("controlled||"+t,{innerBlocks:(e.order.get(t)||[]).map((e=>r.get(e)))})}const ii=(0,et.Z)($.combineReducers,(e=>(t,n)=>{if(t&&"SAVE_REUSABLE_BLOCK_SUCCESS"===n.type){const{id:e,updatedId:r}=n;if(e===r)return t;(t={...t}).attributes=new Map(t.attributes),t.attributes.forEach(((n,o)=>{const{name:i}=t.byClientId.get(o);"core/block"===i&&n.ref===e&&t.attributes.set(o,{...n,ref:r})}))}return e(t,n)}),(e=>function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;const r=e(t,n);if(r===t)return t;switch(r.tree=t.tree?t.tree:new Map,n.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":r.tree=new Map(r.tree),ri(r,n.blocks),oi(r,n.rootClientId?[n.rootClientId]:[""],!0);break;case"UPDATE_BLOCK":r.tree=new Map(r.tree),r.tree.set(n.clientId,{...r.tree.get(n.clientId),...r.byClientId.get(n.clientId),attributes:r.attributes.get(n.clientId)}),oi(r,[n.clientId],!1);break;case"UPDATE_BLOCK_ATTRIBUTES":r.tree=new Map(r.tree),n.clientIds.forEach((e=>{r.tree.set(e,{...r.tree.get(e),attributes:r.attributes.get(e)})})),oi(r,n.clientIds,!1);break;case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const e=Qo(n.blocks);r.tree=new Map(r.tree),n.replacedClientIds.concat(n.replacedClientIds.filter((t=>!e[t])).map((e=>"controlled||"+e))).forEach((e=>{r.tree.delete(e)})),ri(r,n.blocks),oi(r,n.blocks.map((e=>e.clientId)),!1);const o=[];for(const e of n.clientIds)void 0===t.parents.get(e)||""!==t.parents.get(e)&&!r.byClientId.get(t.parents.get(e))||o.push(t.parents.get(e));oi(r,o,!0);break}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":const e=[];for(const o of n.clientIds)void 0===t.parents.get(o)||""!==t.parents.get(o)&&!r.byClientId.get(t.parents.get(o))||e.push(t.parents.get(o));r.tree=new Map(r.tree),n.removedClientIds.concat(n.removedClientIds.map((e=>"controlled||"+e))).forEach((e=>{r.tree.delete(e)})),oi(r,e,!0);break;case"MOVE_BLOCKS_TO_POSITION":{const e=[];n.fromRootClientId?e.push(n.fromRootClientId):e.push(""),n.toRootClientId&&e.push(n.toRootClientId),r.tree=new Map(r.tree),oi(r,e,!0);break}case"MOVE_BLOCKS_UP":case"MOVE_BLOCKS_DOWN":{const e=[n.rootClientId?n.rootClientId:""];r.tree=new Map(r.tree),oi(r,e,!0);break}case"SAVE_REUSABLE_BLOCK_SUCCESS":{const e=[];r.attributes.forEach(((t,o)=>{"core/block"===r.byClientId.get(o).name&&t.ref===n.updatedId&&e.push(o)})),r.tree=new Map(r.tree),e.forEach((e=>{r.tree.set(e,{...r.byClientId.get(e),attributes:r.attributes.get(e),innerBlocks:r.tree.get(e).innerBlocks})})),oi(r,e,!1)}}return r}),(e=>(t,n)=>{const r=e=>{let r=e;for(let o=0;o<r.length;o++)!t.order.get(r[o])||n.keepControlledInnerBlocks&&n.keepControlledInnerBlocks[r[o]]||(r===e&&(r=[...r]),r.push(...t.order.get(r[o])));return r};if(t)switch(n.type){case"REMOVE_BLOCKS":n={...n,type:"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN",removedClientIds:r(n.clientIds)};break;case"REPLACE_BLOCKS":n={...n,type:"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN",replacedClientIds:r(n.clientIds)}}return e(t,n)}),(e=>(t,n)=>{if("REPLACE_INNER_BLOCKS"!==n.type)return e(t,n);const r={};if(Object.keys(t.controlledInnerBlocks).length){const e=[...n.blocks];for(;e.length;){const{innerBlocks:n,...o}=e.shift();e.push(...n),t.controlledInnerBlocks[o.clientId]&&(r[o.clientId]=!0)}}let o=t;t.order.get(n.rootClientId)&&(o=e(o,{type:"REMOVE_BLOCKS",keepControlledInnerBlocks:r,clientIds:t.order.get(n.rootClientId)}));let i=o;if(n.blocks.length){i=e(i,{...n,type:"INSERT_BLOCKS",index:0});const o=new Map(i.order);Object.keys(r).forEach((e=>{t.order.get(e)&&o.set(e,t.order.get(e))})),i.order=o,i.tree=new Map(i.tree),Object.keys(r).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(ei(n.blocks)),attributes:new Map(ti(n.blocks)),order:Yo(n.blocks),parents:new Map(Xo(n.blocks)),controlledInnerBlocks:{}};return e.tree=new Map(null==t?void 0:t.tree),ri(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=!1;return(r,o)=>{let i=e(r,o);const l="MARK_LAST_CHANGE_AS_PERSISTENT"===o.type||n;if(r===i&&!l){var a;n="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===o.type;const e=null===(a=null==r?void 0:r.isPersistentChange)||void 0===a||a;return r.isPersistentChange===e?r:{...i,isPersistentChange:e}}return i={...i,isPersistentChange:l?!n:!ni(o,t)},t=o,n="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===o.type,i}}),(function(e){const t=new Set(["RECEIVE_BLOCKS"]);return(n,r)=>{const o=e(n,r);return o!==n&&(o.isIgnoredChange=t.has(r.type)),o}}),(e=>(t,n)=>{if("SET_HAS_CONTROLLED_INNER_BLOCKS"===n.type){const r=e(t,{type:"REPLACE_INNER_BLOCKS",rootClientId:n.clientId,blocks:[]});return e(r,n)}return e(t,n)}))({byClientId(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Map,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{const n=new Map(e);return ei(t.blocks).forEach((e=>{let[t,r]=e;n.set(t,r)})),n}case"UPDATE_BLOCK":{if(!e.has(t.clientId))return e;const{attributes:n,...r}=t.updates;if(0===Object.values(r).length)return e;const o=new Map(e);return o.set(t.clientId,{...e.get(t.clientId),...r}),o}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{if(!t.blocks)return e;const n=new Map(e);return t.replacedClientIds.forEach((e=>{n.delete(e)})),ei(t.blocks).forEach((e=>{let[t,r]=e;n.set(t,r)})),n}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.removedClientIds.forEach((e=>{n.delete(e)})),n}}return e},attributes(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Map,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{const n=new Map(e);return ti(t.blocks).forEach((e=>{let[t,r]=e;n.set(t,r)})),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"UPDATE_BLOCK_ATTRIBUTES":{if(t.clientIds.every((t=>!e.get(t))))return e;let r=!1;const o=new Map(e);for(const i of t.clientIds){var n;const l=Object.entries(t.uniqueByBlock?t.attributes[i]:null!==(n=t.attributes)&&void 0!==n?n:{});if(0===l.length)continue;let a=!1;const s=e.get(i),c={};l.forEach((e=>{let[t,n]=e;s[t]!==n&&(a=!0,c[t]=n)})),r=r||a,a&&o.set(i,{...s,...c})}return r?o: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)})),ti(t.blocks).forEach((e=>{let[t,r]=e;n.set(t,r)})),n}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.removedClientIds.forEach((e=>{n.delete(e)})),n}}return e},order(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Map,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":{var n;const r=Yo(t.blocks),o=new Map(e);return r.forEach(((e,t)=>{""!==t&&o.set(t,e)})),o.set("",(null!==(n=e.get(""))&&void 0!==n?n:[]).concat(r[""])),o}case"INSERT_BLOCKS":{const{rootClientId:n=""}=t,r=e.get(n)||[],o=Yo(t.blocks,n),{index:i=r.length}=t,l=new Map(e);return o.forEach(((e,t)=>{l.set(t,e)})),l.set(n,Go(r,o.get(n),i)),l}case"MOVE_BLOCKS_TO_POSITION":{var r,o;const{fromRootClientId:n="",toRootClientId:i="",clientIds:l}=t,{index:a=e.get(i).length}=t;if(n===i){const t=e.get(i).indexOf(l[0]),n=new Map(e);return n.set(i,qo(e.get(i),t,a,l.length)),n}const s=new Map(e);return s.set(n,null!==(r=null===(o=e.get(n))||void 0===o?void 0:o.filter((e=>!l.includes(e))))&&void 0!==r?r:[]),s.set(i,Go(e.get(i),l,a)),s}case"MOVE_BLOCKS_UP":{const{clientIds:n,rootClientId:r=""}=t,o=n[0],i=e.get(r);if(!i.length||o===i[0])return e;const l=i.indexOf(o),a=new Map(e);return a.set(r,qo(i,l,l-1,n.length)),a}case"MOVE_BLOCKS_DOWN":{const{clientIds:n,rootClientId:r=""}=t,o=n[0],i=n[n.length-1],l=e.get(r);if(!l.length||i===l[l.length-1])return e;const a=l.indexOf(o),s=new Map(e);return s.set(r,qo(l,a,a+1,n.length)),s}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const{clientIds:n}=t;if(!t.blocks)return e;const r=Yo(t.blocks),o=new Map(e);return t.replacedClientIds.forEach((e=>{o.delete(e)})),r.forEach(((e,t)=>{""!==t&&o.set(t,e)})),o.forEach(((e,t)=>{const i=Object.values(e).reduce(((e,t)=>t===n[0]?[...e,...r.get("")]:(-1===n.indexOf(t)&&e.push(t),e)),[]);o.set(t,i)})),o}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.removedClientIds.forEach((e=>{n.delete(e)})),n.forEach(((e,r)=>{var o;const i=null!==(o=null==e?void 0:e.filter((e=>!t.removedClientIds.includes(e))))&&void 0!==o?o:[];i.length!==e.length&&n.set(r,i)})),n}}return e},parents(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Map,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":{const n=new Map(e);return Xo(t.blocks).forEach((e=>{let[t,r]=e;n.set(t,r)})),n}case"INSERT_BLOCKS":{const n=new Map(e);return Xo(t.blocks,t.rootClientId||"").forEach((e=>{let[t,r]=e;n.set(t,r)})),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)})),Xo(t.blocks,e.get(t.clientIds[0])).forEach((e=>{let[t,r]=e;n.set(t,r)})),n}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.removedClientIds.forEach((e=>{n.delete(e)})),n}}return e},controlledInnerBlocks(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{type:t,clientId:n,hasControlledInnerBlocks:r}=arguments.length>1?arguments[1]:void 0;return"SET_HAS_CONTROLLED_INNER_BLOCKS"===t?{...e,[n]:r}:e}});function li(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;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 ai=(0,$.combineReducers)({blocks:ii,isTyping:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_TYPING":return!0;case"STOP_TYPING":return!1}return e},isBlockInterfaceHidden:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"HIDE_BLOCK_INTERFACE":return!0;case"SHOW_BLOCK_INTERFACE":return!1}return e},draggedBlocks:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_DRAGGING_BLOCKS":return t.clientIds;case"STOP_DRAGGING_BLOCKS":return[]}return e},selection:function(){var e,t,n,r;let o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;switch(i.type){case"SELECTION_CHANGE":return i.clientId?{selectionStart:{clientId:i.clientId,attributeKey:i.attributeKey,offset:i.startOffset},selectionEnd:{clientId:i.clientId,attributeKey:i.attributeKey,offset:i.endOffset}}:{selectionStart:i.start||o.selectionStart,selectionEnd:i.end||o.selectionEnd};case"RESET_SELECTION":const{selectionStart:l,selectionEnd:a}=i;return{selectionStart:l,selectionEnd:a};case"MULTI_SELECT":const{start:s,end:c}=i;return s===(null===(e=o.selectionStart)||void 0===e?void 0:e.clientId)&&c===(null===(t=o.selectionEnd)||void 0===t?void 0:t.clientId)?o:{selectionStart:{clientId:s},selectionEnd:{clientId:c}};case"RESET_BLOCKS":const u=null==o||null===(n=o.selectionStart)||void 0===n?void 0:n.clientId,d=null==o||null===(r=o.selectionEnd)||void 0===r?void 0:r.clientId;if(!u&&!d)return o;if(!i.blocks.some((e=>e.clientId===u)))return{selectionStart:{},selectionEnd:{}};if(!i.blocks.some((e=>e.clientId===d)))return{...o,selectionEnd:o.selectionStart}}const l=li(o.selectionStart,i),a=li(o.selectionEnd,i);return l===o.selectionStart&&a===o.selectionEnd?o:{selectionStart:l,selectionEnd:a}},isMultiSelecting:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_MULTI_SELECT":return!0;case"STOP_MULTI_SELECT":return!1}return e},isSelectionEnabled:function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1?arguments[1]:void 0;return"TOGGLE_SELECTION"===t.type?t.isSelectionEnabled:e},initialPosition:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;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(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if("TOGGLE_BLOCK_MODE"===t.type){const{clientId:n}=t;return{...e,[n]:e[n]&&"html"===e[n]?"visual":"html"}}return e},blockListSettings:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"REPLACE_BLOCKS":case"REMOVE_BLOCKS":return Object.fromEntries(Object.entries(e).filter((e=>{let[n]=e;return!t.clientIds.includes(n)})));case"UPDATE_BLOCK_LIST_SETTINGS":{const{clientId:n}=t;if(!t.settings){if(e.hasOwnProperty(n)){const{[n]:t,...r}=e;return r}return e}return An()(e[n],t.settings)?e:{...e,[n]:t.settings}}}return e},insertionPoint:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SHOW_INSERTION_POINT":{const{rootClientId:n,index:r,__unstableWithInserter:o,operation:i}=t,l={rootClientId:n,index:r,__unstableWithInserter:o,operation:i};return An()(e,l)?e:l}case"HIDE_INSERTION_POINT":return null}return e},template:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isValid:!0},t=arguments.length>1?arguments[1]:void 0;return"SET_TEMPLATE_VALIDITY"===t.type?{...e,isValid:t.isValid}:e},settings:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Uo,t=arguments.length>1?arguments[1]:void 0;return"UPDATE_SETTINGS"===t.type?{...e,...t.settings}:e},preferences:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:$o,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":return t.blocks.reduce(((e,n)=>{const{attributes:r,name:o}=n,i=(0,$.select)(Xt).getActiveBlockVariation(o,r);let l=null!=i&&i.name?`${o}/${i.name}`:o;const a={name:l};return"core/block"===o&&(a.ref=r.ref,l+="/"+r.ref),{...e,insertUsage:{...e.insertUsage,[l]:{time:t.time,count:e.insertUsage[l]?e.insertUsage[l].count+1:1,insert:a}}}}),e)}return e},lastBlockAttributesChange:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;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},editorMode:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"edit",t=arguments.length>1?arguments[1]:void 0;return"INSERT_BLOCKS"===t.type&&"navigation"===e?"edit":"SET_EDITOR_MODE"===t.type?t.mode:e},hasBlockMovingClientId:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return"SET_BLOCK_MOVING_MODE"===t.type?t.hasBlockMovingClientId:"SET_EDITOR_MODE"===t.type?null:e},highlightedBlock:function(e,t){switch(t.type){case"TOGGLE_BLOCK_HIGHLIGHT":const{clientId:n,isHighlighted:r}=t;return r?n:e===n?null:e;case"SELECT_BLOCK":if(t.clientId!==e)return null}return e},lastBlockInserted:function(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;switch(n.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":case"REPLACE_INNER_BLOCKS":if(!n.blocks.length)return t;const r=n.blocks.map((e=>e.clientId));return{clientIds:r,source:null===(e=n.meta)||void 0===e?void 0:e.source};case"RESET_BLOCKS":return{}}return t},temporarilyEditingAsBlocks:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;return"SET_TEMPORARILY_EDITING_AS_BLOCKS"===t.type?t.temporarilyEditingAsBlocks:e},blockVisibility:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return"SET_BLOCK_VISIBILITY"===t.type?{...e,...t.updates}:e}});var si=function(e){return(t,n)=>{const r=e(t,n);return t?(r.automaticChangeStatus=t.automaticChangeStatus,"MARK_AUTOMATIC_CHANGE"===n.type?{...r,automaticChangeStatus:"pending"}:"MARK_AUTOMATIC_CHANGE_FINAL"===n.type&&"pending"===t.automaticChangeStatus?{...r,automaticChangeStatus:"final"}:r.blocks===t.blocks&&r.selection===t.selection||"final"!==r.automaticChangeStatus&&r.selection!==t.selection?r:{...r,automaticChangeStatus:void 0}):r}}(ai),ci=n(37392),ui=n(23353),di=(0,$.combineReducers)({formatTypes:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_FORMAT_TYPES":return{...e,...t.formatTypes.reduce(((e,t)=>({...e,[t.name]:t})),{})};case"REMOVE_FORMAT_TYPES":return Object.fromEntries(Object.entries(e).filter((e=>{let[n]=e;return!t.names.includes(n)})))}return e}});const pi=(0,Xe.Z)((e=>Object.values(e.formatTypes)),(e=>[e.formatTypes]));function mi(e,t){return e.formatTypes[t]}function fi(e,t){const n=pi(e);return n.find((e=>{let{className:n,tagName:r}=e;return null===n&&t===r}))||n.find((e=>{let{className:t,tagName:n}=e;return null===t&&"*"===n}))}function hi(e,t){return pi(e).find((e=>{let{className:n}=e;return null!==n&&` ${t} `.indexOf(` ${n} `)>=0}))}function gi(e){return{type:"ADD_FORMAT_TYPES",formatTypes:Array.isArray(e)?e:[e]}}function vi(e){return{type:"REMOVE_FORMAT_TYPES",names:Array.isArray(e)?e:[e]}}const bi=(0,W.Z)("core/rich-text",{reducer:di,selectors:l,actions:a});function yi(e,t){if(e===t)return!0;if(!e||!t)return!1;if(e.type!==t.type)return!1;const n=e.attributes,r=t.attributes;if(n===r)return!0;if(!n||!r)return!1;const o=Object.keys(n),i=Object.keys(r);if(o.length!==i.length)return!1;const l=o.length;for(let e=0;e<l;e++){const t=o[e];if(n[t]!==r[t])return!1}return!0}function _i(e){const t=e.formats.slice();return t.forEach(((e,n)=>{const r=t[n-1];if(r){const o=e.slice();o.forEach(((e,t)=>{const n=r[t];yi(e,n)&&(o[t]=n)})),t[n]=o}})),{...e,formats:t}}function ki(e,t,n){return(e=e.slice())[t]=n,e}function xi(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.start,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.end;const{formats:o,activeFormats:i}=e,l=o.slice();if(n===r){var a;const e=null===(a=l[n])||void 0===a?void 0:a.find((e=>{let{type:n}=e;return n===t.type}));if(e){const o=l[n].indexOf(e);for(;l[n]&&l[n][o]===e;)l[n]=ki(l[n],o,t),n--;for(r++;l[r]&&l[r][o]===e;)l[r]=ki(l[r],o,t),r++}}else{let e=1/0;for(let o=n;o<r;o++)if(l[o]){l[o]=l[o].filter((e=>{let{type:n}=e;return n!==t.type}));const n=l[o].length;n<e&&(e=n)}else l[o]=[],e=0;for(let o=n;o<r;o++)l[o].splice(e,0,t)}return _i({...e,formats:l,activeFormats:[...(null==i?void 0:i.filter((e=>{let{type:n}=e;return n!==t.type})))||[],t]})}function wi(e,t){let{implementation:n}=e;return wi.body||(wi.body=n.createHTMLDocument("").body),wi.body.innerHTML=t,wi.body}(0,$.register)(bi);const Ci="\u2028",Ei="";function Si(e){let t,{tagName:n,attributes:r}=e;if(r&&r.class&&(t=(0,$.select)(bi).getFormatTypeForClassName(r.class),t&&(r.class=` ${r.class} `.replace(` ${t.className} `," ").trim(),r.class||delete r.class)),t||(t=(0,$.select)(bi).getFormatTypeForBareElement(n)),!t)return r?{type:n,attributes:r}:{type:n};if(t.__experimentalCreatePrepareEditableTree&&!t.__experimentalCreateOnChangeEditableValue)return null;if(!r)return{type:t.name,tagName:n};const o={},i={},l={...r};for(const e in t.attributes){const n=t.attributes[e];o[e]=l[n],t.__unstableFilterAttributeValue&&(o[e]=t.__unstableFilterAttributeValue(e,o[e])),delete l[n],void 0===o[e]&&delete o[e]}for(const e in l)i[e]=r[e];return{type:t.name,tagName:n,attributes:o,unregisteredAttributes:i}}function Ii(){let{element:e,text:t,html:n,range:r,multilineTag:o,multilineWrapperTags:i,__unstableIsEditableTree:l,preserveWhiteSpace:a}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"string"==typeof t&&t.length>0?{formats:Array(t.length),replacements:Array(t.length),text:t}:("string"==typeof n&&n.length>0&&(e=wi(document,n)),"object"!=typeof e?{formats:[],replacements:[],text:""}:o?Ai({element:e,range:r,multilineTag:o,multilineWrapperTags:i,isEditableTree:l,preserveWhiteSpace:a}):Pi({element:e,range:r,isEditableTree:l,preserveWhiteSpace:a}))}function Ti(e,t,n,r){if(!n)return;const{parentNode:o}=t,{startContainer:i,startOffset:l,endContainer:a,endOffset:s}=n,c=e.text.length;void 0!==r.start?e.start=c+r.start:t===i&&t.nodeType===t.TEXT_NODE?e.start=c+l:o===i&&t===i.childNodes[l]?e.start=c:o===i&&t===i.childNodes[l-1]?e.start=c+r.text.length:t===i&&(e.start=c),void 0!==r.end?e.end=c+r.end:t===a&&t.nodeType===t.TEXT_NODE?e.end=c+s:o===a&&t===a.childNodes[s-1]?e.end=c+r.text.length:o===a&&t===a.childNodes[s]?e.end=c:t===a&&(e.end=c+s)}function Ni(e,t,n){if(!t)return;const{startContainer:r,endContainer:o}=t;let{startOffset:i,endOffset:l}=t;return e===r&&(i=n(e.nodeValue.slice(0,i)).length),e===o&&(l=n(e.nodeValue.slice(0,l)).length),{startContainer:r,startOffset:i,endContainer:o,endOffset:l}}function Bi(e){return e.replace(/[\n\r\t]+/g," ")}function Li(e){return e.replace(new RegExp("[\ufeff]","gu"),"")}function Pi(e){let{element:t,range:n,multilineTag:r,multilineWrapperTags:o,currentWrapperTags:i=[],isEditableTree:l,preserveWhiteSpace:a}=e;const s={formats:[],replacements:[],text:""};if(!t)return s;if(!t.hasChildNodes())return Ti(s,t,n,{formats:[],replacements:[],text:""}),s;const c=t.childNodes.length;for(let u=0;u<c;u++){const d=t.childNodes[u],p=d.nodeName.toLowerCase();if(d.nodeType===d.TEXT_NODE){let h=Li;a||(h=e=>Li(Bi(e)));const g=h(d.nodeValue);n=Ni(d,n,h),Ti(s,d,n,{text:g}),s.formats.length+=g.length,s.replacements.length+=g.length,s.text+=g;continue}if(d.nodeType!==d.ELEMENT_NODE)continue;if(l&&(d.getAttribute("data-rich-text-placeholder")||"br"===p&&!d.getAttribute("data-rich-text-line-break"))){Ti(s,d,n,{formats:[],replacements:[],text:""});continue}if("script"===p){const v={formats:[,],replacements:[{type:p,attributes:{"data-rich-text-script":d.getAttribute("data-rich-text-script")||encodeURIComponent(d.innerHTML)}}],text:Ei};Ti(s,d,n,v),Ri(s,v);continue}if("br"===p){Ti(s,d,n,{formats:[],replacements:[],text:""}),Ri(s,Ii({text:"\n"}));continue}const m=Si({tagName:p,attributes:Di({element:d})});if(o&&-1!==o.indexOf(p)){const b=Ai({element:d,range:n,multilineTag:r,multilineWrapperTags:o,currentWrapperTags:[...i,m],isEditableTree:l,preserveWhiteSpace:a});Ti(s,d,n,b),Ri(s,b);continue}const f=Pi({element:d,range:n,multilineTag:r,multilineWrapperTags:o,isEditableTree:l,preserveWhiteSpace:a});if(Ti(s,d,n,f),m)if(0===f.text.length)m.attributes&&Ri(s,{formats:[,],replacements:[m],text:Ei});else{function y(e){if(y.formats===e)return y.newFormats;const t=e?[m,...e]:[m];return y.formats=e,y.newFormats=t,t}y.newFormats=[m],Ri(s,{...f,formats:Array.from(f.formats,y)})}else Ri(s,f)}return s}function Ai(e){let{element:t,range:n,multilineTag:r,multilineWrapperTags:o,currentWrapperTags:i=[],isEditableTree:l,preserveWhiteSpace:a}=e;const s={formats:[],replacements:[],text:""};if(!t||!t.hasChildNodes())return s;const c=t.children.length;for(let e=0;e<c;e++){const c=t.children[e];if(c.nodeName.toLowerCase()!==r)continue;const u=Pi({element:c,range:n,multilineTag:r,multilineWrapperTags:o,currentWrapperTags:i,isEditableTree:l,preserveWhiteSpace:a});(0!==e||i.length>0)&&Ri(s,{formats:[,],replacements:i.length>0?[i]:[,],text:Ci}),Ti(s,c,n,u),Ri(s,u)}return s}function Di(e){let{element:t}=e;if(!t.hasAttributes())return;const n=t.attributes.length;let r;for(let e=0;e<n;e++){const{name:n,value:o}=t.attributes[e];0!==n.indexOf("data-rich-text-")&&(r=r||{},r[/^on/i.test(n)?"data-disable-rich-text-"+n:n]=o)}return r}function Ri(e,t){return e.formats=e.formats.concat(t.formats),e.replacements=e.replacements.concat(t.replacements),e.text+=t.text,e}function Mi(e){let{formats:t,start:n,end:r,activeFormats:o}=e,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(void 0===n)return i;if(n===r){if(o)return o;const e=t[n-1]||i,r=t[n]||i;return e.length<r.length?e:r}return t[n]||i}function Oi(e,t){var n;return null===(n=Mi(e))||void 0===n?void 0:n.find((e=>{let{type:n}=e;return n===t}))}const Zi=new RegExp("[\u2028]","g");function Fi(e){let{text:t}=e;return t.replace(Zi,(e=>e===Ei?"":"\n"))}function ji(e){let{start:t,end:n}=e;if(void 0!==t&&void 0!==n)return t===n}function zi(e){let{text:t}=e;return 0===t.length}function Hi(e){let{text:t,start:n,end:r}=e;return n===r&&(0===t.length||0===n&&t.slice(0,1)===Ci||n===t.length&&t.slice(-1)===Ci||"\u2028\u2028"===t.slice(n-1,r+1))}function Vi(e,t){if("string"==typeof(t={name:e,...t}).name)if(/^[a-z][a-z0-9-]*\/[a-z][a-z0-9-]*$/.test(t.name))if((0,$.select)(bi).getFormatType(t.name))window.console.error('Format "'+t.name+'" is already registered.');else if("string"==typeof t.tagName&&""!==t.tagName)if("string"==typeof t.className&&""!==t.className||null===t.className)if(/^[_a-zA-Z]+[a-zA-Z0-9-]*$/.test(t.className)){if(null===t.className){const e=(0,$.select)(bi).getFormatTypeForBareElement(t.tagName);if(e&&"core/unknown"!==e.name)return void window.console.error(`Format "${e.name}" is already registered to handle bare tag name "${t.tagName}".`)}else{const e=(0,$.select)(bi).getFormatTypeForClassName(t.className);if(e)return void window.console.error(`Format "${e.name}" is already registered to handle class name "${t.className}".`)}if("title"in t&&""!==t.title)if("keywords"in t&&t.keywords.length>3)window.console.error('The format "'+t.name+'" can have a maximum of 3 keywords.');else{if("string"==typeof t.title)return(0,$.dispatch)(bi).addFormatTypes(t),t;window.console.error("Format titles must be strings.")}else window.console.error('The format "'+t.name+'" must have a title.')}else window.console.error("A class name must begin with a letter, followed by any number of hyphens, letters, or numbers.");else window.console.error("Format class names must be a string, or null to handle bare elements.");else window.console.error("Format tag names must be a string.");else window.console.error("Format names must contain a namespace prefix, include only lowercase alphanumeric characters or dashes, and start with a letter. Example: my-plugin/my-custom-format");else window.console.error("Format names must be strings.")}function Wi(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.start,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.end;const{formats:o,activeFormats:i}=e,l=o.slice();if(n===r){var a;const e=null===(a=l[n])||void 0===a?void 0:a.find((e=>{let{type:n}=e;return n===t}));if(e){for(;null!==(s=l[n])&&void 0!==s&&s.find((t=>t===e));){var s;$i(l,n,t),n--}for(r++;null!==(c=l[r])&&void 0!==c&&c.find((t=>t===e));){var c;$i(l,r,t),r++}}}else for(let e=n;e<r;e++)l[e]&&$i(l,e,t);return _i({...e,formats:l,activeFormats:(null==i?void 0:i.filter((e=>{let{type:n}=e;return n!==t})))||[]})}function $i(e,t,n){const r=e[t].filter((e=>{let{type:t}=e;return t!==n}));r.length?e[t]=r:delete e[t]}function Ui(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.start,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.end;const{formats:o,replacements:i,text:l}=e;"string"==typeof t&&(t=Ii({text:t}));const a=n+t.text.length;return _i({formats:o.slice(0,n).concat(t.formats,o.slice(r)),replacements:i.slice(0,n).concat(t.replacements,i.slice(r)),text:l.slice(0,n)+t.text+l.slice(r),start:a,end:a})}function Gi(e,t,n){return Ui(e,Ii(),t,n)}function qi(e,t,n){let{formats:r,replacements:o,text:i,start:l,end:a}=e;return i=i.replace(t,(function(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),s=1;s<t;s++)i[s-1]=arguments[s];const c=i[i.length-2];let u,d,p=n;return"function"==typeof p&&(p=n(e,...i)),"object"==typeof p?(u=p.formats,d=p.replacements,p=p.text):(u=Array(p.length),d=Array(p.length),r[c]&&(u=u.fill(r[c]))),r=r.slice(0,c).concat(u,r.slice(c+e.length)),o=o.slice(0,c).concat(d,o.slice(c+e.length)),l&&(l=a=c+p.length),p})),_i({formats:r,replacements:o,text:i,start:l,end:a})}function Ki(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.start,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.end;const{formats:r,replacements:o,text:i}=e;return void 0===t||void 0===n?{...e}:{formats:r.slice(t,n),replacements:o.slice(t,n),text:i.slice(t,n)}}function Yi(e,t){let{formats:n,replacements:r,text:o,start:i,end:l}=e;if("string"!=typeof t)return Xi(...arguments);let a=0;return o.split(t).map((e=>{const o=a,s={formats:n.slice(o,o+e.length),replacements:r.slice(o,o+e.length),text:e};return a+=t.length+e.length,void 0!==i&&void 0!==l&&(i>=o&&i<a?s.start=i-o:i<o&&l>o&&(s.start=0),l>=o&&l<a?s.end=l-o:i<a&&l>a&&(s.end=e.length)),s}))}function Xi(e){let{formats:t,replacements:n,text:r,start:o,end:i}=e,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i;if(void 0===o||void 0===i)return;const s={formats:t.slice(0,l),replacements:n.slice(0,l),text:r.slice(0,l)},c={formats:t.slice(a),replacements:n.slice(a),text:r.slice(a),start:0,end:0};return[qi(s,/\u2028+$/,""),qi(c,/^\u2028+/,"")]}var Ji=n(7969);function Qi(e,t){if(t)return e;const n={};for(const t in e){let r=t;t.startsWith("data-disable-rich-text-")&&(r=t.slice("data-disable-rich-text-".length)),n[r]=e[t]}return n}function el(e){let{type:t,tagName:n,attributes:r,unregisteredAttributes:o,object:i,boundaryClass:l,isEditableTree:a}=e;const s=(c=t,(0,$.select)(bi).getFormatType(c));var c;let u={};if(l&&(u["data-rich-text-format-boundary"]="true"),!s)return r&&(u={...r,...u}),{type:t,attributes:Qi(u,a),object:i};u={...o,...u};for(const e in r){const t=!!s.attributes&&s.attributes[e];t?u[t]=r[e]:u[e]=r[e]}return s.className&&(u.class?u.class=`${s.className} ${u.class}`:u.class=s.className),{type:"*"===s.tagName?n:s.tagName,object:s.object,attributes:Qi(u,a)}}function tl(e,t,n){do{if(e[n]!==t[n])return!1}while(n--);return!0}function nl(e){let{value:t,multilineTag:n,preserveWhiteSpace:r,createEmpty:o,append:i,getLastChild:l,getParent:a,isText:s,getText:c,remove:u,appendText:d,onStartIndex:p,onEndIndex:m,isEditableTree:f,placeholder:h}=e;const{formats:g,replacements:v,text:b,start:y,end:_}=t,k=g.length+1,x=o(),w={type:n},C=Mi(t),E=C[C.length-1];let S,I,T;n?(i(i(x,{type:n}),""),I=S=[w]):i(x,"");for(let e=0;e<k;e++){const t=b.charAt(e),o=f&&(!T||T===Ci||"\n"===T);let k=g[e];n&&(k=t===Ci?S=(v[e]||[]).reduce(((e,t)=>(e.push(t,w),e)),[w]):[...S,...k||[]]);let C=l(x);if(o&&t===Ci){let e=C;for(;!s(e);)e=l(e);i(a(e),"\ufeff")}if(T===Ci){let t=C;for(;!s(t);)t=l(t);p&&y===e&&p(x,t),m&&_===e&&m(x,t)}var N;if(k&&k.forEach(((e,n)=>{if(C&&I&&tl(k,I,n)&&(t!==Ci||k.length-1!==n))return void(C=l(C));const{type:r,tagName:o,attributes:d,unregisteredAttributes:p}=e,m=f&&t!==Ci&&e===E,h=a(C),g=i(h,el({type:r,tagName:o,attributes:d,unregisteredAttributes:p,boundaryClass:m,isEditableTree:f}));s(C)&&0===c(C).length&&u(C),C=i(g,"")})),t!==Ci)0===e&&(p&&0===y&&p(x,C),m&&0===_&&m(x,C)),t===Ei?(f||"script"!==(null===(N=v[e])||void 0===N?void 0:N.type)?C=i(a(C),el({...v[e],object:!0,isEditableTree:f})):(C=i(a(C),el({type:"script",isEditableTree:f})),i(C,{html:decodeURIComponent(v[e].attributes["data-rich-text-script"])})),C=i(a(C),"")):r||"\n"!==t?s(C)?d(C,t):C=i(a(C),t):(C=i(a(C),{type:"br",attributes:f?{"data-rich-text-line-break":"true"}:void 0,object:!0}),C=i(a(C),"")),p&&y===e+1&&p(x,C),m&&_===e+1&&m(x,C),o&&e===b.length&&(i(a(C),"\ufeff"),h&&0===b.length&&i(a(C),{type:"span",attributes:{"data-rich-text-placeholder":h,contenteditable:"false",style:"pointer-events:none;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;"}})),I=k,T=t;else I=k,T=t}return x}function rl(e){let{value:t,multilineTag:n,preserveWhiteSpace:r}=e;return ml(nl({value:t,multilineTag:n,preserveWhiteSpace:r,createEmpty:ol,append:ll,getLastChild:il,getParent:sl,isText:cl,getText:ul,remove:dl,appendText:al}).children)}function ol(){return{}}function il(e){let{children:t}=e;return t&&t[t.length-1]}function ll(e,t){return"string"==typeof t&&(t={text:t}),t.parent=e,e.children=e.children||[],e.children.push(t),t}function al(e,t){e.text+=t}function sl(e){let{parent:t}=e;return t}function cl(e){let{text:t}=e;return"string"==typeof t}function ul(e){let{text:t}=e;return t}function dl(e){const t=e.parent.children.indexOf(e);return-1!==t&&e.parent.children.splice(t,1),e}function pl(e){let{type:t,attributes:n,object:r,children:o}=e,i="";for(const e in n)(0,Ji.$b)(e)&&(i+=` ${e}="${(0,Ji.kb)(n[e])}"`);return r?`<${t}${i}>`:`<${t}${i}>${ml(o)}</${t}>`}function ml(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map((e=>void 0!==e.html?e.html:void 0===e.text?pl(e):(0,Ji.N2)(e.text))).join("")}var fl=n(15439);function hl(e,t){return Oi(e,t.type)?(t.title&&(0,fl.D)((0,N.sprintf)((0,N.__)("%s removed."),t.title),"assertive"),Wi(e,t.type)):(t.title&&(0,fl.D)((0,N.sprintf)((0,N.__)("%s applied."),t.title),"assertive"),xi(e,t))}function gl(e){let{editableContentElement:t,value:n,settings:r={}}=e;const{tagName:o,className:i,name:l}=r,a=l?Oi(n,l):void 0;return(0,v.useMemo)((()=>{if(!t)return;const{ownerDocument:{defaultView:e}}=t,n=e.getSelection();if(!n.rangeCount)return;const r=null==t?void 0:t.contains(null==n?void 0:n.anchorNode),l=n.getRangeAt(0);if(!a)return{ownerDocument:l.startContainer.ownerDocument,getBoundingClientRect:()=>r?l.getBoundingClientRect():t.getBoundingClientRect()};let s=l.startContainer;for(s=s.nextElementSibling||s;s.nodeType!==s.ELEMENT_NODE;)s=s.parentNode;return s.closest(o+(i?"."+i:""))}),[t,a,n.start,n.end,o,i])}var vl=n(90552),bl=n(23889),yl=n(10962);function _l(e,t,n){const r=e.parentNode;let o=0;for(;e=e.previousSibling;)o++;return n=[o,...n],r!==t&&(n=_l(r,t,n)),n}function kl(e,t){for(t=[...t];e&&t.length>1;)e=e.childNodes[t.shift()];return{node:e,offset:t[0]}}function xl(e,t){"string"==typeof t&&(t=e.ownerDocument.createTextNode(t));const{type:n,attributes:r}=t;if(n){t=e.ownerDocument.createElement(n);for(const e in r)t.setAttribute(e,r[e])}return e.appendChild(t)}function wl(e,t){e.appendData(t)}function Cl(e){let{lastChild:t}=e;return t}function El(e){let{parentNode:t}=e;return t}function Sl(e){return e.nodeType===e.TEXT_NODE}function Il(e){let{nodeValue:t}=e;return t}function Tl(e){return e.parentNode.removeChild(e)}function Nl(e){let{value:t,current:n,multilineTag:r,prepareEditableTree:o,__unstableDomOnly:i,placeholder:l}=e;const{body:a,selection:s}=function(e){let{value:t,multilineTag:n,prepareEditableTree:r,isEditableTree:o=!0,placeholder:i,doc:l=document}=e,a=[],s=[];r&&(t={...t,formats:r(t)});const c=nl({value:t,multilineTag:n,createEmpty:()=>wi(l,""),append:xl,getLastChild:Cl,getParent:El,isText:Sl,getText:Il,remove:Tl,appendText:wl,onStartIndex(e,t){a=_l(t,e,[t.nodeValue.length])},onEndIndex(e,t){s=_l(t,e,[t.nodeValue.length])},isEditableTree:o,placeholder:i});return{body:c,selection:{startPath:a,endPath:s}}}({value:t,multilineTag:r,prepareEditableTree:o,placeholder:l,doc:n.ownerDocument});Bl(a,n),void 0===t.start||i||function(e,t){let{startPath:n,endPath:r}=e;const{node:o,offset:i}=kl(t,n),{node:l,offset:a}=kl(t,r),{ownerDocument:s}=t,{defaultView:c}=s,u=c.getSelection(),d=s.createRange();d.setStart(o,i),d.setEnd(l,a);const{activeElement:p}=s;if(u.rangeCount>0){if(function(e,t){return e.startContainer===t.startContainer&&e.startOffset===t.startOffset&&e.endContainer===t.endContainer&&e.endOffset===t.endOffset}(d,u.getRangeAt(0)))return;u.removeAllRanges()}u.addRange(d),p!==s.activeElement&&p instanceof c.HTMLElement&&p.focus()}(s,n)}function Bl(e,t){let n,r=0;for(;n=e.firstChild;){const o=t.childNodes[r];if(o)if(o.isEqualNode(n))e.removeChild(n);else if(o.nodeName!==n.nodeName||o.nodeType===o.TEXT_NODE&&o.data!==n.data)t.replaceChild(n,o);else{const t=o.attributes,r=n.attributes;if(t){let e=t.length;for(;e--;){const{name:r}=t[e];n.getAttribute(r)||o.removeAttribute(r)}}if(r)for(let e=0;e<r.length;e++){const{name:t,value:n}=r[e];o.getAttribute(t)!==n&&o.setAttribute(t,n)}Bl(n,o),e.removeChild(n)}else t.appendChild(n);r++}for(;t.childNodes[r];)t.removeChild(t.childNodes[r])}function Ll(e){let{record:t}=e;const n=(0,v.useRef)(),{activeFormats:r=[]}=t.current;return(0,v.useEffect)((()=>{if(!r||!r.length)return;const e="*[data-rich-text-format-boundary]",t=n.current.querySelector(e);if(!t)return;const{ownerDocument:o}=t,{defaultView:i}=o,l=`.rich-text:focus ${e} {background-color: ${i.getComputedStyle(t).color.replace(")",", 0.2)").replace("rgb","rgba")}}`,a="rich-text-boundary-style";let s=o.getElementById(a);s||(s=o.createElement("style"),s.id=a,o.head.appendChild(s)),s.innerHTML!==l&&(s.innerHTML=l)}),[r]),n}function Pl(e){const t=(0,v.useRef)(e);return t.current=e,(0,bl.Z)((e=>{function n(n){const{record:r,multilineTag:o,preserveWhiteSpace:i}=t.current;if(ji(r.current)||!e.contains(e.ownerDocument.activeElement))return;const l=Ki(r.current),a=Fi(l),s=rl({value:l,multilineTag:o,preserveWhiteSpace:i});n.clipboardData.setData("text/plain",a),n.clipboardData.setData("text/html",s),n.clipboardData.setData("rich-text","true"),n.clipboardData.setData("rich-text-multi-line-tag",o||""),n.preventDefault()}return e.addEventListener("copy",n),()=>{e.removeEventListener("copy",n)}}),[])}var Al=n(50899);const Dl=[];function Rl(e){const[,t]=(0,v.useReducer)((()=>({}))),n=(0,v.useRef)(e);return n.current=e,(0,bl.Z)((e=>{function r(r){const{keyCode:o,shiftKey:i,altKey:l,metaKey:a,ctrlKey:s}=r;if(i||l||a||s||o!==Al.LEFT&&o!==Al.RIGHT)return;const{record:c,applyRecord:u}=n.current,{text:d,formats:p,start:m,end:f,activeFormats:h=[]}=c.current,g=ji(c.current),{ownerDocument:v}=e,{defaultView:b}=v,{direction:y}=b.getComputedStyle(e),_="rtl"===y?Al.RIGHT:Al.LEFT,k=r.keyCode===_;if(g&&0===h.length){if(0===m&&k)return;if(f===d.length&&!k)return}if(!g)return;const x=p[m-1]||Dl,w=p[m]||Dl,C=k?x:w,E=h.every(((e,t)=>e===C[t]));let S=h.length;if(E?S<C.length&&S++:S--,S===h.length)return void(c.current._newActiveFormats=C);r.preventDefault();const I=(E?C:k?w:x).slice(0,S),T={...c.current,activeFormats:I};c.current=T,u(T),t()}return e.addEventListener("keydown",r),()=>{e.removeEventListener("keydown",r)}}),[])}const Ml=new Set(["insertParagraph","insertOrderedList","insertUnorderedList","insertHorizontalRule","insertLink"]),Ol=[],Zl="data-rich-text-placeholder";function Fl(e){const t=(0,v.useRef)(e);return t.current=e,(0,bl.Z)((e=>{const{ownerDocument:n}=e,{defaultView:r}=n;let o=!1;function i(e){if(o)return;let n;e&&(n=e.inputType);const{record:r,applyRecord:i,createRecord:l,handleChange:a}=t.current;if(n&&(0===n.indexOf("format")||Ml.has(n)))return void i(r.current);const s=l(),{start:c,activeFormats:u=[]}=r.current,d=function(e){let{value:t,start:n,end:r,formats:o}=e;const i=Math.min(n,r),l=Math.max(n,r),a=t.formats[i-1]||[],s=t.formats[l]||[];for(t.activeFormats=o.map(((e,t)=>{if(a[t]){if(yi(e,a[t]))return a[t]}else if(s[t]&&yi(e,s[t]))return s[t];return e}));--r>=n;)t.activeFormats.length>0?t.formats[r]=t.activeFormats:delete t.formats[r];return t}({value:s,start:c,end:s.start,formats:u});a(d)}function l(){const{record:l,applyRecord:a,createRecord:s,onSelectionChange:c}=t.current;if("true"!==e.contentEditable)return;if(n.activeElement!==e){if("true"!==n.activeElement.contentEditable)return;if(!n.activeElement.contains(e))return;const t=r.getSelection(),{anchorNode:o,focusNode:i}=t;if(e.contains(o)&&e!==o&&e.contains(i)&&e!==i){const{start:e,end:t}=s();l.current.activeFormats=Ol,c(e,t)}else if(e.contains(o)&&e!==o){const{start:e,end:t=e}=s();l.current.activeFormats=Ol,c(t)}else if(e.contains(i)){const{start:e,end:t=e}=s();l.current.activeFormats=Ol,c(void 0,t)}return}if(o)return;const{start:u,end:d,text:p}=s(),m=l.current;if(p!==m.text)return void i();if(u===m.start&&d===m.end)return void(0===m.text.length&&0===u&&function(e){const t=e.getSelection(),{anchorNode:n,anchorOffset:r}=t;if(n.nodeType!==n.ELEMENT_NODE)return;const o=n.childNodes[r];o&&o.nodeType===o.ELEMENT_NODE&&o.hasAttribute(Zl)&&t.collapseToStart()}(r));const f={...m,start:u,end:d,activeFormats:m._newActiveFormats,_newActiveFormats:void 0},h=Mi(f,Ol);f.activeFormats=h,l.current=f,a(f,{domOnly:!0}),c(u,d)}function a(){var t;o=!0,n.removeEventListener("selectionchange",l),null===(t=e.querySelector(`[${Zl}]`))||void 0===t||t.remove()}function s(){o=!1,i({inputType:"insertText"}),n.addEventListener("selectionchange",l)}function c(){const{record:n,isSelected:r,onSelectionChange:o,applyRecord:i}=t.current;if(!e.parentElement.closest('[contenteditable="true"]'))if(r)i(n.current),o(n.current.start,n.current.end);else{const e=void 0;n.current={...n.current,start:e,end:e,activeFormats:Ol}}}return e.addEventListener("input",i),e.addEventListener("compositionstart",a),e.addEventListener("compositionend",s),e.addEventListener("focus",c),n.addEventListener("selectionchange",l),()=>{e.removeEventListener("input",i),e.removeEventListener("compositionstart",a),e.removeEventListener("compositionend",s),e.removeEventListener("focus",c),n.removeEventListener("selectionchange",l)}}),[])}function jl(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const{replacements:n,text:r,start:o,end:i}=e,l=ji(e);let a,s=o-1,c=l?o-1:o,u=i;if(t||(s=i,c=o,u=l?i+1:i),r[s]===Ci){if(l&&n[s]&&n[s].length){const t=n.slice();t[s]=n[s].slice(0,-1),a={...e,replacements:t}}else a=Gi(e,c,u);return a}}function zl(e){const t=(0,v.useRef)(e);return t.current=e,(0,bl.Z)((e=>{function n(e){const{keyCode:n}=e,{createRecord:r,handleChange:o,multilineTag:i}=t.current;if(e.defaultPrevented)return;if(n!==Al.DELETE&&n!==Al.BACKSPACE)return;const l=r(),{start:a,end:s,text:c}=l,u=n===Al.BACKSPACE;if(0===a&&0!==s&&s===c.length)return o(Gi(l)),void e.preventDefault();if(i){let t;t=u&&0===l.start&&0===l.end&&Hi(l)?jl(l,!u):jl(l,u),t&&(o(t),e.preventDefault())}}return e.addEventListener("keydown",n),()=>{e.removeEventListener("keydown",n)}}),[])}function Hl(e){const{multiline:t,__unstableMultilineWrapperTags:n,__unstablePreserveWhiteSpace:r}=e;return{multilineTag:t,multilineWrapperTags:n,preserveWhiteSpace:r}}const Vl=(e,t,n)=>(r,o)=>{let i,l;if("function"==typeof e?(i=e(r),l=e(o)):(i=r[e],l=o[e]),i>l)return"asc"===n?1:-1;if(l>i)return"asc"===n?-1:1;const a=t.findIndex((e=>e===r)),s=t.findIndex((e=>e===o));return a>s?1:s>a?-1:0};function Wl(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"asc";return e.concat().sort(Vl(t,e,n))}const $l=[],Ul=new Set;function Gl(e,t){const n=e.blocks.byClientId.get(t),r="core/social-link";if("web"!==ci.Z.OS&&(null==n?void 0:n.name)===r){const n=e.blocks.attributes.get(t),{service:o}=null!=n?n:{};return o?`core/social-link-${o}`:r}return n?n.name:null}function ql(e,t){const n=e.blocks.byClientId.get(t);return!!n&&n.isValid}function Kl(e,t){return e.blocks.byClientId.get(t)?e.blocks.attributes.get(t):null}function Yl(e,t){return e.blocks.byClientId.has(t)?e.blocks.tree.get(t):null}const Xl=(0,Xe.Z)(((e,t)=>e.blocks.byClientId.has(t)?{...e.blocks.byClientId.get(t),attributes:Kl(e,t)}:null),((e,t)=>[e.blocks.byClientId.get(t),e.blocks.attributes.get(t)]));function Jl(e,t){var n;const r=t&&Us(e,t)?"controlled||"+t:t||"";return(null===(n=e.blocks.tree.get(r))||void 0===n?void 0:n.innerBlocks)||$l}const Ql=(0,Xe.Z)(((e,t)=>({clientId:t,innerBlocks:ea(e,t)})),(e=>[e.blocks.order])),ea=(0,Xe.Z)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return ja(e,t).map((t=>Ql(e,t)))}),(e=>[e.blocks.order])),ta=(0,Xe.Z)(((e,t)=>{const n=[];for(const r of t)for(const t of ja(e,r))n.push(t,...ta(e,[t]));return n}),(e=>[e.blocks.order])),na=(0,Xe.Z)((e=>{const t=[];for(const n of ja(e))t.push(n,...ta(e,[n]));return t}),(e=>[e.blocks.order])),ra=(0,Xe.Z)(((e,t)=>{const n=na(e);return t?n.reduce(((n,r)=>e.blocks.byClientId.get(r).name===t?n+1:n),0):n.length}),(e=>[e.blocks.order,e.blocks.byClientId])),oa=(0,Xe.Z)(((e,t)=>{if(!t)return $l;const n=na(e).filter((n=>e.blocks.byClientId.get(n).name===t));return n.length>0?n:$l}),(e=>[e.blocks.order,e.blocks.byClientId])),ia=(0,Xe.Z)(((e,t)=>(Array.isArray(t)?t:[t]).map((t=>Yl(e,t)))),((e,t)=>(Array.isArray(t)?t:[t]).map((t=>e.blocks.tree.get(t))))),la=(0,Xe.Z)(((e,t)=>ia(e,t).filter(Boolean).map((e=>e.name))),((e,t)=>ia(e,t)));function aa(e,t){return ja(e,t).length}function sa(e){return e.selection.selectionStart}function ca(e){return e.selection.selectionEnd}function ua(e){return e.selection.selectionStart.clientId}function da(e){return e.selection.selectionEnd.clientId}function pa(e){return Sa(e).length||(e.selection.selectionStart.clientId?1:0)}function ma(e){const{selectionStart:t,selectionEnd:n}=e.selection;return!!t.clientId&&t.clientId===n.clientId}function fa(e){const{selectionStart:t,selectionEnd:n}=e.selection,{clientId:r}=t;return r&&r===n.clientId?r:null}function ha(e){const t=fa(e);return t?Yl(e,t):null}function ga(e,t){return e.blocks.parents.has(t)?e.blocks.parents.get(t):null}const va=(0,Xe.Z)((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=[];let o=t;for(;e.blocks.parents.get(o);)o=e.blocks.parents.get(o),r.push(o);return r.length?n?r:r.reverse():$l}),(e=>[e.blocks.parents])),ba=(0,Xe.Z)((function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const o=va(e,t,r);return o.map((t=>({id:t,name:Gl(e,t)}))).filter((e=>{let{name:t}=e;return Array.isArray(n)?n.includes(t):t===n})).map((e=>{let{id:t}=e;return t}))}),(e=>[e.blocks.parents]));function ya(e,t){let n,r=t;do{n=r,r=e.blocks.parents.get(r)}while(r);return n}function _a(e,t){const n=fa(e),r=[...va(e,t),t],o=[...va(e,n),n];let i;const l=Math.min(r.length,o.length);for(let e=0;e<l&&r[e]===o[e];e++)i=r[e];return i}function ka(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(void 0===t&&(t=fa(e)),void 0===t&&(t=n<0?Ta(e):Na(e)),!t)return null;const r=ga(e,t);if(null===r)return null;const{order:o}=e.blocks,i=o.get(r),l=i.indexOf(t),a=l+1*n;return a<0||a===i.length?null:i[a]}function xa(e,t){return ka(e,t,-1)}function wa(e,t){return ka(e,t,1)}function Ca(e){return e.initialPosition}const Ea=(0,Xe.Z)((e=>{const{selectionStart:t,selectionEnd:n}=e.selection;if(!t.clientId||!n.clientId)return $l;if(t.clientId===n.clientId)return[t.clientId];const r=ga(e,t.clientId);if(null===r)return $l;const o=ja(e,r),i=o.indexOf(t.clientId),l=o.indexOf(n.clientId);return i>l?o.slice(l,i+1):o.slice(i,l+1)}),(e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]));function Sa(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?$l:Ea(e)}const Ia=(0,Xe.Z)((e=>{const t=Sa(e);return t.length?t.map((t=>Yl(e,t))):$l}),(e=>[...Ea.getDependants(e),e.blocks.byClientId,e.blocks.order,e.blocks.attributes]));function Ta(e){return Sa(e)[0]||null}function Na(e){const t=Sa(e);return t[t.length-1]||null}function Ba(e,t){return Ta(e)===t}function La(e,t){return-1!==Sa(e).indexOf(t)}const Pa=(0,Xe.Z)(((e,t)=>{let n=t,r=!1;for(;n&&!r;)n=ga(e,n),r=La(e,n);return r}),(e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]));function Aa(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:t.clientId||null}function Da(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:n.clientId||null}function Ra(e){const t=sa(e),n=ca(e);return!t.attributeKey&&!n.attributeKey&&void 0===t.offset&&void 0===n.offset}function Ma(e){const t=sa(e),n=ca(e);return!!t&&!!n&&t.clientId===n.clientId&&t.attributeKey===n.attributeKey&&t.offset===n.offset}function Oa(e){return Ea(e).some((t=>!pe(Gl(e,t)).merge))}function Za(e,t){const n=sa(e),r=ca(e);if(n.clientId===r.clientId)return!1;if(!n.attributeKey||!r.attributeKey||void 0===n.offset||void 0===r.offset)return!1;const o=ga(e,n.clientId);if(o!==ga(e,r.clientId))return!1;const i=ja(e,o);let l,a;i.indexOf(n.clientId)>i.indexOf(r.clientId)?(l=r,a=n):(l=n,a=r);const s=t?a.clientId:l.clientId,c=t?l.clientId:a.clientId,u=Gl(e,s);if(!pe(u).merge)return!1;const d=Yl(e,c);if(d.name===u)return!0;const p=Pe(d,u);return p&&p.length}const Fa=e=>{const t=sa(e),n=ca(e);if(t.clientId===n.clientId)return $l;if(!t.attributeKey||!n.attributeKey||void 0===t.offset||void 0===n.offset)return $l;const r=ga(e,t.clientId);if(r!==ga(e,n.clientId))return $l;const o=ja(e,r),i=o.indexOf(t.clientId),l=o.indexOf(n.clientId),[a,s]=i>l?[n,t]:[t,n],c=Yl(e,a.clientId),u=pe(c.name),d=Yl(e,s.clientId),p=pe(d.name),m=c.attributes[a.attributeKey],f=d.attributes[s.attributeKey],h=u.attributes[a.attributeKey],g=p.attributes[s.attributeKey];let v=Ii({html:m,...Hl(h)}),b=Ii({html:f,...Hl(g)});return v=Gi(v,0,a.offset),b=Gi(b,s.offset,b.text.length),[{...c,attributes:{...c.attributes,[a.attributeKey]:rl({value:v,...Hl(h)})}},{...d,attributes:{...d.attributes,[s.attributeKey]:rl({value:b,...Hl(g)})}}]};function ja(e,t){return e.blocks.order.get(t||"")||$l}function za(e,t){return ja(e,ga(e,t)).indexOf(t)}function Ha(e,t){const{selectionStart:n,selectionEnd:r}=e.selection;return n.clientId===r.clientId&&n.clientId===t}function Va(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return ja(e,t).some((t=>Ha(e,t)||La(e,t)||n&&Va(e,t,n)))}function Wa(e,t){if(!t)return!1;const n=Sa(e),r=n.indexOf(t);return r>-1&&r<n.length-1}function $a(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId!==n.clientId}function Ua(e){return e.isMultiSelecting}function Ga(e){return e.isSelectionEnabled}function qa(e,t){return e.blocksMode[t]||"visual"}function Ka(e){return e.isTyping}function Ya(e){return!!e.draggedBlocks.length}function Xa(e){return e.draggedBlocks}function Ja(e,t){return e.draggedBlocks.includes(t)}function Qa(e,t){return!!Ya(e)&&va(e,t).some((t=>Ja(e,t)))}function es(){return(0,St.default)('wp.data.select( "core/block-editor" ).isCaretWithinFormattedText',{since:"6.1",version:"6.3"}),!1}const ts=(0,Xe.Z)((e=>{let t,n;const{insertionPoint:r,selection:{selectionEnd:o}}=e;if(null!==r)return r;const{clientId:i}=o;return i?(t=ga(e,i)||void 0,n=za(e,o.clientId)+1):n=ja(e).length,{rootClientId:t,index:n}}),(e=>[e.insertionPoint,e.selection.selectionEnd.clientId,e.blocks.parents,e.blocks.order]));function ns(e){return null!==e.insertionPoint}function rs(e){return e.template.isValid}function os(e){return e.settings.template}function is(e,t){var n,r,o;return t?null!==(n=null===(r=As(e,t))||void 0===r?void 0:r.templateLock)&&void 0!==n&&n:null!==(o=e.settings.templateLock)&&void 0!==o&&o}const ls=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return"boolean"==typeof e?e:Array.isArray(e)?!(!e.includes("core/post-content")||null!==t)||e.includes(t):n},as=function(e,t){let n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(t&&"object"==typeof t?(n=t,t=n.name):n=pe(t),!n)return!1;const{allowedBlockTypes:o}=Ds(e),i=ls(o,t,!0);if(!i)return!1;const l=!!is(e,r);if(l)return!1;const a=As(e,r);if(r&&void 0===a)return!1;const s=null==a?void 0:a.allowedBlocks,c=ls(s,t),u=n.parent,d=Gl(e,r),p=ls(u,d);let m=!0;const f=n.ancestor;f&&(m=[r,...va(e,r)].some((t=>ls(f,Gl(e,t)))));const h=m&&(null===c&&null===p||!0===c||!0===p);return h?(0,_e.O)("blockEditor.__unstableCanInsertBlockType",h,n,r,{getBlock:Yl.bind(null,e),getBlockParentsByBlockName:ba.bind(null,e)}):h},ss=(0,Xe.Z)(as,((e,t,n)=>[e.blockListSettings[n],e.blocks.byClientId.get(n),e.settings.allowedBlockTypes,e.settings.templateLock]));function cs(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((t=>ss(e,Gl(e,t),n)))}function us(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const r=Kl(e,t);if(null===r)return!0;const{lock:o}=r,i=!!is(e,n);return void 0===o||void 0===(null==o?void 0:o.remove)?!i:!(null!=o&&o.remove)}function ds(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((t=>us(e,t,n)))}function ps(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const r=Kl(e,t);if(null===r)return;const{lock:o}=r,i="all"===is(e,n);return void 0===o||void 0===(null==o?void 0:o.move)?!i:!(null!=o&&o.move)}function ms(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((t=>ps(e,t,n)))}function fs(e,t){const n=Kl(e,t);if(null===n)return!0;const{lock:r}=n;return!(null!=r&&r.edit)}function hs(e,t){var n;return!!he(t,"lock",!0)&&!(null===(n=e.settings)||void 0===n||!n.canLockBlocks)}function gs(e,t){var n,r;return null!==(n=null===(r=e.preferences.insertUsage)||void 0===r?void 0:r[t])&&void 0!==n?n:null}const vs=(e,t,n)=>!!he(t,"inserter",!0)&&as(e,t.name,n),bs=(e,t)=>n=>{const r=`${t.id}/${n.name}`,{time:o,count:i=0}=gs(e,r)||{};return{...t,id:r,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:ys(o,i)}},ys=(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}},_s=(e,t)=>{let{buildScope:n="inserter"}=t;return t=>{const r=t.name;let o=!1;he(t.name,"multiple",!0)||(o=ia(e,na(e)).some((e=>{let{name:n}=e;return n===t.name})));const{time:i,count:l=0}=gs(e,r)||{},a={id:r,name:t.name,title:t.title,icon:t.icon,isDisabled:o,frecency:ys(i,l)};if("transform"===n)return a;const s=be(t.name,"inserter");return{...a,initialAttributes:{},description:t.description,category:t.category,keywords:t.keywords,variations:s,example:t.example,utility:1}}},ks=(0,Xe.Z)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=_s(e,{buildScope:"inserter"}),r=/^\s*<!--\s+(\/)?wp:([a-z][a-z0-9_-]*\/)?([a-z][a-z0-9_-]*)\s+({(?:(?=([^}]+|}+(?=})|(?!}\s+\/?-->)[^])*)\5|[^]*?)}\s+)?(\/)?-->/,o=t=>{let n=ui.Z;if("web"===ci.Z.OS){const e=("string"==typeof t.content.raw?t.content.raw:t.content).match(r);if(e){const[,,t="core/",r]=e,o=pe(t+r);o&&(n=o.icon)}}const o=`core/block/${t.id}`,{time:i,count:l=0}=gs(e,o)||{},a=ys(i,l);return{id:o,name:"core/block",initialAttributes:{ref:t.id},title:t.title.raw,icon:n,category:"reusable",keywords:[],isDisabled:!1,utility:1,frecency:a}},i=me().filter((n=>vs(e,n,t))).map(n),l=as(e,"core/block",t)?js(e).map(o):[],a=i.reduce(((t,n)=>{const{variations:r=[]}=n;if(r.some((e=>{let{isDefault:t}=e;return t}))||t.push(n),r.length){const o=bs(e,n);t.push(...r.map(o))}return t}),[]),s=(e,t)=>{const{core:n,noncore:r}=e;return(t.name.startsWith("core/")?n:r).push(t),e},{core:c,noncore:u}=a.reduce(s,{core:[],noncore:[]}),d=[...c,...u];return[...d,...l]}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.blocks.order,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,js(e),me()])),xs=(0,Xe.Z)((function(e,t){var n;let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const o=Array.isArray(t)?t:[t],[i]=o,l=_s(e,{buildScope:"transform"}),a=me().filter((t=>vs(e,t,r))).map(l),s=Object.fromEntries(Object.entries(a).map((e=>{let[,t]=e;return[t.name,t]})));s["*"]={frecency:1/0,id:"*",isDisabled:!1,name:"*",title:(0,N.__)("Unwrap"),icon:null===(n=s[null==i?void 0:i.name])||void 0===n?void 0:n.icon};const c=Te(o).reduce(((e,t)=>("*"===t?e.push(s["*"]):s[null==t?void 0:t.name]&&e.push(s[t.name]),e)),[]);return Wl(c,(e=>s[e.name].frecency),"desc")}),((e,t,n)=>[e.blockListSettings[n],e.blocks.byClientId,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,me()])),ws=(0,Xe.Z)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=me().some((n=>vs(e,n,t)));if(n)return!0;const r=as(e,"core/block",t)&&js(e).length>0;return r}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,js(e),me()])),Cs=(0,Xe.Z)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(t)return me().filter((n=>vs(e,n,t)))}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,me()])),Es=(0,Xe.Z)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return(0,St.default)('wp.data.select( "core/block-editor" ).__experimentalGetAllowedBlocks',{alternative:'wp.data.select( "core/block-editor" ).getAllowedBlocks',since:"6.2",version:"6.4"}),Cs(e,t)}),((e,t)=>[...Cs.getDependants(e,t)])),Ss=(0,Xe.Z)((function(e){var t,n;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!r)return;const o=null===(t=e.blockListSettings[r])||void 0===t?void 0:t.__experimentalDefaultBlock,i=null===(n=e.blockListSettings[r])||void 0===n?void 0:n.__experimentalDirectInsert;return o&&i?"function"==typeof i?i(Yl(e,r))?o:null:o:void 0}),((e,t)=>[e.blockListSettings[t],e.blocks.tree.get(t)])),Is=(0,Xe.Z)(((e,t)=>{const n=e.settings.__experimentalBlockPatterns.find((e=>{let{name:n}=e;return n===t}));return n?{...n,blocks:Br(n.content,{__unstableSkipMigrationLogs:!0})}:null}),(e=>[e.settings.__experimentalBlockPatterns])),Ts=(0,Xe.Z)((e=>{const t=e.settings.__experimentalBlockPatterns,{allowedBlockTypes:n}=Ds(e),r=t.filter((e=>{let{inserter:t=!0}=e;return!!t})).map((t=>{let{name:n}=t;return Is(e,n)})),o=r.filter((e=>{let{blocks:t}=e;return((e,t)=>{if("boolean"==typeof t)return t;const n=[...e];for(;n.length>0;){var r;const e=n.shift();if(!ls(t,e.name||e.blockName,!0))return!1;null===(r=e.innerBlocks)||void 0===r||r.forEach((e=>{n.push(e)}))}return!0})(t,n)}));return o}),(e=>[e.settings.__experimentalBlockPatterns,e.settings.allowedBlockTypes])),Ns=(0,Xe.Z)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=Ts(e),r=n.filter((n=>{let{blocks:r}=n;return r.every((n=>{let{name:r}=n;return ss(e,r,t)}))}));return r}),((e,t)=>[e.settings.__experimentalBlockPatterns,e.settings.allowedBlockTypes,e.settings.templateLock,e.blockListSettings[t],e.blocks.byClientId.get(t)])),Bs=(0,Xe.Z)((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!t)return $l;const r=Ns(e,n),o=Array.isArray(t)?t:[t],i=r.filter((e=>{var t,n;return null==e||null===(t=e.blockTypes)||void 0===t||null===(n=t.some)||void 0===n?void 0:n.call(t,(e=>o.includes(e)))}));return 0===i.length?$l:i}),((e,t,n)=>[...Ns.getDependants(e,n)])),Ls=(0,Xe.Z)((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return(0,St.default)('wp.data.select( "core/block-editor" ).__experimentalGetPatternsByBlockTypes',{alternative:'wp.data.select( "core/block-editor" ).getPatternsByBlockTypes',since:"6.2",version:"6.4"}),Bs(e,t,n)}),((e,t,n)=>[...Ns.getDependants(e,n)])),Ps=(0,Xe.Z)((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!t)return $l;if(t.some((t=>{let{clientId:n,innerBlocks:r}=t;return r.length||Us(e,n)})))return $l;const r=Array.from(new Set(t.map((e=>{let{name:t}=e;return t}))));return Bs(e,r,n)}),((e,t,n)=>[...Bs.getDependants(e,n)]));function As(e,t){return e.blockListSettings[t]}function Ds(e){return e.settings}function Rs(e){return e.blocks.isPersistentChange}const Ms=(0,Xe.Z)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.reduce(((t,n)=>e.blockListSettings[n]?{...t,[n]:e.blockListSettings[n]}:t),{})}),(e=>[e.blockListSettings])),Os=(0,Xe.Z)(((e,t)=>{var n;const r=js(e).find((e=>e.id===t));return r?null===(n=r.title)||void 0===n?void 0:n.raw:null}),(e=>[js(e)]));function Zs(e){return e.blocks.isIgnoredChange}function Fs(e){return e.lastBlockAttributesChange}function js(e){var t,n;return null!==(t=null==e||null===(n=e.settings)||void 0===n?void 0:n.__experimentalReusableBlocks)&&void 0!==t?t:$l}function zs(e){return"navigation"===e.editorMode}function Hs(e){return e.editorMode}function Vs(e){return e.hasBlockMovingClientId}function Ws(e){return!!e.automaticChangeStatus}function $s(e,t){return e.highlightedBlock===t}function Us(e,t){return!!e.blocks.controlledInnerBlocks[t]}const Gs=(0,Xe.Z)(((e,t)=>{if(!t.length)return null;const n=fa(e);if(t.includes(Gl(e,n)))return n;const r=Sa(e),o=ba(e,n||r[0],t);return o?o[o.length-1]:null}),((e,t)=>[e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId,t]));function qs(e,t,n){var r;const{lastBlockInserted:o}=e;return(null===(r=o.clientIds)||void 0===r?void 0:r.includes(t))&&o.source===n}function Ks(e,t){var n,r;return null===(n=null===(r=e.blockVisibility)||void 0===r?void 0:r[t])||void 0===n||n}const Ys=(0,Xe.Z)((e=>{const t=new Set(Object.keys(e.blockVisibility).filter((t=>e.blockVisibility[t])));return 0===t.size?Ul:t}),(e=>[e.blockVisibility])),Xs=(0,Xe.Z)(((e,t)=>{let n,r=t;for(;e.blocks.parents.has(r);)r=e.blocks.parents.get(r),r&&"contentOnly"===is(e,r)&&(n=r);return n}),(e=>[e.blocks.parents,e.blockListSettings]));function Js(e){return e.temporarilyEditingAsBlocks}function Qs(e,t){if(!fs(e,t))return!0;const n=Hs(e);if("zoom-out"===n&&t&&!ga(e,t))return!0;const r=he(Gl(e,t),"__experimentalDisableBlockOverlay",!1);return("navigation"===n||!r&&Us(e,t))&&!Ha(e,t)&&!Va(e,t,!0)}function ec(e,t){let n=e.blocks.parents[t];for(;n;){if(Qs(e,n))return!0;n=e.blocks.parents[n]}return!1}const tc=["inserterMediaCategories","blockInspectorAnimation"];function nc(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e;if(t&&"web"===ci.Z.OS){n={};for(const t in e)tc.includes(t)||(n[t]=e[t])}return{type:"UPDATE_SETTINGS",settings:n}}function rc(){return{type:"HIDE_BLOCK_INTERFACE"}}function oc(){return{type:"SHOW_BLOCK_INTERFACE"}}function ic(e){return e.isBlockInterfaceHidden}function lc(e){var t;return null==e||null===(t=e.lastBlockInserted)||void 0===t?void 0:t.clientIds}const ac="†";function sc(e){if(e)return Object.keys(e).find((t=>{const n=e[t];return"string"==typeof n&&-1!==n.indexOf(ac)}))}const cc=e=>Array.isArray(e)?e:[e],uc=e=>t=>{let{dispatch:n}=t;n({type:"RESET_BLOCKS",blocks:e}),n(dc(e))},dc=e=>t=>{let{select:n,dispatch:r}=t;const o=n.getTemplate(),i=n.getTemplateLock(),l=!o||"all"!==i||Bo(e,o);if(l!==n.isValidTemplate())return r.setTemplateValidity(l),l};function pc(e,t,n){return{type:"RESET_SELECTION",selectionStart:e,selectionEnd:t,initialPosition:n}}function mc(e){return(0,St.default)('wp.data.dispatch( "core/block-editor" ).receiveBlocks',{since:"5.9",alternative:"resetBlocks or insertBlocks"}),{type:"RECEIVE_BLOCKS",blocks:e}}function fc(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{type:"UPDATE_BLOCK_ATTRIBUTES",clientIds:cc(e),attributes:t,uniqueByBlock:n}}function hc(e,t){return{type:"UPDATE_BLOCK",clientId:e,updates:t}}function gc(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{type:"SELECT_BLOCK",initialPosition:t,clientId:e}}const vc=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return n=>{let{select:r,dispatch:o}=n;const i=r.getPreviousBlockClientId(e);if(i)o.selectBlock(i,-1);else if(t){const t=r.getBlockRootClientId(e);t&&o.selectBlock(t,-1)}}},bc=e=>t=>{let{select:n,dispatch:r}=t;const o=n.getNextBlockClientId(e);o&&r.selectBlock(o)};function yc(){return{type:"START_MULTI_SELECT"}}function _c(){return{type:"STOP_MULTI_SELECT"}}const kc=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return r=>{let{select:o,dispatch:i}=r;if(o.getBlockRootClientId(e)!==o.getBlockRootClientId(t))return;i({type:"MULTI_SELECT",start:e,end:t,initialPosition:n});const l=o.getSelectedBlockCount();(0,fl.D)((0,N.sprintf)((0,N._n)("%s block selected.","%s blocks selected.",l),l),"assertive")}};function xc(){return{type:"CLEAR_SELECTED_BLOCK"}}function wc(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:"TOGGLE_SELECTION",isSelectionEnabled:e}}function Cc(e,t){var n,r;const o=null!==(n=null==t||null===(r=t.__experimentalPreferredStyleVariations)||void 0===r?void 0:r.value)&&void 0!==n?n:{};return e.map((e=>{var t;const n=e.name;if(!he(n,"defaultStylePicker",!0))return e;if(!o[n])return e;const r=null===(t=e.attributes)||void 0===t?void 0:t.className;if(null!=r&&r.includes("is-style-"))return e;const{attributes:i={}}=e,l=o[n];return{...e,attributes:{...i,className:`${r||""} is-style-${l}`.trim()}}}))}const Ec=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4?arguments[4]:void 0;return i=>{let{select:l,dispatch:a}=i;e=cc(e),t=Cc(cc(t),l.getSettings());const s=l.getBlockRootClientId(e[0]);for(let e=0;e<t.length;e++){const n=t[e];if(!l.canInsertBlockType(n.name,s))return}a({type:"REPLACE_BLOCKS",clientIds:e,blocks:t,time:Date.now(),indexToSelect:n,initialPosition:r,meta:o}),a((e=>{let{select:t,dispatch:n}=e;if(t.getBlockCount()>0)return;const{__unstableHasCustomAppender:r}=t.getSettings();r||n.insertDefaultBlock()}))}};function Sc(e,t){return Ec(e,t)}const Ic=e=>(t,n)=>r=>{let{select:o,dispatch:i}=r;o.canMoveBlocks(t,n)&&i({type:e,clientIds:cc(t),rootClientId:n})},Tc=Ic("MOVE_BLOCKS_DOWN"),Nc=Ic("MOVE_BLOCKS_UP"),Bc=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3?arguments[3]:void 0;return o=>{let{select:i,dispatch:l}=o;if(i.canMoveBlocks(e,t)){if(t!==n){if(!i.canRemoveBlocks(e,t))return;if(!i.canInsertBlocks(e,n))return}l({type:"MOVE_BLOCKS_TO_POSITION",fromRootClientId:t,toRootClientId:n,clientIds:e,index:r})}}};function Lc(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3?arguments[3]:void 0;return Bc([e],t,n,r)}function Pc(e,t,n,r,o){return Ac([e],t,n,r,0,o)}const Ac=function(e,t,n){let r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,i=arguments.length>5?arguments[5]:void 0;return l=>{let{select:a,dispatch:s}=l;null!==o&&"object"==typeof o&&(i=o,o=0,(0,St.default)("meta argument in wp.data.dispatch('core/block-editor')",{since:"5.8",hint:"The meta argument is now the 6th argument of the function"})),e=Cc(cc(e),a.getSettings());const c=[];for(const t of e)a.canInsertBlockType(t.name,n)&&c.push(t);c.length&&s({type:"INSERT_BLOCKS",blocks:c,index:t,rootClientId:n,time:Date.now(),updateSelection:r,initialPosition:r?o:null,meta:i})}};function Dc(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{__unstableWithInserter:r,operation:o}=n;return{type:"SHOW_INSERTION_POINT",rootClientId:e,index:t,__unstableWithInserter:r,operation:o}}const Rc=()=>e=>{let{select:t,dispatch:n}=e;t.isBlockInsertionPointVisible()&&n({type:"HIDE_INSERTION_POINT"})};function Mc(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}const Oc=()=>e=>{let{select:t,dispatch:n}=e;n({type:"SYNCHRONIZE_TEMPLATE"});const r=Lo(t.getBlocks(),t.getTemplate());n.resetBlocks(r)},Zc=e=>t=>{let{registry:n,select:r,dispatch:o}=t;const i=r.getSelectionStart(),l=r.getSelectionEnd();if(i.clientId===l.clientId)return;if(!i.attributeKey||!l.attributeKey||void 0===i.offset||void 0===l.offset)return!1;const a=r.getBlockRootClientId(i.clientId);if(a!==r.getBlockRootClientId(l.clientId))return;const s=r.getBlockOrder(a);let c,u;s.indexOf(i.clientId)>s.indexOf(l.clientId)?(c=l,u=i):(c=i,u=l);const d=e?u:c,p=r.getBlock(d.clientId),m=pe(p.name);if(!m.merge)return;const f=c,h=u,g=r.getBlock(f.clientId),v=pe(g.name),b=r.getBlock(h.clientId),y=pe(b.name),_=g.attributes[f.attributeKey],k=b.attributes[h.attributeKey],x=v.attributes[f.attributeKey],w=y.attributes[h.attributeKey];let C=Ii({html:_,...Hl(x)}),E=Ii({html:k,...Hl(w)});C=Gi(C,f.offset,C.text.length),E=Ui(E,ac,0,h.offset);const S=Ce(g,{[f.attributeKey]:rl({value:C,...Hl(x)})}),I=Ce(b,{[h.attributeKey]:rl({value:E,...Hl(w)})}),T=e?S:I,N=g.name===b.name?[T]:Pe(T,m.name);if(!N||!N.length)return;let B;if(e){const e=N.pop();B=m.merge(e.attributes,I.attributes)}else{const e=N.shift();B=m.merge(S.attributes,e.attributes)}const L=sc(B),P=Ii({html:B[L],...Hl(m.attributes[L])}),A=P.text.indexOf(ac),D=rl({value:Gi(P,A,A+1),...Hl(m.attributes[L])});B[L]=D;const R=r.getSelectedBlockClientIds(),M=[...e?N:[],{...p,attributes:{...p.attributes,...B}},...e?[]:N];n.batch((()=>{o.selectionChange(p.clientId,L,A,A),o.replaceBlocks(R,M,0,r.getSelectedBlocksInitialCaretPosition())}))},Fc=()=>e=>{let{select:t,dispatch:n}=e;const r=t.getSelectionStart(),o=t.getSelectionEnd();if(r.clientId===o.clientId)return;if(!r.attributeKey||!o.attributeKey||void 0===r.offset||void 0===o.offset)return;const i=t.getBlockRootClientId(r.clientId);if(i!==t.getBlockRootClientId(o.clientId))return;const l=t.getBlockOrder(i);let a,s;l.indexOf(r.clientId)>l.indexOf(o.clientId)?(a=o,s=r):(a=r,s=o);const c=a,u=s,d=t.getBlock(c.clientId),p=pe(d.name),m=t.getBlock(u.clientId),f=pe(m.name),h=d.attributes[c.attributeKey],g=m.attributes[u.attributeKey],v=p.attributes[c.attributeKey],b=f.attributes[u.attributeKey];let y=Ii({html:h,...Hl(v)}),_=Ii({html:g,...Hl(b)});y=Gi(y,c.offset,y.text.length),_=Gi(_,0,u.offset),n.replaceBlocks(t.getSelectedBlockClientIds(),[{...d,attributes:{...d.attributes,[c.attributeKey]:rl({value:y,...Hl(v)})}},ke(de()),{...m,attributes:{...m.attributes,[u.attributeKey]:rl({value:_,...Hl(b)})}}],1,t.getSelectedBlocksInitialCaretPosition())},jc=()=>e=>{let{select:t,dispatch:n}=e;const r=t.getSelectionStart(),o=t.getSelectionEnd();n.selectionChange({start:{clientId:r.clientId},end:{clientId:o.clientId}})},zc=(e,t)=>n=>{let{registry:r,select:o,dispatch:i}=n;const l=[e,t];i({type:"MERGE_BLOCKS",blocks:l});const[a,s]=l,c=o.getBlock(a),u=pe(c.name);if(!u)return;const d=o.getBlock(s);if(u&&!u.merge){const e=Pe(d,u.name);if(1!==(null==e?void 0:e.length))return void i.selectBlock(c.clientId);const[t]=e;return t.innerBlocks.length<1?void i.selectBlock(c.clientId):void r.batch((()=>{i.insertBlocks(t.innerBlocks,void 0,a),i.removeBlock(s),i.selectBlock(t.innerBlocks[0].clientId)}))}const p=pe(d.name),{clientId:m,attributeKey:f,offset:h}=o.getSelectionStart(),g=(m===a?u:p).attributes[f],v=(m===a||m===s)&&void 0!==f&&void 0!==h&&!!g;g||("number"==typeof f?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 f):window.console.error("The RichText identifier prop does not match any attributes defined by the block."));const b=Ce(c),y=Ce(d);if(v){const e=m===a?b:y,t=Ui(Ii({html:e.attributes[f],...Hl(g)}),ac,h,h);e.attributes[f]=rl({value:t,...Hl(g)})}const _=c.name===d.name?[y]:Pe(y,c.name);if(!_||!_.length)return;const k=u.merge(b.attributes,_[0].attributes);if(v){const e=sc(k),t=Ii({html:k[e],...Hl(u.attributes[e])}),n=t.text.indexOf(ac),r=rl({value:Gi(t,n,n+1),...Hl(u.attributes[e])});k[e]=r,i.selectionChange(c.clientId,e,n,n)}i.replaceBlocks([c.clientId,d.clientId],[{...c,attributes:{...c.attributes,...k}},..._.slice(1)],0)},Hc=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return n=>{let{select:r,dispatch:o}=n;if(!e||!e.length)return;e=cc(e);const i=r.getBlockRootClientId(e[0]);if(r.canRemoveBlocks(e,i)){if(t){const t=!0;o.selectPreviousBlock(e[0],t)}o({type:"REMOVE_BLOCKS",clientIds:e}),o((e=>{let{select:t,dispatch:n}=e;if(t.getBlockCount()>0)return;const{__unstableHasCustomAppender:r}=t.getSettings();r||n.insertDefaultBlock()}))}}};function Vc(e,t){return Hc([e],t)}function Wc(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return{type:"REPLACE_INNER_BLOCKS",rootClientId:e,blocks:t,updateSelection:n,initialPosition:n?r:null,time:Date.now()}}function $c(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function Uc(){return{type:"START_TYPING"}}function Gc(){return{type:"STOP_TYPING"}}function qc(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{type:"START_DRAGGING_BLOCKS",clientIds:e}}function Kc(){return{type:"STOP_DRAGGING_BLOCKS"}}function Yc(){return(0,St.default)('wp.data.dispatch( "core/block-editor" ).enterFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function Xc(){return(0,St.default)('wp.data.dispatch( "core/block-editor" ).exitFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function Jc(e,t,n,r){return"string"==typeof e?{type:"SELECTION_CHANGE",clientId:e,attributeKey:t,startOffset:n,endOffset:r}:{type:"SELECTION_CHANGE",...e}}const Qc=(e,t,n)=>r=>{let{dispatch:o}=r;const i=de();if(!i)return;const l=ke(i,e);return o.insertBlock(l,n,t)};function eu(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function tu(e){return nc(e,!0)}function nu(e,t){return{type:"SAVE_REUSABLE_BLOCK_SUCCESS",id:e,updatedId:t}}function ru(){return{type:"MARK_LAST_CHANGE_AS_PERSISTENT"}}function ou(){return{type:"MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"}}const iu=()=>e=>{let{dispatch:t}=e;t({type:"MARK_AUTOMATIC_CHANGE"});const{requestIdleCallback:n=(e=>setTimeout(e,100))}=window;n((()=>{t({type:"MARK_AUTOMATIC_CHANGE_FINAL"})}))},lu=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return t=>{let{dispatch:n}=t;n.__unstableSetEditorMode(e?"navigation":"edit")}},au=e=>t=>{let{dispatch:n,select:r}=t;if("zoom-out"===e){const e=r.getBlockSelectionStart();e&&n.selectBlock(r.getBlockHierarchyRootClientId(e))}n({type:"SET_EDITOR_MODE",mode:e}),"navigation"===e?(0,fl.D)((0,N.__)("You are currently in navigation mode. Navigate blocks using the Tab key and Arrow keys. Use Left and Right Arrow keys to move between nesting levels. To exit navigation mode and edit the selected block, press Enter.")):"edit"===e?(0,fl.D)((0,N.__)("You are currently in edit mode. To return to the navigation mode, press Escape.")):"zoom-out"===e&&(0,fl.D)((0,N.__)("You are currently in zoom-out mode."))},su=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return t=>{let{dispatch:n}=t;n({type:"SET_BLOCK_MOVING_MODE",hasBlockMovingClientId:e}),e&&(0,fl.D)((0,N.__)("Use the Tab key and Arrow keys to choose new block location. Use Left and Right Arrow keys to move between nesting levels. Once location is selected press Enter or Space to move the block."))}},cu=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return n=>{let{select:r,dispatch:o}=n;if(!e||!e.length)return;const i=r.getBlocksByClientId(e);if(i.some((e=>!e)))return;const l=i.map((e=>e.name));if(l.some((e=>!he(e,"multiple",!0))))return;const a=r.getBlockRootClientId(e[0]),s=cc(e),c=r.getBlockIndex(s[s.length-1]),u=i.map((e=>we(e)));return o.insertBlocks(u,c+1,a,t),u.length>1&&t&&o.multiSelect(u[0].clientId,u[u.length-1].clientId),u.map((e=>e.clientId))}},uu=e=>t=>{let{select:n,dispatch:r}=t;if(!e)return;const o=n.getBlockRootClientId(e);if(n.getTemplateLock(o))return;const i=n.getBlockIndex(e);return r.insertDefaultBlock({},o,i)},du=e=>t=>{let{select:n,dispatch:r}=t;if(!e)return;const o=n.getBlockRootClientId(e);if(n.getTemplateLock(o))return;const i=n.getBlockIndex(e);return r.insertDefaultBlock({},o,i+1)};function pu(e,t){return{type:"TOGGLE_BLOCK_HIGHLIGHT",clientId:e,isHighlighted:t}}const mu=e=>async t=>{let{dispatch:n}=t;n(pu(e,!0)),await new Promise((e=>setTimeout(e,150))),n(pu(e,!1))};function fu(e,t){return{type:"SET_HAS_CONTROLLED_INNER_BLOCKS",hasControlledInnerBlocks:t,clientId:e}}function hu(e){return{type:"SET_BLOCK_VISIBILITY",updates:e}}function gu(e){return{type:"SET_TEMPORARILY_EDITING_AS_BLOCKS",temporarilyEditingAsBlocks:e}}const vu="core/block-editor",{lock:bu,unlock:yu}=(0,qt.es)("I know using unstable features means my plugin or theme will inevitably break on the next WordPress release.","@wordpress/block-editor"),_u={reducer:si,selectors:s,actions:d},ku=(0,W.Z)(vu,{..._u,persist:["preferences"]}),xu=(0,$.registerStore)(vu,{..._u,persist:["preferences"]});yu(xu).registerPrivateActions(c),yu(xu).registerPrivateSelectors(u);const wu={name:"",isSelected:!1},Cu=(0,v.createContext)(wu),{Provider:Eu}=Cu;function Su(){return(0,v.useContext)(Cu)}function Iu(){const{isSelected:e,clientId:t,name:n}=Su();return(0,E.Z)((r=>{if(e)return!0;const{getBlockName:o,isFirstMultiSelectedBlock:i,getMultiSelectedBlockClientIds:l}=r(ku);return!!i(t)&&l().every((e=>o(e)===n))}),[t,e,n])}function Tu(e){let{group:t="default",controls:n,children:r,__experimentalShareWithChildBlocks:o=!1}=e;const i=function(e,t){const n=Iu(),{clientId:r}=Su(),o=(0,E.Z)((e=>{const{getBlockName:n,hasSelectedInnerBlock:o}=e(ku),{hasBlockSupport:i}=e(Xt);return t&&i(n(r),"__experimentalExposeControlsToChildren",!1)&&o(r)}),[t,r]);var i;return n?null===(i=Wo[e])||void 0===i?void 0:i.Fill:o?Wo.parent.Fill:null}(t,o);return i?(0,v.createElement)(Do.Z,{document:document},(0,v.createElement)(i,null,(e=>{const o=(0,U.isEmpty)(e)?null:e;return(0,v.createElement)(Ro.Z.Provider,{value:o},"default"===t&&(0,v.createElement)(Vo,{controls:n}),r)}))):null}var Nu=n(5784),Bu=n(33663);function Lu(e){const t=(0,v.useContext)(Bu.Z);return(0,Nu.RK)(t.fills,{sync:!0}).get(e)}function Pu(e){let{group:t="default",...n}=e;const r=(0,v.useContext)(Ro.Z),o=Wo[t].Slot,i=Lu(o.__unstableName);return Boolean(i&&i.length)?"default"===t?(0,v.createElement)(o,(0,Po.Z)({},n,{bubblesVirtually:!0,fillProps:r})):(0,v.createElement)(Vo,null,(0,v.createElement)(o,(0,Po.Z)({},n,{bubblesVirtually:!0,fillProps:r}))):null}const Au=Tu;Au.Slot=Pu;const Du=e=>(0,v.createElement)(Tu,(0,Po.Z)({group:"inline"},e));Du.Slot=e=>(0,v.createElement)(Pu,(0,Po.Z)({group:"inline"},e));var Ru=Au,Mu=(0,v.forwardRef)((function(e,t){return(0,v.useContext)(Ro.Z)?(0,v.createElement)(Oo.Z,(0,Po.Z)({ref:t},e.toggleProps),(t=>(0,v.createElement)(zo.Z,(0,Po.Z)({},e,{popoverProps:{variant:"toolbar",...e.popoverProps},toggleProps:t})))):(0,v.createElement)(zo.Z,e)})),Ou=n(66426),Zu=n(32828),Fu=n(19542),ju=n(18316),zu=n(80914),Hu=n(13097),Vu=n(3946),Wu=n(27121),$u=n(75104),Uu=n(4723),Gu=n(34109),qu=n(51684),Ku=n(14102),Yu=n(31939),Xu=n(46785),Ju=n(20101),Qu=n(75351),ed=n(66313),td=n(52634);function nd(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"transition";switch(t){case"transition":e="transition-duration: 0ms;";break;case"animation":e="animation-duration: 1ms;";break;default:e="\n\t\t\t\tanimation-duration: 1ms;\n\t\t\t\ttransition-duration: 0ms;\n\t\t\t"}return`\n\t\t@media ( prefers-reduced-motion: reduce ) {\n\t\t\t${e};\n\t\t}\n\t`}const rd={name:"7whenc",styles:"display:flex;width:100%"},od=(0,Ju.Z)("div",{target:"eakva831"})("background:",ed.D.gray[900],";border-radius:",td.Z.controlBorderRadius,";left:0;position:absolute;top:2px;bottom:2px;transition:transform ",td.Z.transitionDurationFast," ease;",nd("transition")," z-index:1;"),id=(0,Ju.Z)("div",{target:"eakva830"})({name:"zjik7",styles:"display:flex"});var ld=n(4466),ad=n(13714);function sd(e,t){const n=(0,v.useRef)(null),r=(0,v.useRef)(null),o=(0,v.useRef)(),i=(0,v.useCallback)((()=>{let l=null;n.current?l=n.current:t&&(l=t instanceof HTMLElement?t:t.current),r.current&&r.current.element===l&&r.current.reporter===i||(o.current&&(o.current(),o.current=null),r.current={reporter:i,element:l},l&&(o.current=e(l)))}),[t,e]);return(0,v.useEffect)((()=>{i()}),[i]),(0,v.useCallback)((e=>{n.current=e,i()}),[i])}const cd=(e,t,n)=>e[t]?e[t][0]?e[t][0][n]:e[t][n]:"contentBoxSize"===t?e.contentRect["inlineSize"===n?"width":"height"]:void 0;function ud(){const{ref:e,width:t,height:n}=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=e.onResize,n=(0,v.useRef)(void 0);n.current=t;const r=e.round||Math.round,o=(0,v.useRef)(),[i,l]=(0,v.useState)({width:void 0,height:void 0}),a=(0,v.useRef)(!1);(0,v.useEffect)((()=>(a.current=!1,()=>{a.current=!0})),[]);const s=(0,v.useRef)({width:void 0,height:void 0}),c=sd((0,v.useCallback)((t=>(o.current&&o.current.box===e.box&&o.current.round===r||(o.current={box:e.box,round:r,instance:new ResizeObserver((t=>{const o=t[0];let i="borderBoxSize";i="border-box"===e.box?"borderBoxSize":"device-pixel-content-box"===e.box?"devicePixelContentBoxSize":"contentBoxSize";const c=cd(o,i,"inlineSize"),u=cd(o,i,"blockSize"),d=c?r(c):void 0,p=u?r(u):void 0;if(s.current.width!==d||s.current.height!==p){const e={width:d,height:p};s.current.width=d,s.current.height=p,n.current?n.current(e):a.current||l(e)}}))}),o.current.instance.observe(t,{box:e.box}),()=>{o.current&&o.current.instance.unobserve(t)})),[e.box,r]),e.ref);return(0,v.useMemo)((()=>({ref:c,width:i.width,height:i.height})),[c,i?i.width:null,i?i.height:null])}(),r=(0,v.useMemo)((()=>({width:null!=t?t:null,height:null!=n?n:null})),[t,n]);return[(0,v.createElement)("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,pointerEvents:"none",opacity:0,overflow:"hidden",zIndex:-1},"aria-hidden":"true",ref:e}),r]}var dd=n(40618),pd=n(55703),md=n(9113),fd=(0,v.memo)((function(e){let{containerRef:t,containerWidth:n,isAdaptiveWidth:r,state:o}=e;const[i,l]=(0,v.useState)(0),[a,s]=(0,v.useState)(0),[c,u]=(0,v.useState)(!1),[d,p]=(0,v.useState)(!1);return(0,v.useEffect)((()=>{const e=null==t?void 0:t.current;if(!e)return;const n=e.querySelector(`[data-value="${o}"]`);if(p(!!n),!n)return;const r=window.setTimeout((()=>{const{width:t,x:r}=n.getBoundingClientRect(),{x:o}=e.getBoundingClientRect();l(r-o-1),s(t)}),100);let i;return c||(i=window.requestAnimationFrame((()=>{u(!0)}))),()=>{window.clearTimeout(r),window.cancelAnimationFrame(i)}}),[c,t,n,o,r]),d?(0,v.createElement)(od,{role:"presentation",style:{transform:`translateX(${i}px)`,transition:c?void 0:"none",width:a}}):null}));const hd=(0,v.createContext)({});var gd=hd,vd=n(44122);const bd=(0,v.forwardRef)((function(e,t){let{children:n,isAdaptiveWidth:r,label:o,onChange:i,size:l,value:a,...s}=e;const c=(0,v.useRef)(),[u,d]=ud(),p=(0,dd.Z)(bd,"toggle-group-control-as-radio-group").toString(),m=(0,ld.i)({baseId:p,state:a}),f=(0,pd.Z)(a);return(0,vd.Z)((()=>{f!==m.state&&i(m.state)}),[m.state]),(0,vd.Z)((()=>{a!==m.state&&m.setState(a)}),[a]),(0,v.createElement)(gd.Provider,{value:{...m,isBlock:!r,size:l}},(0,v.createElement)(ad.E,(0,Po.Z)({},m,{"aria-label":o,as:md.Z},s,{ref:(0,vl.Z)([c,t])}),u,(0,v.createElement)(fd,{state:m.state,containerRef:c,containerWidth:d.width,isAdaptiveWidth:r}),n))})),yd=(0,v.forwardRef)((function(e,t){let{children:n,isAdaptiveWidth:r,label:o,onChange:i,size:l,value:a,...s}=e;const c=(0,v.useRef)(),[u,d]=ud(),p=(0,dd.Z)(yd,"toggle-group-control-as-button-group").toString(),[m,f]=(0,v.useState)(a),h={baseId:p,state:m,setState:f},g=(0,pd.Z)(a);return(0,vd.Z)((()=>{g!==h.state&&i(h.state)}),[h.state]),(0,vd.Z)((()=>{a!==h.state&&h.setState(a)}),[a]),(0,v.createElement)(gd.Provider,{value:{...h,isBlock:!r,isDeselectable:!0,size:l}},(0,v.createElement)(md.Z,(0,Po.Z)({"aria-label":o},s,{ref:(0,vl.Z)([c,t]),role:"group"}),u,(0,v.createElement)(fd,{state:h.state,containerRef:c,containerWidth:d.width,isAdaptiveWidth:r}),n))})),_d=()=>{},kd=(0,Ku.Iq)((function(e,t){const{__nextHasNoMarginBottom:n=!1,className:r,isAdaptiveWidth:o=!1,isBlock:i=!1,isDeselectable:l=!1,label:a,hideLabelFromVision:s=!1,help:c,onChange:u=_d,size:d="default",value:p,children:m,...f}=(0,qu.y)(e,"ToggleGroupControl"),h=(0,Yu.I)(),g=(0,v.useMemo)((()=>h((e=>{let{isBlock:t,isDeselectable:n,size:r}=e;return(0,Qu.iv)("background:",ed.D.ui.background,";border:1px solid transparent;border-radius:",td.Z.controlBorderRadius,";display:inline-flex;min-width:0;padding:2px;position:relative;transition:transform ",td.Z.transitionDurationFastest," linear;",nd("transition")," ",(e=>(0,Qu.iv)("min-height:",{default:"36px","__unstable-large":"40px"}[e],";",""))(r)," ",!n&&(e=>{const t=(0,Qu.iv)("border-color:",ed.D.ui.border,";","");return(0,Qu.iv)(e&&t," &:hover{border-color:",ed.D.ui.borderHover,";}&:focus-within{border-color:",ed.D.ui.borderFocus,";box-shadow:",td.Z.controlBoxShadowFocus,";outline:none;z-index:1;}","")})(t),";","")})({isBlock:i,isDeselectable:l,size:d}),i&&rd,r)),[r,h,i,l,d]),b=l?yd:bd;return(0,v.createElement)(Xu.ZP,{help:c,__nextHasNoMarginBottom:n},!s&&(0,v.createElement)(id,null,(0,v.createElement)(Xu.ZP.VisualLabel,null,a)),(0,v.createElement)(b,(0,Po.Z)({},f,{children:m,className:g,isAdaptiveWidth:o,label:a,onChange:u,ref:t,size:d,value:p})))}),"ToggleGroupControl");var xd=kd,wd=n(19695);const Cd=(0,Ju.Z)("div",{target:"et6ln9s1"})({name:"sln1fl",styles:"display:inline-flex;max-width:100%;min-width:0;position:relative"}),Ed={name:"82a6rk",styles:"flex:1"},Sd=e=>{let{isDeselectable:t,isIcon:n,isPressed:r,size:o}=e;return(0,Qu.iv)("align-items:center;appearance:none;background:transparent;border:none;border-radius:",td.Z.controlBorderRadius,";color:",ed.D.gray[700],";fill:currentColor;cursor:pointer;display:flex;font-family:inherit;height:100%;justify-content:center;line-height:100%;outline:none;padding:0 12px;position:relative;text-align:center;transition:background ",td.Z.transitionDurationFast," linear,color ",td.Z.transitionDurationFast," linear,font-weight 60ms linear;",nd("transition")," user-select:none;width:100%;z-index:2;&::-moz-focus-inner{border:0;}&:active{background:",td.Z.toggleGroupControlBackgroundColor,";}",t&&Td," ",n&&Bd({size:o})," ",r&&Id,";","")},Id=(0,Qu.iv)("color:",ed.D.white,";&:active{background:transparent;}",""),Td=(0,Qu.iv)("color:",ed.D.gray[900],";&:focus{box-shadow:inset 0 0 0 1px ",ed.D.white,",0 0 0 ",td.Z.borderWidthFocus," ",ed.D.ui.theme,";outline:2px solid transparent;}",""),Nd=(0,Ju.Z)("div",{target:"et6ln9s0"})("display:flex;font-size:",td.Z.fontSize,";line-height:1;"),Bd=e=>{let{size:t="default"}=e;return(0,Qu.iv)("color:",ed.D.gray[900],";width:",{default:"30px","__unstable-large":"34px"}[t],";padding-left:0;padding-right:0;","")};var Ld=n(19967);const{ButtonContentView:Pd,LabelView:Ad}=p,Dd=e=>{let{showTooltip:t,text:n,children:r}=e;return t&&n?(0,v.createElement)(Ld.Z,{text:n,position:"top center"},r):(0,v.createElement)(v.Fragment,null,r)},Rd=(0,Ku.Iq)((function e(t,n){const r=(0,v.useContext)(hd),o=(0,dd.Z)(e,r.baseId||"toggle-group-control-option-base"),i=(0,qu.y)({...t,id:o},"ToggleGroupControlOptionBase"),{isBlock:l=!1,isDeselectable:a=!1,size:s="default",...c}=r,{className:u,isIcon:d=!1,value:p,children:m,showTooltip:f=!1,...h}=i,g=c.state===p,b=(0,Yu.I)(),y=b(l&&Ed),_=b(Sd({isDeselectable:a,isIcon:d,isPressed:g,size:s}),u),k={...h,className:_,"data-value":p,ref:n};return(0,v.createElement)(Ad,{className:y},(0,v.createElement)(Dd,{showTooltip:f,text:h["aria-label"]},a?(0,v.createElement)("button",(0,Po.Z)({},k,{"aria-pressed":g,type:"button",onClick:()=>{a&&g?c.setState(void 0):c.setState(p)}}),(0,v.createElement)(Pd,null,m)):(0,v.createElement)(wd.Y,(0,Po.Z)({},k,c,{as:"button",value:p}),(0,v.createElement)(Pd,null,m))))}),"ToggleGroupControlOptionBase");var Md=Rd,Od=n(28070);const Zd=(0,v.forwardRef)((function(e,t){const{icon:n,label:r,...o}=e;return(0,v.createElement)(Md,(0,Po.Z)({},o,{isIcon:!0,"aria-label":r,showTooltip:!0,ref:t}),(0,v.createElement)(Od.Z,{icon:n}))}));var Fd=Zd,jd=n(41974);function zd(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.split(",").map((e=>`.editor-styles-wrapper ${e}${t?` ${t}`:""}`)).join(",")}function Hd(e,t,n,r){var o,i;let l="";return null!=t&&null!==(o=t[n])&&void 0!==o&&null!==(i=o.spacingStyles)&&void 0!==i&&i.length&&r&&t[n].spacingStyles.forEach((t=>{l+=`${zd(e,t.selector.trim())} { `,l+=Object.entries(t.rules).map((e=>{let[t,n]=e;return`${t}: ${n||r}`})).join("; "),l+="; }"})),l}function Vd(e){const{contentSize:t,wideSize:n}=e,r={},o=/^(?!0)\d+(px|em|rem|vw|vh|%)?$/i;return o.test(t)&&(r.none=(0,N.sprintf)((0,N.__)("Max %s wide"),t)),o.test(n)&&(r.wide=(0,N.sprintf)((0,N.__)("Max %s wide"),n)),r}function Wd(e){return!(null==e||!e.includes)&&("0"===e||e.includes("var:preset|spacing|"))}function $d(e){if(!e)return;const t=e.match(/var:preset\|spacing\|(.+)/);return t?`var(--wp--preset--spacing--${t[1]})`:e}function Ud(e){if(!e)return;if("0"===e||"default"===e)return e;const t=e.match(/var:preset\|spacing\|(.+)/);return t?t[1]:void 0}const Gd={all:(0,N.__)("All sides"),top:(0,N.__)("Top"),bottom:(0,N.__)("Bottom"),left:(0,N.__)("Left"),right:(0,N.__)("Right"),mixed:(0,N.__)("Mixed"),vertical:(0,N.__)("Vertical"),horizontal:(0,N.__)("Horizontal")},qd={top:void 0,right:void 0,bottom:void 0,left:void 0},Kd=["top","right","bottom","left"];function Yd(e){return e.sort(((t,n)=>e.filter((e=>e===t)).length-e.filter((e=>e===n)).length)).pop()}function Xd(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Kd;return Object.values(e).length>=1&&Object.values(e).length<t.length||new Set(Object.values(e)).size>1}function Jd(e){return null!=e&&Object.values(e).filter((e=>!!e)).length>0}function Qd(e){if(!e)return null;const t="string"==typeof e;return{top:t?e:null==e?void 0:e.top,left:t?e:null==e?void 0:e.left}}function ep(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0";const n=Qd(e);if(!n)return null;const r=$d(null==n?void 0:n.top)||t,o=$d(null==n?void 0:n.left)||t;return r===o?r:`${r} ${o}`}var tp=n(78360);const np=(0,v.createElement)(tp.Wj,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,v.createElement)(tp.y$,{d:"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"})),rp=(0,v.createElement)(tp.Wj,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,v.createElement)(tp.y$,{d:"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"})),op=(0,v.createElement)(tp.Wj,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,v.createElement)(tp.y$,{d:"M9 20h6V9H9v11zM4 4v1.5h16V4H4z"})),ip=(0,v.createElement)(tp.Wj,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,v.createElement)(tp.y$,{d:"M4 4L20 4L20 5.5L4 5.5L4 4ZM10 7L14 7L14 17L10 17L10 7ZM20 18.5L4 18.5L4 20L20 20L20 18.5Z"})),lp=(0,v.createElement)(tp.Wj,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,v.createElement)(tp.y$,{d:"M7 4H17V8L7 8V4ZM7 16L17 16V20L7 20V16ZM20 11.25H4V12.75H20V11.25Z"})),ap={top:{icon:op,title:(0,N._x)("Align top","Block vertical alignment setting")},center:{icon:rp,title:(0,N._x)("Align middle","Block vertical alignment setting")},bottom:{icon:np,title:(0,N._x)("Align bottom","Block vertical alignment setting")},stretch:{icon:ip,title:(0,N._x)("Stretch to fill","Block vertical alignment setting")},"space-between":{icon:lp,title:(0,N._x)("Space between","Block vertical alignment setting")}},sp=["top","center","bottom"];var cp=function(e){let{value:t,onChange:n,controls:r=sp,isCollapsed:o=!0,isToolbar:i}=e;const l=ap[t],a=ap.top,s=i?Vo:Mu,c=i?{isCollapsed:o}:{popoverProps:{variant:"toolbar"}};return(0,v.createElement)(s,(0,Po.Z)({icon:l?l.icon:a.icon,label:(0,N._x)("Change vertical alignment","Block vertical alignment setting label"),controls:r.map((e=>{return{...ap[e],isActive:t===e,role:o?"menuitemradio":void 0,onClick:(r=e,()=>n(t===r?void 0:r))};var r}))},c))};const up=e=>(0,v.createElement)(cp,(0,Po.Z)({},e,{isToolbar:!1})),dp=e=>(0,v.createElement)(cp,(0,Po.Z)({},e,{isToolbar:!0})),pp={left:Fu.Z,center:ju.Z,right:zu.Z,"space-between":Hu.Z,stretch:Vu.Z};var mp=function(e){let{allowedControls:t=["left","center","right","space-between"],isCollapsed:n=!0,onChange:r,value:o,popoverProps:i,isToolbar:l}=e;const a=e=>{r(e===o?void 0:e)},s=o?pp[o]:pp.left,c=[{name:"left",icon:Fu.Z,title:(0,N.__)("Justify items left"),isActive:"left"===o,onClick:()=>a("left")},{name:"center",icon:ju.Z,title:(0,N.__)("Justify items center"),isActive:"center"===o,onClick:()=>a("center")},{name:"right",icon:zu.Z,title:(0,N.__)("Justify items right"),isActive:"right"===o,onClick:()=>a("right")},{name:"space-between",icon:Hu.Z,title:(0,N.__)("Space between items"),isActive:"space-between"===o,onClick:()=>a("space-between")},{name:"stretch",icon:Vu.Z,title:(0,N.__)("Stretch items"),isActive:"stretch"===o,onClick:()=>a("stretch")}],u=l?Vo:Mu,d=l?{isCollapsed:n}:{};return(0,v.createElement)(u,(0,Po.Z)({icon:s,popoverProps:i,label:(0,N.__)("Change items justification"),controls:c.filter((e=>t.includes(e.name)))},d))};const fp=e=>(0,v.createElement)(mp,(0,Po.Z)({},e,{isToolbar:!1})),hp=["color","border","dimensions","typography","spacing"],gp={"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},vp={"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"};function bp(e){const{name:t,clientId:n}=Su();return(0,E.Z)((r=>{if(hp.includes(e))return void console.warn("Top level useSetting paths are disabled. Please use a subpath to query the information needed.");let o=(0,_e.O)("blockEditor.useSetting.before",void 0,e,n,t);if(void 0!==o)return o;const i=(e=>vp[e]||e)(e),l=[n,...r(ku).getBlockParents(n,!0)];for(const e of l)if(he(r(ku).getBlockName(e),"__experimentalSettings",!1)){var a;const n=r(ku).getBlockAttributes(e);if(o=null!==(a=(0,U.get)(n,`settings.blocks.${t}.${i}`))&&void 0!==a?a:(0,U.get)(n,`settings.${i}`),void 0!==o)break}const s=r(ku).getSettings();if(void 0===o){var c;const e=`__experimentalFeatures.${i}`,n=`__experimentalFeatures.blocks.${t}.${i}`;o=null!==(c=(0,U.get)(s,n))&&void 0!==c?c:(0,U.get)(s,e)}var u,d;if(void 0!==o)return te[i]?null!==(u=null!==(d=o.custom)&&void 0!==d?d:o.theme)&&void 0!==u?u:o.default:o;const p=gp[i]?gp[i](s):void 0;return void 0!==p?p:"typography.dropCap"===i||void 0}),[t,n,e])}const yp=e=>{if(null===e||"object"!=typeof e||Array.isArray(e))return e;const t=Object.fromEntries(Object.entries((0,U.mapValues)(e,yp)).filter((e=>{let[,t]=e;return Boolean(t)})));return(0,U.isEmpty)(t)?void 0:t};function _p(e){return"object"==typeof e?{...Object.fromEntries(Object.entries(e).map((e=>{let[t,n]=e;return[t,_p(n)]})))}:e}function kp(e,t,n){const r=function(e){return Array.isArray(e)?e:"number"==typeof e?[e.toString()]:[e]}(t),o=e?_p(e):{};return r.reduce(((e,t,o)=>(void 0===e[t]&&(e[t]={}),o===r.length-1&&(e[t]=n),e[t])),o),o}function xp(e,t,n,r,o,i){var l;if(Object.values(null!=e?e:{}).every((e=>!e)))return n;if(1===i.length&&n.innerBlocks.length===r.length)return n;let a=null===(l=r[0])||void 0===l?void 0:l.attributes;if(i.length>1&&r.length>1){if(!r[o])return n;var s;a=null===(s=r[o])||void 0===s?void 0:s.attributes}let c=n;return Object.entries(e).forEach((e=>{let[n,r]=e;r&&t[n].forEach((e=>{const t=(0,U.get)(a,e);t&&(c={...c,attributes:kp(c.attributes,e,t)})}))})),c}function wp(e,t,n){const r=fe(e,t),o=null==r?void 0:r.__experimentalSkipSerialization;return Array.isArray(o)?o.includes(n):o}function Cp(e,t){const n=bp("typography.fontFamilies"),r=bp("typography.fontSizes"),o=bp("typography.customFontSize"),i=bp("typography.fontStyle"),l=bp("typography.fontWeight"),a=bp("typography.lineHeight"),s=bp("typography.textDecoration"),c=bp("typography.textTransform"),u=bp("typography.letterSpacing"),d=bp("spacing.padding"),p=bp("spacing.margin"),m=bp("spacing.blockGap"),f=bp("spacing.spacingSizes"),h=bp("spacing.units"),g=bp("dimensions.minHeight"),b=bp("layout");return function(e,t,n){const{supportedStyles:r,supports:o}=(0,E.Z)((e=>{var r;return{supportedStyles:yu(e(Xt)).getSupportedStyles(t,n),supports:null===(r=e(Xt).getBlockType(t))||void 0===r?void 0:r.supports}}),[t,n]);return(0,v.useMemo)((()=>{const t={...e};return r.includes("fontSize")||(t.typography={...t.typography,fontSizes:{},customFontSize:!1}),r.includes("fontFamily")||(t.typography={...t.typography,fontFamilies:{}}),["lineHeight","fontStyle","fontWeight","letterSpacing","textTransform","textDecoration"].forEach((e=>{r.includes(e)||(t.typography={...t.typography,[e]:!1})})),["contentSize","wideSize"].forEach((e=>{r.includes(e)||(t.layout={...t.layout,[e]:!1})})),["padding","margin","blockGap"].forEach((e=>{var n,i,l,a;r.includes(e)||(t.spacing={...t.spacing,[e]:!1});const s=Array.isArray(null==o||null===(n=o.spacing)||void 0===n?void 0:n[e])?null==o||null===(i=o.spacing)||void 0===i?void 0:i[e]:null==o||null===(l=o.spacing)||void 0===l||null===(a=l[e])||void 0===a?void 0:a.sides;var c;null!=s&&s.length&&(t.spacing={...t.spacing,[e]:{...null===(c=t.spacing)||void 0===c?void 0:c[e],sides:s}})})),r.includes("minHeight")||(t.dimensions={...t.dimensions,minHeight:!1}),t}),[e,r,o])}((0,v.useMemo)((()=>({typography:{fontFamilies:{custom:n},fontSizes:{custom:r},customFontSize:o,fontStyle:i,fontWeight:l,lineHeight:a,textDecoration:s,textTransform:c,letterSpacing:u},spacing:{spacingSizes:{custom:f},padding:d,margin:p,blockGap:m,units:h},dimensions:{minHeight:g},layout:b,parentLayout:t})),[n,r,o,i,l,a,s,c,u,d,p,m,f,h,g,b,t]),e)}const Ep={left:"flex-start",right:"flex-end",center:"center","space-between":"space-between"},Sp={left:"flex-start",right:"flex-end",center:"center",stretch:"stretch"},Ip={top:"flex-start",center:"center",bottom:"flex-end",stretch:"stretch","space-between":"space-between"},Tp=["wrap","nowrap"];var Np={name:"flex",label:(0,N.__)("Flex"),inspectorControls:function(e){let{layout:t={},onChange:n,layoutBlockSupport:r={}}=e;const{allowOrientation:o=!0}=r;return(0,v.createElement)(v.Fragment,null,(0,v.createElement)(Uu.Z,null,(0,v.createElement)(Gu.Z,null,(0,v.createElement)(Lp,{layout:t,onChange:n})),(0,v.createElement)(Gu.Z,null,o&&(0,v.createElement)(Ap,{layout:t,onChange:n}))),(0,v.createElement)(Pp,{layout:t,onChange:n}))},toolBarControls:function(e){let{layout:t={},onChange:n,layoutBlockSupport:r}=e;if(null!=r&&r.allowSwitching)return null;const{allowVerticalAlignment:o=!0}=r;return(0,v.createElement)(Ru,{group:"block",__experimentalShareWithChildBlocks:!0},(0,v.createElement)(Lp,{layout:t,onChange:n,isToolbar:!0}),o&&(0,v.createElement)(Bp,{layout:t,onChange:n,isToolbar:!0}))},getLayoutStyle:function(e){var t,n;let{selector:r,layout:o,style:i,blockName:l,hasBlockGapSupport:a,layoutDefinitions:s}=e;const{orientation:c="horizontal"}=o,u=null!=i&&null!==(t=i.spacing)&&void 0!==t&&t.blockGap&&!wp(l,"spacing","blockGap")?ep(null==i||null===(n=i.spacing)||void 0===n?void 0:n.blockGap,"0.5em"):void 0,d=Ep[o.justifyContent],p=Tp.includes(o.flexWrap)?o.flexWrap:"wrap",m=Ip[o.verticalAlignment],f=Sp[o.justifyContent]||Sp.left;let h="";const g=[];return p&&"wrap"!==p&&g.push(`flex-wrap: ${p}`),"horizontal"===c?(m&&g.push(`align-items: ${m}`),d&&g.push(`justify-content: ${d}`)):(m&&g.push(`justify-content: ${m}`),g.push("flex-direction: column"),g.push(`align-items: ${f}`)),g.length&&(h=`${zd(r)} {\n\t\t\t\t${g.join("; ")};\n\t\t\t}`),a&&u&&(h+=Hd(r,s,"flex",u)),h},getOrientation(e){const{orientation:t="horizontal"}=e;return t},getAlignments:()=>[]};function Bp(e){let{layout:t,onChange:n,isToolbar:r=!1}=e;const{orientation:o="horizontal"}=t,i="horizontal"===o?Ip.center:Ip.top,{verticalAlignment:l=i}=t,a=e=>{n({...t,verticalAlignment:e})};if(r)return(0,v.createElement)(up,{onChange:a,value:l,controls:"horizontal"===o?["top","center","bottom","stretch"]:["top","center","bottom","space-between"]});const s=[{value:"flex-start",label:(0,N.__)("Align items top")},{value:"center",label:(0,N.__)("Align items center")},{value:"flex-end",label:(0,N.__)("Align items bottom")}];return(0,v.createElement)("fieldset",{className:"block-editor-hooks__flex-layout-vertical-alignment-control"},(0,v.createElement)("legend",null,(0,N.__)("Vertical alignment")),(0,v.createElement)("div",null,s.map(((e,t,n)=>(0,v.createElement)(Mo.ZP,{key:e,label:n,icon:t,isPressed:l===e,onClick:()=>a(e)})))))}function Lp(e){let{layout:t,onChange:n,isToolbar:r=!1}=e;const{justifyContent:o="left",orientation:i="horizontal"}=t,l=e=>{n({...t,justifyContent:e})},a=["left","center","right"];if("horizontal"===i?a.push("space-between"):a.push("stretch"),r)return(0,v.createElement)(fp,{allowedControls:a,value:o,onChange:l,popoverProps:{position:"bottom right",variant:"toolbar"}});const s=[{value:"left",icon:Fu.Z,label:(0,N.__)("Justify items left")},{value:"center",icon:ju.Z,label:(0,N.__)("Justify items center")},{value:"right",icon:zu.Z,label:(0,N.__)("Justify items right")}];return"horizontal"===i?s.push({value:"space-between",icon:Hu.Z,label:(0,N.__)("Space between items")}):s.push({value:"stretch",icon:Vu.Z,label:(0,N.__)("Stretch items")}),(0,v.createElement)(xd,{__nextHasNoMarginBottom:!0,label:(0,N.__)("Justification"),value:o,onChange:l,className:"block-editor-hooks__flex-layout-justification-controls"},s.map((e=>{let{value:t,icon:n,label:r}=e;return(0,v.createElement)(Fd,{key:t,value:t,icon:n,label:r})})))}function Pp(e){let{layout:t,onChange:n}=e;const{flexWrap:r="wrap"}=t;return(0,v.createElement)(jd.Z,{__nextHasNoMarginBottom:!0,label:(0,N.__)("Allow to wrap to multiple lines"),onChange:e=>{n({...t,flexWrap:e?"wrap":"nowrap"})},checked:"wrap"===r})}function Ap(e){let{layout:t,onChange:n}=e;const{orientation:r="horizontal",verticalAlignment:o,justifyContent:i}=t;return(0,v.createElement)(xd,{__nextHasNoMarginBottom:!0,className:"block-editor-hooks__flex-layout-orientation-controls",label:(0,N.__)("Orientation"),value:r,onChange:e=>{let r=o,l=i;return"horizontal"===e?("space-between"===o&&(r="center"),"stretch"===i&&(l="left")):("stretch"===o&&(r="top"),"space-between"===i&&(l="left")),n({...t,orientation:e,verticalAlignment:r,justifyContent:l})}},(0,v.createElement)(Fd,{icon:Wu.Z,value:"horizontal",label:(0,N.__)("Horizontal")}),(0,v.createElement)(Fd,{icon:$u.Z,value:"vertical",label:(0,N.__)("Vertical")}))}var Dp={name:"default",label:(0,N.__)("Flow"),inspectorControls:function(){return null},toolBarControls:function(){return null},getLayoutStyle:function(e){var t;let{selector:n,style:r,blockName:o,hasBlockGapSupport:i,layoutDefinitions:l}=e;const a=ep(null==r||null===(t=r.spacing)||void 0===t?void 0:t.blockGap);let s="";wp(o,"spacing","blockGap")||(null!=a&&a.top?s=ep(null==a?void 0:a.top):"string"==typeof a&&(s=ep(a)));let c="";return i&&s&&(c+=Hd(n,l,"default",s)),c},getOrientation:()=>"vertical",getAlignments(e,t){const n=Vd(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 r=[{name:"left"},{name:"center"},{name:"right"}];if(!t){const{contentSize:t,wideSize:o}=e;t&&r.unshift({name:"full"}),o&&r.unshift({name:"wide",info:n.wide})}return r.unshift({name:"none",info:n.none}),r}};const Rp="web"===ci.Z.OS,Mp={px:{value:"px",label:Rp?"px":(0,N.__)("Pixels (px)"),a11yLabel:(0,N.__)("Pixels (px)"),step:1},"%":{value:"%",label:Rp?"%":(0,N.__)("Percentage (%)"),a11yLabel:(0,N.__)("Percent (%)"),step:.1},em:{value:"em",label:Rp?"em":(0,N.__)("Relative to parent font size (em)"),a11yLabel:(0,N._x)("ems","Relative to parent font size (em)"),step:.01},rem:{value:"rem",label:Rp?"rem":(0,N.__)("Relative to root font size (rem)"),a11yLabel:(0,N._x)("rems","Relative to root font size (rem)"),step:.01},vw:{value:"vw",label:Rp?"vw":(0,N.__)("Viewport width (vw)"),a11yLabel:(0,N.__)("Viewport width (vw)"),step:.1},vh:{value:"vh",label:Rp?"vh":(0,N.__)("Viewport height (vh)"),a11yLabel:(0,N.__)("Viewport height (vh)"),step:.1},vmin:{value:"vmin",label:Rp?"vmin":(0,N.__)("Viewport smallest dimension (vmin)"),a11yLabel:(0,N.__)("Viewport smallest dimension (vmin)"),step:.1},vmax:{value:"vmax",label:Rp?"vmax":(0,N.__)("Viewport largest dimension (vmax)"),a11yLabel:(0,N.__)("Viewport largest dimension (vmax)"),step:.1},ch:{value:"ch",label:Rp?"ch":(0,N.__)("Width of the zero (0) character (ch)"),a11yLabel:(0,N.__)("Width of the zero (0) character (ch)"),step:.01},ex:{value:"ex",label:Rp?"ex":(0,N.__)("x-height of the font (ex)"),a11yLabel:(0,N.__)("x-height of the font (ex)"),step:.01},cm:{value:"cm",label:Rp?"cm":(0,N.__)("Centimeters (cm)"),a11yLabel:(0,N.__)("Centimeters (cm)"),step:.001},mm:{value:"mm",label:Rp?"mm":(0,N.__)("Millimeters (mm)"),a11yLabel:(0,N.__)("Millimeters (mm)"),step:.1},in:{value:"in",label:Rp?"in":(0,N.__)("Inches (in)"),a11yLabel:(0,N.__)("Inches (in)"),step:.001},pc:{value:"pc",label:Rp?"pc":(0,N.__)("Picas (pc)"),a11yLabel:(0,N.__)("Picas (pc)"),step:1},pt:{value:"pt",label:Rp?"pt":(0,N.__)("Points (pt)"),a11yLabel:(0,N.__)("Points (pt)"),step:1}},Op=Object.values(Mp),Zp=[Mp.px,Mp["%"],Mp.em,Mp.rem,Mp.vw,Mp.vh],Fp=Mp.px;function jp(e,t,n){return Hp(t?`${null!=e?e:""}${t}`:e,n)}function zp(e){return Array.isArray(e)&&!!e.length}function Hp(e){var t,n;let r,o,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Op;if(void 0!==e||null===e){r=`${e}`.trim();const t=parseFloat(r);o=isFinite(t)?t:void 0}const l=null===(t=r)||void 0===t?void 0:t.match(/[\d.\-\+]*\s*(.*)/),a=null==l||null===(n=l[1])||void 0===n?void 0:n.toLowerCase();let s;if(zp(i)){const e=i.find((e=>e.value===a));s=null==e?void 0:e.value}else s=Fp.value;return[o,s]}function Vp(e,t,n,r){const[o,i]=Hp(e,t),l=null!=o?o:n;let a=i||r;return!a&&zp(t)&&(a=t[0].value),[l,a]}const Wp=e=>{let{units:t=Op,availableUnits:n=[],defaultValues:r}=e;const o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return Array.isArray(t)?t.filter((t=>e.includes(t.value))):[]}(n,t);return r&&o.forEach(((e,t)=>{if(r[e.value]){const[n]=Hp(r[e.value]);o[t].default=n}})),o},$p="CHANGE",Up="COMMIT",Gp="CONTROL",qp="DRAG_END",Kp="DRAG_START",Yp="DRAG",Xp="INVALIDATE",Jp="PRESS_DOWN",Qp="PRESS_ENTER",em="PRESS_UP",tm="RESET";var nm=n(47799),rm=n(74731),om=n(88615),im=n(51377),lm=n(48234),am=n(47746);const sm=e=>e,cm={error:null,initialValue:"",isDirty:!1,isDragEnabled:!1,isDragging:!1,isPressEnterToChange:!1,value:""};function um(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:cm;const{value:t}=e;return{...cm,...e,initialValue:t}}function dm(e){return(t,n)=>{const r={...t};switch(n.type){case Gp:return r.value=n.payload.value,r.isDirty=!1,r._event=void 0,r;case em:case Jp:r.isDirty=!1;break;case Kp:r.isDragging=!0;break;case qp:r.isDragging=!1;break;case $p:r.error=null,r.value=n.payload.value,t.isPressEnterToChange&&(r.isDirty=!0);break;case Up:r.value=n.payload.value,r.isDirty=!1;break;case tm:r.error=null,r.isDirty=!1,r.value=n.payload.value||t.initialValue;break;case Xp:r.error=n.payload.error}return r._event=n.payload.event,e(r,n)}}const pm=()=>{},mm=(0,v.forwardRef)((function(e,t){let{disabled:n=!1,dragDirection:r="n",dragThreshold:o=10,id:i,isDragEnabled:l=!1,isFocused:a,isPressEnterToChange:s=!1,onBlur:c=pm,onChange:u=pm,onDrag:d=pm,onDragEnd:p=pm,onDragStart:m=pm,onFocus:f=pm,onKeyDown:h=pm,onValidate:g=pm,size:b="default",setIsFocused:y,stateReducer:_=(e=>e),value:k,type:x,...w}=e;const{state:C,change:E,commit:S,drag:I,dragEnd:T,dragStart:N,invalidate:B,pressDown:L,pressEnter:P,pressUp:A,reset:D}=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:sm,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:cm,n=arguments.length>2?arguments[2]:void 0;const[r,o]=(0,v.useReducer)(dm(e),um(t)),i=e=>(t,n)=>{o({type:e,payload:{value:t,event:n}})},l=e=>t=>{o({type:e,payload:{event:t}})},a=e=>t=>{o({type:e,payload:t})},s=i($p),c=(e,t)=>o({type:Xp,payload:{error:e,event:t}}),u=i(tm),d=i(Up),p=a(Kp),m=a(Yp),f=a(qp),h=l(em),g=l(Jp),b=l(Qp),y=(0,v.useRef)(r),_=(0,v.useRef)({value:t.value,onChangeHandler:n});return(0,v.useLayoutEffect)((()=>{y.current=r,_.current={value:t.value,onChangeHandler:n}})),(0,v.useLayoutEffect)((()=>{var e;void 0===y.current._event||r.value===_.current.value||r.isDirty||_.current.onChangeHandler(null!==(e=r.value)&&void 0!==e?e:"",{event:y.current._event})}),[r.value,r.isDirty]),(0,v.useLayoutEffect)((()=>{var e;t.value===y.current.value||y.current.isDirty||o({type:Gp,payload:{value:null!==(e=t.value)&&void 0!==e?e:""}})}),[t.value]),{change:s,commit:d,dispatch:o,drag:m,dragEnd:f,dragStart:p,invalidate:c,pressDown:g,pressEnter:b,pressUp:h,reset:u,state:r}}(_,{isDragEnabled:l,value:k,isPressEnterToChange:s},u),{value:R,isDragging:M,isDirty:O}=C,Z=(0,v.useRef)(!1),F=function(e,t){const n=function(e){let t="ns-resize";switch(e){case"n":case"s":t="ns-resize";break;case"e":case"w":t="ew-resize"}return t}(t);return(0,v.useEffect)((()=>{document.documentElement.style.cursor=e?n:null}),[e,n]),n}(M,r),j=e=>{const t=e.currentTarget.value;try{g(t),S(t,e)}catch(t){B(t,e)}},z=(0,lm.useDrag)((e=>{const{distance:t,dragging:n,event:r,target:o}=e;if(e.event={...e.event,target:o},t){if(r.stopPropagation(),!n)return p(e),void T(e);d(e),I(e),M||(m(e),N(e))}}),{axis:"e"===r||"w"===r?"x":"y",threshold:o,enabled:l,pointer:{capture:!1}}),H=l?z():{};let V;return"number"===x&&(V=e=>{var t;null===(t=w.onMouseDown)||void 0===t||t.call(w,e),e.currentTarget!==e.currentTarget.ownerDocument.activeElement&&e.currentTarget.focus()}),(0,v.createElement)(am.II,(0,Po.Z)({},w,H,{className:"components-input-control__input",disabled:n,dragCursor:F,isDragging:M,id:i,onBlur:e=>{c(e),null==y||y(!1),!O&&e.target.validity.valid||(Z.current=!0,j(e))},onChange:e=>{const t=e.target.value;E(t,e)},onFocus:e=>{f(e),null==y||y(!0)},onKeyDown:e=>{const{key:t}=e;switch(h(e),t){case"ArrowUp":A(e);break;case"ArrowDown":L(e);break;case"Enter":P(e),s&&(e.preventDefault(),j(e));break;case"Escape":s&&O&&(e.preventDefault(),D(k,e))}},onMouseDown:V,ref:t,inputSize:b,value:null!=R?R:"",type:x}))}));var fm=mm,hm=n(17213);const gm=()=>{},vm=(0,v.forwardRef)((function(e,t){let{__next36pxDefaultSize:n,__unstableStateReducer:r=(e=>e),__unstableInputWidth:o,className:i,disabled:l=!1,help:a,hideLabelFromVision:s=!1,id:c,isPressEnterToChange:u=!1,label:d,labelPosition:p="top",onChange:m=gm,onValidate:f=gm,onKeyDown:h=gm,prefix:g,size:b="default",style:y,suffix:_,value:k,...x}=e;const[C,E]=(0,v.useState)(!1),S=function(e){const t=(0,dd.Z)(vm);return e||`inspector-input-control-${t}`}(c),I=w()("components-input-control",i),T=function(e){const t=(0,v.useRef)(e.value),[n,r]=(0,v.useState)({}),o=void 0!==n.value?n.value:e.value;return(0,v.useLayoutEffect)((()=>{const{current:o}=t;t.current=e.value,void 0===n.value||n.isStale?n.isStale&&e.value!==o&&r({}):r({...n,isStale:!0})}),[e.value,n]),{value:o,onBlur:t=>{var n;r({}),null===(n=e.onBlur)||void 0===n||n.call(e,t)},onChange:(t,n)=>{r((e=>Object.assign(e,{value:t,isStale:!1}))),e.onChange(t,n)}}}({value:k,onBlur:x.onBlur,onChange:m}),N=a?{["string"==typeof a?"aria-describedby":"aria-details"]:`${S}__help`}:{};return(0,v.createElement)(Xu.ZP,{className:I,help:a,id:S,__nextHasNoMarginBottom:!0},(0,v.createElement)(im.Z,{__next36pxDefaultSize:n,__unstableInputWidth:o,disabled:l,gap:3,hideLabelFromVision:s,id:S,isFocused:C,justify:"left",label:d,labelPosition:p,prefix:g,size:b,style:y,suffix:_},(0,v.createElement)(fm,(0,Po.Z)({},x,N,{__next36pxDefaultSize:n,className:"components-input-control__input",disabled:l,id:S,isFocused:C,isPressEnterToChange:u,onKeyDown:h,onValidate:f,paddingInlineStart:g?(0,hm.D)(2):void 0,paddingInlineEnd:_?(0,hm.D)(2):void 0,ref:t,setIsFocused:E,size:b,stateReducer:r},T))))}));var bm=vm,ym={name:"euqsgg",styles:"input[type='number']::-webkit-outer-spin-button,input[type='number']::-webkit-inner-spin-button{-webkit-appearance:none!important;margin:0!important;}input[type='number']{-moz-appearance:textfield;}"};const _m=e=>{let{hideHTMLArrows:t}=e;return t?ym:""},km=(0,Ju.Z)(bm,{target:"ep09it41"})(_m,";"),xm=e=>{let{size:t}=e;return"small"!==t?"":(0,Qu.iv)("width:",(0,hm.D)(5),";min-width:",(0,hm.D)(5),";height:",(0,hm.D)(5),";","")},wm=(0,Ju.Z)(Mo.ZP,{target:"ep09it40"})("&&&&&{color:",ed.D.ui.theme,";",xm,";}");function Cm(e){const t=Number(e);return isNaN(t)?0:t}function Em(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce(((e,t)=>e+Cm(t)),0)}function Sm(e){const t=(e+"").split(".");return void 0!==t[1]?t[1].length:0}function Im(e,t,n){const r=Cm(e);return Math.max(t,Math.min(r,n))}function Tm(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;const o=Cm(e),i=Cm(r),l=Sm(r),a=Math.round(o/i)*i,s=Im(a,t,n);return l?Cm(s.toFixed(l)):s}var Nm=n(28660),Bm=n(42824),Lm=n(52433);const Pm=()=>{},Am=(0,v.forwardRef)((function(e,t){let{__unstableStateReducer:n,className:r,dragDirection:o="n",hideHTMLArrows:i=!1,spinControls:l="native",isDragEnabled:a=!0,isShiftStepEnabled:s=!0,label:c,max:u=1/0,min:d=-1/0,required:p=!1,shiftStep:m=10,step:f=1,type:h="number",value:g,size:b="default",suffix:y,onChange:_=Pm,...k}=e;i&&((0,St.default)("wp.components.NumberControl hideHTMLArrows prop ",{alternative:'spinControls="none"',since:"6.2",version:"6.3"}),l="none");const x=(0,v.useRef)(),C=(0,vl.Z)([x,t]),E="any"===f,S=E?1:(0,Nm.q9)(f),I=Tm(0,d,u,S),T=(e,t)=>E?Math.min(u,Math.max(d,(0,Nm.q9)(e))):Tm(e,d,u,null!=t?t:S),B="number"===h?"off":void 0,L=w()("components-number-control",r),P=(e,t,n)=>{null==n||n.preventDefault();const r=(null==n?void 0:n.shiftKey)&&s,o=r?(0,Nm.q9)(m)*S:S;let i=(0,Nm.Wx)(e)?I:e;return"up"===t?i=Em(i,o):"down"===t&&(i=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce(((e,t,n)=>{const r=Cm(t);return 0===n?r:e-r}),0)}(i,o)),T(i,r?o:void 0)},A=e=>t=>_(String(P(g,e,t)),{event:{...t,target:x.current}});return(0,v.createElement)(km,(0,Po.Z)({autoComplete:B,inputMode:"numeric"},k,{className:L,dragDirection:o,hideHTMLArrows:"native"!==l,isDragEnabled:a,label:c,max:u,min:d,ref:C,required:p,step:f,type:h,value:g,__unstableStateReducer:(e,t)=>{var r;const i=((e,t)=>{const n={...e},{type:r,payload:i}=t,l=i.event,c=n.value;if(r!==em&&r!==Jp||(n.value=P(c,r===em?"up":"down",l)),r===Yp&&a){const[e,t]=i.delta,r=i.shiftKey&&s,l=r?(0,Nm.q9)(m)*S:S;let a,u;switch(o){case"n":u=t,a=-1;break;case"e":u=e,a=(0,N.isRTL)()?-1:1;break;case"s":u=t,a=1;break;case"w":u=e,a=(0,N.isRTL)()?1:-1}if(0!==u){u=Math.ceil(Math.abs(u))*Math.sign(u);const e=u*l*a;n.value=T(Em(c,e),r?l:void 0)}}if(r===Qp||r===Up){const e=!1===p&&""===c;n.value=e?c:T(c)}return n})(e,t);return null!==(r=null==n?void 0:n(i,t))&&void 0!==r?r:i},size:b,suffix:"custom"===l?(0,v.createElement)(v.Fragment,null,y,(0,v.createElement)(Lm.Z,{marginBottom:0,marginRight:2},(0,v.createElement)(Bm.Z,{spacing:1},(0,v.createElement)(wm,{icon:rm.Z,isSmall:!0,"aria-hidden":"true","aria-label":(0,N.__)("Increment"),tabIndex:-1,onClick:A("up"),size:b}),(0,v.createElement)(wm,{icon:om.Z,isSmall:!0,"aria-hidden":"true","aria-label":(0,N.__)("Decrement"),tabIndex:-1,onClick:A("down"),size:b})))):y,onChange:_}))}));var Dm=Am;const Rm=(0,Ju.Z)(Dm,{target:"e1bagdl32"})("&&&{input{display:block;width:100%;}",am.Kg,"{transition:box-shadow 0.1s linear;}}"),Mm=e=>{let{selectSize:t}=e;const n={default:(0,Qu.iv)("box-sizing:border-box;padding:2px 1px;width:20px;color:",ed.D.gray[800],";font-size:8px;line-height:1;letter-spacing:-0.5px;text-transform:uppercase;text-align-last:center;",""),large:(0,Qu.iv)("box-sizing:border-box;min-width:24px;max-width:48px;height:24px;margin-inline-end:",(0,hm.D)(2),";padding:",(0,hm.D)(1),";color:",ed.D.ui.theme,";font-size:13px;line-height:1;text-align-last:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;","")};return"__unstable-large"===t?n.large:n.default},Om=(0,Ju.Z)("div",{target:"e1bagdl31"})("&&&{pointer-events:none;",Mm,";color:",ed.D.gray[900],";}"),Zm=(0,Ju.Z)("select",{target:"e1bagdl30"})("&&&{appearance:none;background:transparent;border-radius:2px;border:none;display:block;outline:none;margin:0;min-height:auto;font-family:inherit;",Mm,";",(e=>{let{selectSize:t="default"}=e;const n={default:(0,Qu.iv)("height:100%;border:1px solid transparent;transition:box-shadow 0.1s linear,border 0.1s linear;",(0,nm.b)({borderTopLeftRadius:0,borderBottomLeftRadius:0})()," &:not(:disabled):hover{background-color:",ed.D.gray[100],";}&:focus{border:1px solid ",ed.D.ui.borderFocus,";box-shadow:inset 0 0 0 ",td.Z.borderWidth+" "+ed.D.ui.borderFocus,";outline-offset:0;outline:2px solid transparent;z-index:1;}",""),large:(0,Qu.iv)("display:flex;justify-content:center;align-items:center;&:hover{color:",ed.D.ui.borderFocus,";box-shadow:inset 0 0 0 ",td.Z.borderWidth+" "+ed.D.ui.borderFocus,";outline:",td.Z.borderWidth," solid transparent;}&:focus{box-shadow:0 0 0 ",td.Z.borderWidthFocus+" "+ed.D.ui.borderFocus,";outline:",td.Z.borderWidthFocus," solid transparent;}","")};return"__unstable-large"===t?n.large:n.default}),";&:not( :disabled ){cursor:pointer;}}");function Fm(e){let{className:t,isUnitSelectTabbable:n=!0,onChange:r,size:o="default",unit:i="px",units:l=Zp,...a}=e;if(!zp(l)||1===(null==l?void 0:l.length))return(0,v.createElement)(Om,{className:"components-unit-control__unit-label",selectSize:o},i);const s=w()("components-unit-control__select",t);return(0,v.createElement)(Zm,(0,Po.Z)({className:s,onChange:e=>{const{value:t}=e.target,n=l.find((e=>e.value===t));null==r||r(t,{event:e,data:n})},selectSize:o,tabIndex:n?void 0:-1,value:i},a),l.map((e=>(0,v.createElement)("option",{value:e.value,key:e.value},e.label))))}var jm=n(85494);const zm=(0,v.forwardRef)((function(e,t){const{__unstableStateReducer:n,autoComplete:r="off",children:o,className:i,disabled:l=!1,disableUnits:a=!1,isPressEnterToChange:s=!1,isResetValueOnUnitChange:c=!1,isUnitSelectTabbable:u=!0,label:d,onChange:p,onUnitChange:m,size:f="default",unit:h,units:g=Zp,value:b,onBlur:y,onFocus:_,...k}=e;"unit"in e&&(0,St.default)("UnitControl unit prop",{since:"5.6",hint:"The unit should be provided within the `value` prop.",version:"6.2"});const x=null!=b?b:void 0,C=(0,v.useMemo)((()=>function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Op;const r=Array.isArray(n)?[...n]:[],[,o]=jp(e,t,Op);return o&&!r.some((e=>e.value===o))&&Mp[o]&&r.unshift(Mp[o]),r}(x,h,g)),[x,h,g]),[E,S]=jp(x,h,C),[I,T]=(0,jm.Z)(1===C.length?C[0].value:h,{initial:S,fallback:""});(0,v.useEffect)((()=>{void 0!==S&&T(S)}),[S,T]);const B=(0,v.useRef)(void 0),L=w()("components-unit-control","components-unit-control-wrapper",i),P=e=>{if(!isNaN(Number(e.currentTarget.value)))return void(B.current=void 0);const[t,n]=Vp(e.currentTarget.value,C,E,I);if(B.current=t,s&&n!==I){const t={event:e,data:Array.isArray(C)?C.find((e=>e.value===n)):void 0};null==m||m(n,t),T(n)}},A=(e,t)=>{const n={...e};var r;return t.type===Up&&void 0!==B.current&&(n.value=(null!==(r=B.current)&&void 0!==r?r:"").toString(),B.current=void 0),n};let D=A;n&&(D=(e,t)=>{const r=A(e,t);return n(r,t)});const R=a?null:(0,v.createElement)(Fm,{"aria-label":(0,N.__)("Select unit"),disabled:l,isUnitSelectTabbable:u,onChange:(e,t)=>{const{data:n}=t;let r=`${null!=E?E:""}${e}`;c&&void 0!==(null==n?void 0:n.default)&&(r=`${n.default}${e}`),null==p||p(r,t),null==m||m(e,t),T(e)},size:f,unit:I,units:C,onBlur:y,onFocus:_});let M=k.step;if(!M&&C){var O;const e=C.find((e=>e.value===I));M=null!==(O=null==e?void 0:e.step)&&void 0!==O?O:1}return(0,v.createElement)(Rm,(0,Po.Z)({type:s?"text":"number"},k,{autoComplete:r,className:L,disabled:l,spinControls:"none",isPressEnterToChange:s,label:d,onBlur:e=>{P(e),null==y||y(e)},onKeyDown:e=>{const{key:t}=e;"Enter"===t&&P(e)},onChange:(e,t)=>{if(""===e||null==e)return void(null==p||p("",t));const n=Vp(e,C,E,I).join("");null==p||p(n,t)},ref:t,size:f,suffix:R,value:null!=E?E:"",step:M,__unstableStateReducer:D,onFocus:_}))}));var Hm=zm,Vm=n(85180),Wm=n(83295),$m=n(25538);const Um="var:";function Gm(e,t,n,r){const o=(0,U.get)(e,n);return o?[{selector:null==t?void 0:t.selector,key:r,value:Km(o)}]:[]}function qm(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:["top","right","bottom","left"];const i=(0,U.get)(e,n);if(!i)return[];const l=[];if("string"==typeof i)l.push({selector:null==t?void 0:t.selector,key:r.default,value:i});else{const e=o.reduce(((e,n)=>{const o=Km((0,U.get)(i,[n]));return o&&e.push({selector:null==t?void 0:t.selector,key:null==r?void 0:r.individual.replace("%s",Ym(n)),value:o}),e}),[]);l.push(...e)}return l}function Km(e){return"string"==typeof e&&e.startsWith(Um)?`var(--wp--${e.slice(Um.length).split("|").map((e=>(0,U.kebabCase)(e))).join("--")})`:e}function Ym(e){const[t,...n]=e;return t.toUpperCase()+n.join("")}function Xm(e){return(t,n)=>Gm(t,n,e,function(e){const[t,...n]=e;return t.toLowerCase()+n.map(Ym).join("")}(e))}function Jm(e){return(t,n)=>["color","style","width"].flatMap((r=>Xm(["border",e,r])(t,n)))}const Qm={name:"radius",generate:(e,t)=>qm(e,t,["border","radius"],{default:"borderRadius",individual:"border%sRadius"},["topLeft","topRight","bottomLeft","bottomRight"])},ef={name:"background",generate:(e,t)=>Gm(e,t,["color","background"],"backgroundColor")},tf={name:"gradient",generate:(e,t)=>Gm(e,t,["color","gradient"],"background")},nf={name:"text",generate:(e,t)=>Gm(e,t,["color","text"],"color")},rf={name:"minHeight",generate:(e,t)=>Gm(e,t,["dimensions","minHeight"],"minHeight")},of={name:"shadow",generate:(e,t)=>Gm(e,t,["shadow"],"boxShadow")},lf={name:"color",generate:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:["outline","color"],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"outlineColor";return Gm(e,t,n,r)}},af={name:"offset",generate:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:["outline","offset"],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"outlineOffset";return Gm(e,t,n,r)}},sf={name:"style",generate:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:["outline","style"],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"outlineStyle";return Gm(e,t,n,r)}},cf={name:"width",generate:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:["outline","width"],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"outlineWidth";return Gm(e,t,n,r)}},uf={name:"padding",generate:(e,t)=>qm(e,t,["spacing","padding"],{default:"padding",individual:"padding%s"})},df={name:"margin",generate:(e,t)=>qm(e,t,["spacing","margin"],{default:"margin",individual:"margin%s"})},pf={name:"fontSize",generate:(e,t)=>Gm(e,t,["typography","fontSize"],"fontSize")},mf={name:"fontStyle",generate:(e,t)=>Gm(e,t,["typography","fontStyle"],"fontStyle")},ff={name:"fontWeight",generate:(e,t)=>Gm(e,t,["typography","fontWeight"],"fontWeight")},hf={name:"fontFamily",generate:(e,t)=>Gm(e,t,["typography","fontFamily"],"fontFamily")},gf={name:"letterSpacing",generate:(e,t)=>Gm(e,t,["typography","letterSpacing"],"letterSpacing")},vf={name:"lineHeight",generate:(e,t)=>Gm(e,t,["typography","lineHeight"],"lineHeight")},bf={name:"textColumns",generate:(e,t)=>Gm(e,t,["typography","textColumns"],"columnCount")},yf={name:"textDecoration",generate:(e,t)=>Gm(e,t,["typography","textDecoration"],"textDecoration")},_f={name:"textTransform",generate:(e,t)=>Gm(e,t,["typography","textTransform"],"textTransform")},kf=[{name:"color",generate:Xm(["border","color"])},{name:"style",generate:Xm(["border","style"])},{name:"width",generate:Xm(["border","width"])},Qm,{name:"borderTop",generate:Jm("top")},{name:"borderRight",generate:Jm("right")},{name:"borderBottom",generate:Jm("bottom")},{name:"borderLeft",generate:Jm("left")},nf,tf,ef,rf,lf,sf,af,cf,df,uf,hf,pf,mf,ff,gf,vf,bf,yf,_f,of];function xf(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=wf(e,t);if(null==t||!t.selector){const e=[];return n.forEach((t=>{e.push(`${(0,U.kebabCase)(t.key)}: ${t.value};`)})),e.join(" ")}const r=(0,U.groupBy)(n,"selector"),o=Object.keys(r).reduce(((e,t)=>(e.push(`${t} { ${r[t].map((e=>`${(0,U.kebabCase)(e.key)}: ${e.value};`)).join(" ")} }`),e)),[]);return o.join("\n")}function wf(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=[];return kf.forEach((r=>{"function"==typeof r.generate&&n.push(...r.generate(e,t))})),n}var Cf={name:"constrained",label:(0,N.__)("Constrained"),inspectorControls:function(e){let{layout:t,onChange:n}=e;const{wideSize:r,contentSize:o,justifyContent:i="center"}=t,l=[{value:"left",icon:Fu.Z,label:(0,N.__)("Justify items left")},{value:"center",icon:ju.Z,label:(0,N.__)("Justify items center")},{value:"right",icon:zu.Z,label:(0,N.__)("Justify items right")}],a=Wp({availableUnits:bp("spacing.units")||["%","px","em","rem","vw"]});return(0,v.createElement)(v.Fragment,null,(0,v.createElement)("div",{className:"block-editor-hooks__layout-controls"},(0,v.createElement)("div",{className:"block-editor-hooks__layout-controls-unit"},(0,v.createElement)(Hm,{className:"block-editor-hooks__layout-controls-unit-input",label:(0,N.__)("Content"),labelPosition:"top",__unstableInputWidth:"80px",value:o||r||"",onChange:e=>{e=0>parseFloat(e)?"0":e,n({...t,contentSize:e})},units:a}),(0,v.createElement)(Vm.Z,{icon:Wm.Z})),(0,v.createElement)("div",{className:"block-editor-hooks__layout-controls-unit"},(0,v.createElement)(Hm,{className:"block-editor-hooks__layout-controls-unit-input",label:(0,N.__)("Wide"),labelPosition:"top",__unstableInputWidth:"80px",value:r||o||"",onChange:e=>{e=0>parseFloat(e)?"0":e,n({...t,wideSize:e})},units:a}),(0,v.createElement)(Vm.Z,{icon:$m.Z}))),(0,v.createElement)("p",{className:"block-editor-hooks__layout-controls-helptext"},(0,N.__)("Customize the width for all elements that are assigned to the center or wide columns.")),(0,v.createElement)(xd,{__nextHasNoMarginBottom:!0,label:(0,N.__)("Justification"),value:i,onChange:e=>{n({...t,justifyContent:e})}},l.map((e=>{let{value:t,icon:n,label:r}=e;return(0,v.createElement)(Fd,{key:t,value:t,icon:n,label:r})}))))},toolBarControls:function(){return null},getLayoutStyle:function(e){var t,n;let{selector:r,layout:o={},style:i,blockName:l,hasBlockGapSupport:a,layoutDefinitions:s}=e;const{contentSize:c,wideSize:u,justifyContent:d}=o,p=ep(null==i||null===(t=i.spacing)||void 0===t?void 0:t.blockGap);let m="";wp(l,"spacing","blockGap")||(null!=p&&p.top?m=ep(null==p?void 0:p.top):"string"==typeof p&&(m=ep(p)));const f="left"===d?"0 !important":"auto !important",h="right"===d?"0 !important":"auto !important";let g=c||u?`\n\t\t\t\t\t${zd(r,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")} {\n\t\t\t\t\t\tmax-width: ${null!=c?c:u};\n\t\t\t\t\t\tmargin-left: ${f};\n\t\t\t\t\t\tmargin-right: ${h};\n\t\t\t\t\t}\n\t\t\t\t\t${zd(r,"> .alignwide")}  {\n\t\t\t\t\t\tmax-width: ${null!=u?u:c};\n\t\t\t\t\t}\n\t\t\t\t\t${zd(r,"> .alignfull")} {\n\t\t\t\t\t\tmax-width: none;\n\t\t\t\t\t}\n\t\t\t\t`:"";return"left"===d?g+=`${zd(r,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")}\n\t\t\t{ margin-left: ${f}; }`:"right"===d&&(g+=`${zd(r,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")}\n\t\t\t{ margin-right: ${h}; }`),null!=i&&null!==(n=i.spacing)&&void 0!==n&&n.padding&&wf(i).forEach((e=>{"paddingRight"===e.key?g+=`\n\t\t\t\t\t${zd(r,"> .alignfull")} {\n\t\t\t\t\t\tmargin-right: calc(${e.value} * -1);\n\t\t\t\t\t}\n\t\t\t\t\t`:"paddingLeft"===e.key&&(g+=`\n\t\t\t\t\t${zd(r,"> .alignfull")} {\n\t\t\t\t\t\tmargin-left: calc(${e.value} * -1);\n\t\t\t\t\t}\n\t\t\t\t\t`)})),a&&m&&(g+=Hd(r,s,"constrained",m)),g},getOrientation:()=>"vertical",getAlignments(e){const t=Vd(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:r}=e,o=[{name:"left"},{name:"center"},{name:"right"}];return n&&o.unshift({name:"full"}),r&&o.unshift({name:"wide",info:t.wide}),o.unshift({name:"none",info:t.none}),o}};const Ef=[Dp,Np,Cf];function Sf(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return Ef.find((t=>t.name===e))}const If={type:"default"},Tf=(0,v.createContext)(If),Nf=Tf.Provider;function Bf(){return(0,v.useContext)(Tf)}function Lf(e){let{layout:t={},css:n,...r}=e;const o=Sf(t.type),i=null!==bp("spacing.blockGap");if(o){var l;if(n)return(0,v.createElement)("style",null,n);const e=null===(l=o.getLayoutStyle)||void 0===l?void 0:l.call(o,{hasBlockGapSupport:i,layout:t,...r});if(e)return(0,v.createElement)("style",null,e)}return null}const Pf=[],Af=["none","left","center","right","wide","full"],Df=["wide","full"];function Rf(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Af;e.includes("none")||(e=["none",...e]);const{wideControlsEnabled:t=!1,themeSupportsLayout:n,isBlockBasedTheme:r}=(0,E.Z)((e=>{const{getSettings:t}=e(ku),n=t();return{wideControlsEnabled:n.alignWide,themeSupportsLayout:n.supportsLayout,isBlockBasedTheme:n.__unstableIsBlockBasedTheme}}),[]),o=Bf(),i=Sf(null==o?void 0:o.type),l=i.getAlignments(o,r);if(n){const t=l.filter((t=>{let{name:n}=t;return e.includes(n)}));return 1===t.length&&"none"===t[0].name?Pf:t}if("default"!==i.name&&"constrained"!==i.name)return Pf;const{alignments:a=Af}=o,s=e.filter((e=>(o.alignments||t||!Df.includes(e))&&a.includes(e))).map((e=>({name:e})));return 1===s.length&&"none"===s[0].name?Pf:s}var Mf=n(12674),Of=n(17357),Zf=n(27863),Ff=n(94877);const jf={none:{icon:Mf.Z,title:(0,N._x)("None","Alignment option")},left:{icon:Of.Z,title:(0,N.__)("Align left")},center:{icon:Wm.Z,title:(0,N.__)("Align center")},right:{icon:Zf.Z,title:(0,N.__)("Align right")},wide:{icon:$m.Z,title:(0,N.__)("Wide width")},full:{icon:Ff.Z,title:(0,N.__)("Full width")}},zf={variant:"toolbar"};var Hf=function(e){let{value:t,onChange:n,controls:r,isToolbar:o,isCollapsed:i=!0}=e;const l=Rf(r);if(!l.length)return null;function a(e){n([t,"none"].includes(e)?void 0:e)}const s=jf[t],c=jf.none,u=o?Vo:Mu,d={icon:s?s.icon:c.icon,label:(0,N.__)("Align")},p=o?{isCollapsed:i,controls:l.map((e=>{let{name:n}=e;return{...jf[n],isActive:t===n||!t&&"none"===n,role:i?"menuitemradio":void 0,onClick:()=>a(n)}}))}:{toggleProps:{describedBy:(0,N.__)("Change alignment")},popoverProps:zf,children:e=>{let{onClose:n}=e;return(0,v.createElement)(v.Fragment,null,(0,v.createElement)(Ou.Z,{className:"block-editor-block-alignment-control__menu-group"},l.map((e=>{let{name:r,info:o}=e;const{icon:i,title:l}=jf[r],s=r===t||!t&&"none"===r;return(0,v.createElement)(Zu.Z,{key:r,icon:i,iconPosition:"left",className:w()("components-dropdown-menu__menu-item",{"is-active":s}),isSelected:s,onClick:()=>{a(r),n()},role:"menuitemradio",info:o},l)}))))}};return(0,v.createElement)(u,(0,Po.Z)({},d,p))};const Vf=e=>(0,v.createElement)(Hf,(0,Po.Z)({},e,{isToolbar:!1})),Wf=["left","center","right","wide","full"],$f=["wide","full"];function Uf(e){let t,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return t=Array.isArray(e)?Wf.filter((t=>e.includes(t))):!0===e?[...Wf]:[],!r||!0===e&&!n?t.filter((e=>!$f.includes(e))):t}const Gf=(0,Ao.o)((e=>t=>{const n=(0,v.createElement)(e,(0,Po.Z)({key:"edit"},t)),{name:r}=t,o=Rf(Uf(fe(r,"align"),he(r,"alignWide",!0))).map((e=>{let{name:t}=e;return t})),i=(0,E.Z)((e=>e(ku).__unstableGetContentLockingParent(t.clientId)),[t.clientId]);return!o.length||i?n:(0,v.createElement)(v.Fragment,null,(0,v.createElement)(Ru,{group:"block",__experimentalShareWithChildBlocks:!0},(0,v.createElement)(Vf,{value:t.attributes.align,onChange:e=>{if(!e){var n,r;const o=pe(t.name);(null==o||null===(n=o.attributes)||void 0===n||null===(r=n.align)||void 0===r?void 0:r.default)&&(e="")}t.setAttributes({align:e})},controls:o})),n)}),"withToolbarControls"),qf=(0,Ao.o)((e=>t=>{const{name:n,attributes:r}=t,{align:o}=r,i=Rf(Uf(fe(n,"align"),he(n,"alignWide",!0)));if(void 0===o)return(0,v.createElement)(e,t);let l=t.wrapperProps;return i.some((e=>e.name===o))&&(l={...l,"data-align":o}),(0,v.createElement)(e,(0,Po.Z)({},t,{wrapperProps:l}))}));(0,_e.KJ)("blocks.registerBlockType","core/align/addAttribute",(function(e){var t,n;return"type"in(null!==(t=null===(n=e.attributes)||void 0===n?void 0:n.align)&&void 0!==t?t:{})||he(e,"align")&&(e.attributes={...e.attributes,align:{type:"string",enum:[...Wf,""]}}),e})),(0,_e.KJ)("editor.BlockListBlock","core/editor/align/with-data-align",qf),(0,_e.KJ)("editor.BlockEdit","core/editor/align/with-toolbar-controls",Gf),(0,_e.KJ)("blocks.getSaveContent.extraProps","core/align/addAssignedAlign",(function(e,t,n){const{align:r}=n;return Uf(fe(t,"align"),he(t,"alignWide",!0)).includes(r)&&(e.className=w()(`align${r}`,e.className)),e})),(0,_e.KJ)("blocks.registerBlockType","core/lock/addAttribute",(function(e){var t,n;return"type"in(null!==(t=null===(n=e.attributes)||void 0===n?void 0:n.lock)&&void 0!==t?t:{})||(e.attributes={...e.attributes,lock:{type:"object"}}),e}));var Kf=n(8902),Yf=n(94688),Xf=n(29813);const Jf=()=>{},Qf=(0,v.createContext)({menuItems:{default:{},optional:{}},hasMenuItems:!1,isResetting:!1,shouldRenderPlaceholderItems:!1,registerPanelItem:Jf,deregisterPanelItem:Jf,flagItemCustomization:Jf,registerResetAllFilter:Jf,deregisterResetAllFilter:Jf,areAllOptionalControlsHidden:!0}),eh=()=>(0,v.useContext)(Qf),th=(0,I.up)("InspectorControls"),nh=(0,I.up)("InspectorAdvancedControls"),rh=(0,I.up)("InspectorControlsBorder"),oh=(0,I.up)("InspectorControlsColor"),ih=(0,I.up)("InspectorControlsDimensions"),lh=(0,I.up)("InspectorControlsPosition"),ah=(0,I.up)("InspectorControlsTypography");var sh={default:th,advanced:nh,border:rh,color:oh,dimensions:ih,list:(0,I.up)("InspectorControlsListView"),settings:th,styles:(0,I.up)("InspectorControlsStyles"),typography:ah,position:lh};function ch(e){var t;let{children:n,group:r="default",__experimentalGroup:o,resetAllFilter:i}=e;o&&((0,St.default)("`__experimentalGroup` property in `InspectorControlsFill`",{since:"6.2",version:"6.4",alternative:"`group`"}),r=o);const l=Iu(),a=null===(t=sh[r])||void 0===t?void 0:t.Fill;return a?l?(0,v.createElement)(Do.Z,{document:document},(0,v.createElement)(a,null,(e=>(0,v.createElement)(uh,{fillProps:e,children:n,resetAllFilter:i})))):null:("undefined"!=typeof process&&process.env,null)}function uh(e){let{children:t,resetAllFilter:n,fillProps:r}=e;const{registerResetAllFilter:o,deregisterResetAllFilter:i}=r;(0,v.useEffect)((()=>(n&&o&&o(n),()=>{n&&i&&i(n)})),[n,o,i]);const l=(0,U.isEmpty)(r)?null:r;return(0,v.createElement)(Qf.Provider,{value:l},t)}var dh=n(96972),ph=n(71458),mh=n(74457),fh=n(48052),hh=n(8706),gh=(0,Ku.Iq)((function(e,t){const n=function(e){const{as:t,level:n=2,...r}=(0,qu.y)(e,"Heading"),o=t||`h${n}`,i={};return"string"==typeof o&&"h"!==o[0]&&(i.role="heading",i["aria-level"]="string"==typeof n?parseInt(n):n),{...(0,fh.Z)({color:ed.D.gray[900],size:(0,hh.gZ)(n),isBlock:!0,weight:td.Z.fontWeightHeading,...r}),...i,as:o}}(e);return(0,v.createElement)(md.Z,(0,Po.Z)({},n,{ref:t}))}),"Heading"),vh=n(69659);const bh={columns:e=>(0,Qu.iv)("grid-template-columns:",`repeat( ${e}, minmax(0, 1fr) )`,";",""),spacing:(0,Qu.iv)("column-gap:",(0,hm.D)(2),";row-gap:",(0,hm.D)(4),";",""),item:{fullWidth:{name:"18iuzk9",styles:"grid-column:1/-1"}}},yh={name:"huufmu",styles:">div:not( :first-of-type ){display:none;}"},_h=(0,Qu.iv)(bh.item.fullWidth," gap:",(0,hm.D)(2),";.components-dropdown-menu{margin:",(0,hm.D)(-1)," 0;line-height:0;}&&&& .components-dropdown-menu__toggle{padding:0;min-width:",(0,hm.D)(6),";}",""),kh={name:"1pmxm02",styles:"font-size:inherit;font-weight:500;line-height:normal;&&{margin:0;}"},xh=(0,Qu.iv)(bh.item.fullWidth,"&>div,&>fieldset{padding-bottom:0;margin-bottom:0;max-width:100%;}&& ",vh.im,"{margin-bottom:0;",vh.ob,":last-child{margin-bottom:0;}}",vh.vB,"{margin-bottom:0;}&& ",am.ub,"{label{line-height:1.4em;}}",""),wh={name:"eivff4",styles:"display:none"},Ch={name:"16gsvie",styles:"min-width:200px"},Eh=(0,Ju.Z)("span",{target:"ews648u0"})("color:",ed.D.ui.themeDark10,";font-size:11px;font-weight:500;line-height:1.4;",(0,nm.b)({marginLeft:(0,hm.D)(3)})," text-transform:uppercase;"),Sh=(0,Qu.iv)("color:",ed.D.gray[900],";&&[aria-disabled='true']{color:",ed.D.gray[700],";opacity:1;&:hover{color:",ed.D.gray[700],";}",Eh,"{opacity:0.3;}}",""),Ih=e=>{let{itemClassName:t,items:n,toggleItem:r}=e;if(!n.length)return null;const o=(0,v.createElement)(Eh,{"aria-hidden":!0},(0,N.__)("Reset"));return(0,v.createElement)(Ou.Z,{label:(0,N.__)("Defaults")},n.map((e=>{let[n,i]=e;return i?(0,v.createElement)(Zu.Z,{key:n,className:t,role:"menuitem",label:(0,N.sprintf)((0,N.__)("Reset %s"),n),onClick:()=>{r(n),(0,fl.D)((0,N.sprintf)((0,N.__)("%s reset to default"),n),"assertive")},suffix:o},n):(0,v.createElement)(Zu.Z,{key:n,className:t,role:"menuitemcheckbox",isSelected:!0,"aria-disabled":!0},n)})))},Th=e=>{let{items:t,toggleItem:n}=e;return t.length?(0,v.createElement)(Ou.Z,{label:(0,N.__)("Tools")},t.map((e=>{let[t,r]=e;const o=r?(0,N.sprintf)((0,N.__)("Hide and reset %s"),t):(0,N.sprintf)((0,N.__)("Show %s"),t);return(0,v.createElement)(Zu.Z,{key:t,icon:r&&ph.Z,isSelected:r,label:o,onClick:()=>{r?(0,fl.D)((0,N.sprintf)((0,N.__)("%s hidden and reset to default"),t),"assertive"):(0,fl.D)((0,N.sprintf)((0,N.__)("%s is now visible"),t),"assertive"),n(t)},role:"menuitemcheckbox"},t)}))):null};var Nh=(0,Ku.Iq)(((e,t)=>{const{areAllOptionalControlsHidden:n,defaultControlsItemClassName:r,dropdownMenuClassName:o,hasMenuItems:i,headingClassName:l,headingLevel:a=2,label:s,menuItems:c,resetAll:u,toggleItem:d,...p}=function(e){const{className:t,headingLevel:n=2,...r}=(0,qu.y)(e,"ToolsPanelHeader"),o=(0,Yu.I)(),i=(0,v.useMemo)((()=>o(_h,t)),[t,o]),l=(0,v.useMemo)((()=>o(Ch)),[o]),a=(0,v.useMemo)((()=>o(kh)),[o]),s=(0,v.useMemo)((()=>o(Sh)),[o]),{menuItems:c,hasMenuItems:u,areAllOptionalControlsHidden:d}=eh();return{...r,areAllOptionalControlsHidden:d,defaultControlsItemClassName:s,dropdownMenuClassName:l,hasMenuItems:u,headingClassName:a,headingLevel:n,menuItems:c,className:i}}(e);if(!s)return null;const m=Object.entries((null==c?void 0:c.default)||{}),f=Object.entries((null==c?void 0:c.optional)||{}),h=n?rm.Z:mh.Z,g=(0,N.sprintf)((0,N._x)("%s options","Button label to reveal tool panel options"),s),b=n?(0,N.__)("All options are currently hidden"):void 0,y=[...m,...f].some((e=>{let[,t]=e;return t}));return(0,v.createElement)(Bm.Z,(0,Po.Z)({},p,{ref:t}),(0,v.createElement)(gh,{level:a,className:l},s),i&&(0,v.createElement)(zo.Z,{icon:h,label:g,menuProps:{className:o},toggleProps:{isSmall:!0,describedBy:b}},(()=>(0,v.createElement)(v.Fragment,null,(0,v.createElement)(Ih,{items:m,toggleItem:d,itemClassName:r}),(0,v.createElement)(Th,{items:f,toggleItem:d}),(0,v.createElement)(Ou.Z,null,(0,v.createElement)(Zu.Z,{"aria-disabled":!y,variant:"tertiary",onClick:()=>{y&&(u(),(0,fl.D)((0,N.__)("All options reset"),"assertive"))}},(0,N.__)("Reset all")))))))}),"ToolsPanelHeader");const Bh=e=>{let{panelItems:t,shouldReset:n,currentMenuItems:r}=e;const o={default:{},optional:{}};return t.forEach((e=>{var t;let{hasValue:i,isShownByDefault:l,label:a}=e;const s=l?"default":"optional",c=(null==r||null===(t=r[s])||void 0===t?void 0:t[a])||i();o[s][a]=!n&&c})),o},Lh=e=>e&&0===Object.keys(e).length;const Ph={bottom:{alignItems:"flex-end",justifyContent:"center"},bottomLeft:{alignItems:"flex-start",justifyContent:"flex-end"},bottomRight:{alignItems:"flex-end",justifyContent:"flex-end"},center:{alignItems:"center",justifyContent:"center"},spaced:{alignItems:"center",justifyContent:"space-between"},left:{alignItems:"center",justifyContent:"flex-start"},right:{alignItems:"center",justifyContent:"flex-end"},stretch:{alignItems:"stretch"},top:{alignItems:"flex-start",justifyContent:"center"},topLeft:{alignItems:"flex-start",justifyContent:"flex-start"},topRight:{alignItems:"flex-start",justifyContent:"flex-end"}};var Ah=n(26028);var Dh=(0,Ku.Iq)((function(e,t){const n=function(e){const{align:t,alignment:n,className:r,columnGap:o,columns:i=2,gap:l=3,isInline:a=!1,justify:s,rowGap:c,rows:u,templateColumns:d,templateRows:p,...m}=(0,qu.y)(e,"Grid"),f=Array.isArray(i)?i:[i],h=(0,Ah.V)(f),g=Array.isArray(u)?u:[u],b=(0,Ah.V)(g),y=d||!!i&&`repeat( ${h}, 1fr )`,_=p||!!u&&`repeat( ${b}, 1fr )`,k=(0,Yu.I)();return{...m,className:(0,v.useMemo)((()=>{const e=function(e){return e?Ph[e]:{}}(n),i=(0,Qu.iv)({alignItems:t,display:a?"inline-grid":"grid",gap:`calc( ${td.Z.gridBase} * ${l} )`,gridTemplateColumns:y||void 0,gridTemplateRows:_||void 0,gridRowGap:c,gridColumnGap:o,justifyContent:s,verticalAlign:a?"middle":void 0,...e},"","");return k(i,r)}),[t,n,r,o,k,l,y,_,a,s,c])}}(e);return(0,v.createElement)(md.Z,(0,Po.Z)({},n,{ref:t}))}),"Grid"),Rh=(0,Ku.Iq)(((e,t)=>{const{children:n,label:r,panelContext:o,resetAllItems:i,toggleItem:l,headingLevel:a,...s}=function(e){const{className:t,headingLevel:n=2,resetAll:r,panelId:o,hasInnerWrapper:i=!1,shouldRenderPlaceholderItems:l=!1,__experimentalFirstVisibleItemClass:a,__experimentalLastVisibleItemClass:s,...c}=(0,qu.y)(e,"ToolsPanel"),u=(0,v.useRef)(!1),d=u.current;(0,v.useEffect)((()=>{d&&(u.current=!1)}),[d]);const[p,m]=(0,v.useState)([]),[f,h]=(0,v.useState)([]),g=(0,v.useCallback)((e=>{m((t=>{const n=[...t],r=n.findIndex((t=>t.label===e.label));return-1!==r&&n.splice(r,1),[...n,e]}))}),[m]),b=(0,v.useCallback)((e=>{m((t=>{const n=[...t],r=n.findIndex((t=>t.label===e));return-1!==r&&n.splice(r,1),n}))}),[m]),y=(0,v.useCallback)((e=>{h((t=>[...t,e]))}),[h]),_=(0,v.useCallback)((e=>{h((t=>t.filter((t=>t!==e))))}),[h]),[k,x]=(0,v.useState)({default:{},optional:{}});(0,v.useEffect)((()=>{x((e=>Bh({panelItems:p,shouldReset:!1,currentMenuItems:e})))}),[p,x]);const w=(0,v.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default";x((n=>({...n,[t]:{...n[t],[e]:!0}})))}),[x]),[C,E]=(0,v.useState)(!1);(0,v.useEffect)((()=>{if(Lh(null==k?void 0:k.default)&&!Lh(null==k?void 0:k.optional)){const e=!Object.entries(k.optional).some((e=>{let[,t]=e;return t}));E(e)}}),[k,E]);const S=(0,Yu.I)(),I=(0,v.useMemo)((()=>{const e=i&&(0,Qu.iv)(">div:not( :first-of-type ){display:grid;",bh.columns(2)," ",bh.spacing," ",bh.item.fullWidth,";}",""),n=Lh(null==k?void 0:k.default)&&C&&yh;return S((0,Qu.iv)(bh.columns(2)," ",bh.spacing," border-top:",td.Z.borderWidth," solid ",ed.D.gray[300],";margin-top:-1px;padding:",(0,hm.D)(4),";",""),e,n,t)}),[C,t,S,i,k]),T=(0,v.useCallback)((e=>{const t=p.find((t=>t.label===e));if(!t)return;const n=t.isShownByDefault?"default":"optional",r={...k,[n]:{...k[n],[e]:!k[n][e]}};x(r)}),[k,p,x]),N=(0,v.useCallback)((()=>{"function"==typeof r&&(u.current=!0,r(f));const e=Bh({panelItems:p,shouldReset:!0});x(e)}),[p,f,r,x]),B=e=>{const t=k.optional||{},n=e.find((e=>e.isShownByDefault||!!t[e.label]));return null==n?void 0:n.label},L=B(p),P=B([...p].reverse());return{...c,headingLevel:n,panelContext:(0,v.useMemo)((()=>({areAllOptionalControlsHidden:C,deregisterPanelItem:b,deregisterResetAllFilter:_,firstDisplayedItem:L,flagItemCustomization:w,hasMenuItems:!!p.length,isResetting:u.current,lastDisplayedItem:P,menuItems:k,panelId:o,registerPanelItem:g,registerResetAllFilter:y,shouldRenderPlaceholderItems:l,__experimentalFirstVisibleItemClass:a,__experimentalLastVisibleItemClass:s})),[C,b,_,L,w,P,k,o,p,y,g,l,a,s]),resetAllItems:N,toggleItem:T,className:I}}(e);return(0,v.createElement)(Dh,(0,Po.Z)({},s,{columns:2,ref:t}),(0,v.createElement)(Qf.Provider,{value:o},(0,v.createElement)(Nh,{label:r,resetAll:i,toggleItem:l,headingLevel:a}),n))}),"ToolsPanel");function Mh(e){let{children:t,group:n,label:r}=e;const{updateBlockAttributes:o}=(0,S.Z)(ku),{getBlockAttributes:i,getMultiSelectedBlockClientIds:l,getSelectedBlockClientId:a,hasMultiSelection:s}=(0,E.Z)(ku),c=a(),u=(0,v.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t={},n=s()?l():[c];n.forEach((n=>{const{style:r}=i(n);let o={style:r};e.forEach((e=>{o={...o,...e(o)}})),o={...o,style:yp(o.style)},t[n]=o})),o(n,t,!0)}),[i,l,s,c,o]);return(0,v.createElement)(Rh,{className:`${n}-block-support-panel`,label:r,resetAll:u,key:c,panelId:c,hasInnerWrapper:!0,shouldRenderPlaceholderItems:!0,__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last"},t)}function Oh(e){let{Slot:t,...n}=e;const r=(0,v.useContext)(Qf);return(0,v.createElement)(t,(0,Po.Z)({},n,{fillProps:r,bubblesVirtually:!0}))}function Zh(e){var t;let{__experimentalGroup:n,group:r="default",label:o,...i}=e;n&&((0,St.default)("`__experimentalGroup` property in `InspectorControlsSlot`",{since:"6.2",version:"6.4",alternative:"`group`"}),r=n);const l=null===(t=sh[r])||void 0===t?void 0:t.Slot,a=(0,dh.Z)(null==l?void 0:l.__unstableName),s=Lu(null==l?void 0:l.__unstableName);return l&&a?Boolean(s&&s.length)?o?(0,v.createElement)(Mh,{group:r,label:o},(0,v.createElement)(Oh,(0,Po.Z)({},i,{Slot:l}))):(0,v.createElement)(l,(0,Po.Z)({},i,{bubblesVirtually:!0})):null:("undefined"!=typeof process&&process.env,null)}const Fh=ch;Fh.Slot=Zh;const jh=e=>(0,v.createElement)(ch,(0,Po.Z)({},e,{group:"advanced"}));jh.Slot=e=>(0,v.createElement)(Zh,(0,Po.Z)({},e,{group:"advanced"})),jh.slotName="InspectorAdvancedControls";var zh=Fh;const Hh=/[\s#]/g,Vh={type:"string",source:"attribute",attribute:"id",selector:"*"},Wh=(0,Ao.o)((e=>t=>{if(he(t.name,"anchor")&&t.isSelected){const n="web"===ci.Z.OS,r=(0,v.createElement)(Kf.Z,{__nextHasNoMarginBottom:!0,className:"html-anchor-control",label:(0,N.__)("HTML anchor"),help:(0,v.createElement)(v.Fragment,null,(0,N.__)("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,v.createElement)(Yf.Z,{href:(0,N.__)("https://wordpress.org/support/article/page-jumps/")},(0,N.__)("Learn more about anchors"))),value:t.attributes.anchor||"",placeholder:n?null:(0,N.__)("Add an anchor"),onChange:e=>{e=e.replace(Hh,"-"),t.setAttributes({anchor:e})},autoCapitalize:"none",autoComplete:"off"});return(0,v.createElement)(v.Fragment,null,(0,v.createElement)(e,t),n&&(0,v.createElement)(zh,{group:"advanced"},r),!n&&"core/heading"===t.name&&(0,v.createElement)(zh,null,(0,v.createElement)(Xf.Z,{title:(0,N.__)("Heading settings")},r)))}return(0,v.createElement)(e,t)}),"withInspectorControl");(0,_e.KJ)("blocks.registerBlockType","core/anchor/attribute",(function(e){var t,n;return"type"in(null!==(t=null===(n=e.attributes)||void 0===n?void 0:n.anchor)&&void 0!==t?t:{})||he(e,"anchor")&&(e.attributes={...e.attributes,anchor:Vh}),e})),(0,_e.KJ)("editor.BlockEdit","core/editor/anchor/with-inspector-control",Wh),(0,_e.KJ)("blocks.getSaveContent.extraProps","core/anchor/save-props",(function(e,t,n){return he(t,"anchor")&&(e.id=""===n.anchor?null:n.anchor),e}));const $h={type:"string",source:"attribute",attribute:"aria-label",selector:"*"};(0,_e.KJ)("blocks.registerBlockType","core/ariaLabel/attribute",(function(e){var t,n;return null!=e&&null!==(t=e.attributes)&&void 0!==t&&null!==(n=t.ariaLabel)&&void 0!==n&&n.type||he(e,"ariaLabel")&&(e.attributes={...e.attributes,ariaLabel:$h}),e})),(0,_e.KJ)("blocks.getSaveContent.extraProps","core/ariaLabel/save-props",(function(e,t,n){return he(t,"ariaLabel")&&(e["aria-label"]=""===n.ariaLabel?null:n.ariaLabel),e}));const Uh=(0,Ao.o)((e=>t=>he(t.name,"customClassName",!0)&&t.isSelected?(0,v.createElement)(v.Fragment,null,(0,v.createElement)(e,t),(0,v.createElement)(zh,{group:"advanced"},(0,v.createElement)(Kf.Z,{__nextHasNoMarginBottom:!0,autoComplete:"off",label:(0,N.__)("Additional CSS class(es)"),value:t.attributes.className||"",onChange:e=>{t.setAttributes({className:""!==e?e:void 0})},help:(0,N.__)("Separate multiple classes with spaces.")}))):(0,v.createElement)(e,t)),"withInspectorControl");(0,_e.KJ)("blocks.registerBlockType","core/custom-class-name/attribute",(function(e){return he(e,"customClassName",!0)&&(e.attributes={...e.attributes,className:{type:"string"}}),e})),(0,_e.KJ)("editor.BlockEdit","core/editor/custom-class-name/with-inspector-control",Uh),(0,_e.KJ)("blocks.getSaveContent.extraProps","core/custom-class-name/save-props",(function(e,t,n){return he(t,"customClassName",!0)&&n.className&&(e.className=w()(e.className,n.className)),e})),(0,_e.KJ)("blocks.switchToBlockType.transformedBlock","core/color/addTransforms",(function(e,t,n,r){if(!he(e.name,"customClassName",!0))return e;if(1===r.length&&e.innerBlocks.length===t.length)return e;if(1===r.length&&t.length>1||r.length>1&&1===t.length)return e;if(t[n]){var o;const r=null===(o=t[n])||void 0===o?void 0:o.attributes.className;if(r)return{...e,attributes:{...e.attributes,className:r}}}return e})),(0,_e.KJ)("blocks.getSaveContent.extraProps","core/generated-class-name/save-props",(function(e,t){return he(t,"className",!0)&&("string"==typeof e.className?e.className=[...new Set([gn(t.name),...e.className.split(" ")])].join(" ").trim():e.className=gn(t.name)),e}));var Gh=n(75667),qh=n(64539),Kh=n(74481),Yh=n(44890);function Xh(e){return(0,Ao.o)((t=>{const n="core/with-filters/"+e;let r;class o extends v.Component{constructor(){super(...arguments),void 0===r&&(r=(0,_e.O)(e,t))}componentDidMount(){o.instances.push(this),1===o.instances.length&&((0,_e.KG)("hookRemoved",n,l),(0,_e.KG)("hookAdded",n,l))}componentWillUnmount(){o.instances=o.instances.filter((e=>e!==this)),0===o.instances.length&&((0,_e.iR)("hookRemoved",n),(0,_e.iR)("hookAdded",n))}render(){return(0,v.createElement)(r,this.props)}}o.instances=[];const i=(0,Yh.D)((()=>{r=(0,_e.O)(e,t),o.instances.forEach((e=>{e.forceUpdate()}))}),16);function l(t){t===e&&i()}return o}),"withFilters")}var Jh=n(53874),Qh=n(19883),eg=n(27897),tg=n(72608),ng=function(e){return(0,Ao.o)((t=>n=>e(n)?(0,v.createElement)(t,n):null),"ifCondition")},rg=n(92739);const og=(0,v.createContext)({});function ig(e){let{value:t,children:n}=e;const r=(0,v.useContext)(og),o=(0,v.useMemo)((()=>({...r,...t})),[r,t]);return(0,v.createElement)(og.Provider,{value:o,children:n})}var lg=og;const ag={};var sg=Xh("editor.BlockEdit")((e=>{const{attributes:t={},name:n}=e,r=pe(n),o=(0,v.useContext)(lg),i=(0,v.useMemo)((()=>r&&r.usesContext?Object.fromEntries(Object.entries(o).filter((e=>{let[t]=e;return r.usesContext.includes(t)}))):ag),[r,o]);if(!r)return null;const l=r.edit||r.save;if(r.apiVersion>1)return(0,v.createElement)(l,(0,Po.Z)({},e,{context:i}));const a=he(r,"className",!0)?gn(n):null,s=w()(a,t.className,e.className);return(0,v.createElement)(l,(0,Po.Z)({},e,{context:i,className:s}))}));function cg(e){const{name:t,isSelected:n,clientId:r,attributes:o={},__unstableLayoutClassNames:i}=e,{layout:l=null}=o,a={name:t,isSelected:n,clientId:r,layout:he(t,"__experimentalLayout",!1)?l:null,__unstableLayoutClassNames:i};return(0,v.createElement)(Eu,{value:(0,v.useMemo)((()=>a),Object.values(a))},(0,v.createElement)(sg,e))}var ug=n(44165),dg=n(6310),pg=function(e){let{className:t,actions:n,children:r,secondaryActions:o}=e;return(0,v.createElement)("div",{style:{display:"contents",all:"initial"}},(0,v.createElement)("div",{className:w()(t,"block-editor-warning")},(0,v.createElement)("div",{className:"block-editor-warning__contents"},(0,v.createElement)("p",{className:"block-editor-warning__message"},r),(v.Children.count(n)>0||o)&&(0,v.createElement)("div",{className:"block-editor-warning__actions"},v.Children.count(n)>0&&v.Children.map(n,((e,t)=>(0,v.createElement)("span",{key:t,className:"block-editor-warning__action"},e))),o&&(0,v.createElement)(zo.Z,{className:"block-editor-warning__secondary",icon:dg.Z,label:(0,N.__)("More options"),popoverProps:{position:"bottom left",className:"block-editor-warning__dropdown"},noIcons:!0},(()=>(0,v.createElement)(Ou.Z,null,o.map(((e,t)=>(0,v.createElement)(Zu.Z,{onClick:e.onClick,key:t},e.title))))))))))},mg=n(79646);function fg(e){let{title:t,rawContent:n,renderedContent:r,action:o,actionText:i,className:l}=e;return(0,v.createElement)("div",{className:l},(0,v.createElement)("div",{className:"block-editor-block-compare__content"},(0,v.createElement)("h2",{className:"block-editor-block-compare__heading"},t),(0,v.createElement)("div",{className:"block-editor-block-compare__html"},n),(0,v.createElement)("div",{className:"block-editor-block-compare__preview edit-post-visual-editor"},(0,v.createElement)(pn.Z,null,(0,rg.Z)(r)))),(0,v.createElement)("div",{className:"block-editor-block-compare__action"},(0,v.createElement)(Mo.ZP,{variant:"secondary",tabIndex:"0",onClick:o},i)))}var hg=function(e){let{block:t,onKeep:n,onConvert:r,convertor:o,convertButtonText:i}=e;const l=function(e){const t=(Array.isArray(e)?e:[e]).map((e=>_n(e.name,e.attributes,e.innerBlocks)));return t.join("")}(o(t)),a=(s=t.originalContent,c=l,(0,mg.Kx)(s,c).map(((e,t)=>{const n=w()({"block-editor-block-compare__added":e.added,"block-editor-block-compare__removed":e.removed});return(0,v.createElement)("span",{key:t,className:n},e.value)})));var s,c;return(0,v.createElement)("div",{className:"block-editor-block-compare__wrapper"},(0,v.createElement)(fg,{title:(0,N.__)("Current"),className:"block-editor-block-compare__current",action:n,actionText:(0,N.__)("Convert to HTML"),rawContent:t.originalContent,renderedContent:t.originalContent}),(0,v.createElement)(fg,{title:(0,N.__)("After Conversion"),className:"block-editor-block-compare__converted",action:r,actionText:i,rawContent:a,renderedContent:l}))};const gg=e=>no({HTML:e.originalContent});var vg=(0,eg.Z)([(0,Jh.Z)(((e,t)=>{let{clientId:n}=t;return{block:e(ku).getBlock(n)}})),(0,Qh.Z)(((e,t)=>{let{block:n}=t;const{replaceBlock:r}=e(ku);return{convertToClassic(){r(n.clientId,(e=>ke("core/freeform",{content:e.originalContent}))(n))},convertToHTML(){r(n.clientId,(e=>ke("core/html",{content:e.originalContent}))(n))},convertToBlocks(){r(n.clientId,gg(n))},attemptBlockRecovery(){r(n.clientId,(e=>{let{name:t,attributes:n,innerBlocks:r}=e;return ke(t,n,r)})(n))}}}))])((function(e){let{convertToHTML:t,convertToBlocks:n,convertToClassic:r,attemptBlockRecovery:o,block:i}=e;const l=!!pe("core/html"),[a,s]=(0,v.useState)(!1),c=(0,v.useCallback)((()=>s(!0)),[]),u=(0,v.useCallback)((()=>s(!1)),[]),d=(0,v.useMemo)((()=>[{title:(0,N._x)("Resolve","imperative verb"),onClick:c},l&&{title:(0,N.__)("Convert to HTML"),onClick:t},{title:(0,N.__)("Convert to Classic Block"),onClick:r}].filter(Boolean)),[c,t,r]);return(0,v.createElement)(v.Fragment,null,(0,v.createElement)(pg,{actions:[(0,v.createElement)(Mo.ZP,{key:"recover",onClick:o,variant:"primary"},(0,N.__)("Attempt Block Recovery"))],secondaryActions:d},(0,N.__)("This block contains unexpected or invalid content.")),a&&(0,v.createElement)(ug.Z,{title:(0,N.__)("Resolve Block"),onRequestClose:u,className:"block-editor-block-compare"},(0,v.createElement)(hg,{block:i,onKeep:t,onConvert:n,convertor:gg,convertButtonText:(0,N.__)("Convert to Blocks")})))}));const bg=(0,v.createElement)(pg,{className:"block-editor-block-list__block-crash-warning"},(0,N.__)("This block has encountered an error and cannot be previewed."));var yg=()=>bg;class _g extends v.Component{constructor(){super(...arguments),this.state={hasError:!1}}componentDidCatch(){this.setState({hasError:!0})}render(){return this.state.hasError?this.props.fallback:this.props.children}}var kg=_g,xg=n(90384),wg=function(e){let{clientId:t}=e;const[n,r]=(0,v.useState)(""),o=(0,E.Z)((e=>e(ku).getBlock(t)),[t]),{updateBlock:i}=(0,S.Z)(ku);return(0,v.useEffect)((()=>{r(xn(o))}),[o]),(0,v.createElement)(xg.Z,{className:"block-editor-block-list__block-html-textarea",value:n,onBlur:()=>{const e=pe(o.name);if(!e)return;const l=Cr(e,n,o.attributes),a=n||_n(e,l),[s]=n?lr({...o,attributes:l,originalContent:a}):[!0];i(t,{attributes:l,originalContent:a,isValid:s}),n||r({content:a})},onChange:e=>r(e.target.value)})};function Cg(){let{isDisabled:e=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,bl.Z)((t=>{var n;if(e)return;const r=null==t||null===(n=t.ownerDocument)||void 0===n?void 0:n.defaultView;if(!r)return;const o=[],i=()=>{t.childNodes.forEach((e=>{e instanceof r.HTMLElement&&(e.getAttribute("inert")||(e.setAttribute("inert","true"),o.push((()=>{e.removeAttribute("inert")}))))}))},l=(0,Yh.D)(i,0,{leading:!0});i();const a=new window.MutationObserver(l);return a.observe(t,{childList:!0}),()=>{a&&a.disconnect(),l.cancel(),o.forEach((e=>e()))}}),[e])}var Eg=zg(),Sg=e=>Og(e,Eg),Ig=zg();Sg.write=e=>Og(e,Ig);var Tg=zg();Sg.onStart=e=>Og(e,Tg);var Ng=zg();Sg.onFrame=e=>Og(e,Ng);var Bg=zg();Sg.onFinish=e=>Og(e,Bg);var Lg=[];Sg.setTimeout=(e,t)=>{let n=Sg.now()+t,r=()=>{let e=Lg.findIndex((e=>e.cancel==r));~e&&Lg.splice(e,1),Rg-=~e?1:0},o={time:n,handler:e,cancel:r};return Lg.splice(Pg(n),0,o),Rg+=1,Zg(),o};var Pg=e=>~(~Lg.findIndex((t=>t.time>e))||~Lg.length);Sg.cancel=e=>{Tg.delete(e),Ng.delete(e),Bg.delete(e),Eg.delete(e),Ig.delete(e)},Sg.sync=e=>{Mg=!0,Sg.batchedUpdates(e),Mg=!1},Sg.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...e){t=e,Sg.onStart(n)}return r.handler=e,r.cancel=()=>{Tg.delete(n),t=null},r};var Ag=typeof window<"u"?window.requestAnimationFrame:()=>{};Sg.use=e=>Ag=e,Sg.now=typeof performance<"u"?()=>performance.now():Date.now,Sg.batchedUpdates=e=>e(),Sg.catch=console.error,Sg.frameLoop="always",Sg.advance=()=>{"demand"!==Sg.frameLoop?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):jg()};var Dg=-1,Rg=0,Mg=!1;function Og(e,t){Mg?(t.delete(e),e(0)):(t.add(e),Zg())}function Zg(){Dg<0&&(Dg=0,"demand"!==Sg.frameLoop&&Ag(Fg))}function Fg(){~Dg&&(Ag(Fg),Sg.batchedUpdates(jg))}function jg(){let e=Dg;Dg=Sg.now();let t=Pg(Dg);t&&(Hg(Lg.splice(0,t),(e=>e.handler())),Rg-=t),Rg?(Tg.flush(),Eg.flush(e?Math.min(64,Dg-e):16.667),Ng.flush(),Ig.flush(),Bg.flush()):Dg=-1}function zg(){let e=new Set,t=e;return{add(n){Rg+=t!=e||e.has(n)?0:1,e.add(n)},delete:n=>(Rg-=t==e&&e.has(n)?1:0,e.delete(n)),flush(n){t.size&&(e=new Set,Rg-=t.size,Hg(t,(t=>t(n)&&e.add(t))),Rg+=e.size,t=e)}}}function Hg(e,t){e.forEach((e=>{try{t(e)}catch(e){Sg.catch(e)}}))}var Vg=Object.defineProperty,Wg={};function $g(){}((e,t)=>{for(var n in t)Vg(e,n,{get:t[n],enumerable:!0})})(Wg,{assign:()=>iv,colors:()=>nv,createStringInterpolator:()=>Jg,skipAnimation:()=>rv,to:()=>Qg,willAdvance:()=>ov});var Ug={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 Gg(e,t){if(Ug.arr(e)){if(!Ug.arr(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t}var qg=(e,t)=>e.forEach(t);function Kg(e,t,n){if(Ug.arr(e))for(let r=0;r<e.length;r++)t.call(n,e[r],`${r}`);else for(let r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r)}var Yg=e=>Ug.und(e)?[]:Ug.arr(e)?e:[e];function Xg(e,t){if(e.size){let n=Array.from(e);e.clear(),qg(n,t)}}var Jg,Qg,ev=(e,...t)=>Xg(e,(e=>e(...t))),tv=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),nv=null,rv=!1,ov=$g,iv=e=>{e.to&&(Qg=e.to),e.now&&(Sg.now=e.now),void 0!==e.colors&&(nv=e.colors),null!=e.skipAnimation&&(rv=e.skipAnimation),e.createStringInterpolator&&(Jg=e.createStringInterpolator),e.requestAnimationFrame&&Sg.use(e.requestAnimationFrame),e.batchedUpdates&&(Sg.batchedUpdates=e.batchedUpdates),e.willAdvance&&(ov=e.willAdvance),e.frameLoop&&(Sg.frameLoop=e.frameLoop)},lv=new Set,av=[],sv=[],cv=0,uv={get idle(){return!lv.size&&!av.length},start(e){cv>e.priority?(lv.add(e),Sg.onStart(dv)):(pv(e),Sg(fv))},advance:fv,sort(e){if(cv)Sg.onFrame((()=>uv.sort(e)));else{let t=av.indexOf(e);~t&&(av.splice(t,1),mv(e))}},clear(){av=[],lv.clear()}};function dv(){lv.forEach(pv),lv.clear(),Sg(fv)}function pv(e){av.includes(e)||mv(e)}function mv(e){av.splice(function(e,t){let n=e.findIndex(t);return n<0?e.length:n}(av,(t=>t.priority>e.priority)),0,e)}function fv(e){let t=sv;for(let n=0;n<av.length;n++){let r=av[n];cv=r.priority,r.idle||(ov(r),r.advance(e),r.idle||t.push(r))}return cv=0,(sv=av).length=0,(av=t).length>0}var hv="[-+]?\\d*\\.?\\d+",gv=hv+"%";function vv(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var bv=new RegExp("rgb"+vv(hv,hv,hv)),yv=new RegExp("rgba"+vv(hv,hv,hv,hv)),_v=new RegExp("hsl"+vv(hv,gv,gv)),kv=new RegExp("hsla"+vv(hv,gv,gv,hv)),xv=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,wv=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Cv=/^#([0-9a-fA-F]{6})$/,Ev=/^#([0-9a-fA-F]{8})$/;function Sv(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 Iv(e,t,n){let r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,i=Sv(o,r,e+1/3),l=Sv(o,r,e),a=Sv(o,r,e-1/3);return Math.round(255*i)<<24|Math.round(255*l)<<16|Math.round(255*a)<<8}function Tv(e){let t=parseInt(e,10);return t<0?0:t>255?255:t}function Nv(e){return(parseFloat(e)%360+360)%360/360}function Bv(e){let t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function Lv(e){let t=parseFloat(e);return t<0?0:t>100?1:t/100}function Pv(e){let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=Cv.exec(e))?parseInt(t[1]+"ff",16)>>>0:nv&&void 0!==nv[e]?nv[e]:(t=bv.exec(e))?(Tv(t[1])<<24|Tv(t[2])<<16|Tv(t[3])<<8|255)>>>0:(t=yv.exec(e))?(Tv(t[1])<<24|Tv(t[2])<<16|Tv(t[3])<<8|Bv(t[4]))>>>0:(t=xv.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=Ev.exec(e))?parseInt(t[1],16)>>>0:(t=wv.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=_v.exec(e))?(255|Iv(Nv(t[1]),Lv(t[2]),Lv(t[3])))>>>0:(t=kv.exec(e))?(Iv(Nv(t[1]),Lv(t[2]),Lv(t[3]))|Bv(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})`)}var Av=(e,t,n)=>{if(Ug.fun(e))return e;if(Ug.arr(e))return Av({range:e,output:t,extrapolate:n});if(Ug.str(e.output[0]))return Jg(e);let r=e,o=r.output,i=r.range||[0,1],l=r.extrapolateLeft||r.extrapolate||"extend",a=r.extrapolateRight||r.extrapolate||"extend",s=r.easing||(e=>e);return e=>{let t=function(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}(e,i);return function(e,t,n,r,o,i,l,a,s){let c=s?s(e):e;if(c<t){if("identity"===l)return c;"clamp"===l&&(c=t)}if(c>n){if("identity"===a)return c;"clamp"===a&&(c=n)}return r===o?r:t===n?e<=t?r:o:(t===-1/0?c=-c:n===1/0?c-=t:c=(c-t)/(n-t),c=i(c),r===-1/0?c=-c:o===1/0?c+=r:c=c*(o-r)+r,c)}(e,i[t],i[t+1],o[t],o[t+1],s,l,a,r.map)}},Dv=1.70158,Rv=1.525*Dv,Mv=Dv+1,Ov=2*Math.PI/3,Zv=2*Math.PI/4.5,Fv=e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,jv={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=>Mv*e*e*e-Dv*e*e,easeOutBack:e=>1+Mv*Math.pow(e-1,3)+Dv*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*(2*(Rv+1)*e-Rv)/2:(Math.pow(2*e-2,2)*((Rv+1)*(2*e-2)+Rv)+2)/2,easeInElastic:e=>0===e?0:1===e?1:-Math.pow(2,10*e-10)*Math.sin((10*e-10.75)*Ov),easeOutElastic:e=>0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin((10*e-.75)*Ov)+1,easeInOutElastic:e=>0===e?0:1===e?1:e<.5?-Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*Zv)/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*Zv)/2+1,easeInBounce:e=>1-Fv(1-e),easeOutBounce:Fv,easeInOutBounce:e=>e<.5?(1-Fv(1-2*e))/2:(1+Fv(2*e-1))/2,steps:(e,t="end")=>n=>{let r=(n="end"===t?Math.min(n,.999):Math.max(n,.001))*e;return((e,t,n)=>Math.min(Math.max(n,0),1))(0,0,("end"===t?Math.floor(r):Math.ceil(r))/e)}},zv=Symbol.for("FluidValue.get"),Hv=Symbol.for("FluidValue.observers"),Vv=e=>Boolean(e&&e[zv]),Wv=e=>e&&e[zv]?e[zv]():e,$v=e=>e[Hv]||null;function Uv(e,t){let n=e[Hv];n&&n.forEach((e=>{!function(e,t){e.eventObserved?e.eventObserved(t):e(t)}(e,t)}))}var Gv=class{[zv];[Hv];constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");qv(this,e)}},qv=(e,t)=>Jv(e,zv,t);function Kv(e,t){if(e[zv]){let n=e[Hv];n||Jv(e,Hv,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function Yv(e,t){let n=e[Hv];if(n&&n.has(t)){let r=n.size-1;r?n.delete(t):e[Hv]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var Xv,Jv=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),Qv=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,eb=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,tb=new RegExp(`(${Qv.source})(%|[a-z]+)`,"i"),nb=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,rb=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,ob=e=>{let[t,n]=ib(e);if(!t||tv())return e;let r=window.getComputedStyle(document.documentElement).getPropertyValue(t);return r?r.trim():n&&n.startsWith("--")?window.getComputedStyle(document.documentElement).getPropertyValue(n)||e:n&&rb.test(n)?ob(n):n||e},ib=e=>{let t=rb.exec(e);if(!t)return[,];let[,n,r]=t;return[n,r]},lb=(e,t,n,r,o)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${o})`,ab=e=>{Xv||(Xv=nv?new RegExp(`(${Object.keys(nv).join("|")})(?!\\w)`,"g"):/^\b$/);let t=e.output.map((e=>Wv(e).replace(rb,ob).replace(eb,Pv).replace(Xv,Pv))),n=t.map((e=>e.match(Qv).map(Number))),r=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]})))).map((t=>Av({...e,output:t})));return e=>{let n=!tb.test(t[0])&&t.find((e=>tb.test(e)))?.replace(Qv,""),o=0;return t[0].replace(Qv,(()=>`${r[o++](e)}${n||""}`)).replace(nb,lb)}},sb="react-spring: ",cb=e=>{let t=e,n=!1;if("function"!=typeof t)throw new TypeError(`${sb}once requires a function parameter`);return(...e)=>{n||(t(...e),n=!0)}},ub=cb(console.warn),db=cb(console.warn);function pb(e){return Ug.str(e)&&("#"==e[0]||/\d/.test(e)||!tv()&&rb.test(e)||e in(nv||{}))}new WeakMap,new Set,new WeakMap,new WeakMap,new WeakMap;var mb=tv()?v.useEffect:v.useLayoutEffect;function fb(){let e=(0,v.useState)()[1],t=(()=>{let e=(0,v.useRef)(!1);return mb((()=>(e.current=!0,()=>{e.current=!1})),[]),e})();return()=>{t.current&&e(Math.random())}}var hb=e=>(0,v.useEffect)(e,gb),gb=[];function vb(e){let t=(0,v.useRef)();return(0,v.useEffect)((()=>{t.current=e})),t.current}var bb=Symbol.for("Animated:node"),yb=e=>e&&e[bb],_b=(e,t)=>((e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}))(e,bb,t),kb=e=>e&&e[bb]&&e[bb].getPayload(),xb=class{payload;constructor(){_b(this,this)}getPayload(){return this.payload||[]}},wb=class extends xb{constructor(e){super(),this._value=e,Ug.num(this._value)&&(this.lastPosition=this._value)}done=!0;elapsedTime;lastPosition;lastVelocity;v0;durationProgress=0;static create(e){return new wb(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return Ug.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(){let{done:e}=this;this.done=!1,Ug.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},Cb=class extends wb{_string=null;_toString;constructor(e){super(0),this._toString=Av({output:[e,e]})}static create(e){return new Cb(e)}getValue(){return this._string??(this._string=this._toString(this._value))}setValue(e){if(Ug.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=Av({output:[this.getValue(),e]})),this._value=0,super.reset()}},Eb={dependencies:null},Sb=class extends xb{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){let t={};return Kg(this.source,((n,r)=>{var o;(o=n)&&o[bb]===o?t[r]=n.getValue(e):Vv(n)?t[r]=Wv(n):e||(t[r]=n)})),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&qg(this.payload,(e=>e.reset()))}_makePayload(e){if(e){let t=new Set;return Kg(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){Eb.dependencies&&Vv(e)&&Eb.dependencies.add(e);let t=kb(e);t&&qg(t,(e=>this.add(e)))}},Ib=class extends Sb{constructor(e){super(e)}static create(e){return new Ib(e)}getValue(){return this.source.map((e=>e.getValue()))}setValue(e){let t=this.getPayload();return e.length==t.length?t.map(((t,n)=>t.setValue(e[n]))).some(Boolean):(super.setValue(e.map(Tb)),!0)}};function Tb(e){return(pb(e)?Cb:wb).create(e)}function Nb(e){let t=yb(e);return t?t.constructor:Ug.arr(e)?Ib:pb(e)?Cb:wb}var Bb=(e,t)=>{let n=!Ug.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,v.forwardRef)(((r,o)=>{let i=(0,v.useRef)(null),l=n&&(0,v.useCallback)((e=>{i.current=function(e,t){return e&&(Ug.fun(e)?e(t):e.current=t),t}(o,e)}),[o]),[a,s]=function(e,t){let n=new Set;return Eb.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new Sb(e),Eb.dependencies=null,[e,n]}(r,t),c=fb(),u=()=>{let e=i.current;n&&!e||!1===(!!e&&t.applyAnimatedValues(e,a.getValue(!0)))&&c()},d=new Lb(u,s),p=(0,v.useRef)();mb((()=>(p.current=d,qg(s,(e=>Kv(e,d))),()=>{p.current&&(qg(p.current.deps,(e=>Yv(e,p.current))),Sg.cancel(p.current.update))}))),(0,v.useEffect)(u,[]),hb((()=>()=>{let e=p.current;qg(e.deps,(t=>Yv(t,e)))}));let m=t.getComponentProps(a.getValue());return v.createElement(e,{...m,ref:l})}))},Lb=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){"change"==e.type&&Sg.write(this.update)}},Pb=Symbol.for("AnimatedComponent"),Ab=e=>Ug.str(e)?e:e&&Ug.str(e.displayName)?e.displayName:Ug.fun(e)&&e.name||null;function Db(e,...t){return Ug.fun(e)?e(...t):e}var Rb=(e,t)=>!0===e||!!(t&&e&&(Ug.fun(e)?e(t):Yg(e).includes(t))),Mb=(e,t)=>Ug.obj(e)?t&&e[t]:e,Ob=(e,t)=>!0===e.default?e[t]:e.default?e.default[t]:void 0,Zb=e=>e,Fb=(e,t=Zb)=>{let n=jb;e.default&&!0!==e.default&&(e=e.default,n=Object.keys(e));let r={};for(let o of n){let n=t(e[o],o);Ug.und(n)||(r[o]=n)}return r},jb=["config","onProps","onStart","onChange","onPause","onResume","onRest"],zb={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 Hb(e){let t=function(e){let t={},n=0;if(Kg(e,((e,r)=>{zb[r]||(t[r]=e,n++)})),n)return t}(e);if(t){let n={to:t};return Kg(e,((e,r)=>r in t||(n[r]=e))),n}return{...e}}function Vb(e){return e=Wv(e),Ug.arr(e)?e.map(Vb):pb(e)?Wg.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function Wb(e){for(let t in e)return!0;return!1}function $b(e){return Ug.fun(e)||Ug.arr(e)&&Ug.obj(e[0])}function Ub(e,t){e.ref?.delete(e),t?.delete(e)}function Gb(e,t){t&&e.ref!==t&&(e.ref?.delete(e),t.add(e),e.ref=t)}var qb={tension:170,friction:26,mass:1,damping:1,easing:jv.linear,clamp:!1};function Kb(e,t){if(Ug.und(t.decay)){let n=!Ug.und(t.tension)||!Ug.und(t.friction);(n||!Ug.und(t.frequency)||!Ug.und(t.damping)||!Ug.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}else e.duration=void 0}var Yb=[];function Xb(e,{key:t,props:n,defaultProps:r,state:o,actions:i}){return new Promise(((l,a)=>{let s,c,u=Rb(n.cancel??r?.cancel,t);if(u)m();else{Ug.und(n.pause)||(o.paused=Rb(n.pause,t));let e=r?.pause;!0!==e&&(e=o.paused||Rb(e,t)),s=Db(n.delay||0,t),e?(o.resumeQueue.add(p),i.pause()):(i.resume(),p())}function d(){o.resumeQueue.add(p),o.timeouts.delete(c),c.cancel(),s=c.time-Sg.now()}function p(){s>0&&!Wg.skipAnimation?(o.delayed=!0,c=Sg.setTimeout(m,s),o.pauseQueue.add(d),o.timeouts.add(c)):m()}function m(){o.delayed&&(o.delayed=!1),o.pauseQueue.delete(d),o.timeouts.delete(c),e<=(o.cancelId||0)&&(u=!0);try{i.start({...n,callId:e,cancel:u},l)}catch(e){a(e)}}}))}var Jb=(e,t)=>1==t.length?t[0]:t.some((e=>e.cancelled))?ty(e.get()):t.every((e=>e.noop))?Qb(e.get()):ey(e.get(),t.every((e=>e.finished))),Qb=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),ey=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),ty=e=>({value:e,cancelled:!0,finished:!1});function ny(e,t,n,r){let{callId:o,parentId:i,onRest:l}=t,{asyncTo:a,promise:s}=n;return i||e!==a||t.reset?n.promise=(async()=>{n.asyncId=o,n.asyncTo=e;let c,u,d,p=Fb(t,((e,t)=>"onRest"===t?void 0:e)),m=new Promise(((e,t)=>(c=e,u=t))),f=e=>{let t=o<=(n.cancelId||0)&&ty(r)||o!==n.asyncId&&ey(r,!1);if(t)throw e.result=t,u(e),e},h=(e,t)=>{let i=new oy,l=new iy;return(async()=>{if(Wg.skipAnimation)throw ry(n),l.result=ey(r,!1),u(l),l;f(i);let a=Ug.obj(e)?{...e}:{...t,to:e};a.parentId=o,Kg(p,((e,t)=>{Ug.und(a[t])&&(a[t]=e)}));let s=await r.start(a);return f(i),n.paused&&await new Promise((e=>{n.resumeQueue.add(e)})),s})()};if(Wg.skipAnimation)return ry(n),ey(r,!1);try{let t;t=Ug.arr(e)?(async e=>{for(let t of e)await h(t)})(e):Promise.resolve(e(h,r.stop.bind(r))),await Promise.all([t.then(c),m]),d=ey(r.get(),!0,!1)}catch(e){if(e instanceof oy)d=e.result;else{if(!(e instanceof iy))throw e;d=e.result}}finally{o==n.asyncId&&(n.asyncId=i,n.asyncTo=i?a:void 0,n.promise=i?s:void 0)}return Ug.fun(l)&&Sg.batchedUpdates((()=>{l(d,r,r.item)})),d})():s}function ry(e,t){Xg(e.timeouts,(e=>e.cancel())),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var oy=class extends Error{result;constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},iy=class extends Error{result;constructor(){super("SkipAnimationSignal")}},ly=e=>e instanceof sy,ay=1,sy=class extends Gv{id=ay++;_priority=0;get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){let e=yb(this);return e&&e.getValue()}to(...e){return Wg.to(this,e)}interpolate(...e){return ub(`${sb}The "interpolate" function is deprecated in v9 (use "to" instead)`),Wg.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){Uv(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||uv.sort(this),Uv(this,{type:"priority",parent:this,priority:e})}},cy=Symbol.for("SpringPhase"),uy=e=>(1&e[cy])>0,dy=e=>(2&e[cy])>0,py=e=>(4&e[cy])>0,my=(e,t)=>t?e[cy]|=3:e[cy]&=-3,fy=(e,t)=>t?e[cy]|=4:e[cy]&=-5,hy=class extends sy{key;animation=new class{changed=!1;values=Yb;toValues=null;fromValues=Yb;to;from;config=new class{tension;friction;frequency;damping;mass;velocity=0;restVelocity;precision;progress;duration;easing;clamp;bounce;decay;round;constructor(){Object.assign(this,qb)}};immediate=!1};queue;defaultProps={};_state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set};_pendingCalls=new Set;_lastCallId=0;_lastToId=0;_memoizedDuration=0;constructor(e,t){if(super(),!Ug.und(e)||!Ug.und(t)){let n=Ug.obj(e)?{...e}:{...t,from:e};Ug.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(dy(this)||this._state.asyncTo)||py(this)}get goal(){return Wv(this.animation.to)}get velocity(){let e=yb(this);return e instanceof wb?e.lastVelocity||0:e.getPayload().map((e=>e.lastVelocity||0))}get hasAnimated(){return uy(this)}get isAnimating(){return dy(this)}get isPaused(){return py(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1,r=this.animation,{config:o,toValues:i}=r,l=kb(r.to);!l&&Vv(r.to)&&(i=Yg(Wv(r.to))),r.values.forEach(((a,s)=>{if(a.done)return;let c=a.constructor==Cb?1:l?l[s].lastPosition:i[s],u=r.immediate,d=c;if(!u){if(d=a.lastPosition,o.tension<=0)return void(a.done=!0);let t,n=a.elapsedTime+=e,i=r.fromValues[s],l=null!=a.v0?a.v0:a.v0=Ug.arr(o.velocity)?o.velocity[s]:o.velocity,p=o.precision||(i==c?.005:Math.min(1,.001*Math.abs(c-i)));if(Ug.und(o.duration))if(o.decay){let e=!0===o.decay?.998:o.decay,r=Math.exp(-(1-e)*n);d=i+l/(1-e)*(1-r),u=Math.abs(a.lastPosition-d)<=p,t=l*r}else{t=null==a.lastVelocity?l:a.lastVelocity;let n,r=o.restVelocity||p/10,s=o.clamp?0:o.bounce,m=!Ug.und(s),f=i==c?a.v0>0:i<c,h=!1,g=1,v=Math.ceil(e/g);for(let e=0;e<v&&(n=Math.abs(t)>r,n||(u=Math.abs(c-d)<=p,!u));++e)m&&(h=d==c||d>c==f,h&&(t=-t*s,d=c)),t+=(1e-6*-o.tension*(d-c)+.001*-o.friction*t)/o.mass*g,d+=t*g}else{let r=1;o.duration>0&&(this._memoizedDuration!==o.duration&&(this._memoizedDuration=o.duration,a.durationProgress>0&&(a.elapsedTime=o.duration*a.durationProgress,n=a.elapsedTime+=e)),r=(o.progress||0)+n/this._memoizedDuration,r=r>1?1:r<0?0:r,a.durationProgress=r),d=i+o.easing(r)*(c-i),t=(d-a.lastPosition)/e,u=1==r}a.lastVelocity=t,Number.isNaN(d)&&(console.warn("Got NaN while animating:",this),u=!0)}l&&!l[s].done&&(u=!1),u?a.done=!0:t=!1,a.setValue(d,o.round)&&(n=!0)}));let a=yb(this),s=a.getValue();if(t){let e=Wv(r.to);s===e&&!n||o.decay?n&&o.decay&&this._onChange(s):(a.setValue(e),this._onChange(e)),this._stop()}else n&&this._onChange(s)}set(e){return Sg.batchedUpdates((()=>{this._stop(),this._focus(e),this._set(e)})),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(dy(this)){let{to:e,config:t}=this.animation;Sg.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 Ug.und(e)?(n=this.queue||[],this.queue=[]):n=[Ug.obj(e)?e:{...t,to:e}],Promise.all(n.map((e=>this._update(e)))).then((e=>Jb(this,e)))}stop(e){let{to:t}=this.animation;return this._focus(this.get()),ry(this._state,e&&this._lastCallId),Sg.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){let t=this.key||"",{to:n,from:r}=e;n=Ug.obj(n)?n[t]:n,(null==n||$b(n))&&(n=void 0),r=Ug.obj(r)?r[t]:r,null==r&&(r=void 0);let o={to:n,from:r};return uy(this)||(e.reverse&&([n,r]=[r,n]),r=Wv(r),Ug.und(r)?yb(this)||this._set(n):this._set(r)),o}_update({...e},t){let{key:n,defaultProps:r}=this;e.default&&Object.assign(r,Fb(e,((e,t)=>/^on/.test(t)?Mb(e,n):e))),xy(this,e,"onProps"),wy(this,"onProps",e,this);let o=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");let i=this._state;return Xb(++this._lastCallId,{key:n,props:e,defaultProps:r,state:i,actions:{pause:()=>{py(this)||(fy(this,!0),ev(i.pauseQueue),wy(this,"onPause",ey(this,gy(this,this.animation.to)),this))},resume:()=>{py(this)&&(fy(this,!1),dy(this)&&this._resume(),ev(i.resumeQueue),wy(this,"onResume",ey(this,gy(this,this.animation.to)),this))},start:this._merge.bind(this,o)}}).then((n=>{if(e.loop&&n.finished&&(!t||!n.noop)){let t=vy(e);if(t)return this._update(t,!0)}return n}))}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(ty(this));let r=!Ug.und(e.to),o=!Ug.und(e.from);if(r||o){if(!(t.callId>this._lastToId))return n(ty(this));this._lastToId=t.callId}let{key:i,defaultProps:l,animation:a}=this,{to:s,from:c}=a,{to:u=s,from:d=c}=e;o&&!r&&(!t.default||Ug.und(u))&&(u=d),t.reverse&&([u,d]=[d,u]);let p=!Gg(d,c);p&&(a.from=d),d=Wv(d);let m=!Gg(u,s);m&&this._focus(u);let f=$b(t.to),{config:h}=a,{decay:g,velocity:v}=h;(r||o)&&(h.velocity=0),t.config&&!f&&function(e,t,n){n&&(Kb(n={...n},t),t={...n,...t}),Kb(e,t),Object.assign(e,t);for(let t in qb)null==e[t]&&(e[t]=qb[t]);let{mass:r,frequency:o,damping:i}=e;Ug.und(o)||(o<.01&&(o=.01),i<0&&(i=0),e.tension=Math.pow(2*Math.PI/o,2)*r,e.friction=4*Math.PI*i*r/o)}(h,Db(t.config,i),t.config!==l.config?Db(l.config,i):void 0);let b=yb(this);if(!b||Ug.und(u))return n(ey(this,!0));let y=Ug.und(t.reset)?o&&!t.default:!Ug.und(d)&&Rb(t.reset,i),_=y?d:this.get(),k=Vb(u),x=Ug.num(k)||Ug.arr(k)||pb(k),w=!f&&(!x||Rb(l.immediate||t.immediate,i));if(m){let e=Nb(u);if(e!==b.constructor){if(!w)throw Error(`Cannot animate between ${b.constructor.name} and ${e.name}, as the "to" prop suggests`);b=this._set(k)}}let C=b.constructor,E=Vv(u),S=!1;if(!E){let e=y||!uy(this)&&p;(m||e)&&(S=Gg(Vb(_),k),E=!S),(!Gg(a.immediate,w)&&!w||!Gg(h.decay,g)||!Gg(h.velocity,v))&&(E=!0)}if(S&&dy(this)&&(a.changed&&!y?E=!0:E||this._stop(s)),!f&&((E||Vv(s))&&(a.values=b.getPayload(),a.toValues=Vv(u)?null:C==Cb?[1]:Yg(k)),a.immediate!=w&&(a.immediate=w,!w&&!y&&this._set(s)),E)){let{onRest:e}=a;qg(ky,(e=>xy(this,t,e)));let r=ey(this,gy(this,s));ev(this._pendingCalls,r),this._pendingCalls.add(n),a.changed&&Sg.batchedUpdates((()=>{a.changed=!y,e?.(r,this),y?Db(l.onRest,r):a.onStart?.(r,this)}))}y&&this._set(_),f?n(ny(t.to,t,this._state,this)):E?this._start():dy(this)&&!m?this._pendingCalls.add(n):n(Qb(_))}_focus(e){let t=this.animation;e!==t.to&&($v(this)&&this._detach(),t.to=e,$v(this)&&this._attach())}_attach(){let e=0,{to:t}=this.animation;Vv(t)&&(Kv(t,this),ly(t)&&(e=t.priority+1)),this.priority=e}_detach(){let{to:e}=this.animation;Vv(e)&&Yv(e,this)}_set(e,t=!0){let n=Wv(e);if(!Ug.und(n)){let e=yb(this);if(!e||!Gg(n,e.getValue())){let r=Nb(n);e&&e.constructor==r?e.setValue(n):_b(this,r.create(n)),e&&Sg.batchedUpdates((()=>{this._onChange(n,t)}))}}return yb(this)}_onStart(){let e=this.animation;e.changed||(e.changed=!0,wy(this,"onStart",ey(this,gy(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),Db(this.animation.onChange,e,this)),Db(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){let e=this.animation;yb(this).reset(Wv(e.to)),e.immediate||(e.fromValues=e.values.map((e=>e.lastPosition))),dy(this)||(my(this,!0),py(this)||this._resume())}_resume(){Wg.skipAnimation?this.finish():uv.start(this)}_stop(e,t){if(dy(this)){my(this,!1);let n=this.animation;qg(n.values,(e=>{e.done=!0})),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),Uv(this,{type:"idle",parent:this});let r=t?ty(this.get()):ey(this.get(),gy(this,e??n.to));ev(this._pendingCalls,r),n.changed&&(n.changed=!1,wy(this,"onRest",r,this))}}};function gy(e,t){let n=Vb(t);return Gg(Vb(e.get()),n)}function vy(e,t=e.loop,n=e.to){let r=Db(t);if(r){let o=!0!==r&&Hb(r),i=(o||e).reverse,l=!o||o.reset;return by({...e,loop:t,default:!1,pause:void 0,to:!i||$b(n)?n:void 0,from:l?e.from:void 0,reset:l,...o})}}function by(e){let{to:t,from:n}=e=Hb(e),r=new Set;return Ug.obj(t)&&_y(t,r),Ug.obj(n)&&_y(n,r),e.keys=r.size?Array.from(r):null,e}function yy(e){let t=by(e);return Ug.und(t.default)&&(t.default=Fb(t)),t}function _y(e,t){Kg(e,((e,n)=>null!=e&&t.add(n)))}var ky=["onStart","onRest","onChange","onPause","onResume"];function xy(e,t,n){e.animation[n]=t[n]!==Ob(t,n)?Mb(t[n],e.key):void 0}function wy(e,t,...n){e.animation[t]?.(...n),e.defaultProps[t]?.(...n)}var Cy=["onStart","onChange","onRest"],Ey=1,Sy=class{id=Ey++;springs={};queue=[];ref;_flush;_initialProps;_lastAsyncId=0;_active=new Set;_changed=new Set;_started=!1;_item;_state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set};_events={onStart:new Map,onChange:new Map,onRest:new Map};constructor(e,t){this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start({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(){let e={};return this.each(((t,n)=>e[n]=t.get())),e}set(e){for(let t in e){let n=e[t];Ug.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(by(e)),this}start(e){let{queue:t}=this;return e?t=Yg(e).map(by):this.queue=[],this._flush?this._flush(this,t):(Ay(this,t),Iy(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){let n=this.springs;qg(Yg(t),(t=>n[t].stop(!!e)))}else ry(this._state,this._lastAsyncId),this.each((t=>t.stop(!!e)));return this}pause(e){if(Ug.und(e))this.start({pause:!0});else{let t=this.springs;qg(Yg(e),(e=>t[e].pause()))}return this}resume(e){if(Ug.und(e))this.start({pause:!1});else{let t=this.springs;qg(Yg(e),(e=>t[e].resume()))}return this}each(e){Kg(this.springs,e)}_onFrame(){let{onStart:e,onChange:t,onRest:n}=this._events,r=this._active.size>0,o=this._changed.size>0;(r&&!this._started||o&&!this._started)&&(this._started=!0,Xg(e,(([e,t])=>{t.value=this.get(),e(t,this,this._item)})));let i=!r&&this._started,l=o||i&&n.size?this.get():null;o&&t.size&&Xg(t,(([e,t])=>{t.value=l,e(t,this,this._item)})),i&&(this._started=!1,Xg(n,(([e,t])=>{t.value=l,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)}Sg.onFrame(this._onFrame)}};function Iy(e,t){return Promise.all(t.map((t=>Ty(e,t)))).then((t=>Jb(e,t)))}async function Ty(e,t,n){let{keys:r,to:o,from:i,loop:l,onRest:a,onResolve:s}=t,c=Ug.obj(t.default)&&t.default;l&&(t.loop=!1),!1===o&&(t.to=null),!1===i&&(t.from=null);let u=Ug.arr(o)||Ug.fun(o)?o:void 0;u?(t.to=void 0,t.onRest=void 0,c&&(c.onRest=void 0)):qg(Cy,(n=>{let r=t[n];if(Ug.fun(r)){let o=e._events[n];t[n]=({finished:e,cancelled:t})=>{let n=o.get(r);n?(e||(n.finished=!1),t&&(n.cancelled=!0)):o.set(r,{value:null,finished:e||!1,cancelled:t||!1})},c&&(c[n]=t[n])}}));let d=e._state;t.pause===!d.paused?(d.paused=t.pause,ev(t.pause?d.pauseQueue:d.resumeQueue)):d.paused&&(t.pause=!0);let p=(r||Object.keys(e.springs)).map((n=>e.springs[n].start(t))),m=!0===t.cancel||!0===Ob(t,"cancel");(u||m&&d.asyncId)&&p.push(Xb(++e._lastAsyncId,{props:t,state:d,actions:{pause:$g,resume:$g,start(t,n){m?(ry(d,e._lastAsyncId),n(ty(e))):(t.onRest=a,n(ny(u,t,d,e)))}}})),d.paused&&await new Promise((e=>{d.resumeQueue.add(e)}));let f=Jb(e,await Promise.all(p));if(l&&f.finished&&(!n||!f.noop)){let n=vy(t,l,o);if(n)return Ay(e,[n]),Ty(e,n,!0)}return s&&Sg.batchedUpdates((()=>s(f,e,e.item))),f}function Ny(e,t){let n={...e.springs};return t&&qg(Yg(t),(e=>{Ug.und(e.keys)&&(e=by(e)),Ug.obj(e.to)||(e={...e,to:void 0}),Py(n,e,(e=>Ly(e)))})),By(e,n),n}function By(e,t){Kg(t,((t,n)=>{e.springs[n]||(e.springs[n]=t,Kv(t,e))}))}function Ly(e,t){let n=new hy;return n.key=e,t&&Kv(n,t),n}function Py(e,t,n){t.keys&&qg(t.keys,(r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)}))}function Ay(e,t){qg(t,(t=>{Py(e.springs,t,(t=>Ly(t,e)))}))}var Dy,Ry,My=({children:e,...t})=>{let n=(0,v.useContext)(Oy),r=t.pause||!!n.pause,o=t.immediate||!!n.immediate;t=function(e,t){let[n]=(0,v.useState)((()=>({inputs:t,result:e()}))),r=(0,v.useRef)(),o=r.current,i=o;return i?Boolean(t&&i.inputs&&function(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(t,i.inputs))||(i={inputs:t,result:e()}):i=n,(0,v.useEffect)((()=>{r.current=i,o==n&&(n.inputs=n.result=void 0)}),[i]),i.result}((()=>({pause:r,immediate:o})),[r,o]);let{Provider:i}=Oy;return v.createElement(i,{value:t},e)},Oy=(Dy=My,Ry={},Object.assign(Dy,v.createContext(Ry)),Dy.Provider._context=Dy,Dy.Consumer._context=Dy,Dy);My.Provider=Oy.Provider,My.Consumer=Oy.Consumer;var Zy=()=>{let e=[],t=function(t){db(`${sb}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`);let r=[];return qg(e,((e,o)=>{if(Ug.und(t))r.push(e.start());else{let i=n(t,e,o);i&&r.push(e.start(i))}})),r};t.current=e,t.add=function(t){e.includes(t)||e.push(t)},t.delete=function(t){let n=e.indexOf(t);~n&&e.splice(n,1)},t.pause=function(){return qg(e,(e=>e.pause(...arguments))),this},t.resume=function(){return qg(e,(e=>e.resume(...arguments))),this},t.set=function(t){qg(e,((e,n)=>{let r=Ug.fun(t)?t(n,e):t;r&&e.set(r)}))},t.start=function(t){let n=[];return qg(e,((e,r)=>{if(Ug.und(t))n.push(e.start());else{let o=this._getProps(t,e,r);o&&n.push(e.start(o))}})),n},t.stop=function(){return qg(e,(e=>e.stop(...arguments))),this},t.update=function(t){return qg(e,((e,n)=>e.update(this._getProps(t,e,n)))),this};let n=function(e,t,n){return Ug.fun(e)?e(n,t):e};return t._getProps=n,t};function Fy(e,t,n){let r=Ug.fun(t)&&t;r&&!n&&(n=[]);let o=(0,v.useMemo)((()=>r||3==arguments.length?Zy():void 0),[]),i=(0,v.useRef)(0),l=fb(),a=(0,v.useMemo)((()=>({ctrls:[],queue:[],flush(e,t){let n=Ny(e,t);return i.current>0&&!a.queue.length&&!Object.keys(n).some((t=>!e.springs[t]))?Iy(e,t):new Promise((r=>{By(e,n),a.queue.push((()=>{r(Iy(e,t))})),l()}))}})),[]),s=(0,v.useRef)([...a.ctrls]),c=[],u=vb(e)||0;function d(e,n){for(let o=e;o<n;o++){let e=s.current[o]||(s.current[o]=new Sy(null,a.flush)),n=r?r(o,e):t[o];n&&(c[o]=yy(n))}}(0,v.useMemo)((()=>{qg(s.current.slice(e,u),(e=>{Ub(e,o),e.stop(!0)})),s.current.length=e,d(u,e)}),[e]),(0,v.useMemo)((()=>{d(0,Math.min(u,e))}),n);let p=s.current.map(((e,t)=>Ny(e,c[t]))),m=(0,v.useContext)(My),f=vb(m),h=m!==f&&Wb(m);mb((()=>{i.current++,a.ctrls=s.current;let{queue:e}=a;e.length&&(a.queue=[],qg(e,(e=>e()))),qg(s.current,((e,t)=>{o?.add(e),h&&e.start({default:m});let n=c[t];n&&(Gb(e,n.ref),e.ref?e.queue.push(n):e.start(n))}))})),hb((()=>()=>{qg(a.ctrls,(e=>e.stop(!0)))}));let g=p.map((e=>({...e})));return o?[g,o]:g}var jy=class extends sy{constructor(e,t){super(),this.source=e,this.calc=Av(...t);let n=this._get(),r=Nb(n);_b(this,r.create(n))}key;idle=!0;calc;_active=new Set;advance(e){let t=this._get();Gg(t,this.get())||(yb(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&Hy(this._active)&&Vy(this)}_get(){let e=Ug.arr(this.source)?this.source.map(Wv):Yg(Wv(this.source));return this.calc(...e)}_start(){this.idle&&!Hy(this._active)&&(this.idle=!1,qg(kb(this),(e=>{e.done=!1})),Wg.skipAnimation?(Sg.batchedUpdates((()=>this.advance())),Vy(this)):uv.start(this))}_attach(){let e=1;qg(Yg(this.source),(t=>{Vv(t)&&Kv(t,this),ly(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))})),this.priority=e,this._start()}_detach(){qg(Yg(this.source),(e=>{Vv(e)&&Yv(e,this)})),this._active.clear(),Vy(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=Yg(this.source).reduce(((e,t)=>Math.max(e,(ly(t)?t.priority:0)+1)),0))}};function zy(e){return!1!==e.idle}function Hy(e){return!e.size||Array.from(e).every(zy)}function Vy(e){e.idle||(e.idle=!0,qg(kb(e),(e=>{e.done=!0})),Uv(e,{type:"idle",parent:e}))}Wg.assign({createStringInterpolator:ab,to:(e,t)=>new jy(e,t)}),uv.advance;var Wy=/^--/;function $y(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||Wy.test(e)||Gy.hasOwnProperty(e)&&Gy[e]?(""+t).trim():t+"px"}var Uy={},Gy={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},qy=["Webkit","Ms","Moz","O"];Gy=Object.keys(Gy).reduce(((e,t)=>(qy.forEach((n=>e[((e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1))(n,t)]=e[t])),e)),Gy);var Ky=/^(matrix|translate|scale|rotate|skew)/,Yy=/^(translate)/,Xy=/^(rotate|skew)/,Jy=(e,t)=>Ug.num(e)&&0!==e?e+t:e,Qy=(e,t)=>Ug.arr(e)?e.every((e=>Qy(e,t))):Ug.num(e)?e===t:parseFloat(e)===t,e_=class extends Sb{constructor({x:e,y:t,z:n,...r}){let o=[],i=[];(e||t||n)&&(o.push([e||0,t||0,n||0]),i.push((e=>[`translate3d(${e.map((e=>Jy(e,"px"))).join(",")})`,Qy(e,0)]))),Kg(r,((e,t)=>{if("transform"===t)o.push([e||""]),i.push((e=>[e,""===e]));else if(Ky.test(t)){if(delete r[t],Ug.und(e))return;let n=Yy.test(t)?"px":Xy.test(t)?"deg":"";o.push(Yg(e)),i.push("rotate3d"===t?([e,t,r,o])=>[`rotate3d(${e},${t},${r},${Jy(o,n)})`,Qy(o,0)]:e=>[`${t}(${e.map((e=>Jy(e,n))).join(",")})`,Qy(e,t.startsWith("scale")?1:0)])}})),o.length&&(r.transform=new t_(o,i)),super(r)}},t_=class extends Gv{constructor(e,t){super(),this.inputs=e,this.transforms=t}_value=null;get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return qg(this.inputs,((n,r)=>{let o=Wv(n[0]),[i,l]=this.transforms[r](Ug.arr(o)?o:n.map(Wv));e+=" "+i,t=t&&l})),t?"none":e}observerAdded(e){1==e&&qg(this.inputs,(e=>qg(e,(e=>Vv(e)&&Kv(e,this)))))}observerRemoved(e){0==e&&qg(this.inputs,(e=>qg(e,(e=>Vv(e)&&Yv(e,this)))))}eventObserved(e){"change"==e.type&&(this._value=null),Uv(this,e)}};Wg.assign({batchedUpdates:b.unstable_batchedUpdates,createStringInterpolator:ab,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}});var n_=((e,{applyAnimatedValues:t=(()=>!1),createAnimatedStyle:n=(e=>new Sb(e)),getComponentProps:r=(e=>e)}={})=>{let o={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},i=e=>{let t=Ab(e)||"Anonymous";return(e=Ug.str(e)?i[e]||(i[e]=Bb(e,o)):e[Pb]||(e[Pb]=Bb(e,o))).displayName=`Animated(${t})`,e};return Kg(e,((t,n)=>{Ug.arr(e)&&(n=Ab(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;let n="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName,{style:r,children:o,scrollTop:i,scrollLeft:l,viewBox:a,...s}=t,c=Object.values(s),u=Object.keys(s).map((t=>n||e.hasAttribute(t)?t:Uy[t]||(Uy[t]=t.replace(/([A-Z])/g,(e=>"-"+e.toLowerCase())))));void 0!==o&&(e.textContent=o);for(let t in r)if(r.hasOwnProperty(t)){let n=$y(t,r[t]);Wy.test(t)?e.style.setProperty(t,n):e.style[t]=n}u.forEach(((t,n)=>{e.setAttribute(t,c[n])})),void 0!==i&&(e.scrollTop=i),void 0!==l&&(e.scrollLeft=l),void 0!==a&&e.setAttribute("viewBox",a)},createAnimatedStyle:e=>new e_(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}),r_=(n_.animated,n(2734)),o_=n(16573);const i_=e=>e+1,l_=e=>({top:e.offsetTop,left:e.offsetLeft});var a_=function(e){let{isSelected:t,adjustScrolling:n,enableAnimation:r,triggerAnimationOnChange:o}=e;const i=(0,v.useRef)(),l=(0,r_.Z)()||!r,[a,s]=(0,v.useReducer)(i_,0),[c,u]=(0,v.useReducer)(i_,0),[d,p]=(0,v.useState)({x:0,y:0}),m=(0,v.useMemo)((()=>i.current?l_(i.current):null),[o]),f=(0,v.useMemo)((()=>{if(!n||!i.current)return()=>{};const e=(0,o_.Z)(i.current);if(!e)return()=>{};const t=i.current.getBoundingClientRect();return()=>{const n=i.current.getBoundingClientRect().top-t.top;n&&(e.scrollTop+=n)}}),[o,n]);return(0,v.useLayoutEffect)((()=>{a&&u()}),[a]),(0,v.useLayoutEffect)((()=>{if(!m)return;if(l)return void f();i.current.style.transform=void 0;const e=l_(i.current);s(),p({x:Math.round(m.left-e.left),y:Math.round(m.top-e.top)})}),[o]),function(e,t){let n=Ug.fun(e),[[r],o]=Fy(1,n?e:[e],n?t||[]:t)}({from:{x:d.x,y:d.y},to:{x:0,y:0},reset:a!==c,config:{mass:5,tension:2e3,friction:200},immediate:l,onChange:function(e){let{value:n}=e;if(!i.current)return;let{x:r,y:o}=n;r=Math.round(r),o=Math.round(o);const l=0===r&&0===o;i.current.style.transformOrigin="center center",i.current.style.transform=l?void 0:`translate3d(${r}px,${o}px,0)`,i.current.style.zIndex=t?"1":"",f()}}),i},s_=n(56247),c_=n(25542),u_=n(25936),d_=n(96293);const p_=".block-editor-block-list__block",m_=".block-list-appender",f_=".block-editor-button-block-appender";function h_(e,t){return t.closest([p_,m_,f_].join(","))===e}function g_(e){for(;e&&e.nodeType!==e.ELEMENT_NODE;)e=e.parentNode;if(!e)return;const t=e.closest(p_);return t?t.id.slice("block-".length):void 0}function v_(e){const t=(0,v.useRef)(),n=function(e){return(0,E.Z)((t=>{const{getSelectedBlocksInitialCaretPosition:n,__unstableGetEditorMode:r,isBlockSelected:o}=t(ku);if(o(e)&&"edit"===r())return n()}),[e])}(e),{isBlockSelected:r,isMultiSelecting:o}=(0,E.Z)(ku);return(0,v.useEffect)((()=>{if(!r(e)||o())return;if(null==n)return;if(!t.current)return;const{ownerDocument:i}=t.current;if(h_(t.current,i.activeElement))return;const l=s_.focus.tabbable.find(t.current).filter((e=>(0,c_.Z)(e))),a=-1===n,s=l[a?l.length-1:0]||t.current;if(h_(t.current,s)){if(!t.current.getAttribute("contenteditable")){const e=s_.focus.tabbable.findNext(t.current);if(e&&h_(t.current,e)&&(0,u_.Z)(e))return void e.focus()}(0,d_.Z)(s,a)}else t.current.focus()}),[n,e]),t}function b_(e){if(e.defaultPrevented)return;const t="mouseover"===e.type?"add":"remove";e.preventDefault(),e.currentTarget.classList[t]("is-hovered")}function y_(){const e=(0,E.Z)((e=>{const{getSettings:t}=e(ku);return t().outlineMode}),[]);return(0,bl.Z)((t=>{if(e)return t.addEventListener("mouseout",b_),t.addEventListener("mouseover",b_),()=>{t.removeEventListener("mouseout",b_),t.removeEventListener("mouseover",b_),t.classList.remove("is-hovered")}}),[e])}function __(e){return(0,E.Z)((t=>{const{isBlockBeingDragged:n,isBlockHighlighted:r,isBlockSelected:o,isBlockMultiSelected:i,getBlockName:l,getSettings:a,hasSelectedInnerBlock:s,isTyping:c,__unstableIsFullySelected:u,__unstableSelectionHasUnmergeableBlock:d}=t(ku),{outlineMode:p}=a(),m=n(e),f=o(e),h=l(e),g=s(e,!0),v=i(e);return w()({"is-selected":f,"is-highlighted":r(e),"is-multi-selected":v,"is-partially-selected":v&&!u()&&!d(),"is-reusable":ge(pe(h)),"is-dragging":m,"has-child-selected":g,"remove-outline":f&&p&&c()})}),[e])}function k_(e){return(0,E.Z)((t=>{const n=t(ku).getBlockName(e),r=pe(n);if((null==r?void 0:r.apiVersion)>1)return gn(n)}),[e])}function x_(e){return(0,E.Z)((t=>{const{getBlockName:n,getBlockAttributes:r}=t(ku),o=r(e);if(null==o||!o.className)return;const i=pe(n(e));return(null==i?void 0:i.apiVersion)>1?o.className:void 0}),[e])}function w_(e){return(0,E.Z)((t=>{const{hasBlockMovingClientId:n,canInsertBlockType:r,getBlockName:o,getBlockRootClientId:i,isBlockSelected:l}=t(ku);if(!l(e))return;const a=n();return a?w()("is-block-moving-mode",{"can-insert-moving-block":r(o(a),i(e))}):void 0}),[e])}function C_(e){const{isBlockSelected:t}=(0,E.Z)(ku),{selectBlock:n,selectionChange:r}=(0,S.Z)(ku);return(0,bl.Z)((o=>{function i(i){o.parentElement.closest('[contenteditable="true"]')||(t(e)?i.target.isContentEditable||r(e):h_(o,i.target)&&n(e))}return o.addEventListener("focusin",i),()=>{o.removeEventListener("focusin",i)}}),[t,n])}function E_(e){const t=(0,E.Z)((t=>t(ku).isBlockSelected(e)),[e]),{getBlockRootClientId:n,getBlockIndex:r}=(0,E.Z)(ku),{insertDefaultBlock:o,removeBlock:i}=(0,S.Z)(ku);return(0,bl.Z)((l=>{if(t)return l.addEventListener("keydown",a),l.addEventListener("dragstart",s),()=>{l.removeEventListener("keydown",a),l.removeEventListener("dragstart",s)};function a(t){const{keyCode:a,target:s}=t;a!==Al.ENTER&&a!==Al.BACKSPACE&&a!==Al.DELETE||s!==l||(0,c_.Z)(s)||(t.preventDefault(),a===Al.ENTER?o({},n(e),r(e)+1):i(e))}function s(e){e.preventDefault()}}),[e,t,n,r,o,i])}function S_(e){const{isNavigationMode:t,isBlockSelected:n}=(0,E.Z)(ku),{setNavigationMode:r,selectBlock:o}=(0,S.Z)(ku);return(0,bl.Z)((i=>{function l(i){t()&&!i.defaultPrevented&&(i.preventDefault(),n(e)?r(!1):o(e))}return i.addEventListener("mousedown",l),()=>{i.addEventListener("mousedown",l)}}),[e,t,n,r])}const I_=(0,v.createContext)({refs:new Map,callbacks:new Map});function T_(e){let{children:t}=e;const n=(0,v.useMemo)((()=>({refs:new Map,callbacks:new Map})),[]);return(0,v.createElement)(I_.Provider,{value:n},t)}function N_(e){const{refs:t,callbacks:n}=(0,v.useContext)(I_),r=(0,v.useRef)();return(0,v.useLayoutEffect)((()=>(t.set(r,e),()=>{t.delete(r)})),[e]),(0,bl.Z)((t=>{r.current=t,n.forEach(((n,r)=>{e===n&&r(t)}))}),[e])}function B_(e){const{refs:t}=(0,v.useContext)(I_),n=(0,v.useRef)();return n.current=e,(0,v.useMemo)((()=>({get current(){let e=null;for(const[r,o]of t.entries())o===n.current&&r.current&&(e=r.current);return e}})),[])}function L_(e){const{callbacks:t}=(0,v.useContext)(I_),n=B_(e),[r,o]=(0,v.useState)(null);return(0,v.useLayoutEffect)((()=>{if(e)return t.set(o,e),()=>{t.delete(o)}}),[e]),n.current||r}function P_(){const e=(0,v.useContext)(CT);return(0,bl.Z)((t=>{if(e)return e.observe(t),()=>{e.unobserve(t)}}),[e])}function A_(e){return(0,E.Z)((t=>{const{__unstableHasActiveBlockOverlayActive:n}=t(ku);return n(e)}),[e])}function D_(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{__unstableIsHtml:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{clientId:n,className:r,wrapperProps:o={},isAligned:i}=(0,v.useContext)(R_),{index:l,mode:a,name:s,blockApiVersion:c,blockTitle:u,isPartOfSelection:d,adjustScrolling:p,enableAnimation:m}=(0,E.Z)((e=>{const{getBlockAttributes:t,getBlockIndex:r,getBlockMode:o,getBlockName:i,isTyping:l,getGlobalBlockCount:a,isBlockSelected:s,isBlockMultiSelected:c,isAncestorMultiSelected:u,isFirstMultiSelectedBlock:d}=e(ku),{getActiveBlockVariation:p}=e(Xt),m=s(n),f=c(n)||u(n),h=i(n),g=pe(h),v=p(h,t(n));return{index:r(n),mode:o(n),name:h,blockApiVersion:(null==g?void 0:g.apiVersion)||1,blockTitle:(null==v?void 0:v.title)||(null==g?void 0:g.title),isPartOfSelection:m||f,adjustScrolling:m||d(n),enableAnimation:!l()&&a()<=200}}),[n]),f=A_(n),h=(0,N.sprintf)((0,N.__)("Block: %s"),u),g="html"!==a||t?"":"-visual",b=(0,vl.Z)([e.ref,v_(n),N_(n),C_(n),E_(n),S_(n),y_(),P_(),a_({isSelected:d,adjustScrolling:p,enableAnimation:m,triggerAnimationOnChange:l}),Cg({isDisabled:!f})]),y=Su();return c<2&&n===y.clientId&&"undefined"!=typeof process&&process.env,{tabIndex:0,...o,...e,ref:b,id:`block-${n}${g}`,role:"document","aria-label":h,"data-block":n,"data-type":s,"data-title":u,className:w()(w()("block-editor-block-list__block",{"wp-block":!i,"has-block-overlay":f}),r,e.className,o.className,__(n),k_(n),x_(n),w_(n)),style:{...o.style,...e.style}}}D_.save=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{blockType:t,attributes:n}=bn;return(0,_e.O)("blocks.getSaveContent.extraProps",{...e},t,n)};const R_=(0,v.createContext)();function M_(e){let{children:t,isHtml:n,...r}=e;return(0,v.createElement)("div",D_(r,{__unstableIsHtml:n}),t)}const O_=(0,Jh.Z)(((e,t)=>{let{clientId:n,rootClientId:r}=t;const{isBlockSelected:o,getBlockMode:i,isSelectionEnabled:l,getTemplateLock:a,__unstableGetBlockWithoutInnerBlocks:s,canRemoveBlock:c,canMoveBlock:u}=e(ku),d=s(n),p=o(n),m=a(r),f=c(n,r),h=u(n,r),{name:g,attributes:v,isValid:b}=d||{};return{mode:i(n),isSelectionEnabled:l(),isLocked:!!m,canRemove:f,canMove:h,block:d,name:g,attributes:v,isValid:b,isSelected:p}})),Z_=(0,Qh.Z)(((e,t,n)=>{const{updateBlockAttributes:r,insertBlocks:o,mergeBlocks:i,replaceBlocks:l,toggleSelection:a,__unstableMarkLastChangeAsPersistent:s,moveBlocksToPosition:c,removeBlock:u}=e(ku);return{setAttributes(e){const{getMultiSelectedBlockClientIds:o}=n.select(ku),i=o(),{clientId:l}=t,a=i.length?i:[l];r(a,e)},onInsertBlocks(e,n){const{rootClientId:r}=t;o(e,n,r)},onInsertBlocksAfter(e){const{clientId:r,rootClientId:i}=t,{getBlockIndex:l}=n.select(ku),a=l(r);o(e,a+1,i)},onMerge(e){const{clientId:r,rootClientId:l}=t,{getPreviousBlockClientId:a,getNextBlockClientId:s,getBlock:d,getBlockAttributes:p,getBlockName:m,getBlockOrder:f,getBlockIndex:h,getBlockRootClientId:g,canInsertBlockType:v}=n.select(ku);function b(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const r=g(e),i=f(e),[l]=i;if(1===i.length&&Re(d(l)))u(e);else{if(v(m(l),r))c([l],e,r,h(e));else{const i=Pe(d(l),de());i&&i.length&&n.batch((()=>{o(i,h(e),r,t),u(l,!1)}))}!f(e).length&&Re(d(e))&&u(e,!1)}}if(e){if(l){const e=s(l);if(e){if(m(l)!==m(e))return void i(l,e);{const t=p(l),r=p(e);if(Object.keys(t).every((e=>t[e]===r[e])))return void n.batch((()=>{c(f(e),e,l),u(e,!1)}))}}}const e=s(r);if(!e)return;f(e).length?b(e,!1):i(r,e)}else{const e=a(r);if(e)i(e,r);else if(l){const e=a(l);if(e&&m(l)===m(e)){const t=p(l),r=p(e);if(Object.keys(t).every((e=>t[e]===r[e])))return void n.batch((()=>{c(f(l),l,e),u(l,!1)}))}b(l)}}},onReplace(e,n,r){e.length&&!Me(e[e.length-1])&&s(),l([t.clientId],e,n,r)},toggleSelection(e){a(e)}}}));var F_=(0,eg.Z)(tg.Z,O_,Z_,ng((e=>{let{block:t}=e;return!!t})),Xh("editor.BlockListBlock"))((function(e){var t;let{block:{__unstableBlockSource:n},mode:r,isLocked:o,canRemove:i,clientId:l,isSelected:a,isSelectionEnabled:s,className:c,__unstableLayoutClassNames:u,name:d,isValid:p,attributes:m,wrapperProps:f,setAttributes:h,onReplace:g,onInsertBlocksAfter:b,onMerge:y,toggleSelection:_}=e;const{themeSupportsLayout:k,hasContentLockedParent:x,isContentBlock:C,isContentLocking:I,isTemporarilyEditingAsBlocks:T}=(0,E.Z)((e=>{const{getSettings:t,__unstableGetContentLockingParent:n,getTemplateLock:r,__unstableGetTemporarilyEditingAsBlocks:o}=e(ku),i=!!n(l);return{themeSupportsLayout:t().supportsLayout,isContentBlock:e(Xt).__experimentalHasContentRoleAttribute(d),hasContentLockedParent:i,isContentLocking:"contentOnly"===r(l)&&!i,isTemporarilyEditingAsBlocks:o()===l}}),[d,l]),{removeBlock:N}=(0,S.Z)(ku),B=(0,v.useCallback)((()=>N(l)),[l]),L=Bf()||{};let P=(0,v.createElement)(cg,{name:d,isSelected:a,attributes:m,setAttributes:h,insertBlocksAfter:o?void 0:b,onReplace:i?g:void 0,onRemove:i?B:void 0,mergeBlocks:i?y:void 0,clientId:l,isSelectionEnabled:s,toggleSelection:_,__unstableLayoutClassNames:u,__unstableParentLayout:Object.keys(L).length?L:void 0});const A=pe(d);x&&!C&&(f={...f,tabIndex:-1}),null!=A&&A.getEditWrapperProps&&(f=function(e,t){const n={...e,...t};return null!=e&&e.className&&null!=t&&t.className&&(n.className=w()(e.className,t.className)),null!=e&&e.style&&null!=t&&t.style&&(n.style={...e.style,...t.style}),n}(f,A.getEditWrapperProps(m)));const D=f&&!!f["data-align"]&&!k;let R;if(D&&(P=(0,v.createElement)("div",{className:"wp-block","data-align":f["data-align"]},P)),p)R="html"===r?(0,v.createElement)(v.Fragment,null,(0,v.createElement)("div",{style:{display:"none"}},P),(0,v.createElement)(M_,{isHtml:!0},(0,v.createElement)(wg,{clientId:l}))):(null==A?void 0:A.apiVersion)>1?P:(0,v.createElement)(M_,f,P);else{const e=n?hn(n):_n(A,m);R=(0,v.createElement)(M_,{className:"has-warning"},(0,v.createElement)(vg,{clientId:l}),(0,v.createElement)(pn.Z,null,(0,rg.Z)(e)))}const{"data-align":M,...O}=null!==(t=f)&&void 0!==t?t:{},Z={clientId:l,className:w()({"is-content-locked":I,"is-content-locked-temporarily-editing-as-blocks":T,"is-content-block":x&&C},M&&k&&`align${M}`,c),wrapperProps:O,isAligned:D},F=(0,v.useMemo)((()=>Z),Object.values(Z));return(0,v.createElement)(R_.Provider,{value:F},(0,v.createElement)(kg,{fallback:(0,v.createElement)(M_,{className:"has-warning"},(0,v.createElement)(yg,null))},R))})),j_=n(17416),z_=n(87734),H_=n(17647);let V_,W_,$_,U_;const G_=/<(\/)?(\w+)\s*(\/)?>/g;function q_(e,t,n,r,o){return{element:e,tokenStart:t,tokenLength:n,prevOffset:r,leadingTextStart:o,children:[]}}function K_(e){const t=function(){const e=G_.exec(V_);if(null===e)return["no-more-tokens"];const t=e.index,[n,r,o,i]=e,l=n.length;return i?["self-closed",o,t,l]:r?["closer",o,t,l]:["opener",o,t,l]}(),[n,r,o,i]=t,l=U_.length,a=o>W_?W_:null;if(!e[r])return Y_(),!1;switch(n){case"no-more-tokens":if(0!==l){const{leadingTextStart:e,tokenStart:t}=U_.pop();$_.push(V_.substr(e,t))}return Y_(),!1;case"self-closed":return 0===l?(null!==a&&$_.push(V_.substr(a,o-a)),$_.push(e[r]),W_=o+i,!0):(X_(q_(e[r],o,i)),W_=o+i,!0);case"opener":return U_.push(q_(e[r],o,i,o+i,a)),W_=o+i,!0;case"closer":if(1===l)return function(e){const{element:t,leadingTextStart:n,prevOffset:r,tokenStart:o,children:i}=U_.pop(),l=e?V_.substr(r,e-r):V_.substr(r);l&&i.push(l),null!==n&&$_.push(V_.substr(n,o-n)),$_.push((0,v.cloneElement)(t,null,...i))}(o),W_=o+i,!0;const t=U_.pop(),n=V_.substr(t.prevOffset,o-t.prevOffset);t.children.push(n),t.prevOffset=o+i;const s=q_(t.element,t.tokenStart,t.tokenLength,o+i);return s.children=t.children,X_(s),W_=o+i,!0;default:return Y_(),!1}}function Y_(){const e=V_.length-W_;0!==e&&$_.push(V_.substr(W_,e))}function X_(e){const{element:t,tokenStart:n,tokenLength:r,prevOffset:o,children:i}=e,l=U_[U_.length-1],a=V_.substr(l.prevOffset,n-l.prevOffset);a&&l.children.push(a),l.children.push((0,v.cloneElement)(t,null,...i)),l.prevOffset=o||n+r}var J_=(e,t)=>{if(V_=e,W_=0,$_=[],U_=[],G_.lastIndex=0,!(e=>{const t="object"==typeof e,n=t&&Object.values(e);return t&&n.length&&n.every((e=>(0,v.isValidElement)(e)))})(t))throw new TypeError("The conversionMap provided is not valid. It must be an object with values that are WPElements");do{}while(K_(t));return(0,v.createElement)(v.Fragment,null,...$_)},Q_=n(28943),ek=function(e){const{children:t}=e;return(0,v.createElement)("div",{className:"components-tip"},(0,v.createElement)(Vm.Z,{icon:Q_.Z}),(0,v.createElement)("p",null,t))};const tk=[J_((0,N.__)("While writing, you can press <kbd>/</kbd> to quickly insert new blocks."),{kbd:(0,v.createElement)("kbd",null)}),J_((0,N.__)("Indent a list by pressing <kbd>space</kbd> at the beginning of a line."),{kbd:(0,v.createElement)("kbd",null)}),J_((0,N.__)("Outdent a list by pressing <kbd>backspace</kbd> at the beginning of a line."),{kbd:(0,v.createElement)("kbd",null)}),(0,N.__)("Drag files into the editor to automatically insert media blocks."),(0,N.__)("Change a block's type by pressing the block icon on the toolbar.")];var nk=function(){const[e]=(0,v.useState)(Math.floor(Math.random()*tk.length));return(0,v.createElement)(ek,null,tk[e])},rk=n(83158),ok=n(74193),ik=n(50418),lk=(0,v.memo)((function(e){var t;let{icon:n,showColors:r=!1,className:o,context:i}=e;"block-default"===(null===(t=n)||void 0===t?void 0:t.src)&&(n={src:ik.Z});const l=(0,v.createElement)(Od.Z,{icon:n&&n.src?n.src:n,context:i}),a=r?{backgroundColor:n&&n.background,color:n&&n.foreground}:{};return(0,v.createElement)("span",{style:a,className:w()("block-editor-block-icon",o,{"has-colors":r})},l)})),ak=function(e){let{title:t,icon:n,description:r,blockType:o,className:i}=e;o&&((0,St.default)("`blockType` property in `BlockCard component`",{since:"5.7",alternative:"`title, icon and description` properties"}),({title:t,icon:n,description:r}=o));const{parentNavBlockClientId:l}=(0,E.Z)((e=>{const{getSelectedBlockClientId:t,getBlockParentsByBlockName:n}=e(ku);return{parentNavBlockClientId:n(t(),"core/navigation",!0)[0]}}),[]),{selectBlock:a}=(0,S.Z)(ku);return(0,v.createElement)("div",{className:w()("block-editor-block-card",i)},l&&(0,v.createElement)(Mo.ZP,{onClick:()=>a(l),label:(0,N.__)("Go to parent Navigation block"),style:{minWidth:24,padding:0},icon:(0,N.isRTL)()?rk.Z:ok.Z,isSmall:!0}),(0,v.createElement)(lk,{icon:n,showColors:!0}),(0,v.createElement)("div",{className:"block-editor-block-card__content"},(0,v.createElement)("h2",{className:"block-editor-block-card__title"},t),(0,v.createElement)("span",{className:"block-editor-block-card__description"},r)))},sk=n(30285),ck=n(3563),uk=n(7673);const dk=(0,Ao.o)((e=>(0,sk.Z)((t=>{let{useSubRegistry:n=!0,registry:r,...o}=t;if(!n)return(0,v.createElement)(e,(0,Po.Z)({registry:r},o));const[i,l]=(0,v.useState)(null);return(0,v.useEffect)((()=>{const e=(0,ck.p)({},r);e.registerStore(vu,_u),l(e)}),[r]),i?(0,v.createElement)(uk.ZP,{value:i},(0,v.createElement)(e,(0,Po.Z)({registry:i},o))):null}))),"withRegistryProvider"),pk=()=>{};function mk(e){let{clientId:t=null,value:n,selection:r,onChange:o=pk,onInput:i=pk}=e;const l=(0,yl.Z)(),{resetBlocks:a,resetSelection:s,replaceInnerBlocks:c,setHasControlledInnerBlocks:u,__unstableMarkNextChangeAsNotPersistent:d}=l.dispatch(ku),{getBlockName:p,getBlocks:m}=l.select(ku),f=(0,E.Z)((e=>!t||e(ku).areInnerBlocksControlled(t)),[t]),h=(0,v.useRef)({incoming:null,outgoing:[]}),g=(0,v.useRef)(!1),b=()=>{n&&(d(),t?l.batch((()=>{u(t,!0);const e=n.map((e=>Ce(e)));g.current&&(h.current.incoming=e),d(),c(t,e)})):(g.current&&(h.current.incoming=n),a(n)))},y=(0,v.useRef)(i),_=(0,v.useRef)(o);(0,v.useEffect)((()=>{y.current=i,_.current=o}),[i,o]),(0,v.useEffect)((()=>{h.current.outgoing.includes(n)?h.current.outgoing[h.current.outgoing.length-1]===n&&(h.current.outgoing=[]):m(t)!==n&&(h.current.outgoing=[],b(),r&&s(r.selectionStart,r.selectionEnd,r.initialPosition))}),[n,t]),(0,v.useEffect)((()=>{f||(h.current.outgoing=[],b())}),[f]),(0,v.useEffect)((()=>{const{getSelectionStart:e,getSelectionEnd:n,getSelectedBlocksInitialCaretPosition:r,isLastBlockChangePersistent:o,__unstableIsLastBlockChangeIgnored:i,areInnerBlocksControlled:a}=l.select(ku);let s=m(t),c=o(),u=!1;g.current=!0;const d=l.subscribe((()=>{if(null!==t&&null===p(t))return;if(t&&!a(t))return;const l=o(),d=m(t),f=d!==s;if(s=d,f&&(h.current.incoming||i()))return h.current.incoming=null,void(c=l);(f||u&&!f&&l&&!c)&&(c=l,h.current.outgoing.push(s),(c?_.current:y.current)(s,{selection:{selectionStart:e(),selectionEnd:n(),initialPosition:r()}})),u=f}));return()=>{g.current=!1,d()}}),[l,t])}const fk=dk((e=>{const{children:t,settings:n,stripExperimentalSettings:r=!1}=e,{__experimentalUpdateSettings:o}=yu((0,S.Z)(ku));return(0,v.useEffect)((()=>{o({...n,__internalIsInitialized:!0},r)}),[n]),mk(e),(0,v.createElement)(T_,null,t)}));var hk=e=>(0,v.createElement)(fk,(0,Po.Z)({},e,{stripExperimentalSettings:!0}),e.children);const gk={name:"u2jump",styles:"position:relative;pointer-events:none;&::after{content:'';position:absolute;top:0;right:0;bottom:0;left:0;}*{pointer-events:none;}"},vk=(0,v.createContext)(!1),{Consumer:bk,Provider:yk}=vk;function _k(e){let{className:t,children:n,isDisabled:r=!0,...o}=e;const i=(0,Yu.I)();return(0,v.createElement)(yk,{value:r},(0,v.createElement)("div",(0,Po.Z)({inert:r?"true":void 0,className:r?i(gk,t,"components-disabled"):void 0},o),n))}_k.Context=vk,_k.Consumer=bk;var kk=_k;function xk(){const{getSettings:e,hasSelectedBlock:t,hasMultiSelection:n}=(0,E.Z)(ku),{clearSelectedBlock:r}=(0,S.Z)(ku),{clearBlockSelection:o}=e();return(0,bl.Z)((e=>{if(o)return e.addEventListener("mousedown",i),()=>{e.removeEventListener("mousedown",i)};function i(o){(t()||n())&&o.target===e&&r()}}),[t,n,r,o])}function wk(e){return(0,v.createElement)("div",(0,Po.Z)({ref:xk()},e))}function Ck(e){const{isMultiSelecting:t,getMultiSelectedBlockClientIds:n,hasMultiSelection:r,getSelectedBlockClientId:o,getSelectedBlocksInitialCaretPosition:i,__unstableIsFullySelected:l}=e(ku);return{isMultiSelecting:t(),multiSelectedBlockClientIds:n(),hasMultiSelection:r(),selectedBlockClientId:o(),initialPosition:i(),isFullSelection:l()}}function Ek(){const{initialPosition:e,isMultiSelecting:t,multiSelectedBlockClientIds:n,hasMultiSelection:r,selectedBlockClientId:o,isFullSelection:i}=(0,E.Z)(Ck,[]);return(0,bl.Z)((o=>{const{ownerDocument:l}=o,{defaultView:a}=l;if(null==e)return;if(!r||t)return;const{length:s}=n;s<2||i&&(o.contentEditable=!0,o.focus(),a.getSelection().removeAllRanges())}),[r,t,n,o,e,i])}var Sk=n(12999),Ik=n(15309),Tk=n(137),Nk=n(6188),Bk=n(71265);function Lk(e,t,n,r){let o,i=s_.focus.focusable.find(n);return t&&i.reverse(),i=i.slice(i.indexOf(e)+1),r&&(o=e.getBoundingClientRect()),i.find((function(e){if(1!==e.children.length||!function(e,t){return e.closest(p_)===t.closest(p_)}(e,e.firstElementChild)||"true"!==e.firstElementChild.getAttribute("contenteditable")){if(!s_.focus.tabbable.isTabbableIndex(e))return!1;if(e.isContentEditable&&"true"!==e.contentEditable)return!1;if(r){const t=e.getBoundingClientRect();if(t.left>=o.right||t.right<=o.left)return!1}return!0}}))}function Pk(){const{getMultiSelectedBlocksStartClientId:e,getMultiSelectedBlocksEndClientId:t,getSettings:n,hasMultiSelection:r,__unstableIsFullySelected:o}=(0,E.Z)(ku),{selectBlock:i}=(0,S.Z)(ku);return(0,bl.Z)((l=>{let a;function s(){a=null}function c(s){if(s.defaultPrevented)return;const{keyCode:c,target:u,shiftKey:d,ctrlKey:p,altKey:m,metaKey:f}=s,h=c===Al.UP,g=c===Al.DOWN,v=c===Al.LEFT,b=c===Al.RIGHT,y=h||v,_=v||b,k=h||g,x=_||k,w=d||p||m||f,C=k?Sk.Z:Ik.Z,{ownerDocument:E}=l,{defaultView:S}=E;if(!x)return;if(r()){if(d)return;if(!o())return;return s.preventDefault(),void(y?i(e()):i(t(),-1))}if(!function(e,t,n){if((t===Al.UP||t===Al.DOWN)&&!n)return!0;const{tagName:r}=e;return"INPUT"===r?["button","checkbox","color","file","image","radio","reset","submit"].includes(e.getAttribute("type")):"TEXTAREA"!==r}(u,c,w))return;k?a||(a=(0,Tk.Z)(S)):a=null;const I=(0,Nk.Z)(u)?!y:y,{keepCaretInsideBlock:T}=n();if(d)(function(e,t){const n=Lk(e,t,l);return n&&g_(n)})(u,y)&&C(u,y)&&(l.contentEditable=!0,l.focus());else if(!k||!(0,Sk.Z)(u,y)||m&&!(0,Ik.Z)(u,I)||T){if(_&&S.getSelection().isCollapsed&&(0,Ik.Z)(u,I)&&!T){const e=Lk(u,I,l);(0,d_.Z)(e,y),s.preventDefault()}}else{const e=Lk(u,y,l,!0);e&&((0,Bk.Z)(e,m?!y:y,m?void 0:a),s.preventDefault())}}return l.addEventListener("mousedown",s),l.addEventListener("keydown",c),()=>{l.removeEventListener("mousedown",s),l.removeEventListener("keydown",c)}}),[])}var Ak=n(82009),Dk=n(18883);function Rk(){const{getBlockOrder:e,getSelectedBlockClientIds:t,getBlockRootClientId:n}=(0,E.Z)(ku),{multiSelect:r,selectBlock:o}=(0,S.Z)(ku),i=(0,Dk.sx)();return(0,bl.Z)((l=>{function a(a){if(!i("core/block-editor/select-all",a))return;const s=t();if(s.length<2&&!(0,Ak.Z)(a.target))return;a.preventDefault();const[c]=s,u=n(c),d=e(u);s.length!==d.length?r(d[0],d[d.length-1]):u&&(l.ownerDocument.defaultView.getSelection().removeAllRanges(),o(u))}return l.addEventListener("keydown",a),()=>{l.removeEventListener("keydown",a)}}),[])}function Mk(e,t){e.contentEditable=t,t&&e.focus()}function Ok(){const{startMultiSelect:e,stopMultiSelect:t}=(0,S.Z)(ku),{isSelectionEnabled:n,hasMultiSelection:r,isDraggingBlocks:o}=(0,E.Z)(ku);return(0,bl.Z)((i=>{const{ownerDocument:l}=i,{defaultView:a}=l;let s,c;function u(){t(),a.removeEventListener("mouseup",u),c=a.requestAnimationFrame((()=>{if(r())return;Mk(i,!1);const e=a.getSelection();if(e.rangeCount){const{commonAncestorContainer:t}=e.getRangeAt(0);s.contains(t)&&s.focus()}}))}function d(t){let{buttons:r,target:c}=t;o()||1===r&&c.getAttribute("contenteditable")&&n()&&(s=l.activeElement,e(),a.addEventListener("mouseup",u),Mk(i,!0))}return i.addEventListener("mouseout",d),()=>{i.removeEventListener("mouseout",d),a.removeEventListener("mouseup",u),a.cancelAnimationFrame(c)}}),[e,t,n,r])}function Zk(e,t){e.contentEditable!==String(t)&&(e.contentEditable=t),t&&e.focus()}function Fk(){const{multiSelect:e,selectBlock:t,selectionChange:n}=(0,S.Z)(ku),{getBlockParents:r,getBlockSelectionStart:o}=(0,E.Z)(ku);return(0,bl.Z)((n=>{const{ownerDocument:i}=n,{defaultView:l}=i;function a(i){const a=l.getSelection();if(!a.rangeCount)return;const s=i.shiftKey&&"mouseup"===i.type;if(a.isCollapsed&&!s)return void Zk(n,!1);let c=g_(function(e){const{anchorNode:t,anchorOffset:n}=e;return t.nodeType===t.TEXT_NODE||0===n?t:t.childNodes[n-1]}(a)),u=g_(function(e){const{focusNode:t,focusOffset:n}=e;return t.nodeType===t.TEXT_NODE||n===t.childNodes.length?t:t.childNodes[n]}(a));if(s){const e=o(),t=g_(i.target),n=t!==u;(c===u&&a.isCollapsed||!u||n)&&(u=t),c!==e&&(c=e)}if(void 0!==c||void 0!==u)if(c===u)t(c);else{const t=[...r(c),c],n=[...r(u),u],o=function(e,t){let n=0;for(;e[n]===t[n];)n++;return n}(t,n);e(t[o],n[o])}else Zk(n,!1)}function s(){i.addEventListener("selectionchange",a),l.addEventListener("mouseup",a)}function c(){i.removeEventListener("selectionchange",a),l.removeEventListener("mouseup",a)}function u(){c(),s()}return s(),n.addEventListener("focusin",u),()=>{c(),n.removeEventListener("focusin",u)}}),[e,t,n,r])}function jk(){const{selectBlock:e}=(0,S.Z)(ku),{isSelectionEnabled:t,getBlockSelectionStart:n,hasMultiSelection:r}=(0,E.Z)(ku);return(0,bl.Z)((o=>{function i(i){if(!t()||0!==i.button)return;const l=n(),a=g_(i.target);i.shiftKey?l!==a&&(o.contentEditable=!0,o.focus()):r()&&e(a)}return o.addEventListener("mousedown",i),()=>{o.removeEventListener("mousedown",i)}}),[e,t,n,r])}function zk(){const{__unstableIsFullySelected:e,getSelectedBlockClientIds:t,__unstableIsSelectionMergeable:n,hasMultiSelection:r}=(0,E.Z)(ku),{replaceBlocks:o,__unstableSplitSelection:i,removeBlocks:l,__unstableDeleteSelection:a,__unstableExpandSelection:s}=(0,S.Z)(ku);return(0,bl.Z)((c=>{function u(e){var t;r()&&null!==(t=e.inputType)&&void 0!==t&&t.startsWith("format")&&e.preventDefault()}function d(u){u.defaultPrevented||r()&&(u.keyCode===Al.ENTER?(c.contentEditable=!1,u.preventDefault(),e()?o(t(),ke(de())):i()):u.keyCode===Al.BACKSPACE||u.keyCode===Al.DELETE?(c.contentEditable=!1,u.preventDefault(),e()?l(t()):n()?a(u.keyCode===Al.DELETE):s()):1!==u.key.length||u.metaKey||u.ctrlKey||(c.contentEditable=!1,n()?a(u.keyCode===Al.DELETE):(u.preventDefault(),c.ownerDocument.defaultView.getSelection().removeAllRanges())))}function p(e){r()&&(c.contentEditable=!1,n()?a():(e.preventDefault(),c.ownerDocument.defaultView.getSelection().removeAllRanges()))}return c.addEventListener("beforeinput",u),c.addEventListener("keydown",d),c.addEventListener("compositionstart",p),()=>{c.removeEventListener("beforeinput",u),c.removeEventListener("keydown",d),c.removeEventListener("compositionstart",p)}}),[])}function Hk(){const[e,t,n]=function(){const e=(0,v.useRef)(),t=(0,v.useRef)(),n=(0,v.useRef)(),r=(0,v.useRef)(),{hasMultiSelection:o,getSelectedBlockClientId:i,getBlockCount:l}=(0,E.Z)(ku),{setNavigationMode:a}=(0,S.Z)(ku),s=(0,E.Z)((e=>e(ku).isNavigationMode()),[])?void 0:"0",c=(0,v.useRef)();function u(t){if(c.current)c.current=null;else if(o())e.current.focus();else if(i())r.current.focus();else{a(!0);const n=t.target.compareDocumentPosition(e.current)&t.target.DOCUMENT_POSITION_FOLLOWING?"findNext":"findPrevious";s_.focus.tabbable[n](t.target).focus()}}const d=(0,v.createElement)("div",{ref:t,tabIndex:s,onFocus:u}),p=(0,v.createElement)("div",{ref:n,tabIndex:s,onFocus:u}),m=(0,bl.Z)((s=>{function u(e){if(e.defaultPrevented)return;if(e.keyCode===Al.ESCAPE)return e.preventDefault(),void a(!0);if(e.keyCode!==Al.TAB)return;const r=e.shiftKey,l=r?"findPrevious":"findNext";if(!o()&&!i())return void(e.target===s&&a(!0));if(((0,u_.Z)(e.target)||e.target.getAttribute("data-block")===i())&&(0,u_.Z)(s_.focus.tabbable[l](e.target)))return;const u=r?t:n;c.current=!0,u.current.focus({preventScroll:!0})}function d(e){r.current=e.target;const{ownerDocument:t}=s;e.relatedTarget||t.activeElement!==t.body||0!==l()||s.focus()}function p(r){var o;if(r.keyCode!==Al.TAB)return;if("region"===(null===(o=r.target)||void 0===o?void 0:o.getAttribute("role")))return;if(e.current===r.target)return;const i=r.shiftKey?"findPrevious":"findNext",l=s_.focus.tabbable[i](r.target);l!==t.current&&l!==n.current||(r.preventDefault(),l.focus({preventScroll:!0}))}const{ownerDocument:m}=s,{defaultView:f}=m;return f.addEventListener("keydown",p),s.addEventListener("keydown",u),s.addEventListener("focusout",d),()=>{f.removeEventListener("keydown",p),s.removeEventListener("keydown",u),s.removeEventListener("focusout",d)}}),[]);return[d,(0,vl.Z)([e,m]),p]}(),r=(0,E.Z)((e=>e(ku).hasMultiSelection()),[]);return[e,(0,vl.Z)([t,zk(),Ok(),Fk(),jk(),Ek(),Rk(),Pk(),(0,bl.Z)((e=>{if(e.tabIndex=0,e.contentEditable=r,r)return e.classList.add("has-multi-selection"),e.setAttribute("aria-label",(0,N.__)("Multiple selected blocks")),()=>{e.classList.remove("has-multi-selection"),e.removeAttribute("aria-label")}}),[r])]),n]}var Vk=(0,v.forwardRef)((function(e,t){let{children:n,...r}=e;const[o,i,l]=Hk();return(0,v.createElement)(v.Fragment,null,o,(0,v.createElement)("div",(0,Po.Z)({},r,{ref:(0,vl.Z)([i,t]),className:w()(r.className,"block-editor-writing-flow")}),n),l)}));function Wk(e){return(0,v.useMemo)((()=>{const t=document.implementation.createHTMLDocument("");return t.body.innerHTML=e,Array.from(t.body.children)}),[e])}function $k(e){var t,n,r,o;let{contentRef:i,children:l,head:a,tabIndex:s=0,scale:c=1,frameSize:u=0,expand:d=!1,readonly:p,forwardedRef:m,...f}=e;const h=(0,E.Z)((e=>e(ku).getSettings().__unstableResolvedAssets),[]),[,g]=(0,v.useReducer)((()=>({}))),[y,_]=(0,v.useState)(),[k,x]=(0,v.useState)([]),C=Wk(null==h?void 0:h.styles),S=C.map((e=>e.id)),I=(0,v.useMemo)((()=>Array.from(document.styleSheets).reduce(((e,t)=>{try{t.cssRules}catch(t){return e}const{ownerNode:n,cssRules:r}=t;if(null===n)return e;if(!r)return e;if("LINK"!==n.tagName)return e;if("wp-reset-editor-styles-css"===n.id)return e;if(function e(t){return Array.from(t).find((t=>{let{selectorText:n,conditionText:r,cssRules:o}=t;return r?e(o):n&&(n.includes(".editor-styles-wrapper")||n.includes(".wp-block"))}))}(r)){e.push(n.cloneNode(!0));const t=n.id.replace("-css","-inline-css"),r=document.getElementById(t);r&&e.push(r.cloneNode(!0))}return e}),[])),[]),T=I.filter((e=>!S.includes(e.id))),B=Wk(null==h?void 0:h.scripts),L=xk(),[P,A,D]=Hk(),[R,{height:M}]=ud(),O=(0,bl.Z)((e=>{let t;function n(e){e.preventDefault()}function r(){const{contentDocument:r,ownerDocument:o}=e,{readyState:i,documentElement:l}=r;return t=r,("interactive"===i||"complete"===i)&&(function(e){const{defaultView:t}=e,{frameElement:n}=t;function r(e){const r=Object.getPrototypeOf(e).constructor.name,o=window[r],i={};for(const t in e)i[t]=e[t];if(e instanceof t.MouseEvent){const e=n.getBoundingClientRect();i.clientX+=e.left,i.clientY+=e.top}const l=new o(e.type,i);!n.dispatchEvent(l)&&e.preventDefault()}const o=["dragover"];for(const t of o)e.addEventListener(t,r)}(r),_(r),L(l),x(Array.from(o.body.classList).filter((e=>e.startsWith("admin-color-")||e.startsWith("post-type-")||"wp-embed-responsive"===e))),r.dir=o.dir,l.removeChild(r.head),l.removeChild(r.body),t.addEventListener("dragover",n,!1),t.addEventListener("drop",n,!1),!0)}return e.addEventListener("load",r),()=>{var o,i;e.removeEventListener("load",r),null===(o=t)||void 0===o||o.removeEventListener("dragover",n),null===(i=t)||void 0===i||i.removeEventListener("drop",n)}}),[]),Z=(0,bl.Z)((e=>{B.reduce(((t,n)=>t.then((()=>async function(e,t){let{id:n,src:r}=t;return new Promise(((t,o)=>{const i=e.ownerDocument.createElement("script");i.id=n,r?(i.src=r,i.onload=()=>t(),i.onerror=()=>o()):t(),e.appendChild(i)}))}(e,n)))),Promise.resolve()).finally((()=>{g()}))}),[]),F=Cg({isDisabled:!p}),j=(0,vl.Z)([i,L,A,F]),z=(0,v.createElement)(v.Fragment,null,(0,v.createElement)("style",null,"html{height:auto!important;}body{margin:0}"),[...C,...T].map((e=>{let{tagName:t,href:n,id:r,rel:o,media:i,textContent:l}=e;const a=t.toLowerCase();return"style"===a?(0,v.createElement)(a,{id:r,key:r},l):(0,v.createElement)(a,{href:n,id:r,rel:o,media:i,key:r})}))),H=(0,v.useMemo)((()=>"<!doctype html>"+(0,mn.ZP)(z)),[]),V=M*(1-c)/2;return(0,v.createElement)(v.Fragment,null,s>=0&&P,(0,v.createElement)("iframe",(0,Po.Z)({},f,{style:{...f.style,height:d?M:null===(t=f.style)||void 0===t?void 0:t.height,marginTop:c?-V+u:null===(n=f.style)||void 0===n?void 0:n.marginTop,marginBottom:c?-V+u:null===(r=f.style)||void 0===r?void 0:r.marginBottom,transform:c?`scale( ${c} )`:null===(o=f.style)||void 0===o?void 0:o.transform,transition:"all .3s"},ref:(0,vl.Z)([m,O]),tabIndex:s,srcDoc:H,title:(0,N.__)("Editor canvas")}),y&&(0,b.createPortal)((0,v.createElement)(v.Fragment,null,(0,v.createElement)("head",{ref:Z},z,a),(0,v.createElement)("body",{ref:j,className:w()("block-editor-iframe__body","editor-styles-wrapper",...k)},R,(0,v.createElement)(Do.Z,{document:y},l))),y.documentElement)),s>=0&&D)}var Uk=(0,v.forwardRef)((function(e,t){return(0,E.Z)((e=>e(ku).getSettings().__internalIsInitialized),[])?(0,v.createElement)($k,(0,Po.Z)({},e,{forwardedRef:t})):null})),Gk=n(28771),qk=n.n(Gk);const Kk=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function Yk(e,t){t=t||{};let n=1,r=1;function o(e){const t=e.match(/\n/g);t&&(n+=t.length);const o=e.lastIndexOf("\n");r=~o?e.length-o:r+e.length}function i(){const e={line:n,column:r};return function(t){return t.position=new l(e),m(),t}}function l(e){this.start=e,this.end={line:n,column:r},this.source=t.source}l.prototype.content=e;const a=[];function s(o){const i=new Error(t.source+":"+n+":"+r+": "+o);if(i.reason=o,i.filename=t.source,i.line=n,i.column=r,i.source=e,!t.silent)throw i;a.push(i)}function c(){return p(/^{\s*/)}function u(){return p(/^}/)}function d(){let t;const n=[];for(m(),f(n);e.length&&"}"!==e.charAt(0)&&(t=C()||E());)!1!==t&&(n.push(t),f(n));return n}function p(t){const n=t.exec(e);if(!n)return;const r=n[0];return o(r),e=e.slice(r.length),n}function m(){p(/^\s*/)}function f(e){let t;for(e=e||[];t=h();)!1!==t&&e.push(t);return e}function h(){const t=i();if("/"!==e.charAt(0)||"*"!==e.charAt(1))return;let n=2;for(;""!==e.charAt(n)&&("*"!==e.charAt(n)||"/"!==e.charAt(n+1));)++n;if(n+=2,""===e.charAt(n-1))return s("End of comment missing");const l=e.slice(2,n-2);return r+=2,o(l),e=e.slice(n),r+=2,t({type:"comment",comment:l})}function g(){const e=p(/^([^{]+)/);if(e)return Xk(e[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,(function(e){return e.replace(/,/g,"‌")})).split(/\s*(?![^(]*\)),\s*/).map((function(e){return e.replace(/\u200C/g,",")}))}function v(){const e=i();let t=p(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(!t)return;if(t=Xk(t[0]),!p(/^:\s*/))return s("property missing ':'");const n=p(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),r=e({type:"declaration",property:t.replace(Kk,""),value:n?Xk(n[0]).replace(Kk,""):""});return p(/^[;\s]*/),r}function b(){const e=[];if(!c())return s("missing '{'");let t;for(f(e);t=v();)!1!==t&&(e.push(t),f(e));return u()?e:s("missing '}'")}function y(){let e;const t=[],n=i();for(;e=p(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),p(/^,\s*/);if(t.length)return n({type:"keyframe",values:t,declarations:b()})}const _=w("import"),k=w("charset"),x=w("namespace");function w(e){const t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){const n=i(),r=p(t);if(!r)return;const o={type:e};return o[e]=r[1].trim(),n(o)}}function C(){if("@"===e[0])return function(){const e=i();let t=p(/^@([-\w]+)?keyframes\s*/);if(!t)return;const n=t[1];if(t=p(/^([-\w]+)\s*/),!t)return s("@keyframes missing name");const r=t[1];if(!c())return s("@keyframes missing '{'");let o,l=f();for(;o=y();)l.push(o),l=l.concat(f());return u()?e({type:"keyframes",name:r,vendor:n,keyframes:l}):s("@keyframes missing '}'")}()||function(){const e=i(),t=p(/^@media *([^{]+)/);if(!t)return;const n=Xk(t[1]);if(!c())return s("@media missing '{'");const r=f().concat(d());return u()?e({type:"media",media:n,rules:r}):s("@media missing '}'")}()||function(){const e=i(),t=p(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:Xk(t[1]),media:Xk(t[2])})}()||function(){const e=i(),t=p(/^@supports *([^{]+)/);if(!t)return;const n=Xk(t[1]);if(!c())return s("@supports missing '{'");const r=f().concat(d());return u()?e({type:"supports",supports:n,rules:r}):s("@supports missing '}'")}()||_()||k()||x()||function(){const e=i(),t=p(/^@([-\w]+)?document *([^{]+)/);if(!t)return;const n=Xk(t[1]),r=Xk(t[2]);if(!c())return s("@document missing '{'");const o=f().concat(d());return u()?e({type:"document",document:r,vendor:n,rules:o}):s("@document missing '}'")}()||function(){const e=i();if(!p(/^@page */))return;const t=g()||[];if(!c())return s("@page missing '{'");let n,r=f();for(;n=v();)r.push(n),r=r.concat(f());return u()?e({type:"page",selectors:t,declarations:r}):s("@page missing '}'")}()||function(){const e=i();if(!p(/^@host\s*/))return;if(!c())return s("@host missing '{'");const t=f().concat(d());return u()?e({type:"host",rules:t}):s("@host missing '}'")}()||function(){const e=i();if(!p(/^@font-face\s*/))return;if(!c())return s("@font-face missing '{'");let t,n=f();for(;t=v();)n.push(t),n=n.concat(f());return u()?e({type:"font-face",declarations:n}):s("@font-face missing '}'")}()}function E(){const e=i(),t=g();return t?(f(),e({type:"rule",selectors:t,declarations:b()})):s("selector missing")}return Jk(function(){const e=d();return{type:"stylesheet",stylesheet:{source:t.source,rules:e,parsingErrors:a}}}())}function Xk(e){return e?e.replace(/^\s+|\s+$/g,""):""}function Jk(e,t){const n=e&&"string"==typeof e.type,r=n?e:t;for(const t in e){const n=e[t];Array.isArray(n)?n.forEach((function(e){Jk(e,r)})):n&&"object"==typeof n&&Jk(n,r)}return n&&Object.defineProperty(e,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),e}var Qk=n(89118),ex=n.n(Qk),tx=nx;function nx(e){this.options=e||{}}nx.prototype.emit=function(e){return e},nx.prototype.visit=function(e){return this[e.type](e)},nx.prototype.mapVisit=function(e,t){let n="";t=t||"";for(let r=0,o=e.length;r<o;r++)n+=this.visit(e[r]),t&&r<o-1&&(n+=this.emit(t));return n};var rx=ox;function ox(e){tx.call(this,e)}ex()(ox,tx),ox.prototype.compile=function(e){return e.stylesheet.rules.map(this.visit,this).join("")},ox.prototype.comment=function(e){return this.emit("",e.position)},ox.prototype.import=function(e){return this.emit("@import "+e.import+";",e.position)},ox.prototype.media=function(e){return this.emit("@media "+e.media,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},ox.prototype.document=function(e){const t="@"+(e.vendor||"")+"document "+e.document;return this.emit(t,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},ox.prototype.charset=function(e){return this.emit("@charset "+e.charset+";",e.position)},ox.prototype.namespace=function(e){return this.emit("@namespace "+e.namespace+";",e.position)},ox.prototype.supports=function(e){return this.emit("@supports "+e.supports,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},ox.prototype.keyframes=function(e){return this.emit("@"+(e.vendor||"")+"keyframes "+e.name,e.position)+this.emit("{")+this.mapVisit(e.keyframes)+this.emit("}")},ox.prototype.keyframe=function(e){const t=e.declarations;return this.emit(e.values.join(","),e.position)+this.emit("{")+this.mapVisit(t)+this.emit("}")},ox.prototype.page=function(e){const t=e.selectors.length?e.selectors.join(", "):"";return this.emit("@page "+t,e.position)+this.emit("{")+this.mapVisit(e.declarations)+this.emit("}")},ox.prototype["font-face"]=function(e){return this.emit("@font-face",e.position)+this.emit("{")+this.mapVisit(e.declarations)+this.emit("}")},ox.prototype.host=function(e){return this.emit("@host",e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},ox.prototype["custom-media"]=function(e){return this.emit("@custom-media "+e.name+" "+e.media+";",e.position)},ox.prototype.rule=function(e){const t=e.declarations;return t.length?this.emit(e.selectors.join(","),e.position)+this.emit("{")+this.mapVisit(t)+this.emit("}"):""},ox.prototype.declaration=function(e){return this.emit(e.property+":"+e.value,e.position)+this.emit(";")};var ix=lx;function lx(e){e=e||{},tx.call(this,e),this.indentation=e.indent}ex()(lx,tx),lx.prototype.compile=function(e){return this.stylesheet(e)},lx.prototype.stylesheet=function(e){return this.mapVisit(e.stylesheet.rules,"\n\n")},lx.prototype.comment=function(e){return this.emit(this.indent()+"/*"+e.comment+"*/",e.position)},lx.prototype.import=function(e){return this.emit("@import "+e.import+";",e.position)},lx.prototype.media=function(e){return this.emit("@media "+e.media,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},lx.prototype.document=function(e){const t="@"+(e.vendor||"")+"document "+e.document;return this.emit(t,e.position)+this.emit("  {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},lx.prototype.charset=function(e){return this.emit("@charset "+e.charset+";",e.position)},lx.prototype.namespace=function(e){return this.emit("@namespace "+e.namespace+";",e.position)},lx.prototype.supports=function(e){return this.emit("@supports "+e.supports,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},lx.prototype.keyframes=function(e){return this.emit("@"+(e.vendor||"")+"keyframes "+e.name,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.keyframes,"\n")+this.emit(this.indent(-1)+"}")},lx.prototype.keyframe=function(e){const t=e.declarations;return this.emit(this.indent())+this.emit(e.values.join(", "),e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(t,"\n")+this.emit(this.indent(-1)+"\n"+this.indent()+"}\n")},lx.prototype.page=function(e){const t=e.selectors.length?e.selectors.join(", ")+" ":"";return this.emit("@page "+t,e.position)+this.emit("{\n")+this.emit(this.indent(1))+this.mapVisit(e.declarations,"\n")+this.emit(this.indent(-1))+this.emit("\n}")},lx.prototype["font-face"]=function(e){return this.emit("@font-face ",e.position)+this.emit("{\n")+this.emit(this.indent(1))+this.mapVisit(e.declarations,"\n")+this.emit(this.indent(-1))+this.emit("\n}")},lx.prototype.host=function(e){return this.emit("@host",e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},lx.prototype["custom-media"]=function(e){return this.emit("@custom-media "+e.name+" "+e.media+";",e.position)},lx.prototype.rule=function(e){const t=this.indent(),n=e.declarations;return n.length?this.emit(e.selectors.map((function(e){return t+e})).join(",\n"),e.position)+this.emit(" {\n")+this.emit(this.indent(1))+this.mapVisit(n,"\n")+this.emit(this.indent(-1))+this.emit("\n"+this.indent()+"}"):""},lx.prototype.declaration=function(e){return this.emit(this.indent())+this.emit(e.property+": "+e.value,e.position)+this.emit(";")},lx.prototype.indent=function(e){return this.level=this.level||1,null!==e?(this.level+=e,""):Array(this.level).join(this.indentation||"  ")};var ax=function(e,t){try{const n=Yk(e);return function(e,t){return((t=t||{}).compress?new rx(t):new ix(t)).compile(e)}(qk().map(n,(function(e){if(!e)return e;const n=t(e);return this.update(n)})))}catch(e){return console.warn("Error while traversing the CSS: "+e),null}};function sx(e){return 0!==e.value.indexOf("data:")&&0!==e.value.indexOf("#")&&(t=e.value,!/^\/(?!\/)/.test(t)&&!function(e){return/^(?:https?:)?\/\//.test(e)}(e.value));var t}function cx(e,t){return new URL(e,t).toString()}var ux=e=>t=>{if("declaration"===t.type){const i=function(e){const t=/url\((\s*)(['"]?)(.+?)\2(\s*)\)/g;let n;const r=[];for(;null!==(n=t.exec(e));){const e={source:n[0],before:n[1],quote:n[2],value:n[3],after:n[4]};sx(e)&&r.push(e)}return r}(t.value).map((o=e,e=>({...e,newUrl:"url("+e.before+e.quote+cx(e.value,o)+e.quote+e.after+")"})));return{...t,value:(n=t.value,r=i,r.forEach((e=>{n=n.replace(e.source,e.newUrl)})),n)}}var n,r,o;return t};const dx=/^(body|html|:root).*$/;var px=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return n=>"rule"===n.type?{...n,selectors:n.selectors.map((n=>t.includes(n.trim())?n:n.match(dx)?n.replace(/^(body|html|:root)/,e):e+" "+n))}:n},mx=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return Object.values(null!=e?e:[]).map((e=>{let{css:n,baseURL:r}=e;const o=[];return t&&o.push(px(t)),r&&o.push(ux(r)),o.length?ax(n,(0,eg.Z)(o)):n}))};const fx=".editor-styles-wrapper";function hx(e){return(0,v.useCallback)((e=>{if(!e)return;const{ownerDocument:t}=e,{defaultView:n,body:r}=t,o=t.querySelector(fx);let i;if(o)i=n.getComputedStyle(o,null).getPropertyValue("background-color");else{const e=t.createElement("div");e.classList.add("editor-styles-wrapper"),r.appendChild(e),i=n.getComputedStyle(e,null).getPropertyValue("background-color"),r.removeChild(e)}const l=(0,G.Vi)(i);l.luminance()>.5||0===l.alpha()?r.classList.remove("is-dark-theme"):r.classList.add("is-dark-theme")}),[e])}function gx(e){let{styles:t}=e;const n=(0,v.useMemo)((()=>mx(t,fx)),[t]);return(0,v.createElement)(v.Fragment,null,(0,v.createElement)("style",{ref:hx(t)}),n.map(((e,t)=>(0,v.createElement)("style",{key:t},e))))}function vx(e){let{selector:t,id:n}=e;const r=`\n${t} {\n\tfilter: url( #${n} );\n}\n`;return(0,v.createElement)("style",null,r)}function bx(e){let{selector:t}=e;const n=`\n${t} {\n\tfilter: none;\n}\n`;return(0,v.createElement)("style",null,n)}function yx(e){let{id:t,colors:n}=e;const r=function(){const e={r:[],g:[],b:[],a:[]};return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach((t=>{const n=(0,G.Vi)(t).toRgb();e.r.push(n.r/255),e.g.push(n.g/255),e.b.push(n.b/255),e.a.push(n.a)})),e}(n);return(0,v.createElement)(tp.Wj,{xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 0 0",width:"0",height:"0",focusable:"false",role:"none",style:{visibility:"hidden",position:"absolute",left:"-9999px",overflow:"hidden"}},(0,v.createElement)("defs",null,(0,v.createElement)("filter",{id:t},(0,v.createElement)("feColorMatrix",{colorInterpolationFilters:"sRGB",type:"matrix",values:" .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 "}),(0,v.createElement)("feComponentTransfer",{colorInterpolationFilters:"sRGB"},(0,v.createElement)("feFuncR",{type:"table",tableValues:r.r.join(" ")}),(0,v.createElement)("feFuncG",{type:"table",tableValues:r.g.join(" ")}),(0,v.createElement)("feFuncB",{type:"table",tableValues:r.b.join(" ")}),(0,v.createElement)("feFuncA",{type:"table",tableValues:r.a.join(" ")})),(0,v.createElement)("feComposite",{in2:"SourceGraphic",operator:"in"}))))}function _x(e){let{preset:t}=e;return(0,v.createElement)(yx,{id:`wp-duotone-${t.slug}`,colors:t.colors})}let kx;(0,G.l7)([q.Z,K.Z]);const xx=2e3;function wx(e){let{viewportWidth:t,containerWidth:n,minHeight:r,additionalStyles:o=[]}=e;t||(t=n);const[i,{height:l}]=ud(),{styles:a,duotone:s}=(0,E.Z)((e=>{var t,n;const r=e(ku).getSettings();return{styles:r.styles,duotone:null===(t=r.__experimentalFeatures)||void 0===t||null===(n=t.color)||void 0===n?void 0:n.duotone}}),[]),c=(0,v.useMemo)((()=>a?[...a,{css:"body{height:auto;overflow:hidden;border:none;padding:0;}",__unstableType:"presets"},...o]:a),[a,o]),u=(0,v.useMemo)((()=>{var e,t;return[...null!==(e=null==s?void 0:s.default)&&void 0!==e?e:[],...null!==(t=null==s?void 0:s.theme)&&void 0!==t?t:[]]}),[s]);kx=kx||(0,tg.Z)(IT);const d=n/t;return(0,v.createElement)(kk,{className:"block-editor-block-preview__content",style:{transform:`scale(${d})`,height:l*d,maxHeight:l>xx?xx*d:void 0,minHeight:r}},(0,v.createElement)(Uk,{head:(0,v.createElement)(gx,{styles:c}),contentRef:(0,bl.Z)((e=>{const{ownerDocument:{documentElement:t}}=e;t.classList.add("block-editor-block-preview__content-iframe"),t.style.position="absolute",t.style.width="100%",e.style.boxSizing="border-box",e.style.position="absolute",e.style.width="100%"}),[]),"aria-hidden":!0,tabIndex:-1,style:{position:"absolute",width:t,height:l,pointerEvents:"none",maxHeight:xx,minHeight:0!==d&&d<1&&r?r/d:r}},i,u.map((e=>(0,v.createElement)(_x,{preset:e,key:e.slug}))),(0,v.createElement)(kx,{renderAppender:!1})))}function Cx(e){const[t,{width:n}]=ud();return(0,v.createElement)(v.Fragment,null,(0,v.createElement)("div",{style:{position:"relative",width:"100%",height:0}},t),(0,v.createElement)("div",{className:"block-editor-block-preview__container"},!!n&&(0,v.createElement)(wx,(0,Po.Z)({},e,{containerWidth:n}))))}var Ex=(0,v.memo)((function(e){let{blocks:t,viewportWidth:n=1200,minHeight:r,additionalStyles:o=[],__experimentalMinHeight:i,__experimentalPadding:l}=e;i&&(r=i,(0,St.default)("The __experimentalMinHeight prop",{since:"6.2",version:"6.4",alternative:"minHeight"})),l&&(o=[...o,{css:`body { padding: ${l}px; }`}],(0,St.default)("The __experimentalPadding prop of BlockPreview",{since:"6.2",version:"6.4",alternative:"additionalStyles"}));const a=(0,E.Z)((e=>e(ku).getSettings()),[]),s=(0,v.useMemo)((()=>({...a,__unstableIsPreviewMode:!0})),[a]),c=(0,v.useMemo)((()=>Array.isArray(t)?t:[t]),[t]);return t&&0!==t.length?(0,v.createElement)(fk,{value:c,settings:s},(0,v.createElement)(Cx,{viewportWidth:n,minHeight:r,additionalStyles:o})):null})),Sx=function(e){var t;let{item:n}=e;const{name:r,title:o,icon:i,description:l,initialAttributes:a,example:s}=n,c=ge(n);return(0,v.createElement)("div",{className:"block-editor-inserter__preview-container"},(0,v.createElement)("div",{className:"block-editor-inserter__preview"},c||s?(0,v.createElement)("div",{className:"block-editor-inserter__preview-content"},(0,v.createElement)(Ex,{blocks:s?Ae(r,{attributes:{...s.attributes,...a},innerBlocks:s.innerBlocks}):ke(r,a),viewportWidth:null!==(t=null==s?void 0:s.viewportWidth)&&void 0!==t?t:500,additionalStyles:[{css:"body { padding: 16px; }"}]})):(0,v.createElement)("div",{className:"block-editor-inserter__preview-content-missing"},(0,N.__)("No Preview Available."))),!c&&(0,v.createElement)(ak,{title:o,icon:i,description:l}))},Ix=n(4572);function Tx(e,t){const n=[];for(let r=0;r<e.length;r++){const o=e[r];if(!t.includes(o))break;n.push(o)}return n}var Nx=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{step:1};const{step:n=1}=t,[r,o]=(0,v.useState)([]);return(0,v.useEffect)((()=>{let t=Tx(e,r);t.length<n&&(t=t.concat(e.slice(t.length,n))),o(t);const i=(0,Ix.j)();for(let r=t.length;r<e.length;r+=n)i.add({},(()=>{(0,b.flushSync)((()=>{o((t=>[...t,...e.slice(r,r+n)]))}))}));return()=>i.reset()}),[e]),r},Bx=n(46388),Lx=(0,Ku.Iq)((function(e,t){const n=(0,Bx.Z)(e);return(0,v.createElement)(md.Z,(0,Po.Z)({as:"span"},n,{ref:t}))}),"Truncate"),Px=n(51454),Ax=n(80110),Dx=(0,v.createContext)(),Rx=(0,v.forwardRef)((function(e,t){let{isFirst:n,as:r,children:o,...i}=e;const l=(0,v.useContext)(Dx);return(0,v.createElement)(Ax.A,(0,Po.Z)({ref:t,state:l,role:"option",focusable:!0},i),(e=>{const t={...e,tabIndex:n?0:e.tabIndex};return r?(0,v.createElement)(r,t,o):"function"==typeof o?o(t):(0,v.createElement)(Mo.ZP,t,o)}))}));const Mx=(e,t,n)=>{let r=!0,o=!0;return n&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),(0,Yh.D)(e,t,{leading:r,trailing:o,maxWait:t})},Ox="is-dragging-components-draggable";var Zx=function(e){let{children:t,onDragStart:n,onDragOver:r,onDragEnd:o,cloneClassname:i,elementId:l,transferData:a,__experimentalTransferDataType:s="text",__experimentalDragComponent:c}=e;const u=(0,v.useRef)(null),d=(0,v.useRef)((()=>{}));return(0,v.useEffect)((()=>()=>{d.current()}),[]),(0,v.createElement)(v.Fragment,null,t({onDraggableStart:function(e){const{ownerDocument:t}=e.target;e.dataTransfer.setData(s,JSON.stringify(a));const o=t.createElement("div");o.style.top="0",o.style.left="0";const c=t.createElement("div");"function"==typeof e.dataTransfer.setDragImage&&(c.classList.add("components-draggable__invisible-drag-image"),t.body.appendChild(c),e.dataTransfer.setDragImage(c,0,0)),o.classList.add("components-draggable__clone"),i&&o.classList.add(i);let p=0,m=0;if(u.current){p=e.clientX,m=e.clientY,o.style.transform=`translate( ${p}px, ${m}px )`;const n=t.createElement("div");n.innerHTML=u.current.innerHTML,o.appendChild(n),t.body.appendChild(o)}else{const e=t.getElementById(l),n=e.getBoundingClientRect(),r=e.parentNode,i=n.top,a=n.left;o.style.width=`${n.width+0}px`;const s=e.cloneNode(!0);s.id=`clone-${l}`,p=a-0,m=i-0,o.style.transform=`translate( ${p}px, ${m}px )`,Array.from(s.querySelectorAll("iframe")).forEach((e=>{var t;return null===(t=e.parentNode)||void 0===t?void 0:t.removeChild(e)})),o.appendChild(s),null==r||r.appendChild(o)}let f=e.clientX,h=e.clientY;const g=Mx((function(e){if(f===e.clientX&&h===e.clientY)return;const t=p+e.clientX-f,n=m+e.clientY-h;o.style.transform=`translate( ${t}px, ${n}px )`,f=e.clientX,h=e.clientY,p=t,m=n,r&&r(e)}),16);let v;t.addEventListener("dragover",g),t.body.classList.add(Ox),e.persist(),n&&(v=setTimeout((()=>n(e)))),d.current=()=>{o&&o.parentNode&&o.parentNode.removeChild(o),c&&c.parentNode&&c.parentNode.removeChild(c),t.body.classList.remove(Ox),t.removeEventListener("dragover",g),clearTimeout(v)}},onDraggableEnd:function(e){e.preventDefault(),d.current(),o&&o(e)}}),c&&(0,v.createElement)("div",{className:"components-draggable-drag-component-root",style:{display:"none"},ref:u},c))},Fx=n(16459);function jx(e){let{count:t,icon:n,isPattern:r}=e;const o=r&&(0,N.__)("Pattern");return(0,v.createElement)("div",{className:"block-editor-block-draggable-chip-wrapper"},(0,v.createElement)("div",{className:"block-editor-block-draggable-chip","data-testid":"block-draggable-chip"},(0,v.createElement)(Uu.Z,{justify:"center",className:"block-editor-block-draggable-chip__content"},(0,v.createElement)(Gu.Z,null,n?(0,v.createElement)(lk,{icon:n}):o||(0,N.sprintf)((0,N._n)("%d block","%d blocks",t),t)),(0,v.createElement)(Gu.Z,null,(0,v.createElement)(lk,{icon:Fx.Z})))))}var zx=e=>{let{isEnabled:t,blocks:n,icon:r,children:o,isPattern:i}=e;const l={type:"inserter",blocks:n};return(0,v.createElement)(Zx,{__experimentalTransferDataType:"wp-blocks",transferData:l,__experimentalDragComponent:(0,v.createElement)(jx,{count:n.length,icon:r,isPattern:i})},(e=>{let{onDraggableStart:n,onDraggableEnd:r}=e;return o({draggable:t,onDragStart:t?n:void 0,onDragEnd:t?r:void 0})}))},Hx=(0,v.memo)((function(e){let{className:t,isFirst:n,item:r,onSelect:o,onHover:i,isDraggable:l,...a}=e;const s=(0,v.useRef)(!1),c=r.icon?{backgroundColor:r.icon.background,color:r.icon.foreground}:{},u=(0,v.useMemo)((()=>[ke(r.name,r.initialAttributes,xe(r.innerBlocks))]),[r.name,r.initialAttributes,r.initialAttributes]),d=ge(r)||ve(r);return(0,v.createElement)(zx,{isEnabled:l&&!r.disabled,blocks:u,icon:r.icon},(e=>{let{draggable:l,onDragStart:u,onDragEnd:p}=e;return(0,v.createElement)("div",{className:w()("block-editor-block-types-list__list-item",{"is-synced":d}),draggable:l,onDragStart:e=>{s.current=!0,u&&(i(null),u(e))},onDragEnd:e=>{s.current=!1,p&&p(e)}},(0,v.createElement)(Rx,(0,Po.Z)({isFirst:n,className:w()("block-editor-block-types-list__item",t),disabled:r.isDisabled,onClick:e=>{e.preventDefault(),o(r,(0,Px.R)()?e.metaKey:e.ctrlKey),i(null)},onKeyDown:e=>{const{keyCode:t}=e;t===Al.ENTER&&(e.preventDefault(),o(r,(0,Px.R)()?e.metaKey:e.ctrlKey),i(null))},onMouseEnter:()=>{s.current||i(r)},onMouseLeave:()=>i(null)},a),(0,v.createElement)("span",{className:"block-editor-block-types-list__item-icon",style:c},(0,v.createElement)(lk,{icon:r.icon,showColors:!0})),(0,v.createElement)("span",{className:"block-editor-block-types-list__item-title"},(0,v.createElement)(Lx,{numberOfLines:3},r.title))))}))})),Vx=(0,v.forwardRef)((function(e,t){const[n,r]=(0,v.useState)(!1);return(0,v.useEffect)((()=>{n&&(0,fl.D)((0,N.__)("Use left and right arrow keys to move through blocks"))}),[n]),(0,v.createElement)("div",(0,Po.Z)({ref:t,role:"listbox","aria-orientation":"horizontal",onFocus:()=>{r(!0)},onBlur:e=>{!e.currentTarget.contains(e.relatedTarget)&&r(!1)}},e))})),Wx=n(11215),$x=(0,v.forwardRef)((function(e,t){const n=(0,v.useContext)(Dx);return(0,v.createElement)(Wx.E,(0,Po.Z)({state:n,role:"presentation",ref:t},e))})),Ux=function(e){let{items:t=[],onSelect:n,onHover:r=(()=>{}),children:o,label:i,isDraggable:l=!0}=e;return(0,v.createElement)(Vx,{className:"block-editor-block-types-list","aria-label":i},function(e,t){const n=[];for(let t=0,r=e.length;t<r;t+=3)n.push(e.slice(t,t+3));return n}(t).map(((e,t)=>(0,v.createElement)($x,{key:t},e.map(((e,o)=>(0,v.createElement)(Hx,{key:e.id,item:e,className:vn(e.id),onSelect:n,onHover:r,isDraggable:l&&!e.isDisabled,isFirst:0===t&&0===o})))))),o)},Gx=function(e){let{title:t,icon:n,children:r}=e;return(0,v.createElement)(v.Fragment,null,(0,v.createElement)("div",{className:"block-editor-inserter__panel-header"},(0,v.createElement)("h2",{className:"block-editor-inserter__panel-title"},t),(0,v.createElement)(Od.Z,{icon:n})),(0,v.createElement)("div",{className:"block-editor-inserter__panel-content"},r))},qx=(e,t)=>{const{categories:n,collections:r,items:o}=(0,E.Z)((t=>{const{getInserterItems:n}=t(ku),{getCategories:r,getCollections:o}=t(Xt);return{categories:r(),collections:o(),items:n(e)}}),[e]),i=(0,v.useCallback)(((e,n)=>{let{name:r,initialAttributes:o,innerBlocks:i}=e;const l=ke(r,o,xe(i));t(l,void 0,n)}),[t]);return[o,n,r,i]},Kx=n(33306),Yx=function(e){let{children:t}=e;const n=(0,Kx.u)({shift:!0,wrap:"horizontal"});return(0,v.createElement)(Dx.Provider,{value:n},t)};const Xx=[];var Jx=function(e){let{rootClientId:t,onInsert:n,onHover:r,showMostUsedBlocks:o}=e;const[i,l,a,s]=qx(t,n),c=(0,v.useMemo)((()=>Wl(i,"frecency","desc").slice(0,6)),[i]),u=(0,v.useMemo)((()=>i.filter((e=>!e.category))),[i]),d=(0,v.useMemo)((()=>(0,et.Z)((e=>e.filter((e=>e.category&&"reusable"!==e.category))),(e=>(0,U.groupBy)(e,"category")))(i)),[i]),p=(0,v.useMemo)((()=>{const e={...a};return Object.keys(a).forEach((t=>{e[t]=i.filter((e=>(e=>e.name.split("/")[0])(e)===t)),0===e[t].length&&delete e[t]})),e}),[i,a]);(0,v.useEffect)((()=>()=>r(null)),[]);const m=Nx(l),f=l.length===m.length,h=(0,v.useMemo)((()=>Object.entries(a)),[a]),g=Nx(f?h:Xx);return(0,v.createElement)(Yx,null,(0,v.createElement)("div",null,o&&!!c.length&&(0,v.createElement)(Gx,{title:(0,N._x)("Most used","blocks")},(0,v.createElement)(Ux,{items:c,onSelect:s,onHover:r,label:(0,N._x)("Most used","blocks")})),m.map((e=>{const t=d[e.slug];return t&&t.length?(0,v.createElement)(Gx,{key:e.slug,title:e.title,icon:e.icon},(0,v.createElement)(Ux,{items:t,onSelect:s,onHover:r,label:e.title})):null})),f&&u.length>0&&(0,v.createElement)(Gx,{className:"block-editor-inserter__uncategorized-blocks-panel",title:(0,N.__)("Uncategorized")},(0,v.createElement)(Ux,{items:u,onSelect:s,onHover:r,label:(0,N.__)("Uncategorized")})),g.map((e=>{let[t,n]=e;const o=p[t];return o&&o.length?(0,v.createElement)(Gx,{key:t,title:n.title,icon:n.icon},(0,v.createElement)(Ux,{items:o,onSelect:s,onHover:r,label:n.title})):null}))))};const Qx=(0,Qu.iv)("appearance:none;border:1px solid transparent;cursor:pointer;background:none;text-align:start;&:hover{color:",ed.D.ui.theme,";}&:focus{background-color:transparent;color:",ed.D.ui.theme,";border-color:",ed.D.ui.theme,";outline:3px solid transparent;}",""),ew={name:"1bcj5ek",styles:"width:100%;display:block"},tw={name:"150ruhm",styles:"box-sizing:border-box;width:100%;display:block;margin:0;color:inherit"},nw=(0,Qu.iv)("border:1px solid ",td.Z.surfaceBorderColor,";",""),rw=(0,Qu.iv)(">*:not( marquee )>*{border-bottom:1px solid ",td.Z.surfaceBorderColor,";}>*:last-of-type>*:not( :focus ){border-bottom-color:transparent;}",""),ow=td.Z.controlBorderRadius,iw=(0,Qu.iv)("border-radius:",ow,";",""),lw=(0,Qu.iv)("border-radius:",ow,";>*:first-of-type>*{border-top-left-radius:",ow,";border-top-right-radius:",ow,";}>*:last-of-type>*{border-bottom-left-radius:",ow,";border-bottom-right-radius:",ow,";}",""),aw=`calc(${td.Z.fontSize} * ${td.Z.fontLineHeightBase})`,sw=`calc((${td.Z.controlHeight} - ${aw} - 2px) / 2)`,cw=`calc((${td.Z.controlHeightSmall} - ${aw} - 2px) / 2)`,uw=`calc((${td.Z.controlHeightLarge} - ${aw} - 2px) / 2)`,dw={small:(0,Qu.iv)("padding:",cw," ",td.Z.controlPaddingXSmall,";",""),medium:(0,Qu.iv)("padding:",sw," ",td.Z.controlPaddingX,";",""),large:(0,Qu.iv)("padding:",uw," ",td.Z.controlPaddingXLarge,";","")},pw=(0,v.createContext)({size:"medium"}),mw=()=>(0,v.useContext)(pw);var fw=(0,Ku.Iq)((function(e,t){const{isBordered:n,isSeparated:r,size:o,...i}=function(e){const{className:t,isBordered:n=!1,isRounded:r=!0,isSeparated:o=!1,role:i="list",...l}=(0,qu.y)(e,"ItemGroup");return{isBordered:n,className:(0,Yu.I)()(n&&nw,o&&rw,r&&lw,t),role:i,isSeparated:o,...l}}(e),{size:l}=mw(),a={spacedAround:!n&&!r,size:o||l};return(0,v.createElement)(pw.Provider,{value:a},(0,v.createElement)(md.Z,(0,Po.Z)({},i,{ref:t})))}),"ItemGroup"),hw=(0,Ku.Iq)((function(e,t){const{role:n,wrapperClassName:r,...o}=function(e){const{as:t,className:n,onClick:r,role:o="listitem",size:i,...l}=(0,qu.y)(e,"Item"),{spacedAround:a,size:s}=mw(),c=i||s,u=t||(void 0!==r?"button":"div"),d=(0,Yu.I)(),p=(0,v.useMemo)((()=>d("button"===u&&Qx,dw[c]||dw.medium,tw,a&&iw,n)),[u,n,d,c,a]),m=d(ew);return{as:u,className:p,onClick:r,wrapperClassName:m,role:o,...l}}(e);return(0,v.createElement)("div",{role:n,className:r},(0,v.createElement)(md.Z,(0,Po.Z)({},o,{ref:t})))}),"Item"),gw=n(49105),vw=n(46824),bw=(e,t)=>{const{patternCategories:n,patterns:r}=(0,E.Z)((e=>{const{__experimentalGetAllowedPatterns:n,getSettings:r}=e(ku);return{patterns:n(t),patternCategories:r().__experimentalBlockPatternCategories}}),[t]),{createSuccessNotice:o}=(0,S.Z)(vw.h),i=(0,v.useCallback)(((t,n)=>{e((null!=n?n:[]).map((e=>Ce(e))),t.name),o((0,N.sprintf)((0,N.__)('Block pattern "%s" inserted.'),t.title),{type:"snackbar"})}),[]);return[r,n,i]},yw=n(1583);const _w=e=>{let{showTooltip:t,title:n,children:r}=e;return t?(0,v.createElement)(Ld.Z,{text:n},r):(0,v.createElement)(v.Fragment,null,r)};function kw(e){let{isDraggable:t,pattern:n,onClick:r,onHover:o,composite:i,showTooltip:l}=e;const[a,s]=(0,v.useState)(!1),{blocks:c,viewportWidth:u}=n,d=`block-editor-block-patterns-list__item-description-${(0,dd.Z)(kw)}`;return(0,v.createElement)(zx,{isEnabled:t,blocks:c,isPattern:!!n},(e=>{let{draggable:t,onDragStart:p,onDragEnd:m}=e;return(0,v.createElement)("div",{className:"block-editor-block-patterns-list__list-item",draggable:t,onDragStart:e=>{s(!0),p&&(null==o||o(null),p(e))},onDragEnd:e=>{s(!1),m&&m(e)}},(0,v.createElement)(_w,{showTooltip:l,title:n.title},(0,v.createElement)(Ax.A,(0,Po.Z)({role:"option",as:"div"},i,{className:"block-editor-block-patterns-list__item",onClick:()=>{r(n,c),null==o||o(null)},onMouseEnter:()=>{a||null==o||o(n)},onMouseLeave:()=>null==o?void 0:o(null),"aria-label":n.title,"aria-describedby":n.description?d:void 0}),(0,v.createElement)(Ex,{blocks:c,viewportWidth:u}),!l&&(0,v.createElement)("div",{className:"block-editor-block-patterns-list__item-title"},n.title),!!n.description&&(0,v.createElement)(z_.Z,{id:d},n.description))))}))}function xw(){return(0,v.createElement)("div",{className:"block-editor-block-patterns-list__item is-placeholder"})}var ww=function(e){let{isDraggable:t,blockPatterns:n,shownPatterns:r,onHover:o,onClickPattern:i,orientation:l,label:a=(0,N.__)("Block Patterns"),showTitlesAsTooltip:s}=e;const c=(0,Kx.u)({orientation:l});return(0,v.createElement)(yw.b,(0,Po.Z)({},c,{role:"listbox",className:"block-editor-block-patterns-list","aria-label":a}),n.map((e=>r.includes(e)?(0,v.createElement)(kw,{key:e.name,pattern:e,onClick:i,onHover:o,isDraggable:t,composite:c,showTooltip:s}):(0,v.createElement)(xw,{key:e.name}))))};function Cw(e){let{selectedCategory:t,patternCategories:n,onClickCategory:r}=e;const o="block-editor-block-patterns-explorer__sidebar";return(0,v.createElement)("div",{className:`${o}__categories-list`},n.map((e=>{let{name:n,label:i}=e;return(0,v.createElement)(Mo.ZP,{key:n,label:i,className:`${o}__categories-list__item`,isPressed:t===n,onClick:()=>{r(n)}},i)})))}function Ew(e){let{filterValue:t,setFilterValue:n}=e;return(0,v.createElement)("div",{className:"block-editor-block-patterns-explorer__search"},(0,v.createElement)(H_.Z,{__nextHasNoMarginBottom:!0,onChange:n,value:t,label:(0,N.__)("Search for patterns"),placeholder:(0,N.__)("Search")}))}var Sw=function(e){let{selectedCategory:t,patternCategories:n,onClickCategory:r,filterValue:o,setFilterValue:i}=e;return(0,v.createElement)("div",{className:"block-editor-block-patterns-explorer__sidebar"},(0,v.createElement)(Ew,{filterValue:o,setFilterValue:i}),!o&&(0,v.createElement)(Cw,{selectedCategory:t,patternCategories:n,onClickCategory:r}))},Iw=function(){return(0,v.createElement)("div",{className:"block-editor-inserter__no-results"},(0,v.createElement)(Vm.Z,{className:"block-editor-inserter__no-results-icon",icon:ik.Z}),(0,v.createElement)("p",null,(0,N.__)("No results found.")))},Tw=function(e){let{rootClientId:t="",insertionIndex:n,clientId:r,isAppender:o,onSelect:i,shouldFocusBlock:l=!0,selectBlockOnInsert:a=!0}=e;const{getSelectedBlock:s}=(0,E.Z)(ku),{destinationRootClientId:c,destinationIndex:u}=(0,E.Z)((e=>{const{getSelectedBlockClientId:i,getBlockRootClientId:l,getBlockIndex:a,getBlockOrder:s}=e(ku),c=i();let u,d=t;return void 0!==n?u=n:r?u=a(r):!o&&c?(d=l(c),u=a(c)+1):u=s(d).length,{destinationRootClientId:d,destinationIndex:u}}),[t,n,r,o]),{replaceBlocks:d,insertBlocks:p,showInsertionPoint:m,hideInsertionPoint:f}=(0,S.Z)(ku),h=(0,v.useCallback)((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=s();!o&&r&&Me(r)?d(r.clientId,e,null,l||n?0:null,t):p(e,u,c,a,l||n?0:null,t);const m=Array.isArray(e)?e.length:1,f=(0,N.sprintf)((0,N._n)("%d block added.","%d blocks added.",m),m);(0,fl.D)(f),i&&i(e)}),[o,s,d,p,c,u,i,l]),g=(0,v.useCallback)((e=>{e?m(c,u):f()}),[m,f,c,u]);return[c,h,g]},Nw=n(37066);const Bw=e=>e.name||"",Lw=e=>e.title,Pw=e=>e.description||"",Aw=e=>e.keywords||[],Dw=e=>e.category,Rw=()=>null;function Mw(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return(0,Nw.B)(e,{splitRegexp:[/([\p{Ll}\p{Lo}\p{N}])([\p{Lu}\p{Lt}])/gu,/([\p{Lu}\p{Lt}])([\p{Lu}\p{Lt}][\p{Ll}\p{Lo}])/gu],stripRegexp:/(\p{C}|\p{P}|\p{S})+/giu}).split(" ").filter(Boolean)}function Ow(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e=Qe()(e),e=e.replace(/^\//,""),e=e.toLowerCase(),e}const Zw=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Mw(Ow(e))},Fw=(e,t)=>e.filter((e=>!Zw(t).some((t=>t.includes(e))))),jw=(e,t,n,r)=>{if(0===Zw(r).length)return e;const o={getCategory:e=>{var n;return null===(n=t.find((t=>{let{slug:n}=t;return n===e.category})))||void 0===n?void 0:n.title},getCollection:e=>{var t;return null===(t=n[e.name.split("/")[0]])||void 0===t?void 0:t.title}};return zw(e,r,o)},zw=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=Zw(t);if(0===r.length)return e;const o=e.map((e=>[e,Hw(e,t,n)])).filter((e=>{let[,t]=e;return t>0}));return o.sort(((e,t)=>{let[,n]=e,[,r]=t;return r-n})),o.map((e=>{let[t]=e;return t}))};function Hw(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{getName:r=Bw,getTitle:o=Lw,getDescription:i=Pw,getKeywords:l=Aw,getCategory:a=Dw,getCollection:s=Rw}=n,c=r(e),u=o(e),d=i(e),p=l(e),m=a(e),f=s(e),h=Ow(t),g=Ow(u);let v=0;if(h===g)v+=30;else if(g.startsWith(h))v+=20;else{const e=[c,u,d,...p,m,f].join(" "),t=Mw(h);0===Fw(t,e).length&&(v+=10)}return 0!==v&&c.startsWith("core/")&&(v+=c!==e.id?1:2),v}function Vw(e){let{filterValue:t,filteredBlockPatternsLength:n}=e;return t?(0,v.createElement)(gh,{level:2,lineHeight:"48px",className:"block-editor-block-patterns-explorer__search-results-count"},(0,N.sprintf)((0,N._n)('%1$d pattern found for "%2$s"','%1$d patterns found for "%2$s"',n),n,t)):null}var Ww=function(e){let{filterValue:t,selectedCategory:n,patternCategories:r}=e;const o=(0,Kh.Z)(fl.D,500),[i,l]=Tw({shouldFocusBlock:!0}),[a,,s]=bw(l,i),c=(0,v.useMemo)((()=>r.map((e=>e.name))),[r]),u=(0,v.useMemo)((()=>t?zw(a,t):a.filter((e=>{var t,r;return"uncategorized"===n?!(null!==(t=e.categories)&&void 0!==t&&t.length)||e.categories.every((e=>!c.includes(e))):null===(r=e.categories)||void 0===r?void 0:r.includes(n)}))),[t,n,a]);(0,v.useEffect)((()=>{if(!t)return;const e=u.length,n=(0,N.sprintf)((0,N._n)("%d result found.","%d results found.",e),e);o(n)}),[t,o]);const d=Nx(u,{step:2}),p=!(null==u||!u.length);return(0,v.createElement)("div",{className:"block-editor-block-patterns-explorer__list"},p&&(0,v.createElement)(Vw,{filterValue:t,filteredBlockPatternsLength:u.length}),(0,v.createElement)(Yx,null,!p&&(0,v.createElement)(Iw,null),p&&(0,v.createElement)(ww,{shownPatterns:d,blockPatterns:u,onClickPattern:s,isDraggable:!1})))};function $w(e){let{initialCategory:t,patternCategories:n}=e;const[r,o]=(0,v.useState)(""),[i,l]=(0,v.useState)(null==t?void 0:t.name);return(0,v.createElement)("div",{className:"block-editor-block-patterns-explorer"},(0,v.createElement)(Sw,{selectedCategory:i,patternCategories:n,onClickCategory:l,filterValue:r,setFilterValue:o}),(0,v.createElement)(Ww,{filterValue:r,selectedCategory:i,patternCategories:n}))}var Uw=function(e){let{onModalClose:t,...n}=e;return(0,v.createElement)(ug.Z,{title:(0,N.__)("Patterns"),onRequestClose:t,isFullScreen:!0},(0,v.createElement)($w,n))},Gw=n(50028);const qw=(0,v.createContext)({location:{},goTo:()=>{},goBack:()=>{},goToParent:()=>{},addScreen:()=>{},removeScreen:()=>{},params:{}});var Kw=function(){const{location:e,params:t,goTo:n,goBack:r,goToParent:o}=(0,v.useContext)(qw);return{location:e,goTo:n,goBack:r,goToParent:o,params:t}};const Yw=(0,Ku.Iq)((function(e,t){const n=function(e){const{onClick:t,as:n=Mo.ZP,goToParent:r=!1,...o}=(0,qu.y)(e,"NavigatorBackButton"),{goBack:i,goToParent:l}=Kw(),a=(0,v.useCallback)((e=>{e.preventDefault(),r?l():i(),null==t||t(e)}),[r,l,i,t]);return{as:n,onClick:a,...o}}(e);return(0,v.createElement)(md.Z,(0,Po.Z)({ref:t},n))}),"NavigatorBackButton");var Xw=Yw;function Jw(e,t){var n=[];return function(e,t,n){void 0===n&&(n={});var r=n.decode,o=void 0===r?function(e){return e}:r;return function(n){var r=e.exec(n);if(!r)return!1;for(var i=r[0],l=r.index,a=Object.create(null),s=function(e){if(void 0===r[e])return"continue";var n=t[e-1];"*"===n.modifier||"+"===n.modifier?a[n.name]=r[e].split(n.prefix+n.suffix).map((function(e){return o(e,n)})):a[n.name]=o(r[e],n)},c=1;c<r.length;c++)s(c);return{path:i,index:l,params:a}}}(nC(e,n,t),n,t)}function Qw(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function eC(e){return e&&e.sensitive?"":"i"}function tC(e,t,n){return function(e,t,n){void 0===n&&(n={});for(var r=n.strict,o=void 0!==r&&r,i=n.start,l=void 0===i||i,a=n.end,s=void 0===a||a,c=n.encode,u=void 0===c?function(e){return e}:c,d=n.delimiter,p=void 0===d?"/#?":d,m=n.endsWith,f="[".concat(Qw(void 0===m?"":m),"]|$"),h="[".concat(Qw(p),"]"),g=l?"^":"",v=0,b=e;v<b.length;v++){var y=b[v];if("string"==typeof y)g+=Qw(u(y));else{var _=Qw(u(y.prefix)),k=Qw(u(y.suffix));if(y.pattern)if(t&&t.push(y),_||k)if("+"===y.modifier||"*"===y.modifier){var x="*"===y.modifier?"?":"";g+="(?:".concat(_,"((?:").concat(y.pattern,")(?:").concat(k).concat(_,"(?:").concat(y.pattern,"))*)").concat(k,")").concat(x)}else g+="(?:".concat(_,"(").concat(y.pattern,")").concat(k,")").concat(y.modifier);else"+"===y.modifier||"*"===y.modifier?g+="((?:".concat(y.pattern,")").concat(y.modifier,")"):g+="(".concat(y.pattern,")").concat(y.modifier);else g+="(?:".concat(_).concat(k,")").concat(y.modifier)}}if(s)o||(g+="".concat(h,"?")),g+=n.endsWith?"(?=".concat(f,")"):"$";else{var w=e[e.length-1],C="string"==typeof w?h.indexOf(w[w.length-1])>-1:void 0===w;o||(g+="(?:".concat(h,"(?=").concat(f,"))?")),C||(g+="(?=".concat(h,"|").concat(f,")"))}return new RegExp(g,eC(n))}(function(e,t){void 0===t&&(t={});for(var n=function(e){for(var t=[],n=0;n<e.length;){var r=e[n];if("*"!==r&&"+"!==r&&"?"!==r)if("\\"!==r)if("{"!==r)if("}"!==r)if(":"!==r)if("("!==r)t.push({type:"CHAR",index:n,value:e[n++]});else{var o=1,i="";if("?"===e[a=n+1])throw new TypeError('Pattern cannot start with "?" at '.concat(a));for(;a<e.length;)if("\\"!==e[a]){if(")"===e[a]){if(0==--o){a++;break}}else if("("===e[a]&&(o++,"?"!==e[a+1]))throw new TypeError("Capturing groups are not allowed at ".concat(a));i+=e[a++]}else i+=e[a++]+e[a++];if(o)throw new TypeError("Unbalanced pattern at ".concat(n));if(!i)throw new TypeError("Missing pattern at ".concat(n));t.push({type:"PATTERN",index:n,value:i}),n=a}else{for(var l="",a=n+1;a<e.length;){var s=e.charCodeAt(a);if(!(s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122||95===s))break;l+=e[a++]}if(!l)throw new TypeError("Missing parameter name at ".concat(n));t.push({type:"NAME",index:n,value:l}),n=a}else t.push({type:"CLOSE",index:n,value:e[n++]});else t.push({type:"OPEN",index:n,value:e[n++]});else t.push({type:"ESCAPED_CHAR",index:n++,value:e[n++]});else t.push({type:"MODIFIER",index:n,value:e[n++]})}return t.push({type:"END",index:n,value:""}),t}(e),r=t.prefixes,o=void 0===r?"./":r,i="[^".concat(Qw(t.delimiter||"/#?"),"]+?"),l=[],a=0,s=0,c="",u=function(e){if(s<n.length&&n[s].type===e)return n[s++].value},d=function(e){var t=u(e);if(void 0!==t)return t;var r=n[s],o=r.type,i=r.index;throw new TypeError("Unexpected ".concat(o," at ").concat(i,", expected ").concat(e))},p=function(){for(var e,t="";e=u("CHAR")||u("ESCAPED_CHAR");)t+=e;return t};s<n.length;){var m=u("CHAR"),f=u("NAME"),h=u("PATTERN");if(f||h){var g=m||"";-1===o.indexOf(g)&&(c+=g,g=""),c&&(l.push(c),c=""),l.push({name:f||a++,prefix:g,suffix:"",pattern:h||i,modifier:u("MODIFIER")||""})}else{var v=m||u("ESCAPED_CHAR");if(v)c+=v;else if(c&&(l.push(c),c=""),u("OPEN")){g=p();var b=u("NAME")||"",y=u("PATTERN")||"",_=p();d("CLOSE"),l.push({name:b||(y?a++:""),pattern:b&&!y?i:y,prefix:g,suffix:_,modifier:u("MODIFIER")||""})}else d("END")}}return l}(e,n),t,n)}function nC(e,t,n){return e instanceof RegExp?function(e,t){if(!t)return e;for(var n=/\((?:\?<(.*?)>)?(?!\?)/g,r=0,o=n.exec(e.source);o;)t.push({name:o[1]||r++,prefix:"",suffix:"",modifier:"",pattern:""}),o=n.exec(e.source);return e}(e,t):Array.isArray(e)?function(e,t,n){var r=e.map((function(e){return nC(e,t,n).source}));return new RegExp("(?:".concat(r.join("|"),")"),eC(n))}(e,t,n):tC(e,t,n)}function rC(e,t){return Jw(t,{decode:decodeURIComponent})(e)}function oC(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"add":return[...e,t.screen];case"remove":return e.filter((e=>e.id!==t.screen.id))}return e}var iC={name:"15bx5k",styles:"overflow-x:hidden"};const lC=(0,Ku.Iq)((function(e,t){const{initialPath:n,children:r,className:o,...i}=(0,qu.y)(e,"NavigatorProvider"),[l,a]=(0,v.useState)([{path:n}]),s=(0,v.useRef)([]),[c,u]=(0,v.useReducer)(oC,[]),d=(0,v.useRef)([]);(0,v.useEffect)((()=>{d.current=c}),[c]),(0,v.useEffect)((()=>{s.current=l}),[l]);const p=(0,v.useRef)(),m=(0,v.useMemo)((()=>{let e;if(0===l.length||void 0===(e=l[l.length-1].path))return void(p.current=void 0);const t=(e=>{const t=function(e,t){for(const n of t){const t=rC(e,n.path);if(t)return{params:t.params,id:n.id}}}(e,c);return p.current&&t&&(0,fn.ZP)(t.params,p.current.params)&&t.id===p.current.id?p.current:t})(e);return p.current=t,t}),[c,l]),f=(0,v.useCallback)((e=>u({type:"add",screen:e})),[]),h=(0,v.useCallback)((e=>u({type:"remove",screen:e})),[]),g=(0,v.useCallback)((()=>{a((e=>e.length<=1?e:[...e.slice(0,-2),{...e[e.length-2],isBack:!0,hasRestoredFocus:!1}]))}),[]),b=(0,v.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{focusTargetSelector:n,isBack:r=!1,...o}=t,i=r&&s.current.length>1&&s.current[s.current.length-2].path===e;i?g():a((t=>{const i={...o,path:e,isBack:r,hasRestoredFocus:!1};return t.length<1?[i]:[...t.slice(t.length>49?1:0,-1),{...t[t.length-1],focusTargetSelector:n},i]}))}),[g]),y=(0,v.useCallback)((()=>{const e=s.current[s.current.length-1].path;if(void 0===e)return;const t=function(e,t){if(!e.startsWith("/"))return;const n=e.split("/");let r;for(;n.length>1&&void 0===r;){n.pop();const e=""===n.join("/")?"/":n.join("/");t.find((t=>!1!==rC(e,t.path)))&&(r=e)}return r}(e,d.current);void 0!==t&&b(t,{isBack:!0})}),[b]),_=(0,v.useMemo)((()=>({location:{...l[l.length-1],isInitial:1===l.length},params:m?m.params:{},match:m?m.id:void 0,goTo:b,goBack:g,goToParent:y,addScreen:f,removeScreen:h})),[l,m,b,g,y,f,h]),k=(0,Yu.I)(),x=(0,v.useMemo)((()=>k(iC,o)),[o,k]);return(0,v.createElement)(md.Z,(0,Po.Z)({ref:t,className:x},i),(0,v.createElement)(qw.Provider,{value:_},r))}),"NavigatorProvider");var aC=lC,sC=n(61755),cC={name:"14x3t6z",styles:"overflow-x:auto;max-height:100%"};const uC=(0,Ku.Iq)((function(e,t){const n=(0,v.useId)(),{children:r,className:o,path:i,...l}=(0,qu.y)(e,"NavigatorScreen"),a=(0,r_.Z)(),{location:s,match:c,addScreen:u,removeScreen:d}=(0,v.useContext)(qw),p=c===n,m=(0,v.useRef)(null);(0,v.useEffect)((()=>{const e={id:n,path:(0,Ji.kb)(i)};return u(e),()=>d(e)}),[n,i,u,d]);const f=(0,Yu.I)(),h=(0,v.useMemo)((()=>f(cC,o)),[o,f]),g=(0,v.useRef)(s);(0,v.useEffect)((()=>{g.current=s}),[s]);const b=s.isInitial&&!s.isBack;(0,v.useEffect)((()=>{if(b||!p||!m.current||g.current.hasRestoredFocus)return;const e=m.current.ownerDocument.activeElement;if(m.current.contains(e))return;let t=null;if(s.isBack&&null!=s&&s.focusTargetSelector&&(t=m.current.querySelector(s.focusTargetSelector)),!t){const e=s_.focus.tabbable.find(m.current)[0];t=null!=e?e:m.current}g.current.hasRestoredFocus=!0,t.focus()}),[b,p,s.isBack,s.focusTargetSelector]);const y=(0,vl.Z)([t,m]);if(!p)return null;if(a)return(0,v.createElement)(md.Z,(0,Po.Z)({ref:y,className:h},l),r);const _={opacity:0,x:(0,N.isRTL)()&&s.isBack||!(0,N.isRTL)()&&!s.isBack?50:-50},k={animate:{opacity:1,transition:{delay:0,duration:.14,ease:"easeInOut"},x:0},exit:{delay:0,opacity:0,x:!(0,N.isRTL)()&&s.isBack||(0,N.isRTL)()&&!s.isBack?50:-50,transition:{duration:.14,ease:"easeInOut"}},initial:_};return(0,v.createElement)(sC.E.div,(0,Po.Z)({ref:y,className:h},l,k),r)}),"NavigatorScreen");var dC=uC;const pC=(0,Ku.Iq)((function(e,t){const n=function(e){const{path:t,onClick:n,as:r=Mo.ZP,attributeName:o="id",...i}=(0,qu.y)(e,"NavigatorButton"),l=(0,Ji.kb)(t),{goTo:a}=Kw(),s=(0,v.useCallback)((e=>{var t,r;e.preventDefault(),a(l,{focusTargetSelector:(t=o,r=l,`[${t}="${r}"]`)}),null==n||n(e)}),[a,n,o,l]);return{as:r,onClick:s,...i,[o]:l}}(e);return(0,v.createElement)(md.Z,(0,Po.Z)({ref:t},n))}),"NavigatorButton");var mC=pC;function fC(e){let{title:t}=e;return(0,v.createElement)(Gw.Z,{spacing:0},(0,v.createElement)(md.Z,null,(0,v.createElement)(Lm.Z,{marginBottom:0,paddingX:4,paddingY:3},(0,v.createElement)(Bm.Z,{spacing:2},(0,v.createElement)(Xw,{style:{minWidth:24,padding:0},icon:(0,N.isRTL)()?rk.Z:ok.Z,isSmall:!0,"aria-label":(0,N.__)("Navigate to the previous view")}),(0,v.createElement)(Lm.Z,null,(0,v.createElement)(gh,{level:5},t))))))}function hC(e){let{categories:t,children:n}=e;return(0,v.createElement)(aC,{initialPath:"/",className:"block-editor-inserter__mobile-tab-navigation"},(0,v.createElement)(dC,{path:"/"},(0,v.createElement)(fw,null,t.map((e=>(0,v.createElement)(mC,{key:e.name,path:`/category/${e.name}`,as:hw,isAction:!0},(0,v.createElement)(Bm.Z,null,(0,v.createElement)(gw.Z,null,e.label),(0,v.createElement)(Vm.Z,{icon:(0,N.isRTL)()?ok.Z:rk.Z}))))))),t.map((e=>(0,v.createElement)(dC,{key:e.name,path:`/category/${e.name}`},(0,v.createElement)(fC,{title:(0,N.__)("Back")}),n(e)))))}const gC=["featured","posts","text","gallery","call-to-action","banner","header","footer"];function vC(e){const[t,n]=bw(void 0,e),r=(0,v.useCallback)((e=>!(!e.categories||!e.categories.length)&&e.categories.some((e=>n.some((t=>t.name===e))))),[n]),o=(0,v.useMemo)((()=>{const e=n.filter((e=>t.some((t=>{var n;return null===(n=t.categories)||void 0===n?void 0:n.includes(e.name)})))).sort(((e,t)=>{let{name:n}=e,{name:r}=t,o=gC.indexOf(n),i=gC.indexOf(r);return o<0&&(o=gC.length),i<0&&(i=gC.length),o-i}));return t.some((e=>!r(e)))&&!e.find((e=>"uncategorized"===e.name))&&e.push({name:"uncategorized",label:(0,N._x)("Uncategorized")}),e}),[t,n]);return o}function bC(e){let{rootClientId:t,onInsert:n,onHover:r,category:o,showTitlesAsTooltip:i}=e;const l=(0,v.useRef)();return(0,v.useEffect)((()=>{const e=setTimeout((()=>{const[e]=s_.focus.tabbable.find(l.current);null==e||e.focus()}));return()=>clearTimeout(e)}),[o]),(0,v.createElement)("div",{ref:l,className:"block-editor-inserter__patterns-category-dialog"},(0,v.createElement)(yC,{rootClientId:t,onInsert:n,onHover:r,category:o,showTitlesAsTooltip:i}))}function yC(e){let{rootClientId:t,onInsert:n,onHover:r,category:o,showTitlesAsTooltip:i}=e;const[l,,a]=bw(n,t),s=vC(t),c=(0,v.useMemo)((()=>l.filter((e=>{var t,n,r;return"uncategorized"!==o.name?null===(r=e.categories)||void 0===r?void 0:r.includes(o.name):0===(null!==(t=null===(n=e.categories)||void 0===n?void 0:n.filter((e=>s.find((t=>t.name===e)))))&&void 0!==t?t:[]).length}))),[l,o]),u=Nx(c);return(0,v.useEffect)((()=>()=>r(null)),[]),c.length?(0,v.createElement)("div",{className:"block-editor-inserter__patterns-category-panel"},(0,v.createElement)("div",{className:"block-editor-inserter__patterns-category-panel-title"},o.label),(0,v.createElement)("p",null,o.description),(0,v.createElement)(ww,{shownPatterns:u,blockPatterns:c,onClickPattern:a,onHover:r,label:o.label,orientation:"vertical",category:o.label,isDraggable:!0,showTitlesAsTooltip:i})):null}var _C=function(e){let{onSelectCategory:t,selectedCategory:n,onInsert:r,rootClientId:o}=e;const[i,l]=(0,v.useState)(!1),a=vC(o),s=n||a[0],c=(0,qh.Z)("medium","<");return(0,v.createElement)(v.Fragment,null,!c&&(0,v.createElement)("div",{className:"block-editor-inserter__block-patterns-tabs-container"},(0,v.createElement)("nav",{"aria-label":(0,N.__)("Block pattern categories")},(0,v.createElement)(fw,{role:"list",className:"block-editor-inserter__block-patterns-tabs"},a.map((e=>(0,v.createElement)(hw,{role:"listitem",key:e.name,onClick:()=>t(e),className:e===n?"block-editor-inserter__patterns-category block-editor-inserter__patterns-selected-category":"block-editor-inserter__patterns-category","aria-label":e.label,"aria-current":e===n?"true":void 0},(0,v.createElement)(Bm.Z,null,(0,v.createElement)(gw.Z,null,e.label),(0,v.createElement)(Vm.Z,{icon:rk.Z}))))),(0,v.createElement)("div",{role:"listitem"},(0,v.createElement)(Mo.ZP,{className:"block-editor-inserter__patterns-explore-button",onClick:()=>l(!0),variant:"secondary"},(0,N.__)("Explore all patterns")))))),c&&(0,v.createElement)(hC,{categories:a},(e=>(0,v.createElement)(yC,{onInsert:r,rootClientId:o,category:e,showTitlesAsTooltip:!1}))),i&&(0,v.createElement)(Uw,{initialCategory:s,patternCategories:a,onModalClose:()=>l(!1)}))},kC=n(15312);function xC(e){let{onHover:t,onInsert:n,rootClientId:r}=e;const[o,,,i]=qx(r,n),l=(0,v.useMemo)((()=>o.filter((e=>{let{category:t}=e;return"reusable"===t}))),[o]);return 0===l.length?(0,v.createElement)(Iw,null):(0,v.createElement)(Gx,{title:(0,N.__)("Reusable blocks")},(0,v.createElement)(Ux,{items:l,onSelect:i,onHover:t,label:(0,N.__)("Reusable blocks")}))}var wC=function(e){let{rootClientId:t,onInsert:n,onHover:r}=e;return(0,v.createElement)(v.Fragment,null,(0,v.createElement)(xC,{onHover:r,onInsert:n,rootClientId:t}),(0,v.createElement)("div",{className:"block-editor-inserter__manage-reusable-blocks-container"},(0,v.createElement)(Mo.ZP,{className:"block-editor-inserter__manage-reusable-blocks",variant:"secondary",href:(0,kC.f)("edit.php",{post_type:"wp_block"})},(0,N.__)("Manage Reusable blocks"))))};function CC(e){const[t,n]=(0,v.useState)([]),{canInsertImage:r,canInsertVideo:o,canInsertAudio:i}=(0,E.Z)((t=>{const{canInsertBlockType:n}=t(ku);return{canInsertImage:n("core/image",e),canInsertVideo:n("core/video",e),canInsertAudio:n("core/audio",e)}}),[e]),l=function(){const{inserterMediaCategories:e,allowedMimeTypes:t,enableOpenverseMediaCategory:n}=(0,E.Z)((e=>{const t=e(ku).getSettings();return{inserterMediaCategories:t.inserterMediaCategories,allowedMimeTypes:t.allowedMimeTypes,enableOpenverseMediaCategory:t.enableOpenverseMediaCategory}}),[]),r=(0,v.useMemo)((()=>{if(e&&t)return e.filter((e=>!(!n&&"openverse"===e.name)&&Object.values(t).some((t=>t.startsWith(`${e.mediaType}/`)))))}),[e,t,n]);return r}();return(0,v.useEffect)((()=>{(async()=>{const e=[];if(!l)return;const t=new Map(await Promise.all(l.map((async e=>{if(e.isExternalResource)return[e.name,!0];let t=[];try{t=await e.fetch({per_page:1})}catch(e){}return[e.name,!!t.length]})))),a={image:r,video:o,audio:i};l.forEach((n=>{a[n.mediaType]&&t.get(n.name)&&e.push(n)})),e.length&&n(e)})()}),[r,o,i,l]),t}var EC=n(73985),SC=n(6198);const IC={image:"img",video:"video",audio:"audio"};function TC(e,t){const n={id:e.id||void 0,caption:e.caption||void 0},r=e.url,o=e.alt||void 0;"image"===t?(n.url=r,n.alt=o):["video","audio"].includes(t)&&(n.src=r);const i=IC[t],l=(0,v.createElement)(i,{src:e.previewUrl||r,alt:o,controls:"audio"===t||void 0,inert:"true",onError:t=>{let{currentTarget:n}=t;n.src===e.previewUrl&&(n.src=r)}});return[ke(`core/${t}`,n),l]}const NC=["image"],BC={position:"bottom left",className:"block-editor-inserter__media-list__item-preview-options__popover"};function LC(e){let{category:t,media:n}=e;if(!t.getReportUrl)return null;const r=t.getReportUrl(n);return(0,v.createElement)(zo.Z,{className:"block-editor-inserter__media-list__item-preview-options",label:(0,N.__)("Options"),popoverProps:BC,icon:mh.Z},(()=>(0,v.createElement)(Ou.Z,null,(0,v.createElement)(Zu.Z,{onClick:()=>window.open(r,"_blank").focus(),icon:SC.Z},(0,N.sprintf)((0,N.__)("Report %s"),t.mediaType)))))}function PC(e){let{onClose:t,onSubmit:n}=e;return(0,v.createElement)(ug.Z,{title:(0,N.__)("Insert external image"),onRequestClose:t,className:"block-editor-inserter-media-tab-media-preview-inserter-external-image-modal"},(0,v.createElement)(Gw.Z,{spacing:3},(0,v.createElement)("p",null,(0,N.__)("This image cannot be uploaded to your Media Library, but it can still be inserted as an external image.")),(0,v.createElement)("p",null,(0,N.__)("External images can be removed by the external provider without warning and could even have legal compliance issues related to privacy legislation."))),(0,v.createElement)(Uu.Z,{className:"block-editor-block-lock-modal__actions",justify:"flex-end",expanded:!1},(0,v.createElement)(Gu.Z,null,(0,v.createElement)(Mo.ZP,{variant:"tertiary",onClick:t},(0,N.__)("Cancel"))),(0,v.createElement)(Gu.Z,null,(0,v.createElement)(Mo.ZP,{variant:"primary",onClick:n},(0,N.__)("Insert")))))}function AC(e){var t;let{media:n,onClick:r,composite:o,category:i}=e;const[l,a]=(0,v.useState)(!1),[s,c]=(0,v.useState)(!1),[u,d]=(0,v.useState)(!1),[p,m]=(0,v.useMemo)((()=>TC(n,i.mediaType)),[n,i.mediaType]),{createErrorNotice:f,createSuccessNotice:h}=(0,S.Z)(vw.h),g=(0,E.Z)((e=>e(ku).getSettings().mediaUpload),[]),b=(0,v.useCallback)((e=>{if(u)return;const t=Ce(e),{id:n,url:o,caption:i}=t.attributes;n?r(t):(d(!0),window.fetch(o).then((e=>e.blob())).then((e=>{g({filesList:[e],additionalData:{caption:i},onFileChange(e){let[n]=e;j(n.url)||(r({...t,attributes:{...t.attributes,id:n.id,url:n.url}}),h((0,N.__)("Image uploaded and inserted."),{type:"snackbar"}),d(!1))},allowedTypes:NC,onError(e){f(e,{type:"snackbar"}),d(!1)}})})).catch((()=>{a(!0),d(!1)})))}),[u,r,g,f,h]),y=(null===(t=n.title)||void 0===t?void 0:t.rendered)||n.title;let _;if(y.length>25){const e="...";_=y.slice(0,25-e.length)+e}const k=(0,v.useCallback)((()=>c(!0)),[]),x=(0,v.useCallback)((()=>c(!1)),[]);return(0,v.createElement)(v.Fragment,null,(0,v.createElement)(zx,{isEnabled:!0,blocks:[p]},(e=>{let{draggable:t,onDragStart:r,onDragEnd:l}=e;return(0,v.createElement)("div",{className:w()("block-editor-inserter__media-list__list-item",{"is-hovered":s}),draggable:t,onDragStart:r,onDragEnd:l},(0,v.createElement)(Ld.Z,{text:_||y},(0,v.createElement)("div",{onMouseEnter:k,onMouseLeave:x},(0,v.createElement)(Ax.A,(0,Po.Z)({role:"option",as:"div"},o,{className:"block-editor-inserter__media-list__item",onClick:()=>b(p),"aria-label":y}),(0,v.createElement)("div",{className:"block-editor-inserter__media-list__item-preview"},m,u&&(0,v.createElement)("div",{className:"block-editor-inserter__media-list__item-preview-spinner"},(0,v.createElement)(EC.ZP,null)))),!u&&(0,v.createElement)(LC,{category:i,media:n}))))})),l&&(0,v.createElement)(PC,{onClose:()=>a(!1),onSubmit:()=>{r(Ce(p)),h((0,N.__)("Image inserted."),{type:"snackbar"}),a(!1)}}))}var DC=function(e){let{mediaList:t,category:n,onClick:r,label:o=(0,N.__)("Media List")}=e;const i=(0,Kx.u)();return(0,v.createElement)(yw.b,(0,Po.Z)({},i,{role:"listbox",className:"block-editor-inserter__media-list","aria-label":o}),t.map(((e,t)=>(0,v.createElement)(AC,{key:e.id||e.sourceId||t,media:e,category:n,onClick:r,composite:i}))))};function RC(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const[t,n]=(0,v.useState)(e),[r,o]=(0,v.useState)(e),i=(0,Kh.Z)(o,250);return(0,v.useEffect)((()=>{r!==t&&i(t)}),[r,t]),[t,n,r]}function MC(e){let{rootClientId:t,onInsert:n,category:r}=e;const o=(0,v.useRef)();return(0,v.useEffect)((()=>{const e=setTimeout((()=>{const[e]=s_.focus.tabbable.find(o.current);null==e||e.focus()}));return()=>clearTimeout(e)}),[r]),(0,v.createElement)("div",{ref:o,className:"block-editor-inserter__media-dialog"},(0,v.createElement)(OC,{rootClientId:t,onInsert:n,category:r}))}function OC(e){let{rootClientId:t,onInsert:n,category:r}=e;const[o,i,l]=RC(),{mediaList:a,isLoading:s}=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const[n,r]=(0,v.useState)(),[o,i]=(0,v.useState)(!1),l=(0,v.useRef)();return(0,v.useEffect)((()=>{(async()=>{var n;const o=JSON.stringify({category:e.name,...t});l.current=o,i(!0),r([]);const a=await(null===(n=e.fetch)||void 0===n?void 0:n.call(e,t));o===l.current&&(r(a),i(!1))})()}),[e.name,...Object.values(t)]),{mediaList:n,isLoading:o}}(r,{per_page:l?20:10,search:l}),c="block-editor-inserter__media-panel",u=r.labels.search_items||(0,N.__)("Search");return(0,v.createElement)("div",{className:c},(0,v.createElement)(H_.Z,{className:`${c}-search`,onChange:i,value:o,label:u,placeholder:u}),s&&(0,v.createElement)("div",{className:`${c}-spinner`},(0,v.createElement)(EC.ZP,null)),!s&&!(null!=a&&a.length)&&(0,v.createElement)(Iw,null),!s&&!(null==a||!a.length)&&(0,v.createElement)(DC,{rootClientId:t,onClick:n,mediaList:a,category:r}))}var ZC=function(e){let{fallback:t=null,children:n}=e;const r=(0,E.Z)((e=>{const{getSettings:t}=e(ku);return!!t().mediaUpload}),[]);return r?n:t},FC=Xh("editor.MediaUpload")((()=>null));const jC=["image","video","audio"];var zC=function(e){let{rootClientId:t,selectedCategory:n,onSelectCategory:r,onInsert:o}=e;const i=CC(t),l=(0,qh.Z)("medium","<"),a="block-editor-inserter__media-tabs",s=(0,v.useCallback)((e=>{if(null==e||!e.url)return;const[t]=TC(e,e.type);o(t)}),[o]),c=(0,v.useMemo)((()=>i.map((e=>({...e,label:e.labels.name})))),[i]);return(0,v.createElement)(v.Fragment,null,!l&&(0,v.createElement)("div",{className:`${a}-container`},(0,v.createElement)("nav",{"aria-label":(0,N.__)("Media categories")},(0,v.createElement)(fw,{role:"list",className:a},i.map((e=>(0,v.createElement)(hw,{role:"listitem",key:e.name,onClick:()=>r(e),className:w()(`${a}__media-category`,{"is-selected":n===e}),"aria-label":e.labels.name,"aria-current":e===n?"true":void 0},(0,v.createElement)(Bm.Z,null,(0,v.createElement)(gw.Z,null,e.labels.name),(0,v.createElement)(Vm.Z,{icon:rk.Z}))))),(0,v.createElement)("div",{role:"listitem"},(0,v.createElement)(ZC,null,(0,v.createElement)(FC,{multiple:!1,onSelect:s,allowedTypes:jC,render:e=>{let{open:t}=e;return(0,v.createElement)(Mo.ZP,{onClick:e=>{e.target.focus(),t()},className:"block-editor-inserter__media-library-button",variant:"secondary","data-unstable-ignore-focus-outside-for-relatedtarget":".media-modal"},(0,N.__)("Open Media Library"))}})))))),l&&(0,v.createElement)(hC,{categories:c},(e=>(0,v.createElement)(OC,{onInsert:o,rootClientId:t,category:e}))))};const{Fill:HC,Slot:VC}=(0,I.up)("__unstableInserterMenuExtension");HC.Slot=VC;var WC=HC;const $C=[];var UC=function(e){let{filterValue:t,onSelect:n,onHover:r,rootClientId:o,clientId:i,isAppender:l,__experimentalInsertionIndex:a,maxBlockPatterns:s,maxBlockTypes:c,showBlockDirectory:u=!1,isDraggable:d=!0,shouldFocusBlock:p=!0,prioritizePatterns:m,selectBlockOnInsert:f}=e;const h=(0,Kh.Z)(fl.D,500),[g,b]=Tw({onSelect:n,rootClientId:o,clientId:i,isAppender:l,insertionIndex:a,shouldFocusBlock:p,selectBlockOnInsert:f}),[y,_,k,x]=qx(g,b),[w,,C]=bw(b,g),E=(0,v.useMemo)((()=>{if(0===s)return[];const e=zw(w,t);return void 0!==s?e.slice(0,s):e}),[t,w,s]);let S=c;m&&E.length>2&&(S=0);const I=(0,v.useMemo)((()=>{if(0===S)return[];const e=jw(Wl(y,"frecency","desc"),_,k,t);return void 0!==S?e.slice(0,S):e}),[t,y,_,k,c]);(0,v.useEffect)((()=>{if(!t)return;const e=I.length+E.length,n=(0,N.sprintf)((0,N._n)("%d result found.","%d results found.",e),e);h(n)}),[t,h]);const T=Nx(I,{step:9}),B=Nx(T.length===I.length?E:$C),L=I.length>0||E.length>0,P=!!I.length&&(0,v.createElement)(Gx,{title:(0,v.createElement)(z_.Z,null,(0,N.__)("Blocks"))},(0,v.createElement)(Ux,{items:T,onSelect:x,onHover:r,label:(0,N.__)("Blocks"),isDraggable:d})),A=!!E.length&&(0,v.createElement)(Gx,{title:(0,v.createElement)(z_.Z,null,(0,N.__)("Block Patterns"))},(0,v.createElement)("div",{className:"block-editor-inserter__quick-inserter-patterns"},(0,v.createElement)(ww,{shownPatterns:B,blockPatterns:E,onClickPattern:C,onHover:r,isDraggable:d})));return(0,v.createElement)(Yx,null,!u&&!L&&(0,v.createElement)(Iw,null),m?A:P,!!I.length&&!!E.length&&(0,v.createElement)("div",{className:"block-editor-inserter__quick-inserter-separator"}),m?P:A,u&&(0,v.createElement)(WC.Slot,{fillProps:{onSelect:x,onHover:r,filterValue:t,hasItems:L,rootClientId:g}},(e=>e.length?e:L?null:(0,v.createElement)(Iw,null))))},GC=n(35835);const qC={name:"blocks",title:(0,N.__)("Blocks")},KC={name:"patterns",title:(0,N.__)("Patterns")},YC={name:"reusable",title:(0,N.__)("Reusable"),icon:ui.Z},XC={name:"media",title:(0,N.__)("Media")};var JC=function(e){let{children:t,showPatterns:n=!1,showReusableBlocks:r=!1,showMedia:o=!1,onSelect:i,prioritizePatterns:l}=e;const a=(0,v.useMemo)((()=>{const e=[];return l&&n&&e.push(KC),e.push(qC),!l&&n&&e.push(KC),o&&e.push(XC),r&&e.push(YC),e}),[l,qC,n,KC,r,o,YC]);return(0,v.createElement)(GC.Z,{className:"block-editor-inserter__tabs",tabs:a,onSelect:i},t)},QC=(0,v.forwardRef)((function(e,t){let{rootClientId:n,clientId:r,isAppender:o,__experimentalInsertionIndex:i,onSelect:l,showInserterHelpPanel:a,showMostUsedBlocks:s,__experimentalFilterValue:c="",shouldFocusBlock:u=!0,prioritizePatterns:d}=e;const[p,m,f]=RC(c),[h,g]=(0,v.useState)(null),[b,y]=(0,v.useState)(null),[_,k]=(0,v.useState)(null),[x,C]=(0,v.useState)(null),[S,I,T]=Tw({rootClientId:n,clientId:r,isAppender:o,insertionIndex:i,shouldFocusBlock:u}),{showPatterns:B,inserterItems:L}=(0,E.Z)((e=>{const{__experimentalGetAllowedPatterns:t,getInserterItems:n}=e(ku);return{showPatterns:!!t(S).length,inserterItems:n(S)}}),[S]),P=(0,v.useMemo)((()=>L.some((e=>{let{category:t}=e;return"reusable"===t}))),[L]),A=!!CC(S).length,D=(0,v.useCallback)(((e,t,n)=>{I(e,t,n),l()}),[I,l]),R=(0,v.useCallback)(((e,t)=>{I(e,{patternName:t}),l()}),[I,l]),M=(0,v.useCallback)((e=>{T(!!e),g(e)}),[T,g]),O=(0,v.useCallback)((e=>{T(!!e)}),[T]),Z=(0,v.useCallback)((e=>{y(e)}),[y]),F=(0,v.useMemo)((()=>(0,v.createElement)(v.Fragment,null,(0,v.createElement)("div",{className:"block-editor-inserter__block-list"},(0,v.createElement)(Jx,{rootClientId:S,onInsert:D,onHover:M,showMostUsedBlocks:s})),a&&(0,v.createElement)("div",{className:"block-editor-inserter__tips"},(0,v.createElement)(z_.Z,{as:"h2"},(0,N.__)("A tip for using the block editor")),(0,v.createElement)(nk,null)))),[S,D,M,f,s,a]),j=(0,v.useMemo)((()=>(0,v.createElement)(_C,{rootClientId:S,onInsert:R,onSelectCategory:Z,selectedCategory:b})),[S,R,Z,b]),z=(0,v.useMemo)((()=>(0,v.createElement)(wC,{rootClientId:S,onInsert:D,onHover:M})),[S,D,M]),H=(0,v.useMemo)((()=>(0,v.createElement)(zC,{rootClientId:S,selectedCategory:_,onSelectCategory:k,onInsert:D})),[S,D,_,k]),V=(0,v.useCallback)((e=>"blocks"===e.name?F:"patterns"===e.name?j:"reusable"===e.name?z:"media"===e.name?H:void 0),[F,j,z,H]),W=(0,v.useRef)();(0,v.useImperativeHandle)(t,(()=>({focusSearch:()=>{W.current.focus()}})));const $="patterns"===x&&!f&&b,U=!f&&(B||P||A),G="media"===x&&!f&&_;return(0,v.createElement)("div",{className:"block-editor-inserter__menu"},(0,v.createElement)("div",{className:w()("block-editor-inserter__main-area",{"show-as-tabs":U})},(0,v.createElement)(H_.Z,{__nextHasNoMarginBottom:!0,className:"block-editor-inserter__search",onChange:e=>{h&&g(null),m(e)},value:p,label:(0,N.__)("Search for blocks and patterns"),placeholder:(0,N.__)("Search"),ref:W}),!!f&&(0,v.createElement)("div",{className:"block-editor-inserter__no-tab-container"},(0,v.createElement)(UC,{filterValue:f,onSelect:l,onHover:M,rootClientId:n,clientId:r,isAppender:o,__experimentalInsertionIndex:i,showBlockDirectory:!0,shouldFocusBlock:u})),U&&(0,v.createElement)(JC,{showPatterns:B,showReusableBlocks:P,showMedia:A,prioritizePatterns:d,onSelect:C},V),!f&&!U&&(0,v.createElement)("div",{className:"block-editor-inserter__no-tab-container"},F)),G&&(0,v.createElement)(MC,{rootClientId:S,onInsert:D,category:_}),a&&h&&(0,v.createElement)(Sx,{item:h}),$&&(0,v.createElement)(bC,{rootClientId:S,onInsert:R,onHover:O,category:b,showTitlesAsTooltip:!0}))}));function eE(e){let{onSelect:t,rootClientId:n,clientId:r,isAppender:o,prioritizePatterns:i,selectBlockOnInsert:l}=e;const[a,s]=(0,v.useState)(""),[c,u]=Tw({onSelect:t,rootClientId:n,clientId:r,isAppender:o,selectBlockOnInsert:l}),[d]=qx(c,u),[p]=bw(u,c),{setInserterIsOpened:m,insertionIndex:f}=(0,E.Z)((e=>{const{getSettings:t,getBlockIndex:n,getBlockCount:o}=e(ku),i=t(),l=n(r),a=o();return{setInserterIsOpened:i.__experimentalSetIsInserterOpened,insertionIndex:-1===l?a:l}}),[r]),h=p.length&&(!!a||i),g=h&&p.length>6||d.length>6;(0,v.useEffect)((()=>{m&&m(!1)}),[m]);let b=0;return h&&(b=i?4:2),(0,v.createElement)("div",{className:w()("block-editor-inserter__quick-inserter",{"has-search":g,"has-expand":m})},g&&(0,v.createElement)(H_.Z,{__nextHasNoMarginBottom:!0,className:"block-editor-inserter__search",value:a,onChange:e=>{s(e)},label:(0,N.__)("Search for blocks and patterns"),placeholder:(0,N.__)("Search")}),(0,v.createElement)("div",{className:"block-editor-inserter__quick-inserter-results"},(0,v.createElement)(UC,{filterValue:a,onSelect:t,rootClientId:n,clientId:r,isAppender:o,maxBlockPatterns:b,maxBlockTypes:6,isDraggable:!1,prioritizePatterns:i,selectBlockOnInsert:l})),m&&(0,v.createElement)(Mo.ZP,{className:"block-editor-inserter__quick-inserter-expand",onClick:()=>{m({rootClientId:n,insertionIndex:f,filterValue:a})},"aria-label":(0,N.__)("Browse all. This will open the main inserter panel in the editor toolbar.")},(0,N.__)("Browse all")))}const tE=e=>{let t,{onToggle:n,disabled:r,isOpen:o,blockTitle:i,hasSingleBlockType:l,toggleProps:a={},prioritizePatterns:s}=e;t=l?(0,N.sprintf)((0,N._x)("Add %s","directly add the only allowed block"),i):s?(0,N.__)("Add pattern"):(0,N._x)("Add block","Generic label for block inserter button");const{onClick:c,...u}=a;return(0,v.createElement)(Mo.ZP,(0,Po.Z)({icon:rm.Z,label:t,tooltipPosition:"bottom",onClick:function(e){n&&n(e),c&&c(e)},className:"block-editor-inserter__toggle","aria-haspopup":!l&&"true","aria-expanded":!l&&o,disabled:r},u))};class nE extends v.Component{constructor(){super(...arguments),this.onToggle=this.onToggle.bind(this),this.renderToggle=this.renderToggle.bind(this),this.renderContent=this.renderContent.bind(this)}onToggle(e){const{onToggle:t}=this.props;t&&t(e)}renderToggle(e){let{onToggle:t,isOpen:n}=e;const{disabled:r,blockTitle:o,hasSingleBlockType:i,directInsertBlock:l,toggleProps:a,hasItems:s,renderToggle:c=tE,prioritizePatterns:u}=this.props;return c({onToggle:t,isOpen:n,disabled:r||!s,blockTitle:o,hasSingleBlockType:i,directInsertBlock:l,toggleProps:a,prioritizePatterns:u})}renderContent(e){let{onClose:t}=e;const{rootClientId:n,clientId:r,isAppender:o,showInserterHelpPanel:i,__experimentalIsQuick:l,prioritizePatterns:a,onSelectOrClose:s,selectBlockOnInsert:c}=this.props;return l?(0,v.createElement)(eE,{onSelect:e=>{const n=Array.isArray(e)&&null!=e&&e.length?e[0]:e;s&&"function"==typeof s&&s(n),t()},rootClientId:n,clientId:r,isAppender:o,prioritizePatterns:a,selectBlockOnInsert:c}):(0,v.createElement)(QC,{onSelect:()=>{t()},rootClientId:n,clientId:r,isAppender:o,showInserterHelpPanel:i,prioritizePatterns:a})}render(){const{position:e,hasSingleBlockType:t,directInsertBlock:n,insertOnlyAllowedBlock:r,__experimentalIsQuick:o,onSelectOrClose:i}=this.props;return t||n?this.renderToggle({onToggle:r}):(0,v.createElement)(j_.Z,{className:"block-editor-inserter",contentClassName:w()("block-editor-inserter__popover",{"is-quick":o}),popoverProps:{position:e},onToggle:this.onToggle,expandOnMobile:!0,headerTitle:(0,N.__)("Add a block"),renderToggle:this.renderToggle,renderContent:this.renderContent,onClose:i})}}var rE=(0,eg.Z)([(0,Jh.Z)(((e,t)=>{var n;let{clientId:r,rootClientId:o,shouldDirectInsert:i=!0}=t;const{getBlockRootClientId:l,hasInserterItems:a,getAllowedBlocks:s,__experimentalGetDirectInsertBlock:c,getSettings:u}=e(ku),{getBlockVariations:d}=e(Xt);o=o||l(r)||void 0;const p=s(o),m=i&&c(o),f=u(),h=1===(null==p?void 0:p.length)&&0===(null===(n=d(p[0].name,"inserter"))||void 0===n?void 0:n.length);let g=!1;return h&&(g=p[0]),{hasItems:a(o),hasSingleBlockType:h,blockTitle:g?g.title:"",allowedBlockType:g,directInsertBlock:m,rootClientId:o,prioritizePatterns:f.__experimentalPreferPatternsOnRoot&&!o}})),(0,Qh.Z)(((e,t,n)=>{let{select:r}=n;return{insertOnlyAllowedBlock(){const{rootClientId:n,clientId:o,isAppender:i,hasSingleBlockType:l,allowedBlockType:a,directInsertBlock:s,onSelectOrClose:c,selectBlockOnInsert:u}=t;if(!l&&!s)return;const{insertBlock:d}=e(ku);let p;if(s){const e=function(e){const{getBlock:t,getPreviousBlockClientId:i}=r(ku);if(!e||!o&&!n)return{};const l={};let a={};if(o){const e=t(o),n=t(i(o));(null==e?void 0:e.name)===(null==n?void 0:n.name)&&(a=(null==n?void 0:n.attributes)||{})}else{var c;const e=t(n);if(null!=e&&null!==(c=e.innerBlocks)&&void 0!==c&&c.length){const t=e.innerBlocks[e.innerBlocks.length-1];s&&(null==s?void 0:s.name)===t.name&&(a=t.attributes)}}return e.forEach((e=>{a.hasOwnProperty(e)&&(l[e]=a[e])})),l}(s.attributesToCopy);p=ke(s.name,{...s.attributes||{},...e})}else p=ke(a.name);var m;d(p,function(){const{getBlockIndex:e,getBlockSelectionEnd:t,getBlockOrder:l,getBlockRootClientId:a}=r(ku);if(o)return e(o);const s=t();return!i&&s&&a(s)===n?e(s)+1:l(n).length}(),n,u),c&&c({clientId:null===(m=p)||void 0===m?void 0:m.clientId});const f=(0,N.sprintf)((0,N.__)("%s block added"),a.title);(0,fl.D)(f)}}})),ng((e=>{let{hasItems:t,isAppender:n,rootClientId:r,clientId:o}=e;return t||!n&&!r&&!o}))])(nE),oE=(0,eg.Z)((0,Jh.Z)(((e,t)=>{const{getBlockCount:n,getSettings:r,getTemplateLock:o}=e(ku),i=!n(t.rootClientId),{bodyPlaceholder:l}=r();return{showPrompt:i,isLocked:!!o(t.rootClientId),placeholder:l}})),(0,Qh.Z)(((e,t)=>{const{insertDefaultBlock:n,startTyping:r}=e(ku);return{onAppend(){const{rootClientId:e}=t;n(void 0,e),r()}}})))((function(e){let{isLocked:t,onAppend:n,showPrompt:r,placeholder:o,rootClientId:i}=e;if(t)return null;const l=(0,Dn.decodeEntities)(o)||(0,N.__)("Type / to choose a block");return(0,v.createElement)("div",{"data-root-client-id":i||"",className:w()("block-editor-default-block-appender",{"has-visible-prompt":r})},(0,v.createElement)("p",{tabIndex:"0",role:"button","aria-label":(0,N.__)("Add default block"),className:"block-editor-default-block-appender__content",onKeyDown:e=>{Al.ENTER!==e.keyCode&&Al.SPACE!==e.keyCode||n()},onClick:()=>n(),onFocus:()=>{r&&n()}},r?l:"\ufeff"),(0,v.createElement)(rE,{rootClientId:i,position:"bottom right",isAppender:!0,__experimentalIsQuick:!0}))}));function iE(e,t){let{rootClientId:n,className:r,onFocus:o,tabIndex:i}=e;return(0,v.createElement)(rE,{position:"bottom center",rootClientId:n,__experimentalIsQuick:!0,renderToggle:e=>{let n,{onToggle:l,disabled:a,isOpen:s,blockTitle:c,hasSingleBlockType:u}=e;n=u?(0,N.sprintf)((0,N._x)("Add %s","directly add the only allowed block"),c):(0,N._x)("Add block","Generic label for block inserter button");const d=!u;let p=(0,v.createElement)(Mo.ZP,{ref:t,onFocus:o,tabIndex:i,className:w()(r,"block-editor-button-block-appender"),onClick:l,"aria-haspopup":d?"true":void 0,"aria-expanded":d?s:void 0,disabled:a,label:n},!u&&(0,v.createElement)(z_.Z,{as:"span"},n),(0,v.createElement)(Vm.Z,{icon:rm.Z}));return(d||u)&&(p=(0,v.createElement)(Ld.Z,{text:n},p)),p},isAppender:!0})}(0,v.forwardRef)(((e,t)=>((0,St.default)("wp.blockEditor.ButtonBlockerAppender",{alternative:"wp.blockEditor.ButtonBlockAppender",since:"5.9"}),iE(e,t))));var lE=(0,v.forwardRef)(iE);function aE(e){let{rootClientId:t}=e;return(0,E.Z)((e=>e(ku).canInsertBlockType(de(),t)))?(0,v.createElement)(oE,{rootClientId:t}):(0,v.createElement)(lE,{rootClientId:t,className:"block-list-appender__toggle"})}var sE=function(e){let{rootClientId:t,renderAppender:n,className:r,tagName:o="div"}=e;const i=function(e,t){const{hideInserter:n,isParentSelected:r}=(0,E.Z)((t=>{const{getTemplateLock:n,getSelectedBlockClientId:r,__unstableGetEditorMode:o}=t(ku),i=r();return{hideInserter:!!n(e)||"zoom-out"===o(),isParentSelected:e===i||!e&&!i}}),[e]);return n||!1===t?null:t?(0,v.createElement)(t,null):r?(0,v.createElement)(aE,{rootClientId:e}):null}(t,n);return i?(0,v.createElement)(o,{tabIndex:-1,className:w()("block-list-appender wp-block",r),contentEditable:!1,"data-block":!0},i):null},cE=function(e){return(0,bl.Z)((t=>{if(!e)return;function n(t){const{deltaX:n,deltaY:r}=t;e.current.scrollBy(n,r)}const r={passive:!0};return t.addEventListener("wheel",n,r),()=>{t.removeEventListener("wheel",n,r)}}),[e])};const uE=Number.MAX_SAFE_INTEGER;(0,v.createContext)();var dE=function(e){let{previousClientId:t,nextClientId:n,children:r,__unstablePopoverSlot:o,__unstableContentRef:i,...l}=e;const[a,s]=(0,v.useReducer)((e=>(e+1)%uE),0),{orientation:c,rootClientId:u,isVisible:d}=(0,E.Z)((e=>{var r;const{getBlockListSettings:o,getBlockRootClientId:i,isBlockVisible:l}=e(ku),a=i(null!=t?t:n);return{orientation:(null===(r=o(a))||void 0===r?void 0:r.orientation)||"vertical",rootClientId:a,isVisible:l(t)&&l(n)}}),[t,n]),p=L_(t),m=L_(n),f="vertical"===c,h=(0,v.useMemo)((()=>{if(a<0||!p&&!m||!d)return;const{ownerDocument:e}=p||m;return{ownerDocument:e,getBoundingClientRect(){const e=p?p.getBoundingClientRect():null,t=m?m.getBoundingClientRect():null;let n=0,r=0,o=0,i=0;return f?(r=e?e.bottom:t.top,o=e?e.width:t.width,i=t&&e?t.top-e.bottom:0,n=(0,N.isRTL)()?e?e.right:t.right:e?e.left:t.left):(r=e?e.top:t.top,i=e?e.height:t.height,(0,N.isRTL)()?(n=e?e.left:t.right,o=e&&t?e.left-t.right:0):(n=e?e.right:t.left,o=e&&t?t.left-e.right:0)),new window.DOMRect(n,r,o,i)}}}),[p,m,a,f,d]),g=cE(i);return(0,v.useLayoutEffect)((()=>{if(!p)return;const e=new window.MutationObserver(s);return e.observe(p,{attributes:!0}),()=>{e.disconnect()}}),[p]),(0,v.useLayoutEffect)((()=>{if(!m)return;const e=new window.MutationObserver(s);return e.observe(m,{attributes:!0}),()=>{e.disconnect()}}),[m]),(0,v.useLayoutEffect)((()=>{if(p)return p.ownerDocument.defaultView.addEventListener("resize",s),()=>{var e;null===(e=p.ownerDocument.defaultView)||void 0===e||e.removeEventListener("resize",s)}}),[p]),(p||m)&&d?(0,v.createElement)(T.Z,(0,Po.Z)({ref:g,animate:!1,anchor:h,focusOnMount:!1,__unstableSlotName:o||null,key:n+"--"+u},l,{className:w()("block-editor-block-popover","block-editor-block-popover__inbetween",l.className),resize:!1,flip:!1,placement:"overlay",variant:"unstyled"}),(0,v.createElement)("div",{className:"block-editor-block-popover__inbetween-container"},r)):null};const pE=Number.MAX_SAFE_INTEGER;var mE=(0,v.forwardRef)((function(e,t){let{clientId:n,bottomClientId:r,children:o,__unstableRefreshSize:i,__unstableCoverTarget:l=!1,__unstablePopoverSlot:a,__unstableContentRef:s,shift:c=!0,...u}=e;const d=L_(n),p=L_(null!=r?r:n),m=(0,vl.Z)([t,cE(s)]),[f,h]=(0,v.useReducer)((e=>(e+1)%pE),0);(0,v.useLayoutEffect)((()=>{if(!d)return;const e=new window.MutationObserver(h);return e.observe(d,{attributes:!0}),()=>{e.disconnect()}}),[d]);const g=(0,v.useMemo)((()=>f<0||!d||p!==d?{}:{position:"absolute",width:d.offsetWidth,height:d.offsetHeight}),[d,p,i,f]),b=(0,v.useMemo)((()=>{if(!(f<0||!d||r&&!p))return{getBoundingClientRect(){var e,t,n,r;const o=d.getBoundingClientRect(),i=null==p?void 0:p.getBoundingClientRect(),l=Math.min(o.left,null!==(e=null==i?void 0:i.left)&&void 0!==e?e:1/0),a=Math.min(o.top,null!==(t=null==i?void 0:i.top)&&void 0!==t?t:1/0),s=Math.max(o.right,null!==(n=i.right)&&void 0!==n?n:-1/0)-l,c=Math.max(o.bottom,null!==(r=i.bottom)&&void 0!==r?r:-1/0)-a;return new window.DOMRect(l,a,s,c)},ownerDocument:d.ownerDocument}}),[r,p,d,f]);return!d||r&&!p?null:(0,v.createElement)(T.Z,(0,Po.Z)({ref:m,animate:!1,focusOnMount:!1,anchor:b,__unstableSlotName:a||null,placement:"top-start",resize:!1,flip:!1,shift:c},u,{className:w()("block-editor-block-popover",u.className),variant:"unstyled"}),l&&(0,v.createElement)("div",{style:g},o),!l&&o)}));const fE={hide:{opacity:0,scaleY:.75},show:{opacity:1,scaleY:1},exit:{opacity:0,scaleY:.9}};var hE=function(e){let{__unstablePopoverSlot:t,__unstableContentRef:n}=e;const{clientId:r}=(0,E.Z)((e=>{const{getBlockOrder:t,getBlockInsertionPoint:n}=e(ku),r=n(),o=t(r.rootClientId);return o.length?{clientId:o[r.index]}:{}}),[]),o=(0,r_.Z)();return(0,v.createElement)(mE,{clientId:r,__unstableCoverTarget:!0,__unstablePopoverSlot:t,__unstableContentRef:n,className:"block-editor-block-popover__drop-zone"},(0,v.createElement)(sC.E.div,{"data-testid":"block-popover-drop-zone",initial:o?fE.show:fE.hide,animate:fE.show,exit:o?fE.show:fE.exit,className:"block-editor-block-popover__drop-zone-foreground"}))};const gE=(0,v.createContext)();function vE(e){let{__unstablePopoverSlot:t,__unstableContentRef:n}=e;const{selectBlock:r,hideInsertionPoint:o}=(0,S.Z)(ku),i=(0,v.useContext)(gE),l=(0,v.useRef)(),{orientation:a,previousClientId:s,nextClientId:c,rootClientId:u,isInserterShown:d,isDistractionFree:p,isNavigationMode:m}=(0,E.Z)((e=>{var t;const{getBlockOrder:n,getBlockListSettings:r,getBlockInsertionPoint:o,isBlockBeingDragged:i,getPreviousBlockClientId:l,getNextBlockClientId:a,getSettings:s,isNavigationMode:c}=e(ku),u=o(),d=n(u.rootClientId);if(!d.length)return{};let p=d[u.index-1],m=d[u.index];for(;i(p);)p=l(p);for(;i(m);)m=a(m);const f=s();return{previousClientId:p,nextClientId:m,orientation:(null===(t=r(u.rootClientId))||void 0===t?void 0:t.orientation)||"vertical",rootClientId:u.rootClientId,isNavigationMode:c(),isDistractionFree:f.isDistractionFree,isInserterShown:null==u?void 0:u.__unstableWithInserter}}),[]),f=(0,r_.Z)(),h={start:{opacity:0,scale:0},rest:{opacity:1,scale:1,transition:{delay:d?.5:0,type:"tween"}},hover:{opacity:1,scale:1,transition:{delay:.5,type:"tween"}}},g={start:{scale:f?1:0},rest:{scale:1,transition:{delay:.4,type:"tween"}}};if(p&&!m)return null;const b=w()("block-editor-block-list__insertion-point","is-"+a);return(0,v.createElement)(dE,{previousClientId:s,nextClientId:c,__unstablePopoverSlot:t,__unstableContentRef:n},(0,v.createElement)(sC.E.div,{layout:!f,initial:f?"rest":"start",animate:"rest",whileHover:"hover",whileTap:"pressed",exit:"start",ref:l,tabIndex:-1,onClick:function(e){e.target===l.current&&c&&r(c,-1)},onFocus:function(e){e.target!==l.current&&(i.current=!0)},className:w()(b,{"is-with-inserter":d}),onHoverEnd:function(e){e.target!==l.current||i.current||o()}},(0,v.createElement)(sC.E.div,{variants:h,className:"block-editor-block-list__insertion-point-indicator","data-testid":"block-list-insertion-point-indicator"}),d&&(0,v.createElement)(sC.E.div,{variants:g,className:w()("block-editor-block-list__insertion-point-inserter")},(0,v.createElement)(rE,{position:"bottom center",clientId:c,rootClientId:u,__experimentalIsQuick:!0,onToggle:e=>{i.current=e},onSelectOrClose:()=>{i.current=!1}}))))}function bE(e){const{insertionPoint:t,isVisible:n}=(0,E.Z)((e=>{const{getBlockInsertionPoint:t,isBlockInsertionPointVisible:n}=e(ku);return{insertionPoint:t(),isVisible:n()}}),[]);return n?"replace"===t.operation?(0,v.createElement)(hE,(0,Po.Z)({key:`${t.rootClientId}-${t.index}`},e)):(0,v.createElement)(vE,e):null}function yE(){const e=(0,v.useContext)(gE),t=(0,E.Z)((e=>e(ku).getSettings().isDistractionFree||"zoom-out"===e(ku).__unstableGetEditorMode()),[]),{getBlockListSettings:n,getBlockRootClientId:r,getBlockIndex:o,isBlockInsertionPointVisible:i,isMultiSelecting:l,getSelectedBlockClientIds:a,getTemplateLock:s,__unstableIsWithinBlockOverlay:c}=(0,E.Z)(ku),{showInsertionPoint:u,hideInsertionPoint:d}=(0,S.Z)(ku);return(0,bl.Z)((r=>{if(!t)return r.addEventListener("mousemove",i),()=>{r.removeEventListener("mousemove",i)};function i(t){var r;if(e.current)return;if(t.target.nodeType===t.target.TEXT_NODE)return;if(l())return;if(!t.target.classList.contains("block-editor-block-list__layout"))return void d();let i;if(t.target.classList.contains("is-root-container")||(i=(t.target.getAttribute("data-block")?t.target:t.target.closest("[data-block]")).getAttribute("data-block")),s(i))return;const p=(null===(r=n(i))||void 0===r?void 0:r.orientation)||"vertical",m=t.clientY,f=t.clientX;let h=Array.from(t.target.children).find((e=>{const t=e.getBoundingClientRect();return e.classList.contains("wp-block")&&"vertical"===p&&t.top>m||e.classList.contains("wp-block")&&"horizontal"===p&&t.left>f}));if(!h)return void d();if(!h.id&&(h=h.firstElementChild,!h))return void d();const g=h.id.slice("block-".length);if(!g||c(g))return;if(a().includes(g))return;const v=h.getBoundingClientRect();if("horizontal"===p&&(t.clientY>v.bottom||t.clientY<v.top)||"vertical"===p&&(t.clientX>v.right||t.clientX<v.left))return void d();const b=o(g);0!==b?u(i,b,{__unstableWithInserter:!0}):d()}}),[e,n,r,o,i,l,u,d,a,t])}const _E="undefined"==typeof window?e=>{setTimeout((()=>e(Date.now())),0)}:window.requestIdleCallback||window.requestAnimationFrame,kE="undefined"==typeof window?clearTimeout:window.cancelIdleCallback||window.cancelAnimationFrame;function xE(e){return(0,E.Z)((t=>{if(!e)return null;const{getBlockName:n,getBlockAttributes:r}=t(ku),{getBlockType:o,getActiveBlockVariation:i}=t(Xt),l=n(e),a=o(l);if(!a)return null;const s=r(e),c=i(l,s),u=ge(a)||ve(a),d={isSynced:u,title:a.title,icon:a.icon,description:a.description,anchor:null==s?void 0:s.anchor};return c?{isSynced:u,title:c.title||a.title,icon:c.icon||a.icon,description:c.description||a.description,anchor:null==s?void 0:s.anchor}:d}),[e])}function wE(e){let{clientId:t,maximumLength:n,context:r}=e;const{attributes:o,name:i,reusableBlockTitle:l}=(0,E.Z)((e=>{if(!t)return{};const{getBlockName:n,getBlockAttributes:r,__experimentalGetReusableBlockTitle:o}=e(ku),i=n(t);if(!i)return{};const l=ge(pe(i));return{attributes:r(t),name:i,reusableBlockTitle:l&&o(r(t).ref)}}),[t]),a=xE(t);if(!i||!a)return null;const s=pe(i),c=s?Fe(s,o,r):null,u=l||c,d=u&&u!==s.title?u:a.title;if(n&&n>0&&d.length>n){const e="...";return d.slice(0,n-e.length)+e}return d}function CE(e){let{clientId:t,maximumLength:n,context:r}=e;return wE({clientId:t,maximumLength:n,context:r})}var EE=e=>{let{children:t,clientIds:n,cloneClassname:r,onDragStart:o,onDragEnd:i}=e;const{srcRootClientId:l,isDraggable:a,icon:s}=(0,E.Z)((e=>{var t;const{canMoveBlocks:r,getBlockRootClientId:o,getBlockName:i}=e(ku),l=o(n[0]),a=i(n[0]);return{srcRootClientId:l,isDraggable:r(n,l),icon:null===(t=pe(a))||void 0===t?void 0:t.icon}}),[n]),c=(0,v.useRef)(!1),[u,d,p]=function(){const e=(0,v.useRef)(null),t=(0,v.useRef)(null),n=(0,v.useRef)(null),r=(0,v.useRef)(null);return(0,v.useEffect)((()=>()=>{r.current&&(clearInterval(r.current),r.current=null)}),[]),[(0,v.useCallback)((o=>{e.current=o.clientY,n.current=(0,o_.Z)(o.target),r.current=setInterval((()=>{if(n.current&&t.current){const e=n.current.scrollTop+t.current;n.current.scroll({top:e})}}),25)}),[]),(0,v.useCallback)((r=>{if(!n.current)return;const o=n.current.offsetHeight,i=e.current-n.current.offsetTop,l=r.clientY-n.current.offsetTop;if(r.clientY>i){const e=Math.max(o-i-50,0),n=Math.max(l-i-50,0)/e;t.current=25*n}else if(r.clientY<i){const e=Math.max(i-50,0),n=Math.max(i-l-50,0)/e;t.current=-25*n}else t.current=0}),[]),()=>{e.current=null,n.current=null,r.current&&(clearInterval(r.current),r.current=null)}]}(),{startDraggingBlocks:m,stopDraggingBlocks:f}=(0,S.Z)(ku);if((0,v.useEffect)((()=>()=>{c.current&&f()}),[]),!a)return t({draggable:!1});const h={type:"block",srcClientIds:n,srcRootClientId:l};return(0,v.createElement)(Zx,{cloneClassname:r,__experimentalTransferDataType:"wp-blocks",transferData:h,onDragStart:e=>{m(n),c.current=!0,u(e),o&&o()},onDragOver:d,onDragEnd:()=>{f(),c.current=!1,p(),i&&i()},__experimentalDragComponent:(0,v.createElement)(jx,{count:n.length,icon:s})},(e=>{let{onDraggableStart:n,onDraggableEnd:r}=e;return t({draggable:!0,onDragStart:n,onDragEnd:r})}))},SE=n(33535),IE=n(96328);const TE=(e,t)=>"up"===e?"horizontal"===t?(0,N.isRTL)()?"right":"left":"up":"down"===e?"horizontal"===t?(0,N.isRTL)()?"left":"right":"down":null;const NE=(e,t)=>"up"===e?"horizontal"===t?(0,N.isRTL)()?rk.Z:ok.Z:SE.Z:"down"===e?"horizontal"===t?(0,N.isRTL)()?ok.Z:rk.Z:IE.Z:null,BE=(e,t)=>"up"===e?"horizontal"===t?(0,N.isRTL)()?(0,N.__)("Move right"):(0,N.__)("Move left"):(0,N.__)("Move up"):"down"===e?"horizontal"===t?(0,N.isRTL)()?(0,N.__)("Move left"):(0,N.__)("Move right"):(0,N.__)("Move down"):null,LE=(0,v.forwardRef)(((e,t)=>{let{clientIds:n,direction:r,orientation:o,...i}=e;const l=(0,dd.Z)(LE),a=Array.isArray(n)?n:[n],s=a.length,{blockType:c,isDisabled:u,rootClientId:d,isFirst:p,isLast:m,firstIndex:f,orientation:h="vertical"}=(0,E.Z)((e=>{const{getBlockIndex:t,getBlockRootClientId:n,getBlockOrder:i,getBlock:l,getBlockListSettings:s}=e(ku),c=a[0],u=n(c),d=t(c),p=t(a[a.length-1]),m=i(u),f=l(c),h=0===d,g=p===m.length-1,{orientation:v}=s(u)||{};return{blockType:f?pe(f.name):null,isDisabled:"up"===r?h:g,rootClientId:u,firstIndex:d,isFirst:h,isLast:g,orientation:o||v}}),[n,r]),{moveBlocksDown:g,moveBlocksUp:b}=(0,S.Z)(ku),y="up"===r?b:g,_=`block-editor-block-mover-button__description-${l}`;return(0,v.createElement)(v.Fragment,null,(0,v.createElement)(Mo.ZP,(0,Po.Z)({ref:t,className:w()("block-editor-block-mover-button",`is-${r}-button`),icon:NE(r,h),label:BE(r,h),"aria-describedby":_},i,{onClick:u?null:e=>{y(n,d),i.onClick&&i.onClick(e)},disabled:u,__experimentalIsFocusable:!0})),(0,v.createElement)(z_.Z,{id:_},function(e,t,n,r,o,i,l){const a=n+1;if(e>1)return function(e,t,n,r,o,i){const l=t+1;if(n&&r)return(0,N.__)("All blocks are selected, and cannot be moved");if(o>0&&!r){const t=TE("down",i);if("down"===t)return(0,N.sprintf)((0,N.__)("Move %1$d blocks from position %2$d down by one place"),e,l);if("left"===t)return(0,N.sprintf)((0,N.__)("Move %1$d blocks from position %2$d left by one place"),e,l);if("right"===t)return(0,N.sprintf)((0,N.__)("Move %1$d blocks from position %2$d right by one place"),e,l)}if(o>0&&r){const e=TE("down",i);if("down"===e)return(0,N.__)("Blocks cannot be moved down as they are already at the bottom");if("left"===e)return(0,N.__)("Blocks cannot be moved left as they are already are at the leftmost position");if("right"===e)return(0,N.__)("Blocks cannot be moved right as they are already are at the rightmost position")}if(o<0&&!n){const t=TE("up",i);if("up"===t)return(0,N.sprintf)((0,N.__)("Move %1$d blocks from position %2$d up by one place"),e,l);if("left"===t)return(0,N.sprintf)((0,N.__)("Move %1$d blocks from position %2$d left by one place"),e,l);if("right"===t)return(0,N.sprintf)((0,N.__)("Move %1$d blocks from position %2$d right by one place"),e,l)}if(o<0&&n){const e=TE("up",i);if("up"===e)return(0,N.__)("Blocks cannot be moved up as they are already at the top");if("left"===e)return(0,N.__)("Blocks cannot be moved left as they are already are at the leftmost position");if("right"===e)return(0,N.__)("Blocks cannot be moved right as they are already are at the rightmost position")}}(e,n,r,o,i,l);if(r&&o)return(0,N.sprintf)((0,N.__)("Block %s is the only block, and cannot be moved"),t);if(i>0&&!o){const e=TE("down",l);if("down"===e)return(0,N.sprintf)((0,N.__)("Move %1$s block from position %2$d down to position %3$d"),t,a,a+1);if("left"===e)return(0,N.sprintf)((0,N.__)("Move %1$s block from position %2$d left to position %3$d"),t,a,a+1);if("right"===e)return(0,N.sprintf)((0,N.__)("Move %1$s block from position %2$d right to position %3$d"),t,a,a+1)}if(i>0&&o){const e=TE("down",l);if("down"===e)return(0,N.sprintf)((0,N.__)("Block %1$s is at the end of the content and can’t be moved down"),t);if("left"===e)return(0,N.sprintf)((0,N.__)("Block %1$s is at the end of the content and can’t be moved left"),t);if("right"===e)return(0,N.sprintf)((0,N.__)("Block %1$s is at the end of the content and can’t be moved right"),t)}if(i<0&&!r){const e=TE("up",l);if("up"===e)return(0,N.sprintf)((0,N.__)("Move %1$s block from position %2$d up to position %3$d"),t,a,a-1);if("left"===e)return(0,N.sprintf)((0,N.__)("Move %1$s block from position %2$d left to position %3$d"),t,a,a-1);if("right"===e)return(0,N.sprintf)((0,N.__)("Move %1$s block from position %2$d right to position %3$d"),t,a,a-1)}if(i<0&&r){const e=TE("up",l);if("up"===e)return(0,N.sprintf)((0,N.__)("Block %1$s is at the beginning of the content and can’t be moved up"),t);if("left"===e)return(0,N.sprintf)((0,N.__)("Block %1$s is at the beginning of the content and can’t be moved left"),t);if("right"===e)return(0,N.sprintf)((0,N.__)("Block %1$s is at the beginning of the content and can’t be moved right"),t)}}(s,c&&c.title,f,p,m,"up"===r?-1:1,h)))})),PE=(0,v.forwardRef)(((e,t)=>(0,v.createElement)(LE,(0,Po.Z)({direction:"up",ref:t},e)))),AE=(0,v.forwardRef)(((e,t)=>(0,v.createElement)(LE,(0,Po.Z)({direction:"down",ref:t},e))));var DE=function(e){let{clientIds:t,hideDragHandle:n}=e;const{canMove:r,rootClientId:o,isFirst:i,isLast:l,orientation:a}=(0,E.Z)((e=>{var n;const{getBlockIndex:r,getBlockListSettings:o,canMoveBlocks:i,getBlockOrder:l,getBlockRootClientId:a}=e(ku),s=Array.isArray(t)?t:[t],c=s[0],u=a(c),d=r(c),p=r(s[s.length-1]),m=l(u);return{canMove:i(t,u),rootClientId:u,isFirst:0===d,isLast:p===m.length-1,orientation:null===(n=o(u))||void 0===n?void 0:n.orientation}}),[t]);if(!r||i&&l&&!o)return null;const s=(0,N.__)("Drag");return(0,v.createElement)(Vo,{className:w()("block-editor-block-mover",{"is-horizontal":"horizontal"===a})},!n&&(0,v.createElement)(EE,{clientIds:t},(e=>(0,v.createElement)(Mo.ZP,(0,Po.Z)({icon:Fx.Z,className:"block-editor-block-mover__drag-handle","aria-hidden":"true",label:s,tabIndex:"-1"},e)))),(0,v.createElement)("div",{className:"block-editor-block-mover__move-button-container"},(0,v.createElement)(Oo.Z,null,(e=>(0,v.createElement)(PE,(0,Po.Z)({clientIds:t},e)))),(0,v.createElement)(Oo.Z,null,(e=>(0,v.createElement)(AE,(0,Po.Z)({clientIds:t},e))))))},RE=function(e){let{clientId:t,rootClientId:n}=e;const r=xE(t),o=(0,E.Z)((e=>{var r;const{getBlock:o,getBlockIndex:i,hasBlockMovingClientId:l,getBlockListSettings:a,__unstableGetEditorMode:s}=e(ku),c=i(t),{name:u,attributes:d}=o(t);return{index:c,name:u,attributes:d,blockMovingMode:l(),orientation:null===(r=a(n))||void 0===r?void 0:r.orientation,editorMode:s()}}),[t,n]),{index:i,name:l,attributes:a,blockMovingMode:s,orientation:c,editorMode:u}=o,{setNavigationMode:d,removeBlock:p}=(0,S.Z)(ku),m=(0,v.useRef)(),f=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"vertical";const o=null==e?void 0:e.title,i=e?Fe(e,t,"accessibility"):"",l=void 0!==n,a=i&&i!==o;return l&&"vertical"===r?a?(0,N.sprintf)((0,N.__)("%1$s Block. Row %2$d. %3$s"),o,n,i):(0,N.sprintf)((0,N.__)("%1$s Block. Row %2$d"),o,n):l&&"horizontal"===r?a?(0,N.sprintf)((0,N.__)("%1$s Block. Column %2$d. %3$s"),o,n,i):(0,N.sprintf)((0,N.__)("%1$s Block. Column %2$d"),o,n):a?(0,N.sprintf)((0,N.__)("%1$s Block. %2$s"),o,i):(0,N.sprintf)((0,N.__)("%s Block"),o)}(pe(l),a,i+1,c);(0,v.useEffect)((()=>{m.current.focus(),(0,fl.D)(f)}),[f]);const h=L_(t),{hasBlockMovingClientId:g,getBlockIndex:b,getBlockRootClientId:y,getClientIdsOfDescendants:_,getSelectedBlockClientId:k,getMultiSelectedBlocksEndClientId:x,getPreviousBlockClientId:C,getNextBlockClientId:I}=(0,E.Z)(ku),{selectBlock:T,clearSelectedBlock:B,setBlockMovingClientId:L,moveBlockToPosition:P}=(0,S.Z)(ku),A=w()("block-editor-block-list__block-selection-button",{"is-block-moving-mode":!!s}),D=(0,N.__)("Drag");return(0,v.createElement)("div",{className:A},(0,v.createElement)(Uu.Z,{justify:"center",className:"block-editor-block-list__block-selection-button__content"},(0,v.createElement)(Gu.Z,null,(0,v.createElement)(lk,{icon:null==r?void 0:r.icon,showColors:!0})),(0,v.createElement)(Gu.Z,null,"zoom-out"===u&&(0,v.createElement)(DE,{clientIds:[t],hideDragHandle:!0}),"navigation"===u&&(0,v.createElement)(EE,{clientIds:[t]},(e=>(0,v.createElement)(Mo.ZP,(0,Po.Z)({icon:Fx.Z,className:"block-selection-button_drag-handle","aria-hidden":"true",label:D,tabIndex:"-1"},e))))),(0,v.createElement)(Gu.Z,null,(0,v.createElement)(Mo.ZP,{ref:m,onClick:"navigation"===u?()=>d(!1):void 0,onKeyDown:function(e){const{keyCode:n}=e,r=n===Al.UP,o=n===Al.DOWN,i=n===Al.LEFT,l=n===Al.RIGHT,a=n===Al.TAB,s=n===Al.ESCAPE,c=n===Al.ENTER,u=n===Al.SPACE,d=e.shiftKey;if(n===Al.BACKSPACE||n===Al.DELETE)return p(t),void e.preventDefault();const m=k(),f=x(),v=C(f||m),w=I(f||m),E=a&&d||r,S=a&&!d||o,N=i,A=l;let D;if(E)D=v;else if(S)D=w;else if(N){var R;D=null!==(R=y(m))&&void 0!==R?R:m}else if(A){var M;D=null!==(M=_([m])[0])&&void 0!==M?M:m}const O=g();if(s&&O&&!e.defaultPrevented&&(L(null),e.preventDefault()),(c||u)&&O){const e=y(O),t=y(m),n=b(O);let r=b(m);n<r&&e===t&&(r-=1),P(O,e,t,r),T(O),L(null)}if(S||E||N||A)if(D)e.preventDefault(),T(D);else if(a&&m){let t;if(S){t=h;do{t=s_.focus.tabbable.findNext(t)}while(t&&h.contains(t));t||(t=h.ownerDocument.defaultView.frameElement,t=s_.focus.tabbable.findNext(t))}else t=s_.focus.tabbable.findPrevious(h);t&&(e.preventDefault(),t.focus(),B())}},label:f,showTooltip:!1,className:"block-selection-button_select-button"},(0,v.createElement)(CE,{clientId:t,maximumLength:35})))))},ME=n(2164),OE=n(72652);const ZE=(0,v.forwardRef)((function(e,t){let{label:n,...r}=e;const o=(0,ME.U)({loop:!0,baseId:r.id,rtl:(0,N.isRTL)()});return(0,v.createElement)(Ro.Z.Provider,{value:o},(0,v.createElement)(OE.o,(0,Po.Z)({ref:t,"aria-label":n},o,r)))}));var FE=ZE;const jE=(0,v.forwardRef)((function(e,t){let{className:n,label:r,...o}=e;if(!r)return(0,St.default)("Using Toolbar without label prop",{since:"5.6",alternative:"ToolbarGroup component",link:"https://developer.wordpress.org/block-editor/components/toolbar/"}),(0,v.createElement)(Vo,(0,Po.Z)({},o,{className:n}));const i=w()("components-accessible-toolbar",n);return(0,v.createElement)(FE,(0,Po.Z)({className:i,label:r,ref:t},o))}));var zE=jE,HE=n(38721);function VE(e){return Array.from(e.querySelectorAll("[data-toolbar-item]"))}var WE=function(e){let{children:t,focusOnMount:n,__experimentalInitialIndex:r,__experimentalOnIndexChange:o,...i}=e;const l=(0,v.useRef)(),a=function(e){const[t,n]=(0,v.useState)(!0),r=(0,v.useCallback)((()=>{const t=!s_.focus.tabbable.find(e.current).some((e=>!("toolbarItem"in e.dataset)));t||(0,St.default)("Using custom components as toolbar controls",{since:"5.6",alternative:"ToolbarItem, ToolbarButton or ToolbarDropdownMenu components",link:"https://developer.wordpress.org/block-editor/components/toolbar-button/#inside-blockcontrols"}),n(t)}),[]);return(0,v.useLayoutEffect)((()=>{const t=new window.MutationObserver(r);return t.observe(e.current,{childList:!0,subtree:!0}),()=>t.disconnect()}),[t]),t}(l);return function(e,t,n,r,o){const[i]=(0,v.useState)(t),[l]=(0,v.useState)(r),a=(0,v.useCallback)((()=>{!function(e){const[t]=s_.focus.tabbable.find(e);t&&t.focus({preventScroll:!0})}(e.current)}),[]);(0,Dk.bx)("core/block-editor/focus-toolbar",a),(0,v.useEffect)((()=>{i&&a()}),[n,i,a]),(0,v.useEffect)((()=>{let t=0;return l&&!i&&(t=window.requestAnimationFrame((()=>{const t=VE(e.current),n=l||0;var r;t[n]&&(r=e.current).contains(r.ownerDocument.activeElement)&&t[n].focus({preventScroll:!0})}))),()=>{if(window.cancelAnimationFrame(t),!o||!e.current)return;const n=VE(e.current).findIndex((e=>0===e.tabIndex));o(n)}}),[l,i])}(l,n,a,r,o),a?(0,v.createElement)(zE,(0,Po.Z)({label:i["aria-label"],ref:l},i),t):(0,v.createElement)(HE.Z,(0,Po.Z)({orientation:"horizontal",role:"toolbar",ref:l},i),t)};const{clearTimeout:$E,setTimeout:UE}=window,GE=()=>{},qE=200;function KE(e){let{ref:t,isFocused:n,debounceTimeout:r=qE,onChange:o=GE}=e;const[i,l]=(0,v.useState)(!1),a=(0,v.useRef)(),s=e=>{null!=t&&t.current&&l(e),o(e)},c=()=>{const e=a.current;e&&$E&&$E(e)};return(0,v.useEffect)((()=>()=>{s(!1),c()}),[]),{showMovers:i,debouncedShowMovers:e=>{e&&e.stopPropagation(),c(),i||s(!0)},debouncedHideMovers:e=>{e&&e.stopPropagation(),c(),a.current=UE((()=>{(()=>{const e=(null==t?void 0:t.current)&&t.current.matches(":hover");return!n&&!e})()&&s(!1)}),r)}}}function YE(e){let{ref:t,debounceTimeout:n=qE,onChange:r=GE}=e;const[o,i]=(0,v.useState)(!1),{showMovers:l,debouncedShowMovers:a,debouncedHideMovers:s}=KE({ref:t,debounceTimeout:n,isFocused:o,onChange:r}),c=(0,v.useRef)(!1),u=()=>(null==t?void 0:t.current)&&t.current.contains(t.current.ownerDocument.activeElement);return(0,v.useEffect)((()=>{const e=t.current,n=()=>{u()&&(i(!0),a())},r=()=>{u()||(i(!1),s())};return e&&!c.current&&(e.addEventListener("focus",n,!0),e.addEventListener("blur",r,!0),c.current=!0),()=>{e&&(e.removeEventListener("focus",n),e.removeEventListener("blur",r))}}),[t,c,i,a,s]),{showMovers:l,gestures:{onMouseMove:a,onMouseLeave:s}}}function XE(){const{selectBlock:e,toggleBlockHighlight:t}=(0,S.Z)(ku),{firstParentClientId:n,shouldHide:r,isDistractionFree:o}=(0,E.Z)((e=>{const{getBlockName:t,getBlockParents:n,getSelectedBlockClientId:r,getSettings:o}=e(ku),{hasBlockSupport:i}=e(Xt),l=n(r()),a=l[l.length-1],s=pe(t(a)),c=o();return{firstParentClientId:a,shouldHide:!i(s,"__experimentalParentSelector",!0),isDistractionFree:c.isDistractionFree}}),[]),i=xE(n),l=(0,v.useRef)(),{gestures:a}=YE({ref:l,onChange(e){e&&o||t(n,e)}});return r||void 0===n?null:(0,v.createElement)("div",(0,Po.Z)({className:"block-editor-block-parent-selector",key:n,ref:l},a),(0,v.createElement)(Fo,{className:"block-editor-block-parent-selector__button",onClick:()=>e(n),label:(0,N.sprintf)((0,N.__)("Select %s"),null==i?void 0:i.title),showTooltip:!0,icon:(0,v.createElement)(lk,{icon:null==i?void 0:i.icon})}))}var JE=n(53318);function QE(e){let{blocks:t}=e;return(0,v.createElement)("div",{className:"block-editor-block-switcher__popover__preview__parent"},(0,v.createElement)("div",{className:"block-editor-block-switcher__popover__preview__container"},(0,v.createElement)(T.Z,{className:"block-editor-block-switcher__preview__popover",placement:"bottom-start",focusOnMount:!1},(0,v.createElement)("div",{className:"block-editor-block-switcher__preview"},(0,v.createElement)("div",{className:"block-editor-block-switcher__preview-title"},(0,N.__)("Preview")),(0,v.createElement)(Ex,{viewportWidth:500,blocks:t})))))}function eS(e){let{restTransformations:t,onSelect:n,setHoveredTransformItemName:r}=e;return t.map((e=>(0,v.createElement)(tS,{key:e.name,item:e,onSelect:n,setHoveredTransformItemName:r})))}function tS(e){let{item:t,onSelect:n,setHoveredTransformItemName:r}=e;const{name:o,icon:i,title:l,isDisabled:a}=t;return(0,v.createElement)(Zu.Z,{className:vn(o),onClick:e=>{e.preventDefault(),n(o)},disabled:a,onMouseLeave:()=>r(null),onMouseEnter:()=>r(o)},(0,v.createElement)(lk,{icon:i,showColors:!0}),l)}var nS=e=>{let{className:t,possibleBlockTransformations:n,onSelect:r,blocks:o}=e;const[i,l]=(0,v.useState)(),{priorityTextTransformations:a,restTransformations:s}=function(e){const t={"core/paragraph":1,"core/heading":2,"core/list":3,"core/quote":4},n=(0,v.useMemo)((()=>{const n=Object.keys(t);return e.reduce(((e,t)=>{const{name:r}=t;return n.includes(r)?e.priorityTextTransformations.push(t):e.restTransformations.push(t),e}),{priorityTextTransformations:[],restTransformations:[]})}),[e]);return n.priorityTextTransformations.sort(((e,n)=>{let{name:r}=e,{name:o}=n;return t[r]<t[o]?-1:1})),n}(n),c=a.length&&s.length,u=!!s.length&&(0,v.createElement)(eS,{restTransformations:s,onSelect:r,setHoveredTransformItemName:l});return(0,v.createElement)(v.Fragment,null,(0,v.createElement)(Ou.Z,{label:(0,N.__)("Transform to"),className:t},i&&(0,v.createElement)(QE,{blocks:Pe(o,i)}),a.map((e=>(0,v.createElement)(tS,{key:e.name,item:e,onSelect:r,setHoveredTransformItemName:l}))),!c&&u),!!c&&(0,v.createElement)(Ou.Z,{className:t},u))},rS=n(60626);class oS{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.value=e,this._currentValue,this._valueAsArray}entries(){return this._valueAsArray.entries(...arguments)}forEach(){return this._valueAsArray.forEach(...arguments)}keys(){return this._valueAsArray.keys(...arguments)}values(){return this._valueAsArray.values(...arguments)}get value(){return this._currentValue}set value(e){e=String(e),this._valueAsArray=[...new Set(e.split(/\s+/g).filter(Boolean))],this._currentValue=this._valueAsArray.join(" ")}get length(){return this._valueAsArray.length}toString(){return this.value}*[Symbol.iterator](){return yield*this._valueAsArray}item(e){return this._valueAsArray[e]}contains(e){return-1!==this._valueAsArray.indexOf(e)}add(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.value+=" "+t.join(" ")}remove(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.value=this._valueAsArray.filter((e=>!t.includes(e))).join(" ")}toggle(e,t){return void 0===t&&(t=!this.contains(e)),t?this.add(e):this.remove(e),t}replace(e,t){return!!this.contains(e)&&(this.remove(e),this.add(t),!0)}supports(){return!0}}function iS(e,t,n){const r=new oS(e);return t&&r.remove("is-style-"+t.name),r.add("is-style-"+n.name),r.value}function lS(e){return null==e?void 0:e.find((e=>e.isDefault))}function aS(e){let{clientId:t,onSwitch:n}=e;const{styles:r,block:o,blockType:i,className:l}=(0,E.Z)((e=>{const{getBlock:n}=e(ku),r=n(t);if(!r)return{};const o=pe(r.name),{getBlockStyles:i}=e(Xt);return{block:r,blockType:o,styles:i(r.name),className:r.attributes.className||""}}),[t]),{updateBlockAttributes:a}=(0,S.Z)(ku),s=function(e){return e&&0!==e.length?lS(e)?e:[{name:"default",label:(0,N._x)("Default","block style"),isDefault:!0},...e]:[]}(r),c=function(e,t){for(const n of new oS(t).values()){if(-1===n.indexOf("is-style-"))continue;const t=n.substring(9),r=null==e?void 0:e.find((e=>{let{name:n}=e;return n===t}));if(r)return r}return lS(e)}(s,l),u=function(e,t){return(0,v.useMemo)((()=>{const n=null==t?void 0:t.example,r=null==t?void 0:t.name;return n&&r?Ae(r,{attributes:n.attributes,innerBlocks:n.innerBlocks}):e?Ce(e):void 0}),[null!=t&&t.example?null==e?void 0:e.name:e,t])}(o,i);return{onSelect:e=>{const r=iS(l,c,e);a(t,{className:r}),n()},stylesToRender:s,activeStyle:c,genericPreviewBlock:u,className:l}}const sS=()=>{};function cS(e){let{clientId:t,onSwitch:n=sS}=e;const{onSelect:r,stylesToRender:o,activeStyle:i}=aS({clientId:t,onSwitch:n});return o&&0!==o.length?(0,v.createElement)(v.Fragment,null,o.map((e=>{const t=e.label||e.name;return(0,v.createElement)(Zu.Z,{key:e.name,icon:i.name===e.name?ph.Z:null,onClick:()=>r(e)},(0,v.createElement)(rS.Z,{as:"span",limit:18,ellipsizeMode:"tail",truncate:!0},t))}))):null}function uS(e){let{hoveredBlock:t,onSwitch:n}=e;const{clientId:r}=t;return(0,v.createElement)(Ou.Z,{label:(0,N.__)("Styles"),className:"block-editor-block-switcher__styles__menugroup"},(0,v.createElement)(cS,{clientId:r,onSwitch:n}))}const dS=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Set;const{clientId:r,name:o,innerBlocks:i=[]}=e;if(!n.has(r)){if(o===t)return e;for(const e of i){const r=dS(e,t,n);if(r)return r}}},pS=(e,t)=>{const n=((e,t)=>{const n=function(e,t){var n;const r=null===(n=pe(e))||void 0===n?void 0:n.attributes;if(!r)return[];return Object.keys(r).filter((e=>{var n;return(null===(n=r[e])||void 0===n?void 0:n.__experimentalRole)===t}))}(e,"content");return null!=n&&n.length?n.reduce(((e,n)=>(t[n]&&(e[n]=t[n]),e)),{}):t})(t.name,t.attributes);e.attributes={...e.attributes,...n}};function mS(e){let{patterns:t,onSelect:n}=e;return(0,v.createElement)("div",{className:"block-editor-block-switcher__popover__preview__parent"},(0,v.createElement)("div",{className:"block-editor-block-switcher__popover__preview__container"},(0,v.createElement)(T.Z,{className:"block-editor-block-switcher__preview__popover",position:"bottom right"},(0,v.createElement)("div",{className:"block-editor-block-switcher__preview"},(0,v.createElement)("div",{className:"block-editor-block-switcher__preview-title"},(0,N.__)("Preview")),(0,v.createElement)(fS,{patterns:t,onSelect:n})))))}function fS(e){let{patterns:t,onSelect:n}=e;const r=(0,Kx.u)();return(0,v.createElement)(yw.b,(0,Po.Z)({},r,{role:"listbox",className:"block-editor-block-switcher__preview-patterns-container","aria-label":(0,N.__)("Patterns list")}),t.map((e=>(0,v.createElement)(hS,{key:e.name,pattern:e,onSelect:n,composite:r}))))}function hS(e){let{pattern:t,onSelect:n,composite:r}=e;const o="block-editor-block-switcher__preview-patterns-container",i=(0,dd.Z)(hS,`${o}-list__item-description`);return(0,v.createElement)("div",{className:`${o}-list__list-item`,"aria-label":t.title,"aria-describedby":t.description?i:void 0},(0,v.createElement)(Ax.A,(0,Po.Z)({role:"option",as:"div"},r,{className:`${o}-list__item`,onClick:()=>n(t.transformedBlocks)}),(0,v.createElement)(Ex,{blocks:t.transformedBlocks,viewportWidth:t.viewportWidth||500}),(0,v.createElement)("div",{className:`${o}-list__item-title`},t.title)),!!t.description&&(0,v.createElement)(z_.Z,{id:i},t.description))}var gS=function(e){let{blocks:t,patterns:n,onSelect:r}=e;const[o,i]=(0,v.useState)(!1),l=((e,t)=>(0,v.useMemo)((()=>e.reduce(((e,n)=>{const r=((e,t)=>{const n=t.map((e=>Ce(e))),r=new Set;for(const t of e){let e=!1;for(const o of n){const n=dS(o,t.name,r);if(n){e=!0,r.add(n.clientId),pS(n,t);break}}if(!e)return}return n})(t,n.blocks);return r&&e.push({...n,transformedBlocks:r}),e}),[])),[e,t]))(n,t);return l.length?(0,v.createElement)(Ou.Z,{className:"block-editor-block-switcher__pattern__transforms__menugroup"},o&&(0,v.createElement)(mS,{patterns:l,onSelect:r}),(0,v.createElement)(Zu.Z,{onClick:e=>{e.preventDefault(),i(!o)},icon:rk.Z},(0,N.__)("Patterns"))):null};const vS=e=>{let{clientIds:t,blocks:n}=e;const{replaceBlocks:r,multiSelect:o}=(0,S.Z)(ku),i=xE(n[0].clientId),{possibleBlockTransformations:l,canRemove:a,hasBlockStyles:s,icon:c,patterns:u}=(0,E.Z)((e=>{const{getBlockRootClientId:r,getBlockTransformItems:o,__experimentalGetPatternTransformItems:l}=e(ku),{getBlockStyles:a,getBlockType:s}=e(Xt),{canRemoveBlocks:c}=e(ku),u=r(Array.isArray(t)?t[0]:t),[{name:d}]=n,p=1===n.length,m=p&&a(d);let f;if(p)f=null==i?void 0:i.icon;else{var h;const e=1===new Set(n.map((e=>{let{name:t}=e;return t}))).size;f=e?null===(h=s(d))||void 0===h?void 0:h.icon:JE.Z}return{possibleBlockTransformations:o(n,u),canRemove:c(t,u),hasBlockStyles:!(null==m||!m.length),icon:f,patterns:l(n,u)}}),[t,n,null==i?void 0:i.icon]),d=wE({clientId:Array.isArray(t)?t[0]:t,maximumLength:35}),p=1===n.length&&ge(n[0]),m=1===n.length&&ve(n[0]);function f(e){e.length>1&&o(e[0].clientId,e[e.length-1].clientId)}const h=!!l.length&&a&&!m,g=!(null==u||!u.length)&&a;if(!s&&!h)return(0,v.createElement)(Vo,null,(0,v.createElement)(Fo,{disabled:!0,className:"block-editor-block-switcher__no-switcher-icon",title:d,icon:(0,v.createElement)(v.Fragment,null,(0,v.createElement)(lk,{icon:c,showColors:!0}),(p||m)&&(0,v.createElement)("span",{className:"block-editor-block-switcher__toggle-text"},d))}));const b=d,y=1===n.length?(0,N.sprintf)((0,N.__)("%s: Change block type or style"),d):(0,N.sprintf)((0,N._n)("Change type of %d block","Change type of %d blocks",n.length),n.length),_=s||h||g;return(0,v.createElement)(Vo,null,(0,v.createElement)(Oo.Z,null,(e=>(0,v.createElement)(zo.Z,{className:"block-editor-block-switcher",label:b,popoverProps:{position:"bottom right",variant:"toolbar",className:"block-editor-block-switcher__popover"},icon:(0,v.createElement)(v.Fragment,null,(0,v.createElement)(lk,{icon:c,className:"block-editor-block-switcher__toggle",showColors:!0}),(p||m)&&(0,v.createElement)("span",{className:"block-editor-block-switcher__toggle-text"},d)),toggleProps:{describedBy:y,...e},menuProps:{orientation:"both"}},(e=>{let{onClose:o}=e;return _&&(0,v.createElement)("div",{className:"block-editor-block-switcher__container"},g&&(0,v.createElement)(gS,{blocks:n,patterns:u,onSelect:e=>{!function(e){r(t,e),f(e)}(e),o()}}),h&&(0,v.createElement)(nS,{className:"block-editor-block-switcher__transforms__menugroup",possibleBlockTransformations:l,blocks:n,onSelect:e=>{!function(e){const o=Pe(n,e);r(t,o),f(o)}(e),o()}}),s&&(0,v.createElement)(uS,{hoveredBlock:n[0],onSwitch:o}))})))))};var bS=e=>{let{clientIds:t}=e;const n=(0,E.Z)((e=>e(ku).getBlocksByClientId(t)),[t]);return!n.length||n.some((e=>!e))?null:(0,v.createElement)(vS,{clientIds:t,blocks:n})};const{Fill:yS,Slot:_S}=(0,I.up)("__unstableBlockToolbarLastItem");yS.Slot=_S;var kS=yS,xS=n(92022),wS=n.n(xS);function CS(e){const t=(0,v.useRef)(e);return t.current=e,t}function ES(e,t){const n=CS(e),r=CS(t);return(0,bl.Z)((e=>{const t=new(wS())(e,{text:()=>"function"==typeof n.current?n.current():n.current||""});return t.on("success",(t=>{let{clearSelection:n}=t;n(),e.focus(),r.current&&r.current()})),()=>{t.destroy()}}),[])}const SS="__experimentalBorder",IS="color",TS="typography.__experimentalFontFamily",NS="typography.fontSize",BS=["typography.lineHeight",NS,"typography.__experimentalFontStyle","typography.__experimentalFontWeight",TS,"typography.__experimentalTextDecoration","typography.__experimentalTextTransform","typography.__experimentalLetterSpacing",SS,IS,"spacing"],LS={align:e=>he(e,"align"),borderColor:e=>function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"any";if("web"!==ci.Z.OS)return!1;const n=fe(e,SS);return!(!0!==n&&!("any"===t?null!=n&&n.color||null!=n&&n.radius||null!=n&&n.width||null!=n&&n.style:null!=n&&n[t]))}(e,"color"),backgroundColor:e=>{const t=fe(e,IS);return t&&!1!==t.background},textColor:e=>{const t=fe(e,IS);return t&&!1!==t.text},gradient:e=>{const t=fe(e,IS);return null!==t&&"object"==typeof t&&!!t.gradients},className:e=>he(e,"customClassName",!0),fontFamily:e=>he(e,TS),fontSize:e=>he(e,NS),layout:e=>he(e,"__experimentalLayout"),style:e=>BS.some((t=>he(e,t)))};function PS(e,t){return Object.entries(LS).reduce(((n,r)=>{let[o,i]=r;return i(e.name)&&i(t.name)&&(n[o]=e.attributes[o]),n}),{})}function AS(e,t,n){for(let r=0;r<Math.min(t.length,e.length);r+=1)n(e[r].clientId,PS(t[r],e[r])),AS(e[r].innerBlocks,t[r].innerBlocks,n)}function DS(e){let{clientIds:t,children:n,__experimentalUpdateSelection:r}=e;const{canInsertBlockType:o,getBlockRootClientId:i,getBlocksByClientId:l,canMoveBlocks:a,canRemoveBlocks:s}=(0,E.Z)(ku),{getDefaultBlockName:c,getGroupingBlockName:u}=(0,E.Z)(Xt),d=l(t),p=i(t[0]),m=d.every((e=>!!e&&he(e.name,"multiple",!0)&&o(e.name,p))),f=o(c(),p),h=a(t,p),g=s(t,p),{removeBlocks:b,replaceBlocks:y,duplicateBlocks:_,insertAfterBlock:k,insertBeforeBlock:x,flashBlock:w,setBlockMovingClientId:C,setNavigationMode:I,selectBlock:T}=(0,S.Z)(ku),B=function(){const{getBlockName:e}=(0,E.Z)(ku),{getBlockType:t}=(0,E.Z)(Xt),{createSuccessNotice:n}=(0,S.Z)(vw.h);return(0,v.useCallback)(((r,o)=>{let i="";if(1===o.length){var l;const n=o[0],a=null===(l=t(e(n)))||void 0===l?void 0:l.title;i="copy"===r?(0,N.sprintf)((0,N.__)('Copied "%s" to clipboard.'),a):(0,N.sprintf)((0,N.__)('Moved "%s" to clipboard.'),a)}else i="copy"===r?(0,N.sprintf)((0,N._n)("Copied %d block to clipboard.","Copied %d blocks to clipboard.",o.length),o.length):(0,N.sprintf)((0,N._n)("Moved %d block to clipboard.","Moved %d blocks to clipboard.",o.length),o.length);n(i,{type:"snackbar"})}),[])}(),L=function(){const e=(0,yl.Z)(),{updateBlockAttributes:t}=(0,S.Z)(ku),{createSuccessNotice:n,createWarningNotice:r,createErrorNotice:o}=(0,S.Z)(vw.h);return(0,v.useCallback)((async i=>{let l="";try{if(!window.navigator.clipboard)return void o((0,N.__)("Unable to paste styles. This feature is only available on secure (https) sites in supporting browsers."),{type:"snackbar"});l=await window.navigator.clipboard.readText()}catch(e){return void o((0,N.__)("Unable to paste styles. Please allow browser clipboard permissions before continuing."),{type:"snackbar"})}if(!l||!function(e){try{const t=Br(e,{__unstableSkipMigrationLogs:!0,__unstableSkipAutop:!0});return 1!==t.length||"core/freeform"!==t[0].name}catch(e){return!1}}(l))return void r((0,N.__)("Unable to paste styles. Block styles couldn't be found within the copied content."),{type:"snackbar"});const a=Br(l);if(1===a.length?e.batch((()=>{AS(i,i.map((()=>a[0])),t)})):e.batch((()=>{AS(i,a,t)})),1===i.length){var s;const e=null===(s=pe(i[0].name))||void 0===s?void 0:s.title;n((0,N.sprintf)((0,N.__)("Pasted styles to %s."),e),{type:"snackbar"})}else n((0,N.sprintf)((0,N.__)("Pasted styles to %d blocks."),i.length),{type:"snackbar"})}),[e.batch,t,n,r,o])}();return n({canDuplicate:m,canInsertDefaultBlock:f,canMove:h,canRemove:g,rootClientId:p,blocks:d,onDuplicate:()=>_(t,r),onRemove:()=>b(t,r),onInsertBefore(){const e=Array.isArray(t)?t[0]:e;x(e)},onInsertAfter(){const e=Array.isArray(t)?t[t.length-1]:e;k(e)},onMoveTo(){I(!0),T(t[0]),C(t[0])},onGroup(){if(!d.length)return;const e=u(),n=Pe(d,e);n&&y(t,n)},onUngroup(){if(!d.length)return;const e=d[0].innerBlocks;e.length&&y(t,e)},onCopy(){const e=d.map((e=>{let{clientId:t}=e;return t}));1===d.length&&w(e[0]),B("copy",e)},async onPasteStyles(){await L(d)}})}const RS=()=>{};var MS=(0,eg.Z)([(0,Jh.Z)(((e,t)=>{let{clientId:n}=t;const{getBlock:r,getBlockMode:o,getSettings:i}=e(ku),l=r(n),a=i().codeEditingEnabled;return{mode:o(n),blockType:l?pe(l.name):null,isCodeEditingEnabled:a}})),(0,Qh.Z)(((e,t)=>{let{onToggle:n=RS,clientId:r}=t;return{onToggleMode(){e(ku).toggleBlockMode(r),n()}}}))])((function(e){let{blockType:t,mode:n,onToggleMode:r,small:o=!1,isCodeEditingEnabled:i=!0}=e;if(!t||!he(t,"html",!0)||!i)return null;const l="visual"===n?(0,N.__)("Edit as HTML"):(0,N.__)("Edit visually");return(0,v.createElement)(Zu.Z,{onClick:r},!o&&l)})),OS=(0,eg.Z)((0,Jh.Z)(((e,t)=>{let{clientId:n}=t;const r=e(ku).getBlock(n);return{block:r,shouldRender:r&&"core/html"===r.name}})),(0,Qh.Z)(((e,t)=>{let{block:n}=t;return{onClick:()=>e(ku).replaceBlocks(n.clientId,no({HTML:xn(n)}))}})))((function(e){let{shouldRender:t,onClick:n,small:r}=e;if(!t)return null;const o=(0,N.__)("Convert to Blocks");return(0,v.createElement)(Zu.Z,{onClick:n},!r&&o)}));const{Fill:ZS,Slot:FS}=(0,I.up)("__unstableBlockSettingsMenuFirstItem");ZS.Slot=FS;var jS=ZS;function zS(){const{clientIds:e,isGroupable:t,isUngroupable:n,blocksSelection:r,groupingBlockName:o}=(0,E.Z)((e=>{var t;const{getBlockRootClientId:n,getBlocksByClientId:r,canInsertBlockType:o,getSelectedBlockClientIds:i}=e(ku),{getGroupingBlockName:l}=e(Xt),a=i(),s=l(),c=o(s,null!=a&&a.length?n(a[0]):void 0),u=r(a),d=1===u.length&&(null===(t=u[0])||void 0===t?void 0:t.name)===s;return{clientIds:a,isGroupable:c&&u.length,isUngroupable:d&&!!u[0].innerBlocks.length,blocksSelection:u,groupingBlockName:s}}),[]);return{clientIds:e,isGroupable:t,isUngroupable:n,blocksSelection:r,groupingBlockName:o}}function HS(e){let{clientIds:t,isGroupable:n,isUngroupable:r,blocksSelection:o,groupingBlockName:i,onClose:l=(()=>{})}=e;const{replaceBlocks:a}=(0,S.Z)(ku);return n||r?(0,v.createElement)(v.Fragment,null,n&&(0,v.createElement)(Zu.Z,{onClick:()=>{(()=>{const e=Pe(o,i);e&&a(t,e)})(),l()}},(0,N._x)("Group","verb")),r&&(0,v.createElement)(Zu.Z,{onClick:()=>{(()=>{const e=o[0].innerBlocks;e.length&&a(t,e)})(),l()}},(0,N._x)("Ungroup","Ungrouping blocks from within a Group block back into individual blocks within the Editor "))):null}function VS(e){return(0,E.Z)((t=>{const{canEditBlock:n,canMoveBlock:r,canRemoveBlock:o,canLockBlockType:i,getBlockName:l,getBlockRootClientId:a,getTemplateLock:s}=t(ku),c=a(e),u=n(e),d=r(e,c),p=o(e,c);return{canEdit:u,canMove:d,canRemove:p,canLock:i(l(e)),isContentLocked:"contentOnly"===s(e),isLocked:!u||!d||!p}}),[e])}var WS=n(60869),$S=n(72897),US=n(29195),GS=n(27157);const qS=["core/block","core/navigation"];function KS(e){return e.remove&&e.move?"all":!(!e.remove||e.move)&&"insert"}function YS(e){let{clientId:t,onClose:n}=e;const[r,o]=(0,v.useState)({move:!1,remove:!1}),{canEdit:i,canMove:l,canRemove:a}=VS(t),{allowsEditLocking:s,templateLock:c,hasTemplateLock:u}=(0,E.Z)((e=>{var n,r;const{getBlockName:o,getBlockAttributes:i}=e(ku),l=o(t),a=pe(l);return{allowsEditLocking:qS.includes(l),templateLock:null===(n=i(t))||void 0===n?void 0:n.templateLock,hasTemplateLock:!(null==a||null===(r=a.attributes)||void 0===r||!r.templateLock)}}),[t]),[d,p]=(0,v.useState)(!!c),{updateBlockAttributes:m}=(0,S.Z)(ku),f=xE(t),h=(0,dd.Z)(YS,"block-editor-block-lock-modal__options-title");(0,v.useEffect)((()=>{o({move:!l,remove:!a,...s?{edit:!i}:{}})}),[i,l,a,s]);const g=Object.values(r).every(Boolean),b=Object.values(r).some(Boolean)&&!g;return(0,v.createElement)(ug.Z,{title:(0,N.sprintf)((0,N.__)("Lock %s"),f.title),overlayClassName:"block-editor-block-lock-modal",onRequestClose:n},(0,v.createElement)("p",null,(0,N.__)("Choose specific attributes to restrict or lock all available options.")),(0,v.createElement)("form",{onSubmit:e=>{e.preventDefault(),m([t],{lock:r,templateLock:d?KS(r):void 0}),n()}},(0,v.createElement)("div",{role:"group","aria-labelledby":h,className:"block-editor-block-lock-modal__options"},(0,v.createElement)(US.C,{__nextHasNoMarginBottom:!0,className:"block-editor-block-lock-modal__options-title",label:(0,v.createElement)("span",{id:h},(0,N.__)("Lock all")),checked:g,indeterminate:b,onChange:e=>o({move:e,remove:e,...s?{edit:e}:{}})}),(0,v.createElement)("ul",{className:"block-editor-block-lock-modal__checklist"},s&&(0,v.createElement)("li",{className:"block-editor-block-lock-modal__checklist-item"},(0,v.createElement)(US.C,{__nextHasNoMarginBottom:!0,label:(0,N.__)("Restrict editing"),checked:!!r.edit,onChange:e=>o((t=>({...t,edit:e})))}),(0,v.createElement)(Od.Z,{className:"block-editor-block-lock-modal__lock-icon",icon:r.edit?GS.Z:WS.Z})),(0,v.createElement)("li",{className:"block-editor-block-lock-modal__checklist-item"},(0,v.createElement)(US.C,{__nextHasNoMarginBottom:!0,label:(0,N.__)("Disable movement"),checked:r.move,onChange:e=>o((t=>({...t,move:e})))}),(0,v.createElement)(Od.Z,{className:"block-editor-block-lock-modal__lock-icon",icon:r.move?GS.Z:WS.Z})),(0,v.createElement)("li",{className:"block-editor-block-lock-modal__checklist-item"},(0,v.createElement)(US.C,{__nextHasNoMarginBottom:!0,label:(0,N.__)("Prevent removal"),checked:r.remove,onChange:e=>o((t=>({...t,remove:e})))}),(0,v.createElement)(Od.Z,{className:"block-editor-block-lock-modal__lock-icon",icon:r.remove?GS.Z:WS.Z}))),u&&(0,v.createElement)(jd.Z,{__nextHasNoMarginBottom:!0,className:"block-editor-block-lock-modal__template-lock",label:(0,N.__)("Apply to all blocks inside"),checked:d,disabled:r.move&&!r.remove,onChange:()=>p(!d)})),(0,v.createElement)(Uu.Z,{className:"block-editor-block-lock-modal__actions",justify:"flex-end",expanded:!1},(0,v.createElement)(Gu.Z,null,(0,v.createElement)(Mo.ZP,{variant:"tertiary",onClick:n},(0,N.__)("Cancel"))),(0,v.createElement)(Gu.Z,null,(0,v.createElement)(Mo.ZP,{variant:"primary",type:"submit"},(0,N.__)("Apply"))))))}function XS(e){let{clientId:t}=e;const{canLock:n,isLocked:r}=VS(t),[o,i]=(0,v.useReducer)((e=>!e),!1);if(!n)return null;const l=r?(0,N.__)("Unlock"):(0,N.__)("Lock");return(0,v.createElement)(v.Fragment,null,(0,v.createElement)(Zu.Z,{icon:r?WS.Z:$S.Z,onClick:i},l),o&&(0,v.createElement)(YS,{clientId:t,onClose:i}))}const{Fill:JS,Slot:QS}=(0,I.up)("BlockSettingsMenuControls");function eI(e){let{...t}=e;return(0,v.createElement)(Do.Z,{document:document},(0,v.createElement)(JS,t))}eI.Slot=e=>{let{fillProps:t,clientIds:n=null,__unstableDisplayLocation:r}=e;const{selectedBlocks:o,selectedClientIds:i,canRemove:l}=(0,E.Z)((e=>{const{getBlockNamesByClientId:t,getSelectedBlockClientIds:r,canRemoveBlocks:o}=e(ku),i=null!==n?n:r();return{selectedBlocks:t(i),selectedClientIds:i,canRemove:o(i)}}),[n]),{canLock:a}=VS(i[0]),s=1===i.length&&a,c=zS(),{isGroupable:u,isUngroupable:d}=c,p=(u||d)&&l;return(0,v.createElement)(QS,{fillProps:{...t,__unstableDisplayLocation:r,selectedBlocks:o,selectedClientIds:i}},(e=>!(null!=e&&e.length)>0&&!p&&!s?null:(0,v.createElement)(Ou.Z,null,s&&(0,v.createElement)(XS,{clientId:i[0]}),e,p&&(0,v.createElement)(HS,(0,Po.Z)({},c,{onClose:null==t?void 0:t.onClose})))))};var tI=eI;const nI=()=>{},rI={className:"block-editor-block-settings-menu__popover",position:"bottom right",variant:"toolbar"};function oI(e){let{blocks:t,onCopy:n,label:r}=e;const o=ES((()=>Cn(t)),n),i=t.length>1?(0,N.__)("Copy blocks"):(0,N.__)("Copy block"),l=r||i;return(0,v.createElement)(Zu.Z,{ref:o},l)}var iI=function(e){let{clientIds:t,__experimentalSelectBlock:n,children:r,__unstableDisplayLocation:o,...i}=e;const l=Array.isArray(t)?t:[t],a=l.length,s=l[0],{firstParentClientId:c,isDistractionFree:u,onlyBlock:d,parentBlockType:p,previousBlockClientId:m,nextBlockClientId:f,selectedBlockClientIds:h}=(0,E.Z)((e=>{const{getBlockCount:t,getBlockName:n,getBlockRootClientId:r,getPreviousBlockClientId:o,getNextBlockClientId:i,getSelectedBlockClientIds:l,getSettings:a,getBlockAttributes:c}=e(ku),{getActiveBlockVariation:u}=e(Xt),d=r(s),p=d&&n(d);return{firstParentClientId:d,isDistractionFree:a().isDistractionFree,onlyBlock:1===t(d),parentBlockType:d&&(u(p,c(d))||pe(p)),previousBlockClientId:o(s),nextBlockClientId:i(s),selectedBlockClientIds:l()}}),[s]),g=(0,E.Z)((e=>{const{getShortcutRepresentation:t}=e(Dk.h);return{duplicate:t("core/block-editor/duplicate"),remove:t("core/block-editor/remove"),insertAfter:t("core/block-editor/insert-after"),insertBefore:t("core/block-editor/insert-before")}}),[]),{selectBlock:b,toggleBlockHighlight:y}=(0,S.Z)(ku),_=(0,v.useCallback)(n?async e=>{const t=await e;t&&t[0]&&n(t[0])}:nI,[n]),k=wE({clientId:s,maximumLength:25}),x=(0,v.useCallback)(n?()=>{const e=m||f||c;e&&h.includes(s)&&!h.includes(e)&&n(e)}:nI,[n,m,f,c,h]),w=(0,N.sprintf)((0,N.__)("Remove %s"),k),C=1===a?w:(0,N.__)("Remove blocks"),I=(0,v.useRef)(),{gestures:T}=YE({ref:I,onChange(e){e&&u||y(c,e)}}),B=null==h?void 0:h.includes(c);return(0,v.createElement)(DS,{clientIds:t,__experimentalUpdateSelection:!n},(e=>{let{canDuplicate:n,canInsertDefaultBlock:l,canMove:u,canRemove:m,onDuplicate:f,onInsertAfter:h,onInsertBefore:y,onRemove:k,onCopy:w,onPasteStyles:E,onMoveTo:S,blocks:L}=e;return(0,v.createElement)(zo.Z,(0,Po.Z)({icon:mh.Z,label:(0,N.__)("Options"),className:"block-editor-block-settings-menu",popoverProps:rI,noIcons:!0},i),(e=>{let{onClose:i}=e;return(0,v.createElement)(v.Fragment,null,(0,v.createElement)(Ou.Z,null,(0,v.createElement)(jS.Slot,{fillProps:{onClose:i}}),!B&&!!c&&(0,v.createElement)(Zu.Z,(0,Po.Z)({},T,{ref:I,icon:(0,v.createElement)(lk,{icon:p.icon}),onClick:()=>b(c)}),(0,N.sprintf)((0,N.__)("Select parent block (%s)"),p.title)),1===a&&(0,v.createElement)(OS,{clientId:s}),(0,v.createElement)(oI,{blocks:L,onCopy:w}),n&&(0,v.createElement)(Zu.Z,{onClick:(0,et.Z)(i,f,_),shortcut:g.duplicate},(0,N.__)("Duplicate")),l&&(0,v.createElement)(v.Fragment,null,(0,v.createElement)(Zu.Z,{onClick:(0,et.Z)(i,y),shortcut:g.insertBefore},(0,N.__)("Insert before")),(0,v.createElement)(Zu.Z,{onClick:(0,et.Z)(i,h),shortcut:g.insertAfter},(0,N.__)("Insert after"))),u&&!d&&(0,v.createElement)(Zu.Z,{onClick:(0,et.Z)(i,S)},(0,N.__)("Move to")),1===a&&(0,v.createElement)(MS,{clientId:s,onToggle:i})),(0,v.createElement)(Ou.Z,null,(0,v.createElement)(oI,{blocks:L,onCopy:w,label:(0,N.__)("Copy styles")}),(0,v.createElement)(Zu.Z,{onClick:E},(0,N.__)("Paste styles"))),(0,v.createElement)(tI.Slot,{fillProps:{onClose:i},clientIds:t,__unstableDisplayLocation:o}),"function"==typeof r?r({onClose:i}):v.Children.map((e=>(0,v.cloneElement)(e,{onClose:i}))),m&&(0,v.createElement)(Ou.Z,null,(0,v.createElement)(Zu.Z,{onClick:(0,et.Z)(i,k,x),shortcut:g.remove},C)))}))}))},lI=function(e){let{clientIds:t,...n}=e;return(0,v.createElement)(Vo,null,(0,v.createElement)(Oo.Z,null,(e=>(0,v.createElement)(iI,(0,Po.Z)({clientIds:t,toggleProps:e},n)))))};function aI(e){let{clientId:t}=e;const n=xE(t),{canEdit:r,canMove:o,canRemove:i,canLock:l}=VS(t),[a,s]=(0,v.useReducer)((e=>!e),!1);return l?r&&o&&i?null:(0,v.createElement)(v.Fragment,null,(0,v.createElement)(Vo,{className:"block-editor-block-lock-toolbar"},(0,v.createElement)(Fo,{icon:GS.Z,label:(0,N.sprintf)((0,N.__)("Unlock %s"),n.title),onClick:s})),a&&(0,v.createElement)(YS,{clientId:t,onClose:s})):null}var sI=n(1358),cI=n(95061),uI=n(75262);const dI={group:{type:"constrained"},row:{type:"flex",flexWrap:"nowrap"},stack:{type:"flex",orientation:"vertical"}};var pI=function(){const{blocksSelection:e,clientIds:t,groupingBlockName:n,isGroupable:r}=zS(),{replaceBlocks:o}=(0,S.Z)(ku),{canRemove:i,variations:l}=(0,E.Z)((e=>{const{canRemoveBlocks:r}=e(ku),{getBlockVariations:o}=e(Xt);return{canRemove:r(t),variations:o(n,"transform")}}),[t,n]),a=r=>{const i=Pe(e,n);"string"!=typeof r&&(r="group"),i&&i.length>0&&(i[0].attributes.layout=dI[r],o(t,i))};if(!r||!i)return null;const s=!!l.find((e=>{let{name:t}=e;return"group-row"===t})),c=!!l.find((e=>{let{name:t}=e;return"group-stack"===t}));return(0,v.createElement)(Vo,null,(0,v.createElement)(Fo,{icon:sI.Z,label:(0,N._x)("Group","verb"),onClick:a}),s&&(0,v.createElement)(Fo,{icon:cI.Z,label:(0,N._x)("Row","single horizontal line"),onClick:()=>a("row")}),c&&(0,v.createElement)(Fo,{icon:uI.Z,label:(0,N._x)("Stack","verb"),onClick:()=>a("stack")}))};function mI(e){let{clientIds:t}=e;const n=1===t.length?t[0]:void 0,r=(0,E.Z)((e=>!!n&&"html"===e(ku).getBlockMode(n)),[n]),{toggleBlockMode:o}=(0,S.Z)(ku);return r?(0,v.createElement)(Vo,null,(0,v.createElement)(Fo,{onClick:()=>{o(n)}},(0,N.__)("Edit visually"))):null}var fI=(0,v.createContext)(""),hI=e=>{let{hideDragHandle:t}=e;const{blockClientIds:n,blockClientId:r,blockType:o,hasFixedToolbar:i,isDistractionFree:l,isValid:a,isVisual:s,isContentLocked:c}=(0,E.Z)((e=>{const{getBlockName:t,getBlockMode:n,getSelectedBlockClientIds:r,isBlockValid:o,getBlockRootClientId:i,getSettings:l,__unstableGetContentLockingParent:a}=e(ku),s=r(),c=s[0],u=i(c),d=l();return{blockClientIds:s,blockClientId:c,blockType:c&&pe(t(c)),hasFixedToolbar:d.hasFixedToolbar,isDistractionFree:d.isDistractionFree,rootClientId:u,isValid:s.every((e=>o(e))),isVisual:s.every((e=>"visual"===n(e))),isContentLocked:!!a(c)}}),[]),{toggleBlockHighlight:u}=(0,S.Z)(ku),d=(0,v.useRef)(),{showMovers:p,gestures:m}=YE({ref:d,onChange(e){e&&l||u(r,e)}}),f=(0,qh.Z)("medium","<")||i;if(o&&!he(o,"__experimentalToolbar",!0))return null;const h=f||p;if(0===n.length)return null;const g=a&&s,b=n.length>1,y=ge(o)||ve(o),_=w()("block-editor-block-toolbar",{"is-showing-movers":h,"is-synced":y});return(0,v.createElement)("div",{className:_},!b&&!f&&!c&&(0,v.createElement)(XE,null),(0,v.createElement)("div",(0,Po.Z)({ref:d},m),(g||b)&&!c&&(0,v.createElement)(Vo,{className:"block-editor-block-toolbar__block-controls"},(0,v.createElement)(bS,{clientIds:n}),!b&&(0,v.createElement)(aI,{clientId:n[0]}),(0,v.createElement)(DE,{clientIds:n,hideDragHandle:t}))),g&&b&&(0,v.createElement)(pI,null),g&&(0,v.createElement)(v.Fragment,null,(0,v.createElement)(Ru.Slot,{group:"parent",className:"block-editor-block-toolbar__slot"}),(0,v.createElement)(Ru.Slot,{group:"block",className:"block-editor-block-toolbar__slot"}),(0,v.createElement)(Ru.Slot,{className:"block-editor-block-toolbar__slot"}),(0,v.createElement)(Ru.Slot,{group:"inline",className:"block-editor-block-toolbar__slot"}),(0,v.createElement)(Ru.Slot,{group:"other",className:"block-editor-block-toolbar__slot"}),(0,v.createElement)(fI.Provider,{value:null==o?void 0:o.name},(0,v.createElement)(kS.Slot,null))),(0,v.createElement)(mI,{clientIds:n}),!c&&(0,v.createElement)(lI,{clientIds:n}))},gI=function(e){let{focusOnMount:t,isFixed:n,...r}=e;const{blockType:o,hasParents:i,showParentSelector:l}=(0,E.Z)((e=>{const{getBlockName:t,getBlockParents:n,getSelectedBlockClientIds:r,__unstableGetContentLockingParent:o}=e(ku),{getBlockType:i}=e(Xt),l=r(),a=l[0],s=n(a),c=i(t(s[s.length-1]));return{blockType:a&&i(t(a)),hasParents:s.length,showParentSelector:c&&he(c,"__experimentalParentSelector",!0)&&l.length<=1&&!o(a)}}),[]);if(o&&!he(o,"__experimentalToolbar",!0))return null;const a=w()("block-editor-block-contextual-toolbar",{"has-parent":i&&l,"is-fixed":n});return(0,v.createElement)(WE,(0,Po.Z)({focusOnMount:t,className:a,"aria-label":(0,N.__)("Block tools")},r),(0,v.createElement)(hI,{hideDragHandle:n}))},vI=n(12066),bI=n(9701),yI=n(34992);const _I=e=>e.__nextUnconstrainedWidth?"":(0,Qu.iv)(am.W2,"{min-width:130px;}",""),kI=(0,Ju.Z)(im.Z,{target:"eswuck60"})(_I,";"),xI=e=>null==e?void 0:e.name,wI=(e,t)=>{let{selectedItem:n}=e,{type:r,changes:o,props:{items:i}}=t;switch(r){case vI.L7.stateChangeTypes.ToggleButtonKeyDownArrowDown:return{selectedItem:i[n?Math.min(i.indexOf(n)+1,i.length-1):0]};case vI.L7.stateChangeTypes.ToggleButtonKeyDownArrowUp:return{selectedItem:i[n?Math.max(i.indexOf(n)-1,0):i.length-1]};default:return o}};function CI(e){var t;const{__next36pxDefaultSize:n=!1,__nextUnconstrainedWidth:r=!1,className:o,hideLabelFromVision:i,label:l,describedBy:a,options:s,onChange:c,size:u="default",value:d,onMouseOver:p,onMouseOut:m,onFocus:f,onBlur:h,__experimentalShowSelectedHint:g=!1}=e,{getLabelProps:b,getToggleButtonProps:y,getMenuProps:_,getItemProps:k,isOpen:x,highlightedIndex:C,selectedItem:E}=(0,vI.L7)({initialSelectedItem:s[0],items:s,itemToString:xI,onSelectedItemChange:c,...null!=d?{selectedItem:d}:void 0,stateReducer:wI}),[S,I]=(0,v.useState)(!1);r||(0,St.default)("Constrained width styles for wp.components.CustomSelectControl",{since:"6.1",version:"6.4",hint:"Set the `__nextUnconstrainedWidth` prop to true to start opting into the new styles, which will become the default in a future version"});const T=_({className:"components-custom-select-control__menu","aria-hidden":!x}),B=(0,v.useCallback)((e=>{var t;e.stopPropagation(),null==T||null===(t=T.onKeyDown)||void 0===t||t.call(T,e)}),[T]);return null!==(t=T["aria-activedescendant"])&&void 0!==t&&t.startsWith("downshift-null")&&delete T["aria-activedescendant"],(0,v.createElement)("div",{className:w()("components-custom-select-control",o)},i?(0,v.createElement)(z_.Z,(0,Po.Z)({as:"label"},b()),l):(0,v.createElement)(vh.ar,b({className:"components-custom-select-control__label"}),l),(0,v.createElement)(kI,{__next36pxDefaultSize:n,__nextUnconstrainedWidth:r,isFocused:x||S,__unstableInputWidth:r?void 0:"auto",labelPosition:r?void 0:"top",size:u,suffix:(0,v.createElement)(yI.Z,null)},(0,v.createElement)(bI.Ph,(0,Po.Z)({onMouseOver:p,onMouseOut:m,as:"button",onFocus:function(e){I(!0),null==f||f(e)},onBlur:function(e){I(!1),null==h||h(e)},selectSize:u,__next36pxDefaultSize:n},y({"aria-label":l,"aria-labelledby":void 0,className:"components-custom-select-control__button",describedBy:a||(E?(0,N.sprintf)((0,N.__)("Currently selected: %s"),E.name):(0,N.__)("No selection"))})),xI(E),g&&E.__experimentalHint&&(0,v.createElement)("span",{className:"components-custom-select-control__hint"},E.__experimentalHint))),(0,v.createElement)("ul",(0,Po.Z)({},T,{onKeyDown:B}),x&&s.map(((e,t)=>(0,v.createElement)("li",k({item:e,index:t,key:e.key,className:w()(e.className,"components-custom-select-control__item",{"is-highlighted":t===C,"has-hint":!!e.__experimentalHint,"is-next-36px-default-size":n}),style:e.style}),e.name,e.__experimentalHint&&(0,v.createElement)("span",{className:"components-custom-select-control__item-hint"},e.__experimentalHint),e===E&&(0,v.createElement)(Vm.Z,{icon:ph.Z,className:"components-custom-select-control__item-icon"}))))))}function EI(e){return(0,v.createElement)(CI,(0,Po.Z)({},e,{__experimentalShowSelectedHint:!1}))}var SI=n(65990);const{lock:II,unlock:TI}=(0,qt.es)("I know using unstable features means my plugin or theme will inevitably break on the next WordPress release.","@wordpress/components"),NI={};II(NI,{CustomSelectControl:CI,__experimentalPopoverLegacyPositionToPlacement:SI.KF});const{CustomSelectControl:BI}=yu(NI),LI="position",PI="block-editor-hooks__position-selection__select-control__option",AI={key:"default",value:"",name:(0,N.__)("Default"),className:PI},DI={key:"sticky",value:"sticky",name:(0,N.__)("Sticky"),className:PI,__experimentalHint:(0,N.__)("The block will stick to the top of the window instead of scrolling.")},RI={key:"fixed",value:"fixed",name:(0,N.__)("Fixed"),className:PI,__experimentalHint:(0,N.__)("The block will not move when the page is scrolled.")},MI=["top","right","bottom","left"],OI=["sticky","fixed"];function ZI(e){return!!fe(e,LI)}function FI(e){var t,n;const r=null===(t=e.style)||void 0===t||null===(n=t.position)||void 0===n?void 0:n.type;return"sticky"===r||"fixed"===r}function jI(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=bp("position.fixed"),n=bp("position.sticky"),r=!t&&!n;return!ZI(e)||r}function zI(e){var t;const{attributes:{style:n={}},clientId:r,name:o,setAttributes:i}=e,l=function(e){const t=fe(e,LI);return!!(!0===t||null!=t&&t.fixed)}(o),a=function(e){const t=fe(e,LI);return!!(!0===t||null!=t&&t.sticky)}(o),s=null==n||null===(t=n.position)||void 0===t?void 0:t.type,{hasParents:c}=(0,E.Z)((e=>{const{getBlockParents:t}=e(ku);return{hasParents:t(r).length}}),[r]),u=(0,v.useMemo)((()=>{const e=[AI];return(a&&!c||s===DI.value)&&e.push(DI),(l||s===RI.value)&&e.push(RI),e}),[l,a,c,s]),d=s&&u.find((e=>e.value===s))||AI;return ci.Z.select({web:u.length>1?(0,v.createElement)(zh,{group:"position"},(0,v.createElement)(Xu.ZP,{className:"block-editor-hooks__position-selection"},(0,v.createElement)(BI,{__nextUnconstrainedWidth:!0,__next36pxDefaultSize:!0,className:"block-editor-hooks__position-selection__select-control",label:(0,N.__)("Position"),hideLabelFromVision:!0,describedBy:(0,N.sprintf)((0,N.__)("Currently selected position: %s"),d.name),options:u,value:d,__experimentalShowSelectedHint:!0,onChange:e=>{let{selectedItem:t}=e;(e=>{const t={...n,position:{...null==n?void 0:n.position,type:e,top:"sticky"===e||"fixed"===e?"0px":void 0}};i({style:yp(t)})})(t.value)},size:"__unstable-large"}))):null,native:null})}const HI=(0,Ao.o)((e=>t=>{const{name:n}=t;return[he(n,LI)&&!jI(t)&&(0,v.createElement)(zI,(0,Po.Z)({key:"position"},t)),(0,v.createElement)(e,(0,Po.Z)({key:"edit"},t))]}),"withInspectorControls"),VI=(0,Ao.o)((e=>t=>{var n,r,o,i;const{name:l,attributes:a}=t,s=he(l,LI)&&!jI(t),c=(0,dd.Z)(e),u=(0,v.useContext)(IT.__unstableElementContext);let d;s&&(d=function(e){let{selector:t,style:n}=e,r="";const{type:o}=(null==n?void 0:n.position)||{};return OI.includes(o)?(r+=`${t} {`,r+=`position: ${o};`,MI.forEach((e=>{var t;void 0!==(null==n||null===(t=n.position)||void 0===t?void 0:t[e])&&(r+=`${e}: ${n.position[e]};`)})),"sticky"!==o&&"fixed"!==o||(r+="z-index: 10"),r+="}",r):r}({selector:`.wp-container-${c}.wp-container-${c}`,style:null==a?void 0:a.style})||"");const p=w()(null==t?void 0:t.className,{[`wp-container-${c}`]:s&&!!d,[`is-position-${null==a||null===(n=a.style)||void 0===n||null===(r=n.position)||void 0===r?void 0:r.type}`]:s&&!!d&&!(null==a||null===(o=a.style)||void 0===o||null===(i=o.position)||void 0===i||!i.type)});return(0,v.createElement)(v.Fragment,null,s&&u&&!!d&&(0,b.createPortal)((0,v.createElement)("style",null,d),u),(0,v.createElement)(e,(0,Po.Z)({},t,{className:p})))}));(0,_e.KJ)("editor.BlockListBlock","core/editor/position/with-position-styles",VI),(0,_e.KJ)("editor.BlockEdit","core/editor/position/with-inspector-controls",HI);const WI={placement:"top-start"},$I={...WI,flip:!1,shift:!0},UI={...WI,flip:!0,shift:!1};function GI(e,t,n,r,o){if(!e||!t)return $I;const i=(null==n?void 0:n.scrollTop)||0,l=t.getBoundingClientRect(),a=i+e.getBoundingClientRect().top,s=e.ownerDocument.documentElement.clientHeight,c=a+r,u=l.top>c,d=l.height>s-r;return o||!u&&!d?UI:$I}function qI(e){const{__unstableGetEditorMode:t,isMultiSelecting:n,hasMultiSelection:r,isTyping:o,isBlockInterfaceHidden:i,getSettings:l,getLastMultiSelectedBlockClientId:a}=yu(e(ku));return{editorMode:t(),hasMultiSelection:r(),isMultiSelecting:n(),isTyping:o(),isBlockInterfaceHidden:i(),hasFixedToolbar:l().hasFixedToolbar,isDistractionFree:l().isDistractionFree,lastClientId:r()?a():null}}function KI(e){let{clientId:t,rootClientId:n,isEmptyDefaultBlock:r,showContents:o,capturingClientId:i,__unstablePopoverSlot:l,__unstableContentRef:a}=e;const{editorMode:s,hasMultiSelection:c,isMultiSelecting:u,isTyping:d,isBlockInterfaceHidden:p,hasFixedToolbar:m,isDistractionFree:f,lastClientId:h}=(0,E.Z)(qI,[]),g=(0,E.Z)((e=>{const{isBlockInsertionPointVisible:n,getBlockInsertionPoint:r,getBlockOrder:o}=e(ku);if(!n())return!1;const i=r();return o(i.rootClientId)[i.index]===t}),[t]),b=(0,qh.Z)("medium"),y=(0,v.useRef)(!1),{stopTyping:_}=(0,S.Z)(ku),k=!d&&"edit"===s&&r,x=!c&&("navigation"===s||"zoom-out"===s),C="edit"===s&&!m&&b&&!u&&!k&&!d&&!p,I=!("edit"!==s||C||m||f||r);(0,Dk.bx)("core/block-editor/focus-toolbar",(()=>{y.current=!0,_(!0)}),{isDisabled:!I}),(0,v.useEffect)((()=>{y.current=!1}));const T=(0,v.useRef)(),N=function(e){let{contentElement:t,clientId:n}=e;const r=L_(n),[o,i]=(0,v.useState)(0),{blockIndex:l,isSticky:a}=(0,E.Z)((e=>{const{getBlockIndex:t,getBlockAttributes:r}=e(ku);return{blockIndex:t(n),isSticky:FI(r(n))}}),[n]),s=(0,v.useMemo)((()=>{if(t)return(0,o_.Z)(t)}),[t]),[c,u]=(0,v.useState)((()=>GI(t,r,s,o,a))),d=(0,bl.Z)((e=>{i(e.offsetHeight)}),[]),p=(0,v.useCallback)((()=>u(GI(t,r,s,o,a))),[t,r,s,o]);return(0,v.useLayoutEffect)(p,[l,p]),(0,v.useLayoutEffect)((()=>{var e,n,o;if(!t||!r)return;const i=null==t||null===(e=t.ownerDocument)||void 0===e?void 0:e.defaultView;let l;null==i||null===(n=i.addEventHandler)||void 0===n||n.call(i,"resize",p);const a=null==r||null===(o=r.ownerDocument)||void 0===o?void 0:o.defaultView;return a.ResizeObserver&&(l=new a.ResizeObserver(p),l.observe(r)),()=>{var e;null==i||null===(e=i.removeEventHandler)||void 0===e||e.call(i,"resize",p),l&&l.disconnect()}}),[p,t,r]),{...c,ref:d}}({contentElement:null==a?void 0:a.current,clientId:t});return k?(0,v.createElement)(mE,(0,Po.Z)({clientId:i||t,__unstableCoverTarget:!0,bottomClientId:h,className:w()("block-editor-block-list__block-side-inserter-popover",{"is-insertion-point-visible":g}),__unstablePopoverSlot:l,__unstableContentRef:a,resize:!1,shift:!1},N),(0,v.createElement)("div",{className:"block-editor-block-list__empty-block-inserter"},(0,v.createElement)(rE,{position:"bottom right",rootClientId:n,clientId:t,__experimentalIsQuick:!0}))):x||C?(0,v.createElement)(mE,(0,Po.Z)({clientId:i||t,bottomClientId:h,className:w()("block-editor-block-list__block-popover",{"is-insertion-point-visible":g}),__unstablePopoverSlot:l,__unstableContentRef:a,resize:!1},N),C&&o&&(0,v.createElement)(gI,{focusOnMount:y.current,__experimentalInitialIndex:T.current,__experimentalOnIndexChange:e=>{T.current=e},key:t}),x&&(0,v.createElement)(RE,{clientId:t,rootClientId:n})):null}function YI(e){const{getSelectedBlockClientId:t,getFirstMultiSelectedBlockClientId:n,getBlockRootClientId:r,getBlock:o,getBlockParents:i,getSettings:l,isNavigationMode:a,__experimentalGetBlockListSettingsForBlocks:s}=e(ku),c=t()||n();if(!c)return;const{name:u,attributes:d={}}=o(c)||{},p=i(c),m=s(p),f=p.find((e=>{var t;return null===(t=m[e])||void 0===t?void 0:t.__experimentalCaptureToolbars})),h=l();return{clientId:c,rootClientId:r(c),name:u,isDistractionFree:h.isDistractionFree,isNavigationMode:a(),isEmptyDefaultBlock:u&&Me({name:u,attributes:d}),capturingClientId:f}}function XI(e){let{__unstablePopoverSlot:t,__unstableContentRef:n}=e;const r=(0,E.Z)(YI,[]);if(!r)return null;const{clientId:o,rootClientId:i,name:l,isEmptyDefaultBlock:a,capturingClientId:s,isDistractionFree:c,isNavigationMode:u}=r;return l?(0,v.createElement)(KI,{clientId:o,rootClientId:i,isEmptyDefaultBlock:a,showContents:!c||u,capturingClientId:s,__unstablePopoverSlot:t,__unstableContentRef:n}):null}function JI(e){let{children:t}=e;const n=(0,v.useContext)(gE),r=(0,v.useContext)(kk.Context);return n||r?t:((0,St.default)('wp.components.Popover.Slot name="block-toolbar"',{alternative:"wp.blockEditor.BlockTools",since:"5.8",version:"6.3"}),(0,v.createElement)(bE,{__unstablePopoverSlot:"block-toolbar"},(0,v.createElement)(XI,{__unstablePopoverSlot:"block-toolbar"}),t))}var QI=(0,Ao.o)((e=>t=>{const{clientId:n}=Su();return(0,v.createElement)(e,(0,Po.Z)({},t,{clientId:n}))}),"withClientId"),eT=QI((e=>{let{clientId:t,showSeparator:n,isFloating:r,onAddBlock:o,isToggle:i}=e;return(0,v.createElement)(lE,{className:w()({"block-list-appender__toggle":i}),rootClientId:t,showSeparator:n,isFloating:r,onAddBlock:o})})),tT=(0,eg.Z)([QI,(0,Jh.Z)(((e,t)=>{let{clientId:n}=t;const{getBlockOrder:r}=e(ku),o=r(n);return{lastBlockClientId:o[o.length-1]}}))])((e=>{let{clientId:t}=e;return(0,v.createElement)(oE,{rootClientId:t})}));const nT=new WeakMap;var rT=n(66344);function oT(e,t,n){const r=(0,rT.Pr)((()=>Mx(e,null!=t?t:0,n)),[e,t,n]);return(0,v.useEffect)((()=>()=>r.cancel()),[r]),r}function iT(e){const t=(0,v.useRef)();return t.current=e,t}function lT(e){let{isDisabled:t,onDrop:n,onDragStart:r,onDragEnter:o,onDragLeave:i,onDragEnd:l,onDragOver:a}=e;const s=iT(n),c=iT(r),u=iT(o),d=iT(i),p=iT(l),m=iT(a);return(0,bl.Z)((e=>{if(t)return;let n=!1;const{ownerDocument:r}=e;function o(e){n||(n=!0,r.addEventListener("dragend",h),r.addEventListener("mousemove",h),c.current&&c.current(e))}function i(t){t.preventDefault(),e.contains(t.relatedTarget)||u.current&&u.current(t)}function l(e){!e.defaultPrevented&&m.current&&m.current(e),e.preventDefault()}function a(t){(function(t){const{defaultView:n}=r;if(!(t&&n&&t instanceof n.HTMLElement&&e.contains(t)))return!1;let o=t;do{if(o.dataset.isDropZone)return o===e}while(o=o.parentElement);return!1})(t.relatedTarget)||d.current&&d.current(t)}function f(e){e.defaultPrevented||(e.preventDefault(),e.dataTransfer&&e.dataTransfer.files.length,s.current&&s.current(e),h(e))}function h(e){n&&(n=!1,r.removeEventListener("dragend",h),r.removeEventListener("mousemove",h),p.current&&p.current(e))}return e.dataset.isDropZone="true",e.addEventListener("drop",f),e.addEventListener("dragenter",i),e.addEventListener("dragover",l),e.addEventListener("dragleave",a),r.addEventListener("dragenter",o),()=>{delete e.dataset.isDropZone,e.removeEventListener("drop",f),e.removeEventListener("dragenter",i),e.removeEventListener("dragover",l),e.removeEventListener("dragleave",a),r.removeEventListener("dragend",h),r.removeEventListener("mousemove",h),r.removeEventListener("dragenter",o)}}),[t])}var aT=n(69793);function sT(e,t,n,r,o,i,l){return a=>{const{srcRootClientId:s,srcClientIds:c,type:u,blocks:d}=function(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}(a);if("inserter"===u){l();const e=d.map((e=>Ce(e)));i(e,!0,null)}if("block"===u){const i=n(c[0]);if(s===e&&i===t)return;if(c.includes(e)||r(c).some((t=>t===e)))return;const l=s===e,a=c.length;o(c,s,l&&i<t?t-a:t)}}}function cT(e,t,n,r,o,i){return t=>{if(!n)return;const l=Ne(Be("from"),(n=>"files"===n.type&&o(n.blockName,e)&&n.isMatch(t)));if(l){const e=l.transform(t,r);i(e)}}}function uT(e,t,n){return e=>{const t=No({HTML:e,mode:"BLOCKS"});t.length&&n(t)}}function dT(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{operation:r="insert"}=n,o=(0,E.Z)((e=>e(ku).getSettings().mediaUpload),[]),{canInsertBlockType:i,getBlockIndex:l,getClientIdsOfDescendants:a,getBlockOrder:s,getBlocksByClientId:c}=(0,E.Z)(ku),{insertBlocks:u,moveBlocksToPosition:d,updateBlockAttributes:p,clearSelectedBlock:m,replaceBlocks:f,removeBlocks:h}=(0,S.Z)(ku),g=(0,yl.Z)(),b=(0,v.useCallback)((function(n){let o=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if("replace"===r){const r=s(e)[t];f(r,n,void 0,i)}else u(n,t,e,o,i)}),[r,s,u,f,t,e]),y=(0,v.useCallback)(((n,o,i)=>{if("replace"===r){const r=c(n),o=s(e)[t];g.batch((()=>{h(n,!1),f(o,r,void 0,0)}))}else d(n,o,e,i)}),[r,s,c,u,d,h,t,e]),_=sT(e,t,l,a,y,b,m),k=cT(e,0,o,p,i,b),x=uT(0,0,b);return e=>{const t=(0,aT.f)(e.dataTransfer),n=e.dataTransfer.getData("text/html");n?x(n):t.length?k(t):_(e)}}function pT(e,t,n){const r="top"===n||"bottom"===n,{x:o,y:i}=e,l=r?o:i,a=r?i:o,s=r?t.left:t.top,c=r?t.right:t.bottom,u=t[n];let d;return d=l>=s&&l<=c?l:l<c?s:c,Math.sqrt((l-d)**2+(a-u)**2)}function mT(e,t){let n,r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:["top","bottom","left","right"];return o.forEach((o=>{const i=pT(e,t,o);(void 0===n||i<n)&&(n=i,r=o)})),[n,r]}function fT(e,t){return t.left<=e.x&&t.right>=e.x&&t.top<=e.y&&t.bottom>=e.y}function hT(e,t){var n,r;let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"vertical";const i="horizontal"===o?["left","right"]:["top","bottom"],l=(0,N.isRTL)();let a=0,s="before",c=1/0;e.forEach((e=>{let{isUnmodifiedDefaultBlock:n,getBoundingClientRect:r,blockIndex:o}=e;const u=r();let[d,p]=mT(t,u,i);n&&fT(t,u)&&(d=0),d<c&&(s="bottom"===p||!l&&"right"===p||l&&"left"===p?"after":"before",c=d,a=o)}));const u=a+("after"===s?1:-1),d=!(null===(n=e[a])||void 0===n||!n.isUnmodifiedDefaultBlock),p=!(null===(r=e[u])||void 0===r||!r.isUnmodifiedDefaultBlock);return d||p?[d?a:u,"replace"]:["after"===s?a+1:a,"insert"]}function gT(){let{rootClientId:e=""}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const[t,n]=(0,v.useState)({index:null,operation:"insert"}),r=(0,E.Z)((t=>{const{getTemplateLock:n,__unstableIsWithinBlockOverlay:r,__unstableHasActiveBlockOverlayActive:o}=t(ku),i=n(e);return["all","contentOnly"].some((e=>e===i))||o(e)||r(e)}),[e]),{getBlockListSettings:o,getBlocks:i,getBlockIndex:l}=(0,E.Z)(ku),{showInsertionPoint:a,hideInsertionPoint:s}=(0,S.Z)(ku),c=dT(e,t.index,{operation:t.operation}),u=oT((0,v.useCallback)(((t,r)=>{var s;const c=i(e);if(0===c.length)return void n({index:0,operation:"insert"});const u=c.map((e=>{const t=e.clientId;return{isUnmodifiedDefaultBlock:Me(e),getBoundingClientRect:()=>r.getElementById(`block-${t}`).getBoundingClientRect(),blockIndex:l(t)}})),[d,p]=hT(u,{x:t.clientX,y:t.clientY},null===(s=o(e))||void 0===s?void 0:s.orientation);n({index:d,operation:p}),a(e,d,{operation:p})}),[e]),200);return lT({isDisabled:r,onDrop:c,onDragOver(e){u(e,e.currentTarget.ownerDocument)},onDragLeave(){u.cancel(),s()},onDragEnd(){u.cancel(),s()}})}const vT={};function bT(e){const{clientId:t,allowedBlocks:n,__experimentalDefaultBlock:r,__experimentalDirectInsert:o,template:i,templateLock:l,wrapperRef:a,templateInsertUpdatesSelection:s,__experimentalCaptureToolbars:c,__experimentalAppenderTagName:u,renderAppender:d,orientation:p,placeholder:m,layout:f}=e;!function(e,t,n,r,o,i,l,a){const{updateBlockListSettings:s}=(0,S.Z)(ku),c=(0,yl.Z)(),{blockListSettings:u,parentLock:d}=(0,E.Z)((t=>{const n=t(ku).getBlockRootClientId(e);return{blockListSettings:t(ku).getBlockListSettings(e),parentLock:t(ku).getTemplateLock(n)}}),[e]),p=(0,v.useMemo)((()=>t),t);(0,v.useLayoutEffect)((()=>{const t={allowedBlocks:p,templateLock:void 0===o||"contentOnly"===d?d:o};if(void 0!==i&&(t.__experimentalCaptureToolbars=i),void 0!==l)t.orientation=l;else{const e=Sf(null==a?void 0:a.type);t.orientation=e.getOrientation(a)}void 0!==n&&(t.__experimentalDefaultBlock=n),void 0!==r&&(t.__experimentalDirectInsert=r),(0,fn.ZP)(u,t)||(nT.get(c)||nT.set(c,[]),nT.get(c).push([e,t]),window.queueMicrotask((()=>{var e;null!==(e=nT.get(c))&&void 0!==e&&e.length&&c.batch((()=>{nT.get(c).forEach((e=>{s(...e)})),nT.set(c,[])}))})))}),[e,u,p,n,r,o,d,i,l,s,a,c])}(t,n,r,o,l,c,p,f),function(e,t,n,r){const{getBlocks:o,getSelectedBlocksInitialCaretPosition:i,isBlockSelected:l}=(0,E.Z)(ku),{replaceInnerBlocks:a,__unstableMarkNextChangeAsNotPersistent:s}=(0,S.Z)(ku),{innerBlocks:c}=(0,E.Z)((t=>({innerBlocks:t(ku).getBlocks(e)})),[e]),u=(0,v.useRef)(null);(0,v.useLayoutEffect)((()=>{let c=!1;return window.queueMicrotask((()=>{if(c)return;const d=o(e),p=0===d.length||"all"===n||"contentOnly"===n,m=!An()(t,u.current);if(!p||!m)return;u.current=t;const f=Lo(d,t);An()(f,d)||(s(),a(e,f,0===d.length&&r&&0!==f.length&&l(e),i()))})),()=>{c=!0}}),[c,t,n,e])}(t,i,l,s);const h=function(e){return(0,E.Z)((t=>{const n=t(ku).getBlock(e);if(!n)return;const r=t(Xt).getBlockType(n.name);return r&&0!==Object.keys(r.providesContext).length?Object.fromEntries(Object.entries(r.providesContext).map((e=>{let[t,r]=e;return[t,n.attributes[r]]}))):void 0}),[e])}(t),g=fe((0,E.Z)((e=>{var n;return null===(n=e(ku).getBlock(t))||void 0===n?void 0:n.name}),[t]),"__experimentalLayout")||vT,{allowSizingOnChildren:b=!1}=g,y=bp("layout")||vT,_=f||g,k=(0,v.useMemo)((()=>({...y,..._,...b&&{allowSizingOnChildren:!0}})),[y,_,b]);return(0,v.createElement)(ig,{value:h},(0,v.createElement)(NT,{rootClientId:t,renderAppender:d,__experimentalAppenderTagName:u,__experimentalLayout:k,wrapperRef:a,placeholder:m}))}function yT(e){return mk(e),(0,v.createElement)(bT,e)}const _T=(0,v.forwardRef)(((e,t)=>{const n=kT({ref:t},e);return(0,v.createElement)("div",{className:"block-editor-inner-blocks"},(0,v.createElement)("div",n))}));function kT(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{__unstableDisableLayoutClassNames:n,__unstableDisableDropZone:r}=t,{clientId:o,layout:i=null,__unstableLayoutClassNames:l=""}=Su(),a=(0,qh.Z)("medium","<"),{__experimentalCaptureToolbars:s,hasOverlay:c}=(0,E.Z)((e=>{if(!o)return{};const{getBlockName:t,isBlockSelected:n,hasSelectedInnerBlock:r,__unstableGetEditorMode:i}=e(ku),l=t(o),s="navigation"===i()||a;return{__experimentalCaptureToolbars:e(Xt).hasBlockSupport(l,"__experimentalExposeControlsToChildren",!1),hasOverlay:"core/template"!==l&&!n(o)&&!r(o,!0)&&s}}),[o,a]),u=gT({rootClientId:o}),d=(0,vl.Z)([e.ref,r?null:u]),p={__experimentalCaptureToolbars:s,layout:i,...t},m=p.value&&p.onChange?yT:bT;return{...e,ref:d,className:w()(e.className,"block-editor-block-list__layout",n?"":l,{"has-overlay":c}),children:o?(0,v.createElement)(m,(0,Po.Z)({},p,{clientId:o})):(0,v.createElement)(NT,t)}}kT.save=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{innerBlocks:t}=yn,n=Cn(t,{isInnerBlocks:!0}),r=(0,v.createElement)(pn.Z,null,n);return{...e,children:r}},_T.DefaultBlockAppender=tT,_T.ButtonBlockAppender=eT,_T.Content=()=>kT.save().children;var xT=_T;const wT=(0,v.createContext)(),CT=(0,v.createContext)(),ET=new WeakMap;function ST(e){let{className:t,...n}=e;const[r,o]=(0,v.useState)(),i=(0,qh.Z)("medium"),{isOutlineMode:l,isFocusMode:a,editorMode:s}=(0,E.Z)((e=>{const{getSettings:t,__unstableGetEditorMode:n}=e(ku),{outlineMode:r,focusMode:o}=t();return{isOutlineMode:r,isFocusMode:o,editorMode:n()}}),[]),c=(0,yl.Z)(),{setBlockVisibility:u}=(0,S.Z)(ku),d=(0,Kh.Z)((0,v.useCallback)((()=>{const e={};ET.get(c).forEach((t=>{let[n,r]=t;e[n]=r})),u(e)}),[c]),300,{trailing:!0}),p=(0,v.useMemo)((()=>{const{IntersectionObserver:e}=window;if(e)return new e((e=>{ET.get(c)||ET.set(c,[]);for(const t of e){const e=t.target.getAttribute("data-block");ET.get(c).push([e,t.isIntersecting])}d()}))}),[]),m=kT({ref:(0,vl.Z)([xk(),yE(),o]),className:w()("is-root-container",t,{"is-outline-mode":l,"is-focus-mode":a&&i,"is-navigate-mode":"navigation"===s})},n);return(0,v.createElement)(wT.Provider,{value:r},(0,v.createElement)(CT.Provider,{value:p},(0,v.createElement)("div",m)))}function IT(e){return function(){const{patterns:e,isPreviewMode:t}=(0,E.Z)((e=>{const{__experimentalBlockPatterns:t,__unstableIsPreviewMode:n}=e(ku).getSettings();return{patterns:t,isPreviewMode:n}}),[]);(0,v.useEffect)((()=>{if(t)return;if(null==e||!e.length)return;let n,r=-1;const o=()=>{r++,r>=e.length||((0,$.select)(ku).__experimentalGetParsedPattern(e[r].name),n=_E(o))};return n=_E(o),()=>kE(n)}),[e,t])}(),(0,v.createElement)(JI,null,(0,v.createElement)(Eu,{value:wu},(0,v.createElement)(ST,e)))}function TT(e){let{placeholder:t,rootClientId:n,renderAppender:r,__experimentalAppenderTagName:o,__experimentalLayout:i=If}=e;const{order:l,selectedBlocks:a,visibleBlocks:s}=(0,E.Z)((e=>{const{getBlockOrder:t,getSelectedBlockClientIds:r,__unstableGetVisibleBlocks:o}=e(ku);return{order:t(n),selectedBlocks:r(),visibleBlocks:o()}}),[n]);return(0,v.createElement)(Nf,{value:i},l.map((e=>(0,v.createElement)(Gh.ZP,{key:e,value:!s.has(e)&&!a.includes(e)},(0,v.createElement)(F_,{rootClientId:n,clientId:e})))),l.length<1&&t,(0,v.createElement)(sE,{tagName:o,rootClientId:n,renderAppender:r}))}function NT(e){return(0,v.createElement)(Gh.ZP,{value:!1},(0,v.createElement)(TT,e))}IT.__unstableElementContext=wT;const BT=/^([\d.\-+]*)\s*(fr|cm|mm|Q|in|pc|pt|px|em|ex|ch|rem|lh|vw|vh|vmin|vmax|%|cap|ic|rlh|vi|vb|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?$/,LT=["top","right","bottom","left"],PT=["color","style","width"],AT=e=>!e||!PT.some((t=>void 0!==e[t])),DT=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).some((e=>-1!==LT.indexOf(e)))},RT=e=>{if(!DT(e))return!1;const t=LT.map((t=>MT(null==e?void 0:e[t])));return!t.every((e=>e===t[0]))},MT=(e,t)=>{if(AT(e))return t;const{color:n,style:r,width:o}=t||{},{color:i=n,style:l=r,width:a=o}=e;return[a,a&&"0"!==a||i?l||"solid":l,i].filter(Boolean).join(" ")},OT=e=>function(e){if(0===e.length)return;const t={};let n,r=0;return e.forEach((e=>{t[e]=void 0===t[e]?1:t[e]+1,t[e]>r&&(n=e,r=t[e])})),n}(e.map((e=>void 0===e?void 0:function(e){const t=e.trim().match(BT);if(!t)return[void 0,void 0];const[,n,r]=t;let o=parseFloat(n);return o=Number.isNaN(o)?void 0:o,[o,r]}(`${e}`)[1])).filter((e=>void 0!==e))),ZT=()=>{};var FT=(0,Ku.Iq)(((e,t)=>{const{children:n,isShown:r,shouldRenderPlaceholder:o,...i}=function(e){var t,n,r;const{className:o,hasValue:i,isShownByDefault:l=!1,label:a,panelId:s,resetAllFilter:c=ZT,onDeselect:u,onSelect:d,...p}=(0,qu.y)(e,"ToolsPanelItem"),{panelId:m,menuItems:f,registerResetAllFilter:h,deregisterResetAllFilter:g,registerPanelItem:b,deregisterPanelItem:y,flagItemCustomization:_,isResetting:k,shouldRenderPlaceholderItems:x,firstDisplayedItem:w,lastDisplayedItem:C,__experimentalFirstVisibleItemClass:E,__experimentalLastVisibleItemClass:S}=eh(),I=(0,v.useCallback)(i,[s,i]),T=(0,v.useCallback)(c,[s,c]),N=(0,pd.Z)(m),B=m===s||null===m;(0,v.useEffect)((()=>(B&&null!==N&&b({hasValue:I,isShownByDefault:l,label:a,panelId:s}),()=>{(null===N&&m||m===s)&&y(a)})),[m,B,l,a,I,s,N,b,y]),(0,v.useEffect)((()=>(B&&h(T),()=>{B&&g(T)})),[h,g,T,B]);const L=l?"default":"optional",P=null==f||null===(t=f[L])||void 0===t?void 0:t[a],A=(0,pd.Z)(P),D=void 0!==(null==f||null===(n=f[L])||void 0===n?void 0:n[a]),R=i(),M=(0,pd.Z)(R),O=R&&!M;(0,v.useEffect)((()=>{O&&(l||null===m)&&_(a,L)}),[m,O,l,L,a,_]),(0,v.useEffect)((()=>{D&&!k&&B&&(!P||R||A||null==d||d(),!P&&A&&(null==u||u()))}),[B,P,D,k,R,A,d,u]);const Z=l?void 0!==(null==f||null===(r=f[L])||void 0===r?void 0:r[a]):P,F=(0,Yu.I)(),j=(0,v.useMemo)((()=>F(xh,x&&!Z&&wh,o,w===a&&E,C===a&&S)),[Z,x,o,F,w,C,E,S,a]);return{...p,isShown:Z,shouldRenderPlaceholder:x,className:j}}(e);return r?(0,v.createElement)(md.Z,(0,Po.Z)({},i,{ref:t}),n):o?(0,v.createElement)(md.Z,(0,Po.Z)({},i,{ref:t})):null}),"ToolsPanelItem"),jT=n(12234),zT=n(59067);const HT=(0,Qu.iv)("",""),VT={name:"bjn8wh",styles:"position:relative"},WT=e=>{const{color:t=ed.D.gray[200],style:n="solid",width:r=td.Z.borderWidth}=e||{};return`${t} ${r&&"0"!==r||t?n||"solid":n} ${r!==td.Z.borderWidth?`clamp(1px, ${r}, 10px)`:r}`},$T={name:"1nwbfnf",styles:"grid-column:span 2;margin:0 auto"};var UT=(0,Ku.Iq)(((e,t)=>{const{className:n,isLinked:r,...o}=function(e){const{className:t,size:n="default",...r}=(0,qu.y)(e,"BorderBoxControlLinkedButton"),o=(0,Yu.I)();return{...r,className:(0,v.useMemo)((()=>o((e=>(0,Qu.iv)("position:absolute;top:","__unstable-large"===e?"8px":"3px",";",(0,nm.b)({right:0})()," line-height:0;",""))(n),t)),[t,o,n])}}(e),i=r?(0,N.__)("Unlink sides"):(0,N.__)("Link sides");return(0,v.createElement)(Ld.Z,{text:i},(0,v.createElement)(md.Z,{className:n},(0,v.createElement)(Mo.ZP,(0,Po.Z)({},o,{isSmall:!0,icon:r?jT.Z:zT.Z,iconSize:24,"aria-label":i,ref:t}))))}),"BorderBoxControlLinkedButton");var GT=(0,Ku.Iq)(((e,t)=>{const{value:n,...r}=function(e){const{className:t,value:n,size:r="default",...o}=(0,qu.y)(e,"BorderBoxControlVisualizer"),i=(0,Yu.I)();return{...o,className:(0,v.useMemo)((()=>i(((e,t)=>(0,Qu.iv)("position:absolute;top:","__unstable-large"===t?"20px":"15px",";right:","__unstable-large"===t?"39px":"29px",";bottom:","__unstable-large"===t?"20px":"15px",";left:","__unstable-large"===t?"39px":"29px",";border-top:",WT(null==e?void 0:e.top),";border-bottom:",WT(null==e?void 0:e.bottom),";",(0,nm.b)({borderLeft:WT(null==e?void 0:e.left)})()," ",(0,nm.b)({borderRight:WT(null==e?void 0:e.right)})(),";",""))(n,r),t)),[i,t,n,r]),value:n}}(e);return(0,v.createElement)(md.Z,(0,Po.Z)({},r,{ref:t}))}),"BorderBoxControlVisualizer"),qT=n(15128),KT=n(89552),YT=n(38189),XT=n(24619),JT=n(31334);const QT={name:"f3vz0n",styles:"font-weight:500"},eN=(0,Qu.iv)("box-shadow:inset 0 0 0 ",td.Z.borderWidth," ",ed.D.ui.borderFocus,";",""),tN=(0,Qu.iv)("border:0;padding:0;margin:0;",JT.p,";",""),nN=(0,Qu.iv)(Rm,"{flex:0 0 auto;}",""),rN=(0,Qu.iv)("width:",228,"px;>div:first-of-type>",vh.ar,"{margin-bottom:0;",QT,";}&& ",vh.ar,"+button:not( .has-text ){min-width:24px;padding:0;}",""),oN=(0,Qu.iv)("",""),iN=(0,Qu.iv)("",""),lN=(0,Qu.iv)("justify-content:center;width:100%;&&{border-top:",td.Z.borderWidth," solid ",ed.D.gray[200],";border-top-left-radius:0;border-top-right-radius:0;height:46px;}",""),aN=(0,Qu.iv)(vh.ar,"{",QT,";}",""),sN={name:"1486260",styles:"&&&&&{min-width:30px;width:30px;height:30px;padding:3px;}"},cN=[{label:(0,N.__)("Solid"),icon:KT.Z,value:"solid"},{label:(0,N.__)("Dashed"),icon:YT.Z,value:"dashed"},{label:(0,N.__)("Dotted"),icon:XT.Z,value:"dotted"}],uN=e=>{const{label:t,hideLabelFromVision:n}=e;return t?n?(0,v.createElement)(z_.Z,{as:"label"},t):(0,v.createElement)(vh.ar,null,t):null};var dN=(0,Ku.Iq)(((e,t)=>{const{buttonClassName:n,hideLabelFromVision:r,label:o,onChange:i,value:l,...a}=function(e){const{className:t,...n}=(0,qu.y)(e,"BorderControlStylePicker"),r=(0,Yu.I)();return{...n,className:(0,v.useMemo)((()=>r(aN,t)),[t,r]),buttonClassName:(0,v.useMemo)((()=>r(sN)),[r])}}(e);return(0,v.createElement)(md.Z,(0,Po.Z)({},a,{ref:t}),(0,v.createElement)(uN,{label:o,hideLabelFromVision:r}),(0,v.createElement)(Uu.Z,{justify:"flex-start",gap:1},cN.map((e=>(0,v.createElement)(Mo.ZP,{key:e.value,className:n,icon:e.icon,isSmall:!0,isPressed:e.value===l,onClick:()=>i(e.value===l?void 0:e.value),"aria-label":e.label,label:e.label,showTooltip:!0})))))}),"BorderControlStylePicker"),pN=(0,v.forwardRef)((function(e,t){const{className:n,colorValue:r,...o}=e;return(0,v.createElement)("span",(0,Po.Z)({className:w()("component-color-indicator",n),style:{background:r},ref:t},o))})),mN=n(38241);function fN(e,t,n){return"number"!=typeof e?null:parseFloat(`${Im(e,t,n)}`)}const hN=()=>(0,Qu.iv)({height:30,minHeight:30},"",""),gN=(0,Ju.Z)("div",{target:"e1epgpqk14"})({name:"1se47kl",styles:"-webkit-tap-highlight-color:transparent;align-items:flex-start;display:flex;justify-content:flex-start;padding:0;position:relative;touch-action:none;width:100%"}),vN=(0,Ju.Z)("div",{target:"e1epgpqk13"})("display:block;flex:1;position:relative;width:100%;",(e=>{let{color:t=ed.D.ui.borderFocus}=e;return(0,Qu.iv)({color:t},"","")}),";",hN,";",(e=>{let{marks:t,__nextHasNoMarginBottom:n}=e;return n?"":(0,Qu.iv)({marginBottom:t?16:void 0},"","")}),";"),bN=(0,Ju.Z)("span",{target:"e1epgpqk12"})("display:flex;margin-top:",4,"px;",(0,nm.b)({marginRight:6}),";"),yN=(0,Ju.Z)("span",{target:"e1epgpqk11"})("display:flex;margin-top:",4,"px;",(0,nm.b)({marginLeft:6}),";"),_N=(0,Ju.Z)("span",{target:"e1epgpqk10"})("background-color:",ed.D.gray[300],";left:0;pointer-events:none;right:0;display:block;height:",4,"px;position:absolute;margin-top:",13,"px;top:0;border-radius:",4,"px;",(e=>{let{disabled:t,railColor:n}=e,r=n||"";return t&&(r=ed.D.ui.backgroundDisabled),(0,Qu.iv)({background:r},"","")}),";"),kN=(0,Ju.Z)("span",{target:"e1epgpqk9"})("background-color:currentColor;border-radius:",4,"px;height:",4,"px;pointer-events:none;display:block;position:absolute;margin-top:",13,"px;top:0;",(e=>{let{disabled:t,trackColor:n}=e,r=n||"currentColor";return t&&(r=ed.D.gray[400]),(0,Qu.iv)({background:r},"","")}),";"),xN=(0,Ju.Z)("span",{target:"e1epgpqk8"})({name:"l7tjj5",styles:"display:block;pointer-events:none;position:relative;width:100%;user-select:none"}),wN=(0,Ju.Z)("span",{target:"e1epgpqk7"})("height:",12,"px;left:0;position:absolute;top:-4px;width:1px;",(e=>{let{disabled:t,isFilled:n}=e,r=n?"currentColor":ed.D.gray[300];return t&&(r=ed.D.gray[400]),(0,Qu.iv)({backgroundColor:r},"","")}),";"),CN=(0,Ju.Z)("span",{target:"e1epgpqk6"})("color:",ed.D.gray[300],";left:0;font-size:11px;position:absolute;top:12px;transform:translateX( -50% );white-space:nowrap;",(e=>{let{isFilled:t}=e;return(0,Qu.iv)({color:t?ed.D.gray[700]:ed.D.gray[300]},"","")}),";"),EN=e=>{let{disabled:t}=e;return t?(0,Qu.iv)("background-color:",ed.D.gray[400],";",""):(0,Qu.iv)("background-color:",ed.D.ui.theme,";","")},SN=(0,Ju.Z)("span",{target:"e1epgpqk5"})("align-items:center;display:flex;height:",12,"px;justify-content:center;margin-top:",9,"px;outline:0;pointer-events:none;position:absolute;top:0;user-select:none;width:",12,"px;border-radius:50%;",EN,";",(0,nm.b)({marginLeft:-10}),";",(0,nm.b)({transform:"translateX( 4.5px )"},{transform:"translateX( -4.5px )"}),";"),IN=(0,Ju.Z)("span",{target:"e1epgpqk4"})("align-items:center;border-radius:50%;height:100%;outline:0;position:absolute;user-select:none;width:100%;",EN,";",(e=>{let{isFocused:t}=e;return t?(0,Qu.iv)("&::before{content:' ';position:absolute;background-color:",ed.D.ui.theme,";opacity:0.4;border-radius:50%;height:",20,"px;width:",20,"px;top:-4px;left:-4px;}",""):""}),";"),TN=(0,Ju.Z)("input",{target:"e1epgpqk3"})("box-sizing:border-box;cursor:pointer;display:block;height:100%;left:0;margin:0 -",6,"px;opacity:0;outline:none;position:absolute;right:0;top:0;width:calc( 100% + ",12,"px );");var NN={name:"1cypxip",styles:"top:-80%"},BN={name:"1lr98c4",styles:"bottom:-80%"};const LN=(0,Ju.Z)("span",{target:"e1epgpqk2"})("background:rgba( 0, 0, 0, 0.8 );border-radius:2px;color:white;display:inline-block;font-size:12px;min-width:32px;opacity:0;padding:4px 8px;pointer-events:none;position:absolute;text-align:center;transition:opacity 120ms ease;user-select:none;line-height:1.4;",(e=>{let{show:t}=e;return(0,Qu.iv)({opacity:t?1:0},"","")}),";",(e=>{let{position:t}=e;return"bottom"===t?BN:NN}),";",nd("transition"),";",(0,nm.b)({transform:"translateX(-50%)"},{transform:"translateX(50%)"}),";"),PN=(0,Ju.Z)(Dm,{target:"e1epgpqk1"})("display:inline-block;font-size:13px;margin-top:0;width:",(0,hm.D)(16),"!important;input[type='number']&{",hN,";}",(0,nm.b)({marginLeft:`${(0,hm.D)(4)} !important`}),";"),AN=(0,Ju.Z)("span",{target:"e1epgpqk0"})("display:block;margin-top:0;button,button.is-small{margin-left:0;",hN,";}",(0,nm.b)({marginLeft:8}),";");var DN=(0,v.forwardRef)((function(e,t){const{describedBy:n,label:r,value:o,...i}=e;return(0,v.createElement)(TN,(0,Po.Z)({},i,{"aria-describedby":n,"aria-label":r,"aria-hidden":!1,ref:t,tabIndex:0,type:"range",value:o}))}));function RN(e){const{className:t,isFilled:n=!1,label:r,style:o={},...i}=e,l=w()("components-range-control__mark",n&&"is-filled",t),a=w()("components-range-control__mark-label",n&&"is-filled");return(0,v.createElement)(v.Fragment,null,(0,v.createElement)(wN,(0,Po.Z)({},i,{"aria-hidden":"true",className:l,isFilled:n,style:o})),r&&(0,v.createElement)(CN,{"aria-hidden":"true",className:a,isFilled:n,style:o},r))}function MN(e){const{disabled:t=!1,marks:n=!1,min:r=0,max:o=100,step:i=1,value:l=0,...a}=e;return(0,v.createElement)(v.Fragment,null,(0,v.createElement)(_N,(0,Po.Z)({disabled:t},a)),n&&(0,v.createElement)(ON,{disabled:t,marks:n,min:r,max:o,step:i,value:l}))}function ON(e){const{disabled:t=!1,marks:n=!1,min:r=0,max:o=100,step:i=1,value:l=0}=e,a=function(e){let{marks:t,min:n=0,max:r=100,step:o=1,value:i=0}=e;if(!t)return[];const l=r-n;if(!Array.isArray(t)){t=[];const e=1+Math.round(l/o);for(;e>t.push({value:o*t.length+n}););}const a=[];return t.forEach(((e,t)=>{if(e.value<n||e.value>r)return;const o=`mark-${t}`,s=e.value<=i,c=(e.value-n)/l*100+"%",u={[(0,N.isRTL)()?"right":"left"]:c};a.push({...e,isFilled:s,key:o,style:u})})),a}({marks:n,min:r,max:o,step:"any"===i?1:i,value:l});return(0,v.createElement)(xN,{"aria-hidden":"true",className:"components-range-control__marks"},a.map((e=>(0,v.createElement)(RN,(0,Po.Z)({},e,{key:e.key,"aria-hidden":"true",disabled:t})))))}function ZN(e){const{className:t,inputRef:n,tooltipPosition:r,show:o=!1,style:i={},value:l=0,renderTooltipContent:a=(e=>e),zIndex:s=100,...c}=e,u=function(e){let{inputRef:t,tooltipPosition:n}=e;const[r,o]=(0,v.useState)(),i=(0,v.useCallback)((()=>{t&&t.current&&o(n)}),[n,t]);return(0,v.useEffect)((()=>{i()}),[i]),(0,v.useEffect)((()=>(window.addEventListener("resize",i),()=>{window.removeEventListener("resize",i)}))),r}({inputRef:n,tooltipPosition:r}),d=w()("components-simple-tooltip",t),p={...i,zIndex:s};return(0,v.createElement)(LN,(0,Po.Z)({},c,{"aria-hidden":o,className:d,position:u,show:o,role:"tooltip",style:p}),a(l))}const FN=()=>{},jN=(0,v.forwardRef)((function e(t,n){var r;const{__nextHasNoMarginBottom:o=!1,afterIcon:i,allowReset:l=!1,beforeIcon:a,className:s,color:c=ed.D.ui.theme,currentInput:u,disabled:d=!1,help:p,hideLabelFromVision:m=!1,initialPosition:f,isShiftStepEnabled:h=!0,label:g,marks:b=!1,max:y=100,min:_=0,onBlur:k=FN,onChange:x=FN,onFocus:C=FN,onMouseLeave:E=FN,onMouseMove:S=FN,railColor:I,renderTooltipContent:T=(e=>e),resetFallbackValue:B,shiftStep:L=10,showTooltip:P,step:A=1,trackColor:D,value:R,withInputField:M=!0,...O}=t,[Z,F]=function(e){const{min:t,max:n,value:r,initial:o}=e,[i,l]=(0,jm.Z)(fN(r,t,n),{initial:fN(null!=o?o:null,t,n),fallback:null});return[i,(0,v.useCallback)((e=>{l(null===e?null:fN(e,t,n))}),[t,n,l])]}({min:_,max:y,value:null!=R?R:null,initial:f}),j=(0,v.useRef)(!1);let z=P,H=M;"any"===A&&(z=!1,H=!1);const[V,W]=(0,v.useState)(z),[$,U]=(0,v.useState)(!1),G=(0,v.useRef)(),q=null===(r=G.current)||void 0===r?void 0:r.matches(":focus"),K=!d&&$,Y=null===Z,X=Y?"":void 0!==Z?Z:u,J=Y?(y-_)/2+_:Z,Q=`${Im(Y?50:(Z-_)/(y-_)*100,0,100)}%`,ee=w()("components-range-control",s),te=w()("components-range-control__wrapper",!!b&&"is-marked"),ne=(0,dd.Z)(e,"inspector-range-control"),re=p?`${ne}__help`:void 0,oe=!1!==z&&Number.isFinite(Z),ie=()=>{let e=parseFloat(`${B}`),t=e;isNaN(e)&&(e=null,t=void 0),F(e),x(t)},le={[(0,N.isRTL)()?"right":"left"]:Q};return(0,v.createElement)(Xu.ZP,{__nextHasNoMarginBottom:o,className:ee,label:g,hideLabelFromVision:m,id:`${ne}`,help:p},(0,v.createElement)(gN,{className:"components-range-control__root"},a&&(0,v.createElement)(bN,null,(0,v.createElement)(Od.Z,{icon:a})),(0,v.createElement)(vN,{__nextHasNoMarginBottom:o,className:te,color:c,marks:!!b},(0,v.createElement)(DN,(0,Po.Z)({},O,{className:"components-range-control__slider",describedBy:re,disabled:d,id:`${ne}`,label:g,max:y,min:_,onBlur:e=>{k(e),U(!1),W(!1)},onChange:e=>{const t=parseFloat(e.target.value);F(t),x(t)},onFocus:e=>{C(e),U(!0),W(!0)},onMouseMove:S,onMouseLeave:E,ref:(0,vl.Z)([G,n]),step:A,value:null!=X?X:void 0})),(0,v.createElement)(MN,{"aria-hidden":!0,disabled:d,marks:b,max:y,min:_,railColor:I,step:A,value:J}),(0,v.createElement)(kN,{"aria-hidden":!0,className:"components-range-control__track",disabled:d,style:{width:Q},trackColor:D}),(0,v.createElement)(SN,{className:"components-range-control__thumb-wrapper",style:le,disabled:d},(0,v.createElement)(IN,{"aria-hidden":!0,isFocused:K,disabled:d})),oe&&(0,v.createElement)(ZN,{className:"components-range-control__tooltip",inputRef:G,tooltipPosition:"bottom",renderTooltipContent:T,show:q||V,style:le,value:Z})),i&&(0,v.createElement)(yN,null,(0,v.createElement)(Od.Z,{icon:i})),H&&(0,v.createElement)(PN,{"aria-label":g,className:"components-range-control__number",disabled:d,inputMode:"decimal",isShiftStepEnabled:h,max:y,min:_,onBlur:()=>{j.current&&(ie(),j.current=!1)},onChange:e=>{let t=parseFloat(e);F(t),isNaN(t)?l&&(j.current=!0):((t<_||t>y)&&(t=fN(t,_,y)),x(t),j.current=!1)},shiftStep:L,step:A,value:X}),l&&(0,v.createElement)(AN,null,(0,v.createElement)(Mo.ZP,{className:"components-range-control__reset",disabled:d||void 0===Z,variant:"secondary",isSmall:!0,onClick:ie},(0,N.__)("Reset")))))}));var zN=jN;const HN=(0,Ju.Z)(Dm,{target:"ez9hsf47"})(am.W2,"{width:",(0,hm.D)(24),";}"),VN=(0,Ju.Z)(mN.Z,{target:"ez9hsf46"})("margin-left:",(0,hm.D)(-2),";width:5em;",am.Kg,"{display:none;}"),WN=(0,Ju.Z)(zN,{target:"ez9hsf45"})("flex:1;margin-right:",(0,hm.D)(2),";"),$N=`\n.react-colorful__interactive {\n\twidth: calc( 100% - ${(0,hm.D)(2)} );\n\tmargin-left: ${(0,hm.D)(1)};\n}`,UN=(0,Ju.Z)("div",{target:"ez9hsf44"})("padding-top:",(0,hm.D)(2),";padding-right:0;padding-left:0;padding-bottom:0;"),GN=(0,Ju.Z)(Bm.Z,{target:"ez9hsf43"})("padding-left:",(0,hm.D)(4),";padding-right:",(0,hm.D)(4),";"),qN=(0,Ju.Z)(Uu.Z,{target:"ez9hsf42"})("padding-top:",(0,hm.D)(4),";padding-left:",(0,hm.D)(4),";padding-right:",(0,hm.D)(3),";padding-bottom:",(0,hm.D)(5),";"),KN=(0,Ju.Z)("div",{target:"ez9hsf41"})(JT.p,";width:216px;.react-colorful{display:flex;flex-direction:column;align-items:center;width:216px;height:auto;overflow:hidden;}.react-colorful__saturation{width:100%;border-radius:0;height:216px;margin-bottom:",(0,hm.D)(4),";border-bottom:none;}.react-colorful__hue,.react-colorful__alpha{width:184px;height:16px;border-radius:16px;margin-bottom:",(0,hm.D)(2),";}.react-colorful__pointer{height:16px;width:16px;border:none;box-shadow:0 0 2px 0 rgba( 0, 0, 0, 0.25 );outline:2px solid transparent;}.react-colorful__pointer-fill{box-shadow:inset 0 0 0 ",td.Z.borderWidthFocus," #fff;}",$N,";"),YN=(0,Ju.Z)(Mo.ZP,{target:"ez9hsf40"})("&&&&&{min-width:",(0,hm.D)(6),";padding:0;>svg{margin-right:0;}}");var XN=n(79519),JN=n(63107);const QN=(0,v.createContext)({});var eB=n(60932),tB=(0,Ku.Iq)((function(e,t){const{as:n="span",shortcut:r,className:o,...i}=(0,qu.y)(e,"Shortcut");if(!r)return null;let l,a;return"string"==typeof r?l=r:(l=r.display,a=r.ariaLabel),(0,v.createElement)(md.Z,(0,Po.Z)({as:n,className:o,"aria-label":a,ref:t},i),l)}),"Shortcut");const nB=(0,Qu.iv)("z-index:",1000002,";box-sizing:border-box;opacity:0;outline:none;transform-origin:top center;transition:opacity ",td.Z.transitionDurationFastest," ease;font-size:",td.Z.fontSize,";&[data-enter]{opacity:1;}",""),rB=(0,Ju.Z)("div",{target:"e7tfjmw1"})("background:rgba( 0, 0, 0, 0.8 );border-radius:2px;box-shadow:0 0 0 1px rgba( 255, 255, 255, 0.04 );color:",ed.D.white,";padding:4px 8px;"),oB={name:"12mkfdx",styles:"outline:none"},iB=(0,Ju.Z)(tB,{target:"e7tfjmw0"})("display:inline-block;margin-left:",(0,hm.D)(1),";"),{TooltipPopoverView:lB}=m;var aB=(0,Ku.Iq)((function(e,t){const{children:n,className:r,...o}=(0,qu.y)(e,"TooltipContent"),{tooltip:i}=(0,v.useContext)(QN),l=(0,Yu.I)()(nB,r);return(0,v.createElement)(eB.u,(0,Po.Z)({as:md.Z},o,i,{className:l,ref:t}),(0,v.createElement)(lB,null,n))}),"TooltipContent");const sB=(0,Ku.Iq)((function(e,t){const{animated:n=!0,animationDuration:r=160,baseId:o,children:i,content:l,focusable:a=!0,gutter:s=4,id:c,modal:u=!0,placement:d,visible:p=!1,shortcut:m,...f}=(0,qu.y)(e,"Tooltip"),h=(0,XN.K)({animated:n?r:void 0,baseId:o||c,gutter:s,placement:d,visible:p,...f}),g=(0,v.useMemo)((()=>({tooltip:h})),[h]);return(0,v.createElement)(QN.Provider,{value:g},l&&(0,v.createElement)(aB,{unstable_portal:u,ref:t},l,m&&(0,v.createElement)(iB,{shortcut:m})),i&&(0,v.createElement)(JN.v,(0,Po.Z)({},h,i.props,{ref:null==i?void 0:i.ref}),(e=>(a||(e.tabIndex=void 0),(0,v.cloneElement)(i,e)))))}),"Tooltip");var cB=sB;const uB=e=>{const{color:t,colorType:n}=e,[r,o]=(0,v.useState)(null),i=(0,v.useRef)(),l=ES((()=>{switch(n){case"hsl":return t.toHslString();case"rgb":return t.toRgbString();default:return t.toHex()}}),(()=>{i.current&&clearTimeout(i.current),o(t.toHex()),i.current=setTimeout((()=>{o(null),i.current=void 0}),3e3)}));return(0,v.useEffect)((()=>()=>{i.current&&clearTimeout(i.current)}),[]),(0,v.createElement)(cB,{content:(0,v.createElement)(rS.Z,{color:"white"},r===t.toHex()?(0,N.__)("Copied!"):(0,N.__)("Copy")),placement:"bottom"},(0,v.createElement)(YN,{isSmall:!0,ref:l,icon:JE.Z,showTooltip:!1}))},dB=e=>{let{min:t,max:n,label:r,abbreviation:o,onChange:i,value:l}=e;return(0,v.createElement)(Bm.Z,{spacing:4},(0,v.createElement)(HN,{min:t,max:n,label:r,hideLabelFromVision:!0,value:l,onChange:e=>{i(e?"string"!=typeof e?e:parseInt(e,10):0)},prefix:(0,v.createElement)(Lm.Z,{as:rS.Z,paddingLeft:(0,hm.D)(4),color:ed.D.ui.theme,lineHeight:1},o),spinControls:"none",size:"__unstable-large"}),(0,v.createElement)(WN,{__nextHasNoMarginBottom:!0,label:r,hideLabelFromVision:!0,min:t,max:n,value:l,onChange:i,withInputField:!1}))},pB=e=>{let{color:t,onChange:n,enableAlpha:r}=e;const{r:o,g:i,b:l,a:a}=t.toRgb();return(0,v.createElement)(v.Fragment,null,(0,v.createElement)(dB,{min:0,max:255,label:"Red",abbreviation:"R",value:o,onChange:e=>n((0,G.Vi)({r:e,g:i,b:l,a:a}))}),(0,v.createElement)(dB,{min:0,max:255,label:"Green",abbreviation:"G",value:i,onChange:e=>n((0,G.Vi)({r:o,g:e,b:l,a:a}))}),(0,v.createElement)(dB,{min:0,max:255,label:"Blue",abbreviation:"B",value:l,onChange:e=>n((0,G.Vi)({r:o,g:i,b:e,a:a}))}),r&&(0,v.createElement)(dB,{min:0,max:100,label:"Alpha",abbreviation:"A",value:Math.trunc(100*a),onChange:e=>n((0,G.Vi)({r:o,g:i,b:l,a:e/100}))}))},mB=e=>{let{color:t,onChange:n,enableAlpha:r}=e;const{h:o,s:i,l:l,a:a}=t.toHsl();return(0,v.createElement)(v.Fragment,null,(0,v.createElement)(dB,{min:0,max:359,label:"Hue",abbreviation:"H",value:o,onChange:e=>{n((0,G.Vi)({h:e,s:i,l:l,a:a}))}}),(0,v.createElement)(dB,{min:0,max:100,label:"Saturation",abbreviation:"S",value:i,onChange:e=>{n((0,G.Vi)({h:o,s:e,l:l,a:a}))}}),(0,v.createElement)(dB,{min:0,max:100,label:"Lightness",abbreviation:"L",value:l,onChange:e=>{n((0,G.Vi)({h:o,s:i,l:e,a:a}))}}),r&&(0,v.createElement)(dB,{min:0,max:100,label:"Alpha",abbreviation:"A",value:Math.trunc(100*a),onChange:e=>{n((0,G.Vi)({h:o,s:i,l:l,a:e/100}))}}))},fB=e=>{let{color:t,onChange:n,enableAlpha:r}=e;return(0,v.createElement)(vm,{prefix:(0,v.createElement)(Lm.Z,{as:rS.Z,marginLeft:(0,hm.D)(4),color:ed.D.ui.theme,lineHeight:1},"#"),value:t.toHex().slice(1).toUpperCase(),onChange:e=>{if(!e)return;const t=e.startsWith("#")?e:"#"+e;n((0,G.Vi)(t))},maxLength:r?9:7,label:(0,N.__)("Hex color"),hideLabelFromVision:!0,size:"__unstable-large",__unstableStateReducer:(e,t)=>{var n,r,o,i;const l=null===(n=t.payload)||void 0===n||null===(r=n.event)||void 0===r?void 0:r.nativeEvent;if("insertFromPaste"!==(null==l?void 0:l.inputType))return{...e};const a=null!==(o=e.value)&&void 0!==o&&o.startsWith("#")?e.value.slice(1).toUpperCase():null===(i=e.value)||void 0===i?void 0:i.toUpperCase();return{...e,value:a}},__unstableInputWidth:"9em"})},hB=e=>{let{colorType:t,color:n,onChange:r,enableAlpha:o}=e;const i={color:n,onChange:r,enableAlpha:o};switch(t){case"hsl":return(0,v.createElement)(mB,i);case"rgb":return(0,v.createElement)(pB,i);default:return(0,v.createElement)(fB,i)}};var gB=n(82471);const vB=e=>{let{color:t,enableAlpha:n,onChange:r}=e;const o=n?gB.ef:gB.W_,i=(0,v.useMemo)((()=>t.toRgbString()),[t]);return(0,v.createElement)(o,{color:i,onChange:e=>{r((0,G.Vi)(e))}})};(0,G.l7)([q.Z]);const bB=[{label:"RGB",value:"rgb"},{label:"HSL",value:"hsl"},{label:"Hex",value:"hex"}],yB=(0,Ku.Iq)(((e,t)=>{const{enableAlpha:n=!1,color:r,onChange:o,defaultValue:i="#fff",copyFormat:l,...a}=(0,qu.y)(e,"ColorPicker"),[s,c]=function(e){let{defaultValue:t,onChange:n,value:r}=e;const o=void 0!==r,i=o?r:t,[l,a]=(0,v.useState)(i);let s;return s=o&&"function"==typeof n?n:o||"function"!=typeof n?a:e=>{n(e),a(e)},[o?r:l,s]}({onChange:o,value:r,defaultValue:i}),u=(0,v.useMemo)((()=>(0,G.Vi)(s||"")),[s]),d=(0,Kh.Z)(c),p=(0,v.useCallback)((e=>{d(e.toHex())}),[d]),[m,f]=(0,v.useState)(l||"hex");return(0,v.createElement)(KN,(0,Po.Z)({ref:t},a),(0,v.createElement)(vB,{onChange:p,color:u,enableAlpha:n}),(0,v.createElement)(UN,null,(0,v.createElement)(GN,{justify:"space-between"},(0,v.createElement)(VN,{__nextHasNoMarginBottom:!0,options:bB,value:m,onChange:e=>f(e),label:(0,N.__)("Color format"),hideLabelFromVision:!0}),(0,v.createElement)(uB,{color:u,colorType:l||m})),(0,v.createElement)(qN,{direction:"column",gap:2},(0,v.createElement)(hB,{colorType:m,color:u,onChange:p,enableAlpha:n}))))}),"ColorPicker");var _B=yB;function kB(e){if(void 0!==e)return"string"==typeof e?e:e.hex?e.hex:void 0}const xB=fr()((e=>{const t=(0,G.Vi)(e),n=t.toHex(),r=t.toRgb(),o=t.toHsv(),i=t.toHsl();return{hex:n,rgb:r,hsv:o,hsl:i,source:"hex",oldHue:i.h}})),wB=e=>(0,v.createElement)(_B,function(e){const{onChangeComplete:t}=e,n=(0,v.useCallback)((e=>{t(xB(e))}),[t]);return function(e){var t;return void 0!==e.onChangeComplete||void 0!==e.disableAlpha||"string"==typeof(null===(t=e.color)||void 0===t?void 0:t.hex)}(e)?{color:kB(e.color),enableAlpha:!e.disableAlpha,onChange:n}:{...e,color:e.color,enableAlpha:e.enableAlpha,onChange:e.onChange}}(e));function CB(e){const{actions:t,className:n,options:r,children:o}=e;return(0,v.createElement)("div",{className:w()("components-circular-option-picker",n)},(0,v.createElement)("div",{className:"components-circular-option-picker__swatches"},r),o,t&&(0,v.createElement)("div",{className:"components-circular-option-picker__custom-clear-wrapper"},t))}CB.Option=function(e){let{className:t,isSelected:n,selectedIconProps:r,tooltipText:o,...i}=e;const l=(0,v.createElement)(Mo.ZP,(0,Po.Z)({isPressed:n,className:"components-circular-option-picker__option"},i));return(0,v.createElement)("div",{className:w()(t,"components-circular-option-picker__option-wrapper")},o?(0,v.createElement)(Ld.Z,{text:o},l):l,n&&(0,v.createElement)(Vm.Z,(0,Po.Z)({icon:ph.Z},r||{})))},CB.ButtonAction=function(e){let{className:t,children:n,...r}=e;return(0,v.createElement)(Mo.ZP,(0,Po.Z)({className:w()("components-circular-option-picker__clear",t),variant:"tertiary"},r),n)},CB.DropdownLinkAction=function(e){let{buttonProps:t,className:n,dropdownProps:r,linkText:o}=e;return(0,v.createElement)(j_.Z,(0,Po.Z)({className:w()("components-circular-option-picker__dropdown-link-action",n),renderToggle:e=>{let{isOpen:n,onToggle:r}=e;return(0,v.createElement)(Mo.ZP,(0,Po.Z)({"aria-expanded":n,"aria-haspopup":"true",onClick:r,variant:"link"},t),o)}},r))};var EB=CB;const SB=(0,Ju.Z)(gh,{target:"ev9wop70"})({name:"13lxv2o",styles:"text-transform:uppercase;line-height:24px;font-weight:500;&&&{font-size:11px;margin-bottom:0;}"}),IB=(0,Ju.Z)("div",{target:"eovvns30"})("margin-left:",(0,hm.D)(-2),";margin-right:",(0,hm.D)(-2),";&:first-of-type{margin-top:",(0,hm.D)(-2),";}&:last-of-type{margin-bottom:",(0,hm.D)(-2),";}",(e=>{let{paddingSize:t="small"}=e;if("none"===t)return;const n={small:(0,hm.D)(2),medium:(0,hm.D)(4)};return(0,Qu.iv)("padding:",n[t]||n.small,";","")}),";");var TB=(0,Ku.Iq)((function(e,t){const{paddingSize:n="small",...r}=(0,qu.y)(e,"DropdownContentWrapper");return(0,v.createElement)(IB,(0,Po.Z)({},r,{paddingSize:n,ref:t}))}),"DropdownContentWrapper");(0,G.l7)([q.Z,K.Z]);const NB=e=>e.length>0&&e.every((e=>{return t=e,Array.isArray(t.colors)&&!("color"in t);var t}));function BB(e){let{className:t,clearColor:n,colors:r,onChange:o,value:i,actions:l}=e;const a=(0,v.useMemo)((()=>r.map(((e,t)=>{let{color:r,name:l}=e;const a=(0,G.Vi)(r),s=i===r;return(0,v.createElement)(EB.Option,{key:`${r}-${t}`,isSelected:s,selectedIconProps:s?{fill:a.contrast()>a.contrast("#000")?"#fff":"#000"}:{},tooltipText:l||(0,N.sprintf)((0,N.__)("Color code: %s"),r),style:{backgroundColor:r,color:r},onClick:s?n:()=>o(r,t),"aria-label":l?(0,N.sprintf)((0,N.__)("Color: %s"),l):(0,N.sprintf)((0,N.__)("Color code: %s"),r)})}))),[r,i,o,n]);return(0,v.createElement)(EB,{className:t,options:a,actions:l})}function LB(e){let{className:t,clearColor:n,colors:r,onChange:o,value:i,actions:l,headingLevel:a}=e;return 0===r.length?null:(0,v.createElement)(Gw.Z,{spacing:3,className:t},r.map(((e,t)=>{let{name:s,colors:c}=e;return(0,v.createElement)(Gw.Z,{spacing:2,key:t},(0,v.createElement)(SB,{level:a},s),(0,v.createElement)(BB,{clearColor:n,colors:c,onChange:e=>o(e,t),value:i,actions:r.length===t+1?l:null}))})))}function PB(e){let{isRenderedInSidebar:t,popoverProps:n,...r}=e;const o=(0,v.useMemo)((()=>({shift:!0,...t?{placement:"left-start",offset:34}:{placement:"bottom",offset:8},...n})),[t,n]);return(0,v.createElement)(j_.Z,(0,Po.Z)({contentClassName:"components-color-palette__custom-color-dropdown-content",popoverProps:o},r))}(0,G.l7)([q.Z,K.Z]);const AB=(0,v.forwardRef)((function(e,t){const{clearable:n=!0,colors:r=[],disableCustomColors:o=!1,enableAlpha:i=!1,onChange:l,value:a,__experimentalIsRenderedInSidebar:s=!1,headingLevel:c=2,...u}=e,[d,p]=(0,v.useState)(a),m=(0,v.useCallback)((()=>l(void 0)),[l]),f=(0,v.useCallback)((e=>{p(((e,t)=>{if(!/^var\(/.test(null!=e?e:"")||null===t)return e;const{ownerDocument:n}=t,{defaultView:r}=n,o=null==r?void 0:r.getComputedStyle(t).backgroundColor;return o?(0,G.Vi)(o).toHex():e})(a,e))}),[a]),h=NB(r),g=(0,v.useMemo)((()=>function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!e)return"";const r=/^var\(/.test(e),o=r?e:(0,G.Vi)(e).toHex(),i=n?t:[{colors:t}];for(const{colors:e}of i)for(const{name:t,color:n}of e)if(o===(r?n:(0,G.Vi)(n).toHex()))return t;return(0,N.__)("Custom")}(a,r,h)),[a,r,h]),b=(0,G.Vi)(null!=d?d:""),y=null!=a&&a.startsWith("#")?a.substring(1):null!=a?a:"",_=y?(0,N.sprintf)((0,N.__)('Custom color picker. The currently selected color is called "%1$s" and has a value of "%2$s".'),g,y):(0,N.__)("Custom color picker."),k={clearable:n,clearColor:m,onChange:l,value:a,actions:!!n&&(0,v.createElement)(EB.ButtonAction,{onClick:m},(0,N.__)("Clear")),headingLevel:c};return(0,v.createElement)(Gw.Z,(0,Po.Z)({spacing:3,ref:t},u),!o&&(0,v.createElement)(PB,{isRenderedInSidebar:s,renderContent:()=>(0,v.createElement)(TB,{paddingSize:"none"},(0,v.createElement)(wB,{color:d,onChange:e=>l(e),enableAlpha:i})),renderToggle:e=>{let{isOpen:t,onToggle:n}=e;return(0,v.createElement)(Uu.Z,{as:"button",ref:f,justify:"space-between",align:"flex-start",className:"components-color-palette__custom-color","aria-expanded":t,"aria-haspopup":"true",onClick:n,"aria-label":_,style:(r=a,void 0===r||0===(0,G.Vi)(r).alpha()?{color:"#000"}:{background:a,color:b.contrast()>b.contrast("#000")?"#fff":"#000"})},(0,v.createElement)(Gu.Z,{isBlock:!0,as:Lx,className:"components-color-palette__custom-color-name"},g),(0,v.createElement)(Gu.Z,{as:"span",className:"components-color-palette__custom-color-value"},y));var r}}),h?(0,v.createElement)(LB,(0,Po.Z)({},k,{colors:r})):(0,v.createElement)(BB,(0,Po.Z)({},k,{colors:r})))}));var DB=AB;function RB(e){const{border:t,className:n,colors:r=[],enableAlpha:o=!1,enableStyle:i=!0,onChange:l,previousStyleSelection:a,size:s="default",__experimentalIsRenderedInSidebar:c=!1,...u}=(0,qu.y)(e,"BorderControlDropdown"),[d]=Hp(null==t?void 0:t.width),p=0===d,m=(0,Yu.I)(),f=(0,v.useMemo)((()=>m((e=>(0,Qu.iv)("background:#fff;&&>button{height:","__unstable-large"===e?"40px":"30px",";width:","__unstable-large"===e?"40px":"30px",";padding:0;display:flex;align-items:center;justify-content:center;",(0,nm.b)({borderRadius:"2px 0 0 2px"},{borderRadius:"0 2px 2px 0"})()," border:",td.Z.borderWidth," solid ",ed.D.ui.border,";&:focus,&:hover:not( :disabled ){",eN," border-color:",ed.D.ui.borderFocus,";z-index:1;position:relative;}}",""))(s),n)),[n,m,s]),h=(0,v.useMemo)((()=>m(iN)),[m]),g=(0,v.useMemo)((()=>m(((e,t)=>{const{style:n}=e||{};return(0,Qu.iv)("border-radius:9999px;border:2px solid transparent;",n?(e=>{const{color:t,style:n}=e||{},r=n&&"none"!==n?ed.D.gray[300]:void 0;return(0,Qu.iv)("border-style:","none"===n?"solid":n,";border-color:",t||r,";","")})(e):void 0," width:","__unstable-large"===t?"24px":"22px",";height:","__unstable-large"===t?"24px":"22px",";padding:","__unstable-large"===t?"2px":"1px",";&>span{height:",(0,hm.D)(4),";width:",(0,hm.D)(4),";background:linear-gradient(\n\t\t\t\t-45deg,\n\t\t\t\ttransparent 48%,\n\t\t\t\trgb( 0 0 0 / 20% ) 48%,\n\t\t\t\trgb( 0 0 0 / 20% ) 52%,\n\t\t\t\ttransparent 52%\n\t\t\t);}","")})(t,s))),[t,m,s]),b=(0,v.useMemo)((()=>m(rN)),[m]),y=(0,v.useMemo)((()=>m(oN)),[m]),_=(0,v.useMemo)((()=>m(lN)),[m]);return{...u,border:t,className:f,colors:r,enableAlpha:o,enableStyle:i,indicatorClassName:h,indicatorWrapperClassName:g,onColorChange:e=>{const n="none"===(null==t?void 0:t.style)?a:null==t?void 0:t.style,r=p&&e?"1px":null==t?void 0:t.width;l({color:e,style:n,width:r})},onStyleChange:e=>{const n=p&&e?"1px":null==t?void 0:t.width;l({...t,style:e,width:n})},onReset:()=>{l({...t,color:void 0,style:void 0})},popoverContentClassName:y,popoverControlsClassName:b,resetButtonClassName:_,__experimentalIsRenderedInSidebar:c}}const MB=(0,Ku.Iq)(((e,t)=>{const{__experimentalIsRenderedInSidebar:n,border:r,colors:o,disableCustomColors:i,enableAlpha:l,enableStyle:a,indicatorClassName:s,indicatorWrapperClassName:c,onReset:u,onColorChange:d,onStyleChange:p,popoverContentClassName:m,popoverControlsClassName:f,resetButtonClassName:h,showDropdownHeader:g,__unstablePopoverProps:b,...y}=RB(e),{color:_,style:k}=r||{},x=((e,t)=>{if(e&&t){if(NB(t)){let n;return t.some((t=>t.colors.some((t=>t.color===e&&(n=t,!0))))),n}return t.find((t=>t.color===e))}})(_,o),w=((e,t,n,r)=>r?t?n?(0,N.sprintf)('Border color and style picker. The currently selected color is called "%1$s" and has a value of "%2$s". The currently selected st
Showing 512.00 KB of 1.41 MB. Use Edit/Download for full content.

Directory Contents

Dirs: 2 × Files: 25

Name Size Perms Modified Actions
- drwxr-xr-x 2023-04-04 05:35:38
Edit Download
skins DIR
- drwxr-xr-x 2023-04-04 05:35:38
Edit Download
565.80 KB lrw-r--r-- 2023-04-04 05:35:38
Edit Download
81 B lrw-r--r-- 2023-04-04 05:35:38
Edit Download
69.76 KB lrw-r--r-- 2023-04-04 05:35:38
Edit Download
2.23 MB lrw-r--r-- 2023-04-04 05:35:38
Edit Download
521 B lrw-r--r-- 2023-04-04 05:35:38
Edit Download
58.82 KB lrw-r--r-- 2023-04-04 05:35:38
Edit Download
2.33 KB lrw-r--r-- 2023-04-04 05:35:38
Edit Download
2.16 MB lrw-r--r-- 2023-04-04 05:35:38
Edit Download
5.66 KB lrw-r--r-- 2023-04-04 05:35:38
Edit Download
1.41 MB lrw-r--r-- 2023-04-04 05:35:38
Edit Download
1.77 KB lrw-r--r-- 2023-04-04 05:35:38
Edit Download
136.22 KB lrw-r--r-- 2023-04-04 05:35:38
Edit Download
0 B lrw-r--r-- 2023-04-04 05:35:38
Edit Download
1.82 KB lrw-r--r-- 2023-04-04 05:35:38
Edit Download
492 B lrw-r--r-- 2023-04-04 05:35:38
Edit Download
1.11 KB lrw-r--r-- 2023-04-04 05:35:38
Edit Download
1.34 MB lrw-r--r-- 2023-04-04 05:35:38
Edit Download
388 B lrw-r--r-- 2023-04-04 05:35:38
Edit Download
13.32 KB lrw-r--r-- 2023-04-04 05:35:38
Edit Download
487 B lrw-r--r-- 2023-04-04 05:35:38
Edit Download
108.63 KB lrw-r--r-- 2023-04-04 05:35:38
Edit Download
734 B lrw-r--r-- 2023-04-04 05:35:38
Edit Download
2.40 KB lrw-r--r-- 2023-04-04 05:35:38
Edit Download
50.31 KB lrw-r--r-- 2023-04-04 05:35:38
Edit Download
4.66 KB lrw-r--r-- 2023-04-04 05:35:38
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).